From a4bcc99c5ae0f6e78894ac199075ffac1ca2eda8 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Mon, 13 Aug 2018 15:32:27 +0300 Subject: [PATCH] configure dep to prune tests, unused packages and non-go files Fixes: #74 --- Gopkg.toml | 10 + vendor/github.com/davecgh/go-spew/.gitignore | 22 - vendor/github.com/davecgh/go-spew/.travis.yml | 14 - vendor/github.com/davecgh/go-spew/README.md | 205 - .../github.com/davecgh/go-spew/cov_report.sh | 22 - .../davecgh/go-spew/spew/common_test.go | 298 - .../davecgh/go-spew/spew/dump_test.go | 1042 - .../davecgh/go-spew/spew/dumpcgo_test.go | 99 - .../davecgh/go-spew/spew/dumpnocgo_test.go | 26 - .../davecgh/go-spew/spew/example_test.go | 226 - .../davecgh/go-spew/spew/format_test.go | 1558 - .../davecgh/go-spew/spew/internal_test.go | 87 - .../go-spew/spew/internalunsafe_test.go | 102 - .../davecgh/go-spew/spew/spew_test.go | 320 - .../davecgh/go-spew/test_coverage.txt | 61 - .../fsnotify/fsnotify/.editorconfig | 5 - .../github.com/fsnotify/fsnotify/.gitignore | 6 - .../github.com/fsnotify/fsnotify/.travis.yml | 30 - .../github.com/fsnotify/fsnotify/CHANGELOG.md | 317 - .../fsnotify/fsnotify/CONTRIBUTING.md | 77 - vendor/github.com/fsnotify/fsnotify/README.md | 79 - .../fsnotify/fsnotify/example_test.go | 42 - .../fsnotify/fsnotify/fsnotify_test.go | 70 - .../fsnotify/fsnotify/inotify_poller_test.go | 229 - .../fsnotify/fsnotify/inotify_test.go | 449 - .../fsnotify/integration_darwin_test.go | 147 - .../fsnotify/fsnotify/integration_test.go | 1237 - vendor/github.com/ghodss/yaml/.gitignore | 20 - vendor/github.com/ghodss/yaml/.travis.yml | 7 - vendor/github.com/ghodss/yaml/README.md | 121 - vendor/github.com/ghodss/yaml/yaml_test.go | 287 - vendor/github.com/gogo/protobuf/.gitignore | 6 - vendor/github.com/gogo/protobuf/.mailmap | 8 - vendor/github.com/gogo/protobuf/.travis.yml | 22 - vendor/github.com/gogo/protobuf/Makefile | 167 - vendor/github.com/gogo/protobuf/README | 299 - vendor/github.com/gogo/protobuf/Readme.md | 151 - vendor/github.com/gogo/protobuf/bench.md | 190 - .../github.com/gogo/protobuf/custom_types.md | 68 - vendor/github.com/gogo/protobuf/extensions.md | 164 - .../gogo/protobuf/gogoproto/Makefile | 37 - .../gogo/protobuf/gogoproto/gogo.pb.golden | 45 - .../gogo/protobuf/gogoproto/gogo.proto | 136 - .../gogo/protobuf/install-protobuf.sh | 28 - .../github.com/gogo/protobuf/proto/Makefile | 43 - .../gogo/protobuf/proto/all_test.go | 2421 - .../gogo/protobuf/proto/any_test.go | 300 - .../gogo/protobuf/proto/clone_test.go | 397 - .../gogo/protobuf/proto/decode_test.go | 259 - .../gogo/protobuf/proto/discard_test.go | 169 - .../gogo/protobuf/proto/encode_test.go | 84 - .../gogo/protobuf/proto/equal_test.go | 244 - .../gogo/protobuf/proto/extensions_test.go | 691 - .../gogo/protobuf/proto/map_test.go | 70 - .../gogo/protobuf/proto/message_set_test.go | 77 - .../gogo/protobuf/proto/proto3_test.go | 151 - .../gogo/protobuf/proto/size2_test.go | 63 - .../gogo/protobuf/proto/size_test.go | 190 - .../gogo/protobuf/proto/text_parser_test.go | 706 - .../gogo/protobuf/proto/text_test.go | 518 - .../gogo/protobuf/protoc-gen-gogo/Makefile | 41 - .../protoc-gen-gogo/descriptor/Makefile | 36 - .../descriptor/descriptor_test.go | 31 - .../gogo/protobuf/protoc-gen-gogo/doc.go | 51 - .../protobuf/protoc-gen-gogo/golden_test.go | 407 - .../gogo/protobuf/protoc-gen-gogo/main.go | 57 - vendor/github.com/golang/glog/README | 44 - vendor/github.com/golang/glog/glog_test.go | 415 - vendor/github.com/golang/protobuf/.gitignore | 17 - vendor/github.com/golang/protobuf/.travis.yml | 30 - vendor/github.com/golang/protobuf/Makefile | 48 - vendor/github.com/golang/protobuf/README.md | 283 - .../golang/protobuf/proto/all_test.go | 2410 - .../golang/protobuf/proto/any_test.go | 300 - .../golang/protobuf/proto/clone_test.go | 390 - .../golang/protobuf/proto/decode_test.go | 255 - .../golang/protobuf/proto/discard_test.go | 170 - .../golang/protobuf/proto/encode_test.go | 85 - .../golang/protobuf/proto/equal_test.go | 244 - .../golang/protobuf/proto/extensions_test.go | 688 - .../golang/protobuf/proto/map_test.go | 70 - .../golang/protobuf/proto/message_set_test.go | 77 - .../golang/protobuf/proto/proto3_test.go | 151 - .../golang/protobuf/proto/size2_test.go | 63 - .../golang/protobuf/proto/size_test.go | 191 - .../golang/protobuf/proto/text_parser_test.go | 706 - .../golang/protobuf/proto/text_test.go | 518 - .../golang/protobuf/ptypes/any/any.proto | 149 - .../golang/protobuf/ptypes/any_test.go | 113 - .../protobuf/ptypes/duration/duration.proto | 117 - .../golang/protobuf/ptypes/duration_test.go | 121 - .../protobuf/ptypes/timestamp/timestamp.proto | 133 - .../golang/protobuf/ptypes/timestamp_test.go | 153 - .../github.com/golang/protobuf/regenerate.sh | 53 - vendor/github.com/google/btree/.travis.yml | 1 - vendor/github.com/google/btree/README.md | 12 - vendor/github.com/google/btree/btree_test.go | 770 - vendor/github.com/google/gofuzz/.travis.yml | 13 - .../github.com/google/gofuzz/CONTRIBUTING.md | 67 - vendor/github.com/google/gofuzz/README.md | 71 - .../github.com/google/gofuzz/example_test.go | 225 - vendor/github.com/google/gofuzz/fuzz_test.go | 472 - .../github.com/googleapis/gnostic/.gitignore | 21 - .../googleapis/gnostic/.travis-install.sh | 29 - .../github.com/googleapis/gnostic/.travis.yml | 49 - .../googleapis/gnostic/COMPILE-PROTOS.sh | 35 - .../googleapis/gnostic/CONTRIBUTING.md | 35 - vendor/github.com/googleapis/gnostic/Makefile | 16 - .../gnostic/OpenAPIv2/OpenAPIv2.proto | 663 - .../googleapis/gnostic/OpenAPIv2/README.md | 16 - .../gnostic/OpenAPIv2/openapi-2.0.json | 1610 - .../github.com/googleapis/gnostic/README.md | 109 - .../googleapis/gnostic/compiler/README.md | 3 - .../gnostic/extensions/COMPILE-EXTENSION.sh | 5 - .../googleapis/gnostic/extensions/README.md | 5 - .../gnostic/extensions/extension.proto | 93 - .../github.com/googleapis/gnostic/gnostic.go | 610 - .../googleapis/gnostic/gnostic_test.go | 453 - .../gregjones/httpcache/.travis.yml | 19 - .../github.com/gregjones/httpcache/README.md | 25 - .../httpcache/diskcache/diskcache_test.go | 42 - .../gregjones/httpcache/httpcache_test.go | 1475 - .../hashicorp/golang-lru/.gitignore | 23 - .../hashicorp/golang-lru/2q_test.go | 306 - .../github.com/hashicorp/golang-lru/README.md | 25 - .../hashicorp/golang-lru/arc_test.go | 377 - .../hashicorp/golang-lru/lru_test.go | 221 - .../golang-lru/simplelru/lru_test.go | 167 - vendor/github.com/imdario/mergo/.gitignore | 33 - vendor/github.com/imdario/mergo/.travis.yml | 7 - .../imdario/mergo/CODE_OF_CONDUCT.md | 46 - vendor/github.com/imdario/mergo/README.md | 222 - .../github.com/imdario/mergo/issue17_test.go | 25 - .../github.com/imdario/mergo/issue23_test.go | 27 - .../github.com/imdario/mergo/issue33_test.go | 33 - .../github.com/imdario/mergo/issue38_test.go | 59 - .../github.com/imdario/mergo/issue50_test.go | 18 - .../github.com/imdario/mergo/issue52_test.go | 99 - .../github.com/imdario/mergo/issue61_test.go | 20 - .../github.com/imdario/mergo/issue64_test.go | 38 - .../github.com/imdario/mergo/issue66_test.go | 48 - .../imdario/mergo/merge_appendslice_test.go | 33 - vendor/github.com/imdario/mergo/merge_test.go | 50 - vendor/github.com/imdario/mergo/mergo_test.go | 755 - vendor/github.com/imdario/mergo/pr80_test.go | 18 - vendor/github.com/imdario/mergo/pr81_test.go | 42 - .../imdario/mergo/testdata/license.yml | 4 + .../github.com/json-iterator/go/.codecov.yml | 3 - vendor/github.com/json-iterator/go/.gitignore | 4 - .../github.com/json-iterator/go/.travis.yml | 14 - vendor/github.com/json-iterator/go/Gopkg.lock | 21 - vendor/github.com/json-iterator/go/Gopkg.toml | 26 - vendor/github.com/json-iterator/go/README.md | 91 - vendor/github.com/json-iterator/go/build.sh | 12 - .../json-iterator/go/example_test.go | 121 - .../go/fuzzy_mode_convert_table.md | 7 - .../json-iterator/go/iter_skip_sloppy_test.go | 162 - .../json-iterator/go/stream_test.go | 69 - vendor/github.com/json-iterator/go/test.sh | 12 - .../modern-go/concurrent/.gitignore | 1 - .../modern-go/concurrent/.travis.yml | 14 - .../github.com/modern-go/concurrent/README.md | 49 - .../modern-go/concurrent/map_test.go | 18 - .../github.com/modern-go/concurrent/test.sh | 12 - .../concurrent/unbounded_executor_test.go | 54 - .../github.com/modern-go/reflect2/.gitignore | 2 - .../github.com/modern-go/reflect2/.travis.yml | 15 - .../github.com/modern-go/reflect2/Gopkg.lock | 15 - .../github.com/modern-go/reflect2/Gopkg.toml | 35 - .../github.com/modern-go/reflect2/README.md | 71 - vendor/github.com/modern-go/reflect2/test.sh | 12 - vendor/github.com/petar/GoLLRB/.gitignore | 23 - vendor/github.com/petar/GoLLRB/README.md | 66 - .../petar/GoLLRB/llrb/iterator_test.go | 76 - .../github.com/petar/GoLLRB/llrb/llrb_test.go | 239 - .../github.com/peterbourgon/diskv/README.md | 141 - .../peterbourgon/diskv/basic_test.go | 336 - .../peterbourgon/diskv/compression_test.go | 72 - .../peterbourgon/diskv/import_test.go | 76 - .../peterbourgon/diskv/index_test.go | 148 - .../peterbourgon/diskv/issues_test.go | 121 - .../peterbourgon/diskv/keys_test.go | 231 - .../peterbourgon/diskv/speed_test.go | 153 - .../peterbourgon/diskv/stream_test.go | 117 - vendor/github.com/spf13/pflag/.gitignore | 2 - vendor/github.com/spf13/pflag/.travis.yml | 21 - vendor/github.com/spf13/pflag/README.md | 296 - .../github.com/spf13/pflag/bool_slice_test.go | 215 - vendor/github.com/spf13/pflag/bool_test.go | 179 - vendor/github.com/spf13/pflag/bytes_test.go | 134 - vendor/github.com/spf13/pflag/count_test.go | 56 - .../spf13/pflag/duration_slice_test.go | 165 - vendor/github.com/spf13/pflag/example_test.go | 36 - vendor/github.com/spf13/pflag/export_test.go | 29 - vendor/github.com/spf13/pflag/flag_test.go | 1259 - .../github.com/spf13/pflag/golangflag_test.go | 47 - .../github.com/spf13/pflag/int_slice_test.go | 165 - .../github.com/spf13/pflag/ip_slice_test.go | 222 - vendor/github.com/spf13/pflag/ip_test.go | 63 - vendor/github.com/spf13/pflag/ipnet_test.go | 70 - .../github.com/spf13/pflag/printusage_test.go | 74 - .../spf13/pflag/string_array_test.go | 233 - .../spf13/pflag/string_slice_test.go | 253 - .../github.com/spf13/pflag/uint_slice_test.go | 161 - vendor/golang.org/x/crypto/.gitattributes | 10 - vendor/golang.org/x/crypto/.gitignore | 2 - vendor/golang.org/x/crypto/CONTRIBUTING.md | 26 - vendor/golang.org/x/crypto/README.md | 21 - vendor/golang.org/x/crypto/codereview.cfg | 1 - .../golang.org/x/crypto/ssh/benchmark_test.go | 123 - vendor/golang.org/x/crypto/ssh/buffer.go | 97 - vendor/golang.org/x/crypto/ssh/buffer_test.go | 87 - vendor/golang.org/x/crypto/ssh/certs.go | 521 - vendor/golang.org/x/crypto/ssh/certs_test.go | 335 - vendor/golang.org/x/crypto/ssh/channel.go | 633 - vendor/golang.org/x/crypto/ssh/cipher.go | 770 - vendor/golang.org/x/crypto/ssh/cipher_test.go | 131 - vendor/golang.org/x/crypto/ssh/client.go | 278 - vendor/golang.org/x/crypto/ssh/client_auth.go | 525 - .../x/crypto/ssh/client_auth_test.go | 628 - vendor/golang.org/x/crypto/ssh/client_test.go | 166 - vendor/golang.org/x/crypto/ssh/common.go | 383 - vendor/golang.org/x/crypto/ssh/connection.go | 143 - vendor/golang.org/x/crypto/ssh/doc.go | 21 - .../golang.org/x/crypto/ssh/example_test.go | 320 - vendor/golang.org/x/crypto/ssh/handshake.go | 646 - .../golang.org/x/crypto/ssh/handshake_test.go | 559 - vendor/golang.org/x/crypto/ssh/kex.go | 540 - vendor/golang.org/x/crypto/ssh/kex_test.go | 50 - vendor/golang.org/x/crypto/ssh/keys.go | 1035 - vendor/golang.org/x/crypto/ssh/keys_test.go | 500 - vendor/golang.org/x/crypto/ssh/mac.go | 61 - .../golang.org/x/crypto/ssh/mempipe_test.go | 110 - vendor/golang.org/x/crypto/ssh/messages.go | 766 - .../golang.org/x/crypto/ssh/messages_test.go | 288 - vendor/golang.org/x/crypto/ssh/mux.go | 330 - vendor/golang.org/x/crypto/ssh/mux_test.go | 501 - vendor/golang.org/x/crypto/ssh/server.go | 593 - vendor/golang.org/x/crypto/ssh/session.go | 647 - .../golang.org/x/crypto/ssh/session_test.go | 774 - vendor/golang.org/x/crypto/ssh/streamlocal.go | 116 - vendor/golang.org/x/crypto/ssh/tcpip.go | 474 - vendor/golang.org/x/crypto/ssh/tcpip_test.go | 20 - .../x/crypto/ssh/terminal/terminal_test.go | 358 - .../golang.org/x/crypto/ssh/testdata_test.go | 63 - vendor/golang.org/x/crypto/ssh/transport.go | 353 - .../golang.org/x/crypto/ssh/transport_test.go | 113 - vendor/golang.org/x/net/.gitattributes | 10 - vendor/golang.org/x/net/.gitignore | 2 - vendor/golang.org/x/net/CONTRIBUTING.md | 26 - vendor/golang.org/x/net/README.md | 16 - vendor/golang.org/x/net/codereview.cfg | 1 - .../golang.org/x/net/context/context_test.go | 583 - .../x/net/context/withtimeout_test.go | 31 - .../x/net/http/httpguts/httplex_test.go | 119 - vendor/golang.org/x/net/http2/.gitignore | 2 - vendor/golang.org/x/net/http2/Dockerfile | 51 - vendor/golang.org/x/net/http2/Makefile | 3 - vendor/golang.org/x/net/http2/README | 20 - vendor/golang.org/x/net/http2/ciphers_test.go | 309 - .../golang.org/x/net/http2/databuffer_test.go | 157 - vendor/golang.org/x/net/http2/errors_test.go | 24 - vendor/golang.org/x/net/http2/flow_test.go | 87 - vendor/golang.org/x/net/http2/frame_test.go | 1235 - vendor/golang.org/x/net/http2/go18_test.go | 79 - vendor/golang.org/x/net/http2/go19_test.go | 59 - vendor/golang.org/x/net/http2/gotrack_test.go | 33 - .../x/net/http2/hpack/encode_test.go | 386 - .../x/net/http2/hpack/hpack_test.go | 762 - .../x/net/http2/hpack/tables_test.go | 214 - vendor/golang.org/x/net/http2/http2_test.go | 227 - vendor/golang.org/x/net/http2/pipe_test.go | 130 - .../x/net/http2/server_push_test.go | 521 - vendor/golang.org/x/net/http2/server_test.go | 3852 - .../golang.org/x/net/http2/transport_test.go | 4185 - .../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 - vendor/golang.org/x/net/http2/z_spec_test.go | 356 - vendor/golang.org/x/net/idna/example_test.go | 70 - vendor/golang.org/x/net/idna/idna_test.go | 108 - vendor/golang.org/x/net/idna/punycode_test.go | 198 - .../internal/timeseries/timeseries_test.go | 170 - .../golang.org/x/net/trace/histogram_test.go | 325 - vendor/golang.org/x/net/trace/trace_test.go | 178 - vendor/golang.org/x/sys/.gitattributes | 10 - vendor/golang.org/x/sys/.gitignore | 2 - vendor/golang.org/x/sys/CONTRIBUTING.md | 26 - vendor/golang.org/x/sys/README.md | 18 - vendor/golang.org/x/sys/codereview.cfg | 1 - vendor/golang.org/x/sys/unix/.gitignore | 2 - vendor/golang.org/x/sys/unix/README.md | 173 - vendor/golang.org/x/sys/unix/creds_test.go | 134 - .../golang.org/x/sys/unix/dev_linux_test.go | 56 - vendor/golang.org/x/sys/unix/example_test.go | 19 - vendor/golang.org/x/sys/unix/export_test.go | 9 - vendor/golang.org/x/sys/unix/mkall.sh | 188 - vendor/golang.org/x/sys/unix/mkerrors.sh | 607 - vendor/golang.org/x/sys/unix/mksyscall.pl | 341 - .../x/sys/unix/mksyscall_solaris.pl | 289 - .../golang.org/x/sys/unix/mksysctl_openbsd.pl | 264 - .../golang.org/x/sys/unix/mksysnum_darwin.pl | 39 - .../x/sys/unix/mksysnum_dragonfly.pl | 50 - .../golang.org/x/sys/unix/mksysnum_freebsd.pl | 50 - .../golang.org/x/sys/unix/mksysnum_netbsd.pl | 58 - .../golang.org/x/sys/unix/mksysnum_openbsd.pl | 50 - .../golang.org/x/sys/unix/mmap_unix_test.go | 35 - vendor/golang.org/x/sys/unix/openbsd_test.go | 113 - .../golang.org/x/sys/unix/syscall_bsd_test.go | 93 - .../x/sys/unix/syscall_darwin_test.go | 19 - .../x/sys/unix/syscall_freebsd_test.go | 312 - .../x/sys/unix/syscall_linux_test.go | 443 - .../x/sys/unix/syscall_solaris_test.go | 55 - vendor/golang.org/x/sys/unix/syscall_test.go | 60 - .../x/sys/unix/syscall_unix_test.go | 657 - .../golang.org/x/sys/unix/timestruct_test.go | 54 - vendor/golang.org/x/sys/unix/xattr_test.go | 201 - .../golang.org/x/sys/windows/syscall_test.go | 53 - .../x/sys/windows/syscall_windows_test.go | 113 - vendor/golang.org/x/text/.gitattributes | 10 - vendor/golang.org/x/text/.gitignore | 6 - vendor/golang.org/x/text/CONTRIBUTING.md | 31 - vendor/golang.org/x/text/README.md | 93 - vendor/golang.org/x/text/codereview.cfg | 1 - .../x/text/collate/build/builder_test.go | 290 - .../x/text/collate/build/colelem_test.go | 215 - .../x/text/collate/build/contract_test.go | 266 - .../x/text/collate/build/order_test.go | 229 - .../x/text/collate/build/trie_test.go | 107 - .../golang.org/x/text/collate/collate_test.go | 482 - .../golang.org/x/text/collate/export_test.go | 51 - .../golang.org/x/text/collate/option_test.go | 209 - vendor/golang.org/x/text/collate/reg_test.go | 230 - vendor/golang.org/x/text/collate/sort_test.go | 55 - .../golang.org/x/text/collate/table_test.go | 291 - vendor/golang.org/x/text/doc.go | 13 - vendor/golang.org/x/text/gen.go | 319 - .../x/text/internal/colltab/collate_test.go | 121 - .../x/text/internal/colltab/collelem_test.go | 183 - .../x/text/internal/colltab/colltab_test.go | 64 - .../x/text/internal/colltab/contract_test.go | 131 - .../x/text/internal/colltab/iter_test.go | 63 - .../x/text/internal/colltab/numeric_test.go | 159 - .../x/text/internal/colltab/trie_test.go | 106 - .../x/text/internal/colltab/weighter_test.go | 42 - vendor/golang.org/x/text/internal/gen.go | 52 - vendor/golang.org/x/text/internal/gen_test.go | 38 - vendor/golang.org/x/text/internal/internal.go | 51 - .../x/text/internal/internal_test.go | 38 - vendor/golang.org/x/text/internal/match.go | 67 - .../golang.org/x/text/internal/match_test.go | 56 - vendor/golang.org/x/text/internal/tables.go | 118 - .../x/text/internal/tag/tag_test.go | 67 - .../x/text/internal/triegen/data_test.go | 875 - .../internal/triegen/example_compact_test.go | 71 - .../x/text/internal/triegen/example_test.go | 148 - .../x/text/internal/triegen/gen_test.go | 68 - .../x/text/internal/ucd/example_test.go | 81 - .../x/text/internal/ucd/ucd_test.go | 105 - vendor/golang.org/x/text/language/Makefile | 16 - .../x/text/language/coverage_test.go | 154 - .../x/text/language/examples_test.go | 413 - .../x/text/language/httpexample_test.go | 48 - .../x/text/language/language_test.go | 911 - .../golang.org/x/text/language/lookup_test.go | 457 - .../golang.org/x/text/language/match_test.go | 505 - .../golang.org/x/text/language/parse_test.go | 517 - .../x/text/secure/bidirule/bench_test.go | 54 - .../secure/bidirule/bidirule10.0.0_test.go | 694 - .../secure/bidirule/bidirule9.0.0_test.go | 668 - .../x/text/secure/bidirule/bidirule_test.go | 168 - vendor/golang.org/x/text/secure/doc.go | 6 - .../x/text/transform/examples_test.go | 37 - .../x/text/transform/transform_test.go | 1317 - .../x/text/unicode/bidi/core_test.go | 224 - .../x/text/unicode/bidi/ranges_test.go | 53 - .../x/text/unicode/bidi/tables_test.go | 82 - .../x/text/unicode/cldr/cldr_test.go | 27 - .../x/text/unicode/cldr/collate_test.go | 275 - .../x/text/unicode/cldr/data_test.go | 186 - .../x/text/unicode/cldr/examples_test.go | 21 - .../x/text/unicode/cldr/resolve_test.go | 368 - .../x/text/unicode/cldr/slice_test.go | 175 - vendor/golang.org/x/text/unicode/doc.go | 8 - .../x/text/unicode/norm/composition_test.go | 130 - .../x/text/unicode/norm/data10.0.0_test.go | 7424 -- .../x/text/unicode/norm/data9.0.0_test.go | 7409 - .../x/text/unicode/norm/example_iter_test.go | 82 - .../x/text/unicode/norm/example_test.go | 27 - .../x/text/unicode/norm/forminfo_test.go | 54 - .../x/text/unicode/norm/iter_test.go | 98 - .../x/text/unicode/norm/normalize_test.go | 1287 - .../x/text/unicode/norm/readwriter_test.go | 56 - .../x/text/unicode/norm/transform_test.go | 101 - .../x/text/unicode/norm/ucd_test.go | 275 - .../x/text/unicode/rangetable/merge_test.go | 184 - .../unicode/rangetable/rangetable_test.go | 55 - vendor/golang.org/x/time/CONTRIBUTING.md | 26 - vendor/golang.org/x/time/README.md | 17 - vendor/golang.org/x/time/rate/rate_test.go | 459 - vendor/golang.org/x/tools/.gitattributes | 10 - vendor/golang.org/x/tools/.gitignore | 2 - vendor/golang.org/x/tools/CONTRIBUTING.md | 26 - vendor/golang.org/x/tools/README.md | 27 - vendor/golang.org/x/tools/cmd/getgo/LICENSE | 27 + vendor/golang.org/x/tools/codereview.cfg | 1 - .../x/tools/go/ast/astutil/enclosing_test.go | 195 - .../x/tools/go/ast/astutil/imports_test.go | 1820 - .../x/tools/go/ast/astutil/rewrite_test.go | 248 - vendor/golang.org/x/tools/imports/fix_test.go | 2367 - .../tools/internal/fastwalk/fastwalk_test.go | 190 - .../x/tools/third_party/moduleloader/LICENSE | 22 + .../x/tools/third_party/typescript/LICENSE | 55 + .../x/tools/third_party/webcomponents/LICENSE | 27 + vendor/google.golang.org/genproto/.travis.yml | 12 - .../genproto/CONTRIBUTING.md | 27 - vendor/google.golang.org/genproto/README.md | 28 - vendor/google.golang.org/genproto/regen.go | 137 - vendor/google.golang.org/genproto/regen.sh | 86 - vendor/google.golang.org/grpc/.travis.yml | 34 - vendor/google.golang.org/grpc/CONTRIBUTING.md | 36 - vendor/google.golang.org/grpc/Makefile | 55 - vendor/google.golang.org/grpc/README.md | 45 - .../balancer/roundrobin/roundrobin_test.go | 477 - .../grpc/balancer_switching_test.go | 469 - .../google.golang.org/grpc/balancer_test.go | 804 - vendor/google.golang.org/grpc/call_test.go | 293 - .../google.golang.org/grpc/clientconn_test.go | 703 - vendor/google.golang.org/grpc/codec_test.go | 32 - vendor/google.golang.org/grpc/codegen.sh | 17 - .../grpc/codes/codes_test.go | 84 - .../grpc/credentials/credentials_test.go | 206 - .../encoding/proto/proto_benchmark_test.go | 100 - .../grpc/encoding/proto/proto_test.go | 129 - .../grpc/grpclog/loggerv2_test.go | 62 - vendor/google.golang.org/grpc/install_gae.sh | 6 - .../grpc/internal/channelz/util_test.go | 91 - .../internal/transport/handler_server_test.go | 482 - .../grpc/internal/transport/http_util_test.go | 237 - .../grpc/internal/transport/transport_test.go | 2349 - .../grpc/metadata/metadata_test.go | 251 - .../grpc/naming/dns_resolver_test.go | 315 - .../grpc/naming/go17_test.go | 42 - .../grpc/naming/go18_test.go | 41 - .../grpc/picker_wrapper_test.go | 160 - .../google.golang.org/grpc/pickfirst_test.go | 360 - vendor/google.golang.org/grpc/proxy_test.go | 182 - .../grpc/resolver/dns/dns_resolver_test.go | 995 - .../grpc/resolver/dns/go17_test.go | 50 - .../grpc/resolver/dns/go18_test.go | 49 - .../grpc/resolver_conn_wrapper_test.go | 113 - .../google.golang.org/grpc/rpc_util_test.go | 288 - vendor/google.golang.org/grpc/server_test.go | 136 - .../grpc/service_config_test.go | 386 - .../grpc/stats/stats_test.go | 1257 - .../grpc/status/go17_test.go | 44 - .../grpc/status/status_test.go | 348 - vendor/google.golang.org/grpc/vet.sh | 89 - vendor/gopkg.in/inf.v0/benchmark_test.go | 210 - vendor/gopkg.in/inf.v0/dec_go1_2_test.go | 33 - vendor/gopkg.in/inf.v0/dec_internal_test.go | 40 - vendor/gopkg.in/inf.v0/dec_test.go | 379 - vendor/gopkg.in/inf.v0/example_test.go | 62 - .../gopkg.in/inf.v0/rounder_example_test.go | 73 - vendor/gopkg.in/inf.v0/rounder_test.go | 109 - vendor/gopkg.in/yaml.v2/.travis.yml | 12 - vendor/gopkg.in/yaml.v2/README.md | 133 - vendor/gopkg.in/yaml.v2/decode_test.go | 1326 - vendor/gopkg.in/yaml.v2/encode_test.go | 595 - .../gopkg.in/yaml.v2/example_embedded_test.go | 41 - vendor/gopkg.in/yaml.v2/go.mod | 5 - vendor/gopkg.in/yaml.v2/suite_test.go | 12 - vendor/k8s.io/api/CONTRIBUTING.md | 7 - vendor/k8s.io/api/OWNERS | 50 - vendor/k8s.io/api/README.md | 1 - vendor/k8s.io/api/SECURITY_CONTACTS | 17 - .../api/admission/v1beta1/generated.proto | 112 - .../v1alpha1/generated.proto | 108 - .../v1beta1/generated.proto | 263 - vendor/k8s.io/api/apps/OWNERS | 19 - vendor/k8s.io/api/apps/v1/generated.proto | 701 - .../k8s.io/api/apps/v1beta1/generated.proto | 484 - .../k8s.io/api/apps/v1beta2/generated.proto | 752 - vendor/k8s.io/api/authentication/OWNERS | 9 - .../api/authentication/v1/generated.proto | 160 - .../authentication/v1beta1/generated.proto | 99 - vendor/k8s.io/api/authorization/OWNERS | 17 - .../api/authorization/v1/generated.proto | 273 - .../api/authorization/v1beta1/generated.proto | 273 - vendor/k8s.io/api/autoscaling/OWNERS | 19 - .../k8s.io/api/autoscaling/v1/generated.proto | 382 - .../api/autoscaling/v2beta1/generated.proto | 363 - vendor/k8s.io/api/batch/OWNERS | 18 - vendor/k8s.io/api/batch/v1/generated.proto | 173 - .../k8s.io/api/batch/v1beta1/generated.proto | 138 - .../k8s.io/api/batch/v2alpha1/generated.proto | 136 - vendor/k8s.io/api/certificates/OWNERS | 14 - .../api/certificates/v1beta1/generated.proto | 122 - vendor/k8s.io/api/code-of-conduct.md | 3 - vendor/k8s.io/api/core/v1/generated.proto | 4711 - vendor/k8s.io/api/core/v1/taint_test.go | 122 - vendor/k8s.io/api/core/v1/toleration_test.go | 123 - vendor/k8s.io/api/events/OWNERS | 8 - .../k8s.io/api/events/v1beta1/generated.proto | 122 - vendor/k8s.io/api/extensions/OWNERS | 38 - .../api/extensions/v1beta1/generated.proto | 1161 - vendor/k8s.io/api/networking/OWNERS | 5 - .../k8s.io/api/networking/v1/generated.proto | 197 - vendor/k8s.io/api/policy/OWNERS | 8 - .../k8s.io/api/policy/v1beta1/generated.proto | 334 - vendor/k8s.io/api/rbac/OWNERS | 17 - vendor/k8s.io/api/rbac/v1/generated.proto | 199 - .../k8s.io/api/rbac/v1alpha1/generated.proto | 200 - .../k8s.io/api/rbac/v1beta1/generated.proto | 200 - vendor/k8s.io/api/roundtrip_test.go | 151 - .../api/scheduling/v1alpha1/generated.proto | 68 - .../api/scheduling/v1beta1/generated.proto | 68 - .../api/settings/v1alpha1/generated.proto | 76 - vendor/k8s.io/api/storage/OWNERS | 3 - vendor/k8s.io/api/storage/v1/generated.proto | 94 - .../api/storage/v1alpha1/generated.proto | 128 - .../api/storage/v1beta1/generated.proto | 190 - .../apiextensions-apiserver/CONTRIBUTING.md | 7 - vendor/k8s.io/apiextensions-apiserver/OWNERS | 9 - .../k8s.io/apiextensions-apiserver/README.md | 20 - .../apiextensions-apiserver/SECURITY_CONTACTS | 17 - .../code-of-conduct.md | 3 - .../pkg/features/OWNERS | 2 - vendor/k8s.io/apimachinery/CONTRIBUTING.md | 7 - vendor/k8s.io/apimachinery/OWNERS | 21 - vendor/k8s.io/apimachinery/README.md | 29 - vendor/k8s.io/apimachinery/SECURITY_CONTACTS | 17 - vendor/k8s.io/apimachinery/code-of-conduct.md | 3 - vendor/k8s.io/apimachinery/pkg/OWNERS | 6 - .../k8s.io/apimachinery/pkg/api/errors/OWNERS | 24 - .../pkg/api/errors/errors_test.go | 222 - .../k8s.io/apimachinery/pkg/api/meta/OWNERS | 25 - .../apimachinery/pkg/api/meta/meta_test.go | 51 - .../pkg/api/meta/multirestmapper_test.go | 391 - .../pkg/api/meta/priority_test.go | 409 - .../pkg/api/meta/restmapper_test.go | 724 - .../apimachinery/pkg/api/resource/OWNERS | 16 - .../pkg/api/resource/amount_test.go | 133 - .../pkg/api/resource/generated.proto | 95 - .../pkg/api/resource/math_test.go | 211 - .../pkg/api/resource/quantity_example_test.go | 59 - .../pkg/api/resource/quantity_proto_test.go | 103 - .../pkg/api/resource/quantity_test.go | 1352 - .../pkg/api/resource/scale_int_test.go | 85 - .../meta/internalversion/register_test.go | 89 - .../apimachinery/pkg/apis/meta/v1/OWNERS | 31 - .../pkg/apis/meta/v1/controller_ref_test.go | 133 - .../pkg/apis/meta/v1/conversion_test.go | 84 - .../pkg/apis/meta/v1/duration_test.go | 153 - .../pkg/apis/meta/v1/generated.proto | 839 - .../pkg/apis/meta/v1/group_version_test.go | 79 - .../pkg/apis/meta/v1/helpers_test.go | 154 - .../pkg/apis/meta/v1/labels_test.go | 123 - .../pkg/apis/meta/v1/micro_time_test.go | 139 - .../pkg/apis/meta/v1/time_test.go | 197 - .../pkg/apis/meta/v1/types_test.go | 135 - .../apis/meta/v1/unstructured/helpers_test.go | 136 - .../v1/unstructured/unstructured_list_test.go | 86 - .../pkg/apis/meta/v1beta1/generated.proto | 58 - .../pkg/conversion/converter_test.go | 826 - .../pkg/conversion/helper_test.go | 38 - .../conversion/queryparams/convert_test.go | 219 - .../apimachinery/pkg/fields/fields_test.go | 57 - .../apimachinery/pkg/fields/selector_test.go | 397 - .../apimachinery/pkg/labels/labels_test.go | 231 - .../apimachinery/pkg/labels/selector_test.go | 575 - .../pkg/runtime/conversion_test.go | 115 - .../pkg/runtime/converter_test.go | 597 - .../apimachinery/pkg/runtime/embedded_test.go | 256 - .../pkg/runtime/extension_test.go | 113 - .../apimachinery/pkg/runtime/generated.proto | 129 - .../pkg/runtime/local_scheme_test.go | 150 - .../pkg/runtime/schema/group_version_test.go | 180 - .../apimachinery/pkg/runtime/scheme_test.go | 1035 - .../pkg/runtime/serializer/codec_test.go | 339 - .../pkg/runtime/serializer/json/json_test.go | 336 - .../pkg/runtime/serializer/json/meta_test.go | 45 - .../pkg/runtime/serializer/sparse_test.go | 91 - .../serializer/streaming/streaming_test.go | 84 - .../serializer/versioning/versioning_test.go | 381 - .../pkg/runtime/swagger_doc_generator_test.go | 43 - .../apimachinery/pkg/util/cache/cache_test.go | 90 - .../pkg/util/cache/lruexpirecache_test.go | 68 - .../apimachinery/pkg/util/clock/clock_test.go | 196 - .../apimachinery/pkg/util/diff/diff_test.go | 143 - .../pkg/util/errors/errors_test.go | 368 - .../pkg/util/framer/framer_test.go | 176 - .../pkg/util/intstr/generated.proto | 43 - .../pkg/util/intstr/intstr_test.go | 176 - .../apimachinery/pkg/util/json/json_test.go | 319 - .../apimachinery/pkg/util/mergepatch/OWNERS | 5 - .../pkg/util/mergepatch/util_test.go | 138 - .../apimachinery/pkg/util/net/http_test.go | 282 - .../pkg/util/net/interface_test.go | 725 - .../pkg/util/net/port_range_test.go | 77 - .../pkg/util/net/port_split_test.go | 121 - .../apimachinery/pkg/util/net/util_test.go | 68 - .../pkg/util/runtime/runtime_test.go | 71 - .../apimachinery/pkg/util/sets/set_test.go | 270 - .../pkg/util/strategicpatch/OWNERS | 5 - .../pkg/util/strategicpatch/patch_test.go | 6763 - .../pkg/util/validation/field/errors_test.go | 175 - .../pkg/util/validation/field/path_test.go | 123 - .../pkg/util/validation/validation_test.go | 513 - .../apimachinery/pkg/util/wait/wait_test.go | 501 - .../pkg/util/yaml/decoder_test.go | 405 - .../apimachinery/pkg/version/helpers_test.go | 52 - .../apimachinery/pkg/watch/filter_test.go | 84 - .../k8s.io/apimachinery/pkg/watch/mux_test.go | 176 - .../pkg/watch/streamwatcher_test.go | 68 - .../apimachinery/pkg/watch/until_test.go | 172 - .../apimachinery/pkg/watch/watch_test.go | 137 - .../third_party/forked/golang/json/OWNERS | 5 - .../forked/golang/json/fields_test.go | 30 - .../forked/golang/reflect/deep_equal_test.go | 137 - vendor/k8s.io/apiserver/.import-restrictions | 10 - vendor/k8s.io/apiserver/CONTRIBUTING.md | 7 - vendor/k8s.io/apiserver/OWNERS | 19 - vendor/k8s.io/apiserver/README.md | 30 - vendor/k8s.io/apiserver/SECURITY_CONTACTS | 17 - vendor/k8s.io/apiserver/code-of-conduct.md | 3 - vendor/k8s.io/apiserver/pkg/features/OWNERS | 2 - .../pkg/util/feature/feature_gate_test.go | 320 - vendor/k8s.io/client-go/.travis.yml | 8 - vendor/k8s.io/client-go/CHANGELOG.md | 420 - vendor/k8s.io/client-go/CONTRIBUTING.md | 7 - vendor/k8s.io/client-go/INSTALL.md | 162 - vendor/k8s.io/client-go/OWNERS | 15 - vendor/k8s.io/client-go/README.md | 192 - vendor/k8s.io/client-go/SECURITY_CONTACTS | 17 - vendor/k8s.io/client-go/code-of-conduct.md | 3 - .../discovery/cached_discovery_test.go | 169 - .../discovery/discovery_client_test.go | 882 - .../discovery/fake/discovery_test.go | 46 - .../discovery/helper_blackbox_test.go | 184 - .../client-go/discovery/round_tripper_test.go | 95 - .../client-go/pkg/version/.gitattributes | 1 - vendor/k8s.io/client-go/pkg/version/def.bzl | 38 - .../plugin/pkg/client/auth/exec/exec_test.go | 748 - vendor/k8s.io/client-go/rest/OWNERS | 24 - vendor/k8s.io/client-go/rest/client_test.go | 343 - vendor/k8s.io/client-go/rest/config_test.go | 375 - vendor/k8s.io/client-go/rest/plugin_test.go | 311 - vendor/k8s.io/client-go/rest/request_test.go | 1789 - .../k8s.io/client-go/rest/url_utils_test.go | 61 - .../k8s.io/client-go/rest/urlbackoff_test.go | 79 - .../client-go/rest/watch/decoder_test.go | 123 - .../client-go/rest/watch/encoder_test.go | 84 - .../k8s.io/client-go/testing/fixture_test.go | 235 - .../client-go/tools/auth/clientauth_test.go | 69 - vendor/k8s.io/client-go/tools/cache/OWNERS | 50 - .../client-go/tools/cache/controller_test.go | 405 - .../client-go/tools/cache/delta_fifo_test.go | 492 - .../tools/cache/expiration_cache_test.go | 189 - .../k8s.io/client-go/tools/cache/fifo_test.go | 280 - .../k8s.io/client-go/tools/cache/heap_test.go | 382 - .../client-go/tools/cache/index_test.go | 163 - .../tools/cache/mutation_detector_test.go | 81 - .../tools/cache/processor_listener_test.go | 58 - .../client-go/tools/cache/reflector_test.go | 389 - .../tools/cache/shared_informer_test.go | 265 - .../client-go/tools/cache/store_test.go | 156 - .../tools/cache/undelta_store_test.go | 131 - .../tools/clientcmd/api/helpers_test.go | 301 - .../tools/clientcmd/api/types_test.go | 135 - .../tools/clientcmd/client_config_test.go | 528 - .../client-go/tools/clientcmd/loader_test.go | 789 - .../clientcmd/merged_client_builder_test.go | 328 - .../tools/clientcmd/overrides_test.go | 50 - .../tools/clientcmd/validation_test.go | 574 - vendor/k8s.io/client-go/tools/metrics/OWNERS | 7 - .../client-go/tools/pager/pager_test.go | 206 - .../client-go/tools/reference/ref_test.go | 72 - vendor/k8s.io/client-go/transport/OWNERS | 7 - .../k8s.io/client-go/transport/cache_test.go | 157 - .../transport/round_trippers_test.go | 218 - .../client-go/transport/transport_test.go | 288 - .../util/buffer/ring_growing_test.go | 50 - vendor/k8s.io/client-go/util/cert/csr_test.go | 75 - vendor/k8s.io/client-go/util/cert/pem_test.go | 197 - .../util/connrotation/connrotation_test.go | 61 - .../util/flowcontrol/backoff_test.go | 195 - .../util/flowcontrol/throttle_test.go | 153 - .../client-go/util/integer/integer_test.go | 244 - vendor/k8s.io/client-go/util/retry/OWNERS | 2 - .../k8s.io/client-go/util/retry/util_test.go | 71 - .../workqueue/default_rate_limiters_test.go | 184 - .../util/workqueue/delaying_queue_test.go | 255 - .../client-go/util/workqueue/queue_test.go | 161 - .../workqueue/rate_limitting_queue_test.go | 75 - .../.github/PULL_REQUEST_TEMPLATE.md | 2 + .../k8s.io/code-generator/Godeps/Godeps.json | 270 + vendor/k8s.io/code-generator/Godeps/OWNERS | 2 + vendor/k8s.io/code-generator/Godeps/Readme | 5 + .../_examples/apiserver/apis/example}/doc.go | 8 +- .../apiserver/apis/example/install/install.go | 33 + .../apiserver/apis/example/register.go | 45 + .../_examples/apiserver/apis/example/types.go | 44 + .../apiserver/apis/example/v1/doc.go} | 14 +- .../apiserver/apis/example/v1/register.go | 59 + .../apiserver/apis/example/v1/types.go | 47 + .../example/v1/zz_generated.conversion.go | 114 + .../apis/example/v1/zz_generated.deepcopy.go | 101 + .../apis/example/v1/zz_generated.defaults.go | 32 + .../apis/example/zz_generated.deepcopy.go | 101 + .../_examples/apiserver/apis/example2/doc.go} | 23 +- .../apis/example2/install/install.go | 33 + .../apiserver/apis/example2/register.go | 45 + .../apiserver/apis/example2/types.go | 44 + .../apiserver/apis/example2/v1/doc.go | 22 + .../apiserver/apis/example2/v1/register.go | 59 + .../apiserver/apis/example2/v1/types.go | 47 + .../example2/v1/zz_generated.conversion.go | 114 + .../apis/example2/v1/zz_generated.deepcopy.go | 101 + .../apis/example2/v1/zz_generated.defaults.go | 32 + .../apis/example2/zz_generated.deepcopy.go | 101 + .../clientset/internalversion/clientset.go | 104 + .../clientset/internalversion/doc.go | 20 + .../fake/clientset_generated.go | 84 + .../clientset/internalversion/fake/doc.go | 20 + .../internalversion/fake/register.go | 56 + .../clientset/internalversion/scheme/doc.go | 20 + .../internalversion/scheme/register.go | 43 + .../typed/example/internalversion/doc.go | 20 + .../example/internalversion/example_client.go | 96 + .../typed/example/internalversion/fake/doc.go | 20 + .../fake/fake_example_client.go | 40 + .../internalversion/fake/fake_testtype.go | 140 + .../internalversion/generated_expansion.go} | 15 +- .../typed/example/internalversion/testtype.go | 174 + .../typed/example2/internalversion/doc.go | 20 + .../internalversion/example2_client.go | 96 + .../example2/internalversion/fake/doc.go | 20 + .../fake/fake_example2_client.go | 40 + .../internalversion/fake/fake_testtype.go | 140 + .../internalversion/generated_expansion.go | 21 + .../example2/internalversion/testtype.go | 174 + .../clientset/versioned/clientset.go | 120 + .../apiserver/clientset/versioned/doc.go | 20 + .../versioned/fake/clientset_generated.go | 94 + .../apiserver/clientset/versioned/fake/doc.go | 20 + .../clientset/versioned/fake/register.go | 56 + .../clientset/versioned/scheme/doc.go | 20 + .../clientset/versioned/scheme/register.go | 56 + .../versioned/typed/example/v1/doc.go | 20 + .../typed/example/v1/example_client.go | 90 + .../versioned/typed/example/v1/fake/doc.go | 20 + .../example/v1/fake/fake_example_client.go | 40 + .../typed/example/v1/fake/fake_testtype.go | 140 + .../typed/example/v1/generated_expansion.go | 21 + .../versioned/typed/example/v1/testtype.go | 174 + .../versioned/typed/example2/v1/doc.go | 20 + .../typed/example2/v1/example2_client.go | 90 + .../versioned/typed/example2/v1/fake/doc.go | 20 + .../example2/v1/fake/fake_example2_client.go | 40 + .../typed/example2/v1/fake/fake_testtype.go | 140 + .../typed/example2/v1/generated_expansion.go | 21 + .../versioned/typed/example2/v1/testtype.go | 174 + .../externalversions/example/interface.go | 46 + .../externalversions/example/v1/interface.go | 45 + .../externalversions/example/v1/testtype.go | 89 + .../externalversions/example2/interface.go | 46 + .../externalversions/example2/v1/interface.go | 45 + .../externalversions/example2/v1/testtype.go | 89 + .../informers/externalversions/factory.go | 186 + .../informers/externalversions/generic.go | 67 + .../internalinterfaces/factory_interfaces.go | 38 + .../internalversion/example/interface.go | 46 + .../example/internalversion/interface.go | 45 + .../example/internalversion/testtype.go | 89 + .../internalversion/example2/interface.go | 46 + .../example2/internalversion/interface.go | 45 + .../example2/internalversion/testtype.go | 89 + .../informers/internalversion/factory.go | 186 + .../informers/internalversion/generic.go | 67 + .../internalinterfaces/factory_interfaces.go | 38 + .../internalversion/expansion_generated.go | 27 + .../example/internalversion/testtype.go | 94 + .../example/v1/expansion_generated.go} | 28 +- .../apiserver/listers/example/v1/testtype.go | 94 + .../internalversion/expansion_generated.go | 27 + .../example2/internalversion/testtype.go | 94 + .../example2/v1/expansion_generated.go} | 23 +- .../apiserver/listers/example2/v1/testtype.go | 94 + .../_examples/crd/apis/example/v1/doc.go | 20 + .../_examples/crd/apis/example/v1/register.go | 59 + .../_examples/crd/apis/example/v1/types.go | 74 + .../apis/example/v1/zz_generated.deepcopy.go | 177 + .../apis/example/v1/zz_generated.defaults.go | 32 + .../_examples/crd/apis/example2/v1/doc.go | 21 + .../crd/apis/example2/v1/register.go | 59 + .../_examples/crd/apis/example2/v1/types.go | 47 + .../apis/example2/v1/zz_generated.deepcopy.go | 101 + .../apis/example2/v1/zz_generated.defaults.go | 32 + .../crd/clientset/versioned/clientset.go | 120 + .../_examples/crd/clientset/versioned/doc.go | 20 + .../versioned/fake/clientset_generated.go | 94 + .../crd/clientset/versioned/fake/doc.go | 20 + .../crd/clientset/versioned/fake/register.go | 56 + .../crd/clientset/versioned/scheme/doc.go | 20 + .../clientset/versioned/scheme/register.go | 56 + .../typed/example/v1/clustertesttype.go | 193 + .../versioned/typed/example/v1/doc.go | 20 + .../typed/example/v1/example_client.go | 95 + .../versioned/typed/example/v1/fake/doc.go | 20 + .../example/v1/fake/fake_clustertesttype.go | 152 + .../example/v1/fake/fake_example_client.go | 44 + .../typed/example/v1/fake/fake_testtype.go | 140 + .../typed/example/v1/generated_expansion.go} | 13 +- .../versioned/typed/example/v1/testtype.go | 174 + .../versioned/typed/example2/v1/doc.go | 20 + .../typed/example2/v1/example2_client.go | 90 + .../versioned/typed/example2/v1/fake/doc.go | 20 + .../example2/v1/fake/fake_example2_client.go | 40 + .../typed/example2/v1/fake/fake_testtype.go | 140 + .../typed/example2/v1/generated_expansion.go | 21 + .../versioned/typed/example2/v1/testtype.go | 174 + .../externalversions/example/interface.go | 46 + .../example/v1/clustertesttype.go | 88 + .../externalversions/example/v1/interface.go | 52 + .../externalversions/example/v1/testtype.go | 89 + .../externalversions/example2/interface.go | 46 + .../externalversions/example2/v1/interface.go | 45 + .../externalversions/example2/v1/testtype.go | 89 + .../crd/informers/externalversions/factory.go | 186 + .../crd/informers/externalversions/generic.go | 69 + .../internalinterfaces/factory_interfaces.go | 38 + .../crd/listers/example/v1/clustertesttype.go | 65 + .../listers/example/v1/expansion_generated.go | 31 + .../crd/listers/example/v1/testtype.go | 94 + .../example2/v1/expansion_generated.go | 27 + .../crd/listers/example2/v1/testtype.go | 94 + .../cmd/client-gen/args/gvpackages_test.go | 116 - .../client-gen/generators/util/tags_test.go | 148 - .../cmd/client-gen/types/helpers_test.go | 32 - .../cmd/conversion-gen/args/args.go | 83 + .../conversion-gen/generators/conversion.go | 960 + .../code-generator/cmd/conversion-gen/main.go | 76 + .../cmd/go-to-protobuf/.gitignore | 1 + .../code-generator/cmd/go-to-protobuf/OWNERS | 4 + .../cmd/go-to-protobuf}/main.go | 33 +- .../cmd/go-to-protobuf/protobuf/cmd.go | 349 + .../cmd/go-to-protobuf/protobuf/generator.go | 769 + .../go-to-protobuf/protobuf/import_tracker.go | 50 + .../cmd/go-to-protobuf/protobuf/namer.go | 205 + .../cmd/go-to-protobuf/protobuf/package.go | 215 + .../cmd/go-to-protobuf/protobuf/parser.go | 452 + .../cmd/go-to-protobuf/protobuf/tags.go} | 32 +- .../go-to-protobuf/protoc-gen-gogo/main.go | 32 + .../code-generator/cmd/import-boss/.gitignore | 1 + .../code-generator/cmd/import-boss/main.go | 89 + .../code-generator/cmd/openapi-gen/README | 13 + .../cmd/openapi-gen/args/args.go | 53 + .../code-generator/cmd/openapi-gen/main.go | 61 + .../cmd}/set-gen/.gitignore | 0 .../cmd}/set-gen/main.go | 10 +- .../code-generator/hack/boilerplate.go.txt | 16 + .../code-generator/hack/update-codegen.sh | 32 + .../code-generator/hack/verify-codegen.sh | 53 + .../third_party/forked/golang/reflect/type.go | 91 + vendor/k8s.io/gengo/.import-restrictions | 10 - vendor/k8s.io/gengo/.travis.yml | 16 - vendor/k8s.io/gengo/CONTRIBUTING.md | 9 - vendor/k8s.io/gengo/OWNERS | 4 - vendor/k8s.io/gengo/README.md | 56 - vendor/k8s.io/gengo/SECURITY_CONTACTS | 15 - vendor/k8s.io/gengo/code-of-conduct.md | 3 - .../gengo/examples/deepcopy-gen/.gitignore | 1 - .../gengo/examples/deepcopy-gen/Makefile | 16 - .../deepcopy-gen/generators/deepcopy_test.go | 713 - .../gengo/examples/deepcopy-gen/main.go | 88 - .../gengo/examples/defaulter-gen/.gitignore | 1 - .../defaulter-gen/.import-restrictions | 12 - .../gengo/examples/defaulter-gen/Makefile | 15 - .../gengo/examples/defaulter-gen/OWNERS | 2 - .../gengo/examples/defaulter-gen/main.go | 75 - vendor/k8s.io/gengo/examples/set-gen/Makefile | 15 - .../gengo/examples/set-gen/sets/set_test.go | 270 - .../gengo/generator/snippet_writer_test.go | 88 - vendor/k8s.io/gengo/namer/namer_test.go | 100 - .../k8s.io/gengo/namer/plural_namer_test.go | 123 - .../k8s.io/gengo/parser/local_parse_test.go | 68 - vendor/k8s.io/gengo/parser/parse_test.go | 459 - vendor/k8s.io/gengo/types/comments_test.go | 86 - vendor/k8s.io/gengo/types/flatten_test.go | 68 - vendor/k8s.io/gengo/types/types_test.go | 210 - vendor/k8s.io/kube-openapi/.gitignore | 20 - vendor/k8s.io/kube-openapi/.travis.yml | 4 - vendor/k8s.io/kube-openapi/CONTRIBUTING.md | 9 - vendor/k8s.io/kube-openapi/OWNERS | 11 - vendor/k8s.io/kube-openapi/README.md | 18 - vendor/k8s.io/kube-openapi/code-of-conduct.md | 3 - .../pkg/util/proto/openapi_suite_test.go | 49 - .../pkg/util/proto/openapi_test.go | 265 - vendor/k8s.io/kube-openapi/pkg/util/trie.go | 79 - vendor/k8s.io/kube-openapi/pkg/util/util.go | 39 - .../k8s.io/kube-openapi/pkg/util/util_test.go | 37 - vendor/k8s.io/kubernetes/.generated_files | 30 - vendor/k8s.io/kubernetes/.gitattributes | 11 - vendor/k8s.io/kubernetes/.gitignore | 128 - vendor/k8s.io/kubernetes/CHANGELOG-1.11.md | 1825 - vendor/k8s.io/kubernetes/CHANGELOG.md | 20 - vendor/k8s.io/kubernetes/CONTRIBUTING.md | 7 - vendor/k8s.io/kubernetes/Godeps/LICENSES | 103763 +++++++++++++++ vendor/k8s.io/kubernetes/OWNERS | 29 - vendor/k8s.io/kubernetes/OWNERS_ALIASES | 276 - vendor/k8s.io/kubernetes/README.md | 86 - vendor/k8s.io/kubernetes/SECURITY_CONTACTS | 17 - vendor/k8s.io/kubernetes/SUPPORT.md | 39 - vendor/k8s.io/kubernetes/cluster/gce/cos | 1 + vendor/k8s.io/kubernetes/cluster/gce/custom | 1 + vendor/k8s.io/kubernetes/cluster/gce/ubuntu | 1 + .../layers/kubeapi-load-balancer/copyright | 13 + .../actions/namespace-delete | 1 + .../kubernetes-master/actions/namespace-list | 1 + .../juju/layers/kubernetes-master/copyright | 13 + .../juju/layers/kubernetes-worker/copyright | 13 + vendor/k8s.io/kubernetes/code-of-conduct.md | 3 - vendor/k8s.io/kubernetes/labels.yaml | 370 - .../kubernetes/pkg/.import-restrictions | 13 - vendor/k8s.io/kubernetes/pkg/BUILD | 107 - vendor/k8s.io/kubernetes/pkg/OWNERS | 12 - vendor/k8s.io/kubernetes/pkg/api/OWNERS | 4 - vendor/k8s.io/kubernetes/pkg/apis/OWNERS | 44 - vendor/k8s.io/kubernetes/pkg/apis/core/BUILD | 60 - vendor/k8s.io/kubernetes/pkg/apis/core/OWNERS | 43 - .../kubernetes/pkg/apis/core/taint_test.go | 120 - .../pkg/apis/core/toleration_test.go | 136 - vendor/k8s.io/kubernetes/pkg/features/BUILD | 30 - vendor/k8s.io/kubernetes/pkg/features/OWNERS | 2 - vendor/k8s.io/kubernetes/pkg/kubelet/BUILD | 296 - vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS | 9 - .../kubernetes/pkg/kubelet/active_deadline.go | 98 - .../pkg/kubelet/active_deadline_test.go | 95 - .../k8s.io/kubernetes/pkg/kubelet/apis/BUILD | 48 - .../pkg/kubelet/apis/deviceplugin/OWNERS | 5 - .../kubelet/apis/deviceplugin/v1beta1/BUILD | 40 - .../apis/deviceplugin/v1beta1/api.proto | 161 - .../k8s.io/kubernetes/pkg/kubelet/kubelet.go | 2195 - .../kubernetes/pkg/kubelet/kubelet_getters.go | 313 - .../pkg/kubelet/kubelet_getters_test.go | 69 - .../kubernetes/pkg/kubelet/kubelet_network.go | 167 - .../pkg/kubelet/kubelet_node_status.go | 1178 - .../pkg/kubelet/kubelet_node_status_test.go | 1801 - .../kubernetes/pkg/kubelet/kubelet_pods.go | 1761 - .../pkg/kubelet/kubelet_pods_test.go | 2436 - .../pkg/kubelet/kubelet_pods_windows_test.go | 102 - .../pkg/kubelet/kubelet_resources.go | 57 - .../pkg/kubelet/kubelet_resources_test.go | 111 - .../kubernetes/pkg/kubelet/kubelet_test.go | 2263 - .../kubernetes/pkg/kubelet/kubelet_volumes.go | 149 - .../pkg/kubelet/kubelet_volumes_test.go | 473 - .../kubernetes/pkg/kubelet/oom_watcher.go | 74 - .../pkg/kubelet/oom_watcher_test.go | 38 - .../pkg/kubelet/pod_container_deletor.go | 112 - .../pkg/kubelet/pod_container_deletor_test.go | 203 - .../kubernetes/pkg/kubelet/pod_workers.go | 333 - .../pkg/kubelet/pod_workers_test.go | 355 - .../kubernetes/pkg/kubelet/reason_cache.go | 105 - .../pkg/kubelet/reason_cache_test.go | 69 - .../k8s.io/kubernetes/pkg/kubelet/runonce.go | 177 - .../kubernetes/pkg/kubelet/runonce_test.go | 171 - .../k8s.io/kubernetes/pkg/kubelet/runtime.go | 118 - vendor/k8s.io/kubernetes/pkg/kubelet/util.go | 129 - .../kubernetes/pkg/kubelet/volume_host.go | 272 - vendor/k8s.io/kubernetes/pkg/util/BUILD | 78 - vendor/k8s.io/kubernetes/pkg/util/node/BUILD | 48 - .../kubernetes/pkg/util/node/node_test.go | 91 - .../kubernetes/pkg/util/verify-util-pkg.sh | 48 - .../kubernetes/staging/src/k8s.io/api/LICENSE | 202 + .../k8s.io/apiextensions-apiserver/LICENSE | 202 + .../staging/src/k8s.io/apimachinery/LICENSE | 202 + .../staging/src/k8s.io/apiserver/LICENSE | 202 + .../staging/src/k8s.io/client-go/LICENSE | 202 + .../staging/src/k8s.io/code-generator/LICENSE | 202 + .../src/k8s.io/kube-aggregator/LICENSE | 202 + .../staging/src/k8s.io/metrics/LICENSE | 201 + .../src/k8s.io/sample-apiserver/LICENSE | 202 + .../src/k8s.io/sample-controller/LICENSE | 202 + .../third_party/forked/golang/LICENSE | 27 + .../third_party/forked/golang/PATENTS | 22 + .../third_party/forked/gonum/graph/LICENSE | 23 + .../third_party/forked/shell2junit/LICENSE | 172 + .../kubernetes/third_party/intemp/LICENSE | 202 + .../kubernetes/third_party/swagger-ui/LICENSE | 11 + vendor/k8s.io/utils/.travis.yml | 9 - vendor/k8s.io/utils/CONTRIBUTING.md | 9 - vendor/k8s.io/utils/HOWTOMOVE.md | 31 - vendor/k8s.io/utils/README.md | 63 - vendor/k8s.io/utils/code-of-conduct.md | 3 - vendor/k8s.io/utils/exec/exec_test.go | 141 - 996 files changed, 119447 insertions(+), 201162 deletions(-) delete mode 100644 vendor/github.com/davecgh/go-spew/.gitignore delete mode 100644 vendor/github.com/davecgh/go-spew/.travis.yml delete mode 100644 vendor/github.com/davecgh/go-spew/README.md delete mode 100644 vendor/github.com/davecgh/go-spew/cov_report.sh delete mode 100644 vendor/github.com/davecgh/go-spew/spew/common_test.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/dump_test.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/dumpcgo_test.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/dumpnocgo_test.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/example_test.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/format_test.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/internal_test.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/internalunsafe_test.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/spew_test.go delete mode 100644 vendor/github.com/davecgh/go-spew/test_coverage.txt delete mode 100644 vendor/github.com/fsnotify/fsnotify/.editorconfig delete mode 100644 vendor/github.com/fsnotify/fsnotify/.gitignore delete mode 100644 vendor/github.com/fsnotify/fsnotify/.travis.yml delete mode 100644 vendor/github.com/fsnotify/fsnotify/CHANGELOG.md delete mode 100644 vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md delete mode 100644 vendor/github.com/fsnotify/fsnotify/README.md delete mode 100644 vendor/github.com/fsnotify/fsnotify/example_test.go delete mode 100644 vendor/github.com/fsnotify/fsnotify/fsnotify_test.go delete mode 100644 vendor/github.com/fsnotify/fsnotify/inotify_poller_test.go delete mode 100644 vendor/github.com/fsnotify/fsnotify/inotify_test.go delete mode 100644 vendor/github.com/fsnotify/fsnotify/integration_darwin_test.go delete mode 100644 vendor/github.com/fsnotify/fsnotify/integration_test.go delete mode 100644 vendor/github.com/ghodss/yaml/.gitignore delete mode 100644 vendor/github.com/ghodss/yaml/.travis.yml delete mode 100644 vendor/github.com/ghodss/yaml/README.md delete mode 100644 vendor/github.com/ghodss/yaml/yaml_test.go delete mode 100644 vendor/github.com/gogo/protobuf/.gitignore delete mode 100644 vendor/github.com/gogo/protobuf/.mailmap delete mode 100644 vendor/github.com/gogo/protobuf/.travis.yml delete mode 100644 vendor/github.com/gogo/protobuf/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/README delete mode 100644 vendor/github.com/gogo/protobuf/Readme.md delete mode 100644 vendor/github.com/gogo/protobuf/bench.md delete mode 100644 vendor/github.com/gogo/protobuf/custom_types.md delete mode 100644 vendor/github.com/gogo/protobuf/extensions.md delete mode 100644 vendor/github.com/gogo/protobuf/gogoproto/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.golden delete mode 100644 vendor/github.com/gogo/protobuf/gogoproto/gogo.proto delete mode 100755 vendor/github.com/gogo/protobuf/install-protobuf.sh delete mode 100644 vendor/github.com/gogo/protobuf/proto/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/proto/all_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/any_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/clone_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/decode_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/discard_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/encode_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/equal_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/extensions_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/map_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/message_set_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/proto3_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/size2_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/size_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/text_parser_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/text_test.go delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_test.go delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/doc.go delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/golden_test.go delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/main.go delete mode 100644 vendor/github.com/golang/glog/README delete mode 100644 vendor/github.com/golang/glog/glog_test.go delete mode 100644 vendor/github.com/golang/protobuf/.gitignore delete mode 100644 vendor/github.com/golang/protobuf/.travis.yml delete mode 100644 vendor/github.com/golang/protobuf/Makefile delete mode 100644 vendor/github.com/golang/protobuf/README.md delete mode 100644 vendor/github.com/golang/protobuf/proto/all_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/any_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/clone_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/decode_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/discard_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/encode_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/equal_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/extensions_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/map_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/message_set_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/proto3_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/size2_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/size_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/text_parser_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/text_test.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/any/any.proto delete mode 100644 vendor/github.com/golang/protobuf/ptypes/any_test.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/duration/duration.proto delete mode 100644 vendor/github.com/golang/protobuf/ptypes/duration_test.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto delete mode 100644 vendor/github.com/golang/protobuf/ptypes/timestamp_test.go delete mode 100755 vendor/github.com/golang/protobuf/regenerate.sh delete mode 100644 vendor/github.com/google/btree/.travis.yml delete mode 100644 vendor/github.com/google/btree/README.md delete mode 100644 vendor/github.com/google/btree/btree_test.go delete mode 100644 vendor/github.com/google/gofuzz/.travis.yml delete mode 100644 vendor/github.com/google/gofuzz/CONTRIBUTING.md delete mode 100644 vendor/github.com/google/gofuzz/README.md delete mode 100644 vendor/github.com/google/gofuzz/example_test.go delete mode 100644 vendor/github.com/google/gofuzz/fuzz_test.go delete mode 100644 vendor/github.com/googleapis/gnostic/.gitignore delete mode 100755 vendor/github.com/googleapis/gnostic/.travis-install.sh delete mode 100644 vendor/github.com/googleapis/gnostic/.travis.yml delete mode 100755 vendor/github.com/googleapis/gnostic/COMPILE-PROTOS.sh delete mode 100644 vendor/github.com/googleapis/gnostic/CONTRIBUTING.md delete mode 100644 vendor/github.com/googleapis/gnostic/Makefile delete mode 100644 vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.proto delete mode 100644 vendor/github.com/googleapis/gnostic/OpenAPIv2/README.md delete mode 100644 vendor/github.com/googleapis/gnostic/OpenAPIv2/openapi-2.0.json delete mode 100644 vendor/github.com/googleapis/gnostic/README.md delete mode 100644 vendor/github.com/googleapis/gnostic/compiler/README.md delete mode 100755 vendor/github.com/googleapis/gnostic/extensions/COMPILE-EXTENSION.sh delete mode 100644 vendor/github.com/googleapis/gnostic/extensions/README.md delete mode 100644 vendor/github.com/googleapis/gnostic/extensions/extension.proto delete mode 100644 vendor/github.com/googleapis/gnostic/gnostic.go delete mode 100644 vendor/github.com/googleapis/gnostic/gnostic_test.go delete mode 100644 vendor/github.com/gregjones/httpcache/.travis.yml delete mode 100644 vendor/github.com/gregjones/httpcache/README.md delete mode 100644 vendor/github.com/gregjones/httpcache/diskcache/diskcache_test.go delete mode 100644 vendor/github.com/gregjones/httpcache/httpcache_test.go delete mode 100644 vendor/github.com/hashicorp/golang-lru/.gitignore delete mode 100644 vendor/github.com/hashicorp/golang-lru/2q_test.go delete mode 100644 vendor/github.com/hashicorp/golang-lru/README.md delete mode 100644 vendor/github.com/hashicorp/golang-lru/arc_test.go delete mode 100644 vendor/github.com/hashicorp/golang-lru/lru_test.go delete mode 100644 vendor/github.com/hashicorp/golang-lru/simplelru/lru_test.go delete mode 100644 vendor/github.com/imdario/mergo/.gitignore delete mode 100644 vendor/github.com/imdario/mergo/.travis.yml delete mode 100644 vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md delete mode 100644 vendor/github.com/imdario/mergo/README.md delete mode 100644 vendor/github.com/imdario/mergo/issue17_test.go delete mode 100644 vendor/github.com/imdario/mergo/issue23_test.go delete mode 100644 vendor/github.com/imdario/mergo/issue33_test.go delete mode 100644 vendor/github.com/imdario/mergo/issue38_test.go delete mode 100644 vendor/github.com/imdario/mergo/issue50_test.go delete mode 100644 vendor/github.com/imdario/mergo/issue52_test.go delete mode 100644 vendor/github.com/imdario/mergo/issue61_test.go delete mode 100644 vendor/github.com/imdario/mergo/issue64_test.go delete mode 100644 vendor/github.com/imdario/mergo/issue66_test.go delete mode 100644 vendor/github.com/imdario/mergo/merge_appendslice_test.go delete mode 100644 vendor/github.com/imdario/mergo/merge_test.go delete mode 100644 vendor/github.com/imdario/mergo/mergo_test.go delete mode 100644 vendor/github.com/imdario/mergo/pr80_test.go delete mode 100644 vendor/github.com/imdario/mergo/pr81_test.go create mode 100644 vendor/github.com/imdario/mergo/testdata/license.yml delete mode 100644 vendor/github.com/json-iterator/go/.codecov.yml delete mode 100644 vendor/github.com/json-iterator/go/.gitignore delete mode 100644 vendor/github.com/json-iterator/go/.travis.yml delete mode 100644 vendor/github.com/json-iterator/go/Gopkg.lock delete mode 100644 vendor/github.com/json-iterator/go/Gopkg.toml delete mode 100644 vendor/github.com/json-iterator/go/README.md delete mode 100755 vendor/github.com/json-iterator/go/build.sh delete mode 100644 vendor/github.com/json-iterator/go/example_test.go delete mode 100644 vendor/github.com/json-iterator/go/fuzzy_mode_convert_table.md delete mode 100644 vendor/github.com/json-iterator/go/iter_skip_sloppy_test.go delete mode 100644 vendor/github.com/json-iterator/go/stream_test.go delete mode 100755 vendor/github.com/json-iterator/go/test.sh delete mode 100644 vendor/github.com/modern-go/concurrent/.gitignore delete mode 100644 vendor/github.com/modern-go/concurrent/.travis.yml delete mode 100644 vendor/github.com/modern-go/concurrent/README.md delete mode 100644 vendor/github.com/modern-go/concurrent/map_test.go delete mode 100755 vendor/github.com/modern-go/concurrent/test.sh delete mode 100644 vendor/github.com/modern-go/concurrent/unbounded_executor_test.go delete mode 100644 vendor/github.com/modern-go/reflect2/.gitignore delete mode 100644 vendor/github.com/modern-go/reflect2/.travis.yml delete mode 100644 vendor/github.com/modern-go/reflect2/Gopkg.lock delete mode 100644 vendor/github.com/modern-go/reflect2/Gopkg.toml delete mode 100644 vendor/github.com/modern-go/reflect2/README.md delete mode 100755 vendor/github.com/modern-go/reflect2/test.sh delete mode 100644 vendor/github.com/petar/GoLLRB/.gitignore delete mode 100644 vendor/github.com/petar/GoLLRB/README.md delete mode 100644 vendor/github.com/petar/GoLLRB/llrb/iterator_test.go delete mode 100644 vendor/github.com/petar/GoLLRB/llrb/llrb_test.go delete mode 100644 vendor/github.com/peterbourgon/diskv/README.md delete mode 100644 vendor/github.com/peterbourgon/diskv/basic_test.go delete mode 100644 vendor/github.com/peterbourgon/diskv/compression_test.go delete mode 100644 vendor/github.com/peterbourgon/diskv/import_test.go delete mode 100644 vendor/github.com/peterbourgon/diskv/index_test.go delete mode 100644 vendor/github.com/peterbourgon/diskv/issues_test.go delete mode 100644 vendor/github.com/peterbourgon/diskv/keys_test.go delete mode 100644 vendor/github.com/peterbourgon/diskv/speed_test.go delete mode 100644 vendor/github.com/peterbourgon/diskv/stream_test.go delete mode 100644 vendor/github.com/spf13/pflag/.gitignore delete mode 100644 vendor/github.com/spf13/pflag/.travis.yml delete mode 100644 vendor/github.com/spf13/pflag/README.md delete mode 100644 vendor/github.com/spf13/pflag/bool_slice_test.go delete mode 100644 vendor/github.com/spf13/pflag/bool_test.go delete mode 100644 vendor/github.com/spf13/pflag/bytes_test.go delete mode 100644 vendor/github.com/spf13/pflag/count_test.go delete mode 100644 vendor/github.com/spf13/pflag/duration_slice_test.go delete mode 100644 vendor/github.com/spf13/pflag/example_test.go delete mode 100644 vendor/github.com/spf13/pflag/export_test.go delete mode 100644 vendor/github.com/spf13/pflag/flag_test.go delete mode 100644 vendor/github.com/spf13/pflag/golangflag_test.go delete mode 100644 vendor/github.com/spf13/pflag/int_slice_test.go delete mode 100644 vendor/github.com/spf13/pflag/ip_slice_test.go delete mode 100644 vendor/github.com/spf13/pflag/ip_test.go delete mode 100644 vendor/github.com/spf13/pflag/ipnet_test.go delete mode 100644 vendor/github.com/spf13/pflag/printusage_test.go delete mode 100644 vendor/github.com/spf13/pflag/string_array_test.go delete mode 100644 vendor/github.com/spf13/pflag/string_slice_test.go delete mode 100644 vendor/github.com/spf13/pflag/uint_slice_test.go delete mode 100644 vendor/golang.org/x/crypto/.gitattributes delete mode 100644 vendor/golang.org/x/crypto/.gitignore delete mode 100644 vendor/golang.org/x/crypto/CONTRIBUTING.md delete mode 100644 vendor/golang.org/x/crypto/README.md delete mode 100644 vendor/golang.org/x/crypto/codereview.cfg delete mode 100644 vendor/golang.org/x/crypto/ssh/benchmark_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/buffer.go delete mode 100644 vendor/golang.org/x/crypto/ssh/buffer_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/certs.go delete mode 100644 vendor/golang.org/x/crypto/ssh/certs_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/channel.go delete mode 100644 vendor/golang.org/x/crypto/ssh/cipher.go delete mode 100644 vendor/golang.org/x/crypto/ssh/cipher_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/client.go delete mode 100644 vendor/golang.org/x/crypto/ssh/client_auth.go delete mode 100644 vendor/golang.org/x/crypto/ssh/client_auth_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/client_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/common.go delete mode 100644 vendor/golang.org/x/crypto/ssh/connection.go delete mode 100644 vendor/golang.org/x/crypto/ssh/doc.go delete mode 100644 vendor/golang.org/x/crypto/ssh/example_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/handshake.go delete mode 100644 vendor/golang.org/x/crypto/ssh/handshake_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/kex.go delete mode 100644 vendor/golang.org/x/crypto/ssh/kex_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/keys.go delete mode 100644 vendor/golang.org/x/crypto/ssh/keys_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/mac.go delete mode 100644 vendor/golang.org/x/crypto/ssh/mempipe_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/messages.go delete mode 100644 vendor/golang.org/x/crypto/ssh/messages_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/mux.go delete mode 100644 vendor/golang.org/x/crypto/ssh/mux_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/server.go delete mode 100644 vendor/golang.org/x/crypto/ssh/session.go delete mode 100644 vendor/golang.org/x/crypto/ssh/session_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/streamlocal.go delete mode 100644 vendor/golang.org/x/crypto/ssh/tcpip.go delete mode 100644 vendor/golang.org/x/crypto/ssh/tcpip_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/terminal_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/testdata_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/transport.go delete mode 100644 vendor/golang.org/x/crypto/ssh/transport_test.go delete mode 100644 vendor/golang.org/x/net/.gitattributes delete mode 100644 vendor/golang.org/x/net/.gitignore delete mode 100644 vendor/golang.org/x/net/CONTRIBUTING.md delete mode 100644 vendor/golang.org/x/net/README.md delete mode 100644 vendor/golang.org/x/net/codereview.cfg delete mode 100644 vendor/golang.org/x/net/context/context_test.go delete mode 100644 vendor/golang.org/x/net/context/withtimeout_test.go delete mode 100644 vendor/golang.org/x/net/http/httpguts/httplex_test.go delete mode 100644 vendor/golang.org/x/net/http2/.gitignore delete mode 100644 vendor/golang.org/x/net/http2/Dockerfile delete mode 100644 vendor/golang.org/x/net/http2/Makefile delete mode 100644 vendor/golang.org/x/net/http2/README delete mode 100644 vendor/golang.org/x/net/http2/ciphers_test.go delete mode 100644 vendor/golang.org/x/net/http2/databuffer_test.go delete mode 100644 vendor/golang.org/x/net/http2/errors_test.go delete mode 100644 vendor/golang.org/x/net/http2/flow_test.go delete mode 100644 vendor/golang.org/x/net/http2/frame_test.go delete mode 100644 vendor/golang.org/x/net/http2/go18_test.go delete mode 100644 vendor/golang.org/x/net/http2/go19_test.go delete mode 100644 vendor/golang.org/x/net/http2/gotrack_test.go delete mode 100644 vendor/golang.org/x/net/http2/hpack/encode_test.go delete mode 100644 vendor/golang.org/x/net/http2/hpack/hpack_test.go delete mode 100644 vendor/golang.org/x/net/http2/hpack/tables_test.go delete mode 100644 vendor/golang.org/x/net/http2/http2_test.go delete mode 100644 vendor/golang.org/x/net/http2/pipe_test.go delete mode 100644 vendor/golang.org/x/net/http2/server_push_test.go delete mode 100644 vendor/golang.org/x/net/http2/server_test.go delete mode 100644 vendor/golang.org/x/net/http2/transport_test.go delete mode 100644 vendor/golang.org/x/net/http2/writesched_priority_test.go delete mode 100644 vendor/golang.org/x/net/http2/writesched_random_test.go delete mode 100644 vendor/golang.org/x/net/http2/writesched_test.go delete mode 100644 vendor/golang.org/x/net/http2/z_spec_test.go delete mode 100644 vendor/golang.org/x/net/idna/example_test.go delete mode 100644 vendor/golang.org/x/net/idna/idna_test.go delete mode 100644 vendor/golang.org/x/net/idna/punycode_test.go delete mode 100644 vendor/golang.org/x/net/internal/timeseries/timeseries_test.go delete mode 100644 vendor/golang.org/x/net/trace/histogram_test.go delete mode 100644 vendor/golang.org/x/net/trace/trace_test.go delete mode 100644 vendor/golang.org/x/sys/.gitattributes delete mode 100644 vendor/golang.org/x/sys/.gitignore delete mode 100644 vendor/golang.org/x/sys/CONTRIBUTING.md delete mode 100644 vendor/golang.org/x/sys/README.md delete mode 100644 vendor/golang.org/x/sys/codereview.cfg delete mode 100644 vendor/golang.org/x/sys/unix/.gitignore delete mode 100644 vendor/golang.org/x/sys/unix/README.md delete mode 100644 vendor/golang.org/x/sys/unix/creds_test.go delete mode 100644 vendor/golang.org/x/sys/unix/dev_linux_test.go delete mode 100644 vendor/golang.org/x/sys/unix/example_test.go delete mode 100644 vendor/golang.org/x/sys/unix/export_test.go delete mode 100755 vendor/golang.org/x/sys/unix/mkall.sh delete mode 100755 vendor/golang.org/x/sys/unix/mkerrors.sh delete mode 100755 vendor/golang.org/x/sys/unix/mksyscall.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksyscall_solaris.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_darwin.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl delete mode 100644 vendor/golang.org/x/sys/unix/mmap_unix_test.go delete mode 100644 vendor/golang.org/x/sys/unix/openbsd_test.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_bsd_test.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_test.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_test.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_test.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_solaris_test.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_test.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_unix_test.go delete mode 100644 vendor/golang.org/x/sys/unix/timestruct_test.go delete mode 100644 vendor/golang.org/x/sys/unix/xattr_test.go delete mode 100644 vendor/golang.org/x/sys/windows/syscall_test.go delete mode 100644 vendor/golang.org/x/sys/windows/syscall_windows_test.go delete mode 100644 vendor/golang.org/x/text/.gitattributes delete mode 100644 vendor/golang.org/x/text/.gitignore delete mode 100644 vendor/golang.org/x/text/CONTRIBUTING.md delete mode 100644 vendor/golang.org/x/text/README.md delete mode 100644 vendor/golang.org/x/text/codereview.cfg delete mode 100644 vendor/golang.org/x/text/collate/build/builder_test.go delete mode 100644 vendor/golang.org/x/text/collate/build/colelem_test.go delete mode 100644 vendor/golang.org/x/text/collate/build/contract_test.go delete mode 100644 vendor/golang.org/x/text/collate/build/order_test.go delete mode 100644 vendor/golang.org/x/text/collate/build/trie_test.go delete mode 100644 vendor/golang.org/x/text/collate/collate_test.go delete mode 100644 vendor/golang.org/x/text/collate/export_test.go delete mode 100644 vendor/golang.org/x/text/collate/option_test.go delete mode 100644 vendor/golang.org/x/text/collate/reg_test.go delete mode 100644 vendor/golang.org/x/text/collate/sort_test.go delete mode 100644 vendor/golang.org/x/text/collate/table_test.go delete mode 100644 vendor/golang.org/x/text/doc.go delete mode 100644 vendor/golang.org/x/text/gen.go delete mode 100644 vendor/golang.org/x/text/internal/colltab/collate_test.go delete mode 100644 vendor/golang.org/x/text/internal/colltab/collelem_test.go delete mode 100644 vendor/golang.org/x/text/internal/colltab/colltab_test.go delete mode 100644 vendor/golang.org/x/text/internal/colltab/contract_test.go delete mode 100644 vendor/golang.org/x/text/internal/colltab/iter_test.go delete mode 100644 vendor/golang.org/x/text/internal/colltab/numeric_test.go delete mode 100644 vendor/golang.org/x/text/internal/colltab/trie_test.go delete mode 100644 vendor/golang.org/x/text/internal/colltab/weighter_test.go delete mode 100644 vendor/golang.org/x/text/internal/gen.go delete mode 100644 vendor/golang.org/x/text/internal/gen_test.go delete mode 100644 vendor/golang.org/x/text/internal/internal.go delete mode 100644 vendor/golang.org/x/text/internal/internal_test.go delete mode 100644 vendor/golang.org/x/text/internal/match.go delete mode 100644 vendor/golang.org/x/text/internal/match_test.go delete mode 100644 vendor/golang.org/x/text/internal/tables.go delete mode 100644 vendor/golang.org/x/text/internal/tag/tag_test.go delete mode 100644 vendor/golang.org/x/text/internal/triegen/data_test.go delete mode 100644 vendor/golang.org/x/text/internal/triegen/example_compact_test.go delete mode 100644 vendor/golang.org/x/text/internal/triegen/example_test.go delete mode 100644 vendor/golang.org/x/text/internal/triegen/gen_test.go delete mode 100644 vendor/golang.org/x/text/internal/ucd/example_test.go delete mode 100644 vendor/golang.org/x/text/internal/ucd/ucd_test.go delete mode 100644 vendor/golang.org/x/text/language/Makefile delete mode 100644 vendor/golang.org/x/text/language/coverage_test.go delete mode 100644 vendor/golang.org/x/text/language/examples_test.go delete mode 100644 vendor/golang.org/x/text/language/httpexample_test.go delete mode 100644 vendor/golang.org/x/text/language/language_test.go delete mode 100644 vendor/golang.org/x/text/language/lookup_test.go delete mode 100644 vendor/golang.org/x/text/language/match_test.go delete mode 100644 vendor/golang.org/x/text/language/parse_test.go delete mode 100644 vendor/golang.org/x/text/secure/bidirule/bench_test.go delete mode 100644 vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0_test.go delete mode 100644 vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0_test.go delete mode 100644 vendor/golang.org/x/text/secure/bidirule/bidirule_test.go delete mode 100644 vendor/golang.org/x/text/secure/doc.go delete mode 100644 vendor/golang.org/x/text/transform/examples_test.go delete mode 100644 vendor/golang.org/x/text/transform/transform_test.go delete mode 100644 vendor/golang.org/x/text/unicode/bidi/core_test.go delete mode 100644 vendor/golang.org/x/text/unicode/bidi/ranges_test.go delete mode 100644 vendor/golang.org/x/text/unicode/bidi/tables_test.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/cldr_test.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/collate_test.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/data_test.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/examples_test.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/resolve_test.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/slice_test.go delete mode 100644 vendor/golang.org/x/text/unicode/doc.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/composition_test.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/data10.0.0_test.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/data9.0.0_test.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/example_iter_test.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/example_test.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/forminfo_test.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/iter_test.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/normalize_test.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/readwriter_test.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/transform_test.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/ucd_test.go delete mode 100644 vendor/golang.org/x/text/unicode/rangetable/merge_test.go delete mode 100644 vendor/golang.org/x/text/unicode/rangetable/rangetable_test.go delete mode 100644 vendor/golang.org/x/time/CONTRIBUTING.md delete mode 100644 vendor/golang.org/x/time/README.md delete mode 100644 vendor/golang.org/x/time/rate/rate_test.go delete mode 100644 vendor/golang.org/x/tools/.gitattributes delete mode 100644 vendor/golang.org/x/tools/.gitignore delete mode 100644 vendor/golang.org/x/tools/CONTRIBUTING.md delete mode 100644 vendor/golang.org/x/tools/README.md create mode 100644 vendor/golang.org/x/tools/cmd/getgo/LICENSE delete mode 100644 vendor/golang.org/x/tools/codereview.cfg delete mode 100644 vendor/golang.org/x/tools/go/ast/astutil/enclosing_test.go delete mode 100644 vendor/golang.org/x/tools/go/ast/astutil/imports_test.go delete mode 100644 vendor/golang.org/x/tools/go/ast/astutil/rewrite_test.go delete mode 100644 vendor/golang.org/x/tools/imports/fix_test.go delete mode 100644 vendor/golang.org/x/tools/internal/fastwalk/fastwalk_test.go create mode 100644 vendor/golang.org/x/tools/third_party/moduleloader/LICENSE create mode 100644 vendor/golang.org/x/tools/third_party/typescript/LICENSE create mode 100644 vendor/golang.org/x/tools/third_party/webcomponents/LICENSE delete mode 100644 vendor/google.golang.org/genproto/.travis.yml delete mode 100644 vendor/google.golang.org/genproto/CONTRIBUTING.md delete mode 100644 vendor/google.golang.org/genproto/README.md delete mode 100644 vendor/google.golang.org/genproto/regen.go delete mode 100755 vendor/google.golang.org/genproto/regen.sh delete mode 100644 vendor/google.golang.org/grpc/.travis.yml delete mode 100644 vendor/google.golang.org/grpc/CONTRIBUTING.md delete mode 100644 vendor/google.golang.org/grpc/Makefile delete mode 100644 vendor/google.golang.org/grpc/README.md delete mode 100644 vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin_test.go delete mode 100644 vendor/google.golang.org/grpc/balancer_switching_test.go delete mode 100644 vendor/google.golang.org/grpc/balancer_test.go delete mode 100644 vendor/google.golang.org/grpc/call_test.go delete mode 100644 vendor/google.golang.org/grpc/clientconn_test.go delete mode 100644 vendor/google.golang.org/grpc/codec_test.go delete mode 100755 vendor/google.golang.org/grpc/codegen.sh delete mode 100644 vendor/google.golang.org/grpc/codes/codes_test.go delete mode 100644 vendor/google.golang.org/grpc/credentials/credentials_test.go delete mode 100644 vendor/google.golang.org/grpc/encoding/proto/proto_benchmark_test.go delete mode 100644 vendor/google.golang.org/grpc/encoding/proto/proto_test.go delete mode 100644 vendor/google.golang.org/grpc/grpclog/loggerv2_test.go delete mode 100755 vendor/google.golang.org/grpc/install_gae.sh delete mode 100644 vendor/google.golang.org/grpc/internal/channelz/util_test.go delete mode 100644 vendor/google.golang.org/grpc/internal/transport/handler_server_test.go delete mode 100644 vendor/google.golang.org/grpc/internal/transport/http_util_test.go delete mode 100644 vendor/google.golang.org/grpc/internal/transport/transport_test.go delete mode 100644 vendor/google.golang.org/grpc/metadata/metadata_test.go delete mode 100644 vendor/google.golang.org/grpc/naming/dns_resolver_test.go delete mode 100644 vendor/google.golang.org/grpc/naming/go17_test.go delete mode 100644 vendor/google.golang.org/grpc/naming/go18_test.go delete mode 100644 vendor/google.golang.org/grpc/picker_wrapper_test.go delete mode 100644 vendor/google.golang.org/grpc/pickfirst_test.go delete mode 100644 vendor/google.golang.org/grpc/proxy_test.go delete mode 100644 vendor/google.golang.org/grpc/resolver/dns/dns_resolver_test.go delete mode 100644 vendor/google.golang.org/grpc/resolver/dns/go17_test.go delete mode 100644 vendor/google.golang.org/grpc/resolver/dns/go18_test.go delete mode 100644 vendor/google.golang.org/grpc/resolver_conn_wrapper_test.go delete mode 100644 vendor/google.golang.org/grpc/rpc_util_test.go delete mode 100644 vendor/google.golang.org/grpc/server_test.go delete mode 100644 vendor/google.golang.org/grpc/service_config_test.go delete mode 100644 vendor/google.golang.org/grpc/stats/stats_test.go delete mode 100644 vendor/google.golang.org/grpc/status/go17_test.go delete mode 100644 vendor/google.golang.org/grpc/status/status_test.go delete mode 100755 vendor/google.golang.org/grpc/vet.sh delete mode 100644 vendor/gopkg.in/inf.v0/benchmark_test.go delete mode 100644 vendor/gopkg.in/inf.v0/dec_go1_2_test.go delete mode 100644 vendor/gopkg.in/inf.v0/dec_internal_test.go delete mode 100644 vendor/gopkg.in/inf.v0/dec_test.go delete mode 100644 vendor/gopkg.in/inf.v0/example_test.go delete mode 100644 vendor/gopkg.in/inf.v0/rounder_example_test.go delete mode 100644 vendor/gopkg.in/inf.v0/rounder_test.go delete mode 100644 vendor/gopkg.in/yaml.v2/.travis.yml delete mode 100644 vendor/gopkg.in/yaml.v2/README.md delete mode 100644 vendor/gopkg.in/yaml.v2/decode_test.go delete mode 100644 vendor/gopkg.in/yaml.v2/encode_test.go delete mode 100644 vendor/gopkg.in/yaml.v2/example_embedded_test.go delete mode 100644 vendor/gopkg.in/yaml.v2/go.mod delete mode 100644 vendor/gopkg.in/yaml.v2/suite_test.go delete mode 100644 vendor/k8s.io/api/CONTRIBUTING.md delete mode 100644 vendor/k8s.io/api/OWNERS delete mode 100644 vendor/k8s.io/api/README.md delete mode 100644 vendor/k8s.io/api/SECURITY_CONTACTS delete mode 100644 vendor/k8s.io/api/admission/v1beta1/generated.proto delete mode 100644 vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto delete mode 100644 vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto delete mode 100755 vendor/k8s.io/api/apps/OWNERS delete mode 100644 vendor/k8s.io/api/apps/v1/generated.proto delete mode 100644 vendor/k8s.io/api/apps/v1beta1/generated.proto delete mode 100644 vendor/k8s.io/api/apps/v1beta2/generated.proto delete mode 100755 vendor/k8s.io/api/authentication/OWNERS delete mode 100644 vendor/k8s.io/api/authentication/v1/generated.proto delete mode 100644 vendor/k8s.io/api/authentication/v1beta1/generated.proto delete mode 100755 vendor/k8s.io/api/authorization/OWNERS delete mode 100644 vendor/k8s.io/api/authorization/v1/generated.proto delete mode 100644 vendor/k8s.io/api/authorization/v1beta1/generated.proto delete mode 100755 vendor/k8s.io/api/autoscaling/OWNERS delete mode 100644 vendor/k8s.io/api/autoscaling/v1/generated.proto delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta1/generated.proto delete mode 100755 vendor/k8s.io/api/batch/OWNERS delete mode 100644 vendor/k8s.io/api/batch/v1/generated.proto delete mode 100644 vendor/k8s.io/api/batch/v1beta1/generated.proto delete mode 100644 vendor/k8s.io/api/batch/v2alpha1/generated.proto delete mode 100755 vendor/k8s.io/api/certificates/OWNERS delete mode 100644 vendor/k8s.io/api/certificates/v1beta1/generated.proto delete mode 100644 vendor/k8s.io/api/code-of-conduct.md delete mode 100644 vendor/k8s.io/api/core/v1/generated.proto delete mode 100644 vendor/k8s.io/api/core/v1/taint_test.go delete mode 100644 vendor/k8s.io/api/core/v1/toleration_test.go delete mode 100644 vendor/k8s.io/api/events/OWNERS delete mode 100644 vendor/k8s.io/api/events/v1beta1/generated.proto delete mode 100755 vendor/k8s.io/api/extensions/OWNERS delete mode 100644 vendor/k8s.io/api/extensions/v1beta1/generated.proto delete mode 100755 vendor/k8s.io/api/networking/OWNERS delete mode 100644 vendor/k8s.io/api/networking/v1/generated.proto delete mode 100755 vendor/k8s.io/api/policy/OWNERS delete mode 100644 vendor/k8s.io/api/policy/v1beta1/generated.proto delete mode 100755 vendor/k8s.io/api/rbac/OWNERS delete mode 100644 vendor/k8s.io/api/rbac/v1/generated.proto delete mode 100644 vendor/k8s.io/api/rbac/v1alpha1/generated.proto delete mode 100644 vendor/k8s.io/api/rbac/v1beta1/generated.proto delete mode 100644 vendor/k8s.io/api/roundtrip_test.go delete mode 100644 vendor/k8s.io/api/scheduling/v1alpha1/generated.proto delete mode 100644 vendor/k8s.io/api/scheduling/v1beta1/generated.proto delete mode 100644 vendor/k8s.io/api/settings/v1alpha1/generated.proto delete mode 100755 vendor/k8s.io/api/storage/OWNERS delete mode 100644 vendor/k8s.io/api/storage/v1/generated.proto delete mode 100644 vendor/k8s.io/api/storage/v1alpha1/generated.proto delete mode 100644 vendor/k8s.io/api/storage/v1beta1/generated.proto delete mode 100644 vendor/k8s.io/apiextensions-apiserver/CONTRIBUTING.md delete mode 100644 vendor/k8s.io/apiextensions-apiserver/OWNERS delete mode 100644 vendor/k8s.io/apiextensions-apiserver/README.md delete mode 100644 vendor/k8s.io/apiextensions-apiserver/SECURITY_CONTACTS delete mode 100644 vendor/k8s.io/apiextensions-apiserver/code-of-conduct.md delete mode 100644 vendor/k8s.io/apiextensions-apiserver/pkg/features/OWNERS delete mode 100644 vendor/k8s.io/apimachinery/CONTRIBUTING.md delete mode 100644 vendor/k8s.io/apimachinery/OWNERS delete mode 100644 vendor/k8s.io/apimachinery/README.md delete mode 100644 vendor/k8s.io/apimachinery/SECURITY_CONTACTS delete mode 100644 vendor/k8s.io/apimachinery/code-of-conduct.md delete mode 100644 vendor/k8s.io/apimachinery/pkg/OWNERS delete mode 100755 vendor/k8s.io/apimachinery/pkg/api/errors/OWNERS delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/errors/errors_test.go delete mode 100755 vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/meta/meta_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/meta/multirestmapper_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/meta/priority_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/meta/restmapper_test.go delete mode 100755 vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/amount_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/math_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/quantity_example_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/quantity_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/scale_int_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/register_test.go delete mode 100755 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/controller_ref_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_list_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto delete mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/converter_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/helper_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/fields/fields_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/fields/selector_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/labels/labels_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/labels/selector_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/conversion_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/converter_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/embedded_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/extension_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/generated.proto delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/local_scheme_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/scheme_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/meta_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/sparse_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/swagger_doc_generator_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/cache/cache_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/cache/lruexpirecache_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/clock/clock_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/diff/diff_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/errors/errors_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/framer/framer_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/json/json_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/mergepatch/OWNERS delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/mergepatch/util_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/http_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/interface_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/port_range_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/port_split_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/util_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/runtime/runtime_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/set_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/strategicpatch/OWNERS delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/validation/field/errors_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/validation/field/path_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/validation/validation_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/wait/wait_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/yaml/decoder_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/version/helpers_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/watch/filter_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/watch/mux_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/watch/streamwatcher_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/watch/until_test.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/watch/watch_test.go delete mode 100644 vendor/k8s.io/apimachinery/third_party/forked/golang/json/OWNERS delete mode 100644 vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields_test.go delete mode 100644 vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal_test.go delete mode 100644 vendor/k8s.io/apiserver/.import-restrictions delete mode 100644 vendor/k8s.io/apiserver/CONTRIBUTING.md delete mode 100644 vendor/k8s.io/apiserver/OWNERS delete mode 100644 vendor/k8s.io/apiserver/README.md delete mode 100644 vendor/k8s.io/apiserver/SECURITY_CONTACTS delete mode 100644 vendor/k8s.io/apiserver/code-of-conduct.md delete mode 100644 vendor/k8s.io/apiserver/pkg/features/OWNERS delete mode 100644 vendor/k8s.io/apiserver/pkg/util/feature/feature_gate_test.go delete mode 100644 vendor/k8s.io/client-go/.travis.yml delete mode 100644 vendor/k8s.io/client-go/CHANGELOG.md delete mode 100644 vendor/k8s.io/client-go/CONTRIBUTING.md delete mode 100644 vendor/k8s.io/client-go/INSTALL.md delete mode 100644 vendor/k8s.io/client-go/OWNERS delete mode 100644 vendor/k8s.io/client-go/README.md delete mode 100644 vendor/k8s.io/client-go/SECURITY_CONTACTS delete mode 100644 vendor/k8s.io/client-go/code-of-conduct.md delete mode 100644 vendor/k8s.io/client-go/discovery/cached_discovery_test.go delete mode 100644 vendor/k8s.io/client-go/discovery/discovery_client_test.go delete mode 100644 vendor/k8s.io/client-go/discovery/fake/discovery_test.go delete mode 100644 vendor/k8s.io/client-go/discovery/helper_blackbox_test.go delete mode 100644 vendor/k8s.io/client-go/discovery/round_tripper_test.go delete mode 100644 vendor/k8s.io/client-go/pkg/version/.gitattributes delete mode 100644 vendor/k8s.io/client-go/pkg/version/def.bzl delete mode 100644 vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec_test.go delete mode 100755 vendor/k8s.io/client-go/rest/OWNERS delete mode 100644 vendor/k8s.io/client-go/rest/client_test.go delete mode 100644 vendor/k8s.io/client-go/rest/config_test.go delete mode 100644 vendor/k8s.io/client-go/rest/plugin_test.go delete mode 100755 vendor/k8s.io/client-go/rest/request_test.go delete mode 100644 vendor/k8s.io/client-go/rest/url_utils_test.go delete mode 100644 vendor/k8s.io/client-go/rest/urlbackoff_test.go delete mode 100644 vendor/k8s.io/client-go/rest/watch/decoder_test.go delete mode 100644 vendor/k8s.io/client-go/rest/watch/encoder_test.go delete mode 100644 vendor/k8s.io/client-go/testing/fixture_test.go delete mode 100644 vendor/k8s.io/client-go/tools/auth/clientauth_test.go delete mode 100755 vendor/k8s.io/client-go/tools/cache/OWNERS delete mode 100644 vendor/k8s.io/client-go/tools/cache/controller_test.go delete mode 100644 vendor/k8s.io/client-go/tools/cache/delta_fifo_test.go delete mode 100644 vendor/k8s.io/client-go/tools/cache/expiration_cache_test.go delete mode 100644 vendor/k8s.io/client-go/tools/cache/fifo_test.go delete mode 100644 vendor/k8s.io/client-go/tools/cache/heap_test.go delete mode 100644 vendor/k8s.io/client-go/tools/cache/index_test.go delete mode 100644 vendor/k8s.io/client-go/tools/cache/mutation_detector_test.go delete mode 100644 vendor/k8s.io/client-go/tools/cache/processor_listener_test.go delete mode 100644 vendor/k8s.io/client-go/tools/cache/reflector_test.go delete mode 100644 vendor/k8s.io/client-go/tools/cache/shared_informer_test.go delete mode 100644 vendor/k8s.io/client-go/tools/cache/store_test.go delete mode 100644 vendor/k8s.io/client-go/tools/cache/undelta_store_test.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/api/helpers_test.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/api/types_test.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/client_config_test.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/loader_test.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/merged_client_builder_test.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/overrides_test.go delete mode 100644 vendor/k8s.io/client-go/tools/clientcmd/validation_test.go delete mode 100755 vendor/k8s.io/client-go/tools/metrics/OWNERS delete mode 100644 vendor/k8s.io/client-go/tools/pager/pager_test.go delete mode 100644 vendor/k8s.io/client-go/tools/reference/ref_test.go delete mode 100755 vendor/k8s.io/client-go/transport/OWNERS delete mode 100644 vendor/k8s.io/client-go/transport/cache_test.go delete mode 100644 vendor/k8s.io/client-go/transport/round_trippers_test.go delete mode 100644 vendor/k8s.io/client-go/transport/transport_test.go delete mode 100644 vendor/k8s.io/client-go/util/buffer/ring_growing_test.go delete mode 100644 vendor/k8s.io/client-go/util/cert/csr_test.go delete mode 100644 vendor/k8s.io/client-go/util/cert/pem_test.go delete mode 100644 vendor/k8s.io/client-go/util/connrotation/connrotation_test.go delete mode 100644 vendor/k8s.io/client-go/util/flowcontrol/backoff_test.go delete mode 100644 vendor/k8s.io/client-go/util/flowcontrol/throttle_test.go delete mode 100644 vendor/k8s.io/client-go/util/integer/integer_test.go delete mode 100755 vendor/k8s.io/client-go/util/retry/OWNERS delete mode 100644 vendor/k8s.io/client-go/util/retry/util_test.go delete mode 100644 vendor/k8s.io/client-go/util/workqueue/default_rate_limiters_test.go delete mode 100644 vendor/k8s.io/client-go/util/workqueue/delaying_queue_test.go delete mode 100644 vendor/k8s.io/client-go/util/workqueue/queue_test.go delete mode 100644 vendor/k8s.io/client-go/util/workqueue/rate_limitting_queue_test.go create mode 100644 vendor/k8s.io/code-generator/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 vendor/k8s.io/code-generator/Godeps/Godeps.json create mode 100644 vendor/k8s.io/code-generator/Godeps/OWNERS create mode 100644 vendor/k8s.io/code-generator/Godeps/Readme rename vendor/k8s.io/{kubernetes/pkg/kubelet => code-generator/_examples/apiserver/apis/example}/doc.go (64%) create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/apis/example/install/install.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/apis/example/register.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/apis/example/types.go rename vendor/k8s.io/{client-go/plugin/pkg/client/auth/plugins.go => code-generator/_examples/apiserver/apis/example/v1/doc.go} (67%) create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/register.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/types.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.conversion.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.defaults.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/apis/example/zz_generated.deepcopy.go rename vendor/k8s.io/{gengo/args/args_test.go => code-generator/_examples/apiserver/apis/example2/doc.go} (61%) create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/install/install.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/register.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/types.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/register.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/types.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.conversion.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.defaults.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/clientset.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/clientset_generated.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/register.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/scheme/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/scheme/register.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/example_client.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/fake_example_client.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/fake_testtype.go rename vendor/k8s.io/{apimachinery/pkg/apis/meta/internalversion/roundtrip_test.go => code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/generated_expansion.go} (68%) create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/testtype.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/example2_client.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/fake_example2_client.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/fake_testtype.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/generated_expansion.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/testtype.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/clientset.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/clientset_generated.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/register.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/scheme/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/scheme/register.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/example_client.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/fake_example_client.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/fake_testtype.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/generated_expansion.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/testtype.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/example2_client.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/fake_example2_client.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/fake_testtype.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/generated_expansion.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/interface.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/v1/interface.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/v1/testtype.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/interface.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/v1/interface.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/v1/testtype.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/factory.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/generic.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/internalinterfaces/factory_interfaces.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/interface.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/internalversion/interface.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/internalversion/testtype.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/interface.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/internalversion/interface.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/internalversion/testtype.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/factory.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/generic.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/internalinterfaces/factory_interfaces.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/listers/example/internalversion/expansion_generated.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/listers/example/internalversion/testtype.go rename vendor/k8s.io/{utils/exec/new_test.go => code-generator/_examples/apiserver/listers/example/v1/expansion_generated.go} (59%) create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/listers/example/v1/testtype.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/listers/example2/internalversion/expansion_generated.go create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/listers/example2/internalversion/testtype.go rename vendor/k8s.io/{apimachinery/pkg/apis/meta/v1/unstructured/unstructured_test.go => code-generator/_examples/apiserver/listers/example2/v1/expansion_generated.go} (59%) create mode 100644 vendor/k8s.io/code-generator/_examples/apiserver/listers/example2/v1/testtype.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/apis/example/v1/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/apis/example/v1/register.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/apis/example/v1/types.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/apis/example/v1/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/apis/example/v1/zz_generated.defaults.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/apis/example2/v1/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/apis/example2/v1/register.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/apis/example2/v1/types.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/apis/example2/v1/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/apis/example2/v1/zz_generated.defaults.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/clientset.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/clientset_generated.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/register.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/scheme/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/scheme/register.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/example_client.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_clustertesttype.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_example_client.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_testtype.go rename vendor/k8s.io/{apimachinery/pkg/runtime/schema/generated.proto => code-generator/_examples/crd/clientset/versioned/typed/example/v1/generated_expansion.go} (66%) create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/testtype.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/example2_client.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/doc.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/fake_example2_client.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/fake_testtype.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/generated_expansion.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/testtype.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example/interface.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/clustertesttype.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/interface.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/testtype.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/interface.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/v1/interface.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/v1/testtype.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/factory.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/generic.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/internalinterfaces/factory_interfaces.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/listers/example/v1/clustertesttype.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/listers/example/v1/expansion_generated.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/listers/example/v1/testtype.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/listers/example2/v1/expansion_generated.go create mode 100644 vendor/k8s.io/code-generator/_examples/crd/listers/example2/v1/testtype.go delete mode 100644 vendor/k8s.io/code-generator/cmd/client-gen/args/gvpackages_test.go delete mode 100644 vendor/k8s.io/code-generator/cmd/client-gen/generators/util/tags_test.go delete mode 100644 vendor/k8s.io/code-generator/cmd/client-gen/types/helpers_test.go create mode 100644 vendor/k8s.io/code-generator/cmd/conversion-gen/args/args.go create mode 100644 vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go create mode 100644 vendor/k8s.io/code-generator/cmd/conversion-gen/main.go create mode 100644 vendor/k8s.io/code-generator/cmd/go-to-protobuf/.gitignore create mode 100644 vendor/k8s.io/code-generator/cmd/go-to-protobuf/OWNERS rename vendor/k8s.io/{apiextensions-apiserver => code-generator/cmd/go-to-protobuf}/main.go (55%) create mode 100644 vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go create mode 100644 vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go create mode 100644 vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/import_tracker.go create mode 100644 vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/namer.go create mode 100644 vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/package.go create mode 100644 vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/parser.go rename vendor/k8s.io/{kubernetes/pkg/kubelet/kubelet_network_test.go => code-generator/cmd/go-to-protobuf/protobuf/tags.go} (59%) create mode 100644 vendor/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo/main.go create mode 100644 vendor/k8s.io/code-generator/cmd/import-boss/.gitignore create mode 100644 vendor/k8s.io/code-generator/cmd/import-boss/main.go create mode 100644 vendor/k8s.io/code-generator/cmd/openapi-gen/README create mode 100644 vendor/k8s.io/code-generator/cmd/openapi-gen/args/args.go create mode 100644 vendor/k8s.io/code-generator/cmd/openapi-gen/main.go rename vendor/k8s.io/{gengo/examples => code-generator/cmd}/set-gen/.gitignore (100%) rename vendor/k8s.io/{gengo/examples => code-generator/cmd}/set-gen/main.go (77%) create mode 100644 vendor/k8s.io/code-generator/hack/boilerplate.go.txt create mode 100755 vendor/k8s.io/code-generator/hack/update-codegen.sh create mode 100755 vendor/k8s.io/code-generator/hack/verify-codegen.sh create mode 100644 vendor/k8s.io/code-generator/third_party/forked/golang/reflect/type.go delete mode 100644 vendor/k8s.io/gengo/.import-restrictions delete mode 100644 vendor/k8s.io/gengo/.travis.yml delete mode 100644 vendor/k8s.io/gengo/CONTRIBUTING.md delete mode 100644 vendor/k8s.io/gengo/OWNERS delete mode 100644 vendor/k8s.io/gengo/README.md delete mode 100644 vendor/k8s.io/gengo/SECURITY_CONTACTS delete mode 100644 vendor/k8s.io/gengo/code-of-conduct.md delete mode 100644 vendor/k8s.io/gengo/examples/deepcopy-gen/.gitignore delete mode 100644 vendor/k8s.io/gengo/examples/deepcopy-gen/Makefile delete mode 100644 vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy_test.go delete mode 100644 vendor/k8s.io/gengo/examples/deepcopy-gen/main.go delete mode 100644 vendor/k8s.io/gengo/examples/defaulter-gen/.gitignore delete mode 100644 vendor/k8s.io/gengo/examples/defaulter-gen/.import-restrictions delete mode 100644 vendor/k8s.io/gengo/examples/defaulter-gen/Makefile delete mode 100644 vendor/k8s.io/gengo/examples/defaulter-gen/OWNERS delete mode 100644 vendor/k8s.io/gengo/examples/defaulter-gen/main.go delete mode 100644 vendor/k8s.io/gengo/examples/set-gen/Makefile delete mode 100644 vendor/k8s.io/gengo/examples/set-gen/sets/set_test.go delete mode 100644 vendor/k8s.io/gengo/generator/snippet_writer_test.go delete mode 100644 vendor/k8s.io/gengo/namer/namer_test.go delete mode 100644 vendor/k8s.io/gengo/namer/plural_namer_test.go delete mode 100644 vendor/k8s.io/gengo/parser/local_parse_test.go delete mode 100644 vendor/k8s.io/gengo/parser/parse_test.go delete mode 100644 vendor/k8s.io/gengo/types/comments_test.go delete mode 100644 vendor/k8s.io/gengo/types/flatten_test.go delete mode 100644 vendor/k8s.io/gengo/types/types_test.go delete mode 100644 vendor/k8s.io/kube-openapi/.gitignore delete mode 100644 vendor/k8s.io/kube-openapi/.travis.yml delete mode 100644 vendor/k8s.io/kube-openapi/CONTRIBUTING.md delete mode 100755 vendor/k8s.io/kube-openapi/OWNERS delete mode 100644 vendor/k8s.io/kube-openapi/README.md delete mode 100644 vendor/k8s.io/kube-openapi/code-of-conduct.md delete mode 100644 vendor/k8s.io/kube-openapi/pkg/util/proto/openapi_suite_test.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/util/proto/openapi_test.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/util/trie.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/util/util.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/util/util_test.go delete mode 100644 vendor/k8s.io/kubernetes/.generated_files delete mode 100644 vendor/k8s.io/kubernetes/.gitattributes delete mode 100644 vendor/k8s.io/kubernetes/.gitignore delete mode 100644 vendor/k8s.io/kubernetes/CHANGELOG-1.11.md delete mode 100644 vendor/k8s.io/kubernetes/CHANGELOG.md delete mode 100644 vendor/k8s.io/kubernetes/CONTRIBUTING.md create mode 100644 vendor/k8s.io/kubernetes/Godeps/LICENSES delete mode 100644 vendor/k8s.io/kubernetes/OWNERS delete mode 100644 vendor/k8s.io/kubernetes/OWNERS_ALIASES delete mode 100644 vendor/k8s.io/kubernetes/README.md delete mode 100644 vendor/k8s.io/kubernetes/SECURITY_CONTACTS delete mode 100644 vendor/k8s.io/kubernetes/SUPPORT.md create mode 120000 vendor/k8s.io/kubernetes/cluster/gce/cos create mode 120000 vendor/k8s.io/kubernetes/cluster/gce/custom create mode 120000 vendor/k8s.io/kubernetes/cluster/gce/ubuntu create mode 100644 vendor/k8s.io/kubernetes/cluster/juju/layers/kubeapi-load-balancer/copyright create mode 120000 vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-master/actions/namespace-delete create mode 120000 vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-master/actions/namespace-list create mode 100644 vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-master/copyright create mode 100644 vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-worker/copyright delete mode 100644 vendor/k8s.io/kubernetes/code-of-conduct.md delete mode 100644 vendor/k8s.io/kubernetes/labels.yaml delete mode 100644 vendor/k8s.io/kubernetes/pkg/.import-restrictions delete mode 100644 vendor/k8s.io/kubernetes/pkg/BUILD delete mode 100644 vendor/k8s.io/kubernetes/pkg/OWNERS delete mode 100644 vendor/k8s.io/kubernetes/pkg/api/OWNERS delete mode 100644 vendor/k8s.io/kubernetes/pkg/apis/OWNERS delete mode 100644 vendor/k8s.io/kubernetes/pkg/apis/core/BUILD delete mode 100644 vendor/k8s.io/kubernetes/pkg/apis/core/OWNERS delete mode 100644 vendor/k8s.io/kubernetes/pkg/apis/core/taint_test.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/apis/core/toleration_test.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/features/BUILD delete mode 100644 vendor/k8s.io/kubernetes/pkg/features/OWNERS delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/BUILD delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline_test.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/apis/BUILD delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/OWNERS delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1beta1/BUILD delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1beta1/api.proto delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters_test.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status_test.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods_test.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods_windows_test.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources_test.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_test.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes_test.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/oom_watcher.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/oom_watcher_test.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/pod_container_deletor.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/pod_container_deletor_test.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers_test.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/reason_cache.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/reason_cache_test.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/runonce.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/runonce_test.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/runtime.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/util.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/volume_host.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/util/BUILD delete mode 100644 vendor/k8s.io/kubernetes/pkg/util/node/BUILD delete mode 100644 vendor/k8s.io/kubernetes/pkg/util/node/node_test.go delete mode 100755 vendor/k8s.io/kubernetes/pkg/util/verify-util-pkg.sh create mode 100644 vendor/k8s.io/kubernetes/staging/src/k8s.io/api/LICENSE create mode 100644 vendor/k8s.io/kubernetes/staging/src/k8s.io/apiextensions-apiserver/LICENSE create mode 100644 vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/LICENSE create mode 100644 vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/LICENSE create mode 100644 vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/LICENSE create mode 100644 vendor/k8s.io/kubernetes/staging/src/k8s.io/code-generator/LICENSE create mode 100644 vendor/k8s.io/kubernetes/staging/src/k8s.io/kube-aggregator/LICENSE create mode 100644 vendor/k8s.io/kubernetes/staging/src/k8s.io/metrics/LICENSE create mode 100644 vendor/k8s.io/kubernetes/staging/src/k8s.io/sample-apiserver/LICENSE create mode 100644 vendor/k8s.io/kubernetes/staging/src/k8s.io/sample-controller/LICENSE create mode 100644 vendor/k8s.io/kubernetes/third_party/forked/golang/LICENSE create mode 100644 vendor/k8s.io/kubernetes/third_party/forked/golang/PATENTS create mode 100644 vendor/k8s.io/kubernetes/third_party/forked/gonum/graph/LICENSE create mode 100644 vendor/k8s.io/kubernetes/third_party/forked/shell2junit/LICENSE create mode 100644 vendor/k8s.io/kubernetes/third_party/intemp/LICENSE create mode 100644 vendor/k8s.io/kubernetes/third_party/swagger-ui/LICENSE delete mode 100644 vendor/k8s.io/utils/.travis.yml delete mode 100644 vendor/k8s.io/utils/CONTRIBUTING.md delete mode 100644 vendor/k8s.io/utils/HOWTOMOVE.md delete mode 100644 vendor/k8s.io/utils/README.md delete mode 100644 vendor/k8s.io/utils/code-of-conduct.md delete mode 100644 vendor/k8s.io/utils/exec/exec_test.go diff --git a/Gopkg.toml b/Gopkg.toml index 0dfd2321..9ebd0461 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -23,6 +23,16 @@ required = ["k8s.io/code-generator/cmd/deepcopy-gen", "k8s.io/code-generator/cmd/client-gen", "k8s.io/code-generator/cmd/lister-gen", "k8s.io/code-generator/cmd/informer-gen", "k8s.io/code-generator/cmd/defaulter-gen"] ignored = ["k8s.io/code-generator"] +[prune] + go-tests = true + unused-packages = true + non-go = true + + [[prune.project]] + name = "k8s.io/code-generator" + non-go = false + unused-packages = false + [[constraint]] branch = "master" name = "github.com/golang/glog" diff --git a/vendor/github.com/davecgh/go-spew/.gitignore b/vendor/github.com/davecgh/go-spew/.gitignore deleted file mode 100644 index 00268614..00000000 --- a/vendor/github.com/davecgh/go-spew/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe diff --git a/vendor/github.com/davecgh/go-spew/.travis.yml b/vendor/github.com/davecgh/go-spew/.travis.yml deleted file mode 100644 index 984e0736..00000000 --- a/vendor/github.com/davecgh/go-spew/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: go -go: - - 1.5.4 - - 1.6.3 - - 1.7 -install: - - go get -v golang.org/x/tools/cmd/cover -script: - - go test -v -tags=safe ./spew - - go test -v -tags=testcgo ./spew -covermode=count -coverprofile=profile.cov -after_success: - - go get -v github.com/mattn/goveralls - - export PATH=$PATH:$HOME/gopath/bin - - goveralls -coverprofile=profile.cov -service=travis-ci diff --git a/vendor/github.com/davecgh/go-spew/README.md b/vendor/github.com/davecgh/go-spew/README.md deleted file mode 100644 index 26243044..00000000 --- a/vendor/github.com/davecgh/go-spew/README.md +++ /dev/null @@ -1,205 +0,0 @@ -go-spew -======= - -[![Build Status](https://img.shields.io/travis/davecgh/go-spew.svg)] -(https://travis-ci.org/davecgh/go-spew) [![ISC License] -(http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) [![Coverage Status] -(https://img.shields.io/coveralls/davecgh/go-spew.svg)] -(https://coveralls.io/r/davecgh/go-spew?branch=master) - - -Go-spew implements a deep pretty printer for Go data structures to aid in -debugging. A comprehensive suite of tests with 100% test coverage is provided -to ensure proper functionality. See `test_coverage.txt` for the gocov coverage -report. Go-spew is licensed under the liberal ISC license, so it may be used in -open source or commercial projects. - -If you're interested in reading about how this package came to life and some -of the challenges involved in providing a deep pretty printer, there is a blog -post about it -[here](https://web.archive.org/web/20160304013555/https://blog.cyphertite.com/go-spew-a-journey-into-dumping-go-data-structures/). - -## Documentation - -[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)] -(http://godoc.org/github.com/davecgh/go-spew/spew) - -Full `go doc` style documentation for the project can be viewed online without -installing this package by using the excellent GoDoc site here: -http://godoc.org/github.com/davecgh/go-spew/spew - -You can also view the documentation locally once the package is installed with -the `godoc` tool by running `godoc -http=":6060"` and pointing your browser to -http://localhost:6060/pkg/github.com/davecgh/go-spew/spew - -## Installation - -```bash -$ go get -u github.com/davecgh/go-spew/spew -``` - -## Quick Start - -Add this import line to the file you're working in: - -```Go -import "github.com/davecgh/go-spew/spew" -``` - -To dump a variable with full newlines, indentation, type, and pointer -information use Dump, Fdump, or Sdump: - -```Go -spew.Dump(myVar1, myVar2, ...) -spew.Fdump(someWriter, myVar1, myVar2, ...) -str := spew.Sdump(myVar1, myVar2, ...) -``` - -Alternatively, if you would prefer to use format strings with a compacted inline -printing style, use the convenience wrappers Printf, Fprintf, etc with %v (most -compact), %+v (adds pointer addresses), %#v (adds types), or %#+v (adds types -and pointer addresses): - -```Go -spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2) -spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) -spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2) -spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) -``` - -## Debugging a Web Application Example - -Here is an example of how you can use `spew.Sdump()` to help debug a web application. Please be sure to wrap your output using the `html.EscapeString()` function for safety reasons. You should also only use this debugging technique in a development environment, never in production. - -```Go -package main - -import ( - "fmt" - "html" - "net/http" - - "github.com/davecgh/go-spew/spew" -) - -func handler(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "text/html") - fmt.Fprintf(w, "Hi there, %s!", r.URL.Path[1:]) - fmt.Fprintf(w, "") -} - -func main() { - http.HandleFunc("/", handler) - http.ListenAndServe(":8080", nil) -} -``` - -## Sample Dump Output - -``` -(main.Foo) { - unexportedField: (*main.Bar)(0xf84002e210)({ - flag: (main.Flag) flagTwo, - data: (uintptr) - }), - ExportedField: (map[interface {}]interface {}) { - (string) "one": (bool) true - } -} -([]uint8) { - 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... | - 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0| - 00000020 31 32 |12| -} -``` - -## Sample Formatter Output - -Double pointer to a uint8: -``` - %v: <**>5 - %+v: <**>(0xf8400420d0->0xf8400420c8)5 - %#v: (**uint8)5 - %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5 -``` - -Pointer to circular struct with a uint8 field and a pointer to itself: -``` - %v: <*>{1 <*>} - %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)} - %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)} - %#+v: (*main.circular)(0xf84003e260){ui8:(uint8)1 c:(*main.circular)(0xf84003e260)} -``` - -## Configuration Options - -Configuration of spew is handled by fields in the ConfigState type. For -convenience, all of the top-level functions use a global state available via the -spew.Config global. - -It is also possible to create a ConfigState instance that provides methods -equivalent to the top-level functions. This allows concurrent configuration -options. See the ConfigState documentation for more details. - -``` -* Indent - String to use for each indentation level for Dump functions. - It is a single space by default. A popular alternative is "\t". - -* MaxDepth - Maximum number of levels to descend into nested data structures. - There is no limit by default. - -* DisableMethods - Disables invocation of error and Stringer interface methods. - Method invocation is enabled by default. - -* DisablePointerMethods - Disables invocation of error and Stringer interface methods on types - which only accept pointer receivers from non-pointer variables. This option - relies on access to the unsafe package, so it will not have any effect when - running in environments without access to the unsafe package such as Google - App Engine or with the "safe" build tag specified. - Pointer method invocation is enabled by default. - -* DisablePointerAddresses - DisablePointerAddresses specifies whether to disable the printing of - pointer addresses. This is useful when diffing data structures in tests. - -* DisableCapacities - DisableCapacities specifies whether to disable the printing of capacities - for arrays, slices, maps and channels. This is useful when diffing data - structures in tests. - -* ContinueOnMethod - Enables recursion into types after invoking error and Stringer interface - methods. Recursion after method invocation is disabled by default. - -* SortKeys - Specifies map keys should be sorted before being printed. Use - this to have a more deterministic, diffable output. Note that - only native types (bool, int, uint, floats, uintptr and string) - and types which implement error or Stringer interfaces are supported, - with other types sorted according to the reflect.Value.String() output - which guarantees display stability. Natural map order is used by - default. - -* SpewKeys - SpewKeys specifies that, as a last resort attempt, map keys should be - spewed to strings and sorted by those strings. This is only considered - if SortKeys is true. - -``` - -## Unsafe Package Dependency - -This package relies on the unsafe package to perform some of the more advanced -features, however it also supports a "limited" mode which allows it to work in -environments where the unsafe package is not available. By default, it will -operate in this mode on Google App Engine and when compiled with GopherJS. The -"safe" build tag may also be specified to force the package to build without -using the unsafe package. - -## License - -Go-spew is licensed under the [copyfree](http://copyfree.org) ISC License. diff --git a/vendor/github.com/davecgh/go-spew/cov_report.sh b/vendor/github.com/davecgh/go-spew/cov_report.sh deleted file mode 100644 index 9579497e..00000000 --- a/vendor/github.com/davecgh/go-spew/cov_report.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# This script uses gocov to generate a test coverage report. -# The gocov tool my be obtained with the following command: -# go get github.com/axw/gocov/gocov -# -# It will be installed to $GOPATH/bin, so ensure that location is in your $PATH. - -# Check for gocov. -if ! type gocov >/dev/null 2>&1; then - echo >&2 "This script requires the gocov tool." - echo >&2 "You may obtain it with the following command:" - echo >&2 "go get github.com/axw/gocov/gocov" - exit 1 -fi - -# Only run the cgo tests if gcc is installed. -if type gcc >/dev/null 2>&1; then - (cd spew && gocov test -tags testcgo | gocov report) -else - (cd spew && gocov test | gocov report) -fi diff --git a/vendor/github.com/davecgh/go-spew/spew/common_test.go b/vendor/github.com/davecgh/go-spew/spew/common_test.go deleted file mode 100644 index 0f5ce47d..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/common_test.go +++ /dev/null @@ -1,298 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * 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. - */ - -package spew_test - -import ( - "fmt" - "reflect" - "testing" - - "github.com/davecgh/go-spew/spew" -) - -// custom type to test Stinger interface on non-pointer receiver. -type stringer string - -// String implements the Stringer interface for testing invocation of custom -// stringers on types with non-pointer receivers. -func (s stringer) String() string { - return "stringer " + string(s) -} - -// custom type to test Stinger interface on pointer receiver. -type pstringer string - -// String implements the Stringer interface for testing invocation of custom -// stringers on types with only pointer receivers. -func (s *pstringer) String() string { - return "stringer " + string(*s) -} - -// xref1 and xref2 are cross referencing structs for testing circular reference -// detection. -type xref1 struct { - ps2 *xref2 -} -type xref2 struct { - ps1 *xref1 -} - -// indirCir1, indirCir2, and indirCir3 are used to generate an indirect circular -// reference for testing detection. -type indirCir1 struct { - ps2 *indirCir2 -} -type indirCir2 struct { - ps3 *indirCir3 -} -type indirCir3 struct { - ps1 *indirCir1 -} - -// embed is used to test embedded structures. -type embed struct { - a string -} - -// embedwrap is used to test embedded structures. -type embedwrap struct { - *embed - e *embed -} - -// panicer is used to intentionally cause a panic for testing spew properly -// handles them -type panicer int - -func (p panicer) String() string { - panic("test panic") -} - -// customError is used to test custom error interface invocation. -type customError int - -func (e customError) Error() string { - return fmt.Sprintf("error: %d", int(e)) -} - -// stringizeWants converts a slice of wanted test output into a format suitable -// for a test error message. -func stringizeWants(wants []string) string { - s := "" - for i, want := range wants { - if i > 0 { - s += fmt.Sprintf("want%d: %s", i+1, want) - } else { - s += "want: " + want - } - } - return s -} - -// testFailed returns whether or not a test failed by checking if the result -// of the test is in the slice of wanted strings. -func testFailed(result string, wants []string) bool { - for _, want := range wants { - if result == want { - return false - } - } - return true -} - -type sortableStruct struct { - x int -} - -func (ss sortableStruct) String() string { - return fmt.Sprintf("ss.%d", ss.x) -} - -type unsortableStruct struct { - x int -} - -type sortTestCase struct { - input []reflect.Value - expected []reflect.Value -} - -func helpTestSortValues(tests []sortTestCase, cs *spew.ConfigState, t *testing.T) { - getInterfaces := func(values []reflect.Value) []interface{} { - interfaces := []interface{}{} - for _, v := range values { - interfaces = append(interfaces, v.Interface()) - } - return interfaces - } - - for _, test := range tests { - spew.SortValues(test.input, cs) - // reflect.DeepEqual cannot really make sense of reflect.Value, - // probably because of all the pointer tricks. For instance, - // v(2.0) != v(2.0) on a 32-bits system. Turn them into interface{} - // instead. - input := getInterfaces(test.input) - expected := getInterfaces(test.expected) - if !reflect.DeepEqual(input, expected) { - t.Errorf("Sort mismatch:\n %v != %v", input, expected) - } - } -} - -// TestSortValues ensures the sort functionality for relect.Value based sorting -// works as intended. -func TestSortValues(t *testing.T) { - v := reflect.ValueOf - - a := v("a") - b := v("b") - c := v("c") - embedA := v(embed{"a"}) - embedB := v(embed{"b"}) - embedC := v(embed{"c"}) - tests := []sortTestCase{ - // No values. - { - []reflect.Value{}, - []reflect.Value{}, - }, - // Bools. - { - []reflect.Value{v(false), v(true), v(false)}, - []reflect.Value{v(false), v(false), v(true)}, - }, - // Ints. - { - []reflect.Value{v(2), v(1), v(3)}, - []reflect.Value{v(1), v(2), v(3)}, - }, - // Uints. - { - []reflect.Value{v(uint8(2)), v(uint8(1)), v(uint8(3))}, - []reflect.Value{v(uint8(1)), v(uint8(2)), v(uint8(3))}, - }, - // Floats. - { - []reflect.Value{v(2.0), v(1.0), v(3.0)}, - []reflect.Value{v(1.0), v(2.0), v(3.0)}, - }, - // Strings. - { - []reflect.Value{b, a, c}, - []reflect.Value{a, b, c}, - }, - // Array - { - []reflect.Value{v([3]int{3, 2, 1}), v([3]int{1, 3, 2}), v([3]int{1, 2, 3})}, - []reflect.Value{v([3]int{1, 2, 3}), v([3]int{1, 3, 2}), v([3]int{3, 2, 1})}, - }, - // Uintptrs. - { - []reflect.Value{v(uintptr(2)), v(uintptr(1)), v(uintptr(3))}, - []reflect.Value{v(uintptr(1)), v(uintptr(2)), v(uintptr(3))}, - }, - // SortableStructs. - { - // Note: not sorted - DisableMethods is set. - []reflect.Value{v(sortableStruct{2}), v(sortableStruct{1}), v(sortableStruct{3})}, - []reflect.Value{v(sortableStruct{2}), v(sortableStruct{1}), v(sortableStruct{3})}, - }, - // UnsortableStructs. - { - // Note: not sorted - SpewKeys is false. - []reflect.Value{v(unsortableStruct{2}), v(unsortableStruct{1}), v(unsortableStruct{3})}, - []reflect.Value{v(unsortableStruct{2}), v(unsortableStruct{1}), v(unsortableStruct{3})}, - }, - // Invalid. - { - []reflect.Value{embedB, embedA, embedC}, - []reflect.Value{embedB, embedA, embedC}, - }, - } - cs := spew.ConfigState{DisableMethods: true, SpewKeys: false} - helpTestSortValues(tests, &cs, t) -} - -// TestSortValuesWithMethods ensures the sort functionality for relect.Value -// based sorting works as intended when using string methods. -func TestSortValuesWithMethods(t *testing.T) { - v := reflect.ValueOf - - a := v("a") - b := v("b") - c := v("c") - tests := []sortTestCase{ - // Ints. - { - []reflect.Value{v(2), v(1), v(3)}, - []reflect.Value{v(1), v(2), v(3)}, - }, - // Strings. - { - []reflect.Value{b, a, c}, - []reflect.Value{a, b, c}, - }, - // SortableStructs. - { - []reflect.Value{v(sortableStruct{2}), v(sortableStruct{1}), v(sortableStruct{3})}, - []reflect.Value{v(sortableStruct{1}), v(sortableStruct{2}), v(sortableStruct{3})}, - }, - // UnsortableStructs. - { - // Note: not sorted - SpewKeys is false. - []reflect.Value{v(unsortableStruct{2}), v(unsortableStruct{1}), v(unsortableStruct{3})}, - []reflect.Value{v(unsortableStruct{2}), v(unsortableStruct{1}), v(unsortableStruct{3})}, - }, - } - cs := spew.ConfigState{DisableMethods: false, SpewKeys: false} - helpTestSortValues(tests, &cs, t) -} - -// TestSortValuesWithSpew ensures the sort functionality for relect.Value -// based sorting works as intended when using spew to stringify keys. -func TestSortValuesWithSpew(t *testing.T) { - v := reflect.ValueOf - - a := v("a") - b := v("b") - c := v("c") - tests := []sortTestCase{ - // Ints. - { - []reflect.Value{v(2), v(1), v(3)}, - []reflect.Value{v(1), v(2), v(3)}, - }, - // Strings. - { - []reflect.Value{b, a, c}, - []reflect.Value{a, b, c}, - }, - // SortableStructs. - { - []reflect.Value{v(sortableStruct{2}), v(sortableStruct{1}), v(sortableStruct{3})}, - []reflect.Value{v(sortableStruct{1}), v(sortableStruct{2}), v(sortableStruct{3})}, - }, - // UnsortableStructs. - { - []reflect.Value{v(unsortableStruct{2}), v(unsortableStruct{1}), v(unsortableStruct{3})}, - []reflect.Value{v(unsortableStruct{1}), v(unsortableStruct{2}), v(unsortableStruct{3})}, - }, - } - cs := spew.ConfigState{DisableMethods: true, SpewKeys: true} - helpTestSortValues(tests, &cs, t) -} diff --git a/vendor/github.com/davecgh/go-spew/spew/dump_test.go b/vendor/github.com/davecgh/go-spew/spew/dump_test.go deleted file mode 100644 index 5aad9c7a..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/dump_test.go +++ /dev/null @@ -1,1042 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * 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. - */ - -/* -Test Summary: -NOTE: For each test, a nil pointer, a single pointer and double pointer to the -base test element are also tested to ensure proper indirection across all types. - -- Max int8, int16, int32, int64, int -- Max uint8, uint16, uint32, uint64, uint -- Boolean true and false -- Standard complex64 and complex128 -- Array containing standard ints -- Array containing type with custom formatter on pointer receiver only -- Array containing interfaces -- Array containing bytes -- Slice containing standard float32 values -- Slice containing type with custom formatter on pointer receiver only -- Slice containing interfaces -- Slice containing bytes -- Nil slice -- Standard string -- Nil interface -- Sub-interface -- Map with string keys and int vals -- Map with custom formatter type on pointer receiver only keys and vals -- Map with interface keys and values -- Map with nil interface value -- Struct with primitives -- Struct that contains another struct -- Struct that contains custom type with Stringer pointer interface via both - exported and unexported fields -- Struct that contains embedded struct and field to same struct -- Uintptr to 0 (null pointer) -- Uintptr address of real variable -- Unsafe.Pointer to 0 (null pointer) -- Unsafe.Pointer to address of real variable -- Nil channel -- Standard int channel -- Function with no params and no returns -- Function with param and no returns -- Function with multiple params and multiple returns -- Struct that is circular through self referencing -- Structs that are circular through cross referencing -- Structs that are indirectly circular -- Type that panics in its Stringer interface -*/ - -package spew_test - -import ( - "bytes" - "fmt" - "testing" - "unsafe" - - "github.com/davecgh/go-spew/spew" -) - -// dumpTest is used to describe a test to be performed against the Dump method. -type dumpTest struct { - in interface{} - wants []string -} - -// dumpTests houses all of the tests to be performed against the Dump method. -var dumpTests = make([]dumpTest, 0) - -// addDumpTest is a helper method to append the passed input and desired result -// to dumpTests -func addDumpTest(in interface{}, wants ...string) { - test := dumpTest{in, wants} - dumpTests = append(dumpTests, test) -} - -func addIntDumpTests() { - // Max int8. - v := int8(127) - nv := (*int8)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "int8" - vs := "127" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") - - // Max int16. - v2 := int16(32767) - nv2 := (*int16)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "int16" - v2s := "32767" - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") - addDumpTest(nv2, "(*"+v2t+")()\n") - - // Max int32. - v3 := int32(2147483647) - nv3 := (*int32)(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "int32" - v3s := "2147483647" - addDumpTest(v3, "("+v3t+") "+v3s+"\n") - addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n") - addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n") - addDumpTest(nv3, "(*"+v3t+")()\n") - - // Max int64. - v4 := int64(9223372036854775807) - nv4 := (*int64)(nil) - pv4 := &v4 - v4Addr := fmt.Sprintf("%p", pv4) - pv4Addr := fmt.Sprintf("%p", &pv4) - v4t := "int64" - v4s := "9223372036854775807" - addDumpTest(v4, "("+v4t+") "+v4s+"\n") - addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n") - addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n") - addDumpTest(nv4, "(*"+v4t+")()\n") - - // Max int. - v5 := int(2147483647) - nv5 := (*int)(nil) - pv5 := &v5 - v5Addr := fmt.Sprintf("%p", pv5) - pv5Addr := fmt.Sprintf("%p", &pv5) - v5t := "int" - v5s := "2147483647" - addDumpTest(v5, "("+v5t+") "+v5s+"\n") - addDumpTest(pv5, "(*"+v5t+")("+v5Addr+")("+v5s+")\n") - addDumpTest(&pv5, "(**"+v5t+")("+pv5Addr+"->"+v5Addr+")("+v5s+")\n") - addDumpTest(nv5, "(*"+v5t+")()\n") -} - -func addUintDumpTests() { - // Max uint8. - v := uint8(255) - nv := (*uint8)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "uint8" - vs := "255" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") - - // Max uint16. - v2 := uint16(65535) - nv2 := (*uint16)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "uint16" - v2s := "65535" - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") - addDumpTest(nv2, "(*"+v2t+")()\n") - - // Max uint32. - v3 := uint32(4294967295) - nv3 := (*uint32)(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "uint32" - v3s := "4294967295" - addDumpTest(v3, "("+v3t+") "+v3s+"\n") - addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n") - addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n") - addDumpTest(nv3, "(*"+v3t+")()\n") - - // Max uint64. - v4 := uint64(18446744073709551615) - nv4 := (*uint64)(nil) - pv4 := &v4 - v4Addr := fmt.Sprintf("%p", pv4) - pv4Addr := fmt.Sprintf("%p", &pv4) - v4t := "uint64" - v4s := "18446744073709551615" - addDumpTest(v4, "("+v4t+") "+v4s+"\n") - addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n") - addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n") - addDumpTest(nv4, "(*"+v4t+")()\n") - - // Max uint. - v5 := uint(4294967295) - nv5 := (*uint)(nil) - pv5 := &v5 - v5Addr := fmt.Sprintf("%p", pv5) - pv5Addr := fmt.Sprintf("%p", &pv5) - v5t := "uint" - v5s := "4294967295" - addDumpTest(v5, "("+v5t+") "+v5s+"\n") - addDumpTest(pv5, "(*"+v5t+")("+v5Addr+")("+v5s+")\n") - addDumpTest(&pv5, "(**"+v5t+")("+pv5Addr+"->"+v5Addr+")("+v5s+")\n") - addDumpTest(nv5, "(*"+v5t+")()\n") -} - -func addBoolDumpTests() { - // Boolean true. - v := bool(true) - nv := (*bool)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "bool" - vs := "true" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") - - // Boolean false. - v2 := bool(false) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "bool" - v2s := "false" - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") -} - -func addFloatDumpTests() { - // Standard float32. - v := float32(3.1415) - nv := (*float32)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "float32" - vs := "3.1415" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") - - // Standard float64. - v2 := float64(3.1415926) - nv2 := (*float64)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "float64" - v2s := "3.1415926" - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") - addDumpTest(nv2, "(*"+v2t+")()\n") -} - -func addComplexDumpTests() { - // Standard complex64. - v := complex(float32(6), -2) - nv := (*complex64)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "complex64" - vs := "(6-2i)" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") - - // Standard complex128. - v2 := complex(float64(-6), 2) - nv2 := (*complex128)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "complex128" - v2s := "(-6+2i)" - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") - addDumpTest(nv2, "(*"+v2t+")()\n") -} - -func addArrayDumpTests() { - // Array containing standard ints. - v := [3]int{1, 2, 3} - vLen := fmt.Sprintf("%d", len(v)) - vCap := fmt.Sprintf("%d", cap(v)) - nv := (*[3]int)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "int" - vs := "(len=" + vLen + " cap=" + vCap + ") {\n (" + vt + ") 1,\n (" + - vt + ") 2,\n (" + vt + ") 3\n}" - addDumpTest(v, "([3]"+vt+") "+vs+"\n") - addDumpTest(pv, "(*[3]"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**[3]"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*[3]"+vt+")()\n") - - // Array containing type with custom formatter on pointer receiver only. - v2i0 := pstringer("1") - v2i1 := pstringer("2") - v2i2 := pstringer("3") - v2 := [3]pstringer{v2i0, v2i1, v2i2} - v2i0Len := fmt.Sprintf("%d", len(v2i0)) - v2i1Len := fmt.Sprintf("%d", len(v2i1)) - v2i2Len := fmt.Sprintf("%d", len(v2i2)) - v2Len := fmt.Sprintf("%d", len(v2)) - v2Cap := fmt.Sprintf("%d", cap(v2)) - nv2 := (*[3]pstringer)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "spew_test.pstringer" - v2sp := "(len=" + v2Len + " cap=" + v2Cap + ") {\n (" + v2t + - ") (len=" + v2i0Len + ") stringer 1,\n (" + v2t + - ") (len=" + v2i1Len + ") stringer 2,\n (" + v2t + - ") (len=" + v2i2Len + ") " + "stringer 3\n}" - v2s := v2sp - if spew.UnsafeDisabled { - v2s = "(len=" + v2Len + " cap=" + v2Cap + ") {\n (" + v2t + - ") (len=" + v2i0Len + ") \"1\",\n (" + v2t + ") (len=" + - v2i1Len + ") \"2\",\n (" + v2t + ") (len=" + v2i2Len + - ") " + "\"3\"\n}" - } - addDumpTest(v2, "([3]"+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*[3]"+v2t+")("+v2Addr+")("+v2sp+")\n") - addDumpTest(&pv2, "(**[3]"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2sp+")\n") - addDumpTest(nv2, "(*[3]"+v2t+")()\n") - - // Array containing interfaces. - v3i0 := "one" - v3 := [3]interface{}{v3i0, int(2), uint(3)} - v3i0Len := fmt.Sprintf("%d", len(v3i0)) - v3Len := fmt.Sprintf("%d", len(v3)) - v3Cap := fmt.Sprintf("%d", cap(v3)) - nv3 := (*[3]interface{})(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "[3]interface {}" - v3t2 := "string" - v3t3 := "int" - v3t4 := "uint" - v3s := "(len=" + v3Len + " cap=" + v3Cap + ") {\n (" + v3t2 + ") " + - "(len=" + v3i0Len + ") \"one\",\n (" + v3t3 + ") 2,\n (" + - v3t4 + ") 3\n}" - addDumpTest(v3, "("+v3t+") "+v3s+"\n") - addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n") - addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n") - addDumpTest(nv3, "(*"+v3t+")()\n") - - // Array containing bytes. - v4 := [34]byte{ - 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, - 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, - 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, - 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, - 0x31, 0x32, - } - v4Len := fmt.Sprintf("%d", len(v4)) - v4Cap := fmt.Sprintf("%d", cap(v4)) - nv4 := (*[34]byte)(nil) - pv4 := &v4 - v4Addr := fmt.Sprintf("%p", pv4) - pv4Addr := fmt.Sprintf("%p", &pv4) - v4t := "[34]uint8" - v4s := "(len=" + v4Len + " cap=" + v4Cap + ") " + - "{\n 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20" + - " |............... |\n" + - " 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30" + - " |!\"#$%&'()*+,-./0|\n" + - " 00000020 31 32 " + - " |12|\n}" - addDumpTest(v4, "("+v4t+") "+v4s+"\n") - addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n") - addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n") - addDumpTest(nv4, "(*"+v4t+")()\n") -} - -func addSliceDumpTests() { - // Slice containing standard float32 values. - v := []float32{3.14, 6.28, 12.56} - vLen := fmt.Sprintf("%d", len(v)) - vCap := fmt.Sprintf("%d", cap(v)) - nv := (*[]float32)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "float32" - vs := "(len=" + vLen + " cap=" + vCap + ") {\n (" + vt + ") 3.14,\n (" + - vt + ") 6.28,\n (" + vt + ") 12.56\n}" - addDumpTest(v, "([]"+vt+") "+vs+"\n") - addDumpTest(pv, "(*[]"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**[]"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*[]"+vt+")()\n") - - // Slice containing type with custom formatter on pointer receiver only. - v2i0 := pstringer("1") - v2i1 := pstringer("2") - v2i2 := pstringer("3") - v2 := []pstringer{v2i0, v2i1, v2i2} - v2i0Len := fmt.Sprintf("%d", len(v2i0)) - v2i1Len := fmt.Sprintf("%d", len(v2i1)) - v2i2Len := fmt.Sprintf("%d", len(v2i2)) - v2Len := fmt.Sprintf("%d", len(v2)) - v2Cap := fmt.Sprintf("%d", cap(v2)) - nv2 := (*[]pstringer)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "spew_test.pstringer" - v2s := "(len=" + v2Len + " cap=" + v2Cap + ") {\n (" + v2t + ") (len=" + - v2i0Len + ") stringer 1,\n (" + v2t + ") (len=" + v2i1Len + - ") stringer 2,\n (" + v2t + ") (len=" + v2i2Len + ") " + - "stringer 3\n}" - addDumpTest(v2, "([]"+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*[]"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**[]"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") - addDumpTest(nv2, "(*[]"+v2t+")()\n") - - // Slice containing interfaces. - v3i0 := "one" - v3 := []interface{}{v3i0, int(2), uint(3), nil} - v3i0Len := fmt.Sprintf("%d", len(v3i0)) - v3Len := fmt.Sprintf("%d", len(v3)) - v3Cap := fmt.Sprintf("%d", cap(v3)) - nv3 := (*[]interface{})(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "[]interface {}" - v3t2 := "string" - v3t3 := "int" - v3t4 := "uint" - v3t5 := "interface {}" - v3s := "(len=" + v3Len + " cap=" + v3Cap + ") {\n (" + v3t2 + ") " + - "(len=" + v3i0Len + ") \"one\",\n (" + v3t3 + ") 2,\n (" + - v3t4 + ") 3,\n (" + v3t5 + ") \n}" - addDumpTest(v3, "("+v3t+") "+v3s+"\n") - addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n") - addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n") - addDumpTest(nv3, "(*"+v3t+")()\n") - - // Slice containing bytes. - v4 := []byte{ - 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, - 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, - 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, - 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, - 0x31, 0x32, - } - v4Len := fmt.Sprintf("%d", len(v4)) - v4Cap := fmt.Sprintf("%d", cap(v4)) - nv4 := (*[]byte)(nil) - pv4 := &v4 - v4Addr := fmt.Sprintf("%p", pv4) - pv4Addr := fmt.Sprintf("%p", &pv4) - v4t := "[]uint8" - v4s := "(len=" + v4Len + " cap=" + v4Cap + ") " + - "{\n 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20" + - " |............... |\n" + - " 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30" + - " |!\"#$%&'()*+,-./0|\n" + - " 00000020 31 32 " + - " |12|\n}" - addDumpTest(v4, "("+v4t+") "+v4s+"\n") - addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n") - addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n") - addDumpTest(nv4, "(*"+v4t+")()\n") - - // Nil slice. - v5 := []int(nil) - nv5 := (*[]int)(nil) - pv5 := &v5 - v5Addr := fmt.Sprintf("%p", pv5) - pv5Addr := fmt.Sprintf("%p", &pv5) - v5t := "[]int" - v5s := "" - addDumpTest(v5, "("+v5t+") "+v5s+"\n") - addDumpTest(pv5, "(*"+v5t+")("+v5Addr+")("+v5s+")\n") - addDumpTest(&pv5, "(**"+v5t+")("+pv5Addr+"->"+v5Addr+")("+v5s+")\n") - addDumpTest(nv5, "(*"+v5t+")()\n") -} - -func addStringDumpTests() { - // Standard string. - v := "test" - vLen := fmt.Sprintf("%d", len(v)) - nv := (*string)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "string" - vs := "(len=" + vLen + ") \"test\"" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") -} - -func addInterfaceDumpTests() { - // Nil interface. - var v interface{} - nv := (*interface{})(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "interface {}" - vs := "" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") - - // Sub-interface. - v2 := interface{}(uint16(65535)) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "uint16" - v2s := "65535" - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") -} - -func addMapDumpTests() { - // Map with string keys and int vals. - k := "one" - kk := "two" - m := map[string]int{k: 1, kk: 2} - klen := fmt.Sprintf("%d", len(k)) // not kLen to shut golint up - kkLen := fmt.Sprintf("%d", len(kk)) - mLen := fmt.Sprintf("%d", len(m)) - nilMap := map[string]int(nil) - nm := (*map[string]int)(nil) - pm := &m - mAddr := fmt.Sprintf("%p", pm) - pmAddr := fmt.Sprintf("%p", &pm) - mt := "map[string]int" - mt1 := "string" - mt2 := "int" - ms := "(len=" + mLen + ") {\n (" + mt1 + ") (len=" + klen + ") " + - "\"one\": (" + mt2 + ") 1,\n (" + mt1 + ") (len=" + kkLen + - ") \"two\": (" + mt2 + ") 2\n}" - ms2 := "(len=" + mLen + ") {\n (" + mt1 + ") (len=" + kkLen + ") " + - "\"two\": (" + mt2 + ") 2,\n (" + mt1 + ") (len=" + klen + - ") \"one\": (" + mt2 + ") 1\n}" - addDumpTest(m, "("+mt+") "+ms+"\n", "("+mt+") "+ms2+"\n") - addDumpTest(pm, "(*"+mt+")("+mAddr+")("+ms+")\n", - "(*"+mt+")("+mAddr+")("+ms2+")\n") - addDumpTest(&pm, "(**"+mt+")("+pmAddr+"->"+mAddr+")("+ms+")\n", - "(**"+mt+")("+pmAddr+"->"+mAddr+")("+ms2+")\n") - addDumpTest(nm, "(*"+mt+")()\n") - addDumpTest(nilMap, "("+mt+") \n") - - // Map with custom formatter type on pointer receiver only keys and vals. - k2 := pstringer("one") - v2 := pstringer("1") - m2 := map[pstringer]pstringer{k2: v2} - k2Len := fmt.Sprintf("%d", len(k2)) - v2Len := fmt.Sprintf("%d", len(v2)) - m2Len := fmt.Sprintf("%d", len(m2)) - nilMap2 := map[pstringer]pstringer(nil) - nm2 := (*map[pstringer]pstringer)(nil) - pm2 := &m2 - m2Addr := fmt.Sprintf("%p", pm2) - pm2Addr := fmt.Sprintf("%p", &pm2) - m2t := "map[spew_test.pstringer]spew_test.pstringer" - m2t1 := "spew_test.pstringer" - m2t2 := "spew_test.pstringer" - m2s := "(len=" + m2Len + ") {\n (" + m2t1 + ") (len=" + k2Len + ") " + - "stringer one: (" + m2t2 + ") (len=" + v2Len + ") stringer 1\n}" - if spew.UnsafeDisabled { - m2s = "(len=" + m2Len + ") {\n (" + m2t1 + ") (len=" + k2Len + - ") " + "\"one\": (" + m2t2 + ") (len=" + v2Len + - ") \"1\"\n}" - } - addDumpTest(m2, "("+m2t+") "+m2s+"\n") - addDumpTest(pm2, "(*"+m2t+")("+m2Addr+")("+m2s+")\n") - addDumpTest(&pm2, "(**"+m2t+")("+pm2Addr+"->"+m2Addr+")("+m2s+")\n") - addDumpTest(nm2, "(*"+m2t+")()\n") - addDumpTest(nilMap2, "("+m2t+") \n") - - // Map with interface keys and values. - k3 := "one" - k3Len := fmt.Sprintf("%d", len(k3)) - m3 := map[interface{}]interface{}{k3: 1} - m3Len := fmt.Sprintf("%d", len(m3)) - nilMap3 := map[interface{}]interface{}(nil) - nm3 := (*map[interface{}]interface{})(nil) - pm3 := &m3 - m3Addr := fmt.Sprintf("%p", pm3) - pm3Addr := fmt.Sprintf("%p", &pm3) - m3t := "map[interface {}]interface {}" - m3t1 := "string" - m3t2 := "int" - m3s := "(len=" + m3Len + ") {\n (" + m3t1 + ") (len=" + k3Len + ") " + - "\"one\": (" + m3t2 + ") 1\n}" - addDumpTest(m3, "("+m3t+") "+m3s+"\n") - addDumpTest(pm3, "(*"+m3t+")("+m3Addr+")("+m3s+")\n") - addDumpTest(&pm3, "(**"+m3t+")("+pm3Addr+"->"+m3Addr+")("+m3s+")\n") - addDumpTest(nm3, "(*"+m3t+")()\n") - addDumpTest(nilMap3, "("+m3t+") \n") - - // Map with nil interface value. - k4 := "nil" - k4Len := fmt.Sprintf("%d", len(k4)) - m4 := map[string]interface{}{k4: nil} - m4Len := fmt.Sprintf("%d", len(m4)) - nilMap4 := map[string]interface{}(nil) - nm4 := (*map[string]interface{})(nil) - pm4 := &m4 - m4Addr := fmt.Sprintf("%p", pm4) - pm4Addr := fmt.Sprintf("%p", &pm4) - m4t := "map[string]interface {}" - m4t1 := "string" - m4t2 := "interface {}" - m4s := "(len=" + m4Len + ") {\n (" + m4t1 + ") (len=" + k4Len + ")" + - " \"nil\": (" + m4t2 + ") \n}" - addDumpTest(m4, "("+m4t+") "+m4s+"\n") - addDumpTest(pm4, "(*"+m4t+")("+m4Addr+")("+m4s+")\n") - addDumpTest(&pm4, "(**"+m4t+")("+pm4Addr+"->"+m4Addr+")("+m4s+")\n") - addDumpTest(nm4, "(*"+m4t+")()\n") - addDumpTest(nilMap4, "("+m4t+") \n") -} - -func addStructDumpTests() { - // Struct with primitives. - type s1 struct { - a int8 - b uint8 - } - v := s1{127, 255} - nv := (*s1)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "spew_test.s1" - vt2 := "int8" - vt3 := "uint8" - vs := "{\n a: (" + vt2 + ") 127,\n b: (" + vt3 + ") 255\n}" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") - - // Struct that contains another struct. - type s2 struct { - s1 s1 - b bool - } - v2 := s2{s1{127, 255}, true} - nv2 := (*s2)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "spew_test.s2" - v2t2 := "spew_test.s1" - v2t3 := "int8" - v2t4 := "uint8" - v2t5 := "bool" - v2s := "{\n s1: (" + v2t2 + ") {\n a: (" + v2t3 + ") 127,\n b: (" + - v2t4 + ") 255\n },\n b: (" + v2t5 + ") true\n}" - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") - addDumpTest(nv2, "(*"+v2t+")()\n") - - // Struct that contains custom type with Stringer pointer interface via both - // exported and unexported fields. - type s3 struct { - s pstringer - S pstringer - } - v3 := s3{"test", "test2"} - nv3 := (*s3)(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "spew_test.s3" - v3t2 := "spew_test.pstringer" - v3s := "{\n s: (" + v3t2 + ") (len=4) stringer test,\n S: (" + v3t2 + - ") (len=5) stringer test2\n}" - v3sp := v3s - if spew.UnsafeDisabled { - v3s = "{\n s: (" + v3t2 + ") (len=4) \"test\",\n S: (" + - v3t2 + ") (len=5) \"test2\"\n}" - v3sp = "{\n s: (" + v3t2 + ") (len=4) \"test\",\n S: (" + - v3t2 + ") (len=5) stringer test2\n}" - } - addDumpTest(v3, "("+v3t+") "+v3s+"\n") - addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3sp+")\n") - addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3sp+")\n") - addDumpTest(nv3, "(*"+v3t+")()\n") - - // Struct that contains embedded struct and field to same struct. - e := embed{"embedstr"} - eLen := fmt.Sprintf("%d", len("embedstr")) - v4 := embedwrap{embed: &e, e: &e} - nv4 := (*embedwrap)(nil) - pv4 := &v4 - eAddr := fmt.Sprintf("%p", &e) - v4Addr := fmt.Sprintf("%p", pv4) - pv4Addr := fmt.Sprintf("%p", &pv4) - v4t := "spew_test.embedwrap" - v4t2 := "spew_test.embed" - v4t3 := "string" - v4s := "{\n embed: (*" + v4t2 + ")(" + eAddr + ")({\n a: (" + v4t3 + - ") (len=" + eLen + ") \"embedstr\"\n }),\n e: (*" + v4t2 + - ")(" + eAddr + ")({\n a: (" + v4t3 + ") (len=" + eLen + ")" + - " \"embedstr\"\n })\n}" - addDumpTest(v4, "("+v4t+") "+v4s+"\n") - addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n") - addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n") - addDumpTest(nv4, "(*"+v4t+")()\n") -} - -func addUintptrDumpTests() { - // Null pointer. - v := uintptr(0) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "uintptr" - vs := "" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - - // Address of real variable. - i := 1 - v2 := uintptr(unsafe.Pointer(&i)) - nv2 := (*uintptr)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "uintptr" - v2s := fmt.Sprintf("%p", &i) - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") - addDumpTest(nv2, "(*"+v2t+")()\n") -} - -func addUnsafePointerDumpTests() { - // Null pointer. - v := unsafe.Pointer(uintptr(0)) - nv := (*unsafe.Pointer)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "unsafe.Pointer" - vs := "" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") - - // Address of real variable. - i := 1 - v2 := unsafe.Pointer(&i) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "unsafe.Pointer" - v2s := fmt.Sprintf("%p", &i) - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") - addDumpTest(nv, "(*"+vt+")()\n") -} - -func addChanDumpTests() { - // Nil channel. - var v chan int - pv := &v - nv := (*chan int)(nil) - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "chan int" - vs := "" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") - - // Real channel. - v2 := make(chan int) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "chan int" - v2s := fmt.Sprintf("%p", v2) - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") -} - -func addFuncDumpTests() { - // Function with no params and no returns. - v := addIntDumpTests - nv := (*func())(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "func()" - vs := fmt.Sprintf("%p", v) - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") - - // Function with param and no returns. - v2 := TestDump - nv2 := (*func(*testing.T))(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "func(*testing.T)" - v2s := fmt.Sprintf("%p", v2) - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") - addDumpTest(nv2, "(*"+v2t+")()\n") - - // Function with multiple params and multiple returns. - var v3 = func(i int, s string) (b bool, err error) { - return true, nil - } - nv3 := (*func(int, string) (bool, error))(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "func(int, string) (bool, error)" - v3s := fmt.Sprintf("%p", v3) - addDumpTest(v3, "("+v3t+") "+v3s+"\n") - addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n") - addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n") - addDumpTest(nv3, "(*"+v3t+")()\n") -} - -func addCircularDumpTests() { - // Struct that is circular through self referencing. - type circular struct { - c *circular - } - v := circular{nil} - v.c = &v - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "spew_test.circular" - vs := "{\n c: (*" + vt + ")(" + vAddr + ")({\n c: (*" + vt + ")(" + - vAddr + ")()\n })\n}" - vs2 := "{\n c: (*" + vt + ")(" + vAddr + ")()\n}" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs2+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs2+")\n") - - // Structs that are circular through cross referencing. - v2 := xref1{nil} - ts2 := xref2{&v2} - v2.ps2 = &ts2 - pv2 := &v2 - ts2Addr := fmt.Sprintf("%p", &ts2) - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "spew_test.xref1" - v2t2 := "spew_test.xref2" - v2s := "{\n ps2: (*" + v2t2 + ")(" + ts2Addr + ")({\n ps1: (*" + v2t + - ")(" + v2Addr + ")({\n ps2: (*" + v2t2 + ")(" + ts2Addr + - ")()\n })\n })\n}" - v2s2 := "{\n ps2: (*" + v2t2 + ")(" + ts2Addr + ")({\n ps1: (*" + v2t + - ")(" + v2Addr + ")()\n })\n}" - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s2+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s2+")\n") - - // Structs that are indirectly circular. - v3 := indirCir1{nil} - tic2 := indirCir2{nil} - tic3 := indirCir3{&v3} - tic2.ps3 = &tic3 - v3.ps2 = &tic2 - pv3 := &v3 - tic2Addr := fmt.Sprintf("%p", &tic2) - tic3Addr := fmt.Sprintf("%p", &tic3) - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "spew_test.indirCir1" - v3t2 := "spew_test.indirCir2" - v3t3 := "spew_test.indirCir3" - v3s := "{\n ps2: (*" + v3t2 + ")(" + tic2Addr + ")({\n ps3: (*" + v3t3 + - ")(" + tic3Addr + ")({\n ps1: (*" + v3t + ")(" + v3Addr + - ")({\n ps2: (*" + v3t2 + ")(" + tic2Addr + - ")()\n })\n })\n })\n}" - v3s2 := "{\n ps2: (*" + v3t2 + ")(" + tic2Addr + ")({\n ps3: (*" + v3t3 + - ")(" + tic3Addr + ")({\n ps1: (*" + v3t + ")(" + v3Addr + - ")()\n })\n })\n}" - addDumpTest(v3, "("+v3t+") "+v3s+"\n") - addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s2+")\n") - addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s2+")\n") -} - -func addPanicDumpTests() { - // Type that panics in its Stringer interface. - v := panicer(127) - nv := (*panicer)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "spew_test.panicer" - vs := "(PANIC=test panic)127" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") -} - -func addErrorDumpTests() { - // Type that has a custom Error interface. - v := customError(127) - nv := (*customError)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "spew_test.customError" - vs := "error: 127" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") -} - -// TestDump executes all of the tests described by dumpTests. -func TestDump(t *testing.T) { - // Setup tests. - addIntDumpTests() - addUintDumpTests() - addBoolDumpTests() - addFloatDumpTests() - addComplexDumpTests() - addArrayDumpTests() - addSliceDumpTests() - addStringDumpTests() - addInterfaceDumpTests() - addMapDumpTests() - addStructDumpTests() - addUintptrDumpTests() - addUnsafePointerDumpTests() - addChanDumpTests() - addFuncDumpTests() - addCircularDumpTests() - addPanicDumpTests() - addErrorDumpTests() - addCgoDumpTests() - - t.Logf("Running %d tests", len(dumpTests)) - for i, test := range dumpTests { - buf := new(bytes.Buffer) - spew.Fdump(buf, test.in) - s := buf.String() - if testFailed(s, test.wants) { - t.Errorf("Dump #%d\n got: %s %s", i, s, stringizeWants(test.wants)) - continue - } - } -} - -func TestDumpSortedKeys(t *testing.T) { - cfg := spew.ConfigState{SortKeys: true} - s := cfg.Sdump(map[int]string{1: "1", 3: "3", 2: "2"}) - expected := "(map[int]string) (len=3) {\n(int) 1: (string) (len=1) " + - "\"1\",\n(int) 2: (string) (len=1) \"2\",\n(int) 3: (string) " + - "(len=1) \"3\"\n" + - "}\n" - if s != expected { - t.Errorf("Sorted keys mismatch:\n %v %v", s, expected) - } - - s = cfg.Sdump(map[stringer]int{"1": 1, "3": 3, "2": 2}) - expected = "(map[spew_test.stringer]int) (len=3) {\n" + - "(spew_test.stringer) (len=1) stringer 1: (int) 1,\n" + - "(spew_test.stringer) (len=1) stringer 2: (int) 2,\n" + - "(spew_test.stringer) (len=1) stringer 3: (int) 3\n" + - "}\n" - if s != expected { - t.Errorf("Sorted keys mismatch:\n %v %v", s, expected) - } - - s = cfg.Sdump(map[pstringer]int{pstringer("1"): 1, pstringer("3"): 3, pstringer("2"): 2}) - expected = "(map[spew_test.pstringer]int) (len=3) {\n" + - "(spew_test.pstringer) (len=1) stringer 1: (int) 1,\n" + - "(spew_test.pstringer) (len=1) stringer 2: (int) 2,\n" + - "(spew_test.pstringer) (len=1) stringer 3: (int) 3\n" + - "}\n" - if spew.UnsafeDisabled { - expected = "(map[spew_test.pstringer]int) (len=3) {\n" + - "(spew_test.pstringer) (len=1) \"1\": (int) 1,\n" + - "(spew_test.pstringer) (len=1) \"2\": (int) 2,\n" + - "(spew_test.pstringer) (len=1) \"3\": (int) 3\n" + - "}\n" - } - if s != expected { - t.Errorf("Sorted keys mismatch:\n %v %v", s, expected) - } - - s = cfg.Sdump(map[customError]int{customError(1): 1, customError(3): 3, customError(2): 2}) - expected = "(map[spew_test.customError]int) (len=3) {\n" + - "(spew_test.customError) error: 1: (int) 1,\n" + - "(spew_test.customError) error: 2: (int) 2,\n" + - "(spew_test.customError) error: 3: (int) 3\n" + - "}\n" - if s != expected { - t.Errorf("Sorted keys mismatch:\n %v %v", s, expected) - } - -} diff --git a/vendor/github.com/davecgh/go-spew/spew/dumpcgo_test.go b/vendor/github.com/davecgh/go-spew/spew/dumpcgo_test.go deleted file mode 100644 index 6ab18080..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/dumpcgo_test.go +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2013-2016 Dave Collins -// -// Permission to use, copy, modify, and distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -// NOTE: Due to the following build constraints, this file will only be compiled -// when both cgo is supported and "-tags testcgo" is added to the go test -// command line. This means the cgo tests are only added (and hence run) when -// specifially requested. This configuration is used because spew itself -// does not require cgo to run even though it does handle certain cgo types -// specially. Rather than forcing all clients to require cgo and an external -// C compiler just to run the tests, this scheme makes them optional. -// +build cgo,testcgo - -package spew_test - -import ( - "fmt" - - "github.com/davecgh/go-spew/spew/testdata" -) - -func addCgoDumpTests() { - // C char pointer. - v := testdata.GetCgoCharPointer() - nv := testdata.GetCgoNullCharPointer() - pv := &v - vcAddr := fmt.Sprintf("%p", v) - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "*testdata._Ctype_char" - vs := "116" - addDumpTest(v, "("+vt+")("+vcAddr+")("+vs+")\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+"->"+vcAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+"->"+vcAddr+")("+vs+")\n") - addDumpTest(nv, "("+vt+")()\n") - - // C char array. - v2, v2l, v2c := testdata.GetCgoCharArray() - v2Len := fmt.Sprintf("%d", v2l) - v2Cap := fmt.Sprintf("%d", v2c) - v2t := "[6]testdata._Ctype_char" - v2s := "(len=" + v2Len + " cap=" + v2Cap + ") " + - "{\n 00000000 74 65 73 74 32 00 " + - " |test2.|\n}" - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - - // C unsigned char array. - v3, v3l, v3c := testdata.GetCgoUnsignedCharArray() - v3Len := fmt.Sprintf("%d", v3l) - v3Cap := fmt.Sprintf("%d", v3c) - v3t := "[6]testdata._Ctype_unsignedchar" - v3t2 := "[6]testdata._Ctype_uchar" - v3s := "(len=" + v3Len + " cap=" + v3Cap + ") " + - "{\n 00000000 74 65 73 74 33 00 " + - " |test3.|\n}" - addDumpTest(v3, "("+v3t+") "+v3s+"\n", "("+v3t2+") "+v3s+"\n") - - // C signed char array. - v4, v4l, v4c := testdata.GetCgoSignedCharArray() - v4Len := fmt.Sprintf("%d", v4l) - v4Cap := fmt.Sprintf("%d", v4c) - v4t := "[6]testdata._Ctype_schar" - v4t2 := "testdata._Ctype_schar" - v4s := "(len=" + v4Len + " cap=" + v4Cap + ") " + - "{\n (" + v4t2 + ") 116,\n (" + v4t2 + ") 101,\n (" + v4t2 + - ") 115,\n (" + v4t2 + ") 116,\n (" + v4t2 + ") 52,\n (" + v4t2 + - ") 0\n}" - addDumpTest(v4, "("+v4t+") "+v4s+"\n") - - // C uint8_t array. - v5, v5l, v5c := testdata.GetCgoUint8tArray() - v5Len := fmt.Sprintf("%d", v5l) - v5Cap := fmt.Sprintf("%d", v5c) - v5t := "[6]testdata._Ctype_uint8_t" - v5s := "(len=" + v5Len + " cap=" + v5Cap + ") " + - "{\n 00000000 74 65 73 74 35 00 " + - " |test5.|\n}" - addDumpTest(v5, "("+v5t+") "+v5s+"\n") - - // C typedefed unsigned char array. - v6, v6l, v6c := testdata.GetCgoTypdefedUnsignedCharArray() - v6Len := fmt.Sprintf("%d", v6l) - v6Cap := fmt.Sprintf("%d", v6c) - v6t := "[6]testdata._Ctype_custom_uchar_t" - v6s := "(len=" + v6Len + " cap=" + v6Cap + ") " + - "{\n 00000000 74 65 73 74 36 00 " + - " |test6.|\n}" - addDumpTest(v6, "("+v6t+") "+v6s+"\n") -} diff --git a/vendor/github.com/davecgh/go-spew/spew/dumpnocgo_test.go b/vendor/github.com/davecgh/go-spew/spew/dumpnocgo_test.go deleted file mode 100644 index 52a0971f..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/dumpnocgo_test.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2013 Dave Collins -// -// Permission to use, copy, modify, and distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -// NOTE: Due to the following build constraints, this file will only be compiled -// when either cgo is not supported or "-tags testcgo" is not added to the go -// test command line. This file intentionally does not setup any cgo tests in -// this scenario. -// +build !cgo !testcgo - -package spew_test - -func addCgoDumpTests() { - // Don't add any tests for cgo since this file is only compiled when - // there should not be any cgo tests. -} diff --git a/vendor/github.com/davecgh/go-spew/spew/example_test.go b/vendor/github.com/davecgh/go-spew/spew/example_test.go deleted file mode 100644 index c6ec8c6d..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/example_test.go +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * 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. - */ - -package spew_test - -import ( - "fmt" - - "github.com/davecgh/go-spew/spew" -) - -type Flag int - -const ( - flagOne Flag = iota - flagTwo -) - -var flagStrings = map[Flag]string{ - flagOne: "flagOne", - flagTwo: "flagTwo", -} - -func (f Flag) String() string { - if s, ok := flagStrings[f]; ok { - return s - } - return fmt.Sprintf("Unknown flag (%d)", int(f)) -} - -type Bar struct { - data uintptr -} - -type Foo struct { - unexportedField Bar - ExportedField map[interface{}]interface{} -} - -// This example demonstrates how to use Dump to dump variables to stdout. -func ExampleDump() { - // The following package level declarations are assumed for this example: - /* - type Flag int - - const ( - flagOne Flag = iota - flagTwo - ) - - var flagStrings = map[Flag]string{ - flagOne: "flagOne", - flagTwo: "flagTwo", - } - - func (f Flag) String() string { - if s, ok := flagStrings[f]; ok { - return s - } - return fmt.Sprintf("Unknown flag (%d)", int(f)) - } - - type Bar struct { - data uintptr - } - - type Foo struct { - unexportedField Bar - ExportedField map[interface{}]interface{} - } - */ - - // Setup some sample data structures for the example. - bar := Bar{uintptr(0)} - s1 := Foo{bar, map[interface{}]interface{}{"one": true}} - f := Flag(5) - b := []byte{ - 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, - 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, - 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, - 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, - 0x31, 0x32, - } - - // Dump! - spew.Dump(s1, f, b) - - // Output: - // (spew_test.Foo) { - // unexportedField: (spew_test.Bar) { - // data: (uintptr) - // }, - // ExportedField: (map[interface {}]interface {}) (len=1) { - // (string) (len=3) "one": (bool) true - // } - // } - // (spew_test.Flag) Unknown flag (5) - // ([]uint8) (len=34 cap=34) { - // 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... | - // 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0| - // 00000020 31 32 |12| - // } - // -} - -// This example demonstrates how to use Printf to display a variable with a -// format string and inline formatting. -func ExamplePrintf() { - // Create a double pointer to a uint 8. - ui8 := uint8(5) - pui8 := &ui8 - ppui8 := &pui8 - - // Create a circular data type. - type circular struct { - ui8 uint8 - c *circular - } - c := circular{ui8: 1} - c.c = &c - - // Print! - spew.Printf("ppui8: %v\n", ppui8) - spew.Printf("circular: %v\n", c) - - // Output: - // ppui8: <**>5 - // circular: {1 <*>{1 <*>}} -} - -// This example demonstrates how to use a ConfigState. -func ExampleConfigState() { - // Modify the indent level of the ConfigState only. The global - // configuration is not modified. - scs := spew.ConfigState{Indent: "\t"} - - // Output using the ConfigState instance. - v := map[string]int{"one": 1} - scs.Printf("v: %v\n", v) - scs.Dump(v) - - // Output: - // v: map[one:1] - // (map[string]int) (len=1) { - // (string) (len=3) "one": (int) 1 - // } -} - -// This example demonstrates how to use ConfigState.Dump to dump variables to -// stdout -func ExampleConfigState_Dump() { - // See the top-level Dump example for details on the types used in this - // example. - - // Create two ConfigState instances with different indentation. - scs := spew.ConfigState{Indent: "\t"} - scs2 := spew.ConfigState{Indent: " "} - - // Setup some sample data structures for the example. - bar := Bar{uintptr(0)} - s1 := Foo{bar, map[interface{}]interface{}{"one": true}} - - // Dump using the ConfigState instances. - scs.Dump(s1) - scs2.Dump(s1) - - // Output: - // (spew_test.Foo) { - // unexportedField: (spew_test.Bar) { - // data: (uintptr) - // }, - // ExportedField: (map[interface {}]interface {}) (len=1) { - // (string) (len=3) "one": (bool) true - // } - // } - // (spew_test.Foo) { - // unexportedField: (spew_test.Bar) { - // data: (uintptr) - // }, - // ExportedField: (map[interface {}]interface {}) (len=1) { - // (string) (len=3) "one": (bool) true - // } - // } - // -} - -// This example demonstrates how to use ConfigState.Printf to display a variable -// with a format string and inline formatting. -func ExampleConfigState_Printf() { - // See the top-level Dump example for details on the types used in this - // example. - - // Create two ConfigState instances and modify the method handling of the - // first ConfigState only. - scs := spew.NewDefaultConfig() - scs2 := spew.NewDefaultConfig() - scs.DisableMethods = true - - // Alternatively - // scs := spew.ConfigState{Indent: " ", DisableMethods: true} - // scs2 := spew.ConfigState{Indent: " "} - - // This is of type Flag which implements a Stringer and has raw value 1. - f := flagTwo - - // Dump using the ConfigState instances. - scs.Printf("f: %v\n", f) - scs2.Printf("f: %v\n", f) - - // Output: - // f: 1 - // f: flagTwo -} diff --git a/vendor/github.com/davecgh/go-spew/spew/format_test.go b/vendor/github.com/davecgh/go-spew/spew/format_test.go deleted file mode 100644 index f9b93abe..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/format_test.go +++ /dev/null @@ -1,1558 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * 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. - */ - -/* -Test Summary: -NOTE: For each test, a nil pointer, a single pointer and double pointer to the -base test element are also tested to ensure proper indirection across all types. - -- Max int8, int16, int32, int64, int -- Max uint8, uint16, uint32, uint64, uint -- Boolean true and false -- Standard complex64 and complex128 -- Array containing standard ints -- Array containing type with custom formatter on pointer receiver only -- Array containing interfaces -- Slice containing standard float32 values -- Slice containing type with custom formatter on pointer receiver only -- Slice containing interfaces -- Nil slice -- Standard string -- Nil interface -- Sub-interface -- Map with string keys and int vals -- Map with custom formatter type on pointer receiver only keys and vals -- Map with interface keys and values -- Map with nil interface value -- Struct with primitives -- Struct that contains another struct -- Struct that contains custom type with Stringer pointer interface via both - exported and unexported fields -- Struct that contains embedded struct and field to same struct -- Uintptr to 0 (null pointer) -- Uintptr address of real variable -- Unsafe.Pointer to 0 (null pointer) -- Unsafe.Pointer to address of real variable -- Nil channel -- Standard int channel -- Function with no params and no returns -- Function with param and no returns -- Function with multiple params and multiple returns -- Struct that is circular through self referencing -- Structs that are circular through cross referencing -- Structs that are indirectly circular -- Type that panics in its Stringer interface -- Type that has a custom Error interface -- %x passthrough with uint -- %#x passthrough with uint -- %f passthrough with precision -- %f passthrough with width and precision -- %d passthrough with width -- %q passthrough with string -*/ - -package spew_test - -import ( - "bytes" - "fmt" - "testing" - "unsafe" - - "github.com/davecgh/go-spew/spew" -) - -// formatterTest is used to describe a test to be performed against NewFormatter. -type formatterTest struct { - format string - in interface{} - wants []string -} - -// formatterTests houses all of the tests to be performed against NewFormatter. -var formatterTests = make([]formatterTest, 0) - -// addFormatterTest is a helper method to append the passed input and desired -// result to formatterTests. -func addFormatterTest(format string, in interface{}, wants ...string) { - test := formatterTest{format, in, wants} - formatterTests = append(formatterTests, test) -} - -func addIntFormatterTests() { - // Max int8. - v := int8(127) - nv := (*int8)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "int8" - vs := "127" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Max int16. - v2 := int16(32767) - nv2 := (*int16)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "int16" - v2s := "32767" - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%v", nv2, "") - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - - // Max int32. - v3 := int32(2147483647) - nv3 := (*int32)(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "int32" - v3s := "2147483647" - addFormatterTest("%v", v3, v3s) - addFormatterTest("%v", pv3, "<*>"+v3s) - addFormatterTest("%v", &pv3, "<**>"+v3s) - addFormatterTest("%v", nv3, "") - addFormatterTest("%+v", v3, v3s) - addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s) - addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%#v", v3, "("+v3t+")"+v3s) - addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s) - addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s) - addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") - addFormatterTest("%#+v", v3, "("+v3t+")"+v3s) - addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s) - addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s) - addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") - - // Max int64. - v4 := int64(9223372036854775807) - nv4 := (*int64)(nil) - pv4 := &v4 - v4Addr := fmt.Sprintf("%p", pv4) - pv4Addr := fmt.Sprintf("%p", &pv4) - v4t := "int64" - v4s := "9223372036854775807" - addFormatterTest("%v", v4, v4s) - addFormatterTest("%v", pv4, "<*>"+v4s) - addFormatterTest("%v", &pv4, "<**>"+v4s) - addFormatterTest("%v", nv4, "") - addFormatterTest("%+v", v4, v4s) - addFormatterTest("%+v", pv4, "<*>("+v4Addr+")"+v4s) - addFormatterTest("%+v", &pv4, "<**>("+pv4Addr+"->"+v4Addr+")"+v4s) - addFormatterTest("%+v", nv4, "") - addFormatterTest("%#v", v4, "("+v4t+")"+v4s) - addFormatterTest("%#v", pv4, "(*"+v4t+")"+v4s) - addFormatterTest("%#v", &pv4, "(**"+v4t+")"+v4s) - addFormatterTest("%#v", nv4, "(*"+v4t+")"+"") - addFormatterTest("%#+v", v4, "("+v4t+")"+v4s) - addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s) - addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s) - addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"") - - // Max int. - v5 := int(2147483647) - nv5 := (*int)(nil) - pv5 := &v5 - v5Addr := fmt.Sprintf("%p", pv5) - pv5Addr := fmt.Sprintf("%p", &pv5) - v5t := "int" - v5s := "2147483647" - addFormatterTest("%v", v5, v5s) - addFormatterTest("%v", pv5, "<*>"+v5s) - addFormatterTest("%v", &pv5, "<**>"+v5s) - addFormatterTest("%v", nv5, "") - addFormatterTest("%+v", v5, v5s) - addFormatterTest("%+v", pv5, "<*>("+v5Addr+")"+v5s) - addFormatterTest("%+v", &pv5, "<**>("+pv5Addr+"->"+v5Addr+")"+v5s) - addFormatterTest("%+v", nv5, "") - addFormatterTest("%#v", v5, "("+v5t+")"+v5s) - addFormatterTest("%#v", pv5, "(*"+v5t+")"+v5s) - addFormatterTest("%#v", &pv5, "(**"+v5t+")"+v5s) - addFormatterTest("%#v", nv5, "(*"+v5t+")"+"") - addFormatterTest("%#+v", v5, "("+v5t+")"+v5s) - addFormatterTest("%#+v", pv5, "(*"+v5t+")("+v5Addr+")"+v5s) - addFormatterTest("%#+v", &pv5, "(**"+v5t+")("+pv5Addr+"->"+v5Addr+")"+v5s) - addFormatterTest("%#+v", nv5, "(*"+v5t+")"+"") -} - -func addUintFormatterTests() { - // Max uint8. - v := uint8(255) - nv := (*uint8)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "uint8" - vs := "255" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Max uint16. - v2 := uint16(65535) - nv2 := (*uint16)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "uint16" - v2s := "65535" - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%v", nv2, "") - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - - // Max uint32. - v3 := uint32(4294967295) - nv3 := (*uint32)(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "uint32" - v3s := "4294967295" - addFormatterTest("%v", v3, v3s) - addFormatterTest("%v", pv3, "<*>"+v3s) - addFormatterTest("%v", &pv3, "<**>"+v3s) - addFormatterTest("%v", nv3, "") - addFormatterTest("%+v", v3, v3s) - addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s) - addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%#v", v3, "("+v3t+")"+v3s) - addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s) - addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s) - addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") - addFormatterTest("%#+v", v3, "("+v3t+")"+v3s) - addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s) - addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s) - addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") - - // Max uint64. - v4 := uint64(18446744073709551615) - nv4 := (*uint64)(nil) - pv4 := &v4 - v4Addr := fmt.Sprintf("%p", pv4) - pv4Addr := fmt.Sprintf("%p", &pv4) - v4t := "uint64" - v4s := "18446744073709551615" - addFormatterTest("%v", v4, v4s) - addFormatterTest("%v", pv4, "<*>"+v4s) - addFormatterTest("%v", &pv4, "<**>"+v4s) - addFormatterTest("%v", nv4, "") - addFormatterTest("%+v", v4, v4s) - addFormatterTest("%+v", pv4, "<*>("+v4Addr+")"+v4s) - addFormatterTest("%+v", &pv4, "<**>("+pv4Addr+"->"+v4Addr+")"+v4s) - addFormatterTest("%+v", nv4, "") - addFormatterTest("%#v", v4, "("+v4t+")"+v4s) - addFormatterTest("%#v", pv4, "(*"+v4t+")"+v4s) - addFormatterTest("%#v", &pv4, "(**"+v4t+")"+v4s) - addFormatterTest("%#v", nv4, "(*"+v4t+")"+"") - addFormatterTest("%#+v", v4, "("+v4t+")"+v4s) - addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s) - addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s) - addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"") - - // Max uint. - v5 := uint(4294967295) - nv5 := (*uint)(nil) - pv5 := &v5 - v5Addr := fmt.Sprintf("%p", pv5) - pv5Addr := fmt.Sprintf("%p", &pv5) - v5t := "uint" - v5s := "4294967295" - addFormatterTest("%v", v5, v5s) - addFormatterTest("%v", pv5, "<*>"+v5s) - addFormatterTest("%v", &pv5, "<**>"+v5s) - addFormatterTest("%v", nv5, "") - addFormatterTest("%+v", v5, v5s) - addFormatterTest("%+v", pv5, "<*>("+v5Addr+")"+v5s) - addFormatterTest("%+v", &pv5, "<**>("+pv5Addr+"->"+v5Addr+")"+v5s) - addFormatterTest("%+v", nv5, "") - addFormatterTest("%#v", v5, "("+v5t+")"+v5s) - addFormatterTest("%#v", pv5, "(*"+v5t+")"+v5s) - addFormatterTest("%#v", &pv5, "(**"+v5t+")"+v5s) - addFormatterTest("%#v", nv5, "(*"+v5t+")"+"") - addFormatterTest("%#+v", v5, "("+v5t+")"+v5s) - addFormatterTest("%#+v", pv5, "(*"+v5t+")("+v5Addr+")"+v5s) - addFormatterTest("%#+v", &pv5, "(**"+v5t+")("+pv5Addr+"->"+v5Addr+")"+v5s) - addFormatterTest("%#v", nv5, "(*"+v5t+")"+"") -} - -func addBoolFormatterTests() { - // Boolean true. - v := bool(true) - nv := (*bool)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "bool" - vs := "true" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Boolean false. - v2 := bool(false) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "bool" - v2s := "false" - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) -} - -func addFloatFormatterTests() { - // Standard float32. - v := float32(3.1415) - nv := (*float32)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "float32" - vs := "3.1415" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Standard float64. - v2 := float64(3.1415926) - nv2 := (*float64)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "float64" - v2s := "3.1415926" - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") -} - -func addComplexFormatterTests() { - // Standard complex64. - v := complex(float32(6), -2) - nv := (*complex64)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "complex64" - vs := "(6-2i)" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Standard complex128. - v2 := complex(float64(-6), 2) - nv2 := (*complex128)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "complex128" - v2s := "(-6+2i)" - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") -} - -func addArrayFormatterTests() { - // Array containing standard ints. - v := [3]int{1, 2, 3} - nv := (*[3]int)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "[3]int" - vs := "[1 2 3]" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Array containing type with custom formatter on pointer receiver only. - v2 := [3]pstringer{"1", "2", "3"} - nv2 := (*[3]pstringer)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "[3]spew_test.pstringer" - v2sp := "[stringer 1 stringer 2 stringer 3]" - v2s := v2sp - if spew.UnsafeDisabled { - v2s = "[1 2 3]" - } - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2sp) - addFormatterTest("%v", &pv2, "<**>"+v2sp) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2sp) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2sp) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2sp) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2sp) - addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2sp) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2sp) - addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - - // Array containing interfaces. - v3 := [3]interface{}{"one", int(2), uint(3)} - nv3 := (*[3]interface{})(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "[3]interface {}" - v3t2 := "string" - v3t3 := "int" - v3t4 := "uint" - v3s := "[one 2 3]" - v3s2 := "[(" + v3t2 + ")one (" + v3t3 + ")2 (" + v3t4 + ")3]" - addFormatterTest("%v", v3, v3s) - addFormatterTest("%v", pv3, "<*>"+v3s) - addFormatterTest("%v", &pv3, "<**>"+v3s) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%+v", v3, v3s) - addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s) - addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%#v", v3, "("+v3t+")"+v3s2) - addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s2) - addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s2) - addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") - addFormatterTest("%#+v", v3, "("+v3t+")"+v3s2) - addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s2) - addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s2) - addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"") -} - -func addSliceFormatterTests() { - // Slice containing standard float32 values. - v := []float32{3.14, 6.28, 12.56} - nv := (*[]float32)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "[]float32" - vs := "[3.14 6.28 12.56]" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Slice containing type with custom formatter on pointer receiver only. - v2 := []pstringer{"1", "2", "3"} - nv2 := (*[]pstringer)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "[]spew_test.pstringer" - v2s := "[stringer 1 stringer 2 stringer 3]" - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - - // Slice containing interfaces. - v3 := []interface{}{"one", int(2), uint(3), nil} - nv3 := (*[]interface{})(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "[]interface {}" - v3t2 := "string" - v3t3 := "int" - v3t4 := "uint" - v3t5 := "interface {}" - v3s := "[one 2 3 ]" - v3s2 := "[(" + v3t2 + ")one (" + v3t3 + ")2 (" + v3t4 + ")3 (" + v3t5 + - ")]" - addFormatterTest("%v", v3, v3s) - addFormatterTest("%v", pv3, "<*>"+v3s) - addFormatterTest("%v", &pv3, "<**>"+v3s) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%+v", v3, v3s) - addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s) - addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%#v", v3, "("+v3t+")"+v3s2) - addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s2) - addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s2) - addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") - addFormatterTest("%#+v", v3, "("+v3t+")"+v3s2) - addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s2) - addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s2) - addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"") - - // Nil slice. - var v4 []int - nv4 := (*[]int)(nil) - pv4 := &v4 - v4Addr := fmt.Sprintf("%p", pv4) - pv4Addr := fmt.Sprintf("%p", &pv4) - v4t := "[]int" - v4s := "" - addFormatterTest("%v", v4, v4s) - addFormatterTest("%v", pv4, "<*>"+v4s) - addFormatterTest("%v", &pv4, "<**>"+v4s) - addFormatterTest("%+v", nv4, "") - addFormatterTest("%+v", v4, v4s) - addFormatterTest("%+v", pv4, "<*>("+v4Addr+")"+v4s) - addFormatterTest("%+v", &pv4, "<**>("+pv4Addr+"->"+v4Addr+")"+v4s) - addFormatterTest("%+v", nv4, "") - addFormatterTest("%#v", v4, "("+v4t+")"+v4s) - addFormatterTest("%#v", pv4, "(*"+v4t+")"+v4s) - addFormatterTest("%#v", &pv4, "(**"+v4t+")"+v4s) - addFormatterTest("%#v", nv4, "(*"+v4t+")"+"") - addFormatterTest("%#+v", v4, "("+v4t+")"+v4s) - addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s) - addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s) - addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"") -} - -func addStringFormatterTests() { - // Standard string. - v := "test" - nv := (*string)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "string" - vs := "test" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") -} - -func addInterfaceFormatterTests() { - // Nil interface. - var v interface{} - nv := (*interface{})(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "interface {}" - vs := "" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Sub-interface. - v2 := interface{}(uint16(65535)) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "uint16" - v2s := "65535" - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) -} - -func addMapFormatterTests() { - // Map with string keys and int vals. - v := map[string]int{"one": 1, "two": 2} - nilMap := map[string]int(nil) - nv := (*map[string]int)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "map[string]int" - vs := "map[one:1 two:2]" - vs2 := "map[two:2 one:1]" - addFormatterTest("%v", v, vs, vs2) - addFormatterTest("%v", pv, "<*>"+vs, "<*>"+vs2) - addFormatterTest("%v", &pv, "<**>"+vs, "<**>"+vs2) - addFormatterTest("%+v", nilMap, "") - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs, vs2) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs, "<*>("+vAddr+")"+vs2) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs, - "<**>("+pvAddr+"->"+vAddr+")"+vs2) - addFormatterTest("%+v", nilMap, "") - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs, "("+vt+")"+vs2) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs, "(*"+vt+")"+vs2) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs, "(**"+vt+")"+vs2) - addFormatterTest("%#v", nilMap, "("+vt+")"+"") - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs, "("+vt+")"+vs2) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs, - "(*"+vt+")("+vAddr+")"+vs2) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs, - "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs2) - addFormatterTest("%#+v", nilMap, "("+vt+")"+"") - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Map with custom formatter type on pointer receiver only keys and vals. - v2 := map[pstringer]pstringer{"one": "1"} - nv2 := (*map[pstringer]pstringer)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "map[spew_test.pstringer]spew_test.pstringer" - v2s := "map[stringer one:stringer 1]" - if spew.UnsafeDisabled { - v2s = "map[one:1]" - } - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - - // Map with interface keys and values. - v3 := map[interface{}]interface{}{"one": 1} - nv3 := (*map[interface{}]interface{})(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "map[interface {}]interface {}" - v3t1 := "string" - v3t2 := "int" - v3s := "map[one:1]" - v3s2 := "map[(" + v3t1 + ")one:(" + v3t2 + ")1]" - addFormatterTest("%v", v3, v3s) - addFormatterTest("%v", pv3, "<*>"+v3s) - addFormatterTest("%v", &pv3, "<**>"+v3s) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%+v", v3, v3s) - addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s) - addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%#v", v3, "("+v3t+")"+v3s2) - addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s2) - addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s2) - addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") - addFormatterTest("%#+v", v3, "("+v3t+")"+v3s2) - addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s2) - addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s2) - addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"") - - // Map with nil interface value - v4 := map[string]interface{}{"nil": nil} - nv4 := (*map[string]interface{})(nil) - pv4 := &v4 - v4Addr := fmt.Sprintf("%p", pv4) - pv4Addr := fmt.Sprintf("%p", &pv4) - v4t := "map[string]interface {}" - v4t1 := "interface {}" - v4s := "map[nil:]" - v4s2 := "map[nil:(" + v4t1 + ")]" - addFormatterTest("%v", v4, v4s) - addFormatterTest("%v", pv4, "<*>"+v4s) - addFormatterTest("%v", &pv4, "<**>"+v4s) - addFormatterTest("%+v", nv4, "") - addFormatterTest("%+v", v4, v4s) - addFormatterTest("%+v", pv4, "<*>("+v4Addr+")"+v4s) - addFormatterTest("%+v", &pv4, "<**>("+pv4Addr+"->"+v4Addr+")"+v4s) - addFormatterTest("%+v", nv4, "") - addFormatterTest("%#v", v4, "("+v4t+")"+v4s2) - addFormatterTest("%#v", pv4, "(*"+v4t+")"+v4s2) - addFormatterTest("%#v", &pv4, "(**"+v4t+")"+v4s2) - addFormatterTest("%#v", nv4, "(*"+v4t+")"+"") - addFormatterTest("%#+v", v4, "("+v4t+")"+v4s2) - addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s2) - addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s2) - addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"") -} - -func addStructFormatterTests() { - // Struct with primitives. - type s1 struct { - a int8 - b uint8 - } - v := s1{127, 255} - nv := (*s1)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "spew_test.s1" - vt2 := "int8" - vt3 := "uint8" - vs := "{127 255}" - vs2 := "{a:127 b:255}" - vs3 := "{a:(" + vt2 + ")127 b:(" + vt3 + ")255}" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs2) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs2) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs2) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs3) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs3) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs3) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs3) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs3) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs3) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Struct that contains another struct. - type s2 struct { - s1 s1 - b bool - } - v2 := s2{s1{127, 255}, true} - nv2 := (*s2)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "spew_test.s2" - v2t2 := "spew_test.s1" - v2t3 := "int8" - v2t4 := "uint8" - v2t5 := "bool" - v2s := "{{127 255} true}" - v2s2 := "{s1:{a:127 b:255} b:true}" - v2s3 := "{s1:(" + v2t2 + "){a:(" + v2t3 + ")127 b:(" + v2t4 + ")255} b:(" + - v2t5 + ")true}" - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%+v", v2, v2s2) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s2) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s2) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%#v", v2, "("+v2t+")"+v2s3) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s3) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s3) - addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s3) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s3) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s3) - addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - - // Struct that contains custom type with Stringer pointer interface via both - // exported and unexported fields. - type s3 struct { - s pstringer - S pstringer - } - v3 := s3{"test", "test2"} - nv3 := (*s3)(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "spew_test.s3" - v3t2 := "spew_test.pstringer" - v3s := "{stringer test stringer test2}" - v3sp := v3s - v3s2 := "{s:stringer test S:stringer test2}" - v3s2p := v3s2 - v3s3 := "{s:(" + v3t2 + ")stringer test S:(" + v3t2 + ")stringer test2}" - v3s3p := v3s3 - if spew.UnsafeDisabled { - v3s = "{test test2}" - v3sp = "{test stringer test2}" - v3s2 = "{s:test S:test2}" - v3s2p = "{s:test S:stringer test2}" - v3s3 = "{s:(" + v3t2 + ")test S:(" + v3t2 + ")test2}" - v3s3p = "{s:(" + v3t2 + ")test S:(" + v3t2 + ")stringer test2}" - } - addFormatterTest("%v", v3, v3s) - addFormatterTest("%v", pv3, "<*>"+v3sp) - addFormatterTest("%v", &pv3, "<**>"+v3sp) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%+v", v3, v3s2) - addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s2p) - addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s2p) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%#v", v3, "("+v3t+")"+v3s3) - addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s3p) - addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s3p) - addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") - addFormatterTest("%#+v", v3, "("+v3t+")"+v3s3) - addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s3p) - addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s3p) - addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"") - - // Struct that contains embedded struct and field to same struct. - e := embed{"embedstr"} - v4 := embedwrap{embed: &e, e: &e} - nv4 := (*embedwrap)(nil) - pv4 := &v4 - eAddr := fmt.Sprintf("%p", &e) - v4Addr := fmt.Sprintf("%p", pv4) - pv4Addr := fmt.Sprintf("%p", &pv4) - v4t := "spew_test.embedwrap" - v4t2 := "spew_test.embed" - v4t3 := "string" - v4s := "{<*>{embedstr} <*>{embedstr}}" - v4s2 := "{embed:<*>(" + eAddr + "){a:embedstr} e:<*>(" + eAddr + - "){a:embedstr}}" - v4s3 := "{embed:(*" + v4t2 + "){a:(" + v4t3 + ")embedstr} e:(*" + v4t2 + - "){a:(" + v4t3 + ")embedstr}}" - v4s4 := "{embed:(*" + v4t2 + ")(" + eAddr + "){a:(" + v4t3 + - ")embedstr} e:(*" + v4t2 + ")(" + eAddr + "){a:(" + v4t3 + ")embedstr}}" - addFormatterTest("%v", v4, v4s) - addFormatterTest("%v", pv4, "<*>"+v4s) - addFormatterTest("%v", &pv4, "<**>"+v4s) - addFormatterTest("%+v", nv4, "") - addFormatterTest("%+v", v4, v4s2) - addFormatterTest("%+v", pv4, "<*>("+v4Addr+")"+v4s2) - addFormatterTest("%+v", &pv4, "<**>("+pv4Addr+"->"+v4Addr+")"+v4s2) - addFormatterTest("%+v", nv4, "") - addFormatterTest("%#v", v4, "("+v4t+")"+v4s3) - addFormatterTest("%#v", pv4, "(*"+v4t+")"+v4s3) - addFormatterTest("%#v", &pv4, "(**"+v4t+")"+v4s3) - addFormatterTest("%#v", nv4, "(*"+v4t+")"+"") - addFormatterTest("%#+v", v4, "("+v4t+")"+v4s4) - addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s4) - addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s4) - addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"") -} - -func addUintptrFormatterTests() { - // Null pointer. - v := uintptr(0) - nv := (*uintptr)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "uintptr" - vs := "" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Address of real variable. - i := 1 - v2 := uintptr(unsafe.Pointer(&i)) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "uintptr" - v2s := fmt.Sprintf("%p", &i) - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) -} - -func addUnsafePointerFormatterTests() { - // Null pointer. - v := unsafe.Pointer(uintptr(0)) - nv := (*unsafe.Pointer)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "unsafe.Pointer" - vs := "" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Address of real variable. - i := 1 - v2 := unsafe.Pointer(&i) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "unsafe.Pointer" - v2s := fmt.Sprintf("%p", &i) - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) -} - -func addChanFormatterTests() { - // Nil channel. - var v chan int - pv := &v - nv := (*chan int)(nil) - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "chan int" - vs := "" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Real channel. - v2 := make(chan int) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "chan int" - v2s := fmt.Sprintf("%p", v2) - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) -} - -func addFuncFormatterTests() { - // Function with no params and no returns. - v := addIntFormatterTests - nv := (*func())(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "func()" - vs := fmt.Sprintf("%p", v) - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Function with param and no returns. - v2 := TestFormatter - nv2 := (*func(*testing.T))(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "func(*testing.T)" - v2s := fmt.Sprintf("%p", v2) - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - - // Function with multiple params and multiple returns. - var v3 = func(i int, s string) (b bool, err error) { - return true, nil - } - nv3 := (*func(int, string) (bool, error))(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "func(int, string) (bool, error)" - v3s := fmt.Sprintf("%p", v3) - addFormatterTest("%v", v3, v3s) - addFormatterTest("%v", pv3, "<*>"+v3s) - addFormatterTest("%v", &pv3, "<**>"+v3s) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%+v", v3, v3s) - addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s) - addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%#v", v3, "("+v3t+")"+v3s) - addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s) - addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s) - addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") - addFormatterTest("%#+v", v3, "("+v3t+")"+v3s) - addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s) - addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s) - addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"") -} - -func addCircularFormatterTests() { - // Struct that is circular through self referencing. - type circular struct { - c *circular - } - v := circular{nil} - v.c = &v - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "spew_test.circular" - vs := "{<*>{<*>}}" - vs2 := "{<*>}" - vs3 := "{c:<*>(" + vAddr + "){c:<*>(" + vAddr + ")}}" - vs4 := "{c:<*>(" + vAddr + ")}" - vs5 := "{c:(*" + vt + "){c:(*" + vt + ")}}" - vs6 := "{c:(*" + vt + ")}" - vs7 := "{c:(*" + vt + ")(" + vAddr + "){c:(*" + vt + ")(" + vAddr + - ")}}" - vs8 := "{c:(*" + vt + ")(" + vAddr + ")}" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs2) - addFormatterTest("%v", &pv, "<**>"+vs2) - addFormatterTest("%+v", v, vs3) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs4) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs4) - addFormatterTest("%#v", v, "("+vt+")"+vs5) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs6) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs6) - addFormatterTest("%#+v", v, "("+vt+")"+vs7) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs8) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs8) - - // Structs that are circular through cross referencing. - v2 := xref1{nil} - ts2 := xref2{&v2} - v2.ps2 = &ts2 - pv2 := &v2 - ts2Addr := fmt.Sprintf("%p", &ts2) - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "spew_test.xref1" - v2t2 := "spew_test.xref2" - v2s := "{<*>{<*>{<*>}}}" - v2s2 := "{<*>{<*>}}" - v2s3 := "{ps2:<*>(" + ts2Addr + "){ps1:<*>(" + v2Addr + "){ps2:<*>(" + - ts2Addr + ")}}}" - v2s4 := "{ps2:<*>(" + ts2Addr + "){ps1:<*>(" + v2Addr + ")}}" - v2s5 := "{ps2:(*" + v2t2 + "){ps1:(*" + v2t + "){ps2:(*" + v2t2 + - ")}}}" - v2s6 := "{ps2:(*" + v2t2 + "){ps1:(*" + v2t + ")}}" - v2s7 := "{ps2:(*" + v2t2 + ")(" + ts2Addr + "){ps1:(*" + v2t + - ")(" + v2Addr + "){ps2:(*" + v2t2 + ")(" + ts2Addr + - ")}}}" - v2s8 := "{ps2:(*" + v2t2 + ")(" + ts2Addr + "){ps1:(*" + v2t + - ")(" + v2Addr + ")}}" - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s2) - addFormatterTest("%v", &pv2, "<**>"+v2s2) - addFormatterTest("%+v", v2, v2s3) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s4) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s4) - addFormatterTest("%#v", v2, "("+v2t+")"+v2s5) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s6) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s6) - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s7) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s8) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s8) - - // Structs that are indirectly circular. - v3 := indirCir1{nil} - tic2 := indirCir2{nil} - tic3 := indirCir3{&v3} - tic2.ps3 = &tic3 - v3.ps2 = &tic2 - pv3 := &v3 - tic2Addr := fmt.Sprintf("%p", &tic2) - tic3Addr := fmt.Sprintf("%p", &tic3) - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "spew_test.indirCir1" - v3t2 := "spew_test.indirCir2" - v3t3 := "spew_test.indirCir3" - v3s := "{<*>{<*>{<*>{<*>}}}}" - v3s2 := "{<*>{<*>{<*>}}}" - v3s3 := "{ps2:<*>(" + tic2Addr + "){ps3:<*>(" + tic3Addr + "){ps1:<*>(" + - v3Addr + "){ps2:<*>(" + tic2Addr + ")}}}}" - v3s4 := "{ps2:<*>(" + tic2Addr + "){ps3:<*>(" + tic3Addr + "){ps1:<*>(" + - v3Addr + ")}}}" - v3s5 := "{ps2:(*" + v3t2 + "){ps3:(*" + v3t3 + "){ps1:(*" + v3t + - "){ps2:(*" + v3t2 + ")}}}}" - v3s6 := "{ps2:(*" + v3t2 + "){ps3:(*" + v3t3 + "){ps1:(*" + v3t + - ")}}}" - v3s7 := "{ps2:(*" + v3t2 + ")(" + tic2Addr + "){ps3:(*" + v3t3 + ")(" + - tic3Addr + "){ps1:(*" + v3t + ")(" + v3Addr + "){ps2:(*" + v3t2 + - ")(" + tic2Addr + ")}}}}" - v3s8 := "{ps2:(*" + v3t2 + ")(" + tic2Addr + "){ps3:(*" + v3t3 + ")(" + - tic3Addr + "){ps1:(*" + v3t + ")(" + v3Addr + ")}}}" - addFormatterTest("%v", v3, v3s) - addFormatterTest("%v", pv3, "<*>"+v3s2) - addFormatterTest("%v", &pv3, "<**>"+v3s2) - addFormatterTest("%+v", v3, v3s3) - addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s4) - addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s4) - addFormatterTest("%#v", v3, "("+v3t+")"+v3s5) - addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s6) - addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s6) - addFormatterTest("%#+v", v3, "("+v3t+")"+v3s7) - addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s8) - addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s8) -} - -func addPanicFormatterTests() { - // Type that panics in its Stringer interface. - v := panicer(127) - nv := (*panicer)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "spew_test.panicer" - vs := "(PANIC=test panic)127" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") -} - -func addErrorFormatterTests() { - // Type that has a custom Error interface. - v := customError(127) - nv := (*customError)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "spew_test.customError" - vs := "error: 127" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") -} - -func addPassthroughFormatterTests() { - // %x passthrough with uint. - v := uint(4294967295) - pv := &v - vAddr := fmt.Sprintf("%x", pv) - pvAddr := fmt.Sprintf("%x", &pv) - vs := "ffffffff" - addFormatterTest("%x", v, vs) - addFormatterTest("%x", pv, vAddr) - addFormatterTest("%x", &pv, pvAddr) - - // %#x passthrough with uint. - v2 := int(2147483647) - pv2 := &v2 - v2Addr := fmt.Sprintf("%#x", pv2) - pv2Addr := fmt.Sprintf("%#x", &pv2) - v2s := "0x7fffffff" - addFormatterTest("%#x", v2, v2s) - addFormatterTest("%#x", pv2, v2Addr) - addFormatterTest("%#x", &pv2, pv2Addr) - - // %f passthrough with precision. - addFormatterTest("%.2f", 3.1415, "3.14") - addFormatterTest("%.3f", 3.1415, "3.142") - addFormatterTest("%.4f", 3.1415, "3.1415") - - // %f passthrough with width and precision. - addFormatterTest("%5.2f", 3.1415, " 3.14") - addFormatterTest("%6.3f", 3.1415, " 3.142") - addFormatterTest("%7.4f", 3.1415, " 3.1415") - - // %d passthrough with width. - addFormatterTest("%3d", 127, "127") - addFormatterTest("%4d", 127, " 127") - addFormatterTest("%5d", 127, " 127") - - // %q passthrough with string. - addFormatterTest("%q", "test", "\"test\"") -} - -// TestFormatter executes all of the tests described by formatterTests. -func TestFormatter(t *testing.T) { - // Setup tests. - addIntFormatterTests() - addUintFormatterTests() - addBoolFormatterTests() - addFloatFormatterTests() - addComplexFormatterTests() - addArrayFormatterTests() - addSliceFormatterTests() - addStringFormatterTests() - addInterfaceFormatterTests() - addMapFormatterTests() - addStructFormatterTests() - addUintptrFormatterTests() - addUnsafePointerFormatterTests() - addChanFormatterTests() - addFuncFormatterTests() - addCircularFormatterTests() - addPanicFormatterTests() - addErrorFormatterTests() - addPassthroughFormatterTests() - - t.Logf("Running %d tests", len(formatterTests)) - for i, test := range formatterTests { - buf := new(bytes.Buffer) - spew.Fprintf(buf, test.format, test.in) - s := buf.String() - if testFailed(s, test.wants) { - t.Errorf("Formatter #%d format: %s got: %s %s", i, test.format, s, - stringizeWants(test.wants)) - continue - } - } -} - -type testStruct struct { - x int -} - -func (ts testStruct) String() string { - return fmt.Sprintf("ts.%d", ts.x) -} - -type testStructP struct { - x int -} - -func (ts *testStructP) String() string { - return fmt.Sprintf("ts.%d", ts.x) -} - -func TestPrintSortedKeys(t *testing.T) { - cfg := spew.ConfigState{SortKeys: true} - s := cfg.Sprint(map[int]string{1: "1", 3: "3", 2: "2"}) - expected := "map[1:1 2:2 3:3]" - if s != expected { - t.Errorf("Sorted keys mismatch 1:\n %v %v", s, expected) - } - - s = cfg.Sprint(map[stringer]int{"1": 1, "3": 3, "2": 2}) - expected = "map[stringer 1:1 stringer 2:2 stringer 3:3]" - if s != expected { - t.Errorf("Sorted keys mismatch 2:\n %v %v", s, expected) - } - - s = cfg.Sprint(map[pstringer]int{pstringer("1"): 1, pstringer("3"): 3, pstringer("2"): 2}) - expected = "map[stringer 1:1 stringer 2:2 stringer 3:3]" - if spew.UnsafeDisabled { - expected = "map[1:1 2:2 3:3]" - } - if s != expected { - t.Errorf("Sorted keys mismatch 3:\n %v %v", s, expected) - } - - s = cfg.Sprint(map[testStruct]int{testStruct{1}: 1, testStruct{3}: 3, testStruct{2}: 2}) - expected = "map[ts.1:1 ts.2:2 ts.3:3]" - if s != expected { - t.Errorf("Sorted keys mismatch 4:\n %v %v", s, expected) - } - - if !spew.UnsafeDisabled { - s = cfg.Sprint(map[testStructP]int{testStructP{1}: 1, testStructP{3}: 3, testStructP{2}: 2}) - expected = "map[ts.1:1 ts.2:2 ts.3:3]" - if s != expected { - t.Errorf("Sorted keys mismatch 5:\n %v %v", s, expected) - } - } - - s = cfg.Sprint(map[customError]int{customError(1): 1, customError(3): 3, customError(2): 2}) - expected = "map[error: 1:1 error: 2:2 error: 3:3]" - if s != expected { - t.Errorf("Sorted keys mismatch 6:\n %v %v", s, expected) - } -} diff --git a/vendor/github.com/davecgh/go-spew/spew/internal_test.go b/vendor/github.com/davecgh/go-spew/spew/internal_test.go deleted file mode 100644 index 20a9cfef..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/internal_test.go +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * 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. - */ - -/* -This test file is part of the spew package rather than than the spew_test -package because it needs access to internals to properly test certain cases -which are not possible via the public interface since they should never happen. -*/ - -package spew - -import ( - "bytes" - "reflect" - "testing" -) - -// dummyFmtState implements a fake fmt.State to use for testing invalid -// reflect.Value handling. This is necessary because the fmt package catches -// invalid values before invoking the formatter on them. -type dummyFmtState struct { - bytes.Buffer -} - -func (dfs *dummyFmtState) Flag(f int) bool { - if f == int('+') { - return true - } - return false -} - -func (dfs *dummyFmtState) Precision() (int, bool) { - return 0, false -} - -func (dfs *dummyFmtState) Width() (int, bool) { - return 0, false -} - -// TestInvalidReflectValue ensures the dump and formatter code handles an -// invalid reflect value properly. This needs access to internal state since it -// should never happen in real code and therefore can't be tested via the public -// API. -func TestInvalidReflectValue(t *testing.T) { - i := 1 - - // Dump invalid reflect value. - v := new(reflect.Value) - buf := new(bytes.Buffer) - d := dumpState{w: buf, cs: &Config} - d.dump(*v) - s := buf.String() - want := "" - if s != want { - t.Errorf("InvalidReflectValue #%d\n got: %s want: %s", i, s, want) - } - i++ - - // Formatter invalid reflect value. - buf2 := new(dummyFmtState) - f := formatState{value: *v, cs: &Config, fs: buf2} - f.format(*v) - s = buf2.String() - want = "" - if s != want { - t.Errorf("InvalidReflectValue #%d got: %s want: %s", i, s, want) - } -} - -// SortValues makes the internal sortValues function available to the test -// package. -func SortValues(values []reflect.Value, cs *ConfigState) { - sortValues(values, cs) -} diff --git a/vendor/github.com/davecgh/go-spew/spew/internalunsafe_test.go b/vendor/github.com/davecgh/go-spew/spew/internalunsafe_test.go deleted file mode 100644 index a0c612ec..00000000 --- a/vendor/github.com/davecgh/go-spew/spew/internalunsafe_test.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) 2013-2016 Dave Collins - -// Permission to use, copy, modify, and distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. - -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -// NOTE: Due to the following build constraints, this file will only be compiled -// when the code is not running on Google App Engine, compiled by GopherJS, and -// "-tags safe" is not added to the go build command line. The "disableunsafe" -// tag is deprecated and thus should not be used. -// +build !js,!appengine,!safe,!disableunsafe - -/* -This test file is part of the spew package rather than than the spew_test -package because it needs access to internals to properly test certain cases -which are not possible via the public interface since they should never happen. -*/ - -package spew - -import ( - "bytes" - "reflect" - "testing" - "unsafe" -) - -// changeKind uses unsafe to intentionally change the kind of a reflect.Value to -// the maximum kind value which does not exist. This is needed to test the -// fallback code which punts to the standard fmt library for new types that -// might get added to the language. -func changeKind(v *reflect.Value, readOnly bool) { - rvf := (*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(v)) + offsetFlag)) - *rvf = *rvf | ((1< - * - * 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. - */ - -package spew_test - -import ( - "bytes" - "fmt" - "io/ioutil" - "os" - "testing" - - "github.com/davecgh/go-spew/spew" -) - -// spewFunc is used to identify which public function of the spew package or -// ConfigState a test applies to. -type spewFunc int - -const ( - fCSFdump spewFunc = iota - fCSFprint - fCSFprintf - fCSFprintln - fCSPrint - fCSPrintln - fCSSdump - fCSSprint - fCSSprintf - fCSSprintln - fCSErrorf - fCSNewFormatter - fErrorf - fFprint - fFprintln - fPrint - fPrintln - fSdump - fSprint - fSprintf - fSprintln -) - -// Map of spewFunc values to names for pretty printing. -var spewFuncStrings = map[spewFunc]string{ - fCSFdump: "ConfigState.Fdump", - fCSFprint: "ConfigState.Fprint", - fCSFprintf: "ConfigState.Fprintf", - fCSFprintln: "ConfigState.Fprintln", - fCSSdump: "ConfigState.Sdump", - fCSPrint: "ConfigState.Print", - fCSPrintln: "ConfigState.Println", - fCSSprint: "ConfigState.Sprint", - fCSSprintf: "ConfigState.Sprintf", - fCSSprintln: "ConfigState.Sprintln", - fCSErrorf: "ConfigState.Errorf", - fCSNewFormatter: "ConfigState.NewFormatter", - fErrorf: "spew.Errorf", - fFprint: "spew.Fprint", - fFprintln: "spew.Fprintln", - fPrint: "spew.Print", - fPrintln: "spew.Println", - fSdump: "spew.Sdump", - fSprint: "spew.Sprint", - fSprintf: "spew.Sprintf", - fSprintln: "spew.Sprintln", -} - -func (f spewFunc) String() string { - if s, ok := spewFuncStrings[f]; ok { - return s - } - return fmt.Sprintf("Unknown spewFunc (%d)", int(f)) -} - -// spewTest is used to describe a test to be performed against the public -// functions of the spew package or ConfigState. -type spewTest struct { - cs *spew.ConfigState - f spewFunc - format string - in interface{} - want string -} - -// spewTests houses the tests to be performed against the public functions of -// the spew package and ConfigState. -// -// These tests are only intended to ensure the public functions are exercised -// and are intentionally not exhaustive of types. The exhaustive type -// tests are handled in the dump and format tests. -var spewTests []spewTest - -// redirStdout is a helper function to return the standard output from f as a -// byte slice. -func redirStdout(f func()) ([]byte, error) { - tempFile, err := ioutil.TempFile("", "ss-test") - if err != nil { - return nil, err - } - fileName := tempFile.Name() - defer os.Remove(fileName) // Ignore error - - origStdout := os.Stdout - os.Stdout = tempFile - f() - os.Stdout = origStdout - tempFile.Close() - - return ioutil.ReadFile(fileName) -} - -func initSpewTests() { - // Config states with various settings. - scsDefault := spew.NewDefaultConfig() - scsNoMethods := &spew.ConfigState{Indent: " ", DisableMethods: true} - scsNoPmethods := &spew.ConfigState{Indent: " ", DisablePointerMethods: true} - scsMaxDepth := &spew.ConfigState{Indent: " ", MaxDepth: 1} - scsContinue := &spew.ConfigState{Indent: " ", ContinueOnMethod: true} - scsNoPtrAddr := &spew.ConfigState{DisablePointerAddresses: true} - scsNoCap := &spew.ConfigState{DisableCapacities: true} - - // Variables for tests on types which implement Stringer interface with and - // without a pointer receiver. - ts := stringer("test") - tps := pstringer("test") - - type ptrTester struct { - s *struct{} - } - tptr := &ptrTester{s: &struct{}{}} - - // depthTester is used to test max depth handling for structs, array, slices - // and maps. - type depthTester struct { - ic indirCir1 - arr [1]string - slice []string - m map[string]int - } - dt := depthTester{indirCir1{nil}, [1]string{"arr"}, []string{"slice"}, - map[string]int{"one": 1}} - - // Variable for tests on types which implement error interface. - te := customError(10) - - spewTests = []spewTest{ - {scsDefault, fCSFdump, "", int8(127), "(int8) 127\n"}, - {scsDefault, fCSFprint, "", int16(32767), "32767"}, - {scsDefault, fCSFprintf, "%v", int32(2147483647), "2147483647"}, - {scsDefault, fCSFprintln, "", int(2147483647), "2147483647\n"}, - {scsDefault, fCSPrint, "", int64(9223372036854775807), "9223372036854775807"}, - {scsDefault, fCSPrintln, "", uint8(255), "255\n"}, - {scsDefault, fCSSdump, "", uint8(64), "(uint8) 64\n"}, - {scsDefault, fCSSprint, "", complex(1, 2), "(1+2i)"}, - {scsDefault, fCSSprintf, "%v", complex(float32(3), 4), "(3+4i)"}, - {scsDefault, fCSSprintln, "", complex(float64(5), 6), "(5+6i)\n"}, - {scsDefault, fCSErrorf, "%#v", uint16(65535), "(uint16)65535"}, - {scsDefault, fCSNewFormatter, "%v", uint32(4294967295), "4294967295"}, - {scsDefault, fErrorf, "%v", uint64(18446744073709551615), "18446744073709551615"}, - {scsDefault, fFprint, "", float32(3.14), "3.14"}, - {scsDefault, fFprintln, "", float64(6.28), "6.28\n"}, - {scsDefault, fPrint, "", true, "true"}, - {scsDefault, fPrintln, "", false, "false\n"}, - {scsDefault, fSdump, "", complex(-10, -20), "(complex128) (-10-20i)\n"}, - {scsDefault, fSprint, "", complex(-1, -2), "(-1-2i)"}, - {scsDefault, fSprintf, "%v", complex(float32(-3), -4), "(-3-4i)"}, - {scsDefault, fSprintln, "", complex(float64(-5), -6), "(-5-6i)\n"}, - {scsNoMethods, fCSFprint, "", ts, "test"}, - {scsNoMethods, fCSFprint, "", &ts, "<*>test"}, - {scsNoMethods, fCSFprint, "", tps, "test"}, - {scsNoMethods, fCSFprint, "", &tps, "<*>test"}, - {scsNoPmethods, fCSFprint, "", ts, "stringer test"}, - {scsNoPmethods, fCSFprint, "", &ts, "<*>stringer test"}, - {scsNoPmethods, fCSFprint, "", tps, "test"}, - {scsNoPmethods, fCSFprint, "", &tps, "<*>stringer test"}, - {scsMaxDepth, fCSFprint, "", dt, "{{} [] [] map[]}"}, - {scsMaxDepth, fCSFdump, "", dt, "(spew_test.depthTester) {\n" + - " ic: (spew_test.indirCir1) {\n \n },\n" + - " arr: ([1]string) (len=1 cap=1) {\n \n },\n" + - " slice: ([]string) (len=1 cap=1) {\n \n },\n" + - " m: (map[string]int) (len=1) {\n \n }\n}\n"}, - {scsContinue, fCSFprint, "", ts, "(stringer test) test"}, - {scsContinue, fCSFdump, "", ts, "(spew_test.stringer) " + - "(len=4) (stringer test) \"test\"\n"}, - {scsContinue, fCSFprint, "", te, "(error: 10) 10"}, - {scsContinue, fCSFdump, "", te, "(spew_test.customError) " + - "(error: 10) 10\n"}, - {scsNoPtrAddr, fCSFprint, "", tptr, "<*>{<*>{}}"}, - {scsNoPtrAddr, fCSSdump, "", tptr, "(*spew_test.ptrTester)({\ns: (*struct {})({\n})\n})\n"}, - {scsNoCap, fCSSdump, "", make([]string, 0, 10), "([]string) {\n}\n"}, - {scsNoCap, fCSSdump, "", make([]string, 1, 10), "([]string) (len=1) {\n(string) \"\"\n}\n"}, - } -} - -// TestSpew executes all of the tests described by spewTests. -func TestSpew(t *testing.T) { - initSpewTests() - - t.Logf("Running %d tests", len(spewTests)) - for i, test := range spewTests { - buf := new(bytes.Buffer) - switch test.f { - case fCSFdump: - test.cs.Fdump(buf, test.in) - - case fCSFprint: - test.cs.Fprint(buf, test.in) - - case fCSFprintf: - test.cs.Fprintf(buf, test.format, test.in) - - case fCSFprintln: - test.cs.Fprintln(buf, test.in) - - case fCSPrint: - b, err := redirStdout(func() { test.cs.Print(test.in) }) - if err != nil { - t.Errorf("%v #%d %v", test.f, i, err) - continue - } - buf.Write(b) - - case fCSPrintln: - b, err := redirStdout(func() { test.cs.Println(test.in) }) - if err != nil { - t.Errorf("%v #%d %v", test.f, i, err) - continue - } - buf.Write(b) - - case fCSSdump: - str := test.cs.Sdump(test.in) - buf.WriteString(str) - - case fCSSprint: - str := test.cs.Sprint(test.in) - buf.WriteString(str) - - case fCSSprintf: - str := test.cs.Sprintf(test.format, test.in) - buf.WriteString(str) - - case fCSSprintln: - str := test.cs.Sprintln(test.in) - buf.WriteString(str) - - case fCSErrorf: - err := test.cs.Errorf(test.format, test.in) - buf.WriteString(err.Error()) - - case fCSNewFormatter: - fmt.Fprintf(buf, test.format, test.cs.NewFormatter(test.in)) - - case fErrorf: - err := spew.Errorf(test.format, test.in) - buf.WriteString(err.Error()) - - case fFprint: - spew.Fprint(buf, test.in) - - case fFprintln: - spew.Fprintln(buf, test.in) - - case fPrint: - b, err := redirStdout(func() { spew.Print(test.in) }) - if err != nil { - t.Errorf("%v #%d %v", test.f, i, err) - continue - } - buf.Write(b) - - case fPrintln: - b, err := redirStdout(func() { spew.Println(test.in) }) - if err != nil { - t.Errorf("%v #%d %v", test.f, i, err) - continue - } - buf.Write(b) - - case fSdump: - str := spew.Sdump(test.in) - buf.WriteString(str) - - case fSprint: - str := spew.Sprint(test.in) - buf.WriteString(str) - - case fSprintf: - str := spew.Sprintf(test.format, test.in) - buf.WriteString(str) - - case fSprintln: - str := spew.Sprintln(test.in) - buf.WriteString(str) - - default: - t.Errorf("%v #%d unrecognized function", test.f, i) - continue - } - s := buf.String() - if test.want != s { - t.Errorf("ConfigState #%d\n got: %s want: %s", i, s, test.want) - continue - } - } -} diff --git a/vendor/github.com/davecgh/go-spew/test_coverage.txt b/vendor/github.com/davecgh/go-spew/test_coverage.txt deleted file mode 100644 index 2cd087a2..00000000 --- a/vendor/github.com/davecgh/go-spew/test_coverage.txt +++ /dev/null @@ -1,61 +0,0 @@ - -github.com/davecgh/go-spew/spew/dump.go dumpState.dump 100.00% (88/88) -github.com/davecgh/go-spew/spew/format.go formatState.format 100.00% (82/82) -github.com/davecgh/go-spew/spew/format.go formatState.formatPtr 100.00% (52/52) -github.com/davecgh/go-spew/spew/dump.go dumpState.dumpPtr 100.00% (44/44) -github.com/davecgh/go-spew/spew/dump.go dumpState.dumpSlice 100.00% (39/39) -github.com/davecgh/go-spew/spew/common.go handleMethods 100.00% (30/30) -github.com/davecgh/go-spew/spew/common.go printHexPtr 100.00% (18/18) -github.com/davecgh/go-spew/spew/common.go unsafeReflectValue 100.00% (13/13) -github.com/davecgh/go-spew/spew/format.go formatState.constructOrigFormat 100.00% (12/12) -github.com/davecgh/go-spew/spew/dump.go fdump 100.00% (11/11) -github.com/davecgh/go-spew/spew/format.go formatState.Format 100.00% (11/11) -github.com/davecgh/go-spew/spew/common.go init 100.00% (10/10) -github.com/davecgh/go-spew/spew/common.go printComplex 100.00% (9/9) -github.com/davecgh/go-spew/spew/common.go valuesSorter.Less 100.00% (8/8) -github.com/davecgh/go-spew/spew/format.go formatState.buildDefaultFormat 100.00% (7/7) -github.com/davecgh/go-spew/spew/format.go formatState.unpackValue 100.00% (5/5) -github.com/davecgh/go-spew/spew/dump.go dumpState.indent 100.00% (4/4) -github.com/davecgh/go-spew/spew/common.go catchPanic 100.00% (4/4) -github.com/davecgh/go-spew/spew/config.go ConfigState.convertArgs 100.00% (4/4) -github.com/davecgh/go-spew/spew/spew.go convertArgs 100.00% (4/4) -github.com/davecgh/go-spew/spew/format.go newFormatter 100.00% (3/3) -github.com/davecgh/go-spew/spew/dump.go Sdump 100.00% (3/3) -github.com/davecgh/go-spew/spew/common.go printBool 100.00% (3/3) -github.com/davecgh/go-spew/spew/common.go sortValues 100.00% (3/3) -github.com/davecgh/go-spew/spew/config.go ConfigState.Sdump 100.00% (3/3) -github.com/davecgh/go-spew/spew/dump.go dumpState.unpackValue 100.00% (3/3) -github.com/davecgh/go-spew/spew/spew.go Printf 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Println 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Sprint 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Sprintf 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Sprintln 100.00% (1/1) -github.com/davecgh/go-spew/spew/common.go printFloat 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go NewDefaultConfig 100.00% (1/1) -github.com/davecgh/go-spew/spew/common.go printInt 100.00% (1/1) -github.com/davecgh/go-spew/spew/common.go printUint 100.00% (1/1) -github.com/davecgh/go-spew/spew/common.go valuesSorter.Len 100.00% (1/1) -github.com/davecgh/go-spew/spew/common.go valuesSorter.Swap 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Errorf 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Fprint 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Fprintf 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Fprintln 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Print 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Printf 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Println 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Sprint 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Sprintf 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Sprintln 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.NewFormatter 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Fdump 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Dump 100.00% (1/1) -github.com/davecgh/go-spew/spew/dump.go Fdump 100.00% (1/1) -github.com/davecgh/go-spew/spew/dump.go Dump 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Fprintln 100.00% (1/1) -github.com/davecgh/go-spew/spew/format.go NewFormatter 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Errorf 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Fprint 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Fprintf 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Print 100.00% (1/1) -github.com/davecgh/go-spew/spew ------------------------------- 100.00% (505/505) - diff --git a/vendor/github.com/fsnotify/fsnotify/.editorconfig b/vendor/github.com/fsnotify/fsnotify/.editorconfig deleted file mode 100644 index ba49e3c2..00000000 --- a/vendor/github.com/fsnotify/fsnotify/.editorconfig +++ /dev/null @@ -1,5 +0,0 @@ -root = true - -[*] -indent_style = tab -indent_size = 4 diff --git a/vendor/github.com/fsnotify/fsnotify/.gitignore b/vendor/github.com/fsnotify/fsnotify/.gitignore deleted file mode 100644 index 4cd0cbaf..00000000 --- a/vendor/github.com/fsnotify/fsnotify/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# Setup a Global .gitignore for OS and editor generated files: -# https://help.github.com/articles/ignoring-files -# git config --global core.excludesfile ~/.gitignore_global - -.vagrant -*.sublime-project diff --git a/vendor/github.com/fsnotify/fsnotify/.travis.yml b/vendor/github.com/fsnotify/fsnotify/.travis.yml deleted file mode 100644 index 981d1bb8..00000000 --- a/vendor/github.com/fsnotify/fsnotify/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -sudo: false -language: go - -go: - - 1.8.x - - 1.9.x - - tip - -matrix: - allow_failures: - - go: tip - fast_finish: true - -before_script: - - go get -u github.com/golang/lint/golint - -script: - - go test -v --race ./... - -after_script: - - test -z "$(gofmt -s -l -w . | tee /dev/stderr)" - - test -z "$(golint ./... | tee /dev/stderr)" - - go vet ./... - -os: - - linux - - osx - -notifications: - email: false diff --git a/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md b/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md deleted file mode 100644 index be4d7ea2..00000000 --- a/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md +++ /dev/null @@ -1,317 +0,0 @@ -# Changelog - -## v1.4.7 / 2018-01-09 - -* BSD/macOS: Fix possible deadlock on closing the watcher on kqueue (thanks @nhooyr and @glycerine) -* Tests: Fix missing verb on format string (thanks @rchiossi) -* Linux: Fix deadlock in Remove (thanks @aarondl) -* Linux: Watch.Add improvements (avoid race, fix consistency, reduce garbage) (thanks @twpayne) -* Docs: Moved FAQ into the README (thanks @vahe) -* Linux: Properly handle inotify's IN_Q_OVERFLOW event (thanks @zeldovich) -* Docs: replace references to OS X with macOS - -## v1.4.2 / 2016-10-10 - -* Linux: use InotifyInit1 with IN_CLOEXEC to stop leaking a file descriptor to a child process when using fork/exec [#178](https://github.com/fsnotify/fsnotify/pull/178) (thanks @pattyshack) - -## v1.4.1 / 2016-10-04 - -* Fix flaky inotify stress test on Linux [#177](https://github.com/fsnotify/fsnotify/pull/177) (thanks @pattyshack) - -## v1.4.0 / 2016-10-01 - -* add a String() method to Event.Op [#165](https://github.com/fsnotify/fsnotify/pull/165) (thanks @oozie) - -## v1.3.1 / 2016-06-28 - -* Windows: fix for double backslash when watching the root of a drive [#151](https://github.com/fsnotify/fsnotify/issues/151) (thanks @brunoqc) - -## v1.3.0 / 2016-04-19 - -* Support linux/arm64 by [patching](https://go-review.googlesource.com/#/c/21971/) x/sys/unix and switching to to it from syscall (thanks @suihkulokki) [#135](https://github.com/fsnotify/fsnotify/pull/135) - -## v1.2.10 / 2016-03-02 - -* Fix golint errors in windows.go [#121](https://github.com/fsnotify/fsnotify/pull/121) (thanks @tiffanyfj) - -## v1.2.9 / 2016-01-13 - -kqueue: Fix logic for CREATE after REMOVE [#111](https://github.com/fsnotify/fsnotify/pull/111) (thanks @bep) - -## v1.2.8 / 2015-12-17 - -* kqueue: fix race condition in Close [#105](https://github.com/fsnotify/fsnotify/pull/105) (thanks @djui for reporting the issue and @ppknap for writing a failing test) -* inotify: fix race in test -* enable race detection for continuous integration (Linux, Mac, Windows) - -## v1.2.5 / 2015-10-17 - -* inotify: use epoll_create1 for arm64 support (requires Linux 2.6.27 or later) [#100](https://github.com/fsnotify/fsnotify/pull/100) (thanks @suihkulokki) -* inotify: fix path leaks [#73](https://github.com/fsnotify/fsnotify/pull/73) (thanks @chamaken) -* kqueue: watch for rename events on subdirectories [#83](https://github.com/fsnotify/fsnotify/pull/83) (thanks @guotie) -* kqueue: avoid infinite loops from symlinks cycles [#101](https://github.com/fsnotify/fsnotify/pull/101) (thanks @illicitonion) - -## v1.2.1 / 2015-10-14 - -* kqueue: don't watch named pipes [#98](https://github.com/fsnotify/fsnotify/pull/98) (thanks @evanphx) - -## v1.2.0 / 2015-02-08 - -* inotify: use epoll to wake up readEvents [#66](https://github.com/fsnotify/fsnotify/pull/66) (thanks @PieterD) -* inotify: closing watcher should now always shut down goroutine [#63](https://github.com/fsnotify/fsnotify/pull/63) (thanks @PieterD) -* kqueue: close kqueue after removing watches, fixes [#59](https://github.com/fsnotify/fsnotify/issues/59) - -## v1.1.1 / 2015-02-05 - -* inotify: Retry read on EINTR [#61](https://github.com/fsnotify/fsnotify/issues/61) (thanks @PieterD) - -## v1.1.0 / 2014-12-12 - -* kqueue: rework internals [#43](https://github.com/fsnotify/fsnotify/pull/43) - * add low-level functions - * only need to store flags on directories - * less mutexes [#13](https://github.com/fsnotify/fsnotify/issues/13) - * done can be an unbuffered channel - * remove calls to os.NewSyscallError -* More efficient string concatenation for Event.String() [#52](https://github.com/fsnotify/fsnotify/pull/52) (thanks @mdlayher) -* kqueue: fix regression in rework causing subdirectories to be watched [#48](https://github.com/fsnotify/fsnotify/issues/48) -* kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51) - -## v1.0.4 / 2014-09-07 - -* kqueue: add dragonfly to the build tags. -* Rename source code files, rearrange code so exported APIs are at the top. -* Add done channel to example code. [#37](https://github.com/fsnotify/fsnotify/pull/37) (thanks @chenyukang) - -## v1.0.3 / 2014-08-19 - -* [Fix] Windows MOVED_TO now translates to Create like on BSD and Linux. [#36](https://github.com/fsnotify/fsnotify/issues/36) - -## v1.0.2 / 2014-08-17 - -* [Fix] Missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso) -* [Fix] Make ./path and path equivalent. (thanks @zhsso) - -## v1.0.0 / 2014-08-15 - -* [API] Remove AddWatch on Windows, use Add. -* Improve documentation for exported identifiers. [#30](https://github.com/fsnotify/fsnotify/issues/30) -* Minor updates based on feedback from golint. - -## dev / 2014-07-09 - -* Moved to [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify). -* Use os.NewSyscallError instead of returning errno (thanks @hariharan-uno) - -## dev / 2014-07-04 - -* kqueue: fix incorrect mutex used in Close() -* Update example to demonstrate usage of Op. - -## dev / 2014-06-28 - -* [API] Don't set the Write Op for attribute notifications [#4](https://github.com/fsnotify/fsnotify/issues/4) -* Fix for String() method on Event (thanks Alex Brainman) -* Don't build on Plan 9 or Solaris (thanks @4ad) - -## dev / 2014-06-21 - -* Events channel of type Event rather than *Event. -* [internal] use syscall constants directly for inotify and kqueue. -* [internal] kqueue: rename events to kevents and fileEvent to event. - -## dev / 2014-06-19 - -* Go 1.3+ required on Windows (uses syscall.ERROR_MORE_DATA internally). -* [internal] remove cookie from Event struct (unused). -* [internal] Event struct has the same definition across every OS. -* [internal] remove internal watch and removeWatch methods. - -## dev / 2014-06-12 - -* [API] Renamed Watch() to Add() and RemoveWatch() to Remove(). -* [API] Pluralized channel names: Events and Errors. -* [API] Renamed FileEvent struct to Event. -* [API] Op constants replace methods like IsCreate(). - -## dev / 2014-06-12 - -* Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98) - -## dev / 2014-05-23 - -* [API] Remove current implementation of WatchFlags. - * current implementation doesn't take advantage of OS for efficiency - * provides little benefit over filtering events as they are received, but has extra bookkeeping and mutexes - * no tests for the current implementation - * not fully implemented on Windows [#93](https://github.com/howeyc/fsnotify/issues/93#issuecomment-39285195) - -## v0.9.3 / 2014-12-31 - -* kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51) - -## v0.9.2 / 2014-08-17 - -* [Backport] Fix missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso) - -## v0.9.1 / 2014-06-12 - -* Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98) - -## v0.9.0 / 2014-01-17 - -* IsAttrib() for events that only concern a file's metadata [#79][] (thanks @abustany) -* [Fix] kqueue: fix deadlock [#77][] (thanks @cespare) -* [NOTICE] Development has moved to `code.google.com/p/go.exp/fsnotify` in preparation for inclusion in the Go standard library. - -## v0.8.12 / 2013-11-13 - -* [API] Remove FD_SET and friends from Linux adapter - -## v0.8.11 / 2013-11-02 - -* [Doc] Add Changelog [#72][] (thanks @nathany) -* [Doc] Spotlight and double modify events on macOS [#62][] (reported by @paulhammond) - -## v0.8.10 / 2013-10-19 - -* [Fix] kqueue: remove file watches when parent directory is removed [#71][] (reported by @mdwhatcott) -* [Fix] kqueue: race between Close and readEvents [#70][] (reported by @bernerdschaefer) -* [Doc] specify OS-specific limits in README (thanks @debrando) - -## v0.8.9 / 2013-09-08 - -* [Doc] Contributing (thanks @nathany) -* [Doc] update package path in example code [#63][] (thanks @paulhammond) -* [Doc] GoCI badge in README (Linux only) [#60][] -* [Doc] Cross-platform testing with Vagrant [#59][] (thanks @nathany) - -## v0.8.8 / 2013-06-17 - -* [Fix] Windows: handle `ERROR_MORE_DATA` on Windows [#49][] (thanks @jbowtie) - -## v0.8.7 / 2013-06-03 - -* [API] Make syscall flags internal -* [Fix] inotify: ignore event changes -* [Fix] race in symlink test [#45][] (reported by @srid) -* [Fix] tests on Windows -* lower case error messages - -## v0.8.6 / 2013-05-23 - -* kqueue: Use EVT_ONLY flag on Darwin -* [Doc] Update README with full example - -## v0.8.5 / 2013-05-09 - -* [Fix] inotify: allow monitoring of "broken" symlinks (thanks @tsg) - -## v0.8.4 / 2013-04-07 - -* [Fix] kqueue: watch all file events [#40][] (thanks @ChrisBuchholz) - -## v0.8.3 / 2013-03-13 - -* [Fix] inoitfy/kqueue memory leak [#36][] (reported by @nbkolchin) -* [Fix] kqueue: use fsnFlags for watching a directory [#33][] (reported by @nbkolchin) - -## v0.8.2 / 2013-02-07 - -* [Doc] add Authors -* [Fix] fix data races for map access [#29][] (thanks @fsouza) - -## v0.8.1 / 2013-01-09 - -* [Fix] Windows path separators -* [Doc] BSD License - -## v0.8.0 / 2012-11-09 - -* kqueue: directory watching improvements (thanks @vmirage) -* inotify: add `IN_MOVED_TO` [#25][] (requested by @cpisto) -* [Fix] kqueue: deleting watched directory [#24][] (reported by @jakerr) - -## v0.7.4 / 2012-10-09 - -* [Fix] inotify: fixes from https://codereview.appspot.com/5418045/ (ugorji) -* [Fix] kqueue: preserve watch flags when watching for delete [#21][] (reported by @robfig) -* [Fix] kqueue: watch the directory even if it isn't a new watch (thanks @robfig) -* [Fix] kqueue: modify after recreation of file - -## v0.7.3 / 2012-09-27 - -* [Fix] kqueue: watch with an existing folder inside the watched folder (thanks @vmirage) -* [Fix] kqueue: no longer get duplicate CREATE events - -## v0.7.2 / 2012-09-01 - -* kqueue: events for created directories - -## v0.7.1 / 2012-07-14 - -* [Fix] for renaming files - -## v0.7.0 / 2012-07-02 - -* [Feature] FSNotify flags -* [Fix] inotify: Added file name back to event path - -## v0.6.0 / 2012-06-06 - -* kqueue: watch files after directory created (thanks @tmc) - -## v0.5.1 / 2012-05-22 - -* [Fix] inotify: remove all watches before Close() - -## v0.5.0 / 2012-05-03 - -* [API] kqueue: return errors during watch instead of sending over channel -* kqueue: match symlink behavior on Linux -* inotify: add `DELETE_SELF` (requested by @taralx) -* [Fix] kqueue: handle EINTR (reported by @robfig) -* [Doc] Godoc example [#1][] (thanks @davecheney) - -## v0.4.0 / 2012-03-30 - -* Go 1 released: build with go tool -* [Feature] Windows support using winfsnotify -* Windows does not have attribute change notifications -* Roll attribute notifications into IsModify - -## v0.3.0 / 2012-02-19 - -* kqueue: add files when watch directory - -## v0.2.0 / 2011-12-30 - -* update to latest Go weekly code - -## v0.1.0 / 2011-10-19 - -* kqueue: add watch on file creation to match inotify -* kqueue: create file event -* inotify: ignore `IN_IGNORED` events -* event String() -* linux: common FileEvent functions -* initial commit - -[#79]: https://github.com/howeyc/fsnotify/pull/79 -[#77]: https://github.com/howeyc/fsnotify/pull/77 -[#72]: https://github.com/howeyc/fsnotify/issues/72 -[#71]: https://github.com/howeyc/fsnotify/issues/71 -[#70]: https://github.com/howeyc/fsnotify/issues/70 -[#63]: https://github.com/howeyc/fsnotify/issues/63 -[#62]: https://github.com/howeyc/fsnotify/issues/62 -[#60]: https://github.com/howeyc/fsnotify/issues/60 -[#59]: https://github.com/howeyc/fsnotify/issues/59 -[#49]: https://github.com/howeyc/fsnotify/issues/49 -[#45]: https://github.com/howeyc/fsnotify/issues/45 -[#40]: https://github.com/howeyc/fsnotify/issues/40 -[#36]: https://github.com/howeyc/fsnotify/issues/36 -[#33]: https://github.com/howeyc/fsnotify/issues/33 -[#29]: https://github.com/howeyc/fsnotify/issues/29 -[#25]: https://github.com/howeyc/fsnotify/issues/25 -[#24]: https://github.com/howeyc/fsnotify/issues/24 -[#21]: https://github.com/howeyc/fsnotify/issues/21 diff --git a/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md b/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md deleted file mode 100644 index 828a60b2..00000000 --- a/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md +++ /dev/null @@ -1,77 +0,0 @@ -# Contributing - -## Issues - -* Request features and report bugs using the [GitHub Issue Tracker](https://github.com/fsnotify/fsnotify/issues). -* Please indicate the platform you are using fsnotify on. -* A code example to reproduce the problem is appreciated. - -## Pull Requests - -### Contributor License Agreement - -fsnotify is derived from code in the [golang.org/x/exp](https://godoc.org/golang.org/x/exp) package and it may be included [in the standard library](https://github.com/fsnotify/fsnotify/issues/1) in the future. Therefore fsnotify carries the same [LICENSE](https://github.com/fsnotify/fsnotify/blob/master/LICENSE) as Go. Contributors retain their copyright, so you need to fill out a short form before we can accept your contribution: [Google Individual Contributor License Agreement](https://developers.google.com/open-source/cla/individual). - -Please indicate that you have signed the CLA in your pull request. - -### How fsnotify is Developed - -* Development is done on feature branches. -* Tests are run on BSD, Linux, macOS and Windows. -* Pull requests are reviewed and [applied to master][am] using [hub][]. - * Maintainers may modify or squash commits rather than asking contributors to. -* To issue a new release, the maintainers will: - * Update the CHANGELOG - * Tag a version, which will become available through gopkg.in. - -### How to Fork - -For smooth sailing, always use the original import path. Installing with `go get` makes this easy. - -1. Install from GitHub (`go get -u github.com/fsnotify/fsnotify`) -2. Create your feature branch (`git checkout -b my-new-feature`) -3. Ensure everything works and the tests pass (see below) -4. Commit your changes (`git commit -am 'Add some feature'`) - -Contribute upstream: - -1. Fork fsnotify on GitHub -2. Add your remote (`git remote add fork git@github.com:mycompany/repo.git`) -3. Push to the branch (`git push fork my-new-feature`) -4. Create a new Pull Request on GitHub - -This workflow is [thoroughly explained by Katrina Owen](https://splice.com/blog/contributing-open-source-git-repositories-go/). - -### Testing - -fsnotify uses build tags to compile different code on Linux, BSD, macOS, and Windows. - -Before doing a pull request, please do your best to test your changes on multiple platforms, and list which platforms you were able/unable to test on. - -To aid in cross-platform testing there is a Vagrantfile for Linux and BSD. - -* Install [Vagrant](http://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/) -* Setup [Vagrant Gopher](https://github.com/nathany/vagrant-gopher) in your `src` folder. -* Run `vagrant up` from the project folder. You can also setup just one box with `vagrant up linux` or `vagrant up bsd` (note: the BSD box doesn't support Windows hosts at this time, and NFS may prompt for your host OS password) -* Once setup, you can run the test suite on a given OS with a single command `vagrant ssh linux -c 'cd fsnotify/fsnotify; go test'`. -* When you're done, you will want to halt or destroy the Vagrant boxes. - -Notice: fsnotify file system events won't trigger in shared folders. The tests get around this limitation by using the /tmp directory. - -Right now there is no equivalent solution for Windows and macOS, but there are Windows VMs [freely available from Microsoft](http://www.modern.ie/en-us/virtualization-tools#downloads). - -### Maintainers - -Help maintaining fsnotify is welcome. To be a maintainer: - -* Submit a pull request and sign the CLA as above. -* You must be able to run the test suite on Mac, Windows, Linux and BSD. - -To keep master clean, the fsnotify project uses the "apply mail" workflow outlined in Nathaniel Talbott's post ["Merge pull request" Considered Harmful][am]. This requires installing [hub][]. - -All code changes should be internal pull requests. - -Releases are tagged using [Semantic Versioning](http://semver.org/). - -[hub]: https://github.com/github/hub -[am]: http://blog.spreedly.com/2014/06/24/merge-pull-request-considered-harmful/#.VGa5yZPF_Zs diff --git a/vendor/github.com/fsnotify/fsnotify/README.md b/vendor/github.com/fsnotify/fsnotify/README.md deleted file mode 100644 index 39932074..00000000 --- a/vendor/github.com/fsnotify/fsnotify/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# File system notifications for Go - -[![GoDoc](https://godoc.org/github.com/fsnotify/fsnotify?status.svg)](https://godoc.org/github.com/fsnotify/fsnotify) [![Go Report Card](https://goreportcard.com/badge/github.com/fsnotify/fsnotify)](https://goreportcard.com/report/github.com/fsnotify/fsnotify) - -fsnotify utilizes [golang.org/x/sys](https://godoc.org/golang.org/x/sys) rather than `syscall` from the standard library. Ensure you have the latest version installed by running: - -```console -go get -u golang.org/x/sys/... -``` - -Cross platform: Windows, Linux, BSD and macOS. - -|Adapter |OS |Status | -|----------|----------|----------| -|inotify |Linux 2.6.27 or later, Android\*|Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify)| -|kqueue |BSD, macOS, iOS\*|Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify)| -|ReadDirectoryChangesW|Windows|Supported [![Build status](https://ci.appveyor.com/api/projects/status/ivwjubaih4r0udeh/branch/master?svg=true)](https://ci.appveyor.com/project/NathanYoungman/fsnotify/branch/master)| -|FSEvents |macOS |[Planned](https://github.com/fsnotify/fsnotify/issues/11)| -|FEN |Solaris 11 |[In Progress](https://github.com/fsnotify/fsnotify/issues/12)| -|fanotify |Linux 2.6.37+ | | -|USN Journals |Windows |[Maybe](https://github.com/fsnotify/fsnotify/issues/53)| -|Polling |*All* |[Maybe](https://github.com/fsnotify/fsnotify/issues/9)| - -\* Android and iOS are untested. - -Please see [the documentation](https://godoc.org/github.com/fsnotify/fsnotify) and consult the [FAQ](#faq) for usage information. - -## API stability - -fsnotify is a fork of [howeyc/fsnotify](https://godoc.org/github.com/howeyc/fsnotify) with a new API as of v1.0. The API is based on [this design document](http://goo.gl/MrYxyA). - -All [releases](https://github.com/fsnotify/fsnotify/releases) are tagged based on [Semantic Versioning](http://semver.org/). Further API changes are [planned](https://github.com/fsnotify/fsnotify/milestones), and will be tagged with a new major revision number. - -Go 1.6 supports dependencies located in the `vendor/` folder. Unless you are creating a library, it is recommended that you copy fsnotify into `vendor/github.com/fsnotify/fsnotify` within your project, and likewise for `golang.org/x/sys`. - -## Contributing - -Please refer to [CONTRIBUTING][] before opening an issue or pull request. - -## Example - -See [example_test.go](https://github.com/fsnotify/fsnotify/blob/master/example_test.go). - -## FAQ - -**When a file is moved to another directory is it still being watched?** - -No (it shouldn't be, unless you are watching where it was moved to). - -**When I watch a directory, are all subdirectories watched as well?** - -No, you must add watches for any directory you want to watch (a recursive watcher is on the roadmap [#18][]). - -**Do I have to watch the Error and Event channels in a separate goroutine?** - -As of now, yes. Looking into making this single-thread friendly (see [howeyc #7][#7]) - -**Why am I receiving multiple events for the same file on OS X?** - -Spotlight indexing on OS X can result in multiple events (see [howeyc #62][#62]). A temporary workaround is to add your folder(s) to the *Spotlight Privacy settings* until we have a native FSEvents implementation (see [#11][]). - -**How many files can be watched at once?** - -There are OS-specific limits as to how many watches can be created: -* Linux: /proc/sys/fs/inotify/max_user_watches contains the limit, reaching this limit results in a "no space left on device" error. -* BSD / OSX: sysctl variables "kern.maxfiles" and "kern.maxfilesperproc", reaching these limits results in a "too many open files" error. - -[#62]: https://github.com/howeyc/fsnotify/issues/62 -[#18]: https://github.com/fsnotify/fsnotify/issues/18 -[#11]: https://github.com/fsnotify/fsnotify/issues/11 -[#7]: https://github.com/howeyc/fsnotify/issues/7 - -[contributing]: https://github.com/fsnotify/fsnotify/blob/master/CONTRIBUTING.md - -## Related Projects - -* [notify](https://github.com/rjeczalik/notify) -* [fsevents](https://github.com/fsnotify/fsevents) - diff --git a/vendor/github.com/fsnotify/fsnotify/example_test.go b/vendor/github.com/fsnotify/fsnotify/example_test.go deleted file mode 100644 index 700502cb..00000000 --- a/vendor/github.com/fsnotify/fsnotify/example_test.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 !plan9 - -package fsnotify_test - -import ( - "log" - - "github.com/fsnotify/fsnotify" -) - -func ExampleNewWatcher() { - watcher, err := fsnotify.NewWatcher() - if err != nil { - log.Fatal(err) - } - defer watcher.Close() - - done := make(chan bool) - go func() { - for { - select { - case event := <-watcher.Events: - log.Println("event:", event) - if event.Op&fsnotify.Write == fsnotify.Write { - log.Println("modified file:", event.Name) - } - case err := <-watcher.Errors: - log.Println("error:", err) - } - } - }() - - err = watcher.Add("/tmp/foo") - if err != nil { - log.Fatal(err) - } - <-done -} diff --git a/vendor/github.com/fsnotify/fsnotify/fsnotify_test.go b/vendor/github.com/fsnotify/fsnotify/fsnotify_test.go deleted file mode 100644 index f9771d9d..00000000 --- a/vendor/github.com/fsnotify/fsnotify/fsnotify_test.go +++ /dev/null @@ -1,70 +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 !plan9 - -package fsnotify - -import ( - "os" - "testing" - "time" -) - -func TestEventStringWithValue(t *testing.T) { - for opMask, expectedString := range map[Op]string{ - Chmod | Create: `"/usr/someFile": CREATE|CHMOD`, - Rename: `"/usr/someFile": RENAME`, - Remove: `"/usr/someFile": REMOVE`, - Write | Chmod: `"/usr/someFile": WRITE|CHMOD`, - } { - event := Event{Name: "/usr/someFile", Op: opMask} - if event.String() != expectedString { - t.Fatalf("Expected %s, got: %v", expectedString, event.String()) - } - - } -} - -func TestEventOpStringWithValue(t *testing.T) { - expectedOpString := "WRITE|CHMOD" - event := Event{Name: "someFile", Op: Write | Chmod} - if event.Op.String() != expectedOpString { - t.Fatalf("Expected %s, got: %v", expectedOpString, event.Op.String()) - } -} - -func TestEventOpStringWithNoValue(t *testing.T) { - expectedOpString := "" - event := Event{Name: "testFile", Op: 0} - if event.Op.String() != expectedOpString { - t.Fatalf("Expected %s, got: %v", expectedOpString, event.Op.String()) - } -} - -// TestWatcherClose tests that the goroutine started by creating the watcher can be -// signalled to return at any time, even if there is no goroutine listening on the events -// or errors channels. -func TestWatcherClose(t *testing.T) { - t.Parallel() - - name := tempMkFile(t, "") - w := newWatcher(t) - err := w.Add(name) - if err != nil { - t.Fatal(err) - } - - err = os.Remove(name) - if err != nil { - t.Fatal(err) - } - // Allow the watcher to receive the event. - time.Sleep(time.Millisecond * 100) - - err = w.Close() - if err != nil { - t.Fatal(err) - } -} diff --git a/vendor/github.com/fsnotify/fsnotify/inotify_poller_test.go b/vendor/github.com/fsnotify/fsnotify/inotify_poller_test.go deleted file mode 100644 index 26623efe..00000000 --- a/vendor/github.com/fsnotify/fsnotify/inotify_poller_test.go +++ /dev/null @@ -1,229 +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 linux - -package fsnotify - -import ( - "testing" - "time" - - "golang.org/x/sys/unix" -) - -type testFd [2]int - -func makeTestFd(t *testing.T) testFd { - var tfd testFd - errno := unix.Pipe(tfd[:]) - if errno != nil { - t.Fatalf("Failed to create pipe: %v", errno) - } - return tfd -} - -func (tfd testFd) fd() int { - return tfd[0] -} - -func (tfd testFd) closeWrite(t *testing.T) { - errno := unix.Close(tfd[1]) - if errno != nil { - t.Fatalf("Failed to close write end of pipe: %v", errno) - } -} - -func (tfd testFd) put(t *testing.T) { - buf := make([]byte, 10) - _, errno := unix.Write(tfd[1], buf) - if errno != nil { - t.Fatalf("Failed to write to pipe: %v", errno) - } -} - -func (tfd testFd) get(t *testing.T) { - buf := make([]byte, 10) - _, errno := unix.Read(tfd[0], buf) - if errno != nil { - t.Fatalf("Failed to read from pipe: %v", errno) - } -} - -func (tfd testFd) close() { - unix.Close(tfd[1]) - unix.Close(tfd[0]) -} - -func makePoller(t *testing.T) (testFd, *fdPoller) { - tfd := makeTestFd(t) - poller, err := newFdPoller(tfd.fd()) - if err != nil { - t.Fatalf("Failed to create poller: %v", err) - } - return tfd, poller -} - -func TestPollerWithBadFd(t *testing.T) { - _, err := newFdPoller(-1) - if err != unix.EBADF { - t.Fatalf("Expected EBADF, got: %v", err) - } -} - -func TestPollerWithData(t *testing.T) { - tfd, poller := makePoller(t) - defer tfd.close() - defer poller.close() - - tfd.put(t) - ok, err := poller.wait() - if err != nil { - t.Fatalf("poller failed: %v", err) - } - if !ok { - t.Fatalf("expected poller to return true") - } - tfd.get(t) -} - -func TestPollerWithWakeup(t *testing.T) { - tfd, poller := makePoller(t) - defer tfd.close() - defer poller.close() - - err := poller.wake() - if err != nil { - t.Fatalf("wake failed: %v", err) - } - ok, err := poller.wait() - if err != nil { - t.Fatalf("poller failed: %v", err) - } - if ok { - t.Fatalf("expected poller to return false") - } -} - -func TestPollerWithClose(t *testing.T) { - tfd, poller := makePoller(t) - defer tfd.close() - defer poller.close() - - tfd.closeWrite(t) - ok, err := poller.wait() - if err != nil { - t.Fatalf("poller failed: %v", err) - } - if !ok { - t.Fatalf("expected poller to return true") - } -} - -func TestPollerWithWakeupAndData(t *testing.T) { - tfd, poller := makePoller(t) - defer tfd.close() - defer poller.close() - - tfd.put(t) - err := poller.wake() - if err != nil { - t.Fatalf("wake failed: %v", err) - } - - // both data and wakeup - ok, err := poller.wait() - if err != nil { - t.Fatalf("poller failed: %v", err) - } - if !ok { - t.Fatalf("expected poller to return true") - } - - // data is still in the buffer, wakeup is cleared - ok, err = poller.wait() - if err != nil { - t.Fatalf("poller failed: %v", err) - } - if !ok { - t.Fatalf("expected poller to return true") - } - - tfd.get(t) - // data is gone, only wakeup now - err = poller.wake() - if err != nil { - t.Fatalf("wake failed: %v", err) - } - ok, err = poller.wait() - if err != nil { - t.Fatalf("poller failed: %v", err) - } - if ok { - t.Fatalf("expected poller to return false") - } -} - -func TestPollerConcurrent(t *testing.T) { - tfd, poller := makePoller(t) - defer tfd.close() - defer poller.close() - - oks := make(chan bool) - live := make(chan bool) - defer close(live) - go func() { - defer close(oks) - for { - ok, err := poller.wait() - if err != nil { - t.Fatalf("poller failed: %v", err) - } - oks <- ok - if !<-live { - return - } - } - }() - - // Try a write - select { - case <-time.After(50 * time.Millisecond): - case <-oks: - t.Fatalf("poller did not wait") - } - tfd.put(t) - if !<-oks { - t.Fatalf("expected true") - } - tfd.get(t) - live <- true - - // Try a wakeup - select { - case <-time.After(50 * time.Millisecond): - case <-oks: - t.Fatalf("poller did not wait") - } - err := poller.wake() - if err != nil { - t.Fatalf("wake failed: %v", err) - } - if <-oks { - t.Fatalf("expected false") - } - live <- true - - // Try a close - select { - case <-time.After(50 * time.Millisecond): - case <-oks: - t.Fatalf("poller did not wait") - } - tfd.closeWrite(t) - if !<-oks { - t.Fatalf("expected true") - } - tfd.get(t) -} diff --git a/vendor/github.com/fsnotify/fsnotify/inotify_test.go b/vendor/github.com/fsnotify/fsnotify/inotify_test.go deleted file mode 100644 index 54f3f00e..00000000 --- a/vendor/github.com/fsnotify/fsnotify/inotify_test.go +++ /dev/null @@ -1,449 +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 linux - -package fsnotify - -import ( - "fmt" - "os" - "path/filepath" - "strings" - "testing" - "time" -) - -func TestInotifyCloseRightAway(t *testing.T) { - w, err := NewWatcher() - if err != nil { - t.Fatalf("Failed to create watcher") - } - - // Close immediately; it won't even reach the first unix.Read. - w.Close() - - // Wait for the close to complete. - <-time.After(50 * time.Millisecond) - isWatcherReallyClosed(t, w) -} - -func TestInotifyCloseSlightlyLater(t *testing.T) { - w, err := NewWatcher() - if err != nil { - t.Fatalf("Failed to create watcher") - } - - // Wait until readEvents has reached unix.Read, and Close. - <-time.After(50 * time.Millisecond) - w.Close() - - // Wait for the close to complete. - <-time.After(50 * time.Millisecond) - isWatcherReallyClosed(t, w) -} - -func TestInotifyCloseSlightlyLaterWithWatch(t *testing.T) { - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - w, err := NewWatcher() - if err != nil { - t.Fatalf("Failed to create watcher") - } - w.Add(testDir) - - // Wait until readEvents has reached unix.Read, and Close. - <-time.After(50 * time.Millisecond) - w.Close() - - // Wait for the close to complete. - <-time.After(50 * time.Millisecond) - isWatcherReallyClosed(t, w) -} - -func TestInotifyCloseAfterRead(t *testing.T) { - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - w, err := NewWatcher() - if err != nil { - t.Fatalf("Failed to create watcher") - } - - err = w.Add(testDir) - if err != nil { - t.Fatalf("Failed to add .") - } - - // Generate an event. - os.Create(filepath.Join(testDir, "somethingSOMETHINGsomethingSOMETHING")) - - // Wait for readEvents to read the event, then close the watcher. - <-time.After(50 * time.Millisecond) - w.Close() - - // Wait for the close to complete. - <-time.After(50 * time.Millisecond) - isWatcherReallyClosed(t, w) -} - -func isWatcherReallyClosed(t *testing.T, w *Watcher) { - select { - case err, ok := <-w.Errors: - if ok { - t.Fatalf("w.Errors is not closed; readEvents is still alive after closing (error: %v)", err) - } - default: - t.Fatalf("w.Errors would have blocked; readEvents is still alive!") - } - - select { - case _, ok := <-w.Events: - if ok { - t.Fatalf("w.Events is not closed; readEvents is still alive after closing") - } - default: - t.Fatalf("w.Events would have blocked; readEvents is still alive!") - } -} - -func TestInotifyCloseCreate(t *testing.T) { - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - w, err := NewWatcher() - if err != nil { - t.Fatalf("Failed to create watcher: %v", err) - } - defer w.Close() - - err = w.Add(testDir) - if err != nil { - t.Fatalf("Failed to add testDir: %v", err) - } - h, err := os.Create(filepath.Join(testDir, "testfile")) - if err != nil { - t.Fatalf("Failed to create file in testdir: %v", err) - } - h.Close() - select { - case _ = <-w.Events: - case err := <-w.Errors: - t.Fatalf("Error from watcher: %v", err) - case <-time.After(50 * time.Millisecond): - t.Fatalf("Took too long to wait for event") - } - - // At this point, we've received one event, so the goroutine is ready. - // It's also blocking on unix.Read. - // Now we try to swap the file descriptor under its nose. - w.Close() - w, err = NewWatcher() - defer w.Close() - if err != nil { - t.Fatalf("Failed to create second watcher: %v", err) - } - - <-time.After(50 * time.Millisecond) - err = w.Add(testDir) - if err != nil { - t.Fatalf("Error adding testDir again: %v", err) - } -} - -// This test verifies the watcher can keep up with file creations/deletions -// when under load. -func TestInotifyStress(t *testing.T) { - maxNumToCreate := 1000 - - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - testFilePrefix := filepath.Join(testDir, "testfile") - - w, err := NewWatcher() - if err != nil { - t.Fatalf("Failed to create watcher: %v", err) - } - defer w.Close() - - err = w.Add(testDir) - if err != nil { - t.Fatalf("Failed to add testDir: %v", err) - } - - doneChan := make(chan struct{}) - // The buffer ensures that the file generation goroutine is never blocked. - errChan := make(chan error, 2*maxNumToCreate) - - go func() { - for i := 0; i < maxNumToCreate; i++ { - testFile := fmt.Sprintf("%s%d", testFilePrefix, i) - - handle, err := os.Create(testFile) - if err != nil { - errChan <- fmt.Errorf("Create failed: %v", err) - continue - } - - err = handle.Close() - if err != nil { - errChan <- fmt.Errorf("Close failed: %v", err) - continue - } - } - - // If we delete a newly created file too quickly, inotify will skip the - // create event and only send the delete event. - time.Sleep(100 * time.Millisecond) - - for i := 0; i < maxNumToCreate; i++ { - testFile := fmt.Sprintf("%s%d", testFilePrefix, i) - err = os.Remove(testFile) - if err != nil { - errChan <- fmt.Errorf("Remove failed: %v", err) - } - } - - close(doneChan) - }() - - creates := 0 - removes := 0 - - finished := false - after := time.After(10 * time.Second) - for !finished { - select { - case <-after: - t.Fatalf("Not done") - case <-doneChan: - finished = true - case err := <-errChan: - t.Fatalf("Got an error from file creator goroutine: %v", err) - case err := <-w.Errors: - t.Fatalf("Got an error from watcher: %v", err) - case evt := <-w.Events: - if !strings.HasPrefix(evt.Name, testFilePrefix) { - t.Fatalf("Got an event for an unknown file: %s", evt.Name) - } - if evt.Op == Create { - creates++ - } - if evt.Op == Remove { - removes++ - } - } - } - - // Drain remaining events from channels - count := 0 - for count < 10 { - select { - case err := <-errChan: - t.Fatalf("Got an error from file creator goroutine: %v", err) - case err := <-w.Errors: - t.Fatalf("Got an error from watcher: %v", err) - case evt := <-w.Events: - if !strings.HasPrefix(evt.Name, testFilePrefix) { - t.Fatalf("Got an event for an unknown file: %s", evt.Name) - } - if evt.Op == Create { - creates++ - } - if evt.Op == Remove { - removes++ - } - count = 0 - default: - count++ - // Give the watcher chances to fill the channels. - time.Sleep(time.Millisecond) - } - } - - if creates-removes > 1 || creates-removes < -1 { - t.Fatalf("Creates and removes should not be off by more than one: %d creates, %d removes", creates, removes) - } - if creates < 50 { - t.Fatalf("Expected at least 50 creates, got %d", creates) - } -} - -func TestInotifyRemoveTwice(t *testing.T) { - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - testFile := filepath.Join(testDir, "testfile") - - handle, err := os.Create(testFile) - if err != nil { - t.Fatalf("Create failed: %v", err) - } - handle.Close() - - w, err := NewWatcher() - if err != nil { - t.Fatalf("Failed to create watcher: %v", err) - } - defer w.Close() - - err = w.Add(testFile) - if err != nil { - t.Fatalf("Failed to add testFile: %v", err) - } - - err = w.Remove(testFile) - if err != nil { - t.Fatalf("wanted successful remove but got: %v", err) - } - - err = w.Remove(testFile) - if err == nil { - t.Fatalf("no error on removing invalid file") - } - - w.mu.Lock() - defer w.mu.Unlock() - if len(w.watches) != 0 { - t.Fatalf("Expected watches len is 0, but got: %d, %v", len(w.watches), w.watches) - } - if len(w.paths) != 0 { - t.Fatalf("Expected paths len is 0, but got: %d, %v", len(w.paths), w.paths) - } -} - -func TestInotifyInnerMapLength(t *testing.T) { - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - testFile := filepath.Join(testDir, "testfile") - - handle, err := os.Create(testFile) - if err != nil { - t.Fatalf("Create failed: %v", err) - } - handle.Close() - - w, err := NewWatcher() - if err != nil { - t.Fatalf("Failed to create watcher: %v", err) - } - defer w.Close() - - err = w.Add(testFile) - if err != nil { - t.Fatalf("Failed to add testFile: %v", err) - } - go func() { - for err := range w.Errors { - t.Fatalf("error received: %s", err) - } - }() - - err = os.Remove(testFile) - if err != nil { - t.Fatalf("Failed to remove testFile: %v", err) - } - _ = <-w.Events // consume Remove event - <-time.After(50 * time.Millisecond) // wait IN_IGNORE propagated - - w.mu.Lock() - defer w.mu.Unlock() - if len(w.watches) != 0 { - t.Fatalf("Expected watches len is 0, but got: %d, %v", len(w.watches), w.watches) - } - if len(w.paths) != 0 { - t.Fatalf("Expected paths len is 0, but got: %d, %v", len(w.paths), w.paths) - } -} - -func TestInotifyOverflow(t *testing.T) { - // We need to generate many more events than the - // fs.inotify.max_queued_events sysctl setting. - // We use multiple goroutines (one per directory) - // to speed up file creation. - numDirs := 128 - numFiles := 1024 - - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - w, err := NewWatcher() - if err != nil { - t.Fatalf("Failed to create watcher: %v", err) - } - defer w.Close() - - for dn := 0; dn < numDirs; dn++ { - testSubdir := fmt.Sprintf("%s/%d", testDir, dn) - - err := os.Mkdir(testSubdir, 0777) - if err != nil { - t.Fatalf("Cannot create subdir: %v", err) - } - - err = w.Add(testSubdir) - if err != nil { - t.Fatalf("Failed to add subdir: %v", err) - } - } - - errChan := make(chan error, numDirs*numFiles) - - for dn := 0; dn < numDirs; dn++ { - testSubdir := fmt.Sprintf("%s/%d", testDir, dn) - - go func() { - for fn := 0; fn < numFiles; fn++ { - testFile := fmt.Sprintf("%s/%d", testSubdir, fn) - - handle, err := os.Create(testFile) - if err != nil { - errChan <- fmt.Errorf("Create failed: %v", err) - continue - } - - err = handle.Close() - if err != nil { - errChan <- fmt.Errorf("Close failed: %v", err) - continue - } - } - }() - } - - creates := 0 - overflows := 0 - - after := time.After(10 * time.Second) - for overflows == 0 && creates < numDirs*numFiles { - select { - case <-after: - t.Fatalf("Not done") - case err := <-errChan: - t.Fatalf("Got an error from file creator goroutine: %v", err) - case err := <-w.Errors: - if err == ErrEventOverflow { - overflows++ - } else { - t.Fatalf("Got an error from watcher: %v", err) - } - case evt := <-w.Events: - if !strings.HasPrefix(evt.Name, testDir) { - t.Fatalf("Got an event for an unknown file: %s", evt.Name) - } - if evt.Op == Create { - creates++ - } - } - } - - if creates == numDirs*numFiles { - t.Fatalf("Could not trigger overflow") - } - - if overflows == 0 { - t.Fatalf("No overflow and not enough creates (expected %d, got %d)", - numDirs*numFiles, creates) - } -} diff --git a/vendor/github.com/fsnotify/fsnotify/integration_darwin_test.go b/vendor/github.com/fsnotify/fsnotify/integration_darwin_test.go deleted file mode 100644 index cd6adc27..00000000 --- a/vendor/github.com/fsnotify/fsnotify/integration_darwin_test.go +++ /dev/null @@ -1,147 +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 fsnotify - -import ( - "os" - "path/filepath" - "testing" - "time" - - "golang.org/x/sys/unix" -) - -// testExchangedataForWatcher tests the watcher with the exchangedata operation on macOS. -// -// This is widely used for atomic saves on macOS, e.g. TextMate and in Apple's NSDocument. -// -// See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/exchangedata.2.html -// Also see: https://github.com/textmate/textmate/blob/cd016be29489eba5f3c09b7b70b06da134dda550/Frameworks/io/src/swap_file_data.cc#L20 -func testExchangedataForWatcher(t *testing.T, watchDir bool) { - // Create directory to watch - testDir1 := tempMkdir(t) - - // For the intermediate file - testDir2 := tempMkdir(t) - - defer os.RemoveAll(testDir1) - defer os.RemoveAll(testDir2) - - resolvedFilename := "TestFsnotifyEvents.file" - - // TextMate does: - // - // 1. exchangedata (intermediate, resolved) - // 2. unlink intermediate - // - // Let's try to simulate that: - resolved := filepath.Join(testDir1, resolvedFilename) - intermediate := filepath.Join(testDir2, resolvedFilename+"~") - - // Make sure we create the file before we start watching - createAndSyncFile(t, resolved) - - watcher := newWatcher(t) - - // Test both variants in isolation - if watchDir { - addWatch(t, watcher, testDir1) - } else { - addWatch(t, watcher, resolved) - } - - // Receive errors on the error channel on a separate goroutine - go func() { - for err := range watcher.Errors { - t.Fatalf("error received: %s", err) - } - }() - - // Receive events on the event channel on a separate goroutine - eventstream := watcher.Events - var removeReceived counter - var createReceived counter - - done := make(chan bool) - - go func() { - for event := range eventstream { - // Only count relevant events - if event.Name == filepath.Clean(resolved) { - if event.Op&Remove == Remove { - removeReceived.increment() - } - if event.Op&Create == Create { - createReceived.increment() - } - } - t.Logf("event received: %s", event) - } - done <- true - }() - - // Repeat to make sure the watched file/directory "survives" the REMOVE/CREATE loop. - for i := 1; i <= 3; i++ { - // The intermediate file is created in a folder outside the watcher - createAndSyncFile(t, intermediate) - - // 1. Swap - if err := unix.Exchangedata(intermediate, resolved, 0); err != nil { - t.Fatalf("[%d] exchangedata failed: %s", i, err) - } - - time.Sleep(50 * time.Millisecond) - - // 2. Delete the intermediate file - err := os.Remove(intermediate) - - if err != nil { - t.Fatalf("[%d] remove %s failed: %s", i, intermediate, err) - } - - time.Sleep(50 * time.Millisecond) - - } - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - - // The events will be (CHMOD + REMOVE + CREATE) X 2. Let's focus on the last two: - if removeReceived.value() < 3 { - t.Fatal("fsnotify remove events have not been received after 500 ms") - } - - if createReceived.value() < 3 { - t.Fatal("fsnotify create events have not been received after 500 ms") - } - - watcher.Close() - t.Log("waiting for the event channel to become closed...") - select { - case <-done: - t.Log("event channel closed") - case <-time.After(2 * time.Second): - t.Fatal("event stream was not closed after 2 seconds") - } -} - -// TestExchangedataInWatchedDir test exchangedata operation on file in watched dir. -func TestExchangedataInWatchedDir(t *testing.T) { - testExchangedataForWatcher(t, true) -} - -// TestExchangedataInWatchedDir test exchangedata operation on watched file. -func TestExchangedataInWatchedFile(t *testing.T) { - testExchangedataForWatcher(t, false) -} - -func createAndSyncFile(t *testing.T, filepath string) { - f1, err := os.OpenFile(filepath, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating %s failed: %s", filepath, err) - } - f1.Sync() - f1.Close() -} diff --git a/vendor/github.com/fsnotify/fsnotify/integration_test.go b/vendor/github.com/fsnotify/fsnotify/integration_test.go deleted file mode 100644 index 8b7e9d3e..00000000 --- a/vendor/github.com/fsnotify/fsnotify/integration_test.go +++ /dev/null @@ -1,1237 +0,0 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !plan9,!solaris - -package fsnotify - -import ( - "io/ioutil" - "os" - "os/exec" - "path" - "path/filepath" - "runtime" - "sync/atomic" - "testing" - "time" -) - -// An atomic counter -type counter struct { - val int32 -} - -func (c *counter) increment() { - atomic.AddInt32(&c.val, 1) -} - -func (c *counter) value() int32 { - return atomic.LoadInt32(&c.val) -} - -func (c *counter) reset() { - atomic.StoreInt32(&c.val, 0) -} - -// tempMkdir makes a temporary directory -func tempMkdir(t *testing.T) string { - dir, err := ioutil.TempDir("", "fsnotify") - if err != nil { - t.Fatalf("failed to create test directory: %s", err) - } - return dir -} - -// tempMkFile makes a temporary file. -func tempMkFile(t *testing.T, dir string) string { - f, err := ioutil.TempFile(dir, "fsnotify") - if err != nil { - t.Fatalf("failed to create test file: %v", err) - } - defer f.Close() - return f.Name() -} - -// newWatcher initializes an fsnotify Watcher instance. -func newWatcher(t *testing.T) *Watcher { - watcher, err := NewWatcher() - if err != nil { - t.Fatalf("NewWatcher() failed: %s", err) - } - return watcher -} - -// addWatch adds a watch for a directory -func addWatch(t *testing.T, watcher *Watcher, dir string) { - if err := watcher.Add(dir); err != nil { - t.Fatalf("watcher.Add(%q) failed: %s", dir, err) - } -} - -func TestFsnotifyMultipleOperations(t *testing.T) { - watcher := newWatcher(t) - - // Receive errors on the error channel on a separate goroutine - go func() { - for err := range watcher.Errors { - t.Fatalf("error received: %s", err) - } - }() - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - // Create directory that's not watched - testDirToMoveFiles := tempMkdir(t) - defer os.RemoveAll(testDirToMoveFiles) - - testFile := filepath.Join(testDir, "TestFsnotifySeq.testfile") - testFileRenamed := filepath.Join(testDirToMoveFiles, "TestFsnotifySeqRename.testfile") - - addWatch(t, watcher, testDir) - - // Receive events on the event channel on a separate goroutine - eventstream := watcher.Events - var createReceived, modifyReceived, deleteReceived, renameReceived counter - done := make(chan bool) - go func() { - for event := range eventstream { - // Only count relevant events - if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) { - t.Logf("event received: %s", event) - if event.Op&Remove == Remove { - deleteReceived.increment() - } - if event.Op&Write == Write { - modifyReceived.increment() - } - if event.Op&Create == Create { - createReceived.increment() - } - if event.Op&Rename == Rename { - renameReceived.increment() - } - } else { - t.Logf("unexpected event received: %s", event) - } - } - done <- true - }() - - // Create a file - // This should add at least one event to the fsnotify event queue - var f *os.File - f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - - time.Sleep(time.Millisecond) - f.WriteString("data") - f.Sync() - f.Close() - - time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete - - if err := testRename(testFile, testFileRenamed); err != nil { - t.Fatalf("rename failed: %s", err) - } - - // Modify the file outside of the watched dir - f, err = os.Open(testFileRenamed) - if err != nil { - t.Fatalf("open test renamed file failed: %s", err) - } - f.WriteString("data") - f.Sync() - f.Close() - - time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete - - // Recreate the file that was moved - f, err = os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Close() - time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - cReceived := createReceived.value() - if cReceived != 2 { - t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 2) - } - mReceived := modifyReceived.value() - if mReceived != 1 { - t.Fatalf("incorrect number of modify events received after 500 ms (%d vs %d)", mReceived, 1) - } - dReceived := deleteReceived.value() - rReceived := renameReceived.value() - if dReceived+rReceived != 1 { - t.Fatalf("incorrect number of rename+delete events received after 500 ms (%d vs %d)", rReceived+dReceived, 1) - } - - // Try closing the fsnotify instance - t.Log("calling Close()") - watcher.Close() - t.Log("waiting for the event channel to become closed...") - select { - case <-done: - t.Log("event channel closed") - case <-time.After(2 * time.Second): - t.Fatal("event stream was not closed after 2 seconds") - } -} - -func TestFsnotifyMultipleCreates(t *testing.T) { - watcher := newWatcher(t) - - // Receive errors on the error channel on a separate goroutine - go func() { - for err := range watcher.Errors { - t.Fatalf("error received: %s", err) - } - }() - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - testFile := filepath.Join(testDir, "TestFsnotifySeq.testfile") - - addWatch(t, watcher, testDir) - - // Receive events on the event channel on a separate goroutine - eventstream := watcher.Events - var createReceived, modifyReceived, deleteReceived counter - done := make(chan bool) - go func() { - for event := range eventstream { - // Only count relevant events - if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) { - t.Logf("event received: %s", event) - if event.Op&Remove == Remove { - deleteReceived.increment() - } - if event.Op&Create == Create { - createReceived.increment() - } - if event.Op&Write == Write { - modifyReceived.increment() - } - } else { - t.Logf("unexpected event received: %s", event) - } - } - done <- true - }() - - // Create a file - // This should add at least one event to the fsnotify event queue - var f *os.File - f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - - time.Sleep(time.Millisecond) - f.WriteString("data") - f.Sync() - f.Close() - - time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete - - os.Remove(testFile) - - time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete - - // Recreate the file - f, err = os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Close() - time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete - - // Modify - f, err = os.OpenFile(testFile, os.O_WRONLY, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - - time.Sleep(time.Millisecond) - f.WriteString("data") - f.Sync() - f.Close() - - time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete - - // Modify - f, err = os.OpenFile(testFile, os.O_WRONLY, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - - time.Sleep(time.Millisecond) - f.WriteString("data") - f.Sync() - f.Close() - - time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - cReceived := createReceived.value() - if cReceived != 2 { - t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 2) - } - mReceived := modifyReceived.value() - if mReceived < 3 { - t.Fatalf("incorrect number of modify events received after 500 ms (%d vs atleast %d)", mReceived, 3) - } - dReceived := deleteReceived.value() - if dReceived != 1 { - t.Fatalf("incorrect number of rename+delete events received after 500 ms (%d vs %d)", dReceived, 1) - } - - // Try closing the fsnotify instance - t.Log("calling Close()") - watcher.Close() - t.Log("waiting for the event channel to become closed...") - select { - case <-done: - t.Log("event channel closed") - case <-time.After(2 * time.Second): - t.Fatal("event stream was not closed after 2 seconds") - } -} - -func TestFsnotifyDirOnly(t *testing.T) { - watcher := newWatcher(t) - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - // Create a file before watching directory - // This should NOT add any events to the fsnotify event queue - testFileAlreadyExists := filepath.Join(testDir, "TestFsnotifyEventsExisting.testfile") - { - var f *os.File - f, err := os.OpenFile(testFileAlreadyExists, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - f.Close() - } - - addWatch(t, watcher, testDir) - - // Receive errors on the error channel on a separate goroutine - go func() { - for err := range watcher.Errors { - t.Fatalf("error received: %s", err) - } - }() - - testFile := filepath.Join(testDir, "TestFsnotifyDirOnly.testfile") - - // Receive events on the event channel on a separate goroutine - eventstream := watcher.Events - var createReceived, modifyReceived, deleteReceived counter - done := make(chan bool) - go func() { - for event := range eventstream { - // Only count relevant events - if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) || event.Name == filepath.Clean(testFileAlreadyExists) { - t.Logf("event received: %s", event) - if event.Op&Remove == Remove { - deleteReceived.increment() - } - if event.Op&Write == Write { - modifyReceived.increment() - } - if event.Op&Create == Create { - createReceived.increment() - } - } else { - t.Logf("unexpected event received: %s", event) - } - } - done <- true - }() - - // Create a file - // This should add at least one event to the fsnotify event queue - var f *os.File - f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - - time.Sleep(time.Millisecond) - f.WriteString("data") - f.Sync() - f.Close() - - time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete - - os.Remove(testFile) - os.Remove(testFileAlreadyExists) - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - cReceived := createReceived.value() - if cReceived != 1 { - t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 1) - } - mReceived := modifyReceived.value() - if mReceived != 1 { - t.Fatalf("incorrect number of modify events received after 500 ms (%d vs %d)", mReceived, 1) - } - dReceived := deleteReceived.value() - if dReceived != 2 { - t.Fatalf("incorrect number of delete events received after 500 ms (%d vs %d)", dReceived, 2) - } - - // Try closing the fsnotify instance - t.Log("calling Close()") - watcher.Close() - t.Log("waiting for the event channel to become closed...") - select { - case <-done: - t.Log("event channel closed") - case <-time.After(2 * time.Second): - t.Fatal("event stream was not closed after 2 seconds") - } -} - -func TestFsnotifyDeleteWatchedDir(t *testing.T) { - watcher := newWatcher(t) - defer watcher.Close() - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - // Create a file before watching directory - testFileAlreadyExists := filepath.Join(testDir, "TestFsnotifyEventsExisting.testfile") - { - var f *os.File - f, err := os.OpenFile(testFileAlreadyExists, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - f.Close() - } - - addWatch(t, watcher, testDir) - - // Add a watch for testFile - addWatch(t, watcher, testFileAlreadyExists) - - // Receive errors on the error channel on a separate goroutine - go func() { - for err := range watcher.Errors { - t.Fatalf("error received: %s", err) - } - }() - - // Receive events on the event channel on a separate goroutine - eventstream := watcher.Events - var deleteReceived counter - go func() { - for event := range eventstream { - // Only count relevant events - if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFileAlreadyExists) { - t.Logf("event received: %s", event) - if event.Op&Remove == Remove { - deleteReceived.increment() - } - } else { - t.Logf("unexpected event received: %s", event) - } - } - }() - - os.RemoveAll(testDir) - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - dReceived := deleteReceived.value() - if dReceived < 2 { - t.Fatalf("did not receive at least %d delete events, received %d after 500 ms", 2, dReceived) - } -} - -func TestFsnotifySubDir(t *testing.T) { - watcher := newWatcher(t) - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - testFile1 := filepath.Join(testDir, "TestFsnotifyFile1.testfile") - testSubDir := filepath.Join(testDir, "sub") - testSubDirFile := filepath.Join(testDir, "sub/TestFsnotifyFile1.testfile") - - // Receive errors on the error channel on a separate goroutine - go func() { - for err := range watcher.Errors { - t.Fatalf("error received: %s", err) - } - }() - - // Receive events on the event channel on a separate goroutine - eventstream := watcher.Events - var createReceived, deleteReceived counter - done := make(chan bool) - go func() { - for event := range eventstream { - // Only count relevant events - if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testSubDir) || event.Name == filepath.Clean(testFile1) { - t.Logf("event received: %s", event) - if event.Op&Create == Create { - createReceived.increment() - } - if event.Op&Remove == Remove { - deleteReceived.increment() - } - } else { - t.Logf("unexpected event received: %s", event) - } - } - done <- true - }() - - addWatch(t, watcher, testDir) - - // Create sub-directory - if err := os.Mkdir(testSubDir, 0777); err != nil { - t.Fatalf("failed to create test sub-directory: %s", err) - } - - // Create a file - var f *os.File - f, err := os.OpenFile(testFile1, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - f.Close() - - // Create a file (Should not see this! we are not watching subdir) - var fs *os.File - fs, err = os.OpenFile(testSubDirFile, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - fs.Sync() - fs.Close() - - time.Sleep(200 * time.Millisecond) - - // Make sure receive deletes for both file and sub-directory - os.RemoveAll(testSubDir) - os.Remove(testFile1) - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - cReceived := createReceived.value() - if cReceived != 2 { - t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 2) - } - dReceived := deleteReceived.value() - if dReceived != 2 { - t.Fatalf("incorrect number of delete events received after 500 ms (%d vs %d)", dReceived, 2) - } - - // Try closing the fsnotify instance - t.Log("calling Close()") - watcher.Close() - t.Log("waiting for the event channel to become closed...") - select { - case <-done: - t.Log("event channel closed") - case <-time.After(2 * time.Second): - t.Fatal("event stream was not closed after 2 seconds") - } -} - -func TestFsnotifyRename(t *testing.T) { - watcher := newWatcher(t) - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - addWatch(t, watcher, testDir) - - // Receive errors on the error channel on a separate goroutine - go func() { - for err := range watcher.Errors { - t.Fatalf("error received: %s", err) - } - }() - - testFile := filepath.Join(testDir, "TestFsnotifyEvents.testfile") - testFileRenamed := filepath.Join(testDir, "TestFsnotifyEvents.testfileRenamed") - - // Receive events on the event channel on a separate goroutine - eventstream := watcher.Events - var renameReceived counter - done := make(chan bool) - go func() { - for event := range eventstream { - // Only count relevant events - if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) || event.Name == filepath.Clean(testFileRenamed) { - if event.Op&Rename == Rename { - renameReceived.increment() - } - t.Logf("event received: %s", event) - } else { - t.Logf("unexpected event received: %s", event) - } - } - done <- true - }() - - // Create a file - // This should add at least one event to the fsnotify event queue - var f *os.File - f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - - f.WriteString("data") - f.Sync() - f.Close() - - // Add a watch for testFile - addWatch(t, watcher, testFile) - - if err := testRename(testFile, testFileRenamed); err != nil { - t.Fatalf("rename failed: %s", err) - } - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - if renameReceived.value() == 0 { - t.Fatal("fsnotify rename events have not been received after 500 ms") - } - - // Try closing the fsnotify instance - t.Log("calling Close()") - watcher.Close() - t.Log("waiting for the event channel to become closed...") - select { - case <-done: - t.Log("event channel closed") - case <-time.After(2 * time.Second): - t.Fatal("event stream was not closed after 2 seconds") - } - - os.Remove(testFileRenamed) -} - -func TestFsnotifyRenameToCreate(t *testing.T) { - watcher := newWatcher(t) - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - // Create directory to get file - testDirFrom := tempMkdir(t) - defer os.RemoveAll(testDirFrom) - - addWatch(t, watcher, testDir) - - // Receive errors on the error channel on a separate goroutine - go func() { - for err := range watcher.Errors { - t.Fatalf("error received: %s", err) - } - }() - - testFile := filepath.Join(testDirFrom, "TestFsnotifyEvents.testfile") - testFileRenamed := filepath.Join(testDir, "TestFsnotifyEvents.testfileRenamed") - - // Receive events on the event channel on a separate goroutine - eventstream := watcher.Events - var createReceived counter - done := make(chan bool) - go func() { - for event := range eventstream { - // Only count relevant events - if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) || event.Name == filepath.Clean(testFileRenamed) { - if event.Op&Create == Create { - createReceived.increment() - } - t.Logf("event received: %s", event) - } else { - t.Logf("unexpected event received: %s", event) - } - } - done <- true - }() - - // Create a file - // This should add at least one event to the fsnotify event queue - var f *os.File - f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - f.Close() - - if err := testRename(testFile, testFileRenamed); err != nil { - t.Fatalf("rename failed: %s", err) - } - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - if createReceived.value() == 0 { - t.Fatal("fsnotify create events have not been received after 500 ms") - } - - // Try closing the fsnotify instance - t.Log("calling Close()") - watcher.Close() - t.Log("waiting for the event channel to become closed...") - select { - case <-done: - t.Log("event channel closed") - case <-time.After(2 * time.Second): - t.Fatal("event stream was not closed after 2 seconds") - } - - os.Remove(testFileRenamed) -} - -func TestFsnotifyRenameToOverwrite(t *testing.T) { - switch runtime.GOOS { - case "plan9", "windows": - t.Skipf("skipping test on %q (os.Rename over existing file does not create event).", runtime.GOOS) - } - - watcher := newWatcher(t) - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - // Create directory to get file - testDirFrom := tempMkdir(t) - defer os.RemoveAll(testDirFrom) - - testFile := filepath.Join(testDirFrom, "TestFsnotifyEvents.testfile") - testFileRenamed := filepath.Join(testDir, "TestFsnotifyEvents.testfileRenamed") - - // Create a file - var fr *os.File - fr, err := os.OpenFile(testFileRenamed, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - fr.Sync() - fr.Close() - - addWatch(t, watcher, testDir) - - // Receive errors on the error channel on a separate goroutine - go func() { - for err := range watcher.Errors { - t.Fatalf("error received: %s", err) - } - }() - - // Receive events on the event channel on a separate goroutine - eventstream := watcher.Events - var eventReceived counter - done := make(chan bool) - go func() { - for event := range eventstream { - // Only count relevant events - if event.Name == filepath.Clean(testFileRenamed) { - eventReceived.increment() - t.Logf("event received: %s", event) - } else { - t.Logf("unexpected event received: %s", event) - } - } - done <- true - }() - - // Create a file - // This should add at least one event to the fsnotify event queue - var f *os.File - f, err = os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - f.Close() - - if err := testRename(testFile, testFileRenamed); err != nil { - t.Fatalf("rename failed: %s", err) - } - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - if eventReceived.value() == 0 { - t.Fatal("fsnotify events have not been received after 500 ms") - } - - // Try closing the fsnotify instance - t.Log("calling Close()") - watcher.Close() - t.Log("waiting for the event channel to become closed...") - select { - case <-done: - t.Log("event channel closed") - case <-time.After(2 * time.Second): - t.Fatal("event stream was not closed after 2 seconds") - } - - os.Remove(testFileRenamed) -} - -func TestRemovalOfWatch(t *testing.T) { - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - // Create a file before watching directory - testFileAlreadyExists := filepath.Join(testDir, "TestFsnotifyEventsExisting.testfile") - { - var f *os.File - f, err := os.OpenFile(testFileAlreadyExists, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - f.Close() - } - - watcher := newWatcher(t) - defer watcher.Close() - - addWatch(t, watcher, testDir) - if err := watcher.Remove(testDir); err != nil { - t.Fatalf("Could not remove the watch: %v\n", err) - } - - go func() { - select { - case ev := <-watcher.Events: - t.Fatalf("We received event: %v\n", ev) - case <-time.After(500 * time.Millisecond): - t.Log("No event received, as expected.") - } - }() - - time.Sleep(200 * time.Millisecond) - // Modify the file outside of the watched dir - f, err := os.Open(testFileAlreadyExists) - if err != nil { - t.Fatalf("Open test file failed: %s", err) - } - f.WriteString("data") - f.Sync() - f.Close() - if err := os.Chmod(testFileAlreadyExists, 0700); err != nil { - t.Fatalf("chmod failed: %s", err) - } - time.Sleep(400 * time.Millisecond) -} - -func TestFsnotifyAttrib(t *testing.T) { - if runtime.GOOS == "windows" { - t.Skip("attributes don't work on Windows.") - } - - watcher := newWatcher(t) - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - // Receive errors on the error channel on a separate goroutine - go func() { - for err := range watcher.Errors { - t.Fatalf("error received: %s", err) - } - }() - - testFile := filepath.Join(testDir, "TestFsnotifyAttrib.testfile") - - // Receive events on the event channel on a separate goroutine - eventstream := watcher.Events - // The modifyReceived counter counts IsModify events that are not IsAttrib, - // and the attribReceived counts IsAttrib events (which are also IsModify as - // a consequence). - var modifyReceived counter - var attribReceived counter - done := make(chan bool) - go func() { - for event := range eventstream { - // Only count relevant events - if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) { - if event.Op&Write == Write { - modifyReceived.increment() - } - if event.Op&Chmod == Chmod { - attribReceived.increment() - } - t.Logf("event received: %s", event) - } else { - t.Logf("unexpected event received: %s", event) - } - } - done <- true - }() - - // Create a file - // This should add at least one event to the fsnotify event queue - var f *os.File - f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - - f.WriteString("data") - f.Sync() - f.Close() - - // Add a watch for testFile - addWatch(t, watcher, testFile) - - if err := os.Chmod(testFile, 0700); err != nil { - t.Fatalf("chmod failed: %s", err) - } - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - // Creating/writing a file changes also the mtime, so IsAttrib should be set to true here - time.Sleep(500 * time.Millisecond) - if modifyReceived.value() != 0 { - t.Fatal("received an unexpected modify event when creating a test file") - } - if attribReceived.value() == 0 { - t.Fatal("fsnotify attribute events have not received after 500 ms") - } - - // Modifying the contents of the file does not set the attrib flag (although eg. the mtime - // might have been modified). - modifyReceived.reset() - attribReceived.reset() - - f, err = os.OpenFile(testFile, os.O_WRONLY, 0) - if err != nil { - t.Fatalf("reopening test file failed: %s", err) - } - - f.WriteString("more data") - f.Sync() - f.Close() - - time.Sleep(500 * time.Millisecond) - - if modifyReceived.value() != 1 { - t.Fatal("didn't receive a modify event after changing test file contents") - } - - if attribReceived.value() != 0 { - t.Fatal("did receive an unexpected attrib event after changing test file contents") - } - - modifyReceived.reset() - attribReceived.reset() - - // Doing a chmod on the file should trigger an event with the "attrib" flag set (the contents - // of the file are not changed though) - if err := os.Chmod(testFile, 0600); err != nil { - t.Fatalf("chmod failed: %s", err) - } - - time.Sleep(500 * time.Millisecond) - - if attribReceived.value() != 1 { - t.Fatal("didn't receive an attribute change after 500ms") - } - - // Try closing the fsnotify instance - t.Log("calling Close()") - watcher.Close() - t.Log("waiting for the event channel to become closed...") - select { - case <-done: - t.Log("event channel closed") - case <-time.After(1e9): - t.Fatal("event stream was not closed after 1 second") - } - - os.Remove(testFile) -} - -func TestFsnotifyClose(t *testing.T) { - watcher := newWatcher(t) - watcher.Close() - - var done int32 - go func() { - watcher.Close() - atomic.StoreInt32(&done, 1) - }() - - time.Sleep(50e6) // 50 ms - if atomic.LoadInt32(&done) == 0 { - t.Fatal("double Close() test failed: second Close() call didn't return") - } - - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - if err := watcher.Add(testDir); err == nil { - t.Fatal("expected error on Watch() after Close(), got nil") - } -} - -func TestFsnotifyFakeSymlink(t *testing.T) { - if runtime.GOOS == "windows" { - t.Skip("symlinks don't work on Windows.") - } - - watcher := newWatcher(t) - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - var errorsReceived counter - // Receive errors on the error channel on a separate goroutine - go func() { - for errors := range watcher.Errors { - t.Logf("Received error: %s", errors) - errorsReceived.increment() - } - }() - - // Count the CREATE events received - var createEventsReceived, otherEventsReceived counter - go func() { - for ev := range watcher.Events { - t.Logf("event received: %s", ev) - if ev.Op&Create == Create { - createEventsReceived.increment() - } else { - otherEventsReceived.increment() - } - } - }() - - addWatch(t, watcher, testDir) - - if err := os.Symlink(filepath.Join(testDir, "zzz"), filepath.Join(testDir, "zzznew")); err != nil { - t.Fatalf("Failed to create bogus symlink: %s", err) - } - t.Logf("Created bogus symlink") - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - - // Should not be error, just no events for broken links (watching nothing) - if errorsReceived.value() > 0 { - t.Fatal("fsnotify errors have been received.") - } - if otherEventsReceived.value() > 0 { - t.Fatal("fsnotify other events received on the broken link") - } - - // Except for 1 create event (for the link itself) - if createEventsReceived.value() == 0 { - t.Fatal("fsnotify create events were not received after 500 ms") - } - if createEventsReceived.value() > 1 { - t.Fatal("fsnotify more create events received than expected") - } - - // Try closing the fsnotify instance - t.Log("calling Close()") - watcher.Close() -} - -func TestCyclicSymlink(t *testing.T) { - if runtime.GOOS == "windows" { - t.Skip("symlinks don't work on Windows.") - } - - watcher := newWatcher(t) - - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - link := path.Join(testDir, "link") - if err := os.Symlink(".", link); err != nil { - t.Fatalf("could not make symlink: %v", err) - } - addWatch(t, watcher, testDir) - - var createEventsReceived counter - go func() { - for ev := range watcher.Events { - if ev.Op&Create == Create { - createEventsReceived.increment() - } - } - }() - - if err := os.Remove(link); err != nil { - t.Fatalf("Error removing link: %v", err) - } - - // It would be nice to be able to expect a delete event here, but kqueue has - // no way for us to get events on symlinks themselves, because opening them - // opens an fd to the file to which they point. - - if err := ioutil.WriteFile(link, []byte("foo"), 0700); err != nil { - t.Fatalf("could not make symlink: %v", err) - } - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - - if got := createEventsReceived.value(); got == 0 { - t.Errorf("want at least 1 create event got %v", got) - } - - watcher.Close() -} - -// TestConcurrentRemovalOfWatch tests that concurrent calls to RemoveWatch do not race. -// See https://codereview.appspot.com/103300045/ -// go test -test.run=TestConcurrentRemovalOfWatch -test.cpu=1,1,1,1,1 -race -func TestConcurrentRemovalOfWatch(t *testing.T) { - if runtime.GOOS != "darwin" { - t.Skip("regression test for race only present on darwin") - } - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - // Create a file before watching directory - testFileAlreadyExists := filepath.Join(testDir, "TestFsnotifyEventsExisting.testfile") - { - var f *os.File - f, err := os.OpenFile(testFileAlreadyExists, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - f.Close() - } - - watcher := newWatcher(t) - defer watcher.Close() - - addWatch(t, watcher, testDir) - - // Test that RemoveWatch can be invoked concurrently, with no data races. - removed1 := make(chan struct{}) - go func() { - defer close(removed1) - watcher.Remove(testDir) - }() - removed2 := make(chan struct{}) - go func() { - close(removed2) - watcher.Remove(testDir) - }() - <-removed1 - <-removed2 -} - -func TestClose(t *testing.T) { - // Regression test for #59 bad file descriptor from Close - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - watcher := newWatcher(t) - if err := watcher.Add(testDir); err != nil { - t.Fatalf("Expected no error on Add, got %v", err) - } - err := watcher.Close() - if err != nil { - t.Fatalf("Expected no error on Close, got %v.", err) - } -} - -// TestRemoveWithClose tests if one can handle Remove events and, at the same -// time, close Watcher object without any data races. -func TestRemoveWithClose(t *testing.T) { - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - const fileN = 200 - tempFiles := make([]string, 0, fileN) - for i := 0; i < fileN; i++ { - tempFiles = append(tempFiles, tempMkFile(t, testDir)) - } - watcher := newWatcher(t) - if err := watcher.Add(testDir); err != nil { - t.Fatalf("Expected no error on Add, got %v", err) - } - startC, stopC := make(chan struct{}), make(chan struct{}) - errC := make(chan error) - go func() { - for { - select { - case <-watcher.Errors: - case <-watcher.Events: - case <-stopC: - return - } - } - }() - go func() { - <-startC - for _, fileName := range tempFiles { - os.Remove(fileName) - } - }() - go func() { - <-startC - errC <- watcher.Close() - }() - close(startC) - defer close(stopC) - if err := <-errC; err != nil { - t.Fatalf("Expected no error on Close, got %v.", err) - } -} - -func testRename(file1, file2 string) error { - switch runtime.GOOS { - case "windows", "plan9": - return os.Rename(file1, file2) - default: - cmd := exec.Command("mv", file1, file2) - return cmd.Run() - } -} diff --git a/vendor/github.com/ghodss/yaml/.gitignore b/vendor/github.com/ghodss/yaml/.gitignore deleted file mode 100644 index e256a31e..00000000 --- a/vendor/github.com/ghodss/yaml/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -# OSX leaves these everywhere on SMB shares -._* - -# Eclipse files -.classpath -.project -.settings/** - -# Emacs save files -*~ - -# Vim-related files -[._]*.s[a-w][a-z] -[._]s[a-w][a-z] -*.un~ -Session.vim -.netrwhist - -# Go test binaries -*.test diff --git a/vendor/github.com/ghodss/yaml/.travis.yml b/vendor/github.com/ghodss/yaml/.travis.yml deleted file mode 100644 index 0e9d6edc..00000000 --- a/vendor/github.com/ghodss/yaml/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: go -go: - - 1.3 - - 1.4 -script: - - go test - - go build diff --git a/vendor/github.com/ghodss/yaml/README.md b/vendor/github.com/ghodss/yaml/README.md deleted file mode 100644 index 0200f75b..00000000 --- a/vendor/github.com/ghodss/yaml/README.md +++ /dev/null @@ -1,121 +0,0 @@ -# YAML marshaling and unmarshaling support for Go - -[![Build Status](https://travis-ci.org/ghodss/yaml.svg)](https://travis-ci.org/ghodss/yaml) - -## Introduction - -A wrapper around [go-yaml](https://github.com/go-yaml/yaml) designed to enable a better way of handling YAML when marshaling to and from structs. - -In short, this library first converts YAML to JSON using go-yaml and then uses `json.Marshal` and `json.Unmarshal` to convert to or from the struct. This means that it effectively reuses the JSON struct tags as well as the custom JSON methods `MarshalJSON` and `UnmarshalJSON` unlike go-yaml. For a detailed overview of the rationale behind this method, [see this blog post](http://ghodss.com/2014/the-right-way-to-handle-yaml-in-golang/). - -## Compatibility - -This package uses [go-yaml](https://github.com/go-yaml/yaml) and therefore supports [everything go-yaml supports](https://github.com/go-yaml/yaml#compatibility). - -## Caveats - -**Caveat #1:** When using `yaml.Marshal` and `yaml.Unmarshal`, binary data should NOT be preceded with the `!!binary` YAML tag. If you do, go-yaml will convert the binary data from base64 to native binary data, which is not compatible with JSON. You can still use binary in your YAML files though - just store them without the `!!binary` tag and decode the base64 in your code (e.g. in the custom JSON methods `MarshalJSON` and `UnmarshalJSON`). This also has the benefit that your YAML and your JSON binary data will be decoded exactly the same way. As an example: - -``` -BAD: - exampleKey: !!binary gIGC - -GOOD: - exampleKey: gIGC -... and decode the base64 data in your code. -``` - -**Caveat #2:** When using `YAMLToJSON` directly, maps with keys that are maps will result in an error since this is not supported by JSON. This error will occur in `Unmarshal` as well since you can't unmarshal map keys anyways since struct fields can't be keys. - -## Installation and usage - -To install, run: - -``` -$ go get github.com/ghodss/yaml -``` - -And import using: - -``` -import "github.com/ghodss/yaml" -``` - -Usage is very similar to the JSON library: - -```go -package main - -import ( - "fmt" - - "github.com/ghodss/yaml" -) - -type Person struct { - Name string `json:"name"` // Affects YAML field names too. - Age int `json:"age"` -} - -func main() { - // Marshal a Person struct to YAML. - p := Person{"John", 30} - y, err := yaml.Marshal(p) - if err != nil { - fmt.Printf("err: %v\n", err) - return - } - fmt.Println(string(y)) - /* Output: - age: 30 - name: John - */ - - // Unmarshal the YAML back into a Person struct. - var p2 Person - err = yaml.Unmarshal(y, &p2) - if err != nil { - fmt.Printf("err: %v\n", err) - return - } - fmt.Println(p2) - /* Output: - {John 30} - */ -} -``` - -`yaml.YAMLToJSON` and `yaml.JSONToYAML` methods are also available: - -```go -package main - -import ( - "fmt" - - "github.com/ghodss/yaml" -) - -func main() { - j := []byte(`{"name": "John", "age": 30}`) - y, err := yaml.JSONToYAML(j) - if err != nil { - fmt.Printf("err: %v\n", err) - return - } - fmt.Println(string(y)) - /* Output: - name: John - age: 30 - */ - j2, err := yaml.YAMLToJSON(y) - if err != nil { - fmt.Printf("err: %v\n", err) - return - } - fmt.Println(string(j2)) - /* Output: - {"age":30,"name":"John"} - */ -} -``` diff --git a/vendor/github.com/ghodss/yaml/yaml_test.go b/vendor/github.com/ghodss/yaml/yaml_test.go deleted file mode 100644 index 505af453..00000000 --- a/vendor/github.com/ghodss/yaml/yaml_test.go +++ /dev/null @@ -1,287 +0,0 @@ -package yaml - -import ( - "fmt" - "math" - "reflect" - "strconv" - "testing" -) - -type MarshalTest struct { - A string - B int64 - // Would like to test float64, but it's not supported in go-yaml. - // (See https://github.com/go-yaml/yaml/issues/83.) - C float32 -} - -func TestMarshal(t *testing.T) { - f32String := strconv.FormatFloat(math.MaxFloat32, 'g', -1, 32) - s := MarshalTest{"a", math.MaxInt64, math.MaxFloat32} - e := []byte(fmt.Sprintf("A: a\nB: %d\nC: %s\n", math.MaxInt64, f32String)) - - y, err := Marshal(s) - if err != nil { - t.Errorf("error marshaling YAML: %v", err) - } - - if !reflect.DeepEqual(y, e) { - t.Errorf("marshal YAML was unsuccessful, expected: %#v, got: %#v", - string(e), string(y)) - } -} - -type UnmarshalString struct { - A string - True string -} - -type UnmarshalStringMap struct { - A map[string]string -} - -type UnmarshalNestedString struct { - A NestedString -} - -type NestedString struct { - A string -} - -type UnmarshalSlice struct { - A []NestedSlice -} - -type NestedSlice struct { - B string - C *string -} - -func TestUnmarshal(t *testing.T) { - y := []byte("a: 1") - s1 := UnmarshalString{} - e1 := UnmarshalString{A: "1"} - unmarshal(t, y, &s1, &e1) - - y = []byte("a: true") - s1 = UnmarshalString{} - e1 = UnmarshalString{A: "true"} - unmarshal(t, y, &s1, &e1) - - y = []byte("true: 1") - s1 = UnmarshalString{} - e1 = UnmarshalString{True: "1"} - unmarshal(t, y, &s1, &e1) - - y = []byte("a:\n a: 1") - s2 := UnmarshalNestedString{} - e2 := UnmarshalNestedString{NestedString{"1"}} - unmarshal(t, y, &s2, &e2) - - y = []byte("a:\n - b: abc\n c: def\n - b: 123\n c: 456\n") - s3 := UnmarshalSlice{} - e3 := UnmarshalSlice{[]NestedSlice{NestedSlice{"abc", strPtr("def")}, NestedSlice{"123", strPtr("456")}}} - unmarshal(t, y, &s3, &e3) - - y = []byte("a:\n b: 1") - s4 := UnmarshalStringMap{} - e4 := UnmarshalStringMap{map[string]string{"b": "1"}} - unmarshal(t, y, &s4, &e4) - - y = []byte(` -a: - name: TestA -b: - name: TestB -`) - type NamedThing struct { - Name string `json:"name"` - } - s5 := map[string]*NamedThing{} - e5 := map[string]*NamedThing{ - "a": &NamedThing{Name: "TestA"}, - "b": &NamedThing{Name: "TestB"}, - } - unmarshal(t, y, &s5, &e5) -} - -func unmarshal(t *testing.T, y []byte, s, e interface{}) { - err := Unmarshal(y, s) - if err != nil { - t.Errorf("error unmarshaling YAML: %v", err) - } - - if !reflect.DeepEqual(s, e) { - t.Errorf("unmarshal YAML was unsuccessful, expected: %+#v, got: %+#v", - e, s) - } -} - -type Case struct { - input string - output string - // By default we test that reversing the output == input. But if there is a - // difference in the reversed output, you can optionally specify it here. - reverse *string -} - -type RunType int - -const ( - RunTypeJSONToYAML RunType = iota - RunTypeYAMLToJSON -) - -func TestJSONToYAML(t *testing.T) { - cases := []Case{ - { - `{"t":"a"}`, - "t: a\n", - nil, - }, { - `{"t":null}`, - "t: null\n", - nil, - }, - } - - runCases(t, RunTypeJSONToYAML, cases) -} - -func TestYAMLToJSON(t *testing.T) { - cases := []Case{ - { - "t: a\n", - `{"t":"a"}`, - nil, - }, { - "t: \n", - `{"t":null}`, - strPtr("t: null\n"), - }, { - "t: null\n", - `{"t":null}`, - nil, - }, { - "1: a\n", - `{"1":"a"}`, - strPtr("\"1\": a\n"), - }, { - "1000000000000000000000000000000000000: a\n", - `{"1e+36":"a"}`, - strPtr("\"1e+36\": a\n"), - }, { - "1e+36: a\n", - `{"1e+36":"a"}`, - strPtr("\"1e+36\": a\n"), - }, { - "\"1e+36\": a\n", - `{"1e+36":"a"}`, - nil, - }, { - "\"1.2\": a\n", - `{"1.2":"a"}`, - nil, - }, { - "- t: a\n", - `[{"t":"a"}]`, - nil, - }, { - "- t: a\n" + - "- t:\n" + - " b: 1\n" + - " c: 2\n", - `[{"t":"a"},{"t":{"b":1,"c":2}}]`, - nil, - }, { - `[{t: a}, {t: {b: 1, c: 2}}]`, - `[{"t":"a"},{"t":{"b":1,"c":2}}]`, - strPtr("- t: a\n" + - "- t:\n" + - " b: 1\n" + - " c: 2\n"), - }, { - "- t: \n", - `[{"t":null}]`, - strPtr("- t: null\n"), - }, { - "- t: null\n", - `[{"t":null}]`, - nil, - }, - } - - // Cases that should produce errors. - _ = []Case{ - { - "~: a", - `{"null":"a"}`, - nil, - }, { - "a: !!binary gIGC\n", - "{\"a\":\"\x80\x81\x82\"}", - nil, - }, - } - - runCases(t, RunTypeYAMLToJSON, cases) -} - -func runCases(t *testing.T, runType RunType, cases []Case) { - var f func([]byte) ([]byte, error) - var invF func([]byte) ([]byte, error) - var msg string - var invMsg string - if runType == RunTypeJSONToYAML { - f = JSONToYAML - invF = YAMLToJSON - msg = "JSON to YAML" - invMsg = "YAML back to JSON" - } else { - f = YAMLToJSON - invF = JSONToYAML - msg = "YAML to JSON" - invMsg = "JSON back to YAML" - } - - for _, c := range cases { - // Convert the string. - t.Logf("converting %s\n", c.input) - output, err := f([]byte(c.input)) - if err != nil { - t.Errorf("Failed to convert %s, input: `%s`, err: %v", msg, c.input, err) - } - - // Check it against the expected output. - if string(output) != c.output { - t.Errorf("Failed to convert %s, input: `%s`, expected `%s`, got `%s`", - msg, c.input, c.output, string(output)) - } - - // Set the string that we will compare the reversed output to. - reverse := c.input - // If a special reverse string was specified, use that instead. - if c.reverse != nil { - reverse = *c.reverse - } - - // Reverse the output. - input, err := invF(output) - if err != nil { - t.Errorf("Failed to convert %s, input: `%s`, err: %v", invMsg, string(output), err) - } - - // Check the reverse is equal to the input (or to *c.reverse). - if string(input) != reverse { - t.Errorf("Failed to convert %s, input: `%s`, expected `%s`, got `%s`", - invMsg, string(output), reverse, string(input)) - } - } - -} - -// To be able to easily fill in the *Case.reverse string above. -func strPtr(s string) *string { - return &s -} diff --git a/vendor/github.com/gogo/protobuf/.gitignore b/vendor/github.com/gogo/protobuf/.gitignore deleted file mode 100644 index 82f4de4a..00000000 --- a/vendor/github.com/gogo/protobuf/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -._* -*.js -*.js.map - -# Conformance test output and transient files. -conformance/failing_tests.txt \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/.mailmap b/vendor/github.com/gogo/protobuf/.mailmap deleted file mode 100644 index bc001021..00000000 --- a/vendor/github.com/gogo/protobuf/.mailmap +++ /dev/null @@ -1,8 +0,0 @@ -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/vendor/github.com/gogo/protobuf/.travis.yml b/vendor/github.com/gogo/protobuf/.travis.yml deleted file mode 100644 index 8ec6af6a..00000000 --- a/vendor/github.com/gogo/protobuf/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -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/vendor/github.com/gogo/protobuf/Makefile b/vendor/github.com/gogo/protobuf/Makefile deleted file mode 100644 index 43f6e694..00000000 --- a/vendor/github.com/gogo/protobuf/Makefile +++ /dev/null @@ -1,167 +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. - -GO_VERSION:=$(shell go version) - -.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 - -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 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 - -update: - (cd protobuf && make update) diff --git a/vendor/github.com/gogo/protobuf/README b/vendor/github.com/gogo/protobuf/README deleted file mode 100644 index e4356077..00000000 --- a/vendor/github.com/gogo/protobuf/README +++ /dev/null @@ -1,299 +0,0 @@ -GoGoProtobuf http://github.com/gogo/protobuf extends -GoProtobuf http://github.com/golang/protobuf - -# 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/vendor/github.com/gogo/protobuf/Readme.md b/vendor/github.com/gogo/protobuf/Readme.md deleted file mode 100644 index 0a900fe7..00000000 --- a/vendor/github.com/gogo/protobuf/Readme.md +++ /dev/null @@ -1,151 +0,0 @@ -# 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 - -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 - -## 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. - - - diff --git a/vendor/github.com/gogo/protobuf/bench.md b/vendor/github.com/gogo/protobuf/bench.md deleted file mode 100644 index 16da66ad..00000000 --- a/vendor/github.com/gogo/protobuf/bench.md +++ /dev/null @@ -1,190 +0,0 @@ -# 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/vendor/github.com/gogo/protobuf/custom_types.md b/vendor/github.com/gogo/protobuf/custom_types.md deleted file mode 100644 index 3eed249b..00000000 --- a/vendor/github.com/gogo/protobuf/custom_types.md +++ /dev/null @@ -1,68 +0,0 @@ -# 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/vendor/github.com/gogo/protobuf/extensions.md b/vendor/github.com/gogo/protobuf/extensions.md deleted file mode 100644 index af4ab57c..00000000 --- a/vendor/github.com/gogo/protobuf/extensions.md +++ /dev/null @@ -1,164 +0,0 @@ -# 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/vendor/github.com/gogo/protobuf/gogoproto/Makefile b/vendor/github.com/gogo/protobuf/gogoproto/Makefile deleted file mode 100644 index 0b4659b7..00000000 --- a/vendor/github.com/gogo/protobuf/gogoproto/Makefile +++ /dev/null @@ -1,37 +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. - -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 - -restore: - cp gogo.pb.golden gogo.pb.go - -preserve: - cp gogo.pb.go gogo.pb.golden diff --git a/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.golden b/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.golden deleted file mode 100644 index f6502e4b..00000000 --- a/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.golden +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by protoc-gen-go. -// source: gogo.proto -// DO NOT EDIT! - -package gogoproto - -import proto "github.com/gogo/protobuf/proto" -import json "encoding/json" -import math "math" -import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -// Reference proto, json, and math imports to suppress error if they are not otherwise used. -var _ = proto.Marshal -var _ = &json.SyntaxError{} -var _ = math.Inf - -var E_Nullable = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 51235, - Name: "gogoproto.nullable", - Tag: "varint,51235,opt,name=nullable", -} - -var E_Embed = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 51236, - Name: "gogoproto.embed", - Tag: "varint,51236,opt,name=embed", -} - -var E_Customtype = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 51237, - Name: "gogoproto.customtype", - Tag: "bytes,51237,opt,name=customtype", -} - -func init() { - proto.RegisterExtension(E_Nullable) - proto.RegisterExtension(E_Embed) - proto.RegisterExtension(E_Customtype) -} diff --git a/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto b/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto deleted file mode 100644 index bc8d889f..00000000 --- a/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto +++ /dev/null @@ -1,136 +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. - -syntax = "proto2"; -package gogoproto; - -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; - optional bool goproto_enum_stringer = 62021; - optional bool enum_stringer = 62022; - optional string enum_customname = 62023; - optional bool enumdecl = 62024; -} - -extend google.protobuf.EnumValueOptions { - optional string enumvalue_customname = 66001; -} - -extend google.protobuf.FileOptions { - optional bool goproto_getters_all = 63001; - optional bool goproto_enum_prefix_all = 63002; - optional bool goproto_stringer_all = 63003; - optional bool verbose_equal_all = 63004; - optional bool face_all = 63005; - optional bool gostring_all = 63006; - optional bool populate_all = 63007; - optional bool stringer_all = 63008; - optional bool onlyone_all = 63009; - - optional bool equal_all = 63013; - optional bool description_all = 63014; - optional bool testgen_all = 63015; - optional bool benchgen_all = 63016; - optional bool marshaler_all = 63017; - optional bool unmarshaler_all = 63018; - optional bool stable_marshaler_all = 63019; - - optional bool sizer_all = 63020; - - optional bool goproto_enum_stringer_all = 63021; - optional bool enum_stringer_all = 63022; - - optional bool unsafe_marshaler_all = 63023; - optional bool unsafe_unmarshaler_all = 63024; - - optional bool goproto_extensions_map_all = 63025; - optional bool goproto_unrecognized_all = 63026; - optional bool gogoproto_import = 63027; - optional bool protosizer_all = 63028; - optional bool compare_all = 63029; - optional bool typedecl_all = 63030; - optional bool enumdecl_all = 63031; - - optional bool goproto_registration = 63032; - optional bool messagename_all = 63033; -} - -extend google.protobuf.MessageOptions { - optional bool goproto_getters = 64001; - optional bool goproto_stringer = 64003; - optional bool verbose_equal = 64004; - optional bool face = 64005; - optional bool gostring = 64006; - optional bool populate = 64007; - optional bool stringer = 67008; - optional bool onlyone = 64009; - - optional bool equal = 64013; - optional bool description = 64014; - optional bool testgen = 64015; - optional bool benchgen = 64016; - optional bool marshaler = 64017; - optional bool unmarshaler = 64018; - optional bool stable_marshaler = 64019; - - optional bool sizer = 64020; - - optional bool unsafe_marshaler = 64023; - optional bool unsafe_unmarshaler = 64024; - - optional bool goproto_extensions_map = 64025; - optional bool goproto_unrecognized = 64026; - - optional bool protosizer = 64028; - optional bool compare = 64029; - - optional bool typedecl = 64030; - - optional bool messagename = 64033; -} - -extend google.protobuf.FieldOptions { - optional bool nullable = 65001; - optional bool embed = 65002; - optional string customtype = 65003; - optional string customname = 65004; - optional string jsontag = 65005; - optional string moretags = 65006; - optional string casttype = 65007; - optional string castkey = 65008; - optional string castvalue = 65009; - - optional bool stdtime = 65010; - optional bool stdduration = 65011; -} diff --git a/vendor/github.com/gogo/protobuf/install-protobuf.sh b/vendor/github.com/gogo/protobuf/install-protobuf.sh deleted file mode 100755 index f42fc9e6..00000000 --- a/vendor/github.com/gogo/protobuf/install-protobuf.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/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/vendor/github.com/gogo/protobuf/proto/Makefile b/vendor/github.com/gogo/protobuf/proto/Makefile deleted file mode 100644 index 00d65f32..00000000 --- a/vendor/github.com/gogo/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 test_proto - make -C proto3_proto - make diff --git a/vendor/github.com/gogo/protobuf/proto/all_test.go b/vendor/github.com/gogo/protobuf/proto/all_test.go deleted file mode 100644 index bdb08f20..00000000 --- a/vendor/github.com/gogo/protobuf/proto/all_test.go +++ /dev/null @@ -1,2421 +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. - -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/vendor/github.com/gogo/protobuf/proto/any_test.go b/vendor/github.com/gogo/protobuf/proto/any_test.go deleted file mode 100644 index c0e10f22..00000000 --- a/vendor/github.com/gogo/protobuf/proto/any_test.go +++ /dev/null @@ -1,300 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2016 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package 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/vendor/github.com/gogo/protobuf/proto/clone_test.go b/vendor/github.com/gogo/protobuf/proto/clone_test.go deleted file mode 100644 index ac4b919b..00000000 --- a/vendor/github.com/gogo/protobuf/proto/clone_test.go +++ /dev/null @@ -1,397 +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. - -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/vendor/github.com/gogo/protobuf/proto/decode_test.go b/vendor/github.com/gogo/protobuf/proto/decode_test.go deleted file mode 100644 index 03c5d0d5..00000000 --- a/vendor/github.com/gogo/protobuf/proto/decode_test.go +++ /dev/null @@ -1,259 +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. - -// +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<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/vendor/github.com/gogo/protobuf/proto/map_test.go b/vendor/github.com/gogo/protobuf/proto/map_test.go deleted file mode 100644 index 467791bb..00000000 --- a/vendor/github.com/gogo/protobuf/proto/map_test.go +++ /dev/null @@ -1,70 +0,0 @@ -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/vendor/github.com/gogo/protobuf/proto/message_set_test.go b/vendor/github.com/gogo/protobuf/proto/message_set_test.go deleted file mode 100644 index 756cea27..00000000 --- a/vendor/github.com/gogo/protobuf/proto/message_set_test.go +++ /dev/null @@ -1,77 +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. - -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/vendor/github.com/gogo/protobuf/proto/proto3_test.go b/vendor/github.com/gogo/protobuf/proto/proto3_test.go deleted file mode 100644 index 3909aebc..00000000 --- a/vendor/github.com/gogo/protobuf/proto/proto3_test.go +++ /dev/null @@ -1,151 +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. - -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/vendor/github.com/gogo/protobuf/proto/size2_test.go b/vendor/github.com/gogo/protobuf/proto/size2_test.go deleted file mode 100644 index 7846b061..00000000 --- a/vendor/github.com/gogo/protobuf/proto/size2_test.go +++ /dev/null @@ -1,63 +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. - -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/vendor/github.com/gogo/protobuf/proto/size_test.go b/vendor/github.com/gogo/protobuf/proto/size_test.go deleted file mode 100644 index 121e26bc..00000000 --- a/vendor/github.com/gogo/protobuf/proto/size_test.go +++ /dev/null @@ -1,190 +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. - -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/vendor/github.com/gogo/protobuf/proto/text_parser_test.go b/vendor/github.com/gogo/protobuf/proto/text_parser_test.go deleted file mode 100644 index ff235cff..00000000 --- a/vendor/github.com/gogo/protobuf/proto/text_parser_test.go +++ /dev/null @@ -1,706 +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. - -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/vendor/github.com/gogo/protobuf/proto/text_test.go b/vendor/github.com/gogo/protobuf/proto/text_test.go deleted file mode 100644 index d7c6a8d2..00000000 --- a/vendor/github.com/gogo/protobuf/proto/text_test.go +++ /dev/null @@ -1,518 +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. - -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/vendor/github.com/gogo/protobuf/protoc-gen-gogo/Makefile b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/Makefile deleted file mode 100644 index 52e2d4e7..00000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/Makefile +++ /dev/null @@ -1,41 +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: test - -test: - go test - make -C testdata test - -regenerate: - go test --regenerate - make -C descriptor regenerate - make -C plugin regenerate diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/Makefile b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/Makefile deleted file mode 100644 index 3496dc99..00000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/Makefile +++ /dev/null @@ -1,36 +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. - -regenerate: - go install github.com/gogo/protobuf/protoc-gen-gogo - go install github.com/gogo/protobuf/protoc-gen-gostring - protoc --gogo_out=. -I=../../protobuf/google/protobuf ../../protobuf/google/protobuf/descriptor.proto - protoc --gostring_out=. -I=../../protobuf/google/protobuf ../../protobuf/google/protobuf/descriptor.proto diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_test.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_test.go deleted file mode 100644 index fb55e272..00000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_test.go +++ /dev/null @@ -1,31 +0,0 @@ -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/vendor/github.com/gogo/protobuf/protoc-gen-gogo/doc.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/doc.go deleted file mode 100644 index 15c7cf43..00000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/doc.go +++ /dev/null @@ -1,51 +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 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/vendor/github.com/gogo/protobuf/protoc-gen-gogo/golden_test.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/golden_test.go deleted file mode 100644 index f3486d1d..00000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/golden_test.go +++ /dev/null @@ -1,407 +0,0 @@ -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/vendor/github.com/gogo/protobuf/protoc-gen-gogo/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/main.go deleted file mode 100644 index dd8e7950..00000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/main.go +++ /dev/null @@ -1,57 +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. - -// 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/vendor/github.com/golang/glog/README b/vendor/github.com/golang/glog/README deleted file mode 100644 index 387b4eb6..00000000 --- a/vendor/github.com/golang/glog/README +++ /dev/null @@ -1,44 +0,0 @@ -glog -==== - -Leveled execution logs for Go. - -This is an efficient pure Go implementation of leveled logs in the -manner of the open source C++ package - https://github.com/google/glog - -By binding methods to booleans it is possible to use the log package -without paying the expense of evaluating the arguments to the log. -Through the -vmodule flag, the package also provides fine-grained -control over logging at the file level. - -The comment from glog.go introduces the ideas: - - Package glog implements logging analogous to the Google-internal - C++ INFO/ERROR/V setup. It provides functions Info, Warning, - Error, Fatal, plus formatting variants such as Infof. It - also provides V-style logging controlled by the -v and - -vmodule=file=2 flags. - - Basic examples: - - glog.Info("Prepare to repel boarders") - - glog.Fatalf("Initialization failed: %s", err) - - See the documentation for the V function for an explanation - of these examples: - - if glog.V(2) { - glog.Info("Starting transaction...") - } - - glog.V(2).Infoln("Processed", nItems, "elements") - - -The repository contains an open source version of the log package -used inside Google. The master copy of the source lives inside -Google, not here. The code in this repo is for export only and is not itself -under development. Feature requests will be ignored. - -Send bug reports to golang-nuts@googlegroups.com. diff --git a/vendor/github.com/golang/glog/glog_test.go b/vendor/github.com/golang/glog/glog_test.go deleted file mode 100644 index 0fb376e1..00000000 --- a/vendor/github.com/golang/glog/glog_test.go +++ /dev/null @@ -1,415 +0,0 @@ -// Go support for leveled logs, analogous to https://code.google.com/p/google-glog/ -// -// Copyright 2013 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 glog - -import ( - "bytes" - "fmt" - stdLog "log" - "path/filepath" - "runtime" - "strconv" - "strings" - "testing" - "time" -) - -// Test that shortHostname works as advertised. -func TestShortHostname(t *testing.T) { - for hostname, expect := range map[string]string{ - "": "", - "host": "host", - "host.google.com": "host", - } { - if got := shortHostname(hostname); expect != got { - t.Errorf("shortHostname(%q): expected %q, got %q", hostname, expect, got) - } - } -} - -// flushBuffer wraps a bytes.Buffer to satisfy flushSyncWriter. -type flushBuffer struct { - bytes.Buffer -} - -func (f *flushBuffer) Flush() error { - return nil -} - -func (f *flushBuffer) Sync() error { - return nil -} - -// swap sets the log writers and returns the old array. -func (l *loggingT) swap(writers [numSeverity]flushSyncWriter) (old [numSeverity]flushSyncWriter) { - l.mu.Lock() - defer l.mu.Unlock() - old = l.file - for i, w := range writers { - logging.file[i] = w - } - return -} - -// newBuffers sets the log writers to all new byte buffers and returns the old array. -func (l *loggingT) newBuffers() [numSeverity]flushSyncWriter { - return l.swap([numSeverity]flushSyncWriter{new(flushBuffer), new(flushBuffer), new(flushBuffer), new(flushBuffer)}) -} - -// contents returns the specified log value as a string. -func contents(s severity) string { - return logging.file[s].(*flushBuffer).String() -} - -// contains reports whether the string is contained in the log. -func contains(s severity, str string, t *testing.T) bool { - return strings.Contains(contents(s), str) -} - -// setFlags configures the logging flags how the test expects them. -func setFlags() { - logging.toStderr = false -} - -// Test that Info works as advertised. -func TestInfo(t *testing.T) { - setFlags() - defer logging.swap(logging.newBuffers()) - Info("test") - if !contains(infoLog, "I", t) { - t.Errorf("Info has wrong character: %q", contents(infoLog)) - } - if !contains(infoLog, "test", t) { - t.Error("Info failed") - } -} - -func TestInfoDepth(t *testing.T) { - setFlags() - defer logging.swap(logging.newBuffers()) - - f := func() { InfoDepth(1, "depth-test1") } - - // The next three lines must stay together - _, _, wantLine, _ := runtime.Caller(0) - InfoDepth(0, "depth-test0") - f() - - msgs := strings.Split(strings.TrimSuffix(contents(infoLog), "\n"), "\n") - if len(msgs) != 2 { - t.Fatalf("Got %d lines, expected 2", len(msgs)) - } - - for i, m := range msgs { - if !strings.HasPrefix(m, "I") { - t.Errorf("InfoDepth[%d] has wrong character: %q", i, m) - } - w := fmt.Sprintf("depth-test%d", i) - if !strings.Contains(m, w) { - t.Errorf("InfoDepth[%d] missing %q: %q", i, w, m) - } - - // pull out the line number (between : and ]) - msg := m[strings.LastIndex(m, ":")+1:] - x := strings.Index(msg, "]") - if x < 0 { - t.Errorf("InfoDepth[%d]: missing ']': %q", i, m) - continue - } - line, err := strconv.Atoi(msg[:x]) - if err != nil { - t.Errorf("InfoDepth[%d]: bad line number: %q", i, m) - continue - } - wantLine++ - if wantLine != line { - t.Errorf("InfoDepth[%d]: got line %d, want %d", i, line, wantLine) - } - } -} - -func init() { - CopyStandardLogTo("INFO") -} - -// Test that CopyStandardLogTo panics on bad input. -func TestCopyStandardLogToPanic(t *testing.T) { - defer func() { - if s, ok := recover().(string); !ok || !strings.Contains(s, "LOG") { - t.Errorf(`CopyStandardLogTo("LOG") should have panicked: %v`, s) - } - }() - CopyStandardLogTo("LOG") -} - -// Test that using the standard log package logs to INFO. -func TestStandardLog(t *testing.T) { - setFlags() - defer logging.swap(logging.newBuffers()) - stdLog.Print("test") - if !contains(infoLog, "I", t) { - t.Errorf("Info has wrong character: %q", contents(infoLog)) - } - if !contains(infoLog, "test", t) { - t.Error("Info failed") - } -} - -// Test that the header has the correct format. -func TestHeader(t *testing.T) { - setFlags() - defer logging.swap(logging.newBuffers()) - defer func(previous func() time.Time) { timeNow = previous }(timeNow) - timeNow = func() time.Time { - return time.Date(2006, 1, 2, 15, 4, 5, .067890e9, time.Local) - } - pid = 1234 - Info("test") - var line int - format := "I0102 15:04:05.067890 1234 glog_test.go:%d] test\n" - n, err := fmt.Sscanf(contents(infoLog), format, &line) - if n != 1 || err != nil { - t.Errorf("log format error: %d elements, error %s:\n%s", n, err, contents(infoLog)) - } - // Scanf treats multiple spaces as equivalent to a single space, - // so check for correct space-padding also. - want := fmt.Sprintf(format, line) - if contents(infoLog) != want { - t.Errorf("log format error: got:\n\t%q\nwant:\t%q", contents(infoLog), want) - } -} - -// Test that an Error log goes to Warning and Info. -// Even in the Info log, the source character will be E, so the data should -// all be identical. -func TestError(t *testing.T) { - setFlags() - defer logging.swap(logging.newBuffers()) - Error("test") - if !contains(errorLog, "E", t) { - t.Errorf("Error has wrong character: %q", contents(errorLog)) - } - if !contains(errorLog, "test", t) { - t.Error("Error failed") - } - str := contents(errorLog) - if !contains(warningLog, str, t) { - t.Error("Warning failed") - } - if !contains(infoLog, str, t) { - t.Error("Info failed") - } -} - -// Test that a Warning log goes to Info. -// Even in the Info log, the source character will be W, so the data should -// all be identical. -func TestWarning(t *testing.T) { - setFlags() - defer logging.swap(logging.newBuffers()) - Warning("test") - if !contains(warningLog, "W", t) { - t.Errorf("Warning has wrong character: %q", contents(warningLog)) - } - if !contains(warningLog, "test", t) { - t.Error("Warning failed") - } - str := contents(warningLog) - if !contains(infoLog, str, t) { - t.Error("Info failed") - } -} - -// Test that a V log goes to Info. -func TestV(t *testing.T) { - setFlags() - defer logging.swap(logging.newBuffers()) - logging.verbosity.Set("2") - defer logging.verbosity.Set("0") - V(2).Info("test") - if !contains(infoLog, "I", t) { - t.Errorf("Info has wrong character: %q", contents(infoLog)) - } - if !contains(infoLog, "test", t) { - t.Error("Info failed") - } -} - -// Test that a vmodule enables a log in this file. -func TestVmoduleOn(t *testing.T) { - setFlags() - defer logging.swap(logging.newBuffers()) - logging.vmodule.Set("glog_test=2") - defer logging.vmodule.Set("") - if !V(1) { - t.Error("V not enabled for 1") - } - if !V(2) { - t.Error("V not enabled for 2") - } - if V(3) { - t.Error("V enabled for 3") - } - V(2).Info("test") - if !contains(infoLog, "I", t) { - t.Errorf("Info has wrong character: %q", contents(infoLog)) - } - if !contains(infoLog, "test", t) { - t.Error("Info failed") - } -} - -// Test that a vmodule of another file does not enable a log in this file. -func TestVmoduleOff(t *testing.T) { - setFlags() - defer logging.swap(logging.newBuffers()) - logging.vmodule.Set("notthisfile=2") - defer logging.vmodule.Set("") - for i := 1; i <= 3; i++ { - if V(Level(i)) { - t.Errorf("V enabled for %d", i) - } - } - V(2).Info("test") - if contents(infoLog) != "" { - t.Error("V logged incorrectly") - } -} - -// vGlobs are patterns that match/don't match this file at V=2. -var vGlobs = map[string]bool{ - // Easy to test the numeric match here. - "glog_test=1": false, // If -vmodule sets V to 1, V(2) will fail. - "glog_test=2": true, - "glog_test=3": true, // If -vmodule sets V to 1, V(3) will succeed. - // These all use 2 and check the patterns. All are true. - "*=2": true, - "?l*=2": true, - "????_*=2": true, - "??[mno]?_*t=2": true, - // These all use 2 and check the patterns. All are false. - "*x=2": false, - "m*=2": false, - "??_*=2": false, - "?[abc]?_*t=2": false, -} - -// Test that vmodule globbing works as advertised. -func testVmoduleGlob(pat string, match bool, t *testing.T) { - setFlags() - defer logging.swap(logging.newBuffers()) - defer logging.vmodule.Set("") - logging.vmodule.Set(pat) - if V(2) != Verbose(match) { - t.Errorf("incorrect match for %q: got %t expected %t", pat, V(2), match) - } -} - -// Test that a vmodule globbing works as advertised. -func TestVmoduleGlob(t *testing.T) { - for glob, match := range vGlobs { - testVmoduleGlob(glob, match, t) - } -} - -func TestRollover(t *testing.T) { - setFlags() - var err error - defer func(previous func(error)) { logExitFunc = previous }(logExitFunc) - logExitFunc = func(e error) { - err = e - } - defer func(previous uint64) { MaxSize = previous }(MaxSize) - MaxSize = 512 - - Info("x") // Be sure we have a file. - info, ok := logging.file[infoLog].(*syncBuffer) - if !ok { - t.Fatal("info wasn't created") - } - if err != nil { - t.Fatalf("info has initial error: %v", err) - } - fname0 := info.file.Name() - Info(strings.Repeat("x", int(MaxSize))) // force a rollover - if err != nil { - t.Fatalf("info has error after big write: %v", err) - } - - // Make sure the next log file gets a file name with a different - // time stamp. - // - // TODO: determine whether we need to support subsecond log - // rotation. C++ does not appear to handle this case (nor does it - // handle Daylight Savings Time properly). - time.Sleep(1 * time.Second) - - Info("x") // create a new file - if err != nil { - t.Fatalf("error after rotation: %v", err) - } - fname1 := info.file.Name() - if fname0 == fname1 { - t.Errorf("info.f.Name did not change: %v", fname0) - } - if info.nbytes >= MaxSize { - t.Errorf("file size was not reset: %d", info.nbytes) - } -} - -func TestLogBacktraceAt(t *testing.T) { - setFlags() - defer logging.swap(logging.newBuffers()) - // The peculiar style of this code simplifies line counting and maintenance of the - // tracing block below. - var infoLine string - setTraceLocation := func(file string, line int, ok bool, delta int) { - if !ok { - t.Fatal("could not get file:line") - } - _, file = filepath.Split(file) - infoLine = fmt.Sprintf("%s:%d", file, line+delta) - err := logging.traceLocation.Set(infoLine) - if err != nil { - t.Fatal("error setting log_backtrace_at: ", err) - } - } - { - // Start of tracing block. These lines know about each other's relative position. - _, file, line, ok := runtime.Caller(0) - setTraceLocation(file, line, ok, +2) // Two lines between Caller and Info calls. - Info("we want a stack trace here") - } - numAppearances := strings.Count(contents(infoLog), infoLine) - if numAppearances < 2 { - // Need 2 appearances, one in the log header and one in the trace: - // log_test.go:281: I0511 16:36:06.952398 02238 log_test.go:280] we want a stack trace here - // ... - // github.com/glog/glog_test.go:280 (0x41ba91) - // ... - // We could be more precise but that would require knowing the details - // of the traceback format, which may not be dependable. - t.Fatal("got no trace back; log is ", contents(infoLog)) - } -} - -func BenchmarkHeader(b *testing.B) { - for i := 0; i < b.N; i++ { - buf, _, _ := logging.header(infoLog, 0) - logging.putBuffer(buf) - } -} diff --git a/vendor/github.com/golang/protobuf/.gitignore b/vendor/github.com/golang/protobuf/.gitignore deleted file mode 100644 index c7dd4058..00000000 --- a/vendor/github.com/golang/protobuf/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -.DS_Store -*.[568ao] -*.ao -*.so -*.pyc -._* -.nfs.* -[568a].out -*~ -*.orig -core -_obj -_test -_testmain.go - -# Conformance test output and transient files. -conformance/failing_tests.txt diff --git a/vendor/github.com/golang/protobuf/.travis.yml b/vendor/github.com/golang/protobuf/.travis.yml deleted file mode 100644 index 455fa660..00000000 --- a/vendor/github.com/golang/protobuf/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -sudo: false -language: go -go: -- 1.6.x -- 1.10.x -- 1.x - -install: - - go get -v -d -t github.com/golang/protobuf/... - - curl -L https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip -o /tmp/protoc.zip - - unzip /tmp/protoc.zip -d "$HOME"/protoc - - mkdir -p "$HOME"/src && ln -s "$HOME"/protoc "$HOME"/src/protobuf - -env: - - PATH=$HOME/protoc/bin:$PATH - -script: - - make all - - make regenerate - # TODO(tamird): When https://github.com/travis-ci/gimme/pull/130 is - # released, make this look for "1.x". - - if [[ "$TRAVIS_GO_VERSION" == 1.10* ]]; then - if [[ "$(git status --porcelain 2>&1)" != "" ]]; then - git status >&2; - git diff -a >&2; - exit 1; - fi; - echo "git status is clean."; - fi; - - make test diff --git a/vendor/github.com/golang/protobuf/Makefile b/vendor/github.com/golang/protobuf/Makefile deleted file mode 100644 index 2bc2621a..00000000 --- a/vendor/github.com/golang/protobuf/Makefile +++ /dev/null @@ -1,48 +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: install - -install: - go install ./proto ./jsonpb ./ptypes ./protoc-gen-go - -test: - go test ./... ./protoc-gen-go/testdata - make -C conformance test - -clean: - go clean ./... - -nuke: - go clean -i ./... - -regenerate: - ./regenerate.sh diff --git a/vendor/github.com/golang/protobuf/README.md b/vendor/github.com/golang/protobuf/README.md deleted file mode 100644 index 01b29daf..00000000 --- a/vendor/github.com/golang/protobuf/README.md +++ /dev/null @@ -1,283 +0,0 @@ -# Go support for Protocol Buffers - -[![Build Status](https://travis-ci.org/golang/protobuf.svg?branch=master)](https://travis-ci.org/golang/protobuf) -[![GoDoc](https://godoc.org/github.com/golang/protobuf?status.svg)](https://godoc.org/github.com/golang/protobuf) - -Google's data interchange format. -Copyright 2010 The Go Authors. -https://github.com/golang/protobuf - -This package and the code it generates requires at least Go 1.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. - - -## Using protocol buffers with Go ## - -Once the software is installed, there are two steps to using it. -First you must compile the protocol buffer definitions and then import -them, with the support library, into your program. - -To compile the protocol buffer definition, run protoc with the --go_out -parameter set to the directory you want to output the Go code to. - - protoc --go_out=. *.proto - -The generated files will be suffixed .pb.go. See the Test code below -for an example using such a file. - -## 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/golang/protobuf/ptypes/any"; - -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 --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 - -## 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. - -The proto package converts data structures to and from the -wire format of protocol buffers. It works in concert with the -Go source code generated for .proto files by the protocol compiler. - -A summary of the properties of the protocol buffer interface -for a protocol buffer variable v: - - - Names are turned from camel_case to CamelCase for export. - - There are no methods on v to set fields; just treat - them as structure fields. - - There are getters that return a field's value if set, - and return the field's default value if unset. - The getters work even if the receiver is a nil message. - - The zero value for a struct is its correct initialization state. - All desired fields must be set before marshaling. - - A Reset() method will restore a protobuf struct to its zero state. - - Non-repeated fields are pointers to the values; nil means unset. - That is, optional or required field int32 f becomes F *int32. - - Repeated fields are slices. - - Helper functions are available to aid the setting of fields. - Helpers for getting values are superseded by the - GetFoo methods and their use is deprecated. - msg.Foo = proto.String("hello") // set field - - Constants are defined to hold the default values of all fields that - have them. They have the form Default_StructName_FieldName. - Because the getter methods handle defaulted values, - direct use of these constants should be rare. - - Enums are given type names and maps from names to values. - Enum values are prefixed with the enum's type name. Enum types have - a String method, and a Enum method to assist in message construction. - - Nested groups and enums have type names prefixed with the name of - the surrounding message type. - - Extensions are given descriptor names that start with E_, - followed by an underscore-delimited list of the nested messages - that contain it (if any) followed by the CamelCased name of the - extension field itself. HasExtension, ClearExtension, GetExtension - and SetExtension are functions for manipulating extensions. - - Oneof field sets are given a single field in their message, - with distinguished wrapper types for each possible field value. - - Marshal and Unmarshal are functions to encode and decode the wire format. - -When the .proto file specifies `syntax="proto3"`, there are some differences: - - - Non-repeated fields of non-message type are values instead of pointers. - - Enum types do not get an Enum method. - -Consider file test.proto, containing - -```proto - syntax = "proto2"; - package example; - - enum FOO { X = 17; }; - - message Test { - required string label = 1; - optional int32 type = 2 [default=77]; - repeated int64 reps = 3; - optional group OptionalGroup = 4 { - required string RequiredField = 5; - } - } -``` - -To create and play with a Test object from the example package, - -```go - package main - - import ( - "log" - - "github.com/golang/protobuf/proto" - "path/to/example" - ) - - func main() { - test := &example.Test { - Label: proto.String("hello"), - Type: proto.Int32(17), - Reps: []int64{1, 2, 3}, - Optionalgroup: &example.Test_OptionalGroup { - RequiredField: proto.String("good bye"), - }, - } - data, err := proto.Marshal(test) - if err != nil { - log.Fatal("marshaling error: ", err) - } - newTest := &example.Test{} - err = proto.Unmarshal(data, newTest) - if err != nil { - log.Fatal("unmarshaling error: ", err) - } - // Now test and newTest contain the same data. - if test.GetLabel() != newTest.GetLabel() { - log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel()) - } - // etc. - } -``` - -## Parameters ## - -To pass extra parameters to the plugin, use a comma-separated -parameter list separated from the output directory by a colon: - - protoc --go_out=plugins=grpc,import_path=mypackage:. *.proto - -- `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 --go_out=plugins=grpc:. *.proto - -## Compatibility ## - -The library and the generated code are expected to be stable over time. -However, we reserve the right to make breaking changes without notice for the -following reasons: - -- Security. A security issue in the specification or implementation may come to - light whose resolution requires breaking compatibility. We reserve the right - to address such security issues. -- Unspecified behavior. There are some aspects of the Protocol Buffers - specification that are undefined. Programs that depend on such unspecified - behavior may break in future releases. -- Specification errors or changes. If it becomes necessary to address an - inconsistency, incompleteness, or change in the Protocol Buffers - specification, resolving the issue could affect the meaning or legality of - existing programs. We reserve the right to address such issues, including - updating the implementations. -- Bugs. If the library has a bug that violates the specification, a program - that depends on the buggy behavior may break if the bug is fixed. We reserve - the right to fix such bugs. -- Adding methods or fields to generated structs. These may conflict with field - names that already exist in a schema, causing applications to break. When the - code generator encounters a field in the schema that would collide with a - generated field or method name, the code generator will append an underscore - to the generated field or method name. -- Adding, removing, or changing methods or fields in generated structs that - start with `XXX`. These parts of the generated code are exported out of - necessity, but should not be considered part of the public API. -- Adding, removing, or changing unexported symbols in generated code. - -Any breaking changes outside of these will be announced 6 months in advance to -protobuf@googlegroups.com. - -You should, whenever possible, use generated code created by the `protoc-gen-go` -tool built at the same commit as the `proto` package. The `proto` package -declares package-level constants in the form `ProtoPackageIsVersionX`. -Application code and generated code may depend on one of these constants to -ensure that compilation will fail if the available version of the proto library -is too old. Whenever we make a change to the generated code that requires newer -library support, in the same commit we will increment the version number of the -generated code and declare a new package-level constant whose name incorporates -the latest version number. Removing a compatibility constant is considered a -breaking change and would be subject to the announcement policy stated above. - -The `protoc-gen-go/generator` package exposes a plugin interface, -which is used by the gRPC code generation. This interface is not -supported and is subject to incompatible changes without notice. diff --git a/vendor/github.com/golang/protobuf/proto/all_test.go b/vendor/github.com/golang/protobuf/proto/all_test.go deleted file mode 100644 index 361f72fb..00000000 --- a/vendor/github.com/golang/protobuf/proto/all_test.go +++ /dev/null @@ -1,2410 +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. - -package proto_test - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "math" - "math/rand" - "reflect" - "runtime/debug" - "strings" - "sync" - "testing" - "time" - - . "github.com/golang/protobuf/proto" - . "github.com/golang/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{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() - bytes, err := Marshal(pb) - if _, ok := err.(*RequiredNotSetError); !ok { - fmt.Printf("marshal-1 err = %v, want *RequiredNotSetError", err) - o.DebugPrint("", bytes) - t.Fatalf("expected = %s", expected) - } - if !strings.Contains(err.Error(), "RequiredField.Label") { - t.Errorf("marshal-1 wrong err msg: %v", err) - } - if !equal(bytes, expected, t) { - o.DebugPrint("neq 1", bytes) - t.Fatalf("expected = %s", expected) - } - - // Now test Unmarshal by recreating the original buffer. - pbd := new(GoTest) - err = Unmarshal(bytes, pbd) - if _, ok := err.(*RequiredNotSetError); !ok { - t.Fatalf("unmarshal err = %v, want *RequiredNotSetError", err) - o.DebugPrint("", bytes) - 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) - } - bytes, err = Marshal(pbd) - if _, ok := err.(*RequiredNotSetError); !ok { - t.Errorf("marshal-2 err = %v, want *RequiredNotSetError", err) - o.DebugPrint("", bytes) - t.Fatalf("string = %s", expected) - } - if !strings.Contains(err.Error(), "RequiredField.Label") { - t.Errorf("marshal-2 wrong err msg: %v", err) - } - if !equal(bytes, expected, t) { - o.DebugPrint("neq 2", bytes) - 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{"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{&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") - } -} - -// 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/vendor/github.com/golang/protobuf/proto/any_test.go b/vendor/github.com/golang/protobuf/proto/any_test.go deleted file mode 100644 index 56fc97c1..00000000 --- a/vendor/github.com/golang/protobuf/proto/any_test.go +++ /dev/null @@ -1,300 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2016 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto_test - -import ( - "strings" - "testing" - - "github.com/golang/protobuf/proto" - - pb "github.com/golang/protobuf/proto/proto3_proto" - testpb "github.com/golang/protobuf/proto/test_proto" - anypb "github.com/golang/protobuf/ptypes/any" -) - -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: &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(nested), Value: nb}, - } - m2 := &pb.Message{ - Name: "David", - ResultCount: 47, - Anything: &anypb.Any{TypeUrl: "http://[::1]/type.googleapis.com/" + proto.MessageName(nested), Value: nb}, - } - m3 := &pb.Message{ - Name: "David", - ResultCount: 47, - Anything: &anypb.Any{TypeUrl: `type.googleapis.com/"/` + proto.MessageName(nested), Value: nb}, - } - m4 := &pb.Message{ - Name: "David", - ResultCount: 47, - Anything: &anypb.Any{TypeUrl: "type.googleapis.com/a/path/" + proto.MessageName(nested), Value: nb}, - } - m5 := &anypb.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: &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any1), Value: any1b}, - ManyThings: []*anypb.Any{ - &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any2), Value: any2b}, - &anypb.Any{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: &anypb.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 := &anypb.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 := &anypb.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 := &anypb.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/vendor/github.com/golang/protobuf/proto/clone_test.go b/vendor/github.com/golang/protobuf/proto/clone_test.go deleted file mode 100644 index 0d3b1273..00000000 --- a/vendor/github.com/golang/protobuf/proto/clone_test.go +++ /dev/null @@ -1,390 +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. - -package proto_test - -import ( - "testing" - - "github.com/golang/protobuf/proto" - - proto3pb "github.com/golang/protobuf/proto/proto3_proto" - pb "github.com/golang/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: &pb.FloatingPoint{F: proto.Float64(2.0)}, - 0x4002: &pb.FloatingPoint{ - 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: &pb.FloatingPoint{ - 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: &pb.FloatingPoint{F: proto.Float64(2.0)}, - 0x4002: &pb.FloatingPoint{ - 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{41}}, - dst: &pb.Communique{Union: &pb.Communique_Name{"Bobby Tables"}}, - want: &pb.Communique{Union: &pb.Communique_Number{41}}, - }, - { // Oneof nil is the same as not set. - src: &pb.Communique{}, - dst: &pb.Communique{Union: &pb.Communique_Name{"Bobby Tables"}}, - want: &pb.Communique{Union: &pb.Communique_Name{"Bobby Tables"}}, - }, - { - src: &pb.Communique{Union: &pb.Communique_Number{1337}}, - dst: &pb.Communique{}, - want: &pb.Communique{Union: &pb.Communique_Number{1337}}, - }, - { - src: &pb.Communique{Union: &pb.Communique_Col{pb.MyMessage_RED}}, - dst: &pb.Communique{}, - want: &pb.Communique{Union: &pb.Communique_Col{pb.MyMessage_RED}}, - }, - { - src: &pb.Communique{Union: &pb.Communique_Data{[]byte("hello")}}, - dst: &pb.Communique{}, - want: &pb.Communique{Union: &pb.Communique_Data{[]byte("hello")}}, - }, - { - src: &pb.Communique{Union: &pb.Communique_Msg{&pb.Strings{BytesField: []byte{1, 2, 3}}}}, - dst: &pb.Communique{}, - want: &pb.Communique{Union: &pb.Communique_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{&pb.Strings{StringField: proto.String("123")}}}, - dst: &pb.Communique{Union: &pb.Communique_Msg{&pb.Strings{BytesField: []byte{1, 2, 3}}}}, - want: &pb.Communique{Union: &pb.Communique_Msg{&pb.Strings{StringField: proto.String("123"), BytesField: []byte{1, 2, 3}}}}, - }, - { - src: &proto3pb.Message{ - Terrain: map[string]*proto3pb.Nested{ - "kay_a": &proto3pb.Nested{Cute: true}, // replace - "kay_b": &proto3pb.Nested{Bunny: "rabbit"}, // insert - }, - }, - dst: &proto3pb.Message{ - Terrain: map[string]*proto3pb.Nested{ - "kay_a": &proto3pb.Nested{Bunny: "lost"}, // replaced - "kay_c": &proto3pb.Nested{Bunny: "bunny"}, // keep - }, - }, - want: &proto3pb.Message{ - Terrain: map[string]*proto3pb.Nested{ - "kay_a": &proto3pb.Nested{Cute: true}, - "kay_b": &proto3pb.Nested{Bunny: "rabbit"}, - "kay_c": &proto3pb.Nested{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, []byte{}, []byte{0}}, - }, - dst: &pb.GoTest{}, - want: &pb.GoTest{ - F_BytesRepeated: [][]byte{nil, []byte{}, []byte{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/vendor/github.com/golang/protobuf/proto/decode_test.go b/vendor/github.com/golang/protobuf/proto/decode_test.go deleted file mode 100644 index 949be3ab..00000000 --- a/vendor/github.com/golang/protobuf/proto/decode_test.go +++ /dev/null @@ -1,255 +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. - -// +build go1.7 - -package proto_test - -import ( - "fmt" - "testing" - - "github.com/golang/protobuf/proto" - tpb "github.com/golang/protobuf/proto/proto3_proto" -) - -var msgBlackhole = new(tpb.Message) - -// 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<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: %s want: %s\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. - - var g errgroup.Group - for n := 3; n > 0; n-- { - g.Go(func() error { - _, err := proto.Marshal(m) - return err - }) - g.Go(func() error { - _, err := proto.GetExtension(m, pb.E_Ext_More) - return err - }) - } - if err := g.Wait(); err != nil { - t.Fatal(err) - } -} diff --git a/vendor/github.com/golang/protobuf/proto/map_test.go b/vendor/github.com/golang/protobuf/proto/map_test.go deleted file mode 100644 index b1e1529e..00000000 --- a/vendor/github.com/golang/protobuf/proto/map_test.go +++ /dev/null @@ -1,70 +0,0 @@ -package proto_test - -import ( - "fmt" - "reflect" - "testing" - - "github.com/golang/protobuf/proto" - ppb "github.com/golang/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/vendor/github.com/golang/protobuf/proto/message_set_test.go b/vendor/github.com/golang/protobuf/proto/message_set_test.go deleted file mode 100644 index 2c170c5f..00000000 --- a/vendor/github.com/golang/protobuf/proto/message_set_test.go +++ /dev/null @@ -1,77 +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. - -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: Extension{}} - 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/vendor/github.com/golang/protobuf/proto/proto3_test.go b/vendor/github.com/golang/protobuf/proto/proto3_test.go deleted file mode 100644 index 73eed6c0..00000000 --- a/vendor/github.com/golang/protobuf/proto/proto3_test.go +++ /dev/null @@ -1,151 +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. - -package proto_test - -import ( - "bytes" - "testing" - - "github.com/golang/protobuf/proto" - pb "github.com/golang/protobuf/proto/proto3_proto" - tpb "github.com/golang/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": &tpb.SubDefaults{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/vendor/github.com/golang/protobuf/proto/size2_test.go b/vendor/github.com/golang/protobuf/proto/size2_test.go deleted file mode 100644 index 7846b061..00000000 --- a/vendor/github.com/golang/protobuf/proto/size2_test.go +++ /dev/null @@ -1,63 +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. - -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/vendor/github.com/golang/protobuf/proto/size_test.go b/vendor/github.com/golang/protobuf/proto/size_test.go deleted file mode 100644 index 3abac418..00000000 --- a/vendor/github.com/golang/protobuf/proto/size_test.go +++ /dev/null @@ -1,191 +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. - -package proto_test - -import ( - "log" - "strings" - "testing" - - . "github.com/golang/protobuf/proto" - proto3pb "github.com/golang/protobuf/proto/proto3_proto" - pb "github.com/golang/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: []byte{}}}}, - - {"map field", &pb.MessageWithMap{NameMapping: map[int32]string{1: "Rob", 7: "Andrew"}}}, - {"map field with message", &pb.MessageWithMap{MsgMapping: map[int64]*pb.FloatingPoint{0x7001: &pb.FloatingPoint{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: []byte{}}}}, - - {"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{true}}}, - {"oneof zero int32", &pb.Oneof{Union: &pb.Oneof_F_Int32{0}}}, - {"oneof big int32", &pb.Oneof{Union: &pb.Oneof_F_Int32{1 << 20}}}, - {"oneof int64", &pb.Oneof{Union: &pb.Oneof_F_Int64{42}}}, - {"oneof fixed32", &pb.Oneof{Union: &pb.Oneof_F_Fixed32{43}}}, - {"oneof fixed64", &pb.Oneof{Union: &pb.Oneof_F_Fixed64{44}}}, - {"oneof uint32", &pb.Oneof{Union: &pb.Oneof_F_Uint32{45}}}, - {"oneof uint64", &pb.Oneof{Union: &pb.Oneof_F_Uint64{46}}}, - {"oneof float", &pb.Oneof{Union: &pb.Oneof_F_Float{47.1}}}, - {"oneof double", &pb.Oneof{Union: &pb.Oneof_F_Double{48.9}}}, - {"oneof string", &pb.Oneof{Union: &pb.Oneof_F_String{"Rhythmic Fman"}}}, - {"oneof bytes", &pb.Oneof{Union: &pb.Oneof_F_Bytes{[]byte("let go")}}}, - {"oneof sint32", &pb.Oneof{Union: &pb.Oneof_F_Sint32{50}}}, - {"oneof sint64", &pb.Oneof{Union: &pb.Oneof_F_Sint64{51}}}, - {"oneof enum", &pb.Oneof{Union: &pb.Oneof_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{&pb.GoTestField{Label: String("k"), Type: String("v")}}}}, - {"oneof group", &pb.Oneof{Union: &pb.Oneof_FGroup{&pb.Oneof_F_Group{X: Int32(52)}}}}, - {"oneof largest tag", &pb.Oneof{Union: &pb.Oneof_F_Largest_Tag{1}}}, - {"multiple oneofs", &pb.Oneof{Union: &pb.Oneof_F_Int32{1}, Tormato: &pb.Oneof_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/vendor/github.com/golang/protobuf/proto/text_parser_test.go b/vendor/github.com/golang/protobuf/proto/text_parser_test.go deleted file mode 100644 index a8198087..00000000 --- a/vendor/github.com/golang/protobuf/proto/text_parser_test.go +++ /dev/null @@ -1,706 +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. - -package proto_test - -import ( - "fmt" - "math" - "testing" - - . "github.com/golang/protobuf/proto" - proto3pb "github.com/golang/protobuf/proto/proto3_proto" - . "github.com/golang/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{"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/vendor/github.com/golang/protobuf/proto/text_test.go b/vendor/github.com/golang/protobuf/proto/text_test.go deleted file mode 100644 index 3c8b033c..00000000 --- a/vendor/github.com/golang/protobuf/proto/text_test.go +++ /dev/null @@ -1,518 +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. - -package proto_test - -import ( - "bytes" - "errors" - "io/ioutil" - "math" - "strings" - "sync" - "testing" - - "github.com/golang/protobuf/proto" - - proto3pb "github.com/golang/protobuf/proto/proto3_proto" - pb "github.com/golang/protobuf/proto/test_proto" - anypb "github.com/golang/protobuf/ptypes/any" -) - -// 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{4}}, `number:4`}, - // message field - {&pb.Communique{Union: &pb.Communique_Msg{ - &pb.Strings{StringField: proto.String("why hello!")}, - }}, `msg:`}, - // bad oneof (should not panic) - {&pb.Communique{Union: &pb.Communique_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. - pb := new(pb.Strings) - if err := proto.UnmarshalText(s, pb); err != nil { - t.Errorf("#%d: UnmarshalText: %v", i, err) - continue - } - if !proto.Equal(pb, tc.in) { - t.Errorf("#%d: Round-trip failed:\nstart: %v\n end: %v", i, tc.in, pb) - } - } -} - -// 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, - &pb.MessageList_Message{ - 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: &anypb.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/vendor/github.com/golang/protobuf/ptypes/any/any.proto b/vendor/github.com/golang/protobuf/ptypes/any/any.proto deleted file mode 100644 index c7486676..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/any/any.proto +++ /dev/null @@ -1,149 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option go_package = "github.com/golang/protobuf/ptypes/any"; -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 whose content describes the type of the - // serialized protocol buffer message. - // - // For URLs which use the scheme `http`, `https`, or no scheme, the - // following restrictions and interpretations apply: - // - // * If no scheme is provided, `https` is assumed. - // * 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). - // * 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.) - // - // 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/vendor/github.com/golang/protobuf/ptypes/any_test.go b/vendor/github.com/golang/protobuf/ptypes/any_test.go deleted file mode 100644 index ed675b48..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/any_test.go +++ /dev/null @@ -1,113 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2016 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package ptypes - -import ( - "testing" - - "github.com/golang/protobuf/proto" - pb "github.com/golang/protobuf/protoc-gen-go/descriptor" - "github.com/golang/protobuf/ptypes/any" -) - -func TestMarshalUnmarshal(t *testing.T) { - orig := &any.Any{Value: []byte("test")} - - packed, err := MarshalAny(orig) - if err != nil { - t.Errorf("MarshalAny(%+v): got: _, %v exp: _, nil", orig, err) - } - - unpacked := &any.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{}) { - t.Error("FileDescriptorProto is not a DescriptorProto, 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.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 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 := Empty(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.FieldMask" - if _, err := Empty(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) - } -} diff --git a/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto b/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto deleted file mode 100644 index 975fce41..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto +++ /dev/null @@ -1,117 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option cc_enable_arenas = true; -option go_package = "github.com/golang/protobuf/ptypes/duration"; -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/vendor/github.com/golang/protobuf/ptypes/duration_test.go b/vendor/github.com/golang/protobuf/ptypes/duration_test.go deleted file mode 100644 index e00491a3..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/duration_test.go +++ /dev/null @@ -1,121 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2016 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package ptypes - -import ( - "math" - "testing" - "time" - - "github.com/golang/protobuf/proto" - durpb "github.com/golang/protobuf/ptypes/duration" -) - -const ( - minGoSeconds = math.MinInt64 / int64(1e9) - maxGoSeconds = math.MaxInt64 / int64(1e9) -) - -var durationTests = []struct { - proto *durpb.Duration - isValid bool - inRange bool - dur time.Duration -}{ - // The zero duration. - {&durpb.Duration{Seconds: 0, Nanos: 0}, true, true, 0}, - // Some ordinary non-zero durations. - {&durpb.Duration{Seconds: 100, Nanos: 0}, true, true, 100 * time.Second}, - {&durpb.Duration{Seconds: -100, Nanos: 0}, true, true, -100 * time.Second}, - {&durpb.Duration{Seconds: 100, Nanos: 987}, true, true, 100*time.Second + 987}, - {&durpb.Duration{Seconds: -100, Nanos: -987}, true, true, -(100*time.Second + 987)}, - // The largest duration representable in Go. - {&durpb.Duration{Seconds: maxGoSeconds, Nanos: int32(math.MaxInt64 - 1e9*maxGoSeconds)}, true, true, math.MaxInt64}, - // The smallest duration representable in Go. - {&durpb.Duration{Seconds: minGoSeconds, Nanos: int32(math.MinInt64 - 1e9*minGoSeconds)}, true, true, math.MinInt64}, - {nil, false, false, 0}, - {&durpb.Duration{Seconds: -100, Nanos: 987}, false, false, 0}, - {&durpb.Duration{Seconds: 100, Nanos: -987}, false, false, 0}, - {&durpb.Duration{Seconds: math.MinInt64, Nanos: 0}, false, false, 0}, - {&durpb.Duration{Seconds: math.MaxInt64, Nanos: 0}, false, false, 0}, - // The largest valid duration. - {&durpb.Duration{Seconds: maxSeconds, Nanos: 1e9 - 1}, true, false, 0}, - // The smallest valid duration. - {&durpb.Duration{Seconds: minSeconds, Nanos: -(1e9 - 1)}, true, false, 0}, - // The smallest invalid duration above the valid range. - {&durpb.Duration{Seconds: maxSeconds + 1, Nanos: 0}, false, false, 0}, - // The largest invalid duration below the valid range. - {&durpb.Duration{Seconds: minSeconds - 1, Nanos: -(1e9 - 1)}, false, false, 0}, - // One nanosecond past the largest duration representable in Go. - {&durpb.Duration{Seconds: maxGoSeconds, Nanos: int32(math.MaxInt64-1e9*maxGoSeconds) + 1}, true, false, 0}, - // One nanosecond past the smallest duration representable in Go. - {&durpb.Duration{Seconds: minGoSeconds, Nanos: int32(math.MinInt64-1e9*minGoSeconds) - 1}, true, false, 0}, - // One second past the largest duration representable in Go. - {&durpb.Duration{Seconds: maxGoSeconds + 1, Nanos: int32(math.MaxInt64 - 1e9*maxGoSeconds)}, true, false, 0}, - // One second past the smallest duration representable in Go. - {&durpb.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 TestDuration(t *testing.T) { - for _, test := range durationTests { - got, err := Duration(test.proto) - gotOK := (err == nil) - wantOK := test.isValid && test.inRange - if gotOK != wantOK { - t.Errorf("Duration(%v) ok = %t, want %t", test.proto, gotOK, wantOK) - } - if err == nil && got != test.dur { - t.Errorf("Duration(%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/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto deleted file mode 100644 index 06750ab1..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto +++ /dev/null @@ -1,133 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option cc_enable_arenas = true; -option go_package = "github.com/golang/protobuf/ptypes/timestamp"; -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, though only UTC (as indicated by "Z") is presently supported. -// -// 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/vendor/github.com/golang/protobuf/ptypes/timestamp_test.go b/vendor/github.com/golang/protobuf/ptypes/timestamp_test.go deleted file mode 100644 index 6e3c969b..00000000 --- a/vendor/github.com/golang/protobuf/ptypes/timestamp_test.go +++ /dev/null @@ -1,153 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2016 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package ptypes - -import ( - "math" - "testing" - "time" - - "github.com/golang/protobuf/proto" - tspb "github.com/golang/protobuf/ptypes/timestamp" -) - -var tests = []struct { - ts *tspb.Timestamp - valid bool - t time.Time -}{ - // The timestamp representing the Unix epoch date. - {&tspb.Timestamp{Seconds: 0, Nanos: 0}, true, utcDate(1970, 1, 1)}, - // The smallest representable timestamp. - {&tspb.Timestamp{Seconds: math.MinInt64, Nanos: math.MinInt32}, false, - time.Unix(math.MinInt64, math.MinInt32).UTC()}, - // The smallest representable timestamp with non-negative nanos. - {&tspb.Timestamp{Seconds: math.MinInt64, Nanos: 0}, false, time.Unix(math.MinInt64, 0).UTC()}, - // The earliest valid timestamp. - {&tspb.Timestamp{Seconds: minValidSeconds, Nanos: 0}, true, utcDate(1, 1, 1)}, - //"0001-01-01T00:00:00Z"}, - // The largest representable timestamp. - {&tspb.Timestamp{Seconds: math.MaxInt64, Nanos: math.MaxInt32}, false, - time.Unix(math.MaxInt64, math.MaxInt32).UTC()}, - // The largest representable timestamp with nanos in range. - {&tspb.Timestamp{Seconds: math.MaxInt64, Nanos: 1e9 - 1}, false, - time.Unix(math.MaxInt64, 1e9-1).UTC()}, - // The largest valid timestamp. - {&tspb.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. - {&tspb.Timestamp{Seconds: maxValidSeconds, Nanos: 0}, false, time.Unix(maxValidSeconds, 0).UTC()}, - // A date before the epoch. - {&tspb.Timestamp{Seconds: -281836800, Nanos: 0}, true, utcDate(1961, 1, 26)}, - // A date after the epoch. - {&tspb.Timestamp{Seconds: 1296000000, Nanos: 0}, true, utcDate(2011, 1, 26)}, - // A date after the epoch, in the middle of the day. - {&tspb.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 TestTimestamp(t *testing.T) { - for _, s := range tests { - got, err := Timestamp(s.ts) - if (err == nil) != s.valid { - t.Errorf("Timestamp(%v) error = %v, but valid = %t", s.ts, err, s.valid) - } else if s.valid && got != s.t { - t.Errorf("Timestamp(%v) = %v, want %v", s.ts, got, s.t) - } - } - // Special case: a nil Timestamp is an error, but returns the 0 Unix time. - got, err := Timestamp(nil) - want := time.Unix(0, 0).UTC() - if got != want { - t.Errorf("Timestamp(nil) = %v, want %v", got, want) - } - if err == nil { - t.Errorf("Timestamp(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 *tspb.Timestamp - want string - }{ - // Not much testing needed because presumably time.Format is - // well-tested. - {&tspb.Timestamp{Seconds: 0, Nanos: 0}, "1970-01-01T00:00:00Z"}, - {&tspb.Timestamp{Seconds: minValidSeconds - 1, Nanos: 0}, "(timestamp: seconds:-62135596801 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 := Timestamp(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/vendor/github.com/golang/protobuf/regenerate.sh b/vendor/github.com/golang/protobuf/regenerate.sh deleted file mode 100755 index dc7e2d1f..00000000 --- a/vendor/github.com/golang/protobuf/regenerate.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -set -e - -# Install the working tree's protoc-gen-gen in a tempdir. -tmpdir=$(mktemp -d -t regen-wkt.XXXXXX) -trap 'rm -rf $tmpdir' EXIT -mkdir -p $tmpdir/bin -PATH=$tmpdir/bin:$PATH -GOBIN=$tmpdir/bin go install ./protoc-gen-go - -# Public imports require at least Go 1.9. -supportTypeAliases="" -if go list -f '{{context.ReleaseTags}}' runtime | grep -q go1.9; then - supportTypeAliases=1 -fi - -# Generate various test protos. -PROTO_DIRS=( - conformance/internal/conformance_proto - jsonpb/jsonpb_test_proto - proto - protoc-gen-go/testdata -) -for dir in ${PROTO_DIRS[@]}; do - for p in `find $dir -name "*.proto"`; do - if [[ $p == */import_public/* && ! $supportTypeAliases ]]; then - echo "# $p (skipped)" - continue; - fi - echo "# $p" - protoc -I$dir --go_out=plugins=grpc,paths=source_relative:$dir $p - done -done - -# Deriving the location of the source protos from the path to the -# protoc binary may be a bit odd, but this is what protoc itself does. -PROTO_INCLUDE=$(dirname $(dirname $(which protoc)))/include - -# Well-known types. -WKT_PROTOS=(any duration empty struct timestamp wrappers) -for p in ${WKT_PROTOS[@]}; do - echo "# google/protobuf/$p.proto" - protoc --go_out=paths=source_relative:$tmpdir google/protobuf/$p.proto - cp $tmpdir/google/protobuf/$p.pb.go ptypes/$p - cp $PROTO_INCLUDE/google/protobuf/$p.proto ptypes/$p -done - -# descriptor.proto. -echo "# google/protobuf/descriptor.proto" -protoc --go_out=paths=source_relative:$tmpdir google/protobuf/descriptor.proto -cp $tmpdir/google/protobuf/descriptor.pb.go protoc-gen-go/descriptor -cp $PROTO_INCLUDE/google/protobuf/descriptor.proto protoc-gen-go/descriptor diff --git a/vendor/github.com/google/btree/.travis.yml b/vendor/github.com/google/btree/.travis.yml deleted file mode 100644 index 4f2ee4d9..00000000 --- a/vendor/github.com/google/btree/.travis.yml +++ /dev/null @@ -1 +0,0 @@ -language: go diff --git a/vendor/github.com/google/btree/README.md b/vendor/github.com/google/btree/README.md deleted file mode 100644 index 6062a4da..00000000 --- a/vendor/github.com/google/btree/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# 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/vendor/github.com/google/btree/btree_test.go b/vendor/github.com/google/btree/btree_test.go deleted file mode 100644 index 9eeb136a..00000000 --- a/vendor/github.com/google/btree/btree_test.go +++ /dev/null @@ -1,770 +0,0 @@ -// 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 - -import ( - "flag" - "fmt" - "math/rand" - "reflect" - "sort" - "sync" - "testing" - "time" -) - -func init() { - seed := time.Now().Unix() - fmt.Println(seed) - rand.Seed(seed) -} - -// perm returns a random permutation of n Int items in the range [0, n). -func perm(n int) (out []Item) { - for _, v := range rand.Perm(n) { - out = append(out, Int(v)) - } - return -} - -// rang returns an ordered list of Int items in the range [0, n). -func rang(n int) (out []Item) { - for i := 0; i < n; i++ { - out = append(out, Int(i)) - } - return -} - -// all extracts all items from a tree in order as a slice. -func all(t *BTree) (out []Item) { - t.Ascend(func(a Item) bool { - out = append(out, a) - return true - }) - return -} - -// rangerev returns a reversed ordered list of Int items in the range [0, n). -func rangrev(n int) (out []Item) { - for i := n - 1; i >= 0; i-- { - out = append(out, Int(i)) - } - return -} - -// allrev extracts all items from a tree in reverse order as a slice. -func allrev(t *BTree) (out []Item) { - t.Descend(func(a Item) bool { - out = append(out, a) - return true - }) - return -} - -var btreeDegree = flag.Int("degree", 32, "B-Tree degree") - -func TestBTree(t *testing.T) { - tr := New(*btreeDegree) - const treeSize = 10000 - for i := 0; i < 10; i++ { - if min := tr.Min(); min != nil { - t.Fatalf("empty min, got %+v", min) - } - if max := tr.Max(); max != nil { - t.Fatalf("empty max, got %+v", max) - } - for _, item := range perm(treeSize) { - if x := tr.ReplaceOrInsert(item); x != nil { - t.Fatal("insert found item", item) - } - } - for _, item := range perm(treeSize) { - if x := tr.ReplaceOrInsert(item); x == nil { - t.Fatal("insert didn't find item", item) - } - } - if min, want := tr.Min(), Item(Int(0)); min != want { - t.Fatalf("min: want %+v, got %+v", want, min) - } - if max, want := tr.Max(), Item(Int(treeSize-1)); max != want { - t.Fatalf("max: want %+v, got %+v", want, max) - } - got := all(tr) - want := rang(treeSize) - if !reflect.DeepEqual(got, want) { - t.Fatalf("mismatch:\n got: %v\nwant: %v", got, want) - } - - gotrev := allrev(tr) - wantrev := rangrev(treeSize) - if !reflect.DeepEqual(gotrev, wantrev) { - t.Fatalf("mismatch:\n got: %v\nwant: %v", got, want) - } - - for _, item := range perm(treeSize) { - if x := tr.Delete(item); x == nil { - t.Fatalf("didn't find %v", item) - } - } - if got = all(tr); len(got) > 0 { - t.Fatalf("some left!: %v", got) - } - } -} - -func ExampleBTree() { - tr := New(*btreeDegree) - for i := Int(0); i < 10; i++ { - tr.ReplaceOrInsert(i) - } - fmt.Println("len: ", tr.Len()) - fmt.Println("get3: ", tr.Get(Int(3))) - fmt.Println("get100: ", tr.Get(Int(100))) - fmt.Println("del4: ", tr.Delete(Int(4))) - fmt.Println("del100: ", tr.Delete(Int(100))) - fmt.Println("replace5: ", tr.ReplaceOrInsert(Int(5))) - fmt.Println("replace100:", tr.ReplaceOrInsert(Int(100))) - fmt.Println("min: ", tr.Min()) - fmt.Println("delmin: ", tr.DeleteMin()) - fmt.Println("max: ", tr.Max()) - fmt.Println("delmax: ", tr.DeleteMax()) - fmt.Println("len: ", tr.Len()) - // Output: - // len: 10 - // get3: 3 - // get100: - // del4: 4 - // del100: - // replace5: 5 - // replace100: - // min: 0 - // delmin: 0 - // max: 100 - // delmax: 100 - // len: 8 -} - -func TestDeleteMin(t *testing.T) { - tr := New(3) - for _, v := range perm(100) { - tr.ReplaceOrInsert(v) - } - var got []Item - for v := tr.DeleteMin(); v != nil; v = tr.DeleteMin() { - got = append(got, v) - } - if want := rang(100); !reflect.DeepEqual(got, want) { - t.Fatalf("ascendrange:\n got: %v\nwant: %v", got, want) - } -} - -func TestDeleteMax(t *testing.T) { - tr := New(3) - for _, v := range perm(100) { - tr.ReplaceOrInsert(v) - } - var got []Item - for v := tr.DeleteMax(); v != nil; v = tr.DeleteMax() { - got = append(got, v) - } - // Reverse our list. - for i := 0; i < len(got)/2; i++ { - got[i], got[len(got)-i-1] = got[len(got)-i-1], got[i] - } - if want := rang(100); !reflect.DeepEqual(got, want) { - t.Fatalf("ascendrange:\n got: %v\nwant: %v", got, want) - } -} - -func TestAscendRange(t *testing.T) { - tr := New(2) - for _, v := range perm(100) { - tr.ReplaceOrInsert(v) - } - var got []Item - tr.AscendRange(Int(40), Int(60), func(a Item) bool { - got = append(got, a) - return true - }) - if want := rang(100)[40:60]; !reflect.DeepEqual(got, want) { - t.Fatalf("ascendrange:\n got: %v\nwant: %v", got, want) - } - got = got[:0] - tr.AscendRange(Int(40), Int(60), func(a Item) bool { - if a.(Int) > 50 { - return false - } - got = append(got, a) - return true - }) - if want := rang(100)[40:51]; !reflect.DeepEqual(got, want) { - t.Fatalf("ascendrange:\n got: %v\nwant: %v", got, want) - } -} - -func TestDescendRange(t *testing.T) { - tr := New(2) - for _, v := range perm(100) { - tr.ReplaceOrInsert(v) - } - var got []Item - tr.DescendRange(Int(60), Int(40), func(a Item) bool { - got = append(got, a) - return true - }) - if want := rangrev(100)[39:59]; !reflect.DeepEqual(got, want) { - t.Fatalf("descendrange:\n got: %v\nwant: %v", got, want) - } - got = got[:0] - tr.DescendRange(Int(60), Int(40), func(a Item) bool { - if a.(Int) < 50 { - return false - } - got = append(got, a) - return true - }) - if want := rangrev(100)[39:50]; !reflect.DeepEqual(got, want) { - t.Fatalf("descendrange:\n got: %v\nwant: %v", got, want) - } -} -func TestAscendLessThan(t *testing.T) { - tr := New(*btreeDegree) - for _, v := range perm(100) { - tr.ReplaceOrInsert(v) - } - var got []Item - tr.AscendLessThan(Int(60), func(a Item) bool { - got = append(got, a) - return true - }) - if want := rang(100)[:60]; !reflect.DeepEqual(got, want) { - t.Fatalf("ascendrange:\n got: %v\nwant: %v", got, want) - } - got = got[:0] - tr.AscendLessThan(Int(60), func(a Item) bool { - if a.(Int) > 50 { - return false - } - got = append(got, a) - return true - }) - if want := rang(100)[:51]; !reflect.DeepEqual(got, want) { - t.Fatalf("ascendrange:\n got: %v\nwant: %v", got, want) - } -} - -func TestDescendLessOrEqual(t *testing.T) { - tr := New(*btreeDegree) - for _, v := range perm(100) { - tr.ReplaceOrInsert(v) - } - var got []Item - tr.DescendLessOrEqual(Int(40), func(a Item) bool { - got = append(got, a) - return true - }) - if want := rangrev(100)[59:]; !reflect.DeepEqual(got, want) { - t.Fatalf("descendlessorequal:\n got: %v\nwant: %v", got, want) - } - got = got[:0] - tr.DescendLessOrEqual(Int(60), func(a Item) bool { - if a.(Int) < 50 { - return false - } - got = append(got, a) - return true - }) - if want := rangrev(100)[39:50]; !reflect.DeepEqual(got, want) { - t.Fatalf("descendlessorequal:\n got: %v\nwant: %v", got, want) - } -} -func TestAscendGreaterOrEqual(t *testing.T) { - tr := New(*btreeDegree) - for _, v := range perm(100) { - tr.ReplaceOrInsert(v) - } - var got []Item - tr.AscendGreaterOrEqual(Int(40), func(a Item) bool { - got = append(got, a) - return true - }) - if want := rang(100)[40:]; !reflect.DeepEqual(got, want) { - t.Fatalf("ascendrange:\n got: %v\nwant: %v", got, want) - } - got = got[:0] - tr.AscendGreaterOrEqual(Int(40), func(a Item) bool { - if a.(Int) > 50 { - return false - } - got = append(got, a) - return true - }) - if want := rang(100)[40:51]; !reflect.DeepEqual(got, want) { - t.Fatalf("ascendrange:\n got: %v\nwant: %v", got, want) - } -} - -func TestDescendGreaterThan(t *testing.T) { - tr := New(*btreeDegree) - for _, v := range perm(100) { - tr.ReplaceOrInsert(v) - } - var got []Item - tr.DescendGreaterThan(Int(40), func(a Item) bool { - got = append(got, a) - return true - }) - if want := rangrev(100)[:59]; !reflect.DeepEqual(got, want) { - t.Fatalf("descendgreaterthan:\n got: %v\nwant: %v", got, want) - } - got = got[:0] - tr.DescendGreaterThan(Int(40), func(a Item) bool { - if a.(Int) < 50 { - return false - } - got = append(got, a) - return true - }) - if want := rangrev(100)[:50]; !reflect.DeepEqual(got, want) { - t.Fatalf("descendgreaterthan:\n got: %v\nwant: %v", got, want) - } -} - -const benchmarkTreeSize = 10000 - -func BenchmarkInsert(b *testing.B) { - b.StopTimer() - insertP := perm(benchmarkTreeSize) - b.StartTimer() - i := 0 - for i < b.N { - tr := New(*btreeDegree) - for _, item := range insertP { - tr.ReplaceOrInsert(item) - i++ - if i >= b.N { - return - } - } - } -} - -func BenchmarkDeleteInsert(b *testing.B) { - b.StopTimer() - insertP := perm(benchmarkTreeSize) - tr := New(*btreeDegree) - for _, item := range insertP { - tr.ReplaceOrInsert(item) - } - b.StartTimer() - for i := 0; i < b.N; i++ { - tr.Delete(insertP[i%benchmarkTreeSize]) - tr.ReplaceOrInsert(insertP[i%benchmarkTreeSize]) - } -} - -func BenchmarkDeleteInsertCloneOnce(b *testing.B) { - b.StopTimer() - insertP := perm(benchmarkTreeSize) - tr := New(*btreeDegree) - for _, item := range insertP { - tr.ReplaceOrInsert(item) - } - tr = tr.Clone() - b.StartTimer() - for i := 0; i < b.N; i++ { - tr.Delete(insertP[i%benchmarkTreeSize]) - tr.ReplaceOrInsert(insertP[i%benchmarkTreeSize]) - } -} - -func BenchmarkDeleteInsertCloneEachTime(b *testing.B) { - b.StopTimer() - insertP := perm(benchmarkTreeSize) - tr := New(*btreeDegree) - for _, item := range insertP { - tr.ReplaceOrInsert(item) - } - b.StartTimer() - for i := 0; i < b.N; i++ { - tr = tr.Clone() - tr.Delete(insertP[i%benchmarkTreeSize]) - tr.ReplaceOrInsert(insertP[i%benchmarkTreeSize]) - } -} - -func BenchmarkDelete(b *testing.B) { - b.StopTimer() - insertP := perm(benchmarkTreeSize) - removeP := perm(benchmarkTreeSize) - b.StartTimer() - i := 0 - for i < b.N { - b.StopTimer() - tr := New(*btreeDegree) - for _, v := range insertP { - tr.ReplaceOrInsert(v) - } - b.StartTimer() - for _, item := range removeP { - tr.Delete(item) - i++ - if i >= b.N { - return - } - } - if tr.Len() > 0 { - panic(tr.Len()) - } - } -} - -func BenchmarkGet(b *testing.B) { - b.StopTimer() - insertP := perm(benchmarkTreeSize) - removeP := perm(benchmarkTreeSize) - b.StartTimer() - i := 0 - for i < b.N { - b.StopTimer() - tr := New(*btreeDegree) - for _, v := range insertP { - tr.ReplaceOrInsert(v) - } - b.StartTimer() - for _, item := range removeP { - tr.Get(item) - i++ - if i >= b.N { - return - } - } - } -} - -func BenchmarkGetCloneEachTime(b *testing.B) { - b.StopTimer() - insertP := perm(benchmarkTreeSize) - removeP := perm(benchmarkTreeSize) - b.StartTimer() - i := 0 - for i < b.N { - b.StopTimer() - tr := New(*btreeDegree) - for _, v := range insertP { - tr.ReplaceOrInsert(v) - } - b.StartTimer() - for _, item := range removeP { - tr = tr.Clone() - tr.Get(item) - i++ - if i >= b.N { - return - } - } - } -} - -type byInts []Item - -func (a byInts) Len() int { - return len(a) -} - -func (a byInts) Less(i, j int) bool { - return a[i].(Int) < a[j].(Int) -} - -func (a byInts) Swap(i, j int) { - a[i], a[j] = a[j], a[i] -} - -func BenchmarkAscend(b *testing.B) { - arr := perm(benchmarkTreeSize) - tr := New(*btreeDegree) - for _, v := range arr { - tr.ReplaceOrInsert(v) - } - sort.Sort(byInts(arr)) - b.ResetTimer() - for i := 0; i < b.N; i++ { - j := 0 - tr.Ascend(func(item Item) bool { - if item.(Int) != arr[j].(Int) { - b.Fatalf("mismatch: expected: %v, got %v", arr[j].(Int), item.(Int)) - } - j++ - return true - }) - } -} - -func BenchmarkDescend(b *testing.B) { - arr := perm(benchmarkTreeSize) - tr := New(*btreeDegree) - for _, v := range arr { - tr.ReplaceOrInsert(v) - } - sort.Sort(byInts(arr)) - b.ResetTimer() - for i := 0; i < b.N; i++ { - j := len(arr) - 1 - tr.Descend(func(item Item) bool { - if item.(Int) != arr[j].(Int) { - b.Fatalf("mismatch: expected: %v, got %v", arr[j].(Int), item.(Int)) - } - j-- - return true - }) - } -} -func BenchmarkAscendRange(b *testing.B) { - arr := perm(benchmarkTreeSize) - tr := New(*btreeDegree) - for _, v := range arr { - tr.ReplaceOrInsert(v) - } - sort.Sort(byInts(arr)) - b.ResetTimer() - for i := 0; i < b.N; i++ { - j := 100 - tr.AscendRange(Int(100), arr[len(arr)-100], func(item Item) bool { - if item.(Int) != arr[j].(Int) { - b.Fatalf("mismatch: expected: %v, got %v", arr[j].(Int), item.(Int)) - } - j++ - return true - }) - if j != len(arr)-100 { - b.Fatalf("expected: %v, got %v", len(arr)-100, j) - } - } -} - -func BenchmarkDescendRange(b *testing.B) { - arr := perm(benchmarkTreeSize) - tr := New(*btreeDegree) - for _, v := range arr { - tr.ReplaceOrInsert(v) - } - sort.Sort(byInts(arr)) - b.ResetTimer() - for i := 0; i < b.N; i++ { - j := len(arr) - 100 - tr.DescendRange(arr[len(arr)-100], Int(100), func(item Item) bool { - if item.(Int) != arr[j].(Int) { - b.Fatalf("mismatch: expected: %v, got %v", arr[j].(Int), item.(Int)) - } - j-- - return true - }) - if j != 100 { - b.Fatalf("expected: %v, got %v", len(arr)-100, j) - } - } -} -func BenchmarkAscendGreaterOrEqual(b *testing.B) { - arr := perm(benchmarkTreeSize) - tr := New(*btreeDegree) - for _, v := range arr { - tr.ReplaceOrInsert(v) - } - sort.Sort(byInts(arr)) - b.ResetTimer() - for i := 0; i < b.N; i++ { - j := 100 - k := 0 - tr.AscendGreaterOrEqual(Int(100), func(item Item) bool { - if item.(Int) != arr[j].(Int) { - b.Fatalf("mismatch: expected: %v, got %v", arr[j].(Int), item.(Int)) - } - j++ - k++ - return true - }) - if j != len(arr) { - b.Fatalf("expected: %v, got %v", len(arr), j) - } - if k != len(arr)-100 { - b.Fatalf("expected: %v, got %v", len(arr)-100, k) - } - } -} -func BenchmarkDescendLessOrEqual(b *testing.B) { - arr := perm(benchmarkTreeSize) - tr := New(*btreeDegree) - for _, v := range arr { - tr.ReplaceOrInsert(v) - } - sort.Sort(byInts(arr)) - b.ResetTimer() - for i := 0; i < b.N; i++ { - j := len(arr) - 100 - k := len(arr) - tr.DescendLessOrEqual(arr[len(arr)-100], func(item Item) bool { - if item.(Int) != arr[j].(Int) { - b.Fatalf("mismatch: expected: %v, got %v", arr[j].(Int), item.(Int)) - } - j-- - k-- - return true - }) - if j != -1 { - b.Fatalf("expected: %v, got %v", -1, j) - } - if k != 99 { - b.Fatalf("expected: %v, got %v", 99, k) - } - } -} - -const cloneTestSize = 10000 - -func cloneTest(t *testing.T, b *BTree, start int, p []Item, wg *sync.WaitGroup, trees *[]*BTree) { - t.Logf("Starting new clone at %v", start) - *trees = append(*trees, b) - for i := start; i < cloneTestSize; i++ { - b.ReplaceOrInsert(p[i]) - if i%(cloneTestSize/5) == 0 { - wg.Add(1) - go cloneTest(t, b.Clone(), i+1, p, wg, trees) - } - } - wg.Done() -} - -func TestCloneConcurrentOperations(t *testing.T) { - b := New(*btreeDegree) - trees := []*BTree{} - p := perm(cloneTestSize) - var wg sync.WaitGroup - wg.Add(1) - go cloneTest(t, b, 0, p, &wg, &trees) - wg.Wait() - want := rang(cloneTestSize) - t.Logf("Starting equality checks on %d trees", len(trees)) - for i, tree := range trees { - if !reflect.DeepEqual(want, all(tree)) { - t.Errorf("tree %v mismatch", i) - } - } - t.Log("Removing half from first half") - toRemove := rang(cloneTestSize)[cloneTestSize/2:] - for i := 0; i < len(trees)/2; i++ { - tree := trees[i] - wg.Add(1) - go func() { - for _, item := range toRemove { - tree.Delete(item) - } - wg.Done() - }() - } - wg.Wait() - t.Log("Checking all values again") - for i, tree := range trees { - var wantpart []Item - if i < len(trees)/2 { - wantpart = want[:cloneTestSize/2] - } else { - wantpart = want - } - if got := all(tree); !reflect.DeepEqual(wantpart, got) { - t.Errorf("tree %v mismatch, want %v got %v", i, len(want), len(got)) - } - } -} - -func BenchmarkDeleteAndRestore(b *testing.B) { - items := perm(16392) - b.ResetTimer() - b.Run(`CopyBigFreeList`, func(b *testing.B) { - fl := NewFreeList(16392) - tr := NewWithFreeList(*btreeDegree, fl) - for _, v := range items { - tr.ReplaceOrInsert(v) - } - b.ReportAllocs() - b.ResetTimer() - for i := 0; i < b.N; i++ { - dels := make([]Item, 0, tr.Len()) - tr.Ascend(ItemIterator(func(b Item) bool { - dels = append(dels, b) - return true - })) - for _, del := range dels { - tr.Delete(del) - } - // tr is now empty, we make a new empty copy of it. - tr = NewWithFreeList(*btreeDegree, fl) - for _, v := range items { - tr.ReplaceOrInsert(v) - } - } - }) - b.Run(`Copy`, func(b *testing.B) { - tr := New(*btreeDegree) - for _, v := range items { - tr.ReplaceOrInsert(v) - } - b.ReportAllocs() - b.ResetTimer() - for i := 0; i < b.N; i++ { - dels := make([]Item, 0, tr.Len()) - tr.Ascend(ItemIterator(func(b Item) bool { - dels = append(dels, b) - return true - })) - for _, del := range dels { - tr.Delete(del) - } - // tr is now empty, we make a new empty copy of it. - tr = New(*btreeDegree) - for _, v := range items { - tr.ReplaceOrInsert(v) - } - } - }) - b.Run(`ClearBigFreelist`, func(b *testing.B) { - fl := NewFreeList(16392) - tr := NewWithFreeList(*btreeDegree, fl) - for _, v := range items { - tr.ReplaceOrInsert(v) - } - b.ReportAllocs() - b.ResetTimer() - for i := 0; i < b.N; i++ { - tr.Clear(true) - for _, v := range items { - tr.ReplaceOrInsert(v) - } - } - }) - b.Run(`Clear`, func(b *testing.B) { - tr := New(*btreeDegree) - for _, v := range items { - tr.ReplaceOrInsert(v) - } - b.ReportAllocs() - b.ResetTimer() - for i := 0; i < b.N; i++ { - tr.Clear(true) - for _, v := range items { - tr.ReplaceOrInsert(v) - } - } - }) -} diff --git a/vendor/github.com/google/gofuzz/.travis.yml b/vendor/github.com/google/gofuzz/.travis.yml deleted file mode 100644 index f8684d99..00000000 --- a/vendor/github.com/google/gofuzz/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: go - -go: - - 1.4 - - 1.3 - - 1.2 - - tip - -install: - - if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi - -script: - - go test -cover diff --git a/vendor/github.com/google/gofuzz/CONTRIBUTING.md b/vendor/github.com/google/gofuzz/CONTRIBUTING.md deleted file mode 100644 index 51cf5cd1..00000000 --- a/vendor/github.com/google/gofuzz/CONTRIBUTING.md +++ /dev/null @@ -1,67 +0,0 @@ -# How to contribute # - -We'd love to accept your patches and contributions to this project. There are -a just a few small guidelines you need to follow. - - -## Contributor License Agreement ## - -Contributions to any Google project must be accompanied by a Contributor -License Agreement. This is not a copyright **assignment**, it simply gives -Google permission to use and redistribute your contributions as part of the -project. - - * If you are an individual writing original source code and you're sure you - own the intellectual property, then you'll need to sign an [individual - CLA][]. - - * If you work for a company that wants to allow you to contribute your work, - then you'll need to sign a [corporate CLA][]. - -You generally only need to submit a CLA once, so if you've already submitted -one (even if it was for a different project), you probably don't need to do it -again. - -[individual CLA]: https://developers.google.com/open-source/cla/individual -[corporate CLA]: https://developers.google.com/open-source/cla/corporate - - -## Submitting a patch ## - - 1. It's generally best to start by opening a new issue describing the bug or - feature you're intending to fix. Even if you think it's relatively minor, - it's helpful to know what people are working on. Mention in the initial - issue that you are planning to work on that bug or feature so that it can - be assigned to you. - - 1. Follow the normal process of [forking][] the project, and setup a new - branch to work in. It's important that each group of changes be done in - separate branches in order to ensure that a pull request only includes the - commits related to that bug or feature. - - 1. Go makes it very simple to ensure properly formatted code, so always run - `go fmt` on your code before committing it. You should also run - [golint][] over your code. As noted in the [golint readme][], it's not - strictly necessary that your code be completely "lint-free", but this will - help you find common style issues. - - 1. Any significant changes should almost always be accompanied by tests. The - project already has good test coverage, so look at some of the existing - tests if you're unsure how to go about it. [gocov][] and [gocov-html][] - are invaluable tools for seeing which parts of your code aren't being - exercised by your tests. - - 1. Do your best to have [well-formed commit messages][] for each change. - This provides consistency throughout the project, and ensures that commit - messages are able to be formatted properly by various git tools. - - 1. Finally, push the commits to your fork and submit a [pull request][]. - -[forking]: https://help.github.com/articles/fork-a-repo -[golint]: https://github.com/golang/lint -[golint readme]: https://github.com/golang/lint/blob/master/README -[gocov]: https://github.com/axw/gocov -[gocov-html]: https://github.com/matm/gocov-html -[well-formed commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html -[squash]: http://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits -[pull request]: https://help.github.com/articles/creating-a-pull-request diff --git a/vendor/github.com/google/gofuzz/README.md b/vendor/github.com/google/gofuzz/README.md deleted file mode 100644 index 64869af3..00000000 --- a/vendor/github.com/google/gofuzz/README.md +++ /dev/null @@ -1,71 +0,0 @@ -gofuzz -====== - -gofuzz is a library for populating go objects with random values. - -[![GoDoc](https://godoc.org/github.com/google/gofuzz?status.png)](https://godoc.org/github.com/google/gofuzz) -[![Travis](https://travis-ci.org/google/gofuzz.svg?branch=master)](https://travis-ci.org/google/gofuzz) - -This is useful for testing: - -* Do your project's objects really serialize/unserialize correctly in all cases? -* Is there an incorrectly formatted object that will cause your project to panic? - -Import with ```import "github.com/google/gofuzz"``` - -You can use it on single variables: -```go -f := fuzz.New() -var myInt int -f.Fuzz(&myInt) // myInt gets a random value. -``` - -You can use it on maps: -```go -f := fuzz.New().NilChance(0).NumElements(1, 1) -var myMap map[ComplexKeyType]string -f.Fuzz(&myMap) // myMap will have exactly one element. -``` - -Customize the chance of getting a nil pointer: -```go -f := fuzz.New().NilChance(.5) -var fancyStruct struct { - A, B, C, D *string -} -f.Fuzz(&fancyStruct) // About half the pointers should be set. -``` - -You can even customize the randomization completely if needed: -```go -type MyEnum string -const ( - A MyEnum = "A" - B MyEnum = "B" -) -type MyInfo struct { - Type MyEnum - AInfo *string - BInfo *string -} - -f := fuzz.New().NilChance(0).Funcs( - func(e *MyInfo, c fuzz.Continue) { - switch c.Intn(2) { - case 0: - e.Type = A - c.Fuzz(&e.AInfo) - case 1: - e.Type = B - c.Fuzz(&e.BInfo) - } - }, -) - -var myObject MyInfo -f.Fuzz(&myObject) // Type will correspond to whether A or B info is set. -``` - -See more examples in ```example_test.go```. - -Happy testing! diff --git a/vendor/github.com/google/gofuzz/example_test.go b/vendor/github.com/google/gofuzz/example_test.go deleted file mode 100644 index 792707a3..00000000 --- a/vendor/github.com/google/gofuzz/example_test.go +++ /dev/null @@ -1,225 +0,0 @@ -/* -Copyright 2014 Google Inc. All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package fuzz_test - -import ( - "encoding/json" - "fmt" - "math/rand" - - "github.com/google/gofuzz" -) - -func ExampleSimple() { - type MyType struct { - A string - B string - C int - D struct { - E float64 - } - } - - f := fuzz.New() - object := MyType{} - - uniqueObjects := map[MyType]int{} - - for i := 0; i < 1000; i++ { - f.Fuzz(&object) - uniqueObjects[object]++ - } - fmt.Printf("Got %v unique objects.\n", len(uniqueObjects)) - // Output: - // Got 1000 unique objects. -} - -func ExampleCustom() { - type MyType struct { - A int - B string - } - - counter := 0 - f := fuzz.New().Funcs( - func(i *int, c fuzz.Continue) { - *i = counter - counter++ - }, - ) - object := MyType{} - - uniqueObjects := map[MyType]int{} - - for i := 0; i < 100; i++ { - f.Fuzz(&object) - if object.A != i { - fmt.Printf("Unexpected value: %#v\n", object) - } - uniqueObjects[object]++ - } - fmt.Printf("Got %v unique objects.\n", len(uniqueObjects)) - // Output: - // Got 100 unique objects. -} - -func ExampleComplex() { - type OtherType struct { - A string - B string - } - type MyType struct { - Pointer *OtherType - Map map[string]OtherType - PointerMap *map[string]OtherType - Slice []OtherType - SlicePointer []*OtherType - PointerSlicePointer *[]*OtherType - } - - f := fuzz.New().RandSource(rand.NewSource(0)).NilChance(0).NumElements(1, 1).Funcs( - func(o *OtherType, c fuzz.Continue) { - o.A = "Foo" - o.B = "Bar" - }, - func(op **OtherType, c fuzz.Continue) { - *op = &OtherType{"A", "B"} - }, - func(m map[string]OtherType, c fuzz.Continue) { - m["Works Because"] = OtherType{ - "Fuzzer", - "Preallocated", - } - }, - ) - object := MyType{} - f.Fuzz(&object) - bytes, err := json.MarshalIndent(&object, "", " ") - if err != nil { - fmt.Printf("error: %v\n", err) - } - fmt.Printf("%s\n", string(bytes)) - // Output: - // { - // "Pointer": { - // "A": "A", - // "B": "B" - // }, - // "Map": { - // "Works Because": { - // "A": "Fuzzer", - // "B": "Preallocated" - // } - // }, - // "PointerMap": { - // "Works Because": { - // "A": "Fuzzer", - // "B": "Preallocated" - // } - // }, - // "Slice": [ - // { - // "A": "Foo", - // "B": "Bar" - // } - // ], - // "SlicePointer": [ - // { - // "A": "A", - // "B": "B" - // } - // ], - // "PointerSlicePointer": [ - // { - // "A": "A", - // "B": "B" - // } - // ] - // } -} - -func ExampleMap() { - f := fuzz.New().NilChance(0).NumElements(1, 1) - var myMap map[struct{ A, B, C int }]string - f.Fuzz(&myMap) - fmt.Printf("myMap has %v element(s).\n", len(myMap)) - // Output: - // myMap has 1 element(s). -} - -func ExampleSingle() { - f := fuzz.New() - var i int - f.Fuzz(&i) - - // Technically, we'd expect this to fail one out of 2 billion attempts... - fmt.Printf("(i == 0) == %v", i == 0) - // Output: - // (i == 0) == false -} - -func ExampleEnum() { - type MyEnum string - const ( - A MyEnum = "A" - B MyEnum = "B" - ) - type MyInfo struct { - Type MyEnum - AInfo *string - BInfo *string - } - - f := fuzz.New().NilChance(0).Funcs( - func(e *MyInfo, c fuzz.Continue) { - // Note c's embedded Rand allows for direct use. - // We could also use c.RandBool() here. - switch c.Intn(2) { - case 0: - e.Type = A - c.Fuzz(&e.AInfo) - case 1: - e.Type = B - c.Fuzz(&e.BInfo) - } - }, - ) - - for i := 0; i < 100; i++ { - var myObject MyInfo - f.Fuzz(&myObject) - switch myObject.Type { - case A: - if myObject.AInfo == nil { - fmt.Println("AInfo should have been set!") - } - if myObject.BInfo != nil { - fmt.Println("BInfo should NOT have been set!") - } - case B: - if myObject.BInfo == nil { - fmt.Println("BInfo should have been set!") - } - if myObject.AInfo != nil { - fmt.Println("AInfo should NOT have been set!") - } - default: - fmt.Println("Invalid enum value!") - } - } - // Output: -} diff --git a/vendor/github.com/google/gofuzz/fuzz_test.go b/vendor/github.com/google/gofuzz/fuzz_test.go deleted file mode 100644 index 4059ea6f..00000000 --- a/vendor/github.com/google/gofuzz/fuzz_test.go +++ /dev/null @@ -1,472 +0,0 @@ -/* -Copyright 2014 Google Inc. All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package fuzz - -import ( - "reflect" - "testing" - "time" -) - -func TestFuzz_basic(t *testing.T) { - obj := &struct { - I int - I8 int8 - I16 int16 - I32 int32 - I64 int64 - U uint - U8 uint8 - U16 uint16 - U32 uint32 - U64 uint64 - Uptr uintptr - S string - B bool - T time.Time - }{} - - failed := map[string]int{} - for i := 0; i < 10; i++ { - New().Fuzz(obj) - - if n, v := "i", obj.I; v == 0 { - failed[n] = failed[n] + 1 - } - if n, v := "i8", obj.I8; v == 0 { - failed[n] = failed[n] + 1 - } - if n, v := "i16", obj.I16; v == 0 { - failed[n] = failed[n] + 1 - } - if n, v := "i32", obj.I32; v == 0 { - failed[n] = failed[n] + 1 - } - if n, v := "i64", obj.I64; v == 0 { - failed[n] = failed[n] + 1 - } - if n, v := "u", obj.U; v == 0 { - failed[n] = failed[n] + 1 - } - if n, v := "u8", obj.U8; v == 0 { - failed[n] = failed[n] + 1 - } - if n, v := "u16", obj.U16; v == 0 { - failed[n] = failed[n] + 1 - } - if n, v := "u32", obj.U32; v == 0 { - failed[n] = failed[n] + 1 - } - if n, v := "u64", obj.U64; v == 0 { - failed[n] = failed[n] + 1 - } - if n, v := "uptr", obj.Uptr; v == 0 { - failed[n] = failed[n] + 1 - } - if n, v := "s", obj.S; v == "" { - failed[n] = failed[n] + 1 - } - if n, v := "b", obj.B; v == false { - failed[n] = failed[n] + 1 - } - if n, v := "t", obj.T; v.IsZero() { - failed[n] = failed[n] + 1 - } - } - checkFailed(t, failed) -} - -func checkFailed(t *testing.T, failed map[string]int) { - for k, v := range failed { - if v > 8 { - t.Errorf("%v seems to not be getting set, was zero value %v times", k, v) - } - } -} - -func TestFuzz_structptr(t *testing.T) { - obj := &struct { - A *struct { - S string - } - }{} - - f := New().NilChance(.5) - failed := map[string]int{} - for i := 0; i < 10; i++ { - f.Fuzz(obj) - - if n, v := "a not nil", obj.A; v == nil { - failed[n] = failed[n] + 1 - } - if n, v := "a nil", obj.A; v != nil { - failed[n] = failed[n] + 1 - } - if n, v := "as", obj.A; v == nil || v.S == "" { - failed[n] = failed[n] + 1 - } - } - checkFailed(t, failed) -} - -// tryFuzz tries fuzzing up to 20 times. Fail if check() never passes, report the highest -// stage it ever got to. -func tryFuzz(t *testing.T, f *Fuzzer, obj interface{}, check func() (stage int, passed bool)) { - maxStage := 0 - for i := 0; i < 20; i++ { - f.Fuzz(obj) - stage, passed := check() - if stage > maxStage { - maxStage = stage - } - if passed { - return - } - } - t.Errorf("Only ever got to stage %v", maxStage) -} - -func TestFuzz_structmap(t *testing.T) { - obj := &struct { - A map[struct { - S string - }]struct { - S2 string - } - B map[string]string - }{} - - tryFuzz(t, New(), obj, func() (int, bool) { - if obj.A == nil { - return 1, false - } - if len(obj.A) == 0 { - return 2, false - } - for k, v := range obj.A { - if k.S == "" { - return 3, false - } - if v.S2 == "" { - return 4, false - } - } - - if obj.B == nil { - return 5, false - } - if len(obj.B) == 0 { - return 6, false - } - for k, v := range obj.B { - if k == "" { - return 7, false - } - if v == "" { - return 8, false - } - } - return 9, true - }) -} - -func TestFuzz_structslice(t *testing.T) { - obj := &struct { - A []struct { - S string - } - B []string - }{} - - tryFuzz(t, New(), obj, func() (int, bool) { - if obj.A == nil { - return 1, false - } - if len(obj.A) == 0 { - return 2, false - } - for _, v := range obj.A { - if v.S == "" { - return 3, false - } - } - - if obj.B == nil { - return 4, false - } - if len(obj.B) == 0 { - return 5, false - } - for _, v := range obj.B { - if v == "" { - return 6, false - } - } - return 7, true - }) -} - -func TestFuzz_structarray(t *testing.T) { - obj := &struct { - A [3]struct { - S string - } - B [2]int - }{} - - tryFuzz(t, New(), obj, func() (int, bool) { - for _, v := range obj.A { - if v.S == "" { - return 1, false - } - } - - for _, v := range obj.B { - if v == 0 { - return 2, false - } - } - return 3, true - }) -} - -func TestFuzz_custom(t *testing.T) { - obj := &struct { - A string - B *string - C map[string]string - D *map[string]string - }{} - - testPhrase := "gotcalled" - testMap := map[string]string{"C": "D"} - f := New().Funcs( - func(s *string, c Continue) { - *s = testPhrase - }, - func(m map[string]string, c Continue) { - m["C"] = "D" - }, - ) - - tryFuzz(t, f, obj, func() (int, bool) { - if obj.A != testPhrase { - return 1, false - } - if obj.B == nil { - return 2, false - } - if *obj.B != testPhrase { - return 3, false - } - if e, a := testMap, obj.C; !reflect.DeepEqual(e, a) { - return 4, false - } - if obj.D == nil { - return 5, false - } - if e, a := testMap, *obj.D; !reflect.DeepEqual(e, a) { - return 6, false - } - return 7, true - }) -} - -type SelfFuzzer string - -// Implement fuzz.Interface. -func (sf *SelfFuzzer) Fuzz(c Continue) { - *sf = selfFuzzerTestPhrase -} - -const selfFuzzerTestPhrase = "was fuzzed" - -func TestFuzz_interface(t *testing.T) { - f := New() - - var obj1 SelfFuzzer - tryFuzz(t, f, &obj1, func() (int, bool) { - if obj1 != selfFuzzerTestPhrase { - return 1, false - } - return 1, true - }) - - var obj2 map[int]SelfFuzzer - tryFuzz(t, f, &obj2, func() (int, bool) { - for _, v := range obj2 { - if v != selfFuzzerTestPhrase { - return 1, false - } - } - return 1, true - }) -} - -func TestFuzz_interfaceAndFunc(t *testing.T) { - const privateTestPhrase = "private phrase" - f := New().Funcs( - // This should take precedence over SelfFuzzer.Fuzz(). - func(s *SelfFuzzer, c Continue) { - *s = privateTestPhrase - }, - ) - - var obj1 SelfFuzzer - tryFuzz(t, f, &obj1, func() (int, bool) { - if obj1 != privateTestPhrase { - return 1, false - } - return 1, true - }) - - var obj2 map[int]SelfFuzzer - tryFuzz(t, f, &obj2, func() (int, bool) { - for _, v := range obj2 { - if v != privateTestPhrase { - return 1, false - } - } - return 1, true - }) -} - -func TestFuzz_noCustom(t *testing.T) { - type Inner struct { - Str string - } - type Outer struct { - Str string - In Inner - } - - testPhrase := "gotcalled" - f := New().Funcs( - func(outer *Outer, c Continue) { - outer.Str = testPhrase - c.Fuzz(&outer.In) - }, - func(inner *Inner, c Continue) { - inner.Str = testPhrase - }, - ) - c := Continue{fc: &fuzzerContext{fuzzer: f}, Rand: f.r} - - // Fuzzer.Fuzz() - obj1 := Outer{} - f.Fuzz(&obj1) - if obj1.Str != testPhrase { - t.Errorf("expected Outer custom function to have been called") - } - if obj1.In.Str != testPhrase { - t.Errorf("expected Inner custom function to have been called") - } - - // Continue.Fuzz() - obj2 := Outer{} - c.Fuzz(&obj2) - if obj2.Str != testPhrase { - t.Errorf("expected Outer custom function to have been called") - } - if obj2.In.Str != testPhrase { - t.Errorf("expected Inner custom function to have been called") - } - - // Fuzzer.FuzzNoCustom() - obj3 := Outer{} - f.FuzzNoCustom(&obj3) - if obj3.Str == testPhrase { - t.Errorf("expected Outer custom function to not have been called") - } - if obj3.In.Str != testPhrase { - t.Errorf("expected Inner custom function to have been called") - } - - // Continue.FuzzNoCustom() - obj4 := Outer{} - c.FuzzNoCustom(&obj4) - if obj4.Str == testPhrase { - t.Errorf("expected Outer custom function to not have been called") - } - if obj4.In.Str != testPhrase { - t.Errorf("expected Inner custom function to have been called") - } -} - -func TestFuzz_NumElements(t *testing.T) { - f := New().NilChance(0).NumElements(0, 1) - obj := &struct { - A []int - }{} - - tryFuzz(t, f, obj, func() (int, bool) { - if obj.A == nil { - return 1, false - } - return 2, len(obj.A) == 0 - }) - tryFuzz(t, f, obj, func() (int, bool) { - if obj.A == nil { - return 3, false - } - return 4, len(obj.A) == 1 - }) -} - -func TestFuzz_Maxdepth(t *testing.T) { - type S struct { - S *S - } - - f := New().NilChance(0) - - f.MaxDepth(1) - for i := 0; i < 100; i++ { - obj := S{} - f.Fuzz(&obj) - - if obj.S != nil { - t.Errorf("Expected nil") - } - } - - f.MaxDepth(3) // field, ptr - for i := 0; i < 100; i++ { - obj := S{} - f.Fuzz(&obj) - - if obj.S == nil { - t.Errorf("Expected obj.S not nil") - } else if obj.S.S != nil { - t.Errorf("Expected obj.S.S nil") - } - } - - f.MaxDepth(5) // field, ptr, field, ptr - for i := 0; i < 100; i++ { - obj := S{} - f.Fuzz(&obj) - - if obj.S == nil { - t.Errorf("Expected obj.S not nil") - } else if obj.S.S == nil { - t.Errorf("Expected obj.S.S not nil") - } else if obj.S.S.S != nil { - t.Errorf("Expected obj.S.S.S nil") - } - } -} diff --git a/vendor/github.com/googleapis/gnostic/.gitignore b/vendor/github.com/googleapis/gnostic/.gitignore deleted file mode 100644 index 2a9d09b7..00000000 --- a/vendor/github.com/googleapis/gnostic/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -# IntelliJ IDEA -.idea -# Eclipse -.checkstyle -.project -.settings -# Swift -.build -Packages -# Node -node_modules -package-lock.json -bundle.json -# vi -*.swp -# vscode -.vscode -.DS_Store -*~ -Package.resolved -extensions/sample/generated diff --git a/vendor/github.com/googleapis/gnostic/.travis-install.sh b/vendor/github.com/googleapis/gnostic/.travis-install.sh deleted file mode 100755 index 83319ae4..00000000 --- a/vendor/github.com/googleapis/gnostic/.travis-install.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -# -# Install dependencies that aren't available as Ubuntu packages. -# -# Everything goes into $HOME/local. -# -# Scripts should add -# - $HOME/local/bin to PATH -# - $HOME/local/lib to LD_LIBRARY_PATH -# - -cd -mkdir -p local - -# Install swift -SWIFT_URL=https://swift.org/builds/swift-4.0-branch/ubuntu1404/swift-4.0-DEVELOPMENT-SNAPSHOT-2017-09-01-a/swift-4.0-DEVELOPMENT-SNAPSHOT-2017-09-01-a-ubuntu14.04.tar.gz -echo $SWIFT_URL -curl -fSsL $SWIFT_URL -o swift.tar.gz -tar -xzf swift.tar.gz --strip-components=2 --directory=local - -# Install protoc -PROTOC_URL=https://github.com/google/protobuf/releases/download/v3.4.0/protoc-3.4.0-linux-x86_64.zip -echo $PROTOC_URL -curl -fSsL $PROTOC_URL -o protoc.zip -unzip protoc.zip -d local - -# Verify installation -find local diff --git a/vendor/github.com/googleapis/gnostic/.travis.yml b/vendor/github.com/googleapis/gnostic/.travis.yml deleted file mode 100644 index c3d2791f..00000000 --- a/vendor/github.com/googleapis/gnostic/.travis.yml +++ /dev/null @@ -1,49 +0,0 @@ -# Travis CI build file for OpenAPI Compiler, including Go and Swift plugins - -# Use Ubuntu 14.04 -dist: trusty - -sudo: false - -language: go - -addons: - apt: - packages: - - clang-3.8 - - lldb-3.8 - - libicu-dev - - libtool - - libcurl4-openssl-dev - - libbsd-dev - - build-essential - - libssl-dev - - uuid-dev - - curl - - unzip - -install: - - ./.travis-install.sh - - export PATH=.:$HOME/local/bin:$PATH - - make - -script: - - go test . -v - - pushd plugins/gnostic-go-generator/examples/v2.0/bookstore - - make test - - popd - - pushd plugins/gnostic-go-generator/examples/v2.0/sample - - make test - - popd - - pushd plugins/gnostic-go-generator/examples/v3.0/bookstore - - make test - - popd - - export PATH=.:$HOME/local/bin:$PATH - - export LD_LIBRARY_PATH=$HOME/local/lib - - pushd plugins/gnostic-swift-generator - - make install - - cd examples/bookstore - - make - - .build/debug/Server & - - make test - diff --git a/vendor/github.com/googleapis/gnostic/COMPILE-PROTOS.sh b/vendor/github.com/googleapis/gnostic/COMPILE-PROTOS.sh deleted file mode 100755 index 584878a1..00000000 --- a/vendor/github.com/googleapis/gnostic/COMPILE-PROTOS.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# -# Copyright 2016 Google Inc. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -go get github.com/golang/protobuf/protoc-gen-go - -protoc \ ---go_out=Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any:. \ -OpenAPIv2/OpenAPIv2.proto - -protoc \ --I.:$GOPATH/src \ ---go_out=:. \ -plugins/plugin.proto - -protoc \ ---go_out=Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any:. \ -OpenAPIv3/OpenAPIv3.proto - -protoc \ ---go_out=Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any:. \ -discovery/discovery.proto diff --git a/vendor/github.com/googleapis/gnostic/CONTRIBUTING.md b/vendor/github.com/googleapis/gnostic/CONTRIBUTING.md deleted file mode 100644 index 6736efd9..00000000 --- a/vendor/github.com/googleapis/gnostic/CONTRIBUTING.md +++ /dev/null @@ -1,35 +0,0 @@ -# How to become a contributor and submit your own code - -## Contributor License Agreements - -We'd love to accept your sample apps and patches! Before we can take them, we -have to jump a couple of legal hurdles. - -Please fill out either the individual or corporate Contributor License Agreement -(CLA). - - * If you are an individual writing original source code and you're sure you - own the intellectual property, then you'll need to sign an [individual CLA] - (https://developers.google.com/open-source/cla/individual). - * If you work for a company that wants to allow you to contribute your work, - then you'll need to sign a [corporate CLA] - (https://developers.google.com/open-source/cla/corporate). - -Follow either of the two links above to access the appropriate CLA and -instructions for how to sign and return it. Once we receive it, we'll be able to -accept your pull requests. - -## Contributing A Patch - -1. Submit an issue describing your proposed change to the repo in question. -1. The repo owner will respond to your issue promptly. -1. If your proposed change is accepted, and you haven't already done so, sign a - Contributor License Agreement (see details above). -1. Fork the desired repo, develop and test your code changes. -1. Ensure that your code adheres to the existing style in the sample to which - you are contributing. Refer to the - [Google Cloud Platform Samples Style Guide] - (https://github.com/GoogleCloudPlatform/Template/wiki/style.html) for the - recommended coding standards for this organization. -1. Ensure that your code has an appropriate set of unit tests which all pass. -1. Submit a pull request. diff --git a/vendor/github.com/googleapis/gnostic/Makefile b/vendor/github.com/googleapis/gnostic/Makefile deleted file mode 100644 index 8a772811..00000000 --- a/vendor/github.com/googleapis/gnostic/Makefile +++ /dev/null @@ -1,16 +0,0 @@ - -build: - go get - go install - cd generate-gnostic; go get; go install - cd apps/disco; go get; go install - cd apps/report; go get; go install - cd apps/petstore-builder; go get; go install - cd plugins/gnostic-summary; go get; go install - cd plugins/gnostic-analyze; go get; go install - cd plugins/gnostic-go-generator; go get; go install - rm -f $(GOPATH)/bin/gnostic-go-client $(GOPATH)/bin/gnostic-go-server - ln -s $(GOPATH)/bin/gnostic-go-generator $(GOPATH)/bin/gnostic-go-client - ln -s $(GOPATH)/bin/gnostic-go-generator $(GOPATH)/bin/gnostic-go-server - cd extensions/sample; make - diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.proto b/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.proto deleted file mode 100644 index 557c8807..00000000 --- a/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.proto +++ /dev/null @@ -1,663 +0,0 @@ -// Copyright 2017 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// THIS FILE IS AUTOMATICALLY GENERATED. - -syntax = "proto3"; - -package openapi.v2; - -import "google/protobuf/any.proto"; - -// This option lets the proto compiler generate Java code inside the package -// name (see below) instead of inside an outer class. It creates a simpler -// developer experience by reducing one-level of name nesting and be -// consistent with most programming languages that don't support outer classes. -option java_multiple_files = true; - -// The Java outer classname should be the filename in UpperCamelCase. This -// class is only used to hold proto descriptor, so developers don't need to -// work with it directly. -option java_outer_classname = "OpenAPIProto"; - -// The Java package name must be proto package name with proper prefix. -option java_package = "org.openapi_v2"; - -// A reasonable prefix for the Objective-C symbols generated from the package. -// It should at a minimum be 3 characters long, all uppercase, and convention -// is to use an abbreviation of the package name. Something short, but -// hopefully unique enough to not conflict with things that may come along in -// the future. 'GPB' is reserved for the protocol buffer implementation itself. -option objc_class_prefix = "OAS"; - -message AdditionalPropertiesItem { - oneof oneof { - Schema schema = 1; - bool boolean = 2; - } -} - -message Any { - google.protobuf.Any value = 1; - string yaml = 2; -} - -message ApiKeySecurity { - string type = 1; - string name = 2; - string in = 3; - string description = 4; - repeated NamedAny vendor_extension = 5; -} - -message BasicAuthenticationSecurity { - string type = 1; - string description = 2; - repeated NamedAny vendor_extension = 3; -} - -message BodyParameter { - // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. - string description = 1; - // The name of the parameter. - string name = 2; - // Determines the location of the parameter. - string in = 3; - // Determines whether or not this parameter is required or optional. - bool required = 4; - Schema schema = 5; - repeated NamedAny vendor_extension = 6; -} - -// Contact information for the owners of the API. -message Contact { - // The identifying name of the contact person/organization. - string name = 1; - // The URL pointing to the contact information. - string url = 2; - // The email address of the contact person/organization. - string email = 3; - repeated NamedAny vendor_extension = 4; -} - -message Default { - repeated NamedAny additional_properties = 1; -} - -// One or more JSON objects describing the schemas being consumed and produced by the API. -message Definitions { - repeated NamedSchema additional_properties = 1; -} - -message Document { - // The Swagger version of this document. - string swagger = 1; - Info info = 2; - // The host (name or ip) of the API. Example: 'swagger.io' - string host = 3; - // The base path to the API. Example: '/api'. - string base_path = 4; - // The transfer protocol of the API. - repeated string schemes = 5; - // A list of MIME types accepted by the API. - repeated string consumes = 6; - // A list of MIME types the API can produce. - repeated string produces = 7; - Paths paths = 8; - Definitions definitions = 9; - ParameterDefinitions parameters = 10; - ResponseDefinitions responses = 11; - repeated SecurityRequirement security = 12; - SecurityDefinitions security_definitions = 13; - repeated Tag tags = 14; - ExternalDocs external_docs = 15; - repeated NamedAny vendor_extension = 16; -} - -message Examples { - repeated NamedAny additional_properties = 1; -} - -// information about external documentation -message ExternalDocs { - string description = 1; - string url = 2; - repeated NamedAny vendor_extension = 3; -} - -// A deterministic version of a JSON Schema object. -message FileSchema { - string format = 1; - string title = 2; - string description = 3; - Any default = 4; - repeated string required = 5; - string type = 6; - bool read_only = 7; - ExternalDocs external_docs = 8; - Any example = 9; - repeated NamedAny vendor_extension = 10; -} - -message FormDataParameterSubSchema { - // Determines whether or not this parameter is required or optional. - bool required = 1; - // Determines the location of the parameter. - string in = 2; - // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. - string description = 3; - // The name of the parameter. - string name = 4; - // allows sending a parameter by name only or with an empty value. - bool allow_empty_value = 5; - string type = 6; - string format = 7; - PrimitivesItems items = 8; - string collection_format = 9; - Any default = 10; - double maximum = 11; - bool exclusive_maximum = 12; - double minimum = 13; - bool exclusive_minimum = 14; - int64 max_length = 15; - int64 min_length = 16; - string pattern = 17; - int64 max_items = 18; - int64 min_items = 19; - bool unique_items = 20; - repeated Any enum = 21; - double multiple_of = 22; - repeated NamedAny vendor_extension = 23; -} - -message Header { - string type = 1; - string format = 2; - PrimitivesItems items = 3; - string collection_format = 4; - Any default = 5; - double maximum = 6; - bool exclusive_maximum = 7; - double minimum = 8; - bool exclusive_minimum = 9; - int64 max_length = 10; - int64 min_length = 11; - string pattern = 12; - int64 max_items = 13; - int64 min_items = 14; - bool unique_items = 15; - repeated Any enum = 16; - double multiple_of = 17; - string description = 18; - repeated NamedAny vendor_extension = 19; -} - -message HeaderParameterSubSchema { - // Determines whether or not this parameter is required or optional. - bool required = 1; - // Determines the location of the parameter. - string in = 2; - // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. - string description = 3; - // The name of the parameter. - string name = 4; - string type = 5; - string format = 6; - PrimitivesItems items = 7; - string collection_format = 8; - Any default = 9; - double maximum = 10; - bool exclusive_maximum = 11; - double minimum = 12; - bool exclusive_minimum = 13; - int64 max_length = 14; - int64 min_length = 15; - string pattern = 16; - int64 max_items = 17; - int64 min_items = 18; - bool unique_items = 19; - repeated Any enum = 20; - double multiple_of = 21; - repeated NamedAny vendor_extension = 22; -} - -message Headers { - repeated NamedHeader additional_properties = 1; -} - -// General information about the API. -message Info { - // A unique and precise title of the API. - string title = 1; - // A semantic version number of the API. - string version = 2; - // A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed. - string description = 3; - // The terms of service for the API. - string terms_of_service = 4; - Contact contact = 5; - License license = 6; - repeated NamedAny vendor_extension = 7; -} - -message ItemsItem { - repeated Schema schema = 1; -} - -message JsonReference { - string _ref = 1; - string description = 2; -} - -message License { - // The name of the license type. It's encouraged to use an OSI compatible license. - string name = 1; - // The URL pointing to the license. - string url = 2; - repeated NamedAny vendor_extension = 3; -} - -// Automatically-generated message used to represent maps of Any as ordered (name,value) pairs. -message NamedAny { - // Map key - string name = 1; - // Mapped value - Any value = 2; -} - -// Automatically-generated message used to represent maps of Header as ordered (name,value) pairs. -message NamedHeader { - // Map key - string name = 1; - // Mapped value - Header value = 2; -} - -// Automatically-generated message used to represent maps of Parameter as ordered (name,value) pairs. -message NamedParameter { - // Map key - string name = 1; - // Mapped value - Parameter value = 2; -} - -// Automatically-generated message used to represent maps of PathItem as ordered (name,value) pairs. -message NamedPathItem { - // Map key - string name = 1; - // Mapped value - PathItem value = 2; -} - -// Automatically-generated message used to represent maps of Response as ordered (name,value) pairs. -message NamedResponse { - // Map key - string name = 1; - // Mapped value - Response value = 2; -} - -// Automatically-generated message used to represent maps of ResponseValue as ordered (name,value) pairs. -message NamedResponseValue { - // Map key - string name = 1; - // Mapped value - ResponseValue value = 2; -} - -// Automatically-generated message used to represent maps of Schema as ordered (name,value) pairs. -message NamedSchema { - // Map key - string name = 1; - // Mapped value - Schema value = 2; -} - -// Automatically-generated message used to represent maps of SecurityDefinitionsItem as ordered (name,value) pairs. -message NamedSecurityDefinitionsItem { - // Map key - string name = 1; - // Mapped value - SecurityDefinitionsItem value = 2; -} - -// Automatically-generated message used to represent maps of string as ordered (name,value) pairs. -message NamedString { - // Map key - string name = 1; - // Mapped value - string value = 2; -} - -// Automatically-generated message used to represent maps of StringArray as ordered (name,value) pairs. -message NamedStringArray { - // Map key - string name = 1; - // Mapped value - StringArray value = 2; -} - -message NonBodyParameter { - oneof oneof { - HeaderParameterSubSchema header_parameter_sub_schema = 1; - FormDataParameterSubSchema form_data_parameter_sub_schema = 2; - QueryParameterSubSchema query_parameter_sub_schema = 3; - PathParameterSubSchema path_parameter_sub_schema = 4; - } -} - -message Oauth2AccessCodeSecurity { - string type = 1; - string flow = 2; - Oauth2Scopes scopes = 3; - string authorization_url = 4; - string token_url = 5; - string description = 6; - repeated NamedAny vendor_extension = 7; -} - -message Oauth2ApplicationSecurity { - string type = 1; - string flow = 2; - Oauth2Scopes scopes = 3; - string token_url = 4; - string description = 5; - repeated NamedAny vendor_extension = 6; -} - -message Oauth2ImplicitSecurity { - string type = 1; - string flow = 2; - Oauth2Scopes scopes = 3; - string authorization_url = 4; - string description = 5; - repeated NamedAny vendor_extension = 6; -} - -message Oauth2PasswordSecurity { - string type = 1; - string flow = 2; - Oauth2Scopes scopes = 3; - string token_url = 4; - string description = 5; - repeated NamedAny vendor_extension = 6; -} - -message Oauth2Scopes { - repeated NamedString additional_properties = 1; -} - -message Operation { - repeated string tags = 1; - // A brief summary of the operation. - string summary = 2; - // A longer description of the operation, GitHub Flavored Markdown is allowed. - string description = 3; - ExternalDocs external_docs = 4; - // A unique identifier of the operation. - string operation_id = 5; - // A list of MIME types the API can produce. - repeated string produces = 6; - // A list of MIME types the API can consume. - repeated string consumes = 7; - // The parameters needed to send a valid API call. - repeated ParametersItem parameters = 8; - Responses responses = 9; - // The transfer protocol of the API. - repeated string schemes = 10; - bool deprecated = 11; - repeated SecurityRequirement security = 12; - repeated NamedAny vendor_extension = 13; -} - -message Parameter { - oneof oneof { - BodyParameter body_parameter = 1; - NonBodyParameter non_body_parameter = 2; - } -} - -// One or more JSON representations for parameters -message ParameterDefinitions { - repeated NamedParameter additional_properties = 1; -} - -message ParametersItem { - oneof oneof { - Parameter parameter = 1; - JsonReference json_reference = 2; - } -} - -message PathItem { - string _ref = 1; - Operation get = 2; - Operation put = 3; - Operation post = 4; - Operation delete = 5; - Operation options = 6; - Operation head = 7; - Operation patch = 8; - // The parameters needed to send a valid API call. - repeated ParametersItem parameters = 9; - repeated NamedAny vendor_extension = 10; -} - -message PathParameterSubSchema { - // Determines whether or not this parameter is required or optional. - bool required = 1; - // Determines the location of the parameter. - string in = 2; - // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. - string description = 3; - // The name of the parameter. - string name = 4; - string type = 5; - string format = 6; - PrimitivesItems items = 7; - string collection_format = 8; - Any default = 9; - double maximum = 10; - bool exclusive_maximum = 11; - double minimum = 12; - bool exclusive_minimum = 13; - int64 max_length = 14; - int64 min_length = 15; - string pattern = 16; - int64 max_items = 17; - int64 min_items = 18; - bool unique_items = 19; - repeated Any enum = 20; - double multiple_of = 21; - repeated NamedAny vendor_extension = 22; -} - -// Relative paths to the individual endpoints. They must be relative to the 'basePath'. -message Paths { - repeated NamedAny vendor_extension = 1; - repeated NamedPathItem path = 2; -} - -message PrimitivesItems { - string type = 1; - string format = 2; - PrimitivesItems items = 3; - string collection_format = 4; - Any default = 5; - double maximum = 6; - bool exclusive_maximum = 7; - double minimum = 8; - bool exclusive_minimum = 9; - int64 max_length = 10; - int64 min_length = 11; - string pattern = 12; - int64 max_items = 13; - int64 min_items = 14; - bool unique_items = 15; - repeated Any enum = 16; - double multiple_of = 17; - repeated NamedAny vendor_extension = 18; -} - -message Properties { - repeated NamedSchema additional_properties = 1; -} - -message QueryParameterSubSchema { - // Determines whether or not this parameter is required or optional. - bool required = 1; - // Determines the location of the parameter. - string in = 2; - // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. - string description = 3; - // The name of the parameter. - string name = 4; - // allows sending a parameter by name only or with an empty value. - bool allow_empty_value = 5; - string type = 6; - string format = 7; - PrimitivesItems items = 8; - string collection_format = 9; - Any default = 10; - double maximum = 11; - bool exclusive_maximum = 12; - double minimum = 13; - bool exclusive_minimum = 14; - int64 max_length = 15; - int64 min_length = 16; - string pattern = 17; - int64 max_items = 18; - int64 min_items = 19; - bool unique_items = 20; - repeated Any enum = 21; - double multiple_of = 22; - repeated NamedAny vendor_extension = 23; -} - -message Response { - string description = 1; - SchemaItem schema = 2; - Headers headers = 3; - Examples examples = 4; - repeated NamedAny vendor_extension = 5; -} - -// One or more JSON representations for parameters -message ResponseDefinitions { - repeated NamedResponse additional_properties = 1; -} - -message ResponseValue { - oneof oneof { - Response response = 1; - JsonReference json_reference = 2; - } -} - -// Response objects names can either be any valid HTTP status code or 'default'. -message Responses { - repeated NamedResponseValue response_code = 1; - repeated NamedAny vendor_extension = 2; -} - -// A deterministic version of a JSON Schema object. -message Schema { - string _ref = 1; - string format = 2; - string title = 3; - string description = 4; - Any default = 5; - double multiple_of = 6; - double maximum = 7; - bool exclusive_maximum = 8; - double minimum = 9; - bool exclusive_minimum = 10; - int64 max_length = 11; - int64 min_length = 12; - string pattern = 13; - int64 max_items = 14; - int64 min_items = 15; - bool unique_items = 16; - int64 max_properties = 17; - int64 min_properties = 18; - repeated string required = 19; - repeated Any enum = 20; - AdditionalPropertiesItem additional_properties = 21; - TypeItem type = 22; - ItemsItem items = 23; - repeated Schema all_of = 24; - Properties properties = 25; - string discriminator = 26; - bool read_only = 27; - Xml xml = 28; - ExternalDocs external_docs = 29; - Any example = 30; - repeated NamedAny vendor_extension = 31; -} - -message SchemaItem { - oneof oneof { - Schema schema = 1; - FileSchema file_schema = 2; - } -} - -message SecurityDefinitions { - repeated NamedSecurityDefinitionsItem additional_properties = 1; -} - -message SecurityDefinitionsItem { - oneof oneof { - BasicAuthenticationSecurity basic_authentication_security = 1; - ApiKeySecurity api_key_security = 2; - Oauth2ImplicitSecurity oauth2_implicit_security = 3; - Oauth2PasswordSecurity oauth2_password_security = 4; - Oauth2ApplicationSecurity oauth2_application_security = 5; - Oauth2AccessCodeSecurity oauth2_access_code_security = 6; - } -} - -message SecurityRequirement { - repeated NamedStringArray additional_properties = 1; -} - -message StringArray { - repeated string value = 1; -} - -message Tag { - string name = 1; - string description = 2; - ExternalDocs external_docs = 3; - repeated NamedAny vendor_extension = 4; -} - -message TypeItem { - repeated string value = 1; -} - -// Any property starting with x- is valid. -message VendorExtension { - repeated NamedAny additional_properties = 1; -} - -message Xml { - string name = 1; - string namespace = 2; - string prefix = 3; - bool attribute = 4; - bool wrapped = 5; - repeated NamedAny vendor_extension = 6; -} - diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/README.md b/vendor/github.com/googleapis/gnostic/OpenAPIv2/README.md deleted file mode 100644 index 836fb32a..00000000 --- a/vendor/github.com/googleapis/gnostic/OpenAPIv2/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# OpenAPI v2 Protocol Buffer Models - -This directory contains a Protocol Buffer-language model -and related code for supporting OpenAPI v2. - -Gnostic applications and plugins can use OpenAPIv2.proto -to generate Protocol Buffer support code for their preferred languages. - -OpenAPIv2.go is used by Gnostic to read JSON and YAML OpenAPI -descriptions into the Protocol Buffer-based datastructures -generated from OpenAPIv2.proto. - -OpenAPIv2.proto and OpenAPIv2.go are generated by the Gnostic -compiler generator, and OpenAPIv2.pb.go is generated by -protoc, the Protocol Buffer compiler, and protoc-gen-go, the -Protocol Buffer Go code generation plugin. diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/openapi-2.0.json b/vendor/github.com/googleapis/gnostic/OpenAPIv2/openapi-2.0.json deleted file mode 100644 index 2815a26e..00000000 --- a/vendor/github.com/googleapis/gnostic/OpenAPIv2/openapi-2.0.json +++ /dev/null @@ -1,1610 +0,0 @@ -{ - "title": "A JSON Schema for Swagger 2.0 API.", - "id": "http://swagger.io/v2/schema.json#", - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "required": [ - "swagger", - "info", - "paths" - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "swagger": { - "type": "string", - "enum": [ - "2.0" - ], - "description": "The Swagger version of this document." - }, - "info": { - "$ref": "#/definitions/info" - }, - "host": { - "type": "string", - "pattern": "^[^{}/ :\\\\]+(?::\\d+)?$", - "description": "The host (name or ip) of the API. Example: 'swagger.io'" - }, - "basePath": { - "type": "string", - "pattern": "^/", - "description": "The base path to the API. Example: '/api'." - }, - "schemes": { - "$ref": "#/definitions/schemesList" - }, - "consumes": { - "description": "A list of MIME types accepted by the API.", - "allOf": [ - { - "$ref": "#/definitions/mediaTypeList" - } - ] - }, - "produces": { - "description": "A list of MIME types the API can produce.", - "allOf": [ - { - "$ref": "#/definitions/mediaTypeList" - } - ] - }, - "paths": { - "$ref": "#/definitions/paths" - }, - "definitions": { - "$ref": "#/definitions/definitions" - }, - "parameters": { - "$ref": "#/definitions/parameterDefinitions" - }, - "responses": { - "$ref": "#/definitions/responseDefinitions" - }, - "security": { - "$ref": "#/definitions/security" - }, - "securityDefinitions": { - "$ref": "#/definitions/securityDefinitions" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - } - }, - "definitions": { - "info": { - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed." - }, - "termsOfService": { - "type": "string", - "description": "The terms of service for the API." - }, - "contact": { - "$ref": "#/definitions/contact" - }, - "license": { - "$ref": "#/definitions/license" - } - } - }, - "contact": { - "type": "object", - "description": "Contact information for the owners of the API.", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The identifying name of the contact person/organization." - }, - "url": { - "type": "string", - "description": "The URL pointing to the contact information.", - "format": "uri" - }, - "email": { - "type": "string", - "description": "The email address of the contact person/organization.", - "format": "email" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "license": { - "type": "object", - "required": [ - "name" - ], - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The name of the license type. It's encouraged to use an OSI compatible license." - }, - "url": { - "type": "string", - "description": "The URL pointing to the license.", - "format": "uri" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "paths": { - "type": "object", - "description": "Relative paths to the individual endpoints. They must be relative to the 'basePath'.", - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - }, - "^/": { - "$ref": "#/definitions/pathItem" - } - }, - "additionalProperties": false - }, - "definitions": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "description": "One or more JSON objects describing the schemas being consumed and produced by the API." - }, - "parameterDefinitions": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/parameter" - }, - "description": "One or more JSON representations for parameters" - }, - "responseDefinitions": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/response" - }, - "description": "One or more JSON representations for parameters" - }, - "externalDocs": { - "type": "object", - "additionalProperties": false, - "description": "information about external documentation", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "examples": { - "type": "object", - "additionalProperties": true - }, - "mimeType": { - "type": "string", - "description": "The MIME type of the HTTP message." - }, - "operation": { - "type": "object", - "required": [ - "responses" - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "summary": { - "type": "string", - "description": "A brief summary of the operation." - }, - "description": { - "type": "string", - "description": "A longer description of the operation, GitHub Flavored Markdown is allowed." - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "operationId": { - "type": "string", - "description": "A unique identifier of the operation." - }, - "produces": { - "description": "A list of MIME types the API can produce.", - "allOf": [ - { - "$ref": "#/definitions/mediaTypeList" - } - ] - }, - "consumes": { - "description": "A list of MIME types the API can consume.", - "allOf": [ - { - "$ref": "#/definitions/mediaTypeList" - } - ] - }, - "parameters": { - "$ref": "#/definitions/parametersList" - }, - "responses": { - "$ref": "#/definitions/responses" - }, - "schemes": { - "$ref": "#/definitions/schemesList" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "security": { - "$ref": "#/definitions/security" - } - } - }, - "pathItem": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "$ref": { - "type": "string" - }, - "get": { - "$ref": "#/definitions/operation" - }, - "put": { - "$ref": "#/definitions/operation" - }, - "post": { - "$ref": "#/definitions/operation" - }, - "delete": { - "$ref": "#/definitions/operation" - }, - "options": { - "$ref": "#/definitions/operation" - }, - "head": { - "$ref": "#/definitions/operation" - }, - "patch": { - "$ref": "#/definitions/operation" - }, - "parameters": { - "$ref": "#/definitions/parametersList" - } - } - }, - "responses": { - "type": "object", - "description": "Response objects names can either be any valid HTTP status code or 'default'.", - "minProperties": 1, - "additionalProperties": false, - "patternProperties": { - "^([0-9]{3})$|^(default)$": { - "$ref": "#/definitions/responseValue" - }, - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "not": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - } - }, - "responseValue": { - "oneOf": [ - { - "$ref": "#/definitions/response" - }, - { - "$ref": "#/definitions/jsonReference" - } - ] - }, - "response": { - "type": "object", - "required": [ - "description" - ], - "properties": { - "description": { - "type": "string" - }, - "schema": { - "oneOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "$ref": "#/definitions/fileSchema" - } - ] - }, - "headers": { - "$ref": "#/definitions/headers" - }, - "examples": { - "$ref": "#/definitions/examples" - } - }, - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/header" - } - }, - "header": { - "type": "object", - "additionalProperties": false, - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "string", - "number", - "integer", - "boolean", - "array" - ] - }, - "format": { - "type": "string" - }, - "items": { - "$ref": "#/definitions/primitivesItems" - }, - "collectionFormat": { - "$ref": "#/definitions/collectionFormat" - }, - "default": { - "$ref": "#/definitions/default" - }, - "maximum": { - "$ref": "#/definitions/maximum" - }, - "exclusiveMaximum": { - "$ref": "#/definitions/exclusiveMaximum" - }, - "minimum": { - "$ref": "#/definitions/minimum" - }, - "exclusiveMinimum": { - "$ref": "#/definitions/exclusiveMinimum" - }, - "maxLength": { - "$ref": "#/definitions/maxLength" - }, - "minLength": { - "$ref": "#/definitions/minLength" - }, - "pattern": { - "$ref": "#/definitions/pattern" - }, - "maxItems": { - "$ref": "#/definitions/maxItems" - }, - "minItems": { - "$ref": "#/definitions/minItems" - }, - "uniqueItems": { - "$ref": "#/definitions/uniqueItems" - }, - "enum": { - "$ref": "#/definitions/enum" - }, - "multipleOf": { - "$ref": "#/definitions/multipleOf" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "vendorExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - }, - "bodyParameter": { - "type": "object", - "required": [ - "name", - "in", - "schema" - ], - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "name": { - "type": "string", - "description": "The name of the parameter." - }, - "in": { - "type": "string", - "description": "Determines the location of the parameter.", - "enum": [ - "body" - ] - }, - "required": { - "type": "boolean", - "description": "Determines whether or not this parameter is required or optional.", - "default": false - }, - "schema": { - "$ref": "#/definitions/schema" - } - }, - "additionalProperties": false - }, - "headerParameterSubSchema": { - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "required": { - "type": "boolean", - "description": "Determines whether or not this parameter is required or optional.", - "default": false - }, - "in": { - "type": "string", - "description": "Determines the location of the parameter.", - "enum": [ - "header" - ] - }, - "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "name": { - "type": "string", - "description": "The name of the parameter." - }, - "type": { - "type": "string", - "enum": [ - "string", - "number", - "boolean", - "integer", - "array" - ] - }, - "format": { - "type": "string" - }, - "items": { - "$ref": "#/definitions/primitivesItems" - }, - "collectionFormat": { - "$ref": "#/definitions/collectionFormat" - }, - "default": { - "$ref": "#/definitions/default" - }, - "maximum": { - "$ref": "#/definitions/maximum" - }, - "exclusiveMaximum": { - "$ref": "#/definitions/exclusiveMaximum" - }, - "minimum": { - "$ref": "#/definitions/minimum" - }, - "exclusiveMinimum": { - "$ref": "#/definitions/exclusiveMinimum" - }, - "maxLength": { - "$ref": "#/definitions/maxLength" - }, - "minLength": { - "$ref": "#/definitions/minLength" - }, - "pattern": { - "$ref": "#/definitions/pattern" - }, - "maxItems": { - "$ref": "#/definitions/maxItems" - }, - "minItems": { - "$ref": "#/definitions/minItems" - }, - "uniqueItems": { - "$ref": "#/definitions/uniqueItems" - }, - "enum": { - "$ref": "#/definitions/enum" - }, - "multipleOf": { - "$ref": "#/definitions/multipleOf" - } - } - }, - "queryParameterSubSchema": { - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "required": { - "type": "boolean", - "description": "Determines whether or not this parameter is required or optional.", - "default": false - }, - "in": { - "type": "string", - "description": "Determines the location of the parameter.", - "enum": [ - "query" - ] - }, - "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "name": { - "type": "string", - "description": "The name of the parameter." - }, - "allowEmptyValue": { - "type": "boolean", - "default": false, - "description": "allows sending a parameter by name only or with an empty value." - }, - "type": { - "type": "string", - "enum": [ - "string", - "number", - "boolean", - "integer", - "array" - ] - }, - "format": { - "type": "string" - }, - "items": { - "$ref": "#/definitions/primitivesItems" - }, - "collectionFormat": { - "$ref": "#/definitions/collectionFormatWithMulti" - }, - "default": { - "$ref": "#/definitions/default" - }, - "maximum": { - "$ref": "#/definitions/maximum" - }, - "exclusiveMaximum": { - "$ref": "#/definitions/exclusiveMaximum" - }, - "minimum": { - "$ref": "#/definitions/minimum" - }, - "exclusiveMinimum": { - "$ref": "#/definitions/exclusiveMinimum" - }, - "maxLength": { - "$ref": "#/definitions/maxLength" - }, - "minLength": { - "$ref": "#/definitions/minLength" - }, - "pattern": { - "$ref": "#/definitions/pattern" - }, - "maxItems": { - "$ref": "#/definitions/maxItems" - }, - "minItems": { - "$ref": "#/definitions/minItems" - }, - "uniqueItems": { - "$ref": "#/definitions/uniqueItems" - }, - "enum": { - "$ref": "#/definitions/enum" - }, - "multipleOf": { - "$ref": "#/definitions/multipleOf" - } - } - }, - "formDataParameterSubSchema": { - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "required": { - "type": "boolean", - "description": "Determines whether or not this parameter is required or optional.", - "default": false - }, - "in": { - "type": "string", - "description": "Determines the location of the parameter.", - "enum": [ - "formData" - ] - }, - "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "name": { - "type": "string", - "description": "The name of the parameter." - }, - "allowEmptyValue": { - "type": "boolean", - "default": false, - "description": "allows sending a parameter by name only or with an empty value." - }, - "type": { - "type": "string", - "enum": [ - "string", - "number", - "boolean", - "integer", - "array", - "file" - ] - }, - "format": { - "type": "string" - }, - "items": { - "$ref": "#/definitions/primitivesItems" - }, - "collectionFormat": { - "$ref": "#/definitions/collectionFormatWithMulti" - }, - "default": { - "$ref": "#/definitions/default" - }, - "maximum": { - "$ref": "#/definitions/maximum" - }, - "exclusiveMaximum": { - "$ref": "#/definitions/exclusiveMaximum" - }, - "minimum": { - "$ref": "#/definitions/minimum" - }, - "exclusiveMinimum": { - "$ref": "#/definitions/exclusiveMinimum" - }, - "maxLength": { - "$ref": "#/definitions/maxLength" - }, - "minLength": { - "$ref": "#/definitions/minLength" - }, - "pattern": { - "$ref": "#/definitions/pattern" - }, - "maxItems": { - "$ref": "#/definitions/maxItems" - }, - "minItems": { - "$ref": "#/definitions/minItems" - }, - "uniqueItems": { - "$ref": "#/definitions/uniqueItems" - }, - "enum": { - "$ref": "#/definitions/enum" - }, - "multipleOf": { - "$ref": "#/definitions/multipleOf" - } - } - }, - "pathParameterSubSchema": { - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "required": [ - "required" - ], - "properties": { - "required": { - "type": "boolean", - "enum": [ - true - ], - "description": "Determines whether or not this parameter is required or optional." - }, - "in": { - "type": "string", - "description": "Determines the location of the parameter.", - "enum": [ - "path" - ] - }, - "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "name": { - "type": "string", - "description": "The name of the parameter." - }, - "type": { - "type": "string", - "enum": [ - "string", - "number", - "boolean", - "integer", - "array" - ] - }, - "format": { - "type": "string" - }, - "items": { - "$ref": "#/definitions/primitivesItems" - }, - "collectionFormat": { - "$ref": "#/definitions/collectionFormat" - }, - "default": { - "$ref": "#/definitions/default" - }, - "maximum": { - "$ref": "#/definitions/maximum" - }, - "exclusiveMaximum": { - "$ref": "#/definitions/exclusiveMaximum" - }, - "minimum": { - "$ref": "#/definitions/minimum" - }, - "exclusiveMinimum": { - "$ref": "#/definitions/exclusiveMinimum" - }, - "maxLength": { - "$ref": "#/definitions/maxLength" - }, - "minLength": { - "$ref": "#/definitions/minLength" - }, - "pattern": { - "$ref": "#/definitions/pattern" - }, - "maxItems": { - "$ref": "#/definitions/maxItems" - }, - "minItems": { - "$ref": "#/definitions/minItems" - }, - "uniqueItems": { - "$ref": "#/definitions/uniqueItems" - }, - "enum": { - "$ref": "#/definitions/enum" - }, - "multipleOf": { - "$ref": "#/definitions/multipleOf" - } - } - }, - "nonBodyParameter": { - "type": "object", - "required": [ - "name", - "in", - "type" - ], - "oneOf": [ - { - "$ref": "#/definitions/headerParameterSubSchema" - }, - { - "$ref": "#/definitions/formDataParameterSubSchema" - }, - { - "$ref": "#/definitions/queryParameterSubSchema" - }, - { - "$ref": "#/definitions/pathParameterSubSchema" - } - ] - }, - "parameter": { - "oneOf": [ - { - "$ref": "#/definitions/bodyParameter" - }, - { - "$ref": "#/definitions/nonBodyParameter" - } - ] - }, - "schema": { - "type": "object", - "description": "A deterministic version of a JSON Schema object.", - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "$ref": { - "type": "string" - }, - "format": { - "type": "string" - }, - "title": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/title" - }, - "description": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/description" - }, - "default": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/default" - }, - "multipleOf": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf" - }, - "maximum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum" - }, - "exclusiveMaximum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" - }, - "minimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum" - }, - "exclusiveMinimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" - }, - "maxLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "pattern": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" - }, - "maxItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "uniqueItems": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" - }, - "maxProperties": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minProperties": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "required": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" - }, - "enum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" - }, - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "type": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/type" - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "discriminator": { - "type": "string" - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "xml": { - "$ref": "#/definitions/xml" - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "example": {} - }, - "additionalProperties": false - }, - "fileSchema": { - "type": "object", - "description": "A deterministic version of a JSON Schema object.", - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "required": [ - "type" - ], - "properties": { - "format": { - "type": "string" - }, - "title": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/title" - }, - "description": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/description" - }, - "default": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/default" - }, - "required": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" - }, - "type": { - "type": "string", - "enum": [ - "file" - ] - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "example": {} - }, - "additionalProperties": false - }, - "primitivesItems": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "type": "string", - "enum": [ - "string", - "number", - "integer", - "boolean", - "array" - ] - }, - "format": { - "type": "string" - }, - "items": { - "$ref": "#/definitions/primitivesItems" - }, - "collectionFormat": { - "$ref": "#/definitions/collectionFormat" - }, - "default": { - "$ref": "#/definitions/default" - }, - "maximum": { - "$ref": "#/definitions/maximum" - }, - "exclusiveMaximum": { - "$ref": "#/definitions/exclusiveMaximum" - }, - "minimum": { - "$ref": "#/definitions/minimum" - }, - "exclusiveMinimum": { - "$ref": "#/definitions/exclusiveMinimum" - }, - "maxLength": { - "$ref": "#/definitions/maxLength" - }, - "minLength": { - "$ref": "#/definitions/minLength" - }, - "pattern": { - "$ref": "#/definitions/pattern" - }, - "maxItems": { - "$ref": "#/definitions/maxItems" - }, - "minItems": { - "$ref": "#/definitions/minItems" - }, - "uniqueItems": { - "$ref": "#/definitions/uniqueItems" - }, - "enum": { - "$ref": "#/definitions/enum" - }, - "multipleOf": { - "$ref": "#/definitions/multipleOf" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/securityRequirement" - }, - "uniqueItems": true - }, - "securityRequirement": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - }, - "xml": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - }, - "prefix": { - "type": "string" - }, - "attribute": { - "type": "boolean", - "default": false - }, - "wrapped": { - "type": "boolean", - "default": false - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "tag": { - "type": "object", - "additionalProperties": false, - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "securityDefinitions": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/basicAuthenticationSecurity" - }, - { - "$ref": "#/definitions/apiKeySecurity" - }, - { - "$ref": "#/definitions/oauth2ImplicitSecurity" - }, - { - "$ref": "#/definitions/oauth2PasswordSecurity" - }, - { - "$ref": "#/definitions/oauth2ApplicationSecurity" - }, - { - "$ref": "#/definitions/oauth2AccessCodeSecurity" - } - ] - } - }, - "basicAuthenticationSecurity": { - "type": "object", - "additionalProperties": false, - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "basic" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "apiKeySecurity": { - "type": "object", - "additionalProperties": false, - "required": [ - "type", - "name", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apiKey" - ] - }, - "name": { - "type": "string" - }, - "in": { - "type": "string", - "enum": [ - "header", - "query" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "oauth2ImplicitSecurity": { - "type": "object", - "additionalProperties": false, - "required": [ - "type", - "flow", - "authorizationUrl" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2" - ] - }, - "flow": { - "type": "string", - "enum": [ - "implicit" - ] - }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - }, - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "oauth2PasswordSecurity": { - "type": "object", - "additionalProperties": false, - "required": [ - "type", - "flow", - "tokenUrl" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2" - ] - }, - "flow": { - "type": "string", - "enum": [ - "password" - ] - }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "oauth2ApplicationSecurity": { - "type": "object", - "additionalProperties": false, - "required": [ - "type", - "flow", - "tokenUrl" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2" - ] - }, - "flow": { - "type": "string", - "enum": [ - "application" - ] - }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "oauth2AccessCodeSecurity": { - "type": "object", - "additionalProperties": false, - "required": [ - "type", - "flow", - "authorizationUrl", - "tokenUrl" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2" - ] - }, - "flow": { - "type": "string", - "enum": [ - "accessCode" - ] - }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - }, - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "oauth2Scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "mediaTypeList": { - "type": "array", - "items": { - "$ref": "#/definitions/mimeType" - }, - "uniqueItems": true - }, - "parametersList": { - "type": "array", - "description": "The parameters needed to send a valid API call.", - "additionalItems": false, - "items": { - "oneOf": [ - { - "$ref": "#/definitions/parameter" - }, - { - "$ref": "#/definitions/jsonReference" - } - ] - }, - "uniqueItems": true - }, - "schemesList": { - "type": "array", - "description": "The transfer protocol of the API.", - "items": { - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss" - ] - }, - "uniqueItems": true - }, - "collectionFormat": { - "type": "string", - "enum": [ - "csv", - "ssv", - "tsv", - "pipes" - ], - "default": "csv" - }, - "collectionFormatWithMulti": { - "type": "string", - "enum": [ - "csv", - "ssv", - "tsv", - "pipes", - "multi" - ], - "default": "csv" - }, - "title": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/title" - }, - "description": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/description" - }, - "default": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/default" - }, - "multipleOf": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf" - }, - "maximum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum" - }, - "exclusiveMaximum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" - }, - "minimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum" - }, - "exclusiveMinimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" - }, - "maxLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "pattern": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" - }, - "maxItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "uniqueItems": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" - }, - "enum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" - }, - "jsonReference": { - "type": "object", - "required": [ - "$ref" - ], - "additionalProperties": false, - "properties": { - "$ref": { - "type": "string" - }, - "description": { - "type": "string" - } - } - } - } -} diff --git a/vendor/github.com/googleapis/gnostic/README.md b/vendor/github.com/googleapis/gnostic/README.md deleted file mode 100644 index 97de6359..00000000 --- a/vendor/github.com/googleapis/gnostic/README.md +++ /dev/null @@ -1,109 +0,0 @@ -[![Build Status](https://travis-ci.org/googleapis/gnostic.svg?branch=master)](https://travis-ci.org/googleapis/gnostic) - -# ⨁ gnostic - -This repository contains a Go command line tool which converts -JSON and YAML [OpenAPI](https://github.com/OAI/OpenAPI-Specification) -descriptions to and from equivalent Protocol Buffer representations. - -[Protocol Buffers](https://developers.google.com/protocol-buffers/) -provide a language-neutral, platform-neutral, extensible mechanism -for serializing structured data. -**gnostic**'s Protocol Buffer models for the OpenAPI Specification -can be used to generate code that includes data structures with -explicit fields for the elements of an OpenAPI description. -This makes it possible for developers to work with OpenAPI -descriptions in type-safe ways, which is particularly useful -in strongly-typed languages like Go and Swift. - -**gnostic** reads OpenAPI descriptions into -these generated data structures, reports errors, -resolves internal dependencies, and writes the results -in a binary form that can be used in any language that is -supported by the Protocol Buffer tools. -A plugin interface simplifies integration with API -tools written in a variety of different languages, -and when necessary, Protocol Buffer OpenAPI descriptions -can be reexported as JSON or YAML. - -**gnostic** compilation code and OpenAPI Protocol Buffer -models are automatically generated from an -[OpenAPI JSON Schema](https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v2.0/schema.json). -Source code for the generator is in the [generate-gnostic](generate-gnostic) directory. - -## Disclaimer - -This is prerelease software and work in progress. Feedback and -contributions are welcome, but we currently make no guarantees of -function or stability. - -## Requirements - -**gnostic** can be run in any environment that supports [Go](http://golang.org) -and the [Google Protocol Buffer Compiler](https://github.com/google/protobuf). - -## Installation - -1. Get this package by downloading it with `go get`. - - go get github.com/googleapis/gnostic - -2. [Optional] Build and run the compiler generator. -This uses the OpenAPI JSON schema to generate a Protocol Buffer language file -that describes the OpenAPI specification and a Go-language file of code that -will read a JSON or YAML OpenAPI representation into the generated protocol -buffers. Pre-generated versions of these files are in the OpenAPIv2 directory. - - cd $GOPATH/src/github.com/googleapis/gnostic/generate-gnostic - go install - cd .. - generate-gnostic --v2 - -3. [Optional] Generate Protocol Buffer support code. -A pre-generated version of this file is checked into the OpenAPIv2 directory. -This step requires a local installation of protoc, the Protocol Buffer Compiler, -and the Go protoc plugin. -You can get protoc [here](https://github.com/google/protobuf). -You can install the plugin with this command: - - go get -u github.com/golang/protobuf/protoc-gen-go - -Then use the following to recompile the Gnostic Protocol Buffer models: - - ./COMPILE-PROTOS.sh - -4. [Optional] Rebuild **gnostic**. This is only necessary if you've performed steps -2 or 3 above. - - go install github.com/googleapis/gnostic - -5. Run **gnostic**. This will create a file in the current directory named "petstore.pb" that contains a binary -Protocol Buffer description of a sample API. - - gnostic --pb-out=. examples/v2.0/json/petstore.json - -6. You can also compile files that you specify with a URL. Here's another way to compile the previous -example. This time we're creating "petstore.text", which contains a textual representation of the -Protocol Buffer description. This is mainly for use in testing and debugging. - - gnostic --text-out=petstore.text https://raw.githubusercontent.com/googleapis/gnostic/master/examples/petstore.json - -7. For a sample application, see apps/report. - - go install github.com/googleapis/gnostic/apps/report - report petstore.pb - -8. **gnostic** supports plugins. This builds and runs a sample plugin -that reports some basic information about an API. The "-" causes the plugin to -write its output to stdout. - - go install github.com/googleapis/gnostic/plugins/gnostic-go-sample - gnostic examples/v2.0/json/petstore.json --go-sample-out=- - -## Copyright - -Copyright 2017, Google Inc. - -## License - -Released under the Apache 2.0 license. diff --git a/vendor/github.com/googleapis/gnostic/compiler/README.md b/vendor/github.com/googleapis/gnostic/compiler/README.md deleted file mode 100644 index 848b16c6..00000000 --- a/vendor/github.com/googleapis/gnostic/compiler/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Compiler support code - -This directory contains compiler support code used by Gnostic and Gnostic extensions. \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/extensions/COMPILE-EXTENSION.sh b/vendor/github.com/googleapis/gnostic/extensions/COMPILE-EXTENSION.sh deleted file mode 100755 index 68d02a02..00000000 --- a/vendor/github.com/googleapis/gnostic/extensions/COMPILE-EXTENSION.sh +++ /dev/null @@ -1,5 +0,0 @@ -go get github.com/golang/protobuf/protoc-gen-go - -protoc \ ---go_out=Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any:. *.proto - diff --git a/vendor/github.com/googleapis/gnostic/extensions/README.md b/vendor/github.com/googleapis/gnostic/extensions/README.md deleted file mode 100644 index ff1c2eb1..00000000 --- a/vendor/github.com/googleapis/gnostic/extensions/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Extensions - -This directory contains support code for building Gnostic extensions and associated examples. - -Extensions are used to compile vendor or specification extensions into protocol buffer structures. diff --git a/vendor/github.com/googleapis/gnostic/extensions/extension.proto b/vendor/github.com/googleapis/gnostic/extensions/extension.proto deleted file mode 100644 index 04856f91..00000000 --- a/vendor/github.com/googleapis/gnostic/extensions/extension.proto +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2017 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -import "google/protobuf/any.proto"; -package openapiextension.v1; - -// This option lets the proto compiler generate Java code inside the package -// name (see below) instead of inside an outer class. It creates a simpler -// developer experience by reducing one-level of name nesting and be -// consistent with most programming languages that don't support outer classes. -option java_multiple_files = true; - -// The Java outer classname should be the filename in UpperCamelCase. This -// class is only used to hold proto descriptor, so developers don't need to -// work with it directly. -option java_outer_classname = "OpenAPIExtensionV1"; - -// The Java package name must be proto package name with proper prefix. -option java_package = "org.gnostic.v1"; - -// A reasonable prefix for the Objective-C symbols generated from the package. -// It should at a minimum be 3 characters long, all uppercase, and convention -// is to use an abbreviation of the package name. Something short, but -// hopefully unique enough to not conflict with things that may come along in -// the future. 'GPB' is reserved for the protocol buffer implementation itself. -// -option objc_class_prefix = "OAE"; // "OpenAPI Extension" - -// The version number of OpenAPI compiler. -message Version { - int32 major = 1; - int32 minor = 2; - int32 patch = 3; - // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should - // be empty for mainline stable releases. - string suffix = 4; -} - -// An encoded Request is written to the ExtensionHandler's stdin. -message ExtensionHandlerRequest { - - // The OpenAPI descriptions that were explicitly listed on the command line. - // The specifications will appear in the order they are specified to gnostic. - Wrapper wrapper = 1; - - // The version number of openapi compiler. - Version compiler_version = 3; -} - -// The extensions writes an encoded ExtensionHandlerResponse to stdout. -message ExtensionHandlerResponse { - - // true if the extension is handled by the extension handler; false otherwise - bool handled = 1; - - // Error message. If non-empty, the extension handling failed. - // The extension handler process should exit with status code zero - // even if it reports an error in this way. - // - // This should be used to indicate errors which prevent the extension from - // operating as intended. Errors which indicate a problem in gnostic - // itself -- such as the input Document being unparseable -- should be - // reported by writing a message to stderr and exiting with a non-zero - // status code. - repeated string error = 2; - - // text output - google.protobuf.Any value = 3; -} - -message Wrapper { - // version of the OpenAPI specification in which this extension was written. - string version = 1; - - // Name of the extension - string extension_name = 2; - - // Must be a valid yaml for the proto - string yaml = 3; -} diff --git a/vendor/github.com/googleapis/gnostic/gnostic.go b/vendor/github.com/googleapis/gnostic/gnostic.go deleted file mode 100644 index 96004152..00000000 --- a/vendor/github.com/googleapis/gnostic/gnostic.go +++ /dev/null @@ -1,610 +0,0 @@ -// Copyright 2017 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:generate ./COMPILE-PROTOS.sh - -// Gnostic is a tool for building better REST APIs through knowledge. -// -// Gnostic reads declarative descriptions of REST APIs that conform -// to the OpenAPI Specification, reports errors, resolves internal -// dependencies, and puts the results in a binary form that can -// be used in any language that is supported by the Protocol Buffer -// tools. -// -// Gnostic models are validated and typed. This allows API tool -// developers to focus on their product and not worry about input -// validation and type checking. -// -// Gnostic calls plugins that implement a variety of API implementation -// and support features including generation of client and server -// support code. -package main - -import ( - "bytes" - "errors" - "fmt" - "io" - "os" - "os/exec" - "path/filepath" - "regexp" - "strings" - "time" - - "github.com/golang/protobuf/proto" - "github.com/googleapis/gnostic/OpenAPIv2" - "github.com/googleapis/gnostic/OpenAPIv3" - "github.com/googleapis/gnostic/compiler" - "github.com/googleapis/gnostic/discovery" - "github.com/googleapis/gnostic/jsonwriter" - plugins "github.com/googleapis/gnostic/plugins" - surface "github.com/googleapis/gnostic/surface" - "gopkg.in/yaml.v2" -) - -const ( // Source Format - SourceFormatUnknown = 0 - SourceFormatOpenAPI2 = 2 - SourceFormatOpenAPI3 = 3 - SourceFormatDiscovery = 4 -) - -// Determine the version of an OpenAPI description read from JSON or YAML. -func getOpenAPIVersionFromInfo(info interface{}) int { - m, ok := compiler.UnpackMap(info) - if !ok { - return SourceFormatUnknown - } - swagger, ok := compiler.MapValueForKey(m, "swagger").(string) - if ok && strings.HasPrefix(swagger, "2.0") { - return SourceFormatOpenAPI2 - } - openapi, ok := compiler.MapValueForKey(m, "openapi").(string) - if ok && strings.HasPrefix(openapi, "3.0") { - return SourceFormatOpenAPI3 - } - kind, ok := compiler.MapValueForKey(m, "kind").(string) - if ok && kind == "discovery#restDescription" { - return SourceFormatDiscovery - } - return SourceFormatUnknown -} - -const ( - pluginPrefix = "gnostic-" - extensionPrefix = "gnostic-x-" -) - -type pluginCall struct { - Name string - Invocation string -} - -// Invokes a plugin. -func (p *pluginCall) perform(document proto.Message, sourceFormat int, sourceName string, timePlugins bool) ([]*plugins.Message, error) { - if p.Name != "" { - request := &plugins.Request{} - - // Infer the name of the executable by adding the prefix. - executableName := pluginPrefix + p.Name - - // Validate invocation string with regular expression. - invocation := p.Invocation - - // - // Plugin invocations must consist of - // zero or more comma-separated key=value pairs followed by a path. - // If pairs are present, a colon separates them from the path. - // Keys and values must be alphanumeric strings and may contain - // dashes, underscores, periods, or forward slashes. - // A path can contain any characters other than the separators ',', ':', and '='. - // - invocationRegex := regexp.MustCompile(`^([\w-_\/\.]+=[\w-_\/\.]+(,[\w-_\/\.]+=[\w-_\/\.]+)*:)?[^,:=]+$`) - if !invocationRegex.Match([]byte(p.Invocation)) { - return nil, fmt.Errorf("Invalid invocation of %s: %s", executableName, invocation) - } - - invocationParts := strings.Split(p.Invocation, ":") - var outputLocation string - switch len(invocationParts) { - case 1: - outputLocation = invocationParts[0] - case 2: - parameters := strings.Split(invocationParts[0], ",") - for _, keyvalue := range parameters { - pair := strings.Split(keyvalue, "=") - if len(pair) == 2 { - request.Parameters = append(request.Parameters, &plugins.Parameter{Name: pair[0], Value: pair[1]}) - } - } - outputLocation = invocationParts[1] - default: - // badly-formed request - outputLocation = invocationParts[len(invocationParts)-1] - } - - version := &plugins.Version{} - version.Major = 0 - version.Minor = 1 - version.Patch = 0 - request.CompilerVersion = version - - request.OutputPath = outputLocation - - request.SourceName = sourceName - switch sourceFormat { - case SourceFormatOpenAPI2: - request.AddModel("openapi.v2.Document", document) - // include experimental API surface model - surfaceModel, err := surface.NewModelFromOpenAPI2(document.(*openapi_v2.Document)) - if err == nil { - request.AddModel("surface.v1.Model", surfaceModel) - } - case SourceFormatOpenAPI3: - request.AddModel("openapi.v3.Document", document) - // include experimental API surface model - surfaceModel, err := surface.NewModelFromOpenAPI3(document.(*openapi_v3.Document)) - if err == nil { - request.AddModel("surface.v1.Model", surfaceModel) - } - case SourceFormatDiscovery: - request.AddModel("discovery.v1.Document", document) - default: - } - - requestBytes, _ := proto.Marshal(request) - - 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 - } - response := &plugins.Response{} - err = proto.Unmarshal(output, response) - if err != nil { - // Gnostic expects plugins to only write the - // response message to stdout. Be sure that - // any logging messages are written to stderr only. - return nil, errors.New("Invalid plugin response (plugins must write log messages to stderr, not stdout).") - } - plugins.HandleResponse(response, outputLocation) - return response.Messages, nil - } - return nil, nil -} - -func isFile(path string) bool { - fileInfo, err := os.Stat(path) - if err != nil { - return false - } - return !fileInfo.IsDir() -} - -func isDirectory(path string) bool { - fileInfo, err := os.Stat(path) - if err != nil { - return false - } - return fileInfo.IsDir() -} - -// Write bytes to a named file. -// Certain names have special meaning: -// ! writes nothing -// - writes to stdout -// = writes to stderr -// If a directory name is given, the file is written there with -// a name derived from the source and extension arguments. -func writeFile(name string, bytes []byte, source string, extension string) { - var writer io.Writer - if name == "!" { - return - } else if name == "-" { - writer = os.Stdout - } else if name == "=" { - writer = os.Stderr - } else if isDirectory(name) { - base := filepath.Base(source) - // Remove the original source extension. - base = base[0 : len(base)-len(filepath.Ext(base))] - // Build the path that puts the result in the passed-in directory. - filename := name + "/" + base + "." + extension - file, _ := os.Create(filename) - defer file.Close() - writer = file - } else { - file, _ := os.Create(name) - defer file.Close() - writer = file - } - writer.Write(bytes) - if name == "-" || name == "=" { - writer.Write([]byte("\n")) - } -} - -// The Gnostic structure holds global state information for gnostic. -type Gnostic struct { - usage string - sourceName string - binaryOutputPath string - textOutputPath string - yamlOutputPath string - jsonOutputPath string - errorOutputPath string - messageOutputPath string - resolveReferences bool - pluginCalls []*pluginCall - extensionHandlers []compiler.ExtensionHandler - sourceFormat int - timePlugins bool -} - -// Initialize a structure to store global application state. -func newGnostic() *Gnostic { - g := &Gnostic{} - // Option fields initialize to their default values. - g.usage = ` -Usage: gnostic SOURCE [OPTIONS] - SOURCE is the filename or URL of an API description. -Options: - --pb-out=PATH Write a binary proto to the specified location. - --text-out=PATH Write a text proto to the specified location. - --json-out=PATH Write a json API description to the specified location. - --yaml-out=PATH Write a yaml API description to the specified location. - --errors-out=PATH Write compilation errors to the specified location. - --messages-out=PATH Write messages generated by plugins to the specified - location. Messages from all plugin invocations are - written to a single common file. - --PLUGIN-out=PATH Run the plugin named gnostic-PLUGIN and write results - to the specified location. - --PLUGIN Run the plugin named gnostic-PLUGIN but don't write any - results. Used for plugins that return messages only. - PLUGIN must not match any other gnostic option. - --x-EXTENSION Use the extension named gnostic-x-EXTENSION - 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) - g.extensionHandlers = make([]compiler.ExtensionHandler, 0) - return g -} - -// Parse command-line options. -func (g *Gnostic) readOptions() { - // plugin processing matches patterns of the form "--PLUGIN-out=PATH" and "--PLUGIN_out=PATH" - pluginRegex := regexp.MustCompile("--(.+)[-_]out=(.+)") - - // extension processing matches patterns of the form "--x-EXTENSION" - extensionRegex := regexp.MustCompile("--x-(.+)") - - for i, arg := range os.Args { - if i == 0 { - continue // skip the tool name - } - var m [][]byte - if m = pluginRegex.FindSubmatch([]byte(arg)); m != nil { - pluginName := string(m[1]) - invocation := string(m[2]) - switch pluginName { - case "pb": - g.binaryOutputPath = invocation - case "text": - g.textOutputPath = invocation - case "json": - g.jsonOutputPath = invocation - case "yaml": - g.yamlOutputPath = invocation - case "errors": - g.errorOutputPath = invocation - case "messages": - g.messageOutputPath = invocation - default: - p := &pluginCall{Name: pluginName, Invocation: invocation} - g.pluginCalls = append(g.pluginCalls, p) - } - } else if m = extensionRegex.FindSubmatch([]byte(arg)); m != nil { - extensionName := string(m[1]) - extensionHandler := compiler.ExtensionHandler{Name: extensionPrefix + extensionName} - 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 - p := &pluginCall{Name: arg[2:len(arg)], Invocation: "!"} - g.pluginCalls = append(g.pluginCalls, p) - } else if arg[0] == '-' { - fmt.Fprintf(os.Stderr, "Unknown option: %s.\n%s\n", arg, g.usage) - os.Exit(-1) - } else { - g.sourceName = arg - } - } -} - -// Validate command-line options. -func (g *Gnostic) validateOptions() { - if g.binaryOutputPath == "" && - g.textOutputPath == "" && - g.yamlOutputPath == "" && - g.jsonOutputPath == "" && - g.errorOutputPath == "" && - len(g.pluginCalls) == 0 { - fmt.Fprintf(os.Stderr, "Missing output directives.\n%s\n", g.usage) - os.Exit(-1) - } - if g.sourceName == "" { - fmt.Fprintf(os.Stderr, "No input specified.\n%s\n", g.usage) - os.Exit(-1) - } - // If we get here and the error output is unspecified, write errors to stderr. - if g.errorOutputPath == "" { - g.errorOutputPath = "=" - } -} - -// Generate an error message to be written to stderr or a file. -func (g *Gnostic) errorBytes(err error) []byte { - return []byte("Errors reading " + g.sourceName + "\n" + err.Error()) -} - -// Read an OpenAPI description from YAML or JSON. -func (g *Gnostic) readOpenAPIText(bytes []byte) (message proto.Message, err error) { - info, err := compiler.ReadInfoFromBytes(g.sourceName, bytes) - if err != nil { - return nil, err - } - // Determine the OpenAPI version. - g.sourceFormat = getOpenAPIVersionFromInfo(info) - if g.sourceFormat == SourceFormatUnknown { - return nil, errors.New("unable to identify OpenAPI version") - } - // Compile to the proto model. - if g.sourceFormat == SourceFormatOpenAPI2 { - document, err := openapi_v2.NewDocument(info, compiler.NewContextWithExtensions("$root", nil, &g.extensionHandlers)) - if err != nil { - return nil, err - } - message = document - } else if g.sourceFormat == SourceFormatOpenAPI3 { - document, err := openapi_v3.NewDocument(info, compiler.NewContextWithExtensions("$root", nil, &g.extensionHandlers)) - if err != nil { - return nil, err - } - message = document - } else { - document, err := discovery_v1.NewDocument(info, compiler.NewContextWithExtensions("$root", nil, &g.extensionHandlers)) - if err != nil { - return nil, err - } - message = document - } - return message, err -} - -// Read an OpenAPI binary file. -func (g *Gnostic) readOpenAPIBinary(data []byte) (message proto.Message, err error) { - // try to read an OpenAPI v3 document - documentV3 := &openapi_v3.Document{} - err = proto.Unmarshal(data, documentV3) - if err == nil && strings.HasPrefix(documentV3.Openapi, "3.0") { - g.sourceFormat = SourceFormatOpenAPI3 - return documentV3, nil - } - // if that failed, try to read an OpenAPI v2 document - documentV2 := &openapi_v2.Document{} - err = proto.Unmarshal(data, documentV2) - if err == nil && strings.HasPrefix(documentV2.Swagger, "2.0") { - g.sourceFormat = SourceFormatOpenAPI2 - return documentV2, nil - } - // if that failed, try to read a Discovery Format document - discoveryDocument := &discovery_v1.Document{} - err = proto.Unmarshal(data, discoveryDocument) - if err == nil { // && strings.HasPrefix(documentV2.Swagger, "2.0") { - g.sourceFormat = SourceFormatDiscovery - return discoveryDocument, nil - } - return nil, err -} - -// Write a binary pb representation. -func (g *Gnostic) writeBinaryOutput(message proto.Message) { - protoBytes, err := proto.Marshal(message) - if err != nil { - writeFile(g.errorOutputPath, g.errorBytes(err), g.sourceName, "errors") - defer os.Exit(-1) - } else { - writeFile(g.binaryOutputPath, protoBytes, g.sourceName, "pb") - } -} - -// Write a text pb representation. -func (g *Gnostic) writeTextOutput(message proto.Message) { - bytes := []byte(proto.MarshalTextString(message)) - writeFile(g.textOutputPath, bytes, g.sourceName, "text") -} - -// Write JSON/YAML OpenAPI representations. -func (g *Gnostic) writeJSONYAMLOutput(message proto.Message) { - // Convert the OpenAPI document into an exportable MapSlice. - var rawInfo yaml.MapSlice - var ok bool - var err error - if g.sourceFormat == SourceFormatOpenAPI2 { - document := message.(*openapi_v2.Document) - rawInfo, ok = document.ToRawInfo().(yaml.MapSlice) - if !ok { - rawInfo = nil - } - } else if g.sourceFormat == SourceFormatOpenAPI3 { - document := message.(*openapi_v3.Document) - rawInfo, ok = document.ToRawInfo().(yaml.MapSlice) - if !ok { - rawInfo = nil - } - } else if g.sourceFormat == SourceFormatDiscovery { - document := message.(*discovery_v1.Document) - rawInfo, ok = document.ToRawInfo().(yaml.MapSlice) - if !ok { - rawInfo = nil - } - } - // Optionally write description in yaml format. - if g.yamlOutputPath != "" { - var bytes []byte - if rawInfo != nil { - bytes, err = yaml.Marshal(rawInfo) - if err != nil { - fmt.Fprintf(os.Stderr, "Error generating yaml output %s\n", err.Error()) - } - writeFile(g.yamlOutputPath, bytes, g.sourceName, "yaml") - } else { - fmt.Fprintf(os.Stderr, "No yaml output available.\n") - } - } - // Optionally write description in json format. - if g.jsonOutputPath != "" { - var bytes []byte - if rawInfo != nil { - bytes, _ = jsonwriter.Marshal(rawInfo) - if err != nil { - fmt.Fprintf(os.Stderr, "Error generating json output %s\n", err.Error()) - } - writeFile(g.jsonOutputPath, bytes, g.sourceName, "json") - } else { - fmt.Fprintf(os.Stderr, "No json output available.\n") - } - } -} - -// Write messages. -func (g *Gnostic) writeMessagesOutput(message proto.Message) { - protoBytes, err := proto.Marshal(message) - if err != nil { - writeFile(g.messageOutputPath, g.errorBytes(err), g.sourceName, "errors") - defer os.Exit(-1) - } else { - writeFile(g.messageOutputPath, protoBytes, g.sourceName, "messages.pb") - } -} - -// Perform all actions specified in the command-line options. -func (g *Gnostic) performActions(message proto.Message) (err error) { - // Optionally resolve internal references. - if g.resolveReferences { - if g.sourceFormat == SourceFormatOpenAPI2 { - document := message.(*openapi_v2.Document) - _, err = document.ResolveReferences(g.sourceName) - } else if g.sourceFormat == SourceFormatOpenAPI3 { - document := message.(*openapi_v3.Document) - _, err = document.ResolveReferences(g.sourceName) - } - if err != nil { - return err - } - } - // Optionally write proto in binary format. - if g.binaryOutputPath != "" { - g.writeBinaryOutput(message) - } - // Optionally write proto in text format. - if g.textOutputPath != "" { - g.writeTextOutput(message) - } - // Optionally write document in yaml and/or json formats. - if g.yamlOutputPath != "" || g.jsonOutputPath != "" { - g.writeJSONYAMLOutput(message) - } - // Call all specified plugins. - messages := make([]*plugins.Message, 0) - for _, p := range g.pluginCalls { - 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 - } - messages = append(messages, pluginMessages...) - } - if g.messageOutputPath != "" { - g.writeMessagesOutput(&plugins.Messages{Messages: messages}) - } else { - // Print any messages from the plugins - if len(messages) > 0 { - for _, message := range messages { - fmt.Printf("%+v\n", message) - } - } - } - return nil -} - -func (g *Gnostic) main() { - var err error - g.readOptions() - g.validateOptions() - // Read the OpenAPI source. - bytes, err := compiler.ReadBytesForFile(g.sourceName) - if err != nil { - writeFile(g.errorOutputPath, g.errorBytes(err), g.sourceName, "errors") - os.Exit(-1) - } - extension := strings.ToLower(filepath.Ext(g.sourceName)) - var message proto.Message - if extension == ".json" || extension == ".yaml" { - // Try to read the source as JSON/YAML. - message, err = g.readOpenAPIText(bytes) - if err != nil { - writeFile(g.errorOutputPath, g.errorBytes(err), g.sourceName, "errors") - os.Exit(-1) - } - } else if extension == ".pb" { - // Try to read the source as a binary protocol buffer. - message, err = g.readOpenAPIBinary(bytes) - if err != nil { - writeFile(g.errorOutputPath, g.errorBytes(err), g.sourceName, "errors") - os.Exit(-1) - } - } else { - err = errors.New("unknown file extension. 'json', 'yaml', and 'pb' are accepted") - writeFile(g.errorOutputPath, g.errorBytes(err), g.sourceName, "errors") - os.Exit(-1) - } - // Perform actions specified by command options. - err = g.performActions(message) - if err != nil { - writeFile(g.errorOutputPath, g.errorBytes(err), g.sourceName, "errors") - os.Exit(-1) - } -} - -func main() { - g := newGnostic() - g.main() -} diff --git a/vendor/github.com/googleapis/gnostic/gnostic_test.go b/vendor/github.com/googleapis/gnostic/gnostic_test.go deleted file mode 100644 index 22eaee82..00000000 --- a/vendor/github.com/googleapis/gnostic/gnostic_test.go +++ /dev/null @@ -1,453 +0,0 @@ -package main - -import ( - "io/ioutil" - "os" - "os/exec" - "path/filepath" - "strings" - "testing" -) - -func testCompiler(t *testing.T, inputFile string, referenceFile string, expectErrors bool) { - textFile := strings.Replace(filepath.Base(inputFile), filepath.Ext(inputFile), ".text", 1) - errorsFile := strings.Replace(filepath.Base(inputFile), filepath.Ext(inputFile), ".errors", 1) - // remove any preexisting output files - os.Remove(textFile) - os.Remove(errorsFile) - // run the compiler - var err error - var cmd = exec.Command( - "gnostic", - inputFile, - "--text-out=.", - "--errors-out=.", - "--resolve-refs") - //t.Log(cmd.Args) - err = cmd.Run() - if err != nil && !expectErrors { - t.Logf("Compile failed: %+v", err) - t.FailNow() - } - // verify the output against a reference - var outputFile string - if expectErrors { - outputFile = errorsFile - } else { - outputFile = textFile - } - err = exec.Command("diff", outputFile, 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(errorsFile) - } -} - -func testNormal(t *testing.T, inputFile string, referenceFile string) { - testCompiler(t, inputFile, referenceFile, false) -} - -func testErrors(t *testing.T, inputFile string, referenceFile string) { - testCompiler(t, inputFile, referenceFile, true) -} - -func TestPetstoreJSON(t *testing.T) { - testNormal(t, - "examples/v2.0/json/petstore.json", - "test/v2.0/petstore.text") -} - -func TestPetstoreYAML(t *testing.T) { - testNormal(t, - "examples/v2.0/yaml/petstore.yaml", - "test/v2.0/petstore.text") -} - -func TestSeparateYAML(t *testing.T) { - testNormal(t, - "examples/v2.0/yaml/petstore-separate/spec/swagger.yaml", - "test/v2.0/yaml/petstore-separate/spec/swagger.text") -} - -func TestSeparateJSON(t *testing.T) { - testNormal(t, - "examples/v2.0/json/petstore-separate/spec/swagger.json", - "test/v2.0/yaml/petstore-separate/spec/swagger.text") // yaml and json results should be identical -} - -func TestRemotePetstoreJSON(t *testing.T) { - testNormal(t, - "https://raw.githubusercontent.com/googleapis/openapi-compiler/master/examples/v2.0/json/petstore.json", - "test/v2.0/petstore.text") -} - -func TestRemotePetstoreYAML(t *testing.T) { - testNormal(t, - "https://raw.githubusercontent.com/googleapis/openapi-compiler/master/examples/v2.0/yaml/petstore.yaml", - "test/v2.0/petstore.text") -} - -func TestRemoteSeparateYAML(t *testing.T) { - testNormal(t, - "https://raw.githubusercontent.com/googleapis/openapi-compiler/master/examples/v2.0/yaml/petstore-separate/spec/swagger.yaml", - "test/v2.0/yaml/petstore-separate/spec/swagger.text") -} - -func TestRemoteSeparateJSON(t *testing.T) { - testNormal(t, - "https://raw.githubusercontent.com/googleapis/openapi-compiler/master/examples/v2.0/json/petstore-separate/spec/swagger.json", - "test/v2.0/yaml/petstore-separate/spec/swagger.text") -} - -func TestErrorBadProperties(t *testing.T) { - testErrors(t, - "examples/errors/petstore-badproperties.yaml", - "test/errors/petstore-badproperties.errors") -} - -func TestErrorUnresolvedRefs(t *testing.T) { - testErrors(t, - "examples/errors/petstore-unresolvedrefs.yaml", - "test/errors/petstore-unresolvedrefs.errors") -} - -func TestErrorMissingVersion(t *testing.T) { - testErrors(t, - "examples/errors/petstore-missingversion.yaml", - "test/errors/petstore-missingversion.errors") -} - -func testPlugin(t *testing.T, plugin string, inputFile string, outputFile string, referenceFile string) { - // remove any preexisting output files - os.Remove(outputFile) - // run the compiler - var err error - output, err := exec.Command( - "gnostic", - "--"+plugin+"-out=-", - inputFile).Output() - if err != nil { - t.Logf("Compile failed: %+v", err) - t.FailNow() - } - _ = ioutil.WriteFile(outputFile, output, 0644) - err = exec.Command("diff", outputFile, referenceFile).Run() - if err != nil { - t.Logf("Diff failed: %+v", err) - t.FailNow() - } else { - // if the test succeeded, clean up - os.Remove(outputFile) - } -} - -func TestSamplePluginWithPetstore(t *testing.T) { - testPlugin(t, - "summary", - "examples/v2.0/yaml/petstore.yaml", - "sample-petstore.out", - "test/v2.0/yaml/sample-petstore.out") -} - -func TestErrorInvalidPluginInvocations(t *testing.T) { - var err error - output, err := exec.Command( - "gnostic", - "examples/v2.0/yaml/petstore.yaml", - "--errors-out=-", - "--plugin-out=foo=bar,:abc", - "--plugin-out=,foo=bar:abc", - "--plugin-out=foo=:abc", - "--plugin-out==bar:abc", - "--plugin-out=,,:abc", - "--plugin-out=foo=bar=baz:abc", - ).Output() - if err == nil { - t.Logf("Invalid invocations were accepted") - t.FailNow() - } - outputFile := "invalid-plugin-invocation.errors" - _ = ioutil.WriteFile(outputFile, output, 0644) - err = exec.Command("diff", outputFile, "test/errors/invalid-plugin-invocation.errors").Run() - if err != nil { - t.Logf("Diff failed: %+v", err) - t.FailNow() - } else { - // if the test succeeded, clean up - os.Remove(outputFile) - } -} - -func TestValidPluginInvocations(t *testing.T) { - var err error - output, err := exec.Command( - "gnostic", - "examples/v2.0/yaml/petstore.yaml", - "--errors-out=-", - // verify an invocation with no parameters - "--summary-out=!", // "!" indicates that no output should be generated - // verify single pair of parameters - "--summary-out=a=b:!", - // verify multiple parameters - "--summary-out=a=b,c=123,xyz=alphabetagammadelta:!", - // verify that special characters / . - _ can be included in parameter keys and values - "--summary-out=a/b/c=x/y/z:!", - "--summary-out=a.b.c=x.y.z:!", - "--summary-out=a-b-c=x-y-z:!", - "--summary-out=a_b_c=x_y_z:!", - ).Output() - if len(output) != 0 { - t.Logf("Valid invocations generated invalid errors\n%s", string(output)) - t.FailNow() - } - if err != nil { - t.Logf("Valid invocations were not accepted") - t.FailNow() - } -} - -func TestExtensionHandlerWithLibraryExample(t *testing.T) { - outputFile := "library-example-with-ext.text.out" - inputFile := "test/library-example-with-ext.json" - referenceFile := "test/library-example-with-ext.text.out" - - os.Remove(outputFile) - // run the compiler - var err error - - command := exec.Command( - "gnostic", - "--x-sampleone", - "--x-sampletwo", - "--text-out="+outputFile, - "--resolve-refs", - inputFile) - - _, err = command.Output() - if err != nil { - t.Logf("Compile failed for command %v: %+v", command, err) - t.FailNow() - } - //_ = ioutil.WriteFile(outputFile, output, 0644) - err = exec.Command("diff", outputFile, referenceFile).Run() - if err != nil { - t.Logf("Diff failed: %+v", err) - t.FailNow() - } else { - // if the test succeeded, clean up - os.Remove(outputFile) - } -} - -func TestJSONOutput(t *testing.T) { - inputFile := "test/library-example-with-ext.json" - - textFile := "sample.text" - jsonFile := "sample.json" - textFile2 := "sample2.text" - jsonFile2 := "sample2.json" - - os.Remove(textFile) - os.Remove(jsonFile) - os.Remove(textFile2) - os.Remove(jsonFile2) - - var err error - - // Run the compiler once. - command := exec.Command( - "gnostic", - "--text-out="+textFile, - "--json-out="+jsonFile, - inputFile) - _, err = command.Output() - if err != nil { - t.Logf("Compile failed for command %v: %+v", command, err) - t.FailNow() - } - - // Run the compiler again, this time on the generated output. - command = exec.Command( - "gnostic", - "--text-out="+textFile2, - "--json-out="+jsonFile2, - jsonFile) - _, err = command.Output() - if err != nil { - t.Logf("Compile failed for command %v: %+v", command, err) - t.FailNow() - } - - // Verify that both models have the same internal representation. - err = exec.Command("diff", textFile, textFile2).Run() - if err != nil { - t.Logf("Diff failed: %+v", err) - t.FailNow() - } else { - // if the test succeeded, clean up - os.Remove(textFile) - os.Remove(jsonFile) - os.Remove(textFile2) - os.Remove(jsonFile2) - } -} - -func TestYAMLOutput(t *testing.T) { - inputFile := "test/library-example-with-ext.json" - - textFile := "sample.text" - yamlFile := "sample.yaml" - textFile2 := "sample2.text" - yamlFile2 := "sample2.yaml" - - os.Remove(textFile) - os.Remove(yamlFile) - os.Remove(textFile2) - os.Remove(yamlFile2) - - var err error - - // Run the compiler once. - command := exec.Command( - "gnostic", - "--text-out="+textFile, - "--yaml-out="+yamlFile, - inputFile) - _, err = command.Output() - if err != nil { - t.Logf("Compile failed for command %v: %+v", command, err) - t.FailNow() - } - - // Run the compiler again, this time on the generated output. - command = exec.Command( - "gnostic", - "--text-out="+textFile2, - "--yaml-out="+yamlFile2, - yamlFile) - _, err = command.Output() - if err != nil { - t.Logf("Compile failed for command %v: %+v", command, err) - t.FailNow() - } - - // Verify that both models have the same internal representation. - err = exec.Command("diff", textFile, textFile2).Run() - if err != nil { - t.Logf("Diff failed: %+v", err) - t.FailNow() - } else { - // if the test succeeded, clean up - os.Remove(textFile) - os.Remove(yamlFile) - os.Remove(textFile2) - os.Remove(yamlFile2) - } -} - -func testBuilder(version string, t *testing.T) { - var err error - - pbFile := "petstore-" + version + ".pb" - yamlFile := "petstore.yaml" - jsonFile := "petstore.json" - textFile := "petstore.text" - textReference := "test/" + version + ".0/petstore.text" - - os.Remove(pbFile) - os.Remove(textFile) - os.Remove(yamlFile) - os.Remove(jsonFile) - - // Generate petstore.pb. - command := exec.Command( - "petstore-builder", - "--"+version) - _, err = command.Output() - if err != nil { - t.Logf("Command %v failed: %+v", command, err) - t.FailNow() - } - - // Convert petstore.pb to yaml and json. - command = exec.Command( - "gnostic", - pbFile, - "--json-out="+jsonFile, - "--yaml-out="+yamlFile) - _, err = command.Output() - if err != nil { - t.Logf("Command %v failed: %+v", command, err) - t.FailNow() - } - - // Read petstore.yaml, resolve references, and export text. - command = exec.Command( - "gnostic", - yamlFile, - "--resolve-refs", - "--text-out="+textFile) - _, err = command.Output() - if err != nil { - t.Logf("Command %v failed: %+v", command, err) - t.FailNow() - } - - // Verify that the generated text matches our reference. - err = exec.Command("diff", textFile, textReference).Run() - if err != nil { - t.Logf("Diff failed: %+v", err) - t.FailNow() - } - - // Read petstore.json, resolve references, and export text. - command = exec.Command( - "gnostic", - jsonFile, - "--resolve-refs", - "--text-out="+textFile) - _, err = command.Output() - if err != nil { - t.Logf("Command %v failed: %+v", command, err) - t.FailNow() - } - - // Verify that the generated text matches our reference. - err = exec.Command("diff", textFile, textReference).Run() - if err != nil { - t.Logf("Diff failed: %+v", err) - t.FailNow() - } - - // if the test succeeded, clean up - os.Remove(pbFile) - os.Remove(textFile) - os.Remove(yamlFile) - os.Remove(jsonFile) -} - -func TestBuilderV2(t *testing.T) { - testBuilder("v2", t) -} - -func TestBuilderV3(t *testing.T) { - testBuilder("v3", t) -} - -// OpenAPI 3.0 tests - -func TestPetstoreYAML_30(t *testing.T) { - testNormal(t, - "examples/v3.0/yaml/petstore.yaml", - "test/v3.0/petstore.text") -} - -func TestPetstoreJSON_30(t *testing.T) { - testNormal(t, - "examples/v3.0/json/petstore.json", - "test/v3.0/petstore.text") -} diff --git a/vendor/github.com/gregjones/httpcache/.travis.yml b/vendor/github.com/gregjones/httpcache/.travis.yml deleted file mode 100644 index b5ffbe03..00000000 --- a/vendor/github.com/gregjones/httpcache/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -sudo: false -language: go -go: - - 1.6.x - - 1.7.x - - 1.8.x - - 1.9.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/vendor/github.com/gregjones/httpcache/README.md b/vendor/github.com/gregjones/httpcache/README.md deleted file mode 100644 index 09c9e7c1..00000000 --- a/vendor/github.com/gregjones/httpcache/README.md +++ /dev/null @@ -1,25 +0,0 @@ -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 7234](https://tools.ietf.org/html/rfc7234) 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. -- [`github.com/birkelund/boltdbcache`](https://github.com/birkelund/boltdbcache) provides a BoltDB implementation (based on the [bbolt](https://github.com/coreos/bbolt) fork). - -License -------- - -- [MIT License](LICENSE.txt) diff --git a/vendor/github.com/gregjones/httpcache/diskcache/diskcache_test.go b/vendor/github.com/gregjones/httpcache/diskcache/diskcache_test.go deleted file mode 100644 index 35c76cbd..00000000 --- a/vendor/github.com/gregjones/httpcache/diskcache/diskcache_test.go +++ /dev/null @@ -1,42 +0,0 @@ -package diskcache - -import ( - "bytes" - "io/ioutil" - "os" - "testing" -) - -func TestDiskCache(t *testing.T) { - tempDir, err := ioutil.TempDir("", "httpcache") - if err != nil { - t.Fatalf("TempDir: %v", err) - } - defer os.RemoveAll(tempDir) - - cache := New(tempDir) - - key := "testKey" - _, ok := cache.Get(key) - if ok { - t.Fatal("retrieved key before adding it") - } - - val := []byte("some bytes") - cache.Set(key, val) - - retVal, ok := cache.Get(key) - if !ok { - t.Fatal("could not retrieve an element we just added") - } - if !bytes.Equal(retVal, val) { - t.Fatal("retrieved a different value than what we put in") - } - - cache.Delete(key) - - _, ok = cache.Get(key) - if ok { - t.Fatal("deleted key still present") - } -} diff --git a/vendor/github.com/gregjones/httpcache/httpcache_test.go b/vendor/github.com/gregjones/httpcache/httpcache_test.go deleted file mode 100644 index a5046418..00000000 --- a/vendor/github.com/gregjones/httpcache/httpcache_test.go +++ /dev/null @@ -1,1475 +0,0 @@ -package httpcache - -import ( - "bytes" - "errors" - "flag" - "io" - "io/ioutil" - "net/http" - "net/http/httptest" - "os" - "strconv" - "testing" - "time" -) - -var s struct { - server *httptest.Server - client http.Client - transport *Transport - done chan struct{} // Closed to unlock infinite handlers. -} - -type fakeClock struct { - elapsed time.Duration -} - -func (c *fakeClock) since(t time.Time) time.Duration { - return c.elapsed -} - -func TestMain(m *testing.M) { - flag.Parse() - setup() - code := m.Run() - teardown() - os.Exit(code) -} - -func setup() { - tp := NewMemoryCacheTransport() - client := http.Client{Transport: tp} - s.transport = tp - s.client = client - s.done = make(chan struct{}) - - mux := http.NewServeMux() - s.server = httptest.NewServer(mux) - - mux.HandleFunc("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Cache-Control", "max-age=3600") - })) - - mux.HandleFunc("/method", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Cache-Control", "max-age=3600") - w.Write([]byte(r.Method)) - })) - - mux.HandleFunc("/range", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - lm := "Fri, 14 Dec 2010 01:01:50 GMT" - if r.Header.Get("if-modified-since") == lm { - w.WriteHeader(http.StatusNotModified) - return - } - w.Header().Set("last-modified", lm) - if r.Header.Get("range") == "bytes=4-9" { - w.WriteHeader(http.StatusPartialContent) - w.Write([]byte(" text ")) - return - } - w.Write([]byte("Some text content")) - })) - - mux.HandleFunc("/nostore", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Cache-Control", "no-store") - })) - - mux.HandleFunc("/etag", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - etag := "124567" - if r.Header.Get("if-none-match") == etag { - w.WriteHeader(http.StatusNotModified) - return - } - w.Header().Set("etag", etag) - })) - - mux.HandleFunc("/lastmodified", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - lm := "Fri, 14 Dec 2010 01:01:50 GMT" - if r.Header.Get("if-modified-since") == lm { - w.WriteHeader(http.StatusNotModified) - return - } - w.Header().Set("last-modified", lm) - })) - - mux.HandleFunc("/varyaccept", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Cache-Control", "max-age=3600") - w.Header().Set("Content-Type", "text/plain") - w.Header().Set("Vary", "Accept") - w.Write([]byte("Some text content")) - })) - - mux.HandleFunc("/doublevary", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Cache-Control", "max-age=3600") - w.Header().Set("Content-Type", "text/plain") - w.Header().Set("Vary", "Accept, Accept-Language") - w.Write([]byte("Some text content")) - })) - mux.HandleFunc("/2varyheaders", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Cache-Control", "max-age=3600") - w.Header().Set("Content-Type", "text/plain") - w.Header().Add("Vary", "Accept") - w.Header().Add("Vary", "Accept-Language") - w.Write([]byte("Some text content")) - })) - mux.HandleFunc("/varyunused", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Cache-Control", "max-age=3600") - w.Header().Set("Content-Type", "text/plain") - w.Header().Set("Vary", "X-Madeup-Header") - w.Write([]byte("Some text content")) - })) - - mux.HandleFunc("/cachederror", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - etag := "abc" - if r.Header.Get("if-none-match") == etag { - w.WriteHeader(http.StatusNotModified) - return - } - w.Header().Set("etag", etag) - w.WriteHeader(http.StatusNotFound) - w.Write([]byte("Not found")) - })) - - updateFieldsCounter := 0 - mux.HandleFunc("/updatefields", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("X-Counter", strconv.Itoa(updateFieldsCounter)) - w.Header().Set("Etag", `"e"`) - updateFieldsCounter++ - if r.Header.Get("if-none-match") != "" { - w.WriteHeader(http.StatusNotModified) - return - } - w.Write([]byte("Some text content")) - })) - - // Take 3 seconds to return 200 OK (for testing client timeouts). - mux.HandleFunc("/3seconds", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - time.Sleep(3 * time.Second) - })) - - mux.HandleFunc("/infinite", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - for { - select { - case <-s.done: - return - default: - w.Write([]byte{0}) - } - } - })) -} - -func teardown() { - close(s.done) - s.server.Close() -} - -func resetTest() { - s.transport.Cache = NewMemoryCache() - clock = &realClock{} -} - -// TestCacheableMethod ensures that uncacheable method does not get stored -// in cache and get incorrectly used for a following cacheable method request. -func TestCacheableMethod(t *testing.T) { - resetTest() - { - req, err := http.NewRequest("POST", s.server.URL+"/method", nil) - if err != nil { - t.Fatal(err) - } - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - var buf bytes.Buffer - _, err = io.Copy(&buf, resp.Body) - if err != nil { - t.Fatal(err) - } - err = resp.Body.Close() - if err != nil { - t.Fatal(err) - } - if got, want := buf.String(), "POST"; got != want { - t.Errorf("got %q, want %q", got, want) - } - if resp.StatusCode != http.StatusOK { - t.Errorf("response status code isn't 200 OK: %v", resp.StatusCode) - } - } - { - req, err := http.NewRequest("GET", s.server.URL+"/method", nil) - if err != nil { - t.Fatal(err) - } - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - var buf bytes.Buffer - _, err = io.Copy(&buf, resp.Body) - if err != nil { - t.Fatal(err) - } - err = resp.Body.Close() - if err != nil { - t.Fatal(err) - } - if got, want := buf.String(), "GET"; got != want { - t.Errorf("got wrong body %q, want %q", got, want) - } - if resp.StatusCode != http.StatusOK { - t.Errorf("response status code isn't 200 OK: %v", resp.StatusCode) - } - if resp.Header.Get(XFromCache) != "" { - t.Errorf("XFromCache header isn't blank") - } - } -} - -func TestDontServeHeadResponseToGetRequest(t *testing.T) { - resetTest() - url := s.server.URL + "/" - req, err := http.NewRequest(http.MethodHead, url, nil) - if err != nil { - t.Fatal(err) - } - _, err = s.client.Do(req) - if err != nil { - t.Fatal(err) - } - req, err = http.NewRequest(http.MethodGet, url, nil) - if err != nil { - t.Fatal(err) - } - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - if resp.Header.Get(XFromCache) != "" { - t.Errorf("Cache should not match") - } -} - -func TestDontStorePartialRangeInCache(t *testing.T) { - resetTest() - { - req, err := http.NewRequest("GET", s.server.URL+"/range", nil) - if err != nil { - t.Fatal(err) - } - req.Header.Set("range", "bytes=4-9") - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - var buf bytes.Buffer - _, err = io.Copy(&buf, resp.Body) - if err != nil { - t.Fatal(err) - } - err = resp.Body.Close() - if err != nil { - t.Fatal(err) - } - if got, want := buf.String(), " text "; got != want { - t.Errorf("got %q, want %q", got, want) - } - if resp.StatusCode != http.StatusPartialContent { - t.Errorf("response status code isn't 206 Partial Content: %v", resp.StatusCode) - } - } - { - req, err := http.NewRequest("GET", s.server.URL+"/range", nil) - if err != nil { - t.Fatal(err) - } - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - var buf bytes.Buffer - _, err = io.Copy(&buf, resp.Body) - if err != nil { - t.Fatal(err) - } - err = resp.Body.Close() - if err != nil { - t.Fatal(err) - } - if got, want := buf.String(), "Some text content"; got != want { - t.Errorf("got %q, want %q", got, want) - } - if resp.StatusCode != http.StatusOK { - t.Errorf("response status code isn't 200 OK: %v", resp.StatusCode) - } - if resp.Header.Get(XFromCache) != "" { - t.Error("XFromCache header isn't blank") - } - } - { - req, err := http.NewRequest("GET", s.server.URL+"/range", nil) - if err != nil { - t.Fatal(err) - } - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - var buf bytes.Buffer - _, err = io.Copy(&buf, resp.Body) - if err != nil { - t.Fatal(err) - } - err = resp.Body.Close() - if err != nil { - t.Fatal(err) - } - if got, want := buf.String(), "Some text content"; got != want { - t.Errorf("got %q, want %q", got, want) - } - if resp.StatusCode != http.StatusOK { - t.Errorf("response status code isn't 200 OK: %v", resp.StatusCode) - } - if resp.Header.Get(XFromCache) != "1" { - t.Errorf(`XFromCache header isn't "1": %v`, resp.Header.Get(XFromCache)) - } - } - { - req, err := http.NewRequest("GET", s.server.URL+"/range", nil) - if err != nil { - t.Fatal(err) - } - req.Header.Set("range", "bytes=4-9") - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - var buf bytes.Buffer - _, err = io.Copy(&buf, resp.Body) - if err != nil { - t.Fatal(err) - } - err = resp.Body.Close() - if err != nil { - t.Fatal(err) - } - if got, want := buf.String(), " text "; got != want { - t.Errorf("got %q, want %q", got, want) - } - if resp.StatusCode != http.StatusPartialContent { - t.Errorf("response status code isn't 206 Partial Content: %v", resp.StatusCode) - } - } -} - -func TestCacheOnlyIfBodyRead(t *testing.T) { - resetTest() - { - req, err := http.NewRequest("GET", s.server.URL, nil) - if err != nil { - t.Fatal(err) - } - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - if resp.Header.Get(XFromCache) != "" { - t.Fatal("XFromCache header isn't blank") - } - // We do not read the body - resp.Body.Close() - } - { - req, err := http.NewRequest("GET", s.server.URL, nil) - if err != nil { - t.Fatal(err) - } - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "" { - t.Fatalf("XFromCache header isn't blank") - } - } -} - -func TestOnlyReadBodyOnDemand(t *testing.T) { - resetTest() - - req, err := http.NewRequest("GET", s.server.URL+"/infinite", nil) - if err != nil { - t.Fatal(err) - } - resp, err := s.client.Do(req) // This shouldn't hang forever. - if err != nil { - t.Fatal(err) - } - buf := make([]byte, 10) // Only partially read the body. - _, err = resp.Body.Read(buf) - if err != nil { - t.Fatal(err) - } - resp.Body.Close() -} - -func TestGetOnlyIfCachedHit(t *testing.T) { - resetTest() - { - req, err := http.NewRequest("GET", s.server.URL, nil) - if err != nil { - t.Fatal(err) - } - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "" { - t.Fatal("XFromCache header isn't blank") - } - _, err = ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatal(err) - } - } - { - req, err := http.NewRequest("GET", s.server.URL, nil) - if err != nil { - t.Fatal(err) - } - req.Header.Add("cache-control", "only-if-cached") - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "1" { - t.Fatalf(`XFromCache header isn't "1": %v`, resp.Header.Get(XFromCache)) - } - if resp.StatusCode != http.StatusOK { - t.Fatalf("response status code isn't 200 OK: %v", resp.StatusCode) - } - } -} - -func TestGetOnlyIfCachedMiss(t *testing.T) { - resetTest() - req, err := http.NewRequest("GET", s.server.URL, nil) - if err != nil { - t.Fatal(err) - } - req.Header.Add("cache-control", "only-if-cached") - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "" { - t.Fatal("XFromCache header isn't blank") - } - if resp.StatusCode != http.StatusGatewayTimeout { - t.Fatalf("response status code isn't 504 GatewayTimeout: %v", resp.StatusCode) - } -} - -func TestGetNoStoreRequest(t *testing.T) { - resetTest() - req, err := http.NewRequest("GET", s.server.URL, nil) - if err != nil { - t.Fatal(err) - } - req.Header.Add("Cache-Control", "no-store") - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "" { - t.Fatal("XFromCache header isn't blank") - } - } - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "" { - t.Fatal("XFromCache header isn't blank") - } - } -} - -func TestGetNoStoreResponse(t *testing.T) { - resetTest() - req, err := http.NewRequest("GET", s.server.URL+"/nostore", nil) - if err != nil { - t.Fatal(err) - } - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "" { - t.Fatal("XFromCache header isn't blank") - } - } - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "" { - t.Fatal("XFromCache header isn't blank") - } - } -} - -func TestGetWithEtag(t *testing.T) { - resetTest() - req, err := http.NewRequest("GET", s.server.URL+"/etag", nil) - if err != nil { - t.Fatal(err) - } - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "" { - t.Fatal("XFromCache header isn't blank") - } - _, err = ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatal(err) - } - - } - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "1" { - t.Fatalf(`XFromCache header isn't "1": %v`, resp.Header.Get(XFromCache)) - } - // additional assertions to verify that 304 response is converted properly - if resp.StatusCode != http.StatusOK { - t.Fatalf("response status code isn't 200 OK: %v", resp.StatusCode) - } - if _, ok := resp.Header["Connection"]; ok { - t.Fatalf("Connection header isn't absent") - } - } -} - -func TestGetWithLastModified(t *testing.T) { - resetTest() - req, err := http.NewRequest("GET", s.server.URL+"/lastmodified", nil) - if err != nil { - t.Fatal(err) - } - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "" { - t.Fatal("XFromCache header isn't blank") - } - _, err = ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatal(err) - } - } - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "1" { - t.Fatalf(`XFromCache header isn't "1": %v`, resp.Header.Get(XFromCache)) - } - } -} - -func TestGetWithVary(t *testing.T) { - resetTest() - req, err := http.NewRequest("GET", s.server.URL+"/varyaccept", nil) - if err != nil { - t.Fatal(err) - } - req.Header.Set("Accept", "text/plain") - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get("Vary") != "Accept" { - t.Fatalf(`Vary header isn't "Accept": %v`, resp.Header.Get("Vary")) - } - _, err = ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatal(err) - } - } - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "1" { - t.Fatalf(`XFromCache header isn't "1": %v`, resp.Header.Get(XFromCache)) - } - } - req.Header.Set("Accept", "text/html") - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "" { - t.Fatal("XFromCache header isn't blank") - } - } - req.Header.Set("Accept", "") - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "" { - t.Fatal("XFromCache header isn't blank") - } - } -} - -func TestGetWithDoubleVary(t *testing.T) { - resetTest() - req, err := http.NewRequest("GET", s.server.URL+"/doublevary", nil) - if err != nil { - t.Fatal(err) - } - req.Header.Set("Accept", "text/plain") - req.Header.Set("Accept-Language", "da, en-gb;q=0.8, en;q=0.7") - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get("Vary") == "" { - t.Fatalf(`Vary header is blank`) - } - _, err = ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatal(err) - } - } - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "1" { - t.Fatalf(`XFromCache header isn't "1": %v`, resp.Header.Get(XFromCache)) - } - } - req.Header.Set("Accept-Language", "") - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "" { - t.Fatal("XFromCache header isn't blank") - } - } - req.Header.Set("Accept-Language", "da") - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "" { - t.Fatal("XFromCache header isn't blank") - } - } -} - -func TestGetWith2VaryHeaders(t *testing.T) { - resetTest() - // Tests that multiple Vary headers' comma-separated lists are - // merged. See https://github.com/gregjones/httpcache/issues/27. - const ( - accept = "text/plain" - acceptLanguage = "da, en-gb;q=0.8, en;q=0.7" - ) - req, err := http.NewRequest("GET", s.server.URL+"/2varyheaders", nil) - if err != nil { - t.Fatal(err) - } - req.Header.Set("Accept", accept) - req.Header.Set("Accept-Language", acceptLanguage) - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get("Vary") == "" { - t.Fatalf(`Vary header is blank`) - } - _, err = ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatal(err) - } - } - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "1" { - t.Fatalf(`XFromCache header isn't "1": %v`, resp.Header.Get(XFromCache)) - } - } - req.Header.Set("Accept-Language", "") - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "" { - t.Fatal("XFromCache header isn't blank") - } - } - req.Header.Set("Accept-Language", "da") - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "" { - t.Fatal("XFromCache header isn't blank") - } - } - req.Header.Set("Accept-Language", acceptLanguage) - req.Header.Set("Accept", "") - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "" { - t.Fatal("XFromCache header isn't blank") - } - } - req.Header.Set("Accept", "image/png") - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "" { - t.Fatal("XFromCache header isn't blank") - } - _, err = ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatal(err) - } - } - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "1" { - t.Fatalf(`XFromCache header isn't "1": %v`, resp.Header.Get(XFromCache)) - } - } -} - -func TestGetVaryUnused(t *testing.T) { - resetTest() - req, err := http.NewRequest("GET", s.server.URL+"/varyunused", nil) - if err != nil { - t.Fatal(err) - } - req.Header.Set("Accept", "text/plain") - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get("Vary") == "" { - t.Fatalf(`Vary header is blank`) - } - _, err = ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatal(err) - } - } - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "1" { - t.Fatalf(`XFromCache header isn't "1": %v`, resp.Header.Get(XFromCache)) - } - } -} - -func TestUpdateFields(t *testing.T) { - resetTest() - req, err := http.NewRequest("GET", s.server.URL+"/updatefields", nil) - if err != nil { - t.Fatal(err) - } - var counter, counter2 string - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - counter = resp.Header.Get("x-counter") - _, err = ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatal(err) - } - } - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.Header.Get(XFromCache) != "1" { - t.Fatalf(`XFromCache header isn't "1": %v`, resp.Header.Get(XFromCache)) - } - counter2 = resp.Header.Get("x-counter") - } - if counter == counter2 { - t.Fatalf(`both "x-counter" values are equal: %v %v`, counter, counter2) - } -} - -// This tests the fix for https://github.com/gregjones/httpcache/issues/74. -// Previously, after validating a cached response, its StatusCode -// was incorrectly being replaced. -func TestCachedErrorsKeepStatus(t *testing.T) { - resetTest() - req, err := http.NewRequest("GET", s.server.URL+"/cachederror", nil) - if err != nil { - t.Fatal(err) - } - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - io.Copy(ioutil.Discard, resp.Body) - } - { - resp, err := s.client.Do(req) - if err != nil { - t.Fatal(err) - } - defer resp.Body.Close() - if resp.StatusCode != http.StatusNotFound { - t.Fatalf("Status code isn't 404: %d", resp.StatusCode) - } - } -} - -func TestParseCacheControl(t *testing.T) { - resetTest() - h := http.Header{} - for range parseCacheControl(h) { - t.Fatal("cacheControl should be empty") - } - - h.Set("cache-control", "no-cache") - { - cc := parseCacheControl(h) - if _, ok := cc["foo"]; ok { - t.Error(`Value "foo" shouldn't exist`) - } - noCache, ok := cc["no-cache"] - if !ok { - t.Fatalf(`"no-cache" value isn't set`) - } - if noCache != "" { - t.Fatalf(`"no-cache" value isn't blank: %v`, noCache) - } - } - h.Set("cache-control", "no-cache, max-age=3600") - { - cc := parseCacheControl(h) - noCache, ok := cc["no-cache"] - if !ok { - t.Fatalf(`"no-cache" value isn't set`) - } - if noCache != "" { - t.Fatalf(`"no-cache" value isn't blank: %v`, noCache) - } - if cc["max-age"] != "3600" { - t.Fatalf(`"max-age" value isn't "3600": %v`, cc["max-age"]) - } - } -} - -func TestNoCacheRequestExpiration(t *testing.T) { - resetTest() - respHeaders := http.Header{} - respHeaders.Set("Cache-Control", "max-age=7200") - - reqHeaders := http.Header{} - reqHeaders.Set("Cache-Control", "no-cache") - if getFreshness(respHeaders, reqHeaders) != transparent { - t.Fatal("freshness isn't transparent") - } -} - -func TestNoCacheResponseExpiration(t *testing.T) { - resetTest() - respHeaders := http.Header{} - respHeaders.Set("Cache-Control", "no-cache") - respHeaders.Set("Expires", "Wed, 19 Apr 3000 11:43:00 GMT") - - reqHeaders := http.Header{} - if getFreshness(respHeaders, reqHeaders) != stale { - t.Fatal("freshness isn't stale") - } -} - -func TestReqMustRevalidate(t *testing.T) { - resetTest() - // not paying attention to request setting max-stale means never returning stale - // responses, so always acting as if must-revalidate is set - respHeaders := http.Header{} - - reqHeaders := http.Header{} - reqHeaders.Set("Cache-Control", "must-revalidate") - if getFreshness(respHeaders, reqHeaders) != stale { - t.Fatal("freshness isn't stale") - } -} - -func TestRespMustRevalidate(t *testing.T) { - resetTest() - respHeaders := http.Header{} - respHeaders.Set("Cache-Control", "must-revalidate") - - reqHeaders := http.Header{} - if getFreshness(respHeaders, reqHeaders) != stale { - t.Fatal("freshness isn't stale") - } -} - -func TestFreshExpiration(t *testing.T) { - resetTest() - now := time.Now() - respHeaders := http.Header{} - respHeaders.Set("date", now.Format(time.RFC1123)) - respHeaders.Set("expires", now.Add(time.Duration(2)*time.Second).Format(time.RFC1123)) - - reqHeaders := http.Header{} - if getFreshness(respHeaders, reqHeaders) != fresh { - t.Fatal("freshness isn't fresh") - } - - clock = &fakeClock{elapsed: 3 * time.Second} - if getFreshness(respHeaders, reqHeaders) != stale { - t.Fatal("freshness isn't stale") - } -} - -func TestMaxAge(t *testing.T) { - resetTest() - now := time.Now() - respHeaders := http.Header{} - respHeaders.Set("date", now.Format(time.RFC1123)) - respHeaders.Set("cache-control", "max-age=2") - - reqHeaders := http.Header{} - if getFreshness(respHeaders, reqHeaders) != fresh { - t.Fatal("freshness isn't fresh") - } - - clock = &fakeClock{elapsed: 3 * time.Second} - if getFreshness(respHeaders, reqHeaders) != stale { - t.Fatal("freshness isn't stale") - } -} - -func TestMaxAgeZero(t *testing.T) { - resetTest() - now := time.Now() - respHeaders := http.Header{} - respHeaders.Set("date", now.Format(time.RFC1123)) - respHeaders.Set("cache-control", "max-age=0") - - reqHeaders := http.Header{} - if getFreshness(respHeaders, reqHeaders) != stale { - t.Fatal("freshness isn't stale") - } -} - -func TestBothMaxAge(t *testing.T) { - resetTest() - now := time.Now() - respHeaders := http.Header{} - respHeaders.Set("date", now.Format(time.RFC1123)) - respHeaders.Set("cache-control", "max-age=2") - - reqHeaders := http.Header{} - reqHeaders.Set("cache-control", "max-age=0") - if getFreshness(respHeaders, reqHeaders) != stale { - t.Fatal("freshness isn't stale") - } -} - -func TestMinFreshWithExpires(t *testing.T) { - resetTest() - now := time.Now() - respHeaders := http.Header{} - respHeaders.Set("date", now.Format(time.RFC1123)) - respHeaders.Set("expires", now.Add(time.Duration(2)*time.Second).Format(time.RFC1123)) - - reqHeaders := http.Header{} - reqHeaders.Set("cache-control", "min-fresh=1") - if getFreshness(respHeaders, reqHeaders) != fresh { - t.Fatal("freshness isn't fresh") - } - - reqHeaders = http.Header{} - reqHeaders.Set("cache-control", "min-fresh=2") - if getFreshness(respHeaders, reqHeaders) != stale { - t.Fatal("freshness isn't stale") - } -} - -func TestEmptyMaxStale(t *testing.T) { - resetTest() - now := time.Now() - respHeaders := http.Header{} - respHeaders.Set("date", now.Format(time.RFC1123)) - respHeaders.Set("cache-control", "max-age=20") - - reqHeaders := http.Header{} - reqHeaders.Set("cache-control", "max-stale") - clock = &fakeClock{elapsed: 10 * time.Second} - if getFreshness(respHeaders, reqHeaders) != fresh { - t.Fatal("freshness isn't fresh") - } - - clock = &fakeClock{elapsed: 60 * time.Second} - if getFreshness(respHeaders, reqHeaders) != fresh { - t.Fatal("freshness isn't fresh") - } -} - -func TestMaxStaleValue(t *testing.T) { - resetTest() - now := time.Now() - respHeaders := http.Header{} - respHeaders.Set("date", now.Format(time.RFC1123)) - respHeaders.Set("cache-control", "max-age=10") - - reqHeaders := http.Header{} - reqHeaders.Set("cache-control", "max-stale=20") - clock = &fakeClock{elapsed: 5 * time.Second} - if getFreshness(respHeaders, reqHeaders) != fresh { - t.Fatal("freshness isn't fresh") - } - - clock = &fakeClock{elapsed: 15 * time.Second} - if getFreshness(respHeaders, reqHeaders) != fresh { - t.Fatal("freshness isn't fresh") - } - - clock = &fakeClock{elapsed: 30 * time.Second} - if getFreshness(respHeaders, reqHeaders) != stale { - t.Fatal("freshness isn't stale") - } -} - -func containsHeader(headers []string, header string) bool { - for _, v := range headers { - if http.CanonicalHeaderKey(v) == http.CanonicalHeaderKey(header) { - return true - } - } - return false -} - -func TestGetEndToEndHeaders(t *testing.T) { - resetTest() - var ( - headers http.Header - end2end []string - ) - - headers = http.Header{} - headers.Set("content-type", "text/html") - headers.Set("te", "deflate") - - end2end = getEndToEndHeaders(headers) - if !containsHeader(end2end, "content-type") { - t.Fatal(`doesn't contain "content-type" header`) - } - if containsHeader(end2end, "te") { - t.Fatal(`doesn't contain "te" header`) - } - - headers = http.Header{} - headers.Set("connection", "content-type") - headers.Set("content-type", "text/csv") - headers.Set("te", "deflate") - end2end = getEndToEndHeaders(headers) - if containsHeader(end2end, "connection") { - t.Fatal(`doesn't contain "connection" header`) - } - if containsHeader(end2end, "content-type") { - t.Fatal(`doesn't contain "content-type" header`) - } - if containsHeader(end2end, "te") { - t.Fatal(`doesn't contain "te" header`) - } - - headers = http.Header{} - end2end = getEndToEndHeaders(headers) - if len(end2end) != 0 { - t.Fatal(`non-zero end2end headers`) - } - - headers = http.Header{} - headers.Set("connection", "content-type") - end2end = getEndToEndHeaders(headers) - if len(end2end) != 0 { - t.Fatal(`non-zero end2end headers`) - } -} - -type transportMock struct { - response *http.Response - err error -} - -func (t transportMock) RoundTrip(req *http.Request) (resp *http.Response, err error) { - return t.response, t.err -} - -func TestStaleIfErrorRequest(t *testing.T) { - resetTest() - now := time.Now() - tmock := transportMock{ - response: &http.Response{ - Status: http.StatusText(http.StatusOK), - StatusCode: http.StatusOK, - Header: http.Header{ - "Date": []string{now.Format(time.RFC1123)}, - "Cache-Control": []string{"no-cache"}, - }, - Body: ioutil.NopCloser(bytes.NewBuffer([]byte("some data"))), - }, - err: nil, - } - tp := NewMemoryCacheTransport() - tp.Transport = &tmock - - // First time, response is cached on success - r, _ := http.NewRequest("GET", "http://somewhere.com/", nil) - r.Header.Set("Cache-Control", "stale-if-error") - resp, err := tp.RoundTrip(r) - if err != nil { - t.Fatal(err) - } - if resp == nil { - t.Fatal("resp is nil") - } - _, err = ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatal(err) - } - - // On failure, response is returned from the cache - tmock.response = nil - tmock.err = errors.New("some error") - resp, err = tp.RoundTrip(r) - if err != nil { - t.Fatal(err) - } - if resp == nil { - t.Fatal("resp is nil") - } -} - -func TestStaleIfErrorRequestLifetime(t *testing.T) { - resetTest() - now := time.Now() - tmock := transportMock{ - response: &http.Response{ - Status: http.StatusText(http.StatusOK), - StatusCode: http.StatusOK, - Header: http.Header{ - "Date": []string{now.Format(time.RFC1123)}, - "Cache-Control": []string{"no-cache"}, - }, - Body: ioutil.NopCloser(bytes.NewBuffer([]byte("some data"))), - }, - err: nil, - } - tp := NewMemoryCacheTransport() - tp.Transport = &tmock - - // First time, response is cached on success - r, _ := http.NewRequest("GET", "http://somewhere.com/", nil) - r.Header.Set("Cache-Control", "stale-if-error=100") - resp, err := tp.RoundTrip(r) - if err != nil { - t.Fatal(err) - } - if resp == nil { - t.Fatal("resp is nil") - } - _, err = ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatal(err) - } - - // On failure, response is returned from the cache - tmock.response = nil - tmock.err = errors.New("some error") - resp, err = tp.RoundTrip(r) - if err != nil { - t.Fatal(err) - } - if resp == nil { - t.Fatal("resp is nil") - } - - // Same for http errors - tmock.response = &http.Response{StatusCode: http.StatusInternalServerError} - tmock.err = nil - resp, err = tp.RoundTrip(r) - if err != nil { - t.Fatal(err) - } - if resp == nil { - t.Fatal("resp is nil") - } - - // If failure last more than max stale, error is returned - clock = &fakeClock{elapsed: 200 * time.Second} - _, err = tp.RoundTrip(r) - if err != tmock.err { - t.Fatalf("got err %v, want %v", err, tmock.err) - } -} - -func TestStaleIfErrorResponse(t *testing.T) { - resetTest() - now := time.Now() - tmock := transportMock{ - response: &http.Response{ - Status: http.StatusText(http.StatusOK), - StatusCode: http.StatusOK, - Header: http.Header{ - "Date": []string{now.Format(time.RFC1123)}, - "Cache-Control": []string{"no-cache, stale-if-error"}, - }, - Body: ioutil.NopCloser(bytes.NewBuffer([]byte("some data"))), - }, - err: nil, - } - tp := NewMemoryCacheTransport() - tp.Transport = &tmock - - // First time, response is cached on success - r, _ := http.NewRequest("GET", "http://somewhere.com/", nil) - resp, err := tp.RoundTrip(r) - if err != nil { - t.Fatal(err) - } - if resp == nil { - t.Fatal("resp is nil") - } - _, err = ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatal(err) - } - - // On failure, response is returned from the cache - tmock.response = nil - tmock.err = errors.New("some error") - resp, err = tp.RoundTrip(r) - if err != nil { - t.Fatal(err) - } - if resp == nil { - t.Fatal("resp is nil") - } -} - -func TestStaleIfErrorResponseLifetime(t *testing.T) { - resetTest() - now := time.Now() - tmock := transportMock{ - response: &http.Response{ - Status: http.StatusText(http.StatusOK), - StatusCode: http.StatusOK, - Header: http.Header{ - "Date": []string{now.Format(time.RFC1123)}, - "Cache-Control": []string{"no-cache, stale-if-error=100"}, - }, - Body: ioutil.NopCloser(bytes.NewBuffer([]byte("some data"))), - }, - err: nil, - } - tp := NewMemoryCacheTransport() - tp.Transport = &tmock - - // First time, response is cached on success - r, _ := http.NewRequest("GET", "http://somewhere.com/", nil) - resp, err := tp.RoundTrip(r) - if err != nil { - t.Fatal(err) - } - if resp == nil { - t.Fatal("resp is nil") - } - _, err = ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatal(err) - } - - // On failure, response is returned from the cache - tmock.response = nil - tmock.err = errors.New("some error") - resp, err = tp.RoundTrip(r) - if err != nil { - t.Fatal(err) - } - if resp == nil { - t.Fatal("resp is nil") - } - - // If failure last more than max stale, error is returned - clock = &fakeClock{elapsed: 200 * time.Second} - _, err = tp.RoundTrip(r) - if err != tmock.err { - t.Fatalf("got err %v, want %v", err, tmock.err) - } -} - -// This tests the fix for https://github.com/gregjones/httpcache/issues/74. -// Previously, after a stale response was used after encountering an error, -// its StatusCode was being incorrectly replaced. -func TestStaleIfErrorKeepsStatus(t *testing.T) { - resetTest() - now := time.Now() - tmock := transportMock{ - response: &http.Response{ - Status: http.StatusText(http.StatusNotFound), - StatusCode: http.StatusNotFound, - Header: http.Header{ - "Date": []string{now.Format(time.RFC1123)}, - "Cache-Control": []string{"no-cache"}, - }, - Body: ioutil.NopCloser(bytes.NewBuffer([]byte("some data"))), - }, - err: nil, - } - tp := NewMemoryCacheTransport() - tp.Transport = &tmock - - // First time, response is cached on success - r, _ := http.NewRequest("GET", "http://somewhere.com/", nil) - r.Header.Set("Cache-Control", "stale-if-error") - resp, err := tp.RoundTrip(r) - if err != nil { - t.Fatal(err) - } - if resp == nil { - t.Fatal("resp is nil") - } - _, err = ioutil.ReadAll(resp.Body) - if err != nil { - t.Fatal(err) - } - - // On failure, response is returned from the cache - tmock.response = nil - tmock.err = errors.New("some error") - resp, err = tp.RoundTrip(r) - if err != nil { - t.Fatal(err) - } - if resp == nil { - t.Fatal("resp is nil") - } - if resp.StatusCode != http.StatusNotFound { - t.Fatalf("Status wasn't 404: %d", resp.StatusCode) - } -} - -// Test that http.Client.Timeout is respected when cache transport is used. -// That is so as long as request cancellation is propagated correctly. -// In the past, that required CancelRequest to be implemented correctly, -// but modern http.Client uses Request.Cancel (or request context) instead, -// so we don't have to do anything. -func TestClientTimeout(t *testing.T) { - if testing.Short() { - t.Skip("skipping timeout test in short mode") // Because it takes at least 3 seconds to run. - } - resetTest() - client := &http.Client{ - Transport: NewMemoryCacheTransport(), - Timeout: time.Second, - } - started := time.Now() - resp, err := client.Get(s.server.URL + "/3seconds") - taken := time.Since(started) - if err == nil { - t.Error("got nil error, want timeout error") - } - if resp != nil { - t.Error("got non-nil resp, want nil resp") - } - if taken >= 2*time.Second { - t.Error("client.Do took 2+ seconds, want < 2 seconds") - } -} diff --git a/vendor/github.com/hashicorp/golang-lru/.gitignore b/vendor/github.com/hashicorp/golang-lru/.gitignore deleted file mode 100644 index 83656241..00000000 --- a/vendor/github.com/hashicorp/golang-lru/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test diff --git a/vendor/github.com/hashicorp/golang-lru/2q_test.go b/vendor/github.com/hashicorp/golang-lru/2q_test.go deleted file mode 100644 index 1b0f3518..00000000 --- a/vendor/github.com/hashicorp/golang-lru/2q_test.go +++ /dev/null @@ -1,306 +0,0 @@ -package lru - -import ( - "math/rand" - "testing" -) - -func Benchmark2Q_Rand(b *testing.B) { - l, err := New2Q(8192) - if err != nil { - b.Fatalf("err: %v", err) - } - - trace := make([]int64, b.N*2) - for i := 0; i < b.N*2; i++ { - trace[i] = rand.Int63() % 32768 - } - - b.ResetTimer() - - var hit, miss int - for i := 0; i < 2*b.N; i++ { - if i%2 == 0 { - l.Add(trace[i], trace[i]) - } else { - _, ok := l.Get(trace[i]) - if ok { - hit++ - } else { - miss++ - } - } - } - b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(miss)) -} - -func Benchmark2Q_Freq(b *testing.B) { - l, err := New2Q(8192) - if err != nil { - b.Fatalf("err: %v", err) - } - - trace := make([]int64, b.N*2) - for i := 0; i < b.N*2; i++ { - if i%2 == 0 { - trace[i] = rand.Int63() % 16384 - } else { - trace[i] = rand.Int63() % 32768 - } - } - - b.ResetTimer() - - for i := 0; i < b.N; i++ { - l.Add(trace[i], trace[i]) - } - var hit, miss int - for i := 0; i < b.N; i++ { - _, ok := l.Get(trace[i]) - if ok { - hit++ - } else { - miss++ - } - } - b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(miss)) -} - -func Test2Q_RandomOps(t *testing.T) { - size := 128 - l, err := New2Q(128) - if err != nil { - t.Fatalf("err: %v", err) - } - - n := 200000 - for i := 0; i < n; i++ { - key := rand.Int63() % 512 - r := rand.Int63() - switch r % 3 { - case 0: - l.Add(key, key) - case 1: - l.Get(key) - case 2: - l.Remove(key) - } - - if l.recent.Len()+l.frequent.Len() > size { - t.Fatalf("bad: recent: %d freq: %d", - l.recent.Len(), l.frequent.Len()) - } - } -} - -func Test2Q_Get_RecentToFrequent(t *testing.T) { - l, err := New2Q(128) - if err != nil { - t.Fatalf("err: %v", err) - } - - // Touch all the entries, should be in t1 - for i := 0; i < 128; i++ { - l.Add(i, i) - } - if n := l.recent.Len(); n != 128 { - t.Fatalf("bad: %d", n) - } - if n := l.frequent.Len(); n != 0 { - t.Fatalf("bad: %d", n) - } - - // Get should upgrade to t2 - for i := 0; i < 128; i++ { - _, ok := l.Get(i) - if !ok { - t.Fatalf("missing: %d", i) - } - } - if n := l.recent.Len(); n != 0 { - t.Fatalf("bad: %d", n) - } - if n := l.frequent.Len(); n != 128 { - t.Fatalf("bad: %d", n) - } - - // Get be from t2 - for i := 0; i < 128; i++ { - _, ok := l.Get(i) - if !ok { - t.Fatalf("missing: %d", i) - } - } - if n := l.recent.Len(); n != 0 { - t.Fatalf("bad: %d", n) - } - if n := l.frequent.Len(); n != 128 { - t.Fatalf("bad: %d", n) - } -} - -func Test2Q_Add_RecentToFrequent(t *testing.T) { - l, err := New2Q(128) - if err != nil { - t.Fatalf("err: %v", err) - } - - // Add initially to recent - l.Add(1, 1) - if n := l.recent.Len(); n != 1 { - t.Fatalf("bad: %d", n) - } - if n := l.frequent.Len(); n != 0 { - t.Fatalf("bad: %d", n) - } - - // Add should upgrade to frequent - l.Add(1, 1) - if n := l.recent.Len(); n != 0 { - t.Fatalf("bad: %d", n) - } - if n := l.frequent.Len(); n != 1 { - t.Fatalf("bad: %d", n) - } - - // Add should remain in frequent - l.Add(1, 1) - if n := l.recent.Len(); n != 0 { - t.Fatalf("bad: %d", n) - } - if n := l.frequent.Len(); n != 1 { - t.Fatalf("bad: %d", n) - } -} - -func Test2Q_Add_RecentEvict(t *testing.T) { - l, err := New2Q(4) - if err != nil { - t.Fatalf("err: %v", err) - } - - // Add 1,2,3,4,5 -> Evict 1 - l.Add(1, 1) - l.Add(2, 2) - l.Add(3, 3) - l.Add(4, 4) - l.Add(5, 5) - if n := l.recent.Len(); n != 4 { - t.Fatalf("bad: %d", n) - } - if n := l.recentEvict.Len(); n != 1 { - t.Fatalf("bad: %d", n) - } - if n := l.frequent.Len(); n != 0 { - t.Fatalf("bad: %d", n) - } - - // Pull in the recently evicted - l.Add(1, 1) - if n := l.recent.Len(); n != 3 { - t.Fatalf("bad: %d", n) - } - if n := l.recentEvict.Len(); n != 1 { - t.Fatalf("bad: %d", n) - } - if n := l.frequent.Len(); n != 1 { - t.Fatalf("bad: %d", n) - } - - // Add 6, should cause another recent evict - l.Add(6, 6) - if n := l.recent.Len(); n != 3 { - t.Fatalf("bad: %d", n) - } - if n := l.recentEvict.Len(); n != 2 { - t.Fatalf("bad: %d", n) - } - if n := l.frequent.Len(); n != 1 { - t.Fatalf("bad: %d", n) - } -} - -func Test2Q(t *testing.T) { - l, err := New2Q(128) - if err != nil { - t.Fatalf("err: %v", err) - } - - for i := 0; i < 256; i++ { - l.Add(i, i) - } - if l.Len() != 128 { - t.Fatalf("bad len: %v", l.Len()) - } - - for i, k := range l.Keys() { - if v, ok := l.Get(k); !ok || v != k || v != i+128 { - t.Fatalf("bad key: %v", k) - } - } - for i := 0; i < 128; i++ { - _, ok := l.Get(i) - if ok { - t.Fatalf("should be evicted") - } - } - for i := 128; i < 256; i++ { - _, ok := l.Get(i) - if !ok { - t.Fatalf("should not be evicted") - } - } - for i := 128; i < 192; i++ { - l.Remove(i) - _, ok := l.Get(i) - if ok { - t.Fatalf("should be deleted") - } - } - - l.Purge() - if l.Len() != 0 { - t.Fatalf("bad len: %v", l.Len()) - } - if _, ok := l.Get(200); ok { - t.Fatalf("should contain nothing") - } -} - -// Test that Contains doesn't update recent-ness -func Test2Q_Contains(t *testing.T) { - l, err := New2Q(2) - if err != nil { - t.Fatalf("err: %v", err) - } - - l.Add(1, 1) - l.Add(2, 2) - if !l.Contains(1) { - t.Errorf("1 should be contained") - } - - l.Add(3, 3) - if l.Contains(1) { - t.Errorf("Contains should not have updated recent-ness of 1") - } -} - -// Test that Peek doesn't update recent-ness -func Test2Q_Peek(t *testing.T) { - l, err := New2Q(2) - if err != nil { - t.Fatalf("err: %v", err) - } - - l.Add(1, 1) - l.Add(2, 2) - if v, ok := l.Peek(1); !ok || v != 1 { - t.Errorf("1 should be set to 1: %v, %v", v, ok) - } - - l.Add(3, 3) - if l.Contains(1) { - t.Errorf("should not have updated recent-ness of 1") - } -} diff --git a/vendor/github.com/hashicorp/golang-lru/README.md b/vendor/github.com/hashicorp/golang-lru/README.md deleted file mode 100644 index 33e58cfa..00000000 --- a/vendor/github.com/hashicorp/golang-lru/README.md +++ /dev/null @@ -1,25 +0,0 @@ -golang-lru -========== - -This provides the `lru` package which implements a fixed-size -thread safe LRU cache. It is based on the cache in Groupcache. - -Documentation -============= - -Full docs are available on [Godoc](http://godoc.org/github.com/hashicorp/golang-lru) - -Example -======= - -Using the LRU is very simple: - -```go -l, _ := New(128) -for i := 0; i < 256; i++ { - l.Add(i, nil) -} -if l.Len() != 128 { - panic(fmt.Sprintf("bad len: %v", l.Len())) -} -``` diff --git a/vendor/github.com/hashicorp/golang-lru/arc_test.go b/vendor/github.com/hashicorp/golang-lru/arc_test.go deleted file mode 100644 index e2d9b68c..00000000 --- a/vendor/github.com/hashicorp/golang-lru/arc_test.go +++ /dev/null @@ -1,377 +0,0 @@ -package lru - -import ( - "math/rand" - "testing" - "time" -) - -func init() { - rand.Seed(time.Now().Unix()) -} - -func BenchmarkARC_Rand(b *testing.B) { - l, err := NewARC(8192) - if err != nil { - b.Fatalf("err: %v", err) - } - - trace := make([]int64, b.N*2) - for i := 0; i < b.N*2; i++ { - trace[i] = rand.Int63() % 32768 - } - - b.ResetTimer() - - var hit, miss int - for i := 0; i < 2*b.N; i++ { - if i%2 == 0 { - l.Add(trace[i], trace[i]) - } else { - _, ok := l.Get(trace[i]) - if ok { - hit++ - } else { - miss++ - } - } - } - b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(miss)) -} - -func BenchmarkARC_Freq(b *testing.B) { - l, err := NewARC(8192) - if err != nil { - b.Fatalf("err: %v", err) - } - - trace := make([]int64, b.N*2) - for i := 0; i < b.N*2; i++ { - if i%2 == 0 { - trace[i] = rand.Int63() % 16384 - } else { - trace[i] = rand.Int63() % 32768 - } - } - - b.ResetTimer() - - for i := 0; i < b.N; i++ { - l.Add(trace[i], trace[i]) - } - var hit, miss int - for i := 0; i < b.N; i++ { - _, ok := l.Get(trace[i]) - if ok { - hit++ - } else { - miss++ - } - } - b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(miss)) -} - -func TestARC_RandomOps(t *testing.T) { - size := 128 - l, err := NewARC(128) - if err != nil { - t.Fatalf("err: %v", err) - } - - n := 200000 - for i := 0; i < n; i++ { - key := rand.Int63() % 512 - r := rand.Int63() - switch r % 3 { - case 0: - l.Add(key, key) - case 1: - l.Get(key) - case 2: - l.Remove(key) - } - - if l.t1.Len()+l.t2.Len() > size { - t.Fatalf("bad: t1: %d t2: %d b1: %d b2: %d p: %d", - l.t1.Len(), l.t2.Len(), l.b1.Len(), l.b2.Len(), l.p) - } - if l.b1.Len()+l.b2.Len() > size { - t.Fatalf("bad: t1: %d t2: %d b1: %d b2: %d p: %d", - l.t1.Len(), l.t2.Len(), l.b1.Len(), l.b2.Len(), l.p) - } - } -} - -func TestARC_Get_RecentToFrequent(t *testing.T) { - l, err := NewARC(128) - if err != nil { - t.Fatalf("err: %v", err) - } - - // Touch all the entries, should be in t1 - for i := 0; i < 128; i++ { - l.Add(i, i) - } - if n := l.t1.Len(); n != 128 { - t.Fatalf("bad: %d", n) - } - if n := l.t2.Len(); n != 0 { - t.Fatalf("bad: %d", n) - } - - // Get should upgrade to t2 - for i := 0; i < 128; i++ { - _, ok := l.Get(i) - if !ok { - t.Fatalf("missing: %d", i) - } - } - if n := l.t1.Len(); n != 0 { - t.Fatalf("bad: %d", n) - } - if n := l.t2.Len(); n != 128 { - t.Fatalf("bad: %d", n) - } - - // Get be from t2 - for i := 0; i < 128; i++ { - _, ok := l.Get(i) - if !ok { - t.Fatalf("missing: %d", i) - } - } - if n := l.t1.Len(); n != 0 { - t.Fatalf("bad: %d", n) - } - if n := l.t2.Len(); n != 128 { - t.Fatalf("bad: %d", n) - } -} - -func TestARC_Add_RecentToFrequent(t *testing.T) { - l, err := NewARC(128) - if err != nil { - t.Fatalf("err: %v", err) - } - - // Add initially to t1 - l.Add(1, 1) - if n := l.t1.Len(); n != 1 { - t.Fatalf("bad: %d", n) - } - if n := l.t2.Len(); n != 0 { - t.Fatalf("bad: %d", n) - } - - // Add should upgrade to t2 - l.Add(1, 1) - if n := l.t1.Len(); n != 0 { - t.Fatalf("bad: %d", n) - } - if n := l.t2.Len(); n != 1 { - t.Fatalf("bad: %d", n) - } - - // Add should remain in t2 - l.Add(1, 1) - if n := l.t1.Len(); n != 0 { - t.Fatalf("bad: %d", n) - } - if n := l.t2.Len(); n != 1 { - t.Fatalf("bad: %d", n) - } -} - -func TestARC_Adaptive(t *testing.T) { - l, err := NewARC(4) - if err != nil { - t.Fatalf("err: %v", err) - } - - // Fill t1 - for i := 0; i < 4; i++ { - l.Add(i, i) - } - if n := l.t1.Len(); n != 4 { - t.Fatalf("bad: %d", n) - } - - // Move to t2 - l.Get(0) - l.Get(1) - if n := l.t2.Len(); n != 2 { - t.Fatalf("bad: %d", n) - } - - // Evict from t1 - l.Add(4, 4) - if n := l.b1.Len(); n != 1 { - t.Fatalf("bad: %d", n) - } - - // Current state - // t1 : (MRU) [4, 3] (LRU) - // t2 : (MRU) [1, 0] (LRU) - // b1 : (MRU) [2] (LRU) - // b2 : (MRU) [] (LRU) - - // Add 2, should cause hit on b1 - l.Add(2, 2) - if n := l.b1.Len(); n != 1 { - t.Fatalf("bad: %d", n) - } - if l.p != 1 { - t.Fatalf("bad: %d", l.p) - } - if n := l.t2.Len(); n != 3 { - t.Fatalf("bad: %d", n) - } - - // Current state - // t1 : (MRU) [4] (LRU) - // t2 : (MRU) [2, 1, 0] (LRU) - // b1 : (MRU) [3] (LRU) - // b2 : (MRU) [] (LRU) - - // Add 4, should migrate to t2 - l.Add(4, 4) - if n := l.t1.Len(); n != 0 { - t.Fatalf("bad: %d", n) - } - if n := l.t2.Len(); n != 4 { - t.Fatalf("bad: %d", n) - } - - // Current state - // t1 : (MRU) [] (LRU) - // t2 : (MRU) [4, 2, 1, 0] (LRU) - // b1 : (MRU) [3] (LRU) - // b2 : (MRU) [] (LRU) - - // Add 4, should evict to b2 - l.Add(5, 5) - if n := l.t1.Len(); n != 1 { - t.Fatalf("bad: %d", n) - } - if n := l.t2.Len(); n != 3 { - t.Fatalf("bad: %d", n) - } - if n := l.b2.Len(); n != 1 { - t.Fatalf("bad: %d", n) - } - - // Current state - // t1 : (MRU) [5] (LRU) - // t2 : (MRU) [4, 2, 1] (LRU) - // b1 : (MRU) [3] (LRU) - // b2 : (MRU) [0] (LRU) - - // Add 0, should decrease p - l.Add(0, 0) - if n := l.t1.Len(); n != 0 { - t.Fatalf("bad: %d", n) - } - if n := l.t2.Len(); n != 4 { - t.Fatalf("bad: %d", n) - } - if n := l.b1.Len(); n != 2 { - t.Fatalf("bad: %d", n) - } - if n := l.b2.Len(); n != 0 { - t.Fatalf("bad: %d", n) - } - if l.p != 0 { - t.Fatalf("bad: %d", l.p) - } - - // Current state - // t1 : (MRU) [] (LRU) - // t2 : (MRU) [0, 4, 2, 1] (LRU) - // b1 : (MRU) [5, 3] (LRU) - // b2 : (MRU) [0] (LRU) -} - -func TestARC(t *testing.T) { - l, err := NewARC(128) - if err != nil { - t.Fatalf("err: %v", err) - } - - for i := 0; i < 256; i++ { - l.Add(i, i) - } - if l.Len() != 128 { - t.Fatalf("bad len: %v", l.Len()) - } - - for i, k := range l.Keys() { - if v, ok := l.Get(k); !ok || v != k || v != i+128 { - t.Fatalf("bad key: %v", k) - } - } - for i := 0; i < 128; i++ { - _, ok := l.Get(i) - if ok { - t.Fatalf("should be evicted") - } - } - for i := 128; i < 256; i++ { - _, ok := l.Get(i) - if !ok { - t.Fatalf("should not be evicted") - } - } - for i := 128; i < 192; i++ { - l.Remove(i) - _, ok := l.Get(i) - if ok { - t.Fatalf("should be deleted") - } - } - - l.Purge() - if l.Len() != 0 { - t.Fatalf("bad len: %v", l.Len()) - } - if _, ok := l.Get(200); ok { - t.Fatalf("should contain nothing") - } -} - -// Test that Contains doesn't update recent-ness -func TestARC_Contains(t *testing.T) { - l, err := NewARC(2) - if err != nil { - t.Fatalf("err: %v", err) - } - - l.Add(1, 1) - l.Add(2, 2) - if !l.Contains(1) { - t.Errorf("1 should be contained") - } - - l.Add(3, 3) - if l.Contains(1) { - t.Errorf("Contains should not have updated recent-ness of 1") - } -} - -// Test that Peek doesn't update recent-ness -func TestARC_Peek(t *testing.T) { - l, err := NewARC(2) - if err != nil { - t.Fatalf("err: %v", err) - } - - l.Add(1, 1) - l.Add(2, 2) - if v, ok := l.Peek(1); !ok || v != 1 { - t.Errorf("1 should be set to 1: %v, %v", v, ok) - } - - l.Add(3, 3) - if l.Contains(1) { - t.Errorf("should not have updated recent-ness of 1") - } -} diff --git a/vendor/github.com/hashicorp/golang-lru/lru_test.go b/vendor/github.com/hashicorp/golang-lru/lru_test.go deleted file mode 100644 index e7e23505..00000000 --- a/vendor/github.com/hashicorp/golang-lru/lru_test.go +++ /dev/null @@ -1,221 +0,0 @@ -package lru - -import ( - "math/rand" - "testing" -) - -func BenchmarkLRU_Rand(b *testing.B) { - l, err := New(8192) - if err != nil { - b.Fatalf("err: %v", err) - } - - trace := make([]int64, b.N*2) - for i := 0; i < b.N*2; i++ { - trace[i] = rand.Int63() % 32768 - } - - b.ResetTimer() - - var hit, miss int - for i := 0; i < 2*b.N; i++ { - if i%2 == 0 { - l.Add(trace[i], trace[i]) - } else { - _, ok := l.Get(trace[i]) - if ok { - hit++ - } else { - miss++ - } - } - } - b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(miss)) -} - -func BenchmarkLRU_Freq(b *testing.B) { - l, err := New(8192) - if err != nil { - b.Fatalf("err: %v", err) - } - - trace := make([]int64, b.N*2) - for i := 0; i < b.N*2; i++ { - if i%2 == 0 { - trace[i] = rand.Int63() % 16384 - } else { - trace[i] = rand.Int63() % 32768 - } - } - - b.ResetTimer() - - for i := 0; i < b.N; i++ { - l.Add(trace[i], trace[i]) - } - var hit, miss int - for i := 0; i < b.N; i++ { - _, ok := l.Get(trace[i]) - if ok { - hit++ - } else { - miss++ - } - } - b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(miss)) -} - -func TestLRU(t *testing.T) { - evictCounter := 0 - onEvicted := func(k interface{}, v interface{}) { - if k != v { - t.Fatalf("Evict values not equal (%v!=%v)", k, v) - } - evictCounter++ - } - l, err := NewWithEvict(128, onEvicted) - if err != nil { - t.Fatalf("err: %v", err) - } - - for i := 0; i < 256; i++ { - l.Add(i, i) - } - if l.Len() != 128 { - t.Fatalf("bad len: %v", l.Len()) - } - - if evictCounter != 128 { - t.Fatalf("bad evict count: %v", evictCounter) - } - - for i, k := range l.Keys() { - if v, ok := l.Get(k); !ok || v != k || v != i+128 { - t.Fatalf("bad key: %v", k) - } - } - for i := 0; i < 128; i++ { - _, ok := l.Get(i) - if ok { - t.Fatalf("should be evicted") - } - } - for i := 128; i < 256; i++ { - _, ok := l.Get(i) - if !ok { - t.Fatalf("should not be evicted") - } - } - for i := 128; i < 192; i++ { - l.Remove(i) - _, ok := l.Get(i) - if ok { - t.Fatalf("should be deleted") - } - } - - l.Get(192) // expect 192 to be last key in l.Keys() - - for i, k := range l.Keys() { - if (i < 63 && k != i+193) || (i == 63 && k != 192) { - t.Fatalf("out of order key: %v", k) - } - } - - l.Purge() - if l.Len() != 0 { - t.Fatalf("bad len: %v", l.Len()) - } - if _, ok := l.Get(200); ok { - t.Fatalf("should contain nothing") - } -} - -// test that Add returns true/false if an eviction occurred -func TestLRUAdd(t *testing.T) { - evictCounter := 0 - onEvicted := func(k interface{}, v interface{}) { - evictCounter++ - } - - l, err := NewWithEvict(1, onEvicted) - if err != nil { - t.Fatalf("err: %v", err) - } - - if l.Add(1, 1) == true || evictCounter != 0 { - t.Errorf("should not have an eviction") - } - if l.Add(2, 2) == false || evictCounter != 1 { - t.Errorf("should have an eviction") - } -} - -// test that Contains doesn't update recent-ness -func TestLRUContains(t *testing.T) { - l, err := New(2) - if err != nil { - t.Fatalf("err: %v", err) - } - - l.Add(1, 1) - l.Add(2, 2) - if !l.Contains(1) { - t.Errorf("1 should be contained") - } - - l.Add(3, 3) - if l.Contains(1) { - t.Errorf("Contains should not have updated recent-ness of 1") - } -} - -// test that Contains doesn't update recent-ness -func TestLRUContainsOrAdd(t *testing.T) { - l, err := New(2) - if err != nil { - t.Fatalf("err: %v", err) - } - - l.Add(1, 1) - l.Add(2, 2) - contains, evict := l.ContainsOrAdd(1, 1) - if !contains { - t.Errorf("1 should be contained") - } - if evict { - t.Errorf("nothing should be evicted here") - } - - l.Add(3, 3) - contains, evict = l.ContainsOrAdd(1, 1) - if contains { - t.Errorf("1 should not have been contained") - } - if !evict { - t.Errorf("an eviction should have occurred") - } - if !l.Contains(1) { - t.Errorf("now 1 should be contained") - } -} - -// test that Peek doesn't update recent-ness -func TestLRUPeek(t *testing.T) { - l, err := New(2) - if err != nil { - t.Fatalf("err: %v", err) - } - - l.Add(1, 1) - l.Add(2, 2) - if v, ok := l.Peek(1); !ok || v != 1 { - t.Errorf("1 should be set to 1: %v, %v", v, ok) - } - - l.Add(3, 3) - if l.Contains(1) { - t.Errorf("should not have updated recent-ness of 1") - } -} diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_test.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_test.go deleted file mode 100644 index ca5676e1..00000000 --- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_test.go +++ /dev/null @@ -1,167 +0,0 @@ -package simplelru - -import "testing" - -func TestLRU(t *testing.T) { - evictCounter := 0 - onEvicted := func(k interface{}, v interface{}) { - if k != v { - t.Fatalf("Evict values not equal (%v!=%v)", k, v) - } - evictCounter++ - } - l, err := NewLRU(128, onEvicted) - if err != nil { - t.Fatalf("err: %v", err) - } - - for i := 0; i < 256; i++ { - l.Add(i, i) - } - if l.Len() != 128 { - t.Fatalf("bad len: %v", l.Len()) - } - - if evictCounter != 128 { - t.Fatalf("bad evict count: %v", evictCounter) - } - - for i, k := range l.Keys() { - if v, ok := l.Get(k); !ok || v != k || v != i+128 { - t.Fatalf("bad key: %v", k) - } - } - for i := 0; i < 128; i++ { - _, ok := l.Get(i) - if ok { - t.Fatalf("should be evicted") - } - } - for i := 128; i < 256; i++ { - _, ok := l.Get(i) - if !ok { - t.Fatalf("should not be evicted") - } - } - for i := 128; i < 192; i++ { - ok := l.Remove(i) - if !ok { - t.Fatalf("should be contained") - } - ok = l.Remove(i) - if ok { - t.Fatalf("should not be contained") - } - _, ok = l.Get(i) - if ok { - t.Fatalf("should be deleted") - } - } - - l.Get(192) // expect 192 to be last key in l.Keys() - - for i, k := range l.Keys() { - if (i < 63 && k != i+193) || (i == 63 && k != 192) { - t.Fatalf("out of order key: %v", k) - } - } - - l.Purge() - if l.Len() != 0 { - t.Fatalf("bad len: %v", l.Len()) - } - if _, ok := l.Get(200); ok { - t.Fatalf("should contain nothing") - } -} - -func TestLRU_GetOldest_RemoveOldest(t *testing.T) { - l, err := NewLRU(128, nil) - if err != nil { - t.Fatalf("err: %v", err) - } - for i := 0; i < 256; i++ { - l.Add(i, i) - } - k, _, ok := l.GetOldest() - if !ok { - t.Fatalf("missing") - } - if k.(int) != 128 { - t.Fatalf("bad: %v", k) - } - - k, _, ok = l.RemoveOldest() - if !ok { - t.Fatalf("missing") - } - if k.(int) != 128 { - t.Fatalf("bad: %v", k) - } - - k, _, ok = l.RemoveOldest() - if !ok { - t.Fatalf("missing") - } - if k.(int) != 129 { - t.Fatalf("bad: %v", k) - } -} - -// Test that Add returns true/false if an eviction occurred -func TestLRU_Add(t *testing.T) { - evictCounter := 0 - onEvicted := func(k interface{}, v interface{}) { - evictCounter++ - } - - l, err := NewLRU(1, onEvicted) - if err != nil { - t.Fatalf("err: %v", err) - } - - if l.Add(1, 1) == true || evictCounter != 0 { - t.Errorf("should not have an eviction") - } - if l.Add(2, 2) == false || evictCounter != 1 { - t.Errorf("should have an eviction") - } -} - -// Test that Contains doesn't update recent-ness -func TestLRU_Contains(t *testing.T) { - l, err := NewLRU(2, nil) - if err != nil { - t.Fatalf("err: %v", err) - } - - l.Add(1, 1) - l.Add(2, 2) - if !l.Contains(1) { - t.Errorf("1 should be contained") - } - - l.Add(3, 3) - if l.Contains(1) { - t.Errorf("Contains should not have updated recent-ness of 1") - } -} - -// Test that Peek doesn't update recent-ness -func TestLRU_Peek(t *testing.T) { - l, err := NewLRU(2, nil) - if err != nil { - t.Fatalf("err: %v", err) - } - - l.Add(1, 1) - l.Add(2, 2) - if v, ok := l.Peek(1); !ok || v != 1 { - t.Errorf("1 should be set to 1: %v, %v", v, ok) - } - - l.Add(3, 3) - if l.Contains(1) { - t.Errorf("should not have updated recent-ness of 1") - } -} diff --git a/vendor/github.com/imdario/mergo/.gitignore b/vendor/github.com/imdario/mergo/.gitignore deleted file mode 100644 index 529c3412..00000000 --- a/vendor/github.com/imdario/mergo/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -#### 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/vendor/github.com/imdario/mergo/.travis.yml b/vendor/github.com/imdario/mergo/.travis.yml deleted file mode 100644 index b13a50ed..00000000 --- a/vendor/github.com/imdario/mergo/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: go -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/vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md b/vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md deleted file mode 100644 index 469b4490..00000000 --- a/vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# 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/vendor/github.com/imdario/mergo/README.md b/vendor/github.com/imdario/mergo/README.md deleted file mode 100644 index 8b76f1fb..00000000 --- a/vendor/github.com/imdario/mergo/README.md +++ /dev/null @@ -1,222 +0,0 @@ -# Mergo - -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 of Marche. - -## Status - -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.6](https://github.com/imdario/mergo/releases/tag/v0.3.6). - -### 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) -- [rdegges/cryptly-api](https://github.com/rdegges/cryptly-api) -- [casualjim/exeggutor](https://github.com/casualjim/exeggutor) -- [divshot/gitling](https://github.com/divshot/gitling) -- [RWJMurphy/gorl](https://github.com/RWJMurphy/gorl) -- [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 - - go get github.com/imdario/mergo - - // use in your .go code - import ( - "github.com/imdario/mergo" - ) - -## 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. 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 { - // ... -} -``` - -Also, you can merge overwriting values using the transformer `WithOverride`. - -```go -if err := mergo.Merge(&dst, src, mergo.WithOverride); 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. - -```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.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 - -If I can help you, you have an idea or you are using Mergo in your projects, don't hesitate to drop me a line (or a pull request): [@im_dario](https://twitter.com/im_dario) - -## About - -Written by [Dario Castañé](http://dario.im). - -## License - -[BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause) license, as [Go language](http://golang.org/LICENSE). diff --git a/vendor/github.com/imdario/mergo/issue17_test.go b/vendor/github.com/imdario/mergo/issue17_test.go deleted file mode 100644 index f9de805a..00000000 --- a/vendor/github.com/imdario/mergo/issue17_test.go +++ /dev/null @@ -1,25 +0,0 @@ -package mergo - -import ( - "encoding/json" - "testing" -) - -var ( - request = `{"timestamp":null, "name": "foo"}` - maprequest = map[string]interface{}{ - "timestamp": nil, - "name": "foo", - "newStuff": "foo", - } -) - -func TestIssue17MergeWithOverwrite(t *testing.T) { - var something map[string]interface{} - if err := json.Unmarshal([]byte(request), &something); err != nil { - t.Errorf("Error while Unmarshalling maprequest: %s", err) - } - if err := MergeWithOverwrite(&something, maprequest); err != nil { - t.Errorf("Error while merging: %s", err) - } -} diff --git a/vendor/github.com/imdario/mergo/issue23_test.go b/vendor/github.com/imdario/mergo/issue23_test.go deleted file mode 100644 index 283f8c6a..00000000 --- a/vendor/github.com/imdario/mergo/issue23_test.go +++ /dev/null @@ -1,27 +0,0 @@ -package mergo - -import ( - "testing" - "time" -) - -type document struct { - Created *time.Time -} - -func TestIssue23MergeWithOverwrite(t *testing.T) { - now := time.Now() - dst := document{ - &now, - } - expected := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC) - src := document{ - &expected, - } - if err := MergeWithOverwrite(&dst, src); err != nil { - t.Errorf("Error while merging %s", err) - } - if !dst.Created.Equal(*src.Created) { //--> https://golang.org/pkg/time/#pkg-overview - t.Fatalf("Created not merged in properly: dst.Created(%v) != src.Created(%v)", dst.Created, src.Created) - } -} diff --git a/vendor/github.com/imdario/mergo/issue33_test.go b/vendor/github.com/imdario/mergo/issue33_test.go deleted file mode 100644 index ae55ae23..00000000 --- a/vendor/github.com/imdario/mergo/issue33_test.go +++ /dev/null @@ -1,33 +0,0 @@ -package mergo - -import ( - "testing" -) - -type Foo struct { - Str string - Bslice []byte -} - -func TestIssue33Merge(t *testing.T) { - dest := Foo{Str: "a"} - toMerge := Foo{ - Str: "b", - Bslice: []byte{1, 2}, - } - if err := Merge(&dest, toMerge); err != nil { - t.Errorf("Error while merging: %s", err) - } - // Merge doesn't overwrite an attribute if in destination it doesn't have a zero value. - // In this case, Str isn't a zero value string. - if dest.Str != "a" { - t.Errorf("dest.Str should have not been override as it has a non-zero value: dest.Str(%v) != 'a'", dest.Str) - } - // If we want to override, we must use MergeWithOverwrite or Merge using WithOverride. - if err := Merge(&dest, toMerge, WithOverride); err != nil { - t.Errorf("Error while merging: %s", err) - } - if dest.Str != toMerge.Str { - t.Errorf("dest.Str should have been override: dest.Str(%v) != toMerge.Str(%v)", dest.Str, toMerge.Str) - } -} diff --git a/vendor/github.com/imdario/mergo/issue38_test.go b/vendor/github.com/imdario/mergo/issue38_test.go deleted file mode 100644 index 286b68cb..00000000 --- a/vendor/github.com/imdario/mergo/issue38_test.go +++ /dev/null @@ -1,59 +0,0 @@ -package mergo - -import ( - "testing" - "time" -) - -type structWithoutTimePointer struct { - Created time.Time -} - -func TestIssue38Merge(t *testing.T) { - dst := structWithoutTimePointer{ - time.Now(), - } - - expected := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC) - src := structWithoutTimePointer{ - expected, - } - if err := Merge(&dst, src); err != nil { - t.Errorf("Error while merging %s", err) - } - if dst.Created == src.Created { - t.Fatalf("Created merged unexpectedly: dst.Created(%v) == src.Created(%v)", dst.Created, src.Created) - } -} - -func TestIssue38MergeEmptyStruct(t *testing.T) { - dst := structWithoutTimePointer{} - - expected := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC) - src := structWithoutTimePointer{ - expected, - } - if err := Merge(&dst, src); err != nil { - t.Errorf("Error while merging %s", err) - } - if dst.Created == src.Created { - t.Fatalf("Created merged unexpectedly: dst.Created(%v) == src.Created(%v)", dst.Created, src.Created) - } -} - -func TestIssue38MergeWithOverwrite(t *testing.T) { - dst := structWithoutTimePointer{ - time.Now(), - } - - expected := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC) - src := structWithoutTimePointer{ - expected, - } - if err := MergeWithOverwrite(&dst, src); err != nil { - t.Errorf("Error while merging %s", err) - } - if dst.Created != src.Created { - t.Fatalf("Created not merged in properly: dst.Created(%v) != src.Created(%v)", dst.Created, src.Created) - } -} diff --git a/vendor/github.com/imdario/mergo/issue50_test.go b/vendor/github.com/imdario/mergo/issue50_test.go deleted file mode 100644 index 89aa3634..00000000 --- a/vendor/github.com/imdario/mergo/issue50_test.go +++ /dev/null @@ -1,18 +0,0 @@ -package mergo - -import ( - "testing" - "time" -) - -type testStruct struct { - time.Duration -} - -func TestIssue50Merge(t *testing.T) { - to := testStruct{} - from := testStruct{} - if err := Merge(&to, from); err != nil { - t.Fail() - } -} diff --git a/vendor/github.com/imdario/mergo/issue52_test.go b/vendor/github.com/imdario/mergo/issue52_test.go deleted file mode 100644 index 62cd9fa7..00000000 --- a/vendor/github.com/imdario/mergo/issue52_test.go +++ /dev/null @@ -1,99 +0,0 @@ -package mergo - -import ( - "reflect" - "testing" - "time" -) - -type structWithTime struct { - Birth time.Time -} - -type timeTransfomer struct { - overwrite bool -} - -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() { - if t.overwrite { - isZero := src.MethodByName("IsZero") - result := isZero.Call([]reflect.Value{}) - if !result[0].Bool() { - dst.Set(src) - } - } else { - isZero := dst.MethodByName("IsZero") - result := isZero.Call([]reflect.Value{}) - if result[0].Bool() { - dst.Set(src) - } - } - } - return nil - } - } - return nil -} - -func TestOverwriteZeroSrcTime(t *testing.T) { - now := time.Now() - dst := structWithTime{now} - src := structWithTime{} - if err := MergeWithOverwrite(&dst, src); err != nil { - t.FailNow() - } - if !dst.Birth.IsZero() { - t.Fatalf("dst should have been overwritten: dst.Birth(%v) != now(%v)", dst.Birth, now) - } -} - -func TestOverwriteZeroSrcTimeWithTransformer(t *testing.T) { - now := time.Now() - dst := structWithTime{now} - src := structWithTime{} - if err := MergeWithOverwrite(&dst, src, WithTransformers(timeTransfomer{true})); err != nil { - t.FailNow() - } - if dst.Birth.IsZero() { - t.Fatalf("dst should not have been overwritten: dst.Birth(%v) != now(%v)", dst.Birth, now) - } -} - -func TestOverwriteZeroDstTime(t *testing.T) { - now := time.Now() - dst := structWithTime{} - src := structWithTime{now} - if err := MergeWithOverwrite(&dst, src); err != nil { - t.FailNow() - } - if dst.Birth.IsZero() { - t.Fatalf("dst should have been overwritten: dst.Birth(%v) != zero(%v)", dst.Birth, time.Time{}) - } -} - -func TestZeroDstTime(t *testing.T) { - now := time.Now() - dst := structWithTime{} - src := structWithTime{now} - if err := Merge(&dst, src); err != nil { - t.FailNow() - } - if !dst.Birth.IsZero() { - t.Fatalf("dst should not have been overwritten: dst.Birth(%v) != zero(%v)", dst.Birth, time.Time{}) - } -} - -func TestZeroDstTimeWithTransformer(t *testing.T) { - now := time.Now() - dst := structWithTime{} - src := structWithTime{now} - if err := Merge(&dst, src, WithTransformers(timeTransfomer{})); err != nil { - t.FailNow() - } - if dst.Birth.IsZero() { - t.Fatalf("dst should have been overwritten: dst.Birth(%v) != now(%v)", dst.Birth, now) - } -} diff --git a/vendor/github.com/imdario/mergo/issue61_test.go b/vendor/github.com/imdario/mergo/issue61_test.go deleted file mode 100644 index 8efa5e45..00000000 --- a/vendor/github.com/imdario/mergo/issue61_test.go +++ /dev/null @@ -1,20 +0,0 @@ -package mergo - -import ( - "reflect" - "testing" -) - -func TestIssue61MergeNilMap(t *testing.T) { - type T struct { - I map[string][]string - } - t1 := T{} - t2 := T{I: map[string][]string{"hi": {"there"}}} - if err := Merge(&t1, t2); err != nil { - t.Fail() - } - if !reflect.DeepEqual(t2, T{I: map[string][]string{"hi": {"there"}}}) { - t.FailNow() - } -} diff --git a/vendor/github.com/imdario/mergo/issue64_test.go b/vendor/github.com/imdario/mergo/issue64_test.go deleted file mode 100644 index 32382bef..00000000 --- a/vendor/github.com/imdario/mergo/issue64_test.go +++ /dev/null @@ -1,38 +0,0 @@ -package mergo - -import ( - "testing" -) - -type Student struct { - Name string - Books []string -} - -var testData = []struct { - S1 Student - S2 Student - ExpectedSlice []string -}{ - {Student{"Jack", []string{"a", "B"}}, Student{"Tom", []string{"1"}}, []string{"a", "B"}}, - {Student{"Jack", []string{"a", "B"}}, Student{"Tom", []string{}}, []string{"a", "B"}}, - {Student{"Jack", []string{}}, Student{"Tom", []string{"1"}}, []string{"1"}}, - {Student{"Jack", []string{}}, Student{"Tom", []string{}}, []string{}}, -} - -func TestIssue64MergeSliceWithOverride(t *testing.T) { - for _, data := range testData { - err := Merge(&data.S2, data.S1, WithOverride) - if err != nil { - t.Errorf("Error while merging %s", err) - } - if len(data.S2.Books) != len(data.ExpectedSlice) { - t.Fatalf("Got %d elements in slice, but expected %d", len(data.S2.Books), len(data.ExpectedSlice)) - } - for i, val := range data.S2.Books { - if val != data.ExpectedSlice[i] { - t.Fatalf("Expected %s, but got %s while merging slice with override", data.ExpectedSlice[i], val) - } - } - } -} diff --git a/vendor/github.com/imdario/mergo/issue66_test.go b/vendor/github.com/imdario/mergo/issue66_test.go deleted file mode 100644 index 9e4bcced..00000000 --- a/vendor/github.com/imdario/mergo/issue66_test.go +++ /dev/null @@ -1,48 +0,0 @@ -package mergo - -import ( - "testing" -) - -type PrivateSliceTest66 struct { - PublicStrings []string - privateStrings []string -} - -func TestPrivateSlice(t *testing.T) { - p1 := PrivateSliceTest66{ - PublicStrings: []string{"one", "two", "three"}, - privateStrings: []string{"four", "five"}, - } - p2 := PrivateSliceTest66{ - PublicStrings: []string{"six", "seven"}, - } - if err := Merge(&p1, p2); err != nil { - t.Fatalf("Error during the merge: %v", err) - } - if len(p1.PublicStrings) != 3 { - t.Error("5 elements should be in 'PublicStrings' field") - } - if len(p1.privateStrings) != 2 { - t.Error("2 elements should be in 'privateStrings' field") - } -} - -func TestPrivateSliceWithAppendSlice(t *testing.T) { - p1 := PrivateSliceTest66{ - PublicStrings: []string{"one", "two", "three"}, - privateStrings: []string{"four", "five"}, - } - p2 := PrivateSliceTest66{ - PublicStrings: []string{"six", "seven"}, - } - if err := Merge(&p1, p2, WithAppendSlice); err != nil { - t.Fatalf("Error during the merge: %v", err) - } - if len(p1.PublicStrings) != 5 { - t.Error("5 elements should be in 'PublicStrings' field") - } - if len(p1.privateStrings) != 2 { - t.Error("2 elements should be in 'privateStrings' field") - } -} diff --git a/vendor/github.com/imdario/mergo/merge_appendslice_test.go b/vendor/github.com/imdario/mergo/merge_appendslice_test.go deleted file mode 100644 index a780f34a..00000000 --- a/vendor/github.com/imdario/mergo/merge_appendslice_test.go +++ /dev/null @@ -1,33 +0,0 @@ -package mergo - -import ( - "testing" -) - -var testDataS = []struct { - S1 Student - S2 Student - ExpectedSlice []string -}{ - {Student{"Jack", []string{"a", "B"}}, Student{"Tom", []string{"1"}}, []string{"1", "a", "B"}}, - {Student{"Jack", []string{"a", "B"}}, Student{"Tom", []string{}}, []string{"a", "B"}}, - {Student{"Jack", []string{}}, Student{"Tom", []string{"1"}}, []string{"1"}}, - {Student{"Jack", []string{}}, Student{"Tom", []string{}}, []string{}}, -} - -func TestMergeSliceWithOverrideWithAppendSlice(t *testing.T) { - for _, data := range testDataS { - err := Merge(&data.S2, data.S1, WithOverride, WithAppendSlice) - if err != nil { - t.Errorf("Error while merging %s", err) - } - if len(data.S2.Books) != len(data.ExpectedSlice) { - t.Fatalf("Got %d elements in slice, but expected %d", len(data.S2.Books), len(data.ExpectedSlice)) - } - for i, val := range data.S2.Books { - if val != data.ExpectedSlice[i] { - t.Fatalf("Expected %s, but got %s while merging slice with override", data.ExpectedSlice[i], val) - } - } - } -} diff --git a/vendor/github.com/imdario/mergo/merge_test.go b/vendor/github.com/imdario/mergo/merge_test.go deleted file mode 100644 index 5bf808a7..00000000 --- a/vendor/github.com/imdario/mergo/merge_test.go +++ /dev/null @@ -1,50 +0,0 @@ -package mergo - -import ( - "reflect" - "testing" -) - -type transformer struct { - m map[reflect.Type]func(dst, src reflect.Value) error -} - -func (s *transformer) Transformer(t reflect.Type) func(dst, src reflect.Value) error { - if fn, ok := s.m[t]; ok { - return fn - } - return nil -} - -type foo struct { - s string - Bar *bar -} - -type bar struct { - i int - s map[string]string -} - -func TestMergeWithTransformerNilStruct(t *testing.T) { - a := foo{s: "foo"} - b := foo{Bar: &bar{i: 2, s: map[string]string{"foo": "bar"}}} - if err := Merge(&a, &b, WithOverride, WithTransformers(&transformer{ - m: map[reflect.Type]func(dst, src reflect.Value) error{ - reflect.TypeOf(&bar{}): func(dst, src reflect.Value) error { - // Do sthg with Elem - t.Log(dst.Elem().FieldByName("i")) - t.Log(src.Elem()) - return nil - }, - }, - })); err != nil { - t.Fatal(err) - } - if a.s != "foo" { - t.Fatalf("b not merged in properly: a.s.Value(%s) != expected(%s)", a.s, "foo") - } - if a.Bar == nil { - t.Fatalf("b not merged in properly: a.Bar shouldn't be nil") - } -} diff --git a/vendor/github.com/imdario/mergo/mergo_test.go b/vendor/github.com/imdario/mergo/mergo_test.go deleted file mode 100644 index 31204d6f..00000000 --- a/vendor/github.com/imdario/mergo/mergo_test.go +++ /dev/null @@ -1,755 +0,0 @@ -// Copyright 2013 Dario Castañé. All rights reserved. -// 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 mergo - -import ( - "io/ioutil" - "reflect" - "testing" - "time" - - "gopkg.in/yaml.v2" -) - -type simpleTest struct { - Value int -} - -type complexTest struct { - St simpleTest - sz int - ID string -} - -type mapTest struct { - M map[int]int -} - -type ifcTest struct { - I interface{} -} - -type moreComplextText struct { - Ct complexTest - St simpleTest - Nt simpleTest -} - -type pointerTest struct { - C *simpleTest -} - -type sliceTest struct { - S []int -} - -func TestKb(t *testing.T) { - type testStruct struct { - Name string - KeyValue map[string]interface{} - } - - akv := make(map[string]interface{}) - akv["Key1"] = "not value 1" - akv["Key2"] = "value2" - a := testStruct{} - a.Name = "A" - a.KeyValue = akv - - bkv := make(map[string]interface{}) - bkv["Key1"] = "value1" - bkv["Key3"] = "value3" - b := testStruct{} - b.Name = "B" - b.KeyValue = bkv - - ekv := make(map[string]interface{}) - ekv["Key1"] = "value1" - ekv["Key2"] = "value2" - ekv["Key3"] = "value3" - expected := testStruct{} - expected.Name = "B" - expected.KeyValue = ekv - - Merge(&b, a) - - if !reflect.DeepEqual(b, expected) { - t.Errorf("Actual: %#v did not match \nExpected: %#v", b, expected) - } -} - -func TestNil(t *testing.T) { - if err := Merge(nil, nil); err != ErrNilArguments { - t.Fail() - } -} - -func TestDifferentTypes(t *testing.T) { - a := simpleTest{42} - b := 42 - if err := Merge(&a, b); err != ErrDifferentArgumentsTypes { - t.Fail() - } -} - -func TestSimpleStruct(t *testing.T) { - a := simpleTest{} - b := simpleTest{42} - if err := Merge(&a, b); err != nil { - t.FailNow() - } - if a.Value != 42 { - t.Fatalf("b not merged in properly: a.Value(%d) != b.Value(%d)", a.Value, b.Value) - } - if !reflect.DeepEqual(a, b) { - t.FailNow() - } -} - -func TestComplexStruct(t *testing.T) { - a := complexTest{} - a.ID = "athing" - b := complexTest{simpleTest{42}, 1, "bthing"} - if err := Merge(&a, b); err != nil { - t.FailNow() - } - if a.St.Value != 42 { - t.Fatalf("b not merged in properly: a.St.Value(%d) != b.St.Value(%d)", a.St.Value, b.St.Value) - } - if a.sz == 1 { - t.Fatalf("a's private field sz not preserved from merge: a.sz(%d) == b.sz(%d)", a.sz, b.sz) - } - if a.ID == b.ID { - t.Fatalf("a's field ID merged unexpectedly: a.ID(%s) == b.ID(%s)", a.ID, b.ID) - } -} - -func TestComplexStructWithOverwrite(t *testing.T) { - a := complexTest{simpleTest{1}, 1, "do-not-overwrite-with-empty-value"} - b := complexTest{simpleTest{42}, 2, ""} - - expect := complexTest{simpleTest{42}, 1, "do-not-overwrite-with-empty-value"} - if err := MergeWithOverwrite(&a, b); err != nil { - t.FailNow() - } - - if !reflect.DeepEqual(a, expect) { - t.Fatalf("Test failed:\ngot :\n%#v\n\nwant :\n%#v\n\n", a, expect) - } -} - -func TestPointerStruct(t *testing.T) { - s1 := simpleTest{} - s2 := simpleTest{19} - a := pointerTest{&s1} - b := pointerTest{&s2} - if err := Merge(&a, b); err != nil { - t.FailNow() - } - if a.C.Value != b.C.Value { - t.Fatalf("b not merged in properly: a.C.Value(%d) != b.C.Value(%d)", a.C.Value, b.C.Value) - } -} - -type embeddingStruct struct { - embeddedStruct -} - -type embeddedStruct struct { - A string -} - -func TestEmbeddedStruct(t *testing.T) { - tests := []struct { - src embeddingStruct - dst embeddingStruct - expected embeddingStruct - }{ - { - src: embeddingStruct{ - embeddedStruct{"foo"}, - }, - dst: embeddingStruct{ - embeddedStruct{""}, - }, - expected: embeddingStruct{ - embeddedStruct{"foo"}, - }, - }, - { - src: embeddingStruct{ - embeddedStruct{""}, - }, - dst: embeddingStruct{ - embeddedStruct{"bar"}, - }, - expected: embeddingStruct{ - embeddedStruct{"bar"}, - }, - }, - { - src: embeddingStruct{ - embeddedStruct{"foo"}, - }, - dst: embeddingStruct{ - embeddedStruct{"bar"}, - }, - expected: embeddingStruct{ - embeddedStruct{"bar"}, - }, - }, - } - - for _, test := range tests { - err := Merge(&test.dst, test.src) - if err != nil { - t.Errorf("unexpected error: %v", err) - continue - } - if !reflect.DeepEqual(test.dst, test.expected) { - t.Errorf("unexpected output\nexpected:\n%+v\nsaw:\n%+v\n", test.expected, test.dst) - } - } -} - -func TestPointerStructNil(t *testing.T) { - a := pointerTest{nil} - b := pointerTest{&simpleTest{19}} - if err := Merge(&a, b); err != nil { - t.FailNow() - } - if a.C.Value != b.C.Value { - t.Fatalf("b not merged in a properly: a.C.Value(%d) != b.C.Value(%d)", a.C.Value, b.C.Value) - } -} - -func testSlice(t *testing.T, a []int, b []int, e []int, opts ...func(*Config)) { - t.Helper() - bc := b - - sa := sliceTest{a} - sb := sliceTest{b} - if err := Merge(&sa, sb, opts...); err != nil { - t.FailNow() - } - if !reflect.DeepEqual(sb.S, bc) { - t.Fatalf("Source slice was modified %d != %d", sb.S, bc) - } - if !reflect.DeepEqual(sa.S, e) { - t.Fatalf("b not merged in a proper way %d != %d", sa.S, e) - } - - ma := map[string][]int{"S": a} - mb := map[string][]int{"S": b} - if err := Merge(&ma, mb, opts...); err != nil { - t.FailNow() - } - if !reflect.DeepEqual(mb["S"], bc) { - t.Fatalf("map value: Source slice was modified %d != %d", mb["S"], bc) - } - if !reflect.DeepEqual(ma["S"], e) { - t.Fatalf("map value: b not merged in a proper way %d != %d", ma["S"], e) - } - - if a == nil { - // test case with missing dst key - ma := map[string][]int{} - mb := map[string][]int{"S": b} - if err := Merge(&ma, mb); err != nil { - t.FailNow() - } - if !reflect.DeepEqual(mb["S"], bc) { - t.Fatalf("missing dst key: Source slice was modified %d != %d", mb["S"], bc) - } - if !reflect.DeepEqual(ma["S"], e) { - t.Fatalf("missing dst key: b not merged in a proper way %d != %d", ma["S"], e) - } - } - - if b == nil { - // test case with missing src key - ma := map[string][]int{"S": a} - mb := map[string][]int{} - if err := Merge(&ma, mb); err != nil { - t.FailNow() - } - if !reflect.DeepEqual(mb["S"], bc) { - t.Fatalf("missing src key: Source slice was modified %d != %d", mb["S"], bc) - } - if !reflect.DeepEqual(ma["S"], e) { - t.Fatalf("missing src key: b not merged in a proper way %d != %d", ma["S"], e) - } - } -} - -func TestSlice(t *testing.T) { - testSlice(t, nil, []int{1, 2, 3}, []int{1, 2, 3}) - testSlice(t, []int{}, []int{1, 2, 3}, []int{1, 2, 3}) - testSlice(t, []int{1}, []int{2, 3}, []int{1}) - testSlice(t, []int{1}, []int{}, []int{1}) - testSlice(t, []int{1}, nil, []int{1}) - testSlice(t, nil, []int{1, 2, 3}, []int{1, 2, 3}, WithAppendSlice) - testSlice(t, []int{}, []int{1, 2, 3}, []int{1, 2, 3}, WithAppendSlice) - testSlice(t, []int{1}, []int{2, 3}, []int{1, 2, 3}, WithAppendSlice) - testSlice(t, []int{1}, []int{}, []int{1}, WithAppendSlice) - testSlice(t, []int{1}, nil, []int{1}, WithAppendSlice) -} - -func TestEmptyMaps(t *testing.T) { - a := mapTest{} - b := mapTest{ - map[int]int{}, - } - if err := Merge(&a, b); err != nil { - t.Fail() - } - if !reflect.DeepEqual(a, b) { - t.FailNow() - } -} - -func TestEmptyToEmptyMaps(t *testing.T) { - a := mapTest{} - b := mapTest{} - if err := Merge(&a, b); err != nil { - t.Fail() - } - if !reflect.DeepEqual(a, b) { - t.FailNow() - } -} - -func TestEmptyToNotEmptyMaps(t *testing.T) { - a := mapTest{map[int]int{ - 1: 2, - 3: 4, - }} - aa := mapTest{map[int]int{ - 1: 2, - 3: 4, - }} - b := mapTest{ - map[int]int{}, - } - if err := Merge(&a, b); err != nil { - t.Fail() - } - if !reflect.DeepEqual(a, aa) { - t.FailNow() - } -} - -func TestMapsWithOverwrite(t *testing.T) { - m := map[string]simpleTest{ - "a": {}, // overwritten by 16 - "b": {42}, // not overwritten by empty value - "c": {13}, // overwritten by 12 - "d": {61}, - } - n := map[string]simpleTest{ - "a": {16}, - "b": {}, - "c": {12}, - "e": {14}, - } - expect := map[string]simpleTest{ - "a": {16}, - "b": {}, - "c": {12}, - "d": {61}, - "e": {14}, - } - - if err := MergeWithOverwrite(&m, n); err != nil { - t.Fatalf(err.Error()) - } - - if !reflect.DeepEqual(m, expect) { - t.Fatalf("Test failed:\ngot :\n%#v\n\nwant :\n%#v\n\n", m, expect) - } -} - -func TestMaps(t *testing.T) { - m := map[string]simpleTest{ - "a": {}, - "b": {42}, - "c": {13}, - "d": {61}, - } - n := map[string]simpleTest{ - "a": {16}, - "b": {}, - "c": {12}, - "e": {14}, - } - expect := map[string]simpleTest{ - "a": {0}, - "b": {42}, - "c": {13}, - "d": {61}, - "e": {14}, - } - - if err := Merge(&m, n); err != nil { - t.Fatalf(err.Error()) - } - - if !reflect.DeepEqual(m, expect) { - t.Fatalf("Test failed:\ngot :\n%#v\n\nwant :\n%#v\n\n", m, expect) - } - if m["a"].Value != 0 { - t.Fatalf(`n merged in m because I solved non-addressable map values TODO: m["a"].Value(%d) != n["a"].Value(%d)`, m["a"].Value, n["a"].Value) - } - if m["b"].Value != 42 { - t.Fatalf(`n wrongly merged in m: m["b"].Value(%d) != n["b"].Value(%d)`, m["b"].Value, n["b"].Value) - } - if m["c"].Value != 13 { - t.Fatalf(`n overwritten in m: m["c"].Value(%d) != n["c"].Value(%d)`, m["c"].Value, n["c"].Value) - } -} - -func TestMapsWithNilPointer(t *testing.T) { - m := map[string]*simpleTest{ - "a": nil, - "b": nil, - } - n := map[string]*simpleTest{ - "b": nil, - "c": nil, - } - expect := map[string]*simpleTest{ - "a": nil, - "b": nil, - "c": nil, - } - - if err := Merge(&m, n, WithOverride); err != nil { - t.Fatalf(err.Error()) - } - - if !reflect.DeepEqual(m, expect) { - t.Fatalf("Test failed:\ngot :\n%#v\n\nwant :\n%#v\n\n", m, expect) - } -} - -func TestYAMLMaps(t *testing.T) { - thing := loadYAML("testdata/thing.yml") - license := loadYAML("testdata/license.yml") - ft := thing["fields"].(map[interface{}]interface{}) - fl := license["fields"].(map[interface{}]interface{}) - // license has one extra field (site) and another already existing in thing (author) that Mergo won't override. - expectedLength := len(ft) + len(fl) - 1 - if err := Merge(&license, thing); err != nil { - t.Fatal(err.Error()) - } - currentLength := len(license["fields"].(map[interface{}]interface{})) - if currentLength != expectedLength { - t.Fatalf(`thing not merged in license properly, license must have %d elements instead of %d`, expectedLength, currentLength) - } - fields := license["fields"].(map[interface{}]interface{}) - if _, ok := fields["id"]; !ok { - t.Fatalf(`thing not merged in license properly, license must have a new id field from thing`) - } -} - -func TestTwoPointerValues(t *testing.T) { - a := &simpleTest{} - b := &simpleTest{42} - if err := Merge(a, b); err != nil { - t.Fatalf(`Boom. You crossed the streams: %s`, err) - } -} - -func TestMap(t *testing.T) { - a := complexTest{} - a.ID = "athing" - c := moreComplextText{a, simpleTest{}, simpleTest{}} - b := map[string]interface{}{ - "ct": map[string]interface{}{ - "st": map[string]interface{}{ - "value": 42, - }, - "sz": 1, - "id": "bthing", - }, - "st": &simpleTest{144}, // Mapping a reference - "zt": simpleTest{299}, // Mapping a missing field (zt doesn't exist) - "nt": simpleTest{3}, - } - if err := Map(&c, b); err != nil { - t.FailNow() - } - m := b["ct"].(map[string]interface{}) - n := m["st"].(map[string]interface{}) - o := b["st"].(*simpleTest) - p := b["nt"].(simpleTest) - if c.Ct.St.Value != 42 { - t.Fatalf("b not merged in properly: c.Ct.St.Value(%d) != b.Ct.St.Value(%d)", c.Ct.St.Value, n["value"]) - } - if c.St.Value != 144 { - t.Fatalf("b not merged in properly: c.St.Value(%d) != b.St.Value(%d)", c.St.Value, o.Value) - } - if c.Nt.Value != 3 { - t.Fatalf("b not merged in properly: c.Nt.Value(%d) != b.Nt.Value(%d)", c.St.Value, p.Value) - } - if c.Ct.sz == 1 { - t.Fatalf("a's private field sz not preserved from merge: c.Ct.sz(%d) == b.Ct.sz(%d)", c.Ct.sz, m["sz"]) - } - if c.Ct.ID == m["id"] { - t.Fatalf("a's field ID merged unexpectedly: c.Ct.ID(%s) == b.Ct.ID(%s)", c.Ct.ID, m["id"]) - } -} - -func TestSimpleMap(t *testing.T) { - a := simpleTest{} - b := map[string]interface{}{ - "value": 42, - } - if err := Map(&a, b); err != nil { - t.FailNow() - } - if a.Value != 42 { - t.Fatalf("b not merged in properly: a.Value(%d) != b.Value(%v)", a.Value, b["value"]) - } -} - -func TestIfcMap(t *testing.T) { - a := ifcTest{} - b := ifcTest{42} - if err := Map(&a, b); err != nil { - t.FailNow() - } - if a.I != 42 { - t.Fatalf("b not merged in properly: a.I(%d) != b.I(%d)", a.I, b.I) - } - if !reflect.DeepEqual(a, b) { - t.FailNow() - } -} - -func TestIfcMapNoOverwrite(t *testing.T) { - a := ifcTest{13} - b := ifcTest{42} - if err := Map(&a, b); err != nil { - t.FailNow() - } - if a.I != 13 { - t.Fatalf("a not left alone: a.I(%d) == b.I(%d)", a.I, b.I) - } -} - -func TestIfcMapWithOverwrite(t *testing.T) { - a := ifcTest{13} - b := ifcTest{42} - if err := MapWithOverwrite(&a, b); err != nil { - t.FailNow() - } - if a.I != 42 { - t.Fatalf("b not merged in properly: a.I(%d) != b.I(%d)", a.I, b.I) - } - if !reflect.DeepEqual(a, b) { - t.FailNow() - } -} - -type pointerMapTest struct { - A int - hidden int - B *simpleTest -} - -func TestBackAndForth(t *testing.T) { - pt := pointerMapTest{42, 1, &simpleTest{66}} - m := make(map[string]interface{}) - if err := Map(&m, pt); err != nil { - t.FailNow() - } - var ( - v interface{} - ok bool - ) - if v, ok = m["a"]; v.(int) != pt.A || !ok { - t.Fatalf("pt not merged in properly: m[`a`](%d) != pt.A(%d)", v, pt.A) - } - if v, ok = m["b"]; !ok { - t.Fatalf("pt not merged in properly: B is missing in m") - } - var st *simpleTest - if st = v.(*simpleTest); st.Value != 66 { - t.Fatalf("something went wrong while mapping pt on m, B wasn't copied") - } - bpt := pointerMapTest{} - if err := Map(&bpt, m); err != nil { - t.Fatal(err) - } - if bpt.A != pt.A { - t.Fatalf("pt not merged in properly: bpt.A(%d) != pt.A(%d)", bpt.A, pt.A) - } - if bpt.hidden == pt.hidden { - t.Fatalf("pt unexpectedly merged: bpt.hidden(%d) == pt.hidden(%d)", bpt.hidden, pt.hidden) - } - if bpt.B.Value != pt.B.Value { - t.Fatalf("pt not merged in properly: bpt.B.Value(%d) != pt.B.Value(%d)", bpt.B.Value, pt.B.Value) - } -} - -func TestEmbeddedPointerUnpacking(t *testing.T) { - tests := []struct{ input pointerMapTest }{ - {pointerMapTest{42, 1, nil}}, - {pointerMapTest{42, 1, &simpleTest{66}}}, - } - newValue := 77 - m := map[string]interface{}{ - "b": map[string]interface{}{ - "value": newValue, - }, - } - for _, test := range tests { - pt := test.input - if err := MapWithOverwrite(&pt, m); err != nil { - t.FailNow() - } - if pt.B.Value != newValue { - t.Fatalf("pt not mapped properly: pt.A.Value(%d) != m[`b`][`value`](%d)", pt.B.Value, newValue) - } - - } -} - -type structWithTimePointer struct { - Birth *time.Time -} - -func TestTime(t *testing.T) { - now := time.Now() - dataStruct := structWithTimePointer{ - Birth: &now, - } - dataMap := map[string]interface{}{ - "Birth": &now, - } - b := structWithTimePointer{} - if err := Merge(&b, dataStruct); err != nil { - t.FailNow() - } - if b.Birth.IsZero() { - t.Fatalf("time.Time not merged in properly: b.Birth(%v) != dataStruct['Birth'](%v)", b.Birth, dataStruct.Birth) - } - if b.Birth != dataStruct.Birth { - t.Fatalf("time.Time not merged in properly: b.Birth(%v) != dataStruct['Birth'](%v)", b.Birth, dataStruct.Birth) - } - b = structWithTimePointer{} - if err := Map(&b, dataMap); err != nil { - t.FailNow() - } - if b.Birth.IsZero() { - t.Fatalf("time.Time not merged in properly: b.Birth(%v) != dataMap['Birth'](%v)", b.Birth, dataMap["Birth"]) - } -} - -type simpleNested struct { - A int -} - -type structWithNestedPtrValueMap struct { - NestedPtrValue map[string]*simpleNested -} - -func TestNestedPtrValueInMap(t *testing.T) { - src := &structWithNestedPtrValueMap{ - NestedPtrValue: map[string]*simpleNested{ - "x": { - A: 1, - }, - }, - } - dst := &structWithNestedPtrValueMap{ - NestedPtrValue: map[string]*simpleNested{ - "x": {}, - }, - } - if err := Map(dst, src); err != nil { - t.FailNow() - } - if dst.NestedPtrValue["x"].A == 0 { - t.Fatalf("Nested Ptr value not merged in properly: dst.NestedPtrValue[\"x\"].A(%v) != src.NestedPtrValue[\"x\"].A(%v)", dst.NestedPtrValue["x"].A, src.NestedPtrValue["x"].A) - } -} - -func loadYAML(path string) (m map[string]interface{}) { - m = make(map[string]interface{}) - raw, _ := ioutil.ReadFile(path) - _ = yaml.Unmarshal(raw, &m) - return -} - -type structWithMap struct { - m map[string]structWithUnexportedProperty -} - -type structWithUnexportedProperty struct { - s string -} - -func TestUnexportedProperty(t *testing.T) { - a := structWithMap{map[string]structWithUnexportedProperty{ - "key": {"hello"}, - }} - b := structWithMap{map[string]structWithUnexportedProperty{ - "key": {"hi"}, - }} - defer func() { - if r := recover(); r != nil { - t.Errorf("Should not have panicked") - } - }() - Merge(&a, b) -} - -type structWithBoolPointer struct { - C *bool -} - -func TestBooleanPointer(t *testing.T) { - bt, bf := true, false - src := structWithBoolPointer{ - &bt, - } - dst := structWithBoolPointer{ - &bf, - } - if err := Merge(&dst, src); err != nil { - t.FailNow() - } - if dst.C == src.C { - t.Fatalf("dst.C should be a different pointer than src.C") - } - if *dst.C != *src.C { - t.Fatalf("dst.C should be true") - } -} - -func TestMergeMapWithInnerSliceOfDifferentType(t *testing.T) { - src := map[string]interface{}{ - "foo": []string{"a", "b"}, - } - dst := map[string]interface{}{ - "foo": []int{1, 2}, - } - - if err := Merge(&src, &dst, WithOverride, WithAppendSlice); err == nil { - t.Fatal("expected an error, got nothing") - } -} - -func TestMergeSliceDifferentType(t *testing.T) { - src := []string{"a", "b"} - dst := []int{1, 2} - - if err := Merge(&src, &dst, WithOverride, WithAppendSlice); err == nil { - t.Fatal("expected an error, got nothing") - } -} diff --git a/vendor/github.com/imdario/mergo/pr80_test.go b/vendor/github.com/imdario/mergo/pr80_test.go deleted file mode 100644 index 0b3220f3..00000000 --- a/vendor/github.com/imdario/mergo/pr80_test.go +++ /dev/null @@ -1,18 +0,0 @@ -package mergo - -import ( - "testing" -) - -type mapInterface map[string]interface{} - -func TestMergeMapsEmptyString(t *testing.T) { - a := mapInterface{"s": ""} - b := mapInterface{"s": "foo"} - if err := Merge(&a, b); err != nil { - t.Fatal(err) - } - if a["s"] != "foo" { - t.Fatalf("b not merged in properly: a.s.Value(%s) != expected(%s)", a["s"], "foo") - } -} diff --git a/vendor/github.com/imdario/mergo/pr81_test.go b/vendor/github.com/imdario/mergo/pr81_test.go deleted file mode 100644 index e90e923f..00000000 --- a/vendor/github.com/imdario/mergo/pr81_test.go +++ /dev/null @@ -1,42 +0,0 @@ -package mergo - -import ( - "testing" -) - -func TestMapInterfaceWithMultipleLayer(t *testing.T) { - m1 := map[string]interface{}{ - "k1": map[string]interface{}{ - "k1.1": "v1", - }, - } - - m2 := map[string]interface{}{ - "k1": map[string]interface{}{ - "k1.1": "v2", - "k1.2": "v3", - }, - } - - if err := Map(&m1, m2, WithOverride); err != nil { - t.Fatalf("Error merging: %v", err) - } - - // Check overwrite of sub map works - expected := "v2" - actual := m1["k1"].(map[string]interface{})["k1.1"].(string) - if actual != expected { - t.Fatalf("Expected %v but got %v", - expected, - actual) - } - - // Check new key is merged - expected = "v3" - actual = m1["k1"].(map[string]interface{})["k1.2"].(string) - if actual != expected { - t.Fatalf("Expected %v but got %v", - expected, - actual) - } -} diff --git a/vendor/github.com/imdario/mergo/testdata/license.yml b/vendor/github.com/imdario/mergo/testdata/license.yml new file mode 100644 index 00000000..2f1ad008 --- /dev/null +++ b/vendor/github.com/imdario/mergo/testdata/license.yml @@ -0,0 +1,4 @@ +import: ../../../../fossene/db/schema/thing.yml +fields: + site: string + author: root diff --git a/vendor/github.com/json-iterator/go/.codecov.yml b/vendor/github.com/json-iterator/go/.codecov.yml deleted file mode 100644 index 955dc0be..00000000 --- a/vendor/github.com/json-iterator/go/.codecov.yml +++ /dev/null @@ -1,3 +0,0 @@ -ignore: - - "output_tests/.*" - diff --git a/vendor/github.com/json-iterator/go/.gitignore b/vendor/github.com/json-iterator/go/.gitignore deleted file mode 100644 index 15556530..00000000 --- a/vendor/github.com/json-iterator/go/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/vendor -/bug_test.go -/coverage.txt -/.idea diff --git a/vendor/github.com/json-iterator/go/.travis.yml b/vendor/github.com/json-iterator/go/.travis.yml deleted file mode 100644 index 449e67cd..00000000 --- a/vendor/github.com/json-iterator/go/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: go - -go: - - 1.8.x - - 1.x - -before_install: - - go get -t -v ./... - -script: - - ./test.sh - -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/json-iterator/go/Gopkg.lock b/vendor/github.com/json-iterator/go/Gopkg.lock deleted file mode 100644 index c8a9fbb3..00000000 --- a/vendor/github.com/json-iterator/go/Gopkg.lock +++ /dev/null @@ -1,21 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - name = "github.com/modern-go/concurrent" - packages = ["."] - revision = "e0a39a4cb4216ea8db28e22a69f4ec25610d513a" - version = "1.0.0" - -[[projects]] - name = "github.com/modern-go/reflect2" - packages = ["."] - revision = "4b7aa43c6742a2c18fdef89dd197aaae7dac7ccd" - version = "1.0.1" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - inputs-digest = "ea54a775e5a354cb015502d2e7aa4b74230fc77e894f34a838b268c25ec8eeb8" - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/vendor/github.com/json-iterator/go/Gopkg.toml b/vendor/github.com/json-iterator/go/Gopkg.toml deleted file mode 100644 index 313a0f88..00000000 --- a/vendor/github.com/json-iterator/go/Gopkg.toml +++ /dev/null @@ -1,26 +0,0 @@ -# Gopkg.toml example -# -# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" - -ignored = ["github.com/davecgh/go-spew*","github.com/google/gofuzz*","github.com/stretchr/testify*"] - -[[constraint]] - name = "github.com/modern-go/reflect2" - version = "1.0.1" diff --git a/vendor/github.com/json-iterator/go/README.md b/vendor/github.com/json-iterator/go/README.md deleted file mode 100644 index 54d5afe9..00000000 --- a/vendor/github.com/json-iterator/go/README.md +++ /dev/null @@ -1,91 +0,0 @@ -[![Sourcegraph](https://sourcegraph.com/github.com/json-iterator/go/-/badge.svg)](https://sourcegraph.com/github.com/json-iterator/go?badge) -[![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](http://godoc.org/github.com/json-iterator/go) -[![Build Status](https://travis-ci.org/json-iterator/go.svg?branch=master)](https://travis-ci.org/json-iterator/go) -[![codecov](https://codecov.io/gh/json-iterator/go/branch/master/graph/badge.svg)](https://codecov.io/gh/json-iterator/go) -[![rcard](https://goreportcard.com/badge/github.com/json-iterator/go)](https://goreportcard.com/report/github.com/json-iterator/go) -[![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/json-iterator/go/master/LICENSE) -[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/json-iterator/Lobby) - -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 -``` - -# Benchmark - -![benchmark](http://jsoniter.com/benchmarks/go-benchmark.png) - -Source code: https://github.com/json-iterator/go-benchmark/blob/master/src/github.com/json-iterator/go-benchmark/benchmark_medium_payload_test.go - -Raw Result (easyjson requires static code generation) - -| | ns/op | allocation bytes | allocation times | -| --- | --- | --- | --- | -| std decode | 35510 ns/op | 1960 B/op | 99 allocs/op | -| easyjson decode | 8499 ns/op | 160 B/op | 4 allocs/op | -| jsoniter decode | 5623 ns/op | 160 B/op | 3 allocs/op | -| std encode | 2213 ns/op | 712 B/op | 5 allocs/op | -| 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 - -Replace - -```go -import "encoding/json" -json.Marshal(&data) -``` - -with - -```go -import "github.com/json-iterator/go" - -var json = jsoniter.ConfigCompatibleWithStandardLibrary -json.Marshal(&data) -``` - -Replace - -```go -import "encoding/json" -json.Unmarshal(input, &data) -``` - -with - -```go -import "github.com/json-iterator/go" - -var json = jsoniter.ConfigCompatibleWithStandardLibrary -json.Unmarshal(input, &data) -``` - -[More documentation](http://jsoniter.com/migrate-from-go-std.html) - -# How to get - -``` -go get github.com/json-iterator/go -``` - -# Contribution Welcomed ! - -Contributors - -* [thockin](https://github.com/thockin) -* [mattn](https://github.com/mattn) -* [cch123](https://github.com/cch123) -* [Oleg Shaldybin](https://github.com/olegshaldybin) -* [Jason Toffaletti](https://github.com/toffaletti) - -Report issue or pull request, or email taowen@gmail.com, or [![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/json-iterator/Lobby) diff --git a/vendor/github.com/json-iterator/go/build.sh b/vendor/github.com/json-iterator/go/build.sh deleted file mode 100755 index b45ef688..00000000 --- a/vendor/github.com/json-iterator/go/build.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -e -set -x - -if [ ! -d /tmp/build-golang/src/github.com/json-iterator ]; then - mkdir -p /tmp/build-golang/src/github.com/json-iterator - ln -s $PWD /tmp/build-golang/src/github.com/json-iterator/go -fi -export GOPATH=/tmp/build-golang -go get -u github.com/golang/dep/cmd/dep -cd /tmp/build-golang/src/github.com/json-iterator/go -exec $GOPATH/bin/dep ensure -update diff --git a/vendor/github.com/json-iterator/go/example_test.go b/vendor/github.com/json-iterator/go/example_test.go deleted file mode 100644 index 7f521a30..00000000 --- a/vendor/github.com/json-iterator/go/example_test.go +++ /dev/null @@ -1,121 +0,0 @@ -package jsoniter - -import ( - "fmt" - "os" - "strings" -) - -func ExampleMarshal() { - type ColorGroup struct { - ID int - Name string - Colors []string - } - group := ColorGroup{ - ID: 1, - Name: "Reds", - Colors: []string{"Crimson", "Red", "Ruby", "Maroon"}, - } - b, err := Marshal(group) - if err != nil { - fmt.Println("error:", err) - } - os.Stdout.Write(b) - // Output: - // {"ID":1,"Name":"Reds","Colors":["Crimson","Red","Ruby","Maroon"]} -} - -func ExampleUnmarshal() { - var jsonBlob = []byte(`[ - {"Name": "Platypus", "Order": "Monotremata"}, - {"Name": "Quoll", "Order": "Dasyuromorphia"} - ]`) - type Animal struct { - Name string - Order string - } - var animals []Animal - err := Unmarshal(jsonBlob, &animals) - if err != nil { - fmt.Println("error:", err) - } - fmt.Printf("%+v", animals) - // Output: - // [{Name:Platypus Order:Monotremata} {Name:Quoll Order:Dasyuromorphia}] -} - -func ExampleConfigFastest_Marshal() { - type ColorGroup struct { - ID int - Name string - Colors []string - } - group := ColorGroup{ - ID: 1, - Name: "Reds", - Colors: []string{"Crimson", "Red", "Ruby", "Maroon"}, - } - stream := ConfigFastest.BorrowStream(nil) - defer ConfigFastest.ReturnStream(stream) - stream.WriteVal(group) - if stream.Error != nil { - fmt.Println("error:", stream.Error) - } - os.Stdout.Write(stream.Buffer()) - // Output: - // {"ID":1,"Name":"Reds","Colors":["Crimson","Red","Ruby","Maroon"]} -} - -func ExampleConfigFastest_Unmarshal() { - var jsonBlob = []byte(`[ - {"Name": "Platypus", "Order": "Monotremata"}, - {"Name": "Quoll", "Order": "Dasyuromorphia"} - ]`) - type Animal struct { - Name string - Order string - } - var animals []Animal - iter := ConfigFastest.BorrowIterator(jsonBlob) - defer ConfigFastest.ReturnIterator(iter) - iter.ReadVal(&animals) - if iter.Error != nil { - fmt.Println("error:", iter.Error) - } - fmt.Printf("%+v", animals) - // Output: - // [{Name:Platypus Order:Monotremata} {Name:Quoll Order:Dasyuromorphia}] -} - -func ExampleGet() { - val := []byte(`{"ID":1,"Name":"Reds","Colors":["Crimson","Red","Ruby","Maroon"]}`) - fmt.Printf(Get(val, "Colors", 0).ToString()) - // Output: - // Crimson -} - -func ExampleMapKey() { - hello := MyKey("hello") - output, _ := Marshal(map[*MyKey]string{&hello: "world"}) - fmt.Println(string(output)) - obj := map[*MyKey]string{} - Unmarshal(output, &obj) - for k, v := range obj { - fmt.Println(*k, v) - } - // Output: - // {"Hello":"world"} - // Hel world -} - -type MyKey string - -func (m *MyKey) MarshalText() ([]byte, error) { - return []byte(strings.Replace(string(*m), "h", "H", -1)), nil -} - -func (m *MyKey) UnmarshalText(text []byte) error { - *m = MyKey(text[:3]) - return nil -} diff --git a/vendor/github.com/json-iterator/go/fuzzy_mode_convert_table.md b/vendor/github.com/json-iterator/go/fuzzy_mode_convert_table.md deleted file mode 100644 index 3095662b..00000000 --- a/vendor/github.com/json-iterator/go/fuzzy_mode_convert_table.md +++ /dev/null @@ -1,7 +0,0 @@ -| json type \ dest type | bool | int | uint | float |string| -| --- | --- | --- | --- |--|--| -| number | positive => true
negative => true
zero => false| 23.2 => 23
-32.1 => -32| 12.1 => 12
-12.1 => 0|as normal|same as origin| -| string | empty string => false
string "0" => false
other strings => true | "123.32" => 123
"-123.4" => -123
"123.23xxxw" => 123
"abcde12" => 0
"-32.1" => -32| 13.2 => 13
-1.1 => 0 |12.1 => 12.1
-12.3 => -12.3
12.4xxa => 12.4
+1.1e2 =>110 |same as origin| -| bool | true => true
false => false| true => 1
false => 0 | true => 1
false => 0 |true => 1
false => 0|true => "true"
false => "false"| -| object | true | 0 | 0 |0|originnal json| -| array | empty array => false
nonempty array => true| [] => 0
[1,2] => 1 | [] => 0
[1,2] => 1 |[] => 0
[1,2] => 1|original json| \ No newline at end of file diff --git a/vendor/github.com/json-iterator/go/iter_skip_sloppy_test.go b/vendor/github.com/json-iterator/go/iter_skip_sloppy_test.go deleted file mode 100644 index bcb491fe..00000000 --- a/vendor/github.com/json-iterator/go/iter_skip_sloppy_test.go +++ /dev/null @@ -1,162 +0,0 @@ -//+build jsoniter_sloppy - -package jsoniter - -import ( - "github.com/stretchr/testify/require" - "io" - "testing" -) - -func Test_string_end(t *testing.T) { - end, escaped := ParseString(ConfigDefault, `abc"`).findStringEnd() - if end != 4 { - t.Fatal(end) - } - if escaped != false { - t.Fatal(escaped) - } - end, escaped = ParseString(ConfigDefault, `abc\\"`).findStringEnd() - if end != 6 { - t.Fatal(end) - } - if escaped != true { - t.Fatal(escaped) - } - end, escaped = ParseString(ConfigDefault, `abc\\\\"`).findStringEnd() - if end != 8 { - t.Fatal(end) - } - if escaped != true { - t.Fatal(escaped) - } - end, escaped = ParseString(ConfigDefault, `abc\"`).findStringEnd() - if end != -1 { - t.Fatal(end) - } - if escaped != false { - t.Fatal(escaped) - } - end, escaped = ParseString(ConfigDefault, `abc\`).findStringEnd() - if end != -1 { - t.Fatal(end) - } - if escaped != true { - t.Fatal(escaped) - } - end, escaped = ParseString(ConfigDefault, `abc\\`).findStringEnd() - if end != -1 { - t.Fatal(end) - } - if escaped != false { - t.Fatal(escaped) - } - end, escaped = ParseString(ConfigDefault, `\\`).findStringEnd() - if end != -1 { - t.Fatal(end) - } - if escaped != false { - t.Fatal(escaped) - } - end, escaped = ParseString(ConfigDefault, `\`).findStringEnd() - if end != -1 { - t.Fatal(end) - } - if escaped != true { - t.Fatal(escaped) - } -} - -type StagedReader struct { - r1 string - r2 string - r3 string - r int -} - -func (reader *StagedReader) Read(p []byte) (n int, err error) { - reader.r++ - switch reader.r { - case 1: - copy(p, []byte(reader.r1)) - return len(reader.r1), nil - case 2: - copy(p, []byte(reader.r2)) - return len(reader.r2), nil - case 3: - copy(p, []byte(reader.r3)) - return len(reader.r3), nil - default: - return 0, io.EOF - } -} - -func Test_skip_string(t *testing.T) { - should := require.New(t) - iter := ParseString(ConfigDefault, `"abc`) - iter.skipString() - should.Equal(1, iter.head) - iter = ParseString(ConfigDefault, `\""abc`) - iter.skipString() - should.Equal(3, iter.head) - reader := &StagedReader{ - r1: `abc`, - r2: `"`, - } - iter = Parse(ConfigDefault, reader, 4096) - iter.skipString() - should.Equal(1, iter.head) - reader = &StagedReader{ - r1: `abc`, - r2: `1"`, - } - iter = Parse(ConfigDefault, reader, 4096) - iter.skipString() - should.Equal(2, iter.head) - reader = &StagedReader{ - r1: `abc\`, - r2: `"`, - } - iter = Parse(ConfigDefault, reader, 4096) - iter.skipString() - should.NotNil(iter.Error) - reader = &StagedReader{ - r1: `abc\`, - r2: `""`, - } - iter = Parse(ConfigDefault, reader, 4096) - iter.skipString() - should.Equal(2, iter.head) -} - -func Test_skip_object(t *testing.T) { - iter := ParseString(ConfigDefault, `}`) - iter.skipObject() - if iter.head != 1 { - t.Fatal(iter.head) - } - iter = ParseString(ConfigDefault, `a}`) - iter.skipObject() - if iter.head != 2 { - t.Fatal(iter.head) - } - iter = ParseString(ConfigDefault, `{}}a`) - iter.skipObject() - if iter.head != 3 { - t.Fatal(iter.head) - } - reader := &StagedReader{ - r1: `{`, - r2: `}}a`, - } - iter = Parse(ConfigDefault, reader, 4096) - iter.skipObject() - if iter.head != 2 { - t.Fatal(iter.head) - } - iter = ParseString(ConfigDefault, `"}"}a`) - iter.skipObject() - if iter.head != 4 { - t.Fatal(iter.head) - } -} diff --git a/vendor/github.com/json-iterator/go/stream_test.go b/vendor/github.com/json-iterator/go/stream_test.go deleted file mode 100644 index d407c7ab..00000000 --- a/vendor/github.com/json-iterator/go/stream_test.go +++ /dev/null @@ -1,69 +0,0 @@ -package jsoniter - -import ( - "github.com/stretchr/testify/require" - "testing" -) - -func Test_writeByte_should_grow_buffer(t *testing.T) { - should := require.New(t) - stream := NewStream(ConfigDefault, nil, 1) - stream.writeByte('1') - should.Equal("1", string(stream.Buffer())) - should.Equal(1, len(stream.buf)) - stream.writeByte('2') - should.Equal("12", string(stream.Buffer())) - should.Equal(2, len(stream.buf)) - stream.writeThreeBytes('3', '4', '5') - should.Equal("12345", string(stream.Buffer())) -} - -func Test_writeBytes_should_grow_buffer(t *testing.T) { - should := require.New(t) - stream := NewStream(ConfigDefault, nil, 1) - stream.Write([]byte{'1', '2'}) - should.Equal("12", string(stream.Buffer())) - should.Equal(2, len(stream.buf)) - stream.Write([]byte{'3', '4', '5', '6', '7'}) - should.Equal("1234567", string(stream.Buffer())) - should.Equal(7, len(stream.buf)) -} - -func Test_writeIndention_should_grow_buffer(t *testing.T) { - should := require.New(t) - stream := NewStream(Config{IndentionStep: 2}.Froze(), nil, 1) - stream.WriteVal([]int{1, 2, 3}) - should.Equal("[\n 1,\n 2,\n 3\n]", string(stream.Buffer())) -} - -func Test_writeRaw_should_grow_buffer(t *testing.T) { - should := require.New(t) - stream := NewStream(ConfigDefault, nil, 1) - stream.WriteRaw("123") - should.Nil(stream.Error) - should.Equal("123", string(stream.Buffer())) -} - -func Test_writeString_should_grow_buffer(t *testing.T) { - should := require.New(t) - stream := NewStream(ConfigDefault, nil, 0) - stream.WriteString("123") - should.Nil(stream.Error) - should.Equal(`"123"`, string(stream.Buffer())) -} - -type NopWriter struct { - bufferSize int -} - -func (w *NopWriter) Write(p []byte) (n int, err error) { - w.bufferSize = cap(p) - return len(p), nil -} - -func Test_flush_buffer_should_stop_grow_buffer(t *testing.T) { - writer := new(NopWriter) - NewEncoder(writer).Encode(make([]int, 10000000)) - should := require.New(t) - should.Equal(8, writer.bufferSize) -} diff --git a/vendor/github.com/json-iterator/go/test.sh b/vendor/github.com/json-iterator/go/test.sh deleted file mode 100755 index f4e7c0b2..00000000 --- a/vendor/github.com/json-iterator/go/test.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -e -echo "" > coverage.txt - -for d in $(go list ./... | grep -v vendor); do - go test -coverprofile=profile.out -coverpkg=github.com/json-iterator/go $d - if [ -f profile.out ]; then - cat profile.out >> coverage.txt - rm profile.out - fi -done diff --git a/vendor/github.com/modern-go/concurrent/.gitignore b/vendor/github.com/modern-go/concurrent/.gitignore deleted file mode 100644 index 3f2bc474..00000000 --- a/vendor/github.com/modern-go/concurrent/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/coverage.txt diff --git a/vendor/github.com/modern-go/concurrent/.travis.yml b/vendor/github.com/modern-go/concurrent/.travis.yml deleted file mode 100644 index 449e67cd..00000000 --- a/vendor/github.com/modern-go/concurrent/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: go - -go: - - 1.8.x - - 1.x - -before_install: - - go get -t -v ./... - -script: - - ./test.sh - -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/modern-go/concurrent/README.md b/vendor/github.com/modern-go/concurrent/README.md deleted file mode 100644 index acab3200..00000000 --- a/vendor/github.com/modern-go/concurrent/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# concurrent - -[![Sourcegraph](https://sourcegraph.com/github.com/modern-go/concurrent/-/badge.svg)](https://sourcegraph.com/github.com/modern-go/concurrent?badge) -[![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](http://godoc.org/github.com/modern-go/concurrent) -[![Build Status](https://travis-ci.org/modern-go/concurrent.svg?branch=master)](https://travis-ci.org/modern-go/concurrent) -[![codecov](https://codecov.io/gh/modern-go/concurrent/branch/master/graph/badge.svg)](https://codecov.io/gh/modern-go/concurrent) -[![rcard](https://goreportcard.com/badge/github.com/modern-go/concurrent)](https://goreportcard.com/report/github.com/modern-go/concurrent) -[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://raw.githubusercontent.com/modern-go/concurrent/master/LICENSE) - -* concurrent.Map: backport sync.Map for go below 1.9 -* concurrent.Executor: goroutine with explicit ownership and cancellable - -# concurrent.Map - -because sync.Map is only available in go 1.9, we can use concurrent.Map to make code portable - -```go -m := concurrent.NewMap() -m.Store("hello", "world") -elem, found := m.Load("hello") -// elem will be "world" -// found will be true -``` - -# concurrent.Executor - -```go -executor := concurrent.NewUnboundedExecutor() -executor.Go(func(ctx context.Context) { - everyMillisecond := time.NewTicker(time.Millisecond) - for { - select { - case <-ctx.Done(): - fmt.Println("goroutine exited") - return - case <-everyMillisecond.C: - // do something - } - } -}) -time.Sleep(time.Second) -executor.StopAndWaitForever() -fmt.Println("executor stopped") -``` - -attach goroutine to executor instance, so that we can - -* cancel it by stop the executor with Stop/StopAndWait/StopAndWaitForever -* handle panic by callback: the default behavior will no longer crash your application \ No newline at end of file diff --git a/vendor/github.com/modern-go/concurrent/map_test.go b/vendor/github.com/modern-go/concurrent/map_test.go deleted file mode 100644 index 16ba3e5f..00000000 --- a/vendor/github.com/modern-go/concurrent/map_test.go +++ /dev/null @@ -1,18 +0,0 @@ -package concurrent_test - -import ( - "github.com/modern-go/concurrent" - "testing" -) - -func TestMap_Load(t *testing.T) { - m := concurrent.NewMap() - m.Store("hello", "world") - value, found := m.Load("hello") - if !found { - t.Fail() - } - if value != "world" { - t.Fail() - } -} diff --git a/vendor/github.com/modern-go/concurrent/test.sh b/vendor/github.com/modern-go/concurrent/test.sh deleted file mode 100755 index d1e6b2ec..00000000 --- a/vendor/github.com/modern-go/concurrent/test.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -e -echo "" > coverage.txt - -for d in $(go list ./... | grep -v vendor); do - go test -coverprofile=profile.out -coverpkg=github.com/modern-go/concurrent $d - if [ -f profile.out ]; then - cat profile.out >> coverage.txt - rm profile.out - fi -done diff --git a/vendor/github.com/modern-go/concurrent/unbounded_executor_test.go b/vendor/github.com/modern-go/concurrent/unbounded_executor_test.go deleted file mode 100644 index fe86e84a..00000000 --- a/vendor/github.com/modern-go/concurrent/unbounded_executor_test.go +++ /dev/null @@ -1,54 +0,0 @@ -package concurrent_test - -import ( - "context" - "fmt" - "time" - "github.com/modern-go/concurrent" -) - -func ExampleUnboundedExecutor_Go() { - executor := concurrent.NewUnboundedExecutor() - executor.Go(func(ctx context.Context) { - fmt.Println("abc") - }) - time.Sleep(time.Second) - // output: abc -} - -func ExampleUnboundedExecutor_StopAndWaitForever() { - executor := concurrent.NewUnboundedExecutor() - executor.Go(func(ctx context.Context) { - everyMillisecond := time.NewTicker(time.Millisecond) - for { - select { - case <-ctx.Done(): - fmt.Println("goroutine exited") - return - case <-everyMillisecond.C: - // do something - } - } - }) - time.Sleep(time.Second) - executor.StopAndWaitForever() - fmt.Println("executor stopped") - // output: - // goroutine exited - // executor stopped -} - -func ExampleUnboundedExecutor_Go_panic() { - concurrent.HandlePanic = func(recovered interface{}, funcName string) { - fmt.Println(funcName) - } - executor := concurrent.NewUnboundedExecutor() - executor.Go(willPanic) - time.Sleep(time.Second) - // output: - // github.com/modern-go/concurrent_test.willPanic -} - -func willPanic(ctx context.Context) { - panic("!!!") -} diff --git a/vendor/github.com/modern-go/reflect2/.gitignore b/vendor/github.com/modern-go/reflect2/.gitignore deleted file mode 100644 index 7b26c946..00000000 --- a/vendor/github.com/modern-go/reflect2/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/vendor -/coverage.txt diff --git a/vendor/github.com/modern-go/reflect2/.travis.yml b/vendor/github.com/modern-go/reflect2/.travis.yml deleted file mode 100644 index fbb43744..00000000 --- a/vendor/github.com/modern-go/reflect2/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: go - -go: - - 1.8.x - - 1.x - -before_install: - - go get -t -v ./... - - go get -t -v github.com/modern-go/reflect2-tests/... - -script: - - ./test.sh - -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/modern-go/reflect2/Gopkg.lock b/vendor/github.com/modern-go/reflect2/Gopkg.lock deleted file mode 100644 index 2a3a6989..00000000 --- a/vendor/github.com/modern-go/reflect2/Gopkg.lock +++ /dev/null @@ -1,15 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - name = "github.com/modern-go/concurrent" - packages = ["."] - revision = "e0a39a4cb4216ea8db28e22a69f4ec25610d513a" - version = "1.0.0" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - inputs-digest = "daee8a88b3498b61c5640056665b8b9eea062006f5e596bbb6a3ed9119a11ec7" - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/vendor/github.com/modern-go/reflect2/Gopkg.toml b/vendor/github.com/modern-go/reflect2/Gopkg.toml deleted file mode 100644 index 2f4f4dbd..00000000 --- a/vendor/github.com/modern-go/reflect2/Gopkg.toml +++ /dev/null @@ -1,35 +0,0 @@ -# Gopkg.toml example -# -# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" -# -# [prune] -# non-go = false -# go-tests = true -# unused-packages = true - -ignored = [] - -[[constraint]] - name = "github.com/modern-go/concurrent" - version = "1.0.0" - -[prune] - go-tests = true - unused-packages = true diff --git a/vendor/github.com/modern-go/reflect2/README.md b/vendor/github.com/modern-go/reflect2/README.md deleted file mode 100644 index 6f968aab..00000000 --- a/vendor/github.com/modern-go/reflect2/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# reflect2 - -[![Sourcegraph](https://sourcegraph.com/github.com/modern-go/reflect2/-/badge.svg)](https://sourcegraph.com/github.com/modern-go/reflect2?badge) -[![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](http://godoc.org/github.com/modern-go/reflect2) -[![Build Status](https://travis-ci.org/modern-go/reflect2.svg?branch=master)](https://travis-ci.org/modern-go/reflect2) -[![codecov](https://codecov.io/gh/modern-go/reflect2/branch/master/graph/badge.svg)](https://codecov.io/gh/modern-go/reflect2) -[![rcard](https://goreportcard.com/badge/github.com/modern-go/reflect2)](https://goreportcard.com/report/github.com/modern-go/reflect2) -[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://raw.githubusercontent.com/modern-go/reflect2/master/LICENSE) - -reflect api that avoids runtime reflect.Value cost - -* reflect get/set interface{}, with type checking -* reflect get/set unsafe.Pointer, without type checking -* `reflect2.TypeByName` works like `Class.forName` found in java - -[json-iterator](https://github.com/json-iterator/go) use this package to save runtime dispatching cost. -This package is designed for low level libraries to optimize reflection performance. -General application should still use reflect standard library. - -# reflect2.TypeByName - -```go -// given package is github.com/your/awesome-package -type MyStruct struct { - // ... -} - -// will return the type -reflect2.TypeByName("awesome-package.MyStruct") -// however, if the type has not been used -// it will be eliminated by compiler, so we can not get it in runtime -``` - -# reflect2 get/set interface{} - -```go -valType := reflect2.TypeOf(1) -i := 1 -j := 10 -valType.Set(&i, &j) -// i will be 10 -``` - -to get set `type`, always use its pointer `*type` - -# reflect2 get/set unsafe.Pointer - -```go -valType := reflect2.TypeOf(1) -i := 1 -j := 10 -valType.UnsafeSet(unsafe.Pointer(&i), unsafe.Pointer(&j)) -// i will be 10 -``` - -to get set `type`, always use its pointer `*type` - -# benchmark - -Benchmark is not necessary for this package. It does nothing actually. -As it is just a thin wrapper to make go runtime public. -Both `reflect2` and `reflect` call same function -provided by `runtime` package exposed by go language. - -# unsafe safety - -Instead of casting `[]byte` to `sliceHeader` in your application using unsafe. -We can use reflect2 instead. This way, if `sliceHeader` changes in the future, -only reflect2 need to be upgraded. - -reflect2 tries its best to keep the implementation same as reflect (by testing). \ No newline at end of file diff --git a/vendor/github.com/modern-go/reflect2/test.sh b/vendor/github.com/modern-go/reflect2/test.sh deleted file mode 100755 index 3d2b9768..00000000 --- a/vendor/github.com/modern-go/reflect2/test.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -e -echo "" > coverage.txt - -for d in $(go list github.com/modern-go/reflect2-tests/... | grep -v vendor); do - go test -coverprofile=profile.out -coverpkg=github.com/modern-go/reflect2 $d - if [ -f profile.out ]; then - cat profile.out >> coverage.txt - rm profile.out - fi -done diff --git a/vendor/github.com/petar/GoLLRB/.gitignore b/vendor/github.com/petar/GoLLRB/.gitignore deleted file mode 100644 index e333b2db..00000000 --- a/vendor/github.com/petar/GoLLRB/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -syntax:glob -*.[568ao] -*.ao -*.so -*.pyc -*.swp -*.swo -._* -.nfs.* -[568a].out -*~ -*.orig -*.pb.go -core -_obj -_test -src/pkg/Make.deps -_testmain.go - -syntax:regexp -^pkg/ -^src/cmd/(.*)/6?\1$ -^.*/core.[0-9]*$ diff --git a/vendor/github.com/petar/GoLLRB/README.md b/vendor/github.com/petar/GoLLRB/README.md deleted file mode 100644 index 742ca0bd..00000000 --- a/vendor/github.com/petar/GoLLRB/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# GoLLRB - -GoLLRB is a Left-Leaning Red-Black (LLRB) implementation of 2-3 balanced binary -search trees in Go Language. - -## Overview - -As of this writing and to the best of the author's knowledge, -Go still does not have a balanced binary search tree (BBST) data structure. -These data structures are quite useful in a variety of cases. A BBST maintains -elements in sorted order under dynamic updates (inserts and deletes) and can -support various order-specific queries. Furthermore, in practice one often -implements other common data structures like Priority Queues, using BBST's. - -2-3 trees (a type of BBST's), as well as the runtime-similar 2-3-4 trees, are -the de facto standard BBST algoritms found in implementations of Python, Java, -and other libraries. The LLRB method of implementing 2-3 trees is a recent -improvement over the traditional implementation. The LLRB approach was -discovered relatively recently (in 2008) by Robert Sedgewick of Princeton -University. - -GoLLRB is a Go implementation of LLRB 2-3 trees. - -## Maturity - -GoLLRB has been used in some pretty heavy-weight machine learning tasks over many gigabytes of data. -I consider it to be in stable, perhaps even production, shape. There are no known bugs. - -## Installation - -With a healthy Go Language installed, simply run `go get github.com/petar/GoLLRB/llrb` - -## Example - - package main - - import ( - "fmt" - "github.com/petar/GoLLRB/llrb" - ) - - func lessInt(a, b interface{}) bool { return a.(int) < b.(int) } - - func main() { - tree := llrb.New(lessInt) - tree.ReplaceOrInsert(1) - tree.ReplaceOrInsert(2) - tree.ReplaceOrInsert(3) - tree.ReplaceOrInsert(4) - tree.DeleteMin() - tree.Delete(4) - c := tree.IterAscend() - for { - u := <-c - if u == nil { - break - } - fmt.Printf("%d\n", int(u.(int))) - } - } - -## About - -GoLLRB was written by [Petar Maymounkov](http://pdos.csail.mit.edu/~petar/). - -Follow me on [Twitter @maymounkov](http://www.twitter.com/maymounkov)! diff --git a/vendor/github.com/petar/GoLLRB/llrb/iterator_test.go b/vendor/github.com/petar/GoLLRB/llrb/iterator_test.go deleted file mode 100644 index db5e12c9..00000000 --- a/vendor/github.com/petar/GoLLRB/llrb/iterator_test.go +++ /dev/null @@ -1,76 +0,0 @@ -package llrb - -import ( - "reflect" - "testing" -) - -func TestAscendGreaterOrEqual(t *testing.T) { - tree := New() - tree.InsertNoReplace(Int(4)) - tree.InsertNoReplace(Int(6)) - tree.InsertNoReplace(Int(1)) - tree.InsertNoReplace(Int(3)) - var ary []Item - tree.AscendGreaterOrEqual(Int(-1), func(i Item) bool { - ary = append(ary, i) - return true - }) - expected := []Item{Int(1), Int(3), Int(4), Int(6)} - if !reflect.DeepEqual(ary, expected) { - t.Errorf("expected %v but got %v", expected, ary) - } - ary = nil - tree.AscendGreaterOrEqual(Int(3), func(i Item) bool { - ary = append(ary, i) - return true - }) - expected = []Item{Int(3), Int(4), Int(6)} - if !reflect.DeepEqual(ary, expected) { - t.Errorf("expected %v but got %v", expected, ary) - } - ary = nil - tree.AscendGreaterOrEqual(Int(2), func(i Item) bool { - ary = append(ary, i) - return true - }) - expected = []Item{Int(3), Int(4), Int(6)} - if !reflect.DeepEqual(ary, expected) { - t.Errorf("expected %v but got %v", expected, ary) - } -} - -func TestDescendLessOrEqual(t *testing.T) { - tree := New() - tree.InsertNoReplace(Int(4)) - tree.InsertNoReplace(Int(6)) - tree.InsertNoReplace(Int(1)) - tree.InsertNoReplace(Int(3)) - var ary []Item - tree.DescendLessOrEqual(Int(10), func(i Item) bool { - ary = append(ary, i) - return true - }) - expected := []Item{Int(6), Int(4), Int(3), Int(1)} - if !reflect.DeepEqual(ary, expected) { - t.Errorf("expected %v but got %v", expected, ary) - } - ary = nil - tree.DescendLessOrEqual(Int(4), func(i Item) bool { - ary = append(ary, i) - return true - }) - expected = []Item{Int(4), Int(3), Int(1)} - if !reflect.DeepEqual(ary, expected) { - t.Errorf("expected %v but got %v", expected, ary) - } - ary = nil - tree.DescendLessOrEqual(Int(5), func(i Item) bool { - ary = append(ary, i) - return true - }) - expected = []Item{Int(4), Int(3), Int(1)} - if !reflect.DeepEqual(ary, expected) { - t.Errorf("expected %v but got %v", expected, ary) - } -} diff --git a/vendor/github.com/petar/GoLLRB/llrb/llrb_test.go b/vendor/github.com/petar/GoLLRB/llrb/llrb_test.go deleted file mode 100644 index b7bc9780..00000000 --- a/vendor/github.com/petar/GoLLRB/llrb/llrb_test.go +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright 2010 Petar Maymounkov. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package llrb - -import ( - "math" - "math/rand" - "testing" -) - -func TestCases(t *testing.T) { - tree := New() - tree.ReplaceOrInsert(Int(1)) - tree.ReplaceOrInsert(Int(1)) - if tree.Len() != 1 { - t.Errorf("expecting len 1") - } - if !tree.Has(Int(1)) { - t.Errorf("expecting to find key=1") - } - - tree.Delete(Int(1)) - if tree.Len() != 0 { - t.Errorf("expecting len 0") - } - if tree.Has(Int(1)) { - t.Errorf("not expecting to find key=1") - } - - tree.Delete(Int(1)) - if tree.Len() != 0 { - t.Errorf("expecting len 0") - } - if tree.Has(Int(1)) { - t.Errorf("not expecting to find key=1") - } -} - -func TestReverseInsertOrder(t *testing.T) { - tree := New() - n := 100 - for i := 0; i < n; i++ { - tree.ReplaceOrInsert(Int(n - i)) - } - i := 0 - tree.AscendGreaterOrEqual(Int(0), func(item Item) bool { - i++ - if item.(Int) != Int(i) { - t.Errorf("bad order: got %d, expect %d", item.(Int), i) - } - return true - }) -} - -func TestRange(t *testing.T) { - tree := New() - order := []String{ - "ab", "aba", "abc", "a", "aa", "aaa", "b", "a-", "a!", - } - for _, i := range order { - tree.ReplaceOrInsert(i) - } - k := 0 - tree.AscendRange(String("ab"), String("ac"), func(item Item) bool { - if k > 3 { - t.Fatalf("returned more items than expected") - } - i1 := order[k] - i2 := item.(String) - if i1 != i2 { - t.Errorf("expecting %s, got %s", i1, i2) - } - k++ - return true - }) -} - -func TestRandomInsertOrder(t *testing.T) { - tree := New() - n := 1000 - perm := rand.Perm(n) - for i := 0; i < n; i++ { - tree.ReplaceOrInsert(Int(perm[i])) - } - j := 0 - tree.AscendGreaterOrEqual(Int(0), func(item Item) bool { - if item.(Int) != Int(j) { - t.Fatalf("bad order") - } - j++ - return true - }) -} - -func TestRandomReplace(t *testing.T) { - tree := New() - n := 100 - perm := rand.Perm(n) - for i := 0; i < n; i++ { - tree.ReplaceOrInsert(Int(perm[i])) - } - perm = rand.Perm(n) - for i := 0; i < n; i++ { - if replaced := tree.ReplaceOrInsert(Int(perm[i])); replaced == nil || replaced.(Int) != Int(perm[i]) { - t.Errorf("error replacing") - } - } -} - -func TestRandomInsertSequentialDelete(t *testing.T) { - tree := New() - n := 1000 - perm := rand.Perm(n) - for i := 0; i < n; i++ { - tree.ReplaceOrInsert(Int(perm[i])) - } - for i := 0; i < n; i++ { - tree.Delete(Int(i)) - } -} - -func TestRandomInsertDeleteNonExistent(t *testing.T) { - tree := New() - n := 100 - perm := rand.Perm(n) - for i := 0; i < n; i++ { - tree.ReplaceOrInsert(Int(perm[i])) - } - if tree.Delete(Int(200)) != nil { - t.Errorf("deleted non-existent item") - } - if tree.Delete(Int(-2)) != nil { - t.Errorf("deleted non-existent item") - } - for i := 0; i < n; i++ { - if u := tree.Delete(Int(i)); u == nil || u.(Int) != Int(i) { - t.Errorf("delete failed") - } - } - if tree.Delete(Int(200)) != nil { - t.Errorf("deleted non-existent item") - } - if tree.Delete(Int(-2)) != nil { - t.Errorf("deleted non-existent item") - } -} - -func TestRandomInsertPartialDeleteOrder(t *testing.T) { - tree := New() - n := 100 - perm := rand.Perm(n) - for i := 0; i < n; i++ { - tree.ReplaceOrInsert(Int(perm[i])) - } - for i := 1; i < n-1; i++ { - tree.Delete(Int(i)) - } - j := 0 - tree.AscendGreaterOrEqual(Int(0), func(item Item) bool { - switch j { - case 0: - if item.(Int) != Int(0) { - t.Errorf("expecting 0") - } - case 1: - if item.(Int) != Int(n-1) { - t.Errorf("expecting %d", n-1) - } - } - j++ - return true - }) -} - -func TestRandomInsertStats(t *testing.T) { - tree := New() - n := 100000 - perm := rand.Perm(n) - for i := 0; i < n; i++ { - tree.ReplaceOrInsert(Int(perm[i])) - } - avg, _ := tree.HeightStats() - expAvg := math.Log2(float64(n)) - 1.5 - if math.Abs(avg-expAvg) >= 2.0 { - t.Errorf("too much deviation from expected average height") - } -} - -func BenchmarkInsert(b *testing.B) { - tree := New() - for i := 0; i < b.N; i++ { - tree.ReplaceOrInsert(Int(b.N - i)) - } -} - -func BenchmarkDelete(b *testing.B) { - b.StopTimer() - tree := New() - for i := 0; i < b.N; i++ { - tree.ReplaceOrInsert(Int(b.N - i)) - } - b.StartTimer() - for i := 0; i < b.N; i++ { - tree.Delete(Int(i)) - } -} - -func BenchmarkDeleteMin(b *testing.B) { - b.StopTimer() - tree := New() - for i := 0; i < b.N; i++ { - tree.ReplaceOrInsert(Int(b.N - i)) - } - b.StartTimer() - for i := 0; i < b.N; i++ { - tree.DeleteMin() - } -} - -func TestInsertNoReplace(t *testing.T) { - tree := New() - n := 1000 - for q := 0; q < 2; q++ { - perm := rand.Perm(n) - for i := 0; i < n; i++ { - tree.InsertNoReplace(Int(perm[i])) - } - } - j := 0 - tree.AscendGreaterOrEqual(Int(0), func(item Item) bool { - if item.(Int) != Int(j/2) { - t.Fatalf("bad order") - } - j++ - return true - }) -} diff --git a/vendor/github.com/peterbourgon/diskv/README.md b/vendor/github.com/peterbourgon/diskv/README.md deleted file mode 100644 index 3474739e..00000000 --- a/vendor/github.com/peterbourgon/diskv/README.md +++ /dev/null @@ -1,141 +0,0 @@ -# What is diskv? - -Diskv (disk-vee) is a simple, persistent key-value store written in the Go -language. It starts with an incredibly simple API for storing arbitrary data on -a filesystem by key, and builds several layers of performance-enhancing -abstraction on top. The end result is a conceptually simple, but highly -performant, disk-backed storage system. - -[![Build Status][1]][2] - -[1]: https://drone.io/github.com/peterbourgon/diskv/status.png -[2]: https://drone.io/github.com/peterbourgon/diskv/latest - - -# Installing - -Install [Go 1][3], either [from source][4] or [with a prepackaged binary][5]. -Then, - -```bash -$ go get github.com/peterbourgon/diskv -``` - -[3]: http://golang.org -[4]: http://golang.org/doc/install/source -[5]: http://golang.org/doc/install - - -# Usage - -```go -package main - -import ( - "fmt" - "github.com/peterbourgon/diskv" -) - -func main() { - // Simplest transform function: put all the data files into the base dir. - flatTransform := func(s string) []string { return []string{} } - - // Initialize a new diskv store, rooted at "my-data-dir", with a 1MB cache. - d := diskv.New(diskv.Options{ - BasePath: "my-data-dir", - Transform: flatTransform, - CacheSizeMax: 1024 * 1024, - }) - - // Write three bytes to the key "alpha". - key := "alpha" - d.Write(key, []byte{'1', '2', '3'}) - - // Read the value back out of the store. - value, _ := d.Read(key) - fmt.Printf("%v\n", value) - - // Erase the key+value from the store (and the disk). - d.Erase(key) -} -``` - -More complex examples can be found in the "examples" subdirectory. - - -# Theory - -## Basic idea - -At its core, diskv is a map of a key (`string`) to arbitrary data (`[]byte`). -The data is written to a single file on disk, with the same name as the key. -The key determines where that file will be stored, via a user-provided -`TransformFunc`, which takes a key and returns a slice (`[]string`) -corresponding to a path list where the key file will be stored. The simplest -TransformFunc, - -```go -func SimpleTransform (key string) []string { - return []string{} -} -``` - -will place all keys in the same, base directory. The design is inspired by -[Redis diskstore][6]; a TransformFunc which emulates the default diskstore -behavior is available in the content-addressable-storage example. - -[6]: http://groups.google.com/group/redis-db/browse_thread/thread/d444bc786689bde9?pli=1 - -**Note** that your TransformFunc should ensure that one valid key doesn't -transform to a subset of another valid key. That is, it shouldn't be possible -to construct valid keys that resolve to directory names. As a concrete example, -if your TransformFunc splits on every 3 characters, then - -```go -d.Write("abcabc", val) // OK: written to /abc/abc/abcabc -d.Write("abc", val) // Error: attempted write to /abc/abc, but it's a directory -``` - -This will be addressed in an upcoming version of diskv. - -Probably the most important design principle behind diskv is that your data is -always flatly available on the disk. diskv will never do anything that would -prevent you from accessing, copying, backing up, or otherwise interacting with -your data via common UNIX commandline tools. - -## Adding a cache - -An in-memory caching layer is provided by combining the BasicStore -functionality with a simple map structure, and keeping it up-to-date as -appropriate. Since the map structure in Go is not threadsafe, it's combined -with a RWMutex to provide safe concurrent access. - -## Adding order - -diskv is a key-value store and therefore inherently unordered. An ordering -system can be injected into the store by passing something which satisfies the -diskv.Index interface. (A default implementation, using Google's -[btree][7] package, is provided.) Basically, diskv keeps an ordered (by a -user-provided Less function) index of the keys, which can be queried. - -[7]: https://github.com/google/btree - -## Adding compression - -Something which implements the diskv.Compression interface may be passed -during store creation, so that all Writes and Reads are filtered through -a compression/decompression pipeline. Several default implementations, -using stdlib compression algorithms, are provided. Note that data is cached -compressed; the cost of decompression is borne with each Read. - -## Streaming - -diskv also now provides ReadStream and WriteStream methods, to allow very large -data to be handled efficiently. - - -# Future plans - - * Needs plenty of robust testing: huge datasets, etc... - * More thorough benchmarking - * Your suggestions for use-cases I haven't thought of diff --git a/vendor/github.com/peterbourgon/diskv/basic_test.go b/vendor/github.com/peterbourgon/diskv/basic_test.go deleted file mode 100644 index 0ef0b17f..00000000 --- a/vendor/github.com/peterbourgon/diskv/basic_test.go +++ /dev/null @@ -1,336 +0,0 @@ -package diskv - -import ( - "bytes" - "errors" - "testing" - "time" -) - -func cmpBytes(a, b []byte) bool { - if len(a) != len(b) { - return false - } - for i := 0; i < len(a); i++ { - if a[i] != b[i] { - return false - } - } - return true -} - -func (d *Diskv) isCached(key string) bool { - d.mu.RLock() - defer d.mu.RUnlock() - _, ok := d.cache[key] - return ok -} - -func TestWriteReadErase(t *testing.T) { - d := New(Options{ - BasePath: "test-data", - CacheSizeMax: 1024, - }) - defer d.EraseAll() - k, v := "a", []byte{'b'} - if err := d.Write(k, v); err != nil { - t.Fatalf("write: %s", err) - } - if readVal, err := d.Read(k); err != nil { - t.Fatalf("read: %s", err) - } else if bytes.Compare(v, readVal) != 0 { - t.Fatalf("read: expected %s, got %s", v, readVal) - } - if err := d.Erase(k); err != nil { - t.Fatalf("erase: %s", err) - } -} - -func TestWRECache(t *testing.T) { - d := New(Options{ - BasePath: "test-data", - CacheSizeMax: 1024, - }) - defer d.EraseAll() - k, v := "xxx", []byte{' ', ' ', ' '} - if d.isCached(k) { - t.Fatalf("key cached before Write and Read") - } - if err := d.Write(k, v); err != nil { - t.Fatalf("write: %s", err) - } - if d.isCached(k) { - t.Fatalf("key cached before Read") - } - if readVal, err := d.Read(k); err != nil { - t.Fatalf("read: %s", err) - } else if bytes.Compare(v, readVal) != 0 { - t.Fatalf("read: expected %s, got %s", v, readVal) - } - for i := 0; i < 10 && !d.isCached(k); i++ { - time.Sleep(10 * time.Millisecond) - } - if !d.isCached(k) { - t.Fatalf("key not cached after Read") - } - if err := d.Erase(k); err != nil { - t.Fatalf("erase: %s", err) - } - if d.isCached(k) { - t.Fatalf("key cached after Erase") - } -} - -func TestStrings(t *testing.T) { - d := New(Options{ - BasePath: "test-data", - CacheSizeMax: 1024, - }) - defer d.EraseAll() - - keys := map[string]bool{"a": false, "b": false, "c": false, "d": false} - v := []byte{'1'} - for k := range keys { - if err := d.Write(k, v); err != nil { - t.Fatalf("write: %s: %s", k, err) - } - } - - for k := range d.Keys(nil) { - if _, present := keys[k]; present { - t.Logf("got: %s", k) - keys[k] = true - } else { - t.Fatalf("strings() returns unknown key: %s", k) - } - } - - for k, found := range keys { - if !found { - t.Errorf("never got %s", k) - } - } -} - -func TestZeroByteCache(t *testing.T) { - d := New(Options{ - BasePath: "test-data", - CacheSizeMax: 0, - }) - defer d.EraseAll() - - k, v := "a", []byte{'1', '2', '3'} - if err := d.Write(k, v); err != nil { - t.Fatalf("Write: %s", err) - } - - if d.isCached(k) { - t.Fatalf("key cached, expected not-cached") - } - - if _, err := d.Read(k); err != nil { - t.Fatalf("Read: %s", err) - } - - if d.isCached(k) { - t.Fatalf("key cached, expected not-cached") - } -} - -func TestOneByteCache(t *testing.T) { - d := New(Options{ - BasePath: "test-data", - CacheSizeMax: 1, - }) - defer d.EraseAll() - - k1, k2, v1, v2 := "a", "b", []byte{'1'}, []byte{'1', '2'} - if err := d.Write(k1, v1); err != nil { - t.Fatal(err) - } - - if v, err := d.Read(k1); err != nil { - t.Fatal(err) - } else if !cmpBytes(v, v1) { - t.Fatalf("Read: expected %s, got %s", string(v1), string(v)) - } - - for i := 0; i < 10 && !d.isCached(k1); i++ { - time.Sleep(10 * time.Millisecond) - } - if !d.isCached(k1) { - t.Fatalf("expected 1-byte value to be cached, but it wasn't") - } - - if err := d.Write(k2, v2); err != nil { - t.Fatal(err) - } - if _, err := d.Read(k2); err != nil { - t.Fatalf("--> %s", err) - } - - for i := 0; i < 10 && (!d.isCached(k1) || d.isCached(k2)); i++ { - time.Sleep(10 * time.Millisecond) // just wait for lazy-cache - } - if !d.isCached(k1) { - t.Fatalf("1-byte value was uncached for no reason") - } - - if d.isCached(k2) { - t.Fatalf("2-byte value was cached, but cache max size is 1") - } -} - -func TestStaleCache(t *testing.T) { - d := New(Options{ - BasePath: "test-data", - CacheSizeMax: 1, - }) - defer d.EraseAll() - - k, first, second := "a", "first", "second" - if err := d.Write(k, []byte(first)); err != nil { - t.Fatal(err) - } - - v, err := d.Read(k) - if err != nil { - t.Fatal(err) - } - if string(v) != first { - t.Errorf("expected '%s', got '%s'", first, v) - } - - if err := d.Write(k, []byte(second)); err != nil { - t.Fatal(err) - } - - v, err = d.Read(k) - if err != nil { - t.Fatal(err) - } - - if string(v) != second { - t.Errorf("expected '%s', got '%s'", second, v) - } -} - -func TestHas(t *testing.T) { - d := New(Options{ - BasePath: "test-data", - CacheSizeMax: 1024, - }) - defer d.EraseAll() - - for k, v := range map[string]string{ - "a": "1", - "foo": "2", - "012345": "3", - } { - d.Write(k, []byte(v)) - } - - d.Read("foo") // cache one of them - if !d.isCached("foo") { - t.Errorf("'foo' didn't get cached") - } - - for _, tuple := range []struct { - key string - expected bool - }{ - {"a", true}, - {"b", false}, - {"foo", true}, - {"bar", false}, - {"01234", false}, - {"012345", true}, - {"0123456", false}, - } { - if expected, got := tuple.expected, d.Has(tuple.key); expected != got { - t.Errorf("Has(%s): expected %v, got %v", tuple.key, expected, got) - } - } -} - -type BrokenReader struct{} - -func (BrokenReader) Read(p []byte) (n int, err error) { - return 0, errors.New("failed to read") -} - -func TestRemovesIncompleteFiles(t *testing.T) { - opts := Options{ - BasePath: "test-data", - CacheSizeMax: 1024, - } - d := New(opts) - defer d.EraseAll() - - key, stream, sync := "key", BrokenReader{}, false - - if err := d.WriteStream(key, stream, sync); err == nil { - t.Fatalf("Expected i/o copy error, none received.") - } - - if _, err := d.Read(key); err == nil { - t.Fatal("Could read the key, but it shouldn't exist") - } -} - -func TestTempDir(t *testing.T) { - opts := Options{ - BasePath: "test-data", - TempDir: "test-data-temp", - CacheSizeMax: 1024, - } - d := New(opts) - defer d.EraseAll() - - k, v := "a", []byte{'b'} - if err := d.Write(k, v); err != nil { - t.Fatalf("write: %s", err) - } - if readVal, err := d.Read(k); err != nil { - t.Fatalf("read: %s", err) - } else if bytes.Compare(v, readVal) != 0 { - t.Fatalf("read: expected %s, got %s", v, readVal) - } - if err := d.Erase(k); err != nil { - t.Fatalf("erase: %s", err) - } -} - -type CrashingReader struct{} - -func (CrashingReader) Read(p []byte) (n int, err error) { - panic("System has crashed while reading the stream") -} - -func TestAtomicWrite(t *testing.T) { - opts := Options{ - BasePath: "test-data", - // Test would fail if TempDir is not set here. - TempDir: "test-data-temp", - CacheSizeMax: 1024, - } - d := New(opts) - defer d.EraseAll() - - key := "key" - func() { - defer func() { - recover() // Ignore panicking error - }() - - stream := CrashingReader{} - d.WriteStream(key, stream, false) - }() - - if d.Has(key) { - t.Fatal("Has key, but it shouldn't exist") - } - if _, ok := <-d.Keys(nil); ok { - t.Fatal("Store isn't empty") - } -} diff --git a/vendor/github.com/peterbourgon/diskv/compression_test.go b/vendor/github.com/peterbourgon/diskv/compression_test.go deleted file mode 100644 index 2d614203..00000000 --- a/vendor/github.com/peterbourgon/diskv/compression_test.go +++ /dev/null @@ -1,72 +0,0 @@ -package diskv - -import ( - "compress/flate" - "fmt" - "math/rand" - "os" - "testing" - "time" -) - -func init() { - rand.Seed(time.Now().UnixNano()) -} - -func testCompressionWith(t *testing.T, c Compression, name string) { - d := New(Options{ - BasePath: "compression-test", - CacheSizeMax: 0, - Compression: c, - }) - defer d.EraseAll() - - sz := 4096 - val := make([]byte, sz) - for i := 0; i < sz; i++ { - val[i] = byte('a' + rand.Intn(26)) // {a-z}; should compress some - } - - key := "a" - if err := d.Write(key, val); err != nil { - t.Fatalf("write failed: %s", err) - } - - targetFile := fmt.Sprintf("%s%c%s", d.BasePath, os.PathSeparator, key) - fi, err := os.Stat(targetFile) - if err != nil { - t.Fatalf("%s: %s", targetFile, err) - } - - if fi.Size() >= int64(sz) { - t.Fatalf("%s: size=%d, expected smaller", targetFile, fi.Size()) - } - t.Logf("%s compressed %d to %d", name, sz, fi.Size()) - - readVal, err := d.Read(key) - if len(readVal) != sz { - t.Fatalf("read: expected size=%d, got size=%d", sz, len(readVal)) - } - - for i := 0; i < sz; i++ { - if readVal[i] != val[i] { - t.Fatalf("i=%d: expected %v, got %v", i, val[i], readVal[i]) - } - } -} - -func TestGzipDefault(t *testing.T) { - testCompressionWith(t, NewGzipCompression(), "gzip") -} - -func TestGzipBestCompression(t *testing.T) { - testCompressionWith(t, NewGzipCompressionLevel(flate.BestCompression), "gzip-max") -} - -func TestGzipBestSpeed(t *testing.T) { - testCompressionWith(t, NewGzipCompressionLevel(flate.BestSpeed), "gzip-min") -} - -func TestZlib(t *testing.T) { - testCompressionWith(t, NewZlibCompression(), "zlib") -} diff --git a/vendor/github.com/peterbourgon/diskv/import_test.go b/vendor/github.com/peterbourgon/diskv/import_test.go deleted file mode 100644 index a08ac7c7..00000000 --- a/vendor/github.com/peterbourgon/diskv/import_test.go +++ /dev/null @@ -1,76 +0,0 @@ -package diskv_test - -import ( - "bytes" - "io/ioutil" - "os" - - "github.com/peterbourgon/diskv" - - "testing" -) - -func TestImportMove(t *testing.T) { - b := []byte(`0123456789`) - f, err := ioutil.TempFile("", "temp-test") - if err != nil { - t.Fatal(err) - } - if _, err := f.Write(b); err != nil { - t.Fatal(err) - } - f.Close() - - d := diskv.New(diskv.Options{ - BasePath: "test-import-move", - }) - defer d.EraseAll() - - key := "key" - - if err := d.Write(key, []byte(`TBD`)); err != nil { - t.Fatal(err) - } - - if err := d.Import(f.Name(), key, true); err != nil { - t.Fatal(err) - } - - if _, err := os.Stat(f.Name()); err == nil || !os.IsNotExist(err) { - t.Errorf("expected temp file to be gone, but err = %v", err) - } - - if !d.Has(key) { - t.Errorf("%q not present", key) - } - - if buf, err := d.Read(key); err != nil || bytes.Compare(b, buf) != 0 { - t.Errorf("want %q, have %q (err = %v)", string(b), string(buf), err) - } -} - -func TestImportCopy(t *testing.T) { - b := []byte(`¡åéîòü!`) - - f, err := ioutil.TempFile("", "temp-test") - if err != nil { - t.Fatal(err) - } - if _, err := f.Write(b); err != nil { - t.Fatal(err) - } - f.Close() - - d := diskv.New(diskv.Options{ - BasePath: "test-import-copy", - }) - defer d.EraseAll() - - if err := d.Import(f.Name(), "key", false); err != nil { - t.Fatal(err) - } - - if _, err := os.Stat(f.Name()); err != nil { - t.Errorf("expected temp file to remain, but got err = %v", err) - } -} diff --git a/vendor/github.com/peterbourgon/diskv/index_test.go b/vendor/github.com/peterbourgon/diskv/index_test.go deleted file mode 100644 index 72f52a9f..00000000 --- a/vendor/github.com/peterbourgon/diskv/index_test.go +++ /dev/null @@ -1,148 +0,0 @@ -package diskv - -import ( - "bytes" - "reflect" - "testing" - "time" -) - -func strLess(a, b string) bool { return a < b } - -func cmpStrings(a, b []string) bool { - if len(a) != len(b) { - return false - } - for i := 0; i < len(a); i++ { - if a[i] != b[i] { - return false - } - } - return true -} - -func (d *Diskv) isIndexed(key string) bool { - if d.Index == nil { - return false - } - - for _, got := range d.Index.Keys("", 1000) { - if got == key { - return true - } - } - return false -} - -func TestIndexOrder(t *testing.T) { - d := New(Options{ - BasePath: "index-test", - Transform: func(string) []string { return []string{} }, - CacheSizeMax: 1024, - Index: &BTreeIndex{}, - IndexLess: strLess, - }) - defer d.EraseAll() - - v := []byte{'1', '2', '3'} - d.Write("a", v) - if !d.isIndexed("a") { - t.Fatalf("'a' not indexed after write") - } - d.Write("1", v) - d.Write("m", v) - d.Write("-", v) - d.Write("A", v) - - expectedKeys := []string{"-", "1", "A", "a", "m"} - keys := []string{} - for _, key := range d.Index.Keys("", 100) { - keys = append(keys, key) - } - - if !cmpStrings(keys, expectedKeys) { - t.Fatalf("got %s, expected %s", keys, expectedKeys) - } -} - -func TestIndexLoad(t *testing.T) { - d1 := New(Options{ - BasePath: "index-test", - Transform: func(string) []string { return []string{} }, - CacheSizeMax: 1024, - }) - defer d1.EraseAll() - - val := []byte{'1', '2', '3'} - keys := []string{"a", "b", "c", "d", "e", "f", "g"} - for _, key := range keys { - d1.Write(key, val) - } - - d2 := New(Options{ - BasePath: "index-test", - Transform: func(string) []string { return []string{} }, - CacheSizeMax: 1024, - Index: &BTreeIndex{}, - IndexLess: strLess, - }) - defer d2.EraseAll() - - // check d2 has properly loaded existing d1 data - for _, key := range keys { - if !d2.isIndexed(key) { - t.Fatalf("key '%s' not indexed on secondary", key) - } - } - - // cache one - if readValue, err := d2.Read(keys[0]); err != nil { - t.Fatalf("%s", err) - } else if bytes.Compare(val, readValue) != 0 { - t.Fatalf("%s: got %s, expected %s", keys[0], readValue, val) - } - - // make sure it got cached - for i := 0; i < 10 && !d2.isCached(keys[0]); i++ { - time.Sleep(10 * time.Millisecond) - } - if !d2.isCached(keys[0]) { - t.Fatalf("key '%s' not cached", keys[0]) - } - - // kill the disk - d1.EraseAll() - - // cached value should still be there in the second - if readValue, err := d2.Read(keys[0]); err != nil { - t.Fatalf("%s", err) - } else if bytes.Compare(val, readValue) != 0 { - t.Fatalf("%s: got %s, expected %s", keys[0], readValue, val) - } - - // but not in the original - if _, err := d1.Read(keys[0]); err == nil { - t.Fatalf("expected error reading from flushed store") - } -} - -func TestIndexKeysEmptyFrom(t *testing.T) { - d := New(Options{ - BasePath: "index-test", - Transform: func(string) []string { return []string{} }, - CacheSizeMax: 1024, - Index: &BTreeIndex{}, - IndexLess: strLess, - }) - defer d.EraseAll() - - for _, k := range []string{"a", "c", "z", "b", "x", "b", "y"} { - d.Write(k, []byte("1")) - } - - want := []string{"a", "b", "c", "x", "y", "z"} - have := d.Index.Keys("", 99) - if !reflect.DeepEqual(want, have) { - t.Errorf("want %v, have %v", want, have) - } -} diff --git a/vendor/github.com/peterbourgon/diskv/issues_test.go b/vendor/github.com/peterbourgon/diskv/issues_test.go deleted file mode 100644 index 0b0b1090..00000000 --- a/vendor/github.com/peterbourgon/diskv/issues_test.go +++ /dev/null @@ -1,121 +0,0 @@ -package diskv - -import ( - "bytes" - "io/ioutil" - "sync" - "testing" - "time" -) - -// ReadStream from cache shouldn't panic on a nil dereference from a nonexistent -// Compression :) -func TestIssue2A(t *testing.T) { - d := New(Options{ - BasePath: "test-issue-2a", - Transform: func(string) []string { return []string{} }, - CacheSizeMax: 1024, - }) - defer d.EraseAll() - - input := "abcdefghijklmnopqrstuvwxy" - key, writeBuf, sync := "a", bytes.NewBufferString(input), false - if err := d.WriteStream(key, writeBuf, sync); err != nil { - t.Fatal(err) - } - - for i := 0; i < 2; i++ { - began := time.Now() - rc, err := d.ReadStream(key, false) - if err != nil { - t.Fatal(err) - } - buf, err := ioutil.ReadAll(rc) - if err != nil { - t.Fatal(err) - } - if !cmpBytes(buf, []byte(input)) { - t.Fatalf("read #%d: '%s' != '%s'", i+1, string(buf), input) - } - rc.Close() - t.Logf("read #%d in %s", i+1, time.Since(began)) - } -} - -// ReadStream on a key that resolves to a directory should return an error. -func TestIssue2B(t *testing.T) { - blockTransform := func(s string) []string { - transformBlockSize := 3 - sliceSize := len(s) / transformBlockSize - pathSlice := make([]string, sliceSize) - for i := 0; i < sliceSize; i++ { - from, to := i*transformBlockSize, (i*transformBlockSize)+transformBlockSize - pathSlice[i] = s[from:to] - } - return pathSlice - } - - d := New(Options{ - BasePath: "test-issue-2b", - Transform: blockTransform, - CacheSizeMax: 0, - }) - defer d.EraseAll() - - v := []byte{'1', '2', '3'} - if err := d.Write("abcabc", v); err != nil { - t.Fatal(err) - } - - _, err := d.ReadStream("abc", false) - if err == nil { - t.Fatal("ReadStream('abc') should return error") - } - t.Logf("ReadStream('abc') returned error: %v", err) -} - -// Ensure ReadStream with direct=true isn't racy. -func TestIssue17(t *testing.T) { - var ( - basePath = "test-data" - ) - - dWrite := New(Options{ - BasePath: basePath, - CacheSizeMax: 0, - }) - defer dWrite.EraseAll() - - dRead := New(Options{ - BasePath: basePath, - CacheSizeMax: 50, - }) - - cases := map[string]string{ - "a": `1234567890`, - "b": `2345678901`, - "c": `3456789012`, - "d": `4567890123`, - "e": `5678901234`, - } - - for k, v := range cases { - if err := dWrite.Write(k, []byte(v)); err != nil { - t.Fatalf("during write: %s", err) - } - dRead.Read(k) // ensure it's added to cache - } - - var wg sync.WaitGroup - start := make(chan struct{}) - for k, v := range cases { - wg.Add(1) - go func(k, v string) { - <-start - dRead.ReadStream(k, true) - wg.Done() - }(k, v) - } - close(start) - wg.Wait() -} diff --git a/vendor/github.com/peterbourgon/diskv/keys_test.go b/vendor/github.com/peterbourgon/diskv/keys_test.go deleted file mode 100644 index 222e1c44..00000000 --- a/vendor/github.com/peterbourgon/diskv/keys_test.go +++ /dev/null @@ -1,231 +0,0 @@ -package diskv_test - -import ( - "reflect" - "runtime" - "strings" - "testing" - - "github.com/peterbourgon/diskv" -) - -var ( - keysTestData = map[string]string{ - "ab01cd01": "When we started building CoreOS", - "ab01cd02": "we looked at all the various components available to us", - "ab01cd03": "re-using the best tools", - "ef01gh04": "and building the ones that did not exist", - "ef02gh05": "We believe strongly in the Unix philosophy", - "xxxxxxxx": "tools should be independently useful", - } - - prefixes = []string{ - "", // all - "a", - "ab", - "ab0", - "ab01", - "ab01cd0", - "ab01cd01", - "ab01cd01x", // none - "b", // none - "b0", // none - "0", // none - "01", // none - "e", - "ef", - "efx", // none - "ef01gh0", - "ef01gh04", - "ef01gh05", - "ef01gh06", // none - } -) - -func TestKeysFlat(t *testing.T) { - transform := func(s string) []string { - if s == "" { - t.Fatalf(`transform should not be called with ""`) - } - return []string{} - } - d := diskv.New(diskv.Options{ - BasePath: "test-data", - Transform: transform, - }) - defer d.EraseAll() - - for k, v := range keysTestData { - d.Write(k, []byte(v)) - } - - checkKeys(t, d.Keys(nil), keysTestData) -} - -func TestKeysNested(t *testing.T) { - d := diskv.New(diskv.Options{ - BasePath: "test-data", - Transform: blockTransform(2), - }) - defer d.EraseAll() - - for k, v := range keysTestData { - d.Write(k, []byte(v)) - } - - checkKeys(t, d.Keys(nil), keysTestData) -} - -func TestKeysPrefixFlat(t *testing.T) { - d := diskv.New(diskv.Options{ - BasePath: "test-data", - }) - defer d.EraseAll() - - for k, v := range keysTestData { - d.Write(k, []byte(v)) - } - - for _, prefix := range prefixes { - checkKeys(t, d.KeysPrefix(prefix, nil), filterPrefix(keysTestData, prefix)) - } -} - -func TestKeysPrefixNested(t *testing.T) { - d := diskv.New(diskv.Options{ - BasePath: "test-data", - Transform: blockTransform(2), - }) - defer d.EraseAll() - - for k, v := range keysTestData { - d.Write(k, []byte(v)) - } - - for _, prefix := range prefixes { - checkKeys(t, d.KeysPrefix(prefix, nil), filterPrefix(keysTestData, prefix)) - } -} - -func TestKeysCancel(t *testing.T) { - d := diskv.New(diskv.Options{ - BasePath: "test-data", - }) - defer d.EraseAll() - - for k, v := range keysTestData { - d.Write(k, []byte(v)) - } - - var ( - cancel = make(chan struct{}) - received = 0 - cancelAfter = len(keysTestData) / 2 - ) - - for key := range d.Keys(cancel) { - received++ - - if received >= cancelAfter { - close(cancel) - runtime.Gosched() // allow walker to detect cancel - } - - t.Logf("received %d: %q", received, key) - } - - if want, have := cancelAfter, received; want != have { - t.Errorf("want %d, have %d") - } -} - -func checkKeys(t *testing.T, c <-chan string, want map[string]string) { - for k := range c { - if _, ok := want[k]; !ok { - t.Errorf("%q yielded but not expected", k) - continue - } - - delete(want, k) - t.Logf("%q yielded OK", k) - } - - if len(want) != 0 { - t.Errorf("%d expected key(s) not yielded: %s", len(want), strings.Join(flattenKeys(want), ", ")) - } -} - -func blockTransform(blockSize int) func(string) []string { - return func(s string) []string { - var ( - sliceSize = len(s) / blockSize - pathSlice = make([]string, sliceSize) - ) - for i := 0; i < sliceSize; i++ { - from, to := i*blockSize, (i*blockSize)+blockSize - pathSlice[i] = s[from:to] - } - return pathSlice - } -} - -func filterPrefix(in map[string]string, prefix string) map[string]string { - out := map[string]string{} - for k, v := range in { - if strings.HasPrefix(k, prefix) { - out[k] = v - } - } - return out -} - -func TestFilterPrefix(t *testing.T) { - input := map[string]string{ - "all": "", - "and": "", - "at": "", - "available": "", - "best": "", - "building": "", - "components": "", - "coreos": "", - "did": "", - "exist": "", - "looked": "", - "not": "", - "ones": "", - "re-using": "", - "started": "", - "that": "", - "the": "", - "to": "", - "tools": "", - "us": "", - "various": "", - "we": "", - "when": "", - } - - for prefix, want := range map[string]map[string]string{ - "a": map[string]string{"all": "", "and": "", "at": "", "available": ""}, - "al": map[string]string{"all": ""}, - "all": map[string]string{"all": ""}, - "alll": map[string]string{}, - "c": map[string]string{"components": "", "coreos": ""}, - "co": map[string]string{"components": "", "coreos": ""}, - "com": map[string]string{"components": ""}, - } { - have := filterPrefix(input, prefix) - if !reflect.DeepEqual(want, have) { - t.Errorf("%q: want %v, have %v", prefix, flattenKeys(want), flattenKeys(have)) - } - } -} - -func flattenKeys(m map[string]string) []string { - a := make([]string, 0, len(m)) - for k := range m { - a = append(a, k) - } - return a -} diff --git a/vendor/github.com/peterbourgon/diskv/speed_test.go b/vendor/github.com/peterbourgon/diskv/speed_test.go deleted file mode 100644 index 67d05ff2..00000000 --- a/vendor/github.com/peterbourgon/diskv/speed_test.go +++ /dev/null @@ -1,153 +0,0 @@ -package diskv - -import ( - "fmt" - "math/rand" - "testing" -) - -func shuffle(keys []string) { - ints := rand.Perm(len(keys)) - for i := range keys { - keys[i], keys[ints[i]] = keys[ints[i]], keys[i] - } -} - -func genValue(size int) []byte { - v := make([]byte, size) - for i := 0; i < size; i++ { - v[i] = uint8((rand.Int() % 26) + 97) // a-z - } - return v -} - -const ( - keyCount = 1000 -) - -func genKeys() []string { - keys := make([]string, keyCount) - for i := 0; i < keyCount; i++ { - keys[i] = fmt.Sprintf("%d", i) - } - return keys -} - -func (d *Diskv) load(keys []string, val []byte) { - for _, key := range keys { - d.Write(key, val) - } -} - -func benchRead(b *testing.B, size, cachesz int) { - b.StopTimer() - d := New(Options{ - BasePath: "speed-test", - Transform: func(string) []string { return []string{} }, - CacheSizeMax: uint64(cachesz), - }) - defer d.EraseAll() - - keys := genKeys() - value := genValue(size) - d.load(keys, value) - shuffle(keys) - b.SetBytes(int64(size)) - - b.StartTimer() - for i := 0; i < b.N; i++ { - _, _ = d.Read(keys[i%len(keys)]) - } - b.StopTimer() -} - -func benchWrite(b *testing.B, size int, withIndex bool) { - b.StopTimer() - - options := Options{ - BasePath: "speed-test", - Transform: func(string) []string { return []string{} }, - CacheSizeMax: 0, - } - if withIndex { - options.Index = &BTreeIndex{} - options.IndexLess = strLess - } - - d := New(options) - defer d.EraseAll() - keys := genKeys() - value := genValue(size) - shuffle(keys) - b.SetBytes(int64(size)) - - b.StartTimer() - for i := 0; i < b.N; i++ { - d.Write(keys[i%len(keys)], value) - } - b.StopTimer() -} - -func BenchmarkWrite__32B_NoIndex(b *testing.B) { - benchWrite(b, 32, false) -} - -func BenchmarkWrite__1KB_NoIndex(b *testing.B) { - benchWrite(b, 1024, false) -} - -func BenchmarkWrite__4KB_NoIndex(b *testing.B) { - benchWrite(b, 4096, false) -} - -func BenchmarkWrite_10KB_NoIndex(b *testing.B) { - benchWrite(b, 10240, false) -} - -func BenchmarkWrite__32B_WithIndex(b *testing.B) { - benchWrite(b, 32, true) -} - -func BenchmarkWrite__1KB_WithIndex(b *testing.B) { - benchWrite(b, 1024, true) -} - -func BenchmarkWrite__4KB_WithIndex(b *testing.B) { - benchWrite(b, 4096, true) -} - -func BenchmarkWrite_10KB_WithIndex(b *testing.B) { - benchWrite(b, 10240, true) -} - -func BenchmarkRead__32B_NoCache(b *testing.B) { - benchRead(b, 32, 0) -} - -func BenchmarkRead__1KB_NoCache(b *testing.B) { - benchRead(b, 1024, 0) -} - -func BenchmarkRead__4KB_NoCache(b *testing.B) { - benchRead(b, 4096, 0) -} - -func BenchmarkRead_10KB_NoCache(b *testing.B) { - benchRead(b, 10240, 0) -} - -func BenchmarkRead__32B_WithCache(b *testing.B) { - benchRead(b, 32, keyCount*32*2) -} - -func BenchmarkRead__1KB_WithCache(b *testing.B) { - benchRead(b, 1024, keyCount*1024*2) -} - -func BenchmarkRead__4KB_WithCache(b *testing.B) { - benchRead(b, 4096, keyCount*4096*2) -} - -func BenchmarkRead_10KB_WithCache(b *testing.B) { - benchRead(b, 10240, keyCount*4096*2) -} diff --git a/vendor/github.com/peterbourgon/diskv/stream_test.go b/vendor/github.com/peterbourgon/diskv/stream_test.go deleted file mode 100644 index 7991dbff..00000000 --- a/vendor/github.com/peterbourgon/diskv/stream_test.go +++ /dev/null @@ -1,117 +0,0 @@ -package diskv - -import ( - "bytes" - "io/ioutil" - "testing" -) - -func TestBasicStreamCaching(t *testing.T) { - d := New(Options{ - BasePath: "test-data", - CacheSizeMax: 1024, - }) - defer d.EraseAll() - - input := "a1b2c3" - key, writeBuf, sync := "a", bytes.NewBufferString(input), true - if err := d.WriteStream(key, writeBuf, sync); err != nil { - t.Fatal(err) - } - - if d.isCached(key) { - t.Fatalf("'%s' cached, but shouldn't be (yet)", key) - } - - rc, err := d.ReadStream(key, false) - if err != nil { - t.Fatal(err) - } - - readBuf, err := ioutil.ReadAll(rc) - if err != nil { - t.Fatal(err) - } - - if !cmpBytes(readBuf, []byte(input)) { - t.Fatalf("'%s' != '%s'", string(readBuf), input) - } - - if !d.isCached(key) { - t.Fatalf("'%s' isn't cached, but should be", key) - } -} - -func TestReadStreamDirect(t *testing.T) { - var ( - basePath = "test-data" - ) - dWrite := New(Options{ - BasePath: basePath, - CacheSizeMax: 0, - }) - defer dWrite.EraseAll() - dRead := New(Options{ - BasePath: basePath, - CacheSizeMax: 1024, - }) - - // Write - key, val1, val2 := "a", []byte(`1234567890`), []byte(`aaaaaaaaaa`) - if err := dWrite.Write(key, val1); err != nil { - t.Fatalf("during first write: %s", err) - } - - // First, caching read. - val, err := dRead.Read(key) - if err != nil { - t.Fatalf("during initial read: %s", err) - } - t.Logf("read 1: %s => %s", key, string(val)) - if !cmpBytes(val1, val) { - t.Errorf("expected %q, got %q", string(val1), string(val)) - } - if !dRead.isCached(key) { - t.Errorf("%q should be cached, but isn't", key) - } - - // Write a different value. - if err := dWrite.Write(key, val2); err != nil { - t.Fatalf("during second write: %s", err) - } - - // Second read, should hit cache and get the old value. - val, err = dRead.Read(key) - if err != nil { - t.Fatalf("during second (cache-hit) read: %s", err) - } - t.Logf("read 2: %s => %s", key, string(val)) - if !cmpBytes(val1, val) { - t.Errorf("expected %q, got %q", string(val1), string(val)) - } - - // Third, direct read, should get the updated value. - rc, err := dRead.ReadStream(key, true) - if err != nil { - t.Fatalf("during third (direct) read, ReadStream: %s", err) - } - defer rc.Close() - val, err = ioutil.ReadAll(rc) - if err != nil { - t.Fatalf("during third (direct) read, ReadAll: %s", err) - } - t.Logf("read 3: %s => %s", key, string(val)) - if !cmpBytes(val2, val) { - t.Errorf("expected %q, got %q", string(val1), string(val)) - } - - // Fourth read, should hit cache and get the new value. - val, err = dRead.Read(key) - if err != nil { - t.Fatalf("during fourth (cache-hit) read: %s", err) - } - t.Logf("read 4: %s => %s", key, string(val)) - if !cmpBytes(val2, val) { - t.Errorf("expected %q, got %q", string(val1), string(val)) - } -} diff --git a/vendor/github.com/spf13/pflag/.gitignore b/vendor/github.com/spf13/pflag/.gitignore deleted file mode 100644 index c3da2901..00000000 --- a/vendor/github.com/spf13/pflag/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.idea/* - diff --git a/vendor/github.com/spf13/pflag/.travis.yml b/vendor/github.com/spf13/pflag/.travis.yml deleted file mode 100644 index f8a63b30..00000000 --- a/vendor/github.com/spf13/pflag/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -sudo: false - -language: go - -go: - - 1.7.3 - - 1.8.1 - - tip - -matrix: - allow_failures: - - go: tip - -install: - - go get github.com/golang/lint/golint - - export PATH=$GOPATH/bin:$PATH - - go install ./... - -script: - - verify/all.sh -v - - go test ./... diff --git a/vendor/github.com/spf13/pflag/README.md b/vendor/github.com/spf13/pflag/README.md deleted file mode 100644 index b052414d..00000000 --- a/vendor/github.com/spf13/pflag/README.md +++ /dev/null @@ -1,296 +0,0 @@ -[![Build Status](https://travis-ci.org/spf13/pflag.svg?branch=master)](https://travis-ci.org/spf13/pflag) -[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/pflag)](https://goreportcard.com/report/github.com/spf13/pflag) -[![GoDoc](https://godoc.org/github.com/spf13/pflag?status.svg)](https://godoc.org/github.com/spf13/pflag) - -## Description - -pflag is a drop-in replacement for Go's flag package, implementing -POSIX/GNU-style --flags. - -pflag is compatible with the [GNU extensions to the POSIX recommendations -for command-line options][1]. For a more precise description, see the -"Command-line flag syntax" section below. - -[1]: http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html - -pflag is available under the same style of BSD license as the Go language, -which can be found in the LICENSE file. - -## Installation - -pflag is available using the standard `go get` command. - -Install by running: - - go get github.com/spf13/pflag - -Run tests by running: - - go test github.com/spf13/pflag - -## Usage - -pflag is a drop-in replacement of Go's native flag package. If you import -pflag under the name "flag" then all code should continue to function -with no changes. - -``` go -import flag "github.com/spf13/pflag" -``` - -There is one exception to this: if you directly instantiate the Flag struct -there is one more field "Shorthand" that you will need to set. -Most code never instantiates this struct directly, and instead uses -functions such as String(), BoolVar(), and Var(), and is therefore -unaffected. - -Define flags using flag.String(), Bool(), Int(), etc. - -This declares an integer flag, -flagname, stored in the pointer ip, with type *int. - -``` go -var ip *int = flag.Int("flagname", 1234, "help message for flagname") -``` - -If you like, you can bind the flag to a variable using the Var() functions. - -``` go -var flagvar int -func init() { - flag.IntVar(&flagvar, "flagname", 1234, "help message for flagname") -} -``` - -Or you can create custom flags that satisfy the Value interface (with -pointer receivers) and couple them to flag parsing by - -``` go -flag.Var(&flagVal, "name", "help message for flagname") -``` - -For such flags, the default value is just the initial value of the variable. - -After all flags are defined, call - -``` go -flag.Parse() -``` - -to parse the command line into the defined flags. - -Flags may then be used directly. If you're using the flags themselves, -they are all pointers; if you bind to variables, they're values. - -``` go -fmt.Println("ip has value ", *ip) -fmt.Println("flagvar has value ", flagvar) -``` - -There are helpers function to get values later if you have the FlagSet but -it was difficult to keep up with all of the flag pointers in your code. -If you have a pflag.FlagSet with a flag called 'flagname' of type int you -can use GetInt() to get the int value. But notice that 'flagname' must exist -and it must be an int. GetString("flagname") will fail. - -``` go -i, err := flagset.GetInt("flagname") -``` - -After parsing, the arguments after the flag are available as the -slice flag.Args() or individually as flag.Arg(i). -The arguments are indexed from 0 through flag.NArg()-1. - -The pflag package also defines some new functions that are not in flag, -that give one-letter shorthands for flags. You can use these by appending -'P' to the name of any function that defines a flag. - -``` go -var ip = flag.IntP("flagname", "f", 1234, "help message") -var flagvar bool -func init() { - flag.BoolVarP(&flagvar, "boolname", "b", true, "help message") -} -flag.VarP(&flagVal, "varname", "v", "help message") -``` - -Shorthand letters can be used with single dashes on the command line. -Boolean shorthand flags can be combined with other shorthand flags. - -The default set of command-line flags is controlled by -top-level functions. The FlagSet type allows one to define -independent sets of flags, such as to implement subcommands -in a command-line interface. The methods of FlagSet are -analogous to the top-level functions for the command-line -flag set. - -## Setting no option default values for flags - -After you create a flag it is possible to set the pflag.NoOptDefVal for -the given flag. Doing this changes the meaning of the flag slightly. If -a flag has a NoOptDefVal and the flag is set on the command line without -an option the flag will be set to the NoOptDefVal. For example given: - -``` go -var ip = flag.IntP("flagname", "f", 1234, "help message") -flag.Lookup("flagname").NoOptDefVal = "4321" -``` - -Would result in something like - -| Parsed Arguments | Resulting Value | -| ------------- | ------------- | -| --flagname=1357 | ip=1357 | -| --flagname | ip=4321 | -| [nothing] | ip=1234 | - -## Command line flag syntax - -``` ---flag // boolean flags, or flags with no option default values ---flag x // only on flags without a default value ---flag=x -``` - -Unlike the flag package, a single dash before an option means something -different than a double dash. Single dashes signify a series of shorthand -letters for flags. All but the last shorthand letter must be boolean flags -or a flag with a default value - -``` -// boolean or flags where the 'no option default value' is set --f --f=true --abc -but --b true is INVALID - -// non-boolean and flags without a 'no option default value' --n 1234 --n=1234 --n1234 - -// mixed --abcs "hello" --absd="hello" --abcs1234 -``` - -Flag parsing stops after the terminator "--". Unlike the flag package, -flags can be interspersed with arguments anywhere on the command line -before this terminator. - -Integer flags accept 1234, 0664, 0x1234 and may be negative. -Boolean flags (in their long form) accept 1, 0, t, f, true, false, -TRUE, FALSE, True, False. -Duration flags accept any input valid for time.ParseDuration. - -## Mutating or "Normalizing" Flag names - -It is possible to set a custom flag name 'normalization function.' It allows flag names to be mutated both when created in the code and when used on the command line to some 'normalized' form. The 'normalized' form is used for comparison. Two examples of using the custom normalization func follow. - -**Example #1**: You want -, _, and . in flags to compare the same. aka --my-flag == --my_flag == --my.flag - -``` go -func wordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName { - from := []string{"-", "_"} - to := "." - for _, sep := range from { - name = strings.Replace(name, sep, to, -1) - } - return pflag.NormalizedName(name) -} - -myFlagSet.SetNormalizeFunc(wordSepNormalizeFunc) -``` - -**Example #2**: You want to alias two flags. aka --old-flag-name == --new-flag-name - -``` go -func aliasNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName { - switch name { - case "old-flag-name": - name = "new-flag-name" - break - } - return pflag.NormalizedName(name) -} - -myFlagSet.SetNormalizeFunc(aliasNormalizeFunc) -``` - -## Deprecating a flag or its shorthand -It is possible to deprecate a flag, or just its shorthand. Deprecating a flag/shorthand hides it from help text and prints a usage message when the deprecated flag/shorthand is used. - -**Example #1**: You want to deprecate a flag named "badflag" as well as inform the users what flag they should use instead. -```go -// deprecate a flag by specifying its name and a usage message -flags.MarkDeprecated("badflag", "please use --good-flag instead") -``` -This hides "badflag" from help text, and prints `Flag --badflag has been deprecated, please use --good-flag instead` when "badflag" is used. - -**Example #2**: You want to keep a flag name "noshorthandflag" but deprecate its shortname "n". -```go -// deprecate a flag shorthand by specifying its flag name and a usage message -flags.MarkShorthandDeprecated("noshorthandflag", "please use --noshorthandflag only") -``` -This hides the shortname "n" from help text, and prints `Flag shorthand -n has been deprecated, please use --noshorthandflag only` when the shorthand "n" is used. - -Note that usage message is essential here, and it should not be empty. - -## Hidden flags -It is possible to mark a flag as hidden, meaning it will still function as normal, however will not show up in usage/help text. - -**Example**: You have a flag named "secretFlag" that you need for internal use only and don't want it showing up in help text, or for its usage text to be available. -```go -// hide a flag by specifying its name -flags.MarkHidden("secretFlag") -``` - -## Disable sorting of flags -`pflag` allows you to disable sorting of flags for help and usage message. - -**Example**: -```go -flags.BoolP("verbose", "v", false, "verbose output") -flags.String("coolflag", "yeaah", "it's really cool flag") -flags.Int("usefulflag", 777, "sometimes it's very useful") -flags.SortFlags = false -flags.PrintDefaults() -``` -**Output**: -``` - -v, --verbose verbose output - --coolflag string it's really cool flag (default "yeaah") - --usefulflag int sometimes it's very useful (default 777) -``` - - -## Supporting Go flags when using pflag -In order to support flags defined using Go's `flag` package, they must be added to the `pflag` flagset. This is usually necessary -to support flags defined by third-party dependencies (e.g. `golang/glog`). - -**Example**: You want to add the Go flags to the `CommandLine` flagset -```go -import ( - goflag "flag" - flag "github.com/spf13/pflag" -) - -var ip *int = flag.Int("flagname", 1234, "help message for flagname") - -func main() { - flag.CommandLine.AddGoFlagSet(goflag.CommandLine) - flag.Parse() -} -``` - -## More info - -You can see the full reference documentation of the pflag package -[at godoc.org][3], or through go's standard documentation system by -running `godoc -http=:6060` and browsing to -[http://localhost:6060/pkg/github.com/spf13/pflag][2] after -installation. - -[2]: http://localhost:6060/pkg/github.com/spf13/pflag -[3]: http://godoc.org/github.com/spf13/pflag diff --git a/vendor/github.com/spf13/pflag/bool_slice_test.go b/vendor/github.com/spf13/pflag/bool_slice_test.go deleted file mode 100644 index b617dd23..00000000 --- a/vendor/github.com/spf13/pflag/bool_slice_test.go +++ /dev/null @@ -1,215 +0,0 @@ -package pflag - -import ( - "fmt" - "strconv" - "strings" - "testing" -) - -func setUpBSFlagSet(bsp *[]bool) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - f.BoolSliceVar(bsp, "bs", []bool{}, "Command separated list!") - return f -} - -func setUpBSFlagSetWithDefault(bsp *[]bool) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - f.BoolSliceVar(bsp, "bs", []bool{false, true}, "Command separated list!") - return f -} - -func TestEmptyBS(t *testing.T) { - var bs []bool - f := setUpBSFlagSet(&bs) - err := f.Parse([]string{}) - if err != nil { - t.Fatal("expected no error; got", err) - } - - getBS, err := f.GetBoolSlice("bs") - if err != nil { - t.Fatal("got an error from GetBoolSlice():", err) - } - if len(getBS) != 0 { - t.Fatalf("got bs %v with len=%d but expected length=0", getBS, len(getBS)) - } -} - -func TestBS(t *testing.T) { - var bs []bool - f := setUpBSFlagSet(&bs) - - vals := []string{"1", "F", "TRUE", "0"} - arg := fmt.Sprintf("--bs=%s", strings.Join(vals, ",")) - err := f.Parse([]string{arg}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range bs { - b, err := strconv.ParseBool(vals[i]) - if err != nil { - t.Fatalf("got error: %v", err) - } - if b != v { - t.Fatalf("expected is[%d] to be %s but got: %t", i, vals[i], v) - } - } - getBS, err := f.GetBoolSlice("bs") - if err != nil { - t.Fatalf("got error: %v", err) - } - for i, v := range getBS { - b, err := strconv.ParseBool(vals[i]) - if err != nil { - t.Fatalf("got error: %v", err) - } - if b != v { - t.Fatalf("expected bs[%d] to be %s but got: %t from GetBoolSlice", i, vals[i], v) - } - } -} - -func TestBSDefault(t *testing.T) { - var bs []bool - f := setUpBSFlagSetWithDefault(&bs) - - vals := []string{"false", "T"} - - err := f.Parse([]string{}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range bs { - b, err := strconv.ParseBool(vals[i]) - if err != nil { - t.Fatalf("got error: %v", err) - } - if b != v { - t.Fatalf("expected bs[%d] to be %t from GetBoolSlice but got: %t", i, b, v) - } - } - - getBS, err := f.GetBoolSlice("bs") - if err != nil { - t.Fatal("got an error from GetBoolSlice():", err) - } - for i, v := range getBS { - b, err := strconv.ParseBool(vals[i]) - if err != nil { - t.Fatal("got an error from GetBoolSlice():", err) - } - if b != v { - t.Fatalf("expected bs[%d] to be %t from GetBoolSlice but got: %t", i, b, v) - } - } -} - -func TestBSWithDefault(t *testing.T) { - var bs []bool - f := setUpBSFlagSetWithDefault(&bs) - - vals := []string{"FALSE", "1"} - arg := fmt.Sprintf("--bs=%s", strings.Join(vals, ",")) - err := f.Parse([]string{arg}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range bs { - b, err := strconv.ParseBool(vals[i]) - if err != nil { - t.Fatalf("got error: %v", err) - } - if b != v { - t.Fatalf("expected bs[%d] to be %t but got: %t", i, b, v) - } - } - - getBS, err := f.GetBoolSlice("bs") - if err != nil { - t.Fatal("got an error from GetBoolSlice():", err) - } - for i, v := range getBS { - b, err := strconv.ParseBool(vals[i]) - if err != nil { - t.Fatalf("got error: %v", err) - } - if b != v { - t.Fatalf("expected bs[%d] to be %t from GetBoolSlice but got: %t", i, b, v) - } - } -} - -func TestBSCalledTwice(t *testing.T) { - var bs []bool - f := setUpBSFlagSet(&bs) - - in := []string{"T,F", "T"} - expected := []bool{true, false, true} - argfmt := "--bs=%s" - arg1 := fmt.Sprintf(argfmt, in[0]) - arg2 := fmt.Sprintf(argfmt, in[1]) - err := f.Parse([]string{arg1, arg2}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range bs { - if expected[i] != v { - t.Fatalf("expected bs[%d] to be %t but got %t", i, expected[i], v) - } - } -} - -func TestBSBadQuoting(t *testing.T) { - - tests := []struct { - Want []bool - FlagArg []string - }{ - { - Want: []bool{true, false, true}, - FlagArg: []string{"1", "0", "true"}, - }, - { - Want: []bool{true, false}, - FlagArg: []string{"True", "F"}, - }, - { - Want: []bool{true, false}, - FlagArg: []string{"T", "0"}, - }, - { - Want: []bool{true, false}, - FlagArg: []string{"1", "0"}, - }, - { - Want: []bool{true, false, false}, - FlagArg: []string{"true,false", "false"}, - }, - { - Want: []bool{true, false, false, true, false, true, false}, - FlagArg: []string{`"true,false,false,1,0, T"`, " false "}, - }, - { - Want: []bool{false, false, true, false, true, false, true}, - FlagArg: []string{`"0, False, T,false , true,F"`, "true"}, - }, - } - - for i, test := range tests { - - var bs []bool - f := setUpBSFlagSet(&bs) - - if err := f.Parse([]string{fmt.Sprintf("--bs=%s", strings.Join(test.FlagArg, ","))}); err != nil { - t.Fatalf("flag parsing failed with error: %s\nparsing:\t%#v\nwant:\t\t%#v", - err, test.FlagArg, test.Want[i]) - } - - for j, b := range bs { - if b != test.Want[j] { - t.Fatalf("bad value parsed for test %d on bool %d:\nwant:\t%t\ngot:\t%t", i, j, test.Want[j], b) - } - } - } -} diff --git a/vendor/github.com/spf13/pflag/bool_test.go b/vendor/github.com/spf13/pflag/bool_test.go deleted file mode 100644 index a4319e79..00000000 --- a/vendor/github.com/spf13/pflag/bool_test.go +++ /dev/null @@ -1,179 +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 pflag - -import ( - "bytes" - "strconv" - "testing" -) - -// This value can be a boolean ("true", "false") or "maybe" -type triStateValue int - -const ( - triStateFalse triStateValue = 0 - triStateTrue triStateValue = 1 - triStateMaybe triStateValue = 2 -) - -const strTriStateMaybe = "maybe" - -func (v *triStateValue) IsBoolFlag() bool { - return true -} - -func (v *triStateValue) Get() interface{} { - return triStateValue(*v) -} - -func (v *triStateValue) Set(s string) error { - if s == strTriStateMaybe { - *v = triStateMaybe - return nil - } - boolVal, err := strconv.ParseBool(s) - if boolVal { - *v = triStateTrue - } else { - *v = triStateFalse - } - return err -} - -func (v *triStateValue) String() string { - if *v == triStateMaybe { - return strTriStateMaybe - } - return strconv.FormatBool(*v == triStateTrue) -} - -// The type of the flag as required by the pflag.Value interface -func (v *triStateValue) Type() string { - return "version" -} - -func setUpFlagSet(tristate *triStateValue) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - *tristate = triStateFalse - flag := f.VarPF(tristate, "tristate", "t", "tristate value (true, maybe or false)") - flag.NoOptDefVal = "true" - return f -} - -func TestExplicitTrue(t *testing.T) { - var tristate triStateValue - f := setUpFlagSet(&tristate) - err := f.Parse([]string{"--tristate=true"}) - if err != nil { - t.Fatal("expected no error; got", err) - } - if tristate != triStateTrue { - t.Fatal("expected", triStateTrue, "(triStateTrue) but got", tristate, "instead") - } -} - -func TestImplicitTrue(t *testing.T) { - var tristate triStateValue - f := setUpFlagSet(&tristate) - err := f.Parse([]string{"--tristate"}) - if err != nil { - t.Fatal("expected no error; got", err) - } - if tristate != triStateTrue { - t.Fatal("expected", triStateTrue, "(triStateTrue) but got", tristate, "instead") - } -} - -func TestShortFlag(t *testing.T) { - var tristate triStateValue - f := setUpFlagSet(&tristate) - err := f.Parse([]string{"-t"}) - if err != nil { - t.Fatal("expected no error; got", err) - } - if tristate != triStateTrue { - t.Fatal("expected", triStateTrue, "(triStateTrue) but got", tristate, "instead") - } -} - -func TestShortFlagExtraArgument(t *testing.T) { - var tristate triStateValue - f := setUpFlagSet(&tristate) - // The"maybe"turns into an arg, since short boolean options will only do true/false - err := f.Parse([]string{"-t", "maybe"}) - if err != nil { - t.Fatal("expected no error; got", err) - } - if tristate != triStateTrue { - t.Fatal("expected", triStateTrue, "(triStateTrue) but got", tristate, "instead") - } - args := f.Args() - if len(args) != 1 || args[0] != "maybe" { - t.Fatal("expected an extra 'maybe' argument to stick around") - } -} - -func TestExplicitMaybe(t *testing.T) { - var tristate triStateValue - f := setUpFlagSet(&tristate) - err := f.Parse([]string{"--tristate=maybe"}) - if err != nil { - t.Fatal("expected no error; got", err) - } - if tristate != triStateMaybe { - t.Fatal("expected", triStateMaybe, "(triStateMaybe) but got", tristate, "instead") - } -} - -func TestExplicitFalse(t *testing.T) { - var tristate triStateValue - f := setUpFlagSet(&tristate) - err := f.Parse([]string{"--tristate=false"}) - if err != nil { - t.Fatal("expected no error; got", err) - } - if tristate != triStateFalse { - t.Fatal("expected", triStateFalse, "(triStateFalse) but got", tristate, "instead") - } -} - -func TestImplicitFalse(t *testing.T) { - var tristate triStateValue - f := setUpFlagSet(&tristate) - err := f.Parse([]string{}) - if err != nil { - t.Fatal("expected no error; got", err) - } - if tristate != triStateFalse { - t.Fatal("expected", triStateFalse, "(triStateFalse) but got", tristate, "instead") - } -} - -func TestInvalidValue(t *testing.T) { - var tristate triStateValue - f := setUpFlagSet(&tristate) - var buf bytes.Buffer - f.SetOutput(&buf) - err := f.Parse([]string{"--tristate=invalid"}) - if err == nil { - t.Fatal("expected an error but did not get any, tristate has value", tristate) - } -} - -func TestBoolP(t *testing.T) { - b := BoolP("bool", "b", false, "bool value in CommandLine") - c := BoolP("c", "c", false, "other bool value") - args := []string{"--bool"} - if err := CommandLine.Parse(args); err != nil { - t.Error("expected no error, got ", err) - } - if *b != true { - t.Errorf("expected b=true got b=%v", *b) - } - if *c != false { - t.Errorf("expect c=false got c=%v", *c) - } -} diff --git a/vendor/github.com/spf13/pflag/bytes_test.go b/vendor/github.com/spf13/pflag/bytes_test.go deleted file mode 100644 index 5251f347..00000000 --- a/vendor/github.com/spf13/pflag/bytes_test.go +++ /dev/null @@ -1,134 +0,0 @@ -package pflag - -import ( - "encoding/base64" - "fmt" - "os" - "testing" -) - -func setUpBytesHex(bytesHex *[]byte) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - f.BytesHexVar(bytesHex, "bytes", []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, "Some bytes in HEX") - f.BytesHexVarP(bytesHex, "bytes2", "B", []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, "Some bytes in HEX") - return f -} - -func TestBytesHex(t *testing.T) { - testCases := []struct { - input string - success bool - expected string - }{ - /// Positive cases - {"", true, ""}, // Is empty string OK ? - {"01", true, "01"}, - {"0101", true, "0101"}, - {"1234567890abcdef", true, "1234567890ABCDEF"}, - {"1234567890ABCDEF", true, "1234567890ABCDEF"}, - - // Negative cases - {"0", false, ""}, // Short string - {"000", false, ""}, /// Odd-length string - {"qq", false, ""}, /// non-hex character - } - - devnull, _ := os.Open(os.DevNull) - os.Stderr = devnull - - for i := range testCases { - var bytesHex []byte - f := setUpBytesHex(&bytesHex) - - tc := &testCases[i] - - // --bytes - args := []string{ - fmt.Sprintf("--bytes=%s", tc.input), - fmt.Sprintf("-B %s", tc.input), - fmt.Sprintf("--bytes2=%s", tc.input), - } - - for _, arg := range args { - err := f.Parse([]string{arg}) - - if err != nil && tc.success == true { - t.Errorf("expected success, got %q", err) - continue - } else if err == nil && tc.success == false { - // bytesHex, err := f.GetBytesHex("bytes") - t.Errorf("expected failure while processing %q", tc.input) - continue - } else if tc.success { - bytesHex, err := f.GetBytesHex("bytes") - if err != nil { - t.Errorf("Got error trying to fetch the 'bytes' flag: %v", err) - } - if fmt.Sprintf("%X", bytesHex) != tc.expected { - t.Errorf("expected %q, got '%X'", tc.expected, bytesHex) - } - } - } - } -} - -func setUpBytesBase64(bytesBase64 *[]byte) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - f.BytesBase64Var(bytesBase64, "bytes", []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, "Some bytes in Base64") - f.BytesBase64VarP(bytesBase64, "bytes2", "B", []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, "Some bytes in Base64") - return f -} - -func TestBytesBase64(t *testing.T) { - testCases := []struct { - input string - success bool - expected string - }{ - /// Positive cases - {"", true, ""}, // Is empty string OK ? - {"AQ==", true, "AQ=="}, - - // Negative cases - {"AQ", false, ""}, // Padding removed - {"ï", false, ""}, // non-base64 characters - } - - devnull, _ := os.Open(os.DevNull) - os.Stderr = devnull - - for i := range testCases { - var bytesBase64 []byte - f := setUpBytesBase64(&bytesBase64) - - tc := &testCases[i] - - // --bytes - args := []string{ - fmt.Sprintf("--bytes=%s", tc.input), - fmt.Sprintf("-B %s", tc.input), - fmt.Sprintf("--bytes2=%s", tc.input), - } - - for _, arg := range args { - err := f.Parse([]string{arg}) - - if err != nil && tc.success == true { - t.Errorf("expected success, got %q", err) - continue - } else if err == nil && tc.success == false { - // bytesBase64, err := f.GetBytesBase64("bytes") - t.Errorf("expected failure while processing %q", tc.input) - continue - } else if tc.success { - bytesBase64, err := f.GetBytesBase64("bytes") - if err != nil { - t.Errorf("Got error trying to fetch the 'bytes' flag: %v", err) - } - if base64.StdEncoding.EncodeToString(bytesBase64) != tc.expected { - t.Errorf("expected %q, got '%X'", tc.expected, bytesBase64) - } - } - } - } -} diff --git a/vendor/github.com/spf13/pflag/count_test.go b/vendor/github.com/spf13/pflag/count_test.go deleted file mode 100644 index 3785d375..00000000 --- a/vendor/github.com/spf13/pflag/count_test.go +++ /dev/null @@ -1,56 +0,0 @@ -package pflag - -import ( - "os" - "testing" -) - -func setUpCount(c *int) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - f.CountVarP(c, "verbose", "v", "a counter") - return f -} - -func TestCount(t *testing.T) { - testCases := []struct { - input []string - success bool - expected int - }{ - {[]string{}, true, 0}, - {[]string{"-v"}, true, 1}, - {[]string{"-vvv"}, true, 3}, - {[]string{"-v", "-v", "-v"}, true, 3}, - {[]string{"-v", "--verbose", "-v"}, true, 3}, - {[]string{"-v=3", "-v"}, true, 4}, - {[]string{"--verbose=0"}, true, 0}, - {[]string{"-v=0"}, true, 0}, - {[]string{"-v=a"}, false, 0}, - } - - devnull, _ := os.Open(os.DevNull) - os.Stderr = devnull - for i := range testCases { - var count int - f := setUpCount(&count) - - tc := &testCases[i] - - err := f.Parse(tc.input) - if err != nil && tc.success == true { - t.Errorf("expected success, got %q", err) - continue - } else if err == nil && tc.success == false { - t.Errorf("expected failure, got success") - continue - } else if tc.success { - c, err := f.GetCount("verbose") - if err != nil { - t.Errorf("Got error trying to fetch the counter flag") - } - if c != tc.expected { - t.Errorf("expected %d, got %d", tc.expected, c) - } - } - } -} diff --git a/vendor/github.com/spf13/pflag/duration_slice_test.go b/vendor/github.com/spf13/pflag/duration_slice_test.go deleted file mode 100644 index 489b012f..00000000 --- a/vendor/github.com/spf13/pflag/duration_slice_test.go +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code ds governed by a BSD-style -// license that can be found in the LICENSE file. - -package pflag - -import ( - "fmt" - "strings" - "testing" - "time" -) - -func setUpDSFlagSet(dsp *[]time.Duration) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - f.DurationSliceVar(dsp, "ds", []time.Duration{}, "Command separated list!") - return f -} - -func setUpDSFlagSetWithDefault(dsp *[]time.Duration) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - f.DurationSliceVar(dsp, "ds", []time.Duration{0, 1}, "Command separated list!") - return f -} - -func TestEmptyDS(t *testing.T) { - var ds []time.Duration - f := setUpDSFlagSet(&ds) - err := f.Parse([]string{}) - if err != nil { - t.Fatal("expected no error; got", err) - } - - getDS, err := f.GetDurationSlice("ds") - if err != nil { - t.Fatal("got an error from GetDurationSlice():", err) - } - if len(getDS) != 0 { - t.Fatalf("got ds %v with len=%d but expected length=0", getDS, len(getDS)) - } -} - -func TestDS(t *testing.T) { - var ds []time.Duration - f := setUpDSFlagSet(&ds) - - vals := []string{"1ns", "2ms", "3m", "4h"} - arg := fmt.Sprintf("--ds=%s", strings.Join(vals, ",")) - err := f.Parse([]string{arg}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range ds { - d, err := time.ParseDuration(vals[i]) - if err != nil { - t.Fatalf("got error: %v", err) - } - if d != v { - t.Fatalf("expected ds[%d] to be %s but got: %d", i, vals[i], v) - } - } - getDS, err := f.GetDurationSlice("ds") - if err != nil { - t.Fatalf("got error: %v", err) - } - for i, v := range getDS { - d, err := time.ParseDuration(vals[i]) - if err != nil { - t.Fatalf("got error: %v", err) - } - if d != v { - t.Fatalf("expected ds[%d] to be %s but got: %d from GetDurationSlice", i, vals[i], v) - } - } -} - -func TestDSDefault(t *testing.T) { - var ds []time.Duration - f := setUpDSFlagSetWithDefault(&ds) - - vals := []string{"0s", "1ns"} - - err := f.Parse([]string{}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range ds { - d, err := time.ParseDuration(vals[i]) - if err != nil { - t.Fatalf("got error: %v", err) - } - if d != v { - t.Fatalf("expected ds[%d] to be %d but got: %d", i, d, v) - } - } - - getDS, err := f.GetDurationSlice("ds") - if err != nil { - t.Fatal("got an error from GetDurationSlice():", err) - } - for i, v := range getDS { - d, err := time.ParseDuration(vals[i]) - if err != nil { - t.Fatal("got an error from GetDurationSlice():", err) - } - if d != v { - t.Fatalf("expected ds[%d] to be %d from GetDurationSlice but got: %d", i, d, v) - } - } -} - -func TestDSWithDefault(t *testing.T) { - var ds []time.Duration - f := setUpDSFlagSetWithDefault(&ds) - - vals := []string{"1ns", "2ns"} - arg := fmt.Sprintf("--ds=%s", strings.Join(vals, ",")) - err := f.Parse([]string{arg}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range ds { - d, err := time.ParseDuration(vals[i]) - if err != nil { - t.Fatalf("got error: %v", err) - } - if d != v { - t.Fatalf("expected ds[%d] to be %d but got: %d", i, d, v) - } - } - - getDS, err := f.GetDurationSlice("ds") - if err != nil { - t.Fatal("got an error from GetDurationSlice():", err) - } - for i, v := range getDS { - d, err := time.ParseDuration(vals[i]) - if err != nil { - t.Fatalf("got error: %v", err) - } - if d != v { - t.Fatalf("expected ds[%d] to be %d from GetDurationSlice but got: %d", i, d, v) - } - } -} - -func TestDSCalledTwice(t *testing.T) { - var ds []time.Duration - f := setUpDSFlagSet(&ds) - - in := []string{"1ns,2ns", "3ns"} - expected := []time.Duration{1, 2, 3} - argfmt := "--ds=%s" - arg1 := fmt.Sprintf(argfmt, in[0]) - arg2 := fmt.Sprintf(argfmt, in[1]) - err := f.Parse([]string{arg1, arg2}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range ds { - if expected[i] != v { - t.Fatalf("expected ds[%d] to be %d but got: %d", i, expected[i], v) - } - } -} diff --git a/vendor/github.com/spf13/pflag/example_test.go b/vendor/github.com/spf13/pflag/example_test.go deleted file mode 100644 index abd7806f..00000000 --- a/vendor/github.com/spf13/pflag/example_test.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. - -package pflag_test - -import ( - "fmt" - - "github.com/spf13/pflag" -) - -func ExampleShorthandLookup() { - name := "verbose" - short := name[:1] - - pflag.BoolP(name, short, false, "verbose output") - - // len(short) must be == 1 - flag := pflag.ShorthandLookup(short) - - fmt.Println(flag.Name) -} - -func ExampleFlagSet_ShorthandLookup() { - name := "verbose" - short := name[:1] - - fs := pflag.NewFlagSet("Example", pflag.ContinueOnError) - fs.BoolP(name, short, false, "verbose output") - - // len(short) must be == 1 - flag := fs.ShorthandLookup(short) - - fmt.Println(flag.Name) -} diff --git a/vendor/github.com/spf13/pflag/export_test.go b/vendor/github.com/spf13/pflag/export_test.go deleted file mode 100644 index 9318fee0..00000000 --- a/vendor/github.com/spf13/pflag/export_test.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package pflag - -import ( - "io/ioutil" - "os" -) - -// Additional routines compiled into the package only during testing. - -// ResetForTesting clears all flag state and sets the usage function as directed. -// After calling ResetForTesting, parse errors in flag handling will not -// exit the program. -func ResetForTesting(usage func()) { - CommandLine = &FlagSet{ - name: os.Args[0], - errorHandling: ContinueOnError, - output: ioutil.Discard, - } - Usage = usage -} - -// GetCommandLine returns the default FlagSet. -func GetCommandLine() *FlagSet { - return CommandLine -} diff --git a/vendor/github.com/spf13/pflag/flag_test.go b/vendor/github.com/spf13/pflag/flag_test.go deleted file mode 100644 index f600f0ae..00000000 --- a/vendor/github.com/spf13/pflag/flag_test.go +++ /dev/null @@ -1,1259 +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 pflag - -import ( - "bytes" - "fmt" - "io" - "io/ioutil" - "net" - "os" - "reflect" - "sort" - "strconv" - "strings" - "testing" - "time" -) - -var ( - testBool = Bool("test_bool", false, "bool value") - testInt = Int("test_int", 0, "int value") - testInt64 = Int64("test_int64", 0, "int64 value") - testUint = Uint("test_uint", 0, "uint value") - testUint64 = Uint64("test_uint64", 0, "uint64 value") - testString = String("test_string", "0", "string value") - testFloat = Float64("test_float64", 0, "float64 value") - testDuration = Duration("test_duration", 0, "time.Duration value") - testOptionalInt = Int("test_optional_int", 0, "optional int value") - normalizeFlagNameInvocations = 0 -) - -func boolString(s string) string { - if s == "0" { - return "false" - } - return "true" -} - -func TestEverything(t *testing.T) { - m := make(map[string]*Flag) - desired := "0" - visitor := func(f *Flag) { - if len(f.Name) > 5 && f.Name[0:5] == "test_" { - m[f.Name] = f - ok := false - switch { - case f.Value.String() == desired: - ok = true - case f.Name == "test_bool" && f.Value.String() == boolString(desired): - ok = true - case f.Name == "test_duration" && f.Value.String() == desired+"s": - ok = true - } - if !ok { - t.Error("Visit: bad value", f.Value.String(), "for", f.Name) - } - } - } - VisitAll(visitor) - if len(m) != 9 { - t.Error("VisitAll misses some flags") - for k, v := range m { - t.Log(k, *v) - } - } - m = make(map[string]*Flag) - Visit(visitor) - if len(m) != 0 { - t.Errorf("Visit sees unset flags") - for k, v := range m { - t.Log(k, *v) - } - } - // Now set all flags - Set("test_bool", "true") - Set("test_int", "1") - Set("test_int64", "1") - Set("test_uint", "1") - Set("test_uint64", "1") - Set("test_string", "1") - Set("test_float64", "1") - Set("test_duration", "1s") - Set("test_optional_int", "1") - desired = "1" - Visit(visitor) - if len(m) != 9 { - t.Error("Visit fails after set") - for k, v := range m { - t.Log(k, *v) - } - } - // Now test they're visited in sort order. - var flagNames []string - Visit(func(f *Flag) { flagNames = append(flagNames, f.Name) }) - if !sort.StringsAreSorted(flagNames) { - t.Errorf("flag names not sorted: %v", flagNames) - } -} - -func TestUsage(t *testing.T) { - called := false - ResetForTesting(func() { called = true }) - if GetCommandLine().Parse([]string{"--x"}) == nil { - t.Error("parse did not fail for unknown flag") - } - if called { - t.Error("did call Usage while using ContinueOnError") - } -} - -func TestAddFlagSet(t *testing.T) { - oldSet := NewFlagSet("old", ContinueOnError) - newSet := NewFlagSet("new", ContinueOnError) - - oldSet.String("flag1", "flag1", "flag1") - oldSet.String("flag2", "flag2", "flag2") - - newSet.String("flag2", "flag2", "flag2") - newSet.String("flag3", "flag3", "flag3") - - oldSet.AddFlagSet(newSet) - - if len(oldSet.formal) != 3 { - t.Errorf("Unexpected result adding a FlagSet to a FlagSet %v", oldSet) - } -} - -func TestAnnotation(t *testing.T) { - f := NewFlagSet("shorthand", ContinueOnError) - - if err := f.SetAnnotation("missing-flag", "key", nil); err == nil { - t.Errorf("Expected error setting annotation on non-existent flag") - } - - f.StringP("stringa", "a", "", "string value") - if err := f.SetAnnotation("stringa", "key", nil); err != nil { - t.Errorf("Unexpected error setting new nil annotation: %v", err) - } - if annotation := f.Lookup("stringa").Annotations["key"]; annotation != nil { - t.Errorf("Unexpected annotation: %v", annotation) - } - - f.StringP("stringb", "b", "", "string2 value") - if err := f.SetAnnotation("stringb", "key", []string{"value1"}); err != nil { - t.Errorf("Unexpected error setting new annotation: %v", err) - } - if annotation := f.Lookup("stringb").Annotations["key"]; !reflect.DeepEqual(annotation, []string{"value1"}) { - t.Errorf("Unexpected annotation: %v", annotation) - } - - if err := f.SetAnnotation("stringb", "key", []string{"value2"}); err != nil { - t.Errorf("Unexpected error updating annotation: %v", err) - } - if annotation := f.Lookup("stringb").Annotations["key"]; !reflect.DeepEqual(annotation, []string{"value2"}) { - t.Errorf("Unexpected annotation: %v", annotation) - } -} - -func testParse(f *FlagSet, t *testing.T) { - if f.Parsed() { - t.Error("f.Parse() = true before Parse") - } - boolFlag := f.Bool("bool", false, "bool value") - bool2Flag := f.Bool("bool2", false, "bool2 value") - bool3Flag := f.Bool("bool3", false, "bool3 value") - intFlag := f.Int("int", 0, "int value") - int8Flag := f.Int8("int8", 0, "int value") - int16Flag := f.Int16("int16", 0, "int value") - int32Flag := f.Int32("int32", 0, "int value") - int64Flag := f.Int64("int64", 0, "int64 value") - uintFlag := f.Uint("uint", 0, "uint value") - uint8Flag := f.Uint8("uint8", 0, "uint value") - uint16Flag := f.Uint16("uint16", 0, "uint value") - uint32Flag := f.Uint32("uint32", 0, "uint value") - uint64Flag := f.Uint64("uint64", 0, "uint64 value") - stringFlag := f.String("string", "0", "string value") - float32Flag := f.Float32("float32", 0, "float32 value") - float64Flag := f.Float64("float64", 0, "float64 value") - ipFlag := f.IP("ip", net.ParseIP("127.0.0.1"), "ip value") - maskFlag := f.IPMask("mask", ParseIPv4Mask("0.0.0.0"), "mask value") - durationFlag := f.Duration("duration", 5*time.Second, "time.Duration value") - optionalIntNoValueFlag := f.Int("optional-int-no-value", 0, "int value") - f.Lookup("optional-int-no-value").NoOptDefVal = "9" - optionalIntWithValueFlag := f.Int("optional-int-with-value", 0, "int value") - f.Lookup("optional-int-no-value").NoOptDefVal = "9" - extra := "one-extra-argument" - args := []string{ - "--bool", - "--bool2=true", - "--bool3=false", - "--int=22", - "--int8=-8", - "--int16=-16", - "--int32=-32", - "--int64=0x23", - "--uint", "24", - "--uint8=8", - "--uint16=16", - "--uint32=32", - "--uint64=25", - "--string=hello", - "--float32=-172e12", - "--float64=2718e28", - "--ip=10.11.12.13", - "--mask=255.255.255.0", - "--duration=2m", - "--optional-int-no-value", - "--optional-int-with-value=42", - extra, - } - if err := f.Parse(args); err != nil { - t.Fatal(err) - } - if !f.Parsed() { - t.Error("f.Parse() = false after Parse") - } - if *boolFlag != true { - t.Error("bool flag should be true, is ", *boolFlag) - } - if v, err := f.GetBool("bool"); err != nil || v != *boolFlag { - t.Error("GetBool does not work.") - } - if *bool2Flag != true { - t.Error("bool2 flag should be true, is ", *bool2Flag) - } - if *bool3Flag != false { - t.Error("bool3 flag should be false, is ", *bool2Flag) - } - if *intFlag != 22 { - t.Error("int flag should be 22, is ", *intFlag) - } - if v, err := f.GetInt("int"); err != nil || v != *intFlag { - t.Error("GetInt does not work.") - } - if *int8Flag != -8 { - t.Error("int8 flag should be 0x23, is ", *int8Flag) - } - if *int16Flag != -16 { - t.Error("int16 flag should be -16, is ", *int16Flag) - } - if v, err := f.GetInt8("int8"); err != nil || v != *int8Flag { - t.Error("GetInt8 does not work.") - } - if v, err := f.GetInt16("int16"); err != nil || v != *int16Flag { - t.Error("GetInt16 does not work.") - } - if *int32Flag != -32 { - t.Error("int32 flag should be 0x23, is ", *int32Flag) - } - if v, err := f.GetInt32("int32"); err != nil || v != *int32Flag { - t.Error("GetInt32 does not work.") - } - if *int64Flag != 0x23 { - t.Error("int64 flag should be 0x23, is ", *int64Flag) - } - if v, err := f.GetInt64("int64"); err != nil || v != *int64Flag { - t.Error("GetInt64 does not work.") - } - if *uintFlag != 24 { - t.Error("uint flag should be 24, is ", *uintFlag) - } - if v, err := f.GetUint("uint"); err != nil || v != *uintFlag { - t.Error("GetUint does not work.") - } - if *uint8Flag != 8 { - t.Error("uint8 flag should be 8, is ", *uint8Flag) - } - if v, err := f.GetUint8("uint8"); err != nil || v != *uint8Flag { - t.Error("GetUint8 does not work.") - } - if *uint16Flag != 16 { - t.Error("uint16 flag should be 16, is ", *uint16Flag) - } - if v, err := f.GetUint16("uint16"); err != nil || v != *uint16Flag { - t.Error("GetUint16 does not work.") - } - if *uint32Flag != 32 { - t.Error("uint32 flag should be 32, is ", *uint32Flag) - } - if v, err := f.GetUint32("uint32"); err != nil || v != *uint32Flag { - t.Error("GetUint32 does not work.") - } - if *uint64Flag != 25 { - t.Error("uint64 flag should be 25, is ", *uint64Flag) - } - if v, err := f.GetUint64("uint64"); err != nil || v != *uint64Flag { - t.Error("GetUint64 does not work.") - } - if *stringFlag != "hello" { - t.Error("string flag should be `hello`, is ", *stringFlag) - } - if v, err := f.GetString("string"); err != nil || v != *stringFlag { - t.Error("GetString does not work.") - } - if *float32Flag != -172e12 { - t.Error("float32 flag should be -172e12, is ", *float32Flag) - } - if v, err := f.GetFloat32("float32"); err != nil || v != *float32Flag { - t.Errorf("GetFloat32 returned %v but float32Flag was %v", v, *float32Flag) - } - if *float64Flag != 2718e28 { - t.Error("float64 flag should be 2718e28, is ", *float64Flag) - } - if v, err := f.GetFloat64("float64"); err != nil || v != *float64Flag { - t.Errorf("GetFloat64 returned %v but float64Flag was %v", v, *float64Flag) - } - if !(*ipFlag).Equal(net.ParseIP("10.11.12.13")) { - t.Error("ip flag should be 10.11.12.13, is ", *ipFlag) - } - if v, err := f.GetIP("ip"); err != nil || !v.Equal(*ipFlag) { - t.Errorf("GetIP returned %v but ipFlag was %v", v, *ipFlag) - } - if (*maskFlag).String() != ParseIPv4Mask("255.255.255.0").String() { - t.Error("mask flag should be 255.255.255.0, is ", (*maskFlag).String()) - } - if v, err := f.GetIPv4Mask("mask"); err != nil || v.String() != (*maskFlag).String() { - t.Errorf("GetIP returned %v maskFlag was %v error was %v", v, *maskFlag, err) - } - if *durationFlag != 2*time.Minute { - t.Error("duration flag should be 2m, is ", *durationFlag) - } - if v, err := f.GetDuration("duration"); err != nil || v != *durationFlag { - t.Error("GetDuration does not work.") - } - if _, err := f.GetInt("duration"); err == nil { - t.Error("GetInt parsed a time.Duration?!?!") - } - if *optionalIntNoValueFlag != 9 { - t.Error("optional int flag should be the default value, is ", *optionalIntNoValueFlag) - } - if *optionalIntWithValueFlag != 42 { - t.Error("optional int flag should be 42, is ", *optionalIntWithValueFlag) - } - if len(f.Args()) != 1 { - t.Error("expected one argument, got", len(f.Args())) - } else if f.Args()[0] != extra { - t.Errorf("expected argument %q got %q", extra, f.Args()[0]) - } -} - -func testParseAll(f *FlagSet, t *testing.T) { - if f.Parsed() { - t.Error("f.Parse() = true before Parse") - } - f.BoolP("boola", "a", false, "bool value") - f.BoolP("boolb", "b", false, "bool2 value") - f.BoolP("boolc", "c", false, "bool3 value") - f.BoolP("boold", "d", false, "bool4 value") - f.StringP("stringa", "s", "0", "string value") - f.StringP("stringz", "z", "0", "string value") - f.StringP("stringx", "x", "0", "string value") - f.StringP("stringy", "y", "0", "string value") - f.Lookup("stringx").NoOptDefVal = "1" - args := []string{ - "-ab", - "-cs=xx", - "--stringz=something", - "-d=true", - "-x", - "-y", - "ee", - } - want := []string{ - "boola", "true", - "boolb", "true", - "boolc", "true", - "stringa", "xx", - "stringz", "something", - "boold", "true", - "stringx", "1", - "stringy", "ee", - } - got := []string{} - store := func(flag *Flag, value string) error { - got = append(got, flag.Name) - if len(value) > 0 { - got = append(got, value) - } - return nil - } - if err := f.ParseAll(args, store); err != nil { - t.Errorf("expected no error, got %s", err) - } - if !f.Parsed() { - t.Errorf("f.Parse() = false after Parse") - } - if !reflect.DeepEqual(got, want) { - t.Errorf("f.ParseAll() fail to restore the args") - t.Errorf("Got: %v", got) - t.Errorf("Want: %v", want) - } -} - -func testParseWithUnknownFlags(f *FlagSet, t *testing.T) { - if f.Parsed() { - t.Error("f.Parse() = true before Parse") - } - f.ParseErrorsWhitelist.UnknownFlags = true - - f.BoolP("boola", "a", false, "bool value") - f.BoolP("boolb", "b", false, "bool2 value") - f.BoolP("boolc", "c", false, "bool3 value") - f.BoolP("boold", "d", false, "bool4 value") - f.BoolP("boole", "e", false, "bool4 value") - f.StringP("stringa", "s", "0", "string value") - f.StringP("stringz", "z", "0", "string value") - f.StringP("stringx", "x", "0", "string value") - f.StringP("stringy", "y", "0", "string value") - f.StringP("stringo", "o", "0", "string value") - f.Lookup("stringx").NoOptDefVal = "1" - args := []string{ - "-ab", - "-cs=xx", - "--stringz=something", - "--unknown1", - "unknown1Value", - "-d=true", - "-x", - "--unknown2=unknown2Value", - "-u=unknown3Value", - "-p", - "unknown4Value", - "-q", //another unknown with bool value - "-y", - "ee", - "--unknown7=unknown7value", - "--stringo=ovalue", - "--unknown8=unknown8value", - "--boole", - "--unknown6", - } - want := []string{ - "boola", "true", - "boolb", "true", - "boolc", "true", - "stringa", "xx", - "stringz", "something", - "boold", "true", - "stringx", "1", - "stringy", "ee", - "stringo", "ovalue", - "boole", "true", - } - got := []string{} - store := func(flag *Flag, value string) error { - got = append(got, flag.Name) - if len(value) > 0 { - got = append(got, value) - } - return nil - } - if err := f.ParseAll(args, store); err != nil { - t.Errorf("expected no error, got %s", err) - } - if !f.Parsed() { - t.Errorf("f.Parse() = false after Parse") - } - if !reflect.DeepEqual(got, want) { - t.Errorf("f.ParseAll() fail to restore the args") - t.Errorf("Got: %v", got) - t.Errorf("Want: %v", want) - } -} - -func TestShorthand(t *testing.T) { - f := NewFlagSet("shorthand", ContinueOnError) - if f.Parsed() { - t.Error("f.Parse() = true before Parse") - } - boolaFlag := f.BoolP("boola", "a", false, "bool value") - boolbFlag := f.BoolP("boolb", "b", false, "bool2 value") - boolcFlag := f.BoolP("boolc", "c", false, "bool3 value") - booldFlag := f.BoolP("boold", "d", false, "bool4 value") - stringaFlag := f.StringP("stringa", "s", "0", "string value") - stringzFlag := f.StringP("stringz", "z", "0", "string value") - extra := "interspersed-argument" - notaflag := "--i-look-like-a-flag" - args := []string{ - "-ab", - extra, - "-cs", - "hello", - "-z=something", - "-d=true", - "--", - notaflag, - } - f.SetOutput(ioutil.Discard) - if err := f.Parse(args); err != nil { - t.Error("expected no error, got ", err) - } - if !f.Parsed() { - t.Error("f.Parse() = false after Parse") - } - if *boolaFlag != true { - t.Error("boola flag should be true, is ", *boolaFlag) - } - if *boolbFlag != true { - t.Error("boolb flag should be true, is ", *boolbFlag) - } - if *boolcFlag != true { - t.Error("boolc flag should be true, is ", *boolcFlag) - } - if *booldFlag != true { - t.Error("boold flag should be true, is ", *booldFlag) - } - if *stringaFlag != "hello" { - t.Error("stringa flag should be `hello`, is ", *stringaFlag) - } - if *stringzFlag != "something" { - t.Error("stringz flag should be `something`, is ", *stringzFlag) - } - if len(f.Args()) != 2 { - t.Error("expected one argument, got", len(f.Args())) - } else if f.Args()[0] != extra { - t.Errorf("expected argument %q got %q", extra, f.Args()[0]) - } else if f.Args()[1] != notaflag { - t.Errorf("expected argument %q got %q", notaflag, f.Args()[1]) - } - if f.ArgsLenAtDash() != 1 { - t.Errorf("expected argsLenAtDash %d got %d", f.ArgsLenAtDash(), 1) - } -} - -func TestShorthandLookup(t *testing.T) { - f := NewFlagSet("shorthand", ContinueOnError) - if f.Parsed() { - t.Error("f.Parse() = true before Parse") - } - f.BoolP("boola", "a", false, "bool value") - f.BoolP("boolb", "b", false, "bool2 value") - args := []string{ - "-ab", - } - f.SetOutput(ioutil.Discard) - if err := f.Parse(args); err != nil { - t.Error("expected no error, got ", err) - } - if !f.Parsed() { - t.Error("f.Parse() = false after Parse") - } - flag := f.ShorthandLookup("a") - if flag == nil { - t.Errorf("f.ShorthandLookup(\"a\") returned nil") - } - if flag.Name != "boola" { - t.Errorf("f.ShorthandLookup(\"a\") found %q instead of \"boola\"", flag.Name) - } - flag = f.ShorthandLookup("") - if flag != nil { - t.Errorf("f.ShorthandLookup(\"\") did not return nil") - } - defer func() { - recover() - }() - flag = f.ShorthandLookup("ab") - // should NEVER get here. lookup should panic. defer'd func should recover it. - t.Errorf("f.ShorthandLookup(\"ab\") did not panic") -} - -func TestParse(t *testing.T) { - ResetForTesting(func() { t.Error("bad parse") }) - testParse(GetCommandLine(), t) -} - -func TestParseAll(t *testing.T) { - ResetForTesting(func() { t.Error("bad parse") }) - testParseAll(GetCommandLine(), t) -} - -func TestIgnoreUnknownFlags(t *testing.T) { - ResetForTesting(func() { t.Error("bad parse") }) - testParseWithUnknownFlags(GetCommandLine(), t) -} - -func TestFlagSetParse(t *testing.T) { - testParse(NewFlagSet("test", ContinueOnError), t) -} - -func TestChangedHelper(t *testing.T) { - f := NewFlagSet("changedtest", ContinueOnError) - f.Bool("changed", false, "changed bool") - f.Bool("settrue", true, "true to true") - f.Bool("setfalse", false, "false to false") - f.Bool("unchanged", false, "unchanged bool") - - args := []string{"--changed", "--settrue", "--setfalse=false"} - if err := f.Parse(args); err != nil { - t.Error("f.Parse() = false after Parse") - } - if !f.Changed("changed") { - t.Errorf("--changed wasn't changed!") - } - if !f.Changed("settrue") { - t.Errorf("--settrue wasn't changed!") - } - if !f.Changed("setfalse") { - t.Errorf("--setfalse wasn't changed!") - } - if f.Changed("unchanged") { - t.Errorf("--unchanged was changed!") - } - if f.Changed("invalid") { - t.Errorf("--invalid was changed!") - } - if f.ArgsLenAtDash() != -1 { - t.Errorf("Expected argsLenAtDash: %d but got %d", -1, f.ArgsLenAtDash()) - } -} - -func replaceSeparators(name string, from []string, to string) string { - result := name - for _, sep := range from { - result = strings.Replace(result, sep, to, -1) - } - // Type convert to indicate normalization has been done. - return result -} - -func wordSepNormalizeFunc(f *FlagSet, name string) NormalizedName { - seps := []string{"-", "_"} - name = replaceSeparators(name, seps, ".") - normalizeFlagNameInvocations++ - - return NormalizedName(name) -} - -func testWordSepNormalizedNames(args []string, t *testing.T) { - f := NewFlagSet("normalized", ContinueOnError) - if f.Parsed() { - t.Error("f.Parse() = true before Parse") - } - withDashFlag := f.Bool("with-dash-flag", false, "bool value") - // Set this after some flags have been added and before others. - f.SetNormalizeFunc(wordSepNormalizeFunc) - withUnderFlag := f.Bool("with_under_flag", false, "bool value") - withBothFlag := f.Bool("with-both_flag", false, "bool value") - if err := f.Parse(args); err != nil { - t.Fatal(err) - } - if !f.Parsed() { - t.Error("f.Parse() = false after Parse") - } - if *withDashFlag != true { - t.Error("withDashFlag flag should be true, is ", *withDashFlag) - } - if *withUnderFlag != true { - t.Error("withUnderFlag flag should be true, is ", *withUnderFlag) - } - if *withBothFlag != true { - t.Error("withBothFlag flag should be true, is ", *withBothFlag) - } -} - -func TestWordSepNormalizedNames(t *testing.T) { - args := []string{ - "--with-dash-flag", - "--with-under-flag", - "--with-both-flag", - } - testWordSepNormalizedNames(args, t) - - args = []string{ - "--with_dash_flag", - "--with_under_flag", - "--with_both_flag", - } - testWordSepNormalizedNames(args, t) - - args = []string{ - "--with-dash_flag", - "--with-under_flag", - "--with-both_flag", - } - testWordSepNormalizedNames(args, t) -} - -func aliasAndWordSepFlagNames(f *FlagSet, name string) NormalizedName { - seps := []string{"-", "_"} - - oldName := replaceSeparators("old-valid_flag", seps, ".") - newName := replaceSeparators("valid-flag", seps, ".") - - name = replaceSeparators(name, seps, ".") - switch name { - case oldName: - name = newName - } - - return NormalizedName(name) -} - -func TestCustomNormalizedNames(t *testing.T) { - f := NewFlagSet("normalized", ContinueOnError) - if f.Parsed() { - t.Error("f.Parse() = true before Parse") - } - - validFlag := f.Bool("valid-flag", false, "bool value") - f.SetNormalizeFunc(aliasAndWordSepFlagNames) - someOtherFlag := f.Bool("some-other-flag", false, "bool value") - - args := []string{"--old_valid_flag", "--some-other_flag"} - if err := f.Parse(args); err != nil { - t.Fatal(err) - } - - if *validFlag != true { - t.Errorf("validFlag is %v even though we set the alias --old_valid_falg", *validFlag) - } - if *someOtherFlag != true { - t.Error("someOtherFlag should be true, is ", *someOtherFlag) - } -} - -// Every flag we add, the name (displayed also in usage) should normalized -func TestNormalizationFuncShouldChangeFlagName(t *testing.T) { - // Test normalization after addition - f := NewFlagSet("normalized", ContinueOnError) - - f.Bool("valid_flag", false, "bool value") - if f.Lookup("valid_flag").Name != "valid_flag" { - t.Error("The new flag should have the name 'valid_flag' instead of ", f.Lookup("valid_flag").Name) - } - - f.SetNormalizeFunc(wordSepNormalizeFunc) - if f.Lookup("valid_flag").Name != "valid.flag" { - t.Error("The new flag should have the name 'valid.flag' instead of ", f.Lookup("valid_flag").Name) - } - - // Test normalization before addition - f = NewFlagSet("normalized", ContinueOnError) - f.SetNormalizeFunc(wordSepNormalizeFunc) - - f.Bool("valid_flag", false, "bool value") - if f.Lookup("valid_flag").Name != "valid.flag" { - t.Error("The new flag should have the name 'valid.flag' instead of ", f.Lookup("valid_flag").Name) - } -} - -// Related to https://github.com/spf13/cobra/issues/521. -func TestNormalizationSharedFlags(t *testing.T) { - f := NewFlagSet("set f", ContinueOnError) - g := NewFlagSet("set g", ContinueOnError) - nfunc := wordSepNormalizeFunc - testName := "valid_flag" - normName := nfunc(nil, testName) - if testName == string(normName) { - t.Error("TestNormalizationSharedFlags meaningless: the original and normalized flag names are identical:", testName) - } - - f.Bool(testName, false, "bool value") - g.AddFlagSet(f) - - f.SetNormalizeFunc(nfunc) - g.SetNormalizeFunc(nfunc) - - if len(f.formal) != 1 { - t.Error("Normalizing flags should not result in duplications in the flag set:", f.formal) - } - if f.orderedFormal[0].Name != string(normName) { - t.Error("Flag name not normalized") - } - for k := range f.formal { - if k != "valid.flag" { - t.Errorf("The key in the flag map should have been normalized: wanted \"%s\", got \"%s\" instead", normName, k) - } - } - - if !reflect.DeepEqual(f.formal, g.formal) || !reflect.DeepEqual(f.orderedFormal, g.orderedFormal) { - t.Error("Two flag sets sharing the same flags should stay consistent after being normalized. Original set:", f.formal, "Duplicate set:", g.formal) - } -} - -func TestNormalizationSetFlags(t *testing.T) { - f := NewFlagSet("normalized", ContinueOnError) - nfunc := wordSepNormalizeFunc - testName := "valid_flag" - normName := nfunc(nil, testName) - if testName == string(normName) { - t.Error("TestNormalizationSetFlags meaningless: the original and normalized flag names are identical:", testName) - } - - f.Bool(testName, false, "bool value") - f.Set(testName, "true") - f.SetNormalizeFunc(nfunc) - - if len(f.formal) != 1 { - t.Error("Normalizing flags should not result in duplications in the flag set:", f.formal) - } - if f.orderedFormal[0].Name != string(normName) { - t.Error("Flag name not normalized") - } - for k := range f.formal { - if k != "valid.flag" { - t.Errorf("The key in the flag map should have been normalized: wanted \"%s\", got \"%s\" instead", normName, k) - } - } - - if !reflect.DeepEqual(f.formal, f.actual) { - t.Error("The map of set flags should get normalized. Formal:", f.formal, "Actual:", f.actual) - } -} - -// Declare a user-defined flag type. -type flagVar []string - -func (f *flagVar) String() string { - return fmt.Sprint([]string(*f)) -} - -func (f *flagVar) Set(value string) error { - *f = append(*f, value) - return nil -} - -func (f *flagVar) Type() string { - return "flagVar" -} - -func TestUserDefined(t *testing.T) { - var flags FlagSet - flags.Init("test", ContinueOnError) - var v flagVar - flags.VarP(&v, "v", "v", "usage") - if err := flags.Parse([]string{"--v=1", "-v2", "-v", "3"}); err != nil { - t.Error(err) - } - if len(v) != 3 { - t.Fatal("expected 3 args; got ", len(v)) - } - expect := "[1 2 3]" - if v.String() != expect { - t.Errorf("expected value %q got %q", expect, v.String()) - } -} - -func TestSetOutput(t *testing.T) { - var flags FlagSet - var buf bytes.Buffer - flags.SetOutput(&buf) - flags.Init("test", ContinueOnError) - flags.Parse([]string{"--unknown"}) - if out := buf.String(); !strings.Contains(out, "--unknown") { - t.Logf("expected output mentioning unknown; got %q", out) - } -} - -// This tests that one can reset the flags. This still works but not well, and is -// superseded by FlagSet. -func TestChangingArgs(t *testing.T) { - ResetForTesting(func() { t.Fatal("bad parse") }) - oldArgs := os.Args - defer func() { os.Args = oldArgs }() - os.Args = []string{"cmd", "--before", "subcmd"} - before := Bool("before", false, "") - if err := GetCommandLine().Parse(os.Args[1:]); err != nil { - t.Fatal(err) - } - cmd := Arg(0) - os.Args = []string{"subcmd", "--after", "args"} - after := Bool("after", false, "") - Parse() - args := Args() - - if !*before || cmd != "subcmd" || !*after || len(args) != 1 || args[0] != "args" { - t.Fatalf("expected true subcmd true [args] got %v %v %v %v", *before, cmd, *after, args) - } -} - -// Test that -help invokes the usage message and returns ErrHelp. -func TestHelp(t *testing.T) { - var helpCalled = false - fs := NewFlagSet("help test", ContinueOnError) - fs.Usage = func() { helpCalled = true } - var flag bool - fs.BoolVar(&flag, "flag", false, "regular flag") - // Regular flag invocation should work - err := fs.Parse([]string{"--flag=true"}) - if err != nil { - t.Fatal("expected no error; got ", err) - } - if !flag { - t.Error("flag was not set by --flag") - } - if helpCalled { - t.Error("help called for regular flag") - helpCalled = false // reset for next test - } - // Help flag should work as expected. - err = fs.Parse([]string{"--help"}) - if err == nil { - t.Fatal("error expected") - } - if err != ErrHelp { - t.Fatal("expected ErrHelp; got ", err) - } - if !helpCalled { - t.Fatal("help was not called") - } - // If we define a help flag, that should override. - var help bool - fs.BoolVar(&help, "help", false, "help flag") - helpCalled = false - err = fs.Parse([]string{"--help"}) - if err != nil { - t.Fatal("expected no error for defined --help; got ", err) - } - if helpCalled { - t.Fatal("help was called; should not have been for defined help flag") - } -} - -func TestNoInterspersed(t *testing.T) { - f := NewFlagSet("test", ContinueOnError) - f.SetInterspersed(false) - f.Bool("true", true, "always true") - f.Bool("false", false, "always false") - err := f.Parse([]string{"--true", "break", "--false"}) - if err != nil { - t.Fatal("expected no error; got ", err) - } - args := f.Args() - if len(args) != 2 || args[0] != "break" || args[1] != "--false" { - t.Fatal("expected interspersed options/non-options to fail") - } -} - -func TestTermination(t *testing.T) { - f := NewFlagSet("termination", ContinueOnError) - boolFlag := f.BoolP("bool", "l", false, "bool value") - if f.Parsed() { - t.Error("f.Parse() = true before Parse") - } - arg1 := "ls" - arg2 := "-l" - args := []string{ - "--", - arg1, - arg2, - } - f.SetOutput(ioutil.Discard) - if err := f.Parse(args); err != nil { - t.Fatal("expected no error; got ", err) - } - if !f.Parsed() { - t.Error("f.Parse() = false after Parse") - } - if *boolFlag { - t.Error("expected boolFlag=false, got true") - } - if len(f.Args()) != 2 { - t.Errorf("expected 2 arguments, got %d: %v", len(f.Args()), f.Args()) - } - if f.Args()[0] != arg1 { - t.Errorf("expected argument %q got %q", arg1, f.Args()[0]) - } - if f.Args()[1] != arg2 { - t.Errorf("expected argument %q got %q", arg2, f.Args()[1]) - } - if f.ArgsLenAtDash() != 0 { - t.Errorf("expected argsLenAtDash %d got %d", 0, f.ArgsLenAtDash()) - } -} - -func getDeprecatedFlagSet() *FlagSet { - f := NewFlagSet("bob", ContinueOnError) - f.Bool("badflag", true, "always true") - f.MarkDeprecated("badflag", "use --good-flag instead") - return f -} -func TestDeprecatedFlagInDocs(t *testing.T) { - f := getDeprecatedFlagSet() - - out := new(bytes.Buffer) - f.SetOutput(out) - f.PrintDefaults() - - if strings.Contains(out.String(), "badflag") { - t.Errorf("found deprecated flag in usage!") - } -} - -func TestUnHiddenDeprecatedFlagInDocs(t *testing.T) { - f := getDeprecatedFlagSet() - flg := f.Lookup("badflag") - if flg == nil { - t.Fatalf("Unable to lookup 'bob' in TestUnHiddenDeprecatedFlagInDocs") - } - flg.Hidden = false - - out := new(bytes.Buffer) - f.SetOutput(out) - f.PrintDefaults() - - defaults := out.String() - if !strings.Contains(defaults, "badflag") { - t.Errorf("Did not find deprecated flag in usage!") - } - if !strings.Contains(defaults, "use --good-flag instead") { - t.Errorf("Did not find 'use --good-flag instead' in defaults") - } -} - -func TestDeprecatedFlagShorthandInDocs(t *testing.T) { - f := NewFlagSet("bob", ContinueOnError) - name := "noshorthandflag" - f.BoolP(name, "n", true, "always true") - f.MarkShorthandDeprecated("noshorthandflag", fmt.Sprintf("use --%s instead", name)) - - out := new(bytes.Buffer) - f.SetOutput(out) - f.PrintDefaults() - - if strings.Contains(out.String(), "-n,") { - t.Errorf("found deprecated flag shorthand in usage!") - } -} - -func parseReturnStderr(t *testing.T, f *FlagSet, args []string) (string, error) { - oldStderr := os.Stderr - r, w, _ := os.Pipe() - os.Stderr = w - - err := f.Parse(args) - - outC := make(chan string) - // copy the output in a separate goroutine so printing can't block indefinitely - go func() { - var buf bytes.Buffer - io.Copy(&buf, r) - outC <- buf.String() - }() - - w.Close() - os.Stderr = oldStderr - out := <-outC - - return out, err -} - -func TestDeprecatedFlagUsage(t *testing.T) { - f := NewFlagSet("bob", ContinueOnError) - f.Bool("badflag", true, "always true") - usageMsg := "use --good-flag instead" - f.MarkDeprecated("badflag", usageMsg) - - args := []string{"--badflag"} - out, err := parseReturnStderr(t, f, args) - if err != nil { - t.Fatal("expected no error; got ", err) - } - - if !strings.Contains(out, usageMsg) { - t.Errorf("usageMsg not printed when using a deprecated flag!") - } -} - -func TestDeprecatedFlagShorthandUsage(t *testing.T) { - f := NewFlagSet("bob", ContinueOnError) - name := "noshorthandflag" - f.BoolP(name, "n", true, "always true") - usageMsg := fmt.Sprintf("use --%s instead", name) - f.MarkShorthandDeprecated(name, usageMsg) - - args := []string{"-n"} - out, err := parseReturnStderr(t, f, args) - if err != nil { - t.Fatal("expected no error; got ", err) - } - - if !strings.Contains(out, usageMsg) { - t.Errorf("usageMsg not printed when using a deprecated flag!") - } -} - -func TestDeprecatedFlagUsageNormalized(t *testing.T) { - f := NewFlagSet("bob", ContinueOnError) - f.Bool("bad-double_flag", true, "always true") - f.SetNormalizeFunc(wordSepNormalizeFunc) - usageMsg := "use --good-flag instead" - f.MarkDeprecated("bad_double-flag", usageMsg) - - args := []string{"--bad_double_flag"} - out, err := parseReturnStderr(t, f, args) - if err != nil { - t.Fatal("expected no error; got ", err) - } - - if !strings.Contains(out, usageMsg) { - t.Errorf("usageMsg not printed when using a deprecated flag!") - } -} - -// Name normalization function should be called only once on flag addition -func TestMultipleNormalizeFlagNameInvocations(t *testing.T) { - normalizeFlagNameInvocations = 0 - - f := NewFlagSet("normalized", ContinueOnError) - f.SetNormalizeFunc(wordSepNormalizeFunc) - f.Bool("with_under_flag", false, "bool value") - - if normalizeFlagNameInvocations != 1 { - t.Fatal("Expected normalizeFlagNameInvocations to be 1; got ", normalizeFlagNameInvocations) - } -} - -// -func TestHiddenFlagInUsage(t *testing.T) { - f := NewFlagSet("bob", ContinueOnError) - f.Bool("secretFlag", true, "shhh") - f.MarkHidden("secretFlag") - - out := new(bytes.Buffer) - f.SetOutput(out) - f.PrintDefaults() - - if strings.Contains(out.String(), "secretFlag") { - t.Errorf("found hidden flag in usage!") - } -} - -// -func TestHiddenFlagUsage(t *testing.T) { - f := NewFlagSet("bob", ContinueOnError) - f.Bool("secretFlag", true, "shhh") - f.MarkHidden("secretFlag") - - args := []string{"--secretFlag"} - out, err := parseReturnStderr(t, f, args) - if err != nil { - t.Fatal("expected no error; got ", err) - } - - if strings.Contains(out, "shhh") { - t.Errorf("usage message printed when using a hidden flag!") - } -} - -const defaultOutput = ` --A for bootstrapping, allow 'any' type - --Alongflagname disable bounds checking - -C, --CCC a boolean defaulting to true (default true) - --D path set relative path for local imports - -E, --EEE num[=1234] a num with NoOptDefVal (default 4321) - --F number a non-zero number (default 2.7) - --G float a float that defaults to zero - --IP ip IP address with no default - --IPMask ipMask Netmask address with no default - --IPNet ipNet IP network with no default - --Ints ints int slice with zero default - --N int a non-zero int (default 27) - --ND1 string[="bar"] a string with NoOptDefVal (default "foo") - --ND2 num[=4321] a num with NoOptDefVal (default 1234) - --StringArray stringArray string array with zero default - --StringSlice strings string slice with zero default - --Z int an int that defaults to zero - --custom custom custom Value implementation - --customP custom a VarP with default (default 10) - --maxT timeout set timeout for dial - -v, --verbose count verbosity -` - -// Custom value that satisfies the Value interface. -type customValue int - -func (cv *customValue) String() string { return fmt.Sprintf("%v", *cv) } - -func (cv *customValue) Set(s string) error { - v, err := strconv.ParseInt(s, 0, 64) - *cv = customValue(v) - return err -} - -func (cv *customValue) Type() string { return "custom" } - -func TestPrintDefaults(t *testing.T) { - fs := NewFlagSet("print defaults test", ContinueOnError) - var buf bytes.Buffer - fs.SetOutput(&buf) - fs.Bool("A", false, "for bootstrapping, allow 'any' type") - fs.Bool("Alongflagname", false, "disable bounds checking") - fs.BoolP("CCC", "C", true, "a boolean defaulting to true") - fs.String("D", "", "set relative `path` for local imports") - fs.Float64("F", 2.7, "a non-zero `number`") - fs.Float64("G", 0, "a float that defaults to zero") - fs.Int("N", 27, "a non-zero int") - fs.IntSlice("Ints", []int{}, "int slice with zero default") - fs.IP("IP", nil, "IP address with no default") - fs.IPMask("IPMask", nil, "Netmask address with no default") - fs.IPNet("IPNet", net.IPNet{}, "IP network with no default") - fs.Int("Z", 0, "an int that defaults to zero") - fs.Duration("maxT", 0, "set `timeout` for dial") - fs.String("ND1", "foo", "a string with NoOptDefVal") - fs.Lookup("ND1").NoOptDefVal = "bar" - fs.Int("ND2", 1234, "a `num` with NoOptDefVal") - fs.Lookup("ND2").NoOptDefVal = "4321" - fs.IntP("EEE", "E", 4321, "a `num` with NoOptDefVal") - fs.ShorthandLookup("E").NoOptDefVal = "1234" - fs.StringSlice("StringSlice", []string{}, "string slice with zero default") - fs.StringArray("StringArray", []string{}, "string array with zero default") - fs.CountP("verbose", "v", "verbosity") - - var cv customValue - fs.Var(&cv, "custom", "custom Value implementation") - - cv2 := customValue(10) - fs.VarP(&cv2, "customP", "", "a VarP with default") - - fs.PrintDefaults() - got := buf.String() - if got != defaultOutput { - fmt.Println("\n" + got) - fmt.Println("\n" + defaultOutput) - t.Errorf("got %q want %q\n", got, defaultOutput) - } -} - -func TestVisitAllFlagOrder(t *testing.T) { - fs := NewFlagSet("TestVisitAllFlagOrder", ContinueOnError) - fs.SortFlags = false - // https://github.com/spf13/pflag/issues/120 - fs.SetNormalizeFunc(func(f *FlagSet, name string) NormalizedName { - return NormalizedName(name) - }) - - names := []string{"C", "B", "A", "D"} - for _, name := range names { - fs.Bool(name, false, "") - } - - i := 0 - fs.VisitAll(func(f *Flag) { - if names[i] != f.Name { - t.Errorf("Incorrect order. Expected %v, got %v", names[i], f.Name) - } - i++ - }) -} - -func TestVisitFlagOrder(t *testing.T) { - fs := NewFlagSet("TestVisitFlagOrder", ContinueOnError) - fs.SortFlags = false - names := []string{"C", "B", "A", "D"} - for _, name := range names { - fs.Bool(name, false, "") - fs.Set(name, "true") - } - - i := 0 - fs.Visit(func(f *Flag) { - if names[i] != f.Name { - t.Errorf("Incorrect order. Expected %v, got %v", names[i], f.Name) - } - i++ - }) -} diff --git a/vendor/github.com/spf13/pflag/golangflag_test.go b/vendor/github.com/spf13/pflag/golangflag_test.go deleted file mode 100644 index 5bd831bf..00000000 --- a/vendor/github.com/spf13/pflag/golangflag_test.go +++ /dev/null @@ -1,47 +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 pflag - -import ( - goflag "flag" - "testing" -) - -func TestGoflags(t *testing.T) { - goflag.String("stringFlag", "stringFlag", "stringFlag") - goflag.Bool("boolFlag", false, "boolFlag") - - f := NewFlagSet("test", ContinueOnError) - - f.AddGoFlagSet(goflag.CommandLine) - err := f.Parse([]string{"--stringFlag=bob", "--boolFlag"}) - if err != nil { - t.Fatal("expected no error; get", err) - } - - getString, err := f.GetString("stringFlag") - if err != nil { - t.Fatal("expected no error; get", err) - } - if getString != "bob" { - t.Fatalf("expected getString=bob but got getString=%s", getString) - } - - getBool, err := f.GetBool("boolFlag") - if err != nil { - t.Fatal("expected no error; get", err) - } - if getBool != true { - t.Fatalf("expected getBool=true but got getBool=%v", getBool) - } - if !f.Parsed() { - t.Fatal("f.Parsed() return false after f.Parse() called") - } - - // in fact it is useless. because `go test` called flag.Parse() - if !goflag.CommandLine.Parsed() { - t.Fatal("goflag.CommandLine.Parsed() return false after f.Parse() called") - } -} diff --git a/vendor/github.com/spf13/pflag/int_slice_test.go b/vendor/github.com/spf13/pflag/int_slice_test.go deleted file mode 100644 index 745aecb9..00000000 --- a/vendor/github.com/spf13/pflag/int_slice_test.go +++ /dev/null @@ -1,165 +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 pflag - -import ( - "fmt" - "strconv" - "strings" - "testing" -) - -func setUpISFlagSet(isp *[]int) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - f.IntSliceVar(isp, "is", []int{}, "Command separated list!") - return f -} - -func setUpISFlagSetWithDefault(isp *[]int) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - f.IntSliceVar(isp, "is", []int{0, 1}, "Command separated list!") - return f -} - -func TestEmptyIS(t *testing.T) { - var is []int - f := setUpISFlagSet(&is) - err := f.Parse([]string{}) - if err != nil { - t.Fatal("expected no error; got", err) - } - - getIS, err := f.GetIntSlice("is") - if err != nil { - t.Fatal("got an error from GetIntSlice():", err) - } - if len(getIS) != 0 { - t.Fatalf("got is %v with len=%d but expected length=0", getIS, len(getIS)) - } -} - -func TestIS(t *testing.T) { - var is []int - f := setUpISFlagSet(&is) - - vals := []string{"1", "2", "4", "3"} - arg := fmt.Sprintf("--is=%s", strings.Join(vals, ",")) - err := f.Parse([]string{arg}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range is { - d, err := strconv.Atoi(vals[i]) - if err != nil { - t.Fatalf("got error: %v", err) - } - if d != v { - t.Fatalf("expected is[%d] to be %s but got: %d", i, vals[i], v) - } - } - getIS, err := f.GetIntSlice("is") - if err != nil { - t.Fatalf("got error: %v", err) - } - for i, v := range getIS { - d, err := strconv.Atoi(vals[i]) - if err != nil { - t.Fatalf("got error: %v", err) - } - if d != v { - t.Fatalf("expected is[%d] to be %s but got: %d from GetIntSlice", i, vals[i], v) - } - } -} - -func TestISDefault(t *testing.T) { - var is []int - f := setUpISFlagSetWithDefault(&is) - - vals := []string{"0", "1"} - - err := f.Parse([]string{}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range is { - d, err := strconv.Atoi(vals[i]) - if err != nil { - t.Fatalf("got error: %v", err) - } - if d != v { - t.Fatalf("expected is[%d] to be %d but got: %d", i, d, v) - } - } - - getIS, err := f.GetIntSlice("is") - if err != nil { - t.Fatal("got an error from GetIntSlice():", err) - } - for i, v := range getIS { - d, err := strconv.Atoi(vals[i]) - if err != nil { - t.Fatal("got an error from GetIntSlice():", err) - } - if d != v { - t.Fatalf("expected is[%d] to be %d from GetIntSlice but got: %d", i, d, v) - } - } -} - -func TestISWithDefault(t *testing.T) { - var is []int - f := setUpISFlagSetWithDefault(&is) - - vals := []string{"1", "2"} - arg := fmt.Sprintf("--is=%s", strings.Join(vals, ",")) - err := f.Parse([]string{arg}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range is { - d, err := strconv.Atoi(vals[i]) - if err != nil { - t.Fatalf("got error: %v", err) - } - if d != v { - t.Fatalf("expected is[%d] to be %d but got: %d", i, d, v) - } - } - - getIS, err := f.GetIntSlice("is") - if err != nil { - t.Fatal("got an error from GetIntSlice():", err) - } - for i, v := range getIS { - d, err := strconv.Atoi(vals[i]) - if err != nil { - t.Fatalf("got error: %v", err) - } - if d != v { - t.Fatalf("expected is[%d] to be %d from GetIntSlice but got: %d", i, d, v) - } - } -} - -func TestISCalledTwice(t *testing.T) { - var is []int - f := setUpISFlagSet(&is) - - in := []string{"1,2", "3"} - expected := []int{1, 2, 3} - argfmt := "--is=%s" - arg1 := fmt.Sprintf(argfmt, in[0]) - arg2 := fmt.Sprintf(argfmt, in[1]) - err := f.Parse([]string{arg1, arg2}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range is { - if expected[i] != v { - t.Fatalf("expected is[%d] to be %d but got: %d", i, expected[i], v) - } - } -} diff --git a/vendor/github.com/spf13/pflag/ip_slice_test.go b/vendor/github.com/spf13/pflag/ip_slice_test.go deleted file mode 100644 index b0c681c5..00000000 --- a/vendor/github.com/spf13/pflag/ip_slice_test.go +++ /dev/null @@ -1,222 +0,0 @@ -package pflag - -import ( - "fmt" - "net" - "strings" - "testing" -) - -func setUpIPSFlagSet(ipsp *[]net.IP) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - f.IPSliceVar(ipsp, "ips", []net.IP{}, "Command separated list!") - return f -} - -func setUpIPSFlagSetWithDefault(ipsp *[]net.IP) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - f.IPSliceVar(ipsp, "ips", - []net.IP{ - net.ParseIP("192.168.1.1"), - net.ParseIP("0:0:0:0:0:0:0:1"), - }, - "Command separated list!") - return f -} - -func TestEmptyIP(t *testing.T) { - var ips []net.IP - f := setUpIPSFlagSet(&ips) - err := f.Parse([]string{}) - if err != nil { - t.Fatal("expected no error; got", err) - } - - getIPS, err := f.GetIPSlice("ips") - if err != nil { - t.Fatal("got an error from GetIPSlice():", err) - } - if len(getIPS) != 0 { - t.Fatalf("got ips %v with len=%d but expected length=0", getIPS, len(getIPS)) - } -} - -func TestIPS(t *testing.T) { - var ips []net.IP - f := setUpIPSFlagSet(&ips) - - vals := []string{"192.168.1.1", "10.0.0.1", "0:0:0:0:0:0:0:2"} - arg := fmt.Sprintf("--ips=%s", strings.Join(vals, ",")) - err := f.Parse([]string{arg}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range ips { - if ip := net.ParseIP(vals[i]); ip == nil { - t.Fatalf("invalid string being converted to IP address: %s", vals[i]) - } else if !ip.Equal(v) { - t.Fatalf("expected ips[%d] to be %s but got: %s from GetIPSlice", i, vals[i], v) - } - } -} - -func TestIPSDefault(t *testing.T) { - var ips []net.IP - f := setUpIPSFlagSetWithDefault(&ips) - - vals := []string{"192.168.1.1", "0:0:0:0:0:0:0:1"} - err := f.Parse([]string{}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range ips { - if ip := net.ParseIP(vals[i]); ip == nil { - t.Fatalf("invalid string being converted to IP address: %s", vals[i]) - } else if !ip.Equal(v) { - t.Fatalf("expected ips[%d] to be %s but got: %s", i, vals[i], v) - } - } - - getIPS, err := f.GetIPSlice("ips") - if err != nil { - t.Fatal("got an error from GetIPSlice") - } - for i, v := range getIPS { - if ip := net.ParseIP(vals[i]); ip == nil { - t.Fatalf("invalid string being converted to IP address: %s", vals[i]) - } else if !ip.Equal(v) { - t.Fatalf("expected ips[%d] to be %s but got: %s", i, vals[i], v) - } - } -} - -func TestIPSWithDefault(t *testing.T) { - var ips []net.IP - f := setUpIPSFlagSetWithDefault(&ips) - - vals := []string{"192.168.1.1", "0:0:0:0:0:0:0:1"} - arg := fmt.Sprintf("--ips=%s", strings.Join(vals, ",")) - err := f.Parse([]string{arg}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range ips { - if ip := net.ParseIP(vals[i]); ip == nil { - t.Fatalf("invalid string being converted to IP address: %s", vals[i]) - } else if !ip.Equal(v) { - t.Fatalf("expected ips[%d] to be %s but got: %s", i, vals[i], v) - } - } - - getIPS, err := f.GetIPSlice("ips") - if err != nil { - t.Fatal("got an error from GetIPSlice") - } - for i, v := range getIPS { - if ip := net.ParseIP(vals[i]); ip == nil { - t.Fatalf("invalid string being converted to IP address: %s", vals[i]) - } else if !ip.Equal(v) { - t.Fatalf("expected ips[%d] to be %s but got: %s", i, vals[i], v) - } - } -} - -func TestIPSCalledTwice(t *testing.T) { - var ips []net.IP - f := setUpIPSFlagSet(&ips) - - in := []string{"192.168.1.2,0:0:0:0:0:0:0:1", "10.0.0.1"} - expected := []net.IP{net.ParseIP("192.168.1.2"), net.ParseIP("0:0:0:0:0:0:0:1"), net.ParseIP("10.0.0.1")} - argfmt := "ips=%s" - arg1 := fmt.Sprintf(argfmt, in[0]) - arg2 := fmt.Sprintf(argfmt, in[1]) - err := f.Parse([]string{arg1, arg2}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range ips { - if !expected[i].Equal(v) { - t.Fatalf("expected ips[%d] to be %s but got: %s", i, expected[i], v) - } - } -} - -func TestIPSBadQuoting(t *testing.T) { - - tests := []struct { - Want []net.IP - FlagArg []string - }{ - { - Want: []net.IP{ - net.ParseIP("a4ab:61d:f03e:5d7d:fad7:d4c2:a1a5:568"), - net.ParseIP("203.107.49.208"), - net.ParseIP("14.57.204.90"), - }, - FlagArg: []string{ - "a4ab:61d:f03e:5d7d:fad7:d4c2:a1a5:568", - "203.107.49.208", - "14.57.204.90", - }, - }, - { - Want: []net.IP{ - net.ParseIP("204.228.73.195"), - net.ParseIP("86.141.15.94"), - }, - FlagArg: []string{ - "204.228.73.195", - "86.141.15.94", - }, - }, - { - Want: []net.IP{ - net.ParseIP("c70c:db36:3001:890f:c6ea:3f9b:7a39:cc3f"), - net.ParseIP("4d17:1d6e:e699:bd7a:88c5:5e7e:ac6a:4472"), - }, - FlagArg: []string{ - "c70c:db36:3001:890f:c6ea:3f9b:7a39:cc3f", - "4d17:1d6e:e699:bd7a:88c5:5e7e:ac6a:4472", - }, - }, - { - Want: []net.IP{ - net.ParseIP("5170:f971:cfac:7be3:512a:af37:952c:bc33"), - net.ParseIP("93.21.145.140"), - net.ParseIP("2cac:61d3:c5ff:6caf:73e0:1b1a:c336:c1ca"), - }, - FlagArg: []string{ - " 5170:f971:cfac:7be3:512a:af37:952c:bc33 , 93.21.145.140 ", - "2cac:61d3:c5ff:6caf:73e0:1b1a:c336:c1ca", - }, - }, - { - Want: []net.IP{ - net.ParseIP("2e5e:66b2:6441:848:5b74:76ea:574c:3a7b"), - net.ParseIP("2e5e:66b2:6441:848:5b74:76ea:574c:3a7b"), - net.ParseIP("2e5e:66b2:6441:848:5b74:76ea:574c:3a7b"), - net.ParseIP("2e5e:66b2:6441:848:5b74:76ea:574c:3a7b"), - }, - FlagArg: []string{ - `"2e5e:66b2:6441:848:5b74:76ea:574c:3a7b, 2e5e:66b2:6441:848:5b74:76ea:574c:3a7b,2e5e:66b2:6441:848:5b74:76ea:574c:3a7b "`, - " 2e5e:66b2:6441:848:5b74:76ea:574c:3a7b"}, - }, - } - - for i, test := range tests { - - var ips []net.IP - f := setUpIPSFlagSet(&ips) - - if err := f.Parse([]string{fmt.Sprintf("--ips=%s", strings.Join(test.FlagArg, ","))}); err != nil { - t.Fatalf("flag parsing failed with error: %s\nparsing:\t%#v\nwant:\t\t%s", - err, test.FlagArg, test.Want[i]) - } - - for j, b := range ips { - if !b.Equal(test.Want[j]) { - t.Fatalf("bad value parsed for test %d on net.IP %d:\nwant:\t%s\ngot:\t%s", i, j, test.Want[j], b) - } - } - } -} diff --git a/vendor/github.com/spf13/pflag/ip_test.go b/vendor/github.com/spf13/pflag/ip_test.go deleted file mode 100644 index 1fec50e4..00000000 --- a/vendor/github.com/spf13/pflag/ip_test.go +++ /dev/null @@ -1,63 +0,0 @@ -package pflag - -import ( - "fmt" - "net" - "os" - "testing" -) - -func setUpIP(ip *net.IP) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - f.IPVar(ip, "address", net.ParseIP("0.0.0.0"), "IP Address") - return f -} - -func TestIP(t *testing.T) { - testCases := []struct { - input string - success bool - expected string - }{ - {"0.0.0.0", true, "0.0.0.0"}, - {" 0.0.0.0 ", true, "0.0.0.0"}, - {"1.2.3.4", true, "1.2.3.4"}, - {"127.0.0.1", true, "127.0.0.1"}, - {"255.255.255.255", true, "255.255.255.255"}, - {"", false, ""}, - {"0", false, ""}, - {"localhost", false, ""}, - {"0.0.0", false, ""}, - {"0.0.0.", false, ""}, - {"0.0.0.0.", false, ""}, - {"0.0.0.256", false, ""}, - {"0 . 0 . 0 . 0", false, ""}, - } - - devnull, _ := os.Open(os.DevNull) - os.Stderr = devnull - for i := range testCases { - var addr net.IP - f := setUpIP(&addr) - - tc := &testCases[i] - - arg := fmt.Sprintf("--address=%s", tc.input) - err := f.Parse([]string{arg}) - if err != nil && tc.success == true { - t.Errorf("expected success, got %q", err) - continue - } else if err == nil && tc.success == false { - t.Errorf("expected failure") - continue - } else if tc.success { - ip, err := f.GetIP("address") - if err != nil { - t.Errorf("Got error trying to fetch the IP flag: %v", err) - } - if ip.String() != tc.expected { - t.Errorf("expected %q, got %q", tc.expected, ip.String()) - } - } - } -} diff --git a/vendor/github.com/spf13/pflag/ipnet_test.go b/vendor/github.com/spf13/pflag/ipnet_test.go deleted file mode 100644 index 335b6fa1..00000000 --- a/vendor/github.com/spf13/pflag/ipnet_test.go +++ /dev/null @@ -1,70 +0,0 @@ -package pflag - -import ( - "fmt" - "net" - "os" - "testing" -) - -func setUpIPNet(ip *net.IPNet) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - _, def, _ := net.ParseCIDR("0.0.0.0/0") - f.IPNetVar(ip, "address", *def, "IP Address") - return f -} - -func TestIPNet(t *testing.T) { - testCases := []struct { - input string - success bool - expected string - }{ - {"0.0.0.0/0", true, "0.0.0.0/0"}, - {" 0.0.0.0/0 ", true, "0.0.0.0/0"}, - {"1.2.3.4/8", true, "1.0.0.0/8"}, - {"127.0.0.1/16", true, "127.0.0.0/16"}, - {"255.255.255.255/19", true, "255.255.224.0/19"}, - {"255.255.255.255/32", true, "255.255.255.255/32"}, - {"", false, ""}, - {"/0", false, ""}, - {"0", false, ""}, - {"0/0", false, ""}, - {"localhost/0", false, ""}, - {"0.0.0/4", false, ""}, - {"0.0.0./8", false, ""}, - {"0.0.0.0./12", false, ""}, - {"0.0.0.256/16", false, ""}, - {"0.0.0.0 /20", false, ""}, - {"0.0.0.0/ 24", false, ""}, - {"0 . 0 . 0 . 0 / 28", false, ""}, - {"0.0.0.0/33", false, ""}, - } - - devnull, _ := os.Open(os.DevNull) - os.Stderr = devnull - for i := range testCases { - var addr net.IPNet - f := setUpIPNet(&addr) - - tc := &testCases[i] - - arg := fmt.Sprintf("--address=%s", tc.input) - err := f.Parse([]string{arg}) - if err != nil && tc.success == true { - t.Errorf("expected success, got %q", err) - continue - } else if err == nil && tc.success == false { - t.Errorf("expected failure") - continue - } else if tc.success { - ip, err := f.GetIPNet("address") - if err != nil { - t.Errorf("Got error trying to fetch the IP flag: %v", err) - } - if ip.String() != tc.expected { - t.Errorf("expected %q, got %q", tc.expected, ip.String()) - } - } - } -} diff --git a/vendor/github.com/spf13/pflag/printusage_test.go b/vendor/github.com/spf13/pflag/printusage_test.go deleted file mode 100644 index df982aab..00000000 --- a/vendor/github.com/spf13/pflag/printusage_test.go +++ /dev/null @@ -1,74 +0,0 @@ -package pflag - -import ( - "bytes" - "io" - "testing" -) - -const expectedOutput = ` --long-form Some description - --long-form2 Some description - with multiline - -s, --long-name Some description - -t, --long-name2 Some description with - multiline -` - -func setUpPFlagSet(buf io.Writer) *FlagSet { - f := NewFlagSet("test", ExitOnError) - f.Bool("long-form", false, "Some description") - f.Bool("long-form2", false, "Some description\n with multiline") - f.BoolP("long-name", "s", false, "Some description") - f.BoolP("long-name2", "t", false, "Some description with\n multiline") - f.SetOutput(buf) - return f -} - -func TestPrintUsage(t *testing.T) { - buf := bytes.Buffer{} - f := setUpPFlagSet(&buf) - f.PrintDefaults() - res := buf.String() - if res != expectedOutput { - t.Errorf("Expected \n%s \nActual \n%s", expectedOutput, res) - } -} - -func setUpPFlagSet2(buf io.Writer) *FlagSet { - f := NewFlagSet("test", ExitOnError) - f.Bool("long-form", false, "Some description") - f.Bool("long-form2", false, "Some description\n with multiline") - f.BoolP("long-name", "s", false, "Some description") - f.BoolP("long-name2", "t", false, "Some description with\n multiline") - f.StringP("some-very-long-arg", "l", "test", "Some very long description having break the limit") - f.StringP("other-very-long-arg", "o", "long-default-value", "Some very long description having break the limit") - f.String("some-very-long-arg2", "very long default value", "Some very long description\nwith line break\nmultiple") - f.SetOutput(buf) - return f -} - -const expectedOutput2 = ` --long-form Some description - --long-form2 Some description - with multiline - -s, --long-name Some description - -t, --long-name2 Some description with - multiline - -o, --other-very-long-arg string Some very long description having - break the limit (default - "long-default-value") - -l, --some-very-long-arg string Some very long description having - break the limit (default "test") - --some-very-long-arg2 string Some very long description - with line break - multiple (default "very long default - value") -` - -func TestPrintUsage_2(t *testing.T) { - buf := bytes.Buffer{} - f := setUpPFlagSet2(&buf) - res := f.FlagUsagesWrapped(80) - if res != expectedOutput2 { - t.Errorf("Expected \n%q \nActual \n%q", expectedOutput2, res) - } -} diff --git a/vendor/github.com/spf13/pflag/string_array_test.go b/vendor/github.com/spf13/pflag/string_array_test.go deleted file mode 100644 index 1ceac8c6..00000000 --- a/vendor/github.com/spf13/pflag/string_array_test.go +++ /dev/null @@ -1,233 +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 pflag - -import ( - "fmt" - "testing" -) - -func setUpSAFlagSet(sap *[]string) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - f.StringArrayVar(sap, "sa", []string{}, "Command separated list!") - return f -} - -func setUpSAFlagSetWithDefault(sap *[]string) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - f.StringArrayVar(sap, "sa", []string{"default", "values"}, "Command separated list!") - return f -} - -func TestEmptySA(t *testing.T) { - var sa []string - f := setUpSAFlagSet(&sa) - err := f.Parse([]string{}) - if err != nil { - t.Fatal("expected no error; got", err) - } - - getSA, err := f.GetStringArray("sa") - if err != nil { - t.Fatal("got an error from GetStringArray():", err) - } - if len(getSA) != 0 { - t.Fatalf("got sa %v with len=%d but expected length=0", getSA, len(getSA)) - } -} - -func TestEmptySAValue(t *testing.T) { - var sa []string - f := setUpSAFlagSet(&sa) - err := f.Parse([]string{"--sa="}) - if err != nil { - t.Fatal("expected no error; got", err) - } - - getSA, err := f.GetStringArray("sa") - if err != nil { - t.Fatal("got an error from GetStringArray():", err) - } - if len(getSA) != 0 { - t.Fatalf("got sa %v with len=%d but expected length=0", getSA, len(getSA)) - } -} - -func TestSADefault(t *testing.T) { - var sa []string - f := setUpSAFlagSetWithDefault(&sa) - - vals := []string{"default", "values"} - - err := f.Parse([]string{}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range sa { - if vals[i] != v { - t.Fatalf("expected sa[%d] to be %s but got: %s", i, vals[i], v) - } - } - - getSA, err := f.GetStringArray("sa") - if err != nil { - t.Fatal("got an error from GetStringArray():", err) - } - for i, v := range getSA { - if vals[i] != v { - t.Fatalf("expected sa[%d] to be %s from GetStringArray but got: %s", i, vals[i], v) - } - } -} - -func TestSAWithDefault(t *testing.T) { - var sa []string - f := setUpSAFlagSetWithDefault(&sa) - - val := "one" - arg := fmt.Sprintf("--sa=%s", val) - err := f.Parse([]string{arg}) - if err != nil { - t.Fatal("expected no error; got", err) - } - - if len(sa) != 1 { - t.Fatalf("expected number of values to be %d but %d", 1, len(sa)) - } - - if sa[0] != val { - t.Fatalf("expected value to be %s but got: %s", sa[0], val) - } - - getSA, err := f.GetStringArray("sa") - if err != nil { - t.Fatal("got an error from GetStringArray():", err) - } - - if len(getSA) != 1 { - t.Fatalf("expected number of values to be %d but %d", 1, len(getSA)) - } - - if getSA[0] != val { - t.Fatalf("expected value to be %s but got: %s", getSA[0], val) - } -} - -func TestSACalledTwice(t *testing.T) { - var sa []string - f := setUpSAFlagSet(&sa) - - in := []string{"one", "two"} - expected := []string{"one", "two"} - argfmt := "--sa=%s" - arg1 := fmt.Sprintf(argfmt, in[0]) - arg2 := fmt.Sprintf(argfmt, in[1]) - err := f.Parse([]string{arg1, arg2}) - if err != nil { - t.Fatal("expected no error; got", err) - } - - if len(expected) != len(sa) { - t.Fatalf("expected number of sa to be %d but got: %d", len(expected), len(sa)) - } - for i, v := range sa { - if expected[i] != v { - t.Fatalf("expected sa[%d] to be %s but got: %s", i, expected[i], v) - } - } - - values, err := f.GetStringArray("sa") - if err != nil { - t.Fatal("expected no error; got", err) - } - - if len(expected) != len(values) { - t.Fatalf("expected number of values to be %d but got: %d", len(expected), len(sa)) - } - for i, v := range values { - if expected[i] != v { - t.Fatalf("expected got sa[%d] to be %s but got: %s", i, expected[i], v) - } - } -} - -func TestSAWithSpecialChar(t *testing.T) { - var sa []string - f := setUpSAFlagSet(&sa) - - in := []string{"one,two", `"three"`, `"four,five",six`, "seven eight"} - expected := []string{"one,two", `"three"`, `"four,five",six`, "seven eight"} - argfmt := "--sa=%s" - arg1 := fmt.Sprintf(argfmt, in[0]) - arg2 := fmt.Sprintf(argfmt, in[1]) - arg3 := fmt.Sprintf(argfmt, in[2]) - arg4 := fmt.Sprintf(argfmt, in[3]) - err := f.Parse([]string{arg1, arg2, arg3, arg4}) - if err != nil { - t.Fatal("expected no error; got", err) - } - - if len(expected) != len(sa) { - t.Fatalf("expected number of sa to be %d but got: %d", len(expected), len(sa)) - } - for i, v := range sa { - if expected[i] != v { - t.Fatalf("expected sa[%d] to be %s but got: %s", i, expected[i], v) - } - } - - values, err := f.GetStringArray("sa") - if err != nil { - t.Fatal("expected no error; got", err) - } - - if len(expected) != len(values) { - t.Fatalf("expected number of values to be %d but got: %d", len(expected), len(values)) - } - for i, v := range values { - if expected[i] != v { - t.Fatalf("expected got sa[%d] to be %s but got: %s", i, expected[i], v) - } - } -} - -func TestSAWithSquareBrackets(t *testing.T) { - var sa []string - f := setUpSAFlagSet(&sa) - - in := []string{"][]-[", "[a-z]", "[a-z]+"} - expected := []string{"][]-[", "[a-z]", "[a-z]+"} - argfmt := "--sa=%s" - arg1 := fmt.Sprintf(argfmt, in[0]) - arg2 := fmt.Sprintf(argfmt, in[1]) - arg3 := fmt.Sprintf(argfmt, in[2]) - err := f.Parse([]string{arg1, arg2, arg3}) - if err != nil { - t.Fatal("expected no error; got", err) - } - - if len(expected) != len(sa) { - t.Fatalf("expected number of sa to be %d but got: %d", len(expected), len(sa)) - } - for i, v := range sa { - if expected[i] != v { - t.Fatalf("expected sa[%d] to be %s but got: %s", i, expected[i], v) - } - } - - values, err := f.GetStringArray("sa") - if err != nil { - t.Fatal("expected no error; got", err) - } - - if len(expected) != len(values) { - t.Fatalf("expected number of values to be %d but got: %d", len(expected), len(values)) - } - for i, v := range values { - if expected[i] != v { - t.Fatalf("expected got sa[%d] to be %s but got: %s", i, expected[i], v) - } - } -} diff --git a/vendor/github.com/spf13/pflag/string_slice_test.go b/vendor/github.com/spf13/pflag/string_slice_test.go deleted file mode 100644 index c41f3bd6..00000000 --- a/vendor/github.com/spf13/pflag/string_slice_test.go +++ /dev/null @@ -1,253 +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 pflag - -import ( - "fmt" - "strings" - "testing" -) - -func setUpSSFlagSet(ssp *[]string) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - f.StringSliceVar(ssp, "ss", []string{}, "Command separated list!") - return f -} - -func setUpSSFlagSetWithDefault(ssp *[]string) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - f.StringSliceVar(ssp, "ss", []string{"default", "values"}, "Command separated list!") - return f -} - -func TestEmptySS(t *testing.T) { - var ss []string - f := setUpSSFlagSet(&ss) - err := f.Parse([]string{}) - if err != nil { - t.Fatal("expected no error; got", err) - } - - getSS, err := f.GetStringSlice("ss") - if err != nil { - t.Fatal("got an error from GetStringSlice():", err) - } - if len(getSS) != 0 { - t.Fatalf("got ss %v with len=%d but expected length=0", getSS, len(getSS)) - } -} - -func TestEmptySSValue(t *testing.T) { - var ss []string - f := setUpSSFlagSet(&ss) - err := f.Parse([]string{"--ss="}) - if err != nil { - t.Fatal("expected no error; got", err) - } - - getSS, err := f.GetStringSlice("ss") - if err != nil { - t.Fatal("got an error from GetStringSlice():", err) - } - if len(getSS) != 0 { - t.Fatalf("got ss %v with len=%d but expected length=0", getSS, len(getSS)) - } -} - -func TestSS(t *testing.T) { - var ss []string - f := setUpSSFlagSet(&ss) - - vals := []string{"one", "two", "4", "3"} - arg := fmt.Sprintf("--ss=%s", strings.Join(vals, ",")) - err := f.Parse([]string{arg}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range ss { - if vals[i] != v { - t.Fatalf("expected ss[%d] to be %s but got: %s", i, vals[i], v) - } - } - - getSS, err := f.GetStringSlice("ss") - if err != nil { - t.Fatal("got an error from GetStringSlice():", err) - } - for i, v := range getSS { - if vals[i] != v { - t.Fatalf("expected ss[%d] to be %s from GetStringSlice but got: %s", i, vals[i], v) - } - } -} - -func TestSSDefault(t *testing.T) { - var ss []string - f := setUpSSFlagSetWithDefault(&ss) - - vals := []string{"default", "values"} - - err := f.Parse([]string{}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range ss { - if vals[i] != v { - t.Fatalf("expected ss[%d] to be %s but got: %s", i, vals[i], v) - } - } - - getSS, err := f.GetStringSlice("ss") - if err != nil { - t.Fatal("got an error from GetStringSlice():", err) - } - for i, v := range getSS { - if vals[i] != v { - t.Fatalf("expected ss[%d] to be %s from GetStringSlice but got: %s", i, vals[i], v) - } - } -} - -func TestSSWithDefault(t *testing.T) { - var ss []string - f := setUpSSFlagSetWithDefault(&ss) - - vals := []string{"one", "two", "4", "3"} - arg := fmt.Sprintf("--ss=%s", strings.Join(vals, ",")) - err := f.Parse([]string{arg}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range ss { - if vals[i] != v { - t.Fatalf("expected ss[%d] to be %s but got: %s", i, vals[i], v) - } - } - - getSS, err := f.GetStringSlice("ss") - if err != nil { - t.Fatal("got an error from GetStringSlice():", err) - } - for i, v := range getSS { - if vals[i] != v { - t.Fatalf("expected ss[%d] to be %s from GetStringSlice but got: %s", i, vals[i], v) - } - } -} - -func TestSSCalledTwice(t *testing.T) { - var ss []string - f := setUpSSFlagSet(&ss) - - in := []string{"one,two", "three"} - expected := []string{"one", "two", "three"} - argfmt := "--ss=%s" - arg1 := fmt.Sprintf(argfmt, in[0]) - arg2 := fmt.Sprintf(argfmt, in[1]) - err := f.Parse([]string{arg1, arg2}) - if err != nil { - t.Fatal("expected no error; got", err) - } - - if len(expected) != len(ss) { - t.Fatalf("expected number of ss to be %d but got: %d", len(expected), len(ss)) - } - for i, v := range ss { - if expected[i] != v { - t.Fatalf("expected ss[%d] to be %s but got: %s", i, expected[i], v) - } - } - - values, err := f.GetStringSlice("ss") - if err != nil { - t.Fatal("expected no error; got", err) - } - - if len(expected) != len(values) { - t.Fatalf("expected number of values to be %d but got: %d", len(expected), len(ss)) - } - for i, v := range values { - if expected[i] != v { - t.Fatalf("expected got ss[%d] to be %s but got: %s", i, expected[i], v) - } - } -} - -func TestSSWithComma(t *testing.T) { - var ss []string - f := setUpSSFlagSet(&ss) - - in := []string{`"one,two"`, `"three"`, `"four,five",six`} - expected := []string{"one,two", "three", "four,five", "six"} - argfmt := "--ss=%s" - arg1 := fmt.Sprintf(argfmt, in[0]) - arg2 := fmt.Sprintf(argfmt, in[1]) - arg3 := fmt.Sprintf(argfmt, in[2]) - err := f.Parse([]string{arg1, arg2, arg3}) - if err != nil { - t.Fatal("expected no error; got", err) - } - - if len(expected) != len(ss) { - t.Fatalf("expected number of ss to be %d but got: %d", len(expected), len(ss)) - } - for i, v := range ss { - if expected[i] != v { - t.Fatalf("expected ss[%d] to be %s but got: %s", i, expected[i], v) - } - } - - values, err := f.GetStringSlice("ss") - if err != nil { - t.Fatal("expected no error; got", err) - } - - if len(expected) != len(values) { - t.Fatalf("expected number of values to be %d but got: %d", len(expected), len(values)) - } - for i, v := range values { - if expected[i] != v { - t.Fatalf("expected got ss[%d] to be %s but got: %s", i, expected[i], v) - } - } -} - -func TestSSWithSquareBrackets(t *testing.T) { - var ss []string - f := setUpSSFlagSet(&ss) - - in := []string{`"[a-z]"`, `"[a-z]+"`} - expected := []string{"[a-z]", "[a-z]+"} - argfmt := "--ss=%s" - arg1 := fmt.Sprintf(argfmt, in[0]) - arg2 := fmt.Sprintf(argfmt, in[1]) - err := f.Parse([]string{arg1, arg2}) - if err != nil { - t.Fatal("expected no error; got", err) - } - - if len(expected) != len(ss) { - t.Fatalf("expected number of ss to be %d but got: %d", len(expected), len(ss)) - } - for i, v := range ss { - if expected[i] != v { - t.Fatalf("expected ss[%d] to be %s but got: %s", i, expected[i], v) - } - } - - values, err := f.GetStringSlice("ss") - if err != nil { - t.Fatal("expected no error; got", err) - } - - if len(expected) != len(values) { - t.Fatalf("expected number of values to be %d but got: %d", len(expected), len(values)) - } - for i, v := range values { - if expected[i] != v { - t.Fatalf("expected got ss[%d] to be %s but got: %s", i, expected[i], v) - } - } -} diff --git a/vendor/github.com/spf13/pflag/uint_slice_test.go b/vendor/github.com/spf13/pflag/uint_slice_test.go deleted file mode 100644 index db1a19dc..00000000 --- a/vendor/github.com/spf13/pflag/uint_slice_test.go +++ /dev/null @@ -1,161 +0,0 @@ -package pflag - -import ( - "fmt" - "strconv" - "strings" - "testing" -) - -func setUpUISFlagSet(uisp *[]uint) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - f.UintSliceVar(uisp, "uis", []uint{}, "Command separated list!") - return f -} - -func setUpUISFlagSetWithDefault(uisp *[]uint) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - f.UintSliceVar(uisp, "uis", []uint{0, 1}, "Command separated list!") - return f -} - -func TestEmptyUIS(t *testing.T) { - var uis []uint - f := setUpUISFlagSet(&uis) - err := f.Parse([]string{}) - if err != nil { - t.Fatal("expected no error; got", err) - } - - getUIS, err := f.GetUintSlice("uis") - if err != nil { - t.Fatal("got an error from GetUintSlice():", err) - } - if len(getUIS) != 0 { - t.Fatalf("got is %v with len=%d but expected length=0", getUIS, len(getUIS)) - } -} - -func TestUIS(t *testing.T) { - var uis []uint - f := setUpUISFlagSet(&uis) - - vals := []string{"1", "2", "4", "3"} - arg := fmt.Sprintf("--uis=%s", strings.Join(vals, ",")) - err := f.Parse([]string{arg}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range uis { - u, err := strconv.ParseUint(vals[i], 10, 0) - if err != nil { - t.Fatalf("got error: %v", err) - } - if uint(u) != v { - t.Fatalf("expected uis[%d] to be %s but got %d", i, vals[i], v) - } - } - getUIS, err := f.GetUintSlice("uis") - if err != nil { - t.Fatalf("got error: %v", err) - } - for i, v := range getUIS { - u, err := strconv.ParseUint(vals[i], 10, 0) - if err != nil { - t.Fatalf("got error: %v", err) - } - if uint(u) != v { - t.Fatalf("expected uis[%d] to be %s but got: %d from GetUintSlice", i, vals[i], v) - } - } -} - -func TestUISDefault(t *testing.T) { - var uis []uint - f := setUpUISFlagSetWithDefault(&uis) - - vals := []string{"0", "1"} - - err := f.Parse([]string{}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range uis { - u, err := strconv.ParseUint(vals[i], 10, 0) - if err != nil { - t.Fatalf("got error: %v", err) - } - if uint(u) != v { - t.Fatalf("expect uis[%d] to be %d but got: %d", i, u, v) - } - } - - getUIS, err := f.GetUintSlice("uis") - if err != nil { - t.Fatal("got an error from GetUintSlice():", err) - } - for i, v := range getUIS { - u, err := strconv.ParseUint(vals[i], 10, 0) - if err != nil { - t.Fatal("got an error from GetIntSlice():", err) - } - if uint(u) != v { - t.Fatalf("expected uis[%d] to be %d from GetUintSlice but got: %d", i, u, v) - } - } -} - -func TestUISWithDefault(t *testing.T) { - var uis []uint - f := setUpUISFlagSetWithDefault(&uis) - - vals := []string{"1", "2"} - arg := fmt.Sprintf("--uis=%s", strings.Join(vals, ",")) - err := f.Parse([]string{arg}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range uis { - u, err := strconv.ParseUint(vals[i], 10, 0) - if err != nil { - t.Fatalf("got error: %v", err) - } - if uint(u) != v { - t.Fatalf("expected uis[%d] to be %d from GetUintSlice but got: %d", i, u, v) - } - } - - getUIS, err := f.GetUintSlice("uis") - if err != nil { - t.Fatal("got an error from GetUintSlice():", err) - } - for i, v := range getUIS { - u, err := strconv.ParseUint(vals[i], 10, 0) - if err != nil { - t.Fatalf("got error: %v", err) - } - if uint(u) != v { - t.Fatalf("expected uis[%d] to be %d from GetUintSlice but got: %d", i, u, v) - } - } -} - -func TestUISCalledTwice(t *testing.T) { - var uis []uint - f := setUpUISFlagSet(&uis) - - in := []string{"1,2", "3"} - expected := []int{1, 2, 3} - argfmt := "--uis=%s" - arg1 := fmt.Sprintf(argfmt, in[0]) - arg2 := fmt.Sprintf(argfmt, in[1]) - err := f.Parse([]string{arg1, arg2}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range uis { - if uint(expected[i]) != v { - t.Fatalf("expected uis[%d] to be %d but got: %d", i, expected[i], v) - } - } -} diff --git a/vendor/golang.org/x/crypto/.gitattributes b/vendor/golang.org/x/crypto/.gitattributes deleted file mode 100644 index d2f212e5..00000000 --- a/vendor/golang.org/x/crypto/.gitattributes +++ /dev/null @@ -1,10 +0,0 @@ -# Treat all files in this repo as binary, with no git magic updating -# line endings. Windows users contributing to Go will need to use a -# modern version of git and editors capable of LF line endings. -# -# We'll prevent accidental CRLF line endings from entering the repo -# via the git-review gofmt checks. -# -# See golang.org/issue/9281 - -* -text diff --git a/vendor/golang.org/x/crypto/.gitignore b/vendor/golang.org/x/crypto/.gitignore deleted file mode 100644 index 8339fd61..00000000 --- a/vendor/golang.org/x/crypto/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Add no patterns to .hgignore except for files generated by the build. -last-change diff --git a/vendor/golang.org/x/crypto/CONTRIBUTING.md b/vendor/golang.org/x/crypto/CONTRIBUTING.md deleted file mode 100644 index d0485e88..00000000 --- a/vendor/golang.org/x/crypto/CONTRIBUTING.md +++ /dev/null @@ -1,26 +0,0 @@ -# Contributing to Go - -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? - -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. - -## Contributing code - -Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) -before sending patches. - -Unless otherwise noted, the Go source files are distributed under -the BSD-style license found in the LICENSE file. diff --git a/vendor/golang.org/x/crypto/README.md b/vendor/golang.org/x/crypto/README.md deleted file mode 100644 index c9d6fecd..00000000 --- a/vendor/golang.org/x/crypto/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Go Cryptography - -This repository holds supplementary Go cryptography libraries. - -## Download/Install - -The easiest way to install is to run `go get -u golang.org/x/crypto/...`. You -can also manually git clone the repository to `$GOPATH/src/golang.org/x/crypto`. - -## Report Issues / Send Patches - -This repository uses Gerrit for code changes. To learn how to submit changes to -this repository, see https://golang.org/doc/contribute.html. - -The main issue tracker for the crypto repository is located at -https://github.com/golang/go/issues. Prefix your issue with "x/crypto:" in the -subject line, so it is easy to find. - -Note that contributions to the cryptography package receive additional scrutiny -due to their sensitive nature. Patches may take longer than normal to receive -feedback. diff --git a/vendor/golang.org/x/crypto/codereview.cfg b/vendor/golang.org/x/crypto/codereview.cfg deleted file mode 100644 index 3f8b14b6..00000000 --- a/vendor/golang.org/x/crypto/codereview.cfg +++ /dev/null @@ -1 +0,0 @@ -issuerepo: golang/go diff --git a/vendor/golang.org/x/crypto/ssh/benchmark_test.go b/vendor/golang.org/x/crypto/ssh/benchmark_test.go deleted file mode 100644 index 20c33077..00000000 --- a/vendor/golang.org/x/crypto/ssh/benchmark_test.go +++ /dev/null @@ -1,123 +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 ssh - -import ( - "errors" - "io" - "net" - "testing" -) - -type server struct { - *ServerConn - chans <-chan NewChannel -} - -func newServer(c net.Conn, conf *ServerConfig) (*server, error) { - sconn, chans, reqs, err := NewServerConn(c, conf) - if err != nil { - return nil, err - } - go DiscardRequests(reqs) - return &server{sconn, chans}, nil -} - -func (s *server) Accept() (NewChannel, error) { - n, ok := <-s.chans - if !ok { - return nil, io.EOF - } - return n, nil -} - -func sshPipe() (Conn, *server, error) { - c1, c2, err := netPipe() - if err != nil { - return nil, nil, err - } - - clientConf := ClientConfig{ - User: "user", - HostKeyCallback: InsecureIgnoreHostKey(), - } - serverConf := ServerConfig{ - NoClientAuth: true, - } - serverConf.AddHostKey(testSigners["ecdsa"]) - done := make(chan *server, 1) - go func() { - server, err := newServer(c2, &serverConf) - if err != nil { - done <- nil - } - done <- server - }() - - client, _, reqs, err := NewClientConn(c1, "", &clientConf) - if err != nil { - return nil, nil, err - } - - server := <-done - if server == nil { - return nil, nil, errors.New("server handshake failed.") - } - go DiscardRequests(reqs) - - return client, server, nil -} - -func BenchmarkEndToEnd(b *testing.B) { - b.StopTimer() - - client, server, err := sshPipe() - if err != nil { - b.Fatalf("sshPipe: %v", err) - } - - defer client.Close() - defer server.Close() - - size := (1 << 20) - input := make([]byte, size) - output := make([]byte, size) - b.SetBytes(int64(size)) - done := make(chan int, 1) - - go func() { - newCh, err := server.Accept() - if err != nil { - b.Fatalf("Client: %v", err) - } - ch, incoming, err := newCh.Accept() - go DiscardRequests(incoming) - for i := 0; i < b.N; i++ { - if _, err := io.ReadFull(ch, output); err != nil { - b.Fatalf("ReadFull: %v", err) - } - } - ch.Close() - done <- 1 - }() - - ch, in, err := client.OpenChannel("speed", nil) - if err != nil { - b.Fatalf("OpenChannel: %v", err) - } - go DiscardRequests(in) - - b.ResetTimer() - b.StartTimer() - for i := 0; i < b.N; i++ { - if _, err := ch.Write(input); err != nil { - b.Fatalf("WriteFull: %v", err) - } - } - ch.Close() - b.StopTimer() - - <-done -} diff --git a/vendor/golang.org/x/crypto/ssh/buffer.go b/vendor/golang.org/x/crypto/ssh/buffer.go deleted file mode 100644 index 1ab07d07..00000000 --- a/vendor/golang.org/x/crypto/ssh/buffer.go +++ /dev/null @@ -1,97 +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 ssh - -import ( - "io" - "sync" -) - -// buffer provides a linked list buffer for data exchange -// between producer and consumer. Theoretically the buffer is -// of unlimited capacity as it does no allocation of its own. -type buffer struct { - // protects concurrent access to head, tail and closed - *sync.Cond - - head *element // the buffer that will be read first - tail *element // the buffer that will be read last - - closed bool -} - -// An element represents a single link in a linked list. -type element struct { - buf []byte - next *element -} - -// newBuffer returns an empty buffer that is not closed. -func newBuffer() *buffer { - e := new(element) - b := &buffer{ - Cond: newCond(), - head: e, - tail: e, - } - return b -} - -// write makes buf available for Read to receive. -// buf must not be modified after the call to write. -func (b *buffer) write(buf []byte) { - b.Cond.L.Lock() - e := &element{buf: buf} - b.tail.next = e - b.tail = e - b.Cond.Signal() - b.Cond.L.Unlock() -} - -// eof closes the buffer. Reads from the buffer once all -// the data has been consumed will receive io.EOF. -func (b *buffer) eof() { - b.Cond.L.Lock() - b.closed = true - b.Cond.Signal() - b.Cond.L.Unlock() -} - -// Read reads data from the internal buffer in buf. Reads will block -// if no data is available, or until the buffer is closed. -func (b *buffer) Read(buf []byte) (n int, err error) { - b.Cond.L.Lock() - defer b.Cond.L.Unlock() - - for len(buf) > 0 { - // if there is data in b.head, copy it - if len(b.head.buf) > 0 { - r := copy(buf, b.head.buf) - buf, b.head.buf = buf[r:], b.head.buf[r:] - n += r - continue - } - // if there is a next buffer, make it the head - if len(b.head.buf) == 0 && b.head != b.tail { - b.head = b.head.next - continue - } - - // if at least one byte has been copied, return - if n > 0 { - break - } - - // if nothing was read, and there is nothing outstanding - // check to see if the buffer is closed. - if b.closed { - err = io.EOF - break - } - // out of buffers, wait for producer - b.Cond.Wait() - } - return -} diff --git a/vendor/golang.org/x/crypto/ssh/buffer_test.go b/vendor/golang.org/x/crypto/ssh/buffer_test.go deleted file mode 100644 index d5781cb3..00000000 --- a/vendor/golang.org/x/crypto/ssh/buffer_test.go +++ /dev/null @@ -1,87 +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 ssh - -import ( - "io" - "testing" -) - -var alphabet = []byte("abcdefghijklmnopqrstuvwxyz") - -func TestBufferReadwrite(t *testing.T) { - b := newBuffer() - b.write(alphabet[:10]) - r, _ := b.Read(make([]byte, 10)) - if r != 10 { - t.Fatalf("Expected written == read == 10, written: 10, read %d", r) - } - - b = newBuffer() - b.write(alphabet[:5]) - r, _ = b.Read(make([]byte, 10)) - if r != 5 { - t.Fatalf("Expected written == read == 5, written: 5, read %d", r) - } - - b = newBuffer() - b.write(alphabet[:10]) - r, _ = b.Read(make([]byte, 5)) - if r != 5 { - t.Fatalf("Expected written == 10, read == 5, written: 10, read %d", r) - } - - b = newBuffer() - b.write(alphabet[:5]) - b.write(alphabet[5:15]) - r, _ = b.Read(make([]byte, 10)) - r2, _ := b.Read(make([]byte, 10)) - if r != 10 || r2 != 5 || 15 != r+r2 { - t.Fatal("Expected written == read == 15") - } -} - -func TestBufferClose(t *testing.T) { - b := newBuffer() - b.write(alphabet[:10]) - b.eof() - _, err := b.Read(make([]byte, 5)) - if err != nil { - t.Fatal("expected read of 5 to not return EOF") - } - b = newBuffer() - b.write(alphabet[:10]) - b.eof() - r, err := b.Read(make([]byte, 5)) - r2, err2 := b.Read(make([]byte, 10)) - if r != 5 || r2 != 5 || err != nil || err2 != nil { - t.Fatal("expected reads of 5 and 5") - } - - b = newBuffer() - b.write(alphabet[:10]) - b.eof() - r, err = b.Read(make([]byte, 5)) - r2, err2 = b.Read(make([]byte, 10)) - r3, err3 := b.Read(make([]byte, 10)) - if r != 5 || r2 != 5 || r3 != 0 || err != nil || err2 != nil || err3 != io.EOF { - t.Fatal("expected reads of 5 and 5 and 0, with EOF") - } - - b = newBuffer() - b.write(make([]byte, 5)) - b.write(make([]byte, 10)) - b.eof() - r, err = b.Read(make([]byte, 9)) - r2, err2 = b.Read(make([]byte, 3)) - r3, err3 = b.Read(make([]byte, 3)) - r4, err4 := b.Read(make([]byte, 10)) - if err != nil || err2 != nil || err3 != nil || err4 != io.EOF { - t.Fatalf("Expected EOF on forth read only, err=%v, err2=%v, err3=%v, err4=%v", err, err2, err3, err4) - } - if r != 9 || r2 != 3 || r3 != 3 || r4 != 0 { - t.Fatal("Expected written == read == 15", r, r2, r3, r4) - } -} diff --git a/vendor/golang.org/x/crypto/ssh/certs.go b/vendor/golang.org/x/crypto/ssh/certs.go deleted file mode 100644 index 42106f3f..00000000 --- a/vendor/golang.org/x/crypto/ssh/certs.go +++ /dev/null @@ -1,521 +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 ssh - -import ( - "bytes" - "errors" - "fmt" - "io" - "net" - "sort" - "time" -) - -// These constants from [PROTOCOL.certkeys] represent the algorithm names -// for certificate types supported by this package. -const ( - CertAlgoRSAv01 = "ssh-rsa-cert-v01@openssh.com" - CertAlgoDSAv01 = "ssh-dss-cert-v01@openssh.com" - CertAlgoECDSA256v01 = "ecdsa-sha2-nistp256-cert-v01@openssh.com" - CertAlgoECDSA384v01 = "ecdsa-sha2-nistp384-cert-v01@openssh.com" - CertAlgoECDSA521v01 = "ecdsa-sha2-nistp521-cert-v01@openssh.com" - CertAlgoED25519v01 = "ssh-ed25519-cert-v01@openssh.com" -) - -// Certificate types distinguish between host and user -// certificates. The values can be set in the CertType field of -// Certificate. -const ( - UserCert = 1 - HostCert = 2 -) - -// Signature represents a cryptographic signature. -type Signature struct { - Format string - Blob []byte -} - -// CertTimeInfinity can be used for OpenSSHCertV01.ValidBefore to indicate that -// a certificate does not expire. -const CertTimeInfinity = 1<<64 - 1 - -// An Certificate represents an OpenSSH certificate as defined in -// [PROTOCOL.certkeys]?rev=1.8. The Certificate type implements the -// PublicKey interface, so it can be unmarshaled using -// ParsePublicKey. -type Certificate struct { - Nonce []byte - Key PublicKey - Serial uint64 - CertType uint32 - KeyId string - ValidPrincipals []string - ValidAfter uint64 - ValidBefore uint64 - Permissions - Reserved []byte - SignatureKey PublicKey - Signature *Signature -} - -// genericCertData holds the key-independent part of the certificate data. -// Overall, certificates contain an nonce, public key fields and -// key-independent fields. -type genericCertData struct { - Serial uint64 - CertType uint32 - KeyId string - ValidPrincipals []byte - ValidAfter uint64 - ValidBefore uint64 - CriticalOptions []byte - Extensions []byte - Reserved []byte - SignatureKey []byte - Signature []byte -} - -func marshalStringList(namelist []string) []byte { - var to []byte - for _, name := range namelist { - s := struct{ N string }{name} - to = append(to, Marshal(&s)...) - } - return to -} - -type optionsTuple struct { - Key string - Value []byte -} - -type optionsTupleValue struct { - Value string -} - -// serialize a map of critical options or extensions -// issue #10569 - per [PROTOCOL.certkeys] and SSH implementation, -// we need two length prefixes for a non-empty string value -func marshalTuples(tups map[string]string) []byte { - keys := make([]string, 0, len(tups)) - for key := range tups { - keys = append(keys, key) - } - sort.Strings(keys) - - var ret []byte - for _, key := range keys { - s := optionsTuple{Key: key} - if value := tups[key]; len(value) > 0 { - s.Value = Marshal(&optionsTupleValue{value}) - } - ret = append(ret, Marshal(&s)...) - } - return ret -} - -// issue #10569 - per [PROTOCOL.certkeys] and SSH implementation, -// we need two length prefixes for a non-empty option value -func parseTuples(in []byte) (map[string]string, error) { - tups := map[string]string{} - var lastKey string - var haveLastKey bool - - for len(in) > 0 { - var key, val, extra []byte - var ok bool - - if key, in, ok = parseString(in); !ok { - return nil, errShortRead - } - keyStr := string(key) - // according to [PROTOCOL.certkeys], the names must be in - // lexical order. - if haveLastKey && keyStr <= lastKey { - return nil, fmt.Errorf("ssh: certificate options are not in lexical order") - } - lastKey, haveLastKey = keyStr, true - // the next field is a data field, which if non-empty has a string embedded - if val, in, ok = parseString(in); !ok { - return nil, errShortRead - } - if len(val) > 0 { - val, extra, ok = parseString(val) - if !ok { - return nil, errShortRead - } - if len(extra) > 0 { - return nil, fmt.Errorf("ssh: unexpected trailing data after certificate option value") - } - tups[keyStr] = string(val) - } else { - tups[keyStr] = "" - } - } - return tups, nil -} - -func parseCert(in []byte, privAlgo string) (*Certificate, error) { - nonce, rest, ok := parseString(in) - if !ok { - return nil, errShortRead - } - - key, rest, err := parsePubKey(rest, privAlgo) - if err != nil { - return nil, err - } - - var g genericCertData - if err := Unmarshal(rest, &g); err != nil { - return nil, err - } - - c := &Certificate{ - Nonce: nonce, - Key: key, - Serial: g.Serial, - CertType: g.CertType, - KeyId: g.KeyId, - ValidAfter: g.ValidAfter, - ValidBefore: g.ValidBefore, - } - - for principals := g.ValidPrincipals; len(principals) > 0; { - principal, rest, ok := parseString(principals) - if !ok { - return nil, errShortRead - } - c.ValidPrincipals = append(c.ValidPrincipals, string(principal)) - principals = rest - } - - c.CriticalOptions, err = parseTuples(g.CriticalOptions) - if err != nil { - return nil, err - } - c.Extensions, err = parseTuples(g.Extensions) - if err != nil { - return nil, err - } - c.Reserved = g.Reserved - k, err := ParsePublicKey(g.SignatureKey) - if err != nil { - return nil, err - } - - c.SignatureKey = k - c.Signature, rest, ok = parseSignatureBody(g.Signature) - if !ok || len(rest) > 0 { - return nil, errors.New("ssh: signature parse error") - } - - return c, nil -} - -type openSSHCertSigner struct { - pub *Certificate - signer Signer -} - -// NewCertSigner returns a Signer that signs with the given Certificate, whose -// private key is held by signer. It returns an error if the public key in cert -// doesn't match the key used by signer. -func NewCertSigner(cert *Certificate, signer Signer) (Signer, error) { - if bytes.Compare(cert.Key.Marshal(), signer.PublicKey().Marshal()) != 0 { - return nil, errors.New("ssh: signer and cert have different public key") - } - - return &openSSHCertSigner{cert, signer}, nil -} - -func (s *openSSHCertSigner) Sign(rand io.Reader, data []byte) (*Signature, error) { - return s.signer.Sign(rand, data) -} - -func (s *openSSHCertSigner) PublicKey() PublicKey { - return s.pub -} - -const sourceAddressCriticalOption = "source-address" - -// CertChecker does the work of verifying a certificate. Its methods -// can be plugged into ClientConfig.HostKeyCallback and -// ServerConfig.PublicKeyCallback. For the CertChecker to work, -// minimally, the IsAuthority callback should be set. -type CertChecker struct { - // SupportedCriticalOptions lists the CriticalOptions that the - // server application layer understands. These are only used - // for user certificates. - SupportedCriticalOptions []string - - // IsUserAuthority should return true if the key is recognized as an - // authority for the given user certificate. This allows for - // certificates to be signed by other certificates. This must be set - // if this CertChecker will be checking user certificates. - IsUserAuthority func(auth PublicKey) bool - - // IsHostAuthority should report whether the key is recognized as - // an authority for this host. This allows for certificates to be - // signed by other keys, and for those other keys to only be valid - // signers for particular hostnames. This must be set if this - // CertChecker will be checking host certificates. - IsHostAuthority func(auth PublicKey, address string) bool - - // Clock is used for verifying time stamps. If nil, time.Now - // is used. - Clock func() time.Time - - // UserKeyFallback is called when CertChecker.Authenticate encounters a - // public key that is not a certificate. It must implement validation - // of user keys or else, if nil, all such keys are rejected. - UserKeyFallback func(conn ConnMetadata, key PublicKey) (*Permissions, error) - - // HostKeyFallback is called when CertChecker.CheckHostKey encounters a - // public key that is not a certificate. It must implement host key - // validation or else, if nil, all such keys are rejected. - HostKeyFallback HostKeyCallback - - // IsRevoked is called for each certificate so that revocation checking - // can be implemented. It should return true if the given certificate - // is revoked and false otherwise. If nil, no certificates are - // considered to have been revoked. - IsRevoked func(cert *Certificate) bool -} - -// CheckHostKey checks a host key certificate. This method can be -// plugged into ClientConfig.HostKeyCallback. -func (c *CertChecker) CheckHostKey(addr string, remote net.Addr, key PublicKey) error { - cert, ok := key.(*Certificate) - if !ok { - if c.HostKeyFallback != nil { - return c.HostKeyFallback(addr, remote, key) - } - return errors.New("ssh: non-certificate host key") - } - if cert.CertType != HostCert { - return fmt.Errorf("ssh: certificate presented as a host key has type %d", cert.CertType) - } - if !c.IsHostAuthority(cert.SignatureKey, addr) { - return fmt.Errorf("ssh: no authorities for hostname: %v", addr) - } - - hostname, _, err := net.SplitHostPort(addr) - if err != nil { - return err - } - - // Pass hostname only as principal for host certificates (consistent with OpenSSH) - return c.CheckCert(hostname, cert) -} - -// Authenticate checks a user certificate. Authenticate can be used as -// a value for ServerConfig.PublicKeyCallback. -func (c *CertChecker) Authenticate(conn ConnMetadata, pubKey PublicKey) (*Permissions, error) { - cert, ok := pubKey.(*Certificate) - if !ok { - if c.UserKeyFallback != nil { - return c.UserKeyFallback(conn, pubKey) - } - return nil, errors.New("ssh: normal key pairs not accepted") - } - - if cert.CertType != UserCert { - return nil, fmt.Errorf("ssh: cert has type %d", cert.CertType) - } - if !c.IsUserAuthority(cert.SignatureKey) { - return nil, fmt.Errorf("ssh: certificate signed by unrecognized authority") - } - - if err := c.CheckCert(conn.User(), cert); err != nil { - return nil, err - } - - return &cert.Permissions, nil -} - -// CheckCert checks CriticalOptions, ValidPrincipals, revocation, timestamp and -// the signature of the certificate. -func (c *CertChecker) CheckCert(principal string, cert *Certificate) error { - if c.IsRevoked != nil && c.IsRevoked(cert) { - return fmt.Errorf("ssh: certificate serial %d revoked", cert.Serial) - } - - for opt := range cert.CriticalOptions { - // sourceAddressCriticalOption will be enforced by - // serverAuthenticate - if opt == sourceAddressCriticalOption { - continue - } - - found := false - for _, supp := range c.SupportedCriticalOptions { - if supp == opt { - found = true - break - } - } - if !found { - return fmt.Errorf("ssh: unsupported critical option %q in certificate", opt) - } - } - - if len(cert.ValidPrincipals) > 0 { - // By default, certs are valid for all users/hosts. - found := false - for _, p := range cert.ValidPrincipals { - if p == principal { - found = true - break - } - } - if !found { - return fmt.Errorf("ssh: principal %q not in the set of valid principals for given certificate: %q", principal, cert.ValidPrincipals) - } - } - - clock := c.Clock - if clock == nil { - clock = time.Now - } - - unixNow := clock().Unix() - if after := int64(cert.ValidAfter); after < 0 || unixNow < int64(cert.ValidAfter) { - return fmt.Errorf("ssh: cert is not yet valid") - } - if before := int64(cert.ValidBefore); cert.ValidBefore != uint64(CertTimeInfinity) && (unixNow >= before || before < 0) { - return fmt.Errorf("ssh: cert has expired") - } - if err := cert.SignatureKey.Verify(cert.bytesForSigning(), cert.Signature); err != nil { - return fmt.Errorf("ssh: certificate signature does not verify") - } - - return nil -} - -// SignCert sets c.SignatureKey to the authority's public key and stores a -// Signature, by authority, in the certificate. -func (c *Certificate) SignCert(rand io.Reader, authority Signer) error { - c.Nonce = make([]byte, 32) - if _, err := io.ReadFull(rand, c.Nonce); err != nil { - return err - } - c.SignatureKey = authority.PublicKey() - - sig, err := authority.Sign(rand, c.bytesForSigning()) - if err != nil { - return err - } - c.Signature = sig - return nil -} - -var certAlgoNames = map[string]string{ - KeyAlgoRSA: CertAlgoRSAv01, - KeyAlgoDSA: CertAlgoDSAv01, - KeyAlgoECDSA256: CertAlgoECDSA256v01, - KeyAlgoECDSA384: CertAlgoECDSA384v01, - KeyAlgoECDSA521: CertAlgoECDSA521v01, - KeyAlgoED25519: CertAlgoED25519v01, -} - -// certToPrivAlgo returns the underlying algorithm for a certificate algorithm. -// Panics if a non-certificate algorithm is passed. -func certToPrivAlgo(algo string) string { - for privAlgo, pubAlgo := range certAlgoNames { - if pubAlgo == algo { - return privAlgo - } - } - panic("unknown cert algorithm") -} - -func (cert *Certificate) bytesForSigning() []byte { - c2 := *cert - c2.Signature = nil - out := c2.Marshal() - // Drop trailing signature length. - return out[:len(out)-4] -} - -// Marshal serializes c into OpenSSH's wire format. It is part of the -// PublicKey interface. -func (c *Certificate) Marshal() []byte { - generic := genericCertData{ - Serial: c.Serial, - CertType: c.CertType, - KeyId: c.KeyId, - ValidPrincipals: marshalStringList(c.ValidPrincipals), - ValidAfter: uint64(c.ValidAfter), - ValidBefore: uint64(c.ValidBefore), - CriticalOptions: marshalTuples(c.CriticalOptions), - Extensions: marshalTuples(c.Extensions), - Reserved: c.Reserved, - SignatureKey: c.SignatureKey.Marshal(), - } - if c.Signature != nil { - generic.Signature = Marshal(c.Signature) - } - genericBytes := Marshal(&generic) - keyBytes := c.Key.Marshal() - _, keyBytes, _ = parseString(keyBytes) - prefix := Marshal(&struct { - Name string - Nonce []byte - Key []byte `ssh:"rest"` - }{c.Type(), c.Nonce, keyBytes}) - - result := make([]byte, 0, len(prefix)+len(genericBytes)) - result = append(result, prefix...) - result = append(result, genericBytes...) - return result -} - -// Type returns the key name. It is part of the PublicKey interface. -func (c *Certificate) Type() string { - algo, ok := certAlgoNames[c.Key.Type()] - if !ok { - panic("unknown cert key type " + c.Key.Type()) - } - return algo -} - -// Verify verifies a signature against the certificate's public -// key. It is part of the PublicKey interface. -func (c *Certificate) Verify(data []byte, sig *Signature) error { - return c.Key.Verify(data, sig) -} - -func parseSignatureBody(in []byte) (out *Signature, rest []byte, ok bool) { - format, in, ok := parseString(in) - if !ok { - return - } - - out = &Signature{ - Format: string(format), - } - - if out.Blob, in, ok = parseString(in); !ok { - return - } - - return out, in, ok -} - -func parseSignature(in []byte) (out *Signature, rest []byte, ok bool) { - sigBytes, rest, ok := parseString(in) - if !ok { - return - } - - out, trailing, ok := parseSignatureBody(sigBytes) - if !ok || len(trailing) > 0 { - return nil, nil, false - } - return -} diff --git a/vendor/golang.org/x/crypto/ssh/certs_test.go b/vendor/golang.org/x/crypto/ssh/certs_test.go deleted file mode 100644 index c8e7cf58..00000000 --- a/vendor/golang.org/x/crypto/ssh/certs_test.go +++ /dev/null @@ -1,335 +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 ssh - -import ( - "bytes" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rand" - "net" - "reflect" - "testing" - "time" - - "golang.org/x/crypto/ssh/testdata" -) - -// Cert generated by ssh-keygen 6.0p1 Debian-4. -// % ssh-keygen -s ca-key -I test user-key -const exampleSSHCert = `ssh-rsa-cert-v01@openssh.com AAAAHHNzaC1yc2EtY2VydC12MDFAb3BlbnNzaC5jb20AAAAgb1srW/W3ZDjYAO45xLYAwzHBDLsJ4Ux6ICFIkTjb1LEAAAADAQABAAAAYQCkoR51poH0wE8w72cqSB8Sszx+vAhzcMdCO0wqHTj7UNENHWEXGrU0E0UQekD7U+yhkhtoyjbPOVIP7hNa6aRk/ezdh/iUnCIt4Jt1v3Z1h1P+hA4QuYFMHNB+rmjPwAcAAAAAAAAAAAAAAAEAAAAEdGVzdAAAAAAAAAAAAAAAAP//////////AAAAAAAAAIIAAAAVcGVybWl0LVgxMS1mb3J3YXJkaW5nAAAAAAAAABdwZXJtaXQtYWdlbnQtZm9yd2FyZGluZwAAAAAAAAAWcGVybWl0LXBvcnQtZm9yd2FyZGluZwAAAAAAAAAKcGVybWl0LXB0eQAAAAAAAAAOcGVybWl0LXVzZXItcmMAAAAAAAAAAAAAAHcAAAAHc3NoLXJzYQAAAAMBAAEAAABhANFS2kaktpSGc+CcmEKPyw9mJC4nZKxHKTgLVZeaGbFZOvJTNzBspQHdy7Q1uKSfktxpgjZnksiu/tFF9ngyY2KFoc+U88ya95IZUycBGCUbBQ8+bhDtw/icdDGQD5WnUwAAAG8AAAAHc3NoLXJzYQAAAGC8Y9Z2LQKhIhxf52773XaWrXdxP0t3GBVo4A10vUWiYoAGepr6rQIoGGXFxT4B9Gp+nEBJjOwKDXPrAevow0T9ca8gZN+0ykbhSrXLE5Ao48rqr3zP4O1/9P7e6gp0gw8=` - -func TestParseCert(t *testing.T) { - authKeyBytes := []byte(exampleSSHCert) - - key, _, _, rest, err := ParseAuthorizedKey(authKeyBytes) - if err != nil { - t.Fatalf("ParseAuthorizedKey: %v", err) - } - if len(rest) > 0 { - t.Errorf("rest: got %q, want empty", rest) - } - - if _, ok := key.(*Certificate); !ok { - t.Fatalf("got %v (%T), want *Certificate", key, key) - } - - marshaled := MarshalAuthorizedKey(key) - // Before comparison, remove the trailing newline that - // MarshalAuthorizedKey adds. - marshaled = marshaled[:len(marshaled)-1] - if !bytes.Equal(authKeyBytes, marshaled) { - t.Errorf("marshaled certificate does not match original: got %q, want %q", marshaled, authKeyBytes) - } -} - -// Cert generated by ssh-keygen OpenSSH_6.8p1 OS X 10.10.3 -// % ssh-keygen -s ca -I testcert -O source-address=192.168.1.0/24 -O force-command=/bin/sleep user.pub -// user.pub key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDACh1rt2DXfV3hk6fszSQcQ/rueMId0kVD9U7nl8cfEnFxqOCrNT92g4laQIGl2mn8lsGZfTLg8ksHq3gkvgO3oo/0wHy4v32JeBOHTsN5AL4gfHNEhWeWb50ev47hnTsRIt9P4dxogeUo/hTu7j9+s9lLpEQXCvq6xocXQt0j8MV9qZBBXFLXVT3cWIkSqOdwt/5ZBg+1GSrc7WfCXVWgTk4a20uPMuJPxU4RQwZW6X3+O8Pqo8C3cW0OzZRFP6gUYUKUsTI5WntlS+LAxgw1mZNsozFGdbiOPRnEryE3SRldh9vjDR3tin1fGpA5P7+CEB/bqaXtG3V+F2OkqaMN -// Critical Options: -// force-command /bin/sleep -// source-address 192.168.1.0/24 -// Extensions: -// permit-X11-forwarding -// permit-agent-forwarding -// permit-port-forwarding -// permit-pty -// permit-user-rc -const exampleSSHCertWithOptions = `ssh-rsa-cert-v01@openssh.com AAAAHHNzaC1yc2EtY2VydC12MDFAb3BlbnNzaC5jb20AAAAgDyysCJY0XrO1n03EeRRoITnTPdjENFmWDs9X58PP3VUAAAADAQABAAABAQDACh1rt2DXfV3hk6fszSQcQ/rueMId0kVD9U7nl8cfEnFxqOCrNT92g4laQIGl2mn8lsGZfTLg8ksHq3gkvgO3oo/0wHy4v32JeBOHTsN5AL4gfHNEhWeWb50ev47hnTsRIt9P4dxogeUo/hTu7j9+s9lLpEQXCvq6xocXQt0j8MV9qZBBXFLXVT3cWIkSqOdwt/5ZBg+1GSrc7WfCXVWgTk4a20uPMuJPxU4RQwZW6X3+O8Pqo8C3cW0OzZRFP6gUYUKUsTI5WntlS+LAxgw1mZNsozFGdbiOPRnEryE3SRldh9vjDR3tin1fGpA5P7+CEB/bqaXtG3V+F2OkqaMNAAAAAAAAAAAAAAABAAAACHRlc3RjZXJ0AAAAAAAAAAAAAAAA//////////8AAABLAAAADWZvcmNlLWNvbW1hbmQAAAAOAAAACi9iaW4vc2xlZXAAAAAOc291cmNlLWFkZHJlc3MAAAASAAAADjE5Mi4xNjguMS4wLzI0AAAAggAAABVwZXJtaXQtWDExLWZvcndhcmRpbmcAAAAAAAAAF3Blcm1pdC1hZ2VudC1mb3J3YXJkaW5nAAAAAAAAABZwZXJtaXQtcG9ydC1mb3J3YXJkaW5nAAAAAAAAAApwZXJtaXQtcHR5AAAAAAAAAA5wZXJtaXQtdXNlci1yYwAAAAAAAAAAAAABFwAAAAdzc2gtcnNhAAAAAwEAAQAAAQEAwU+c5ui5A8+J/CFpjW8wCa52bEODA808WWQDCSuTG/eMXNf59v9Y8Pk0F1E9dGCosSNyVcB/hacUrc6He+i97+HJCyKavBsE6GDxrjRyxYqAlfcOXi/IVmaUGiO8OQ39d4GHrjToInKvExSUeleQyH4Y4/e27T/pILAqPFL3fyrvMLT5qU9QyIt6zIpa7GBP5+urouNavMprV3zsfIqNBbWypinOQAw823a5wN+zwXnhZrgQiHZ/USG09Y6k98y1dTVz8YHlQVR4D3lpTAsKDKJ5hCH9WU4fdf+lU8OyNGaJ/vz0XNqxcToe1l4numLTnaoSuH89pHryjqurB7lJKwAAAQ8AAAAHc3NoLXJzYQAAAQCaHvUIoPL1zWUHIXLvu96/HU1s/i4CAW2IIEuGgxCUCiFj6vyTyYtgxQxcmbfZf6eaITlS6XJZa7Qq4iaFZh75C1DXTX8labXhRSD4E2t//AIP9MC1rtQC5xo6FmbQ+BoKcDskr+mNACcbRSxs3IL3bwCfWDnIw2WbVox9ZdcthJKk4UoCW4ix4QwdHw7zlddlz++fGEEVhmTbll1SUkycGApPFBsAYRTMupUJcYPIeReBI/m8XfkoMk99bV8ZJQTAd7OekHY2/48Ff53jLmyDjP7kNw1F8OaPtkFs6dGJXta4krmaekPy87j+35In5hFj7yoOqvSbmYUkeX70/GGQ` - -func TestParseCertWithOptions(t *testing.T) { - opts := map[string]string{ - "source-address": "192.168.1.0/24", - "force-command": "/bin/sleep", - } - exts := map[string]string{ - "permit-X11-forwarding": "", - "permit-agent-forwarding": "", - "permit-port-forwarding": "", - "permit-pty": "", - "permit-user-rc": "", - } - authKeyBytes := []byte(exampleSSHCertWithOptions) - - key, _, _, rest, err := ParseAuthorizedKey(authKeyBytes) - if err != nil { - t.Fatalf("ParseAuthorizedKey: %v", err) - } - if len(rest) > 0 { - t.Errorf("rest: got %q, want empty", rest) - } - cert, ok := key.(*Certificate) - if !ok { - t.Fatalf("got %v (%T), want *Certificate", key, key) - } - if !reflect.DeepEqual(cert.CriticalOptions, opts) { - t.Errorf("unexpected critical options - got %v, want %v", cert.CriticalOptions, opts) - } - if !reflect.DeepEqual(cert.Extensions, exts) { - t.Errorf("unexpected Extensions - got %v, want %v", cert.Extensions, exts) - } - marshaled := MarshalAuthorizedKey(key) - // Before comparison, remove the trailing newline that - // MarshalAuthorizedKey adds. - marshaled = marshaled[:len(marshaled)-1] - if !bytes.Equal(authKeyBytes, marshaled) { - t.Errorf("marshaled certificate does not match original: got %q, want %q", marshaled, authKeyBytes) - } -} - -func TestValidateCert(t *testing.T) { - key, _, _, _, err := ParseAuthorizedKey([]byte(exampleSSHCert)) - if err != nil { - t.Fatalf("ParseAuthorizedKey: %v", err) - } - validCert, ok := key.(*Certificate) - if !ok { - t.Fatalf("got %v (%T), want *Certificate", key, key) - } - checker := CertChecker{} - checker.IsUserAuthority = func(k PublicKey) bool { - return bytes.Equal(k.Marshal(), validCert.SignatureKey.Marshal()) - } - - if err := checker.CheckCert("user", validCert); err != nil { - t.Errorf("Unable to validate certificate: %v", err) - } - invalidCert := &Certificate{ - Key: testPublicKeys["rsa"], - SignatureKey: testPublicKeys["ecdsa"], - ValidBefore: CertTimeInfinity, - Signature: &Signature{}, - } - if err := checker.CheckCert("user", invalidCert); err == nil { - t.Error("Invalid cert signature passed validation") - } -} - -func TestValidateCertTime(t *testing.T) { - cert := Certificate{ - ValidPrincipals: []string{"user"}, - Key: testPublicKeys["rsa"], - ValidAfter: 50, - ValidBefore: 100, - } - - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - - for ts, ok := range map[int64]bool{ - 25: false, - 50: true, - 99: true, - 100: false, - 125: false, - } { - checker := CertChecker{ - Clock: func() time.Time { return time.Unix(ts, 0) }, - } - checker.IsUserAuthority = func(k PublicKey) bool { - return bytes.Equal(k.Marshal(), - testPublicKeys["ecdsa"].Marshal()) - } - - if v := checker.CheckCert("user", &cert); (v == nil) != ok { - t.Errorf("Authenticate(%d): %v", ts, v) - } - } -} - -// TODO(hanwen): tests for -// -// host keys: -// * fallbacks - -func TestHostKeyCert(t *testing.T) { - cert := &Certificate{ - ValidPrincipals: []string{"hostname", "hostname.domain", "otherhost"}, - Key: testPublicKeys["rsa"], - ValidBefore: CertTimeInfinity, - CertType: HostCert, - } - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - - checker := &CertChecker{ - IsHostAuthority: func(p PublicKey, addr string) bool { - return addr == "hostname:22" && bytes.Equal(testPublicKeys["ecdsa"].Marshal(), p.Marshal()) - }, - } - - certSigner, err := NewCertSigner(cert, testSigners["rsa"]) - if err != nil { - t.Errorf("NewCertSigner: %v", err) - } - - for _, test := range []struct { - addr string - succeed bool - }{ - {addr: "hostname:22", succeed: true}, - {addr: "otherhost:22", succeed: false}, // The certificate is valid for 'otherhost' as hostname, but we only recognize the authority of the signer for the address 'hostname:22' - {addr: "lasthost:22", succeed: false}, - } { - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - errc := make(chan error) - - go func() { - conf := ServerConfig{ - NoClientAuth: true, - } - conf.AddHostKey(certSigner) - _, _, _, err := NewServerConn(c1, &conf) - errc <- err - }() - - config := &ClientConfig{ - User: "user", - HostKeyCallback: checker.CheckHostKey, - } - _, _, _, err = NewClientConn(c2, test.addr, config) - - if (err == nil) != test.succeed { - t.Fatalf("NewClientConn(%q): %v", test.addr, err) - } - - err = <-errc - if (err == nil) != test.succeed { - t.Fatalf("NewServerConn(%q): %v", test.addr, err) - } - } -} - -func TestCertTypes(t *testing.T) { - var testVars = []struct { - name string - keys func() Signer - }{ - { - name: CertAlgoECDSA256v01, - keys: func() Signer { - s, _ := ParsePrivateKey(testdata.PEMBytes["ecdsap256"]) - return s - }, - }, - { - name: CertAlgoECDSA384v01, - keys: func() Signer { - s, _ := ParsePrivateKey(testdata.PEMBytes["ecdsap384"]) - return s - }, - }, - { - name: CertAlgoECDSA521v01, - keys: func() Signer { - s, _ := ParsePrivateKey(testdata.PEMBytes["ecdsap521"]) - return s - }, - }, - { - name: CertAlgoED25519v01, - keys: func() Signer { - s, _ := ParsePrivateKey(testdata.PEMBytes["ed25519"]) - return s - }, - }, - { - name: CertAlgoRSAv01, - keys: func() Signer { - s, _ := ParsePrivateKey(testdata.PEMBytes["rsa"]) - return s - }, - }, - { - name: CertAlgoDSAv01, - keys: func() Signer { - s, _ := ParsePrivateKey(testdata.PEMBytes["dsa"]) - return s - }, - }, - } - - k, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - if err != nil { - t.Fatalf("error generating host key: %v", err) - } - - signer, err := NewSignerFromKey(k) - if err != nil { - t.Fatalf("error generating signer for ssh listener: %v", err) - } - - conf := &ServerConfig{ - PublicKeyCallback: func(c ConnMetadata, k PublicKey) (*Permissions, error) { - return new(Permissions), nil - }, - } - conf.AddHostKey(signer) - - for _, m := range testVars { - t.Run(m.name, func(t *testing.T) { - - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - go NewServerConn(c1, conf) - - priv := m.keys() - if err != nil { - t.Fatalf("error generating ssh pubkey: %v", err) - } - - cert := &Certificate{ - CertType: UserCert, - Key: priv.PublicKey(), - } - cert.SignCert(rand.Reader, priv) - - certSigner, err := NewCertSigner(cert, priv) - if err != nil { - t.Fatalf("error generating cert signer: %v", err) - } - - config := &ClientConfig{ - User: "user", - HostKeyCallback: func(h string, r net.Addr, k PublicKey) error { return nil }, - Auth: []AuthMethod{PublicKeys(certSigner)}, - } - - _, _, _, err = NewClientConn(c2, "", config) - if err != nil { - t.Fatalf("error connecting: %v", err) - } - }) - } -} diff --git a/vendor/golang.org/x/crypto/ssh/channel.go b/vendor/golang.org/x/crypto/ssh/channel.go deleted file mode 100644 index c0834c00..00000000 --- a/vendor/golang.org/x/crypto/ssh/channel.go +++ /dev/null @@ -1,633 +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 ssh - -import ( - "encoding/binary" - "errors" - "fmt" - "io" - "log" - "sync" -) - -const ( - minPacketLength = 9 - // channelMaxPacket contains the maximum number of bytes that will be - // sent in a single packet. As per RFC 4253, section 6.1, 32k is also - // the minimum. - channelMaxPacket = 1 << 15 - // We follow OpenSSH here. - channelWindowSize = 64 * channelMaxPacket -) - -// NewChannel represents an incoming request to a channel. It must either be -// accepted for use by calling Accept, or rejected by calling Reject. -type NewChannel interface { - // Accept accepts the channel creation request. It returns the Channel - // and a Go channel containing SSH requests. The Go channel must be - // serviced otherwise the Channel will hang. - Accept() (Channel, <-chan *Request, error) - - // Reject rejects the channel creation request. After calling - // this, no other methods on the Channel may be called. - Reject(reason RejectionReason, message string) error - - // ChannelType returns the type of the channel, as supplied by the - // client. - ChannelType() string - - // ExtraData returns the arbitrary payload for this channel, as supplied - // by the client. This data is specific to the channel type. - ExtraData() []byte -} - -// A Channel is an ordered, reliable, flow-controlled, duplex stream -// that is multiplexed over an SSH connection. -type Channel interface { - // Read reads up to len(data) bytes from the channel. - Read(data []byte) (int, error) - - // Write writes len(data) bytes to the channel. - Write(data []byte) (int, error) - - // Close signals end of channel use. No data may be sent after this - // call. - Close() error - - // CloseWrite signals the end of sending in-band - // data. Requests may still be sent, and the other side may - // still send data - CloseWrite() error - - // SendRequest sends a channel request. If wantReply is true, - // it will wait for a reply and return the result as a - // boolean, otherwise the return value will be false. Channel - // requests are out-of-band messages so they may be sent even - // if the data stream is closed or blocked by flow control. - // If the channel is closed before a reply is returned, io.EOF - // is returned. - SendRequest(name string, wantReply bool, payload []byte) (bool, error) - - // Stderr returns an io.ReadWriter that writes to this channel - // with the extended data type set to stderr. Stderr may - // safely be read and written from a different goroutine than - // Read and Write respectively. - Stderr() io.ReadWriter -} - -// Request is a request sent outside of the normal stream of -// data. Requests can either be specific to an SSH channel, or they -// can be global. -type Request struct { - Type string - WantReply bool - Payload []byte - - ch *channel - mux *mux -} - -// Reply sends a response to a request. It must be called for all requests -// where WantReply is true and is a no-op otherwise. The payload argument is -// ignored for replies to channel-specific requests. -func (r *Request) Reply(ok bool, payload []byte) error { - if !r.WantReply { - return nil - } - - if r.ch == nil { - return r.mux.ackRequest(ok, payload) - } - - return r.ch.ackRequest(ok) -} - -// RejectionReason is an enumeration used when rejecting channel creation -// requests. See RFC 4254, section 5.1. -type RejectionReason uint32 - -const ( - Prohibited RejectionReason = iota + 1 - ConnectionFailed - UnknownChannelType - ResourceShortage -) - -// String converts the rejection reason to human readable form. -func (r RejectionReason) String() string { - switch r { - case Prohibited: - return "administratively prohibited" - case ConnectionFailed: - return "connect failed" - case UnknownChannelType: - return "unknown channel type" - case ResourceShortage: - return "resource shortage" - } - return fmt.Sprintf("unknown reason %d", int(r)) -} - -func min(a uint32, b int) uint32 { - if a < uint32(b) { - return a - } - return uint32(b) -} - -type channelDirection uint8 - -const ( - channelInbound channelDirection = iota - channelOutbound -) - -// channel is an implementation of the Channel interface that works -// with the mux class. -type channel struct { - // R/O after creation - chanType string - extraData []byte - localId, remoteId uint32 - - // maxIncomingPayload and maxRemotePayload are the maximum - // payload sizes of normal and extended data packets for - // receiving and sending, respectively. The wire packet will - // be 9 or 13 bytes larger (excluding encryption overhead). - maxIncomingPayload uint32 - maxRemotePayload uint32 - - mux *mux - - // decided is set to true if an accept or reject message has been sent - // (for outbound channels) or received (for inbound channels). - decided bool - - // direction contains either channelOutbound, for channels created - // locally, or channelInbound, for channels created by the peer. - direction channelDirection - - // Pending internal channel messages. - msg chan interface{} - - // Since requests have no ID, there can be only one request - // with WantReply=true outstanding. This lock is held by a - // goroutine that has such an outgoing request pending. - sentRequestMu sync.Mutex - - incomingRequests chan *Request - - sentEOF bool - - // thread-safe data - remoteWin window - pending *buffer - extPending *buffer - - // windowMu protects myWindow, the flow-control window. - windowMu sync.Mutex - myWindow uint32 - - // writeMu serializes calls to mux.conn.writePacket() and - // protects sentClose and packetPool. This mutex must be - // different from windowMu, as writePacket can block if there - // is a key exchange pending. - writeMu sync.Mutex - sentClose bool - - // packetPool has a buffer for each extended channel ID to - // save allocations during writes. - packetPool map[uint32][]byte -} - -// writePacket sends a packet. If the packet is a channel close, it updates -// sentClose. This method takes the lock c.writeMu. -func (ch *channel) writePacket(packet []byte) error { - ch.writeMu.Lock() - if ch.sentClose { - ch.writeMu.Unlock() - return io.EOF - } - ch.sentClose = (packet[0] == msgChannelClose) - err := ch.mux.conn.writePacket(packet) - ch.writeMu.Unlock() - return err -} - -func (ch *channel) sendMessage(msg interface{}) error { - if debugMux { - log.Printf("send(%d): %#v", ch.mux.chanList.offset, msg) - } - - p := Marshal(msg) - binary.BigEndian.PutUint32(p[1:], ch.remoteId) - return ch.writePacket(p) -} - -// WriteExtended writes data to a specific extended stream. These streams are -// used, for example, for stderr. -func (ch *channel) WriteExtended(data []byte, extendedCode uint32) (n int, err error) { - if ch.sentEOF { - return 0, io.EOF - } - // 1 byte message type, 4 bytes remoteId, 4 bytes data length - opCode := byte(msgChannelData) - headerLength := uint32(9) - if extendedCode > 0 { - headerLength += 4 - opCode = msgChannelExtendedData - } - - ch.writeMu.Lock() - packet := ch.packetPool[extendedCode] - // We don't remove the buffer from packetPool, so - // WriteExtended calls from different goroutines will be - // flagged as errors by the race detector. - ch.writeMu.Unlock() - - for len(data) > 0 { - space := min(ch.maxRemotePayload, len(data)) - if space, err = ch.remoteWin.reserve(space); err != nil { - return n, err - } - if want := headerLength + space; uint32(cap(packet)) < want { - packet = make([]byte, want) - } else { - packet = packet[:want] - } - - todo := data[:space] - - packet[0] = opCode - binary.BigEndian.PutUint32(packet[1:], ch.remoteId) - if extendedCode > 0 { - binary.BigEndian.PutUint32(packet[5:], uint32(extendedCode)) - } - binary.BigEndian.PutUint32(packet[headerLength-4:], uint32(len(todo))) - copy(packet[headerLength:], todo) - if err = ch.writePacket(packet); err != nil { - return n, err - } - - n += len(todo) - data = data[len(todo):] - } - - ch.writeMu.Lock() - ch.packetPool[extendedCode] = packet - ch.writeMu.Unlock() - - return n, err -} - -func (ch *channel) handleData(packet []byte) error { - headerLen := 9 - isExtendedData := packet[0] == msgChannelExtendedData - if isExtendedData { - headerLen = 13 - } - if len(packet) < headerLen { - // malformed data packet - return parseError(packet[0]) - } - - var extended uint32 - if isExtendedData { - extended = binary.BigEndian.Uint32(packet[5:]) - } - - length := binary.BigEndian.Uint32(packet[headerLen-4 : headerLen]) - if length == 0 { - return nil - } - if length > ch.maxIncomingPayload { - // TODO(hanwen): should send Disconnect? - return errors.New("ssh: incoming packet exceeds maximum payload size") - } - - data := packet[headerLen:] - if length != uint32(len(data)) { - return errors.New("ssh: wrong packet length") - } - - ch.windowMu.Lock() - if ch.myWindow < length { - ch.windowMu.Unlock() - // TODO(hanwen): should send Disconnect with reason? - return errors.New("ssh: remote side wrote too much") - } - ch.myWindow -= length - ch.windowMu.Unlock() - - if extended == 1 { - ch.extPending.write(data) - } else if extended > 0 { - // discard other extended data. - } else { - ch.pending.write(data) - } - return nil -} - -func (c *channel) adjustWindow(n uint32) error { - c.windowMu.Lock() - // Since myWindow is managed on our side, and can never exceed - // the initial window setting, we don't worry about overflow. - c.myWindow += uint32(n) - c.windowMu.Unlock() - return c.sendMessage(windowAdjustMsg{ - AdditionalBytes: uint32(n), - }) -} - -func (c *channel) ReadExtended(data []byte, extended uint32) (n int, err error) { - switch extended { - case 1: - n, err = c.extPending.Read(data) - case 0: - n, err = c.pending.Read(data) - default: - return 0, fmt.Errorf("ssh: extended code %d unimplemented", extended) - } - - if n > 0 { - err = c.adjustWindow(uint32(n)) - // sendWindowAdjust can return io.EOF if the remote - // peer has closed the connection, however we want to - // defer forwarding io.EOF to the caller of Read until - // the buffer has been drained. - if n > 0 && err == io.EOF { - err = nil - } - } - - return n, err -} - -func (c *channel) close() { - c.pending.eof() - c.extPending.eof() - close(c.msg) - close(c.incomingRequests) - c.writeMu.Lock() - // This is not necessary for a normal channel teardown, but if - // there was another error, it is. - c.sentClose = true - c.writeMu.Unlock() - // Unblock writers. - c.remoteWin.close() -} - -// responseMessageReceived is called when a success or failure message is -// received on a channel to check that such a message is reasonable for the -// given channel. -func (ch *channel) responseMessageReceived() error { - if ch.direction == channelInbound { - return errors.New("ssh: channel response message received on inbound channel") - } - if ch.decided { - return errors.New("ssh: duplicate response received for channel") - } - ch.decided = true - return nil -} - -func (ch *channel) handlePacket(packet []byte) error { - switch packet[0] { - case msgChannelData, msgChannelExtendedData: - return ch.handleData(packet) - case msgChannelClose: - ch.sendMessage(channelCloseMsg{PeersID: ch.remoteId}) - ch.mux.chanList.remove(ch.localId) - ch.close() - return nil - case msgChannelEOF: - // RFC 4254 is mute on how EOF affects dataExt messages but - // it is logical to signal EOF at the same time. - ch.extPending.eof() - ch.pending.eof() - return nil - } - - decoded, err := decode(packet) - if err != nil { - return err - } - - switch msg := decoded.(type) { - case *channelOpenFailureMsg: - if err := ch.responseMessageReceived(); err != nil { - return err - } - ch.mux.chanList.remove(msg.PeersID) - ch.msg <- msg - case *channelOpenConfirmMsg: - if err := ch.responseMessageReceived(); err != nil { - return err - } - if msg.MaxPacketSize < minPacketLength || msg.MaxPacketSize > 1<<31 { - return fmt.Errorf("ssh: invalid MaxPacketSize %d from peer", msg.MaxPacketSize) - } - ch.remoteId = msg.MyID - ch.maxRemotePayload = msg.MaxPacketSize - ch.remoteWin.add(msg.MyWindow) - ch.msg <- msg - case *windowAdjustMsg: - if !ch.remoteWin.add(msg.AdditionalBytes) { - return fmt.Errorf("ssh: invalid window update for %d bytes", msg.AdditionalBytes) - } - case *channelRequestMsg: - req := Request{ - Type: msg.Request, - WantReply: msg.WantReply, - Payload: msg.RequestSpecificData, - ch: ch, - } - - ch.incomingRequests <- &req - default: - ch.msg <- msg - } - return nil -} - -func (m *mux) newChannel(chanType string, direction channelDirection, extraData []byte) *channel { - ch := &channel{ - remoteWin: window{Cond: newCond()}, - myWindow: channelWindowSize, - pending: newBuffer(), - extPending: newBuffer(), - direction: direction, - incomingRequests: make(chan *Request, chanSize), - msg: make(chan interface{}, chanSize), - chanType: chanType, - extraData: extraData, - mux: m, - packetPool: make(map[uint32][]byte), - } - ch.localId = m.chanList.add(ch) - return ch -} - -var errUndecided = errors.New("ssh: must Accept or Reject channel") -var errDecidedAlready = errors.New("ssh: can call Accept or Reject only once") - -type extChannel struct { - code uint32 - ch *channel -} - -func (e *extChannel) Write(data []byte) (n int, err error) { - return e.ch.WriteExtended(data, e.code) -} - -func (e *extChannel) Read(data []byte) (n int, err error) { - return e.ch.ReadExtended(data, e.code) -} - -func (ch *channel) Accept() (Channel, <-chan *Request, error) { - if ch.decided { - return nil, nil, errDecidedAlready - } - ch.maxIncomingPayload = channelMaxPacket - confirm := channelOpenConfirmMsg{ - PeersID: ch.remoteId, - MyID: ch.localId, - MyWindow: ch.myWindow, - MaxPacketSize: ch.maxIncomingPayload, - } - ch.decided = true - if err := ch.sendMessage(confirm); err != nil { - return nil, nil, err - } - - return ch, ch.incomingRequests, nil -} - -func (ch *channel) Reject(reason RejectionReason, message string) error { - if ch.decided { - return errDecidedAlready - } - reject := channelOpenFailureMsg{ - PeersID: ch.remoteId, - Reason: reason, - Message: message, - Language: "en", - } - ch.decided = true - return ch.sendMessage(reject) -} - -func (ch *channel) Read(data []byte) (int, error) { - if !ch.decided { - return 0, errUndecided - } - return ch.ReadExtended(data, 0) -} - -func (ch *channel) Write(data []byte) (int, error) { - if !ch.decided { - return 0, errUndecided - } - return ch.WriteExtended(data, 0) -} - -func (ch *channel) CloseWrite() error { - if !ch.decided { - return errUndecided - } - ch.sentEOF = true - return ch.sendMessage(channelEOFMsg{ - PeersID: ch.remoteId}) -} - -func (ch *channel) Close() error { - if !ch.decided { - return errUndecided - } - - return ch.sendMessage(channelCloseMsg{ - PeersID: ch.remoteId}) -} - -// Extended returns an io.ReadWriter that sends and receives data on the given, -// SSH extended stream. Such streams are used, for example, for stderr. -func (ch *channel) Extended(code uint32) io.ReadWriter { - if !ch.decided { - return nil - } - return &extChannel{code, ch} -} - -func (ch *channel) Stderr() io.ReadWriter { - return ch.Extended(1) -} - -func (ch *channel) SendRequest(name string, wantReply bool, payload []byte) (bool, error) { - if !ch.decided { - return false, errUndecided - } - - if wantReply { - ch.sentRequestMu.Lock() - defer ch.sentRequestMu.Unlock() - } - - msg := channelRequestMsg{ - PeersID: ch.remoteId, - Request: name, - WantReply: wantReply, - RequestSpecificData: payload, - } - - if err := ch.sendMessage(msg); err != nil { - return false, err - } - - if wantReply { - m, ok := (<-ch.msg) - if !ok { - return false, io.EOF - } - switch m.(type) { - case *channelRequestFailureMsg: - return false, nil - case *channelRequestSuccessMsg: - return true, nil - default: - return false, fmt.Errorf("ssh: unexpected response to channel request: %#v", m) - } - } - - return false, nil -} - -// ackRequest either sends an ack or nack to the channel request. -func (ch *channel) ackRequest(ok bool) error { - if !ch.decided { - return errUndecided - } - - var msg interface{} - if !ok { - msg = channelRequestFailureMsg{ - PeersID: ch.remoteId, - } - } else { - msg = channelRequestSuccessMsg{ - PeersID: ch.remoteId, - } - } - return ch.sendMessage(msg) -} - -func (ch *channel) ChannelType() string { - return ch.chanType -} - -func (ch *channel) ExtraData() []byte { - return ch.extraData -} diff --git a/vendor/golang.org/x/crypto/ssh/cipher.go b/vendor/golang.org/x/crypto/ssh/cipher.go deleted file mode 100644 index 67b01261..00000000 --- a/vendor/golang.org/x/crypto/ssh/cipher.go +++ /dev/null @@ -1,770 +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 ssh - -import ( - "crypto/aes" - "crypto/cipher" - "crypto/des" - "crypto/rc4" - "crypto/subtle" - "encoding/binary" - "errors" - "fmt" - "hash" - "io" - "io/ioutil" - "math/bits" - - "golang.org/x/crypto/internal/chacha20" - "golang.org/x/crypto/poly1305" -) - -const ( - packetSizeMultiple = 16 // TODO(huin) this should be determined by the cipher. - - // RFC 4253 section 6.1 defines a minimum packet size of 32768 that implementations - // MUST be able to process (plus a few more kilobytes for padding and mac). The RFC - // indicates implementations SHOULD be able to handle larger packet sizes, but then - // waffles on about reasonable limits. - // - // OpenSSH caps their maxPacket at 256kB so we choose to do - // the same. maxPacket is also used to ensure that uint32 - // length fields do not overflow, so it should remain well - // below 4G. - maxPacket = 256 * 1024 -) - -// noneCipher implements cipher.Stream and provides no encryption. It is used -// by the transport before the first key-exchange. -type noneCipher struct{} - -func (c noneCipher) XORKeyStream(dst, src []byte) { - copy(dst, src) -} - -func newAESCTR(key, iv []byte) (cipher.Stream, error) { - c, err := aes.NewCipher(key) - if err != nil { - return nil, err - } - return cipher.NewCTR(c, iv), nil -} - -func newRC4(key, iv []byte) (cipher.Stream, error) { - return rc4.NewCipher(key) -} - -type cipherMode struct { - keySize int - ivSize int - create func(key, iv []byte, macKey []byte, algs directionAlgorithms) (packetCipher, error) -} - -func streamCipherMode(skip int, createFunc func(key, iv []byte) (cipher.Stream, error)) func(key, iv []byte, macKey []byte, algs directionAlgorithms) (packetCipher, error) { - return func(key, iv, macKey []byte, algs directionAlgorithms) (packetCipher, error) { - stream, err := createFunc(key, iv) - if err != nil { - return nil, err - } - - var streamDump []byte - if skip > 0 { - streamDump = make([]byte, 512) - } - - for remainingToDump := skip; remainingToDump > 0; { - dumpThisTime := remainingToDump - if dumpThisTime > len(streamDump) { - dumpThisTime = len(streamDump) - } - stream.XORKeyStream(streamDump[:dumpThisTime], streamDump[:dumpThisTime]) - remainingToDump -= dumpThisTime - } - - mac := macModes[algs.MAC].new(macKey) - return &streamPacketCipher{ - mac: mac, - etm: macModes[algs.MAC].etm, - macResult: make([]byte, mac.Size()), - cipher: stream, - }, nil - } -} - -// cipherModes documents properties of supported ciphers. Ciphers not included -// are not supported and will not be negotiated, even if explicitly requested in -// ClientConfig.Crypto.Ciphers. -var cipherModes = map[string]*cipherMode{ - // Ciphers from RFC4344, which introduced many CTR-based ciphers. Algorithms - // are defined in the order specified in the RFC. - "aes128-ctr": {16, aes.BlockSize, streamCipherMode(0, newAESCTR)}, - "aes192-ctr": {24, aes.BlockSize, streamCipherMode(0, newAESCTR)}, - "aes256-ctr": {32, aes.BlockSize, streamCipherMode(0, newAESCTR)}, - - // Ciphers from RFC4345, which introduces security-improved arcfour ciphers. - // They are defined in the order specified in the RFC. - "arcfour128": {16, 0, streamCipherMode(1536, newRC4)}, - "arcfour256": {32, 0, streamCipherMode(1536, newRC4)}, - - // Cipher defined in RFC 4253, which describes SSH Transport Layer Protocol. - // Note that this cipher is not safe, as stated in RFC 4253: "Arcfour (and - // RC4) has problems with weak keys, and should be used with caution." - // RFC4345 introduces improved versions of Arcfour. - "arcfour": {16, 0, streamCipherMode(0, newRC4)}, - - // AEAD ciphers - gcmCipherID: {16, 12, newGCMCipher}, - chacha20Poly1305ID: {64, 0, newChaCha20Cipher}, - - // CBC mode is insecure and so is not included in the default config. - // (See http://www.isg.rhul.ac.uk/~kp/SandPfinal.pdf). If absolutely - // needed, it's possible to specify a custom Config to enable it. - // You should expect that an active attacker can recover plaintext if - // you do. - aes128cbcID: {16, aes.BlockSize, newAESCBCCipher}, - - // 3des-cbc is insecure and is not included in the default - // config. - tripledescbcID: {24, des.BlockSize, newTripleDESCBCCipher}, -} - -// prefixLen is the length of the packet prefix that contains the packet length -// and number of padding bytes. -const prefixLen = 5 - -// streamPacketCipher is a packetCipher using a stream cipher. -type streamPacketCipher struct { - mac hash.Hash - cipher cipher.Stream - etm bool - - // The following members are to avoid per-packet allocations. - prefix [prefixLen]byte - seqNumBytes [4]byte - padding [2 * packetSizeMultiple]byte - packetData []byte - macResult []byte -} - -// readPacket reads and decrypt a single packet from the reader argument. -func (s *streamPacketCipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) { - if _, err := io.ReadFull(r, s.prefix[:]); err != nil { - return nil, err - } - - var encryptedPaddingLength [1]byte - if s.mac != nil && s.etm { - copy(encryptedPaddingLength[:], s.prefix[4:5]) - s.cipher.XORKeyStream(s.prefix[4:5], s.prefix[4:5]) - } else { - s.cipher.XORKeyStream(s.prefix[:], s.prefix[:]) - } - - length := binary.BigEndian.Uint32(s.prefix[0:4]) - paddingLength := uint32(s.prefix[4]) - - var macSize uint32 - if s.mac != nil { - s.mac.Reset() - binary.BigEndian.PutUint32(s.seqNumBytes[:], seqNum) - s.mac.Write(s.seqNumBytes[:]) - if s.etm { - s.mac.Write(s.prefix[:4]) - s.mac.Write(encryptedPaddingLength[:]) - } else { - s.mac.Write(s.prefix[:]) - } - macSize = uint32(s.mac.Size()) - } - - if length <= paddingLength+1 { - return nil, errors.New("ssh: invalid packet length, packet too small") - } - - if length > maxPacket { - return nil, errors.New("ssh: invalid packet length, packet too large") - } - - // the maxPacket check above ensures that length-1+macSize - // does not overflow. - if uint32(cap(s.packetData)) < length-1+macSize { - s.packetData = make([]byte, length-1+macSize) - } else { - s.packetData = s.packetData[:length-1+macSize] - } - - if _, err := io.ReadFull(r, s.packetData); err != nil { - return nil, err - } - mac := s.packetData[length-1:] - data := s.packetData[:length-1] - - if s.mac != nil && s.etm { - s.mac.Write(data) - } - - s.cipher.XORKeyStream(data, data) - - if s.mac != nil { - if !s.etm { - s.mac.Write(data) - } - s.macResult = s.mac.Sum(s.macResult[:0]) - if subtle.ConstantTimeCompare(s.macResult, mac) != 1 { - return nil, errors.New("ssh: MAC failure") - } - } - - return s.packetData[:length-paddingLength-1], nil -} - -// writePacket encrypts and sends a packet of data to the writer argument -func (s *streamPacketCipher) writePacket(seqNum uint32, w io.Writer, rand io.Reader, packet []byte) error { - if len(packet) > maxPacket { - return errors.New("ssh: packet too large") - } - - aadlen := 0 - if s.mac != nil && s.etm { - // packet length is not encrypted for EtM modes - aadlen = 4 - } - - paddingLength := packetSizeMultiple - (prefixLen+len(packet)-aadlen)%packetSizeMultiple - if paddingLength < 4 { - paddingLength += packetSizeMultiple - } - - length := len(packet) + 1 + paddingLength - binary.BigEndian.PutUint32(s.prefix[:], uint32(length)) - s.prefix[4] = byte(paddingLength) - padding := s.padding[:paddingLength] - if _, err := io.ReadFull(rand, padding); err != nil { - return err - } - - if s.mac != nil { - s.mac.Reset() - binary.BigEndian.PutUint32(s.seqNumBytes[:], seqNum) - s.mac.Write(s.seqNumBytes[:]) - - if s.etm { - // For EtM algorithms, the packet length must stay unencrypted, - // but the following data (padding length) must be encrypted - s.cipher.XORKeyStream(s.prefix[4:5], s.prefix[4:5]) - } - - s.mac.Write(s.prefix[:]) - - if !s.etm { - // For non-EtM algorithms, the algorithm is applied on unencrypted data - s.mac.Write(packet) - s.mac.Write(padding) - } - } - - if !(s.mac != nil && s.etm) { - // For EtM algorithms, the padding length has already been encrypted - // and the packet length must remain unencrypted - s.cipher.XORKeyStream(s.prefix[:], s.prefix[:]) - } - - s.cipher.XORKeyStream(packet, packet) - s.cipher.XORKeyStream(padding, padding) - - if s.mac != nil && s.etm { - // For EtM algorithms, packet and padding must be encrypted - s.mac.Write(packet) - s.mac.Write(padding) - } - - if _, err := w.Write(s.prefix[:]); err != nil { - return err - } - if _, err := w.Write(packet); err != nil { - return err - } - if _, err := w.Write(padding); err != nil { - return err - } - - if s.mac != nil { - s.macResult = s.mac.Sum(s.macResult[:0]) - if _, err := w.Write(s.macResult); err != nil { - return err - } - } - - return nil -} - -type gcmCipher struct { - aead cipher.AEAD - prefix [4]byte - iv []byte - buf []byte -} - -func newGCMCipher(key, iv, unusedMacKey []byte, unusedAlgs directionAlgorithms) (packetCipher, error) { - c, err := aes.NewCipher(key) - if err != nil { - return nil, err - } - - aead, err := cipher.NewGCM(c) - if err != nil { - return nil, err - } - - return &gcmCipher{ - aead: aead, - iv: iv, - }, nil -} - -const gcmTagSize = 16 - -func (c *gcmCipher) writePacket(seqNum uint32, w io.Writer, rand io.Reader, packet []byte) error { - // Pad out to multiple of 16 bytes. This is different from the - // stream cipher because that encrypts the length too. - padding := byte(packetSizeMultiple - (1+len(packet))%packetSizeMultiple) - if padding < 4 { - padding += packetSizeMultiple - } - - length := uint32(len(packet) + int(padding) + 1) - binary.BigEndian.PutUint32(c.prefix[:], length) - if _, err := w.Write(c.prefix[:]); err != nil { - return err - } - - if cap(c.buf) < int(length) { - c.buf = make([]byte, length) - } else { - c.buf = c.buf[:length] - } - - c.buf[0] = padding - copy(c.buf[1:], packet) - if _, err := io.ReadFull(rand, c.buf[1+len(packet):]); err != nil { - return err - } - c.buf = c.aead.Seal(c.buf[:0], c.iv, c.buf, c.prefix[:]) - if _, err := w.Write(c.buf); err != nil { - return err - } - c.incIV() - - return nil -} - -func (c *gcmCipher) incIV() { - for i := 4 + 7; i >= 4; i-- { - c.iv[i]++ - if c.iv[i] != 0 { - break - } - } -} - -func (c *gcmCipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) { - if _, err := io.ReadFull(r, c.prefix[:]); err != nil { - return nil, err - } - length := binary.BigEndian.Uint32(c.prefix[:]) - if length > maxPacket { - return nil, errors.New("ssh: max packet length exceeded") - } - - if cap(c.buf) < int(length+gcmTagSize) { - c.buf = make([]byte, length+gcmTagSize) - } else { - c.buf = c.buf[:length+gcmTagSize] - } - - if _, err := io.ReadFull(r, c.buf); err != nil { - return nil, err - } - - plain, err := c.aead.Open(c.buf[:0], c.iv, c.buf, c.prefix[:]) - if err != nil { - return nil, err - } - c.incIV() - - padding := plain[0] - if padding < 4 { - // padding is a byte, so it automatically satisfies - // the maximum size, which is 255. - return nil, fmt.Errorf("ssh: illegal padding %d", padding) - } - - if int(padding+1) >= len(plain) { - return nil, fmt.Errorf("ssh: padding %d too large", padding) - } - plain = plain[1 : length-uint32(padding)] - return plain, nil -} - -// cbcCipher implements aes128-cbc cipher defined in RFC 4253 section 6.1 -type cbcCipher struct { - mac hash.Hash - macSize uint32 - decrypter cipher.BlockMode - encrypter cipher.BlockMode - - // The following members are to avoid per-packet allocations. - seqNumBytes [4]byte - packetData []byte - macResult []byte - - // Amount of data we should still read to hide which - // verification error triggered. - oracleCamouflage uint32 -} - -func newCBCCipher(c cipher.Block, key, iv, macKey []byte, algs directionAlgorithms) (packetCipher, error) { - cbc := &cbcCipher{ - mac: macModes[algs.MAC].new(macKey), - decrypter: cipher.NewCBCDecrypter(c, iv), - encrypter: cipher.NewCBCEncrypter(c, iv), - packetData: make([]byte, 1024), - } - if cbc.mac != nil { - cbc.macSize = uint32(cbc.mac.Size()) - } - - return cbc, nil -} - -func newAESCBCCipher(key, iv, macKey []byte, algs directionAlgorithms) (packetCipher, error) { - c, err := aes.NewCipher(key) - if err != nil { - return nil, err - } - - cbc, err := newCBCCipher(c, key, iv, macKey, algs) - if err != nil { - return nil, err - } - - return cbc, nil -} - -func newTripleDESCBCCipher(key, iv, macKey []byte, algs directionAlgorithms) (packetCipher, error) { - c, err := des.NewTripleDESCipher(key) - if err != nil { - return nil, err - } - - cbc, err := newCBCCipher(c, key, iv, macKey, algs) - if err != nil { - return nil, err - } - - return cbc, nil -} - -func maxUInt32(a, b int) uint32 { - if a > b { - return uint32(a) - } - return uint32(b) -} - -const ( - cbcMinPacketSizeMultiple = 8 - cbcMinPacketSize = 16 - cbcMinPaddingSize = 4 -) - -// cbcError represents a verification error that may leak information. -type cbcError string - -func (e cbcError) Error() string { return string(e) } - -func (c *cbcCipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) { - p, err := c.readPacketLeaky(seqNum, r) - if err != nil { - if _, ok := err.(cbcError); ok { - // Verification error: read a fixed amount of - // data, to make distinguishing between - // failing MAC and failing length check more - // difficult. - io.CopyN(ioutil.Discard, r, int64(c.oracleCamouflage)) - } - } - return p, err -} - -func (c *cbcCipher) readPacketLeaky(seqNum uint32, r io.Reader) ([]byte, error) { - blockSize := c.decrypter.BlockSize() - - // Read the header, which will include some of the subsequent data in the - // case of block ciphers - this is copied back to the payload later. - // How many bytes of payload/padding will be read with this first read. - firstBlockLength := uint32((prefixLen + blockSize - 1) / blockSize * blockSize) - firstBlock := c.packetData[:firstBlockLength] - if _, err := io.ReadFull(r, firstBlock); err != nil { - return nil, err - } - - c.oracleCamouflage = maxPacket + 4 + c.macSize - firstBlockLength - - c.decrypter.CryptBlocks(firstBlock, firstBlock) - length := binary.BigEndian.Uint32(firstBlock[:4]) - if length > maxPacket { - return nil, cbcError("ssh: packet too large") - } - if length+4 < maxUInt32(cbcMinPacketSize, blockSize) { - // The minimum size of a packet is 16 (or the cipher block size, whichever - // is larger) bytes. - return nil, cbcError("ssh: packet too small") - } - // The length of the packet (including the length field but not the MAC) must - // be a multiple of the block size or 8, whichever is larger. - if (length+4)%maxUInt32(cbcMinPacketSizeMultiple, blockSize) != 0 { - return nil, cbcError("ssh: invalid packet length multiple") - } - - paddingLength := uint32(firstBlock[4]) - if paddingLength < cbcMinPaddingSize || length <= paddingLength+1 { - return nil, cbcError("ssh: invalid packet length") - } - - // Positions within the c.packetData buffer: - macStart := 4 + length - paddingStart := macStart - paddingLength - - // Entire packet size, starting before length, ending at end of mac. - entirePacketSize := macStart + c.macSize - - // Ensure c.packetData is large enough for the entire packet data. - if uint32(cap(c.packetData)) < entirePacketSize { - // Still need to upsize and copy, but this should be rare at runtime, only - // on upsizing the packetData buffer. - c.packetData = make([]byte, entirePacketSize) - copy(c.packetData, firstBlock) - } else { - c.packetData = c.packetData[:entirePacketSize] - } - - n, err := io.ReadFull(r, c.packetData[firstBlockLength:]) - if err != nil { - return nil, err - } - c.oracleCamouflage -= uint32(n) - - remainingCrypted := c.packetData[firstBlockLength:macStart] - c.decrypter.CryptBlocks(remainingCrypted, remainingCrypted) - - mac := c.packetData[macStart:] - if c.mac != nil { - c.mac.Reset() - binary.BigEndian.PutUint32(c.seqNumBytes[:], seqNum) - c.mac.Write(c.seqNumBytes[:]) - c.mac.Write(c.packetData[:macStart]) - c.macResult = c.mac.Sum(c.macResult[:0]) - if subtle.ConstantTimeCompare(c.macResult, mac) != 1 { - return nil, cbcError("ssh: MAC failure") - } - } - - return c.packetData[prefixLen:paddingStart], nil -} - -func (c *cbcCipher) writePacket(seqNum uint32, w io.Writer, rand io.Reader, packet []byte) error { - effectiveBlockSize := maxUInt32(cbcMinPacketSizeMultiple, c.encrypter.BlockSize()) - - // Length of encrypted portion of the packet (header, payload, padding). - // Enforce minimum padding and packet size. - encLength := maxUInt32(prefixLen+len(packet)+cbcMinPaddingSize, cbcMinPaddingSize) - // Enforce block size. - encLength = (encLength + effectiveBlockSize - 1) / effectiveBlockSize * effectiveBlockSize - - length := encLength - 4 - paddingLength := int(length) - (1 + len(packet)) - - // Overall buffer contains: header, payload, padding, mac. - // Space for the MAC is reserved in the capacity but not the slice length. - bufferSize := encLength + c.macSize - if uint32(cap(c.packetData)) < bufferSize { - c.packetData = make([]byte, encLength, bufferSize) - } else { - c.packetData = c.packetData[:encLength] - } - - p := c.packetData - - // Packet header. - binary.BigEndian.PutUint32(p, length) - p = p[4:] - p[0] = byte(paddingLength) - - // Payload. - p = p[1:] - copy(p, packet) - - // Padding. - p = p[len(packet):] - if _, err := io.ReadFull(rand, p); err != nil { - return err - } - - if c.mac != nil { - c.mac.Reset() - binary.BigEndian.PutUint32(c.seqNumBytes[:], seqNum) - c.mac.Write(c.seqNumBytes[:]) - c.mac.Write(c.packetData) - // The MAC is now appended into the capacity reserved for it earlier. - c.packetData = c.mac.Sum(c.packetData) - } - - c.encrypter.CryptBlocks(c.packetData[:encLength], c.packetData[:encLength]) - - if _, err := w.Write(c.packetData); err != nil { - return err - } - - return nil -} - -const chacha20Poly1305ID = "chacha20-poly1305@openssh.com" - -// chacha20Poly1305Cipher implements the chacha20-poly1305@openssh.com -// AEAD, which is described here: -// -// https://tools.ietf.org/html/draft-josefsson-ssh-chacha20-poly1305-openssh-00 -// -// the methods here also implement padding, which RFC4253 Section 6 -// also requires of stream ciphers. -type chacha20Poly1305Cipher struct { - lengthKey [8]uint32 - contentKey [8]uint32 - buf []byte -} - -func newChaCha20Cipher(key, unusedIV, unusedMACKey []byte, unusedAlgs directionAlgorithms) (packetCipher, error) { - if len(key) != 64 { - panic(len(key)) - } - - c := &chacha20Poly1305Cipher{ - buf: make([]byte, 256), - } - - for i := range c.contentKey { - c.contentKey[i] = binary.LittleEndian.Uint32(key[i*4 : (i+1)*4]) - } - for i := range c.lengthKey { - c.lengthKey[i] = binary.LittleEndian.Uint32(key[(i+8)*4 : (i+9)*4]) - } - return c, nil -} - -func (c *chacha20Poly1305Cipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) { - nonce := [3]uint32{0, 0, bits.ReverseBytes32(seqNum)} - s := chacha20.New(c.contentKey, nonce) - var polyKey [32]byte - s.XORKeyStream(polyKey[:], polyKey[:]) - s.Advance() // skip next 32 bytes - - encryptedLength := c.buf[:4] - if _, err := io.ReadFull(r, encryptedLength); err != nil { - return nil, err - } - - var lenBytes [4]byte - chacha20.New(c.lengthKey, nonce).XORKeyStream(lenBytes[:], encryptedLength) - - length := binary.BigEndian.Uint32(lenBytes[:]) - if length > maxPacket { - return nil, errors.New("ssh: invalid packet length, packet too large") - } - - contentEnd := 4 + length - packetEnd := contentEnd + poly1305.TagSize - if uint32(cap(c.buf)) < packetEnd { - c.buf = make([]byte, packetEnd) - copy(c.buf[:], encryptedLength) - } else { - c.buf = c.buf[:packetEnd] - } - - if _, err := io.ReadFull(r, c.buf[4:packetEnd]); err != nil { - return nil, err - } - - var mac [poly1305.TagSize]byte - copy(mac[:], c.buf[contentEnd:packetEnd]) - if !poly1305.Verify(&mac, c.buf[:contentEnd], &polyKey) { - return nil, errors.New("ssh: MAC failure") - } - - plain := c.buf[4:contentEnd] - s.XORKeyStream(plain, plain) - - padding := plain[0] - if padding < 4 { - // padding is a byte, so it automatically satisfies - // the maximum size, which is 255. - return nil, fmt.Errorf("ssh: illegal padding %d", padding) - } - - if int(padding)+1 >= len(plain) { - return nil, fmt.Errorf("ssh: padding %d too large", padding) - } - - plain = plain[1 : len(plain)-int(padding)] - - return plain, nil -} - -func (c *chacha20Poly1305Cipher) writePacket(seqNum uint32, w io.Writer, rand io.Reader, payload []byte) error { - nonce := [3]uint32{0, 0, bits.ReverseBytes32(seqNum)} - s := chacha20.New(c.contentKey, nonce) - var polyKey [32]byte - s.XORKeyStream(polyKey[:], polyKey[:]) - s.Advance() // skip next 32 bytes - - // There is no blocksize, so fall back to multiple of 8 byte - // padding, as described in RFC 4253, Sec 6. - const packetSizeMultiple = 8 - - padding := packetSizeMultiple - (1+len(payload))%packetSizeMultiple - if padding < 4 { - padding += packetSizeMultiple - } - - // size (4 bytes), padding (1), payload, padding, tag. - totalLength := 4 + 1 + len(payload) + padding + poly1305.TagSize - if cap(c.buf) < totalLength { - c.buf = make([]byte, totalLength) - } else { - c.buf = c.buf[:totalLength] - } - - binary.BigEndian.PutUint32(c.buf, uint32(1+len(payload)+padding)) - chacha20.New(c.lengthKey, nonce).XORKeyStream(c.buf, c.buf[:4]) - c.buf[4] = byte(padding) - copy(c.buf[5:], payload) - packetEnd := 5 + len(payload) + padding - if _, err := io.ReadFull(rand, c.buf[5+len(payload):packetEnd]); err != nil { - return err - } - - s.XORKeyStream(c.buf[4:], c.buf[4:packetEnd]) - - var mac [poly1305.TagSize]byte - poly1305.Sum(&mac, c.buf[:packetEnd], &polyKey) - - copy(c.buf[packetEnd:], mac[:]) - - if _, err := w.Write(c.buf); err != nil { - return err - } - return nil -} diff --git a/vendor/golang.org/x/crypto/ssh/cipher_test.go b/vendor/golang.org/x/crypto/ssh/cipher_test.go deleted file mode 100644 index a52d6e48..00000000 --- a/vendor/golang.org/x/crypto/ssh/cipher_test.go +++ /dev/null @@ -1,131 +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 ssh - -import ( - "bytes" - "crypto" - "crypto/rand" - "testing" -) - -func TestDefaultCiphersExist(t *testing.T) { - for _, cipherAlgo := range supportedCiphers { - if _, ok := cipherModes[cipherAlgo]; !ok { - t.Errorf("supported cipher %q is unknown", cipherAlgo) - } - } - for _, cipherAlgo := range preferredCiphers { - if _, ok := cipherModes[cipherAlgo]; !ok { - t.Errorf("preferred cipher %q is unknown", cipherAlgo) - } - } -} - -func TestPacketCiphers(t *testing.T) { - defaultMac := "hmac-sha2-256" - defaultCipher := "aes128-ctr" - for cipher := range cipherModes { - t.Run("cipher="+cipher, - func(t *testing.T) { testPacketCipher(t, cipher, defaultMac) }) - } - for mac := range macModes { - t.Run("mac="+mac, - func(t *testing.T) { testPacketCipher(t, defaultCipher, mac) }) - } -} - -func testPacketCipher(t *testing.T, cipher, mac string) { - kr := &kexResult{Hash: crypto.SHA1} - algs := directionAlgorithms{ - Cipher: cipher, - MAC: mac, - Compression: "none", - } - client, err := newPacketCipher(clientKeys, algs, kr) - if err != nil { - t.Fatalf("newPacketCipher(client, %q, %q): %v", cipher, mac, err) - } - server, err := newPacketCipher(clientKeys, algs, kr) - if err != nil { - t.Fatalf("newPacketCipher(client, %q, %q): %v", cipher, mac, err) - } - - want := "bla bla" - input := []byte(want) - buf := &bytes.Buffer{} - if err := client.writePacket(0, buf, rand.Reader, input); err != nil { - t.Fatalf("writePacket(%q, %q): %v", cipher, mac, err) - } - - packet, err := server.readPacket(0, buf) - if err != nil { - t.Fatalf("readPacket(%q, %q): %v", cipher, mac, err) - } - - if string(packet) != want { - t.Errorf("roundtrip(%q, %q): got %q, want %q", cipher, mac, packet, want) - } -} - -func TestCBCOracleCounterMeasure(t *testing.T) { - kr := &kexResult{Hash: crypto.SHA1} - algs := directionAlgorithms{ - Cipher: aes128cbcID, - MAC: "hmac-sha1", - Compression: "none", - } - client, err := newPacketCipher(clientKeys, algs, kr) - if err != nil { - t.Fatalf("newPacketCipher(client): %v", err) - } - - want := "bla bla" - input := []byte(want) - buf := &bytes.Buffer{} - if err := client.writePacket(0, buf, rand.Reader, input); err != nil { - t.Errorf("writePacket: %v", err) - } - - packetSize := buf.Len() - buf.Write(make([]byte, 2*maxPacket)) - - // We corrupt each byte, but this usually will only test the - // 'packet too large' or 'MAC failure' cases. - lastRead := -1 - for i := 0; i < packetSize; i++ { - server, err := newPacketCipher(clientKeys, algs, kr) - if err != nil { - t.Fatalf("newPacketCipher(client): %v", err) - } - - fresh := &bytes.Buffer{} - fresh.Write(buf.Bytes()) - fresh.Bytes()[i] ^= 0x01 - - before := fresh.Len() - _, err = server.readPacket(0, fresh) - if err == nil { - t.Errorf("corrupt byte %d: readPacket succeeded ", i) - continue - } - if _, ok := err.(cbcError); !ok { - t.Errorf("corrupt byte %d: got %v (%T), want cbcError", i, err, err) - continue - } - - after := fresh.Len() - bytesRead := before - after - if bytesRead < maxPacket { - t.Errorf("corrupt byte %d: read %d bytes, want more than %d", i, bytesRead, maxPacket) - continue - } - - if i > 0 && bytesRead != lastRead { - t.Errorf("corrupt byte %d: read %d bytes, want %d bytes read", i, bytesRead, lastRead) - } - lastRead = bytesRead - } -} diff --git a/vendor/golang.org/x/crypto/ssh/client.go b/vendor/golang.org/x/crypto/ssh/client.go deleted file mode 100644 index ae6ca775..00000000 --- a/vendor/golang.org/x/crypto/ssh/client.go +++ /dev/null @@ -1,278 +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 ssh - -import ( - "bytes" - "errors" - "fmt" - "net" - "os" - "sync" - "time" -) - -// Client implements a traditional SSH client that supports shells, -// subprocesses, TCP port/streamlocal forwarding and tunneled dialing. -type Client struct { - Conn - - handleForwardsOnce sync.Once // guards calling (*Client).handleForwards - - forwards forwardList // forwarded tcpip connections from the remote side - mu sync.Mutex - channelHandlers map[string]chan NewChannel -} - -// HandleChannelOpen returns a channel on which NewChannel requests -// for the given type are sent. If the type already is being handled, -// nil is returned. The channel is closed when the connection is closed. -func (c *Client) HandleChannelOpen(channelType string) <-chan NewChannel { - c.mu.Lock() - defer c.mu.Unlock() - if c.channelHandlers == nil { - // The SSH channel has been closed. - c := make(chan NewChannel) - close(c) - return c - } - - ch := c.channelHandlers[channelType] - if ch != nil { - return nil - } - - ch = make(chan NewChannel, chanSize) - c.channelHandlers[channelType] = ch - return ch -} - -// NewClient creates a Client on top of the given connection. -func NewClient(c Conn, chans <-chan NewChannel, reqs <-chan *Request) *Client { - conn := &Client{ - Conn: c, - channelHandlers: make(map[string]chan NewChannel, 1), - } - - go conn.handleGlobalRequests(reqs) - go conn.handleChannelOpens(chans) - go func() { - conn.Wait() - conn.forwards.closeAll() - }() - return conn -} - -// NewClientConn establishes an authenticated SSH connection using c -// as the underlying transport. The Request and NewChannel channels -// must be serviced or the connection will hang. -func NewClientConn(c net.Conn, addr string, config *ClientConfig) (Conn, <-chan NewChannel, <-chan *Request, error) { - fullConf := *config - fullConf.SetDefaults() - if fullConf.HostKeyCallback == nil { - c.Close() - return nil, nil, nil, errors.New("ssh: must specify HostKeyCallback") - } - - conn := &connection{ - sshConn: sshConn{conn: c}, - } - - if err := conn.clientHandshake(addr, &fullConf); err != nil { - c.Close() - return nil, nil, nil, fmt.Errorf("ssh: handshake failed: %v", err) - } - conn.mux = newMux(conn.transport) - return conn, conn.mux.incomingChannels, conn.mux.incomingRequests, nil -} - -// clientHandshake performs the client side key exchange. See RFC 4253 Section -// 7. -func (c *connection) clientHandshake(dialAddress string, config *ClientConfig) error { - if config.ClientVersion != "" { - c.clientVersion = []byte(config.ClientVersion) - } else { - c.clientVersion = []byte(packageVersion) - } - var err error - c.serverVersion, err = exchangeVersions(c.sshConn.conn, c.clientVersion) - if err != nil { - return err - } - - c.transport = newClientTransport( - newTransport(c.sshConn.conn, config.Rand, true /* is client */), - c.clientVersion, c.serverVersion, config, dialAddress, c.sshConn.RemoteAddr()) - if err := c.transport.waitSession(); err != nil { - return err - } - - c.sessionID = c.transport.getSessionID() - return c.clientAuthenticate(config) -} - -// verifyHostKeySignature verifies the host key obtained in the key -// exchange. -func verifyHostKeySignature(hostKey PublicKey, result *kexResult) error { - sig, rest, ok := parseSignatureBody(result.Signature) - if len(rest) > 0 || !ok { - return errors.New("ssh: signature parse error") - } - - return hostKey.Verify(result.H, sig) -} - -// NewSession opens a new Session for this client. (A session is a remote -// execution of a program.) -func (c *Client) NewSession() (*Session, error) { - ch, in, err := c.OpenChannel("session", nil) - if err != nil { - return nil, err - } - return newSession(ch, in) -} - -func (c *Client) handleGlobalRequests(incoming <-chan *Request) { - for r := range incoming { - // This handles keepalive messages and matches - // the behaviour of OpenSSH. - r.Reply(false, nil) - } -} - -// handleChannelOpens channel open messages from the remote side. -func (c *Client) handleChannelOpens(in <-chan NewChannel) { - for ch := range in { - c.mu.Lock() - handler := c.channelHandlers[ch.ChannelType()] - c.mu.Unlock() - - if handler != nil { - handler <- ch - } else { - ch.Reject(UnknownChannelType, fmt.Sprintf("unknown channel type: %v", ch.ChannelType())) - } - } - - c.mu.Lock() - for _, ch := range c.channelHandlers { - close(ch) - } - c.channelHandlers = nil - c.mu.Unlock() -} - -// Dial starts a client connection to the given SSH server. It is a -// convenience function that connects to the given network address, -// initiates the SSH handshake, and then sets up a Client. For access -// to incoming channels and requests, use net.Dial with NewClientConn -// instead. -func Dial(network, addr string, config *ClientConfig) (*Client, error) { - conn, err := net.DialTimeout(network, addr, config.Timeout) - if err != nil { - return nil, err - } - c, chans, reqs, err := NewClientConn(conn, addr, config) - if err != nil { - return nil, err - } - return NewClient(c, chans, reqs), nil -} - -// HostKeyCallback is the function type used for verifying server -// keys. A HostKeyCallback must return nil if the host key is OK, or -// an error to reject it. It receives the hostname as passed to Dial -// or NewClientConn. The remote address is the RemoteAddr of the -// net.Conn underlying the the SSH connection. -type HostKeyCallback func(hostname string, remote net.Addr, key PublicKey) error - -// BannerCallback is the function type used for treat the banner sent by -// the server. A BannerCallback receives the message sent by the remote server. -type BannerCallback func(message string) error - -// A ClientConfig structure is used to configure a Client. It must not be -// modified after having been passed to an SSH function. -type ClientConfig struct { - // Config contains configuration that is shared between clients and - // servers. - Config - - // User contains the username to authenticate as. - User string - - // Auth contains possible authentication methods to use with the - // server. Only the first instance of a particular RFC 4252 method will - // be used during authentication. - Auth []AuthMethod - - // HostKeyCallback is called during the cryptographic - // handshake to validate the server's host key. The client - // configuration must supply this callback for the connection - // to succeed. The functions InsecureIgnoreHostKey or - // FixedHostKey can be used for simplistic host key checks. - HostKeyCallback HostKeyCallback - - // BannerCallback is called during the SSH dance to display a custom - // server's message. The client configuration can supply this callback to - // handle it as wished. The function BannerDisplayStderr can be used for - // simplistic display on Stderr. - BannerCallback BannerCallback - - // ClientVersion contains the version identification string that will - // be used for the connection. If empty, a reasonable default is used. - ClientVersion string - - // HostKeyAlgorithms lists the key types that the client will - // accept from the server as host key, in order of - // preference. If empty, a reasonable default is used. Any - // string returned from PublicKey.Type method may be used, or - // any of the CertAlgoXxxx and KeyAlgoXxxx constants. - HostKeyAlgorithms []string - - // Timeout is the maximum amount of time for the TCP connection to establish. - // - // A Timeout of zero means no timeout. - Timeout time.Duration -} - -// InsecureIgnoreHostKey returns a function that can be used for -// ClientConfig.HostKeyCallback to accept any host key. It should -// not be used for production code. -func InsecureIgnoreHostKey() HostKeyCallback { - return func(hostname string, remote net.Addr, key PublicKey) error { - return nil - } -} - -type fixedHostKey struct { - key PublicKey -} - -func (f *fixedHostKey) check(hostname string, remote net.Addr, key PublicKey) error { - if f.key == nil { - return fmt.Errorf("ssh: required host key was nil") - } - if !bytes.Equal(key.Marshal(), f.key.Marshal()) { - return fmt.Errorf("ssh: host key mismatch") - } - return nil -} - -// FixedHostKey returns a function for use in -// ClientConfig.HostKeyCallback to accept only a specific host key. -func FixedHostKey(key PublicKey) HostKeyCallback { - hk := &fixedHostKey{key} - return hk.check -} - -// BannerDisplayStderr returns a function that can be used for -// ClientConfig.BannerCallback to display banners on os.Stderr. -func BannerDisplayStderr() BannerCallback { - return func(banner string) error { - _, err := os.Stderr.WriteString(banner) - - return err - } -} diff --git a/vendor/golang.org/x/crypto/ssh/client_auth.go b/vendor/golang.org/x/crypto/ssh/client_auth.go deleted file mode 100644 index 5f44b774..00000000 --- a/vendor/golang.org/x/crypto/ssh/client_auth.go +++ /dev/null @@ -1,525 +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 ssh - -import ( - "bytes" - "errors" - "fmt" - "io" -) - -type authResult int - -const ( - authFailure authResult = iota - authPartialSuccess - authSuccess -) - -// clientAuthenticate authenticates with the remote server. See RFC 4252. -func (c *connection) clientAuthenticate(config *ClientConfig) error { - // initiate user auth session - if err := c.transport.writePacket(Marshal(&serviceRequestMsg{serviceUserAuth})); err != nil { - return err - } - packet, err := c.transport.readPacket() - if err != nil { - return err - } - var serviceAccept serviceAcceptMsg - if err := Unmarshal(packet, &serviceAccept); err != nil { - return err - } - - // during the authentication phase the client first attempts the "none" method - // then any untried methods suggested by the server. - tried := make(map[string]bool) - var lastMethods []string - - sessionID := c.transport.getSessionID() - for auth := AuthMethod(new(noneAuth)); auth != nil; { - ok, methods, err := auth.auth(sessionID, config.User, c.transport, config.Rand) - if err != nil { - return err - } - if ok == authSuccess { - // success - return nil - } else if ok == authFailure { - tried[auth.method()] = true - } - if methods == nil { - methods = lastMethods - } - lastMethods = methods - - auth = nil - - findNext: - for _, a := range config.Auth { - candidateMethod := a.method() - if tried[candidateMethod] { - continue - } - for _, meth := range methods { - if meth == candidateMethod { - auth = a - break findNext - } - } - } - } - return fmt.Errorf("ssh: unable to authenticate, attempted methods %v, no supported methods remain", keys(tried)) -} - -func keys(m map[string]bool) []string { - s := make([]string, 0, len(m)) - - for key := range m { - s = append(s, key) - } - return s -} - -// An AuthMethod represents an instance of an RFC 4252 authentication method. -type AuthMethod interface { - // auth authenticates user over transport t. - // Returns true if authentication is successful. - // If authentication is not successful, a []string of alternative - // method names is returned. If the slice is nil, it will be ignored - // and the previous set of possible methods will be reused. - auth(session []byte, user string, p packetConn, rand io.Reader) (authResult, []string, error) - - // method returns the RFC 4252 method name. - method() string -} - -// "none" authentication, RFC 4252 section 5.2. -type noneAuth int - -func (n *noneAuth) auth(session []byte, user string, c packetConn, rand io.Reader) (authResult, []string, error) { - if err := c.writePacket(Marshal(&userAuthRequestMsg{ - User: user, - Service: serviceSSH, - Method: "none", - })); err != nil { - return authFailure, nil, err - } - - return handleAuthResponse(c) -} - -func (n *noneAuth) method() string { - return "none" -} - -// passwordCallback is an AuthMethod that fetches the password through -// a function call, e.g. by prompting the user. -type passwordCallback func() (password string, err error) - -func (cb passwordCallback) auth(session []byte, user string, c packetConn, rand io.Reader) (authResult, []string, error) { - type passwordAuthMsg struct { - User string `sshtype:"50"` - Service string - Method string - Reply bool - Password string - } - - pw, err := cb() - // REVIEW NOTE: is there a need to support skipping a password attempt? - // The program may only find out that the user doesn't have a password - // when prompting. - if err != nil { - return authFailure, nil, err - } - - if err := c.writePacket(Marshal(&passwordAuthMsg{ - User: user, - Service: serviceSSH, - Method: cb.method(), - Reply: false, - Password: pw, - })); err != nil { - return authFailure, nil, err - } - - return handleAuthResponse(c) -} - -func (cb passwordCallback) method() string { - return "password" -} - -// Password returns an AuthMethod using the given password. -func Password(secret string) AuthMethod { - return passwordCallback(func() (string, error) { return secret, nil }) -} - -// PasswordCallback returns an AuthMethod that uses a callback for -// fetching a password. -func PasswordCallback(prompt func() (secret string, err error)) AuthMethod { - return passwordCallback(prompt) -} - -type publickeyAuthMsg struct { - User string `sshtype:"50"` - Service string - Method string - // HasSig indicates to the receiver packet that the auth request is signed and - // should be used for authentication of the request. - HasSig bool - Algoname string - PubKey []byte - // Sig is tagged with "rest" so Marshal will exclude it during - // validateKey - Sig []byte `ssh:"rest"` -} - -// publicKeyCallback is an AuthMethod that uses a set of key -// pairs for authentication. -type publicKeyCallback func() ([]Signer, error) - -func (cb publicKeyCallback) method() string { - return "publickey" -} - -func (cb publicKeyCallback) auth(session []byte, user string, c packetConn, rand io.Reader) (authResult, []string, error) { - // Authentication is performed by sending an enquiry to test if a key is - // acceptable to the remote. If the key is acceptable, the client will - // attempt to authenticate with the valid key. If not the client will repeat - // the process with the remaining keys. - - signers, err := cb() - if err != nil { - return authFailure, nil, err - } - var methods []string - for _, signer := range signers { - ok, err := validateKey(signer.PublicKey(), user, c) - if err != nil { - return authFailure, nil, err - } - if !ok { - continue - } - - pub := signer.PublicKey() - pubKey := pub.Marshal() - sign, err := signer.Sign(rand, buildDataSignedForAuth(session, userAuthRequestMsg{ - User: user, - Service: serviceSSH, - Method: cb.method(), - }, []byte(pub.Type()), pubKey)) - if err != nil { - return authFailure, nil, err - } - - // manually wrap the serialized signature in a string - s := Marshal(sign) - sig := make([]byte, stringLength(len(s))) - marshalString(sig, s) - msg := publickeyAuthMsg{ - User: user, - Service: serviceSSH, - Method: cb.method(), - HasSig: true, - Algoname: pub.Type(), - PubKey: pubKey, - Sig: sig, - } - p := Marshal(&msg) - if err := c.writePacket(p); err != nil { - return authFailure, nil, err - } - var success authResult - success, methods, err = handleAuthResponse(c) - if err != nil { - return authFailure, nil, err - } - - // If authentication succeeds or the list of available methods does not - // contain the "publickey" method, do not attempt to authenticate with any - // other keys. According to RFC 4252 Section 7, the latter can occur when - // additional authentication methods are required. - if success == authSuccess || !containsMethod(methods, cb.method()) { - return success, methods, err - } - } - - return authFailure, methods, nil -} - -func containsMethod(methods []string, method string) bool { - for _, m := range methods { - if m == method { - return true - } - } - - return false -} - -// validateKey validates the key provided is acceptable to the server. -func validateKey(key PublicKey, user string, c packetConn) (bool, error) { - pubKey := key.Marshal() - msg := publickeyAuthMsg{ - User: user, - Service: serviceSSH, - Method: "publickey", - HasSig: false, - Algoname: key.Type(), - PubKey: pubKey, - } - if err := c.writePacket(Marshal(&msg)); err != nil { - return false, err - } - - return confirmKeyAck(key, c) -} - -func confirmKeyAck(key PublicKey, c packetConn) (bool, error) { - pubKey := key.Marshal() - algoname := key.Type() - - for { - packet, err := c.readPacket() - if err != nil { - return false, err - } - switch packet[0] { - case msgUserAuthBanner: - if err := handleBannerResponse(c, packet); err != nil { - return false, err - } - case msgUserAuthPubKeyOk: - var msg userAuthPubKeyOkMsg - if err := Unmarshal(packet, &msg); err != nil { - return false, err - } - if msg.Algo != algoname || !bytes.Equal(msg.PubKey, pubKey) { - return false, nil - } - return true, nil - case msgUserAuthFailure: - return false, nil - default: - return false, unexpectedMessageError(msgUserAuthSuccess, packet[0]) - } - } -} - -// PublicKeys returns an AuthMethod that uses the given key -// pairs. -func PublicKeys(signers ...Signer) AuthMethod { - return publicKeyCallback(func() ([]Signer, error) { return signers, nil }) -} - -// PublicKeysCallback returns an AuthMethod that runs the given -// function to obtain a list of key pairs. -func PublicKeysCallback(getSigners func() (signers []Signer, err error)) AuthMethod { - return publicKeyCallback(getSigners) -} - -// handleAuthResponse returns whether the preceding authentication request succeeded -// along with a list of remaining authentication methods to try next and -// an error if an unexpected response was received. -func handleAuthResponse(c packetConn) (authResult, []string, error) { - for { - packet, err := c.readPacket() - if err != nil { - return authFailure, nil, err - } - - switch packet[0] { - case msgUserAuthBanner: - if err := handleBannerResponse(c, packet); err != nil { - return authFailure, nil, err - } - case msgUserAuthFailure: - var msg userAuthFailureMsg - if err := Unmarshal(packet, &msg); err != nil { - return authFailure, nil, err - } - if msg.PartialSuccess { - return authPartialSuccess, msg.Methods, nil - } - return authFailure, msg.Methods, nil - case msgUserAuthSuccess: - return authSuccess, nil, nil - default: - return authFailure, nil, unexpectedMessageError(msgUserAuthSuccess, packet[0]) - } - } -} - -func handleBannerResponse(c packetConn, packet []byte) error { - var msg userAuthBannerMsg - if err := Unmarshal(packet, &msg); err != nil { - return err - } - - transport, ok := c.(*handshakeTransport) - if !ok { - return nil - } - - if transport.bannerCallback != nil { - return transport.bannerCallback(msg.Message) - } - - return nil -} - -// KeyboardInteractiveChallenge should print questions, optionally -// disabling echoing (e.g. for passwords), and return all the answers. -// Challenge may be called multiple times in a single session. After -// successful authentication, the server may send a challenge with no -// questions, for which the user and instruction messages should be -// printed. RFC 4256 section 3.3 details how the UI should behave for -// both CLI and GUI environments. -type KeyboardInteractiveChallenge func(user, instruction string, questions []string, echos []bool) (answers []string, err error) - -// KeyboardInteractive returns an AuthMethod using a prompt/response -// sequence controlled by the server. -func KeyboardInteractive(challenge KeyboardInteractiveChallenge) AuthMethod { - return challenge -} - -func (cb KeyboardInteractiveChallenge) method() string { - return "keyboard-interactive" -} - -func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packetConn, rand io.Reader) (authResult, []string, error) { - type initiateMsg struct { - User string `sshtype:"50"` - Service string - Method string - Language string - Submethods string - } - - if err := c.writePacket(Marshal(&initiateMsg{ - User: user, - Service: serviceSSH, - Method: "keyboard-interactive", - })); err != nil { - return authFailure, nil, err - } - - for { - packet, err := c.readPacket() - if err != nil { - return authFailure, nil, err - } - - // like handleAuthResponse, but with less options. - switch packet[0] { - case msgUserAuthBanner: - if err := handleBannerResponse(c, packet); err != nil { - return authFailure, nil, err - } - continue - case msgUserAuthInfoRequest: - // OK - case msgUserAuthFailure: - var msg userAuthFailureMsg - if err := Unmarshal(packet, &msg); err != nil { - return authFailure, nil, err - } - if msg.PartialSuccess { - return authPartialSuccess, msg.Methods, nil - } - return authFailure, msg.Methods, nil - case msgUserAuthSuccess: - return authSuccess, nil, nil - default: - return authFailure, nil, unexpectedMessageError(msgUserAuthInfoRequest, packet[0]) - } - - var msg userAuthInfoRequestMsg - if err := Unmarshal(packet, &msg); err != nil { - return authFailure, nil, err - } - - // Manually unpack the prompt/echo pairs. - rest := msg.Prompts - var prompts []string - var echos []bool - for i := 0; i < int(msg.NumPrompts); i++ { - prompt, r, ok := parseString(rest) - if !ok || len(r) == 0 { - return authFailure, nil, errors.New("ssh: prompt format error") - } - prompts = append(prompts, string(prompt)) - echos = append(echos, r[0] != 0) - rest = r[1:] - } - - if len(rest) != 0 { - return authFailure, nil, errors.New("ssh: extra data following keyboard-interactive pairs") - } - - answers, err := cb(msg.User, msg.Instruction, prompts, echos) - if err != nil { - return authFailure, nil, err - } - - if len(answers) != len(prompts) { - return authFailure, nil, errors.New("ssh: not enough answers from keyboard-interactive callback") - } - responseLength := 1 + 4 - for _, a := range answers { - responseLength += stringLength(len(a)) - } - serialized := make([]byte, responseLength) - p := serialized - p[0] = msgUserAuthInfoResponse - p = p[1:] - p = marshalUint32(p, uint32(len(answers))) - for _, a := range answers { - p = marshalString(p, []byte(a)) - } - - if err := c.writePacket(serialized); err != nil { - return authFailure, nil, err - } - } -} - -type retryableAuthMethod struct { - authMethod AuthMethod - maxTries int -} - -func (r *retryableAuthMethod) auth(session []byte, user string, c packetConn, rand io.Reader) (ok authResult, methods []string, err error) { - for i := 0; r.maxTries <= 0 || i < r.maxTries; i++ { - ok, methods, err = r.authMethod.auth(session, user, c, rand) - if ok != authFailure || err != nil { // either success, partial success or error terminate - return ok, methods, err - } - } - return ok, methods, err -} - -func (r *retryableAuthMethod) method() string { - return r.authMethod.method() -} - -// RetryableAuthMethod is a decorator for other auth methods enabling them to -// be retried up to maxTries before considering that AuthMethod itself failed. -// If maxTries is <= 0, will retry indefinitely -// -// This is useful for interactive clients using challenge/response type -// authentication (e.g. Keyboard-Interactive, Password, etc) where the user -// could mistype their response resulting in the server issuing a -// SSH_MSG_USERAUTH_FAILURE (rfc4252 #8 [password] and rfc4256 #3.4 -// [keyboard-interactive]); Without this decorator, the non-retryable -// AuthMethod would be removed from future consideration, and never tried again -// (and so the user would never be able to retry their entry). -func RetryableAuthMethod(auth AuthMethod, maxTries int) AuthMethod { - return &retryableAuthMethod{authMethod: auth, maxTries: maxTries} -} diff --git a/vendor/golang.org/x/crypto/ssh/client_auth_test.go b/vendor/golang.org/x/crypto/ssh/client_auth_test.go deleted file mode 100644 index 5fbb20d8..00000000 --- a/vendor/golang.org/x/crypto/ssh/client_auth_test.go +++ /dev/null @@ -1,628 +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 ssh - -import ( - "bytes" - "crypto/rand" - "errors" - "fmt" - "os" - "strings" - "testing" -) - -type keyboardInteractive map[string]string - -func (cr keyboardInteractive) Challenge(user string, instruction string, questions []string, echos []bool) ([]string, error) { - var answers []string - for _, q := range questions { - answers = append(answers, cr[q]) - } - return answers, nil -} - -// reused internally by tests -var clientPassword = "tiger" - -// tryAuth runs a handshake with a given config against an SSH server -// with config serverConfig -func tryAuth(t *testing.T, config *ClientConfig) error { - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - certChecker := CertChecker{ - IsUserAuthority: func(k PublicKey) bool { - return bytes.Equal(k.Marshal(), testPublicKeys["ecdsa"].Marshal()) - }, - UserKeyFallback: func(conn ConnMetadata, key PublicKey) (*Permissions, error) { - if conn.User() == "testuser" && bytes.Equal(key.Marshal(), testPublicKeys["rsa"].Marshal()) { - return nil, nil - } - - return nil, fmt.Errorf("pubkey for %q not acceptable", conn.User()) - }, - IsRevoked: func(c *Certificate) bool { - return c.Serial == 666 - }, - } - - serverConfig := &ServerConfig{ - PasswordCallback: func(conn ConnMetadata, pass []byte) (*Permissions, error) { - if conn.User() == "testuser" && string(pass) == clientPassword { - return nil, nil - } - return nil, errors.New("password auth failed") - }, - PublicKeyCallback: certChecker.Authenticate, - KeyboardInteractiveCallback: func(conn ConnMetadata, challenge KeyboardInteractiveChallenge) (*Permissions, error) { - ans, err := challenge("user", - "instruction", - []string{"question1", "question2"}, - []bool{true, true}) - if err != nil { - return nil, err - } - ok := conn.User() == "testuser" && ans[0] == "answer1" && ans[1] == "answer2" - if ok { - challenge("user", "motd", nil, nil) - return nil, nil - } - return nil, errors.New("keyboard-interactive failed") - }, - } - serverConfig.AddHostKey(testSigners["rsa"]) - - go newServer(c1, serverConfig) - _, _, _, err = NewClientConn(c2, "", config) - return err -} - -func TestClientAuthPublicKey(t *testing.T) { - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - PublicKeys(testSigners["rsa"]), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - if err := tryAuth(t, config); err != nil { - t.Fatalf("unable to dial remote side: %s", err) - } -} - -func TestAuthMethodPassword(t *testing.T) { - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - Password(clientPassword), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - - if err := tryAuth(t, config); err != nil { - t.Fatalf("unable to dial remote side: %s", err) - } -} - -func TestAuthMethodFallback(t *testing.T) { - var passwordCalled bool - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - PublicKeys(testSigners["rsa"]), - PasswordCallback( - func() (string, error) { - passwordCalled = true - return "WRONG", nil - }), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - - if err := tryAuth(t, config); err != nil { - t.Fatalf("unable to dial remote side: %s", err) - } - - if passwordCalled { - t.Errorf("password auth tried before public-key auth.") - } -} - -func TestAuthMethodWrongPassword(t *testing.T) { - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - Password("wrong"), - PublicKeys(testSigners["rsa"]), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - - if err := tryAuth(t, config); err != nil { - t.Fatalf("unable to dial remote side: %s", err) - } -} - -func TestAuthMethodKeyboardInteractive(t *testing.T) { - answers := keyboardInteractive(map[string]string{ - "question1": "answer1", - "question2": "answer2", - }) - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - KeyboardInteractive(answers.Challenge), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - - if err := tryAuth(t, config); err != nil { - t.Fatalf("unable to dial remote side: %s", err) - } -} - -func TestAuthMethodWrongKeyboardInteractive(t *testing.T) { - answers := keyboardInteractive(map[string]string{ - "question1": "answer1", - "question2": "WRONG", - }) - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - KeyboardInteractive(answers.Challenge), - }, - } - - if err := tryAuth(t, config); err == nil { - t.Fatalf("wrong answers should not have authenticated with KeyboardInteractive") - } -} - -// the mock server will only authenticate ssh-rsa keys -func TestAuthMethodInvalidPublicKey(t *testing.T) { - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - PublicKeys(testSigners["dsa"]), - }, - } - - if err := tryAuth(t, config); err == nil { - t.Fatalf("dsa private key should not have authenticated with rsa public key") - } -} - -// the client should authenticate with the second key -func TestAuthMethodRSAandDSA(t *testing.T) { - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - PublicKeys(testSigners["dsa"], testSigners["rsa"]), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - if err := tryAuth(t, config); err != nil { - t.Fatalf("client could not authenticate with rsa key: %v", err) - } -} - -func TestClientHMAC(t *testing.T) { - for _, mac := range supportedMACs { - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - PublicKeys(testSigners["rsa"]), - }, - Config: Config{ - MACs: []string{mac}, - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - if err := tryAuth(t, config); err != nil { - t.Fatalf("client could not authenticate with mac algo %s: %v", mac, err) - } - } -} - -// issue 4285. -func TestClientUnsupportedCipher(t *testing.T) { - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - PublicKeys(), - }, - Config: Config{ - Ciphers: []string{"aes128-cbc"}, // not currently supported - }, - } - if err := tryAuth(t, config); err == nil { - t.Errorf("expected no ciphers in common") - } -} - -func TestClientUnsupportedKex(t *testing.T) { - if os.Getenv("GO_BUILDER_NAME") != "" { - t.Skip("skipping known-flaky test on the Go build dashboard; see golang.org/issue/15198") - } - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - PublicKeys(), - }, - Config: Config{ - KeyExchanges: []string{"diffie-hellman-group-exchange-sha256"}, // not currently supported - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - if err := tryAuth(t, config); err == nil || !strings.Contains(err.Error(), "common algorithm") { - t.Errorf("got %v, expected 'common algorithm'", err) - } -} - -func TestClientLoginCert(t *testing.T) { - cert := &Certificate{ - Key: testPublicKeys["rsa"], - ValidBefore: CertTimeInfinity, - CertType: UserCert, - } - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - certSigner, err := NewCertSigner(cert, testSigners["rsa"]) - if err != nil { - t.Fatalf("NewCertSigner: %v", err) - } - - clientConfig := &ClientConfig{ - User: "user", - HostKeyCallback: InsecureIgnoreHostKey(), - } - clientConfig.Auth = append(clientConfig.Auth, PublicKeys(certSigner)) - - // should succeed - if err := tryAuth(t, clientConfig); err != nil { - t.Errorf("cert login failed: %v", err) - } - - // corrupted signature - cert.Signature.Blob[0]++ - if err := tryAuth(t, clientConfig); err == nil { - t.Errorf("cert login passed with corrupted sig") - } - - // revoked - cert.Serial = 666 - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - if err := tryAuth(t, clientConfig); err == nil { - t.Errorf("revoked cert login succeeded") - } - cert.Serial = 1 - - // sign with wrong key - cert.SignCert(rand.Reader, testSigners["dsa"]) - if err := tryAuth(t, clientConfig); err == nil { - t.Errorf("cert login passed with non-authoritative key") - } - - // host cert - cert.CertType = HostCert - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - if err := tryAuth(t, clientConfig); err == nil { - t.Errorf("cert login passed with wrong type") - } - cert.CertType = UserCert - - // principal specified - cert.ValidPrincipals = []string{"user"} - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - if err := tryAuth(t, clientConfig); err != nil { - t.Errorf("cert login failed: %v", err) - } - - // wrong principal specified - cert.ValidPrincipals = []string{"fred"} - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - if err := tryAuth(t, clientConfig); err == nil { - t.Errorf("cert login passed with wrong principal") - } - cert.ValidPrincipals = nil - - // added critical option - cert.CriticalOptions = map[string]string{"root-access": "yes"} - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - if err := tryAuth(t, clientConfig); err == nil { - t.Errorf("cert login passed with unrecognized critical option") - } - - // allowed source address - cert.CriticalOptions = map[string]string{"source-address": "127.0.0.42/24,::42/120"} - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - if err := tryAuth(t, clientConfig); err != nil { - t.Errorf("cert login with source-address failed: %v", err) - } - - // disallowed source address - cert.CriticalOptions = map[string]string{"source-address": "127.0.0.42,::42"} - cert.SignCert(rand.Reader, testSigners["ecdsa"]) - if err := tryAuth(t, clientConfig); err == nil { - t.Errorf("cert login with source-address succeeded") - } -} - -func testPermissionsPassing(withPermissions bool, t *testing.T) { - serverConfig := &ServerConfig{ - PublicKeyCallback: func(conn ConnMetadata, key PublicKey) (*Permissions, error) { - if conn.User() == "nopermissions" { - return nil, nil - } - return &Permissions{}, nil - }, - } - serverConfig.AddHostKey(testSigners["rsa"]) - - clientConfig := &ClientConfig{ - Auth: []AuthMethod{ - PublicKeys(testSigners["rsa"]), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - if withPermissions { - clientConfig.User = "permissions" - } else { - clientConfig.User = "nopermissions" - } - - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - go NewClientConn(c2, "", clientConfig) - serverConn, err := newServer(c1, serverConfig) - if err != nil { - t.Fatal(err) - } - if p := serverConn.Permissions; (p != nil) != withPermissions { - t.Fatalf("withPermissions is %t, but Permissions object is %#v", withPermissions, p) - } -} - -func TestPermissionsPassing(t *testing.T) { - testPermissionsPassing(true, t) -} - -func TestNoPermissionsPassing(t *testing.T) { - testPermissionsPassing(false, t) -} - -func TestRetryableAuth(t *testing.T) { - n := 0 - passwords := []string{"WRONG1", "WRONG2"} - - config := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - RetryableAuthMethod(PasswordCallback(func() (string, error) { - p := passwords[n] - n++ - return p, nil - }), 2), - PublicKeys(testSigners["rsa"]), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - - if err := tryAuth(t, config); err != nil { - t.Fatalf("unable to dial remote side: %s", err) - } - if n != 2 { - t.Fatalf("Did not try all passwords") - } -} - -func ExampleRetryableAuthMethod(t *testing.T) { - user := "testuser" - NumberOfPrompts := 3 - - // Normally this would be a callback that prompts the user to answer the - // provided questions - Cb := func(user, instruction string, questions []string, echos []bool) (answers []string, err error) { - return []string{"answer1", "answer2"}, nil - } - - config := &ClientConfig{ - HostKeyCallback: InsecureIgnoreHostKey(), - User: user, - Auth: []AuthMethod{ - RetryableAuthMethod(KeyboardInteractiveChallenge(Cb), NumberOfPrompts), - }, - } - - if err := tryAuth(t, config); err != nil { - t.Fatalf("unable to dial remote side: %s", err) - } -} - -// Test if username is received on server side when NoClientAuth is used -func TestClientAuthNone(t *testing.T) { - user := "testuser" - serverConfig := &ServerConfig{ - NoClientAuth: true, - } - serverConfig.AddHostKey(testSigners["rsa"]) - - clientConfig := &ClientConfig{ - User: user, - HostKeyCallback: InsecureIgnoreHostKey(), - } - - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - go NewClientConn(c2, "", clientConfig) - serverConn, err := newServer(c1, serverConfig) - if err != nil { - t.Fatalf("newServer: %v", err) - } - if serverConn.User() != user { - t.Fatalf("server: got %q, want %q", serverConn.User(), user) - } -} - -// Test if authentication attempts are limited on server when MaxAuthTries is set -func TestClientAuthMaxAuthTries(t *testing.T) { - user := "testuser" - - serverConfig := &ServerConfig{ - MaxAuthTries: 2, - PasswordCallback: func(conn ConnMetadata, pass []byte) (*Permissions, error) { - if conn.User() == "testuser" && string(pass) == "right" { - return nil, nil - } - return nil, errors.New("password auth failed") - }, - } - serverConfig.AddHostKey(testSigners["rsa"]) - - expectedErr := fmt.Errorf("ssh: handshake failed: %v", &disconnectMsg{ - Reason: 2, - Message: "too many authentication failures", - }) - - for tries := 2; tries < 4; tries++ { - n := tries - clientConfig := &ClientConfig{ - User: user, - Auth: []AuthMethod{ - RetryableAuthMethod(PasswordCallback(func() (string, error) { - n-- - if n == 0 { - return "right", nil - } - return "wrong", nil - }), tries), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - go newServer(c1, serverConfig) - _, _, _, err = NewClientConn(c2, "", clientConfig) - if tries > 2 { - if err == nil { - t.Fatalf("client: got no error, want %s", expectedErr) - } else if err.Error() != expectedErr.Error() { - t.Fatalf("client: got %s, want %s", err, expectedErr) - } - } else { - if err != nil { - t.Fatalf("client: got %s, want no error", err) - } - } - } -} - -// Test if authentication attempts are correctly limited on server -// when more public keys are provided then MaxAuthTries -func TestClientAuthMaxAuthTriesPublicKey(t *testing.T) { - signers := []Signer{} - for i := 0; i < 6; i++ { - signers = append(signers, testSigners["dsa"]) - } - - validConfig := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - PublicKeys(append([]Signer{testSigners["rsa"]}, signers...)...), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - if err := tryAuth(t, validConfig); err != nil { - t.Fatalf("unable to dial remote side: %s", err) - } - - expectedErr := fmt.Errorf("ssh: handshake failed: %v", &disconnectMsg{ - Reason: 2, - Message: "too many authentication failures", - }) - invalidConfig := &ClientConfig{ - User: "testuser", - Auth: []AuthMethod{ - PublicKeys(append(signers, testSigners["rsa"])...), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - if err := tryAuth(t, invalidConfig); err == nil { - t.Fatalf("client: got no error, want %s", expectedErr) - } else if err.Error() != expectedErr.Error() { - t.Fatalf("client: got %s, want %s", err, expectedErr) - } -} - -// Test whether authentication errors are being properly logged if all -// authentication methods have been exhausted -func TestClientAuthErrorList(t *testing.T) { - publicKeyErr := errors.New("This is an error from PublicKeyCallback") - - clientConfig := &ClientConfig{ - Auth: []AuthMethod{ - PublicKeys(testSigners["rsa"]), - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - serverConfig := &ServerConfig{ - PublicKeyCallback: func(_ ConnMetadata, _ PublicKey) (*Permissions, error) { - return nil, publicKeyErr - }, - } - serverConfig.AddHostKey(testSigners["rsa"]) - - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - go NewClientConn(c2, "", clientConfig) - _, err = newServer(c1, serverConfig) - if err == nil { - t.Fatal("newServer: got nil, expected errors") - } - - authErrs, ok := err.(*ServerAuthError) - if !ok { - t.Fatalf("errors: got %T, want *ssh.ServerAuthError", err) - } - for i, e := range authErrs.Errors { - switch i { - case 0: - if e != ErrNoAuth { - t.Fatalf("errors: got error %v, want ErrNoAuth", e) - } - case 1: - if e != publicKeyErr { - t.Fatalf("errors: got %v, want %v", e, publicKeyErr) - } - default: - t.Fatalf("errors: got %v, expected 2 errors", authErrs.Errors) - } - } -} diff --git a/vendor/golang.org/x/crypto/ssh/client_test.go b/vendor/golang.org/x/crypto/ssh/client_test.go deleted file mode 100644 index 81f9599e..00000000 --- a/vendor/golang.org/x/crypto/ssh/client_test.go +++ /dev/null @@ -1,166 +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 ssh - -import ( - "strings" - "testing" -) - -func TestClientVersion(t *testing.T) { - for _, tt := range []struct { - name string - version string - multiLine string - wantErr bool - }{ - { - name: "default version", - version: packageVersion, - }, - { - name: "custom version", - version: "SSH-2.0-CustomClientVersionString", - }, - { - name: "good multi line version", - version: packageVersion, - multiLine: strings.Repeat("ignored\r\n", 20), - }, - { - name: "bad multi line version", - version: packageVersion, - multiLine: "bad multi line version", - wantErr: true, - }, - { - name: "long multi line version", - version: packageVersion, - multiLine: strings.Repeat("long multi line version\r\n", 50)[:256], - wantErr: true, - }, - } { - t.Run(tt.name, func(t *testing.T) { - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - go func() { - if tt.multiLine != "" { - c1.Write([]byte(tt.multiLine)) - } - NewClientConn(c1, "", &ClientConfig{ - ClientVersion: tt.version, - HostKeyCallback: InsecureIgnoreHostKey(), - }) - c1.Close() - }() - conf := &ServerConfig{NoClientAuth: true} - conf.AddHostKey(testSigners["rsa"]) - conn, _, _, err := NewServerConn(c2, conf) - if err == nil == tt.wantErr { - t.Fatalf("got err %v; wantErr %t", err, tt.wantErr) - } - if tt.wantErr { - // Don't verify the version on an expected error. - return - } - if got := string(conn.ClientVersion()); got != tt.version { - t.Fatalf("got %q; want %q", got, tt.version) - } - }) - } -} - -func TestHostKeyCheck(t *testing.T) { - for _, tt := range []struct { - name string - wantError string - key PublicKey - }{ - {"no callback", "must specify HostKeyCallback", nil}, - {"correct key", "", testSigners["rsa"].PublicKey()}, - {"mismatch", "mismatch", testSigners["ecdsa"].PublicKey()}, - } { - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - serverConf := &ServerConfig{ - NoClientAuth: true, - } - serverConf.AddHostKey(testSigners["rsa"]) - - go NewServerConn(c1, serverConf) - clientConf := ClientConfig{ - User: "user", - } - if tt.key != nil { - clientConf.HostKeyCallback = FixedHostKey(tt.key) - } - - _, _, _, err = NewClientConn(c2, "", &clientConf) - if err != nil { - if tt.wantError == "" || !strings.Contains(err.Error(), tt.wantError) { - t.Errorf("%s: got error %q, missing %q", tt.name, err.Error(), tt.wantError) - } - } else if tt.wantError != "" { - t.Errorf("%s: succeeded, but want error string %q", tt.name, tt.wantError) - } - } -} - -func TestBannerCallback(t *testing.T) { - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - serverConf := &ServerConfig{ - PasswordCallback: func(conn ConnMetadata, password []byte) (*Permissions, error) { - return &Permissions{}, nil - }, - BannerCallback: func(conn ConnMetadata) string { - return "Hello World" - }, - } - serverConf.AddHostKey(testSigners["rsa"]) - go NewServerConn(c1, serverConf) - - var receivedBanner string - var bannerCount int - clientConf := ClientConfig{ - Auth: []AuthMethod{ - Password("123"), - }, - User: "user", - HostKeyCallback: InsecureIgnoreHostKey(), - BannerCallback: func(message string) error { - bannerCount++ - receivedBanner = message - return nil - }, - } - - _, _, _, err = NewClientConn(c2, "", &clientConf) - if err != nil { - t.Fatal(err) - } - - if bannerCount != 1 { - t.Errorf("got %d banners; want 1", bannerCount) - } - - expected := "Hello World" - if receivedBanner != expected { - t.Fatalf("got %s; want %s", receivedBanner, expected) - } -} diff --git a/vendor/golang.org/x/crypto/ssh/common.go b/vendor/golang.org/x/crypto/ssh/common.go deleted file mode 100644 index 04f3620b..00000000 --- a/vendor/golang.org/x/crypto/ssh/common.go +++ /dev/null @@ -1,383 +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 ssh - -import ( - "crypto" - "crypto/rand" - "fmt" - "io" - "math" - "sync" - - _ "crypto/sha1" - _ "crypto/sha256" - _ "crypto/sha512" -) - -// These are string constants in the SSH protocol. -const ( - compressionNone = "none" - serviceUserAuth = "ssh-userauth" - serviceSSH = "ssh-connection" -) - -// supportedCiphers lists ciphers we support but might not recommend. -var supportedCiphers = []string{ - "aes128-ctr", "aes192-ctr", "aes256-ctr", - "aes128-gcm@openssh.com", - chacha20Poly1305ID, - "arcfour256", "arcfour128", "arcfour", - aes128cbcID, - tripledescbcID, -} - -// preferredCiphers specifies the default preference for ciphers. -var preferredCiphers = []string{ - "aes128-gcm@openssh.com", - chacha20Poly1305ID, - "aes128-ctr", "aes192-ctr", "aes256-ctr", -} - -// supportedKexAlgos specifies the supported key-exchange algorithms in -// preference order. -var supportedKexAlgos = []string{ - kexAlgoCurve25519SHA256, - // P384 and P521 are not constant-time yet, but since we don't - // reuse ephemeral keys, using them for ECDH should be OK. - kexAlgoECDH256, kexAlgoECDH384, kexAlgoECDH521, - kexAlgoDH14SHA1, kexAlgoDH1SHA1, -} - -// supportedHostKeyAlgos specifies the supported host-key algorithms (i.e. methods -// of authenticating servers) in preference order. -var supportedHostKeyAlgos = []string{ - CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, - CertAlgoECDSA384v01, CertAlgoECDSA521v01, CertAlgoED25519v01, - - KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521, - KeyAlgoRSA, KeyAlgoDSA, - - KeyAlgoED25519, -} - -// supportedMACs specifies a default set of MAC algorithms in preference order. -// This is based on RFC 4253, section 6.4, but with hmac-md5 variants removed -// because they have reached the end of their useful life. -var supportedMACs = []string{ - "hmac-sha2-256-etm@openssh.com", "hmac-sha2-256", "hmac-sha1", "hmac-sha1-96", -} - -var supportedCompressions = []string{compressionNone} - -// hashFuncs keeps the mapping of supported algorithms to their respective -// hashes needed for signature verification. -var hashFuncs = map[string]crypto.Hash{ - KeyAlgoRSA: crypto.SHA1, - KeyAlgoDSA: crypto.SHA1, - KeyAlgoECDSA256: crypto.SHA256, - KeyAlgoECDSA384: crypto.SHA384, - KeyAlgoECDSA521: crypto.SHA512, - CertAlgoRSAv01: crypto.SHA1, - CertAlgoDSAv01: crypto.SHA1, - CertAlgoECDSA256v01: crypto.SHA256, - CertAlgoECDSA384v01: crypto.SHA384, - CertAlgoECDSA521v01: crypto.SHA512, -} - -// unexpectedMessageError results when the SSH message that we received didn't -// match what we wanted. -func unexpectedMessageError(expected, got uint8) error { - return fmt.Errorf("ssh: unexpected message type %d (expected %d)", got, expected) -} - -// parseError results from a malformed SSH message. -func parseError(tag uint8) error { - return fmt.Errorf("ssh: parse error in message type %d", tag) -} - -func findCommon(what string, client []string, server []string) (common string, err error) { - for _, c := range client { - for _, s := range server { - if c == s { - return c, nil - } - } - } - return "", fmt.Errorf("ssh: no common algorithm for %s; client offered: %v, server offered: %v", what, client, server) -} - -type directionAlgorithms struct { - Cipher string - MAC string - Compression string -} - -// rekeyBytes returns a rekeying intervals in bytes. -func (a *directionAlgorithms) rekeyBytes() int64 { - // According to RFC4344 block ciphers should rekey after - // 2^(BLOCKSIZE/4) blocks. For all AES flavors BLOCKSIZE is - // 128. - switch a.Cipher { - case "aes128-ctr", "aes192-ctr", "aes256-ctr", gcmCipherID, aes128cbcID: - return 16 * (1 << 32) - - } - - // For others, stick with RFC4253 recommendation to rekey after 1 Gb of data. - return 1 << 30 -} - -type algorithms struct { - kex string - hostKey string - w directionAlgorithms - r directionAlgorithms -} - -func findAgreedAlgorithms(clientKexInit, serverKexInit *kexInitMsg) (algs *algorithms, err error) { - result := &algorithms{} - - result.kex, err = findCommon("key exchange", clientKexInit.KexAlgos, serverKexInit.KexAlgos) - if err != nil { - return - } - - result.hostKey, err = findCommon("host key", clientKexInit.ServerHostKeyAlgos, serverKexInit.ServerHostKeyAlgos) - if err != nil { - return - } - - result.w.Cipher, err = findCommon("client to server cipher", clientKexInit.CiphersClientServer, serverKexInit.CiphersClientServer) - if err != nil { - return - } - - result.r.Cipher, err = findCommon("server to client cipher", clientKexInit.CiphersServerClient, serverKexInit.CiphersServerClient) - if err != nil { - return - } - - result.w.MAC, err = findCommon("client to server MAC", clientKexInit.MACsClientServer, serverKexInit.MACsClientServer) - if err != nil { - return - } - - result.r.MAC, err = findCommon("server to client MAC", clientKexInit.MACsServerClient, serverKexInit.MACsServerClient) - if err != nil { - return - } - - result.w.Compression, err = findCommon("client to server compression", clientKexInit.CompressionClientServer, serverKexInit.CompressionClientServer) - if err != nil { - return - } - - result.r.Compression, err = findCommon("server to client compression", clientKexInit.CompressionServerClient, serverKexInit.CompressionServerClient) - if err != nil { - return - } - - return result, nil -} - -// If rekeythreshold is too small, we can't make any progress sending -// stuff. -const minRekeyThreshold uint64 = 256 - -// Config contains configuration data common to both ServerConfig and -// ClientConfig. -type Config struct { - // Rand provides the source of entropy for cryptographic - // primitives. If Rand is nil, the cryptographic random reader - // in package crypto/rand will be used. - Rand io.Reader - - // The maximum number of bytes sent or received after which a - // new key is negotiated. It must be at least 256. If - // unspecified, a size suitable for the chosen cipher is used. - RekeyThreshold uint64 - - // The allowed key exchanges algorithms. If unspecified then a - // default set of algorithms is used. - KeyExchanges []string - - // The allowed cipher algorithms. If unspecified then a sensible - // default is used. - Ciphers []string - - // The allowed MAC algorithms. If unspecified then a sensible default - // is used. - MACs []string -} - -// SetDefaults sets sensible values for unset fields in config. This is -// exported for testing: Configs passed to SSH functions are copied and have -// default values set automatically. -func (c *Config) SetDefaults() { - if c.Rand == nil { - c.Rand = rand.Reader - } - if c.Ciphers == nil { - c.Ciphers = preferredCiphers - } - var ciphers []string - for _, c := range c.Ciphers { - if cipherModes[c] != nil { - // reject the cipher if we have no cipherModes definition - ciphers = append(ciphers, c) - } - } - c.Ciphers = ciphers - - if c.KeyExchanges == nil { - c.KeyExchanges = supportedKexAlgos - } - - if c.MACs == nil { - c.MACs = supportedMACs - } - - if c.RekeyThreshold == 0 { - // cipher specific default - } else if c.RekeyThreshold < minRekeyThreshold { - c.RekeyThreshold = minRekeyThreshold - } else if c.RekeyThreshold >= math.MaxInt64 { - // Avoid weirdness if somebody uses -1 as a threshold. - c.RekeyThreshold = math.MaxInt64 - } -} - -// buildDataSignedForAuth returns the data that is signed in order to prove -// possession of a private key. See RFC 4252, section 7. -func buildDataSignedForAuth(sessionID []byte, req userAuthRequestMsg, algo, pubKey []byte) []byte { - data := struct { - Session []byte - Type byte - User string - Service string - Method string - Sign bool - Algo []byte - PubKey []byte - }{ - sessionID, - msgUserAuthRequest, - req.User, - req.Service, - req.Method, - true, - algo, - pubKey, - } - return Marshal(data) -} - -func appendU16(buf []byte, n uint16) []byte { - return append(buf, byte(n>>8), byte(n)) -} - -func appendU32(buf []byte, n uint32) []byte { - return append(buf, byte(n>>24), byte(n>>16), byte(n>>8), byte(n)) -} - -func appendU64(buf []byte, n uint64) []byte { - return append(buf, - byte(n>>56), byte(n>>48), byte(n>>40), byte(n>>32), - byte(n>>24), byte(n>>16), byte(n>>8), byte(n)) -} - -func appendInt(buf []byte, n int) []byte { - return appendU32(buf, uint32(n)) -} - -func appendString(buf []byte, s string) []byte { - buf = appendU32(buf, uint32(len(s))) - buf = append(buf, s...) - return buf -} - -func appendBool(buf []byte, b bool) []byte { - if b { - return append(buf, 1) - } - return append(buf, 0) -} - -// newCond is a helper to hide the fact that there is no usable zero -// value for sync.Cond. -func newCond() *sync.Cond { return sync.NewCond(new(sync.Mutex)) } - -// window represents the buffer available to clients -// wishing to write to a channel. -type window struct { - *sync.Cond - win uint32 // RFC 4254 5.2 says the window size can grow to 2^32-1 - writeWaiters int - closed bool -} - -// add adds win to the amount of window available -// for consumers. -func (w *window) add(win uint32) bool { - // a zero sized window adjust is a noop. - if win == 0 { - return true - } - w.L.Lock() - if w.win+win < win { - w.L.Unlock() - return false - } - w.win += win - // It is unusual that multiple goroutines would be attempting to reserve - // window space, but not guaranteed. Use broadcast to notify all waiters - // that additional window is available. - w.Broadcast() - w.L.Unlock() - return true -} - -// close sets the window to closed, so all reservations fail -// immediately. -func (w *window) close() { - w.L.Lock() - w.closed = true - w.Broadcast() - w.L.Unlock() -} - -// reserve reserves win from the available window capacity. -// If no capacity remains, reserve will block. reserve may -// return less than requested. -func (w *window) reserve(win uint32) (uint32, error) { - var err error - w.L.Lock() - w.writeWaiters++ - w.Broadcast() - for w.win == 0 && !w.closed { - w.Wait() - } - w.writeWaiters-- - if w.win < win { - win = w.win - } - w.win -= win - if w.closed { - err = io.EOF - } - w.L.Unlock() - return win, err -} - -// waitWriterBlocked waits until some goroutine is blocked for further -// writes. It is used in tests only. -func (w *window) waitWriterBlocked() { - w.Cond.L.Lock() - for w.writeWaiters == 0 { - w.Cond.Wait() - } - w.Cond.L.Unlock() -} diff --git a/vendor/golang.org/x/crypto/ssh/connection.go b/vendor/golang.org/x/crypto/ssh/connection.go deleted file mode 100644 index fd6b0681..00000000 --- a/vendor/golang.org/x/crypto/ssh/connection.go +++ /dev/null @@ -1,143 +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 ssh - -import ( - "fmt" - "net" -) - -// OpenChannelError is returned if the other side rejects an -// OpenChannel request. -type OpenChannelError struct { - Reason RejectionReason - Message string -} - -func (e *OpenChannelError) Error() string { - return fmt.Sprintf("ssh: rejected: %s (%s)", e.Reason, e.Message) -} - -// ConnMetadata holds metadata for the connection. -type ConnMetadata interface { - // User returns the user ID for this connection. - User() string - - // SessionID returns the session hash, also denoted by H. - SessionID() []byte - - // ClientVersion returns the client's version string as hashed - // into the session ID. - ClientVersion() []byte - - // ServerVersion returns the server's version string as hashed - // into the session ID. - ServerVersion() []byte - - // RemoteAddr returns the remote address for this connection. - RemoteAddr() net.Addr - - // LocalAddr returns the local address for this connection. - LocalAddr() net.Addr -} - -// Conn represents an SSH connection for both server and client roles. -// Conn is the basis for implementing an application layer, such -// as ClientConn, which implements the traditional shell access for -// clients. -type Conn interface { - ConnMetadata - - // SendRequest sends a global request, and returns the - // reply. If wantReply is true, it returns the response status - // and payload. See also RFC4254, section 4. - SendRequest(name string, wantReply bool, payload []byte) (bool, []byte, error) - - // OpenChannel tries to open an channel. If the request is - // rejected, it returns *OpenChannelError. On success it returns - // the SSH Channel and a Go channel for incoming, out-of-band - // requests. The Go channel must be serviced, or the - // connection will hang. - OpenChannel(name string, data []byte) (Channel, <-chan *Request, error) - - // Close closes the underlying network connection - Close() error - - // Wait blocks until the connection has shut down, and returns the - // error causing the shutdown. - Wait() error - - // TODO(hanwen): consider exposing: - // RequestKeyChange - // Disconnect -} - -// DiscardRequests consumes and rejects all requests from the -// passed-in channel. -func DiscardRequests(in <-chan *Request) { - for req := range in { - if req.WantReply { - req.Reply(false, nil) - } - } -} - -// A connection represents an incoming connection. -type connection struct { - transport *handshakeTransport - sshConn - - // The connection protocol. - *mux -} - -func (c *connection) Close() error { - return c.sshConn.conn.Close() -} - -// sshconn provides net.Conn metadata, but disallows direct reads and -// writes. -type sshConn struct { - conn net.Conn - - user string - sessionID []byte - clientVersion []byte - serverVersion []byte -} - -func dup(src []byte) []byte { - dst := make([]byte, len(src)) - copy(dst, src) - return dst -} - -func (c *sshConn) User() string { - return c.user -} - -func (c *sshConn) RemoteAddr() net.Addr { - return c.conn.RemoteAddr() -} - -func (c *sshConn) Close() error { - return c.conn.Close() -} - -func (c *sshConn) LocalAddr() net.Addr { - return c.conn.LocalAddr() -} - -func (c *sshConn) SessionID() []byte { - return dup(c.sessionID) -} - -func (c *sshConn) ClientVersion() []byte { - return dup(c.clientVersion) -} - -func (c *sshConn) ServerVersion() []byte { - return dup(c.serverVersion) -} diff --git a/vendor/golang.org/x/crypto/ssh/doc.go b/vendor/golang.org/x/crypto/ssh/doc.go deleted file mode 100644 index 67b7322c..00000000 --- a/vendor/golang.org/x/crypto/ssh/doc.go +++ /dev/null @@ -1,21 +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 ssh implements an SSH client and server. - -SSH is a transport security protocol, an authentication protocol and a -family of application protocols. The most typical application level -protocol is a remote shell and this is specifically implemented. However, -the multiplexed nature of SSH is exposed to users that wish to support -others. - -References: - [PROTOCOL.certkeys]: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.certkeys?rev=HEAD - [SSH-PARAMETERS]: http://www.iana.org/assignments/ssh-parameters/ssh-parameters.xml#ssh-parameters-1 - -This package does not fall under the stability promise of the Go language itself, -so its API may be changed when pressing needs arise. -*/ -package ssh // import "golang.org/x/crypto/ssh" diff --git a/vendor/golang.org/x/crypto/ssh/example_test.go b/vendor/golang.org/x/crypto/ssh/example_test.go deleted file mode 100644 index b910c7bf..00000000 --- a/vendor/golang.org/x/crypto/ssh/example_test.go +++ /dev/null @@ -1,320 +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 ssh_test - -import ( - "bufio" - "bytes" - "fmt" - "io/ioutil" - "log" - "net" - "net/http" - "os" - "path/filepath" - "strings" - - "golang.org/x/crypto/ssh" - "golang.org/x/crypto/ssh/terminal" -) - -func ExampleNewServerConn() { - // Public key authentication is done by comparing - // the public key of a received connection - // with the entries in the authorized_keys file. - authorizedKeysBytes, err := ioutil.ReadFile("authorized_keys") - if err != nil { - log.Fatalf("Failed to load authorized_keys, err: %v", err) - } - - authorizedKeysMap := map[string]bool{} - for len(authorizedKeysBytes) > 0 { - pubKey, _, _, rest, err := ssh.ParseAuthorizedKey(authorizedKeysBytes) - if err != nil { - log.Fatal(err) - } - - authorizedKeysMap[string(pubKey.Marshal())] = true - authorizedKeysBytes = rest - } - - // An SSH server is represented by a ServerConfig, which holds - // certificate details and handles authentication of ServerConns. - config := &ssh.ServerConfig{ - // Remove to disable password auth. - PasswordCallback: func(c ssh.ConnMetadata, pass []byte) (*ssh.Permissions, error) { - // Should use constant-time compare (or better, salt+hash) in - // a production setting. - if c.User() == "testuser" && string(pass) == "tiger" { - return nil, nil - } - return nil, fmt.Errorf("password rejected for %q", c.User()) - }, - - // Remove to disable public key auth. - PublicKeyCallback: func(c ssh.ConnMetadata, pubKey ssh.PublicKey) (*ssh.Permissions, error) { - if authorizedKeysMap[string(pubKey.Marshal())] { - return &ssh.Permissions{ - // Record the public key used for authentication. - Extensions: map[string]string{ - "pubkey-fp": ssh.FingerprintSHA256(pubKey), - }, - }, nil - } - return nil, fmt.Errorf("unknown public key for %q", c.User()) - }, - } - - privateBytes, err := ioutil.ReadFile("id_rsa") - if err != nil { - log.Fatal("Failed to load private key: ", err) - } - - private, err := ssh.ParsePrivateKey(privateBytes) - if err != nil { - log.Fatal("Failed to parse private key: ", err) - } - - config.AddHostKey(private) - - // Once a ServerConfig has been configured, connections can be - // accepted. - listener, err := net.Listen("tcp", "0.0.0.0:2022") - if err != nil { - log.Fatal("failed to listen for connection: ", err) - } - nConn, err := listener.Accept() - if err != nil { - log.Fatal("failed to accept incoming connection: ", err) - } - - // Before use, a handshake must be performed on the incoming - // net.Conn. - conn, chans, reqs, err := ssh.NewServerConn(nConn, config) - if err != nil { - log.Fatal("failed to handshake: ", err) - } - log.Printf("logged in with key %s", conn.Permissions.Extensions["pubkey-fp"]) - - // The incoming Request channel must be serviced. - go ssh.DiscardRequests(reqs) - - // Service the incoming Channel channel. - for newChannel := range chans { - // Channels have a type, depending on the application level - // protocol intended. In the case of a shell, the type is - // "session" and ServerShell may be used to present a simple - // terminal interface. - if newChannel.ChannelType() != "session" { - newChannel.Reject(ssh.UnknownChannelType, "unknown channel type") - continue - } - channel, requests, err := newChannel.Accept() - if err != nil { - log.Fatalf("Could not accept channel: %v", err) - } - - // Sessions have out-of-band requests such as "shell", - // "pty-req" and "env". Here we handle only the - // "shell" request. - go func(in <-chan *ssh.Request) { - for req := range in { - req.Reply(req.Type == "shell", nil) - } - }(requests) - - term := terminal.NewTerminal(channel, "> ") - - go func() { - defer channel.Close() - for { - line, err := term.ReadLine() - if err != nil { - break - } - fmt.Println(line) - } - }() - } -} - -func ExampleHostKeyCheck() { - // Every client must provide a host key check. Here is a - // simple-minded parse of OpenSSH's known_hosts file - host := "hostname" - file, err := os.Open(filepath.Join(os.Getenv("HOME"), ".ssh", "known_hosts")) - if err != nil { - log.Fatal(err) - } - defer file.Close() - - scanner := bufio.NewScanner(file) - var hostKey ssh.PublicKey - for scanner.Scan() { - fields := strings.Split(scanner.Text(), " ") - if len(fields) != 3 { - continue - } - if strings.Contains(fields[0], host) { - var err error - hostKey, _, _, _, err = ssh.ParseAuthorizedKey(scanner.Bytes()) - if err != nil { - log.Fatalf("error parsing %q: %v", fields[2], err) - } - break - } - } - - if hostKey == nil { - log.Fatalf("no hostkey for %s", host) - } - - config := ssh.ClientConfig{ - User: os.Getenv("USER"), - HostKeyCallback: ssh.FixedHostKey(hostKey), - } - - _, err = ssh.Dial("tcp", host+":22", &config) - log.Println(err) -} - -func ExampleDial() { - var hostKey ssh.PublicKey - // An SSH client is represented with a ClientConn. - // - // To authenticate with the remote server you must pass at least one - // implementation of AuthMethod via the Auth field in ClientConfig, - // and provide a HostKeyCallback. - config := &ssh.ClientConfig{ - User: "username", - Auth: []ssh.AuthMethod{ - ssh.Password("yourpassword"), - }, - HostKeyCallback: ssh.FixedHostKey(hostKey), - } - client, err := ssh.Dial("tcp", "yourserver.com:22", config) - if err != nil { - log.Fatal("Failed to dial: ", err) - } - - // Each ClientConn can support multiple interactive sessions, - // represented by a Session. - session, err := client.NewSession() - if err != nil { - log.Fatal("Failed to create session: ", err) - } - defer session.Close() - - // Once a Session is created, you can execute a single command on - // the remote side using the Run method. - var b bytes.Buffer - session.Stdout = &b - if err := session.Run("/usr/bin/whoami"); err != nil { - log.Fatal("Failed to run: " + err.Error()) - } - fmt.Println(b.String()) -} - -func ExamplePublicKeys() { - var hostKey ssh.PublicKey - // A public key may be used to authenticate against the remote - // server by using an unencrypted PEM-encoded private key file. - // - // If you have an encrypted private key, the crypto/x509 package - // can be used to decrypt it. - key, err := ioutil.ReadFile("/home/user/.ssh/id_rsa") - if err != nil { - log.Fatalf("unable to read private key: %v", err) - } - - // Create the Signer for this private key. - signer, err := ssh.ParsePrivateKey(key) - if err != nil { - log.Fatalf("unable to parse private key: %v", err) - } - - config := &ssh.ClientConfig{ - User: "user", - Auth: []ssh.AuthMethod{ - // Use the PublicKeys method for remote authentication. - ssh.PublicKeys(signer), - }, - HostKeyCallback: ssh.FixedHostKey(hostKey), - } - - // Connect to the remote server and perform the SSH handshake. - client, err := ssh.Dial("tcp", "host.com:22", config) - if err != nil { - log.Fatalf("unable to connect: %v", err) - } - defer client.Close() -} - -func ExampleClient_Listen() { - var hostKey ssh.PublicKey - config := &ssh.ClientConfig{ - User: "username", - Auth: []ssh.AuthMethod{ - ssh.Password("password"), - }, - HostKeyCallback: ssh.FixedHostKey(hostKey), - } - // Dial your ssh server. - conn, err := ssh.Dial("tcp", "localhost:22", config) - if err != nil { - log.Fatal("unable to connect: ", err) - } - defer conn.Close() - - // Request the remote side to open port 8080 on all interfaces. - l, err := conn.Listen("tcp", "0.0.0.0:8080") - if err != nil { - log.Fatal("unable to register tcp forward: ", err) - } - defer l.Close() - - // Serve HTTP with your SSH server acting as a reverse proxy. - http.Serve(l, http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) { - fmt.Fprintf(resp, "Hello world!\n") - })) -} - -func ExampleSession_RequestPty() { - var hostKey ssh.PublicKey - // Create client config - config := &ssh.ClientConfig{ - User: "username", - Auth: []ssh.AuthMethod{ - ssh.Password("password"), - }, - HostKeyCallback: ssh.FixedHostKey(hostKey), - } - // Connect to ssh server - conn, err := ssh.Dial("tcp", "localhost:22", config) - if err != nil { - log.Fatal("unable to connect: ", err) - } - defer conn.Close() - // Create a session - session, err := conn.NewSession() - if err != nil { - log.Fatal("unable to create session: ", err) - } - defer session.Close() - // Set up terminal modes - modes := ssh.TerminalModes{ - ssh.ECHO: 0, // disable echoing - ssh.TTY_OP_ISPEED: 14400, // input speed = 14.4kbaud - ssh.TTY_OP_OSPEED: 14400, // output speed = 14.4kbaud - } - // Request pseudo terminal - if err := session.RequestPty("xterm", 40, 80, modes); err != nil { - log.Fatal("request for pseudo terminal failed: ", err) - } - // Start remote shell - if err := session.Shell(); err != nil { - log.Fatal("failed to start shell: ", err) - } -} diff --git a/vendor/golang.org/x/crypto/ssh/handshake.go b/vendor/golang.org/x/crypto/ssh/handshake.go deleted file mode 100644 index 4f7912ec..00000000 --- a/vendor/golang.org/x/crypto/ssh/handshake.go +++ /dev/null @@ -1,646 +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 ssh - -import ( - "crypto/rand" - "errors" - "fmt" - "io" - "log" - "net" - "sync" -) - -// debugHandshake, if set, prints messages sent and received. Key -// exchange messages are printed as if DH were used, so the debug -// messages are wrong when using ECDH. -const debugHandshake = false - -// chanSize sets the amount of buffering SSH connections. This is -// primarily for testing: setting chanSize=0 uncovers deadlocks more -// quickly. -const chanSize = 16 - -// keyingTransport is a packet based transport that supports key -// changes. It need not be thread-safe. It should pass through -// msgNewKeys in both directions. -type keyingTransport interface { - packetConn - - // prepareKeyChange sets up a key change. The key change for a - // direction will be effected if a msgNewKeys message is sent - // or received. - prepareKeyChange(*algorithms, *kexResult) error -} - -// handshakeTransport implements rekeying on top of a keyingTransport -// and offers a thread-safe writePacket() interface. -type handshakeTransport struct { - conn keyingTransport - config *Config - - serverVersion []byte - clientVersion []byte - - // hostKeys is non-empty if we are the server. In that case, - // it contains all host keys that can be used to sign the - // connection. - hostKeys []Signer - - // hostKeyAlgorithms is non-empty if we are the client. In that case, - // we accept these key types from the server as host key. - hostKeyAlgorithms []string - - // On read error, incoming is closed, and readError is set. - incoming chan []byte - readError error - - mu sync.Mutex - writeError error - sentInitPacket []byte - sentInitMsg *kexInitMsg - pendingPackets [][]byte // Used when a key exchange is in progress. - - // If the read loop wants to schedule a kex, it pings this - // channel, and the write loop will send out a kex - // message. - requestKex chan struct{} - - // If the other side requests or confirms a kex, its kexInit - // packet is sent here for the write loop to find it. - startKex chan *pendingKex - - // data for host key checking - hostKeyCallback HostKeyCallback - dialAddress string - remoteAddr net.Addr - - // bannerCallback is non-empty if we are the client and it has been set in - // ClientConfig. In that case it is called during the user authentication - // dance to handle a custom server's message. - bannerCallback BannerCallback - - // Algorithms agreed in the last key exchange. - algorithms *algorithms - - readPacketsLeft uint32 - readBytesLeft int64 - - writePacketsLeft uint32 - writeBytesLeft int64 - - // The session ID or nil if first kex did not complete yet. - sessionID []byte -} - -type pendingKex struct { - otherInit []byte - done chan error -} - -func newHandshakeTransport(conn keyingTransport, config *Config, clientVersion, serverVersion []byte) *handshakeTransport { - t := &handshakeTransport{ - conn: conn, - serverVersion: serverVersion, - clientVersion: clientVersion, - incoming: make(chan []byte, chanSize), - requestKex: make(chan struct{}, 1), - startKex: make(chan *pendingKex, 1), - - config: config, - } - t.resetReadThresholds() - t.resetWriteThresholds() - - // We always start with a mandatory key exchange. - t.requestKex <- struct{}{} - return t -} - -func newClientTransport(conn keyingTransport, clientVersion, serverVersion []byte, config *ClientConfig, dialAddr string, addr net.Addr) *handshakeTransport { - t := newHandshakeTransport(conn, &config.Config, clientVersion, serverVersion) - t.dialAddress = dialAddr - t.remoteAddr = addr - t.hostKeyCallback = config.HostKeyCallback - t.bannerCallback = config.BannerCallback - if config.HostKeyAlgorithms != nil { - t.hostKeyAlgorithms = config.HostKeyAlgorithms - } else { - t.hostKeyAlgorithms = supportedHostKeyAlgos - } - go t.readLoop() - go t.kexLoop() - return t -} - -func newServerTransport(conn keyingTransport, clientVersion, serverVersion []byte, config *ServerConfig) *handshakeTransport { - t := newHandshakeTransport(conn, &config.Config, clientVersion, serverVersion) - t.hostKeys = config.hostKeys - go t.readLoop() - go t.kexLoop() - return t -} - -func (t *handshakeTransport) getSessionID() []byte { - return t.sessionID -} - -// waitSession waits for the session to be established. This should be -// the first thing to call after instantiating handshakeTransport. -func (t *handshakeTransport) waitSession() error { - p, err := t.readPacket() - if err != nil { - return err - } - if p[0] != msgNewKeys { - return fmt.Errorf("ssh: first packet should be msgNewKeys") - } - - return nil -} - -func (t *handshakeTransport) id() string { - if len(t.hostKeys) > 0 { - return "server" - } - return "client" -} - -func (t *handshakeTransport) printPacket(p []byte, write bool) { - action := "got" - if write { - action = "sent" - } - - if p[0] == msgChannelData || p[0] == msgChannelExtendedData { - log.Printf("%s %s data (packet %d bytes)", t.id(), action, len(p)) - } else { - msg, err := decode(p) - log.Printf("%s %s %T %v (%v)", t.id(), action, msg, msg, err) - } -} - -func (t *handshakeTransport) readPacket() ([]byte, error) { - p, ok := <-t.incoming - if !ok { - return nil, t.readError - } - return p, nil -} - -func (t *handshakeTransport) readLoop() { - first := true - for { - p, err := t.readOnePacket(first) - first = false - if err != nil { - t.readError = err - close(t.incoming) - break - } - if p[0] == msgIgnore || p[0] == msgDebug { - continue - } - t.incoming <- p - } - - // Stop writers too. - t.recordWriteError(t.readError) - - // Unblock the writer should it wait for this. - close(t.startKex) - - // Don't close t.requestKex; it's also written to from writePacket. -} - -func (t *handshakeTransport) pushPacket(p []byte) error { - if debugHandshake { - t.printPacket(p, true) - } - return t.conn.writePacket(p) -} - -func (t *handshakeTransport) getWriteError() error { - t.mu.Lock() - defer t.mu.Unlock() - return t.writeError -} - -func (t *handshakeTransport) recordWriteError(err error) { - t.mu.Lock() - defer t.mu.Unlock() - if t.writeError == nil && err != nil { - t.writeError = err - } -} - -func (t *handshakeTransport) requestKeyExchange() { - select { - case t.requestKex <- struct{}{}: - default: - // something already requested a kex, so do nothing. - } -} - -func (t *handshakeTransport) resetWriteThresholds() { - t.writePacketsLeft = packetRekeyThreshold - if t.config.RekeyThreshold > 0 { - t.writeBytesLeft = int64(t.config.RekeyThreshold) - } else if t.algorithms != nil { - t.writeBytesLeft = t.algorithms.w.rekeyBytes() - } else { - t.writeBytesLeft = 1 << 30 - } -} - -func (t *handshakeTransport) kexLoop() { - -write: - for t.getWriteError() == nil { - var request *pendingKex - var sent bool - - for request == nil || !sent { - var ok bool - select { - case request, ok = <-t.startKex: - if !ok { - break write - } - case <-t.requestKex: - break - } - - if !sent { - if err := t.sendKexInit(); err != nil { - t.recordWriteError(err) - break - } - sent = true - } - } - - if err := t.getWriteError(); err != nil { - if request != nil { - request.done <- err - } - break - } - - // We're not servicing t.requestKex, but that is OK: - // we never block on sending to t.requestKex. - - // We're not servicing t.startKex, but the remote end - // has just sent us a kexInitMsg, so it can't send - // another key change request, until we close the done - // channel on the pendingKex request. - - err := t.enterKeyExchange(request.otherInit) - - t.mu.Lock() - t.writeError = err - t.sentInitPacket = nil - t.sentInitMsg = nil - - t.resetWriteThresholds() - - // we have completed the key exchange. Since the - // reader is still blocked, it is safe to clear out - // the requestKex channel. This avoids the situation - // where: 1) we consumed our own request for the - // initial kex, and 2) the kex from the remote side - // caused another send on the requestKex channel, - clear: - for { - select { - case <-t.requestKex: - // - default: - break clear - } - } - - request.done <- t.writeError - - // kex finished. Push packets that we received while - // the kex was in progress. Don't look at t.startKex - // and don't increment writtenSinceKex: if we trigger - // another kex while we are still busy with the last - // one, things will become very confusing. - for _, p := range t.pendingPackets { - t.writeError = t.pushPacket(p) - if t.writeError != nil { - break - } - } - t.pendingPackets = t.pendingPackets[:0] - t.mu.Unlock() - } - - // drain startKex channel. We don't service t.requestKex - // because nobody does blocking sends there. - go func() { - for init := range t.startKex { - init.done <- t.writeError - } - }() - - // Unblock reader. - t.conn.Close() -} - -// The protocol uses uint32 for packet counters, so we can't let them -// reach 1<<32. We will actually read and write more packets than -// this, though: the other side may send more packets, and after we -// hit this limit on writing we will send a few more packets for the -// key exchange itself. -const packetRekeyThreshold = (1 << 31) - -func (t *handshakeTransport) resetReadThresholds() { - t.readPacketsLeft = packetRekeyThreshold - if t.config.RekeyThreshold > 0 { - t.readBytesLeft = int64(t.config.RekeyThreshold) - } else if t.algorithms != nil { - t.readBytesLeft = t.algorithms.r.rekeyBytes() - } else { - t.readBytesLeft = 1 << 30 - } -} - -func (t *handshakeTransport) readOnePacket(first bool) ([]byte, error) { - p, err := t.conn.readPacket() - if err != nil { - return nil, err - } - - if t.readPacketsLeft > 0 { - t.readPacketsLeft-- - } else { - t.requestKeyExchange() - } - - if t.readBytesLeft > 0 { - t.readBytesLeft -= int64(len(p)) - } else { - t.requestKeyExchange() - } - - if debugHandshake { - t.printPacket(p, false) - } - - if first && p[0] != msgKexInit { - return nil, fmt.Errorf("ssh: first packet should be msgKexInit") - } - - if p[0] != msgKexInit { - return p, nil - } - - firstKex := t.sessionID == nil - - kex := pendingKex{ - done: make(chan error, 1), - otherInit: p, - } - t.startKex <- &kex - err = <-kex.done - - if debugHandshake { - log.Printf("%s exited key exchange (first %v), err %v", t.id(), firstKex, err) - } - - if err != nil { - return nil, err - } - - t.resetReadThresholds() - - // By default, a key exchange is hidden from higher layers by - // translating it into msgIgnore. - successPacket := []byte{msgIgnore} - if firstKex { - // sendKexInit() for the first kex waits for - // msgNewKeys so the authentication process is - // guaranteed to happen over an encrypted transport. - successPacket = []byte{msgNewKeys} - } - - return successPacket, nil -} - -// sendKexInit sends a key change message. -func (t *handshakeTransport) sendKexInit() error { - t.mu.Lock() - defer t.mu.Unlock() - if t.sentInitMsg != nil { - // kexInits may be sent either in response to the other side, - // or because our side wants to initiate a key change, so we - // may have already sent a kexInit. In that case, don't send a - // second kexInit. - return nil - } - - msg := &kexInitMsg{ - KexAlgos: t.config.KeyExchanges, - CiphersClientServer: t.config.Ciphers, - CiphersServerClient: t.config.Ciphers, - MACsClientServer: t.config.MACs, - MACsServerClient: t.config.MACs, - CompressionClientServer: supportedCompressions, - CompressionServerClient: supportedCompressions, - } - io.ReadFull(rand.Reader, msg.Cookie[:]) - - if len(t.hostKeys) > 0 { - for _, k := range t.hostKeys { - msg.ServerHostKeyAlgos = append( - msg.ServerHostKeyAlgos, k.PublicKey().Type()) - } - } else { - msg.ServerHostKeyAlgos = t.hostKeyAlgorithms - } - packet := Marshal(msg) - - // writePacket destroys the contents, so save a copy. - packetCopy := make([]byte, len(packet)) - copy(packetCopy, packet) - - if err := t.pushPacket(packetCopy); err != nil { - return err - } - - t.sentInitMsg = msg - t.sentInitPacket = packet - - return nil -} - -func (t *handshakeTransport) writePacket(p []byte) error { - switch p[0] { - case msgKexInit: - return errors.New("ssh: only handshakeTransport can send kexInit") - case msgNewKeys: - return errors.New("ssh: only handshakeTransport can send newKeys") - } - - t.mu.Lock() - defer t.mu.Unlock() - if t.writeError != nil { - return t.writeError - } - - if t.sentInitMsg != nil { - // Copy the packet so the writer can reuse the buffer. - cp := make([]byte, len(p)) - copy(cp, p) - t.pendingPackets = append(t.pendingPackets, cp) - return nil - } - - if t.writeBytesLeft > 0 { - t.writeBytesLeft -= int64(len(p)) - } else { - t.requestKeyExchange() - } - - if t.writePacketsLeft > 0 { - t.writePacketsLeft-- - } else { - t.requestKeyExchange() - } - - if err := t.pushPacket(p); err != nil { - t.writeError = err - } - - return nil -} - -func (t *handshakeTransport) Close() error { - return t.conn.Close() -} - -func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error { - if debugHandshake { - log.Printf("%s entered key exchange", t.id()) - } - - otherInit := &kexInitMsg{} - if err := Unmarshal(otherInitPacket, otherInit); err != nil { - return err - } - - magics := handshakeMagics{ - clientVersion: t.clientVersion, - serverVersion: t.serverVersion, - clientKexInit: otherInitPacket, - serverKexInit: t.sentInitPacket, - } - - clientInit := otherInit - serverInit := t.sentInitMsg - if len(t.hostKeys) == 0 { - clientInit, serverInit = serverInit, clientInit - - magics.clientKexInit = t.sentInitPacket - magics.serverKexInit = otherInitPacket - } - - var err error - t.algorithms, err = findAgreedAlgorithms(clientInit, serverInit) - if err != nil { - return err - } - - // We don't send FirstKexFollows, but we handle receiving it. - // - // RFC 4253 section 7 defines the kex and the agreement method for - // first_kex_packet_follows. It states that the guessed packet - // should be ignored if the "kex algorithm and/or the host - // key algorithm is guessed wrong (server and client have - // different preferred algorithm), or if any of the other - // algorithms cannot be agreed upon". The other algorithms have - // already been checked above so the kex algorithm and host key - // algorithm are checked here. - if otherInit.FirstKexFollows && (clientInit.KexAlgos[0] != serverInit.KexAlgos[0] || clientInit.ServerHostKeyAlgos[0] != serverInit.ServerHostKeyAlgos[0]) { - // other side sent a kex message for the wrong algorithm, - // which we have to ignore. - if _, err := t.conn.readPacket(); err != nil { - return err - } - } - - kex, ok := kexAlgoMap[t.algorithms.kex] - if !ok { - return fmt.Errorf("ssh: unexpected key exchange algorithm %v", t.algorithms.kex) - } - - var result *kexResult - if len(t.hostKeys) > 0 { - result, err = t.server(kex, t.algorithms, &magics) - } else { - result, err = t.client(kex, t.algorithms, &magics) - } - - if err != nil { - return err - } - - if t.sessionID == nil { - t.sessionID = result.H - } - result.SessionID = t.sessionID - - if err := t.conn.prepareKeyChange(t.algorithms, result); err != nil { - return err - } - if err = t.conn.writePacket([]byte{msgNewKeys}); err != nil { - return err - } - if packet, err := t.conn.readPacket(); err != nil { - return err - } else if packet[0] != msgNewKeys { - return unexpectedMessageError(msgNewKeys, packet[0]) - } - - return nil -} - -func (t *handshakeTransport) server(kex kexAlgorithm, algs *algorithms, magics *handshakeMagics) (*kexResult, error) { - var hostKey Signer - for _, k := range t.hostKeys { - if algs.hostKey == k.PublicKey().Type() { - hostKey = k - } - } - - r, err := kex.Server(t.conn, t.config.Rand, magics, hostKey) - return r, err -} - -func (t *handshakeTransport) client(kex kexAlgorithm, algs *algorithms, magics *handshakeMagics) (*kexResult, error) { - result, err := kex.Client(t.conn, t.config.Rand, magics) - if err != nil { - return nil, err - } - - hostKey, err := ParsePublicKey(result.HostKey) - if err != nil { - return nil, err - } - - if err := verifyHostKeySignature(hostKey, result); err != nil { - return nil, err - } - - err = t.hostKeyCallback(t.dialAddress, t.remoteAddr, hostKey) - if err != nil { - return nil, err - } - - return result, nil -} diff --git a/vendor/golang.org/x/crypto/ssh/handshake_test.go b/vendor/golang.org/x/crypto/ssh/handshake_test.go deleted file mode 100644 index 91d49356..00000000 --- a/vendor/golang.org/x/crypto/ssh/handshake_test.go +++ /dev/null @@ -1,559 +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 ssh - -import ( - "bytes" - "crypto/rand" - "errors" - "fmt" - "io" - "net" - "reflect" - "runtime" - "strings" - "sync" - "testing" -) - -type testChecker struct { - calls []string -} - -func (t *testChecker) Check(dialAddr string, addr net.Addr, key PublicKey) error { - if dialAddr == "bad" { - return fmt.Errorf("dialAddr is bad") - } - - if tcpAddr, ok := addr.(*net.TCPAddr); !ok || tcpAddr == nil { - return fmt.Errorf("testChecker: got %T want *net.TCPAddr", addr) - } - - t.calls = append(t.calls, fmt.Sprintf("%s %v %s %x", dialAddr, addr, key.Type(), key.Marshal())) - - return nil -} - -// netPipe is analogous to net.Pipe, but it uses a real net.Conn, and -// therefore is buffered (net.Pipe deadlocks if both sides start with -// a write.) -func netPipe() (net.Conn, net.Conn, error) { - listener, err := net.Listen("tcp", "127.0.0.1:0") - if err != nil { - listener, err = net.Listen("tcp", "[::1]:0") - if err != nil { - return nil, nil, err - } - } - defer listener.Close() - c1, err := net.Dial("tcp", listener.Addr().String()) - if err != nil { - return nil, nil, err - } - - c2, err := listener.Accept() - if err != nil { - c1.Close() - return nil, nil, err - } - - return c1, c2, nil -} - -// noiseTransport inserts ignore messages to check that the read loop -// and the key exchange filters out these messages. -type noiseTransport struct { - keyingTransport -} - -func (t *noiseTransport) writePacket(p []byte) error { - ignore := []byte{msgIgnore} - if err := t.keyingTransport.writePacket(ignore); err != nil { - return err - } - debug := []byte{msgDebug, 1, 2, 3} - if err := t.keyingTransport.writePacket(debug); err != nil { - return err - } - - return t.keyingTransport.writePacket(p) -} - -func addNoiseTransport(t keyingTransport) keyingTransport { - return &noiseTransport{t} -} - -// handshakePair creates two handshakeTransports connected with each -// other. If the noise argument is true, both transports will try to -// confuse the other side by sending ignore and debug messages. -func handshakePair(clientConf *ClientConfig, addr string, noise bool) (client *handshakeTransport, server *handshakeTransport, err error) { - a, b, err := netPipe() - if err != nil { - return nil, nil, err - } - - var trC, trS keyingTransport - - trC = newTransport(a, rand.Reader, true) - trS = newTransport(b, rand.Reader, false) - if noise { - trC = addNoiseTransport(trC) - trS = addNoiseTransport(trS) - } - clientConf.SetDefaults() - - v := []byte("version") - client = newClientTransport(trC, v, v, clientConf, addr, a.RemoteAddr()) - - serverConf := &ServerConfig{} - serverConf.AddHostKey(testSigners["ecdsa"]) - serverConf.AddHostKey(testSigners["rsa"]) - serverConf.SetDefaults() - server = newServerTransport(trS, v, v, serverConf) - - if err := server.waitSession(); err != nil { - return nil, nil, fmt.Errorf("server.waitSession: %v", err) - } - if err := client.waitSession(); err != nil { - return nil, nil, fmt.Errorf("client.waitSession: %v", err) - } - - return client, server, nil -} - -func TestHandshakeBasic(t *testing.T) { - if runtime.GOOS == "plan9" { - t.Skip("see golang.org/issue/7237") - } - - checker := &syncChecker{ - waitCall: make(chan int, 10), - called: make(chan int, 10), - } - - checker.waitCall <- 1 - trC, trS, err := handshakePair(&ClientConfig{HostKeyCallback: checker.Check}, "addr", false) - if err != nil { - t.Fatalf("handshakePair: %v", err) - } - - defer trC.Close() - defer trS.Close() - - // Let first kex complete normally. - <-checker.called - - clientDone := make(chan int, 0) - gotHalf := make(chan int, 0) - const N = 20 - - go func() { - defer close(clientDone) - // Client writes a bunch of stuff, and does a key - // change in the middle. This should not confuse the - // handshake in progress. We do this twice, so we test - // that the packet buffer is reset correctly. - for i := 0; i < N; i++ { - p := []byte{msgRequestSuccess, byte(i)} - if err := trC.writePacket(p); err != nil { - t.Fatalf("sendPacket: %v", err) - } - if (i % 10) == 5 { - <-gotHalf - // halfway through, we request a key change. - trC.requestKeyExchange() - - // Wait until we can be sure the key - // change has really started before we - // write more. - <-checker.called - } - if (i % 10) == 7 { - // write some packets until the kex - // completes, to test buffering of - // packets. - checker.waitCall <- 1 - } - } - }() - - // Server checks that client messages come in cleanly - i := 0 - err = nil - for ; i < N; i++ { - var p []byte - p, err = trS.readPacket() - if err != nil { - break - } - if (i % 10) == 5 { - gotHalf <- 1 - } - - want := []byte{msgRequestSuccess, byte(i)} - if bytes.Compare(p, want) != 0 { - t.Errorf("message %d: got %v, want %v", i, p, want) - } - } - <-clientDone - if err != nil && err != io.EOF { - t.Fatalf("server error: %v", err) - } - if i != N { - t.Errorf("received %d messages, want 10.", i) - } - - close(checker.called) - if _, ok := <-checker.called; ok { - // If all went well, we registered exactly 2 key changes: one - // that establishes the session, and one that we requested - // additionally. - t.Fatalf("got another host key checks after 2 handshakes") - } -} - -func TestForceFirstKex(t *testing.T) { - // like handshakePair, but must access the keyingTransport. - checker := &testChecker{} - clientConf := &ClientConfig{HostKeyCallback: checker.Check} - a, b, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - - var trC, trS keyingTransport - - trC = newTransport(a, rand.Reader, true) - - // This is the disallowed packet: - trC.writePacket(Marshal(&serviceRequestMsg{serviceUserAuth})) - - // Rest of the setup. - trS = newTransport(b, rand.Reader, false) - clientConf.SetDefaults() - - v := []byte("version") - client := newClientTransport(trC, v, v, clientConf, "addr", a.RemoteAddr()) - - serverConf := &ServerConfig{} - serverConf.AddHostKey(testSigners["ecdsa"]) - serverConf.AddHostKey(testSigners["rsa"]) - serverConf.SetDefaults() - server := newServerTransport(trS, v, v, serverConf) - - defer client.Close() - defer server.Close() - - // We setup the initial key exchange, but the remote side - // tries to send serviceRequestMsg in cleartext, which is - // disallowed. - - if err := server.waitSession(); err == nil { - t.Errorf("server first kex init should reject unexpected packet") - } -} - -func TestHandshakeAutoRekeyWrite(t *testing.T) { - checker := &syncChecker{ - called: make(chan int, 10), - waitCall: nil, - } - clientConf := &ClientConfig{HostKeyCallback: checker.Check} - clientConf.RekeyThreshold = 500 - trC, trS, err := handshakePair(clientConf, "addr", false) - if err != nil { - t.Fatalf("handshakePair: %v", err) - } - defer trC.Close() - defer trS.Close() - - input := make([]byte, 251) - input[0] = msgRequestSuccess - - done := make(chan int, 1) - const numPacket = 5 - go func() { - defer close(done) - j := 0 - for ; j < numPacket; j++ { - if p, err := trS.readPacket(); err != nil { - break - } else if !bytes.Equal(input, p) { - t.Errorf("got packet type %d, want %d", p[0], input[0]) - } - } - - if j != numPacket { - t.Errorf("got %d, want 5 messages", j) - } - }() - - <-checker.called - - for i := 0; i < numPacket; i++ { - p := make([]byte, len(input)) - copy(p, input) - if err := trC.writePacket(p); err != nil { - t.Errorf("writePacket: %v", err) - } - if i == 2 { - // Make sure the kex is in progress. - <-checker.called - } - - } - <-done -} - -type syncChecker struct { - waitCall chan int - called chan int -} - -func (c *syncChecker) Check(dialAddr string, addr net.Addr, key PublicKey) error { - c.called <- 1 - if c.waitCall != nil { - <-c.waitCall - } - return nil -} - -func TestHandshakeAutoRekeyRead(t *testing.T) { - sync := &syncChecker{ - called: make(chan int, 2), - waitCall: nil, - } - clientConf := &ClientConfig{ - HostKeyCallback: sync.Check, - } - clientConf.RekeyThreshold = 500 - - trC, trS, err := handshakePair(clientConf, "addr", false) - if err != nil { - t.Fatalf("handshakePair: %v", err) - } - defer trC.Close() - defer trS.Close() - - packet := make([]byte, 501) - packet[0] = msgRequestSuccess - if err := trS.writePacket(packet); err != nil { - t.Fatalf("writePacket: %v", err) - } - - // While we read out the packet, a key change will be - // initiated. - done := make(chan int, 1) - go func() { - defer close(done) - if _, err := trC.readPacket(); err != nil { - t.Fatalf("readPacket(client): %v", err) - } - - }() - - <-done - <-sync.called -} - -// errorKeyingTransport generates errors after a given number of -// read/write operations. -type errorKeyingTransport struct { - packetConn - readLeft, writeLeft int -} - -func (n *errorKeyingTransport) prepareKeyChange(*algorithms, *kexResult) error { - return nil -} - -func (n *errorKeyingTransport) getSessionID() []byte { - return nil -} - -func (n *errorKeyingTransport) writePacket(packet []byte) error { - if n.writeLeft == 0 { - n.Close() - return errors.New("barf") - } - - n.writeLeft-- - return n.packetConn.writePacket(packet) -} - -func (n *errorKeyingTransport) readPacket() ([]byte, error) { - if n.readLeft == 0 { - n.Close() - return nil, errors.New("barf") - } - - n.readLeft-- - return n.packetConn.readPacket() -} - -func TestHandshakeErrorHandlingRead(t *testing.T) { - for i := 0; i < 20; i++ { - testHandshakeErrorHandlingN(t, i, -1, false) - } -} - -func TestHandshakeErrorHandlingWrite(t *testing.T) { - for i := 0; i < 20; i++ { - testHandshakeErrorHandlingN(t, -1, i, false) - } -} - -func TestHandshakeErrorHandlingReadCoupled(t *testing.T) { - for i := 0; i < 20; i++ { - testHandshakeErrorHandlingN(t, i, -1, true) - } -} - -func TestHandshakeErrorHandlingWriteCoupled(t *testing.T) { - for i := 0; i < 20; i++ { - testHandshakeErrorHandlingN(t, -1, i, true) - } -} - -// testHandshakeErrorHandlingN runs handshakes, injecting errors. If -// handshakeTransport deadlocks, the go runtime will detect it and -// panic. -func testHandshakeErrorHandlingN(t *testing.T, readLimit, writeLimit int, coupled bool) { - msg := Marshal(&serviceRequestMsg{strings.Repeat("x", int(minRekeyThreshold)/4)}) - - a, b := memPipe() - defer a.Close() - defer b.Close() - - key := testSigners["ecdsa"] - serverConf := Config{RekeyThreshold: minRekeyThreshold} - serverConf.SetDefaults() - serverConn := newHandshakeTransport(&errorKeyingTransport{a, readLimit, writeLimit}, &serverConf, []byte{'a'}, []byte{'b'}) - serverConn.hostKeys = []Signer{key} - go serverConn.readLoop() - go serverConn.kexLoop() - - clientConf := Config{RekeyThreshold: 10 * minRekeyThreshold} - clientConf.SetDefaults() - clientConn := newHandshakeTransport(&errorKeyingTransport{b, -1, -1}, &clientConf, []byte{'a'}, []byte{'b'}) - clientConn.hostKeyAlgorithms = []string{key.PublicKey().Type()} - clientConn.hostKeyCallback = InsecureIgnoreHostKey() - go clientConn.readLoop() - go clientConn.kexLoop() - - var wg sync.WaitGroup - - for _, hs := range []packetConn{serverConn, clientConn} { - if !coupled { - wg.Add(2) - go func(c packetConn) { - for i := 0; ; i++ { - str := fmt.Sprintf("%08x", i) + strings.Repeat("x", int(minRekeyThreshold)/4-8) - err := c.writePacket(Marshal(&serviceRequestMsg{str})) - if err != nil { - break - } - } - wg.Done() - c.Close() - }(hs) - go func(c packetConn) { - for { - _, err := c.readPacket() - if err != nil { - break - } - } - wg.Done() - }(hs) - } else { - wg.Add(1) - go func(c packetConn) { - for { - _, err := c.readPacket() - if err != nil { - break - } - if err := c.writePacket(msg); err != nil { - break - } - - } - wg.Done() - }(hs) - } - } - wg.Wait() -} - -func TestDisconnect(t *testing.T) { - if runtime.GOOS == "plan9" { - t.Skip("see golang.org/issue/7237") - } - checker := &testChecker{} - trC, trS, err := handshakePair(&ClientConfig{HostKeyCallback: checker.Check}, "addr", false) - if err != nil { - t.Fatalf("handshakePair: %v", err) - } - - defer trC.Close() - defer trS.Close() - - trC.writePacket([]byte{msgRequestSuccess, 0, 0}) - errMsg := &disconnectMsg{ - Reason: 42, - Message: "such is life", - } - trC.writePacket(Marshal(errMsg)) - trC.writePacket([]byte{msgRequestSuccess, 0, 0}) - - packet, err := trS.readPacket() - if err != nil { - t.Fatalf("readPacket 1: %v", err) - } - if packet[0] != msgRequestSuccess { - t.Errorf("got packet %v, want packet type %d", packet, msgRequestSuccess) - } - - _, err = trS.readPacket() - if err == nil { - t.Errorf("readPacket 2 succeeded") - } else if !reflect.DeepEqual(err, errMsg) { - t.Errorf("got error %#v, want %#v", err, errMsg) - } - - _, err = trS.readPacket() - if err == nil { - t.Errorf("readPacket 3 succeeded") - } -} - -func TestHandshakeRekeyDefault(t *testing.T) { - clientConf := &ClientConfig{ - Config: Config{ - Ciphers: []string{"aes128-ctr"}, - }, - HostKeyCallback: InsecureIgnoreHostKey(), - } - trC, trS, err := handshakePair(clientConf, "addr", false) - if err != nil { - t.Fatalf("handshakePair: %v", err) - } - defer trC.Close() - defer trS.Close() - - trC.writePacket([]byte{msgRequestSuccess, 0, 0}) - trC.Close() - - rgb := (1024 + trC.readBytesLeft) >> 30 - wgb := (1024 + trC.writeBytesLeft) >> 30 - - if rgb != 64 { - t.Errorf("got rekey after %dG read, want 64G", rgb) - } - if wgb != 64 { - t.Errorf("got rekey after %dG write, want 64G", wgb) - } -} diff --git a/vendor/golang.org/x/crypto/ssh/kex.go b/vendor/golang.org/x/crypto/ssh/kex.go deleted file mode 100644 index f34bcc01..00000000 --- a/vendor/golang.org/x/crypto/ssh/kex.go +++ /dev/null @@ -1,540 +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 ssh - -import ( - "crypto" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rand" - "crypto/subtle" - "errors" - "io" - "math/big" - - "golang.org/x/crypto/curve25519" -) - -const ( - kexAlgoDH1SHA1 = "diffie-hellman-group1-sha1" - kexAlgoDH14SHA1 = "diffie-hellman-group14-sha1" - kexAlgoECDH256 = "ecdh-sha2-nistp256" - kexAlgoECDH384 = "ecdh-sha2-nistp384" - kexAlgoECDH521 = "ecdh-sha2-nistp521" - kexAlgoCurve25519SHA256 = "curve25519-sha256@libssh.org" -) - -// kexResult captures the outcome of a key exchange. -type kexResult struct { - // Session hash. See also RFC 4253, section 8. - H []byte - - // Shared secret. See also RFC 4253, section 8. - K []byte - - // Host key as hashed into H. - HostKey []byte - - // Signature of H. - Signature []byte - - // A cryptographic hash function that matches the security - // level of the key exchange algorithm. It is used for - // calculating H, and for deriving keys from H and K. - Hash crypto.Hash - - // The session ID, which is the first H computed. This is used - // to derive key material inside the transport. - SessionID []byte -} - -// handshakeMagics contains data that is always included in the -// session hash. -type handshakeMagics struct { - clientVersion, serverVersion []byte - clientKexInit, serverKexInit []byte -} - -func (m *handshakeMagics) write(w io.Writer) { - writeString(w, m.clientVersion) - writeString(w, m.serverVersion) - writeString(w, m.clientKexInit) - writeString(w, m.serverKexInit) -} - -// kexAlgorithm abstracts different key exchange algorithms. -type kexAlgorithm interface { - // Server runs server-side key agreement, signing the result - // with a hostkey. - Server(p packetConn, rand io.Reader, magics *handshakeMagics, s Signer) (*kexResult, error) - - // Client runs the client-side key agreement. Caller is - // responsible for verifying the host key signature. - Client(p packetConn, rand io.Reader, magics *handshakeMagics) (*kexResult, error) -} - -// dhGroup is a multiplicative group suitable for implementing Diffie-Hellman key agreement. -type dhGroup struct { - g, p, pMinus1 *big.Int -} - -func (group *dhGroup) diffieHellman(theirPublic, myPrivate *big.Int) (*big.Int, error) { - if theirPublic.Cmp(bigOne) <= 0 || theirPublic.Cmp(group.pMinus1) >= 0 { - return nil, errors.New("ssh: DH parameter out of bounds") - } - return new(big.Int).Exp(theirPublic, myPrivate, group.p), nil -} - -func (group *dhGroup) Client(c packetConn, randSource io.Reader, magics *handshakeMagics) (*kexResult, error) { - hashFunc := crypto.SHA1 - - var x *big.Int - for { - var err error - if x, err = rand.Int(randSource, group.pMinus1); err != nil { - return nil, err - } - if x.Sign() > 0 { - break - } - } - - X := new(big.Int).Exp(group.g, x, group.p) - kexDHInit := kexDHInitMsg{ - X: X, - } - if err := c.writePacket(Marshal(&kexDHInit)); err != nil { - return nil, err - } - - packet, err := c.readPacket() - if err != nil { - return nil, err - } - - var kexDHReply kexDHReplyMsg - if err = Unmarshal(packet, &kexDHReply); err != nil { - return nil, err - } - - ki, err := group.diffieHellman(kexDHReply.Y, x) - if err != nil { - return nil, err - } - - h := hashFunc.New() - magics.write(h) - writeString(h, kexDHReply.HostKey) - writeInt(h, X) - writeInt(h, kexDHReply.Y) - K := make([]byte, intLength(ki)) - marshalInt(K, ki) - h.Write(K) - - return &kexResult{ - H: h.Sum(nil), - K: K, - HostKey: kexDHReply.HostKey, - Signature: kexDHReply.Signature, - Hash: crypto.SHA1, - }, nil -} - -func (group *dhGroup) Server(c packetConn, randSource io.Reader, magics *handshakeMagics, priv Signer) (result *kexResult, err error) { - hashFunc := crypto.SHA1 - packet, err := c.readPacket() - if err != nil { - return - } - var kexDHInit kexDHInitMsg - if err = Unmarshal(packet, &kexDHInit); err != nil { - return - } - - var y *big.Int - for { - if y, err = rand.Int(randSource, group.pMinus1); err != nil { - return - } - if y.Sign() > 0 { - break - } - } - - Y := new(big.Int).Exp(group.g, y, group.p) - ki, err := group.diffieHellman(kexDHInit.X, y) - if err != nil { - return nil, err - } - - hostKeyBytes := priv.PublicKey().Marshal() - - h := hashFunc.New() - magics.write(h) - writeString(h, hostKeyBytes) - writeInt(h, kexDHInit.X) - writeInt(h, Y) - - K := make([]byte, intLength(ki)) - marshalInt(K, ki) - h.Write(K) - - H := h.Sum(nil) - - // H is already a hash, but the hostkey signing will apply its - // own key-specific hash algorithm. - sig, err := signAndMarshal(priv, randSource, H) - if err != nil { - return nil, err - } - - kexDHReply := kexDHReplyMsg{ - HostKey: hostKeyBytes, - Y: Y, - Signature: sig, - } - packet = Marshal(&kexDHReply) - - err = c.writePacket(packet) - return &kexResult{ - H: H, - K: K, - HostKey: hostKeyBytes, - Signature: sig, - Hash: crypto.SHA1, - }, nil -} - -// ecdh performs Elliptic Curve Diffie-Hellman key exchange as -// described in RFC 5656, section 4. -type ecdh struct { - curve elliptic.Curve -} - -func (kex *ecdh) Client(c packetConn, rand io.Reader, magics *handshakeMagics) (*kexResult, error) { - ephKey, err := ecdsa.GenerateKey(kex.curve, rand) - if err != nil { - return nil, err - } - - kexInit := kexECDHInitMsg{ - ClientPubKey: elliptic.Marshal(kex.curve, ephKey.PublicKey.X, ephKey.PublicKey.Y), - } - - serialized := Marshal(&kexInit) - if err := c.writePacket(serialized); err != nil { - return nil, err - } - - packet, err := c.readPacket() - if err != nil { - return nil, err - } - - var reply kexECDHReplyMsg - if err = Unmarshal(packet, &reply); err != nil { - return nil, err - } - - x, y, err := unmarshalECKey(kex.curve, reply.EphemeralPubKey) - if err != nil { - return nil, err - } - - // generate shared secret - secret, _ := kex.curve.ScalarMult(x, y, ephKey.D.Bytes()) - - h := ecHash(kex.curve).New() - magics.write(h) - writeString(h, reply.HostKey) - writeString(h, kexInit.ClientPubKey) - writeString(h, reply.EphemeralPubKey) - K := make([]byte, intLength(secret)) - marshalInt(K, secret) - h.Write(K) - - return &kexResult{ - H: h.Sum(nil), - K: K, - HostKey: reply.HostKey, - Signature: reply.Signature, - Hash: ecHash(kex.curve), - }, nil -} - -// unmarshalECKey parses and checks an EC key. -func unmarshalECKey(curve elliptic.Curve, pubkey []byte) (x, y *big.Int, err error) { - x, y = elliptic.Unmarshal(curve, pubkey) - if x == nil { - return nil, nil, errors.New("ssh: elliptic.Unmarshal failure") - } - if !validateECPublicKey(curve, x, y) { - return nil, nil, errors.New("ssh: public key not on curve") - } - return x, y, nil -} - -// validateECPublicKey checks that the point is a valid public key for -// the given curve. See [SEC1], 3.2.2 -func validateECPublicKey(curve elliptic.Curve, x, y *big.Int) bool { - if x.Sign() == 0 && y.Sign() == 0 { - return false - } - - if x.Cmp(curve.Params().P) >= 0 { - return false - } - - if y.Cmp(curve.Params().P) >= 0 { - return false - } - - if !curve.IsOnCurve(x, y) { - return false - } - - // We don't check if N * PubKey == 0, since - // - // - the NIST curves have cofactor = 1, so this is implicit. - // (We don't foresee an implementation that supports non NIST - // curves) - // - // - for ephemeral keys, we don't need to worry about small - // subgroup attacks. - return true -} - -func (kex *ecdh) Server(c packetConn, rand io.Reader, magics *handshakeMagics, priv Signer) (result *kexResult, err error) { - packet, err := c.readPacket() - if err != nil { - return nil, err - } - - var kexECDHInit kexECDHInitMsg - if err = Unmarshal(packet, &kexECDHInit); err != nil { - return nil, err - } - - clientX, clientY, err := unmarshalECKey(kex.curve, kexECDHInit.ClientPubKey) - if err != nil { - return nil, err - } - - // We could cache this key across multiple users/multiple - // connection attempts, but the benefit is small. OpenSSH - // generates a new key for each incoming connection. - ephKey, err := ecdsa.GenerateKey(kex.curve, rand) - if err != nil { - return nil, err - } - - hostKeyBytes := priv.PublicKey().Marshal() - - serializedEphKey := elliptic.Marshal(kex.curve, ephKey.PublicKey.X, ephKey.PublicKey.Y) - - // generate shared secret - secret, _ := kex.curve.ScalarMult(clientX, clientY, ephKey.D.Bytes()) - - h := ecHash(kex.curve).New() - magics.write(h) - writeString(h, hostKeyBytes) - writeString(h, kexECDHInit.ClientPubKey) - writeString(h, serializedEphKey) - - K := make([]byte, intLength(secret)) - marshalInt(K, secret) - h.Write(K) - - H := h.Sum(nil) - - // H is already a hash, but the hostkey signing will apply its - // own key-specific hash algorithm. - sig, err := signAndMarshal(priv, rand, H) - if err != nil { - return nil, err - } - - reply := kexECDHReplyMsg{ - EphemeralPubKey: serializedEphKey, - HostKey: hostKeyBytes, - Signature: sig, - } - - serialized := Marshal(&reply) - if err := c.writePacket(serialized); err != nil { - return nil, err - } - - return &kexResult{ - H: H, - K: K, - HostKey: reply.HostKey, - Signature: sig, - Hash: ecHash(kex.curve), - }, nil -} - -var kexAlgoMap = map[string]kexAlgorithm{} - -func init() { - // This is the group called diffie-hellman-group1-sha1 in RFC - // 4253 and Oakley Group 2 in RFC 2409. - p, _ := new(big.Int).SetString("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381FFFFFFFFFFFFFFFF", 16) - kexAlgoMap[kexAlgoDH1SHA1] = &dhGroup{ - g: new(big.Int).SetInt64(2), - p: p, - pMinus1: new(big.Int).Sub(p, bigOne), - } - - // This is the group called diffie-hellman-group14-sha1 in RFC - // 4253 and Oakley Group 14 in RFC 3526. - p, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AACAA68FFFFFFFFFFFFFFFF", 16) - - kexAlgoMap[kexAlgoDH14SHA1] = &dhGroup{ - g: new(big.Int).SetInt64(2), - p: p, - pMinus1: new(big.Int).Sub(p, bigOne), - } - - kexAlgoMap[kexAlgoECDH521] = &ecdh{elliptic.P521()} - kexAlgoMap[kexAlgoECDH384] = &ecdh{elliptic.P384()} - kexAlgoMap[kexAlgoECDH256] = &ecdh{elliptic.P256()} - kexAlgoMap[kexAlgoCurve25519SHA256] = &curve25519sha256{} -} - -// curve25519sha256 implements the curve25519-sha256@libssh.org key -// agreement protocol, as described in -// https://git.libssh.org/projects/libssh.git/tree/doc/curve25519-sha256@libssh.org.txt -type curve25519sha256 struct{} - -type curve25519KeyPair struct { - priv [32]byte - pub [32]byte -} - -func (kp *curve25519KeyPair) generate(rand io.Reader) error { - if _, err := io.ReadFull(rand, kp.priv[:]); err != nil { - return err - } - curve25519.ScalarBaseMult(&kp.pub, &kp.priv) - return nil -} - -// curve25519Zeros is just an array of 32 zero bytes so that we have something -// convenient to compare against in order to reject curve25519 points with the -// wrong order. -var curve25519Zeros [32]byte - -func (kex *curve25519sha256) Client(c packetConn, rand io.Reader, magics *handshakeMagics) (*kexResult, error) { - var kp curve25519KeyPair - if err := kp.generate(rand); err != nil { - return nil, err - } - if err := c.writePacket(Marshal(&kexECDHInitMsg{kp.pub[:]})); err != nil { - return nil, err - } - - packet, err := c.readPacket() - if err != nil { - return nil, err - } - - var reply kexECDHReplyMsg - if err = Unmarshal(packet, &reply); err != nil { - return nil, err - } - if len(reply.EphemeralPubKey) != 32 { - return nil, errors.New("ssh: peer's curve25519 public value has wrong length") - } - - var servPub, secret [32]byte - copy(servPub[:], reply.EphemeralPubKey) - curve25519.ScalarMult(&secret, &kp.priv, &servPub) - if subtle.ConstantTimeCompare(secret[:], curve25519Zeros[:]) == 1 { - return nil, errors.New("ssh: peer's curve25519 public value has wrong order") - } - - h := crypto.SHA256.New() - magics.write(h) - writeString(h, reply.HostKey) - writeString(h, kp.pub[:]) - writeString(h, reply.EphemeralPubKey) - - ki := new(big.Int).SetBytes(secret[:]) - K := make([]byte, intLength(ki)) - marshalInt(K, ki) - h.Write(K) - - return &kexResult{ - H: h.Sum(nil), - K: K, - HostKey: reply.HostKey, - Signature: reply.Signature, - Hash: crypto.SHA256, - }, nil -} - -func (kex *curve25519sha256) Server(c packetConn, rand io.Reader, magics *handshakeMagics, priv Signer) (result *kexResult, err error) { - packet, err := c.readPacket() - if err != nil { - return - } - var kexInit kexECDHInitMsg - if err = Unmarshal(packet, &kexInit); err != nil { - return - } - - if len(kexInit.ClientPubKey) != 32 { - return nil, errors.New("ssh: peer's curve25519 public value has wrong length") - } - - var kp curve25519KeyPair - if err := kp.generate(rand); err != nil { - return nil, err - } - - var clientPub, secret [32]byte - copy(clientPub[:], kexInit.ClientPubKey) - curve25519.ScalarMult(&secret, &kp.priv, &clientPub) - if subtle.ConstantTimeCompare(secret[:], curve25519Zeros[:]) == 1 { - return nil, errors.New("ssh: peer's curve25519 public value has wrong order") - } - - hostKeyBytes := priv.PublicKey().Marshal() - - h := crypto.SHA256.New() - magics.write(h) - writeString(h, hostKeyBytes) - writeString(h, kexInit.ClientPubKey) - writeString(h, kp.pub[:]) - - ki := new(big.Int).SetBytes(secret[:]) - K := make([]byte, intLength(ki)) - marshalInt(K, ki) - h.Write(K) - - H := h.Sum(nil) - - sig, err := signAndMarshal(priv, rand, H) - if err != nil { - return nil, err - } - - reply := kexECDHReplyMsg{ - EphemeralPubKey: kp.pub[:], - HostKey: hostKeyBytes, - Signature: sig, - } - if err := c.writePacket(Marshal(&reply)); err != nil { - return nil, err - } - return &kexResult{ - H: H, - K: K, - HostKey: hostKeyBytes, - Signature: sig, - Hash: crypto.SHA256, - }, nil -} diff --git a/vendor/golang.org/x/crypto/ssh/kex_test.go b/vendor/golang.org/x/crypto/ssh/kex_test.go deleted file mode 100644 index 12ca0acd..00000000 --- a/vendor/golang.org/x/crypto/ssh/kex_test.go +++ /dev/null @@ -1,50 +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 ssh - -// Key exchange tests. - -import ( - "crypto/rand" - "reflect" - "testing" -) - -func TestKexes(t *testing.T) { - type kexResultErr struct { - result *kexResult - err error - } - - for name, kex := range kexAlgoMap { - a, b := memPipe() - - s := make(chan kexResultErr, 1) - c := make(chan kexResultErr, 1) - var magics handshakeMagics - go func() { - r, e := kex.Client(a, rand.Reader, &magics) - a.Close() - c <- kexResultErr{r, e} - }() - go func() { - r, e := kex.Server(b, rand.Reader, &magics, testSigners["ecdsa"]) - b.Close() - s <- kexResultErr{r, e} - }() - - clientRes := <-c - serverRes := <-s - if clientRes.err != nil { - t.Errorf("client: %v", clientRes.err) - } - if serverRes.err != nil { - t.Errorf("server: %v", serverRes.err) - } - if !reflect.DeepEqual(clientRes.result, serverRes.result) { - t.Errorf("kex %q: mismatch %#v, %#v", name, clientRes.result, serverRes.result) - } - } -} diff --git a/vendor/golang.org/x/crypto/ssh/keys.go b/vendor/golang.org/x/crypto/ssh/keys.go deleted file mode 100644 index 34d95822..00000000 --- a/vendor/golang.org/x/crypto/ssh/keys.go +++ /dev/null @@ -1,1035 +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 ssh - -import ( - "bytes" - "crypto" - "crypto/dsa" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/md5" - "crypto/rsa" - "crypto/sha256" - "crypto/x509" - "encoding/asn1" - "encoding/base64" - "encoding/hex" - "encoding/pem" - "errors" - "fmt" - "io" - "math/big" - "strings" - - "golang.org/x/crypto/ed25519" -) - -// These constants represent the algorithm names for key types supported by this -// package. -const ( - KeyAlgoRSA = "ssh-rsa" - KeyAlgoDSA = "ssh-dss" - KeyAlgoECDSA256 = "ecdsa-sha2-nistp256" - KeyAlgoECDSA384 = "ecdsa-sha2-nistp384" - KeyAlgoECDSA521 = "ecdsa-sha2-nistp521" - KeyAlgoED25519 = "ssh-ed25519" -) - -// parsePubKey parses a public key of the given algorithm. -// Use ParsePublicKey for keys with prepended algorithm. -func parsePubKey(in []byte, algo string) (pubKey PublicKey, rest []byte, err error) { - switch algo { - case KeyAlgoRSA: - return parseRSA(in) - case KeyAlgoDSA: - return parseDSA(in) - case KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521: - return parseECDSA(in) - case KeyAlgoED25519: - return parseED25519(in) - case CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, CertAlgoECDSA384v01, CertAlgoECDSA521v01, CertAlgoED25519v01: - cert, err := parseCert(in, certToPrivAlgo(algo)) - if err != nil { - return nil, nil, err - } - return cert, nil, nil - } - return nil, nil, fmt.Errorf("ssh: unknown key algorithm: %v", algo) -} - -// parseAuthorizedKey parses a public key in OpenSSH authorized_keys format -// (see sshd(8) manual page) once the options and key type fields have been -// removed. -func parseAuthorizedKey(in []byte) (out PublicKey, comment string, err error) { - in = bytes.TrimSpace(in) - - i := bytes.IndexAny(in, " \t") - if i == -1 { - i = len(in) - } - base64Key := in[:i] - - key := make([]byte, base64.StdEncoding.DecodedLen(len(base64Key))) - n, err := base64.StdEncoding.Decode(key, base64Key) - if err != nil { - return nil, "", err - } - key = key[:n] - out, err = ParsePublicKey(key) - if err != nil { - return nil, "", err - } - comment = string(bytes.TrimSpace(in[i:])) - return out, comment, nil -} - -// ParseKnownHosts parses an entry in the format of the known_hosts file. -// -// The known_hosts format is documented in the sshd(8) manual page. This -// function will parse a single entry from in. On successful return, marker -// will contain the optional marker value (i.e. "cert-authority" or "revoked") -// or else be empty, hosts will contain the hosts that this entry matches, -// pubKey will contain the public key and comment will contain any trailing -// comment at the end of the line. See the sshd(8) manual page for the various -// forms that a host string can take. -// -// The unparsed remainder of the input will be returned in rest. This function -// can be called repeatedly to parse multiple entries. -// -// If no entries were found in the input then err will be io.EOF. Otherwise a -// non-nil err value indicates a parse error. -func ParseKnownHosts(in []byte) (marker string, hosts []string, pubKey PublicKey, comment string, rest []byte, err error) { - for len(in) > 0 { - end := bytes.IndexByte(in, '\n') - if end != -1 { - rest = in[end+1:] - in = in[:end] - } else { - rest = nil - } - - end = bytes.IndexByte(in, '\r') - if end != -1 { - in = in[:end] - } - - in = bytes.TrimSpace(in) - if len(in) == 0 || in[0] == '#' { - in = rest - continue - } - - i := bytes.IndexAny(in, " \t") - if i == -1 { - in = rest - continue - } - - // Strip out the beginning of the known_host key. - // This is either an optional marker or a (set of) hostname(s). - keyFields := bytes.Fields(in) - if len(keyFields) < 3 || len(keyFields) > 5 { - return "", nil, nil, "", nil, errors.New("ssh: invalid entry in known_hosts data") - } - - // keyFields[0] is either "@cert-authority", "@revoked" or a comma separated - // list of hosts - marker := "" - if keyFields[0][0] == '@' { - marker = string(keyFields[0][1:]) - keyFields = keyFields[1:] - } - - hosts := string(keyFields[0]) - // keyFields[1] contains the key type (e.g. “ssh-rsa”). - // However, that information is duplicated inside the - // base64-encoded key and so is ignored here. - - key := bytes.Join(keyFields[2:], []byte(" ")) - if pubKey, comment, err = parseAuthorizedKey(key); err != nil { - return "", nil, nil, "", nil, err - } - - return marker, strings.Split(hosts, ","), pubKey, comment, rest, nil - } - - return "", nil, nil, "", nil, io.EOF -} - -// ParseAuthorizedKeys parses a public key from an authorized_keys -// file used in OpenSSH according to the sshd(8) manual page. -func ParseAuthorizedKey(in []byte) (out PublicKey, comment string, options []string, rest []byte, err error) { - for len(in) > 0 { - end := bytes.IndexByte(in, '\n') - if end != -1 { - rest = in[end+1:] - in = in[:end] - } else { - rest = nil - } - - end = bytes.IndexByte(in, '\r') - if end != -1 { - in = in[:end] - } - - in = bytes.TrimSpace(in) - if len(in) == 0 || in[0] == '#' { - in = rest - continue - } - - i := bytes.IndexAny(in, " \t") - if i == -1 { - in = rest - continue - } - - if out, comment, err = parseAuthorizedKey(in[i:]); err == nil { - return out, comment, options, rest, nil - } - - // No key type recognised. Maybe there's an options field at - // the beginning. - var b byte - inQuote := false - var candidateOptions []string - optionStart := 0 - for i, b = range in { - isEnd := !inQuote && (b == ' ' || b == '\t') - if (b == ',' && !inQuote) || isEnd { - if i-optionStart > 0 { - candidateOptions = append(candidateOptions, string(in[optionStart:i])) - } - optionStart = i + 1 - } - if isEnd { - break - } - if b == '"' && (i == 0 || (i > 0 && in[i-1] != '\\')) { - inQuote = !inQuote - } - } - for i < len(in) && (in[i] == ' ' || in[i] == '\t') { - i++ - } - if i == len(in) { - // Invalid line: unmatched quote - in = rest - continue - } - - in = in[i:] - i = bytes.IndexAny(in, " \t") - if i == -1 { - in = rest - continue - } - - if out, comment, err = parseAuthorizedKey(in[i:]); err == nil { - options = candidateOptions - return out, comment, options, rest, nil - } - - in = rest - continue - } - - return nil, "", nil, nil, errors.New("ssh: no key found") -} - -// ParsePublicKey parses an SSH public key formatted for use in -// the SSH wire protocol according to RFC 4253, section 6.6. -func ParsePublicKey(in []byte) (out PublicKey, err error) { - algo, in, ok := parseString(in) - if !ok { - return nil, errShortRead - } - var rest []byte - out, rest, err = parsePubKey(in, string(algo)) - if len(rest) > 0 { - return nil, errors.New("ssh: trailing junk in public key") - } - - return out, err -} - -// MarshalAuthorizedKey serializes key for inclusion in an OpenSSH -// authorized_keys file. The return value ends with newline. -func MarshalAuthorizedKey(key PublicKey) []byte { - b := &bytes.Buffer{} - b.WriteString(key.Type()) - b.WriteByte(' ') - e := base64.NewEncoder(base64.StdEncoding, b) - e.Write(key.Marshal()) - e.Close() - b.WriteByte('\n') - return b.Bytes() -} - -// PublicKey is an abstraction of different types of public keys. -type PublicKey interface { - // Type returns the key's type, e.g. "ssh-rsa". - Type() string - - // Marshal returns the serialized key data in SSH wire format, - // with the name prefix. To unmarshal the returned data, use - // the ParsePublicKey function. - Marshal() []byte - - // Verify that sig is a signature on the given data using this - // key. This function will hash the data appropriately first. - Verify(data []byte, sig *Signature) error -} - -// CryptoPublicKey, if implemented by a PublicKey, -// returns the underlying crypto.PublicKey form of the key. -type CryptoPublicKey interface { - CryptoPublicKey() crypto.PublicKey -} - -// A Signer can create signatures that verify against a public key. -type Signer interface { - // PublicKey returns an associated PublicKey instance. - PublicKey() PublicKey - - // Sign returns raw signature for the given data. This method - // will apply the hash specified for the keytype to the data. - Sign(rand io.Reader, data []byte) (*Signature, error) -} - -type rsaPublicKey rsa.PublicKey - -func (r *rsaPublicKey) Type() string { - return "ssh-rsa" -} - -// parseRSA parses an RSA key according to RFC 4253, section 6.6. -func parseRSA(in []byte) (out PublicKey, rest []byte, err error) { - var w struct { - E *big.Int - N *big.Int - Rest []byte `ssh:"rest"` - } - if err := Unmarshal(in, &w); err != nil { - return nil, nil, err - } - - if w.E.BitLen() > 24 { - return nil, nil, errors.New("ssh: exponent too large") - } - e := w.E.Int64() - if e < 3 || e&1 == 0 { - return nil, nil, errors.New("ssh: incorrect exponent") - } - - var key rsa.PublicKey - key.E = int(e) - key.N = w.N - return (*rsaPublicKey)(&key), w.Rest, nil -} - -func (r *rsaPublicKey) Marshal() []byte { - e := new(big.Int).SetInt64(int64(r.E)) - // RSA publickey struct layout should match the struct used by - // parseRSACert in the x/crypto/ssh/agent package. - wirekey := struct { - Name string - E *big.Int - N *big.Int - }{ - KeyAlgoRSA, - e, - r.N, - } - return Marshal(&wirekey) -} - -func (r *rsaPublicKey) Verify(data []byte, sig *Signature) error { - if sig.Format != r.Type() { - return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, r.Type()) - } - h := crypto.SHA1.New() - h.Write(data) - digest := h.Sum(nil) - return rsa.VerifyPKCS1v15((*rsa.PublicKey)(r), crypto.SHA1, digest, sig.Blob) -} - -func (r *rsaPublicKey) CryptoPublicKey() crypto.PublicKey { - return (*rsa.PublicKey)(r) -} - -type dsaPublicKey dsa.PublicKey - -func (k *dsaPublicKey) Type() string { - return "ssh-dss" -} - -func checkDSAParams(param *dsa.Parameters) error { - // SSH specifies FIPS 186-2, which only provided a single size - // (1024 bits) DSA key. FIPS 186-3 allows for larger key - // sizes, which would confuse SSH. - if l := param.P.BitLen(); l != 1024 { - return fmt.Errorf("ssh: unsupported DSA key size %d", l) - } - - return nil -} - -// parseDSA parses an DSA key according to RFC 4253, section 6.6. -func parseDSA(in []byte) (out PublicKey, rest []byte, err error) { - var w struct { - P, Q, G, Y *big.Int - Rest []byte `ssh:"rest"` - } - if err := Unmarshal(in, &w); err != nil { - return nil, nil, err - } - - param := dsa.Parameters{ - P: w.P, - Q: w.Q, - G: w.G, - } - if err := checkDSAParams(¶m); err != nil { - return nil, nil, err - } - - key := &dsaPublicKey{ - Parameters: param, - Y: w.Y, - } - return key, w.Rest, nil -} - -func (k *dsaPublicKey) Marshal() []byte { - // DSA publickey struct layout should match the struct used by - // parseDSACert in the x/crypto/ssh/agent package. - w := struct { - Name string - P, Q, G, Y *big.Int - }{ - k.Type(), - k.P, - k.Q, - k.G, - k.Y, - } - - return Marshal(&w) -} - -func (k *dsaPublicKey) Verify(data []byte, sig *Signature) error { - if sig.Format != k.Type() { - return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, k.Type()) - } - h := crypto.SHA1.New() - h.Write(data) - digest := h.Sum(nil) - - // Per RFC 4253, section 6.6, - // The value for 'dss_signature_blob' is encoded as a string containing - // r, followed by s (which are 160-bit integers, without lengths or - // padding, unsigned, and in network byte order). - // For DSS purposes, sig.Blob should be exactly 40 bytes in length. - if len(sig.Blob) != 40 { - return errors.New("ssh: DSA signature parse error") - } - r := new(big.Int).SetBytes(sig.Blob[:20]) - s := new(big.Int).SetBytes(sig.Blob[20:]) - if dsa.Verify((*dsa.PublicKey)(k), digest, r, s) { - return nil - } - return errors.New("ssh: signature did not verify") -} - -func (k *dsaPublicKey) CryptoPublicKey() crypto.PublicKey { - return (*dsa.PublicKey)(k) -} - -type dsaPrivateKey struct { - *dsa.PrivateKey -} - -func (k *dsaPrivateKey) PublicKey() PublicKey { - return (*dsaPublicKey)(&k.PrivateKey.PublicKey) -} - -func (k *dsaPrivateKey) Sign(rand io.Reader, data []byte) (*Signature, error) { - h := crypto.SHA1.New() - h.Write(data) - digest := h.Sum(nil) - r, s, err := dsa.Sign(rand, k.PrivateKey, digest) - if err != nil { - return nil, err - } - - sig := make([]byte, 40) - rb := r.Bytes() - sb := s.Bytes() - - copy(sig[20-len(rb):20], rb) - copy(sig[40-len(sb):], sb) - - return &Signature{ - Format: k.PublicKey().Type(), - Blob: sig, - }, nil -} - -type ecdsaPublicKey ecdsa.PublicKey - -func (k *ecdsaPublicKey) Type() string { - return "ecdsa-sha2-" + k.nistID() -} - -func (k *ecdsaPublicKey) nistID() string { - switch k.Params().BitSize { - case 256: - return "nistp256" - case 384: - return "nistp384" - case 521: - return "nistp521" - } - panic("ssh: unsupported ecdsa key size") -} - -type ed25519PublicKey ed25519.PublicKey - -func (k ed25519PublicKey) Type() string { - return KeyAlgoED25519 -} - -func parseED25519(in []byte) (out PublicKey, rest []byte, err error) { - var w struct { - KeyBytes []byte - Rest []byte `ssh:"rest"` - } - - if err := Unmarshal(in, &w); err != nil { - return nil, nil, err - } - - key := ed25519.PublicKey(w.KeyBytes) - - return (ed25519PublicKey)(key), w.Rest, nil -} - -func (k ed25519PublicKey) Marshal() []byte { - w := struct { - Name string - KeyBytes []byte - }{ - KeyAlgoED25519, - []byte(k), - } - return Marshal(&w) -} - -func (k ed25519PublicKey) Verify(b []byte, sig *Signature) error { - if sig.Format != k.Type() { - return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, k.Type()) - } - - edKey := (ed25519.PublicKey)(k) - if ok := ed25519.Verify(edKey, b, sig.Blob); !ok { - return errors.New("ssh: signature did not verify") - } - - return nil -} - -func (k ed25519PublicKey) CryptoPublicKey() crypto.PublicKey { - return ed25519.PublicKey(k) -} - -func supportedEllipticCurve(curve elliptic.Curve) bool { - return curve == elliptic.P256() || curve == elliptic.P384() || curve == elliptic.P521() -} - -// ecHash returns the hash to match the given elliptic curve, see RFC -// 5656, section 6.2.1 -func ecHash(curve elliptic.Curve) crypto.Hash { - bitSize := curve.Params().BitSize - switch { - case bitSize <= 256: - return crypto.SHA256 - case bitSize <= 384: - return crypto.SHA384 - } - return crypto.SHA512 -} - -// parseECDSA parses an ECDSA key according to RFC 5656, section 3.1. -func parseECDSA(in []byte) (out PublicKey, rest []byte, err error) { - var w struct { - Curve string - KeyBytes []byte - Rest []byte `ssh:"rest"` - } - - if err := Unmarshal(in, &w); err != nil { - return nil, nil, err - } - - key := new(ecdsa.PublicKey) - - switch w.Curve { - case "nistp256": - key.Curve = elliptic.P256() - case "nistp384": - key.Curve = elliptic.P384() - case "nistp521": - key.Curve = elliptic.P521() - default: - return nil, nil, errors.New("ssh: unsupported curve") - } - - key.X, key.Y = elliptic.Unmarshal(key.Curve, w.KeyBytes) - if key.X == nil || key.Y == nil { - return nil, nil, errors.New("ssh: invalid curve point") - } - return (*ecdsaPublicKey)(key), w.Rest, nil -} - -func (k *ecdsaPublicKey) Marshal() []byte { - // See RFC 5656, section 3.1. - keyBytes := elliptic.Marshal(k.Curve, k.X, k.Y) - // ECDSA publickey struct layout should match the struct used by - // parseECDSACert in the x/crypto/ssh/agent package. - w := struct { - Name string - ID string - Key []byte - }{ - k.Type(), - k.nistID(), - keyBytes, - } - - return Marshal(&w) -} - -func (k *ecdsaPublicKey) Verify(data []byte, sig *Signature) error { - if sig.Format != k.Type() { - return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, k.Type()) - } - - h := ecHash(k.Curve).New() - h.Write(data) - digest := h.Sum(nil) - - // Per RFC 5656, section 3.1.2, - // The ecdsa_signature_blob value has the following specific encoding: - // mpint r - // mpint s - var ecSig struct { - R *big.Int - S *big.Int - } - - if err := Unmarshal(sig.Blob, &ecSig); err != nil { - return err - } - - if ecdsa.Verify((*ecdsa.PublicKey)(k), digest, ecSig.R, ecSig.S) { - return nil - } - return errors.New("ssh: signature did not verify") -} - -func (k *ecdsaPublicKey) CryptoPublicKey() crypto.PublicKey { - return (*ecdsa.PublicKey)(k) -} - -// NewSignerFromKey takes an *rsa.PrivateKey, *dsa.PrivateKey, -// *ecdsa.PrivateKey or any other crypto.Signer and returns a -// corresponding Signer instance. ECDSA keys must use P-256, P-384 or -// P-521. DSA keys must use parameter size L1024N160. -func NewSignerFromKey(key interface{}) (Signer, error) { - switch key := key.(type) { - case crypto.Signer: - return NewSignerFromSigner(key) - case *dsa.PrivateKey: - return newDSAPrivateKey(key) - default: - return nil, fmt.Errorf("ssh: unsupported key type %T", key) - } -} - -func newDSAPrivateKey(key *dsa.PrivateKey) (Signer, error) { - if err := checkDSAParams(&key.PublicKey.Parameters); err != nil { - return nil, err - } - - return &dsaPrivateKey{key}, nil -} - -type wrappedSigner struct { - signer crypto.Signer - pubKey PublicKey -} - -// NewSignerFromSigner takes any crypto.Signer implementation and -// returns a corresponding Signer interface. This can be used, for -// example, with keys kept in hardware modules. -func NewSignerFromSigner(signer crypto.Signer) (Signer, error) { - pubKey, err := NewPublicKey(signer.Public()) - if err != nil { - return nil, err - } - - return &wrappedSigner{signer, pubKey}, nil -} - -func (s *wrappedSigner) PublicKey() PublicKey { - return s.pubKey -} - -func (s *wrappedSigner) Sign(rand io.Reader, data []byte) (*Signature, error) { - var hashFunc crypto.Hash - - switch key := s.pubKey.(type) { - case *rsaPublicKey, *dsaPublicKey: - hashFunc = crypto.SHA1 - case *ecdsaPublicKey: - hashFunc = ecHash(key.Curve) - case ed25519PublicKey: - default: - return nil, fmt.Errorf("ssh: unsupported key type %T", key) - } - - var digest []byte - if hashFunc != 0 { - h := hashFunc.New() - h.Write(data) - digest = h.Sum(nil) - } else { - digest = data - } - - signature, err := s.signer.Sign(rand, digest, hashFunc) - if err != nil { - return nil, err - } - - // crypto.Signer.Sign is expected to return an ASN.1-encoded signature - // for ECDSA and DSA, but that's not the encoding expected by SSH, so - // re-encode. - switch s.pubKey.(type) { - case *ecdsaPublicKey, *dsaPublicKey: - type asn1Signature struct { - R, S *big.Int - } - asn1Sig := new(asn1Signature) - _, err := asn1.Unmarshal(signature, asn1Sig) - if err != nil { - return nil, err - } - - switch s.pubKey.(type) { - case *ecdsaPublicKey: - signature = Marshal(asn1Sig) - - case *dsaPublicKey: - signature = make([]byte, 40) - r := asn1Sig.R.Bytes() - s := asn1Sig.S.Bytes() - copy(signature[20-len(r):20], r) - copy(signature[40-len(s):40], s) - } - } - - return &Signature{ - Format: s.pubKey.Type(), - Blob: signature, - }, nil -} - -// NewPublicKey takes an *rsa.PublicKey, *dsa.PublicKey, *ecdsa.PublicKey, -// or ed25519.PublicKey returns a corresponding PublicKey instance. -// ECDSA keys must use P-256, P-384 or P-521. -func NewPublicKey(key interface{}) (PublicKey, error) { - switch key := key.(type) { - case *rsa.PublicKey: - return (*rsaPublicKey)(key), nil - case *ecdsa.PublicKey: - if !supportedEllipticCurve(key.Curve) { - return nil, errors.New("ssh: only P-256, P-384 and P-521 EC keys are supported") - } - return (*ecdsaPublicKey)(key), nil - case *dsa.PublicKey: - return (*dsaPublicKey)(key), nil - case ed25519.PublicKey: - return (ed25519PublicKey)(key), nil - default: - return nil, fmt.Errorf("ssh: unsupported key type %T", key) - } -} - -// ParsePrivateKey returns a Signer from a PEM encoded private key. It supports -// the same keys as ParseRawPrivateKey. -func ParsePrivateKey(pemBytes []byte) (Signer, error) { - key, err := ParseRawPrivateKey(pemBytes) - if err != nil { - return nil, err - } - - return NewSignerFromKey(key) -} - -// ParsePrivateKeyWithPassphrase returns a Signer from a PEM encoded private -// key and passphrase. It supports the same keys as -// ParseRawPrivateKeyWithPassphrase. -func ParsePrivateKeyWithPassphrase(pemBytes, passPhrase []byte) (Signer, error) { - key, err := ParseRawPrivateKeyWithPassphrase(pemBytes, passPhrase) - if err != nil { - return nil, err - } - - return NewSignerFromKey(key) -} - -// encryptedBlock tells whether a private key is -// encrypted by examining its Proc-Type header -// for a mention of ENCRYPTED -// according to RFC 1421 Section 4.6.1.1. -func encryptedBlock(block *pem.Block) bool { - return strings.Contains(block.Headers["Proc-Type"], "ENCRYPTED") -} - -// ParseRawPrivateKey returns a private key from a PEM encoded private key. It -// supports RSA (PKCS#1), PKCS#8, DSA (OpenSSL), and ECDSA private keys. -func ParseRawPrivateKey(pemBytes []byte) (interface{}, error) { - block, _ := pem.Decode(pemBytes) - if block == nil { - return nil, errors.New("ssh: no key found") - } - - if encryptedBlock(block) { - return nil, errors.New("ssh: cannot decode encrypted private keys") - } - - switch block.Type { - case "RSA PRIVATE KEY": - return x509.ParsePKCS1PrivateKey(block.Bytes) - // RFC5208 - https://tools.ietf.org/html/rfc5208 - case "PRIVATE KEY": - return x509.ParsePKCS8PrivateKey(block.Bytes) - case "EC PRIVATE KEY": - return x509.ParseECPrivateKey(block.Bytes) - case "DSA PRIVATE KEY": - return ParseDSAPrivateKey(block.Bytes) - case "OPENSSH PRIVATE KEY": - return parseOpenSSHPrivateKey(block.Bytes) - default: - return nil, fmt.Errorf("ssh: unsupported key type %q", block.Type) - } -} - -// ParseRawPrivateKeyWithPassphrase returns a private key decrypted with -// passphrase from a PEM encoded private key. If wrong passphrase, return -// x509.IncorrectPasswordError. -func ParseRawPrivateKeyWithPassphrase(pemBytes, passPhrase []byte) (interface{}, error) { - block, _ := pem.Decode(pemBytes) - if block == nil { - return nil, errors.New("ssh: no key found") - } - buf := block.Bytes - - if encryptedBlock(block) { - if x509.IsEncryptedPEMBlock(block) { - var err error - buf, err = x509.DecryptPEMBlock(block, passPhrase) - if err != nil { - if err == x509.IncorrectPasswordError { - return nil, err - } - return nil, fmt.Errorf("ssh: cannot decode encrypted private keys: %v", err) - } - } - } - - switch block.Type { - case "RSA PRIVATE KEY": - return x509.ParsePKCS1PrivateKey(buf) - case "EC PRIVATE KEY": - return x509.ParseECPrivateKey(buf) - case "DSA PRIVATE KEY": - return ParseDSAPrivateKey(buf) - case "OPENSSH PRIVATE KEY": - return parseOpenSSHPrivateKey(buf) - default: - return nil, fmt.Errorf("ssh: unsupported key type %q", block.Type) - } -} - -// ParseDSAPrivateKey returns a DSA private key from its ASN.1 DER encoding, as -// specified by the OpenSSL DSA man page. -func ParseDSAPrivateKey(der []byte) (*dsa.PrivateKey, error) { - var k struct { - Version int - P *big.Int - Q *big.Int - G *big.Int - Pub *big.Int - Priv *big.Int - } - rest, err := asn1.Unmarshal(der, &k) - if err != nil { - return nil, errors.New("ssh: failed to parse DSA key: " + err.Error()) - } - if len(rest) > 0 { - return nil, errors.New("ssh: garbage after DSA key") - } - - return &dsa.PrivateKey{ - PublicKey: dsa.PublicKey{ - Parameters: dsa.Parameters{ - P: k.P, - Q: k.Q, - G: k.G, - }, - Y: k.Pub, - }, - X: k.Priv, - }, nil -} - -// Implemented based on the documentation at -// https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.key -func parseOpenSSHPrivateKey(key []byte) (crypto.PrivateKey, error) { - magic := append([]byte("openssh-key-v1"), 0) - if !bytes.Equal(magic, key[0:len(magic)]) { - return nil, errors.New("ssh: invalid openssh private key format") - } - remaining := key[len(magic):] - - var w struct { - CipherName string - KdfName string - KdfOpts string - NumKeys uint32 - PubKey []byte - PrivKeyBlock []byte - } - - if err := Unmarshal(remaining, &w); err != nil { - return nil, err - } - - if w.KdfName != "none" || w.CipherName != "none" { - return nil, errors.New("ssh: cannot decode encrypted private keys") - } - - pk1 := struct { - Check1 uint32 - Check2 uint32 - Keytype string - Rest []byte `ssh:"rest"` - }{} - - if err := Unmarshal(w.PrivKeyBlock, &pk1); err != nil { - return nil, err - } - - if pk1.Check1 != pk1.Check2 { - return nil, errors.New("ssh: checkint mismatch") - } - - // we only handle ed25519 and rsa keys currently - switch pk1.Keytype { - case KeyAlgoRSA: - // https://github.com/openssh/openssh-portable/blob/master/sshkey.c#L2760-L2773 - key := struct { - N *big.Int - E *big.Int - D *big.Int - Iqmp *big.Int - P *big.Int - Q *big.Int - Comment string - Pad []byte `ssh:"rest"` - }{} - - if err := Unmarshal(pk1.Rest, &key); err != nil { - return nil, err - } - - for i, b := range key.Pad { - if int(b) != i+1 { - return nil, errors.New("ssh: padding not as expected") - } - } - - pk := &rsa.PrivateKey{ - PublicKey: rsa.PublicKey{ - N: key.N, - E: int(key.E.Int64()), - }, - D: key.D, - Primes: []*big.Int{key.P, key.Q}, - } - - if err := pk.Validate(); err != nil { - return nil, err - } - - pk.Precompute() - - return pk, nil - case KeyAlgoED25519: - key := struct { - Pub []byte - Priv []byte - Comment string - Pad []byte `ssh:"rest"` - }{} - - if err := Unmarshal(pk1.Rest, &key); err != nil { - return nil, err - } - - if len(key.Priv) != ed25519.PrivateKeySize { - return nil, errors.New("ssh: private key unexpected length") - } - - for i, b := range key.Pad { - if int(b) != i+1 { - return nil, errors.New("ssh: padding not as expected") - } - } - - pk := ed25519.PrivateKey(make([]byte, ed25519.PrivateKeySize)) - copy(pk, key.Priv) - return &pk, nil - default: - return nil, errors.New("ssh: unhandled key type") - } -} - -// FingerprintLegacyMD5 returns the user presentation of the key's -// fingerprint as described by RFC 4716 section 4. -func FingerprintLegacyMD5(pubKey PublicKey) string { - md5sum := md5.Sum(pubKey.Marshal()) - hexarray := make([]string, len(md5sum)) - for i, c := range md5sum { - hexarray[i] = hex.EncodeToString([]byte{c}) - } - return strings.Join(hexarray, ":") -} - -// FingerprintSHA256 returns the user presentation of the key's -// fingerprint as unpadded base64 encoded sha256 hash. -// This format was introduced from OpenSSH 6.8. -// https://www.openssh.com/txt/release-6.8 -// https://tools.ietf.org/html/rfc4648#section-3.2 (unpadded base64 encoding) -func FingerprintSHA256(pubKey PublicKey) string { - sha256sum := sha256.Sum256(pubKey.Marshal()) - hash := base64.RawStdEncoding.EncodeToString(sha256sum[:]) - return "SHA256:" + hash -} diff --git a/vendor/golang.org/x/crypto/ssh/keys_test.go b/vendor/golang.org/x/crypto/ssh/keys_test.go deleted file mode 100644 index 9a90abc0..00000000 --- a/vendor/golang.org/x/crypto/ssh/keys_test.go +++ /dev/null @@ -1,500 +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 ssh - -import ( - "bytes" - "crypto/dsa" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rand" - "crypto/rsa" - "crypto/x509" - "encoding/base64" - "fmt" - "reflect" - "strings" - "testing" - - "golang.org/x/crypto/ed25519" - "golang.org/x/crypto/ssh/testdata" -) - -func rawKey(pub PublicKey) interface{} { - switch k := pub.(type) { - case *rsaPublicKey: - return (*rsa.PublicKey)(k) - case *dsaPublicKey: - return (*dsa.PublicKey)(k) - case *ecdsaPublicKey: - return (*ecdsa.PublicKey)(k) - case ed25519PublicKey: - return (ed25519.PublicKey)(k) - case *Certificate: - return k - } - panic("unknown key type") -} - -func TestKeyMarshalParse(t *testing.T) { - for _, priv := range testSigners { - pub := priv.PublicKey() - roundtrip, err := ParsePublicKey(pub.Marshal()) - if err != nil { - t.Errorf("ParsePublicKey(%T): %v", pub, err) - } - - k1 := rawKey(pub) - k2 := rawKey(roundtrip) - - if !reflect.DeepEqual(k1, k2) { - t.Errorf("got %#v in roundtrip, want %#v", k2, k1) - } - } -} - -func TestUnsupportedCurves(t *testing.T) { - raw, err := ecdsa.GenerateKey(elliptic.P224(), rand.Reader) - if err != nil { - t.Fatalf("GenerateKey: %v", err) - } - - if _, err = NewSignerFromKey(raw); err == nil || !strings.Contains(err.Error(), "only P-256") { - t.Fatalf("NewPrivateKey should not succeed with P-224, got: %v", err) - } - - if _, err = NewPublicKey(&raw.PublicKey); err == nil || !strings.Contains(err.Error(), "only P-256") { - t.Fatalf("NewPublicKey should not succeed with P-224, got: %v", err) - } -} - -func TestNewPublicKey(t *testing.T) { - for _, k := range testSigners { - raw := rawKey(k.PublicKey()) - // Skip certificates, as NewPublicKey does not support them. - if _, ok := raw.(*Certificate); ok { - continue - } - pub, err := NewPublicKey(raw) - if err != nil { - t.Errorf("NewPublicKey(%#v): %v", raw, err) - } - if !reflect.DeepEqual(k.PublicKey(), pub) { - t.Errorf("NewPublicKey(%#v) = %#v, want %#v", raw, pub, k.PublicKey()) - } - } -} - -func TestKeySignVerify(t *testing.T) { - for _, priv := range testSigners { - pub := priv.PublicKey() - - data := []byte("sign me") - sig, err := priv.Sign(rand.Reader, data) - if err != nil { - t.Fatalf("Sign(%T): %v", priv, err) - } - - if err := pub.Verify(data, sig); err != nil { - t.Errorf("publicKey.Verify(%T): %v", priv, err) - } - sig.Blob[5]++ - if err := pub.Verify(data, sig); err == nil { - t.Errorf("publicKey.Verify on broken sig did not fail") - } - } -} - -func TestParseRSAPrivateKey(t *testing.T) { - key := testPrivateKeys["rsa"] - - rsa, ok := key.(*rsa.PrivateKey) - if !ok { - t.Fatalf("got %T, want *rsa.PrivateKey", rsa) - } - - if err := rsa.Validate(); err != nil { - t.Errorf("Validate: %v", err) - } -} - -func TestParseECPrivateKey(t *testing.T) { - key := testPrivateKeys["ecdsa"] - - ecKey, ok := key.(*ecdsa.PrivateKey) - if !ok { - t.Fatalf("got %T, want *ecdsa.PrivateKey", ecKey) - } - - if !validateECPublicKey(ecKey.Curve, ecKey.X, ecKey.Y) { - t.Fatalf("public key does not validate.") - } -} - -// See Issue https://github.com/golang/go/issues/6650. -func TestParseEncryptedPrivateKeysFails(t *testing.T) { - const wantSubstring = "encrypted" - for i, tt := range testdata.PEMEncryptedKeys { - _, err := ParsePrivateKey(tt.PEMBytes) - if err == nil { - t.Errorf("#%d key %s: ParsePrivateKey successfully parsed, expected an error", i, tt.Name) - continue - } - - if !strings.Contains(err.Error(), wantSubstring) { - t.Errorf("#%d key %s: got error %q, want substring %q", i, tt.Name, err, wantSubstring) - } - } -} - -// Parse encrypted private keys with passphrase -func TestParseEncryptedPrivateKeysWithPassphrase(t *testing.T) { - data := []byte("sign me") - for _, tt := range testdata.PEMEncryptedKeys { - s, err := ParsePrivateKeyWithPassphrase(tt.PEMBytes, []byte(tt.EncryptionKey)) - if err != nil { - t.Fatalf("ParsePrivateKeyWithPassphrase returned error: %s", err) - continue - } - sig, err := s.Sign(rand.Reader, data) - if err != nil { - t.Fatalf("dsa.Sign: %v", err) - } - if err := s.PublicKey().Verify(data, sig); err != nil { - t.Errorf("Verify failed: %v", err) - } - } - - tt := testdata.PEMEncryptedKeys[0] - _, err := ParsePrivateKeyWithPassphrase(tt.PEMBytes, []byte("incorrect")) - if err != x509.IncorrectPasswordError { - t.Fatalf("got %v want IncorrectPasswordError", err) - } -} - -func TestParseDSA(t *testing.T) { - // We actually exercise the ParsePrivateKey codepath here, as opposed to - // using the ParseRawPrivateKey+NewSignerFromKey path that testdata_test.go - // uses. - s, err := ParsePrivateKey(testdata.PEMBytes["dsa"]) - if err != nil { - t.Fatalf("ParsePrivateKey returned error: %s", err) - } - - data := []byte("sign me") - sig, err := s.Sign(rand.Reader, data) - if err != nil { - t.Fatalf("dsa.Sign: %v", err) - } - - if err := s.PublicKey().Verify(data, sig); err != nil { - t.Errorf("Verify failed: %v", err) - } -} - -// Tests for authorized_keys parsing. - -// getTestKey returns a public key, and its base64 encoding. -func getTestKey() (PublicKey, string) { - k := testPublicKeys["rsa"] - - b := &bytes.Buffer{} - e := base64.NewEncoder(base64.StdEncoding, b) - e.Write(k.Marshal()) - e.Close() - - return k, b.String() -} - -func TestMarshalParsePublicKey(t *testing.T) { - pub, pubSerialized := getTestKey() - line := fmt.Sprintf("%s %s user@host", pub.Type(), pubSerialized) - - authKeys := MarshalAuthorizedKey(pub) - actualFields := strings.Fields(string(authKeys)) - if len(actualFields) == 0 { - t.Fatalf("failed authKeys: %v", authKeys) - } - - // drop the comment - expectedFields := strings.Fields(line)[0:2] - - if !reflect.DeepEqual(actualFields, expectedFields) { - t.Errorf("got %v, expected %v", actualFields, expectedFields) - } - - actPub, _, _, _, err := ParseAuthorizedKey([]byte(line)) - if err != nil { - t.Fatalf("cannot parse %v: %v", line, err) - } - if !reflect.DeepEqual(actPub, pub) { - t.Errorf("got %v, expected %v", actPub, pub) - } -} - -type testAuthResult struct { - pubKey PublicKey - options []string - comments string - rest string - ok bool -} - -func testAuthorizedKeys(t *testing.T, authKeys []byte, expected []testAuthResult) { - rest := authKeys - var values []testAuthResult - for len(rest) > 0 { - var r testAuthResult - var err error - r.pubKey, r.comments, r.options, rest, err = ParseAuthorizedKey(rest) - r.ok = (err == nil) - t.Log(err) - r.rest = string(rest) - values = append(values, r) - } - - if !reflect.DeepEqual(values, expected) { - t.Errorf("got %#v, expected %#v", values, expected) - } -} - -func TestAuthorizedKeyBasic(t *testing.T) { - pub, pubSerialized := getTestKey() - line := "ssh-rsa " + pubSerialized + " user@host" - testAuthorizedKeys(t, []byte(line), - []testAuthResult{ - {pub, nil, "user@host", "", true}, - }) -} - -func TestAuth(t *testing.T) { - pub, pubSerialized := getTestKey() - authWithOptions := []string{ - `# comments to ignore before any keys...`, - ``, - `env="HOME=/home/root",no-port-forwarding ssh-rsa ` + pubSerialized + ` user@host`, - `# comments to ignore, along with a blank line`, - ``, - `env="HOME=/home/root2" ssh-rsa ` + pubSerialized + ` user2@host2`, - ``, - `# more comments, plus a invalid entry`, - `ssh-rsa data-that-will-not-parse user@host3`, - } - for _, eol := range []string{"\n", "\r\n"} { - authOptions := strings.Join(authWithOptions, eol) - rest2 := strings.Join(authWithOptions[3:], eol) - rest3 := strings.Join(authWithOptions[6:], eol) - testAuthorizedKeys(t, []byte(authOptions), []testAuthResult{ - {pub, []string{`env="HOME=/home/root"`, "no-port-forwarding"}, "user@host", rest2, true}, - {pub, []string{`env="HOME=/home/root2"`}, "user2@host2", rest3, true}, - {nil, nil, "", "", false}, - }) - } -} - -func TestAuthWithQuotedSpaceInEnv(t *testing.T) { - pub, pubSerialized := getTestKey() - authWithQuotedSpaceInEnv := []byte(`env="HOME=/home/root dir",no-port-forwarding ssh-rsa ` + pubSerialized + ` user@host`) - testAuthorizedKeys(t, []byte(authWithQuotedSpaceInEnv), []testAuthResult{ - {pub, []string{`env="HOME=/home/root dir"`, "no-port-forwarding"}, "user@host", "", true}, - }) -} - -func TestAuthWithQuotedCommaInEnv(t *testing.T) { - pub, pubSerialized := getTestKey() - authWithQuotedCommaInEnv := []byte(`env="HOME=/home/root,dir",no-port-forwarding ssh-rsa ` + pubSerialized + ` user@host`) - testAuthorizedKeys(t, []byte(authWithQuotedCommaInEnv), []testAuthResult{ - {pub, []string{`env="HOME=/home/root,dir"`, "no-port-forwarding"}, "user@host", "", true}, - }) -} - -func TestAuthWithQuotedQuoteInEnv(t *testing.T) { - pub, pubSerialized := getTestKey() - authWithQuotedQuoteInEnv := []byte(`env="HOME=/home/\"root dir",no-port-forwarding` + "\t" + `ssh-rsa` + "\t" + pubSerialized + ` user@host`) - authWithDoubleQuotedQuote := []byte(`no-port-forwarding,env="HOME=/home/ \"root dir\"" ssh-rsa ` + pubSerialized + "\t" + `user@host`) - testAuthorizedKeys(t, []byte(authWithQuotedQuoteInEnv), []testAuthResult{ - {pub, []string{`env="HOME=/home/\"root dir"`, "no-port-forwarding"}, "user@host", "", true}, - }) - - testAuthorizedKeys(t, []byte(authWithDoubleQuotedQuote), []testAuthResult{ - {pub, []string{"no-port-forwarding", `env="HOME=/home/ \"root dir\""`}, "user@host", "", true}, - }) -} - -func TestAuthWithInvalidSpace(t *testing.T) { - _, pubSerialized := getTestKey() - authWithInvalidSpace := []byte(`env="HOME=/home/root dir", no-port-forwarding ssh-rsa ` + pubSerialized + ` user@host -#more to follow but still no valid keys`) - testAuthorizedKeys(t, []byte(authWithInvalidSpace), []testAuthResult{ - {nil, nil, "", "", false}, - }) -} - -func TestAuthWithMissingQuote(t *testing.T) { - pub, pubSerialized := getTestKey() - authWithMissingQuote := []byte(`env="HOME=/home/root,no-port-forwarding ssh-rsa ` + pubSerialized + ` user@host -env="HOME=/home/root",shared-control ssh-rsa ` + pubSerialized + ` user@host`) - - testAuthorizedKeys(t, []byte(authWithMissingQuote), []testAuthResult{ - {pub, []string{`env="HOME=/home/root"`, `shared-control`}, "user@host", "", true}, - }) -} - -func TestInvalidEntry(t *testing.T) { - authInvalid := []byte(`ssh-rsa`) - _, _, _, _, err := ParseAuthorizedKey(authInvalid) - if err == nil { - t.Errorf("got valid entry for %q", authInvalid) - } -} - -var knownHostsParseTests = []struct { - input string - err string - - marker string - comment string - hosts []string - rest string -}{ - { - "", - "EOF", - - "", "", nil, "", - }, - { - "# Just a comment", - "EOF", - - "", "", nil, "", - }, - { - " \t ", - "EOF", - - "", "", nil, "", - }, - { - "localhost ssh-rsa {RSAPUB}", - "", - - "", "", []string{"localhost"}, "", - }, - { - "localhost\tssh-rsa {RSAPUB}", - "", - - "", "", []string{"localhost"}, "", - }, - { - "localhost\tssh-rsa {RSAPUB}\tcomment comment", - "", - - "", "comment comment", []string{"localhost"}, "", - }, - { - "localhost\tssh-rsa {RSAPUB}\tcomment comment\n", - "", - - "", "comment comment", []string{"localhost"}, "", - }, - { - "localhost\tssh-rsa {RSAPUB}\tcomment comment\r\n", - "", - - "", "comment comment", []string{"localhost"}, "", - }, - { - "localhost\tssh-rsa {RSAPUB}\tcomment comment\r\nnext line", - "", - - "", "comment comment", []string{"localhost"}, "next line", - }, - { - "localhost,[host2:123]\tssh-rsa {RSAPUB}\tcomment comment", - "", - - "", "comment comment", []string{"localhost", "[host2:123]"}, "", - }, - { - "@marker \tlocalhost,[host2:123]\tssh-rsa {RSAPUB}", - "", - - "marker", "", []string{"localhost", "[host2:123]"}, "", - }, - { - "@marker \tlocalhost,[host2:123]\tssh-rsa aabbccdd", - "short read", - - "", "", nil, "", - }, -} - -func TestKnownHostsParsing(t *testing.T) { - rsaPub, rsaPubSerialized := getTestKey() - - for i, test := range knownHostsParseTests { - var expectedKey PublicKey - const rsaKeyToken = "{RSAPUB}" - - input := test.input - if strings.Contains(input, rsaKeyToken) { - expectedKey = rsaPub - input = strings.Replace(test.input, rsaKeyToken, rsaPubSerialized, -1) - } - - marker, hosts, pubKey, comment, rest, err := ParseKnownHosts([]byte(input)) - if err != nil { - if len(test.err) == 0 { - t.Errorf("#%d: unexpectedly failed with %q", i, err) - } else if !strings.Contains(err.Error(), test.err) { - t.Errorf("#%d: expected error containing %q, but got %q", i, test.err, err) - } - continue - } else if len(test.err) != 0 { - t.Errorf("#%d: succeeded but expected error including %q", i, test.err) - continue - } - - if !reflect.DeepEqual(expectedKey, pubKey) { - t.Errorf("#%d: expected key %#v, but got %#v", i, expectedKey, pubKey) - } - - if marker != test.marker { - t.Errorf("#%d: expected marker %q, but got %q", i, test.marker, marker) - } - - if comment != test.comment { - t.Errorf("#%d: expected comment %q, but got %q", i, test.comment, comment) - } - - if !reflect.DeepEqual(test.hosts, hosts) { - t.Errorf("#%d: expected hosts %#v, but got %#v", i, test.hosts, hosts) - } - - if rest := string(rest); rest != test.rest { - t.Errorf("#%d: expected remaining input to be %q, but got %q", i, test.rest, rest) - } - } -} - -func TestFingerprintLegacyMD5(t *testing.T) { - pub, _ := getTestKey() - fingerprint := FingerprintLegacyMD5(pub) - want := "fb:61:6d:1a:e3:f0:95:45:3c:a0:79:be:4a:93:63:66" // ssh-keygen -lf -E md5 rsa - if fingerprint != want { - t.Errorf("got fingerprint %q want %q", fingerprint, want) - } -} - -func TestFingerprintSHA256(t *testing.T) { - pub, _ := getTestKey() - fingerprint := FingerprintSHA256(pub) - want := "SHA256:Anr3LjZK8YVpjrxu79myrW9Hrb/wpcMNpVvTq/RcBm8" // ssh-keygen -lf rsa - if fingerprint != want { - t.Errorf("got fingerprint %q want %q", fingerprint, want) - } -} diff --git a/vendor/golang.org/x/crypto/ssh/mac.go b/vendor/golang.org/x/crypto/ssh/mac.go deleted file mode 100644 index c07a0628..00000000 --- a/vendor/golang.org/x/crypto/ssh/mac.go +++ /dev/null @@ -1,61 +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 ssh - -// Message authentication support - -import ( - "crypto/hmac" - "crypto/sha1" - "crypto/sha256" - "hash" -) - -type macMode struct { - keySize int - etm bool - new func(key []byte) hash.Hash -} - -// truncatingMAC wraps around a hash.Hash and truncates the output digest to -// a given size. -type truncatingMAC struct { - length int - hmac hash.Hash -} - -func (t truncatingMAC) Write(data []byte) (int, error) { - return t.hmac.Write(data) -} - -func (t truncatingMAC) Sum(in []byte) []byte { - out := t.hmac.Sum(in) - return out[:len(in)+t.length] -} - -func (t truncatingMAC) Reset() { - t.hmac.Reset() -} - -func (t truncatingMAC) Size() int { - return t.length -} - -func (t truncatingMAC) BlockSize() int { return t.hmac.BlockSize() } - -var macModes = map[string]*macMode{ - "hmac-sha2-256-etm@openssh.com": {32, true, func(key []byte) hash.Hash { - return hmac.New(sha256.New, key) - }}, - "hmac-sha2-256": {32, false, func(key []byte) hash.Hash { - return hmac.New(sha256.New, key) - }}, - "hmac-sha1": {20, false, func(key []byte) hash.Hash { - return hmac.New(sha1.New, key) - }}, - "hmac-sha1-96": {20, false, func(key []byte) hash.Hash { - return truncatingMAC{12, hmac.New(sha1.New, key)} - }}, -} diff --git a/vendor/golang.org/x/crypto/ssh/mempipe_test.go b/vendor/golang.org/x/crypto/ssh/mempipe_test.go deleted file mode 100644 index 8697cd61..00000000 --- a/vendor/golang.org/x/crypto/ssh/mempipe_test.go +++ /dev/null @@ -1,110 +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 ssh - -import ( - "io" - "sync" - "testing" -) - -// An in-memory packetConn. It is safe to call Close and writePacket -// from different goroutines. -type memTransport struct { - eof bool - pending [][]byte - write *memTransport - sync.Mutex - *sync.Cond -} - -func (t *memTransport) readPacket() ([]byte, error) { - t.Lock() - defer t.Unlock() - for { - if len(t.pending) > 0 { - r := t.pending[0] - t.pending = t.pending[1:] - return r, nil - } - if t.eof { - return nil, io.EOF - } - t.Cond.Wait() - } -} - -func (t *memTransport) closeSelf() error { - t.Lock() - defer t.Unlock() - if t.eof { - return io.EOF - } - t.eof = true - t.Cond.Broadcast() - return nil -} - -func (t *memTransport) Close() error { - err := t.write.closeSelf() - t.closeSelf() - return err -} - -func (t *memTransport) writePacket(p []byte) error { - t.write.Lock() - defer t.write.Unlock() - if t.write.eof { - return io.EOF - } - c := make([]byte, len(p)) - copy(c, p) - t.write.pending = append(t.write.pending, c) - t.write.Cond.Signal() - return nil -} - -func memPipe() (a, b packetConn) { - t1 := memTransport{} - t2 := memTransport{} - t1.write = &t2 - t2.write = &t1 - t1.Cond = sync.NewCond(&t1.Mutex) - t2.Cond = sync.NewCond(&t2.Mutex) - return &t1, &t2 -} - -func TestMemPipe(t *testing.T) { - a, b := memPipe() - if err := a.writePacket([]byte{42}); err != nil { - t.Fatalf("writePacket: %v", err) - } - if err := a.Close(); err != nil { - t.Fatal("Close: ", err) - } - p, err := b.readPacket() - if err != nil { - t.Fatal("readPacket: ", err) - } - if len(p) != 1 || p[0] != 42 { - t.Fatalf("got %v, want {42}", p) - } - p, err = b.readPacket() - if err != io.EOF { - t.Fatalf("got %v, %v, want EOF", p, err) - } -} - -func TestDoubleClose(t *testing.T) { - a, _ := memPipe() - err := a.Close() - if err != nil { - t.Errorf("Close: %v", err) - } - err = a.Close() - if err != io.EOF { - t.Errorf("expect EOF on double close.") - } -} diff --git a/vendor/golang.org/x/crypto/ssh/messages.go b/vendor/golang.org/x/crypto/ssh/messages.go deleted file mode 100644 index 08d28117..00000000 --- a/vendor/golang.org/x/crypto/ssh/messages.go +++ /dev/null @@ -1,766 +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 ssh - -import ( - "bytes" - "encoding/binary" - "errors" - "fmt" - "io" - "math/big" - "reflect" - "strconv" - "strings" -) - -// These are SSH message type numbers. They are scattered around several -// documents but many were taken from [SSH-PARAMETERS]. -const ( - msgIgnore = 2 - msgUnimplemented = 3 - msgDebug = 4 - msgNewKeys = 21 -) - -// SSH messages: -// -// These structures mirror the wire format of the corresponding SSH messages. -// They are marshaled using reflection with the marshal and unmarshal functions -// in this file. The only wrinkle is that a final member of type []byte with a -// ssh tag of "rest" receives the remainder of a packet when unmarshaling. - -// See RFC 4253, section 11.1. -const msgDisconnect = 1 - -// disconnectMsg is the message that signals a disconnect. It is also -// the error type returned from mux.Wait() -type disconnectMsg struct { - Reason uint32 `sshtype:"1"` - Message string - Language string -} - -func (d *disconnectMsg) Error() string { - return fmt.Sprintf("ssh: disconnect, reason %d: %s", d.Reason, d.Message) -} - -// See RFC 4253, section 7.1. -const msgKexInit = 20 - -type kexInitMsg struct { - Cookie [16]byte `sshtype:"20"` - KexAlgos []string - ServerHostKeyAlgos []string - CiphersClientServer []string - CiphersServerClient []string - MACsClientServer []string - MACsServerClient []string - CompressionClientServer []string - CompressionServerClient []string - LanguagesClientServer []string - LanguagesServerClient []string - FirstKexFollows bool - Reserved uint32 -} - -// See RFC 4253, section 8. - -// Diffie-Helman -const msgKexDHInit = 30 - -type kexDHInitMsg struct { - X *big.Int `sshtype:"30"` -} - -const msgKexECDHInit = 30 - -type kexECDHInitMsg struct { - ClientPubKey []byte `sshtype:"30"` -} - -const msgKexECDHReply = 31 - -type kexECDHReplyMsg struct { - HostKey []byte `sshtype:"31"` - EphemeralPubKey []byte - Signature []byte -} - -const msgKexDHReply = 31 - -type kexDHReplyMsg struct { - HostKey []byte `sshtype:"31"` - Y *big.Int - Signature []byte -} - -// See RFC 4253, section 10. -const msgServiceRequest = 5 - -type serviceRequestMsg struct { - Service string `sshtype:"5"` -} - -// See RFC 4253, section 10. -const msgServiceAccept = 6 - -type serviceAcceptMsg struct { - Service string `sshtype:"6"` -} - -// See RFC 4252, section 5. -const msgUserAuthRequest = 50 - -type userAuthRequestMsg struct { - User string `sshtype:"50"` - Service string - Method string - Payload []byte `ssh:"rest"` -} - -// Used for debug printouts of packets. -type userAuthSuccessMsg struct { -} - -// See RFC 4252, section 5.1 -const msgUserAuthFailure = 51 - -type userAuthFailureMsg struct { - Methods []string `sshtype:"51"` - PartialSuccess bool -} - -// See RFC 4252, section 5.1 -const msgUserAuthSuccess = 52 - -// See RFC 4252, section 5.4 -const msgUserAuthBanner = 53 - -type userAuthBannerMsg struct { - Message string `sshtype:"53"` - // unused, but required to allow message parsing - Language string -} - -// See RFC 4256, section 3.2 -const msgUserAuthInfoRequest = 60 -const msgUserAuthInfoResponse = 61 - -type userAuthInfoRequestMsg struct { - User string `sshtype:"60"` - Instruction string - DeprecatedLanguage string - NumPrompts uint32 - Prompts []byte `ssh:"rest"` -} - -// See RFC 4254, section 5.1. -const msgChannelOpen = 90 - -type channelOpenMsg struct { - ChanType string `sshtype:"90"` - PeersID uint32 - PeersWindow uint32 - MaxPacketSize uint32 - TypeSpecificData []byte `ssh:"rest"` -} - -const msgChannelExtendedData = 95 -const msgChannelData = 94 - -// Used for debug print outs of packets. -type channelDataMsg struct { - PeersID uint32 `sshtype:"94"` - Length uint32 - Rest []byte `ssh:"rest"` -} - -// See RFC 4254, section 5.1. -const msgChannelOpenConfirm = 91 - -type channelOpenConfirmMsg struct { - PeersID uint32 `sshtype:"91"` - MyID uint32 - MyWindow uint32 - MaxPacketSize uint32 - TypeSpecificData []byte `ssh:"rest"` -} - -// See RFC 4254, section 5.1. -const msgChannelOpenFailure = 92 - -type channelOpenFailureMsg struct { - PeersID uint32 `sshtype:"92"` - Reason RejectionReason - Message string - Language string -} - -const msgChannelRequest = 98 - -type channelRequestMsg struct { - PeersID uint32 `sshtype:"98"` - Request string - WantReply bool - RequestSpecificData []byte `ssh:"rest"` -} - -// See RFC 4254, section 5.4. -const msgChannelSuccess = 99 - -type channelRequestSuccessMsg struct { - PeersID uint32 `sshtype:"99"` -} - -// See RFC 4254, section 5.4. -const msgChannelFailure = 100 - -type channelRequestFailureMsg struct { - PeersID uint32 `sshtype:"100"` -} - -// See RFC 4254, section 5.3 -const msgChannelClose = 97 - -type channelCloseMsg struct { - PeersID uint32 `sshtype:"97"` -} - -// See RFC 4254, section 5.3 -const msgChannelEOF = 96 - -type channelEOFMsg struct { - PeersID uint32 `sshtype:"96"` -} - -// See RFC 4254, section 4 -const msgGlobalRequest = 80 - -type globalRequestMsg struct { - Type string `sshtype:"80"` - WantReply bool - Data []byte `ssh:"rest"` -} - -// See RFC 4254, section 4 -const msgRequestSuccess = 81 - -type globalRequestSuccessMsg struct { - Data []byte `ssh:"rest" sshtype:"81"` -} - -// See RFC 4254, section 4 -const msgRequestFailure = 82 - -type globalRequestFailureMsg struct { - Data []byte `ssh:"rest" sshtype:"82"` -} - -// See RFC 4254, section 5.2 -const msgChannelWindowAdjust = 93 - -type windowAdjustMsg struct { - PeersID uint32 `sshtype:"93"` - AdditionalBytes uint32 -} - -// See RFC 4252, section 7 -const msgUserAuthPubKeyOk = 60 - -type userAuthPubKeyOkMsg struct { - Algo string `sshtype:"60"` - PubKey []byte -} - -// typeTags returns the possible type bytes for the given reflect.Type, which -// should be a struct. The possible values are separated by a '|' character. -func typeTags(structType reflect.Type) (tags []byte) { - tagStr := structType.Field(0).Tag.Get("sshtype") - - for _, tag := range strings.Split(tagStr, "|") { - i, err := strconv.Atoi(tag) - if err == nil { - tags = append(tags, byte(i)) - } - } - - return tags -} - -func fieldError(t reflect.Type, field int, problem string) error { - if problem != "" { - problem = ": " + problem - } - return fmt.Errorf("ssh: unmarshal error for field %s of type %s%s", t.Field(field).Name, t.Name(), problem) -} - -var errShortRead = errors.New("ssh: short read") - -// Unmarshal parses data in SSH wire format into a structure. The out -// argument should be a pointer to struct. If the first member of the -// struct has the "sshtype" tag set to a '|'-separated set of numbers -// in decimal, the packet must start with one of those numbers. In -// case of error, Unmarshal returns a ParseError or -// UnexpectedMessageError. -func Unmarshal(data []byte, out interface{}) error { - v := reflect.ValueOf(out).Elem() - structType := v.Type() - expectedTypes := typeTags(structType) - - var expectedType byte - if len(expectedTypes) > 0 { - expectedType = expectedTypes[0] - } - - if len(data) == 0 { - return parseError(expectedType) - } - - if len(expectedTypes) > 0 { - goodType := false - for _, e := range expectedTypes { - if e > 0 && data[0] == e { - goodType = true - break - } - } - if !goodType { - return fmt.Errorf("ssh: unexpected message type %d (expected one of %v)", data[0], expectedTypes) - } - data = data[1:] - } - - var ok bool - for i := 0; i < v.NumField(); i++ { - field := v.Field(i) - t := field.Type() - switch t.Kind() { - case reflect.Bool: - if len(data) < 1 { - return errShortRead - } - field.SetBool(data[0] != 0) - data = data[1:] - case reflect.Array: - if t.Elem().Kind() != reflect.Uint8 { - return fieldError(structType, i, "array of unsupported type") - } - if len(data) < t.Len() { - return errShortRead - } - for j, n := 0, t.Len(); j < n; j++ { - field.Index(j).Set(reflect.ValueOf(data[j])) - } - data = data[t.Len():] - case reflect.Uint64: - var u64 uint64 - if u64, data, ok = parseUint64(data); !ok { - return errShortRead - } - field.SetUint(u64) - case reflect.Uint32: - var u32 uint32 - if u32, data, ok = parseUint32(data); !ok { - return errShortRead - } - field.SetUint(uint64(u32)) - case reflect.Uint8: - if len(data) < 1 { - return errShortRead - } - field.SetUint(uint64(data[0])) - data = data[1:] - case reflect.String: - var s []byte - if s, data, ok = parseString(data); !ok { - return fieldError(structType, i, "") - } - field.SetString(string(s)) - case reflect.Slice: - switch t.Elem().Kind() { - case reflect.Uint8: - if structType.Field(i).Tag.Get("ssh") == "rest" { - field.Set(reflect.ValueOf(data)) - data = nil - } else { - var s []byte - if s, data, ok = parseString(data); !ok { - return errShortRead - } - field.Set(reflect.ValueOf(s)) - } - case reflect.String: - var nl []string - if nl, data, ok = parseNameList(data); !ok { - return errShortRead - } - field.Set(reflect.ValueOf(nl)) - default: - return fieldError(structType, i, "slice of unsupported type") - } - case reflect.Ptr: - if t == bigIntType { - var n *big.Int - if n, data, ok = parseInt(data); !ok { - return errShortRead - } - field.Set(reflect.ValueOf(n)) - } else { - return fieldError(structType, i, "pointer to unsupported type") - } - default: - return fieldError(structType, i, fmt.Sprintf("unsupported type: %v", t)) - } - } - - if len(data) != 0 { - return parseError(expectedType) - } - - return nil -} - -// Marshal serializes the message in msg to SSH wire format. The msg -// argument should be a struct or pointer to struct. If the first -// member has the "sshtype" tag set to a number in decimal, that -// number is prepended to the result. If the last of member has the -// "ssh" tag set to "rest", its contents are appended to the output. -func Marshal(msg interface{}) []byte { - out := make([]byte, 0, 64) - return marshalStruct(out, msg) -} - -func marshalStruct(out []byte, msg interface{}) []byte { - v := reflect.Indirect(reflect.ValueOf(msg)) - msgTypes := typeTags(v.Type()) - if len(msgTypes) > 0 { - out = append(out, msgTypes[0]) - } - - for i, n := 0, v.NumField(); i < n; i++ { - field := v.Field(i) - switch t := field.Type(); t.Kind() { - case reflect.Bool: - var v uint8 - if field.Bool() { - v = 1 - } - out = append(out, v) - case reflect.Array: - if t.Elem().Kind() != reflect.Uint8 { - panic(fmt.Sprintf("array of non-uint8 in field %d: %T", i, field.Interface())) - } - for j, l := 0, t.Len(); j < l; j++ { - out = append(out, uint8(field.Index(j).Uint())) - } - case reflect.Uint32: - out = appendU32(out, uint32(field.Uint())) - case reflect.Uint64: - out = appendU64(out, uint64(field.Uint())) - case reflect.Uint8: - out = append(out, uint8(field.Uint())) - case reflect.String: - s := field.String() - out = appendInt(out, len(s)) - out = append(out, s...) - case reflect.Slice: - switch t.Elem().Kind() { - case reflect.Uint8: - if v.Type().Field(i).Tag.Get("ssh") != "rest" { - out = appendInt(out, field.Len()) - } - out = append(out, field.Bytes()...) - case reflect.String: - offset := len(out) - out = appendU32(out, 0) - if n := field.Len(); n > 0 { - for j := 0; j < n; j++ { - f := field.Index(j) - if j != 0 { - out = append(out, ',') - } - out = append(out, f.String()...) - } - // overwrite length value - binary.BigEndian.PutUint32(out[offset:], uint32(len(out)-offset-4)) - } - default: - panic(fmt.Sprintf("slice of unknown type in field %d: %T", i, field.Interface())) - } - case reflect.Ptr: - if t == bigIntType { - var n *big.Int - nValue := reflect.ValueOf(&n) - nValue.Elem().Set(field) - needed := intLength(n) - oldLength := len(out) - - if cap(out)-len(out) < needed { - newOut := make([]byte, len(out), 2*(len(out)+needed)) - copy(newOut, out) - out = newOut - } - out = out[:oldLength+needed] - marshalInt(out[oldLength:], n) - } else { - panic(fmt.Sprintf("pointer to unknown type in field %d: %T", i, field.Interface())) - } - } - } - - return out -} - -var bigOne = big.NewInt(1) - -func parseString(in []byte) (out, rest []byte, ok bool) { - if len(in) < 4 { - return - } - length := binary.BigEndian.Uint32(in) - in = in[4:] - if uint32(len(in)) < length { - return - } - out = in[:length] - rest = in[length:] - ok = true - return -} - -var ( - comma = []byte{','} - emptyNameList = []string{} -) - -func parseNameList(in []byte) (out []string, rest []byte, ok bool) { - contents, rest, ok := parseString(in) - if !ok { - return - } - if len(contents) == 0 { - out = emptyNameList - return - } - parts := bytes.Split(contents, comma) - out = make([]string, len(parts)) - for i, part := range parts { - out[i] = string(part) - } - return -} - -func parseInt(in []byte) (out *big.Int, rest []byte, ok bool) { - contents, rest, ok := parseString(in) - if !ok { - return - } - out = new(big.Int) - - if len(contents) > 0 && contents[0]&0x80 == 0x80 { - // This is a negative number - notBytes := make([]byte, len(contents)) - for i := range notBytes { - notBytes[i] = ^contents[i] - } - out.SetBytes(notBytes) - out.Add(out, bigOne) - out.Neg(out) - } else { - // Positive number - out.SetBytes(contents) - } - ok = true - return -} - -func parseUint32(in []byte) (uint32, []byte, bool) { - if len(in) < 4 { - return 0, nil, false - } - return binary.BigEndian.Uint32(in), in[4:], true -} - -func parseUint64(in []byte) (uint64, []byte, bool) { - if len(in) < 8 { - return 0, nil, false - } - return binary.BigEndian.Uint64(in), in[8:], true -} - -func intLength(n *big.Int) int { - length := 4 /* length bytes */ - if n.Sign() < 0 { - nMinus1 := new(big.Int).Neg(n) - nMinus1.Sub(nMinus1, bigOne) - bitLen := nMinus1.BitLen() - if bitLen%8 == 0 { - // The number will need 0xff padding - length++ - } - length += (bitLen + 7) / 8 - } else if n.Sign() == 0 { - // A zero is the zero length string - } else { - bitLen := n.BitLen() - if bitLen%8 == 0 { - // The number will need 0x00 padding - length++ - } - length += (bitLen + 7) / 8 - } - - return length -} - -func marshalUint32(to []byte, n uint32) []byte { - binary.BigEndian.PutUint32(to, n) - return to[4:] -} - -func marshalUint64(to []byte, n uint64) []byte { - binary.BigEndian.PutUint64(to, n) - return to[8:] -} - -func marshalInt(to []byte, n *big.Int) []byte { - lengthBytes := to - to = to[4:] - length := 0 - - if n.Sign() < 0 { - // A negative number has to be converted to two's-complement - // form. So we'll subtract 1 and invert. If the - // most-significant-bit isn't set then we'll need to pad the - // beginning with 0xff in order to keep the number negative. - nMinus1 := new(big.Int).Neg(n) - nMinus1.Sub(nMinus1, bigOne) - bytes := nMinus1.Bytes() - for i := range bytes { - bytes[i] ^= 0xff - } - if len(bytes) == 0 || bytes[0]&0x80 == 0 { - to[0] = 0xff - to = to[1:] - length++ - } - nBytes := copy(to, bytes) - to = to[nBytes:] - length += nBytes - } else if n.Sign() == 0 { - // A zero is the zero length string - } else { - bytes := n.Bytes() - if len(bytes) > 0 && bytes[0]&0x80 != 0 { - // We'll have to pad this with a 0x00 in order to - // stop it looking like a negative number. - to[0] = 0 - to = to[1:] - length++ - } - nBytes := copy(to, bytes) - to = to[nBytes:] - length += nBytes - } - - lengthBytes[0] = byte(length >> 24) - lengthBytes[1] = byte(length >> 16) - lengthBytes[2] = byte(length >> 8) - lengthBytes[3] = byte(length) - return to -} - -func writeInt(w io.Writer, n *big.Int) { - length := intLength(n) - buf := make([]byte, length) - marshalInt(buf, n) - w.Write(buf) -} - -func writeString(w io.Writer, s []byte) { - var lengthBytes [4]byte - lengthBytes[0] = byte(len(s) >> 24) - lengthBytes[1] = byte(len(s) >> 16) - lengthBytes[2] = byte(len(s) >> 8) - lengthBytes[3] = byte(len(s)) - w.Write(lengthBytes[:]) - w.Write(s) -} - -func stringLength(n int) int { - return 4 + n -} - -func marshalString(to []byte, s []byte) []byte { - to[0] = byte(len(s) >> 24) - to[1] = byte(len(s) >> 16) - to[2] = byte(len(s) >> 8) - to[3] = byte(len(s)) - to = to[4:] - copy(to, s) - return to[len(s):] -} - -var bigIntType = reflect.TypeOf((*big.Int)(nil)) - -// Decode a packet into its corresponding message. -func decode(packet []byte) (interface{}, error) { - var msg interface{} - switch packet[0] { - case msgDisconnect: - msg = new(disconnectMsg) - case msgServiceRequest: - msg = new(serviceRequestMsg) - case msgServiceAccept: - msg = new(serviceAcceptMsg) - case msgKexInit: - msg = new(kexInitMsg) - case msgKexDHInit: - msg = new(kexDHInitMsg) - case msgKexDHReply: - msg = new(kexDHReplyMsg) - case msgUserAuthRequest: - msg = new(userAuthRequestMsg) - case msgUserAuthSuccess: - return new(userAuthSuccessMsg), nil - case msgUserAuthFailure: - msg = new(userAuthFailureMsg) - case msgUserAuthPubKeyOk: - msg = new(userAuthPubKeyOkMsg) - case msgGlobalRequest: - msg = new(globalRequestMsg) - case msgRequestSuccess: - msg = new(globalRequestSuccessMsg) - case msgRequestFailure: - msg = new(globalRequestFailureMsg) - case msgChannelOpen: - msg = new(channelOpenMsg) - case msgChannelData: - msg = new(channelDataMsg) - case msgChannelOpenConfirm: - msg = new(channelOpenConfirmMsg) - case msgChannelOpenFailure: - msg = new(channelOpenFailureMsg) - case msgChannelWindowAdjust: - msg = new(windowAdjustMsg) - case msgChannelEOF: - msg = new(channelEOFMsg) - case msgChannelClose: - msg = new(channelCloseMsg) - case msgChannelRequest: - msg = new(channelRequestMsg) - case msgChannelSuccess: - msg = new(channelRequestSuccessMsg) - case msgChannelFailure: - msg = new(channelRequestFailureMsg) - default: - return nil, unexpectedMessageError(0, packet[0]) - } - if err := Unmarshal(packet, msg); err != nil { - return nil, err - } - return msg, nil -} diff --git a/vendor/golang.org/x/crypto/ssh/messages_test.go b/vendor/golang.org/x/crypto/ssh/messages_test.go deleted file mode 100644 index e7907641..00000000 --- a/vendor/golang.org/x/crypto/ssh/messages_test.go +++ /dev/null @@ -1,288 +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 ssh - -import ( - "bytes" - "math/big" - "math/rand" - "reflect" - "testing" - "testing/quick" -) - -var intLengthTests = []struct { - val, length int -}{ - {0, 4 + 0}, - {1, 4 + 1}, - {127, 4 + 1}, - {128, 4 + 2}, - {-1, 4 + 1}, -} - -func TestIntLength(t *testing.T) { - for _, test := range intLengthTests { - v := new(big.Int).SetInt64(int64(test.val)) - length := intLength(v) - if length != test.length { - t.Errorf("For %d, got length %d but expected %d", test.val, length, test.length) - } - } -} - -type msgAllTypes struct { - Bool bool `sshtype:"21"` - Array [16]byte - Uint64 uint64 - Uint32 uint32 - Uint8 uint8 - String string - Strings []string - Bytes []byte - Int *big.Int - Rest []byte `ssh:"rest"` -} - -func (t *msgAllTypes) Generate(rand *rand.Rand, size int) reflect.Value { - m := &msgAllTypes{} - m.Bool = rand.Intn(2) == 1 - randomBytes(m.Array[:], rand) - m.Uint64 = uint64(rand.Int63n(1<<63 - 1)) - m.Uint32 = uint32(rand.Intn((1 << 31) - 1)) - m.Uint8 = uint8(rand.Intn(1 << 8)) - m.String = string(m.Array[:]) - m.Strings = randomNameList(rand) - m.Bytes = m.Array[:] - m.Int = randomInt(rand) - m.Rest = m.Array[:] - return reflect.ValueOf(m) -} - -func TestMarshalUnmarshal(t *testing.T) { - rand := rand.New(rand.NewSource(0)) - iface := &msgAllTypes{} - ty := reflect.ValueOf(iface).Type() - - n := 100 - if testing.Short() { - n = 5 - } - for j := 0; j < n; j++ { - v, ok := quick.Value(ty, rand) - if !ok { - t.Errorf("failed to create value") - break - } - - m1 := v.Elem().Interface() - m2 := iface - - marshaled := Marshal(m1) - if err := Unmarshal(marshaled, m2); err != nil { - t.Errorf("Unmarshal %#v: %s", m1, err) - break - } - - if !reflect.DeepEqual(v.Interface(), m2) { - t.Errorf("got: %#v\nwant:%#v\n%x", m2, m1, marshaled) - break - } - } -} - -func TestUnmarshalEmptyPacket(t *testing.T) { - var b []byte - var m channelRequestSuccessMsg - if err := Unmarshal(b, &m); err == nil { - t.Fatalf("unmarshal of empty slice succeeded") - } -} - -func TestUnmarshalUnexpectedPacket(t *testing.T) { - type S struct { - I uint32 `sshtype:"43"` - S string - B bool - } - - s := S{11, "hello", true} - packet := Marshal(s) - packet[0] = 42 - roundtrip := S{} - err := Unmarshal(packet, &roundtrip) - if err == nil { - t.Fatal("expected error, not nil") - } -} - -func TestMarshalPtr(t *testing.T) { - s := struct { - S string - }{"hello"} - - m1 := Marshal(s) - m2 := Marshal(&s) - if !bytes.Equal(m1, m2) { - t.Errorf("got %q, want %q for marshaled pointer", m2, m1) - } -} - -func TestBareMarshalUnmarshal(t *testing.T) { - type S struct { - I uint32 - S string - B bool - } - - s := S{42, "hello", true} - packet := Marshal(s) - roundtrip := S{} - Unmarshal(packet, &roundtrip) - - if !reflect.DeepEqual(s, roundtrip) { - t.Errorf("got %#v, want %#v", roundtrip, s) - } -} - -func TestBareMarshal(t *testing.T) { - type S2 struct { - I uint32 - } - s := S2{42} - packet := Marshal(s) - i, rest, ok := parseUint32(packet) - if len(rest) > 0 || !ok { - t.Errorf("parseInt(%q): parse error", packet) - } - if i != s.I { - t.Errorf("got %d, want %d", i, s.I) - } -} - -func TestUnmarshalShortKexInitPacket(t *testing.T) { - // This used to panic. - // Issue 11348 - packet := []byte{0x14, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xff, 0xff, 0xff, 0xff} - kim := &kexInitMsg{} - if err := Unmarshal(packet, kim); err == nil { - t.Error("truncated packet unmarshaled without error") - } -} - -func TestMarshalMultiTag(t *testing.T) { - var res struct { - A uint32 `sshtype:"1|2"` - } - - good1 := struct { - A uint32 `sshtype:"1"` - }{ - 1, - } - good2 := struct { - A uint32 `sshtype:"2"` - }{ - 1, - } - - if e := Unmarshal(Marshal(good1), &res); e != nil { - t.Errorf("error unmarshaling multipart tag: %v", e) - } - - if e := Unmarshal(Marshal(good2), &res); e != nil { - t.Errorf("error unmarshaling multipart tag: %v", e) - } - - bad1 := struct { - A uint32 `sshtype:"3"` - }{ - 1, - } - if e := Unmarshal(Marshal(bad1), &res); e == nil { - t.Errorf("bad struct unmarshaled without error") - } -} - -func randomBytes(out []byte, rand *rand.Rand) { - for i := 0; i < len(out); i++ { - out[i] = byte(rand.Int31()) - } -} - -func randomNameList(rand *rand.Rand) []string { - ret := make([]string, rand.Int31()&15) - for i := range ret { - s := make([]byte, 1+(rand.Int31()&15)) - for j := range s { - s[j] = 'a' + uint8(rand.Int31()&15) - } - ret[i] = string(s) - } - return ret -} - -func randomInt(rand *rand.Rand) *big.Int { - return new(big.Int).SetInt64(int64(int32(rand.Uint32()))) -} - -func (*kexInitMsg) Generate(rand *rand.Rand, size int) reflect.Value { - ki := &kexInitMsg{} - randomBytes(ki.Cookie[:], rand) - ki.KexAlgos = randomNameList(rand) - ki.ServerHostKeyAlgos = randomNameList(rand) - ki.CiphersClientServer = randomNameList(rand) - ki.CiphersServerClient = randomNameList(rand) - ki.MACsClientServer = randomNameList(rand) - ki.MACsServerClient = randomNameList(rand) - ki.CompressionClientServer = randomNameList(rand) - ki.CompressionServerClient = randomNameList(rand) - ki.LanguagesClientServer = randomNameList(rand) - ki.LanguagesServerClient = randomNameList(rand) - if rand.Int31()&1 == 1 { - ki.FirstKexFollows = true - } - return reflect.ValueOf(ki) -} - -func (*kexDHInitMsg) Generate(rand *rand.Rand, size int) reflect.Value { - dhi := &kexDHInitMsg{} - dhi.X = randomInt(rand) - return reflect.ValueOf(dhi) -} - -var ( - _kexInitMsg = new(kexInitMsg).Generate(rand.New(rand.NewSource(0)), 10).Elem().Interface() - _kexDHInitMsg = new(kexDHInitMsg).Generate(rand.New(rand.NewSource(0)), 10).Elem().Interface() - - _kexInit = Marshal(_kexInitMsg) - _kexDHInit = Marshal(_kexDHInitMsg) -) - -func BenchmarkMarshalKexInitMsg(b *testing.B) { - for i := 0; i < b.N; i++ { - Marshal(_kexInitMsg) - } -} - -func BenchmarkUnmarshalKexInitMsg(b *testing.B) { - m := new(kexInitMsg) - for i := 0; i < b.N; i++ { - Unmarshal(_kexInit, m) - } -} - -func BenchmarkMarshalKexDHInitMsg(b *testing.B) { - for i := 0; i < b.N; i++ { - Marshal(_kexDHInitMsg) - } -} - -func BenchmarkUnmarshalKexDHInitMsg(b *testing.B) { - m := new(kexDHInitMsg) - for i := 0; i < b.N; i++ { - Unmarshal(_kexDHInit, m) - } -} diff --git a/vendor/golang.org/x/crypto/ssh/mux.go b/vendor/golang.org/x/crypto/ssh/mux.go deleted file mode 100644 index f1901627..00000000 --- a/vendor/golang.org/x/crypto/ssh/mux.go +++ /dev/null @@ -1,330 +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 ssh - -import ( - "encoding/binary" - "fmt" - "io" - "log" - "sync" - "sync/atomic" -) - -// debugMux, if set, causes messages in the connection protocol to be -// logged. -const debugMux = false - -// chanList is a thread safe channel list. -type chanList struct { - // protects concurrent access to chans - sync.Mutex - - // chans are indexed by the local id of the channel, which the - // other side should send in the PeersId field. - chans []*channel - - // This is a debugging aid: it offsets all IDs by this - // amount. This helps distinguish otherwise identical - // server/client muxes - offset uint32 -} - -// Assigns a channel ID to the given channel. -func (c *chanList) add(ch *channel) uint32 { - c.Lock() - defer c.Unlock() - for i := range c.chans { - if c.chans[i] == nil { - c.chans[i] = ch - return uint32(i) + c.offset - } - } - c.chans = append(c.chans, ch) - return uint32(len(c.chans)-1) + c.offset -} - -// getChan returns the channel for the given ID. -func (c *chanList) getChan(id uint32) *channel { - id -= c.offset - - c.Lock() - defer c.Unlock() - if id < uint32(len(c.chans)) { - return c.chans[id] - } - return nil -} - -func (c *chanList) remove(id uint32) { - id -= c.offset - c.Lock() - if id < uint32(len(c.chans)) { - c.chans[id] = nil - } - c.Unlock() -} - -// dropAll forgets all channels it knows, returning them in a slice. -func (c *chanList) dropAll() []*channel { - c.Lock() - defer c.Unlock() - var r []*channel - - for _, ch := range c.chans { - if ch == nil { - continue - } - r = append(r, ch) - } - c.chans = nil - return r -} - -// mux represents the state for the SSH connection protocol, which -// multiplexes many channels onto a single packet transport. -type mux struct { - conn packetConn - chanList chanList - - incomingChannels chan NewChannel - - globalSentMu sync.Mutex - globalResponses chan interface{} - incomingRequests chan *Request - - errCond *sync.Cond - err error -} - -// When debugging, each new chanList instantiation has a different -// offset. -var globalOff uint32 - -func (m *mux) Wait() error { - m.errCond.L.Lock() - defer m.errCond.L.Unlock() - for m.err == nil { - m.errCond.Wait() - } - return m.err -} - -// newMux returns a mux that runs over the given connection. -func newMux(p packetConn) *mux { - m := &mux{ - conn: p, - incomingChannels: make(chan NewChannel, chanSize), - globalResponses: make(chan interface{}, 1), - incomingRequests: make(chan *Request, chanSize), - errCond: newCond(), - } - if debugMux { - m.chanList.offset = atomic.AddUint32(&globalOff, 1) - } - - go m.loop() - return m -} - -func (m *mux) sendMessage(msg interface{}) error { - p := Marshal(msg) - if debugMux { - log.Printf("send global(%d): %#v", m.chanList.offset, msg) - } - return m.conn.writePacket(p) -} - -func (m *mux) SendRequest(name string, wantReply bool, payload []byte) (bool, []byte, error) { - if wantReply { - m.globalSentMu.Lock() - defer m.globalSentMu.Unlock() - } - - if err := m.sendMessage(globalRequestMsg{ - Type: name, - WantReply: wantReply, - Data: payload, - }); err != nil { - return false, nil, err - } - - if !wantReply { - return false, nil, nil - } - - msg, ok := <-m.globalResponses - if !ok { - return false, nil, io.EOF - } - switch msg := msg.(type) { - case *globalRequestFailureMsg: - return false, msg.Data, nil - case *globalRequestSuccessMsg: - return true, msg.Data, nil - default: - return false, nil, fmt.Errorf("ssh: unexpected response to request: %#v", msg) - } -} - -// ackRequest must be called after processing a global request that -// has WantReply set. -func (m *mux) ackRequest(ok bool, data []byte) error { - if ok { - return m.sendMessage(globalRequestSuccessMsg{Data: data}) - } - return m.sendMessage(globalRequestFailureMsg{Data: data}) -} - -func (m *mux) Close() error { - return m.conn.Close() -} - -// loop runs the connection machine. It will process packets until an -// error is encountered. To synchronize on loop exit, use mux.Wait. -func (m *mux) loop() { - var err error - for err == nil { - err = m.onePacket() - } - - for _, ch := range m.chanList.dropAll() { - ch.close() - } - - close(m.incomingChannels) - close(m.incomingRequests) - close(m.globalResponses) - - m.conn.Close() - - m.errCond.L.Lock() - m.err = err - m.errCond.Broadcast() - m.errCond.L.Unlock() - - if debugMux { - log.Println("loop exit", err) - } -} - -// onePacket reads and processes one packet. -func (m *mux) onePacket() error { - packet, err := m.conn.readPacket() - if err != nil { - return err - } - - if debugMux { - if packet[0] == msgChannelData || packet[0] == msgChannelExtendedData { - log.Printf("decoding(%d): data packet - %d bytes", m.chanList.offset, len(packet)) - } else { - p, _ := decode(packet) - log.Printf("decoding(%d): %d %#v - %d bytes", m.chanList.offset, packet[0], p, len(packet)) - } - } - - switch packet[0] { - case msgChannelOpen: - return m.handleChannelOpen(packet) - case msgGlobalRequest, msgRequestSuccess, msgRequestFailure: - return m.handleGlobalPacket(packet) - } - - // assume a channel packet. - if len(packet) < 5 { - return parseError(packet[0]) - } - id := binary.BigEndian.Uint32(packet[1:]) - ch := m.chanList.getChan(id) - if ch == nil { - return fmt.Errorf("ssh: invalid channel %d", id) - } - - return ch.handlePacket(packet) -} - -func (m *mux) handleGlobalPacket(packet []byte) error { - msg, err := decode(packet) - if err != nil { - return err - } - - switch msg := msg.(type) { - case *globalRequestMsg: - m.incomingRequests <- &Request{ - Type: msg.Type, - WantReply: msg.WantReply, - Payload: msg.Data, - mux: m, - } - case *globalRequestSuccessMsg, *globalRequestFailureMsg: - m.globalResponses <- msg - default: - panic(fmt.Sprintf("not a global message %#v", msg)) - } - - return nil -} - -// handleChannelOpen schedules a channel to be Accept()ed. -func (m *mux) handleChannelOpen(packet []byte) error { - var msg channelOpenMsg - if err := Unmarshal(packet, &msg); err != nil { - return err - } - - if msg.MaxPacketSize < minPacketLength || msg.MaxPacketSize > 1<<31 { - failMsg := channelOpenFailureMsg{ - PeersID: msg.PeersID, - Reason: ConnectionFailed, - Message: "invalid request", - Language: "en_US.UTF-8", - } - return m.sendMessage(failMsg) - } - - c := m.newChannel(msg.ChanType, channelInbound, msg.TypeSpecificData) - c.remoteId = msg.PeersID - c.maxRemotePayload = msg.MaxPacketSize - c.remoteWin.add(msg.PeersWindow) - m.incomingChannels <- c - return nil -} - -func (m *mux) OpenChannel(chanType string, extra []byte) (Channel, <-chan *Request, error) { - ch, err := m.openChannel(chanType, extra) - if err != nil { - return nil, nil, err - } - - return ch, ch.incomingRequests, nil -} - -func (m *mux) openChannel(chanType string, extra []byte) (*channel, error) { - ch := m.newChannel(chanType, channelOutbound, extra) - - ch.maxIncomingPayload = channelMaxPacket - - open := channelOpenMsg{ - ChanType: chanType, - PeersWindow: ch.myWindow, - MaxPacketSize: ch.maxIncomingPayload, - TypeSpecificData: extra, - PeersID: ch.localId, - } - if err := m.sendMessage(open); err != nil { - return nil, err - } - - switch msg := (<-ch.msg).(type) { - case *channelOpenConfirmMsg: - return ch, nil - case *channelOpenFailureMsg: - return nil, &OpenChannelError{msg.Reason, msg.Message} - default: - return nil, fmt.Errorf("ssh: unexpected packet in response to channel open: %T", msg) - } -} diff --git a/vendor/golang.org/x/crypto/ssh/mux_test.go b/vendor/golang.org/x/crypto/ssh/mux_test.go deleted file mode 100644 index d88b64e4..00000000 --- a/vendor/golang.org/x/crypto/ssh/mux_test.go +++ /dev/null @@ -1,501 +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 ssh - -import ( - "io" - "io/ioutil" - "sync" - "testing" -) - -func muxPair() (*mux, *mux) { - a, b := memPipe() - - s := newMux(a) - c := newMux(b) - - return s, c -} - -// Returns both ends of a channel, and the mux for the the 2nd -// channel. -func channelPair(t *testing.T) (*channel, *channel, *mux) { - c, s := muxPair() - - res := make(chan *channel, 1) - go func() { - newCh, ok := <-s.incomingChannels - if !ok { - t.Fatalf("No incoming channel") - } - if newCh.ChannelType() != "chan" { - t.Fatalf("got type %q want chan", newCh.ChannelType()) - } - ch, _, err := newCh.Accept() - if err != nil { - t.Fatalf("Accept %v", err) - } - res <- ch.(*channel) - }() - - ch, err := c.openChannel("chan", nil) - if err != nil { - t.Fatalf("OpenChannel: %v", err) - } - - return <-res, ch, c -} - -// Test that stderr and stdout can be addressed from different -// goroutines. This is intended for use with the race detector. -func TestMuxChannelExtendedThreadSafety(t *testing.T) { - writer, reader, mux := channelPair(t) - defer writer.Close() - defer reader.Close() - defer mux.Close() - - var wr, rd sync.WaitGroup - magic := "hello world" - - wr.Add(2) - go func() { - io.WriteString(writer, magic) - wr.Done() - }() - go func() { - io.WriteString(writer.Stderr(), magic) - wr.Done() - }() - - rd.Add(2) - go func() { - c, err := ioutil.ReadAll(reader) - if string(c) != magic { - t.Fatalf("stdout read got %q, want %q (error %s)", c, magic, err) - } - rd.Done() - }() - go func() { - c, err := ioutil.ReadAll(reader.Stderr()) - if string(c) != magic { - t.Fatalf("stderr read got %q, want %q (error %s)", c, magic, err) - } - rd.Done() - }() - - wr.Wait() - writer.CloseWrite() - rd.Wait() -} - -func TestMuxReadWrite(t *testing.T) { - s, c, mux := channelPair(t) - defer s.Close() - defer c.Close() - defer mux.Close() - - magic := "hello world" - magicExt := "hello stderr" - go func() { - _, err := s.Write([]byte(magic)) - if err != nil { - t.Fatalf("Write: %v", err) - } - _, err = s.Extended(1).Write([]byte(magicExt)) - if err != nil { - t.Fatalf("Write: %v", err) - } - }() - - var buf [1024]byte - n, err := c.Read(buf[:]) - if err != nil { - t.Fatalf("server Read: %v", err) - } - got := string(buf[:n]) - if got != magic { - t.Fatalf("server: got %q want %q", got, magic) - } - - n, err = c.Extended(1).Read(buf[:]) - if err != nil { - t.Fatalf("server Read: %v", err) - } - - got = string(buf[:n]) - if got != magicExt { - t.Fatalf("server: got %q want %q", got, magic) - } -} - -func TestMuxChannelOverflow(t *testing.T) { - reader, writer, mux := channelPair(t) - defer reader.Close() - defer writer.Close() - defer mux.Close() - - wDone := make(chan int, 1) - go func() { - if _, err := writer.Write(make([]byte, channelWindowSize)); err != nil { - t.Errorf("could not fill window: %v", err) - } - writer.Write(make([]byte, 1)) - wDone <- 1 - }() - writer.remoteWin.waitWriterBlocked() - - // Send 1 byte. - packet := make([]byte, 1+4+4+1) - packet[0] = msgChannelData - marshalUint32(packet[1:], writer.remoteId) - marshalUint32(packet[5:], uint32(1)) - packet[9] = 42 - - if err := writer.mux.conn.writePacket(packet); err != nil { - t.Errorf("could not send packet") - } - if _, err := reader.SendRequest("hello", true, nil); err == nil { - t.Errorf("SendRequest succeeded.") - } - <-wDone -} - -func TestMuxChannelCloseWriteUnblock(t *testing.T) { - reader, writer, mux := channelPair(t) - defer reader.Close() - defer writer.Close() - defer mux.Close() - - wDone := make(chan int, 1) - go func() { - if _, err := writer.Write(make([]byte, channelWindowSize)); err != nil { - t.Errorf("could not fill window: %v", err) - } - if _, err := writer.Write(make([]byte, 1)); err != io.EOF { - t.Errorf("got %v, want EOF for unblock write", err) - } - wDone <- 1 - }() - - writer.remoteWin.waitWriterBlocked() - reader.Close() - <-wDone -} - -func TestMuxConnectionCloseWriteUnblock(t *testing.T) { - reader, writer, mux := channelPair(t) - defer reader.Close() - defer writer.Close() - defer mux.Close() - - wDone := make(chan int, 1) - go func() { - if _, err := writer.Write(make([]byte, channelWindowSize)); err != nil { - t.Errorf("could not fill window: %v", err) - } - if _, err := writer.Write(make([]byte, 1)); err != io.EOF { - t.Errorf("got %v, want EOF for unblock write", err) - } - wDone <- 1 - }() - - writer.remoteWin.waitWriterBlocked() - mux.Close() - <-wDone -} - -func TestMuxReject(t *testing.T) { - client, server := muxPair() - defer server.Close() - defer client.Close() - - go func() { - ch, ok := <-server.incomingChannels - if !ok { - t.Fatalf("Accept") - } - if ch.ChannelType() != "ch" || string(ch.ExtraData()) != "extra" { - t.Fatalf("unexpected channel: %q, %q", ch.ChannelType(), ch.ExtraData()) - } - ch.Reject(RejectionReason(42), "message") - }() - - ch, err := client.openChannel("ch", []byte("extra")) - if ch != nil { - t.Fatal("openChannel not rejected") - } - - ocf, ok := err.(*OpenChannelError) - if !ok { - t.Errorf("got %#v want *OpenChannelError", err) - } else if ocf.Reason != 42 || ocf.Message != "message" { - t.Errorf("got %#v, want {Reason: 42, Message: %q}", ocf, "message") - } - - want := "ssh: rejected: unknown reason 42 (message)" - if err.Error() != want { - t.Errorf("got %q, want %q", err.Error(), want) - } -} - -func TestMuxChannelRequest(t *testing.T) { - client, server, mux := channelPair(t) - defer server.Close() - defer client.Close() - defer mux.Close() - - var received int - var wg sync.WaitGroup - wg.Add(1) - go func() { - for r := range server.incomingRequests { - received++ - r.Reply(r.Type == "yes", nil) - } - wg.Done() - }() - _, err := client.SendRequest("yes", false, nil) - if err != nil { - t.Fatalf("SendRequest: %v", err) - } - ok, err := client.SendRequest("yes", true, nil) - if err != nil { - t.Fatalf("SendRequest: %v", err) - } - - if !ok { - t.Errorf("SendRequest(yes): %v", ok) - - } - - ok, err = client.SendRequest("no", true, nil) - if err != nil { - t.Fatalf("SendRequest: %v", err) - } - if ok { - t.Errorf("SendRequest(no): %v", ok) - - } - - client.Close() - wg.Wait() - - if received != 3 { - t.Errorf("got %d requests, want %d", received, 3) - } -} - -func TestMuxGlobalRequest(t *testing.T) { - clientMux, serverMux := muxPair() - defer serverMux.Close() - defer clientMux.Close() - - var seen bool - go func() { - for r := range serverMux.incomingRequests { - seen = seen || r.Type == "peek" - if r.WantReply { - err := r.Reply(r.Type == "yes", - append([]byte(r.Type), r.Payload...)) - if err != nil { - t.Errorf("AckRequest: %v", err) - } - } - } - }() - - _, _, err := clientMux.SendRequest("peek", false, nil) - if err != nil { - t.Errorf("SendRequest: %v", err) - } - - ok, data, err := clientMux.SendRequest("yes", true, []byte("a")) - if !ok || string(data) != "yesa" || err != nil { - t.Errorf("SendRequest(\"yes\", true, \"a\"): %v %v %v", - ok, data, err) - } - if ok, data, err := clientMux.SendRequest("yes", true, []byte("a")); !ok || string(data) != "yesa" || err != nil { - t.Errorf("SendRequest(\"yes\", true, \"a\"): %v %v %v", - ok, data, err) - } - - if ok, data, err := clientMux.SendRequest("no", true, []byte("a")); ok || string(data) != "noa" || err != nil { - t.Errorf("SendRequest(\"no\", true, \"a\"): %v %v %v", - ok, data, err) - } - - if !seen { - t.Errorf("never saw 'peek' request") - } -} - -func TestMuxGlobalRequestUnblock(t *testing.T) { - clientMux, serverMux := muxPair() - defer serverMux.Close() - defer clientMux.Close() - - result := make(chan error, 1) - go func() { - _, _, err := clientMux.SendRequest("hello", true, nil) - result <- err - }() - - <-serverMux.incomingRequests - serverMux.conn.Close() - err := <-result - - if err != io.EOF { - t.Errorf("want EOF, got %v", io.EOF) - } -} - -func TestMuxChannelRequestUnblock(t *testing.T) { - a, b, connB := channelPair(t) - defer a.Close() - defer b.Close() - defer connB.Close() - - result := make(chan error, 1) - go func() { - _, err := a.SendRequest("hello", true, nil) - result <- err - }() - - <-b.incomingRequests - connB.conn.Close() - err := <-result - - if err != io.EOF { - t.Errorf("want EOF, got %v", err) - } -} - -func TestMuxCloseChannel(t *testing.T) { - r, w, mux := channelPair(t) - defer mux.Close() - defer r.Close() - defer w.Close() - - result := make(chan error, 1) - go func() { - var b [1024]byte - _, err := r.Read(b[:]) - result <- err - }() - if err := w.Close(); err != nil { - t.Errorf("w.Close: %v", err) - } - - if _, err := w.Write([]byte("hello")); err != io.EOF { - t.Errorf("got err %v, want io.EOF after Close", err) - } - - if err := <-result; err != io.EOF { - t.Errorf("got %v (%T), want io.EOF", err, err) - } -} - -func TestMuxCloseWriteChannel(t *testing.T) { - r, w, mux := channelPair(t) - defer mux.Close() - - result := make(chan error, 1) - go func() { - var b [1024]byte - _, err := r.Read(b[:]) - result <- err - }() - if err := w.CloseWrite(); err != nil { - t.Errorf("w.CloseWrite: %v", err) - } - - if _, err := w.Write([]byte("hello")); err != io.EOF { - t.Errorf("got err %v, want io.EOF after CloseWrite", err) - } - - if err := <-result; err != io.EOF { - t.Errorf("got %v (%T), want io.EOF", err, err) - } -} - -func TestMuxInvalidRecord(t *testing.T) { - a, b := muxPair() - defer a.Close() - defer b.Close() - - packet := make([]byte, 1+4+4+1) - packet[0] = msgChannelData - marshalUint32(packet[1:], 29348723 /* invalid channel id */) - marshalUint32(packet[5:], 1) - packet[9] = 42 - - a.conn.writePacket(packet) - go a.SendRequest("hello", false, nil) - // 'a' wrote an invalid packet, so 'b' has exited. - req, ok := <-b.incomingRequests - if ok { - t.Errorf("got request %#v after receiving invalid packet", req) - } -} - -func TestZeroWindowAdjust(t *testing.T) { - a, b, mux := channelPair(t) - defer a.Close() - defer b.Close() - defer mux.Close() - - go func() { - io.WriteString(a, "hello") - // bogus adjust. - a.sendMessage(windowAdjustMsg{}) - io.WriteString(a, "world") - a.Close() - }() - - want := "helloworld" - c, _ := ioutil.ReadAll(b) - if string(c) != want { - t.Errorf("got %q want %q", c, want) - } -} - -func TestMuxMaxPacketSize(t *testing.T) { - a, b, mux := channelPair(t) - defer a.Close() - defer b.Close() - defer mux.Close() - - large := make([]byte, a.maxRemotePayload+1) - packet := make([]byte, 1+4+4+1+len(large)) - packet[0] = msgChannelData - marshalUint32(packet[1:], a.remoteId) - marshalUint32(packet[5:], uint32(len(large))) - packet[9] = 42 - - if err := a.mux.conn.writePacket(packet); err != nil { - t.Errorf("could not send packet") - } - - go a.SendRequest("hello", false, nil) - - _, ok := <-b.incomingRequests - if ok { - t.Errorf("connection still alive after receiving large packet.") - } -} - -// Don't ship code with debug=true. -func TestDebug(t *testing.T) { - if debugMux { - t.Error("mux debug switched on") - } - if debugHandshake { - t.Error("handshake debug switched on") - } - if debugTransport { - t.Error("transport debug switched on") - } -} diff --git a/vendor/golang.org/x/crypto/ssh/server.go b/vendor/golang.org/x/crypto/ssh/server.go deleted file mode 100644 index d0f48253..00000000 --- a/vendor/golang.org/x/crypto/ssh/server.go +++ /dev/null @@ -1,593 +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 ssh - -import ( - "bytes" - "errors" - "fmt" - "io" - "net" - "strings" -) - -// The Permissions type holds fine-grained permissions that are -// specific to a user or a specific authentication method for a user. -// The Permissions value for a successful authentication attempt is -// available in ServerConn, so it can be used to pass information from -// the user-authentication phase to the application layer. -type Permissions struct { - // CriticalOptions indicate restrictions to the default - // permissions, and are typically used in conjunction with - // user certificates. The standard for SSH certificates - // defines "force-command" (only allow the given command to - // execute) and "source-address" (only allow connections from - // the given address). The SSH package currently only enforces - // the "source-address" critical option. It is up to server - // implementations to enforce other critical options, such as - // "force-command", by checking them after the SSH handshake - // is successful. In general, SSH servers should reject - // connections that specify critical options that are unknown - // or not supported. - CriticalOptions map[string]string - - // Extensions are extra functionality that the server may - // offer on authenticated connections. Lack of support for an - // extension does not preclude authenticating a user. Common - // extensions are "permit-agent-forwarding", - // "permit-X11-forwarding". The Go SSH library currently does - // not act on any extension, and it is up to server - // implementations to honor them. Extensions can be used to - // pass data from the authentication callbacks to the server - // application layer. - Extensions map[string]string -} - -// ServerConfig holds server specific configuration data. -type ServerConfig struct { - // Config contains configuration shared between client and server. - Config - - hostKeys []Signer - - // NoClientAuth is true if clients are allowed to connect without - // authenticating. - NoClientAuth bool - - // MaxAuthTries specifies the maximum number of authentication attempts - // permitted per connection. If set to a negative number, the number of - // attempts are unlimited. If set to zero, the number of attempts are limited - // to 6. - MaxAuthTries int - - // PasswordCallback, if non-nil, is called when a user - // attempts to authenticate using a password. - PasswordCallback func(conn ConnMetadata, password []byte) (*Permissions, error) - - // PublicKeyCallback, if non-nil, is called when a client - // offers a public key for authentication. It must return a nil error - // if the given public key can be used to authenticate the - // given user. For example, see CertChecker.Authenticate. A - // call to this function does not guarantee that the key - // offered is in fact used to authenticate. To record any data - // depending on the public key, store it inside a - // Permissions.Extensions entry. - PublicKeyCallback func(conn ConnMetadata, key PublicKey) (*Permissions, error) - - // KeyboardInteractiveCallback, if non-nil, is called when - // keyboard-interactive authentication is selected (RFC - // 4256). The client object's Challenge function should be - // used to query the user. The callback may offer multiple - // Challenge rounds. To avoid information leaks, the client - // should be presented a challenge even if the user is - // unknown. - KeyboardInteractiveCallback func(conn ConnMetadata, client KeyboardInteractiveChallenge) (*Permissions, error) - - // AuthLogCallback, if non-nil, is called to log all authentication - // attempts. - AuthLogCallback func(conn ConnMetadata, method string, err error) - - // ServerVersion is the version identification string to announce in - // the public handshake. - // If empty, a reasonable default is used. - // Note that RFC 4253 section 4.2 requires that this string start with - // "SSH-2.0-". - ServerVersion string - - // BannerCallback, if present, is called and the return string is sent to - // the client after key exchange completed but before authentication. - BannerCallback func(conn ConnMetadata) string -} - -// AddHostKey adds a private key as a host key. If an existing host -// key exists with the same algorithm, it is overwritten. Each server -// config must have at least one host key. -func (s *ServerConfig) AddHostKey(key Signer) { - for i, k := range s.hostKeys { - if k.PublicKey().Type() == key.PublicKey().Type() { - s.hostKeys[i] = key - return - } - } - - s.hostKeys = append(s.hostKeys, key) -} - -// cachedPubKey contains the results of querying whether a public key is -// acceptable for a user. -type cachedPubKey struct { - user string - pubKeyData []byte - result error - perms *Permissions -} - -const maxCachedPubKeys = 16 - -// pubKeyCache caches tests for public keys. Since SSH clients -// will query whether a public key is acceptable before attempting to -// authenticate with it, we end up with duplicate queries for public -// key validity. The cache only applies to a single ServerConn. -type pubKeyCache struct { - keys []cachedPubKey -} - -// get returns the result for a given user/algo/key tuple. -func (c *pubKeyCache) get(user string, pubKeyData []byte) (cachedPubKey, bool) { - for _, k := range c.keys { - if k.user == user && bytes.Equal(k.pubKeyData, pubKeyData) { - return k, true - } - } - return cachedPubKey{}, false -} - -// add adds the given tuple to the cache. -func (c *pubKeyCache) add(candidate cachedPubKey) { - if len(c.keys) < maxCachedPubKeys { - c.keys = append(c.keys, candidate) - } -} - -// ServerConn is an authenticated SSH connection, as seen from the -// server -type ServerConn struct { - Conn - - // If the succeeding authentication callback returned a - // non-nil Permissions pointer, it is stored here. - Permissions *Permissions -} - -// NewServerConn starts a new SSH server with c as the underlying -// transport. It starts with a handshake and, if the handshake is -// unsuccessful, it closes the connection and returns an error. The -// Request and NewChannel channels must be serviced, or the connection -// will hang. -// -// The returned error may be of type *ServerAuthError for -// authentication errors. -func NewServerConn(c net.Conn, config *ServerConfig) (*ServerConn, <-chan NewChannel, <-chan *Request, error) { - fullConf := *config - fullConf.SetDefaults() - if fullConf.MaxAuthTries == 0 { - fullConf.MaxAuthTries = 6 - } - - s := &connection{ - sshConn: sshConn{conn: c}, - } - perms, err := s.serverHandshake(&fullConf) - if err != nil { - c.Close() - return nil, nil, nil, err - } - return &ServerConn{s, perms}, s.mux.incomingChannels, s.mux.incomingRequests, nil -} - -// signAndMarshal signs the data with the appropriate algorithm, -// and serializes the result in SSH wire format. -func signAndMarshal(k Signer, rand io.Reader, data []byte) ([]byte, error) { - sig, err := k.Sign(rand, data) - if err != nil { - return nil, err - } - - return Marshal(sig), nil -} - -// handshake performs key exchange and user authentication. -func (s *connection) serverHandshake(config *ServerConfig) (*Permissions, error) { - if len(config.hostKeys) == 0 { - return nil, errors.New("ssh: server has no host keys") - } - - if !config.NoClientAuth && config.PasswordCallback == nil && config.PublicKeyCallback == nil && config.KeyboardInteractiveCallback == nil { - return nil, errors.New("ssh: no authentication methods configured but NoClientAuth is also false") - } - - if config.ServerVersion != "" { - s.serverVersion = []byte(config.ServerVersion) - } else { - s.serverVersion = []byte(packageVersion) - } - var err error - s.clientVersion, err = exchangeVersions(s.sshConn.conn, s.serverVersion) - if err != nil { - return nil, err - } - - tr := newTransport(s.sshConn.conn, config.Rand, false /* not client */) - s.transport = newServerTransport(tr, s.clientVersion, s.serverVersion, config) - - if err := s.transport.waitSession(); err != nil { - return nil, err - } - - // We just did the key change, so the session ID is established. - s.sessionID = s.transport.getSessionID() - - var packet []byte - if packet, err = s.transport.readPacket(); err != nil { - return nil, err - } - - var serviceRequest serviceRequestMsg - if err = Unmarshal(packet, &serviceRequest); err != nil { - return nil, err - } - if serviceRequest.Service != serviceUserAuth { - return nil, errors.New("ssh: requested service '" + serviceRequest.Service + "' before authenticating") - } - serviceAccept := serviceAcceptMsg{ - Service: serviceUserAuth, - } - if err := s.transport.writePacket(Marshal(&serviceAccept)); err != nil { - return nil, err - } - - perms, err := s.serverAuthenticate(config) - if err != nil { - return nil, err - } - s.mux = newMux(s.transport) - return perms, err -} - -func isAcceptableAlgo(algo string) bool { - switch algo { - case KeyAlgoRSA, KeyAlgoDSA, KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521, KeyAlgoED25519, - CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, CertAlgoECDSA384v01, CertAlgoECDSA521v01, CertAlgoED25519v01: - return true - } - return false -} - -func checkSourceAddress(addr net.Addr, sourceAddrs string) error { - if addr == nil { - return errors.New("ssh: no address known for client, but source-address match required") - } - - tcpAddr, ok := addr.(*net.TCPAddr) - if !ok { - return fmt.Errorf("ssh: remote address %v is not an TCP address when checking source-address match", addr) - } - - for _, sourceAddr := range strings.Split(sourceAddrs, ",") { - if allowedIP := net.ParseIP(sourceAddr); allowedIP != nil { - if allowedIP.Equal(tcpAddr.IP) { - return nil - } - } else { - _, ipNet, err := net.ParseCIDR(sourceAddr) - if err != nil { - return fmt.Errorf("ssh: error parsing source-address restriction %q: %v", sourceAddr, err) - } - - if ipNet.Contains(tcpAddr.IP) { - return nil - } - } - } - - return fmt.Errorf("ssh: remote address %v is not allowed because of source-address restriction", addr) -} - -// ServerAuthError represents server authentication errors and is -// sometimes returned by NewServerConn. It appends any authentication -// errors that may occur, and is returned if all of the authentication -// methods provided by the user failed to authenticate. -type ServerAuthError struct { - // Errors contains authentication errors returned by the authentication - // callback methods. The first entry is typically ErrNoAuth. - Errors []error -} - -func (l ServerAuthError) Error() string { - var errs []string - for _, err := range l.Errors { - errs = append(errs, err.Error()) - } - return "[" + strings.Join(errs, ", ") + "]" -} - -// ErrNoAuth is the error value returned if no -// authentication method has been passed yet. This happens as a normal -// part of the authentication loop, since the client first tries -// 'none' authentication to discover available methods. -// It is returned in ServerAuthError.Errors from NewServerConn. -var ErrNoAuth = errors.New("ssh: no auth passed yet") - -func (s *connection) serverAuthenticate(config *ServerConfig) (*Permissions, error) { - sessionID := s.transport.getSessionID() - var cache pubKeyCache - var perms *Permissions - - authFailures := 0 - var authErrs []error - var displayedBanner bool - -userAuthLoop: - for { - if authFailures >= config.MaxAuthTries && config.MaxAuthTries > 0 { - discMsg := &disconnectMsg{ - Reason: 2, - Message: "too many authentication failures", - } - - if err := s.transport.writePacket(Marshal(discMsg)); err != nil { - return nil, err - } - - return nil, discMsg - } - - var userAuthReq userAuthRequestMsg - if packet, err := s.transport.readPacket(); err != nil { - if err == io.EOF { - return nil, &ServerAuthError{Errors: authErrs} - } - return nil, err - } else if err = Unmarshal(packet, &userAuthReq); err != nil { - return nil, err - } - - if userAuthReq.Service != serviceSSH { - return nil, errors.New("ssh: client attempted to negotiate for unknown service: " + userAuthReq.Service) - } - - s.user = userAuthReq.User - - if !displayedBanner && config.BannerCallback != nil { - displayedBanner = true - msg := config.BannerCallback(s) - if msg != "" { - bannerMsg := &userAuthBannerMsg{ - Message: msg, - } - if err := s.transport.writePacket(Marshal(bannerMsg)); err != nil { - return nil, err - } - } - } - - perms = nil - authErr := ErrNoAuth - - switch userAuthReq.Method { - case "none": - if config.NoClientAuth { - authErr = nil - } - - // allow initial attempt of 'none' without penalty - if authFailures == 0 { - authFailures-- - } - case "password": - if config.PasswordCallback == nil { - authErr = errors.New("ssh: password auth not configured") - break - } - payload := userAuthReq.Payload - if len(payload) < 1 || payload[0] != 0 { - return nil, parseError(msgUserAuthRequest) - } - payload = payload[1:] - password, payload, ok := parseString(payload) - if !ok || len(payload) > 0 { - return nil, parseError(msgUserAuthRequest) - } - - perms, authErr = config.PasswordCallback(s, password) - case "keyboard-interactive": - if config.KeyboardInteractiveCallback == nil { - authErr = errors.New("ssh: keyboard-interactive auth not configubred") - break - } - - prompter := &sshClientKeyboardInteractive{s} - perms, authErr = config.KeyboardInteractiveCallback(s, prompter.Challenge) - case "publickey": - if config.PublicKeyCallback == nil { - authErr = errors.New("ssh: publickey auth not configured") - break - } - payload := userAuthReq.Payload - if len(payload) < 1 { - return nil, parseError(msgUserAuthRequest) - } - isQuery := payload[0] == 0 - payload = payload[1:] - algoBytes, payload, ok := parseString(payload) - if !ok { - return nil, parseError(msgUserAuthRequest) - } - algo := string(algoBytes) - if !isAcceptableAlgo(algo) { - authErr = fmt.Errorf("ssh: algorithm %q not accepted", algo) - break - } - - pubKeyData, payload, ok := parseString(payload) - if !ok { - return nil, parseError(msgUserAuthRequest) - } - - pubKey, err := ParsePublicKey(pubKeyData) - if err != nil { - return nil, err - } - - candidate, ok := cache.get(s.user, pubKeyData) - if !ok { - candidate.user = s.user - candidate.pubKeyData = pubKeyData - candidate.perms, candidate.result = config.PublicKeyCallback(s, pubKey) - if candidate.result == nil && candidate.perms != nil && candidate.perms.CriticalOptions != nil && candidate.perms.CriticalOptions[sourceAddressCriticalOption] != "" { - candidate.result = checkSourceAddress( - s.RemoteAddr(), - candidate.perms.CriticalOptions[sourceAddressCriticalOption]) - } - cache.add(candidate) - } - - if isQuery { - // The client can query if the given public key - // would be okay. - - if len(payload) > 0 { - return nil, parseError(msgUserAuthRequest) - } - - if candidate.result == nil { - okMsg := userAuthPubKeyOkMsg{ - Algo: algo, - PubKey: pubKeyData, - } - if err = s.transport.writePacket(Marshal(&okMsg)); err != nil { - return nil, err - } - continue userAuthLoop - } - authErr = candidate.result - } else { - sig, payload, ok := parseSignature(payload) - if !ok || len(payload) > 0 { - return nil, parseError(msgUserAuthRequest) - } - // Ensure the public key algo and signature algo - // are supported. Compare the private key - // algorithm name that corresponds to algo with - // sig.Format. This is usually the same, but - // for certs, the names differ. - if !isAcceptableAlgo(sig.Format) { - break - } - signedData := buildDataSignedForAuth(sessionID, userAuthReq, algoBytes, pubKeyData) - - if err := pubKey.Verify(signedData, sig); err != nil { - return nil, err - } - - authErr = candidate.result - perms = candidate.perms - } - default: - authErr = fmt.Errorf("ssh: unknown method %q", userAuthReq.Method) - } - - authErrs = append(authErrs, authErr) - - if config.AuthLogCallback != nil { - config.AuthLogCallback(s, userAuthReq.Method, authErr) - } - - if authErr == nil { - break userAuthLoop - } - - authFailures++ - - var failureMsg userAuthFailureMsg - if config.PasswordCallback != nil { - failureMsg.Methods = append(failureMsg.Methods, "password") - } - if config.PublicKeyCallback != nil { - failureMsg.Methods = append(failureMsg.Methods, "publickey") - } - if config.KeyboardInteractiveCallback != nil { - failureMsg.Methods = append(failureMsg.Methods, "keyboard-interactive") - } - - if len(failureMsg.Methods) == 0 { - return nil, errors.New("ssh: no authentication methods configured but NoClientAuth is also false") - } - - if err := s.transport.writePacket(Marshal(&failureMsg)); err != nil { - return nil, err - } - } - - if err := s.transport.writePacket([]byte{msgUserAuthSuccess}); err != nil { - return nil, err - } - return perms, nil -} - -// sshClientKeyboardInteractive implements a ClientKeyboardInteractive by -// asking the client on the other side of a ServerConn. -type sshClientKeyboardInteractive struct { - *connection -} - -func (c *sshClientKeyboardInteractive) Challenge(user, instruction string, questions []string, echos []bool) (answers []string, err error) { - if len(questions) != len(echos) { - return nil, errors.New("ssh: echos and questions must have equal length") - } - - var prompts []byte - for i := range questions { - prompts = appendString(prompts, questions[i]) - prompts = appendBool(prompts, echos[i]) - } - - if err := c.transport.writePacket(Marshal(&userAuthInfoRequestMsg{ - Instruction: instruction, - NumPrompts: uint32(len(questions)), - Prompts: prompts, - })); err != nil { - return nil, err - } - - packet, err := c.transport.readPacket() - if err != nil { - return nil, err - } - if packet[0] != msgUserAuthInfoResponse { - return nil, unexpectedMessageError(msgUserAuthInfoResponse, packet[0]) - } - packet = packet[1:] - - n, packet, ok := parseUint32(packet) - if !ok || int(n) != len(questions) { - return nil, parseError(msgUserAuthInfoResponse) - } - - for i := uint32(0); i < n; i++ { - ans, rest, ok := parseString(packet) - if !ok { - return nil, parseError(msgUserAuthInfoResponse) - } - - answers = append(answers, string(ans)) - packet = rest - } - if len(packet) != 0 { - return nil, errors.New("ssh: junk at end of message") - } - - return answers, nil -} diff --git a/vendor/golang.org/x/crypto/ssh/session.go b/vendor/golang.org/x/crypto/ssh/session.go deleted file mode 100644 index d3321f6b..00000000 --- a/vendor/golang.org/x/crypto/ssh/session.go +++ /dev/null @@ -1,647 +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 ssh - -// Session implements an interactive session described in -// "RFC 4254, section 6". - -import ( - "bytes" - "encoding/binary" - "errors" - "fmt" - "io" - "io/ioutil" - "sync" -) - -type Signal string - -// POSIX signals as listed in RFC 4254 Section 6.10. -const ( - SIGABRT Signal = "ABRT" - SIGALRM Signal = "ALRM" - SIGFPE Signal = "FPE" - SIGHUP Signal = "HUP" - SIGILL Signal = "ILL" - SIGINT Signal = "INT" - SIGKILL Signal = "KILL" - SIGPIPE Signal = "PIPE" - SIGQUIT Signal = "QUIT" - SIGSEGV Signal = "SEGV" - SIGTERM Signal = "TERM" - SIGUSR1 Signal = "USR1" - SIGUSR2 Signal = "USR2" -) - -var signals = map[Signal]int{ - SIGABRT: 6, - SIGALRM: 14, - SIGFPE: 8, - SIGHUP: 1, - SIGILL: 4, - SIGINT: 2, - SIGKILL: 9, - SIGPIPE: 13, - SIGQUIT: 3, - SIGSEGV: 11, - SIGTERM: 15, -} - -type TerminalModes map[uint8]uint32 - -// POSIX terminal mode flags as listed in RFC 4254 Section 8. -const ( - tty_OP_END = 0 - VINTR = 1 - VQUIT = 2 - VERASE = 3 - VKILL = 4 - VEOF = 5 - VEOL = 6 - VEOL2 = 7 - VSTART = 8 - VSTOP = 9 - VSUSP = 10 - VDSUSP = 11 - VREPRINT = 12 - VWERASE = 13 - VLNEXT = 14 - VFLUSH = 15 - VSWTCH = 16 - VSTATUS = 17 - VDISCARD = 18 - IGNPAR = 30 - PARMRK = 31 - INPCK = 32 - ISTRIP = 33 - INLCR = 34 - IGNCR = 35 - ICRNL = 36 - IUCLC = 37 - IXON = 38 - IXANY = 39 - IXOFF = 40 - IMAXBEL = 41 - ISIG = 50 - ICANON = 51 - XCASE = 52 - ECHO = 53 - ECHOE = 54 - ECHOK = 55 - ECHONL = 56 - NOFLSH = 57 - TOSTOP = 58 - IEXTEN = 59 - ECHOCTL = 60 - ECHOKE = 61 - PENDIN = 62 - OPOST = 70 - OLCUC = 71 - ONLCR = 72 - OCRNL = 73 - ONOCR = 74 - ONLRET = 75 - CS7 = 90 - CS8 = 91 - PARENB = 92 - PARODD = 93 - TTY_OP_ISPEED = 128 - TTY_OP_OSPEED = 129 -) - -// A Session represents a connection to a remote command or shell. -type Session struct { - // Stdin specifies the remote process's standard input. - // If Stdin is nil, the remote process reads from an empty - // bytes.Buffer. - Stdin io.Reader - - // Stdout and Stderr specify the remote process's standard - // output and error. - // - // If either is nil, Run connects the corresponding file - // descriptor to an instance of ioutil.Discard. There is a - // fixed amount of buffering that is shared for the two streams. - // If either blocks it may eventually cause the remote - // command to block. - Stdout io.Writer - Stderr io.Writer - - ch Channel // the channel backing this session - started bool // true once Start, Run or Shell is invoked. - copyFuncs []func() error - errors chan error // one send per copyFunc - - // true if pipe method is active - stdinpipe, stdoutpipe, stderrpipe bool - - // stdinPipeWriter is non-nil if StdinPipe has not been called - // and Stdin was specified by the user; it is the write end of - // a pipe connecting Session.Stdin to the stdin channel. - stdinPipeWriter io.WriteCloser - - exitStatus chan error -} - -// SendRequest sends an out-of-band channel request on the SSH channel -// underlying the session. -func (s *Session) SendRequest(name string, wantReply bool, payload []byte) (bool, error) { - return s.ch.SendRequest(name, wantReply, payload) -} - -func (s *Session) Close() error { - return s.ch.Close() -} - -// RFC 4254 Section 6.4. -type setenvRequest struct { - Name string - Value string -} - -// Setenv sets an environment variable that will be applied to any -// command executed by Shell or Run. -func (s *Session) Setenv(name, value string) error { - msg := setenvRequest{ - Name: name, - Value: value, - } - ok, err := s.ch.SendRequest("env", true, Marshal(&msg)) - if err == nil && !ok { - err = errors.New("ssh: setenv failed") - } - return err -} - -// RFC 4254 Section 6.2. -type ptyRequestMsg struct { - Term string - Columns uint32 - Rows uint32 - Width uint32 - Height uint32 - Modelist string -} - -// RequestPty requests the association of a pty with the session on the remote host. -func (s *Session) RequestPty(term string, h, w int, termmodes TerminalModes) error { - var tm []byte - for k, v := range termmodes { - kv := struct { - Key byte - Val uint32 - }{k, v} - - tm = append(tm, Marshal(&kv)...) - } - tm = append(tm, tty_OP_END) - req := ptyRequestMsg{ - Term: term, - Columns: uint32(w), - Rows: uint32(h), - Width: uint32(w * 8), - Height: uint32(h * 8), - Modelist: string(tm), - } - ok, err := s.ch.SendRequest("pty-req", true, Marshal(&req)) - if err == nil && !ok { - err = errors.New("ssh: pty-req failed") - } - return err -} - -// RFC 4254 Section 6.5. -type subsystemRequestMsg struct { - Subsystem string -} - -// RequestSubsystem requests the association of a subsystem with the session on the remote host. -// A subsystem is a predefined command that runs in the background when the ssh session is initiated -func (s *Session) RequestSubsystem(subsystem string) error { - msg := subsystemRequestMsg{ - Subsystem: subsystem, - } - ok, err := s.ch.SendRequest("subsystem", true, Marshal(&msg)) - if err == nil && !ok { - err = errors.New("ssh: subsystem request failed") - } - return err -} - -// RFC 4254 Section 6.7. -type ptyWindowChangeMsg struct { - Columns uint32 - Rows uint32 - Width uint32 - Height uint32 -} - -// WindowChange informs the remote host about a terminal window dimension change to h rows and w columns. -func (s *Session) WindowChange(h, w int) error { - req := ptyWindowChangeMsg{ - Columns: uint32(w), - Rows: uint32(h), - Width: uint32(w * 8), - Height: uint32(h * 8), - } - _, err := s.ch.SendRequest("window-change", false, Marshal(&req)) - return err -} - -// RFC 4254 Section 6.9. -type signalMsg struct { - Signal string -} - -// Signal sends the given signal to the remote process. -// sig is one of the SIG* constants. -func (s *Session) Signal(sig Signal) error { - msg := signalMsg{ - Signal: string(sig), - } - - _, err := s.ch.SendRequest("signal", false, Marshal(&msg)) - return err -} - -// RFC 4254 Section 6.5. -type execMsg struct { - Command string -} - -// Start runs cmd on the remote host. Typically, the remote -// server passes cmd to the shell for interpretation. -// A Session only accepts one call to Run, Start or Shell. -func (s *Session) Start(cmd string) error { - if s.started { - return errors.New("ssh: session already started") - } - req := execMsg{ - Command: cmd, - } - - ok, err := s.ch.SendRequest("exec", true, Marshal(&req)) - if err == nil && !ok { - err = fmt.Errorf("ssh: command %v failed", cmd) - } - if err != nil { - return err - } - return s.start() -} - -// Run runs cmd on the remote host. Typically, the remote -// server passes cmd to the shell for interpretation. -// A Session only accepts one call to Run, Start, Shell, Output, -// or CombinedOutput. -// -// The returned error is nil if the command runs, has no problems -// copying stdin, stdout, and stderr, and exits with a zero exit -// status. -// -// If the remote server does not send an exit status, an error of type -// *ExitMissingError is returned. If the command completes -// unsuccessfully or is interrupted by a signal, the error is of type -// *ExitError. Other error types may be returned for I/O problems. -func (s *Session) Run(cmd string) error { - err := s.Start(cmd) - if err != nil { - return err - } - return s.Wait() -} - -// Output runs cmd on the remote host and returns its standard output. -func (s *Session) Output(cmd string) ([]byte, error) { - if s.Stdout != nil { - return nil, errors.New("ssh: Stdout already set") - } - var b bytes.Buffer - s.Stdout = &b - err := s.Run(cmd) - return b.Bytes(), err -} - -type singleWriter struct { - b bytes.Buffer - mu sync.Mutex -} - -func (w *singleWriter) Write(p []byte) (int, error) { - w.mu.Lock() - defer w.mu.Unlock() - return w.b.Write(p) -} - -// CombinedOutput runs cmd on the remote host and returns its combined -// standard output and standard error. -func (s *Session) CombinedOutput(cmd string) ([]byte, error) { - if s.Stdout != nil { - return nil, errors.New("ssh: Stdout already set") - } - if s.Stderr != nil { - return nil, errors.New("ssh: Stderr already set") - } - var b singleWriter - s.Stdout = &b - s.Stderr = &b - err := s.Run(cmd) - return b.b.Bytes(), err -} - -// Shell starts a login shell on the remote host. A Session only -// accepts one call to Run, Start, Shell, Output, or CombinedOutput. -func (s *Session) Shell() error { - if s.started { - return errors.New("ssh: session already started") - } - - ok, err := s.ch.SendRequest("shell", true, nil) - if err == nil && !ok { - return errors.New("ssh: could not start shell") - } - if err != nil { - return err - } - return s.start() -} - -func (s *Session) start() error { - s.started = true - - type F func(*Session) - for _, setupFd := range []F{(*Session).stdin, (*Session).stdout, (*Session).stderr} { - setupFd(s) - } - - s.errors = make(chan error, len(s.copyFuncs)) - for _, fn := range s.copyFuncs { - go func(fn func() error) { - s.errors <- fn() - }(fn) - } - return nil -} - -// Wait waits for the remote command to exit. -// -// The returned error is nil if the command runs, has no problems -// copying stdin, stdout, and stderr, and exits with a zero exit -// status. -// -// If the remote server does not send an exit status, an error of type -// *ExitMissingError is returned. If the command completes -// unsuccessfully or is interrupted by a signal, the error is of type -// *ExitError. Other error types may be returned for I/O problems. -func (s *Session) Wait() error { - if !s.started { - return errors.New("ssh: session not started") - } - waitErr := <-s.exitStatus - - if s.stdinPipeWriter != nil { - s.stdinPipeWriter.Close() - } - var copyError error - for range s.copyFuncs { - if err := <-s.errors; err != nil && copyError == nil { - copyError = err - } - } - if waitErr != nil { - return waitErr - } - return copyError -} - -func (s *Session) wait(reqs <-chan *Request) error { - wm := Waitmsg{status: -1} - // Wait for msg channel to be closed before returning. - for msg := range reqs { - switch msg.Type { - case "exit-status": - wm.status = int(binary.BigEndian.Uint32(msg.Payload)) - case "exit-signal": - var sigval struct { - Signal string - CoreDumped bool - Error string - Lang string - } - if err := Unmarshal(msg.Payload, &sigval); err != nil { - return err - } - - // Must sanitize strings? - wm.signal = sigval.Signal - wm.msg = sigval.Error - wm.lang = sigval.Lang - default: - // This handles keepalives and matches - // OpenSSH's behaviour. - if msg.WantReply { - msg.Reply(false, nil) - } - } - } - if wm.status == 0 { - return nil - } - if wm.status == -1 { - // exit-status was never sent from server - if wm.signal == "" { - // signal was not sent either. RFC 4254 - // section 6.10 recommends against this - // behavior, but it is allowed, so we let - // clients handle it. - return &ExitMissingError{} - } - wm.status = 128 - if _, ok := signals[Signal(wm.signal)]; ok { - wm.status += signals[Signal(wm.signal)] - } - } - - return &ExitError{wm} -} - -// ExitMissingError is returned if a session is torn down cleanly, but -// the server sends no confirmation of the exit status. -type ExitMissingError struct{} - -func (e *ExitMissingError) Error() string { - return "wait: remote command exited without exit status or exit signal" -} - -func (s *Session) stdin() { - if s.stdinpipe { - return - } - var stdin io.Reader - if s.Stdin == nil { - stdin = new(bytes.Buffer) - } else { - r, w := io.Pipe() - go func() { - _, err := io.Copy(w, s.Stdin) - w.CloseWithError(err) - }() - stdin, s.stdinPipeWriter = r, w - } - s.copyFuncs = append(s.copyFuncs, func() error { - _, err := io.Copy(s.ch, stdin) - if err1 := s.ch.CloseWrite(); err == nil && err1 != io.EOF { - err = err1 - } - return err - }) -} - -func (s *Session) stdout() { - if s.stdoutpipe { - return - } - if s.Stdout == nil { - s.Stdout = ioutil.Discard - } - s.copyFuncs = append(s.copyFuncs, func() error { - _, err := io.Copy(s.Stdout, s.ch) - return err - }) -} - -func (s *Session) stderr() { - if s.stderrpipe { - return - } - if s.Stderr == nil { - s.Stderr = ioutil.Discard - } - s.copyFuncs = append(s.copyFuncs, func() error { - _, err := io.Copy(s.Stderr, s.ch.Stderr()) - return err - }) -} - -// sessionStdin reroutes Close to CloseWrite. -type sessionStdin struct { - io.Writer - ch Channel -} - -func (s *sessionStdin) Close() error { - return s.ch.CloseWrite() -} - -// StdinPipe returns a pipe that will be connected to the -// remote command's standard input when the command starts. -func (s *Session) StdinPipe() (io.WriteCloser, error) { - if s.Stdin != nil { - return nil, errors.New("ssh: Stdin already set") - } - if s.started { - return nil, errors.New("ssh: StdinPipe after process started") - } - s.stdinpipe = true - return &sessionStdin{s.ch, s.ch}, nil -} - -// StdoutPipe returns a pipe that will be connected to the -// remote command's standard output when the command starts. -// There is a fixed amount of buffering that is shared between -// stdout and stderr streams. If the StdoutPipe reader is -// not serviced fast enough it may eventually cause the -// remote command to block. -func (s *Session) StdoutPipe() (io.Reader, error) { - if s.Stdout != nil { - return nil, errors.New("ssh: Stdout already set") - } - if s.started { - return nil, errors.New("ssh: StdoutPipe after process started") - } - s.stdoutpipe = true - return s.ch, nil -} - -// StderrPipe returns a pipe that will be connected to the -// remote command's standard error when the command starts. -// There is a fixed amount of buffering that is shared between -// stdout and stderr streams. If the StderrPipe reader is -// not serviced fast enough it may eventually cause the -// remote command to block. -func (s *Session) StderrPipe() (io.Reader, error) { - if s.Stderr != nil { - return nil, errors.New("ssh: Stderr already set") - } - if s.started { - return nil, errors.New("ssh: StderrPipe after process started") - } - s.stderrpipe = true - return s.ch.Stderr(), nil -} - -// newSession returns a new interactive session on the remote host. -func newSession(ch Channel, reqs <-chan *Request) (*Session, error) { - s := &Session{ - ch: ch, - } - s.exitStatus = make(chan error, 1) - go func() { - s.exitStatus <- s.wait(reqs) - }() - - return s, nil -} - -// An ExitError reports unsuccessful completion of a remote command. -type ExitError struct { - Waitmsg -} - -func (e *ExitError) Error() string { - return e.Waitmsg.String() -} - -// Waitmsg stores the information about an exited remote command -// as reported by Wait. -type Waitmsg struct { - status int - signal string - msg string - lang string -} - -// ExitStatus returns the exit status of the remote command. -func (w Waitmsg) ExitStatus() int { - return w.status -} - -// Signal returns the exit signal of the remote command if -// it was terminated violently. -func (w Waitmsg) Signal() string { - return w.signal -} - -// Msg returns the exit message given by the remote command -func (w Waitmsg) Msg() string { - return w.msg -} - -// Lang returns the language tag. See RFC 3066 -func (w Waitmsg) Lang() string { - return w.lang -} - -func (w Waitmsg) String() string { - str := fmt.Sprintf("Process exited with status %v", w.status) - if w.signal != "" { - str += fmt.Sprintf(" from signal %v", w.signal) - } - if w.msg != "" { - str += fmt.Sprintf(". Reason was: %v", w.msg) - } - return str -} diff --git a/vendor/golang.org/x/crypto/ssh/session_test.go b/vendor/golang.org/x/crypto/ssh/session_test.go deleted file mode 100644 index 7dce6dd6..00000000 --- a/vendor/golang.org/x/crypto/ssh/session_test.go +++ /dev/null @@ -1,774 +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 ssh - -// Session tests. - -import ( - "bytes" - crypto_rand "crypto/rand" - "errors" - "io" - "io/ioutil" - "math/rand" - "net" - "testing" - - "golang.org/x/crypto/ssh/terminal" -) - -type serverType func(Channel, <-chan *Request, *testing.T) - -// dial constructs a new test server and returns a *ClientConn. -func dial(handler serverType, t *testing.T) *Client { - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - - go func() { - defer c1.Close() - conf := ServerConfig{ - NoClientAuth: true, - } - conf.AddHostKey(testSigners["rsa"]) - - _, chans, reqs, err := NewServerConn(c1, &conf) - if err != nil { - t.Fatalf("Unable to handshake: %v", err) - } - go DiscardRequests(reqs) - - for newCh := range chans { - if newCh.ChannelType() != "session" { - newCh.Reject(UnknownChannelType, "unknown channel type") - continue - } - - ch, inReqs, err := newCh.Accept() - if err != nil { - t.Errorf("Accept: %v", err) - continue - } - go func() { - handler(ch, inReqs, t) - }() - } - }() - - config := &ClientConfig{ - User: "testuser", - HostKeyCallback: InsecureIgnoreHostKey(), - } - - conn, chans, reqs, err := NewClientConn(c2, "", config) - if err != nil { - t.Fatalf("unable to dial remote side: %v", err) - } - - return NewClient(conn, chans, reqs) -} - -// Test a simple string is returned to session.Stdout. -func TestSessionShell(t *testing.T) { - conn := dial(shellHandler, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatalf("Unable to request new session: %v", err) - } - defer session.Close() - stdout := new(bytes.Buffer) - session.Stdout = stdout - if err := session.Shell(); err != nil { - t.Fatalf("Unable to execute command: %s", err) - } - if err := session.Wait(); err != nil { - t.Fatalf("Remote command did not exit cleanly: %v", err) - } - actual := stdout.String() - if actual != "golang" { - t.Fatalf("Remote shell did not return expected string: expected=golang, actual=%s", actual) - } -} - -// TODO(dfc) add support for Std{in,err}Pipe when the Server supports it. - -// Test a simple string is returned via StdoutPipe. -func TestSessionStdoutPipe(t *testing.T) { - conn := dial(shellHandler, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatalf("Unable to request new session: %v", err) - } - defer session.Close() - stdout, err := session.StdoutPipe() - if err != nil { - t.Fatalf("Unable to request StdoutPipe(): %v", err) - } - var buf bytes.Buffer - if err := session.Shell(); err != nil { - t.Fatalf("Unable to execute command: %v", err) - } - done := make(chan bool, 1) - go func() { - if _, err := io.Copy(&buf, stdout); err != nil { - t.Errorf("Copy of stdout failed: %v", err) - } - done <- true - }() - if err := session.Wait(); err != nil { - t.Fatalf("Remote command did not exit cleanly: %v", err) - } - <-done - actual := buf.String() - if actual != "golang" { - t.Fatalf("Remote shell did not return expected string: expected=golang, actual=%s", actual) - } -} - -// Test that a simple string is returned via the Output helper, -// and that stderr is discarded. -func TestSessionOutput(t *testing.T) { - conn := dial(fixedOutputHandler, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatalf("Unable to request new session: %v", err) - } - defer session.Close() - - buf, err := session.Output("") // cmd is ignored by fixedOutputHandler - if err != nil { - t.Error("Remote command did not exit cleanly:", err) - } - w := "this-is-stdout." - g := string(buf) - if g != w { - t.Error("Remote command did not return expected string:") - t.Logf("want %q", w) - t.Logf("got %q", g) - } -} - -// Test that both stdout and stderr are returned -// via the CombinedOutput helper. -func TestSessionCombinedOutput(t *testing.T) { - conn := dial(fixedOutputHandler, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatalf("Unable to request new session: %v", err) - } - defer session.Close() - - buf, err := session.CombinedOutput("") // cmd is ignored by fixedOutputHandler - if err != nil { - t.Error("Remote command did not exit cleanly:", err) - } - const stdout = "this-is-stdout." - const stderr = "this-is-stderr." - g := string(buf) - if g != stdout+stderr && g != stderr+stdout { - t.Error("Remote command did not return expected string:") - t.Logf("want %q, or %q", stdout+stderr, stderr+stdout) - t.Logf("got %q", g) - } -} - -// Test non-0 exit status is returned correctly. -func TestExitStatusNonZero(t *testing.T) { - conn := dial(exitStatusNonZeroHandler, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatalf("Unable to request new session: %v", err) - } - defer session.Close() - if err := session.Shell(); err != nil { - t.Fatalf("Unable to execute command: %v", err) - } - err = session.Wait() - if err == nil { - t.Fatalf("expected command to fail but it didn't") - } - e, ok := err.(*ExitError) - if !ok { - t.Fatalf("expected *ExitError but got %T", err) - } - if e.ExitStatus() != 15 { - t.Fatalf("expected command to exit with 15 but got %v", e.ExitStatus()) - } -} - -// Test 0 exit status is returned correctly. -func TestExitStatusZero(t *testing.T) { - conn := dial(exitStatusZeroHandler, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatalf("Unable to request new session: %v", err) - } - defer session.Close() - - if err := session.Shell(); err != nil { - t.Fatalf("Unable to execute command: %v", err) - } - err = session.Wait() - if err != nil { - t.Fatalf("expected nil but got %v", err) - } -} - -// Test exit signal and status are both returned correctly. -func TestExitSignalAndStatus(t *testing.T) { - conn := dial(exitSignalAndStatusHandler, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatalf("Unable to request new session: %v", err) - } - defer session.Close() - if err := session.Shell(); err != nil { - t.Fatalf("Unable to execute command: %v", err) - } - err = session.Wait() - if err == nil { - t.Fatalf("expected command to fail but it didn't") - } - e, ok := err.(*ExitError) - if !ok { - t.Fatalf("expected *ExitError but got %T", err) - } - if e.Signal() != "TERM" || e.ExitStatus() != 15 { - t.Fatalf("expected command to exit with signal TERM and status 15 but got signal %s and status %v", e.Signal(), e.ExitStatus()) - } -} - -// Test exit signal and status are both returned correctly. -func TestKnownExitSignalOnly(t *testing.T) { - conn := dial(exitSignalHandler, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatalf("Unable to request new session: %v", err) - } - defer session.Close() - if err := session.Shell(); err != nil { - t.Fatalf("Unable to execute command: %v", err) - } - err = session.Wait() - if err == nil { - t.Fatalf("expected command to fail but it didn't") - } - e, ok := err.(*ExitError) - if !ok { - t.Fatalf("expected *ExitError but got %T", err) - } - if e.Signal() != "TERM" || e.ExitStatus() != 143 { - t.Fatalf("expected command to exit with signal TERM and status 143 but got signal %s and status %v", e.Signal(), e.ExitStatus()) - } -} - -// Test exit signal and status are both returned correctly. -func TestUnknownExitSignal(t *testing.T) { - conn := dial(exitSignalUnknownHandler, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatalf("Unable to request new session: %v", err) - } - defer session.Close() - if err := session.Shell(); err != nil { - t.Fatalf("Unable to execute command: %v", err) - } - err = session.Wait() - if err == nil { - t.Fatalf("expected command to fail but it didn't") - } - e, ok := err.(*ExitError) - if !ok { - t.Fatalf("expected *ExitError but got %T", err) - } - if e.Signal() != "SYS" || e.ExitStatus() != 128 { - t.Fatalf("expected command to exit with signal SYS and status 128 but got signal %s and status %v", e.Signal(), e.ExitStatus()) - } -} - -func TestExitWithoutStatusOrSignal(t *testing.T) { - conn := dial(exitWithoutSignalOrStatus, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatalf("Unable to request new session: %v", err) - } - defer session.Close() - if err := session.Shell(); err != nil { - t.Fatalf("Unable to execute command: %v", err) - } - err = session.Wait() - if err == nil { - t.Fatalf("expected command to fail but it didn't") - } - if _, ok := err.(*ExitMissingError); !ok { - t.Fatalf("got %T want *ExitMissingError", err) - } -} - -// windowTestBytes is the number of bytes that we'll send to the SSH server. -const windowTestBytes = 16000 * 200 - -// TestServerWindow writes random data to the server. The server is expected to echo -// the same data back, which is compared against the original. -func TestServerWindow(t *testing.T) { - origBuf := bytes.NewBuffer(make([]byte, 0, windowTestBytes)) - io.CopyN(origBuf, crypto_rand.Reader, windowTestBytes) - origBytes := origBuf.Bytes() - - conn := dial(echoHandler, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatal(err) - } - defer session.Close() - result := make(chan []byte) - - go func() { - defer close(result) - echoedBuf := bytes.NewBuffer(make([]byte, 0, windowTestBytes)) - serverStdout, err := session.StdoutPipe() - if err != nil { - t.Errorf("StdoutPipe failed: %v", err) - return - } - n, err := copyNRandomly("stdout", echoedBuf, serverStdout, windowTestBytes) - if err != nil && err != io.EOF { - t.Errorf("Read only %d bytes from server, expected %d: %v", n, windowTestBytes, err) - } - result <- echoedBuf.Bytes() - }() - - serverStdin, err := session.StdinPipe() - if err != nil { - t.Fatalf("StdinPipe failed: %v", err) - } - written, err := copyNRandomly("stdin", serverStdin, origBuf, windowTestBytes) - if err != nil { - t.Fatalf("failed to copy origBuf to serverStdin: %v", err) - } - if written != windowTestBytes { - t.Fatalf("Wrote only %d of %d bytes to server", written, windowTestBytes) - } - - echoedBytes := <-result - - if !bytes.Equal(origBytes, echoedBytes) { - t.Fatalf("Echoed buffer differed from original, orig %d, echoed %d", len(origBytes), len(echoedBytes)) - } -} - -// Verify the client can handle a keepalive packet from the server. -func TestClientHandlesKeepalives(t *testing.T) { - conn := dial(channelKeepaliveSender, t) - defer conn.Close() - session, err := conn.NewSession() - if err != nil { - t.Fatal(err) - } - defer session.Close() - if err := session.Shell(); err != nil { - t.Fatalf("Unable to execute command: %v", err) - } - err = session.Wait() - if err != nil { - t.Fatalf("expected nil but got: %v", err) - } -} - -type exitStatusMsg struct { - Status uint32 -} - -type exitSignalMsg struct { - Signal string - CoreDumped bool - Errmsg string - Lang string -} - -func handleTerminalRequests(in <-chan *Request) { - for req := range in { - ok := false - switch req.Type { - case "shell": - ok = true - if len(req.Payload) > 0 { - // We don't accept any commands, only the default shell. - ok = false - } - case "env": - ok = true - } - req.Reply(ok, nil) - } -} - -func newServerShell(ch Channel, in <-chan *Request, prompt string) *terminal.Terminal { - term := terminal.NewTerminal(ch, prompt) - go handleTerminalRequests(in) - return term -} - -func exitStatusZeroHandler(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - // this string is returned to stdout - shell := newServerShell(ch, in, "> ") - readLine(shell, t) - sendStatus(0, ch, t) -} - -func exitStatusNonZeroHandler(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - shell := newServerShell(ch, in, "> ") - readLine(shell, t) - sendStatus(15, ch, t) -} - -func exitSignalAndStatusHandler(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - shell := newServerShell(ch, in, "> ") - readLine(shell, t) - sendStatus(15, ch, t) - sendSignal("TERM", ch, t) -} - -func exitSignalHandler(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - shell := newServerShell(ch, in, "> ") - readLine(shell, t) - sendSignal("TERM", ch, t) -} - -func exitSignalUnknownHandler(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - shell := newServerShell(ch, in, "> ") - readLine(shell, t) - sendSignal("SYS", ch, t) -} - -func exitWithoutSignalOrStatus(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - shell := newServerShell(ch, in, "> ") - readLine(shell, t) -} - -func shellHandler(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - // this string is returned to stdout - shell := newServerShell(ch, in, "golang") - readLine(shell, t) - sendStatus(0, ch, t) -} - -// Ignores the command, writes fixed strings to stderr and stdout. -// Strings are "this-is-stdout." and "this-is-stderr.". -func fixedOutputHandler(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - _, err := ch.Read(nil) - - req, ok := <-in - if !ok { - t.Fatalf("error: expected channel request, got: %#v", err) - return - } - - // ignore request, always send some text - req.Reply(true, nil) - - _, err = io.WriteString(ch, "this-is-stdout.") - if err != nil { - t.Fatalf("error writing on server: %v", err) - } - _, err = io.WriteString(ch.Stderr(), "this-is-stderr.") - if err != nil { - t.Fatalf("error writing on server: %v", err) - } - sendStatus(0, ch, t) -} - -func readLine(shell *terminal.Terminal, t *testing.T) { - if _, err := shell.ReadLine(); err != nil && err != io.EOF { - t.Errorf("unable to read line: %v", err) - } -} - -func sendStatus(status uint32, ch Channel, t *testing.T) { - msg := exitStatusMsg{ - Status: status, - } - if _, err := ch.SendRequest("exit-status", false, Marshal(&msg)); err != nil { - t.Errorf("unable to send status: %v", err) - } -} - -func sendSignal(signal string, ch Channel, t *testing.T) { - sig := exitSignalMsg{ - Signal: signal, - CoreDumped: false, - Errmsg: "Process terminated", - Lang: "en-GB-oed", - } - if _, err := ch.SendRequest("exit-signal", false, Marshal(&sig)); err != nil { - t.Errorf("unable to send signal: %v", err) - } -} - -func discardHandler(ch Channel, t *testing.T) { - defer ch.Close() - io.Copy(ioutil.Discard, ch) -} - -func echoHandler(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - if n, err := copyNRandomly("echohandler", ch, ch, windowTestBytes); err != nil { - t.Errorf("short write, wrote %d, expected %d: %v ", n, windowTestBytes, err) - } -} - -// copyNRandomly copies n bytes from src to dst. It uses a variable, and random, -// buffer size to exercise more code paths. -func copyNRandomly(title string, dst io.Writer, src io.Reader, n int) (int, error) { - var ( - buf = make([]byte, 32*1024) - written int - remaining = n - ) - for remaining > 0 { - l := rand.Intn(1 << 15) - if remaining < l { - l = remaining - } - nr, er := src.Read(buf[:l]) - nw, ew := dst.Write(buf[:nr]) - remaining -= nw - written += nw - if ew != nil { - return written, ew - } - if nr != nw { - return written, io.ErrShortWrite - } - if er != nil && er != io.EOF { - return written, er - } - } - return written, nil -} - -func channelKeepaliveSender(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - shell := newServerShell(ch, in, "> ") - readLine(shell, t) - if _, err := ch.SendRequest("keepalive@openssh.com", true, nil); err != nil { - t.Errorf("unable to send channel keepalive request: %v", err) - } - sendStatus(0, ch, t) -} - -func TestClientWriteEOF(t *testing.T) { - conn := dial(simpleEchoHandler, t) - defer conn.Close() - - session, err := conn.NewSession() - if err != nil { - t.Fatal(err) - } - defer session.Close() - stdin, err := session.StdinPipe() - if err != nil { - t.Fatalf("StdinPipe failed: %v", err) - } - stdout, err := session.StdoutPipe() - if err != nil { - t.Fatalf("StdoutPipe failed: %v", err) - } - - data := []byte(`0000`) - _, err = stdin.Write(data) - if err != nil { - t.Fatalf("Write failed: %v", err) - } - stdin.Close() - - res, err := ioutil.ReadAll(stdout) - if err != nil { - t.Fatalf("Read failed: %v", err) - } - - if !bytes.Equal(data, res) { - t.Fatalf("Read differed from write, wrote: %v, read: %v", data, res) - } -} - -func simpleEchoHandler(ch Channel, in <-chan *Request, t *testing.T) { - defer ch.Close() - data, err := ioutil.ReadAll(ch) - if err != nil { - t.Errorf("handler read error: %v", err) - } - _, err = ch.Write(data) - if err != nil { - t.Errorf("handler write error: %v", err) - } -} - -func TestSessionID(t *testing.T) { - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - serverID := make(chan []byte, 1) - clientID := make(chan []byte, 1) - - serverConf := &ServerConfig{ - NoClientAuth: true, - } - serverConf.AddHostKey(testSigners["ecdsa"]) - clientConf := &ClientConfig{ - HostKeyCallback: InsecureIgnoreHostKey(), - User: "user", - } - - go func() { - conn, chans, reqs, err := NewServerConn(c1, serverConf) - if err != nil { - t.Fatalf("server handshake: %v", err) - } - serverID <- conn.SessionID() - go DiscardRequests(reqs) - for ch := range chans { - ch.Reject(Prohibited, "") - } - }() - - go func() { - conn, chans, reqs, err := NewClientConn(c2, "", clientConf) - if err != nil { - t.Fatalf("client handshake: %v", err) - } - clientID <- conn.SessionID() - go DiscardRequests(reqs) - for ch := range chans { - ch.Reject(Prohibited, "") - } - }() - - s := <-serverID - c := <-clientID - if bytes.Compare(s, c) != 0 { - t.Errorf("server session ID (%x) != client session ID (%x)", s, c) - } else if len(s) == 0 { - t.Errorf("client and server SessionID were empty.") - } -} - -type noReadConn struct { - readSeen bool - net.Conn -} - -func (c *noReadConn) Close() error { - return nil -} - -func (c *noReadConn) Read(b []byte) (int, error) { - c.readSeen = true - return 0, errors.New("noReadConn error") -} - -func TestInvalidServerConfiguration(t *testing.T) { - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - serveConn := noReadConn{Conn: c1} - serverConf := &ServerConfig{} - - NewServerConn(&serveConn, serverConf) - if serveConn.readSeen { - t.Fatalf("NewServerConn attempted to Read() from Conn while configuration is missing host key") - } - - serverConf.AddHostKey(testSigners["ecdsa"]) - - NewServerConn(&serveConn, serverConf) - if serveConn.readSeen { - t.Fatalf("NewServerConn attempted to Read() from Conn while configuration is missing authentication method") - } -} - -func TestHostKeyAlgorithms(t *testing.T) { - serverConf := &ServerConfig{ - NoClientAuth: true, - } - serverConf.AddHostKey(testSigners["rsa"]) - serverConf.AddHostKey(testSigners["ecdsa"]) - - connect := func(clientConf *ClientConfig, want string) { - var alg string - clientConf.HostKeyCallback = func(h string, a net.Addr, key PublicKey) error { - alg = key.Type() - return nil - } - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - go NewServerConn(c1, serverConf) - _, _, _, err = NewClientConn(c2, "", clientConf) - if err != nil { - t.Fatalf("NewClientConn: %v", err) - } - if alg != want { - t.Errorf("selected key algorithm %s, want %s", alg, want) - } - } - - // By default, we get the preferred algorithm, which is ECDSA 256. - - clientConf := &ClientConfig{ - HostKeyCallback: InsecureIgnoreHostKey(), - } - connect(clientConf, KeyAlgoECDSA256) - - // Client asks for RSA explicitly. - clientConf.HostKeyAlgorithms = []string{KeyAlgoRSA} - connect(clientConf, KeyAlgoRSA) - - c1, c2, err := netPipe() - if err != nil { - t.Fatalf("netPipe: %v", err) - } - defer c1.Close() - defer c2.Close() - - go NewServerConn(c1, serverConf) - clientConf.HostKeyAlgorithms = []string{"nonexistent-hostkey-algo"} - _, _, _, err = NewClientConn(c2, "", clientConf) - if err == nil { - t.Fatal("succeeded connecting with unknown hostkey algorithm") - } -} diff --git a/vendor/golang.org/x/crypto/ssh/streamlocal.go b/vendor/golang.org/x/crypto/ssh/streamlocal.go deleted file mode 100644 index b171b330..00000000 --- a/vendor/golang.org/x/crypto/ssh/streamlocal.go +++ /dev/null @@ -1,116 +0,0 @@ -package ssh - -import ( - "errors" - "io" - "net" -) - -// streamLocalChannelOpenDirectMsg is a struct used for SSH_MSG_CHANNEL_OPEN message -// with "direct-streamlocal@openssh.com" string. -// -// See openssh-portable/PROTOCOL, section 2.4. connection: Unix domain socket forwarding -// https://github.com/openssh/openssh-portable/blob/master/PROTOCOL#L235 -type streamLocalChannelOpenDirectMsg struct { - socketPath string - reserved0 string - reserved1 uint32 -} - -// forwardedStreamLocalPayload is a struct used for SSH_MSG_CHANNEL_OPEN message -// with "forwarded-streamlocal@openssh.com" string. -type forwardedStreamLocalPayload struct { - SocketPath string - Reserved0 string -} - -// streamLocalChannelForwardMsg is a struct used for SSH2_MSG_GLOBAL_REQUEST message -// with "streamlocal-forward@openssh.com"/"cancel-streamlocal-forward@openssh.com" string. -type streamLocalChannelForwardMsg struct { - socketPath string -} - -// ListenUnix is similar to ListenTCP but uses a Unix domain socket. -func (c *Client) ListenUnix(socketPath string) (net.Listener, error) { - c.handleForwardsOnce.Do(c.handleForwards) - m := streamLocalChannelForwardMsg{ - socketPath, - } - // send message - ok, _, err := c.SendRequest("streamlocal-forward@openssh.com", true, Marshal(&m)) - if err != nil { - return nil, err - } - if !ok { - return nil, errors.New("ssh: streamlocal-forward@openssh.com request denied by peer") - } - ch := c.forwards.add(&net.UnixAddr{Name: socketPath, Net: "unix"}) - - return &unixListener{socketPath, c, ch}, nil -} - -func (c *Client) dialStreamLocal(socketPath string) (Channel, error) { - msg := streamLocalChannelOpenDirectMsg{ - socketPath: socketPath, - } - ch, in, err := c.OpenChannel("direct-streamlocal@openssh.com", Marshal(&msg)) - if err != nil { - return nil, err - } - go DiscardRequests(in) - return ch, err -} - -type unixListener struct { - socketPath string - - conn *Client - in <-chan forward -} - -// Accept waits for and returns the next connection to the listener. -func (l *unixListener) Accept() (net.Conn, error) { - s, ok := <-l.in - if !ok { - return nil, io.EOF - } - ch, incoming, err := s.newCh.Accept() - if err != nil { - return nil, err - } - go DiscardRequests(incoming) - - return &chanConn{ - Channel: ch, - laddr: &net.UnixAddr{ - Name: l.socketPath, - Net: "unix", - }, - raddr: &net.UnixAddr{ - Name: "@", - Net: "unix", - }, - }, nil -} - -// Close closes the listener. -func (l *unixListener) Close() error { - // this also closes the listener. - l.conn.forwards.remove(&net.UnixAddr{Name: l.socketPath, Net: "unix"}) - m := streamLocalChannelForwardMsg{ - l.socketPath, - } - ok, _, err := l.conn.SendRequest("cancel-streamlocal-forward@openssh.com", true, Marshal(&m)) - if err == nil && !ok { - err = errors.New("ssh: cancel-streamlocal-forward@openssh.com failed") - } - return err -} - -// Addr returns the listener's network address. -func (l *unixListener) Addr() net.Addr { - return &net.UnixAddr{ - Name: l.socketPath, - Net: "unix", - } -} diff --git a/vendor/golang.org/x/crypto/ssh/tcpip.go b/vendor/golang.org/x/crypto/ssh/tcpip.go deleted file mode 100644 index 80d35f5e..00000000 --- a/vendor/golang.org/x/crypto/ssh/tcpip.go +++ /dev/null @@ -1,474 +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 ssh - -import ( - "errors" - "fmt" - "io" - "math/rand" - "net" - "strconv" - "strings" - "sync" - "time" -) - -// Listen requests the remote peer open a listening socket on -// addr. Incoming connections will be available by calling Accept on -// the returned net.Listener. The listener must be serviced, or the -// SSH connection may hang. -// N must be "tcp", "tcp4", "tcp6", or "unix". -func (c *Client) Listen(n, addr string) (net.Listener, error) { - switch n { - case "tcp", "tcp4", "tcp6": - laddr, err := net.ResolveTCPAddr(n, addr) - if err != nil { - return nil, err - } - return c.ListenTCP(laddr) - case "unix": - return c.ListenUnix(addr) - default: - return nil, fmt.Errorf("ssh: unsupported protocol: %s", n) - } -} - -// Automatic port allocation is broken with OpenSSH before 6.0. See -// also https://bugzilla.mindrot.org/show_bug.cgi?id=2017. In -// particular, OpenSSH 5.9 sends a channelOpenMsg with port number 0, -// rather than the actual port number. This means you can never open -// two different listeners with auto allocated ports. We work around -// this by trying explicit ports until we succeed. - -const openSSHPrefix = "OpenSSH_" - -var portRandomizer = rand.New(rand.NewSource(time.Now().UnixNano())) - -// isBrokenOpenSSHVersion returns true if the given version string -// specifies a version of OpenSSH that is known to have a bug in port -// forwarding. -func isBrokenOpenSSHVersion(versionStr string) bool { - i := strings.Index(versionStr, openSSHPrefix) - if i < 0 { - return false - } - i += len(openSSHPrefix) - j := i - for ; j < len(versionStr); j++ { - if versionStr[j] < '0' || versionStr[j] > '9' { - break - } - } - version, _ := strconv.Atoi(versionStr[i:j]) - return version < 6 -} - -// autoPortListenWorkaround simulates automatic port allocation by -// trying random ports repeatedly. -func (c *Client) autoPortListenWorkaround(laddr *net.TCPAddr) (net.Listener, error) { - var sshListener net.Listener - var err error - const tries = 10 - for i := 0; i < tries; i++ { - addr := *laddr - addr.Port = 1024 + portRandomizer.Intn(60000) - sshListener, err = c.ListenTCP(&addr) - if err == nil { - laddr.Port = addr.Port - return sshListener, err - } - } - return nil, fmt.Errorf("ssh: listen on random port failed after %d tries: %v", tries, err) -} - -// RFC 4254 7.1 -type channelForwardMsg struct { - addr string - rport uint32 -} - -// handleForwards starts goroutines handling forwarded connections. -// It's called on first use by (*Client).ListenTCP to not launch -// goroutines until needed. -func (c *Client) handleForwards() { - go c.forwards.handleChannels(c.HandleChannelOpen("forwarded-tcpip")) - go c.forwards.handleChannels(c.HandleChannelOpen("forwarded-streamlocal@openssh.com")) -} - -// ListenTCP requests the remote peer open a listening socket -// on laddr. Incoming connections will be available by calling -// Accept on the returned net.Listener. -func (c *Client) ListenTCP(laddr *net.TCPAddr) (net.Listener, error) { - c.handleForwardsOnce.Do(c.handleForwards) - if laddr.Port == 0 && isBrokenOpenSSHVersion(string(c.ServerVersion())) { - return c.autoPortListenWorkaround(laddr) - } - - m := channelForwardMsg{ - laddr.IP.String(), - uint32(laddr.Port), - } - // send message - ok, resp, err := c.SendRequest("tcpip-forward", true, Marshal(&m)) - if err != nil { - return nil, err - } - if !ok { - return nil, errors.New("ssh: tcpip-forward request denied by peer") - } - - // If the original port was 0, then the remote side will - // supply a real port number in the response. - if laddr.Port == 0 { - var p struct { - Port uint32 - } - if err := Unmarshal(resp, &p); err != nil { - return nil, err - } - laddr.Port = int(p.Port) - } - - // Register this forward, using the port number we obtained. - ch := c.forwards.add(laddr) - - return &tcpListener{laddr, c, ch}, nil -} - -// forwardList stores a mapping between remote -// forward requests and the tcpListeners. -type forwardList struct { - sync.Mutex - entries []forwardEntry -} - -// forwardEntry represents an established mapping of a laddr on a -// remote ssh server to a channel connected to a tcpListener. -type forwardEntry struct { - laddr net.Addr - c chan forward -} - -// forward represents an incoming forwarded tcpip connection. The -// arguments to add/remove/lookup should be address as specified in -// the original forward-request. -type forward struct { - newCh NewChannel // the ssh client channel underlying this forward - raddr net.Addr // the raddr of the incoming connection -} - -func (l *forwardList) add(addr net.Addr) chan forward { - l.Lock() - defer l.Unlock() - f := forwardEntry{ - laddr: addr, - c: make(chan forward, 1), - } - l.entries = append(l.entries, f) - return f.c -} - -// See RFC 4254, section 7.2 -type forwardedTCPPayload struct { - Addr string - Port uint32 - OriginAddr string - OriginPort uint32 -} - -// parseTCPAddr parses the originating address from the remote into a *net.TCPAddr. -func parseTCPAddr(addr string, port uint32) (*net.TCPAddr, error) { - if port == 0 || port > 65535 { - return nil, fmt.Errorf("ssh: port number out of range: %d", port) - } - ip := net.ParseIP(string(addr)) - if ip == nil { - return nil, fmt.Errorf("ssh: cannot parse IP address %q", addr) - } - return &net.TCPAddr{IP: ip, Port: int(port)}, nil -} - -func (l *forwardList) handleChannels(in <-chan NewChannel) { - for ch := range in { - var ( - laddr net.Addr - raddr net.Addr - err error - ) - switch channelType := ch.ChannelType(); channelType { - case "forwarded-tcpip": - var payload forwardedTCPPayload - if err = Unmarshal(ch.ExtraData(), &payload); err != nil { - ch.Reject(ConnectionFailed, "could not parse forwarded-tcpip payload: "+err.Error()) - continue - } - - // RFC 4254 section 7.2 specifies that incoming - // addresses should list the address, in string - // format. It is implied that this should be an IP - // address, as it would be impossible to connect to it - // otherwise. - laddr, err = parseTCPAddr(payload.Addr, payload.Port) - if err != nil { - ch.Reject(ConnectionFailed, err.Error()) - continue - } - raddr, err = parseTCPAddr(payload.OriginAddr, payload.OriginPort) - if err != nil { - ch.Reject(ConnectionFailed, err.Error()) - continue - } - - case "forwarded-streamlocal@openssh.com": - var payload forwardedStreamLocalPayload - if err = Unmarshal(ch.ExtraData(), &payload); err != nil { - ch.Reject(ConnectionFailed, "could not parse forwarded-streamlocal@openssh.com payload: "+err.Error()) - continue - } - laddr = &net.UnixAddr{ - Name: payload.SocketPath, - Net: "unix", - } - raddr = &net.UnixAddr{ - Name: "@", - Net: "unix", - } - default: - panic(fmt.Errorf("ssh: unknown channel type %s", channelType)) - } - if ok := l.forward(laddr, raddr, ch); !ok { - // Section 7.2, implementations MUST reject spurious incoming - // connections. - ch.Reject(Prohibited, "no forward for address") - continue - } - - } -} - -// remove removes the forward entry, and the channel feeding its -// listener. -func (l *forwardList) remove(addr net.Addr) { - l.Lock() - defer l.Unlock() - for i, f := range l.entries { - if addr.Network() == f.laddr.Network() && addr.String() == f.laddr.String() { - l.entries = append(l.entries[:i], l.entries[i+1:]...) - close(f.c) - return - } - } -} - -// closeAll closes and clears all forwards. -func (l *forwardList) closeAll() { - l.Lock() - defer l.Unlock() - for _, f := range l.entries { - close(f.c) - } - l.entries = nil -} - -func (l *forwardList) forward(laddr, raddr net.Addr, ch NewChannel) bool { - l.Lock() - defer l.Unlock() - for _, f := range l.entries { - if laddr.Network() == f.laddr.Network() && laddr.String() == f.laddr.String() { - f.c <- forward{newCh: ch, raddr: raddr} - return true - } - } - return false -} - -type tcpListener struct { - laddr *net.TCPAddr - - conn *Client - in <-chan forward -} - -// Accept waits for and returns the next connection to the listener. -func (l *tcpListener) Accept() (net.Conn, error) { - s, ok := <-l.in - if !ok { - return nil, io.EOF - } - ch, incoming, err := s.newCh.Accept() - if err != nil { - return nil, err - } - go DiscardRequests(incoming) - - return &chanConn{ - Channel: ch, - laddr: l.laddr, - raddr: s.raddr, - }, nil -} - -// Close closes the listener. -func (l *tcpListener) Close() error { - m := channelForwardMsg{ - l.laddr.IP.String(), - uint32(l.laddr.Port), - } - - // this also closes the listener. - l.conn.forwards.remove(l.laddr) - ok, _, err := l.conn.SendRequest("cancel-tcpip-forward", true, Marshal(&m)) - if err == nil && !ok { - err = errors.New("ssh: cancel-tcpip-forward failed") - } - return err -} - -// Addr returns the listener's network address. -func (l *tcpListener) Addr() net.Addr { - return l.laddr -} - -// Dial initiates a connection to the addr from the remote host. -// The resulting connection has a zero LocalAddr() and RemoteAddr(). -func (c *Client) Dial(n, addr string) (net.Conn, error) { - var ch Channel - switch n { - case "tcp", "tcp4", "tcp6": - // Parse the address into host and numeric port. - host, portString, err := net.SplitHostPort(addr) - if err != nil { - return nil, err - } - port, err := strconv.ParseUint(portString, 10, 16) - if err != nil { - return nil, err - } - ch, err = c.dial(net.IPv4zero.String(), 0, host, int(port)) - if err != nil { - return nil, err - } - // Use a zero address for local and remote address. - zeroAddr := &net.TCPAddr{ - IP: net.IPv4zero, - Port: 0, - } - return &chanConn{ - Channel: ch, - laddr: zeroAddr, - raddr: zeroAddr, - }, nil - case "unix": - var err error - ch, err = c.dialStreamLocal(addr) - if err != nil { - return nil, err - } - return &chanConn{ - Channel: ch, - laddr: &net.UnixAddr{ - Name: "@", - Net: "unix", - }, - raddr: &net.UnixAddr{ - Name: addr, - Net: "unix", - }, - }, nil - default: - return nil, fmt.Errorf("ssh: unsupported protocol: %s", n) - } -} - -// DialTCP connects to the remote address raddr on the network net, -// which must be "tcp", "tcp4", or "tcp6". If laddr is not nil, it is used -// as the local address for the connection. -func (c *Client) DialTCP(n string, laddr, raddr *net.TCPAddr) (net.Conn, error) { - if laddr == nil { - laddr = &net.TCPAddr{ - IP: net.IPv4zero, - Port: 0, - } - } - ch, err := c.dial(laddr.IP.String(), laddr.Port, raddr.IP.String(), raddr.Port) - if err != nil { - return nil, err - } - return &chanConn{ - Channel: ch, - laddr: laddr, - raddr: raddr, - }, nil -} - -// RFC 4254 7.2 -type channelOpenDirectMsg struct { - raddr string - rport uint32 - laddr string - lport uint32 -} - -func (c *Client) dial(laddr string, lport int, raddr string, rport int) (Channel, error) { - msg := channelOpenDirectMsg{ - raddr: raddr, - rport: uint32(rport), - laddr: laddr, - lport: uint32(lport), - } - ch, in, err := c.OpenChannel("direct-tcpip", Marshal(&msg)) - if err != nil { - return nil, err - } - go DiscardRequests(in) - return ch, err -} - -type tcpChan struct { - Channel // the backing channel -} - -// chanConn fulfills the net.Conn interface without -// the tcpChan having to hold laddr or raddr directly. -type chanConn struct { - Channel - laddr, raddr net.Addr -} - -// LocalAddr returns the local network address. -func (t *chanConn) LocalAddr() net.Addr { - return t.laddr -} - -// RemoteAddr returns the remote network address. -func (t *chanConn) RemoteAddr() net.Addr { - return t.raddr -} - -// SetDeadline sets the read and write deadlines associated -// with the connection. -func (t *chanConn) SetDeadline(deadline time.Time) error { - if err := t.SetReadDeadline(deadline); err != nil { - return err - } - return t.SetWriteDeadline(deadline) -} - -// SetReadDeadline sets the read deadline. -// A zero value for t means Read will not time out. -// After the deadline, the error from Read will implement net.Error -// with Timeout() == true. -func (t *chanConn) SetReadDeadline(deadline time.Time) error { - // for compatibility with previous version, - // the error message contains "tcpChan" - return errors.New("ssh: tcpChan: deadline not supported") -} - -// SetWriteDeadline exists to satisfy the net.Conn interface -// but is not implemented by this type. It always returns an error. -func (t *chanConn) SetWriteDeadline(deadline time.Time) error { - return errors.New("ssh: tcpChan: deadline not supported") -} diff --git a/vendor/golang.org/x/crypto/ssh/tcpip_test.go b/vendor/golang.org/x/crypto/ssh/tcpip_test.go deleted file mode 100644 index f1265cb4..00000000 --- a/vendor/golang.org/x/crypto/ssh/tcpip_test.go +++ /dev/null @@ -1,20 +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 ssh - -import ( - "testing" -) - -func TestAutoPortListenBroken(t *testing.T) { - broken := "SSH-2.0-OpenSSH_5.9hh11" - works := "SSH-2.0-OpenSSH_6.1" - if !isBrokenOpenSSHVersion(broken) { - t.Errorf("version %q not marked as broken", broken) - } - if isBrokenOpenSSHVersion(works) { - t.Errorf("version %q marked as broken", works) - } -} diff --git a/vendor/golang.org/x/crypto/ssh/terminal/terminal_test.go b/vendor/golang.org/x/crypto/ssh/terminal/terminal_test.go deleted file mode 100644 index d9b77c1c..00000000 --- a/vendor/golang.org/x/crypto/ssh/terminal/terminal_test.go +++ /dev/null @@ -1,358 +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. - -// +build darwin dragonfly freebsd linux,!appengine netbsd openbsd windows plan9 solaris - -package terminal - -import ( - "bytes" - "io" - "os" - "runtime" - "testing" -) - -type MockTerminal struct { - toSend []byte - bytesPerRead int - received []byte -} - -func (c *MockTerminal) Read(data []byte) (n int, err error) { - n = len(data) - if n == 0 { - return - } - if n > len(c.toSend) { - n = len(c.toSend) - } - if n == 0 { - return 0, io.EOF - } - if c.bytesPerRead > 0 && n > c.bytesPerRead { - n = c.bytesPerRead - } - copy(data, c.toSend[:n]) - c.toSend = c.toSend[n:] - return -} - -func (c *MockTerminal) Write(data []byte) (n int, err error) { - c.received = append(c.received, data...) - return len(data), nil -} - -func TestClose(t *testing.T) { - c := &MockTerminal{} - ss := NewTerminal(c, "> ") - line, err := ss.ReadLine() - if line != "" { - t.Errorf("Expected empty line but got: %s", line) - } - if err != io.EOF { - t.Errorf("Error should have been EOF but got: %s", err) - } -} - -var keyPressTests = []struct { - in string - line string - err error - throwAwayLines int -}{ - { - err: io.EOF, - }, - { - in: "\r", - line: "", - }, - { - in: "foo\r", - line: "foo", - }, - { - in: "a\x1b[Cb\r", // right - line: "ab", - }, - { - in: "a\x1b[Db\r", // left - line: "ba", - }, - { - in: "a\177b\r", // backspace - line: "b", - }, - { - in: "\x1b[A\r", // up - }, - { - in: "\x1b[B\r", // down - }, - { - in: "line\x1b[A\x1b[B\r", // up then down - line: "line", - }, - { - in: "line1\rline2\x1b[A\r", // recall previous line. - line: "line1", - throwAwayLines: 1, - }, - { - // recall two previous lines and append. - in: "line1\rline2\rline3\x1b[A\x1b[Axxx\r", - line: "line1xxx", - throwAwayLines: 2, - }, - { - // Ctrl-A to move to beginning of line followed by ^K to kill - // line. - in: "a b \001\013\r", - line: "", - }, - { - // Ctrl-A to move to beginning of line, Ctrl-E to move to end, - // finally ^K to kill nothing. - in: "a b \001\005\013\r", - line: "a b ", - }, - { - in: "\027\r", - line: "", - }, - { - in: "a\027\r", - line: "", - }, - { - in: "a \027\r", - line: "", - }, - { - in: "a b\027\r", - line: "a ", - }, - { - in: "a b \027\r", - line: "a ", - }, - { - in: "one two thr\x1b[D\027\r", - line: "one two r", - }, - { - in: "\013\r", - line: "", - }, - { - in: "a\013\r", - line: "a", - }, - { - in: "ab\x1b[D\013\r", - line: "a", - }, - { - in: "Ξεσκεπάζω\r", - line: "Ξεσκεπάζω", - }, - { - in: "£\r\x1b[A\177\r", // non-ASCII char, enter, up, backspace. - line: "", - throwAwayLines: 1, - }, - { - in: "£\r££\x1b[A\x1b[B\177\r", // non-ASCII char, enter, 2x non-ASCII, up, down, backspace, enter. - line: "£", - throwAwayLines: 1, - }, - { - // Ctrl-D at the end of the line should be ignored. - in: "a\004\r", - line: "a", - }, - { - // a, b, left, Ctrl-D should erase the b. - in: "ab\x1b[D\004\r", - line: "a", - }, - { - // a, b, c, d, left, left, ^U should erase to the beginning of - // the line. - in: "abcd\x1b[D\x1b[D\025\r", - line: "cd", - }, - { - // Bracketed paste mode: control sequences should be returned - // verbatim in paste mode. - in: "abc\x1b[200~de\177f\x1b[201~\177\r", - line: "abcde\177", - }, - { - // Enter in bracketed paste mode should still work. - in: "abc\x1b[200~d\refg\x1b[201~h\r", - line: "efgh", - throwAwayLines: 1, - }, - { - // Lines consisting entirely of pasted data should be indicated as such. - in: "\x1b[200~a\r", - line: "a", - err: ErrPasteIndicator, - }, -} - -func TestKeyPresses(t *testing.T) { - for i, test := range keyPressTests { - for j := 1; j < len(test.in); j++ { - c := &MockTerminal{ - toSend: []byte(test.in), - bytesPerRead: j, - } - ss := NewTerminal(c, "> ") - for k := 0; k < test.throwAwayLines; k++ { - _, err := ss.ReadLine() - if err != nil { - t.Errorf("Throwaway line %d from test %d resulted in error: %s", k, i, err) - } - } - line, err := ss.ReadLine() - if line != test.line { - t.Errorf("Line resulting from test %d (%d bytes per read) was '%s', expected '%s'", i, j, line, test.line) - break - } - if err != test.err { - t.Errorf("Error resulting from test %d (%d bytes per read) was '%v', expected '%v'", i, j, err, test.err) - break - } - } - } -} - -func TestPasswordNotSaved(t *testing.T) { - c := &MockTerminal{ - toSend: []byte("password\r\x1b[A\r"), - bytesPerRead: 1, - } - ss := NewTerminal(c, "> ") - pw, _ := ss.ReadPassword("> ") - if pw != "password" { - t.Fatalf("failed to read password, got %s", pw) - } - line, _ := ss.ReadLine() - if len(line) > 0 { - t.Fatalf("password was saved in history") - } -} - -var setSizeTests = []struct { - width, height int -}{ - {40, 13}, - {80, 24}, - {132, 43}, -} - -func TestTerminalSetSize(t *testing.T) { - for _, setSize := range setSizeTests { - c := &MockTerminal{ - toSend: []byte("password\r\x1b[A\r"), - bytesPerRead: 1, - } - ss := NewTerminal(c, "> ") - ss.SetSize(setSize.width, setSize.height) - pw, _ := ss.ReadPassword("Password: ") - if pw != "password" { - t.Fatalf("failed to read password, got %s", pw) - } - if string(c.received) != "Password: \r\n" { - t.Errorf("failed to set the temporary prompt expected %q, got %q", "Password: ", c.received) - } - } -} - -func TestReadPasswordLineEnd(t *testing.T) { - var tests = []struct { - input string - want string - }{ - {"\n", ""}, - {"\r\n", ""}, - {"test\r\n", "test"}, - {"testtesttesttes\n", "testtesttesttes"}, - {"testtesttesttes\r\n", "testtesttesttes"}, - {"testtesttesttesttest\n", "testtesttesttesttest"}, - {"testtesttesttesttest\r\n", "testtesttesttesttest"}, - } - for _, test := range tests { - buf := new(bytes.Buffer) - if _, err := buf.WriteString(test.input); err != nil { - t.Fatal(err) - } - - have, err := readPasswordLine(buf) - if err != nil { - t.Errorf("readPasswordLine(%q) failed: %v", test.input, err) - continue - } - if string(have) != test.want { - t.Errorf("readPasswordLine(%q) returns %q, but %q is expected", test.input, string(have), test.want) - continue - } - - if _, err = buf.WriteString(test.input); err != nil { - t.Fatal(err) - } - have, err = readPasswordLine(buf) - if err != nil { - t.Errorf("readPasswordLine(%q) failed: %v", test.input, err) - continue - } - if string(have) != test.want { - t.Errorf("readPasswordLine(%q) returns %q, but %q is expected", test.input, string(have), test.want) - continue - } - } -} - -func TestMakeRawState(t *testing.T) { - fd := int(os.Stdout.Fd()) - if !IsTerminal(fd) { - t.Skip("stdout is not a terminal; skipping test") - } - - st, err := GetState(fd) - if err != nil { - t.Fatalf("failed to get terminal state from GetState: %s", err) - } - - if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") { - t.Skip("MakeRaw not allowed on iOS; skipping test") - } - - defer Restore(fd, st) - raw, err := MakeRaw(fd) - if err != nil { - t.Fatalf("failed to get terminal state from MakeRaw: %s", err) - } - - if *st != *raw { - t.Errorf("states do not match; was %v, expected %v", raw, st) - } -} - -func TestOutputNewlines(t *testing.T) { - // \n should be changed to \r\n in terminal output. - buf := new(bytes.Buffer) - term := NewTerminal(buf, ">") - - term.Write([]byte("1\n2\n")) - output := string(buf.Bytes()) - const expected = "1\r\n2\r\n" - - if output != expected { - t.Errorf("incorrect output: was %q, expected %q", output, expected) - } -} diff --git a/vendor/golang.org/x/crypto/ssh/testdata_test.go b/vendor/golang.org/x/crypto/ssh/testdata_test.go deleted file mode 100644 index 2da8c79d..00000000 --- a/vendor/golang.org/x/crypto/ssh/testdata_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. - -// IMPLEMENTATION NOTE: To avoid a package loop, this file is in three places: -// ssh/, ssh/agent, and ssh/test/. It should be kept in sync across all three -// instances. - -package ssh - -import ( - "crypto/rand" - "fmt" - - "golang.org/x/crypto/ssh/testdata" -) - -var ( - testPrivateKeys map[string]interface{} - testSigners map[string]Signer - testPublicKeys map[string]PublicKey -) - -func init() { - var err error - - n := len(testdata.PEMBytes) - testPrivateKeys = make(map[string]interface{}, n) - testSigners = make(map[string]Signer, n) - testPublicKeys = make(map[string]PublicKey, n) - for t, k := range testdata.PEMBytes { - testPrivateKeys[t], err = ParseRawPrivateKey(k) - if err != nil { - panic(fmt.Sprintf("Unable to parse test key %s: %v", t, err)) - } - testSigners[t], err = NewSignerFromKey(testPrivateKeys[t]) - if err != nil { - panic(fmt.Sprintf("Unable to create signer for test key %s: %v", t, err)) - } - testPublicKeys[t] = testSigners[t].PublicKey() - } - - // Create a cert and sign it for use in tests. - testCert := &Certificate{ - Nonce: []byte{}, // To pass reflect.DeepEqual after marshal & parse, this must be non-nil - ValidPrincipals: []string{"gopher1", "gopher2"}, // increases test coverage - ValidAfter: 0, // unix epoch - ValidBefore: CertTimeInfinity, // The end of currently representable time. - Reserved: []byte{}, // To pass reflect.DeepEqual after marshal & parse, this must be non-nil - Key: testPublicKeys["ecdsa"], - SignatureKey: testPublicKeys["rsa"], - Permissions: Permissions{ - CriticalOptions: map[string]string{}, - Extensions: map[string]string{}, - }, - } - testCert.SignCert(rand.Reader, testSigners["rsa"]) - testPrivateKeys["cert"] = testPrivateKeys["ecdsa"] - testSigners["cert"], err = NewCertSigner(testCert, testSigners["ecdsa"]) - if err != nil { - panic(fmt.Sprintf("Unable to create certificate signer: %v", err)) - } -} diff --git a/vendor/golang.org/x/crypto/ssh/transport.go b/vendor/golang.org/x/crypto/ssh/transport.go deleted file mode 100644 index f6fae1db..00000000 --- a/vendor/golang.org/x/crypto/ssh/transport.go +++ /dev/null @@ -1,353 +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 ssh - -import ( - "bufio" - "bytes" - "errors" - "io" - "log" -) - -// debugTransport if set, will print packet types as they go over the -// wire. No message decoding is done, to minimize the impact on timing. -const debugTransport = false - -const ( - gcmCipherID = "aes128-gcm@openssh.com" - aes128cbcID = "aes128-cbc" - tripledescbcID = "3des-cbc" -) - -// packetConn represents a transport that implements packet based -// operations. -type packetConn interface { - // Encrypt and send a packet of data to the remote peer. - writePacket(packet []byte) error - - // Read a packet from the connection. The read is blocking, - // i.e. if error is nil, then the returned byte slice is - // always non-empty. - readPacket() ([]byte, error) - - // Close closes the write-side of the connection. - Close() error -} - -// transport is the keyingTransport that implements the SSH packet -// protocol. -type transport struct { - reader connectionState - writer connectionState - - bufReader *bufio.Reader - bufWriter *bufio.Writer - rand io.Reader - isClient bool - io.Closer -} - -// packetCipher represents a combination of SSH encryption/MAC -// protocol. A single instance should be used for one direction only. -type packetCipher interface { - // writePacket encrypts the packet and writes it to w. The - // contents of the packet are generally scrambled. - writePacket(seqnum uint32, w io.Writer, rand io.Reader, packet []byte) error - - // readPacket reads and decrypts a packet of data. The - // returned packet may be overwritten by future calls of - // readPacket. - readPacket(seqnum uint32, r io.Reader) ([]byte, error) -} - -// connectionState represents one side (read or write) of the -// connection. This is necessary because each direction has its own -// keys, and can even have its own algorithms -type connectionState struct { - packetCipher - seqNum uint32 - dir direction - pendingKeyChange chan packetCipher -} - -// prepareKeyChange sets up key material for a keychange. The key changes in -// both directions are triggered by reading and writing a msgNewKey packet -// respectively. -func (t *transport) prepareKeyChange(algs *algorithms, kexResult *kexResult) error { - ciph, err := newPacketCipher(t.reader.dir, algs.r, kexResult) - if err != nil { - return err - } - t.reader.pendingKeyChange <- ciph - - ciph, err = newPacketCipher(t.writer.dir, algs.w, kexResult) - if err != nil { - return err - } - t.writer.pendingKeyChange <- ciph - - return nil -} - -func (t *transport) printPacket(p []byte, write bool) { - if len(p) == 0 { - return - } - who := "server" - if t.isClient { - who = "client" - } - what := "read" - if write { - what = "write" - } - - log.Println(what, who, p[0]) -} - -// Read and decrypt next packet. -func (t *transport) readPacket() (p []byte, err error) { - for { - p, err = t.reader.readPacket(t.bufReader) - if err != nil { - break - } - if len(p) == 0 || (p[0] != msgIgnore && p[0] != msgDebug) { - break - } - } - if debugTransport { - t.printPacket(p, false) - } - - return p, err -} - -func (s *connectionState) readPacket(r *bufio.Reader) ([]byte, error) { - packet, err := s.packetCipher.readPacket(s.seqNum, r) - s.seqNum++ - if err == nil && len(packet) == 0 { - err = errors.New("ssh: zero length packet") - } - - if len(packet) > 0 { - switch packet[0] { - case msgNewKeys: - select { - case cipher := <-s.pendingKeyChange: - s.packetCipher = cipher - default: - return nil, errors.New("ssh: got bogus newkeys message") - } - - case msgDisconnect: - // Transform a disconnect message into an - // error. Since this is lowest level at which - // we interpret message types, doing it here - // ensures that we don't have to handle it - // elsewhere. - var msg disconnectMsg - if err := Unmarshal(packet, &msg); err != nil { - return nil, err - } - return nil, &msg - } - } - - // The packet may point to an internal buffer, so copy the - // packet out here. - fresh := make([]byte, len(packet)) - copy(fresh, packet) - - return fresh, err -} - -func (t *transport) writePacket(packet []byte) error { - if debugTransport { - t.printPacket(packet, true) - } - return t.writer.writePacket(t.bufWriter, t.rand, packet) -} - -func (s *connectionState) writePacket(w *bufio.Writer, rand io.Reader, packet []byte) error { - changeKeys := len(packet) > 0 && packet[0] == msgNewKeys - - err := s.packetCipher.writePacket(s.seqNum, w, rand, packet) - if err != nil { - return err - } - if err = w.Flush(); err != nil { - return err - } - s.seqNum++ - if changeKeys { - select { - case cipher := <-s.pendingKeyChange: - s.packetCipher = cipher - default: - panic("ssh: no key material for msgNewKeys") - } - } - return err -} - -func newTransport(rwc io.ReadWriteCloser, rand io.Reader, isClient bool) *transport { - t := &transport{ - bufReader: bufio.NewReader(rwc), - bufWriter: bufio.NewWriter(rwc), - rand: rand, - reader: connectionState{ - packetCipher: &streamPacketCipher{cipher: noneCipher{}}, - pendingKeyChange: make(chan packetCipher, 1), - }, - writer: connectionState{ - packetCipher: &streamPacketCipher{cipher: noneCipher{}}, - pendingKeyChange: make(chan packetCipher, 1), - }, - Closer: rwc, - } - t.isClient = isClient - - if isClient { - t.reader.dir = serverKeys - t.writer.dir = clientKeys - } else { - t.reader.dir = clientKeys - t.writer.dir = serverKeys - } - - return t -} - -type direction struct { - ivTag []byte - keyTag []byte - macKeyTag []byte -} - -var ( - serverKeys = direction{[]byte{'B'}, []byte{'D'}, []byte{'F'}} - clientKeys = direction{[]byte{'A'}, []byte{'C'}, []byte{'E'}} -) - -// setupKeys sets the cipher and MAC keys from kex.K, kex.H and sessionId, as -// described in RFC 4253, section 6.4. direction should either be serverKeys -// (to setup server->client keys) or clientKeys (for client->server keys). -func newPacketCipher(d direction, algs directionAlgorithms, kex *kexResult) (packetCipher, error) { - cipherMode := cipherModes[algs.Cipher] - macMode := macModes[algs.MAC] - - iv := make([]byte, cipherMode.ivSize) - key := make([]byte, cipherMode.keySize) - macKey := make([]byte, macMode.keySize) - - generateKeyMaterial(iv, d.ivTag, kex) - generateKeyMaterial(key, d.keyTag, kex) - generateKeyMaterial(macKey, d.macKeyTag, kex) - - return cipherModes[algs.Cipher].create(key, iv, macKey, algs) -} - -// generateKeyMaterial fills out with key material generated from tag, K, H -// and sessionId, as specified in RFC 4253, section 7.2. -func generateKeyMaterial(out, tag []byte, r *kexResult) { - var digestsSoFar []byte - - h := r.Hash.New() - for len(out) > 0 { - h.Reset() - h.Write(r.K) - h.Write(r.H) - - if len(digestsSoFar) == 0 { - h.Write(tag) - h.Write(r.SessionID) - } else { - h.Write(digestsSoFar) - } - - digest := h.Sum(nil) - n := copy(out, digest) - out = out[n:] - if len(out) > 0 { - digestsSoFar = append(digestsSoFar, digest...) - } - } -} - -const packageVersion = "SSH-2.0-Go" - -// Sends and receives a version line. The versionLine string should -// be US ASCII, start with "SSH-2.0-", and should not include a -// newline. exchangeVersions returns the other side's version line. -func exchangeVersions(rw io.ReadWriter, versionLine []byte) (them []byte, err error) { - // Contrary to the RFC, we do not ignore lines that don't - // start with "SSH-2.0-" to make the library usable with - // nonconforming servers. - for _, c := range versionLine { - // The spec disallows non US-ASCII chars, and - // specifically forbids null chars. - if c < 32 { - return nil, errors.New("ssh: junk character in version line") - } - } - if _, err = rw.Write(append(versionLine, '\r', '\n')); err != nil { - return - } - - them, err = readVersion(rw) - return them, err -} - -// maxVersionStringBytes is the maximum number of bytes that we'll -// accept as a version string. RFC 4253 section 4.2 limits this at 255 -// chars -const maxVersionStringBytes = 255 - -// Read version string as specified by RFC 4253, section 4.2. -func readVersion(r io.Reader) ([]byte, error) { - versionString := make([]byte, 0, 64) - var ok bool - var buf [1]byte - - for length := 0; length < maxVersionStringBytes; length++ { - _, err := io.ReadFull(r, buf[:]) - if err != nil { - return nil, err - } - // The RFC says that the version should be terminated with \r\n - // but several SSH servers actually only send a \n. - if buf[0] == '\n' { - if !bytes.HasPrefix(versionString, []byte("SSH-")) { - // RFC 4253 says we need to ignore all version string lines - // except the one containing the SSH version (provided that - // all the lines do not exceed 255 bytes in total). - versionString = versionString[:0] - continue - } - ok = true - break - } - - // non ASCII chars are disallowed, but we are lenient, - // since Go doesn't use null-terminated strings. - - // The RFC allows a comment after a space, however, - // all of it (version and comments) goes into the - // session hash. - versionString = append(versionString, buf[0]) - } - - if !ok { - return nil, errors.New("ssh: overflow reading version string") - } - - // There might be a '\r' on the end which we should remove. - if len(versionString) > 0 && versionString[len(versionString)-1] == '\r' { - versionString = versionString[:len(versionString)-1] - } - return versionString, nil -} diff --git a/vendor/golang.org/x/crypto/ssh/transport_test.go b/vendor/golang.org/x/crypto/ssh/transport_test.go deleted file mode 100644 index 8445e1e5..00000000 --- a/vendor/golang.org/x/crypto/ssh/transport_test.go +++ /dev/null @@ -1,113 +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 ssh - -import ( - "bytes" - "crypto/rand" - "encoding/binary" - "strings" - "testing" -) - -func TestReadVersion(t *testing.T) { - longVersion := strings.Repeat("SSH-2.0-bla", 50)[:253] - multiLineVersion := strings.Repeat("ignored\r\n", 20) + "SSH-2.0-bla\r\n" - cases := map[string]string{ - "SSH-2.0-bla\r\n": "SSH-2.0-bla", - "SSH-2.0-bla\n": "SSH-2.0-bla", - multiLineVersion: "SSH-2.0-bla", - longVersion + "\r\n": longVersion, - } - - for in, want := range cases { - result, err := readVersion(bytes.NewBufferString(in)) - if err != nil { - t.Errorf("readVersion(%q): %s", in, err) - } - got := string(result) - if got != want { - t.Errorf("got %q, want %q", got, want) - } - } -} - -func TestReadVersionError(t *testing.T) { - longVersion := strings.Repeat("SSH-2.0-bla", 50)[:253] - multiLineVersion := strings.Repeat("ignored\r\n", 50) + "SSH-2.0-bla\r\n" - cases := []string{ - longVersion + "too-long\r\n", - multiLineVersion, - } - for _, in := range cases { - if _, err := readVersion(bytes.NewBufferString(in)); err == nil { - t.Errorf("readVersion(%q) should have failed", in) - } - } -} - -func TestExchangeVersionsBasic(t *testing.T) { - v := "SSH-2.0-bla" - buf := bytes.NewBufferString(v + "\r\n") - them, err := exchangeVersions(buf, []byte("xyz")) - if err != nil { - t.Errorf("exchangeVersions: %v", err) - } - - if want := "SSH-2.0-bla"; string(them) != want { - t.Errorf("got %q want %q for our version", them, want) - } -} - -func TestExchangeVersions(t *testing.T) { - cases := []string{ - "not\x000allowed", - "not allowed\x01\r\n", - } - for _, c := range cases { - buf := bytes.NewBufferString("SSH-2.0-bla\r\n") - if _, err := exchangeVersions(buf, []byte(c)); err == nil { - t.Errorf("exchangeVersions(%q): should have failed", c) - } - } -} - -type closerBuffer struct { - bytes.Buffer -} - -func (b *closerBuffer) Close() error { - return nil -} - -func TestTransportMaxPacketWrite(t *testing.T) { - buf := &closerBuffer{} - tr := newTransport(buf, rand.Reader, true) - huge := make([]byte, maxPacket+1) - err := tr.writePacket(huge) - if err == nil { - t.Errorf("transport accepted write for a huge packet.") - } -} - -func TestTransportMaxPacketReader(t *testing.T) { - var header [5]byte - huge := make([]byte, maxPacket+128) - binary.BigEndian.PutUint32(header[0:], uint32(len(huge))) - // padding. - header[4] = 0 - - buf := &closerBuffer{} - buf.Write(header[:]) - buf.Write(huge) - - tr := newTransport(buf, rand.Reader, true) - _, err := tr.readPacket() - if err == nil { - t.Errorf("transport succeeded reading huge packet.") - } else if !strings.Contains(err.Error(), "large") { - t.Errorf("got %q, should mention %q", err.Error(), "large") - } -} diff --git a/vendor/golang.org/x/net/.gitattributes b/vendor/golang.org/x/net/.gitattributes deleted file mode 100644 index d2f212e5..00000000 --- a/vendor/golang.org/x/net/.gitattributes +++ /dev/null @@ -1,10 +0,0 @@ -# Treat all files in this repo as binary, with no git magic updating -# line endings. Windows users contributing to Go will need to use a -# modern version of git and editors capable of LF line endings. -# -# We'll prevent accidental CRLF line endings from entering the repo -# via the git-review gofmt checks. -# -# See golang.org/issue/9281 - -* -text diff --git a/vendor/golang.org/x/net/.gitignore b/vendor/golang.org/x/net/.gitignore deleted file mode 100644 index 8339fd61..00000000 --- a/vendor/golang.org/x/net/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Add no patterns to .hgignore except for files generated by the build. -last-change diff --git a/vendor/golang.org/x/net/CONTRIBUTING.md b/vendor/golang.org/x/net/CONTRIBUTING.md deleted file mode 100644 index d0485e88..00000000 --- a/vendor/golang.org/x/net/CONTRIBUTING.md +++ /dev/null @@ -1,26 +0,0 @@ -# Contributing to Go - -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? - -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. - -## Contributing code - -Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) -before sending patches. - -Unless otherwise noted, the Go source files are distributed under -the BSD-style license found in the LICENSE file. diff --git a/vendor/golang.org/x/net/README.md b/vendor/golang.org/x/net/README.md deleted file mode 100644 index 00a9b6eb..00000000 --- a/vendor/golang.org/x/net/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Go Networking - -This repository holds supplementary Go networking libraries. - -## Download/Install - -The easiest way to install is to run `go get -u golang.org/x/net`. You can -also manually git clone the repository to `$GOPATH/src/golang.org/x/net`. - -## Report Issues / Send Patches - -This repository uses Gerrit for code changes. To learn how to submit -changes to this repository, see https://golang.org/doc/contribute.html. -The main issue tracker for the net repository is located at -https://github.com/golang/go/issues. Prefix your issue with "x/net:" in the -subject line, so it is easy to find. diff --git a/vendor/golang.org/x/net/codereview.cfg b/vendor/golang.org/x/net/codereview.cfg deleted file mode 100644 index 3f8b14b6..00000000 --- a/vendor/golang.org/x/net/codereview.cfg +++ /dev/null @@ -1 +0,0 @@ -issuerepo: golang/go diff --git a/vendor/golang.org/x/net/context/context_test.go b/vendor/golang.org/x/net/context/context_test.go deleted file mode 100644 index 62844131..00000000 --- a/vendor/golang.org/x/net/context/context_test.go +++ /dev/null @@ -1,583 +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 !go1.7 - -package context - -import ( - "fmt" - "math/rand" - "runtime" - "strings" - "sync" - "testing" - "time" -) - -// otherContext is a Context that's not one of the types defined in context.go. -// This lets us test code paths that differ based on the underlying type of the -// Context. -type otherContext struct { - Context -} - -func TestBackground(t *testing.T) { - c := Background() - if c == nil { - t.Fatalf("Background returned nil") - } - select { - case x := <-c.Done(): - t.Errorf("<-c.Done() == %v want nothing (it should block)", x) - default: - } - if got, want := fmt.Sprint(c), "context.Background"; got != want { - t.Errorf("Background().String() = %q want %q", got, want) - } -} - -func TestTODO(t *testing.T) { - c := TODO() - if c == nil { - t.Fatalf("TODO returned nil") - } - select { - case x := <-c.Done(): - t.Errorf("<-c.Done() == %v want nothing (it should block)", x) - default: - } - if got, want := fmt.Sprint(c), "context.TODO"; got != want { - t.Errorf("TODO().String() = %q want %q", got, want) - } -} - -func TestWithCancel(t *testing.T) { - c1, cancel := WithCancel(Background()) - - if got, want := fmt.Sprint(c1), "context.Background.WithCancel"; got != want { - t.Errorf("c1.String() = %q want %q", got, want) - } - - o := otherContext{c1} - c2, _ := WithCancel(o) - contexts := []Context{c1, o, c2} - - for i, c := range contexts { - if d := c.Done(); d == nil { - t.Errorf("c[%d].Done() == %v want non-nil", i, d) - } - if e := c.Err(); e != nil { - t.Errorf("c[%d].Err() == %v want nil", i, e) - } - - select { - case x := <-c.Done(): - t.Errorf("<-c.Done() == %v want nothing (it should block)", x) - default: - } - } - - cancel() - time.Sleep(100 * time.Millisecond) // let cancelation propagate - - for i, c := range contexts { - select { - case <-c.Done(): - default: - t.Errorf("<-c[%d].Done() blocked, but shouldn't have", i) - } - if e := c.Err(); e != Canceled { - t.Errorf("c[%d].Err() == %v want %v", i, e, Canceled) - } - } -} - -func TestParentFinishesChild(t *testing.T) { - // Context tree: - // parent -> cancelChild - // parent -> valueChild -> timerChild - parent, cancel := WithCancel(Background()) - cancelChild, stop := WithCancel(parent) - defer stop() - valueChild := WithValue(parent, "key", "value") - timerChild, stop := WithTimeout(valueChild, 10000*time.Hour) - defer stop() - - select { - case x := <-parent.Done(): - t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) - case x := <-cancelChild.Done(): - t.Errorf("<-cancelChild.Done() == %v want nothing (it should block)", x) - case x := <-timerChild.Done(): - t.Errorf("<-timerChild.Done() == %v want nothing (it should block)", x) - case x := <-valueChild.Done(): - t.Errorf("<-valueChild.Done() == %v want nothing (it should block)", x) - default: - } - - // The parent's children should contain the two cancelable children. - pc := parent.(*cancelCtx) - cc := cancelChild.(*cancelCtx) - tc := timerChild.(*timerCtx) - pc.mu.Lock() - if len(pc.children) != 2 || !pc.children[cc] || !pc.children[tc] { - t.Errorf("bad linkage: pc.children = %v, want %v and %v", - pc.children, cc, tc) - } - pc.mu.Unlock() - - if p, ok := parentCancelCtx(cc.Context); !ok || p != pc { - t.Errorf("bad linkage: parentCancelCtx(cancelChild.Context) = %v, %v want %v, true", p, ok, pc) - } - if p, ok := parentCancelCtx(tc.Context); !ok || p != pc { - t.Errorf("bad linkage: parentCancelCtx(timerChild.Context) = %v, %v want %v, true", p, ok, pc) - } - - cancel() - - pc.mu.Lock() - if len(pc.children) != 0 { - t.Errorf("pc.cancel didn't clear pc.children = %v", pc.children) - } - pc.mu.Unlock() - - // parent and children should all be finished. - check := func(ctx Context, name string) { - select { - case <-ctx.Done(): - default: - t.Errorf("<-%s.Done() blocked, but shouldn't have", name) - } - if e := ctx.Err(); e != Canceled { - t.Errorf("%s.Err() == %v want %v", name, e, Canceled) - } - } - check(parent, "parent") - check(cancelChild, "cancelChild") - check(valueChild, "valueChild") - check(timerChild, "timerChild") - - // WithCancel should return a canceled context on a canceled parent. - precanceledChild := WithValue(parent, "key", "value") - select { - case <-precanceledChild.Done(): - default: - t.Errorf("<-precanceledChild.Done() blocked, but shouldn't have") - } - if e := precanceledChild.Err(); e != Canceled { - t.Errorf("precanceledChild.Err() == %v want %v", e, Canceled) - } -} - -func TestChildFinishesFirst(t *testing.T) { - cancelable, stop := WithCancel(Background()) - defer stop() - for _, parent := range []Context{Background(), cancelable} { - child, cancel := WithCancel(parent) - - select { - case x := <-parent.Done(): - t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) - case x := <-child.Done(): - t.Errorf("<-child.Done() == %v want nothing (it should block)", x) - default: - } - - cc := child.(*cancelCtx) - pc, pcok := parent.(*cancelCtx) // pcok == false when parent == Background() - if p, ok := parentCancelCtx(cc.Context); ok != pcok || (ok && pc != p) { - t.Errorf("bad linkage: parentCancelCtx(cc.Context) = %v, %v want %v, %v", p, ok, pc, pcok) - } - - if pcok { - pc.mu.Lock() - if len(pc.children) != 1 || !pc.children[cc] { - t.Errorf("bad linkage: pc.children = %v, cc = %v", pc.children, cc) - } - pc.mu.Unlock() - } - - cancel() - - if pcok { - pc.mu.Lock() - if len(pc.children) != 0 { - t.Errorf("child's cancel didn't remove self from pc.children = %v", pc.children) - } - pc.mu.Unlock() - } - - // child should be finished. - select { - case <-child.Done(): - default: - t.Errorf("<-child.Done() blocked, but shouldn't have") - } - if e := child.Err(); e != Canceled { - t.Errorf("child.Err() == %v want %v", e, Canceled) - } - - // parent should not be finished. - select { - case x := <-parent.Done(): - t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) - default: - } - if e := parent.Err(); e != nil { - t.Errorf("parent.Err() == %v want nil", e) - } - } -} - -func testDeadline(c Context, wait time.Duration, t *testing.T) { - select { - case <-time.After(wait): - t.Fatalf("context should have timed out") - case <-c.Done(): - } - if e := c.Err(); e != DeadlineExceeded { - t.Errorf("c.Err() == %v want %v", e, DeadlineExceeded) - } -} - -func TestDeadline(t *testing.T) { - t.Parallel() - const timeUnit = 500 * time.Millisecond - c, _ := WithDeadline(Background(), time.Now().Add(1*timeUnit)) - if got, prefix := fmt.Sprint(c), "context.Background.WithDeadline("; !strings.HasPrefix(got, prefix) { - t.Errorf("c.String() = %q want prefix %q", got, prefix) - } - testDeadline(c, 2*timeUnit, t) - - c, _ = WithDeadline(Background(), time.Now().Add(1*timeUnit)) - o := otherContext{c} - testDeadline(o, 2*timeUnit, t) - - c, _ = WithDeadline(Background(), time.Now().Add(1*timeUnit)) - o = otherContext{c} - c, _ = WithDeadline(o, time.Now().Add(3*timeUnit)) - testDeadline(c, 2*timeUnit, t) -} - -func TestTimeout(t *testing.T) { - t.Parallel() - const timeUnit = 500 * time.Millisecond - c, _ := WithTimeout(Background(), 1*timeUnit) - if got, prefix := fmt.Sprint(c), "context.Background.WithDeadline("; !strings.HasPrefix(got, prefix) { - t.Errorf("c.String() = %q want prefix %q", got, prefix) - } - testDeadline(c, 2*timeUnit, t) - - c, _ = WithTimeout(Background(), 1*timeUnit) - o := otherContext{c} - testDeadline(o, 2*timeUnit, t) - - c, _ = WithTimeout(Background(), 1*timeUnit) - o = otherContext{c} - c, _ = WithTimeout(o, 3*timeUnit) - testDeadline(c, 2*timeUnit, t) -} - -func TestCanceledTimeout(t *testing.T) { - t.Parallel() - const timeUnit = 500 * time.Millisecond - c, _ := WithTimeout(Background(), 2*timeUnit) - o := otherContext{c} - c, cancel := WithTimeout(o, 4*timeUnit) - cancel() - time.Sleep(1 * timeUnit) // let cancelation propagate - select { - case <-c.Done(): - default: - t.Errorf("<-c.Done() blocked, but shouldn't have") - } - if e := c.Err(); e != Canceled { - t.Errorf("c.Err() == %v want %v", e, Canceled) - } -} - -type key1 int -type key2 int - -var k1 = key1(1) -var k2 = key2(1) // same int as k1, different type -var k3 = key2(3) // same type as k2, different int - -func TestValues(t *testing.T) { - check := func(c Context, nm, v1, v2, v3 string) { - if v, ok := c.Value(k1).(string); ok == (len(v1) == 0) || v != v1 { - t.Errorf(`%s.Value(k1).(string) = %q, %t want %q, %t`, nm, v, ok, v1, len(v1) != 0) - } - if v, ok := c.Value(k2).(string); ok == (len(v2) == 0) || v != v2 { - t.Errorf(`%s.Value(k2).(string) = %q, %t want %q, %t`, nm, v, ok, v2, len(v2) != 0) - } - if v, ok := c.Value(k3).(string); ok == (len(v3) == 0) || v != v3 { - t.Errorf(`%s.Value(k3).(string) = %q, %t want %q, %t`, nm, v, ok, v3, len(v3) != 0) - } - } - - c0 := Background() - check(c0, "c0", "", "", "") - - c1 := WithValue(Background(), k1, "c1k1") - check(c1, "c1", "c1k1", "", "") - - if got, want := fmt.Sprint(c1), `context.Background.WithValue(1, "c1k1")`; got != want { - t.Errorf("c.String() = %q want %q", got, want) - } - - c2 := WithValue(c1, k2, "c2k2") - check(c2, "c2", "c1k1", "c2k2", "") - - c3 := WithValue(c2, k3, "c3k3") - check(c3, "c2", "c1k1", "c2k2", "c3k3") - - c4 := WithValue(c3, k1, nil) - check(c4, "c4", "", "c2k2", "c3k3") - - o0 := otherContext{Background()} - check(o0, "o0", "", "", "") - - o1 := otherContext{WithValue(Background(), k1, "c1k1")} - check(o1, "o1", "c1k1", "", "") - - o2 := WithValue(o1, k2, "o2k2") - check(o2, "o2", "c1k1", "o2k2", "") - - o3 := otherContext{c4} - check(o3, "o3", "", "c2k2", "c3k3") - - o4 := WithValue(o3, k3, nil) - check(o4, "o4", "", "c2k2", "") -} - -func TestAllocs(t *testing.T) { - bg := Background() - for _, test := range []struct { - desc string - f func() - limit float64 - gccgoLimit float64 - }{ - { - desc: "Background()", - f: func() { Background() }, - limit: 0, - gccgoLimit: 0, - }, - { - desc: fmt.Sprintf("WithValue(bg, %v, nil)", k1), - f: func() { - c := WithValue(bg, k1, nil) - c.Value(k1) - }, - limit: 3, - gccgoLimit: 3, - }, - { - desc: "WithTimeout(bg, 15*time.Millisecond)", - f: func() { - c, _ := WithTimeout(bg, 15*time.Millisecond) - <-c.Done() - }, - limit: 8, - gccgoLimit: 16, - }, - { - desc: "WithCancel(bg)", - f: func() { - c, cancel := WithCancel(bg) - cancel() - <-c.Done() - }, - limit: 5, - gccgoLimit: 8, - }, - { - desc: "WithTimeout(bg, 100*time.Millisecond)", - f: func() { - c, cancel := WithTimeout(bg, 100*time.Millisecond) - cancel() - <-c.Done() - }, - limit: 8, - gccgoLimit: 25, - }, - } { - limit := test.limit - if runtime.Compiler == "gccgo" { - // gccgo does not yet do escape analysis. - // TODO(iant): Remove this when gccgo does do escape analysis. - limit = test.gccgoLimit - } - if n := testing.AllocsPerRun(100, test.f); n > limit { - t.Errorf("%s allocs = %f want %d", test.desc, n, int(limit)) - } - } -} - -func TestSimultaneousCancels(t *testing.T) { - root, cancel := WithCancel(Background()) - m := map[Context]CancelFunc{root: cancel} - q := []Context{root} - // Create a tree of contexts. - for len(q) != 0 && len(m) < 100 { - parent := q[0] - q = q[1:] - for i := 0; i < 4; i++ { - ctx, cancel := WithCancel(parent) - m[ctx] = cancel - q = append(q, ctx) - } - } - // Start all the cancels in a random order. - var wg sync.WaitGroup - wg.Add(len(m)) - for _, cancel := range m { - go func(cancel CancelFunc) { - cancel() - wg.Done() - }(cancel) - } - // Wait on all the contexts in a random order. - for ctx := range m { - select { - case <-ctx.Done(): - case <-time.After(1 * time.Second): - buf := make([]byte, 10<<10) - n := runtime.Stack(buf, true) - t.Fatalf("timed out waiting for <-ctx.Done(); stacks:\n%s", buf[:n]) - } - } - // Wait for all the cancel functions to return. - done := make(chan struct{}) - go func() { - wg.Wait() - close(done) - }() - select { - case <-done: - case <-time.After(1 * time.Second): - buf := make([]byte, 10<<10) - n := runtime.Stack(buf, true) - t.Fatalf("timed out waiting for cancel functions; stacks:\n%s", buf[:n]) - } -} - -func TestInterlockedCancels(t *testing.T) { - parent, cancelParent := WithCancel(Background()) - child, cancelChild := WithCancel(parent) - go func() { - parent.Done() - cancelChild() - }() - cancelParent() - select { - case <-child.Done(): - case <-time.After(1 * time.Second): - buf := make([]byte, 10<<10) - n := runtime.Stack(buf, true) - t.Fatalf("timed out waiting for child.Done(); stacks:\n%s", buf[:n]) - } -} - -func TestLayersCancel(t *testing.T) { - testLayers(t, time.Now().UnixNano(), false) -} - -func TestLayersTimeout(t *testing.T) { - testLayers(t, time.Now().UnixNano(), true) -} - -func testLayers(t *testing.T, seed int64, testTimeout bool) { - rand.Seed(seed) - errorf := func(format string, a ...interface{}) { - t.Errorf(fmt.Sprintf("seed=%d: %s", seed, format), a...) - } - const ( - timeout = 200 * time.Millisecond - minLayers = 30 - ) - type value int - var ( - vals []*value - cancels []CancelFunc - numTimers int - ctx = Background() - ) - for i := 0; i < minLayers || numTimers == 0 || len(cancels) == 0 || len(vals) == 0; i++ { - switch rand.Intn(3) { - case 0: - v := new(value) - ctx = WithValue(ctx, v, v) - vals = append(vals, v) - case 1: - var cancel CancelFunc - ctx, cancel = WithCancel(ctx) - cancels = append(cancels, cancel) - case 2: - var cancel CancelFunc - ctx, cancel = WithTimeout(ctx, timeout) - cancels = append(cancels, cancel) - numTimers++ - } - } - checkValues := func(when string) { - for _, key := range vals { - if val := ctx.Value(key).(*value); key != val { - errorf("%s: ctx.Value(%p) = %p want %p", when, key, val, key) - } - } - } - select { - case <-ctx.Done(): - errorf("ctx should not be canceled yet") - default: - } - if s, prefix := fmt.Sprint(ctx), "context.Background."; !strings.HasPrefix(s, prefix) { - t.Errorf("ctx.String() = %q want prefix %q", s, prefix) - } - t.Log(ctx) - checkValues("before cancel") - if testTimeout { - select { - case <-ctx.Done(): - case <-time.After(timeout + 100*time.Millisecond): - errorf("ctx should have timed out") - } - checkValues("after timeout") - } else { - cancel := cancels[rand.Intn(len(cancels))] - cancel() - select { - case <-ctx.Done(): - default: - errorf("ctx should be canceled") - } - checkValues("after cancel") - } -} - -func TestCancelRemoves(t *testing.T) { - checkChildren := func(when string, ctx Context, want int) { - if got := len(ctx.(*cancelCtx).children); got != want { - t.Errorf("%s: context has %d children, want %d", when, got, want) - } - } - - ctx, _ := WithCancel(Background()) - checkChildren("after creation", ctx, 0) - _, cancel := WithCancel(ctx) - checkChildren("with WithCancel child ", ctx, 1) - cancel() - checkChildren("after cancelling WithCancel child", ctx, 0) - - ctx, _ = WithCancel(Background()) - checkChildren("after creation", ctx, 0) - _, cancel = WithTimeout(ctx, 60*time.Minute) - checkChildren("with WithTimeout child ", ctx, 1) - cancel() - checkChildren("after cancelling WithTimeout child", ctx, 0) -} diff --git a/vendor/golang.org/x/net/context/withtimeout_test.go b/vendor/golang.org/x/net/context/withtimeout_test.go deleted file mode 100644 index e6f56691..00000000 --- a/vendor/golang.org/x/net/context/withtimeout_test.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. - -package context_test - -import ( - "fmt" - "time" - - "golang.org/x/net/context" -) - -// This example passes a context with a timeout to tell a blocking function that -// it should abandon its work after the timeout elapses. -func ExampleWithTimeout() { - // Pass a context with a timeout to tell a blocking function that it - // should abandon its work after the timeout elapses. - ctx, cancel := context.WithTimeout(context.Background(), 50*time.Millisecond) - defer cancel() - - select { - case <-time.After(1 * time.Second): - fmt.Println("overslept") - case <-ctx.Done(): - fmt.Println(ctx.Err()) // prints "context deadline exceeded" - } - - // Output: - // context deadline exceeded -} diff --git a/vendor/golang.org/x/net/http/httpguts/httplex_test.go b/vendor/golang.org/x/net/http/httpguts/httplex_test.go deleted file mode 100644 index a2c57f39..00000000 --- a/vendor/golang.org/x/net/http/httpguts/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 httpguts - -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/vendor/golang.org/x/net/http2/.gitignore b/vendor/golang.org/x/net/http2/.gitignore deleted file mode 100644 index 190f1223..00000000 --- a/vendor/golang.org/x/net/http2/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -h2i/h2i diff --git a/vendor/golang.org/x/net/http2/Dockerfile b/vendor/golang.org/x/net/http2/Dockerfile deleted file mode 100644 index 53fc5257..00000000 --- a/vendor/golang.org/x/net/http2/Dockerfile +++ /dev/null @@ -1,51 +0,0 @@ -# -# This Dockerfile builds a recent curl with HTTP/2 client support, using -# a recent nghttp2 build. -# -# See the Makefile for how to tag it. If Docker and that image is found, the -# Go tests use this curl binary for integration tests. -# - -FROM ubuntu:trusty - -RUN apt-get update && \ - apt-get upgrade -y && \ - apt-get install -y git-core build-essential wget - -RUN apt-get install -y --no-install-recommends \ - autotools-dev libtool pkg-config zlib1g-dev \ - libcunit1-dev libssl-dev libxml2-dev libevent-dev \ - automake autoconf - -# The list of packages nghttp2 recommends for h2load: -RUN apt-get install -y --no-install-recommends make binutils \ - autoconf automake autotools-dev \ - libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev \ - libev-dev libevent-dev libjansson-dev libjemalloc-dev \ - cython python3.4-dev python-setuptools - -# Note: setting NGHTTP2_VER before the git clone, so an old git clone isn't cached: -ENV NGHTTP2_VER 895da9a -RUN cd /root && git clone https://github.com/tatsuhiro-t/nghttp2.git - -WORKDIR /root/nghttp2 -RUN git reset --hard $NGHTTP2_VER -RUN autoreconf -i -RUN automake -RUN autoconf -RUN ./configure -RUN make -RUN make install - -WORKDIR /root -RUN wget http://curl.haxx.se/download/curl-7.45.0.tar.gz -RUN tar -zxvf curl-7.45.0.tar.gz -WORKDIR /root/curl-7.45.0 -RUN ./configure --with-ssl --with-nghttp2=/usr/local -RUN make -RUN make install -RUN ldconfig - -CMD ["-h"] -ENTRYPOINT ["/usr/local/bin/curl"] - diff --git a/vendor/golang.org/x/net/http2/Makefile b/vendor/golang.org/x/net/http2/Makefile deleted file mode 100644 index 55fd826f..00000000 --- a/vendor/golang.org/x/net/http2/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -curlimage: - docker build -t gohttp2/curl . - diff --git a/vendor/golang.org/x/net/http2/README b/vendor/golang.org/x/net/http2/README deleted file mode 100644 index 360d5aa3..00000000 --- a/vendor/golang.org/x/net/http2/README +++ /dev/null @@ -1,20 +0,0 @@ -This is a work-in-progress HTTP/2 implementation for Go. - -It will eventually live in the Go standard library and won't require -any changes to your code to use. It will just be automatic. - -Status: - -* The server support is pretty good. A few things are missing - but are being worked on. -* The client work has just started but shares a lot of code - is coming along much quicker. - -Docs are at https://godoc.org/golang.org/x/net/http2 - -Demo test server at https://http2.golang.org/ - -Help & bug reports welcome! - -Contributing: https://golang.org/doc/contribute.html -Bugs: https://golang.org/issue/new?title=x/net/http2:+ diff --git a/vendor/golang.org/x/net/http2/ciphers_test.go b/vendor/golang.org/x/net/http2/ciphers_test.go deleted file mode 100644 index 764bbc8c..00000000 --- a/vendor/golang.org/x/net/http2/ciphers_test.go +++ /dev/null @@ -1,309 +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 http2 - -import "testing" - -func TestIsBadCipherBad(t *testing.T) { - for _, c := range badCiphers { - if !isBadCipher(c) { - t.Errorf("Wrong result for isBadCipher(%d), want true", c) - } - } -} - -// verify we don't give false positives on ciphers not on blacklist -func TestIsBadCipherGood(t *testing.T) { - goodCiphers := map[uint16]string{ - cipher_TLS_DHE_RSA_WITH_AES_256_CCM: "cipher_TLS_DHE_RSA_WITH_AES_256_CCM", - cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CCM: "cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CCM", - cipher_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: "cipher_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256", - } - for c, name := range goodCiphers { - if isBadCipher(c) { - t.Errorf("Wrong result for isBadCipher(%d) %s, want false", c, name) - } - } -} - -// copied from https://http2.github.io/http2-spec/#BadCipherSuites, -var badCiphers = []uint16{ - cipher_TLS_NULL_WITH_NULL_NULL, - cipher_TLS_RSA_WITH_NULL_MD5, - cipher_TLS_RSA_WITH_NULL_SHA, - cipher_TLS_RSA_EXPORT_WITH_RC4_40_MD5, - cipher_TLS_RSA_WITH_RC4_128_MD5, - cipher_TLS_RSA_WITH_RC4_128_SHA, - cipher_TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5, - cipher_TLS_RSA_WITH_IDEA_CBC_SHA, - cipher_TLS_RSA_EXPORT_WITH_DES40_CBC_SHA, - cipher_TLS_RSA_WITH_DES_CBC_SHA, - cipher_TLS_RSA_WITH_3DES_EDE_CBC_SHA, - cipher_TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA, - cipher_TLS_DH_DSS_WITH_DES_CBC_SHA, - cipher_TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA, - cipher_TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA, - cipher_TLS_DH_RSA_WITH_DES_CBC_SHA, - cipher_TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA, - cipher_TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA, - cipher_TLS_DHE_DSS_WITH_DES_CBC_SHA, - cipher_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA, - cipher_TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, - cipher_TLS_DHE_RSA_WITH_DES_CBC_SHA, - cipher_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA, - cipher_TLS_DH_anon_EXPORT_WITH_RC4_40_MD5, - cipher_TLS_DH_anon_WITH_RC4_128_MD5, - cipher_TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA, - cipher_TLS_DH_anon_WITH_DES_CBC_SHA, - cipher_TLS_DH_anon_WITH_3DES_EDE_CBC_SHA, - cipher_TLS_KRB5_WITH_DES_CBC_SHA, - cipher_TLS_KRB5_WITH_3DES_EDE_CBC_SHA, - cipher_TLS_KRB5_WITH_RC4_128_SHA, - cipher_TLS_KRB5_WITH_IDEA_CBC_SHA, - cipher_TLS_KRB5_WITH_DES_CBC_MD5, - cipher_TLS_KRB5_WITH_3DES_EDE_CBC_MD5, - cipher_TLS_KRB5_WITH_RC4_128_MD5, - cipher_TLS_KRB5_WITH_IDEA_CBC_MD5, - cipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA, - cipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA, - cipher_TLS_KRB5_EXPORT_WITH_RC4_40_SHA, - cipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5, - cipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5, - cipher_TLS_KRB5_EXPORT_WITH_RC4_40_MD5, - cipher_TLS_PSK_WITH_NULL_SHA, - cipher_TLS_DHE_PSK_WITH_NULL_SHA, - cipher_TLS_RSA_PSK_WITH_NULL_SHA, - cipher_TLS_RSA_WITH_AES_128_CBC_SHA, - cipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA, - cipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA, - cipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA, - cipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA, - cipher_TLS_DH_anon_WITH_AES_128_CBC_SHA, - cipher_TLS_RSA_WITH_AES_256_CBC_SHA, - cipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA, - cipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA, - cipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA, - cipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA, - cipher_TLS_DH_anon_WITH_AES_256_CBC_SHA, - cipher_TLS_RSA_WITH_NULL_SHA256, - cipher_TLS_RSA_WITH_AES_128_CBC_SHA256, - cipher_TLS_RSA_WITH_AES_256_CBC_SHA256, - cipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA256, - cipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA256, - cipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, - cipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA, - cipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA, - cipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA, - cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA, - cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, - cipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA, - cipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, - cipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA256, - cipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA256, - cipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, - cipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, - cipher_TLS_DH_anon_WITH_AES_128_CBC_SHA256, - cipher_TLS_DH_anon_WITH_AES_256_CBC_SHA256, - cipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA, - cipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA, - cipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA, - cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA, - cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, - cipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA, - cipher_TLS_PSK_WITH_RC4_128_SHA, - cipher_TLS_PSK_WITH_3DES_EDE_CBC_SHA, - cipher_TLS_PSK_WITH_AES_128_CBC_SHA, - cipher_TLS_PSK_WITH_AES_256_CBC_SHA, - cipher_TLS_DHE_PSK_WITH_RC4_128_SHA, - cipher_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA, - cipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA, - cipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA, - cipher_TLS_RSA_PSK_WITH_RC4_128_SHA, - cipher_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA, - cipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA, - cipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA, - cipher_TLS_RSA_WITH_SEED_CBC_SHA, - cipher_TLS_DH_DSS_WITH_SEED_CBC_SHA, - cipher_TLS_DH_RSA_WITH_SEED_CBC_SHA, - cipher_TLS_DHE_DSS_WITH_SEED_CBC_SHA, - cipher_TLS_DHE_RSA_WITH_SEED_CBC_SHA, - cipher_TLS_DH_anon_WITH_SEED_CBC_SHA, - cipher_TLS_RSA_WITH_AES_128_GCM_SHA256, - cipher_TLS_RSA_WITH_AES_256_GCM_SHA384, - cipher_TLS_DH_RSA_WITH_AES_128_GCM_SHA256, - cipher_TLS_DH_RSA_WITH_AES_256_GCM_SHA384, - cipher_TLS_DH_DSS_WITH_AES_128_GCM_SHA256, - cipher_TLS_DH_DSS_WITH_AES_256_GCM_SHA384, - cipher_TLS_DH_anon_WITH_AES_128_GCM_SHA256, - cipher_TLS_DH_anon_WITH_AES_256_GCM_SHA384, - cipher_TLS_PSK_WITH_AES_128_GCM_SHA256, - cipher_TLS_PSK_WITH_AES_256_GCM_SHA384, - cipher_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256, - cipher_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384, - cipher_TLS_PSK_WITH_AES_128_CBC_SHA256, - cipher_TLS_PSK_WITH_AES_256_CBC_SHA384, - cipher_TLS_PSK_WITH_NULL_SHA256, - cipher_TLS_PSK_WITH_NULL_SHA384, - cipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256, - cipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384, - cipher_TLS_DHE_PSK_WITH_NULL_SHA256, - cipher_TLS_DHE_PSK_WITH_NULL_SHA384, - cipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256, - cipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384, - cipher_TLS_RSA_PSK_WITH_NULL_SHA256, - cipher_TLS_RSA_PSK_WITH_NULL_SHA384, - cipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256, - cipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256, - cipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256, - cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256, - cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, - cipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256, - cipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256, - cipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256, - cipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256, - cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256, - cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256, - cipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256, - cipher_TLS_EMPTY_RENEGOTIATION_INFO_SCSV, - cipher_TLS_ECDH_ECDSA_WITH_NULL_SHA, - cipher_TLS_ECDH_ECDSA_WITH_RC4_128_SHA, - cipher_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, - cipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, - cipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, - cipher_TLS_ECDHE_ECDSA_WITH_NULL_SHA, - cipher_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, - cipher_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, - cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, - cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, - cipher_TLS_ECDH_RSA_WITH_NULL_SHA, - cipher_TLS_ECDH_RSA_WITH_RC4_128_SHA, - cipher_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, - cipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, - cipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, - cipher_TLS_ECDHE_RSA_WITH_NULL_SHA, - cipher_TLS_ECDHE_RSA_WITH_RC4_128_SHA, - cipher_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, - cipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, - cipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, - cipher_TLS_ECDH_anon_WITH_NULL_SHA, - cipher_TLS_ECDH_anon_WITH_RC4_128_SHA, - cipher_TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA, - cipher_TLS_ECDH_anon_WITH_AES_128_CBC_SHA, - cipher_TLS_ECDH_anon_WITH_AES_256_CBC_SHA, - cipher_TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA, - cipher_TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA, - cipher_TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA, - cipher_TLS_SRP_SHA_WITH_AES_128_CBC_SHA, - cipher_TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA, - cipher_TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA, - cipher_TLS_SRP_SHA_WITH_AES_256_CBC_SHA, - cipher_TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA, - cipher_TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA, - cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, - cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, - cipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, - cipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, - cipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, - cipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, - cipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, - cipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, - cipher_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, - cipher_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, - cipher_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, - cipher_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, - cipher_TLS_ECDHE_PSK_WITH_RC4_128_SHA, - cipher_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA, - cipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA, - cipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA, - cipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, - cipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384, - cipher_TLS_ECDHE_PSK_WITH_NULL_SHA, - cipher_TLS_ECDHE_PSK_WITH_NULL_SHA256, - cipher_TLS_ECDHE_PSK_WITH_NULL_SHA384, - cipher_TLS_RSA_WITH_ARIA_128_CBC_SHA256, - cipher_TLS_RSA_WITH_ARIA_256_CBC_SHA384, - cipher_TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256, - cipher_TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384, - cipher_TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256, - cipher_TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384, - cipher_TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256, - cipher_TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384, - cipher_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256, - cipher_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384, - cipher_TLS_DH_anon_WITH_ARIA_128_CBC_SHA256, - cipher_TLS_DH_anon_WITH_ARIA_256_CBC_SHA384, - cipher_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256, - cipher_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384, - cipher_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256, - cipher_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384, - cipher_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256, - cipher_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384, - cipher_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256, - cipher_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384, - cipher_TLS_RSA_WITH_ARIA_128_GCM_SHA256, - cipher_TLS_RSA_WITH_ARIA_256_GCM_SHA384, - cipher_TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256, - cipher_TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384, - cipher_TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256, - cipher_TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384, - cipher_TLS_DH_anon_WITH_ARIA_128_GCM_SHA256, - cipher_TLS_DH_anon_WITH_ARIA_256_GCM_SHA384, - cipher_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256, - cipher_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384, - cipher_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256, - cipher_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384, - cipher_TLS_PSK_WITH_ARIA_128_CBC_SHA256, - cipher_TLS_PSK_WITH_ARIA_256_CBC_SHA384, - cipher_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256, - cipher_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384, - cipher_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256, - cipher_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384, - cipher_TLS_PSK_WITH_ARIA_128_GCM_SHA256, - cipher_TLS_PSK_WITH_ARIA_256_GCM_SHA384, - cipher_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256, - cipher_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384, - cipher_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256, - cipher_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384, - cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, - cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, - cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, - cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, - cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, - cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384, - cipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256, - cipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384, - cipher_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256, - cipher_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384, - cipher_TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256, - cipher_TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384, - cipher_TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256, - cipher_TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384, - cipher_TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256, - cipher_TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384, - cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256, - cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384, - cipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256, - cipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384, - cipher_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256, - cipher_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384, - cipher_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256, - cipher_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384, - cipher_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256, - cipher_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384, - cipher_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, - cipher_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, - cipher_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256, - cipher_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384, - cipher_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, - cipher_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, - cipher_TLS_RSA_WITH_AES_128_CCM, - cipher_TLS_RSA_WITH_AES_256_CCM, - cipher_TLS_RSA_WITH_AES_128_CCM_8, - cipher_TLS_RSA_WITH_AES_256_CCM_8, - cipher_TLS_PSK_WITH_AES_128_CCM, - cipher_TLS_PSK_WITH_AES_256_CCM, - cipher_TLS_PSK_WITH_AES_128_CCM_8, - cipher_TLS_PSK_WITH_AES_256_CCM_8, -} diff --git a/vendor/golang.org/x/net/http2/databuffer_test.go b/vendor/golang.org/x/net/http2/databuffer_test.go deleted file mode 100644 index 028e12e5..00000000 --- a/vendor/golang.org/x/net/http2/databuffer_test.go +++ /dev/null @@ -1,157 +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.7 - -package http2 - -import ( - "bytes" - "fmt" - "reflect" - "testing" -) - -func fmtDataChunk(chunk []byte) string { - out := "" - var last byte - var count int - for _, c := range chunk { - if c != last { - if count > 0 { - out += fmt.Sprintf(" x %d ", count) - count = 0 - } - out += string([]byte{c}) - last = c - } - count++ - } - if count > 0 { - out += fmt.Sprintf(" x %d", count) - } - return out -} - -func fmtDataChunks(chunks [][]byte) string { - var out string - for _, chunk := range chunks { - out += fmt.Sprintf("{%q}", fmtDataChunk(chunk)) - } - return out -} - -func testDataBuffer(t *testing.T, wantBytes []byte, setup func(t *testing.T) *dataBuffer) { - // Run setup, then read the remaining bytes from the dataBuffer and check - // that they match wantBytes. We use different read sizes to check corner - // cases in Read. - for _, readSize := range []int{1, 2, 1 * 1024, 32 * 1024} { - t.Run(fmt.Sprintf("ReadSize=%d", readSize), func(t *testing.T) { - b := setup(t) - buf := make([]byte, readSize) - var gotRead bytes.Buffer - for { - n, err := b.Read(buf) - gotRead.Write(buf[:n]) - if err == errReadEmpty { - break - } - if err != nil { - t.Fatalf("error after %v bytes: %v", gotRead.Len(), err) - } - } - if got, want := gotRead.Bytes(), wantBytes; !bytes.Equal(got, want) { - t.Errorf("FinalRead=%q, want %q", fmtDataChunk(got), fmtDataChunk(want)) - } - }) - } -} - -func TestDataBufferAllocation(t *testing.T) { - writes := [][]byte{ - bytes.Repeat([]byte("a"), 1*1024-1), - []byte("a"), - bytes.Repeat([]byte("b"), 4*1024-1), - []byte("b"), - bytes.Repeat([]byte("c"), 8*1024-1), - []byte("c"), - bytes.Repeat([]byte("d"), 16*1024-1), - []byte("d"), - bytes.Repeat([]byte("e"), 32*1024), - } - var wantRead bytes.Buffer - for _, p := range writes { - wantRead.Write(p) - } - - testDataBuffer(t, wantRead.Bytes(), func(t *testing.T) *dataBuffer { - b := &dataBuffer{} - for _, p := range writes { - if n, err := b.Write(p); n != len(p) || err != nil { - t.Fatalf("Write(%q x %d)=%v,%v want %v,nil", p[:1], len(p), n, err, len(p)) - } - } - want := [][]byte{ - bytes.Repeat([]byte("a"), 1*1024), - bytes.Repeat([]byte("b"), 4*1024), - bytes.Repeat([]byte("c"), 8*1024), - bytes.Repeat([]byte("d"), 16*1024), - bytes.Repeat([]byte("e"), 16*1024), - bytes.Repeat([]byte("e"), 16*1024), - } - if !reflect.DeepEqual(b.chunks, want) { - t.Errorf("dataBuffer.chunks\ngot: %s\nwant: %s", fmtDataChunks(b.chunks), fmtDataChunks(want)) - } - return b - }) -} - -func TestDataBufferAllocationWithExpected(t *testing.T) { - writes := [][]byte{ - bytes.Repeat([]byte("a"), 1*1024), // allocates 16KB - bytes.Repeat([]byte("b"), 14*1024), - bytes.Repeat([]byte("c"), 15*1024), // allocates 16KB more - bytes.Repeat([]byte("d"), 2*1024), - bytes.Repeat([]byte("e"), 1*1024), // overflows 32KB expectation, allocates just 1KB - } - var wantRead bytes.Buffer - for _, p := range writes { - wantRead.Write(p) - } - - testDataBuffer(t, wantRead.Bytes(), func(t *testing.T) *dataBuffer { - b := &dataBuffer{expected: 32 * 1024} - for _, p := range writes { - if n, err := b.Write(p); n != len(p) || err != nil { - t.Fatalf("Write(%q x %d)=%v,%v want %v,nil", p[:1], len(p), n, err, len(p)) - } - } - want := [][]byte{ - append(bytes.Repeat([]byte("a"), 1*1024), append(bytes.Repeat([]byte("b"), 14*1024), bytes.Repeat([]byte("c"), 1*1024)...)...), - append(bytes.Repeat([]byte("c"), 14*1024), bytes.Repeat([]byte("d"), 2*1024)...), - bytes.Repeat([]byte("e"), 1*1024), - } - if !reflect.DeepEqual(b.chunks, want) { - t.Errorf("dataBuffer.chunks\ngot: %s\nwant: %s", fmtDataChunks(b.chunks), fmtDataChunks(want)) - } - return b - }) -} - -func TestDataBufferWriteAfterPartialRead(t *testing.T) { - testDataBuffer(t, []byte("cdxyz"), func(t *testing.T) *dataBuffer { - b := &dataBuffer{} - if n, err := b.Write([]byte("abcd")); n != 4 || err != nil { - t.Fatalf("Write(\"abcd\")=%v,%v want 4,nil", n, err) - } - p := make([]byte, 2) - if n, err := b.Read(p); n != 2 || err != nil || !bytes.Equal(p, []byte("ab")) { - t.Fatalf("Read()=%q,%v,%v want \"ab\",2,nil", p, n, err) - } - if n, err := b.Write([]byte("xyz")); n != 3 || err != nil { - t.Fatalf("Write(\"xyz\")=%v,%v want 3,nil", n, err) - } - return b - }) -} diff --git a/vendor/golang.org/x/net/http2/errors_test.go b/vendor/golang.org/x/net/http2/errors_test.go deleted file mode 100644 index da5c58c3..00000000 --- a/vendor/golang.org/x/net/http2/errors_test.go +++ /dev/null @@ -1,24 +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 "testing" - -func TestErrCodeString(t *testing.T) { - tests := []struct { - err ErrCode - want string - }{ - {ErrCodeProtocol, "PROTOCOL_ERROR"}, - {0xd, "HTTP_1_1_REQUIRED"}, - {0xf, "unknown error code 0xf"}, - } - for i, tt := range tests { - got := tt.err.String() - if got != tt.want { - t.Errorf("%d. Error = %q; want %q", i, got, tt.want) - } - } -} diff --git a/vendor/golang.org/x/net/http2/flow_test.go b/vendor/golang.org/x/net/http2/flow_test.go deleted file mode 100644 index 7ae82c78..00000000 --- a/vendor/golang.org/x/net/http2/flow_test.go +++ /dev/null @@ -1,87 +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 "testing" - -func TestFlow(t *testing.T) { - var st flow - var conn flow - st.add(3) - conn.add(2) - - if got, want := st.available(), int32(3); got != want { - t.Errorf("available = %d; want %d", got, want) - } - st.setConnFlow(&conn) - if got, want := st.available(), int32(2); got != want { - t.Errorf("after parent setup, available = %d; want %d", got, want) - } - - st.take(2) - if got, want := conn.available(), int32(0); got != want { - t.Errorf("after taking 2, conn = %d; want %d", got, want) - } - if got, want := st.available(), int32(0); got != want { - t.Errorf("after taking 2, stream = %d; want %d", got, want) - } -} - -func TestFlowAdd(t *testing.T) { - var f flow - if !f.add(1) { - t.Fatal("failed to add 1") - } - if !f.add(-1) { - t.Fatal("failed to add -1") - } - if got, want := f.available(), int32(0); got != want { - t.Fatalf("size = %d; want %d", got, want) - } - if !f.add(1<<31 - 1) { - t.Fatal("failed to add 2^31-1") - } - if got, want := f.available(), int32(1<<31-1); got != want { - t.Fatalf("size = %d; want %d", got, want) - } - if f.add(1) { - t.Fatal("adding 1 to max shouldn't be allowed") - } -} - -func TestFlowAddOverflow(t *testing.T) { - var f flow - if !f.add(0) { - t.Fatal("failed to add 0") - } - if !f.add(-1) { - t.Fatal("failed to add -1") - } - if !f.add(0) { - t.Fatal("failed to add 0") - } - if !f.add(1) { - t.Fatal("failed to add 1") - } - if !f.add(1) { - t.Fatal("failed to add 1") - } - if !f.add(0) { - t.Fatal("failed to add 0") - } - if !f.add(-3) { - t.Fatal("failed to add -3") - } - if got, want := f.available(), int32(-2); got != want { - t.Fatalf("size = %d; want %d", got, want) - } - if !f.add(1<<31 - 1) { - t.Fatal("failed to add 2^31-1") - } - if got, want := f.available(), int32(1+-3+(1<<31-1)); got != want { - t.Fatalf("size = %d; want %d", got, want) - } - -} diff --git a/vendor/golang.org/x/net/http2/frame_test.go b/vendor/golang.org/x/net/http2/frame_test.go deleted file mode 100644 index 3c107b95..00000000 --- a/vendor/golang.org/x/net/http2/frame_test.go +++ /dev/null @@ -1,1235 +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" - "fmt" - "io" - "reflect" - "strings" - "testing" - "unsafe" - - "golang.org/x/net/http2/hpack" -) - -func testFramer() (*Framer, *bytes.Buffer) { - buf := new(bytes.Buffer) - return NewFramer(buf, buf), buf -} - -func TestFrameSizes(t *testing.T) { - // Catch people rearranging the FrameHeader fields. - if got, want := int(unsafe.Sizeof(FrameHeader{})), 12; got != want { - t.Errorf("FrameHeader size = %d; want %d", got, want) - } -} - -func TestFrameTypeString(t *testing.T) { - tests := []struct { - ft FrameType - want string - }{ - {FrameData, "DATA"}, - {FramePing, "PING"}, - {FrameGoAway, "GOAWAY"}, - {0xf, "UNKNOWN_FRAME_TYPE_15"}, - } - - for i, tt := range tests { - got := tt.ft.String() - if got != tt.want { - t.Errorf("%d. String(FrameType %d) = %q; want %q", i, int(tt.ft), got, tt.want) - } - } -} - -func TestWriteRST(t *testing.T) { - fr, buf := testFramer() - var streamID uint32 = 1<<24 + 2<<16 + 3<<8 + 4 - var errCode uint32 = 7<<24 + 6<<16 + 5<<8 + 4 - fr.WriteRSTStream(streamID, ErrCode(errCode)) - const wantEnc = "\x00\x00\x04\x03\x00\x01\x02\x03\x04\x07\x06\x05\x04" - if buf.String() != wantEnc { - t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc) - } - f, err := fr.ReadFrame() - if err != nil { - t.Fatal(err) - } - want := &RSTStreamFrame{ - FrameHeader: FrameHeader{ - valid: true, - Type: 0x3, - Flags: 0x0, - Length: 0x4, - StreamID: 0x1020304, - }, - ErrCode: 0x7060504, - } - if !reflect.DeepEqual(f, want) { - t.Errorf("parsed back %#v; want %#v", f, want) - } -} - -func TestWriteData(t *testing.T) { - fr, buf := testFramer() - var streamID uint32 = 1<<24 + 2<<16 + 3<<8 + 4 - data := []byte("ABC") - fr.WriteData(streamID, true, data) - const wantEnc = "\x00\x00\x03\x00\x01\x01\x02\x03\x04ABC" - if buf.String() != wantEnc { - t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc) - } - f, err := fr.ReadFrame() - if err != nil { - t.Fatal(err) - } - df, ok := f.(*DataFrame) - if !ok { - t.Fatalf("got %T; want *DataFrame", f) - } - if !bytes.Equal(df.Data(), data) { - t.Errorf("got %q; want %q", df.Data(), data) - } - if f.Header().Flags&1 == 0 { - t.Errorf("didn't see END_STREAM flag") - } -} - -func TestWriteDataPadded(t *testing.T) { - tests := [...]struct { - streamID uint32 - endStream bool - data []byte - pad []byte - wantHeader FrameHeader - }{ - // Unpadded: - 0: { - streamID: 1, - endStream: true, - data: []byte("foo"), - pad: nil, - wantHeader: FrameHeader{ - Type: FrameData, - Flags: FlagDataEndStream, - Length: 3, - StreamID: 1, - }, - }, - - // Padded bit set, but no padding: - 1: { - streamID: 1, - endStream: true, - data: []byte("foo"), - pad: []byte{}, - wantHeader: FrameHeader{ - Type: FrameData, - Flags: FlagDataEndStream | FlagDataPadded, - Length: 4, - StreamID: 1, - }, - }, - - // Padded bit set, with padding: - 2: { - streamID: 1, - endStream: false, - data: []byte("foo"), - pad: []byte{0, 0, 0}, - wantHeader: FrameHeader{ - Type: FrameData, - Flags: FlagDataPadded, - Length: 7, - StreamID: 1, - }, - }, - } - for i, tt := range tests { - fr, _ := testFramer() - fr.WriteDataPadded(tt.streamID, tt.endStream, tt.data, tt.pad) - f, err := fr.ReadFrame() - if err != nil { - t.Errorf("%d. ReadFrame: %v", i, err) - continue - } - got := f.Header() - tt.wantHeader.valid = true - if got != tt.wantHeader { - t.Errorf("%d. read %+v; want %+v", i, got, tt.wantHeader) - continue - } - df := f.(*DataFrame) - if !bytes.Equal(df.Data(), tt.data) { - t.Errorf("%d. got %q; want %q", i, df.Data(), tt.data) - } - } -} - -func TestWriteHeaders(t *testing.T) { - tests := []struct { - name string - p HeadersFrameParam - wantEnc string - wantFrame *HeadersFrame - }{ - { - "basic", - HeadersFrameParam{ - StreamID: 42, - BlockFragment: []byte("abc"), - Priority: PriorityParam{}, - }, - "\x00\x00\x03\x01\x00\x00\x00\x00*abc", - &HeadersFrame{ - FrameHeader: FrameHeader{ - valid: true, - StreamID: 42, - Type: FrameHeaders, - Length: uint32(len("abc")), - }, - Priority: PriorityParam{}, - headerFragBuf: []byte("abc"), - }, - }, - { - "basic + end flags", - HeadersFrameParam{ - StreamID: 42, - BlockFragment: []byte("abc"), - EndStream: true, - EndHeaders: true, - Priority: PriorityParam{}, - }, - "\x00\x00\x03\x01\x05\x00\x00\x00*abc", - &HeadersFrame{ - FrameHeader: FrameHeader{ - valid: true, - StreamID: 42, - Type: FrameHeaders, - Flags: FlagHeadersEndStream | FlagHeadersEndHeaders, - Length: uint32(len("abc")), - }, - Priority: PriorityParam{}, - headerFragBuf: []byte("abc"), - }, - }, - { - "with padding", - HeadersFrameParam{ - StreamID: 42, - BlockFragment: []byte("abc"), - EndStream: true, - EndHeaders: true, - PadLength: 5, - Priority: PriorityParam{}, - }, - "\x00\x00\t\x01\r\x00\x00\x00*\x05abc\x00\x00\x00\x00\x00", - &HeadersFrame{ - FrameHeader: FrameHeader{ - valid: true, - StreamID: 42, - Type: FrameHeaders, - Flags: FlagHeadersEndStream | FlagHeadersEndHeaders | FlagHeadersPadded, - Length: uint32(1 + len("abc") + 5), // pad length + contents + padding - }, - Priority: PriorityParam{}, - headerFragBuf: []byte("abc"), - }, - }, - { - "with priority", - HeadersFrameParam{ - StreamID: 42, - BlockFragment: []byte("abc"), - EndStream: true, - EndHeaders: true, - PadLength: 2, - Priority: PriorityParam{ - StreamDep: 15, - Exclusive: true, - Weight: 127, - }, - }, - "\x00\x00\v\x01-\x00\x00\x00*\x02\x80\x00\x00\x0f\u007fabc\x00\x00", - &HeadersFrame{ - FrameHeader: FrameHeader{ - valid: true, - StreamID: 42, - Type: FrameHeaders, - Flags: FlagHeadersEndStream | FlagHeadersEndHeaders | FlagHeadersPadded | FlagHeadersPriority, - Length: uint32(1 + 5 + len("abc") + 2), // pad length + priority + contents + padding - }, - Priority: PriorityParam{ - StreamDep: 15, - Exclusive: true, - Weight: 127, - }, - headerFragBuf: []byte("abc"), - }, - }, - { - "with priority stream dep zero", // golang.org/issue/15444 - HeadersFrameParam{ - StreamID: 42, - BlockFragment: []byte("abc"), - EndStream: true, - EndHeaders: true, - PadLength: 2, - Priority: PriorityParam{ - StreamDep: 0, - Exclusive: true, - Weight: 127, - }, - }, - "\x00\x00\v\x01-\x00\x00\x00*\x02\x80\x00\x00\x00\u007fabc\x00\x00", - &HeadersFrame{ - FrameHeader: FrameHeader{ - valid: true, - StreamID: 42, - Type: FrameHeaders, - Flags: FlagHeadersEndStream | FlagHeadersEndHeaders | FlagHeadersPadded | FlagHeadersPriority, - Length: uint32(1 + 5 + len("abc") + 2), // pad length + priority + contents + padding - }, - Priority: PriorityParam{ - StreamDep: 0, - Exclusive: true, - Weight: 127, - }, - headerFragBuf: []byte("abc"), - }, - }, - } - for _, tt := range tests { - fr, buf := testFramer() - if err := fr.WriteHeaders(tt.p); err != nil { - t.Errorf("test %q: %v", tt.name, err) - continue - } - if buf.String() != tt.wantEnc { - t.Errorf("test %q: encoded %q; want %q", tt.name, buf.Bytes(), tt.wantEnc) - } - f, err := fr.ReadFrame() - if err != nil { - t.Errorf("test %q: failed to read the frame back: %v", tt.name, err) - continue - } - if !reflect.DeepEqual(f, tt.wantFrame) { - t.Errorf("test %q: mismatch.\n got: %#v\nwant: %#v\n", tt.name, f, tt.wantFrame) - } - } -} - -func TestWriteInvalidStreamDep(t *testing.T) { - fr, _ := testFramer() - err := fr.WriteHeaders(HeadersFrameParam{ - StreamID: 42, - Priority: PriorityParam{ - StreamDep: 1 << 31, - }, - }) - if err != errDepStreamID { - t.Errorf("header error = %v; want %q", err, errDepStreamID) - } - - err = fr.WritePriority(2, PriorityParam{StreamDep: 1 << 31}) - if err != errDepStreamID { - t.Errorf("priority error = %v; want %q", err, errDepStreamID) - } -} - -func TestWriteContinuation(t *testing.T) { - const streamID = 42 - tests := []struct { - name string - end bool - frag []byte - - wantFrame *ContinuationFrame - }{ - { - "not end", - false, - []byte("abc"), - &ContinuationFrame{ - FrameHeader: FrameHeader{ - valid: true, - StreamID: streamID, - Type: FrameContinuation, - Length: uint32(len("abc")), - }, - headerFragBuf: []byte("abc"), - }, - }, - { - "end", - true, - []byte("def"), - &ContinuationFrame{ - FrameHeader: FrameHeader{ - valid: true, - StreamID: streamID, - Type: FrameContinuation, - Flags: FlagContinuationEndHeaders, - Length: uint32(len("def")), - }, - headerFragBuf: []byte("def"), - }, - }, - } - for _, tt := range tests { - fr, _ := testFramer() - if err := fr.WriteContinuation(streamID, tt.end, tt.frag); err != nil { - t.Errorf("test %q: %v", tt.name, err) - continue - } - fr.AllowIllegalReads = true - f, err := fr.ReadFrame() - if err != nil { - t.Errorf("test %q: failed to read the frame back: %v", tt.name, err) - continue - } - if !reflect.DeepEqual(f, tt.wantFrame) { - t.Errorf("test %q: mismatch.\n got: %#v\nwant: %#v\n", tt.name, f, tt.wantFrame) - } - } -} - -func TestWritePriority(t *testing.T) { - const streamID = 42 - tests := []struct { - name string - priority PriorityParam - wantFrame *PriorityFrame - }{ - { - "not exclusive", - PriorityParam{ - StreamDep: 2, - Exclusive: false, - Weight: 127, - }, - &PriorityFrame{ - FrameHeader{ - valid: true, - StreamID: streamID, - Type: FramePriority, - Length: 5, - }, - PriorityParam{ - StreamDep: 2, - Exclusive: false, - Weight: 127, - }, - }, - }, - - { - "exclusive", - PriorityParam{ - StreamDep: 3, - Exclusive: true, - Weight: 77, - }, - &PriorityFrame{ - FrameHeader{ - valid: true, - StreamID: streamID, - Type: FramePriority, - Length: 5, - }, - PriorityParam{ - StreamDep: 3, - Exclusive: true, - Weight: 77, - }, - }, - }, - } - for _, tt := range tests { - fr, _ := testFramer() - if err := fr.WritePriority(streamID, tt.priority); err != nil { - t.Errorf("test %q: %v", tt.name, err) - continue - } - f, err := fr.ReadFrame() - if err != nil { - t.Errorf("test %q: failed to read the frame back: %v", tt.name, err) - continue - } - if !reflect.DeepEqual(f, tt.wantFrame) { - t.Errorf("test %q: mismatch.\n got: %#v\nwant: %#v\n", tt.name, f, tt.wantFrame) - } - } -} - -func TestWriteSettings(t *testing.T) { - fr, buf := testFramer() - settings := []Setting{{1, 2}, {3, 4}} - fr.WriteSettings(settings...) - const wantEnc = "\x00\x00\f\x04\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x02\x00\x03\x00\x00\x00\x04" - if buf.String() != wantEnc { - t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc) - } - f, err := fr.ReadFrame() - if err != nil { - t.Fatal(err) - } - sf, ok := f.(*SettingsFrame) - if !ok { - t.Fatalf("Got a %T; want a SettingsFrame", f) - } - var got []Setting - sf.ForeachSetting(func(s Setting) error { - got = append(got, s) - valBack, ok := sf.Value(s.ID) - if !ok || valBack != s.Val { - t.Errorf("Value(%d) = %v, %v; want %v, true", s.ID, valBack, ok, s.Val) - } - return nil - }) - if !reflect.DeepEqual(settings, got) { - t.Errorf("Read settings %+v != written settings %+v", got, settings) - } -} - -func TestWriteSettingsAck(t *testing.T) { - fr, buf := testFramer() - fr.WriteSettingsAck() - const wantEnc = "\x00\x00\x00\x04\x01\x00\x00\x00\x00" - if buf.String() != wantEnc { - t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc) - } -} - -func TestWriteWindowUpdate(t *testing.T) { - fr, buf := testFramer() - const streamID = 1<<24 + 2<<16 + 3<<8 + 4 - const incr = 7<<24 + 6<<16 + 5<<8 + 4 - if err := fr.WriteWindowUpdate(streamID, incr); err != nil { - t.Fatal(err) - } - const wantEnc = "\x00\x00\x04\x08\x00\x01\x02\x03\x04\x07\x06\x05\x04" - if buf.String() != wantEnc { - t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc) - } - f, err := fr.ReadFrame() - if err != nil { - t.Fatal(err) - } - want := &WindowUpdateFrame{ - FrameHeader: FrameHeader{ - valid: true, - Type: 0x8, - Flags: 0x0, - Length: 0x4, - StreamID: 0x1020304, - }, - Increment: 0x7060504, - } - if !reflect.DeepEqual(f, want) { - t.Errorf("parsed back %#v; want %#v", f, want) - } -} - -func TestWritePing(t *testing.T) { testWritePing(t, false) } -func TestWritePingAck(t *testing.T) { testWritePing(t, true) } - -func testWritePing(t *testing.T, ack bool) { - fr, buf := testFramer() - if err := fr.WritePing(ack, [8]byte{1, 2, 3, 4, 5, 6, 7, 8}); err != nil { - t.Fatal(err) - } - var wantFlags Flags - if ack { - wantFlags = FlagPingAck - } - var wantEnc = "\x00\x00\x08\x06" + string(wantFlags) + "\x00\x00\x00\x00" + "\x01\x02\x03\x04\x05\x06\x07\x08" - if buf.String() != wantEnc { - t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc) - } - - f, err := fr.ReadFrame() - if err != nil { - t.Fatal(err) - } - want := &PingFrame{ - FrameHeader: FrameHeader{ - valid: true, - Type: 0x6, - Flags: wantFlags, - Length: 0x8, - StreamID: 0, - }, - Data: [8]byte{1, 2, 3, 4, 5, 6, 7, 8}, - } - if !reflect.DeepEqual(f, want) { - t.Errorf("parsed back %#v; want %#v", f, want) - } -} - -func TestReadFrameHeader(t *testing.T) { - tests := []struct { - in string - want FrameHeader - }{ - {in: "\x00\x00\x00" + "\x00" + "\x00" + "\x00\x00\x00\x00", want: FrameHeader{}}, - {in: "\x01\x02\x03" + "\x04" + "\x05" + "\x06\x07\x08\x09", want: FrameHeader{ - Length: 66051, Type: 4, Flags: 5, StreamID: 101124105, - }}, - // Ignore high bit: - {in: "\xff\xff\xff" + "\xff" + "\xff" + "\xff\xff\xff\xff", want: FrameHeader{ - Length: 16777215, Type: 255, Flags: 255, StreamID: 2147483647}}, - {in: "\xff\xff\xff" + "\xff" + "\xff" + "\x7f\xff\xff\xff", want: FrameHeader{ - Length: 16777215, Type: 255, Flags: 255, StreamID: 2147483647}}, - } - for i, tt := range tests { - got, err := readFrameHeader(make([]byte, 9), strings.NewReader(tt.in)) - if err != nil { - t.Errorf("%d. readFrameHeader(%q) = %v", i, tt.in, err) - continue - } - tt.want.valid = true - if got != tt.want { - t.Errorf("%d. readFrameHeader(%q) = %+v; want %+v", i, tt.in, got, tt.want) - } - } -} - -func TestReadWriteFrameHeader(t *testing.T) { - tests := []struct { - len uint32 - typ FrameType - flags Flags - streamID uint32 - }{ - {len: 0, typ: 255, flags: 1, streamID: 0}, - {len: 0, typ: 255, flags: 1, streamID: 1}, - {len: 0, typ: 255, flags: 1, streamID: 255}, - {len: 0, typ: 255, flags: 1, streamID: 256}, - {len: 0, typ: 255, flags: 1, streamID: 65535}, - {len: 0, typ: 255, flags: 1, streamID: 65536}, - - {len: 0, typ: 1, flags: 255, streamID: 1}, - {len: 255, typ: 1, flags: 255, streamID: 1}, - {len: 256, typ: 1, flags: 255, streamID: 1}, - {len: 65535, typ: 1, flags: 255, streamID: 1}, - {len: 65536, typ: 1, flags: 255, streamID: 1}, - {len: 16777215, typ: 1, flags: 255, streamID: 1}, - } - for _, tt := range tests { - fr, buf := testFramer() - fr.startWrite(tt.typ, tt.flags, tt.streamID) - fr.writeBytes(make([]byte, tt.len)) - fr.endWrite() - fh, err := ReadFrameHeader(buf) - if err != nil { - t.Errorf("ReadFrameHeader(%+v) = %v", tt, err) - continue - } - if fh.Type != tt.typ || fh.Flags != tt.flags || fh.Length != tt.len || fh.StreamID != tt.streamID { - t.Errorf("ReadFrameHeader(%+v) = %+v; mismatch", tt, fh) - } - } - -} - -func TestWriteTooLargeFrame(t *testing.T) { - fr, _ := testFramer() - fr.startWrite(0, 1, 1) - fr.writeBytes(make([]byte, 1<<24)) - err := fr.endWrite() - if err != ErrFrameTooLarge { - t.Errorf("endWrite = %v; want errFrameTooLarge", err) - } -} - -func TestWriteGoAway(t *testing.T) { - const debug = "foo" - fr, buf := testFramer() - if err := fr.WriteGoAway(0x01020304, 0x05060708, []byte(debug)); err != nil { - t.Fatal(err) - } - const wantEnc = "\x00\x00\v\a\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08" + debug - if buf.String() != wantEnc { - t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc) - } - f, err := fr.ReadFrame() - if err != nil { - t.Fatal(err) - } - want := &GoAwayFrame{ - FrameHeader: FrameHeader{ - valid: true, - Type: 0x7, - Flags: 0, - Length: uint32(4 + 4 + len(debug)), - StreamID: 0, - }, - LastStreamID: 0x01020304, - ErrCode: 0x05060708, - debugData: []byte(debug), - } - if !reflect.DeepEqual(f, want) { - t.Fatalf("parsed back:\n%#v\nwant:\n%#v", f, want) - } - if got := string(f.(*GoAwayFrame).DebugData()); got != debug { - t.Errorf("debug data = %q; want %q", got, debug) - } -} - -func TestWritePushPromise(t *testing.T) { - pp := PushPromiseParam{ - StreamID: 42, - PromiseID: 42, - BlockFragment: []byte("abc"), - } - fr, buf := testFramer() - if err := fr.WritePushPromise(pp); err != nil { - t.Fatal(err) - } - const wantEnc = "\x00\x00\x07\x05\x00\x00\x00\x00*\x00\x00\x00*abc" - if buf.String() != wantEnc { - t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc) - } - f, err := fr.ReadFrame() - if err != nil { - t.Fatal(err) - } - _, ok := f.(*PushPromiseFrame) - if !ok { - t.Fatalf("got %T; want *PushPromiseFrame", f) - } - want := &PushPromiseFrame{ - FrameHeader: FrameHeader{ - valid: true, - Type: 0x5, - Flags: 0x0, - Length: 0x7, - StreamID: 42, - }, - PromiseID: 42, - headerFragBuf: []byte("abc"), - } - if !reflect.DeepEqual(f, want) { - t.Fatalf("parsed back:\n%#v\nwant:\n%#v", f, want) - } -} - -// test checkFrameOrder and that HEADERS and CONTINUATION frames can't be intermingled. -func TestReadFrameOrder(t *testing.T) { - head := func(f *Framer, id uint32, end bool) { - f.WriteHeaders(HeadersFrameParam{ - StreamID: id, - BlockFragment: []byte("foo"), // unused, but non-empty - EndHeaders: end, - }) - } - cont := func(f *Framer, id uint32, end bool) { - f.WriteContinuation(id, end, []byte("foo")) - } - - tests := [...]struct { - name string - w func(*Framer) - atLeast int - wantErr string - }{ - 0: { - w: func(f *Framer) { - head(f, 1, true) - }, - }, - 1: { - w: func(f *Framer) { - head(f, 1, true) - head(f, 2, true) - }, - }, - 2: { - wantErr: "got HEADERS for stream 2; expected CONTINUATION following HEADERS for stream 1", - w: func(f *Framer) { - head(f, 1, false) - head(f, 2, true) - }, - }, - 3: { - wantErr: "got DATA for stream 1; expected CONTINUATION following HEADERS for stream 1", - w: func(f *Framer) { - head(f, 1, false) - }, - }, - 4: { - w: func(f *Framer) { - head(f, 1, false) - cont(f, 1, true) - head(f, 2, true) - }, - }, - 5: { - wantErr: "got CONTINUATION for stream 2; expected stream 1", - w: func(f *Framer) { - head(f, 1, false) - cont(f, 2, true) - head(f, 2, true) - }, - }, - 6: { - wantErr: "unexpected CONTINUATION for stream 1", - w: func(f *Framer) { - cont(f, 1, true) - }, - }, - 7: { - wantErr: "unexpected CONTINUATION for stream 1", - w: func(f *Framer) { - cont(f, 1, false) - }, - }, - 8: { - wantErr: "HEADERS frame with stream ID 0", - w: func(f *Framer) { - head(f, 0, true) - }, - }, - 9: { - wantErr: "CONTINUATION frame with stream ID 0", - w: func(f *Framer) { - cont(f, 0, true) - }, - }, - 10: { - wantErr: "unexpected CONTINUATION for stream 1", - atLeast: 5, - w: func(f *Framer) { - head(f, 1, false) - cont(f, 1, false) - cont(f, 1, false) - cont(f, 1, false) - cont(f, 1, true) - cont(f, 1, false) - }, - }, - } - for i, tt := range tests { - buf := new(bytes.Buffer) - f := NewFramer(buf, buf) - f.AllowIllegalWrites = true - tt.w(f) - f.WriteData(1, true, nil) // to test transition away from last step - - var err error - n := 0 - var log bytes.Buffer - for { - var got Frame - got, err = f.ReadFrame() - fmt.Fprintf(&log, " read %v, %v\n", got, err) - if err != nil { - break - } - n++ - } - if err == io.EOF { - err = nil - } - ok := tt.wantErr == "" - if ok && err != nil { - t.Errorf("%d. after %d good frames, ReadFrame = %v; want success\n%s", i, n, err, log.Bytes()) - continue - } - if !ok && err != ConnectionError(ErrCodeProtocol) { - t.Errorf("%d. after %d good frames, ReadFrame = %v; want ConnectionError(ErrCodeProtocol)\n%s", i, n, err, log.Bytes()) - continue - } - if !((f.errDetail == nil && tt.wantErr == "") || (fmt.Sprint(f.errDetail) == tt.wantErr)) { - t.Errorf("%d. framer eror = %q; want %q\n%s", i, f.errDetail, tt.wantErr, log.Bytes()) - } - if n < tt.atLeast { - t.Errorf("%d. framer only read %d frames; want at least %d\n%s", i, n, tt.atLeast, log.Bytes()) - } - } -} - -func TestMetaFrameHeader(t *testing.T) { - write := func(f *Framer, frags ...[]byte) { - for i, frag := range frags { - end := (i == len(frags)-1) - if i == 0 { - f.WriteHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: frag, - EndHeaders: end, - }) - } else { - f.WriteContinuation(1, end, frag) - } - } - } - - want := func(flags Flags, length uint32, pairs ...string) *MetaHeadersFrame { - mh := &MetaHeadersFrame{ - HeadersFrame: &HeadersFrame{ - FrameHeader: FrameHeader{ - Type: FrameHeaders, - Flags: flags, - Length: length, - StreamID: 1, - }, - }, - Fields: []hpack.HeaderField(nil), - } - for len(pairs) > 0 { - mh.Fields = append(mh.Fields, hpack.HeaderField{ - Name: pairs[0], - Value: pairs[1], - }) - pairs = pairs[2:] - } - return mh - } - truncated := func(mh *MetaHeadersFrame) *MetaHeadersFrame { - mh.Truncated = true - return mh - } - - const noFlags Flags = 0 - - oneKBString := strings.Repeat("a", 1<<10) - - tests := [...]struct { - name string - w func(*Framer) - want interface{} // *MetaHeaderFrame or error - wantErrReason string - maxHeaderListSize uint32 - }{ - 0: { - name: "single_headers", - w: func(f *Framer) { - var he hpackEncoder - all := he.encodeHeaderRaw(t, ":method", "GET", ":path", "/") - write(f, all) - }, - want: want(FlagHeadersEndHeaders, 2, ":method", "GET", ":path", "/"), - }, - 1: { - name: "with_continuation", - w: func(f *Framer) { - var he hpackEncoder - all := he.encodeHeaderRaw(t, ":method", "GET", ":path", "/", "foo", "bar") - write(f, all[:1], all[1:]) - }, - want: want(noFlags, 1, ":method", "GET", ":path", "/", "foo", "bar"), - }, - 2: { - name: "with_two_continuation", - w: func(f *Framer) { - var he hpackEncoder - all := he.encodeHeaderRaw(t, ":method", "GET", ":path", "/", "foo", "bar") - write(f, all[:2], all[2:4], all[4:]) - }, - want: want(noFlags, 2, ":method", "GET", ":path", "/", "foo", "bar"), - }, - 3: { - name: "big_string_okay", - w: func(f *Framer) { - var he hpackEncoder - all := he.encodeHeaderRaw(t, ":method", "GET", ":path", "/", "foo", oneKBString) - write(f, all[:2], all[2:]) - }, - want: want(noFlags, 2, ":method", "GET", ":path", "/", "foo", oneKBString), - }, - 4: { - name: "big_string_error", - w: func(f *Framer) { - var he hpackEncoder - all := he.encodeHeaderRaw(t, ":method", "GET", ":path", "/", "foo", oneKBString) - write(f, all[:2], all[2:]) - }, - maxHeaderListSize: (1 << 10) / 2, - want: ConnectionError(ErrCodeCompression), - }, - 5: { - name: "max_header_list_truncated", - w: func(f *Framer) { - var he hpackEncoder - var pairs = []string{":method", "GET", ":path", "/"} - for i := 0; i < 100; i++ { - pairs = append(pairs, "foo", "bar") - } - all := he.encodeHeaderRaw(t, pairs...) - write(f, all[:2], all[2:]) - }, - maxHeaderListSize: (1 << 10) / 2, - want: truncated(want(noFlags, 2, - ":method", "GET", - ":path", "/", - "foo", "bar", - "foo", "bar", - "foo", "bar", - "foo", "bar", - "foo", "bar", - "foo", "bar", - "foo", "bar", - "foo", "bar", - "foo", "bar", - "foo", "bar", - "foo", "bar", // 11 - )), - }, - 6: { - name: "pseudo_order", - w: func(f *Framer) { - write(f, encodeHeaderRaw(t, - ":method", "GET", - "foo", "bar", - ":path", "/", // bogus - )) - }, - want: streamError(1, ErrCodeProtocol), - wantErrReason: "pseudo header field after regular", - }, - 7: { - name: "pseudo_unknown", - w: func(f *Framer) { - write(f, encodeHeaderRaw(t, - ":unknown", "foo", // bogus - "foo", "bar", - )) - }, - want: streamError(1, ErrCodeProtocol), - wantErrReason: "invalid pseudo-header \":unknown\"", - }, - 8: { - name: "pseudo_mix_request_response", - w: func(f *Framer) { - write(f, encodeHeaderRaw(t, - ":method", "GET", - ":status", "100", - )) - }, - want: streamError(1, ErrCodeProtocol), - wantErrReason: "mix of request and response pseudo headers", - }, - 9: { - name: "pseudo_dup", - w: func(f *Framer) { - write(f, encodeHeaderRaw(t, - ":method", "GET", - ":method", "POST", - )) - }, - want: streamError(1, ErrCodeProtocol), - wantErrReason: "duplicate pseudo-header \":method\"", - }, - 10: { - name: "trailer_okay_no_pseudo", - w: func(f *Framer) { write(f, encodeHeaderRaw(t, "foo", "bar")) }, - want: want(FlagHeadersEndHeaders, 8, "foo", "bar"), - }, - 11: { - name: "invalid_field_name", - w: func(f *Framer) { write(f, encodeHeaderRaw(t, "CapitalBad", "x")) }, - want: streamError(1, ErrCodeProtocol), - wantErrReason: "invalid header field name \"CapitalBad\"", - }, - 12: { - name: "invalid_field_value", - w: func(f *Framer) { write(f, encodeHeaderRaw(t, "key", "bad_null\x00")) }, - want: streamError(1, ErrCodeProtocol), - wantErrReason: "invalid header field value \"bad_null\\x00\"", - }, - } - for i, tt := range tests { - buf := new(bytes.Buffer) - f := NewFramer(buf, buf) - f.ReadMetaHeaders = hpack.NewDecoder(initialHeaderTableSize, nil) - f.MaxHeaderListSize = tt.maxHeaderListSize - tt.w(f) - - name := tt.name - if name == "" { - name = fmt.Sprintf("test index %d", i) - } - - var got interface{} - var err error - got, err = f.ReadFrame() - if err != nil { - got = err - - // Ignore the StreamError.Cause field, if it matches the wantErrReason. - // The test table above predates the Cause field. - if se, ok := err.(StreamError); ok && se.Cause != nil && se.Cause.Error() == tt.wantErrReason { - se.Cause = nil - got = se - } - } - if !reflect.DeepEqual(got, tt.want) { - if mhg, ok := got.(*MetaHeadersFrame); ok { - if mhw, ok := tt.want.(*MetaHeadersFrame); ok { - hg := mhg.HeadersFrame - hw := mhw.HeadersFrame - if hg != nil && hw != nil && !reflect.DeepEqual(*hg, *hw) { - t.Errorf("%s: headers differ:\n got: %+v\nwant: %+v\n", name, *hg, *hw) - } - } - } - str := func(v interface{}) string { - if _, ok := v.(error); ok { - return fmt.Sprintf("error %v", v) - } else { - return fmt.Sprintf("value %#v", v) - } - } - t.Errorf("%s:\n got: %v\nwant: %s", name, str(got), str(tt.want)) - } - if tt.wantErrReason != "" && tt.wantErrReason != fmt.Sprint(f.errDetail) { - t.Errorf("%s: got error reason %q; want %q", name, f.errDetail, tt.wantErrReason) - } - } -} - -func TestSetReuseFrames(t *testing.T) { - fr, buf := testFramer() - fr.SetReuseFrames() - - // Check that DataFrames are reused. Note that - // SetReuseFrames only currently implements reuse of DataFrames. - firstDf := readAndVerifyDataFrame("ABC", 3, fr, buf, t) - - for i := 0; i < 10; i++ { - df := readAndVerifyDataFrame("XYZ", 3, fr, buf, t) - if df != firstDf { - t.Errorf("Expected Framer to return references to the same DataFrame. Have %v and %v", &df, &firstDf) - } - } - - for i := 0; i < 10; i++ { - df := readAndVerifyDataFrame("", 0, fr, buf, t) - if df != firstDf { - t.Errorf("Expected Framer to return references to the same DataFrame. Have %v and %v", &df, &firstDf) - } - } - - for i := 0; i < 10; i++ { - df := readAndVerifyDataFrame("HHH", 3, fr, buf, t) - if df != firstDf { - t.Errorf("Expected Framer to return references to the same DataFrame. Have %v and %v", &df, &firstDf) - } - } -} - -func TestSetReuseFramesMoreThanOnce(t *testing.T) { - fr, buf := testFramer() - fr.SetReuseFrames() - - firstDf := readAndVerifyDataFrame("ABC", 3, fr, buf, t) - fr.SetReuseFrames() - - for i := 0; i < 10; i++ { - df := readAndVerifyDataFrame("XYZ", 3, fr, buf, t) - // SetReuseFrames should be idempotent - fr.SetReuseFrames() - if df != firstDf { - t.Errorf("Expected Framer to return references to the same DataFrame. Have %v and %v", &df, &firstDf) - } - } -} - -func TestNoSetReuseFrames(t *testing.T) { - fr, buf := testFramer() - const numNewDataFrames = 10 - dfSoFar := make([]interface{}, numNewDataFrames) - - // Check that DataFrames are not reused if SetReuseFrames wasn't called. - // SetReuseFrames only currently implements reuse of DataFrames. - for i := 0; i < numNewDataFrames; i++ { - df := readAndVerifyDataFrame("XYZ", 3, fr, buf, t) - for _, item := range dfSoFar { - if df == item { - t.Errorf("Expected Framer to return new DataFrames since SetNoReuseFrames not set.") - } - } - dfSoFar[i] = df - } -} - -func readAndVerifyDataFrame(data string, length byte, fr *Framer, buf *bytes.Buffer, t *testing.T) *DataFrame { - var streamID uint32 = 1<<24 + 2<<16 + 3<<8 + 4 - fr.WriteData(streamID, true, []byte(data)) - wantEnc := "\x00\x00" + string(length) + "\x00\x01\x01\x02\x03\x04" + data - if buf.String() != wantEnc { - t.Errorf("encoded as %q; want %q", buf.Bytes(), wantEnc) - } - f, err := fr.ReadFrame() - if err != nil { - t.Fatal(err) - } - df, ok := f.(*DataFrame) - if !ok { - t.Fatalf("got %T; want *DataFrame", f) - } - if !bytes.Equal(df.Data(), []byte(data)) { - t.Errorf("got %q; want %q", df.Data(), []byte(data)) - } - if f.Header().Flags&1 == 0 { - t.Errorf("didn't see END_STREAM flag") - } - return df -} - -func encodeHeaderRaw(t *testing.T, pairs ...string) []byte { - var he hpackEncoder - return he.encodeHeaderRaw(t, pairs...) -} - -func TestSettingsDuplicates(t *testing.T) { - tests := []struct { - settings []Setting - want bool - }{ - {nil, false}, - {[]Setting{{ID: 1}}, false}, - {[]Setting{{ID: 1}, {ID: 2}}, false}, - {[]Setting{{ID: 1}, {ID: 2}}, false}, - {[]Setting{{ID: 1}, {ID: 2}, {ID: 3}}, false}, - {[]Setting{{ID: 1}, {ID: 2}, {ID: 3}}, false}, - {[]Setting{{ID: 1}, {ID: 2}, {ID: 3}, {ID: 4}}, false}, - - {[]Setting{{ID: 1}, {ID: 2}, {ID: 3}, {ID: 2}}, true}, - {[]Setting{{ID: 4}, {ID: 2}, {ID: 3}, {ID: 4}}, true}, - - {[]Setting{ - {ID: 1}, {ID: 2}, {ID: 3}, {ID: 4}, - {ID: 5}, {ID: 6}, {ID: 7}, {ID: 8}, - {ID: 9}, {ID: 10}, {ID: 11}, {ID: 12}, - }, false}, - - {[]Setting{ - {ID: 1}, {ID: 2}, {ID: 3}, {ID: 4}, - {ID: 5}, {ID: 6}, {ID: 7}, {ID: 8}, - {ID: 9}, {ID: 10}, {ID: 11}, {ID: 11}, - }, true}, - } - for i, tt := range tests { - fr, _ := testFramer() - fr.WriteSettings(tt.settings...) - f, err := fr.ReadFrame() - if err != nil { - t.Fatalf("%d. ReadFrame: %v", i, err) - } - sf := f.(*SettingsFrame) - got := sf.HasDuplicates() - if got != tt.want { - t.Errorf("%d. HasDuplicates = %v; want %v", i, got, tt.want) - } - } - -} diff --git a/vendor/golang.org/x/net/http2/go18_test.go b/vendor/golang.org/x/net/http2/go18_test.go deleted file mode 100644 index 30e3b038..00000000 --- a/vendor/golang.org/x/net/http2/go18_test.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.8 - -package http2 - -import ( - "crypto/tls" - "net/http" - "testing" - "time" -) - -// Tests that http2.Server.IdleTimeout is initialized from -// http.Server.{Idle,Read}Timeout. http.Server.IdleTimeout was -// added in Go 1.8. -func TestConfigureServerIdleTimeout_Go18(t *testing.T) { - const timeout = 5 * time.Second - const notThisOne = 1 * time.Second - - // With a zero http2.Server, verify that it copies IdleTimeout: - { - s1 := &http.Server{ - IdleTimeout: timeout, - ReadTimeout: notThisOne, - } - s2 := &Server{} - if err := ConfigureServer(s1, s2); err != nil { - t.Fatal(err) - } - if s2.IdleTimeout != timeout { - t.Errorf("s2.IdleTimeout = %v; want %v", s2.IdleTimeout, timeout) - } - } - - // And that it falls back to ReadTimeout: - { - s1 := &http.Server{ - ReadTimeout: timeout, - } - s2 := &Server{} - if err := ConfigureServer(s1, s2); err != nil { - t.Fatal(err) - } - if s2.IdleTimeout != timeout { - t.Errorf("s2.IdleTimeout = %v; want %v", s2.IdleTimeout, timeout) - } - } - - // Verify that s1's IdleTimeout doesn't overwrite an existing setting: - { - s1 := &http.Server{ - IdleTimeout: notThisOne, - } - s2 := &Server{ - IdleTimeout: timeout, - } - if err := ConfigureServer(s1, s2); err != nil { - t.Fatal(err) - } - if s2.IdleTimeout != timeout { - t.Errorf("s2.IdleTimeout = %v; want %v", s2.IdleTimeout, timeout) - } - } -} - -func TestCertClone(t *testing.T) { - c := &tls.Config{ - GetClientCertificate: func(*tls.CertificateRequestInfo) (*tls.Certificate, error) { - panic("shouldn't be called") - }, - } - c2 := cloneTLSConfig(c) - if c2.GetClientCertificate == nil { - t.Error("GetClientCertificate is nil") - } -} diff --git a/vendor/golang.org/x/net/http2/go19_test.go b/vendor/golang.org/x/net/http2/go19_test.go deleted file mode 100644 index 22b00066..00000000 --- a/vendor/golang.org/x/net/http2/go19_test.go +++ /dev/null @@ -1,59 +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 http2 - -import ( - "context" - "net/http" - "reflect" - "testing" - "time" -) - -func TestServerGracefulShutdown(t *testing.T) { - var st *serverTester - handlerDone := make(chan struct{}) - st = newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - defer close(handlerDone) - go st.ts.Config.Shutdown(context.Background()) - - ga := st.wantGoAway() - if ga.ErrCode != ErrCodeNo { - t.Errorf("GOAWAY error = %v; want ErrCodeNo", ga.ErrCode) - } - if ga.LastStreamID != 1 { - t.Errorf("GOAWAY LastStreamID = %v; want 1", ga.LastStreamID) - } - - w.Header().Set("x-foo", "bar") - }) - defer st.Close() - - st.greet() - st.bodylessReq1() - - select { - case <-handlerDone: - case <-time.After(5 * time.Second): - t.Fatalf("server did not shutdown?") - } - hf := st.wantHeaders() - goth := st.decodeHeader(hf.HeaderBlockFragment()) - wanth := [][2]string{ - {":status", "200"}, - {"x-foo", "bar"}, - {"content-length", "0"}, - } - if !reflect.DeepEqual(goth, wanth) { - t.Errorf("Got headers %v; want %v", goth, wanth) - } - - n, err := st.cc.Read([]byte{0}) - if n != 0 || err == nil { - t.Errorf("Read = %v, %v; want 0, non-nil", n, err) - } -} diff --git a/vendor/golang.org/x/net/http2/gotrack_test.go b/vendor/golang.org/x/net/http2/gotrack_test.go deleted file mode 100644 index 06db6123..00000000 --- a/vendor/golang.org/x/net/http2/gotrack_test.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. - -package http2 - -import ( - "fmt" - "strings" - "testing" -) - -func TestGoroutineLock(t *testing.T) { - oldDebug := DebugGoroutines - DebugGoroutines = true - defer func() { DebugGoroutines = oldDebug }() - - g := newGoroutineLock() - g.check() - - sawPanic := make(chan interface{}) - go func() { - defer func() { sawPanic <- recover() }() - g.check() // should panic - }() - e := <-sawPanic - if e == nil { - t.Fatal("did not see panic from check in other goroutine") - } - if !strings.Contains(fmt.Sprint(e), "wrong goroutine") { - t.Errorf("expected on see panic about running on the wrong goroutine; got %v", e) - } -} diff --git a/vendor/golang.org/x/net/http2/hpack/encode_test.go b/vendor/golang.org/x/net/http2/hpack/encode_test.go deleted file mode 100644 index 05f12db9..00000000 --- a/vendor/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/vendor/golang.org/x/net/http2/hpack/hpack_test.go b/vendor/golang.org/x/net/http2/hpack/hpack_test.go deleted file mode 100644 index 3f222744..00000000 --- a/vendor/golang.org/x/net/http2/hpack/hpack_test.go +++ /dev/null @@ -1,762 +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 BenchmarkHuffmanDecode(b *testing.B) { - b.StopTimer() - enc, err := hex.DecodeString(strings.Replace("94e7 821d d7f2 e6c7 b335 dfdf cd5b 3960 d5af 2708 7f36 72c1 ab27 0fb5 291f 9587 3160 65c0 03ed 4ee5 b106 3d50 07", - " ", "", -1)) - if err != nil { - b.Fatal(err) - } - b.ReportAllocs() - b.StartTimer() - var buf bytes.Buffer - for i := 0; i < b.N; i++ { - buf.Reset() - if _, err := HuffmanDecode(&buf, enc); err != nil { - b.Fatalf("decode error: %v", err) - } - if string(buf.Bytes()) != "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1" { - b.Fatalf("bogus output %q", buf.Bytes()) - } - } -} - -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/vendor/golang.org/x/net/http2/hpack/tables_test.go b/vendor/golang.org/x/net/http2/hpack/tables_test.go deleted file mode 100644 index d963f363..00000000 --- a/vendor/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/vendor/golang.org/x/net/http2/http2_test.go b/vendor/golang.org/x/net/http2/http2_test.go deleted file mode 100644 index 667db488..00000000 --- a/vendor/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/vendor/golang.org/x/net/http2/pipe_test.go b/vendor/golang.org/x/net/http2/pipe_test.go deleted file mode 100644 index 1bf351ff..00000000 --- a/vendor/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/vendor/golang.org/x/net/http2/server_push_test.go b/vendor/golang.org/x/net/http2/server_push_test.go deleted file mode 100644 index 918fd30d..00000000 --- a/vendor/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/vendor/golang.org/x/net/http2/server_test.go b/vendor/golang.org/x/net/http2/server_test.go deleted file mode 100644 index bb19c966..00000000 --- a/vendor/golang.org/x/net/http2/server_test.go +++ /dev/null @@ -1,3852 +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_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")) - - // 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()) - 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 !sawGoAway { - t.Errorf("didn't see GOAWAY") - } - if !sawRes { - t.Errorf("didn't see response") - } - }) -} - -func TestServer_Headers_HalfCloseRemote(t *testing.T) { - var st *serverTester - writeData := make(chan bool) - writeHeaders := make(chan bool) - leaveHandler := make(chan bool) - st = newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - 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) - } - writeHeaders <- true - - <-leaveHandler - }) - st.greet() - - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: st.encodeHeader(), - EndStream: false, // keep it open - EndHeaders: true, - }) - <-writeData - st.writeData(1, true, nil) - - <-writeHeaders - - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: st.encodeHeader(), - EndStream: false, // keep it open - EndHeaders: true, - }) - - defer close(leaveHandler) - - st.wantRSTStream(1, ErrCodeStreamClosed) -} diff --git a/vendor/golang.org/x/net/http2/transport_test.go b/vendor/golang.org/x/net/http2/transport_test.go deleted file mode 100644 index 5b5c0768..00000000 --- a/vendor/golang.org/x/net/http2/transport_test.go +++ /dev/null @@ -1,4185 +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/textproto" - "net/url" - "os" - "reflect" - "runtime" - "sort" - "strconv" - "strings" - "sync" - "sync/atomic" - "testing" - "time" - - "golang.org/x/net/context" - "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} - -var canceledCtx context.Context - -func init() { - ctx, cancel := context.WithCancel(context.Background()) - cancel() - canceledCtx = ctx -} - -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() -} - -// Issue 26189, Issue 17739: ignore unknown 1xx responses -func TestTransportUnknown1xx(t *testing.T) { - var buf bytes.Buffer - defer func() { got1xxFuncForTests = nil }() - got1xxFuncForTests = func(code int, header textproto.MIMEHeader) error { - fmt.Fprintf(&buf, "code=%d header=%v\n", code, header) - return nil - } - - 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 != 204 { - return fmt.Errorf("status code = %v; want 204", res.StatusCode) - } - want := `code=110 header=map[Foo-Bar:[110]] -code=111 header=map[Foo-Bar:[111]] -code=112 header=map[Foo-Bar:[112]] -code=113 header=map[Foo-Bar:[113]] -code=114 header=map[Foo-Bar:[114]] -` - if got := buf.String(); got != want { - t.Errorf("Got trace:\n%s\nWant:\n%s", got, 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 - } - switch f := f.(type) { - case *WindowUpdateFrame, *SettingsFrame: - case *HeadersFrame: - for i := 110; i <= 114; i++ { - buf.Reset() - enc.WriteField(hpack.HeaderField{Name: ":status", Value: fmt.Sprint(i)}) - enc.WriteField(hpack.HeaderField{Name: "foo-bar", Value: fmt.Sprint(i)}) - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: f.StreamID, - EndHeaders: true, - EndStream: false, - BlockFragment: buf.Bytes(), - }) - } - buf.Reset() - enc.WriteField(hpack.HeaderField{Name: ":status", Value: "204"}) - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: f.StreamID, - EndHeaders: true, - EndStream: false, - BlockFragment: buf.Bytes(), - }) - return nil - } - } - } - 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"}, - 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: "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(context.Background()); 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) }) -} - -func activeStreams(cc *ClientConn) int { - cc.mu.Lock() - defer cc.mu.Unlock() - return len(cc.streams) -} - -type closeMode int - -const ( - closeAtHeaders closeMode = iota - closeAtBody - shutdown - shutdownCancel -) - -// See golang.org/issue/17292 -func testClientConnClose(t *testing.T, closeMode closeMode) { - clientDone := make(chan struct{}) - defer close(clientDone) - handlerDone := make(chan struct{}) - closeDone := make(chan struct{}) - beforeHeader := func() {} - bodyWrite := func(w http.ResponseWriter) {} - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - defer close(handlerDone) - beforeHeader() - w.WriteHeader(http.StatusOK) - w.(http.Flusher).Flush() - bodyWrite(w) - select { - case <-w.(http.CloseNotifier).CloseNotify(): - // client closed connection before completion - if closeMode == shutdown || closeMode == shutdownCancel { - t.Error("expected request to complete") - } - case <-clientDone: - if closeMode == closeAtHeaders || closeMode == closeAtBody { - t.Error("expected connection closed by client") - } - } - }, optOnlyServer) - defer st.Close() - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - cc, err := tr.dialClientConn(st.ts.Listener.Addr().String(), false) - req, err := http.NewRequest("GET", st.ts.URL, nil) - if err != nil { - t.Fatal(err) - } - if closeMode == closeAtHeaders { - beforeHeader = func() { - if err := cc.Close(); err != nil { - t.Error(err) - } - close(closeDone) - } - } - var sendBody chan struct{} - if closeMode == closeAtBody { - sendBody = make(chan struct{}) - bodyWrite = func(w http.ResponseWriter) { - <-sendBody - b := make([]byte, 32) - w.Write(b) - w.(http.Flusher).Flush() - if err := cc.Close(); err != nil { - t.Errorf("unexpected ClientConn close error: %v", err) - } - close(closeDone) - w.Write(b) - w.(http.Flusher).Flush() - } - } - res, err := cc.RoundTrip(req) - if res != nil { - defer res.Body.Close() - } - if closeMode == closeAtHeaders { - got := fmt.Sprint(err) - want := "http2: client connection force closed via ClientConn.Close" - if got != want { - t.Fatalf("RoundTrip error = %v, want %v", got, want) - } - } else { - if err != nil { - t.Fatalf("RoundTrip: %v", err) - } - if got, want := activeStreams(cc), 1; got != want { - t.Errorf("got %d active streams, want %d", got, want) - } - } - switch closeMode { - case shutdownCancel: - if err = cc.Shutdown(canceledCtx); err != errCanceled { - t.Errorf("got %v, want %v", err, errCanceled) - } - if cc.closing == false { - t.Error("expected closing to be true") - } - if cc.CanTakeNewRequest() == true { - t.Error("CanTakeNewRequest to return false") - } - if v, want := len(cc.streams), 1; v != want { - t.Errorf("expected %d active streams, got %d", want, v) - } - clientDone <- struct{}{} - <-handlerDone - case shutdown: - wait := make(chan struct{}) - shutdownEnterWaitStateHook = func() { - close(wait) - shutdownEnterWaitStateHook = func() {} - } - defer func() { shutdownEnterWaitStateHook = func() {} }() - shutdown := make(chan struct{}, 1) - go func() { - if err = cc.Shutdown(context.Background()); err != nil { - t.Error(err) - } - close(shutdown) - }() - // Let the shutdown to enter wait state - <-wait - cc.mu.Lock() - if cc.closing == false { - t.Error("expected closing to be true") - } - cc.mu.Unlock() - if cc.CanTakeNewRequest() == true { - t.Error("CanTakeNewRequest to return false") - } - if got, want := activeStreams(cc), 1; got != want { - t.Errorf("got %d active streams, want %d", got, want) - } - // Let the active request finish - clientDone <- struct{}{} - // Wait for the shutdown to end - select { - case <-shutdown: - case <-time.After(2 * time.Second): - t.Fatal("expected server connection to close") - } - case closeAtHeaders, closeAtBody: - if closeMode == closeAtBody { - go close(sendBody) - if _, err := io.Copy(ioutil.Discard, res.Body); err == nil { - t.Error("expected a Copy error, got nil") - } - } - <-closeDone - if got, want := activeStreams(cc), 0; got != want { - t.Errorf("got %d active streams, want %d", got, want) - } - // wait for server to get the connection close notice - select { - case <-handlerDone: - case <-time.After(2 * time.Second): - t.Fatal("expected server connection to close") - } - } -} - -// The client closes the connection just after the server got the client's HEADERS -// frame, but before the server sends its HEADERS response back. The expected -// result is an error on RoundTrip explaining the client closed the connection. -func TestClientConnCloseAtHeaders(t *testing.T) { - testClientConnClose(t, closeAtHeaders) -} - -// The client closes the connection between two server's response DATA frames. -// The expected behavior is a response body io read error on the client. -func TestClientConnCloseAtBody(t *testing.T) { - testClientConnClose(t, closeAtBody) -} - -// The client sends a GOAWAY frame before the server finished processing a request. -// We expect the connection not to close until the request is completed. -func TestClientConnShutdown(t *testing.T) { - testClientConnClose(t, shutdown) -} - -// The client sends a GOAWAY frame before the server finishes processing a request, -// but cancels the passed context before the request is completed. The expected -// behavior is the client closing the connection after the context is canceled. -func TestClientConnShutdownCancel(t *testing.T) { - testClientConnClose(t, shutdownCancel) -} - -// Issue 25009: use Request.GetBody if present, even if it seems like -// we might not need it. Apparently something else can still read from -// the original request body. Data race? In any case, rewinding -// unconditionally on retry is a nicer model anyway and should -// simplify code in the future (after the Go 1.11 freeze) -func TestTransportUsesGetBodyWhenPresent(t *testing.T) { - calls := 0 - someBody := func() io.ReadCloser { - return struct{ io.ReadCloser }{ioutil.NopCloser(bytes.NewReader(nil))} - } - req := &http.Request{ - Body: someBody(), - GetBody: func() (io.ReadCloser, error) { - calls++ - return someBody(), nil - }, - } - - afterBodyWrite := false // pretend we haven't read+written the body yet - req2, err := shouldRetryRequest(req, errClientConnUnusable, afterBodyWrite) - if err != nil { - t.Fatal(err) - } - if calls != 1 { - t.Errorf("Calls = %d; want 1", calls) - } - if req2 == req { - t.Error("req2 changed") - } - if req2 == nil { - t.Fatal("req2 is nil") - } - if req2.Body == nil { - t.Fatal("req2.Body is nil") - } - if req2.GetBody == nil { - t.Fatal("req2.GetBody is nil") - } - if req2.Body == req.Body { - t.Error("req2.Body unchanged") - } -} - -// Issue 22891: verify that the "https" altproto we register with net/http -// is a certain type: a struct with one field with our *http2.Transport in it. -func TestNoDialH2RoundTripperType(t *testing.T) { - t1 := new(http.Transport) - t2 := new(Transport) - rt := noDialH2RoundTripper{t2} - if err := registerHTTPSProtocol(t1, rt); err != nil { - t.Fatal(err) - } - rv := reflect.ValueOf(rt) - if rv.Type().Kind() != reflect.Struct { - t.Fatalf("kind = %v; net/http expects struct", rv.Type().Kind()) - } - if n := rv.Type().NumField(); n != 1 { - t.Fatalf("fields = %d; net/http expects 1", n) - } - v := rv.Field(0) - if _, ok := v.Interface().(*Transport); !ok { - t.Fatalf("wrong kind %T; want *Transport", v.Interface()) - } -} diff --git a/vendor/golang.org/x/net/http2/writesched_priority_test.go b/vendor/golang.org/x/net/http2/writesched_priority_test.go deleted file mode 100644 index f2b535a2..00000000 --- a/vendor/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/vendor/golang.org/x/net/http2/writesched_random_test.go b/vendor/golang.org/x/net/http2/writesched_random_test.go deleted file mode 100644 index 3bf4aa36..00000000 --- a/vendor/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/vendor/golang.org/x/net/http2/writesched_test.go b/vendor/golang.org/x/net/http2/writesched_test.go deleted file mode 100644 index 0807056b..00000000 --- a/vendor/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/vendor/golang.org/x/net/http2/z_spec_test.go b/vendor/golang.org/x/net/http2/z_spec_test.go deleted file mode 100644 index 610b2cdb..00000000 --- a/vendor/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/vendor/golang.org/x/net/idna/example_test.go b/vendor/golang.org/x/net/idna/example_test.go deleted file mode 100644 index 948f6eb2..00000000 --- a/vendor/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/vendor/golang.org/x/net/idna/idna_test.go b/vendor/golang.org/x/net/idna/idna_test.go deleted file mode 100644 index 0b067cac..00000000 --- a/vendor/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/vendor/golang.org/x/net/idna/punycode_test.go b/vendor/golang.org/x/net/idna/punycode_test.go deleted file mode 100644 index bfec81de..00000000 --- a/vendor/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/vendor/golang.org/x/net/internal/timeseries/timeseries_test.go b/vendor/golang.org/x/net/internal/timeseries/timeseries_test.go deleted file mode 100644 index 66325a91..00000000 --- a/vendor/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/vendor/golang.org/x/net/trace/histogram_test.go b/vendor/golang.org/x/net/trace/histogram_test.go deleted file mode 100644 index d384b933..00000000 --- a/vendor/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/vendor/golang.org/x/net/trace/trace_test.go b/vendor/golang.org/x/net/trace/trace_test.go deleted file mode 100644 index bfd9dfe9..00000000 --- a/vendor/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/vendor/golang.org/x/sys/.gitattributes b/vendor/golang.org/x/sys/.gitattributes deleted file mode 100644 index d2f212e5..00000000 --- a/vendor/golang.org/x/sys/.gitattributes +++ /dev/null @@ -1,10 +0,0 @@ -# Treat all files in this repo as binary, with no git magic updating -# line endings. Windows users contributing to Go will need to use a -# modern version of git and editors capable of LF line endings. -# -# We'll prevent accidental CRLF line endings from entering the repo -# via the git-review gofmt checks. -# -# See golang.org/issue/9281 - -* -text diff --git a/vendor/golang.org/x/sys/.gitignore b/vendor/golang.org/x/sys/.gitignore deleted file mode 100644 index 8339fd61..00000000 --- a/vendor/golang.org/x/sys/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Add no patterns to .hgignore except for files generated by the build. -last-change diff --git a/vendor/golang.org/x/sys/CONTRIBUTING.md b/vendor/golang.org/x/sys/CONTRIBUTING.md deleted file mode 100644 index d0485e88..00000000 --- a/vendor/golang.org/x/sys/CONTRIBUTING.md +++ /dev/null @@ -1,26 +0,0 @@ -# Contributing to Go - -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? - -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. - -## Contributing code - -Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) -before sending patches. - -Unless otherwise noted, the Go source files are distributed under -the BSD-style license found in the LICENSE file. diff --git a/vendor/golang.org/x/sys/README.md b/vendor/golang.org/x/sys/README.md deleted file mode 100644 index ef6c9e59..00000000 --- a/vendor/golang.org/x/sys/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# sys - -This repository holds supplemental Go packages for low-level interactions with -the operating system. - -## Download/Install - -The easiest way to install is to run `go get -u golang.org/x/sys`. You can -also manually git clone the repository to `$GOPATH/src/golang.org/x/sys`. - -## Report Issues / Send Patches - -This repository uses Gerrit for code changes. To learn how to submit changes to -this repository, see https://golang.org/doc/contribute.html. - -The main issue tracker for the sys repository is located at -https://github.com/golang/go/issues. Prefix your issue with "x/sys:" in the -subject line, so it is easy to find. diff --git a/vendor/golang.org/x/sys/codereview.cfg b/vendor/golang.org/x/sys/codereview.cfg deleted file mode 100644 index 3f8b14b6..00000000 --- a/vendor/golang.org/x/sys/codereview.cfg +++ /dev/null @@ -1 +0,0 @@ -issuerepo: golang/go diff --git a/vendor/golang.org/x/sys/unix/.gitignore b/vendor/golang.org/x/sys/unix/.gitignore deleted file mode 100644 index e3e0fc6f..00000000 --- a/vendor/golang.org/x/sys/unix/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -_obj/ -unix.test diff --git a/vendor/golang.org/x/sys/unix/README.md b/vendor/golang.org/x/sys/unix/README.md deleted file mode 100644 index bc6f6031..00000000 --- a/vendor/golang.org/x/sys/unix/README.md +++ /dev/null @@ -1,173 +0,0 @@ -# Building `sys/unix` - -The sys/unix package provides access to the raw system call interface of the -underlying operating system. See: https://godoc.org/golang.org/x/sys/unix - -Porting Go to a new architecture/OS combination or adding syscalls, types, or -constants to an existing architecture/OS pair requires some manual effort; -however, there are tools that automate much of the process. - -## Build Systems - -There are currently two ways we generate the necessary files. We are currently -migrating the build system to use containers so the builds are reproducible. -This is being done on an OS-by-OS basis. Please update this documentation as -components of the build system change. - -### Old Build System (currently for `GOOS != "Linux" || GOARCH == "sparc64"`) - -The old build system generates the Go files based on the C header files -present on your system. This means that files -for a given GOOS/GOARCH pair must be generated on a system with that OS and -architecture. This also means that the generated code can differ from system -to system, based on differences in the header files. - -To avoid this, if you are using the old build system, only generate the Go -files on an installation with unmodified header files. It is also important to -keep track of which version of the OS the files were generated from (ex. -Darwin 14 vs Darwin 15). This makes it easier to track the progress of changes -and have each OS upgrade correspond to a single change. - -To build the files for your current OS and architecture, make sure GOOS and -GOARCH are set correctly and run `mkall.sh`. This will generate the files for -your specific system. Running `mkall.sh -n` shows the commands that will be run. - -Requirements: bash, perl, go - -### New Build System (currently for `GOOS == "Linux" && GOARCH != "sparc64"`) - -The new build system uses a Docker container to generate the go files directly -from source checkouts of the kernel and various system libraries. This means -that on any platform that supports Docker, all the files using the new build -system can be generated at once, and generated files will not change based on -what the person running the scripts has installed on their computer. - -The OS specific files for the new build system are located in the `${GOOS}` -directory, and the build is coordinated by the `${GOOS}/mkall.go` program. When -the kernel or system library updates, modify the Dockerfile at -`${GOOS}/Dockerfile` to checkout the new release of the source. - -To build all the files under the new build system, you must be on an amd64/Linux -system and have your GOOS and GOARCH set accordingly. Running `mkall.sh` will -then generate all of the files for all of the GOOS/GOARCH pairs in the new build -system. Running `mkall.sh -n` shows the commands that will be run. - -Requirements: bash, perl, go, docker - -## Component files - -This section describes the various files used in the code generation process. -It also contains instructions on how to modify these files to add a new -architecture/OS or to add additional syscalls, types, or constants. Note that -if you are using the new build system, the scripts cannot be called normally. -They must be called from within the docker container. - -### asm files - -The hand-written assembly file at `asm_${GOOS}_${GOARCH}.s` implements system -call dispatch. There are three entry points: -``` - func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr) - func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr) - func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr) -``` -The first and second are the standard ones; they differ only in how many -arguments can be passed to the kernel. The third is for low-level use by the -ForkExec wrapper. Unlike the first two, it does not call into the scheduler to -let it know that a system call is running. - -When porting Go to an new architecture/OS, this file must be implemented for -each GOOS/GOARCH pair. - -### mksysnum - -Mksysnum is a script located at `${GOOS}/mksysnum.pl` (or `mksysnum_${GOOS}.pl` -for the old system). This script takes in a list of header files containing the -syscall number declarations and parses them to produce the corresponding list of -Go numeric constants. See `zsysnum_${GOOS}_${GOARCH}.go` for the generated -constants. - -Adding new syscall numbers is mostly done by running the build on a sufficiently -new installation of the target OS (or updating the source checkouts for the -new build system). However, depending on the OS, you make need to update the -parsing in mksysnum. - -### mksyscall.pl - -The `syscall.go`, `syscall_${GOOS}.go`, `syscall_${GOOS}_${GOARCH}.go` are -hand-written Go files which implement system calls (for unix, the specific OS, -or the specific OS/Architecture pair respectively) that need special handling -and list `//sys` comments giving prototypes for ones that can be generated. - -The mksyscall.pl script takes the `//sys` and `//sysnb` comments and converts -them into syscalls. This requires the name of the prototype in the comment to -match a syscall number in the `zsysnum_${GOOS}_${GOARCH}.go` file. The function -prototype can be exported (capitalized) or not. - -Adding a new syscall often just requires adding a new `//sys` function prototype -with the desired arguments and a capitalized name so it is exported. However, if -you want the interface to the syscall to be different, often one will make an -unexported `//sys` prototype, an then write a custom wrapper in -`syscall_${GOOS}.go`. - -### types files - -For each OS, there is a hand-written Go file at `${GOOS}/types.go` (or -`types_${GOOS}.go` on the old system). This file includes standard C headers and -creates Go type aliases to the corresponding C types. The file is then fed -through godef to get the Go compatible definitions. Finally, the generated code -is fed though mkpost.go to format the code correctly and remove any hidden or -private identifiers. This cleaned-up code is written to -`ztypes_${GOOS}_${GOARCH}.go`. - -The hardest part about preparing this file is figuring out which headers to -include and which symbols need to be `#define`d to get the actual data -structures that pass through to the kernel system calls. Some C libraries -preset alternate versions for binary compatibility and translate them on the -way in and out of system calls, but there is almost always a `#define` that can -get the real ones. -See `types_darwin.go` and `linux/types.go` for examples. - -To add a new type, add in the necessary include statement at the top of the -file (if it is not already there) and add in a type alias line. Note that if -your type is significantly different on different architectures, you may need -some `#if/#elif` macros in your include statements. - -### mkerrors.sh - -This script is used to generate the system's various constants. This doesn't -just include the error numbers and error strings, but also the signal numbers -an a wide variety of miscellaneous constants. The constants come from the list -of include files in the `includes_${uname}` variable. A regex then picks out -the desired `#define` statements, and generates the corresponding Go constants. -The error numbers and strings are generated from `#include `, and the -signal numbers and strings are generated from `#include `. All of -these constants are written to `zerrors_${GOOS}_${GOARCH}.go` via a C program, -`_errors.c`, which prints out all the constants. - -To add a constant, add the header that includes it to the appropriate variable. -Then, edit the regex (if necessary) to match the desired constant. Avoid making -the regex too broad to avoid matching unintended constants. - - -## Generated files - -### `zerror_${GOOS}_${GOARCH}.go` - -A file containing all of the system's generated error numbers, error strings, -signal numbers, and constants. Generated by `mkerrors.sh` (see above). - -### `zsyscall_${GOOS}_${GOARCH}.go` - -A file containing all the generated syscalls for a specific GOOS and GOARCH. -Generated by `mksyscall.pl` (see above). - -### `zsysnum_${GOOS}_${GOARCH}.go` - -A list of numeric constants for all the syscall number of the specific GOOS -and GOARCH. Generated by mksysnum (see above). - -### `ztypes_${GOOS}_${GOARCH}.go` - -A file containing Go types for passing into (or returning from) syscalls. -Generated by godefs and the types file (see above). diff --git a/vendor/golang.org/x/sys/unix/creds_test.go b/vendor/golang.org/x/sys/unix/creds_test.go deleted file mode 100644 index 1b508319..00000000 --- a/vendor/golang.org/x/sys/unix/creds_test.go +++ /dev/null @@ -1,134 +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 linux - -package unix_test - -import ( - "bytes" - "go/build" - "net" - "os" - "testing" - - "golang.org/x/sys/unix" -) - -// TestSCMCredentials tests the sending and receiving of credentials -// (PID, UID, GID) in an ancillary message between two UNIX -// sockets. The SO_PASSCRED socket option is enabled on the sending -// socket for this to work. -func TestSCMCredentials(t *testing.T) { - socketTypeTests := []struct { - socketType int - dataLen int - }{ - { - unix.SOCK_STREAM, - 1, - }, { - unix.SOCK_DGRAM, - 0, - }, - } - - for _, tt := range socketTypeTests { - if tt.socketType == unix.SOCK_DGRAM && !atLeast1p10() { - t.Log("skipping DGRAM test on pre-1.10") - continue - } - - fds, err := unix.Socketpair(unix.AF_LOCAL, tt.socketType, 0) - if err != nil { - t.Fatalf("Socketpair: %v", err) - } - defer unix.Close(fds[0]) - defer unix.Close(fds[1]) - - err = unix.SetsockoptInt(fds[0], unix.SOL_SOCKET, unix.SO_PASSCRED, 1) - if err != nil { - t.Fatalf("SetsockoptInt: %v", err) - } - - srvFile := os.NewFile(uintptr(fds[0]), "server") - defer srvFile.Close() - srv, err := net.FileConn(srvFile) - if err != nil { - t.Errorf("FileConn: %v", err) - return - } - defer srv.Close() - - cliFile := os.NewFile(uintptr(fds[1]), "client") - defer cliFile.Close() - cli, err := net.FileConn(cliFile) - if err != nil { - t.Errorf("FileConn: %v", err) - return - } - defer cli.Close() - - var ucred unix.Ucred - ucred.Pid = int32(os.Getpid()) - ucred.Uid = uint32(os.Getuid()) - ucred.Gid = uint32(os.Getgid()) - oob := unix.UnixCredentials(&ucred) - - // On SOCK_STREAM, this is internally going to send a dummy byte - n, oobn, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil) - if err != nil { - t.Fatalf("WriteMsgUnix: %v", err) - } - if n != 0 { - t.Fatalf("WriteMsgUnix n = %d, want 0", n) - } - if oobn != len(oob) { - t.Fatalf("WriteMsgUnix oobn = %d, want %d", oobn, len(oob)) - } - - oob2 := make([]byte, 10*len(oob)) - n, oobn2, flags, _, err := srv.(*net.UnixConn).ReadMsgUnix(nil, oob2) - if err != nil { - t.Fatalf("ReadMsgUnix: %v", err) - } - if flags != 0 { - t.Fatalf("ReadMsgUnix flags = 0x%x, want 0", flags) - } - if n != tt.dataLen { - t.Fatalf("ReadMsgUnix n = %d, want %d", n, tt.dataLen) - } - if oobn2 != oobn { - // without SO_PASSCRED set on the socket, ReadMsgUnix will - // return zero oob bytes - t.Fatalf("ReadMsgUnix oobn = %d, want %d", oobn2, oobn) - } - oob2 = oob2[:oobn2] - if !bytes.Equal(oob, oob2) { - t.Fatal("ReadMsgUnix oob bytes don't match") - } - - scm, err := unix.ParseSocketControlMessage(oob2) - if err != nil { - t.Fatalf("ParseSocketControlMessage: %v", err) - } - newUcred, err := unix.ParseUnixCredentials(&scm[0]) - if err != nil { - t.Fatalf("ParseUnixCredentials: %v", err) - } - if *newUcred != ucred { - t.Fatalf("ParseUnixCredentials = %+v, want %+v", newUcred, ucred) - } - } -} - -// atLeast1p10 reports whether we are running on Go 1.10 or later. -func atLeast1p10() bool { - for _, ver := range build.Default.ReleaseTags { - if ver == "go1.10" { - return true - } - } - return false -} diff --git a/vendor/golang.org/x/sys/unix/dev_linux_test.go b/vendor/golang.org/x/sys/unix/dev_linux_test.go deleted file mode 100644 index 51645289..00000000 --- a/vendor/golang.org/x/sys/unix/dev_linux_test.go +++ /dev/null @@ -1,56 +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.7 - -package unix_test - -import ( - "fmt" - "testing" - - "golang.org/x/sys/unix" -) - -func TestDevices(t *testing.T) { - testCases := []struct { - path string - major uint32 - minor uint32 - }{ - // well known major/minor numbers according to - // https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/admin-guide/devices.txt - {"/dev/null", 1, 3}, - {"/dev/zero", 1, 5}, - {"/dev/random", 1, 8}, - {"/dev/full", 1, 7}, - {"/dev/urandom", 1, 9}, - {"/dev/tty", 5, 0}, - } - for _, tc := range testCases { - t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) { - var stat unix.Stat_t - err := unix.Stat(tc.path, &stat) - if err != nil { - if err == unix.EACCES { - t.Skip("no permission to stat device, skipping test") - } - t.Errorf("failed to stat device: %v", err) - return - } - - dev := uint64(stat.Rdev) - if unix.Major(dev) != tc.major { - t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major) - } - if unix.Minor(dev) != tc.minor { - t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor) - } - if unix.Mkdev(tc.major, tc.minor) != dev { - t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev) - } - }) - - } -} diff --git a/vendor/golang.org/x/sys/unix/example_test.go b/vendor/golang.org/x/sys/unix/example_test.go deleted file mode 100644 index 10619afd..00000000 --- a/vendor/golang.org/x/sys/unix/example_test.go +++ /dev/null @@ -1,19 +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. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris - -package unix_test - -import ( - "log" - "os" - - "golang.org/x/sys/unix" -) - -func ExampleExec() { - err := unix.Exec("/bin/ls", []string{"ls", "-al"}, os.Environ()) - log.Fatal(err) -} diff --git a/vendor/golang.org/x/sys/unix/export_test.go b/vendor/golang.org/x/sys/unix/export_test.go deleted file mode 100644 index e8024690..00000000 --- a/vendor/golang.org/x/sys/unix/export_test.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris - -package unix - -var Itoa = itoa diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh deleted file mode 100755 index 1715122b..00000000 --- a/vendor/golang.org/x/sys/unix/mkall.sh +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2009 The Go Authors. All rights reserved. -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file. - -# This script runs or (given -n) prints suggested commands to generate files for -# the Architecture/OS specified by the GOARCH and GOOS environment variables. -# See README.md for more information about how the build system works. - -GOOSARCH="${GOOS}_${GOARCH}" - -# defaults -mksyscall="./mksyscall.pl" -mkerrors="./mkerrors.sh" -zerrors="zerrors_$GOOSARCH.go" -mksysctl="" -zsysctl="zsysctl_$GOOSARCH.go" -mksysnum= -mktypes= -run="sh" -cmd="" - -case "$1" in --syscalls) - for i in zsyscall*go - do - # Run the command line that appears in the first line - # of the generated file to regenerate it. - sed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i - rm _$i - done - exit 0 - ;; --n) - run="cat" - cmd="echo" - shift -esac - -case "$#" in -0) - ;; -*) - echo 'usage: mkall.sh [-n]' 1>&2 - exit 2 -esac - -if [[ "$GOOS" = "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then - # Use then new build system - # Files generated through docker (use $cmd so you can Ctl-C the build or run) - $cmd docker build --tag generate:$GOOS $GOOS - $cmd docker run --interactive --tty --volume $(dirname "$(readlink -f "$0")"):/build generate:$GOOS - exit -fi - -GOOSARCH_in=syscall_$GOOSARCH.go -case "$GOOSARCH" in -_* | *_ | _) - echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2 - exit 1 - ;; -darwin_386) - mkerrors="$mkerrors -m32" - mksyscall="./mksyscall.pl -l32" - mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -darwin_amd64) - mkerrors="$mkerrors -m64" - mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -darwin_arm) - mkerrors="$mkerrors" - mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -darwin_arm64) - mkerrors="$mkerrors -m64" - mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -dragonfly_amd64) - mkerrors="$mkerrors -m64" - mksyscall="./mksyscall.pl -dragonfly" - mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -freebsd_386) - mkerrors="$mkerrors -m32" - mksyscall="./mksyscall.pl -l32" - mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -freebsd_amd64) - mkerrors="$mkerrors -m64" - mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -freebsd_arm) - mkerrors="$mkerrors" - mksyscall="./mksyscall.pl -l32 -arm" - mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl" - # Let the type of C char be signed for making the bare syscall - # API consistent across platforms. - mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" - ;; -linux_sparc64) - GOOSARCH_in=syscall_linux_sparc64.go - unistd_h=/usr/include/sparc64-linux-gnu/asm/unistd.h - mkerrors="$mkerrors -m64" - mksysnum="./mksysnum_linux.pl $unistd_h" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -netbsd_386) - mkerrors="$mkerrors -m32" - mksyscall="./mksyscall.pl -l32 -netbsd" - mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -netbsd_amd64) - mkerrors="$mkerrors -m64" - mksyscall="./mksyscall.pl -netbsd" - mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -netbsd_arm) - mkerrors="$mkerrors" - mksyscall="./mksyscall.pl -l32 -netbsd -arm" - mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl" - # Let the type of C char be signed for making the bare syscall - # API consistent across platforms. - mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" - ;; -openbsd_386) - mkerrors="$mkerrors -m32" - mksyscall="./mksyscall.pl -l32 -openbsd" - mksysctl="./mksysctl_openbsd.pl" - mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -openbsd_amd64) - mkerrors="$mkerrors -m64" - mksyscall="./mksyscall.pl -openbsd" - mksysctl="./mksysctl_openbsd.pl" - mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -openbsd_arm) - mkerrors="$mkerrors" - mksyscall="./mksyscall.pl -l32 -openbsd -arm" - mksysctl="./mksysctl_openbsd.pl" - mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl" - # Let the type of C char be signed for making the bare syscall - # API consistent across platforms. - mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" - ;; -solaris_amd64) - mksyscall="./mksyscall_solaris.pl" - mkerrors="$mkerrors -m64" - mksysnum= - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; -*) - echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2 - exit 1 - ;; -esac - -( - if [ -n "$mkerrors" ]; then echo "$mkerrors |gofmt >$zerrors"; fi - case "$GOOS" in - *) - syscall_goos="syscall_$GOOS.go" - case "$GOOS" in - darwin | dragonfly | freebsd | netbsd | openbsd) - syscall_goos="syscall_bsd.go $syscall_goos" - ;; - esac - if [ -n "$mksyscall" ]; then echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go"; fi - ;; - esac - if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi - if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi - if [ -n "$mktypes" ]; then - echo "$mktypes types_$GOOS.go | go run mkpost.go > ztypes_$GOOSARCH.go"; - fi -) | $run diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh deleted file mode 100755 index 49bd8e75..00000000 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ /dev/null @@ -1,607 +0,0 @@ -#!/usr/bin/env bash -# 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. - -# Generate Go code listing errors and other #defined constant -# values (ENAMETOOLONG etc.), by asking the preprocessor -# about the definitions. - -unset LANG -export LC_ALL=C -export LC_CTYPE=C - -if test -z "$GOARCH" -o -z "$GOOS"; then - echo 1>&2 "GOARCH or GOOS not defined in environment" - exit 1 -fi - -# Check that we are using the new build system if we should -if [[ "$GOOS" = "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then - if [[ "$GOLANG_SYS_BUILD" != "docker" ]]; then - echo 1>&2 "In the new build system, mkerrors should not be called directly." - echo 1>&2 "See README.md" - exit 1 - fi -fi - -CC=${CC:-cc} - -if [[ "$GOOS" = "solaris" ]]; then - # Assumes GNU versions of utilities in PATH. - export PATH=/usr/gnu/bin:$PATH -fi - -uname=$(uname) - -includes_Darwin=' -#define _DARWIN_C_SOURCE -#define KERNEL -#define _DARWIN_USE_64_BIT_INODE -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -' - -includes_DragonFly=' -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -' - -includes_FreeBSD=' -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if __FreeBSD__ >= 10 -#define IFT_CARP 0xf8 // IFT_CARP is deprecated in FreeBSD 10 -#undef SIOCAIFADDR -#define SIOCAIFADDR _IOW(105, 26, struct oifaliasreq) // ifaliasreq contains if_data -#undef SIOCSIFPHYADDR -#define SIOCSIFPHYADDR _IOW(105, 70, struct oifaliasreq) // ifaliasreq contains if_data -#endif -' - -includes_Linux=' -#define _LARGEFILE_SOURCE -#define _LARGEFILE64_SOURCE -#ifndef __LP64__ -#define _FILE_OFFSET_BITS 64 -#endif -#define _GNU_SOURCE - -// is broken on powerpc64, as it fails to include definitions of -// these structures. We just include them copied from . -#if defined(__powerpc__) -struct sgttyb { - char sg_ispeed; - char sg_ospeed; - char sg_erase; - char sg_kill; - short sg_flags; -}; - -struct tchars { - char t_intrc; - char t_quitc; - char t_startc; - char t_stopc; - char t_eofc; - char t_brkc; -}; - -struct ltchars { - char t_suspc; - char t_dsuspc; - char t_rprntc; - char t_flushc; - char t_werasc; - char t_lnextc; -}; -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef MSG_FASTOPEN -#define MSG_FASTOPEN 0x20000000 -#endif - -#ifndef PTRACE_GETREGS -#define PTRACE_GETREGS 0xc -#endif - -#ifndef PTRACE_SETREGS -#define PTRACE_SETREGS 0xd -#endif - -#ifndef SOL_NETLINK -#define SOL_NETLINK 270 -#endif - -#ifdef SOL_BLUETOOTH -// SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h -// but it is already in bluetooth_linux.go -#undef SOL_BLUETOOTH -#endif - -// Certain constants are missing from the fs/crypto UAPI -#define FS_KEY_DESC_PREFIX "fscrypt:" -#define FS_KEY_DESC_PREFIX_SIZE 8 -#define FS_MAX_KEY_SIZE 64 -' - -includes_NetBSD=' -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Needed since refers to it... -#define schedppq 1 -' - -includes_OpenBSD=' -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// We keep some constants not supported in OpenBSD 5.5 and beyond for -// the promise of compatibility. -#define EMUL_ENABLED 0x1 -#define EMUL_NATIVE 0x2 -#define IPV6_FAITH 0x1d -#define IPV6_OPTIONS 0x1 -#define IPV6_RTHDR_STRICT 0x1 -#define IPV6_SOCKOPT_RESERVED1 0x3 -#define SIOCGIFGENERIC 0xc020693a -#define SIOCSIFGENERIC 0x80206939 -#define WALTSIG 0x4 -' - -includes_SunOS=' -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -' - - -includes=' -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -' -ccflags="$@" - -# Write go tool cgo -godefs input. -( - echo package unix - echo - echo '/*' - indirect="includes_$(uname)" - echo "${!indirect} $includes" - echo '*/' - echo 'import "C"' - echo 'import "syscall"' - echo - echo 'const (' - - # The gcc command line prints all the #defines - # it encounters while processing the input - echo "${!indirect} $includes" | $CC -x c - -E -dM $ccflags | - awk ' - $1 != "#define" || $2 ~ /\(/ || $3 == "" {next} - - $2 ~ /^E([ABCD]X|[BIS]P|[SD]I|S|FL)$/ {next} # 386 registers - $2 ~ /^(SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))/ {next} - $2 ~ /^(SCM_SRCRT)$/ {next} - $2 ~ /^(MAP_FAILED)$/ {next} - $2 ~ /^ELF_.*$/ {next}# contains ELF_ARCH, etc. - - $2 ~ /^EXTATTR_NAMESPACE_NAMES/ || - $2 ~ /^EXTATTR_NAMESPACE_[A-Z]+_STRING/ {next} - - $2 !~ /^ETH_/ && - $2 !~ /^EPROC_/ && - $2 !~ /^EQUIV_/ && - $2 !~ /^EXPR_/ && - $2 ~ /^E[A-Z0-9_]+$/ || - $2 ~ /^B[0-9_]+$/ || - $2 ~ /^(OLD|NEW)DEV$/ || - $2 == "BOTHER" || - $2 ~ /^CI?BAUD(EX)?$/ || - $2 == "IBSHIFT" || - $2 ~ /^V[A-Z0-9]+$/ || - $2 ~ /^CS[A-Z0-9]/ || - $2 ~ /^I(SIG|CANON|CRNL|UCLC|EXTEN|MAXBEL|STRIP|UTF8)$/ || - $2 ~ /^IGN/ || - $2 ~ /^IX(ON|ANY|OFF)$/ || - $2 ~ /^IN(LCR|PCK)$/ || - $2 !~ "X86_CR3_PCID_NOFLUSH" && - $2 ~ /(^FLU?SH)|(FLU?SH$)/ || - $2 ~ /^C(LOCAL|READ|MSPAR|RTSCTS)$/ || - $2 == "BRKINT" || - $2 == "HUPCL" || - $2 == "PENDIN" || - $2 == "TOSTOP" || - $2 == "XCASE" || - $2 == "ALTWERASE" || - $2 == "NOKERNINFO" || - $2 ~ /^PAR/ || - $2 ~ /^SIG[^_]/ || - $2 ~ /^O[CNPFPL][A-Z]+[^_][A-Z]+$/ || - $2 ~ /^(NL|CR|TAB|BS|VT|FF)DLY$/ || - $2 ~ /^(NL|CR|TAB|BS|VT|FF)[0-9]$/ || - $2 ~ /^O?XTABS$/ || - $2 ~ /^TC[IO](ON|OFF)$/ || - $2 ~ /^IN_/ || - $2 ~ /^LOCK_(SH|EX|NB|UN)$/ || - $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|T?PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ || - $2 ~ /^TP_STATUS_/ || - $2 ~ /^FALLOC_/ || - $2 == "ICMPV6_FILTER" || - $2 == "SOMAXCONN" || - $2 == "NAME_MAX" || - $2 == "IFNAMSIZ" || - $2 ~ /^CTL_(HW|KERN|MAXNAME|NET|QUERY)$/ || - $2 ~ /^KERN_(HOSTNAME|OS(RELEASE|TYPE)|VERSION)$/ || - $2 ~ /^HW_MACHINE$/ || - $2 ~ /^SYSCTL_VERS/ || - $2 ~ /^(MS|MNT|UMOUNT)_/ || - $2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ || - $2 ~ /^(O|F|E?FD|NAME|S|PTRACE|PT)_/ || - $2 ~ /^LINUX_REBOOT_CMD_/ || - $2 ~ /^LINUX_REBOOT_MAGIC[12]$/ || - $2 !~ "NLA_TYPE_MASK" && - $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ || - $2 ~ /^SIOC/ || - $2 ~ /^TIOC/ || - $2 ~ /^TCGET/ || - $2 ~ /^TCSET/ || - $2 ~ /^TC(FLSH|SBRKP?|XONC)$/ || - $2 !~ "RTF_BITS" && - $2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ || - $2 ~ /^BIOC/ || - $2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ || - $2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|LOCKS|MEMLOCK|MSGQUEUE|NICE|NOFILE|NPROC|RSS|RTPRIO|RTTIME|SIGPENDING|STACK)|RLIM_INFINITY/ || - $2 ~ /^PRIO_(PROCESS|PGRP|USER)/ || - $2 ~ /^CLONE_[A-Z_]+/ || - $2 !~ /^(BPF_TIMEVAL)$/ && - $2 ~ /^(BPF|DLT)_/ || - $2 ~ /^CLOCK_/ || - $2 ~ /^CAN_/ || - $2 ~ /^CAP_/ || - $2 ~ /^ALG_/ || - $2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE|IOC_(GET|SET)_ENCRYPTION)/ || - $2 ~ /^GRND_/ || - $2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ || - $2 ~ /^KEYCTL_/ || - $2 ~ /^PERF_EVENT_IOC_/ || - $2 ~ /^SECCOMP_MODE_/ || - $2 ~ /^SPLICE_/ || - $2 !~ /^AUDIT_RECORD_MAGIC/ && - $2 ~ /^[A-Z0-9_]+_MAGIC2?$/ || - $2 ~ /^(VM|VMADDR)_/ || - $2 ~ /^IOCTL_VM_SOCKETS_/ || - $2 ~ /^(TASKSTATS|TS)_/ || - $2 ~ /^CGROUPSTATS_/ || - $2 ~ /^GENL_/ || - $2 ~ /^STATX_/ || - $2 ~ /^RENAME/ || - $2 ~ /^UTIME_/ || - $2 ~ /^XATTR_(CREATE|REPLACE|NO(DEFAULT|FOLLOW|SECURITY)|SHOWCOMPRESSION)/ || - $2 ~ /^ATTR_(BIT_MAP_COUNT|(CMN|VOL|FILE)_)/ || - $2 ~ /^FSOPT_/ || - $2 ~ /^WDIOC_/ || - $2 ~ /^NFN/ || - $2 ~ /^(HDIO|WIN|SMART)_/ || - $2 !~ "WMESGLEN" && - $2 ~ /^W[A-Z0-9]+$/ || - $2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)} - $2 ~ /^__WCOREFLAG$/ {next} - $2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)} - - {next} - ' | sort - - echo ')' -) >_const.go - -# Pull out the error names for later. -errors=$( - echo '#include ' | $CC -x c - -E -dM $ccflags | - awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print $2 }' | - sort -) - -# Pull out the signal names for later. -signals=$( - echo '#include ' | $CC -x c - -E -dM $ccflags | - awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' | - egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' | - sort -) - -# Again, writing regexps to a file. -echo '#include ' | $CC -x c - -E -dM $ccflags | - awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print "^\t" $2 "[ \t]*=" }' | - sort >_error.grep -echo '#include ' | $CC -x c - -E -dM $ccflags | - awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' | - egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' | - sort >_signal.grep - -echo '// mkerrors.sh' "$@" -echo '// Code generated by the command above; see README.md. DO NOT EDIT.' -echo -echo "// +build ${GOARCH},${GOOS}" -echo -go tool cgo -godefs -- "$@" _const.go >_error.out -cat _error.out | grep -vf _error.grep | grep -vf _signal.grep -echo -echo '// Errors' -echo 'const (' -cat _error.out | grep -f _error.grep | sed 's/=\(.*\)/= syscall.Errno(\1)/' -echo ')' - -echo -echo '// Signals' -echo 'const (' -cat _error.out | grep -f _signal.grep | sed 's/=\(.*\)/= syscall.Signal(\1)/' -echo ')' - -# Run C program to print error and syscall strings. -( - echo -E " -#include -#include -#include -#include -#include -#include - -#define nelem(x) (sizeof(x)/sizeof((x)[0])) - -enum { A = 'A', Z = 'Z', a = 'a', z = 'z' }; // avoid need for single quotes below - -struct tuple { - int num; - const char *name; -}; - -struct tuple errors[] = { -" - for i in $errors - do - echo -E ' {'$i', "'$i'" },' - done - - echo -E " -}; - -struct tuple signals[] = { -" - for i in $signals - do - echo -E ' {'$i', "'$i'" },' - done - - # Use -E because on some systems bash builtin interprets \n itself. - echo -E ' -}; - -static int -tuplecmp(const void *a, const void *b) -{ - return ((struct tuple *)a)->num - ((struct tuple *)b)->num; -} - -int -main(void) -{ - int i, e; - char buf[1024], *p; - - printf("\n\n// Error table\n"); - printf("var errorList = [...]struct {\n"); - printf("\tnum syscall.Errno\n"); - printf("\tname string\n"); - printf("\tdesc string\n"); - printf("} {\n"); - qsort(errors, nelem(errors), sizeof errors[0], tuplecmp); - for(i=0; i 0 && errors[i-1].num == e) - continue; - strcpy(buf, strerror(e)); - // lowercase first letter: Bad -> bad, but STREAM -> STREAM. - if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z) - buf[0] += a - A; - printf("\t{ %d, \"%s\", \"%s\" },\n", e, errors[i].name, buf); - } - printf("}\n\n"); - - printf("\n\n// Signal table\n"); - printf("var signalList = [...]struct {\n"); - printf("\tnum syscall.Signal\n"); - printf("\tname string\n"); - printf("\tdesc string\n"); - printf("} {\n"); - qsort(signals, nelem(signals), sizeof signals[0], tuplecmp); - for(i=0; i 0 && signals[i-1].num == e) - continue; - strcpy(buf, strsignal(e)); - // lowercase first letter: Bad -> bad, but STREAM -> STREAM. - if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z) - buf[0] += a - A; - // cut trailing : number. - p = strrchr(buf, ":"[0]); - if(p) - *p = '\0'; - printf("\t{ %d, \"%s\", \"%s\" },\n", e, signals[i].name, buf); - } - printf("}\n\n"); - - return 0; -} - -' -) >_errors.c - -$CC $ccflags -o _errors _errors.c && $GORUN ./_errors && rm -f _errors.c _errors _const.go _error.grep _signal.grep _error.out diff --git a/vendor/golang.org/x/sys/unix/mksyscall.pl b/vendor/golang.org/x/sys/unix/mksyscall.pl deleted file mode 100755 index 1f6b926f..00000000 --- a/vendor/golang.org/x/sys/unix/mksyscall.pl +++ /dev/null @@ -1,341 +0,0 @@ -#!/usr/bin/env perl -# Copyright 2009 The Go Authors. All rights reserved. -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file. - -# This program reads a file containing function prototypes -# (like syscall_darwin.go) and generates system call bodies. -# The prototypes are marked by lines beginning with "//sys" -# and read like func declarations if //sys is replaced by func, but: -# * The parameter lists must give a name for each argument. -# This includes return parameters. -# * The parameter lists must give a type for each argument: -# the (x, y, z int) shorthand is not allowed. -# * If the return parameter is an error number, it must be named errno. - -# A line beginning with //sysnb is like //sys, except that the -# goroutine will not be suspended during the execution of the system -# call. This must only be used for system calls which can never -# block, as otherwise the system call could cause all goroutines to -# hang. - -use strict; - -my $cmdline = "mksyscall.pl " . join(' ', @ARGV); -my $errors = 0; -my $_32bit = ""; -my $plan9 = 0; -my $openbsd = 0; -my $netbsd = 0; -my $dragonfly = 0; -my $arm = 0; # 64-bit value should use (even, odd)-pair -my $tags = ""; # build tags - -if($ARGV[0] eq "-b32") { - $_32bit = "big-endian"; - shift; -} elsif($ARGV[0] eq "-l32") { - $_32bit = "little-endian"; - shift; -} -if($ARGV[0] eq "-plan9") { - $plan9 = 1; - shift; -} -if($ARGV[0] eq "-openbsd") { - $openbsd = 1; - shift; -} -if($ARGV[0] eq "-netbsd") { - $netbsd = 1; - shift; -} -if($ARGV[0] eq "-dragonfly") { - $dragonfly = 1; - shift; -} -if($ARGV[0] eq "-arm") { - $arm = 1; - shift; -} -if($ARGV[0] eq "-tags") { - shift; - $tags = $ARGV[0]; - shift; -} - -if($ARGV[0] =~ /^-/) { - print STDERR "usage: mksyscall.pl [-b32 | -l32] [-tags x,y] [file ...]\n"; - exit 1; -} - -# Check that we are using the new build system if we should -if($ENV{'GOOS'} eq "linux" && $ENV{'GOARCH'} ne "sparc64") { - if($ENV{'GOLANG_SYS_BUILD'} ne "docker") { - print STDERR "In the new build system, mksyscall should not be called directly.\n"; - print STDERR "See README.md\n"; - exit 1; - } -} - - -sub parseparamlist($) { - my ($list) = @_; - $list =~ s/^\s*//; - $list =~ s/\s*$//; - if($list eq "") { - return (); - } - return split(/\s*,\s*/, $list); -} - -sub parseparam($) { - my ($p) = @_; - if($p !~ /^(\S*) (\S*)$/) { - print STDERR "$ARGV:$.: malformed parameter: $p\n"; - $errors = 1; - return ("xx", "int"); - } - return ($1, $2); -} - -my $text = ""; -while(<>) { - chomp; - s/\s+/ /g; - s/^\s+//; - s/\s+$//; - my $nonblock = /^\/\/sysnb /; - next if !/^\/\/sys / && !$nonblock; - - # Line must be of the form - # func Open(path string, mode int, perm int) (fd int, errno error) - # Split into name, in params, out params. - if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)SYS_[A-Z0-9_]+))?$/) { - print STDERR "$ARGV:$.: malformed //sys declaration\n"; - $errors = 1; - next; - } - my ($func, $in, $out, $sysname) = ($2, $3, $4, $5); - - # Split argument lists on comma. - my @in = parseparamlist($in); - my @out = parseparamlist($out); - - # Try in vain to keep people from editing this file. - # The theory is that they jump into the middle of the file - # without reading the header. - $text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n"; - - # Go function header. - my $out_decl = @out ? sprintf(" (%s)", join(', ', @out)) : ""; - $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out_decl; - - # Check if err return available - my $errvar = ""; - foreach my $p (@out) { - my ($name, $type) = parseparam($p); - if($type eq "error") { - $errvar = $name; - last; - } - } - - # Prepare arguments to Syscall. - my @args = (); - my $n = 0; - foreach my $p (@in) { - my ($name, $type) = parseparam($p); - if($type =~ /^\*/) { - push @args, "uintptr(unsafe.Pointer($name))"; - } elsif($type eq "string" && $errvar ne "") { - $text .= "\tvar _p$n *byte\n"; - $text .= "\t_p$n, $errvar = BytePtrFromString($name)\n"; - $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n"; - push @args, "uintptr(unsafe.Pointer(_p$n))"; - $n++; - } elsif($type eq "string") { - print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n"; - $text .= "\tvar _p$n *byte\n"; - $text .= "\t_p$n, _ = BytePtrFromString($name)\n"; - push @args, "uintptr(unsafe.Pointer(_p$n))"; - $n++; - } elsif($type =~ /^\[\](.*)/) { - # Convert slice into pointer, length. - # Have to be careful not to take address of &a[0] if len == 0: - # pass dummy pointer in that case. - # Used to pass nil, but some OSes or simulators reject write(fd, nil, 0). - $text .= "\tvar _p$n unsafe.Pointer\n"; - $text .= "\tif len($name) > 0 {\n\t\t_p$n = unsafe.Pointer(\&${name}[0])\n\t}"; - $text .= " else {\n\t\t_p$n = unsafe.Pointer(&_zero)\n\t}"; - $text .= "\n"; - push @args, "uintptr(_p$n)", "uintptr(len($name))"; - $n++; - } elsif($type eq "int64" && ($openbsd || $netbsd)) { - push @args, "0"; - if($_32bit eq "big-endian") { - push @args, "uintptr($name>>32)", "uintptr($name)"; - } elsif($_32bit eq "little-endian") { - push @args, "uintptr($name)", "uintptr($name>>32)"; - } else { - push @args, "uintptr($name)"; - } - } elsif($type eq "int64" && $dragonfly) { - if ($func !~ /^extp(read|write)/i) { - push @args, "0"; - } - if($_32bit eq "big-endian") { - push @args, "uintptr($name>>32)", "uintptr($name)"; - } elsif($_32bit eq "little-endian") { - push @args, "uintptr($name)", "uintptr($name>>32)"; - } else { - push @args, "uintptr($name)"; - } - } elsif($type eq "int64" && $_32bit ne "") { - if(@args % 2 && $arm) { - # arm abi specifies 64-bit argument uses - # (even, odd) pair - push @args, "0" - } - if($_32bit eq "big-endian") { - push @args, "uintptr($name>>32)", "uintptr($name)"; - } else { - push @args, "uintptr($name)", "uintptr($name>>32)"; - } - } else { - push @args, "uintptr($name)"; - } - } - - # Determine which form to use; pad args with zeros. - my $asm = "Syscall"; - if ($nonblock) { - if ($errvar eq "" && $ENV{'GOOS'} eq "linux") { - $asm = "RawSyscallNoError"; - } else { - $asm = "RawSyscall"; - } - } else { - if ($errvar eq "" && $ENV{'GOOS'} eq "linux") { - $asm = "SyscallNoError"; - } - } - if(@args <= 3) { - while(@args < 3) { - push @args, "0"; - } - } elsif(@args <= 6) { - $asm .= "6"; - while(@args < 6) { - push @args, "0"; - } - } elsif(@args <= 9) { - $asm .= "9"; - while(@args < 9) { - push @args, "0"; - } - } else { - print STDERR "$ARGV:$.: too many arguments to system call\n"; - } - - # System call number. - if($sysname eq "") { - $sysname = "SYS_$func"; - $sysname =~ s/([a-z])([A-Z])/${1}_$2/g; # turn FooBar into Foo_Bar - $sysname =~ y/a-z/A-Z/; - } - - # Actual call. - my $args = join(', ', @args); - my $call = "$asm($sysname, $args)"; - - # Assign return values. - my $body = ""; - my @ret = ("_", "_", "_"); - my $do_errno = 0; - for(my $i=0; $i<@out; $i++) { - my $p = $out[$i]; - my ($name, $type) = parseparam($p); - my $reg = ""; - if($name eq "err" && !$plan9) { - $reg = "e1"; - $ret[2] = $reg; - $do_errno = 1; - } elsif($name eq "err" && $plan9) { - $ret[0] = "r0"; - $ret[2] = "e1"; - next; - } else { - $reg = sprintf("r%d", $i); - $ret[$i] = $reg; - } - if($type eq "bool") { - $reg = "$reg != 0"; - } - if($type eq "int64" && $_32bit ne "") { - # 64-bit number in r1:r0 or r0:r1. - if($i+2 > @out) { - print STDERR "$ARGV:$.: not enough registers for int64 return\n"; - } - if($_32bit eq "big-endian") { - $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1); - } else { - $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i); - } - $ret[$i] = sprintf("r%d", $i); - $ret[$i+1] = sprintf("r%d", $i+1); - } - if($reg ne "e1" || $plan9) { - $body .= "\t$name = $type($reg)\n"; - } - } - if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") { - $text .= "\t$call\n"; - } else { - if ($errvar eq "" && $ENV{'GOOS'} eq "linux") { - # raw syscall without error on Linux, see golang.org/issue/22924 - $text .= "\t$ret[0], $ret[1] := $call\n"; - } else { - $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n"; - } - } - $text .= $body; - - if ($plan9 && $ret[2] eq "e1") { - $text .= "\tif int32(r0) == -1 {\n"; - $text .= "\t\terr = e1\n"; - $text .= "\t}\n"; - } elsif ($do_errno) { - $text .= "\tif e1 != 0 {\n"; - $text .= "\t\terr = errnoErr(e1)\n"; - $text .= "\t}\n"; - } - $text .= "\treturn\n"; - $text .= "}\n\n"; -} - -chomp $text; -chomp $text; - -if($errors) { - exit 1; -} - -print <) { - chomp; - s/\s+/ /g; - s/^\s+//; - s/\s+$//; - $package = $1 if !$package && /^package (\S+)$/; - my $nonblock = /^\/\/sysnb /; - next if !/^\/\/sys / && !$nonblock; - - # Line must be of the form - # func Open(path string, mode int, perm int) (fd int, err error) - # Split into name, in params, out params. - if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$/) { - print STDERR "$ARGV:$.: malformed //sys declaration\n"; - $errors = 1; - next; - } - my ($nb, $func, $in, $out, $modname, $sysname) = ($1, $2, $3, $4, $5, $6); - - # Split argument lists on comma. - my @in = parseparamlist($in); - my @out = parseparamlist($out); - - # So file name. - if($modname eq "") { - $modname = "libc"; - } - - # System call name. - if($sysname eq "") { - $sysname = "$func"; - } - - # System call pointer variable name. - my $sysvarname = "proc$sysname"; - - my $strconvfunc = "BytePtrFromString"; - my $strconvtype = "*byte"; - - $sysname =~ y/A-Z/a-z/; # All libc functions are lowercase. - - # Runtime import of function to allow cross-platform builds. - $dynimports .= "//go:cgo_import_dynamic libc_${sysname} ${sysname} \"$modname.so\"\n"; - # Link symbol to proc address variable. - $linknames .= "//go:linkname ${sysvarname} libc_${sysname}\n"; - # Library proc address variable. - push @vars, $sysvarname; - - # Go function header. - $out = join(', ', @out); - if($out ne "") { - $out = " ($out)"; - } - if($text ne "") { - $text .= "\n" - } - $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out; - - # Check if err return available - my $errvar = ""; - foreach my $p (@out) { - my ($name, $type) = parseparam($p); - if($type eq "error") { - $errvar = $name; - last; - } - } - - # Prepare arguments to Syscall. - my @args = (); - my $n = 0; - foreach my $p (@in) { - my ($name, $type) = parseparam($p); - if($type =~ /^\*/) { - push @args, "uintptr(unsafe.Pointer($name))"; - } elsif($type eq "string" && $errvar ne "") { - $text .= "\tvar _p$n $strconvtype\n"; - $text .= "\t_p$n, $errvar = $strconvfunc($name)\n"; - $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n"; - push @args, "uintptr(unsafe.Pointer(_p$n))"; - $n++; - } elsif($type eq "string") { - print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n"; - $text .= "\tvar _p$n $strconvtype\n"; - $text .= "\t_p$n, _ = $strconvfunc($name)\n"; - push @args, "uintptr(unsafe.Pointer(_p$n))"; - $n++; - } elsif($type =~ /^\[\](.*)/) { - # Convert slice into pointer, length. - # Have to be careful not to take address of &a[0] if len == 0: - # pass nil in that case. - $text .= "\tvar _p$n *$1\n"; - $text .= "\tif len($name) > 0 {\n\t\t_p$n = \&$name\[0]\n\t}\n"; - push @args, "uintptr(unsafe.Pointer(_p$n))", "uintptr(len($name))"; - $n++; - } elsif($type eq "int64" && $_32bit ne "") { - if($_32bit eq "big-endian") { - push @args, "uintptr($name >> 32)", "uintptr($name)"; - } else { - push @args, "uintptr($name)", "uintptr($name >> 32)"; - } - } elsif($type eq "bool") { - $text .= "\tvar _p$n uint32\n"; - $text .= "\tif $name {\n\t\t_p$n = 1\n\t} else {\n\t\t_p$n = 0\n\t}\n"; - push @args, "uintptr(_p$n)"; - $n++; - } else { - push @args, "uintptr($name)"; - } - } - my $nargs = @args; - - # Determine which form to use; pad args with zeros. - my $asm = "sysvicall6"; - if ($nonblock) { - $asm = "rawSysvicall6"; - } - if(@args <= 6) { - while(@args < 6) { - push @args, "0"; - } - } else { - print STDERR "$ARGV:$.: too many arguments to system call\n"; - } - - # Actual call. - my $args = join(', ', @args); - my $call = "$asm(uintptr(unsafe.Pointer(&$sysvarname)), $nargs, $args)"; - - # Assign return values. - my $body = ""; - my $failexpr = ""; - my @ret = ("_", "_", "_"); - my @pout= (); - my $do_errno = 0; - for(my $i=0; $i<@out; $i++) { - my $p = $out[$i]; - my ($name, $type) = parseparam($p); - my $reg = ""; - if($name eq "err") { - $reg = "e1"; - $ret[2] = $reg; - $do_errno = 1; - } else { - $reg = sprintf("r%d", $i); - $ret[$i] = $reg; - } - if($type eq "bool") { - $reg = "$reg != 0"; - } - if($type eq "int64" && $_32bit ne "") { - # 64-bit number in r1:r0 or r0:r1. - if($i+2 > @out) { - print STDERR "$ARGV:$.: not enough registers for int64 return\n"; - } - if($_32bit eq "big-endian") { - $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1); - } else { - $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i); - } - $ret[$i] = sprintf("r%d", $i); - $ret[$i+1] = sprintf("r%d", $i+1); - } - if($reg ne "e1") { - $body .= "\t$name = $type($reg)\n"; - } - } - if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") { - $text .= "\t$call\n"; - } else { - $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n"; - } - $text .= $body; - - if ($do_errno) { - $text .= "\tif e1 != 0 {\n"; - $text .= "\t\terr = e1\n"; - $text .= "\t}\n"; - } - $text .= "\treturn\n"; - $text .= "}\n"; -} - -if($errors) { - exit 1; -} - -print < "net.inet", - "net.inet.ipproto" => "net.inet", - "net.inet6.ipv6proto" => "net.inet6", - "net.inet6.ipv6" => "net.inet6.ip6", - "net.inet.icmpv6" => "net.inet6.icmp6", - "net.inet6.divert6" => "net.inet6.divert", - "net.inet6.tcp6" => "net.inet.tcp", - "net.inet6.udp6" => "net.inet.udp", - "mpls" => "net.mpls", - "swpenc" => "vm.swapencrypt" -); - -# Node mappings -my %node_map = ( - "net.inet.ip.ifq" => "net.ifq", - "net.inet.pfsync" => "net.pfsync", - "net.mpls.ifq" => "net.ifq" -); - -my $ctlname; -my %mib = (); -my %sysctl = (); -my $node; - -sub debug() { - print STDERR "$_[0]\n" if $debug; -} - -# Walk the MIB and build a sysctl name to OID mapping. -sub build_sysctl() { - my ($node, $name, $oid) = @_; - my %node = %{$node}; - my @oid = @{$oid}; - - foreach my $key (sort keys %node) { - my @node = @{$node{$key}}; - my $nodename = $name.($name ne '' ? '.' : '').$key; - my @nodeoid = (@oid, $node[0]); - if ($node[1] eq 'CTLTYPE_NODE') { - if (exists $node_map{$nodename}) { - $node = \%mib; - $ctlname = $node_map{$nodename}; - foreach my $part (split /\./, $ctlname) { - $node = \%{@{$$node{$part}}[2]}; - } - } else { - $node = $node[2]; - } - &build_sysctl($node, $nodename, \@nodeoid); - } elsif ($node[1] ne '') { - $sysctl{$nodename} = \@nodeoid; - } - } -} - -foreach my $ctl (@ctls) { - $ctls{$ctl} = $ctl; -} - -# Build MIB -foreach my $header (@headers) { - &debug("Processing $header..."); - open HEADER, "/usr/include/$header" || - print STDERR "Failed to open $header\n"; - while (
) { - if ($_ =~ /^#define\s+(CTL_NAMES)\s+{/ || - $_ =~ /^#define\s+(CTL_(.*)_NAMES)\s+{/ || - $_ =~ /^#define\s+((.*)CTL_NAMES)\s+{/) { - if ($1 eq 'CTL_NAMES') { - # Top level. - $node = \%mib; - } else { - # Node. - my $nodename = lc($2); - if ($header =~ /^netinet\//) { - $ctlname = "net.inet.$nodename"; - } elsif ($header =~ /^netinet6\//) { - $ctlname = "net.inet6.$nodename"; - } elsif ($header =~ /^net\//) { - $ctlname = "net.$nodename"; - } else { - $ctlname = "$nodename"; - $ctlname =~ s/^(fs|net|kern)_/$1\./; - } - if (exists $ctl_map{$ctlname}) { - $ctlname = $ctl_map{$ctlname}; - } - if (not exists $ctls{$ctlname}) { - &debug("Ignoring $ctlname..."); - next; - } - - # Walk down from the top of the MIB. - $node = \%mib; - foreach my $part (split /\./, $ctlname) { - if (not exists $$node{$part}) { - &debug("Missing node $part"); - $$node{$part} = [ 0, '', {} ]; - } - $node = \%{@{$$node{$part}}[2]}; - } - } - - # Populate current node with entries. - my $i = -1; - while (defined($_) && $_ !~ /^}/) { - $_ =
; - $i++ if $_ =~ /{.*}/; - next if $_ !~ /{\s+"(\w+)",\s+(CTLTYPE_[A-Z]+)\s+}/; - $$node{$1} = [ $i, $2, {} ]; - } - } - } - close HEADER; -} - -&build_sysctl(\%mib, "", []); - -print <){ - if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){ - my $name = $1; - my $num = $2; - $name =~ y/a-z/A-Z/; - print " SYS_$name = $num;" - } -} - -print <){ - if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){ - my $num = $1; - my $proto = $2; - my $name = "SYS_$3"; - $name =~ y/a-z/A-Z/; - - # There are multiple entries for enosys and nosys, so comment them out. - if($name =~ /^SYS_E?NOSYS$/){ - $name = "// $name"; - } - if($name eq 'SYS_SYS_EXIT'){ - $name = 'SYS_EXIT'; - } - - print " $name = $num; // $proto\n"; - } -} - -print <){ - if(/^([0-9]+)\s+\S+\s+STD\s+({ \S+\s+(\w+).*)$/){ - my $num = $1; - my $proto = $2; - my $name = "SYS_$3"; - $name =~ y/a-z/A-Z/; - - # There are multiple entries for enosys and nosys, so comment them out. - if($name =~ /^SYS_E?NOSYS$/){ - $name = "// $name"; - } - if($name eq 'SYS_SYS_EXIT'){ - $name = 'SYS_EXIT'; - } - - print " $name = $num; // $proto\n"; - } -} - -print <){ - if($line =~ /^(.*)\\$/) { - # Handle continuation - $line = $1; - $_ =~ s/^\s+//; - $line .= $_; - } else { - # New line - $line = $_; - } - next if $line =~ /\\$/; - if($line =~ /^([0-9]+)\s+((STD)|(NOERR))\s+(RUMP\s+)?({\s+\S+\s*\*?\s*\|(\S+)\|(\S*)\|(\w+).*\s+})(\s+(\S+))?$/) { - my $num = $1; - my $proto = $6; - my $compat = $8; - my $name = "$7_$9"; - - $name = "$7_$11" if $11 ne ''; - $name =~ y/a-z/A-Z/; - - if($compat eq '' || $compat eq '13' || $compat eq '30' || $compat eq '50') { - print " $name = $num; // $proto\n"; - } - } -} - -print <){ - if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){ - my $num = $1; - my $proto = $3; - my $name = $4; - $name =~ y/a-z/A-Z/; - - # There are multiple entries for enosys and nosys, so comment them out. - if($name =~ /^SYS_E?NOSYS$/){ - $name = "// $name"; - } - if($name eq 'SYS_SYS_EXIT'){ - $name = 'SYS_EXIT'; - } - - print " $name = $num; // $proto\n"; - } -} - -print <= 0 { - t.Fatal("bad math") - } - s := unix.Itoa(i) - f := fmt.Sprint(i) - if s != f { - t.Fatalf("itoa(%d) = %s, want %s", i, s, f) - } -} - -func TestUname(t *testing.T) { - var utsname unix.Utsname - err := unix.Uname(&utsname) - if err != nil { - t.Fatalf("Uname: %v", err) - } - - t.Logf("OS: %s/%s %s", utsname.Sysname[:], utsname.Machine[:], utsname.Release[:]) -} diff --git a/vendor/golang.org/x/sys/unix/syscall_unix_test.go b/vendor/golang.org/x/sys/unix/syscall_unix_test.go deleted file mode 100644 index d694990d..00000000 --- a/vendor/golang.org/x/sys/unix/syscall_unix_test.go +++ /dev/null @@ -1,657 +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 unix_test - -import ( - "flag" - "fmt" - "io/ioutil" - "net" - "os" - "os/exec" - "path/filepath" - "runtime" - "syscall" - "testing" - "time" - - "golang.org/x/sys/unix" -) - -// Tests that below functions, structures and constants are consistent -// on all Unix-like systems. -func _() { - // program scheduling priority functions and constants - var ( - _ func(int, int, int) error = unix.Setpriority - _ func(int, int) (int, error) = unix.Getpriority - ) - const ( - _ int = unix.PRIO_USER - _ int = unix.PRIO_PROCESS - _ int = unix.PRIO_PGRP - ) - - // termios constants - const ( - _ int = unix.TCIFLUSH - _ int = unix.TCIOFLUSH - _ int = unix.TCOFLUSH - ) - - // fcntl file locking structure and constants - var ( - _ = unix.Flock_t{ - Type: int16(0), - Whence: int16(0), - Start: int64(0), - Len: int64(0), - Pid: int32(0), - } - ) - const ( - _ = unix.F_GETLK - _ = unix.F_SETLK - _ = unix.F_SETLKW - ) -} - -func TestErrnoSignalName(t *testing.T) { - testErrors := []struct { - num syscall.Errno - name string - }{ - {syscall.EPERM, "EPERM"}, - {syscall.EINVAL, "EINVAL"}, - {syscall.ENOENT, "ENOENT"}, - } - - for _, te := range testErrors { - t.Run(fmt.Sprintf("%d/%s", te.num, te.name), func(t *testing.T) { - e := unix.ErrnoName(te.num) - if e != te.name { - t.Errorf("ErrnoName(%d) returned %s, want %s", te.num, e, te.name) - } - }) - } - - testSignals := []struct { - num syscall.Signal - name string - }{ - {syscall.SIGHUP, "SIGHUP"}, - {syscall.SIGPIPE, "SIGPIPE"}, - {syscall.SIGSEGV, "SIGSEGV"}, - } - - for _, ts := range testSignals { - t.Run(fmt.Sprintf("%d/%s", ts.num, ts.name), func(t *testing.T) { - s := unix.SignalName(ts.num) - if s != ts.name { - t.Errorf("SignalName(%d) returned %s, want %s", ts.num, s, ts.name) - } - }) - } -} - -func TestFcntlInt(t *testing.T) { - t.Parallel() - file, err := ioutil.TempFile("", "TestFnctlInt") - if err != nil { - t.Fatal(err) - } - defer os.Remove(file.Name()) - defer file.Close() - f := file.Fd() - flags, err := unix.FcntlInt(f, unix.F_GETFD, 0) - if err != nil { - t.Fatal(err) - } - if flags&unix.FD_CLOEXEC == 0 { - t.Errorf("flags %#x do not include FD_CLOEXEC", flags) - } -} - -// TestFcntlFlock tests whether the file locking structure matches -// the calling convention of each kernel. -func TestFcntlFlock(t *testing.T) { - name := filepath.Join(os.TempDir(), "TestFcntlFlock") - fd, err := unix.Open(name, unix.O_CREAT|unix.O_RDWR|unix.O_CLOEXEC, 0) - if err != nil { - t.Fatalf("Open failed: %v", err) - } - defer unix.Unlink(name) - defer unix.Close(fd) - flock := unix.Flock_t{ - Type: unix.F_RDLCK, - Start: 0, Len: 0, Whence: 1, - } - if err := unix.FcntlFlock(uintptr(fd), unix.F_GETLK, &flock); err != nil { - t.Fatalf("FcntlFlock failed: %v", err) - } -} - -// TestPassFD tests passing a file descriptor over a Unix socket. -// -// This test involved both a parent and child process. The parent -// process is invoked as a normal test, with "go test", which then -// runs the child process by running the current test binary with args -// "-test.run=^TestPassFD$" and an environment variable used to signal -// that the test should become the child process instead. -func TestPassFD(t *testing.T) { - if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") { - t.Skip("cannot exec subprocess on iOS, skipping test") - } - - if os.Getenv("GO_WANT_HELPER_PROCESS") == "1" { - passFDChild() - return - } - - tempDir, err := ioutil.TempDir("", "TestPassFD") - if err != nil { - t.Fatal(err) - } - defer os.RemoveAll(tempDir) - - fds, err := unix.Socketpair(unix.AF_LOCAL, unix.SOCK_STREAM, 0) - if err != nil { - t.Fatalf("Socketpair: %v", err) - } - defer unix.Close(fds[0]) - defer unix.Close(fds[1]) - writeFile := os.NewFile(uintptr(fds[0]), "child-writes") - readFile := os.NewFile(uintptr(fds[1]), "parent-reads") - defer writeFile.Close() - defer readFile.Close() - - cmd := exec.Command(os.Args[0], "-test.run=^TestPassFD$", "--", tempDir) - cmd.Env = []string{"GO_WANT_HELPER_PROCESS=1"} - if lp := os.Getenv("LD_LIBRARY_PATH"); lp != "" { - cmd.Env = append(cmd.Env, "LD_LIBRARY_PATH="+lp) - } - cmd.ExtraFiles = []*os.File{writeFile} - - out, err := cmd.CombinedOutput() - if len(out) > 0 || err != nil { - t.Fatalf("child process: %q, %v", out, err) - } - - c, err := net.FileConn(readFile) - if err != nil { - t.Fatalf("FileConn: %v", err) - } - defer c.Close() - - uc, ok := c.(*net.UnixConn) - if !ok { - t.Fatalf("unexpected FileConn type; expected UnixConn, got %T", c) - } - - buf := make([]byte, 32) // expect 1 byte - oob := make([]byte, 32) // expect 24 bytes - closeUnix := time.AfterFunc(5*time.Second, func() { - t.Logf("timeout reading from unix socket") - uc.Close() - }) - _, oobn, _, _, err := uc.ReadMsgUnix(buf, oob) - if err != nil { - t.Fatalf("ReadMsgUnix: %v", err) - } - closeUnix.Stop() - - scms, err := unix.ParseSocketControlMessage(oob[:oobn]) - if err != nil { - t.Fatalf("ParseSocketControlMessage: %v", err) - } - if len(scms) != 1 { - t.Fatalf("expected 1 SocketControlMessage; got scms = %#v", scms) - } - scm := scms[0] - gotFds, err := unix.ParseUnixRights(&scm) - if err != nil { - t.Fatalf("unix.ParseUnixRights: %v", err) - } - if len(gotFds) != 1 { - t.Fatalf("wanted 1 fd; got %#v", gotFds) - } - - f := os.NewFile(uintptr(gotFds[0]), "fd-from-child") - defer f.Close() - - got, err := ioutil.ReadAll(f) - want := "Hello from child process!\n" - if string(got) != want { - t.Errorf("child process ReadAll: %q, %v; want %q", got, err, want) - } -} - -// passFDChild is the child process used by TestPassFD. -func passFDChild() { - defer os.Exit(0) - - // Look for our fd. It should be fd 3, but we work around an fd leak - // bug here (http://golang.org/issue/2603) to let it be elsewhere. - var uc *net.UnixConn - for fd := uintptr(3); fd <= 10; fd++ { - f := os.NewFile(fd, "unix-conn") - var ok bool - netc, _ := net.FileConn(f) - uc, ok = netc.(*net.UnixConn) - if ok { - break - } - } - if uc == nil { - fmt.Println("failed to find unix fd") - return - } - - // Make a file f to send to our parent process on uc. - // We make it in tempDir, which our parent will clean up. - flag.Parse() - tempDir := flag.Arg(0) - f, err := ioutil.TempFile(tempDir, "") - if err != nil { - fmt.Printf("TempFile: %v", err) - return - } - - f.Write([]byte("Hello from child process!\n")) - f.Seek(0, 0) - - rights := unix.UnixRights(int(f.Fd())) - dummyByte := []byte("x") - n, oobn, err := uc.WriteMsgUnix(dummyByte, rights, nil) - if err != nil { - fmt.Printf("WriteMsgUnix: %v", err) - return - } - if n != 1 || oobn != len(rights) { - fmt.Printf("WriteMsgUnix = %d, %d; want 1, %d", n, oobn, len(rights)) - return - } -} - -// TestUnixRightsRoundtrip tests that UnixRights, ParseSocketControlMessage, -// and ParseUnixRights are able to successfully round-trip lists of file descriptors. -func TestUnixRightsRoundtrip(t *testing.T) { - testCases := [...][][]int{ - {{42}}, - {{1, 2}}, - {{3, 4, 5}}, - {{}}, - {{1, 2}, {3, 4, 5}, {}, {7}}, - } - for _, testCase := range testCases { - b := []byte{} - var n int - for _, fds := range testCase { - // Last assignment to n wins - n = len(b) + unix.CmsgLen(4*len(fds)) - b = append(b, unix.UnixRights(fds...)...) - } - // Truncate b - b = b[:n] - - scms, err := unix.ParseSocketControlMessage(b) - if err != nil { - t.Fatalf("ParseSocketControlMessage: %v", err) - } - if len(scms) != len(testCase) { - t.Fatalf("expected %v SocketControlMessage; got scms = %#v", len(testCase), scms) - } - for i, scm := range scms { - gotFds, err := unix.ParseUnixRights(&scm) - if err != nil { - t.Fatalf("ParseUnixRights: %v", err) - } - wantFds := testCase[i] - if len(gotFds) != len(wantFds) { - t.Fatalf("expected %v fds, got %#v", len(wantFds), gotFds) - } - for j, fd := range gotFds { - if fd != wantFds[j] { - t.Fatalf("expected fd %v, got %v", wantFds[j], fd) - } - } - } - } -} - -func TestRlimit(t *testing.T) { - var rlimit, zero unix.Rlimit - err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlimit) - if err != nil { - t.Fatalf("Getrlimit: save failed: %v", err) - } - if zero == rlimit { - t.Fatalf("Getrlimit: save failed: got zero value %#v", rlimit) - } - set := rlimit - set.Cur = set.Max - 1 - err = unix.Setrlimit(unix.RLIMIT_NOFILE, &set) - if err != nil { - t.Fatalf("Setrlimit: set failed: %#v %v", set, err) - } - var get unix.Rlimit - err = unix.Getrlimit(unix.RLIMIT_NOFILE, &get) - if err != nil { - t.Fatalf("Getrlimit: get failed: %v", err) - } - set = rlimit - set.Cur = set.Max - 1 - if set != get { - // Seems like Darwin requires some privilege to - // increase the soft limit of rlimit sandbox, though - // Setrlimit never reports an error. - switch runtime.GOOS { - case "darwin": - default: - t.Fatalf("Rlimit: change failed: wanted %#v got %#v", set, get) - } - } - err = unix.Setrlimit(unix.RLIMIT_NOFILE, &rlimit) - if err != nil { - t.Fatalf("Setrlimit: restore failed: %#v %v", rlimit, err) - } -} - -func TestSeekFailure(t *testing.T) { - _, err := unix.Seek(-1, 0, 0) - if err == nil { - t.Fatalf("Seek(-1, 0, 0) did not fail") - } - str := err.Error() // used to crash on Linux - t.Logf("Seek: %v", str) - if str == "" { - t.Fatalf("Seek(-1, 0, 0) return error with empty message") - } -} - -func TestDup(t *testing.T) { - file, err := ioutil.TempFile("", "TestDup") - if err != nil { - t.Fatalf("Tempfile failed: %v", err) - } - defer os.Remove(file.Name()) - defer file.Close() - f := int(file.Fd()) - - newFd, err := unix.Dup(f) - if err != nil { - t.Fatalf("Dup: %v", err) - } - - err = unix.Dup2(newFd, newFd+1) - if err != nil { - t.Fatalf("Dup2: %v", err) - } - - b1 := []byte("Test123") - b2 := make([]byte, 7) - _, err = unix.Write(newFd+1, b1) - if err != nil { - t.Fatalf("Write to dup2 fd failed: %v", err) - } - _, err = unix.Seek(f, 0, 0) - if err != nil { - t.Fatalf("Seek failed: %v", err) - } - _, err = unix.Read(f, b2) - if err != nil { - t.Fatalf("Read back failed: %v", err) - } - if string(b1) != string(b2) { - t.Errorf("Dup: stdout write not in file, expected %v, got %v", string(b1), string(b2)) - } -} - -func TestPoll(t *testing.T) { - if runtime.GOOS == "android" || - (runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64")) { - t.Skip("mkfifo syscall is not available on android and iOS, skipping test") - } - - f, cleanup := mktmpfifo(t) - defer cleanup() - - const timeout = 100 - - ok := make(chan bool, 1) - go func() { - select { - case <-time.After(10 * timeout * time.Millisecond): - t.Errorf("Poll: failed to timeout after %d milliseconds", 10*timeout) - case <-ok: - } - }() - - fds := []unix.PollFd{{Fd: int32(f.Fd()), Events: unix.POLLIN}} - n, err := unix.Poll(fds, timeout) - ok <- true - if err != nil { - t.Errorf("Poll: unexpected error: %v", err) - return - } - if n != 0 { - t.Errorf("Poll: wrong number of events: got %v, expected %v", n, 0) - return - } -} - -func TestGetwd(t *testing.T) { - fd, err := os.Open(".") - if err != nil { - t.Fatalf("Open .: %s", err) - } - defer fd.Close() - // These are chosen carefully not to be symlinks on a Mac - // (unlike, say, /var, /etc) - dirs := []string{"/", "/usr/bin"} - switch runtime.GOOS { - case "android": - dirs = []string{"/", "/system/bin"} - case "darwin": - switch runtime.GOARCH { - case "arm", "arm64": - d1, err := ioutil.TempDir("", "d1") - if err != nil { - t.Fatalf("TempDir: %v", err) - } - d2, err := ioutil.TempDir("", "d2") - if err != nil { - t.Fatalf("TempDir: %v", err) - } - dirs = []string{d1, d2} - } - } - oldwd := os.Getenv("PWD") - for _, d := range dirs { - err = os.Chdir(d) - if err != nil { - t.Fatalf("Chdir: %v", err) - } - pwd, err := unix.Getwd() - if err != nil { - t.Fatalf("Getwd in %s: %s", d, err) - } - os.Setenv("PWD", oldwd) - err = fd.Chdir() - if err != nil { - // We changed the current directory and cannot go back. - // Don't let the tests continue; they'll scribble - // all over some other directory. - fmt.Fprintf(os.Stderr, "fchdir back to dot failed: %s\n", err) - os.Exit(1) - } - if pwd != d { - t.Fatalf("Getwd returned %q want %q", pwd, d) - } - } -} - -func TestFstatat(t *testing.T) { - defer chtmpdir(t)() - - touch(t, "file1") - - var st1 unix.Stat_t - err := unix.Stat("file1", &st1) - if err != nil { - t.Fatalf("Stat: %v", err) - } - - var st2 unix.Stat_t - err = unix.Fstatat(unix.AT_FDCWD, "file1", &st2, 0) - if err != nil { - t.Fatalf("Fstatat: %v", err) - } - - if st1 != st2 { - t.Errorf("Fstatat: returned stat does not match Stat") - } - - err = os.Symlink("file1", "symlink1") - if err != nil { - t.Fatal(err) - } - - err = unix.Lstat("symlink1", &st1) - if err != nil { - t.Fatalf("Lstat: %v", err) - } - - err = unix.Fstatat(unix.AT_FDCWD, "symlink1", &st2, unix.AT_SYMLINK_NOFOLLOW) - if err != nil { - t.Fatalf("Fstatat: %v", err) - } - - if st1 != st2 { - t.Errorf("Fstatat: returned stat does not match Lstat") - } -} - -func TestFchmodat(t *testing.T) { - defer chtmpdir(t)() - - touch(t, "file1") - err := os.Symlink("file1", "symlink1") - if err != nil { - t.Fatal(err) - } - - mode := os.FileMode(0444) - err = unix.Fchmodat(unix.AT_FDCWD, "symlink1", uint32(mode), 0) - if err != nil { - t.Fatalf("Fchmodat: unexpected error: %v", err) - } - - fi, err := os.Stat("file1") - if err != nil { - t.Fatal(err) - } - - if fi.Mode() != mode { - t.Errorf("Fchmodat: failed to change file mode: expected %v, got %v", mode, fi.Mode()) - } - - mode = os.FileMode(0644) - didChmodSymlink := true - err = unix.Fchmodat(unix.AT_FDCWD, "symlink1", uint32(mode), unix.AT_SYMLINK_NOFOLLOW) - if err != nil { - if (runtime.GOOS == "android" || runtime.GOOS == "linux" || runtime.GOOS == "solaris") && err == unix.EOPNOTSUPP { - // Linux and Illumos don't support flags != 0 - didChmodSymlink = false - } else { - t.Fatalf("Fchmodat: unexpected error: %v", err) - } - } - - if !didChmodSymlink { - // Didn't change mode of the symlink. On Linux, the permissions - // of a symbolic link are always 0777 according to symlink(7) - mode = os.FileMode(0777) - } - - var st unix.Stat_t - err = unix.Lstat("symlink1", &st) - if err != nil { - t.Fatal(err) - } - - got := os.FileMode(st.Mode & 0777) - if got != mode { - t.Errorf("Fchmodat: failed to change symlink mode: expected %v, got %v", mode, got) - } -} - -func TestMkdev(t *testing.T) { - major := uint32(42) - minor := uint32(7) - dev := unix.Mkdev(major, minor) - - if unix.Major(dev) != major { - t.Errorf("Major(%#x) == %d, want %d", dev, unix.Major(dev), major) - } - if unix.Minor(dev) != minor { - t.Errorf("Minor(%#x) == %d, want %d", dev, unix.Minor(dev), minor) - } -} - -// mktmpfifo creates a temporary FIFO and provides a cleanup function. -func mktmpfifo(t *testing.T) (*os.File, func()) { - err := unix.Mkfifo("fifo", 0666) - if err != nil { - t.Fatalf("mktmpfifo: failed to create FIFO: %v", err) - } - - f, err := os.OpenFile("fifo", os.O_RDWR, 0666) - if err != nil { - os.Remove("fifo") - t.Fatalf("mktmpfifo: failed to open FIFO: %v", err) - } - - return f, func() { - f.Close() - os.Remove("fifo") - } -} - -// utilities taken from os/os_test.go - -func touch(t *testing.T, name string) { - f, err := os.Create(name) - if err != nil { - t.Fatal(err) - } - if err := f.Close(); err != nil { - t.Fatal(err) - } -} - -// chtmpdir changes the working directory to a new temporary directory and -// provides a cleanup function. Used when PWD is read-only. -func chtmpdir(t *testing.T) func() { - oldwd, err := os.Getwd() - if err != nil { - t.Fatalf("chtmpdir: %v", err) - } - d, err := ioutil.TempDir("", "test") - if err != nil { - t.Fatalf("chtmpdir: %v", err) - } - if err := os.Chdir(d); err != nil { - t.Fatalf("chtmpdir: %v", err) - } - return func() { - if err := os.Chdir(oldwd); err != nil { - t.Fatalf("chtmpdir: %v", err) - } - os.RemoveAll(d) - } -} diff --git a/vendor/golang.org/x/sys/unix/timestruct_test.go b/vendor/golang.org/x/sys/unix/timestruct_test.go deleted file mode 100644 index 4215f46d..00000000 --- a/vendor/golang.org/x/sys/unix/timestruct_test.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2017 The Go Authors. All right 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 unix_test - -import ( - "testing" - "time" - "unsafe" - - "golang.org/x/sys/unix" -) - -func TestTimeToTimespec(t *testing.T) { - timeTests := []struct { - time time.Time - valid bool - }{ - {time.Unix(0, 0), true}, - {time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC), true}, - {time.Date(2262, time.December, 31, 23, 0, 0, 0, time.UTC), false}, - {time.Unix(0x7FFFFFFF, 0), true}, - {time.Unix(0x80000000, 0), false}, - {time.Unix(0x7FFFFFFF, 1000000000), false}, - {time.Unix(0x7FFFFFFF, 999999999), true}, - {time.Unix(-0x80000000, 0), true}, - {time.Unix(-0x80000001, 0), false}, - {time.Date(2038, time.January, 19, 3, 14, 7, 0, time.UTC), true}, - {time.Date(2038, time.January, 19, 3, 14, 8, 0, time.UTC), false}, - {time.Date(1901, time.December, 13, 20, 45, 52, 0, time.UTC), true}, - {time.Date(1901, time.December, 13, 20, 45, 51, 0, time.UTC), false}, - } - - // Currently all targets have either int32 or int64 for Timespec.Sec. - // If there were a new target with unsigned or floating point type for - // it, this test must be adjusted. - have64BitTime := (unsafe.Sizeof(unix.Timespec{}.Sec) == 8) - for _, tt := range timeTests { - ts, err := unix.TimeToTimespec(tt.time) - tt.valid = tt.valid || have64BitTime - if tt.valid && err != nil { - t.Errorf("TimeToTimespec(%v): %v", tt.time, err) - } - if err == nil { - tstime := time.Unix(int64(ts.Sec), int64(ts.Nsec)) - if !tstime.Equal(tt.time) { - t.Errorf("TimeToTimespec(%v) is the time %v", tt.time, tstime) - } - } - } -} diff --git a/vendor/golang.org/x/sys/unix/xattr_test.go b/vendor/golang.org/x/sys/unix/xattr_test.go deleted file mode 100644 index 595492ee..00000000 --- a/vendor/golang.org/x/sys/unix/xattr_test.go +++ /dev/null @@ -1,201 +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. - -// +build darwin freebsd linux - -package unix_test - -import ( - "io/ioutil" - "os" - "runtime" - "strings" - "testing" - - "golang.org/x/sys/unix" -) - -func TestXattr(t *testing.T) { - defer chtmpdir(t)() - - f := "xattr1" - touch(t, f) - - xattrName := "user.test" - xattrDataSet := "gopher" - err := unix.Setxattr(f, xattrName, []byte(xattrDataSet), 0) - if err == unix.ENOTSUP || err == unix.EOPNOTSUPP { - t.Skip("filesystem does not support extended attributes, skipping test") - } else if err != nil { - t.Fatalf("Setxattr: %v", err) - } - - // find size - size, err := unix.Listxattr(f, nil) - if err != nil { - t.Fatalf("Listxattr: %v", err) - } - - if size <= 0 { - t.Fatalf("Listxattr returned an empty list of attributes") - } - - buf := make([]byte, size) - read, err := unix.Listxattr(f, buf) - if err != nil { - t.Fatalf("Listxattr: %v", err) - } - - xattrs := stringsFromByteSlice(buf[:read]) - - xattrWant := xattrName - if runtime.GOOS == "freebsd" { - // On FreeBSD, the namespace is stored separately from the xattr - // name and Listxattr doesn't return the namespace prefix. - xattrWant = strings.TrimPrefix(xattrWant, "user.") - } - found := false - for _, name := range xattrs { - if name == xattrWant { - found = true - } - } - - if !found { - t.Errorf("Listxattr did not return previously set attribute '%s'", xattrName) - } - - // find size - size, err = unix.Getxattr(f, xattrName, nil) - if err != nil { - t.Fatalf("Getxattr: %v", err) - } - - if size <= 0 { - t.Fatalf("Getxattr returned an empty attribute") - } - - xattrDataGet := make([]byte, size) - _, err = unix.Getxattr(f, xattrName, xattrDataGet) - if err != nil { - t.Fatalf("Getxattr: %v", err) - } - - got := string(xattrDataGet) - if got != xattrDataSet { - t.Errorf("Getxattr: expected attribute value %s, got %s", xattrDataSet, got) - } - - err = unix.Removexattr(f, xattrName) - if err != nil { - t.Fatalf("Removexattr: %v", err) - } - - n := "nonexistent" - err = unix.Lsetxattr(n, xattrName, []byte(xattrDataSet), 0) - if err != unix.ENOENT { - t.Errorf("Lsetxattr: expected %v on non-existent file, got %v", unix.ENOENT, err) - } - - _, err = unix.Lgetxattr(n, xattrName, nil) - if err != unix.ENOENT { - t.Errorf("Lgetxattr: %v", err) - } - - s := "symlink1" - err = os.Symlink(n, s) - if err != nil { - t.Fatal(err) - } - - err = unix.Lsetxattr(s, xattrName, []byte(xattrDataSet), 0) - if err != nil { - // Linux and Android doen't support xattrs on symlinks according - // to xattr(7), so just test that we get the proper error. - if (runtime.GOOS != "linux" && runtime.GOOS != "android") || err != unix.EPERM { - t.Fatalf("Lsetxattr: %v", err) - } - } -} - -func TestFdXattr(t *testing.T) { - file, err := ioutil.TempFile("", "TestFdXattr") - if err != nil { - t.Fatal(err) - } - defer os.Remove(file.Name()) - defer file.Close() - - fd := int(file.Fd()) - xattrName := "user.test" - xattrDataSet := "gopher" - - err = unix.Fsetxattr(fd, xattrName, []byte(xattrDataSet), 0) - if err == unix.ENOTSUP || err == unix.EOPNOTSUPP { - t.Skip("filesystem does not support extended attributes, skipping test") - } else if err != nil { - t.Fatalf("Fsetxattr: %v", err) - } - - // find size - size, err := unix.Flistxattr(fd, nil) - if err != nil { - t.Fatalf("Flistxattr: %v", err) - } - - if size <= 0 { - t.Fatalf("Flistxattr returned an empty list of attributes") - } - - buf := make([]byte, size) - read, err := unix.Flistxattr(fd, buf) - if err != nil { - t.Fatalf("Flistxattr: %v", err) - } - - xattrs := stringsFromByteSlice(buf[:read]) - - xattrWant := xattrName - if runtime.GOOS == "freebsd" { - // On FreeBSD, the namespace is stored separately from the xattr - // name and Listxattr doesn't return the namespace prefix. - xattrWant = strings.TrimPrefix(xattrWant, "user.") - } - found := false - for _, name := range xattrs { - if name == xattrWant { - found = true - } - } - - if !found { - t.Errorf("Flistxattr did not return previously set attribute '%s'", xattrName) - } - - // find size - size, err = unix.Fgetxattr(fd, xattrName, nil) - if err != nil { - t.Fatalf("Fgetxattr: %v", err) - } - - if size <= 0 { - t.Fatalf("Fgetxattr returned an empty attribute") - } - - xattrDataGet := make([]byte, size) - _, err = unix.Fgetxattr(fd, xattrName, xattrDataGet) - if err != nil { - t.Fatalf("Fgetxattr: %v", err) - } - - got := string(xattrDataGet) - if got != xattrDataSet { - t.Errorf("Fgetxattr: expected attribute value %s, got %s", xattrDataSet, got) - } - - err = unix.Fremovexattr(fd, xattrName) - if err != nil { - t.Fatalf("Fremovexattr: %v", err) - } -} diff --git a/vendor/golang.org/x/sys/windows/syscall_test.go b/vendor/golang.org/x/sys/windows/syscall_test.go deleted file mode 100644 index d7009e44..00000000 --- a/vendor/golang.org/x/sys/windows/syscall_test.go +++ /dev/null @@ -1,53 +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 windows - -package windows_test - -import ( - "syscall" - "testing" - - "golang.org/x/sys/windows" -) - -func testSetGetenv(t *testing.T, key, value string) { - err := windows.Setenv(key, value) - if err != nil { - t.Fatalf("Setenv failed to set %q: %v", value, err) - } - newvalue, found := windows.Getenv(key) - if !found { - t.Fatalf("Getenv failed to find %v variable (want value %q)", key, value) - } - if newvalue != value { - t.Fatalf("Getenv(%v) = %q; want %q", key, newvalue, value) - } -} - -func TestEnv(t *testing.T) { - testSetGetenv(t, "TESTENV", "AVALUE") - // make sure TESTENV gets set to "", not deleted - testSetGetenv(t, "TESTENV", "") -} - -func TestGetProcAddressByOrdinal(t *testing.T) { - // Attempt calling shlwapi.dll:IsOS, resolving it by ordinal, as - // suggested in - // https://msdn.microsoft.com/en-us/library/windows/desktop/bb773795.aspx - h, err := windows.LoadLibrary("shlwapi.dll") - if err != nil { - t.Fatalf("Failed to load shlwapi.dll: %s", err) - } - procIsOS, err := windows.GetProcAddressByOrdinal(h, 437) - if err != nil { - t.Fatalf("Could not find shlwapi.dll:IsOS by ordinal: %s", err) - } - const OS_NT = 1 - r, _, _ := syscall.Syscall(procIsOS, 1, OS_NT, 0, 0) - if r == 0 { - t.Error("shlwapi.dll:IsOS(OS_NT) returned 0, expected non-zero value") - } -} diff --git a/vendor/golang.org/x/sys/windows/syscall_windows_test.go b/vendor/golang.org/x/sys/windows/syscall_windows_test.go deleted file mode 100644 index 0e27464e..00000000 --- a/vendor/golang.org/x/sys/windows/syscall_windows_test.go +++ /dev/null @@ -1,113 +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 windows_test - -import ( - "io/ioutil" - "os" - "path/filepath" - "syscall" - "testing" - "unsafe" - - "golang.org/x/sys/windows" -) - -func TestWin32finddata(t *testing.T) { - dir, err := ioutil.TempDir("", "go-build") - if err != nil { - t.Fatalf("failed to create temp directory: %v", err) - } - defer os.RemoveAll(dir) - - path := filepath.Join(dir, "long_name.and_extension") - f, err := os.Create(path) - if err != nil { - t.Fatalf("failed to create %v: %v", path, err) - } - f.Close() - - type X struct { - fd windows.Win32finddata - got byte - pad [10]byte // to protect ourselves - - } - var want byte = 2 // it is unlikely to have this character in the filename - x := X{got: want} - - pathp, _ := windows.UTF16PtrFromString(path) - h, err := windows.FindFirstFile(pathp, &(x.fd)) - if err != nil { - t.Fatalf("FindFirstFile failed: %v", err) - } - err = windows.FindClose(h) - if err != nil { - t.Fatalf("FindClose failed: %v", err) - } - - if x.got != want { - t.Fatalf("memory corruption: want=%d got=%d", want, x.got) - } -} - -func TestFormatMessage(t *testing.T) { - dll := windows.MustLoadDLL("pdh.dll") - - pdhOpenQuery := func(datasrc *uint16, userdata uint32, query *windows.Handle) (errno uintptr) { - r0, _, _ := syscall.Syscall(dll.MustFindProc("PdhOpenQueryW").Addr(), 3, uintptr(unsafe.Pointer(datasrc)), uintptr(userdata), uintptr(unsafe.Pointer(query))) - return r0 - } - - pdhCloseQuery := func(query windows.Handle) (errno uintptr) { - r0, _, _ := syscall.Syscall(dll.MustFindProc("PdhCloseQuery").Addr(), 1, uintptr(query), 0, 0) - return r0 - } - - var q windows.Handle - name, err := windows.UTF16PtrFromString("no_such_source") - if err != nil { - t.Fatal(err) - } - errno := pdhOpenQuery(name, 0, &q) - if errno == 0 { - pdhCloseQuery(q) - t.Fatal("PdhOpenQuery succeeded, but expected to fail.") - } - - const flags uint32 = syscall.FORMAT_MESSAGE_FROM_HMODULE | syscall.FORMAT_MESSAGE_ARGUMENT_ARRAY | syscall.FORMAT_MESSAGE_IGNORE_INSERTS - buf := make([]uint16, 300) - _, err = windows.FormatMessage(flags, uintptr(dll.Handle), uint32(errno), 0, buf, nil) - if err != nil { - t.Fatalf("FormatMessage for handle=%x and errno=%x failed: %v", dll.Handle, errno, err) - } -} - -func abort(funcname string, err error) { - panic(funcname + " failed: " + err.Error()) -} - -func ExampleLoadLibrary() { - h, err := windows.LoadLibrary("kernel32.dll") - if err != nil { - abort("LoadLibrary", err) - } - defer windows.FreeLibrary(h) - proc, err := windows.GetProcAddress(h, "GetVersion") - if err != nil { - abort("GetProcAddress", err) - } - r, _, _ := syscall.Syscall(uintptr(proc), 0, 0, 0, 0) - major := byte(r) - minor := uint8(r >> 8) - build := uint16(r >> 16) - print("windows version ", major, ".", minor, " (Build ", build, ")\n") -} - -func TestTOKEN_ALL_ACCESS(t *testing.T) { - if windows.TOKEN_ALL_ACCESS != 0xF01FF { - t.Errorf("TOKEN_ALL_ACCESS = %x, want 0xF01FF", windows.TOKEN_ALL_ACCESS) - } -} diff --git a/vendor/golang.org/x/text/.gitattributes b/vendor/golang.org/x/text/.gitattributes deleted file mode 100644 index d2f212e5..00000000 --- a/vendor/golang.org/x/text/.gitattributes +++ /dev/null @@ -1,10 +0,0 @@ -# Treat all files in this repo as binary, with no git magic updating -# line endings. Windows users contributing to Go will need to use a -# modern version of git and editors capable of LF line endings. -# -# We'll prevent accidental CRLF line endings from entering the repo -# via the git-review gofmt checks. -# -# See golang.org/issue/9281 - -* -text diff --git a/vendor/golang.org/x/text/.gitignore b/vendor/golang.org/x/text/.gitignore deleted file mode 100644 index b2de568b..00000000 --- a/vendor/golang.org/x/text/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# Add no patterns to .gitignore except for files generated by the build. -last-change -/DATA -# This file is rather large and the tests really only need to be run -# after generation. -/unicode/norm/data_test.go \ No newline at end of file diff --git a/vendor/golang.org/x/text/CONTRIBUTING.md b/vendor/golang.org/x/text/CONTRIBUTING.md deleted file mode 100644 index 88dff59b..00000000 --- a/vendor/golang.org/x/text/CONTRIBUTING.md +++ /dev/null @@ -1,31 +0,0 @@ -# Contributing to Go - -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? - -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. - -## Contributing code - -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/vendor/golang.org/x/text/README.md b/vendor/golang.org/x/text/README.md deleted file mode 100644 index b3f365ee..00000000 --- a/vendor/golang.org/x/text/README.md +++ /dev/null @@ -1,93 +0,0 @@ -# Go Text - -This repository holds supplementary Go libraries for text processing, many involving Unicode. - -## Semantic Versioning -This repo uses Semantic versioning (http://semver.org/), so -1. MAJOR version when you make incompatible API changes, -1. MINOR version when you add functionality in a backwards-compatible manner, - and -1. PATCH version when you make backwards-compatible bug fixes. - -Until version 1.0.0 of x/text is reached, the minor version is considered a -major version. So going from 0.1.0 to 0.2.0 is considered to be a major version -bump. - -A major new CLDR version is mapped to a minor version increase in x/text. -Any other new CLDR version is mapped to a patch version increase in x/text. - -It is important that the Unicode version used in `x/text` matches the one used -by your Go compiler. The `x/text` repository supports multiple versions of -Unicode and will match the version of Unicode to that of the Go compiler. At the -moment this is supported for Go compilers from version 1.7. - -## Download/Install - -The easiest way to install is to run `go get -u golang.org/x/text`. You can -also manually git clone the repository to `$GOPATH/src/golang.org/x/text`. - -## Contribute -To submit changes to this repository, see http://golang.org/doc/contribute.html. - -To generate the tables in this repository (except for the encoding tables), -run go generate from this directory. By default tables are generated for the -Unicode version in core and the CLDR version defined in -golang.org/x/text/unicode/cldr. - -Running go generate will as a side effect create a DATA subdirectory in this -directory, which holds all files that are used as a source for generating the -tables. This directory will also serve as a cache. - -## Testing -Run - - go test ./... - -from this directory to run all tests. Add the "-tags icu" flag to also run -ICU conformance tests (if available). This requires that you have the correct -ICU version installed on your system. - -TODO: -- updating unversioned source files. - -## Generating Tables - -To generate the tables in this repository (except for the encoding -tables), run `go generate` from this directory. By default tables are -generated for the Unicode version in core and the CLDR version defined in -golang.org/x/text/unicode/cldr. - -Running go generate will as a side effect create a DATA subdirectory in this -directory which holds all files that are used as a source for generating the -tables. This directory will also serve as a cache. - -## Versions -To update a Unicode version run - - UNICODE_VERSION=x.x.x go generate - -where `x.x.x` must correspond to a directory in http://www.unicode.org/Public/. -If this version is newer than the version in core it will also update the -relevant packages there. The idna package in x/net will always be updated. - -To update a CLDR version run - - CLDR_VERSION=version go generate - -where `version` must correspond to a directory in -http://www.unicode.org/Public/cldr/. - -Note that the code gets adapted over time to changes in the data and that -backwards compatibility is not maintained. -So updating to a different version may not work. - -The files in DATA/{iana|icu|w3|whatwg} are currently not versioned. - -## Report Issues / Send Patches - -This repository uses Gerrit for code changes. To learn how to submit changes to -this repository, see https://golang.org/doc/contribute.html. - -The main issue tracker for the image repository is located at -https://github.com/golang/go/issues. Prefix your issue with "x/image:" in the -subject line, so it is easy to find. diff --git a/vendor/golang.org/x/text/codereview.cfg b/vendor/golang.org/x/text/codereview.cfg deleted file mode 100644 index 3f8b14b6..00000000 --- a/vendor/golang.org/x/text/codereview.cfg +++ /dev/null @@ -1 +0,0 @@ -issuerepo: golang/go diff --git a/vendor/golang.org/x/text/collate/build/builder_test.go b/vendor/golang.org/x/text/collate/build/builder_test.go deleted file mode 100644 index ff0aba3a..00000000 --- a/vendor/golang.org/x/text/collate/build/builder_test.go +++ /dev/null @@ -1,290 +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 build - -import "testing" - -// cjk returns an implicit collation element for a CJK rune. -func cjk(r rune) []rawCE { - // A CJK character C is represented in the DUCET as - // [.AAAA.0020.0002.C][.BBBB.0000.0000.C] - // Where AAAA is the most significant 15 bits plus a base value. - // Any base value will work for the test, so we pick the common value of FB40. - const base = 0xFB40 - return []rawCE{ - {w: []int{base + int(r>>15), defaultSecondary, defaultTertiary, int(r)}}, - {w: []int{int(r&0x7FFF) | 0x8000, 0, 0, int(r)}}, - } -} - -func pCE(p int) []rawCE { - return mkCE([]int{p, defaultSecondary, defaultTertiary, 0}, 0) -} - -func pqCE(p, q int) []rawCE { - return mkCE([]int{p, defaultSecondary, defaultTertiary, q}, 0) -} - -func ptCE(p, t int) []rawCE { - return mkCE([]int{p, defaultSecondary, t, 0}, 0) -} - -func ptcCE(p, t int, ccc uint8) []rawCE { - return mkCE([]int{p, defaultSecondary, t, 0}, ccc) -} - -func sCE(s int) []rawCE { - return mkCE([]int{0, s, defaultTertiary, 0}, 0) -} - -func stCE(s, t int) []rawCE { - return mkCE([]int{0, s, t, 0}, 0) -} - -func scCE(s int, ccc uint8) []rawCE { - return mkCE([]int{0, s, defaultTertiary, 0}, ccc) -} - -func mkCE(w []int, ccc uint8) []rawCE { - return []rawCE{rawCE{w, ccc}} -} - -// ducetElem is used to define test data that is used to generate a table. -type ducetElem struct { - str string - ces []rawCE -} - -func newBuilder(t *testing.T, ducet []ducetElem) *Builder { - b := NewBuilder() - for _, e := range ducet { - ces := [][]int{} - for _, ce := range e.ces { - ces = append(ces, ce.w) - } - if err := b.Add([]rune(e.str), ces, nil); err != nil { - t.Errorf(err.Error()) - } - } - b.t = &table{} - b.root.sort() - return b -} - -type convertTest struct { - in, out []rawCE - err bool -} - -var convLargeTests = []convertTest{ - {pCE(0xFB39), pCE(0xFB39), false}, - {cjk(0x2F9B2), pqCE(0x3F9B2, 0x2F9B2), false}, - {pCE(0xFB40), pCE(0), true}, - {append(pCE(0xFB40), pCE(0)[0]), pCE(0), true}, - {pCE(0xFFFE), pCE(illegalOffset), false}, - {pCE(0xFFFF), pCE(illegalOffset + 1), false}, -} - -func TestConvertLarge(t *testing.T) { - for i, tt := range convLargeTests { - e := new(entry) - for _, ce := range tt.in { - e.elems = append(e.elems, makeRawCE(ce.w, ce.ccc)) - } - elems, err := convertLargeWeights(e.elems) - if tt.err { - if err == nil { - t.Errorf("%d: expected error; none found", i) - } - continue - } else if err != nil { - t.Errorf("%d: unexpected error: %v", i, err) - } - if !equalCEArrays(elems, tt.out) { - t.Errorf("%d: conversion was %x; want %x", i, elems, tt.out) - } - } -} - -// Collation element table for simplify tests. -var simplifyTest = []ducetElem{ - {"\u0300", sCE(30)}, // grave - {"\u030C", sCE(40)}, // caron - {"A", ptCE(100, 8)}, - {"D", ptCE(104, 8)}, - {"E", ptCE(105, 8)}, - {"I", ptCE(110, 8)}, - {"z", ptCE(130, 8)}, - {"\u05F2", append(ptCE(200, 4), ptCE(200, 4)[0])}, - {"\u05B7", sCE(80)}, - {"\u00C0", append(ptCE(100, 8), sCE(30)...)}, // A with grave, can be removed - {"\u00C8", append(ptCE(105, 8), sCE(30)...)}, // E with grave - {"\uFB1F", append(ptCE(200, 4), ptCE(200, 4)[0], sCE(80)[0])}, // eliminated by NFD - {"\u00C8\u0302", ptCE(106, 8)}, // block previous from simplifying - {"\u01C5", append(ptCE(104, 9), ptCE(130, 4)[0], stCE(40, maxTertiary)[0])}, // eliminated by NFKD - // no removal: tertiary value of third element is not maxTertiary - {"\u2162", append(ptCE(110, 9), ptCE(110, 4)[0], ptCE(110, 8)[0])}, -} - -var genColTests = []ducetElem{ - {"\uFA70", pqCE(0x1FA70, 0xFA70)}, - {"A\u0300", append(ptCE(100, 8), sCE(30)...)}, - {"A\u0300\uFA70", append(ptCE(100, 8), sCE(30)[0], pqCE(0x1FA70, 0xFA70)[0])}, - {"A\u0300A\u0300", append(ptCE(100, 8), sCE(30)[0], ptCE(100, 8)[0], sCE(30)[0])}, -} - -func TestGenColElems(t *testing.T) { - b := newBuilder(t, simplifyTest[:5]) - - for i, tt := range genColTests { - res := b.root.genColElems(tt.str) - if !equalCEArrays(tt.ces, res) { - t.Errorf("%d: result %X; want %X", i, res, tt.ces) - } - } -} - -type strArray []string - -func (sa strArray) contains(s string) bool { - for _, e := range sa { - if e == s { - return true - } - } - return false -} - -var simplifyRemoved = strArray{"\u00C0", "\uFB1F"} -var simplifyMarked = strArray{"\u01C5"} - -func TestSimplify(t *testing.T) { - b := newBuilder(t, simplifyTest) - o := &b.root - simplify(o) - - for i, tt := range simplifyTest { - if simplifyRemoved.contains(tt.str) { - continue - } - e := o.find(tt.str) - if e.str != tt.str || !equalCEArrays(e.elems, tt.ces) { - t.Errorf("%d: found element %s -> %X; want %s -> %X", i, e.str, e.elems, tt.str, tt.ces) - break - } - } - var i, k int - for e := o.front(); e != nil; e, _ = e.nextIndexed() { - gold := simplifyMarked.contains(e.str) - if gold { - k++ - } - if gold != e.decompose { - t.Errorf("%d: %s has decompose %v; want %v", i, e.str, e.decompose, gold) - } - i++ - } - if k != len(simplifyMarked) { - t.Errorf(" an entry that should be marked as decompose was deleted") - } -} - -var expandTest = []ducetElem{ - {"\u0300", append(scCE(29, 230), scCE(30, 230)...)}, - {"\u00C0", append(ptCE(100, 8), scCE(30, 230)...)}, - {"\u00C8", append(ptCE(105, 8), scCE(30, 230)...)}, - {"\u00C9", append(ptCE(105, 8), scCE(30, 230)...)}, // identical expansion - {"\u05F2", append(ptCE(200, 4), ptCE(200, 4)[0], ptCE(200, 4)[0])}, - {"\u01FF", append(ptCE(200, 4), ptcCE(201, 4, 0)[0], scCE(30, 230)[0])}, -} - -func TestExpand(t *testing.T) { - const ( - totalExpansions = 5 - totalElements = 2 + 2 + 2 + 3 + 3 + totalExpansions - ) - b := newBuilder(t, expandTest) - o := &b.root - b.processExpansions(o) - - e := o.front() - for _, tt := range expandTest { - exp := b.t.ExpandElem[e.expansionIndex:] - if int(exp[0]) != len(tt.ces) { - t.Errorf("%U: len(expansion)==%d; want %d", []rune(tt.str)[0], exp[0], len(tt.ces)) - } - exp = exp[1:] - for j, w := range tt.ces { - if ce, _ := makeCE(w); exp[j] != ce { - t.Errorf("%U: element %d is %X; want %X", []rune(tt.str)[0], j, exp[j], ce) - } - } - e, _ = e.nextIndexed() - } - // Verify uniquing. - if len(b.t.ExpandElem) != totalElements { - t.Errorf("len(expandElem)==%d; want %d", len(b.t.ExpandElem), totalElements) - } -} - -var contractTest = []ducetElem{ - {"abc", pCE(102)}, - {"abd", pCE(103)}, - {"a", pCE(100)}, - {"ab", pCE(101)}, - {"ac", pCE(104)}, - {"bcd", pCE(202)}, - {"b", pCE(200)}, - {"bc", pCE(201)}, - {"bd", pCE(203)}, - // shares suffixes with a* - {"Ab", pCE(301)}, - {"A", pCE(300)}, - {"Ac", pCE(304)}, - {"Abc", pCE(302)}, - {"Abd", pCE(303)}, - // starter to be ignored - {"z", pCE(1000)}, -} - -func TestContract(t *testing.T) { - const ( - totalElements = 5 + 5 + 4 - ) - b := newBuilder(t, contractTest) - o := &b.root - b.processContractions(o) - - indexMap := make(map[int]bool) - handleMap := make(map[rune]*entry) - for e := o.front(); e != nil; e, _ = e.nextIndexed() { - if e.contractionHandle.n > 0 { - handleMap[e.runes[0]] = e - indexMap[e.contractionHandle.index] = true - } - } - // Verify uniquing. - if len(indexMap) != 2 { - t.Errorf("number of tries is %d; want %d", len(indexMap), 2) - } - for _, tt := range contractTest { - e, ok := handleMap[[]rune(tt.str)[0]] - if !ok { - continue - } - str := tt.str[1:] - offset, n := lookup(&b.t.ContractTries, e.contractionHandle, []byte(str)) - if len(str) != n { - t.Errorf("%s: bytes consumed==%d; want %d", tt.str, n, len(str)) - } - ce := b.t.ContractElem[offset+e.contractionIndex] - if want, _ := makeCE(tt.ces[0]); want != ce { - t.Errorf("%s: element %X; want %X", tt.str, ce, want) - } - } - if len(b.t.ContractElem) != totalElements { - t.Errorf("len(expandElem)==%d; want %d", len(b.t.ContractElem), totalElements) - } -} diff --git a/vendor/golang.org/x/text/collate/build/colelem_test.go b/vendor/golang.org/x/text/collate/build/colelem_test.go deleted file mode 100644 index d0c8d07d..00000000 --- a/vendor/golang.org/x/text/collate/build/colelem_test.go +++ /dev/null @@ -1,215 +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 build - -import ( - "testing" - - "golang.org/x/text/internal/colltab" -) - -type ceTest struct { - f func(in []int) (uint32, error) - arg []int - val uint32 -} - -func normalCE(in []int) (ce uint32, err error) { - return makeCE(rawCE{w: in[:3], ccc: uint8(in[3])}) -} - -func expandCE(in []int) (ce uint32, err error) { - return makeExpandIndex(in[0]) -} - -func contractCE(in []int) (ce uint32, err error) { - return makeContractIndex(ctHandle{in[0], in[1]}, in[2]) -} - -func decompCE(in []int) (ce uint32, err error) { - return makeDecompose(in[0], in[1]) -} - -var ceTests = []ceTest{ - {normalCE, []int{0, 0, 0, 0}, 0xA0000000}, - {normalCE, []int{0, 0x28, 3, 0}, 0xA0002803}, - {normalCE, []int{0, 0x28, 3, 0xFF}, 0xAFF02803}, - {normalCE, []int{100, defaultSecondary, 3, 0}, 0x0000C883}, - // non-ignorable primary with non-default secondary - {normalCE, []int{100, 0x28, defaultTertiary, 0}, 0x4000C828}, - {normalCE, []int{100, defaultSecondary + 8, 3, 0}, 0x0000C983}, - {normalCE, []int{100, 0, 3, 0}, 0xFFFF}, // non-ignorable primary with non-supported secondary - {normalCE, []int{100, 1, 3, 0}, 0xFFFF}, - {normalCE, []int{1 << maxPrimaryBits, defaultSecondary, 0, 0}, 0xFFFF}, - {normalCE, []int{0, 1 << maxSecondaryBits, 0, 0}, 0xFFFF}, - {normalCE, []int{100, defaultSecondary, 1 << maxTertiaryBits, 0}, 0xFFFF}, - {normalCE, []int{0x123, defaultSecondary, 8, 0xFF}, 0x88FF0123}, - {normalCE, []int{0x123, defaultSecondary + 1, 8, 0xFF}, 0xFFFF}, - - {contractCE, []int{0, 0, 0}, 0xC0000000}, - {contractCE, []int{1, 1, 1}, 0xC0010011}, - {contractCE, []int{1, (1 << maxNBits) - 1, 1}, 0xC001001F}, - {contractCE, []int{(1 << maxTrieIndexBits) - 1, 1, 1}, 0xC001FFF1}, - {contractCE, []int{1, 1, (1 << maxContractOffsetBits) - 1}, 0xDFFF0011}, - {contractCE, []int{1, (1 << maxNBits), 1}, 0xFFFF}, - {contractCE, []int{(1 << maxTrieIndexBits), 1, 1}, 0xFFFF}, - {contractCE, []int{1, (1 << maxContractOffsetBits), 1}, 0xFFFF}, - - {expandCE, []int{0}, 0xE0000000}, - {expandCE, []int{5}, 0xE0000005}, - {expandCE, []int{(1 << maxExpandIndexBits) - 1}, 0xE000FFFF}, - {expandCE, []int{1 << maxExpandIndexBits}, 0xFFFF}, - - {decompCE, []int{0, 0}, 0xF0000000}, - {decompCE, []int{1, 1}, 0xF0000101}, - {decompCE, []int{0x1F, 0x1F}, 0xF0001F1F}, - {decompCE, []int{256, 0x1F}, 0xFFFF}, - {decompCE, []int{0x1F, 256}, 0xFFFF}, -} - -func TestColElem(t *testing.T) { - for i, tt := range ceTests { - in := make([]int, len(tt.arg)) - copy(in, tt.arg) - ce, err := tt.f(in) - if tt.val == 0xFFFF { - if err == nil { - t.Errorf("%d: expected error for args %x", i, tt.arg) - } - continue - } - if err != nil { - t.Errorf("%d: unexpected error: %v", i, err.Error()) - } - if ce != tt.val { - t.Errorf("%d: colElem=%X; want %X", i, ce, tt.val) - } - } -} - -func mkRawCES(in [][]int) []rawCE { - out := []rawCE{} - for _, w := range in { - out = append(out, rawCE{w: w}) - } - return out -} - -type weightsTest struct { - a, b [][]int - level colltab.Level - result int -} - -var nextWeightTests = []weightsTest{ - { - a: [][]int{{100, 20, 5, 0}}, - b: [][]int{{101, defaultSecondary, defaultTertiary, 0}}, - level: colltab.Primary, - }, - { - a: [][]int{{100, 20, 5, 0}}, - b: [][]int{{100, 21, defaultTertiary, 0}}, - level: colltab.Secondary, - }, - { - a: [][]int{{100, 20, 5, 0}}, - b: [][]int{{100, 20, 6, 0}}, - level: colltab.Tertiary, - }, - { - a: [][]int{{100, 20, 5, 0}}, - b: [][]int{{100, 20, 5, 0}}, - level: colltab.Identity, - }, -} - -var extra = [][]int{{200, 32, 8, 0}, {0, 32, 8, 0}, {0, 0, 8, 0}, {0, 0, 0, 0}} - -func TestNextWeight(t *testing.T) { - for i, tt := range nextWeightTests { - test := func(l colltab.Level, tt weightsTest, a, gold [][]int) { - res := nextWeight(tt.level, mkRawCES(a)) - if !equalCEArrays(mkRawCES(gold), res) { - t.Errorf("%d:%d: expected weights %d; found %d", i, l, gold, res) - } - } - test(-1, tt, tt.a, tt.b) - for l := colltab.Primary; l <= colltab.Tertiary; l++ { - if tt.level <= l { - test(l, tt, append(tt.a, extra[l]), tt.b) - } else { - test(l, tt, append(tt.a, extra[l]), append(tt.b, extra[l])) - } - } - } -} - -var compareTests = []weightsTest{ - { - [][]int{{100, 20, 5, 0}}, - [][]int{{100, 20, 5, 0}}, - colltab.Identity, - 0, - }, - { - [][]int{{100, 20, 5, 0}, extra[0]}, - [][]int{{100, 20, 5, 1}}, - colltab.Primary, - 1, - }, - { - [][]int{{100, 20, 5, 0}}, - [][]int{{101, 20, 5, 0}}, - colltab.Primary, - -1, - }, - { - [][]int{{101, 20, 5, 0}}, - [][]int{{100, 20, 5, 0}}, - colltab.Primary, - 1, - }, - { - [][]int{{100, 0, 0, 0}, {0, 20, 5, 0}}, - [][]int{{0, 20, 5, 0}, {100, 0, 0, 0}}, - colltab.Identity, - 0, - }, - { - [][]int{{100, 20, 5, 0}}, - [][]int{{100, 21, 5, 0}}, - colltab.Secondary, - -1, - }, - { - [][]int{{100, 20, 5, 0}}, - [][]int{{100, 20, 2, 0}}, - colltab.Tertiary, - 1, - }, - { - [][]int{{100, 20, 5, 1}}, - [][]int{{100, 20, 5, 2}}, - colltab.Quaternary, - -1, - }, -} - -func TestCompareWeights(t *testing.T) { - for i, tt := range compareTests { - test := func(tt weightsTest, a, b [][]int) { - res, level := compareWeights(mkRawCES(a), mkRawCES(b)) - if res != tt.result { - t.Errorf("%d: expected comparison result %d; found %d", i, tt.result, res) - } - if level != tt.level { - t.Errorf("%d: expected level %d; found %d", i, tt.level, level) - } - } - test(tt, tt.a, tt.b) - test(tt, append(tt.a, extra[0]), append(tt.b, extra[0])) - } -} diff --git a/vendor/golang.org/x/text/collate/build/contract_test.go b/vendor/golang.org/x/text/collate/build/contract_test.go deleted file mode 100644 index 2e0eaecd..00000000 --- a/vendor/golang.org/x/text/collate/build/contract_test.go +++ /dev/null @@ -1,266 +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 build - -import ( - "bytes" - "sort" - "testing" - - "golang.org/x/text/internal/colltab" -) - -var largetosmall = []stridx{ - {"a", 5}, - {"ab", 4}, - {"abc", 3}, - {"abcd", 2}, - {"abcde", 1}, - {"abcdef", 0}, -} - -var offsetSortTests = [][]stridx{ - { - {"bcde", 1}, - {"bc", 5}, - {"ab", 4}, - {"bcd", 3}, - {"abcd", 0}, - {"abc", 2}, - }, - largetosmall, -} - -func TestOffsetSort(t *testing.T) { - for i, st := range offsetSortTests { - sort.Sort(offsetSort(st)) - for j, si := range st { - if j != si.index { - t.Errorf("%d: failed: %v", i, st) - } - } - } - for i, tt := range genStateTests { - // ensure input is well-formed - sort.Sort(offsetSort(tt.in)) - for j, si := range tt.in { - if si.index != j+1 { - t.Errorf("%dth sort failed: %v", i, tt.in) - } - } - } -} - -var genidxtest1 = []stridx{ - {"bcde", 3}, - {"bc", 6}, - {"ab", 2}, - {"bcd", 5}, - {"abcd", 0}, - {"abc", 1}, - {"bcdf", 4}, -} - -var genidxSortTests = [][]stridx{ - genidxtest1, - largetosmall, -} - -func TestGenIdxSort(t *testing.T) { - for i, st := range genidxSortTests { - sort.Sort(genidxSort(st)) - for j, si := range st { - if j != si.index { - t.Errorf("%dth sort failed %v", i, st) - break - } - } - } -} - -var entrySortTests = []colltab.ContractTrieSet{ - { - {10, 0, 1, 3}, - {99, 0, 1, 0}, - {20, 50, 0, 2}, - {30, 0, 1, 1}, - }, -} - -func TestEntrySort(t *testing.T) { - for i, et := range entrySortTests { - sort.Sort(entrySort(et)) - for j, fe := range et { - if j != int(fe.I) { - t.Errorf("%dth sort failed %v", i, et) - break - } - } - } -} - -type GenStateTest struct { - in []stridx - firstBlockLen int - out colltab.ContractTrieSet -} - -var genStateTests = []GenStateTest{ - {[]stridx{ - {"abc", 1}, - }, - 1, - colltab.ContractTrieSet{ - {'a', 0, 1, noIndex}, - {'b', 0, 1, noIndex}, - {'c', 'c', final, 1}, - }, - }, - {[]stridx{ - {"abc", 1}, - {"abd", 2}, - {"abe", 3}, - }, - 1, - colltab.ContractTrieSet{ - {'a', 0, 1, noIndex}, - {'b', 0, 1, noIndex}, - {'c', 'e', final, 1}, - }, - }, - {[]stridx{ - {"abc", 1}, - {"ab", 2}, - {"a", 3}, - }, - 1, - colltab.ContractTrieSet{ - {'a', 0, 1, 3}, - {'b', 0, 1, 2}, - {'c', 'c', final, 1}, - }, - }, - {[]stridx{ - {"abc", 1}, - {"abd", 2}, - {"ab", 3}, - {"ac", 4}, - {"a", 5}, - {"b", 6}, - }, - 2, - colltab.ContractTrieSet{ - {'b', 'b', final, 6}, - {'a', 0, 2, 5}, - {'c', 'c', final, 4}, - {'b', 0, 1, 3}, - {'c', 'd', final, 1}, - }, - }, - {[]stridx{ - {"bcde", 2}, - {"bc", 7}, - {"ab", 6}, - {"bcd", 5}, - {"abcd", 1}, - {"abc", 4}, - {"bcdf", 3}, - }, - 2, - colltab.ContractTrieSet{ - {'b', 3, 1, noIndex}, - {'a', 0, 1, noIndex}, - {'b', 0, 1, 6}, - {'c', 0, 1, 4}, - {'d', 'd', final, 1}, - {'c', 0, 1, 7}, - {'d', 0, 1, 5}, - {'e', 'f', final, 2}, - }, - }, -} - -func TestGenStates(t *testing.T) { - for i, tt := range genStateTests { - si := []stridx{} - for _, e := range tt.in { - si = append(si, e) - } - // ensure input is well-formed - sort.Sort(genidxSort(si)) - ct := colltab.ContractTrieSet{} - n, _ := genStates(&ct, si) - if nn := tt.firstBlockLen; nn != n { - t.Errorf("%d: block len %v; want %v", i, n, nn) - } - if lv, lw := len(ct), len(tt.out); lv != lw { - t.Errorf("%d: len %v; want %v", i, lv, lw) - continue - } - for j, fe := range tt.out { - const msg = "%d:%d: value %s=%v; want %v" - if fe.L != ct[j].L { - t.Errorf(msg, i, j, "l", ct[j].L, fe.L) - } - if fe.H != ct[j].H { - t.Errorf(msg, i, j, "h", ct[j].H, fe.H) - } - if fe.N != ct[j].N { - t.Errorf(msg, i, j, "n", ct[j].N, fe.N) - } - if fe.I != ct[j].I { - t.Errorf(msg, i, j, "i", ct[j].I, fe.I) - } - } - } -} - -func TestLookupContraction(t *testing.T) { - for i, tt := range genStateTests { - input := []string{} - for _, e := range tt.in { - input = append(input, e.str) - } - cts := colltab.ContractTrieSet{} - h, _ := appendTrie(&cts, input) - for j, si := range tt.in { - str := si.str - for _, s := range []string{str, str + "X"} { - msg := "%d:%d: %s(%s) %v; want %v" - idx, sn := lookup(&cts, h, []byte(s)) - if idx != si.index { - t.Errorf(msg, i, j, "index", s, idx, si.index) - } - if sn != len(str) { - t.Errorf(msg, i, j, "sn", s, sn, len(str)) - } - } - } - } -} - -func TestPrintContractionTrieSet(t *testing.T) { - testdata := colltab.ContractTrieSet(genStateTests[4].out) - buf := &bytes.Buffer{} - print(&testdata, buf, "test") - if contractTrieOutput != buf.String() { - t.Errorf("output differs; found\n%s", buf.String()) - println(string(buf.Bytes())) - } -} - -const contractTrieOutput = `// testCTEntries: 8 entries, 32 bytes -var testCTEntries = [8]struct{L,H,N,I uint8}{ - {0x62, 0x3, 1, 255}, - {0x61, 0x0, 1, 255}, - {0x62, 0x0, 1, 6}, - {0x63, 0x0, 1, 4}, - {0x64, 0x64, 0, 1}, - {0x63, 0x0, 1, 7}, - {0x64, 0x0, 1, 5}, - {0x65, 0x66, 0, 2}, -} -var testContractTrieSet = colltab.ContractTrieSet( testCTEntries[:] ) -` diff --git a/vendor/golang.org/x/text/collate/build/order_test.go b/vendor/golang.org/x/text/collate/build/order_test.go deleted file mode 100644 index 0e174bfb..00000000 --- a/vendor/golang.org/x/text/collate/build/order_test.go +++ /dev/null @@ -1,229 +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 build - -import ( - "strconv" - "testing" - - "golang.org/x/text/internal/colltab" -) - -type entryTest struct { - f func(in []int) (uint32, error) - arg []int - val uint32 -} - -// makeList returns a list of entries of length n+2, with n normal -// entries plus a leading and trailing anchor. -func makeList(n int) []*entry { - es := make([]*entry, n+2) - weights := []rawCE{{w: []int{100, 20, 5, 0}}} - for i := range es { - runes := []rune{rune(i)} - es[i] = &entry{ - runes: runes, - elems: weights, - } - weights = nextWeight(colltab.Primary, weights) - } - for i := 1; i < len(es); i++ { - es[i-1].next = es[i] - es[i].prev = es[i-1] - _, es[i-1].level = compareWeights(es[i-1].elems, es[i].elems) - } - es[0].exclude = true - es[0].logical = firstAnchor - es[len(es)-1].exclude = true - es[len(es)-1].logical = lastAnchor - return es -} - -func TestNextIndexed(t *testing.T) { - const n = 5 - es := makeList(n) - for i := int64(0); i < 1<= 0; i-- { - if a[i] < a[i+1] { - break - } - } - if i < 0 { - return false - } - for j := len(a) - 1; j >= i; j-- { - if a[j] > a[i] { - a[i], a[j] = a[j], a[i] - break - } - } - for j := i + 1; j < (len(a)+i+1)/2; j++ { - a[j], a[len(a)+i-j] = a[len(a)+i-j], a[j] - } - return true -} - -func TestInsertAfter(t *testing.T) { - const n = 5 - orig := makeList(n) - perm := make([]int, n) - for i := range perm { - perm[i] = i + 1 - } - for ok := true; ok; ok = nextPerm(perm) { - es := makeList(n) - last := es[0] - for _, i := range perm { - last.insertAfter(es[i]) - last = es[i] - } - for _, e := range es { - e.elems = es[0].elems - } - e := es[0] - for _, i := range perm { - e, _ = e.nextIndexed() - if e.runes[0] != orig[i].runes[0] { - t.Errorf("%d:%d: expected entry %X; found %X", perm, i, orig[i].runes, e.runes) - break - } - } - } -} - -func TestInsertBefore(t *testing.T) { - const n = 5 - orig := makeList(n) - perm := make([]int, n) - for i := range perm { - perm[i] = i + 1 - } - for ok := true; ok; ok = nextPerm(perm) { - es := makeList(n) - last := es[len(es)-1] - for _, i := range perm { - last.insertBefore(es[i]) - last = es[i] - } - for _, e := range es { - e.elems = es[0].elems - } - e := es[0] - for i := n - 1; i >= 0; i-- { - e, _ = e.nextIndexed() - if e.runes[0] != rune(perm[i]) { - t.Errorf("%d:%d: expected entry %X; found %X", perm, i, orig[i].runes, e.runes) - break - } - } - } -} - -type entryLessTest struct { - a, b *entry - res bool -} - -var ( - w1 = []rawCE{{w: []int{100, 20, 5, 5}}} - w2 = []rawCE{{w: []int{101, 20, 5, 5}}} -) - -var entryLessTests = []entryLessTest{ - {&entry{str: "a", elems: w1}, - &entry{str: "a", elems: w1}, - false, - }, - {&entry{str: "a", elems: w1}, - &entry{str: "a", elems: w2}, - true, - }, - {&entry{str: "a", elems: w1}, - &entry{str: "b", elems: w1}, - true, - }, - {&entry{str: "a", elems: w2}, - &entry{str: "a", elems: w1}, - false, - }, - {&entry{str: "c", elems: w1}, - &entry{str: "b", elems: w1}, - false, - }, - {&entry{str: "a", elems: w1, logical: firstAnchor}, - &entry{str: "a", elems: w1}, - true, - }, - {&entry{str: "a", elems: w1}, - &entry{str: "b", elems: w1, logical: firstAnchor}, - false, - }, - {&entry{str: "b", elems: w1}, - &entry{str: "a", elems: w1, logical: lastAnchor}, - true, - }, - {&entry{str: "a", elems: w1, logical: lastAnchor}, - &entry{str: "c", elems: w1}, - false, - }, -} - -func TestEntryLess(t *testing.T) { - for i, tt := range entryLessTests { - if res := entryLess(tt.a, tt.b); res != tt.res { - t.Errorf("%d: was %v; want %v", i, res, tt.res) - } - } -} diff --git a/vendor/golang.org/x/text/collate/build/trie_test.go b/vendor/golang.org/x/text/collate/build/trie_test.go deleted file mode 100644 index 4d4f6e4d..00000000 --- a/vendor/golang.org/x/text/collate/build/trie_test.go +++ /dev/null @@ -1,107 +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 build - -import ( - "bytes" - "fmt" - "testing" -) - -// We take the smallest, largest and an arbitrary value for each -// of the UTF-8 sequence lengths. -var testRunes = []rune{ - 0x01, 0x0C, 0x7F, // 1-byte sequences - 0x80, 0x100, 0x7FF, // 2-byte sequences - 0x800, 0x999, 0xFFFF, // 3-byte sequences - 0x10000, 0x10101, 0x10FFFF, // 4-byte sequences - 0x200, 0x201, 0x202, 0x210, 0x215, // five entries in one sparse block -} - -func makeTestTrie(t *testing.T) trie { - n := newNode() - for i, r := range testRunes { - n.insert(r, uint32(i)) - } - idx := newTrieBuilder() - idx.addTrie(n) - tr, err := idx.generate() - if err != nil { - t.Errorf(err.Error()) - } - return *tr -} - -func TestGenerateTrie(t *testing.T) { - testdata := makeTestTrie(t) - buf := &bytes.Buffer{} - testdata.printArrays(buf, "test") - fmt.Fprintf(buf, "var testTrie = ") - testdata.printStruct(buf, &trieHandle{19, 0}, "test") - if output != buf.String() { - t.Error("output differs") - } -} - -var output = `// testValues: 832 entries, 3328 bytes -// Block 2 is the null block. -var testValues = [832]uint32 { - // Block 0x0, offset 0x0 - 0x000c:0x00000001, - // Block 0x1, offset 0x40 - 0x007f:0x00000002, - // Block 0x2, offset 0x80 - // Block 0x3, offset 0xc0 - 0x00c0:0x00000003, - // Block 0x4, offset 0x100 - 0x0100:0x00000004, - // Block 0x5, offset 0x140 - 0x0140:0x0000000c, 0x0141:0x0000000d, 0x0142:0x0000000e, - 0x0150:0x0000000f, - 0x0155:0x00000010, - // Block 0x6, offset 0x180 - 0x01bf:0x00000005, - // Block 0x7, offset 0x1c0 - 0x01c0:0x00000006, - // Block 0x8, offset 0x200 - 0x0219:0x00000007, - // Block 0x9, offset 0x240 - 0x027f:0x00000008, - // Block 0xa, offset 0x280 - 0x0280:0x00000009, - // Block 0xb, offset 0x2c0 - 0x02c1:0x0000000a, - // Block 0xc, offset 0x300 - 0x033f:0x0000000b, -} - -// testLookup: 640 entries, 1280 bytes -// Block 0 is the null block. -var testLookup = [640]uint16 { - // Block 0x0, offset 0x0 - // Block 0x1, offset 0x40 - // Block 0x2, offset 0x80 - // Block 0x3, offset 0xc0 - 0x0e0:0x05, 0x0e6:0x06, - // Block 0x4, offset 0x100 - 0x13f:0x07, - // Block 0x5, offset 0x140 - 0x140:0x08, 0x144:0x09, - // Block 0x6, offset 0x180 - 0x190:0x03, - // Block 0x7, offset 0x1c0 - 0x1ff:0x0a, - // Block 0x8, offset 0x200 - 0x20f:0x05, - // Block 0x9, offset 0x240 - 0x242:0x01, 0x244:0x02, - 0x248:0x03, - 0x25f:0x04, - 0x260:0x01, - 0x26f:0x02, - 0x270:0x04, 0x274:0x06, -} - -var testTrie = trie{ testLookup[1216:], testValues[0:], testLookup[:], testValues[:]}` diff --git a/vendor/golang.org/x/text/collate/collate_test.go b/vendor/golang.org/x/text/collate/collate_test.go deleted file mode 100644 index 0e78b96f..00000000 --- a/vendor/golang.org/x/text/collate/collate_test.go +++ /dev/null @@ -1,482 +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 collate - -import ( - "bytes" - "testing" - - "golang.org/x/text/internal/colltab" - "golang.org/x/text/language" -) - -type weightsTest struct { - opt opts - in, out ColElems -} - -type opts struct { - lev int - alt alternateHandling - top int - - backwards bool - caseLevel bool -} - -// ignore returns an initialized boolean array based on the given Level. -// A negative value means using the default setting of quaternary. -func ignore(level colltab.Level) (ignore [colltab.NumLevels]bool) { - if level < 0 { - level = colltab.Quaternary - } - for i := range ignore { - ignore[i] = level < colltab.Level(i) - } - return ignore -} - -func makeCE(w []int) colltab.Elem { - ce, err := colltab.MakeElem(w[0], w[1], w[2], uint8(w[3])) - if err != nil { - panic(err) - } - return ce -} - -func (o opts) collator() *Collator { - c := &Collator{ - options: options{ - ignore: ignore(colltab.Level(o.lev - 1)), - alternate: o.alt, - backwards: o.backwards, - caseLevel: o.caseLevel, - variableTop: uint32(o.top), - }, - } - return c -} - -const ( - maxQ = 0x1FFFFF -) - -func wpq(p, q int) Weights { - return W(p, defaults.Secondary, defaults.Tertiary, q) -} - -func wsq(s, q int) Weights { - return W(0, s, defaults.Tertiary, q) -} - -func wq(q int) Weights { - return W(0, 0, 0, q) -} - -var zero = W(0, 0, 0, 0) - -var processTests = []weightsTest{ - // Shifted - { // simple sequence of non-variables - opt: opts{alt: altShifted, top: 100}, - in: ColElems{W(200), W(300), W(400)}, - out: ColElems{wpq(200, maxQ), wpq(300, maxQ), wpq(400, maxQ)}, - }, - { // first is a variable - opt: opts{alt: altShifted, top: 250}, - in: ColElems{W(200), W(300), W(400)}, - out: ColElems{wq(200), wpq(300, maxQ), wpq(400, maxQ)}, - }, - { // all but first are variable - opt: opts{alt: altShifted, top: 999}, - in: ColElems{W(1000), W(200), W(300), W(400)}, - out: ColElems{wpq(1000, maxQ), wq(200), wq(300), wq(400)}, - }, - { // first is a modifier - opt: opts{alt: altShifted, top: 999}, - in: ColElems{W(0, 10), W(1000)}, - out: ColElems{wsq(10, maxQ), wpq(1000, maxQ)}, - }, - { // primary ignorables - opt: opts{alt: altShifted, top: 250}, - in: ColElems{W(200), W(0, 10), W(300), W(0, 15), W(400)}, - out: ColElems{wq(200), zero, wpq(300, maxQ), wsq(15, maxQ), wpq(400, maxQ)}, - }, - { // secondary ignorables - opt: opts{alt: altShifted, top: 250}, - in: ColElems{W(200), W(0, 0, 10), W(300), W(0, 0, 15), W(400)}, - out: ColElems{wq(200), zero, wpq(300, maxQ), W(0, 0, 15, maxQ), wpq(400, maxQ)}, - }, - { // tertiary ignorables, no change - opt: opts{alt: altShifted, top: 250}, - in: ColElems{W(200), zero, W(300), zero, W(400)}, - out: ColElems{wq(200), zero, wpq(300, maxQ), zero, wpq(400, maxQ)}, - }, - - // ShiftTrimmed (same as Shifted) - { // simple sequence of non-variables - opt: opts{alt: altShiftTrimmed, top: 100}, - in: ColElems{W(200), W(300), W(400)}, - out: ColElems{wpq(200, maxQ), wpq(300, maxQ), wpq(400, maxQ)}, - }, - { // first is a variable - opt: opts{alt: altShiftTrimmed, top: 250}, - in: ColElems{W(200), W(300), W(400)}, - out: ColElems{wq(200), wpq(300, maxQ), wpq(400, maxQ)}, - }, - { // all but first are variable - opt: opts{alt: altShiftTrimmed, top: 999}, - in: ColElems{W(1000), W(200), W(300), W(400)}, - out: ColElems{wpq(1000, maxQ), wq(200), wq(300), wq(400)}, - }, - { // first is a modifier - opt: opts{alt: altShiftTrimmed, top: 999}, - in: ColElems{W(0, 10), W(1000)}, - out: ColElems{wsq(10, maxQ), wpq(1000, maxQ)}, - }, - { // primary ignorables - opt: opts{alt: altShiftTrimmed, top: 250}, - in: ColElems{W(200), W(0, 10), W(300), W(0, 15), W(400)}, - out: ColElems{wq(200), zero, wpq(300, maxQ), wsq(15, maxQ), wpq(400, maxQ)}, - }, - { // secondary ignorables - opt: opts{alt: altShiftTrimmed, top: 250}, - in: ColElems{W(200), W(0, 0, 10), W(300), W(0, 0, 15), W(400)}, - out: ColElems{wq(200), zero, wpq(300, maxQ), W(0, 0, 15, maxQ), wpq(400, maxQ)}, - }, - { // tertiary ignorables, no change - opt: opts{alt: altShiftTrimmed, top: 250}, - in: ColElems{W(200), zero, W(300), zero, W(400)}, - out: ColElems{wq(200), zero, wpq(300, maxQ), zero, wpq(400, maxQ)}, - }, - - // Blanked - { // simple sequence of non-variables - opt: opts{alt: altBlanked, top: 100}, - in: ColElems{W(200), W(300), W(400)}, - out: ColElems{W(200), W(300), W(400)}, - }, - { // first is a variable - opt: opts{alt: altBlanked, top: 250}, - in: ColElems{W(200), W(300), W(400)}, - out: ColElems{zero, W(300), W(400)}, - }, - { // all but first are variable - opt: opts{alt: altBlanked, top: 999}, - in: ColElems{W(1000), W(200), W(300), W(400)}, - out: ColElems{W(1000), zero, zero, zero}, - }, - { // first is a modifier - opt: opts{alt: altBlanked, top: 999}, - in: ColElems{W(0, 10), W(1000)}, - out: ColElems{W(0, 10), W(1000)}, - }, - { // primary ignorables - opt: opts{alt: altBlanked, top: 250}, - in: ColElems{W(200), W(0, 10), W(300), W(0, 15), W(400)}, - out: ColElems{zero, zero, W(300), W(0, 15), W(400)}, - }, - { // secondary ignorables - opt: opts{alt: altBlanked, top: 250}, - in: ColElems{W(200), W(0, 0, 10), W(300), W(0, 0, 15), W(400)}, - out: ColElems{zero, zero, W(300), W(0, 0, 15), W(400)}, - }, - { // tertiary ignorables, no change - opt: opts{alt: altBlanked, top: 250}, - in: ColElems{W(200), zero, W(300), zero, W(400)}, - out: ColElems{zero, zero, W(300), zero, W(400)}, - }, - - // Non-ignorable: input is always equal to output. - { // all but first are variable - opt: opts{alt: altNonIgnorable, top: 999}, - in: ColElems{W(1000), W(200), W(300), W(400)}, - out: ColElems{W(1000), W(200), W(300), W(400)}, - }, - { // primary ignorables - opt: opts{alt: altNonIgnorable, top: 250}, - in: ColElems{W(200), W(0, 10), W(300), W(0, 15), W(400)}, - out: ColElems{W(200), W(0, 10), W(300), W(0, 15), W(400)}, - }, - { // secondary ignorables - opt: opts{alt: altNonIgnorable, top: 250}, - in: ColElems{W(200), W(0, 0, 10), W(300), W(0, 0, 15), W(400)}, - out: ColElems{W(200), W(0, 0, 10), W(300), W(0, 0, 15), W(400)}, - }, - { // tertiary ignorables, no change - opt: opts{alt: altNonIgnorable, top: 250}, - in: ColElems{W(200), zero, W(300), zero, W(400)}, - out: ColElems{W(200), zero, W(300), zero, W(400)}, - }, -} - -func TestProcessWeights(t *testing.T) { - for i, tt := range processTests { - in := convertFromWeights(tt.in) - out := convertFromWeights(tt.out) - processWeights(tt.opt.alt, uint32(tt.opt.top), in) - for j, w := range in { - if w != out[j] { - t.Errorf("%d: Weights %d was %v; want %v", i, j, w, out[j]) - } - } - } -} - -type keyFromElemTest struct { - opt opts - in ColElems - out []byte -} - -var defS = byte(defaults.Secondary) -var defT = byte(defaults.Tertiary) - -const sep = 0 // separator byte - -var keyFromElemTests = []keyFromElemTest{ - { // simple primary and secondary weights. - opts{alt: altShifted}, - ColElems{W(0x200), W(0x7FFF), W(0, 0x30), W(0x100)}, - []byte{0x2, 0, 0x7F, 0xFF, 0x1, 0x00, // primary - sep, sep, 0, defS, 0, defS, 0, 0x30, 0, defS, // secondary - sep, sep, defT, defT, defT, defT, // tertiary - sep, 0xFF, 0xFF, 0xFF, 0xFF, // quaternary - }, - }, - { // same as first, but with zero element that need to be removed - opts{alt: altShifted}, - ColElems{W(0x200), zero, W(0x7FFF), W(0, 0x30), zero, W(0x100)}, - []byte{0x2, 0, 0x7F, 0xFF, 0x1, 0x00, // primary - sep, sep, 0, defS, 0, defS, 0, 0x30, 0, defS, // secondary - sep, sep, defT, defT, defT, defT, // tertiary - sep, 0xFF, 0xFF, 0xFF, 0xFF, // quaternary - }, - }, - { // same as first, with large primary values - opts{alt: altShifted}, - ColElems{W(0x200), W(0x8000), W(0, 0x30), W(0x12345)}, - []byte{0x2, 0, 0x80, 0x80, 0x00, 0x81, 0x23, 0x45, // primary - sep, sep, 0, defS, 0, defS, 0, 0x30, 0, defS, // secondary - sep, sep, defT, defT, defT, defT, // tertiary - sep, 0xFF, 0xFF, 0xFF, 0xFF, // quaternary - }, - }, - { // same as first, but with the secondary level backwards - opts{alt: altShifted, backwards: true}, - ColElems{W(0x200), W(0x7FFF), W(0, 0x30), W(0x100)}, - []byte{0x2, 0, 0x7F, 0xFF, 0x1, 0x00, // primary - sep, sep, 0, defS, 0, 0x30, 0, defS, 0, defS, // secondary - sep, sep, defT, defT, defT, defT, // tertiary - sep, 0xFF, 0xFF, 0xFF, 0xFF, // quaternary - }, - }, - { // same as first, ignoring quaternary level - opts{alt: altShifted, lev: 3}, - ColElems{W(0x200), zero, W(0x7FFF), W(0, 0x30), zero, W(0x100)}, - []byte{0x2, 0, 0x7F, 0xFF, 0x1, 0x00, // primary - sep, sep, 0, defS, 0, defS, 0, 0x30, 0, defS, // secondary - sep, sep, defT, defT, defT, defT, // tertiary - }, - }, - { // same as first, ignoring tertiary level - opts{alt: altShifted, lev: 2}, - ColElems{W(0x200), zero, W(0x7FFF), W(0, 0x30), zero, W(0x100)}, - []byte{0x2, 0, 0x7F, 0xFF, 0x1, 0x00, // primary - sep, sep, 0, defS, 0, defS, 0, 0x30, 0, defS, // secondary - }, - }, - { // same as first, ignoring secondary level - opts{alt: altShifted, lev: 1}, - ColElems{W(0x200), zero, W(0x7FFF), W(0, 0x30), zero, W(0x100)}, - []byte{0x2, 0, 0x7F, 0xFF, 0x1, 0x00}, - }, - { // simple primary and secondary weights. - opts{alt: altShiftTrimmed, top: 0x250}, - ColElems{W(0x300), W(0x200), W(0x7FFF), W(0, 0x30), W(0x800)}, - []byte{0x3, 0, 0x7F, 0xFF, 0x8, 0x00, // primary - sep, sep, 0, defS, 0, defS, 0, 0x30, 0, defS, // secondary - sep, sep, defT, defT, defT, defT, // tertiary - sep, 0xFF, 0x2, 0, // quaternary - }, - }, - { // as first, primary with case level enabled - opts{alt: altShifted, lev: 1, caseLevel: true}, - ColElems{W(0x200), W(0x7FFF), W(0, 0x30), W(0x100)}, - []byte{0x2, 0, 0x7F, 0xFF, 0x1, 0x00, // primary - sep, sep, // secondary - sep, sep, defT, defT, defT, defT, // tertiary - }, - }, -} - -func TestKeyFromElems(t *testing.T) { - buf := Buffer{} - for i, tt := range keyFromElemTests { - buf.Reset() - in := convertFromWeights(tt.in) - processWeights(tt.opt.alt, uint32(tt.opt.top), in) - tt.opt.collator().keyFromElems(&buf, in) - res := buf.key - if len(res) != len(tt.out) { - t.Errorf("%d: len(ws) was %d; want %d (%X should be %X)", i, len(res), len(tt.out), res, tt.out) - } - n := len(res) - if len(tt.out) < n { - n = len(tt.out) - } - for j, c := range res[:n] { - if c != tt.out[j] { - t.Errorf("%d: byte %d was %X; want %X", i, j, c, tt.out[j]) - } - } - } -} - -func TestGetColElems(t *testing.T) { - for i, tt := range appendNextTests { - c, err := makeTable(tt.in) - if err != nil { - // error is reported in TestAppendNext - continue - } - // Create one large test per table - str := make([]byte, 0, 4000) - out := ColElems{} - for len(str) < 3000 { - for _, chk := range tt.chk { - str = append(str, chk.in[:chk.n]...) - out = append(out, chk.out...) - } - } - for j, chk := range append(tt.chk, check{string(str), len(str), out}) { - out := convertFromWeights(chk.out) - ce := c.getColElems([]byte(chk.in)[:chk.n]) - if len(ce) != len(out) { - t.Errorf("%d:%d: len(ws) was %d; want %d", i, j, len(ce), len(out)) - continue - } - cnt := 0 - for k, w := range ce { - w, _ = colltab.MakeElem(w.Primary(), w.Secondary(), int(w.Tertiary()), 0) - if w != out[k] { - t.Errorf("%d:%d: Weights %d was %X; want %X", i, j, k, w, out[k]) - cnt++ - } - if cnt > 10 { - break - } - } - } - } -} - -type keyTest struct { - in string - out []byte -} - -var keyTests = []keyTest{ - {"abc", - []byte{0, 100, 0, 200, 1, 44, 0, 0, 0, 32, 0, 32, 0, 32, 0, 0, 2, 2, 2, 0, 255, 255, 255}, - }, - {"a\u0301", - []byte{0, 102, 0, 0, 0, 32, 0, 0, 2, 0, 255}, - }, - {"aaaaa", - []byte{0, 100, 0, 100, 0, 100, 0, 100, 0, 100, 0, 0, - 0, 32, 0, 32, 0, 32, 0, 32, 0, 32, 0, 0, - 2, 2, 2, 2, 2, 0, - 255, 255, 255, 255, 255, - }, - }, - // Issue 16391: incomplete rune at end of UTF-8 sequence. - {"\xc2", []byte{133, 255, 253, 0, 0, 0, 32, 0, 0, 2, 0, 255}}, - {"\xc2a", []byte{133, 255, 253, 0, 100, 0, 0, 0, 32, 0, 32, 0, 0, 2, 2, 0, 255, 255}}, -} - -func TestKey(t *testing.T) { - c, _ := makeTable(appendNextTests[4].in) - c.alternate = altShifted - c.ignore = ignore(colltab.Quaternary) - buf := Buffer{} - keys1 := [][]byte{} - keys2 := [][]byte{} - for _, tt := range keyTests { - keys1 = append(keys1, c.Key(&buf, []byte(tt.in))) - keys2 = append(keys2, c.KeyFromString(&buf, tt.in)) - } - // Separate generation from testing to ensure buffers are not overwritten. - for i, tt := range keyTests { - if !bytes.Equal(keys1[i], tt.out) { - t.Errorf("%d: Key(%q) = %d; want %d", i, tt.in, keys1[i], tt.out) - } - if !bytes.Equal(keys2[i], tt.out) { - t.Errorf("%d: KeyFromString(%q) = %d; want %d", i, tt.in, keys2[i], tt.out) - } - } -} - -type compareTest struct { - a, b string - res int // comparison result -} - -var compareTests = []compareTest{ - {"a\u0301", "a", 1}, - {"a\u0301b", "ab", 1}, - {"a", "a\u0301", -1}, - {"ab", "a\u0301b", -1}, - {"bc", "a\u0301c", 1}, - {"ab", "aB", -1}, - {"a\u0301", "a\u0301", 0}, - {"a", "a", 0}, - // Only clip prefixes of whole runes. - {"\u302E", "\u302F", 1}, - // Don't clip prefixes when last rune of prefix may be part of contraction. - {"a\u035E", "a\u0301\u035F", -1}, - {"a\u0301\u035Fb", "a\u0301\u035F", -1}, -} - -func TestCompare(t *testing.T) { - c, _ := makeTable(appendNextTests[4].in) - for i, tt := range compareTests { - if res := c.Compare([]byte(tt.a), []byte(tt.b)); res != tt.res { - t.Errorf("%d: Compare(%q, %q) == %d; want %d", i, tt.a, tt.b, res, tt.res) - } - if res := c.CompareString(tt.a, tt.b); res != tt.res { - t.Errorf("%d: CompareString(%q, %q) == %d; want %d", i, tt.a, tt.b, res, tt.res) - } - } -} - -func TestNumeric(t *testing.T) { - c := New(language.English, Loose, Numeric) - - for i, tt := range []struct { - a, b string - want int - }{ - {"1", "2", -1}, - {"2", "12", -1}, - {"2", "12", -1}, // Fullwidth is sorted as usual. - {"₂", "₁₂", 1}, // Subscript is not sorted as numbers. - {"②", "①②", 1}, // Circled is not sorted as numbers. - { // Imperial Aramaic, is not sorted as number. - "\U00010859", - "\U00010858\U00010859", - 1, - }, - {"12", "2", 1}, - {"A-1", "A-2", -1}, - {"A-2", "A-12", -1}, - {"A-12", "A-2", 1}, - {"A-0001", "A-1", 0}, - } { - if got := c.CompareString(tt.a, tt.b); got != tt.want { - t.Errorf("%d: CompareString(%s, %s) = %d; want %d", i, tt.a, tt.b, got, tt.want) - } - } -} diff --git a/vendor/golang.org/x/text/collate/export_test.go b/vendor/golang.org/x/text/collate/export_test.go deleted file mode 100644 index 69bfeaf1..00000000 --- a/vendor/golang.org/x/text/collate/export_test.go +++ /dev/null @@ -1,51 +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 collate - -// Export for testing. -// TODO: no longer necessary. Remove at some point. - -import ( - "fmt" - - "golang.org/x/text/internal/colltab" -) - -const ( - defaultSecondary = 0x20 - defaultTertiary = 0x2 -) - -type Weights struct { - Primary, Secondary, Tertiary, Quaternary int -} - -func W(ce ...int) Weights { - w := Weights{ce[0], defaultSecondary, defaultTertiary, 0} - if len(ce) > 1 { - w.Secondary = ce[1] - } - if len(ce) > 2 { - w.Tertiary = ce[2] - } - if len(ce) > 3 { - w.Quaternary = ce[3] - } - return w -} -func (w Weights) String() string { - return fmt.Sprintf("[%X.%X.%X.%X]", w.Primary, w.Secondary, w.Tertiary, w.Quaternary) -} - -func convertFromWeights(ws []Weights) []colltab.Elem { - out := make([]colltab.Elem, len(ws)) - for i, w := range ws { - out[i], _ = colltab.MakeElem(w.Primary, w.Secondary, w.Tertiary, 0) - if out[i] == colltab.Ignore && w.Quaternary > 0 { - out[i] = colltab.MakeQuaternary(w.Quaternary) - } - } - return out -} diff --git a/vendor/golang.org/x/text/collate/option_test.go b/vendor/golang.org/x/text/collate/option_test.go deleted file mode 100644 index 0f6ba9bc..00000000 --- a/vendor/golang.org/x/text/collate/option_test.go +++ /dev/null @@ -1,209 +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 collate - -import ( - "reflect" - "strings" - "testing" - - "golang.org/x/text/internal/colltab" - "golang.org/x/text/language" -) - -var ( - defaultIgnore = ignore(colltab.Tertiary) - defaultTable = getTable(locales[0]) -) - -func TestOptions(t *testing.T) { - for i, tt := range []struct { - in []Option - out options - }{ - 0: { - out: options{ - ignore: defaultIgnore, - }, - }, - 1: { - in: []Option{IgnoreDiacritics}, - out: options{ - ignore: [colltab.NumLevels]bool{false, true, false, true, true}, - }, - }, - 2: { - in: []Option{IgnoreCase, IgnoreDiacritics}, - out: options{ - ignore: ignore(colltab.Primary), - }, - }, - 3: { - in: []Option{ignoreDiacritics, IgnoreWidth}, - out: options{ - ignore: ignore(colltab.Primary), - caseLevel: true, - }, - }, - 4: { - in: []Option{IgnoreWidth, ignoreDiacritics}, - out: options{ - ignore: ignore(colltab.Primary), - caseLevel: true, - }, - }, - 5: { - in: []Option{IgnoreCase, IgnoreWidth}, - out: options{ - ignore: ignore(colltab.Secondary), - }, - }, - 6: { - in: []Option{IgnoreCase, IgnoreWidth, Loose}, - out: options{ - ignore: ignore(colltab.Primary), - }, - }, - 7: { - in: []Option{Force, IgnoreCase, IgnoreWidth, Loose}, - out: options{ - ignore: [colltab.NumLevels]bool{false, true, true, true, false}, - }, - }, - 8: { - in: []Option{IgnoreDiacritics, IgnoreCase}, - out: options{ - ignore: ignore(colltab.Primary), - }, - }, - 9: { - in: []Option{Numeric}, - out: options{ - ignore: defaultIgnore, - numeric: true, - }, - }, - 10: { - in: []Option{OptionsFromTag(language.MustParse("und-u-ks-level1"))}, - out: options{ - ignore: ignore(colltab.Primary), - }, - }, - 11: { - in: []Option{OptionsFromTag(language.MustParse("und-u-ks-level4"))}, - out: options{ - ignore: ignore(colltab.Quaternary), - }, - }, - 12: { - in: []Option{OptionsFromTag(language.MustParse("und-u-ks-identic"))}, - out: options{}, - }, - 13: { - in: []Option{ - OptionsFromTag(language.MustParse("und-u-kn-true-kb-true-kc-true")), - }, - out: options{ - ignore: defaultIgnore, - caseLevel: true, - backwards: true, - numeric: true, - }, - }, - 14: { - in: []Option{ - OptionsFromTag(language.MustParse("und-u-kn-true-kb-true-kc-true")), - OptionsFromTag(language.MustParse("und-u-kn-false-kb-false-kc-false")), - }, - out: options{ - ignore: defaultIgnore, - }, - }, - 15: { - in: []Option{ - OptionsFromTag(language.MustParse("und-u-kn-true-kb-true-kc-true")), - OptionsFromTag(language.MustParse("und-u-kn-foo-kb-foo-kc-foo")), - }, - out: options{ - ignore: defaultIgnore, - caseLevel: true, - backwards: true, - numeric: true, - }, - }, - 16: { // Normal options take precedence over tag options. - in: []Option{ - Numeric, IgnoreCase, - OptionsFromTag(language.MustParse("und-u-kn-false-kc-true")), - }, - out: options{ - ignore: ignore(colltab.Secondary), - caseLevel: false, - numeric: true, - }, - }, - 17: { - in: []Option{ - OptionsFromTag(language.MustParse("und-u-ka-shifted")), - }, - out: options{ - ignore: defaultIgnore, - alternate: altShifted, - }, - }, - 18: { - in: []Option{ - OptionsFromTag(language.MustParse("und-u-ka-blanked")), - }, - out: options{ - ignore: defaultIgnore, - alternate: altBlanked, - }, - }, - 19: { - in: []Option{ - OptionsFromTag(language.MustParse("und-u-ka-posix")), - }, - out: options{ - ignore: defaultIgnore, - alternate: altShiftTrimmed, - }, - }, - } { - c := newCollator(defaultTable) - c.t = nil - c.variableTop = 0 - c.f = 0 - - c.setOptions(tt.in) - if !reflect.DeepEqual(c.options, tt.out) { - t.Errorf("%d: got %v; want %v", i, c.options, tt.out) - } - } -} - -func TestAlternateSortTypes(t *testing.T) { - testCases := []struct { - lang string - in []string - want []string - }{{ - lang: "zh,cmn,zh-Hant-u-co-pinyin,zh-HK-u-co-pinyin,zh-pinyin", - in: []string{"爸爸", "妈妈", "儿子", "女儿"}, - want: []string{"爸爸", "儿子", "妈妈", "女儿"}, - }, { - lang: "zh-Hant,zh-u-co-stroke,zh-Hant-u-co-stroke", - in: []string{"爸爸", "妈妈", "儿子", "女儿"}, - want: []string{"儿子", "女儿", "妈妈", "爸爸"}, - }} - for _, tc := range testCases { - for _, tag := range strings.Split(tc.lang, ",") { - got := append([]string{}, tc.in...) - New(language.MustParse(tag)).SortStrings(got) - if !reflect.DeepEqual(got, tc.want) { - t.Errorf("New(%s).SortStrings(%v) = %v; want %v", tag, tc.in, got, tc.want) - } - } - } -} diff --git a/vendor/golang.org/x/text/collate/reg_test.go b/vendor/golang.org/x/text/collate/reg_test.go deleted file mode 100644 index 1ac5fedc..00000000 --- a/vendor/golang.org/x/text/collate/reg_test.go +++ /dev/null @@ -1,230 +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 collate - -import ( - "archive/zip" - "bufio" - "bytes" - "flag" - "io" - "io/ioutil" - "log" - "path" - "regexp" - "strconv" - "strings" - "testing" - "unicode/utf8" - - "golang.org/x/text/collate/build" - "golang.org/x/text/internal/gen" - "golang.org/x/text/language" -) - -var long = flag.Bool("long", false, - "run time-consuming tests, such as tests that fetch data online") - -// This regression test runs tests for the test files in CollationTest.zip -// (taken from http://www.unicode.org/Public/UCA//). -// -// The test files have the following form: -// # header -// 0009 0021; # ('\u0009') [| | | 0201 025E] -// 0009 003F; # ('\u0009') [| | | 0201 0263] -// 000A 0021; # ('\u000A') [| | | 0202 025E] -// 000A 003F; # ('\u000A') [| | | 0202 0263] -// -// The part before the semicolon is the hex representation of a sequence -// of runes. After the hash mark is a comment. The strings -// represented by rune sequence are in the file in sorted order, as -// defined by the DUCET. - -type Test struct { - name string - str [][]byte - comment []string -} - -var versionRe = regexp.MustCompile(`# UCA Version: (.*)\n?$`) -var testRe = regexp.MustCompile(`^([\dA-F ]+);.*# (.*)\n?$`) - -func TestCollation(t *testing.T) { - if !gen.IsLocal() && !*long { - t.Skip("skipping test to prevent downloading; to run use -long or use -local to specify a local source") - } - t.Skip("must first update to new file format to support test") - for _, test := range loadTestData() { - doTest(t, test) - } -} - -func Error(e error) { - if e != nil { - log.Fatal(e) - } -} - -// parseUCA parses a Default Unicode Collation Element Table of the format -// specified in http://www.unicode.org/reports/tr10/#File_Format. -// It returns the variable top. -func parseUCA(builder *build.Builder) { - r := gen.OpenUnicodeFile("UCA", "", "allkeys.txt") - defer r.Close() - input := bufio.NewReader(r) - colelem := regexp.MustCompile(`\[([.*])([0-9A-F.]+)\]`) - for i := 1; true; i++ { - l, prefix, err := input.ReadLine() - if err == io.EOF { - break - } - Error(err) - line := string(l) - if prefix { - log.Fatalf("%d: buffer overflow", i) - } - if len(line) == 0 || line[0] == '#' { - continue - } - if line[0] == '@' { - if strings.HasPrefix(line[1:], "version ") { - if v := strings.Split(line[1:], " ")[1]; v != gen.UnicodeVersion() { - log.Fatalf("incompatible version %s; want %s", v, gen.UnicodeVersion()) - } - } - } else { - // parse entries - part := strings.Split(line, " ; ") - if len(part) != 2 { - log.Fatalf("%d: production rule without ';': %v", i, line) - } - lhs := []rune{} - for _, v := range strings.Split(part[0], " ") { - if v != "" { - lhs = append(lhs, rune(convHex(i, v))) - } - } - vars := []int{} - rhs := [][]int{} - for i, m := range colelem.FindAllStringSubmatch(part[1], -1) { - if m[1] == "*" { - vars = append(vars, i) - } - elem := []int{} - for _, h := range strings.Split(m[2], ".") { - elem = append(elem, convHex(i, h)) - } - rhs = append(rhs, elem) - } - builder.Add(lhs, rhs, vars) - } - } -} - -func convHex(line int, s string) int { - r, e := strconv.ParseInt(s, 16, 32) - if e != nil { - log.Fatalf("%d: %v", line, e) - } - return int(r) -} - -func loadTestData() []Test { - f := gen.OpenUnicodeFile("UCA", "", "CollationTest.zip") - buffer, err := ioutil.ReadAll(f) - f.Close() - Error(err) - archive, err := zip.NewReader(bytes.NewReader(buffer), int64(len(buffer))) - Error(err) - tests := []Test{} - for _, f := range archive.File { - // Skip the short versions, which are simply duplicates of the long versions. - if strings.Contains(f.Name, "SHORT") || f.FileInfo().IsDir() { - continue - } - ff, err := f.Open() - Error(err) - defer ff.Close() - scanner := bufio.NewScanner(ff) - test := Test{name: path.Base(f.Name)} - for scanner.Scan() { - line := scanner.Text() - if len(line) <= 1 || line[0] == '#' { - if m := versionRe.FindStringSubmatch(line); m != nil { - if m[1] != gen.UnicodeVersion() { - log.Printf("warning:%s: version is %s; want %s", f.Name, m[1], gen.UnicodeVersion()) - } - } - continue - } - m := testRe.FindStringSubmatch(line) - if m == nil || len(m) < 3 { - log.Fatalf(`Failed to parse: "%s" result: %#v`, line, m) - } - str := []byte{} - // In the regression test data (unpaired) surrogates are assigned a weight - // corresponding to their code point value. However, utf8.DecodeRune, - // which is used to compute the implicit weight, assigns FFFD to surrogates. - // We therefore skip tests with surrogates. This skips about 35 entries - // per test. - valid := true - for _, split := range strings.Split(m[1], " ") { - r, err := strconv.ParseUint(split, 16, 64) - Error(err) - valid = valid && utf8.ValidRune(rune(r)) - str = append(str, string(rune(r))...) - } - if valid { - test.str = append(test.str, str) - test.comment = append(test.comment, m[2]) - } - } - if scanner.Err() != nil { - log.Fatal(scanner.Err()) - } - tests = append(tests, test) - } - return tests -} - -var errorCount int - -func runes(b []byte) []rune { - return []rune(string(b)) -} - -var shifted = language.MustParse("und-u-ka-shifted-ks-level4") - -func doTest(t *testing.T, tc Test) { - bld := build.NewBuilder() - parseUCA(bld) - w, err := bld.Build() - Error(err) - var tag language.Tag - if !strings.Contains(tc.name, "NON_IGNOR") { - tag = shifted - } - c := NewFromTable(w, OptionsFromTag(tag)) - b := &Buffer{} - prev := tc.str[0] - for i := 1; i < len(tc.str); i++ { - b.Reset() - s := tc.str[i] - ka := c.Key(b, prev) - kb := c.Key(b, s) - if r := bytes.Compare(ka, kb); r == 1 { - t.Errorf("%s:%d: Key(%.4X) < Key(%.4X) (%X < %X) == %d; want -1 or 0", tc.name, i, []rune(string(prev)), []rune(string(s)), ka, kb, r) - prev = s - continue - } - if r := c.Compare(prev, s); r == 1 { - t.Errorf("%s:%d: Compare(%.4X, %.4X) == %d; want -1 or 0", tc.name, i, runes(prev), runes(s), r) - } - if r := c.Compare(s, prev); r == -1 { - t.Errorf("%s:%d: Compare(%.4X, %.4X) == %d; want 1 or 0", tc.name, i, runes(s), runes(prev), r) - } - prev = s - } -} diff --git a/vendor/golang.org/x/text/collate/sort_test.go b/vendor/golang.org/x/text/collate/sort_test.go deleted file mode 100644 index d9e7f31c..00000000 --- a/vendor/golang.org/x/text/collate/sort_test.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. - -package collate_test - -import ( - "fmt" - "testing" - - "golang.org/x/text/collate" - "golang.org/x/text/language" -) - -func ExampleCollator_Strings() { - c := collate.New(language.Und) - strings := []string{ - "ad", - "ab", - "äb", - "ac", - } - c.SortStrings(strings) - fmt.Println(strings) - // Output: [ab äb ac ad] -} - -type sorter []string - -func (s sorter) Len() int { - return len(s) -} - -func (s sorter) Swap(i, j int) { - s[j], s[i] = s[i], s[j] -} - -func (s sorter) Bytes(i int) []byte { - return []byte(s[i]) -} - -func TestSort(t *testing.T) { - c := collate.New(language.English) - strings := []string{ - "bcd", - "abc", - "ddd", - } - c.Sort(sorter(strings)) - res := fmt.Sprint(strings) - want := "[abc bcd ddd]" - if res != want { - t.Errorf("found %s; want %s", res, want) - } -} diff --git a/vendor/golang.org/x/text/collate/table_test.go b/vendor/golang.org/x/text/collate/table_test.go deleted file mode 100644 index 3a6b12fd..00000000 --- a/vendor/golang.org/x/text/collate/table_test.go +++ /dev/null @@ -1,291 +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 collate - -import ( - "testing" - - "golang.org/x/text/collate/build" - "golang.org/x/text/internal/colltab" - "golang.org/x/text/unicode/norm" -) - -type ColElems []Weights - -type input struct { - str string - ces [][]int -} - -type check struct { - in string - n int - out ColElems -} - -type tableTest struct { - in []input - chk []check -} - -func w(ce ...int) Weights { - return W(ce...) -} - -var defaults = w(0) - -func pt(p, t int) []int { - return []int{p, defaults.Secondary, t} -} - -func makeTable(in []input) (*Collator, error) { - b := build.NewBuilder() - for _, r := range in { - if e := b.Add([]rune(r.str), r.ces, nil); e != nil { - panic(e) - } - } - t, err := b.Build() - if err != nil { - return nil, err - } - return NewFromTable(t), nil -} - -// modSeq holds a seqeunce of modifiers in increasing order of CCC long enough -// to cause a segment overflow if not handled correctly. The last rune in this -// list has a CCC of 214. -var modSeq = []rune{ - 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7, 0x05B8, 0x05B9, 0x05BB, - 0x05BC, 0x05BD, 0x05BF, 0x05C1, 0x05C2, 0xFB1E, 0x064B, 0x064C, 0x064D, 0x064E, - 0x064F, 0x0650, 0x0651, 0x0652, 0x0670, 0x0711, 0x0C55, 0x0C56, 0x0E38, 0x0E48, - 0x0EB8, 0x0EC8, 0x0F71, 0x0F72, 0x0F74, 0x0321, 0x1DCE, -} - -var mods []input -var modW = func() ColElems { - ws := ColElems{} - for _, r := range modSeq { - rune := norm.NFC.PropertiesString(string(r)) - ws = append(ws, w(0, int(rune.CCC()))) - mods = append(mods, input{string(r), [][]int{{0, int(rune.CCC())}}}) - } - return ws -}() - -var appendNextTests = []tableTest{ - { // test getWeights - []input{ - {"a", [][]int{{100}}}, - {"b", [][]int{{105}}}, - {"c", [][]int{{110}}}, - {"ß", [][]int{{120}}}, - }, - []check{ - {"a", 1, ColElems{w(100)}}, - {"b", 1, ColElems{w(105)}}, - {"c", 1, ColElems{w(110)}}, - {"d", 1, ColElems{w(0x50064)}}, - {"ab", 1, ColElems{w(100)}}, - {"bc", 1, ColElems{w(105)}}, - {"dd", 1, ColElems{w(0x50064)}}, - {"ß", 2, ColElems{w(120)}}, - }, - }, - { // test expansion - []input{ - {"u", [][]int{{100}}}, - {"U", [][]int{{100}, {0, 25}}}, - {"w", [][]int{{100}, {100}}}, - {"W", [][]int{{100}, {0, 25}, {100}, {0, 25}}}, - }, - []check{ - {"u", 1, ColElems{w(100)}}, - {"U", 1, ColElems{w(100), w(0, 25)}}, - {"w", 1, ColElems{w(100), w(100)}}, - {"W", 1, ColElems{w(100), w(0, 25), w(100), w(0, 25)}}, - }, - }, - { // test decompose - []input{ - {"D", [][]int{pt(104, 8)}}, - {"z", [][]int{pt(130, 8)}}, - {"\u030C", [][]int{{0, 40}}}, // Caron - {"\u01C5", [][]int{pt(104, 9), pt(130, 4), {0, 40, 0x1F}}}, // Dž = D+z+caron - }, - []check{ - {"\u01C5", 2, ColElems{w(pt(104, 9)...), w(pt(130, 4)...), w(0, 40, 0x1F)}}, - }, - }, - { // test basic contraction - []input{ - {"a", [][]int{{100}}}, - {"ab", [][]int{{101}}}, - {"aab", [][]int{{101}, {101}}}, - {"abc", [][]int{{102}}}, - {"b", [][]int{{200}}}, - {"c", [][]int{{300}}}, - {"d", [][]int{{400}}}, - }, - []check{ - {"a", 1, ColElems{w(100)}}, - {"aa", 1, ColElems{w(100)}}, - {"aac", 1, ColElems{w(100)}}, - {"d", 1, ColElems{w(400)}}, - {"ab", 2, ColElems{w(101)}}, - {"abb", 2, ColElems{w(101)}}, - {"aab", 3, ColElems{w(101), w(101)}}, - {"aaba", 3, ColElems{w(101), w(101)}}, - {"abc", 3, ColElems{w(102)}}, - {"abcd", 3, ColElems{w(102)}}, - }, - }, - { // test discontinuous contraction - append(mods, []input{ - // modifiers; secondary weight equals ccc - {"\u0316", [][]int{{0, 220}}}, - {"\u0317", [][]int{{0, 220}, {0, 220}}}, - {"\u302D", [][]int{{0, 222}}}, - {"\u302E", [][]int{{0, 225}}}, // used as starter - {"\u302F", [][]int{{0, 224}}}, // used as starter - {"\u18A9", [][]int{{0, 228}}}, - {"\u0300", [][]int{{0, 230}}}, - {"\u0301", [][]int{{0, 230}}}, - {"\u0315", [][]int{{0, 232}}}, - {"\u031A", [][]int{{0, 232}}}, - {"\u035C", [][]int{{0, 233}}}, - {"\u035F", [][]int{{0, 233}}}, - {"\u035D", [][]int{{0, 234}}}, - {"\u035E", [][]int{{0, 234}}}, - {"\u0345", [][]int{{0, 240}}}, - - // starters - {"a", [][]int{{100}}}, - {"b", [][]int{{200}}}, - {"c", [][]int{{300}}}, - {"\u03B1", [][]int{{900}}}, - {"\x01", [][]int{{0, 0, 0, 0}}}, - - // contractions - {"a\u0300", [][]int{{101}}}, - {"a\u0301", [][]int{{102}}}, - {"a\u035E", [][]int{{110}}}, - {"a\u035Eb\u035E", [][]int{{115}}}, - {"ac\u035Eaca\u035E", [][]int{{116}}}, - {"a\u035Db\u035D", [][]int{{117}}}, - {"a\u0301\u035Db", [][]int{{120}}}, - {"a\u0301\u035F", [][]int{{121}}}, - {"a\u0301\u035Fb", [][]int{{119}}}, - {"\u03B1\u0345", [][]int{{901}, {902}}}, - {"\u302E\u302F", [][]int{{0, 131}, {0, 131}}}, - {"\u302F\u18A9", [][]int{{0, 130}}}, - }...), - []check{ - {"a\x01\u0300", 1, ColElems{w(100)}}, - {"ab", 1, ColElems{w(100)}}, // closing segment - {"a\u0316\u0300b", 5, ColElems{w(101), w(0, 220)}}, // closing segment - {"a\u0316\u0300", 5, ColElems{w(101), w(0, 220)}}, // no closing segment - {"a\u0316\u0300\u035Cb", 5, ColElems{w(101), w(0, 220)}}, // completes before segment end - {"a\u0316\u0300\u035C", 5, ColElems{w(101), w(0, 220)}}, // completes before segment end - - {"a\u0316\u0301b", 5, ColElems{w(102), w(0, 220)}}, // closing segment - {"a\u0316\u0301", 5, ColElems{w(102), w(0, 220)}}, // no closing segment - {"a\u0316\u0301\u035Cb", 5, ColElems{w(102), w(0, 220)}}, // completes before segment end - {"a\u0316\u0301\u035C", 5, ColElems{w(102), w(0, 220)}}, // completes before segment end - - // match blocked by modifier with same ccc - {"a\u0301\u0315\u031A\u035Fb", 3, ColElems{w(102)}}, - - // multiple gaps - {"a\u0301\u035Db", 6, ColElems{w(120)}}, - {"a\u0301\u035F", 5, ColElems{w(121)}}, - {"a\u0301\u035Fb", 6, ColElems{w(119)}}, - {"a\u0316\u0301\u035F", 7, ColElems{w(121), w(0, 220)}}, - {"a\u0301\u0315\u035Fb", 7, ColElems{w(121), w(0, 232)}}, - {"a\u0316\u0301\u0315\u035Db", 5, ColElems{w(102), w(0, 220)}}, - {"a\u0316\u0301\u0315\u035F", 9, ColElems{w(121), w(0, 220), w(0, 232)}}, - {"a\u0316\u0301\u0315\u035Fb", 9, ColElems{w(121), w(0, 220), w(0, 232)}}, - {"a\u0316\u0301\u0315\u035F\u035D", 9, ColElems{w(121), w(0, 220), w(0, 232)}}, - {"a\u0316\u0301\u0315\u035F\u035Db", 9, ColElems{w(121), w(0, 220), w(0, 232)}}, - - // handling of segment overflow - { // just fits within segment - "a" + string(modSeq[:30]) + "\u0301", - 3 + len(string(modSeq[:30])), - append(ColElems{w(102)}, modW[:30]...), - }, - {"a" + string(modSeq[:31]) + "\u0301", 1, ColElems{w(100)}}, // overflow - {"a" + string(modSeq) + "\u0301", 1, ColElems{w(100)}}, - { // just fits within segment with two interstitial runes - "a" + string(modSeq[:28]) + "\u0301\u0315\u035F", - 7 + len(string(modSeq[:28])), - append(append(ColElems{w(121)}, modW[:28]...), w(0, 232)), - }, - { // second half does not fit within segment - "a" + string(modSeq[:29]) + "\u0301\u0315\u035F", - 3 + len(string(modSeq[:29])), - append(ColElems{w(102)}, modW[:29]...), - }, - - // discontinuity can only occur in last normalization segment - {"a\u035Eb\u035E", 6, ColElems{w(115)}}, - {"a\u0316\u035Eb\u035E", 5, ColElems{w(110), w(0, 220)}}, - {"a\u035Db\u035D", 6, ColElems{w(117)}}, - {"a\u0316\u035Db\u035D", 1, ColElems{w(100)}}, - {"a\u035Eb\u0316\u035E", 8, ColElems{w(115), w(0, 220)}}, - {"a\u035Db\u0316\u035D", 8, ColElems{w(117), w(0, 220)}}, - {"ac\u035Eaca\u035E", 9, ColElems{w(116)}}, - {"a\u0316c\u035Eaca\u035E", 1, ColElems{w(100)}}, - {"ac\u035Eac\u0316a\u035E", 1, ColElems{w(100)}}, - - // expanding contraction - {"\u03B1\u0345", 4, ColElems{w(901), w(902)}}, - - // Theoretical possibilities - // contraction within a gap - {"a\u302F\u18A9\u0301", 9, ColElems{w(102), w(0, 130)}}, - // expansion within a gap - {"a\u0317\u0301", 5, ColElems{w(102), w(0, 220), w(0, 220)}}, - // repeating CCC blocks last modifier - {"a\u302E\u302F\u0301", 1, ColElems{w(100)}}, - // The trailing combining characters (with lower CCC) should block the first one. - // TODO: make the following pass. - // {"a\u035E\u0316\u0316", 1, ColElems{w(100)}}, - {"a\u035F\u035Eb", 5, ColElems{w(110), w(0, 233)}}, - // Last combiner should match after normalization. - // TODO: make the following pass. - // {"a\u035D\u0301", 3, ColElems{w(102), w(0, 234)}}, - // The first combiner is blocking the second one as they have the same CCC. - {"a\u035D\u035Eb", 1, ColElems{w(100)}}, - }, - }, -} - -func TestAppendNext(t *testing.T) { - for i, tt := range appendNextTests { - c, err := makeTable(tt.in) - if err != nil { - t.Errorf("%d: error creating table: %v", i, err) - continue - } - for j, chk := range tt.chk { - ws, n := c.t.AppendNext(nil, []byte(chk.in)) - if n != chk.n { - t.Errorf("%d:%d: bytes consumed was %d; want %d", i, j, n, chk.n) - } - out := convertFromWeights(chk.out) - if len(ws) != len(out) { - t.Errorf("%d:%d: len(ws) was %d; want %d (%X vs %X)\n%X", i, j, len(ws), len(out), ws, out, chk.in) - continue - } - for k, w := range ws { - w, _ = colltab.MakeElem(w.Primary(), w.Secondary(), int(w.Tertiary()), 0) - if w != out[k] { - t.Errorf("%d:%d: Weights %d was %X; want %X", i, j, k, w, out[k]) - } - } - } - } -} diff --git a/vendor/golang.org/x/text/doc.go b/vendor/golang.org/x/text/doc.go deleted file mode 100644 index a48e2843..00000000 --- a/vendor/golang.org/x/text/doc.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:generate go run gen.go - -// text is a repository of text-related packages related to internationalization -// (i18n) and localization (l10n), such as character encodings, text -// transformations, and locale-specific text handling. -package text - -// TODO: more documentation on general concepts, such as Transformers, use -// of normalization, etc. diff --git a/vendor/golang.org/x/text/gen.go b/vendor/golang.org/x/text/gen.go deleted file mode 100644 index 757fefb7..00000000 --- a/vendor/golang.org/x/text/gen.go +++ /dev/null @@ -1,319 +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 - -// gen runs go generate on Unicode- and CLDR-related package in the text -// repositories, taking into account dependencies and versions. -package main - -import ( - "bytes" - "flag" - "fmt" - "go/build" - "go/format" - "io/ioutil" - "os" - "os/exec" - "path" - "path/filepath" - "regexp" - "runtime" - "strings" - "sync" - "unicode" - - "golang.org/x/text/collate" - "golang.org/x/text/internal/gen" - "golang.org/x/text/language" -) - -var ( - verbose = flag.Bool("v", false, "verbose output") - force = flag.Bool("force", false, "ignore failing dependencies") - doCore = flag.Bool("core", false, "force an update to core") - excludeList = flag.String("exclude", "", - "comma-separated list of packages to exclude") - - // The user can specify a selection of packages to build on the command line. - args []string -) - -func exclude(pkg string) bool { - if len(args) > 0 { - return !contains(args, pkg) - } - return contains(strings.Split(*excludeList, ","), pkg) -} - -// TODO: -// - Better version handling. -// - Generate tables for the core unicode package? -// - Add generation for encodings. This requires some retooling here and there. -// - Running repo-wide "long" tests. - -var vprintf = fmt.Printf - -func main() { - gen.Init() - args = flag.Args() - if !*verbose { - // Set vprintf to a no-op. - vprintf = func(string, ...interface{}) (int, error) { return 0, nil } - } - - // TODO: create temporary cache directory to load files and create and set - // a "cache" option if the user did not specify the UNICODE_DIR environment - // variable. This will prevent duplicate downloads and also will enable long - // tests, which really need to be run after each generated package. - - updateCore := *doCore - if gen.UnicodeVersion() != unicode.Version { - fmt.Printf("Requested Unicode version %s; core unicode version is %s.\n", - gen.UnicodeVersion(), - unicode.Version) - c := collate.New(language.Und, collate.Numeric) - if c.CompareString(gen.UnicodeVersion(), unicode.Version) < 0 && !*force { - os.Exit(2) - } - updateCore = true - goroot := os.Getenv("GOROOT") - appendToFile( - filepath.Join(goroot, "api", "except.txt"), - fmt.Sprintf("pkg unicode, const Version = %q\n", unicode.Version), - ) - const lines = `pkg unicode, const Version = %q -// TODO: add a new line of the following form for each new script and property. -pkg unicode, var *RangeTable -` - appendToFile( - filepath.Join(goroot, "api", "next.txt"), - fmt.Sprintf(lines, gen.UnicodeVersion()), - ) - } - - var unicode = &dependency{} - if updateCore { - fmt.Printf("Updating core to version %s...\n", gen.UnicodeVersion()) - unicode = generate("unicode") - - // Test some users of the unicode packages, especially the ones that - // keep a mirrored table. These may need to be corrected by hand. - generate("regexp", unicode) - generate("strconv", unicode) // mimics Unicode table - generate("strings", unicode) - generate("testing", unicode) // mimics Unicode table - } - - var ( - cldr = generate("./unicode/cldr", unicode) - language = generate("./language", cldr) - internal = generate("./internal", unicode, language) - norm = generate("./unicode/norm", unicode) - rangetable = generate("./unicode/rangetable", unicode) - cases = generate("./cases", unicode, norm, language, rangetable) - width = generate("./width", unicode) - bidi = generate("./unicode/bidi", unicode, norm, rangetable) - mib = generate("./encoding/internal/identifier", unicode) - number = generate("./internal/number", unicode, cldr, language, internal) - _ = generate("./encoding/htmlindex", unicode, language, mib) - _ = generate("./encoding/ianaindex", unicode, language, mib) - _ = generate("./secure/precis", unicode, norm, rangetable, cases, width, bidi) - _ = generate("./internal/cldrtree", language) - _ = generate("./currency", unicode, cldr, language, internal, number) - _ = generate("./feature/plural", unicode, cldr, language, internal, number) - _ = generate("./internal/export/idna", unicode, bidi, norm) - _ = generate("./language/display", unicode, cldr, language, internal, number) - _ = generate("./collate", unicode, norm, cldr, language, rangetable) - _ = generate("./search", unicode, norm, cldr, language, rangetable) - ) - all.Wait() - - // Copy exported packages to the destination golang.org repo. - copyExported("golang.org/x/net/idna") - - if updateCore { - copyVendored() - } - - if hasErrors { - fmt.Println("FAIL") - os.Exit(1) - } - vprintf("SUCCESS\n") -} - -func appendToFile(file, text string) { - fmt.Println("Augmenting", file) - w, err := os.OpenFile(file, os.O_APPEND|os.O_WRONLY, 0600) - if err != nil { - fmt.Println("Failed to open file:", err) - os.Exit(1) - } - defer w.Close() - if _, err := w.WriteString(text); err != nil { - fmt.Println("Failed to write to file:", err) - os.Exit(1) - } -} - -var ( - all sync.WaitGroup - hasErrors bool -) - -type dependency struct { - sync.WaitGroup - hasErrors bool -} - -func generate(pkg string, deps ...*dependency) *dependency { - var wg dependency - if exclude(pkg) { - return &wg - } - wg.Add(1) - all.Add(1) - go func() { - defer wg.Done() - defer all.Done() - // Wait for dependencies to finish. - for _, d := range deps { - d.Wait() - if d.hasErrors && !*force { - fmt.Printf("--- ABORT: %s\n", pkg) - wg.hasErrors = true - return - } - } - vprintf("=== GENERATE %s\n", pkg) - args := []string{"generate"} - if *verbose { - args = append(args, "-v") - } - args = append(args, pkg) - cmd := exec.Command(filepath.Join(runtime.GOROOT(), "bin", "go"), args...) - w := &bytes.Buffer{} - cmd.Stderr = w - cmd.Stdout = w - if err := cmd.Run(); err != nil { - fmt.Printf("--- FAIL: %s:\n\t%v\n\tError: %v\n", pkg, indent(w), err) - hasErrors = true - wg.hasErrors = true - return - } - - vprintf("=== TEST %s\n", pkg) - args[0] = "test" - cmd = exec.Command(filepath.Join(runtime.GOROOT(), "bin", "go"), args...) - wt := &bytes.Buffer{} - cmd.Stderr = wt - cmd.Stdout = wt - if err := cmd.Run(); err != nil { - fmt.Printf("--- FAIL: %s:\n\t%v\n\tError: %v\n", pkg, indent(wt), err) - hasErrors = true - wg.hasErrors = true - return - } - vprintf("--- SUCCESS: %s\n\t%v\n", pkg, indent(w)) - fmt.Print(wt.String()) - }() - return &wg -} - -// copyExported copies a package in x/text/internal/export to the -// destination repository. -func copyExported(p string) { - copyPackage( - filepath.Join("internal", "export", path.Base(p)), - filepath.Join("..", filepath.FromSlash(p[len("golang.org/x"):])), - "golang.org/x/text/internal/export/"+path.Base(p), - p) -} - -// copyVendored copies packages used by Go core into the vendored directory. -func copyVendored() { - root := filepath.Join(build.Default.GOROOT, filepath.FromSlash("src/vendor/golang_org/x")) - - err := filepath.Walk(root, func(dir string, info os.FileInfo, err error) error { - if err != nil || !info.IsDir() || root == dir { - return err - } - src := dir[len(root)+1:] - const slash = string(filepath.Separator) - if c := strings.Split(src, slash); c[0] == "text" { - // Copy a text repo package from its normal location. - src = strings.Join(c[1:], slash) - } else { - // Copy the vendored package if it exists in the export directory. - src = filepath.Join("internal", "export", filepath.Base(src)) - } - copyPackage(src, dir, "golang.org", "golang_org") - return nil - }) - if err != nil { - fmt.Printf("Seeding directory %s has failed %v:", root, err) - os.Exit(1) - } -} - -// goGenRE is used to remove go:generate lines. -var goGenRE = regexp.MustCompile("//go:generate[^\n]*\n") - -// copyPackage copies relevant files from a directory in x/text to the -// destination package directory. The destination package is assumed to have -// the same name. For each copied file go:generate lines are removed and -// and package comments are rewritten to the new path. -func copyPackage(dirSrc, dirDst, search, replace string) { - err := filepath.Walk(dirSrc, func(file string, info os.FileInfo, err error) error { - base := filepath.Base(file) - if err != nil || info.IsDir() || - !strings.HasSuffix(base, ".go") || - strings.HasSuffix(base, "_test.go") || - // Don't process subdirectories. - filepath.Dir(file) != dirSrc { - return nil - } - b, err := ioutil.ReadFile(file) - if err != nil || bytes.Contains(b, []byte("\n// +build ignore")) { - return err - } - // Fix paths. - b = bytes.Replace(b, []byte(search), []byte(replace), -1) - // Remove go:generate lines. - b = goGenRE.ReplaceAllLiteral(b, nil) - comment := "// Code generated by running \"go generate\" in golang.org/x/text. DO NOT EDIT.\n\n" - if *doCore { - comment = "// Code generated by running \"go run gen.go -core\" in golang.org/x/text. DO NOT EDIT.\n\n" - } - if !bytes.HasPrefix(b, []byte(comment)) { - b = append([]byte(comment), b...) - } - if b, err = format.Source(b); err != nil { - fmt.Println("Failed to format file:", err) - os.Exit(1) - } - file = filepath.Join(dirDst, base) - vprintf("=== COPY %s\n", file) - return ioutil.WriteFile(file, b, 0666) - }) - if err != nil { - fmt.Println("Copying exported files failed:", err) - os.Exit(1) - } -} - -func contains(a []string, s string) bool { - for _, e := range a { - if s == e { - return true - } - } - return false -} - -func indent(b *bytes.Buffer) string { - return strings.Replace(strings.TrimSpace(b.String()), "\n", "\n\t", -1) -} diff --git a/vendor/golang.org/x/text/internal/colltab/collate_test.go b/vendor/golang.org/x/text/internal/colltab/collate_test.go deleted file mode 100644 index 580c85c2..00000000 --- a/vendor/golang.org/x/text/internal/colltab/collate_test.go +++ /dev/null @@ -1,121 +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 colltab_test - -// This file contains tests which need to import package collate, which causes -// an import cycle when done within package colltab itself. - -import ( - "bytes" - "testing" - "unicode" - - "golang.org/x/text/collate" - "golang.org/x/text/language" - "golang.org/x/text/unicode/rangetable" -) - -// assigned is used to only test runes that are inside the scope of the Unicode -// version used to generation the collation table. -var assigned = rangetable.Assigned(collate.UnicodeVersion) - -func TestNonDigits(t *testing.T) { - c := collate.New(language.English, collate.Loose, collate.Numeric) - - // Verify that all non-digit numbers sort outside of the number range. - for r, hi := rune(unicode.N.R16[0].Lo), rune(unicode.N.R32[0].Hi); r <= hi; r++ { - if unicode.In(r, unicode.Nd) || !unicode.In(r, assigned) { - continue - } - if a := string(r); c.CompareString(a, "0") != -1 && c.CompareString(a, "999999") != 1 { - t.Errorf("%+q non-digit number is collated as digit", a) - } - } -} - -func TestNumericCompare(t *testing.T) { - c := collate.New(language.English, collate.Loose, collate.Numeric) - - // Iterate over all digits. - for _, r16 := range unicode.Nd.R16 { - testDigitCompare(t, c, rune(r16.Lo), rune(r16.Hi)) - } - for _, r32 := range unicode.Nd.R32 { - testDigitCompare(t, c, rune(r32.Lo), rune(r32.Hi)) - } -} - -func testDigitCompare(t *testing.T, c *collate.Collator, zero, nine rune) { - if !unicode.In(zero, assigned) { - return - } - n := int(nine - zero + 1) - if n%10 != 0 { - t.Fatalf("len([%+q, %+q]) = %d; want a multiple of 10", zero, nine, n) - } - for _, tt := range []struct { - prefix string - b [11]string - }{ - { - prefix: "", - b: [11]string{ - "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - }, - }, - { - prefix: "1", - b: [11]string{ - "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", - }, - }, - { - prefix: "0", - b: [11]string{ - "00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", - }, - }, - { - prefix: "00", - b: [11]string{ - "000", "001", "002", "003", "004", "005", "006", "007", "008", "009", "010", - }, - }, - { - prefix: "9", - b: [11]string{ - "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "100", - }, - }, - } { - for k := 0; k <= n; k++ { - i := k % 10 - a := tt.prefix + string(zero+rune(i)) - for j, b := range tt.b { - want := 0 - switch { - case i < j: - want = -1 - case i > j: - want = 1 - } - got := c.CompareString(a, b) - if got != want { - t.Errorf("Compare(%+q, %+q) = %d; want %d", a, b, got, want) - return - } - } - } - } -} - -func BenchmarkNumericWeighter(b *testing.B) { - c := collate.New(language.English, collate.Numeric) - input := bytes.Repeat([]byte("Testing, testing 123..."), 100) - b.SetBytes(int64(2 * len(input))) - for i := 0; i < b.N; i++ { - c.Compare(input, input) - } -} diff --git a/vendor/golang.org/x/text/internal/colltab/collelem_test.go b/vendor/golang.org/x/text/internal/colltab/collelem_test.go deleted file mode 100644 index f131ecc3..00000000 --- a/vendor/golang.org/x/text/internal/colltab/collelem_test.go +++ /dev/null @@ -1,183 +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 colltab - -import ( - "fmt" - "testing" - "unicode" -) - -func (e Elem) String() string { - q := "" - if v := e.Quaternary(); v == MaxQuaternary { - q = "max" - } else { - q = fmt.Sprint(v) - } - return fmt.Sprintf("[%d, %d, %d, %s]", - e.Primary(), - e.Secondary(), - e.Tertiary(), - q) -} - -type ceTest struct { - f func(inout []int) (Elem, ceType) - arg []int -} - -func makeCE(weights []int) Elem { - ce, _ := MakeElem(weights[0], weights[1], weights[2], uint8(weights[3])) - return ce -} - -var defaultValues = []int{0, defaultSecondary, defaultTertiary, 0} - -func e(w ...int) Elem { - return makeCE(append(w, defaultValues[len(w):]...)) -} - -func makeContractIndex(index, n, offset int) Elem { - const ( - contractID = 0xC0000000 - maxNBits = 4 - maxTrieIndexBits = 12 - maxContractOffsetBits = 13 - ) - ce := Elem(contractID) - ce += Elem(offset << (maxNBits + maxTrieIndexBits)) - ce += Elem(index << maxNBits) - ce += Elem(n) - return ce -} - -func makeExpandIndex(index int) Elem { - const expandID = 0xE0000000 - return expandID + Elem(index) -} - -func makeDecompose(t1, t2 int) Elem { - const decompID = 0xF0000000 - return Elem(t2<<8+t1) + decompID -} - -func normalCE(inout []int) (ce Elem, t ceType) { - ce = makeCE(inout) - inout[0] = ce.Primary() - inout[1] = ce.Secondary() - inout[2] = int(ce.Tertiary()) - inout[3] = int(ce.CCC()) - return ce, ceNormal -} - -func expandCE(inout []int) (ce Elem, t ceType) { - ce = makeExpandIndex(inout[0]) - inout[0] = splitExpandIndex(ce) - return ce, ceExpansionIndex -} - -func contractCE(inout []int) (ce Elem, t ceType) { - ce = makeContractIndex(inout[0], inout[1], inout[2]) - i, n, o := splitContractIndex(ce) - inout[0], inout[1], inout[2] = i, n, o - return ce, ceContractionIndex -} - -func decompCE(inout []int) (ce Elem, t ceType) { - ce = makeDecompose(inout[0], inout[1]) - t1, t2 := splitDecompose(ce) - inout[0], inout[1] = int(t1), int(t2) - return ce, ceDecompose -} - -var ceTests = []ceTest{ - {normalCE, []int{0, 0, 0, 0}}, - {normalCE, []int{0, 30, 3, 0}}, - {normalCE, []int{0, 30, 3, 0xFF}}, - {normalCE, []int{100, defaultSecondary, defaultTertiary, 0}}, - {normalCE, []int{100, defaultSecondary, defaultTertiary, 0xFF}}, - {normalCE, []int{100, defaultSecondary, 3, 0}}, - {normalCE, []int{0x123, defaultSecondary, 8, 0xFF}}, - - {contractCE, []int{0, 0, 0}}, - {contractCE, []int{1, 1, 1}}, - {contractCE, []int{1, (1 << maxNBits) - 1, 1}}, - {contractCE, []int{(1 << maxTrieIndexBits) - 1, 1, 1}}, - {contractCE, []int{1, 1, (1 << maxContractOffsetBits) - 1}}, - - {expandCE, []int{0}}, - {expandCE, []int{5}}, - {expandCE, []int{(1 << maxExpandIndexBits) - 1}}, - - {decompCE, []int{0, 0}}, - {decompCE, []int{1, 1}}, - {decompCE, []int{0x1F, 0x1F}}, -} - -func TestColElem(t *testing.T) { - for i, tt := range ceTests { - inout := make([]int, len(tt.arg)) - copy(inout, tt.arg) - ce, typ := tt.f(inout) - if ce.ctype() != typ { - t.Errorf("%d: type is %d; want %d (ColElem: %X)", i, ce.ctype(), typ, ce) - } - for j, a := range tt.arg { - if inout[j] != a { - t.Errorf("%d: argument %d is %X; want %X (ColElem: %X)", i, j, inout[j], a, ce) - } - } - } -} - -type implicitTest struct { - r rune - p int -} - -var implicitTests = []implicitTest{ - {0x33FF, 0x533FF}, - {0x3400, 0x23400}, - {0x4DC0, 0x54DC0}, - {0x4DFF, 0x54DFF}, - {0x4E00, 0x14E00}, - {0x9FCB, 0x19FCB}, - {0xA000, 0x5A000}, - {0xF8FF, 0x5F8FF}, - {0xF900, 0x1F900}, - {0xFA23, 0x1FA23}, - {0xFAD9, 0x1FAD9}, - {0xFB00, 0x5FB00}, - {0x20000, 0x40000}, - {0x2B81C, 0x4B81C}, - {unicode.MaxRune, 0x15FFFF}, // maximum primary value -} - -func TestImplicit(t *testing.T) { - for _, tt := range implicitTests { - if p := implicitPrimary(tt.r); p != tt.p { - t.Errorf("%U: was %X; want %X", tt.r, p, tt.p) - } - } -} - -func TestUpdateTertiary(t *testing.T) { - tests := []struct { - in, out Elem - t uint8 - }{ - {0x4000FE20, 0x0000FE8A, 0x0A}, - {0x4000FE21, 0x0000FEAA, 0x0A}, - {0x0000FE8B, 0x0000FE83, 0x03}, - {0x82FF0188, 0x9BFF0188, 0x1B}, - {0xAFF0CC02, 0xAFF0CC1B, 0x1B}, - } - for i, tt := range tests { - if out := tt.in.updateTertiary(tt.t); out != tt.out { - t.Errorf("%d: was %X; want %X", i, out, tt.out) - } - } -} diff --git a/vendor/golang.org/x/text/internal/colltab/colltab_test.go b/vendor/golang.org/x/text/internal/colltab/colltab_test.go deleted file mode 100644 index c403ac34..00000000 --- a/vendor/golang.org/x/text/internal/colltab/colltab_test.go +++ /dev/null @@ -1,64 +0,0 @@ -package colltab - -import ( - "testing" - - "golang.org/x/text/language" -) - -func TestMatchLang(t *testing.T) { - tags := []language.Tag{ - 0: language.Und, - 1: language.MustParse("bs"), - 2: language.German, - 3: language.English, - 4: language.AmericanEnglish, - 5: language.MustParse("en-US-u-va-posix"), - 6: language.Portuguese, - 7: language.Serbian, - 8: language.MustParse("sr-Latn"), - 9: language.Chinese, - 10: language.MustParse("zh-u-co-stroke"), - 11: language.MustParse("zh-Hant-u-co-pinyin"), - 12: language.TraditionalChinese, - } - for i, tc := range []struct { - x int - t language.Tag - }{ - {0, language.Und}, - {0, language.Persian}, // Default to first element when no match. - {3, language.English}, - {4, language.AmericanEnglish}, - {5, language.MustParse("en-US-u-va-posix")}, // Ext. variant match. - {4, language.MustParse("en-US-u-va-noposix")}, // Ext. variant mismatch. - {3, language.MustParse("en-UK-u-va-noposix")}, // Ext. variant mismatch. - {7, language.Serbian}, - {0, language.Croatian}, // Don't match to close language! - {0, language.MustParse("gsw")}, // Don't match to close language! - {1, language.MustParse("bs-Cyrl")}, // Odd, but correct. - {1, language.MustParse("bs-Latn")}, // Estimated script drops. - {8, language.MustParse("sr-Latn")}, - {9, language.Chinese}, - {9, language.SimplifiedChinese}, - {12, language.TraditionalChinese}, - {11, language.MustParse("zh-Hant-u-co-pinyin")}, - // TODO: should this be 12? Either inherited value (10) or default is - // fine in this case, though. Other locales are not affected. - {10, language.MustParse("zh-Hant-u-co-stroke")}, - // There is no "phonebk" sorting order for zh-Hant, so use default. - {12, language.MustParse("zh-Hant-u-co-phonebk")}, - {10, language.MustParse("zh-u-co-stroke")}, - {12, language.MustParse("und-TW")}, // Infer script and language. - {12, language.MustParse("und-HK")}, // Infer script and language. - {6, language.MustParse("und-BR")}, // Infer script and language. - {6, language.MustParse("und-PT")}, // Infer script and language. - {2, language.MustParse("und-Latn-DE")}, // Infer language. - {0, language.MustParse("und-Jpan-BR")}, // Infers "ja", so no match. - {0, language.MustParse("zu")}, // No match past index. - } { - if x := MatchLang(tc.t, tags); x != tc.x { - t.Errorf("%d: MatchLang(%q, tags) = %d; want %d", i, tc.t, x, tc.x) - } - } -} diff --git a/vendor/golang.org/x/text/internal/colltab/contract_test.go b/vendor/golang.org/x/text/internal/colltab/contract_test.go deleted file mode 100644 index ce2871dd..00000000 --- a/vendor/golang.org/x/text/internal/colltab/contract_test.go +++ /dev/null @@ -1,131 +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 colltab - -import ( - "testing" -) - -type lookupStrings struct { - str string - offset int - n int // bytes consumed from input -} - -type LookupTest struct { - lookup []lookupStrings - n int - tries ContractTrieSet -} - -var lookupTests = []LookupTest{{ - []lookupStrings{ - {"abc", 1, 3}, - {"a", 0, 0}, - {"b", 0, 0}, - {"c", 0, 0}, - {"d", 0, 0}, - }, - 1, - ContractTrieSet{ - {'a', 0, 1, 0xFF}, - {'b', 0, 1, 0xFF}, - {'c', 'c', 0, 1}, - }, -}, { - []lookupStrings{ - {"abc", 1, 3}, - {"abd", 2, 3}, - {"abe", 3, 3}, - {"a", 0, 0}, - {"ab", 0, 0}, - {"d", 0, 0}, - {"f", 0, 0}, - }, - 1, - ContractTrieSet{ - {'a', 0, 1, 0xFF}, - {'b', 0, 1, 0xFF}, - {'c', 'e', 0, 1}, - }, -}, { - []lookupStrings{ - {"abc", 1, 3}, - {"ab", 2, 2}, - {"a", 3, 1}, - {"abcd", 1, 3}, - {"abe", 2, 2}, - }, - 1, - ContractTrieSet{ - {'a', 0, 1, 3}, - {'b', 0, 1, 2}, - {'c', 'c', 0, 1}, - }, -}, { - []lookupStrings{ - {"abc", 1, 3}, - {"abd", 2, 3}, - {"ab", 3, 2}, - {"ac", 4, 2}, - {"a", 5, 1}, - {"b", 6, 1}, - {"ba", 6, 1}, - }, - 2, - ContractTrieSet{ - {'b', 'b', 0, 6}, - {'a', 0, 2, 5}, - {'c', 'c', 0, 4}, - {'b', 0, 1, 3}, - {'c', 'd', 0, 1}, - }, -}, { - []lookupStrings{ - {"bcde", 2, 4}, - {"bc", 7, 2}, - {"ab", 6, 2}, - {"bcd", 5, 3}, - {"abcd", 1, 4}, - {"abc", 4, 3}, - {"bcdf", 3, 4}, - }, - 2, - ContractTrieSet{ - {'b', 3, 1, 0xFF}, - {'a', 0, 1, 0xFF}, - {'b', 0, 1, 6}, - {'c', 0, 1, 4}, - {'d', 'd', 0, 1}, - {'c', 0, 1, 7}, - {'d', 0, 1, 5}, - {'e', 'f', 0, 2}, - }, -}} - -func lookup(c *ContractTrieSet, nnode int, s []uint8) (i, n int) { - scan := c.scanner(0, nnode, s) - scan.scan(0) - return scan.result() -} - -func TestLookupContraction(t *testing.T) { - for i, tt := range lookupTests { - cts := ContractTrieSet(tt.tries) - for j, lu := range tt.lookup { - str := lu.str - for _, s := range []string{str, str + "X"} { - const msg = `%d:%d: %s of "%s" %v; want %v` - offset, n := lookup(&cts, tt.n, []byte(s)) - if offset != lu.offset { - t.Errorf(msg, i, j, "offset", s, offset, lu.offset) - } - if n != lu.n { - t.Errorf(msg, i, j, "bytes consumed", s, n, len(str)) - } - } - } - } -} diff --git a/vendor/golang.org/x/text/internal/colltab/iter_test.go b/vendor/golang.org/x/text/internal/colltab/iter_test.go deleted file mode 100644 index 5783534c..00000000 --- a/vendor/golang.org/x/text/internal/colltab/iter_test.go +++ /dev/null @@ -1,63 +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 colltab - -import ( - "testing" -) - -func TestDoNorm(t *testing.T) { - const div = -1 // The insertion point of the next block. - tests := []struct { - in, out []int - }{{ - in: []int{4, div, 3}, - out: []int{3, 4}, - }, { - in: []int{4, div, 3, 3, 3}, - out: []int{3, 3, 3, 4}, - }, { - in: []int{0, 4, div, 3}, - out: []int{0, 3, 4}, - }, { - in: []int{0, 0, 4, 5, div, 3, 3}, - out: []int{0, 0, 3, 3, 4, 5}, - }, { - in: []int{0, 0, 1, 4, 5, div, 3, 3}, - out: []int{0, 0, 1, 3, 3, 4, 5}, - }, { - in: []int{0, 0, 1, 4, 5, div, 4, 4}, - out: []int{0, 0, 1, 4, 4, 4, 5}, - }, - } - for j, tt := range tests { - i := Iter{} - var w, p int - for k, cc := range tt.in { - - if cc == div { - w = 100 - p = k - continue - } - i.Elems = append(i.Elems, makeCE([]int{w, defaultSecondary, 2, cc})) - } - i.doNorm(p, i.Elems[p].CCC()) - if len(i.Elems) != len(tt.out) { - t.Errorf("%d: length was %d; want %d", j, len(i.Elems), len(tt.out)) - } - prevCCC := uint8(0) - for k, ce := range i.Elems { - if int(ce.CCC()) != tt.out[k] { - t.Errorf("%d:%d: unexpected CCC. Was %d; want %d", j, k, ce.CCC(), tt.out[k]) - } - if k > 0 && ce.CCC() == prevCCC && i.Elems[k-1].Primary() > ce.Primary() { - t.Errorf("%d:%d: normalization crossed across CCC boundary.", j, k) - } - } - } - - // Combining rune overflow is tested in search/pattern_test.go. -} diff --git a/vendor/golang.org/x/text/internal/colltab/numeric_test.go b/vendor/golang.org/x/text/internal/colltab/numeric_test.go deleted file mode 100644 index e9406ae3..00000000 --- a/vendor/golang.org/x/text/internal/colltab/numeric_test.go +++ /dev/null @@ -1,159 +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 colltab - -import ( - "reflect" - "strings" - "testing" - - "golang.org/x/text/internal/testtext" -) - -const ( - digSec = defaultSecondary - digTert = defaultTertiary -) - -var tPlus3 = e(0, 50, digTert+3) - -// numWeighter is a testWeighter used for testing numericWeighter. -var numWeighter = testWeighter{ - "0": p(100), - "0": []Elem{e(100, digSec, digTert+1)}, // U+FF10 FULLWIDTH DIGIT ZERO - "₀": []Elem{e(100, digSec, digTert+5)}, // U+2080 SUBSCRIPT ZERO - - "1": p(101), - // Allow non-primary collation elements to be inserted. - "١": append(p(101), tPlus3), // U+0661 ARABIC-INDIC DIGIT ONE - // Allow varying tertiary weight if the number is Nd. - "1": []Elem{e(101, digSec, digTert+1)}, // U+FF11 FULLWIDTH DIGIT ONE - "2": p(102), - // Allow non-primary collation elements to be inserted. - "٢": append(p(102), tPlus3), // U+0662 ARABIC-INDIC DIGIT TWO - // Varying tertiary weights should be ignored. - "2": []Elem{e(102, digSec, digTert+3)}, // U+FF12 FULLWIDTH DIGIT TWO - "3": p(103), - "4": p(104), - "5": p(105), - "6": p(106), - "7": p(107), - // Weights must be strictly monotonically increasing, but do not need to be - // consecutive. - "8": p(118), - "9": p(119), - // Allow non-primary collation elements to be inserted. - "٩": append(p(119), tPlus3), // U+0669 ARABIC-INDIC DIGIT NINE - // Varying tertiary weights should be ignored. - "9": []Elem{e(119, digSec, digTert+1)}, // U+FF19 FULLWIDTH DIGIT NINE - "₉": []Elem{e(119, digSec, digTert+5)}, // U+2089 SUBSCRIPT NINE - - "a": p(5), - "b": p(6), - "c": p(8, 2), - - "klm": p(99), - - "nop": p(121), - - "x": p(200), - "y": p(201), -} - -func p(w ...int) (elems []Elem) { - for _, x := range w { - e, _ := MakeElem(x, digSec, digTert, 0) - elems = append(elems, e) - } - return elems -} - -func TestNumericAppendNext(t *testing.T) { - for _, tt := range []struct { - in string - w []Elem - }{ - {"a", p(5)}, - {"klm", p(99)}, - {"aa", p(5, 5)}, - {"1", p(120, 1, 101)}, - {"0", p(120, 0)}, - {"01", p(120, 1, 101)}, - {"0001", p(120, 1, 101)}, - {"10", p(120, 2, 101, 100)}, - {"99", p(120, 2, 119, 119)}, - {"9999", p(120, 4, 119, 119, 119, 119)}, - {"1a", p(120, 1, 101, 5)}, - {"0b", p(120, 0, 6)}, - {"01c", p(120, 1, 101, 8, 2)}, - {"10x", p(120, 2, 101, 100, 200)}, - {"99y", p(120, 2, 119, 119, 201)}, - {"9999nop", p(120, 4, 119, 119, 119, 119, 121)}, - - // Allow follow-up collation elements if they have a zero non-primary. - {"١٢٩", []Elem{e(120), e(3), e(101), tPlus3, e(102), tPlus3, e(119), tPlus3}}, - { - "129", - []Elem{ - e(120), e(3), - e(101, digSec, digTert+1), - e(102, digSec, digTert+3), - e(119, digSec, digTert+1), - }, - }, - - // Ensure AppendNext* adds to the given buffer. - {"a10", p(5, 120, 2, 101, 100)}, - } { - nw := NewNumericWeighter(numWeighter) - - b := []byte(tt.in) - got := []Elem(nil) - for n, sz := 0, 0; n < len(b); { - got, sz = nw.AppendNext(got, b[n:]) - n += sz - } - if !reflect.DeepEqual(got, tt.w) { - t.Errorf("AppendNext(%q) =\n%v; want\n%v", tt.in, got, tt.w) - } - - got = nil - for n, sz := 0, 0; n < len(tt.in); { - got, sz = nw.AppendNextString(got, tt.in[n:]) - n += sz - } - if !reflect.DeepEqual(got, tt.w) { - t.Errorf("AppendNextString(%q) =\n%v; want\n%v", tt.in, got, tt.w) - } - } -} - -func TestNumericOverflow(t *testing.T) { - manyDigits := strings.Repeat("9", maxDigits+1) + "a" - - nw := NewNumericWeighter(numWeighter) - - got, n := nw.AppendNextString(nil, manyDigits) - - if n != maxDigits { - t.Errorf("n: got %d; want %d", n, maxDigits) - } - - if got[1].Primary() != maxDigits { - t.Errorf("primary(e[1]): got %d; want %d", n, maxDigits) - } -} - -func TestNumericWeighterAlloc(t *testing.T) { - buf := make([]Elem, 100) - w := NewNumericWeighter(numWeighter) - s := "1234567890a" - - nNormal := testtext.AllocsPerRun(3, func() { numWeighter.AppendNextString(buf, s) }) - nNumeric := testtext.AllocsPerRun(3, func() { w.AppendNextString(buf, s) }) - if n := nNumeric - nNormal; n > 0 { - t.Errorf("got %f; want 0", n) - } -} diff --git a/vendor/golang.org/x/text/internal/colltab/trie_test.go b/vendor/golang.org/x/text/internal/colltab/trie_test.go deleted file mode 100644 index b056a811..00000000 --- a/vendor/golang.org/x/text/internal/colltab/trie_test.go +++ /dev/null @@ -1,106 +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 colltab - -import ( - "testing" -) - -// We take the smallest, largest and an arbitrary value for each -// of the UTF-8 sequence lengths. -var testRunes = []rune{ - 0x01, 0x0C, 0x7F, // 1-byte sequences - 0x80, 0x100, 0x7FF, // 2-byte sequences - 0x800, 0x999, 0xFFFF, // 3-byte sequences - 0x10000, 0x10101, 0x10FFFF, // 4-byte sequences - 0x200, 0x201, 0x202, 0x210, 0x215, // five entries in one sparse block -} - -// Test cases for illegal runes. -type trietest struct { - size int - bytes []byte -} - -var tests = []trietest{ - // illegal runes - {1, []byte{0x80}}, - {1, []byte{0xFF}}, - {1, []byte{t2, tx - 1}}, - {1, []byte{t2, t2}}, - {2, []byte{t3, tx, tx - 1}}, - {2, []byte{t3, tx, t2}}, - {1, []byte{t3, tx - 1, tx}}, - {3, []byte{t4, tx, tx, tx - 1}}, - {3, []byte{t4, tx, tx, t2}}, - {1, []byte{t4, t2, tx, tx - 1}}, - {2, []byte{t4, tx, t2, tx - 1}}, - - // short runes - {0, []byte{t2}}, - {0, []byte{t3, tx}}, - {0, []byte{t4, tx, tx}}, - - // we only support UTF-8 up to utf8.UTFMax bytes (4 bytes) - {1, []byte{t5, tx, tx, tx, tx}}, - {1, []byte{t6, tx, tx, tx, tx, tx}}, -} - -func TestLookupTrie(t *testing.T) { - for i, r := range testRunes { - b := []byte(string(r)) - v, sz := testTrie.lookup(b) - if int(v) != i { - t.Errorf("lookup(%U): found value %#x, expected %#x", r, v, i) - } - if sz != len(b) { - t.Errorf("lookup(%U): found size %d, expected %d", r, sz, len(b)) - } - } - for i, tt := range tests { - v, sz := testTrie.lookup(tt.bytes) - if int(v) != 0 { - t.Errorf("lookup of illegal rune, case %d: found value %#x, expected 0", i, v) - } - if sz != tt.size { - t.Errorf("lookup of illegal rune, case %d: found size %d, expected %d", i, sz, tt.size) - } - } -} - -// test data is taken from exp/collate/locale/build/trie_test.go -var testValues = [832]uint32{ - 0x000c: 0x00000001, - 0x007f: 0x00000002, - 0x00c0: 0x00000003, - 0x0100: 0x00000004, - 0x0140: 0x0000000c, 0x0141: 0x0000000d, 0x0142: 0x0000000e, - 0x0150: 0x0000000f, - 0x0155: 0x00000010, - 0x01bf: 0x00000005, - 0x01c0: 0x00000006, - 0x0219: 0x00000007, - 0x027f: 0x00000008, - 0x0280: 0x00000009, - 0x02c1: 0x0000000a, - 0x033f: 0x0000000b, -} - -var testLookup = [640]uint16{ - 0x0e0: 0x05, 0x0e6: 0x06, - 0x13f: 0x07, - 0x140: 0x08, 0x144: 0x09, - 0x190: 0x03, - 0x1ff: 0x0a, - 0x20f: 0x05, - 0x242: 0x01, 0x244: 0x02, - 0x248: 0x03, - 0x25f: 0x04, - 0x260: 0x01, - 0x26f: 0x02, - 0x270: 0x04, 0x274: 0x06, -} - -var testTrie = Trie{testLookup[6*blockSize:], testValues[:], testLookup[:], testValues[:]} diff --git a/vendor/golang.org/x/text/internal/colltab/weighter_test.go b/vendor/golang.org/x/text/internal/colltab/weighter_test.go deleted file mode 100644 index b5f8487b..00000000 --- a/vendor/golang.org/x/text/internal/colltab/weighter_test.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. - -package colltab - -// testWeighter is a simple Weighter that returns weights from a user-defined map. -type testWeighter map[string][]Elem - -func (t testWeighter) Start(int, []byte) int { return 0 } -func (t testWeighter) StartString(int, string) int { return 0 } -func (t testWeighter) Domain() []string { return nil } -func (t testWeighter) Top() uint32 { return 0 } - -// maxContractBytes is the maximum length of any key in the map. -const maxContractBytes = 10 - -func (t testWeighter) AppendNext(buf []Elem, s []byte) ([]Elem, int) { - n := len(s) - if n > maxContractBytes { - n = maxContractBytes - } - for i := n; i > 0; i-- { - if e, ok := t[string(s[:i])]; ok { - return append(buf, e...), i - } - } - panic("incomplete testWeighter: could not find " + string(s)) -} - -func (t testWeighter) AppendNextString(buf []Elem, s string) ([]Elem, int) { - n := len(s) - if n > maxContractBytes { - n = maxContractBytes - } - for i := n; i > 0; i-- { - if e, ok := t[s[:i]]; ok { - return append(buf, e...), i - } - } - panic("incomplete testWeighter: could not find " + s) -} diff --git a/vendor/golang.org/x/text/internal/gen.go b/vendor/golang.org/x/text/internal/gen.go deleted file mode 100644 index 1d678af5..00000000 --- a/vendor/golang.org/x/text/internal/gen.go +++ /dev/null @@ -1,52 +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 - -package main - -import ( - "log" - - "golang.org/x/text/internal/gen" - "golang.org/x/text/language" - "golang.org/x/text/unicode/cldr" -) - -func main() { - r := gen.OpenCLDRCoreZip() - defer r.Close() - - d := &cldr.Decoder{} - data, err := d.DecodeZip(r) - if err != nil { - log.Fatalf("DecodeZip: %v", err) - } - - w := gen.NewCodeWriter() - defer w.WriteGoFile("tables.go", "internal") - - // Create parents table. - parents := make([]uint16, language.NumCompactTags) - for _, loc := range data.Locales() { - tag := language.MustParse(loc) - index, ok := language.CompactIndex(tag) - if !ok { - continue - } - parentIndex := 0 // und - for p := tag.Parent(); p != language.Und; p = p.Parent() { - if x, ok := language.CompactIndex(p); ok { - parentIndex = x - break - } - } - parents[index] = uint16(parentIndex) - } - - w.WriteComment(` - Parent maps a compact index of a tag to the compact index of the parent of - this tag.`) - w.WriteVar("Parent", parents) -} diff --git a/vendor/golang.org/x/text/internal/gen_test.go b/vendor/golang.org/x/text/internal/gen_test.go deleted file mode 100644 index a2e1981a..00000000 --- a/vendor/golang.org/x/text/internal/gen_test.go +++ /dev/null @@ -1,38 +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 internal - -import ( - "testing" - - "golang.org/x/text/language" -) - -func TestParents(t *testing.T) { - testCases := []struct { - tag, parent string - }{ - {"af", "und"}, - {"en", "und"}, - {"en-001", "en"}, - {"en-AU", "en-001"}, - {"en-US", "en"}, - {"en-US-u-va-posix", "en-US"}, - {"ca-ES-valencia", "ca-ES"}, - } - for _, tc := range testCases { - tag, ok := language.CompactIndex(language.MustParse(tc.tag)) - if !ok { - t.Fatalf("Could not get index of flag %s", tc.tag) - } - want, ok := language.CompactIndex(language.MustParse(tc.parent)) - if !ok { - t.Fatalf("Could not get index of parent %s of tag %s", tc.parent, tc.tag) - } - if got := int(Parent[tag]); got != want { - t.Errorf("Parent[%s] = %d; want %d (%s)", tc.tag, got, want, tc.parent) - } - } -} diff --git a/vendor/golang.org/x/text/internal/internal.go b/vendor/golang.org/x/text/internal/internal.go deleted file mode 100644 index eac83285..00000000 --- a/vendor/golang.org/x/text/internal/internal.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:generate go run gen.go - -// Package internal contains non-exported functionality that are used by -// packages in the text repository. -package internal // import "golang.org/x/text/internal" - -import ( - "sort" - - "golang.org/x/text/language" -) - -// SortTags sorts tags in place. -func SortTags(tags []language.Tag) { - sort.Sort(sorter(tags)) -} - -type sorter []language.Tag - -func (s sorter) Len() int { - return len(s) -} - -func (s sorter) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -func (s sorter) Less(i, j int) bool { - return s[i].String() < s[j].String() -} - -// UniqueTags sorts and filters duplicate tags in place and returns a slice with -// only unique tags. -func UniqueTags(tags []language.Tag) []language.Tag { - if len(tags) <= 1 { - return tags - } - SortTags(tags) - k := 0 - for i := 1; i < len(tags); i++ { - if tags[k].String() < tags[i].String() { - k++ - tags[k] = tags[i] - } - } - return tags[:k+1] -} diff --git a/vendor/golang.org/x/text/internal/internal_test.go b/vendor/golang.org/x/text/internal/internal_test.go deleted file mode 100644 index ce1b9a38..00000000 --- a/vendor/golang.org/x/text/internal/internal_test.go +++ /dev/null @@ -1,38 +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 internal - -import ( - "fmt" - "strings" - "testing" - - "golang.org/x/text/language" -) - -func TestUnique(t *testing.T) { - testCases := []struct { - in, want string - }{ - {"", "[]"}, - {"en", "[en]"}, - {"en en", "[en]"}, - {"en en en", "[en]"}, - {"en-u-cu-eur en", "[en en-u-cu-eur]"}, - {"nl en", "[en nl]"}, - {"pt-Pt pt", "[pt pt-PT]"}, - } - for _, tc := range testCases { - tags := []language.Tag{} - for _, s := range strings.Split(tc.in, " ") { - if s != "" { - tags = append(tags, language.MustParse(s)) - } - } - if got := fmt.Sprint(UniqueTags(tags)); got != tc.want { - t.Errorf("Unique(%s) = %s; want %s", tc.in, got, tc.want) - } - } -} diff --git a/vendor/golang.org/x/text/internal/match.go b/vendor/golang.org/x/text/internal/match.go deleted file mode 100644 index a67fcaca..00000000 --- a/vendor/golang.org/x/text/internal/match.go +++ /dev/null @@ -1,67 +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 internal - -// This file contains matchers that implement CLDR inheritance. -// -// See http://unicode.org/reports/tr35/#Locale_Inheritance. -// -// Some of the inheritance described in this document is already handled by -// the cldr package. - -import ( - "golang.org/x/text/language" -) - -// TODO: consider if (some of the) matching algorithm needs to be public after -// getting some feel about what is generic and what is specific. - -// NewInheritanceMatcher returns a matcher that matches based on the inheritance -// chain. -// -// The matcher uses canonicalization and the parent relationship to find a -// match. The resulting match will always be either Und or a language with the -// same language and script as the requested language. It will not match -// languages for which there is understood to be mutual or one-directional -// intelligibility. -// -// A Match will indicate an Exact match if the language matches after -// canonicalization and High if the matched tag is a parent. -func NewInheritanceMatcher(t []language.Tag) *InheritanceMatcher { - tags := &InheritanceMatcher{make(map[language.Tag]int)} - for i, tag := range t { - ct, err := language.All.Canonicalize(tag) - if err != nil { - ct = tag - } - tags.index[ct] = i - } - return tags -} - -type InheritanceMatcher struct { - index map[language.Tag]int -} - -func (m InheritanceMatcher) Match(want ...language.Tag) (language.Tag, int, language.Confidence) { - for _, t := range want { - ct, err := language.All.Canonicalize(t) - if err != nil { - ct = t - } - conf := language.Exact - for { - if index, ok := m.index[ct]; ok { - return ct, index, conf - } - if ct == language.Und { - break - } - ct = ct.Parent() - conf = language.High - } - } - return language.Und, 0, language.No -} diff --git a/vendor/golang.org/x/text/internal/match_test.go b/vendor/golang.org/x/text/internal/match_test.go deleted file mode 100644 index 8a3fe657..00000000 --- a/vendor/golang.org/x/text/internal/match_test.go +++ /dev/null @@ -1,56 +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 internal - -import ( - "strings" - "testing" - - "golang.org/x/text/language" -) - -func TestInheritanceMatcher(t *testing.T) { - for i, tt := range []struct { - haveTags string - wantTags string - match string - conf language.Confidence - }{ - {"und,en,en-US", "en-US", "en-US", language.Exact}, // most specific match - {"zh-Hant,zh", "zh-TW", "zh-Hant", language.High}, // zh-TW implies Hant. - {"und,zh", "zh-TW", "und", language.High}, // zh-TW does not match zh. - {"zh", "zh-TW", "und", language.No}, // zh-TW does not match zh. - {"iw,en,nl", "he", "he", language.Exact}, // matches after canonicalization - {"he,en,nl", "iw", "he", language.Exact}, // matches after canonicalization - // Prefer first match over more specific match for various reasons: - // a) consistency of user interface is more important than an exact match, - // b) _if_ und is specified, it should be considered a correct and useful match, - // Note that a call to this Match will almost always be with a single tag. - {"und,en,en-US", "he,en-US", "und", language.High}, - } { - have := parseTags(tt.haveTags) - m := NewInheritanceMatcher(have) - tag, index, conf := m.Match(parseTags(tt.wantTags)...) - want := language.Raw.Make(tt.match) - if tag != want { - t.Errorf("%d:tag: got %q; want %q", i, tag, want) - } - if conf != language.No { - if got, _ := language.All.Canonicalize(have[index]); got != want { - t.Errorf("%d:index: got %q; want %q ", i, got, want) - } - } - if conf != tt.conf { - t.Errorf("%d:conf: got %v; want %v", i, conf, tt.conf) - } - } -} - -func parseTags(list string) (out []language.Tag) { - for _, s := range strings.Split(list, ",") { - out = append(out, language.Raw.Make(strings.TrimSpace(s))) - } - return out -} diff --git a/vendor/golang.org/x/text/internal/tables.go b/vendor/golang.org/x/text/internal/tables.go deleted file mode 100644 index 85991d3d..00000000 --- a/vendor/golang.org/x/text/internal/tables.go +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. - -package internal - -// Parent maps a compact index of a tag to the compact index of the parent of -// this tag. -var Parent = []uint16{ // 768 elements - // Entry 0 - 3F - 0x0000, 0x0053, 0x00e8, 0x0000, 0x0003, 0x0003, 0x0000, 0x0006, - 0x0000, 0x0008, 0x0000, 0x000a, 0x0000, 0x000c, 0x000c, 0x000c, - 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, - 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, - 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, - 0x000c, 0x0000, 0x0000, 0x002a, 0x0000, 0x002c, 0x0000, 0x002e, - 0x0000, 0x0000, 0x0031, 0x0030, 0x0030, 0x0000, 0x0035, 0x0000, - 0x0037, 0x0000, 0x0039, 0x0000, 0x003b, 0x0000, 0x003d, 0x0000, - // Entry 40 - 7F - 0x0000, 0x0040, 0x0000, 0x0042, 0x0042, 0x0000, 0x0045, 0x0045, - 0x0000, 0x0048, 0x0000, 0x004a, 0x0000, 0x0000, 0x004d, 0x004c, - 0x004c, 0x0000, 0x0051, 0x0051, 0x0051, 0x0051, 0x0000, 0x0056, - 0x0056, 0x0000, 0x0059, 0x0000, 0x005b, 0x0000, 0x005d, 0x0000, - 0x005f, 0x005f, 0x0000, 0x0062, 0x0000, 0x0064, 0x0000, 0x0066, - 0x0000, 0x0068, 0x0068, 0x0000, 0x006b, 0x0000, 0x006d, 0x006d, - 0x006d, 0x006d, 0x006d, 0x006d, 0x006d, 0x0000, 0x0075, 0x0000, - 0x0077, 0x0000, 0x0079, 0x0000, 0x0000, 0x007c, 0x0000, 0x007e, - // Entry 80 - BF - 0x0000, 0x0080, 0x0000, 0x0082, 0x0082, 0x0000, 0x0085, 0x0085, - 0x0000, 0x0088, 0x0089, 0x0089, 0x0089, 0x0088, 0x008a, 0x0089, - 0x0089, 0x0089, 0x0088, 0x0089, 0x0089, 0x0089, 0x0089, 0x0089, - 0x0089, 0x008a, 0x0089, 0x0089, 0x0089, 0x0089, 0x008a, 0x0089, - 0x008a, 0x0089, 0x0089, 0x008a, 0x0089, 0x0089, 0x0089, 0x0089, - 0x0089, 0x0089, 0x0089, 0x0089, 0x0089, 0x0088, 0x0089, 0x0089, - 0x0089, 0x0089, 0x0089, 0x0089, 0x0089, 0x0089, 0x0089, 0x0089, - 0x0089, 0x0089, 0x0089, 0x0089, 0x0089, 0x0089, 0x0089, 0x0088, - // Entry C0 - FF - 0x0089, 0x0088, 0x0089, 0x0089, 0x0089, 0x0089, 0x0089, 0x0089, - 0x0089, 0x0089, 0x008a, 0x0089, 0x0089, 0x0089, 0x0089, 0x0089, - 0x0089, 0x0089, 0x0088, 0x0089, 0x0089, 0x0089, 0x0089, 0x0089, - 0x008a, 0x0089, 0x0089, 0x008a, 0x0089, 0x0089, 0x0089, 0x0089, - 0x0089, 0x0089, 0x0089, 0x0089, 0x0089, 0x0089, 0x0089, 0x0088, - 0x0088, 0x0089, 0x0089, 0x0088, 0x0089, 0x0089, 0x0089, 0x0089, - 0x0089, 0x0000, 0x00f1, 0x0000, 0x00f3, 0x00f4, 0x00f4, 0x00f4, - 0x00f4, 0x00f4, 0x00f4, 0x00f4, 0x00f4, 0x00f4, 0x00f3, 0x00f4, - // Entry 100 - 13F - 0x00f3, 0x00f3, 0x00f4, 0x00f4, 0x00f3, 0x00f4, 0x00f4, 0x00f4, - 0x00f4, 0x00f3, 0x00f4, 0x00f4, 0x00f4, 0x00f4, 0x00f4, 0x00f4, - 0x0000, 0x0110, 0x0000, 0x0112, 0x0000, 0x0114, 0x0000, 0x0116, - 0x0116, 0x0000, 0x0119, 0x0119, 0x0119, 0x0119, 0x0000, 0x011e, - 0x0000, 0x0120, 0x0000, 0x0122, 0x0122, 0x0000, 0x0125, 0x0125, - 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, - 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, - 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, - // Entry 140 - 17F - 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, - 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, 0x0125, - 0x0125, 0x0125, 0x0125, 0x0125, 0x0000, 0x0154, 0x0000, 0x0156, - 0x0000, 0x0158, 0x0000, 0x015a, 0x0000, 0x015c, 0x0000, 0x015e, - 0x015e, 0x015e, 0x0000, 0x0162, 0x0000, 0x0000, 0x0165, 0x0000, - 0x0167, 0x0000, 0x0169, 0x0169, 0x0169, 0x0000, 0x016d, 0x0000, - 0x016f, 0x0000, 0x0171, 0x0000, 0x0173, 0x0173, 0x0000, 0x0176, - 0x0000, 0x0178, 0x0000, 0x017a, 0x0000, 0x017c, 0x0000, 0x017e, - // Entry 180 - 1BF - 0x0000, 0x0180, 0x0000, 0x0000, 0x0183, 0x0000, 0x0185, 0x0185, - 0x0185, 0x0185, 0x0000, 0x0000, 0x018b, 0x0000, 0x0000, 0x018e, - 0x0000, 0x0190, 0x0000, 0x0000, 0x0193, 0x0000, 0x0195, 0x0000, - 0x0000, 0x0198, 0x0000, 0x0000, 0x019b, 0x0000, 0x019d, 0x0000, - 0x019f, 0x0000, 0x01a1, 0x0000, 0x01a3, 0x0000, 0x01a5, 0x0000, - 0x01a7, 0x0000, 0x01a9, 0x0000, 0x01ab, 0x0000, 0x01ad, 0x0000, - 0x01af, 0x01af, 0x0000, 0x01b2, 0x0000, 0x01b4, 0x0000, 0x01b6, - 0x0000, 0x01b8, 0x0000, 0x01ba, 0x0000, 0x0000, 0x01bd, 0x0000, - // Entry 1C0 - 1FF - 0x01bf, 0x0000, 0x01c1, 0x0000, 0x01c3, 0x0000, 0x01c5, 0x0000, - 0x01c7, 0x0000, 0x01c9, 0x01c9, 0x01c9, 0x01c9, 0x0000, 0x01ce, - 0x0000, 0x01d0, 0x01d0, 0x0000, 0x01d3, 0x0000, 0x01d5, 0x0000, - 0x01d7, 0x0000, 0x01d9, 0x0000, 0x01db, 0x0000, 0x01dd, 0x01dd, - 0x0000, 0x01e0, 0x0000, 0x01e2, 0x0000, 0x01e4, 0x0000, 0x01e6, - 0x0000, 0x01e8, 0x0000, 0x01ea, 0x0000, 0x01ec, 0x0000, 0x01ee, - 0x0000, 0x01f0, 0x0000, 0x01f2, 0x01f2, 0x01f2, 0x0000, 0x01f6, - 0x0000, 0x01f8, 0x0000, 0x01fa, 0x0000, 0x01fc, 0x0000, 0x0000, - // Entry 200 - 23F - 0x01ff, 0x0000, 0x0201, 0x0201, 0x0000, 0x0204, 0x0000, 0x0206, - 0x0206, 0x0000, 0x0209, 0x0209, 0x0000, 0x020c, 0x020c, 0x020c, - 0x020c, 0x020c, 0x020c, 0x020c, 0x0000, 0x0214, 0x0000, 0x0216, - 0x0000, 0x0218, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x021e, - 0x0000, 0x0000, 0x0221, 0x0000, 0x0223, 0x0223, 0x0000, 0x0226, - 0x0000, 0x0228, 0x0228, 0x0000, 0x0000, 0x022c, 0x022b, 0x022b, - 0x0000, 0x0000, 0x0231, 0x0000, 0x0233, 0x0000, 0x0235, 0x0000, - 0x0241, 0x0237, 0x0241, 0x0241, 0x0241, 0x0241, 0x0241, 0x0241, - // Entry 240 - 27F - 0x0241, 0x0237, 0x0241, 0x0241, 0x0000, 0x0244, 0x0244, 0x0244, - 0x0000, 0x0248, 0x0000, 0x024a, 0x0000, 0x024c, 0x024c, 0x0000, - 0x024f, 0x0000, 0x0251, 0x0251, 0x0251, 0x0251, 0x0251, 0x0251, - 0x0000, 0x0258, 0x0000, 0x025a, 0x0000, 0x025c, 0x0000, 0x025e, - 0x0000, 0x0260, 0x0000, 0x0262, 0x0000, 0x0000, 0x0265, 0x0265, - 0x0265, 0x0000, 0x0269, 0x0000, 0x026b, 0x0000, 0x026d, 0x0000, - 0x0000, 0x0270, 0x026f, 0x026f, 0x0000, 0x0274, 0x0000, 0x0276, - 0x0000, 0x0278, 0x0000, 0x0000, 0x0000, 0x0000, 0x027d, 0x0000, - // Entry 280 - 2BF - 0x0000, 0x0280, 0x0000, 0x0282, 0x0282, 0x0282, 0x0282, 0x0000, - 0x0287, 0x0287, 0x0287, 0x0000, 0x028b, 0x028b, 0x028b, 0x028b, - 0x028b, 0x0000, 0x0291, 0x0291, 0x0291, 0x0291, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0299, 0x0299, 0x0299, 0x0000, 0x029d, 0x029d, - 0x029d, 0x029d, 0x0000, 0x0000, 0x02a3, 0x02a3, 0x02a3, 0x02a3, - 0x0000, 0x02a8, 0x0000, 0x02aa, 0x02aa, 0x0000, 0x02ad, 0x0000, - 0x02af, 0x0000, 0x02b1, 0x02b1, 0x0000, 0x0000, 0x02b5, 0x0000, - 0x0000, 0x02b8, 0x0000, 0x02ba, 0x02ba, 0x0000, 0x0000, 0x02be, - // Entry 2C0 - 2FF - 0x0000, 0x02c0, 0x0000, 0x02c2, 0x0000, 0x02c4, 0x0000, 0x02c6, - 0x0000, 0x02c8, 0x02c8, 0x0000, 0x0000, 0x02cc, 0x0000, 0x02ce, - 0x02cb, 0x02cb, 0x0000, 0x0000, 0x02d3, 0x02d2, 0x02d2, 0x0000, - 0x0000, 0x02d8, 0x0000, 0x02da, 0x0000, 0x02dc, 0x0000, 0x0000, - 0x02df, 0x0000, 0x02e1, 0x0000, 0x0000, 0x02e4, 0x0000, 0x02e6, - 0x0000, 0x02e8, 0x0000, 0x02ea, 0x02ea, 0x0000, 0x0000, 0x02ee, - 0x02ed, 0x02ed, 0x0000, 0x02f2, 0x0000, 0x02f4, 0x02f4, 0x02f4, - 0x02f4, 0x02f4, 0x0000, 0x02fa, 0x02fb, 0x02fa, 0x0000, 0x02fe, -} // Size: 1560 bytes - -// Total table size 1560 bytes (1KiB); checksum: 4897681C diff --git a/vendor/golang.org/x/text/internal/tag/tag_test.go b/vendor/golang.org/x/text/internal/tag/tag_test.go deleted file mode 100644 index da174a24..00000000 --- a/vendor/golang.org/x/text/internal/tag/tag_test.go +++ /dev/null @@ -1,67 +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 tag - -import ( - "strings" - "testing" -) - -var strdata = []string{ - "aa ", - "aaa ", - "aaaa", - "aaab", - "aab ", - "ab ", - "ba ", - "xxxx", - "\xff\xff\xff\xff", -} - -var testCases = map[string]int{ - "a": 0, - "aa": 0, - "aaa": 1, - "aa ": 0, - "aaaa": 2, - "aaab": 3, - "b": 6, - "ba": 6, - " ": -1, - "aaax": -1, - "bbbb": -1, - "zzzz": -1, -} - -func TestIndex(t *testing.T) { - index := Index(strings.Join(strdata, "")) - for k, v := range testCases { - if i := index.Index([]byte(k)); i != v { - t.Errorf("%s: got %d; want %d", k, i, v) - } - } -} - -func TestFixCase(t *testing.T) { - tests := []string{ - "aaaa", "AbCD", "abcd", - "Zzzz", "AbCD", "Abcd", - "Zzzz", "AbC", "", - "XXX", "ab ", "", - "XXX", "usd", "USD", - "cmn", "AB ", "", - "gsw", "CMN", "cmn", - } - for tc := tests; len(tc) > 0; tc = tc[3:] { - b := []byte(tc[1]) - if !FixCase(tc[0], b) { - b = nil - } - if string(b) != tc[2] { - t.Errorf("FixCase(%q, %q) = %q; want %q", tc[0], tc[1], b, tc[2]) - } - } -} diff --git a/vendor/golang.org/x/text/internal/triegen/data_test.go b/vendor/golang.org/x/text/internal/triegen/data_test.go deleted file mode 100644 index 91de547a..00000000 --- a/vendor/golang.org/x/text/internal/triegen/data_test.go +++ /dev/null @@ -1,875 +0,0 @@ -// This file is generated with "go test -tags generate". DO NOT EDIT! -// +build !generate - -package triegen_test - -// lookup returns the trie value for the first UTF-8 encoding in s and -// the width in bytes of this encoding. The size will be 0 if s does not -// hold enough bytes to complete the encoding. len(s) must be greater than 0. -func (t *randTrie) lookup(s []byte) (v uint8, sz int) { - c0 := s[0] - switch { - case c0 < 0x80: // is ASCII - return randValues[c0], 1 - case c0 < 0xC2: - return 0, 1 // Illegal UTF-8: not a starter, not ASCII. - case c0 < 0xE0: // 2-byte UTF-8 - if len(s) < 2 { - return 0, 0 - } - i := randIndex[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c1), 2 - case c0 < 0xF0: // 3-byte UTF-8 - if len(s) < 3 { - return 0, 0 - } - i := randIndex[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - o := uint32(i)<<6 + uint32(c1) - i = randIndex[o] - c2 := s[2] - if c2 < 0x80 || 0xC0 <= c2 { - return 0, 2 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c2), 3 - case c0 < 0xF8: // 4-byte UTF-8 - if len(s) < 4 { - return 0, 0 - } - i := randIndex[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - o := uint32(i)<<6 + uint32(c1) - i = randIndex[o] - c2 := s[2] - if c2 < 0x80 || 0xC0 <= c2 { - return 0, 2 // Illegal UTF-8: not a continuation byte. - } - o = uint32(i)<<6 + uint32(c2) - i = randIndex[o] - c3 := s[3] - if c3 < 0x80 || 0xC0 <= c3 { - return 0, 3 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c3), 4 - } - // Illegal rune - return 0, 1 -} - -// lookupUnsafe returns the trie value for the first UTF-8 encoding in s. -// s must start with a full and valid UTF-8 encoded rune. -func (t *randTrie) lookupUnsafe(s []byte) uint8 { - c0 := s[0] - if c0 < 0x80 { // is ASCII - return randValues[c0] - } - i := randIndex[c0] - if c0 < 0xE0 { // 2-byte UTF-8 - return t.lookupValue(uint32(i), s[1]) - } - i = randIndex[uint32(i)<<6+uint32(s[1])] - if c0 < 0xF0 { // 3-byte UTF-8 - return t.lookupValue(uint32(i), s[2]) - } - i = randIndex[uint32(i)<<6+uint32(s[2])] - if c0 < 0xF8 { // 4-byte UTF-8 - return t.lookupValue(uint32(i), s[3]) - } - return 0 -} - -// lookupString returns the trie value for the first UTF-8 encoding in s and -// the width in bytes of this encoding. The size will be 0 if s does not -// hold enough bytes to complete the encoding. len(s) must be greater than 0. -func (t *randTrie) lookupString(s string) (v uint8, sz int) { - c0 := s[0] - switch { - case c0 < 0x80: // is ASCII - return randValues[c0], 1 - case c0 < 0xC2: - return 0, 1 // Illegal UTF-8: not a starter, not ASCII. - case c0 < 0xE0: // 2-byte UTF-8 - if len(s) < 2 { - return 0, 0 - } - i := randIndex[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c1), 2 - case c0 < 0xF0: // 3-byte UTF-8 - if len(s) < 3 { - return 0, 0 - } - i := randIndex[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - o := uint32(i)<<6 + uint32(c1) - i = randIndex[o] - c2 := s[2] - if c2 < 0x80 || 0xC0 <= c2 { - return 0, 2 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c2), 3 - case c0 < 0xF8: // 4-byte UTF-8 - if len(s) < 4 { - return 0, 0 - } - i := randIndex[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - o := uint32(i)<<6 + uint32(c1) - i = randIndex[o] - c2 := s[2] - if c2 < 0x80 || 0xC0 <= c2 { - return 0, 2 // Illegal UTF-8: not a continuation byte. - } - o = uint32(i)<<6 + uint32(c2) - i = randIndex[o] - c3 := s[3] - if c3 < 0x80 || 0xC0 <= c3 { - return 0, 3 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c3), 4 - } - // Illegal rune - return 0, 1 -} - -// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s. -// s must start with a full and valid UTF-8 encoded rune. -func (t *randTrie) lookupStringUnsafe(s string) uint8 { - c0 := s[0] - if c0 < 0x80 { // is ASCII - return randValues[c0] - } - i := randIndex[c0] - if c0 < 0xE0 { // 2-byte UTF-8 - return t.lookupValue(uint32(i), s[1]) - } - i = randIndex[uint32(i)<<6+uint32(s[1])] - if c0 < 0xF0 { // 3-byte UTF-8 - return t.lookupValue(uint32(i), s[2]) - } - i = randIndex[uint32(i)<<6+uint32(s[2])] - if c0 < 0xF8 { // 4-byte UTF-8 - return t.lookupValue(uint32(i), s[3]) - } - return 0 -} - -// randTrie. Total size: 9280 bytes (9.06 KiB). Checksum: 6debd324a8debb8f. -type randTrie struct{} - -func newRandTrie(i int) *randTrie { - return &randTrie{} -} - -// lookupValue determines the type of block n and looks up the value for b. -func (t *randTrie) lookupValue(n uint32, b byte) uint8 { - switch { - default: - return uint8(randValues[n<<6+uint32(b)]) - } -} - -// randValues: 56 blocks, 3584 entries, 3584 bytes -// The third block is the zero block. -var randValues = [3584]uint8{ - // Block 0x0, offset 0x0 - // Block 0x1, offset 0x40 - // Block 0x2, offset 0x80 - // Block 0x3, offset 0xc0 - 0xc9: 0x0001, - // Block 0x4, offset 0x100 - 0x100: 0x0001, - // Block 0x5, offset 0x140 - 0x155: 0x0001, - // Block 0x6, offset 0x180 - 0x196: 0x0001, - // Block 0x7, offset 0x1c0 - 0x1ef: 0x0001, - // Block 0x8, offset 0x200 - 0x206: 0x0001, - // Block 0x9, offset 0x240 - 0x258: 0x0001, - // Block 0xa, offset 0x280 - 0x288: 0x0001, - // Block 0xb, offset 0x2c0 - 0x2f2: 0x0001, - // Block 0xc, offset 0x300 - 0x304: 0x0001, - // Block 0xd, offset 0x340 - 0x34b: 0x0001, - // Block 0xe, offset 0x380 - 0x3ba: 0x0001, - // Block 0xf, offset 0x3c0 - 0x3f5: 0x0001, - // Block 0x10, offset 0x400 - 0x41d: 0x0001, - // Block 0x11, offset 0x440 - 0x442: 0x0001, - // Block 0x12, offset 0x480 - 0x4bb: 0x0001, - // Block 0x13, offset 0x4c0 - 0x4e9: 0x0001, - // Block 0x14, offset 0x500 - 0x53e: 0x0001, - // Block 0x15, offset 0x540 - 0x55f: 0x0001, - // Block 0x16, offset 0x580 - 0x5b7: 0x0001, - // Block 0x17, offset 0x5c0 - 0x5d9: 0x0001, - // Block 0x18, offset 0x600 - 0x60e: 0x0001, - // Block 0x19, offset 0x640 - 0x652: 0x0001, - // Block 0x1a, offset 0x680 - 0x68f: 0x0001, - // Block 0x1b, offset 0x6c0 - 0x6dc: 0x0001, - // Block 0x1c, offset 0x700 - 0x703: 0x0001, - // Block 0x1d, offset 0x740 - 0x741: 0x0001, - // Block 0x1e, offset 0x780 - 0x79b: 0x0001, - // Block 0x1f, offset 0x7c0 - 0x7f1: 0x0001, - // Block 0x20, offset 0x800 - 0x833: 0x0001, - // Block 0x21, offset 0x840 - 0x853: 0x0001, - // Block 0x22, offset 0x880 - 0x8a2: 0x0001, - // Block 0x23, offset 0x8c0 - 0x8f8: 0x0001, - // Block 0x24, offset 0x900 - 0x917: 0x0001, - // Block 0x25, offset 0x940 - 0x945: 0x0001, - // Block 0x26, offset 0x980 - 0x99e: 0x0001, - // Block 0x27, offset 0x9c0 - 0x9fd: 0x0001, - // Block 0x28, offset 0xa00 - 0xa0d: 0x0001, - // Block 0x29, offset 0xa40 - 0xa66: 0x0001, - // Block 0x2a, offset 0xa80 - 0xaab: 0x0001, - // Block 0x2b, offset 0xac0 - 0xaea: 0x0001, - // Block 0x2c, offset 0xb00 - 0xb2d: 0x0001, - // Block 0x2d, offset 0xb40 - 0xb54: 0x0001, - // Block 0x2e, offset 0xb80 - 0xb90: 0x0001, - // Block 0x2f, offset 0xbc0 - 0xbe5: 0x0001, - // Block 0x30, offset 0xc00 - 0xc28: 0x0001, - // Block 0x31, offset 0xc40 - 0xc7c: 0x0001, - // Block 0x32, offset 0xc80 - 0xcbf: 0x0001, - // Block 0x33, offset 0xcc0 - 0xcc7: 0x0001, - // Block 0x34, offset 0xd00 - 0xd34: 0x0001, - // Block 0x35, offset 0xd40 - 0xd61: 0x0001, - // Block 0x36, offset 0xd80 - 0xdb9: 0x0001, - // Block 0x37, offset 0xdc0 - 0xdda: 0x0001, -} - -// randIndex: 89 blocks, 5696 entries, 5696 bytes -// Block 0 is the zero block. -var randIndex = [5696]uint8{ - // Block 0x0, offset 0x0 - // Block 0x1, offset 0x40 - // Block 0x2, offset 0x80 - // Block 0x3, offset 0xc0 - 0xe1: 0x02, 0xe3: 0x03, 0xe4: 0x04, - 0xea: 0x05, 0xeb: 0x06, 0xec: 0x07, - 0xf0: 0x10, 0xf1: 0x24, 0xf2: 0x3d, 0xf3: 0x4f, 0xf4: 0x56, - // Block 0x4, offset 0x100 - 0x107: 0x01, - // Block 0x5, offset 0x140 - 0x16c: 0x02, - // Block 0x6, offset 0x180 - 0x19c: 0x03, - 0x1ae: 0x04, - // Block 0x7, offset 0x1c0 - 0x1d8: 0x05, - 0x1f7: 0x06, - // Block 0x8, offset 0x200 - 0x20c: 0x07, - // Block 0x9, offset 0x240 - 0x24a: 0x08, - // Block 0xa, offset 0x280 - 0x2b6: 0x09, - // Block 0xb, offset 0x2c0 - 0x2d5: 0x0a, - // Block 0xc, offset 0x300 - 0x31a: 0x0b, - // Block 0xd, offset 0x340 - 0x373: 0x0c, - // Block 0xe, offset 0x380 - 0x38b: 0x0d, - // Block 0xf, offset 0x3c0 - 0x3f0: 0x0e, - // Block 0x10, offset 0x400 - 0x433: 0x0f, - // Block 0x11, offset 0x440 - 0x45d: 0x10, - // Block 0x12, offset 0x480 - 0x491: 0x08, 0x494: 0x09, 0x497: 0x0a, - 0x49b: 0x0b, 0x49c: 0x0c, - 0x4a1: 0x0d, - 0x4ad: 0x0e, - 0x4ba: 0x0f, - // Block 0x13, offset 0x4c0 - 0x4c1: 0x11, - // Block 0x14, offset 0x500 - 0x531: 0x12, - // Block 0x15, offset 0x540 - 0x546: 0x13, - // Block 0x16, offset 0x580 - 0x5ab: 0x14, - // Block 0x17, offset 0x5c0 - 0x5d4: 0x11, - 0x5fe: 0x11, - // Block 0x18, offset 0x600 - 0x618: 0x0a, - // Block 0x19, offset 0x640 - 0x65b: 0x15, - // Block 0x1a, offset 0x680 - 0x6a0: 0x16, - // Block 0x1b, offset 0x6c0 - 0x6d2: 0x17, - 0x6f6: 0x18, - // Block 0x1c, offset 0x700 - 0x711: 0x19, - // Block 0x1d, offset 0x740 - 0x768: 0x1a, - // Block 0x1e, offset 0x780 - 0x783: 0x1b, - // Block 0x1f, offset 0x7c0 - 0x7f9: 0x1c, - // Block 0x20, offset 0x800 - 0x831: 0x1d, - // Block 0x21, offset 0x840 - 0x85e: 0x1e, - // Block 0x22, offset 0x880 - 0x898: 0x1f, - // Block 0x23, offset 0x8c0 - 0x8c7: 0x18, - 0x8d5: 0x14, - 0x8f7: 0x20, - 0x8fe: 0x1f, - // Block 0x24, offset 0x900 - 0x905: 0x21, - // Block 0x25, offset 0x940 - 0x966: 0x03, - // Block 0x26, offset 0x980 - 0x981: 0x07, 0x983: 0x11, - 0x989: 0x12, 0x98a: 0x13, 0x98e: 0x14, 0x98f: 0x15, - 0x992: 0x16, 0x995: 0x17, 0x996: 0x18, - 0x998: 0x19, 0x999: 0x1a, 0x99b: 0x1b, 0x99f: 0x1c, - 0x9a3: 0x1d, - 0x9ad: 0x1e, 0x9af: 0x1f, - 0x9b0: 0x20, 0x9b1: 0x21, - 0x9b8: 0x22, 0x9bd: 0x23, - // Block 0x27, offset 0x9c0 - 0x9cd: 0x22, - // Block 0x28, offset 0xa00 - 0xa0c: 0x08, - // Block 0x29, offset 0xa40 - 0xa6f: 0x1c, - // Block 0x2a, offset 0xa80 - 0xa90: 0x1a, - 0xaaf: 0x23, - // Block 0x2b, offset 0xac0 - 0xae3: 0x19, - 0xae8: 0x24, - 0xafc: 0x25, - // Block 0x2c, offset 0xb00 - 0xb13: 0x26, - // Block 0x2d, offset 0xb40 - 0xb67: 0x1c, - // Block 0x2e, offset 0xb80 - 0xb8f: 0x0b, - // Block 0x2f, offset 0xbc0 - 0xbcb: 0x27, - 0xbe7: 0x26, - // Block 0x30, offset 0xc00 - 0xc34: 0x16, - // Block 0x31, offset 0xc40 - 0xc62: 0x03, - // Block 0x32, offset 0xc80 - 0xcbb: 0x12, - // Block 0x33, offset 0xcc0 - 0xcdf: 0x09, - // Block 0x34, offset 0xd00 - 0xd34: 0x0a, - // Block 0x35, offset 0xd40 - 0xd41: 0x1e, - // Block 0x36, offset 0xd80 - 0xd83: 0x28, - // Block 0x37, offset 0xdc0 - 0xdc0: 0x15, - // Block 0x38, offset 0xe00 - 0xe1a: 0x15, - // Block 0x39, offset 0xe40 - 0xe65: 0x29, - // Block 0x3a, offset 0xe80 - 0xe86: 0x1f, - // Block 0x3b, offset 0xec0 - 0xeec: 0x18, - // Block 0x3c, offset 0xf00 - 0xf28: 0x2a, - // Block 0x3d, offset 0xf40 - 0xf53: 0x08, - // Block 0x3e, offset 0xf80 - 0xfa2: 0x2b, - 0xfaa: 0x17, - // Block 0x3f, offset 0xfc0 - 0xfc0: 0x25, 0xfc2: 0x26, - 0xfc9: 0x27, 0xfcd: 0x28, 0xfce: 0x29, - 0xfd5: 0x2a, - 0xfd8: 0x2b, 0xfd9: 0x2c, 0xfdf: 0x2d, - 0xfe1: 0x2e, 0xfe2: 0x2f, 0xfe3: 0x30, 0xfe6: 0x31, - 0xfe9: 0x32, 0xfec: 0x33, 0xfed: 0x34, 0xfef: 0x35, - 0xff1: 0x36, 0xff2: 0x37, 0xff3: 0x38, 0xff4: 0x39, - 0xffa: 0x3a, 0xffc: 0x3b, 0xffe: 0x3c, - // Block 0x40, offset 0x1000 - 0x102c: 0x2c, - // Block 0x41, offset 0x1040 - 0x1074: 0x2c, - // Block 0x42, offset 0x1080 - 0x108c: 0x08, - 0x10a0: 0x2d, - // Block 0x43, offset 0x10c0 - 0x10e8: 0x10, - // Block 0x44, offset 0x1100 - 0x110f: 0x13, - // Block 0x45, offset 0x1140 - 0x114b: 0x2e, - // Block 0x46, offset 0x1180 - 0x118b: 0x23, - 0x119d: 0x0c, - // Block 0x47, offset 0x11c0 - 0x11c3: 0x12, - 0x11f9: 0x0f, - // Block 0x48, offset 0x1200 - 0x121e: 0x1b, - // Block 0x49, offset 0x1240 - 0x1270: 0x2f, - // Block 0x4a, offset 0x1280 - 0x128a: 0x1b, - 0x12a7: 0x02, - // Block 0x4b, offset 0x12c0 - 0x12fb: 0x14, - // Block 0x4c, offset 0x1300 - 0x1333: 0x30, - // Block 0x4d, offset 0x1340 - 0x134d: 0x31, - // Block 0x4e, offset 0x1380 - 0x138e: 0x15, - // Block 0x4f, offset 0x13c0 - 0x13f4: 0x32, - // Block 0x50, offset 0x1400 - 0x141b: 0x33, - // Block 0x51, offset 0x1440 - 0x1448: 0x3e, 0x1449: 0x3f, 0x144a: 0x40, 0x144f: 0x41, - 0x1459: 0x42, 0x145c: 0x43, 0x145e: 0x44, 0x145f: 0x45, - 0x1468: 0x46, 0x1469: 0x47, 0x146c: 0x48, 0x146d: 0x49, 0x146e: 0x4a, - 0x1472: 0x4b, 0x1473: 0x4c, - 0x1479: 0x4d, 0x147b: 0x4e, - // Block 0x52, offset 0x1480 - 0x1480: 0x34, - 0x1499: 0x11, - 0x14b6: 0x2c, - // Block 0x53, offset 0x14c0 - 0x14e4: 0x0d, - // Block 0x54, offset 0x1500 - 0x1527: 0x08, - // Block 0x55, offset 0x1540 - 0x1555: 0x2b, - // Block 0x56, offset 0x1580 - 0x15b2: 0x35, - // Block 0x57, offset 0x15c0 - 0x15f2: 0x1c, 0x15f4: 0x29, - // Block 0x58, offset 0x1600 - 0x1600: 0x50, 0x1603: 0x51, - 0x1608: 0x52, 0x160a: 0x53, 0x160d: 0x54, 0x160e: 0x55, -} - -// lookup returns the trie value for the first UTF-8 encoding in s and -// the width in bytes of this encoding. The size will be 0 if s does not -// hold enough bytes to complete the encoding. len(s) must be greater than 0. -func (t *multiTrie) lookup(s []byte) (v uint64, sz int) { - c0 := s[0] - switch { - case c0 < 0x80: // is ASCII - return t.ascii[c0], 1 - case c0 < 0xC2: - return 0, 1 // Illegal UTF-8: not a starter, not ASCII. - case c0 < 0xE0: // 2-byte UTF-8 - if len(s) < 2 { - return 0, 0 - } - i := t.utf8Start[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c1), 2 - case c0 < 0xF0: // 3-byte UTF-8 - if len(s) < 3 { - return 0, 0 - } - i := t.utf8Start[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - o := uint32(i)<<6 + uint32(c1) - i = multiIndex[o] - c2 := s[2] - if c2 < 0x80 || 0xC0 <= c2 { - return 0, 2 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c2), 3 - case c0 < 0xF8: // 4-byte UTF-8 - if len(s) < 4 { - return 0, 0 - } - i := t.utf8Start[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - o := uint32(i)<<6 + uint32(c1) - i = multiIndex[o] - c2 := s[2] - if c2 < 0x80 || 0xC0 <= c2 { - return 0, 2 // Illegal UTF-8: not a continuation byte. - } - o = uint32(i)<<6 + uint32(c2) - i = multiIndex[o] - c3 := s[3] - if c3 < 0x80 || 0xC0 <= c3 { - return 0, 3 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c3), 4 - } - // Illegal rune - return 0, 1 -} - -// lookupUnsafe returns the trie value for the first UTF-8 encoding in s. -// s must start with a full and valid UTF-8 encoded rune. -func (t *multiTrie) lookupUnsafe(s []byte) uint64 { - c0 := s[0] - if c0 < 0x80 { // is ASCII - return t.ascii[c0] - } - i := t.utf8Start[c0] - if c0 < 0xE0 { // 2-byte UTF-8 - return t.lookupValue(uint32(i), s[1]) - } - i = multiIndex[uint32(i)<<6+uint32(s[1])] - if c0 < 0xF0 { // 3-byte UTF-8 - return t.lookupValue(uint32(i), s[2]) - } - i = multiIndex[uint32(i)<<6+uint32(s[2])] - if c0 < 0xF8 { // 4-byte UTF-8 - return t.lookupValue(uint32(i), s[3]) - } - return 0 -} - -// lookupString returns the trie value for the first UTF-8 encoding in s and -// the width in bytes of this encoding. The size will be 0 if s does not -// hold enough bytes to complete the encoding. len(s) must be greater than 0. -func (t *multiTrie) lookupString(s string) (v uint64, sz int) { - c0 := s[0] - switch { - case c0 < 0x80: // is ASCII - return t.ascii[c0], 1 - case c0 < 0xC2: - return 0, 1 // Illegal UTF-8: not a starter, not ASCII. - case c0 < 0xE0: // 2-byte UTF-8 - if len(s) < 2 { - return 0, 0 - } - i := t.utf8Start[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c1), 2 - case c0 < 0xF0: // 3-byte UTF-8 - if len(s) < 3 { - return 0, 0 - } - i := t.utf8Start[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - o := uint32(i)<<6 + uint32(c1) - i = multiIndex[o] - c2 := s[2] - if c2 < 0x80 || 0xC0 <= c2 { - return 0, 2 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c2), 3 - case c0 < 0xF8: // 4-byte UTF-8 - if len(s) < 4 { - return 0, 0 - } - i := t.utf8Start[c0] - c1 := s[1] - if c1 < 0x80 || 0xC0 <= c1 { - return 0, 1 // Illegal UTF-8: not a continuation byte. - } - o := uint32(i)<<6 + uint32(c1) - i = multiIndex[o] - c2 := s[2] - if c2 < 0x80 || 0xC0 <= c2 { - return 0, 2 // Illegal UTF-8: not a continuation byte. - } - o = uint32(i)<<6 + uint32(c2) - i = multiIndex[o] - c3 := s[3] - if c3 < 0x80 || 0xC0 <= c3 { - return 0, 3 // Illegal UTF-8: not a continuation byte. - } - return t.lookupValue(uint32(i), c3), 4 - } - // Illegal rune - return 0, 1 -} - -// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s. -// s must start with a full and valid UTF-8 encoded rune. -func (t *multiTrie) lookupStringUnsafe(s string) uint64 { - c0 := s[0] - if c0 < 0x80 { // is ASCII - return t.ascii[c0] - } - i := t.utf8Start[c0] - if c0 < 0xE0 { // 2-byte UTF-8 - return t.lookupValue(uint32(i), s[1]) - } - i = multiIndex[uint32(i)<<6+uint32(s[1])] - if c0 < 0xF0 { // 3-byte UTF-8 - return t.lookupValue(uint32(i), s[2]) - } - i = multiIndex[uint32(i)<<6+uint32(s[2])] - if c0 < 0xF8 { // 4-byte UTF-8 - return t.lookupValue(uint32(i), s[3]) - } - return 0 -} - -// multiTrie. Total size: 18250 bytes (17.82 KiB). Checksum: a69a609d8696aa5e. -type multiTrie struct { - ascii []uint64 // index for ASCII bytes - utf8Start []uint8 // index for UTF-8 bytes >= 0xC0 -} - -func newMultiTrie(i int) *multiTrie { - h := multiTrieHandles[i] - return &multiTrie{multiValues[uint32(h.ascii)<<6:], multiIndex[uint32(h.multi)<<6:]} -} - -type multiTrieHandle struct { - ascii, multi uint8 -} - -// multiTrieHandles: 5 handles, 10 bytes -var multiTrieHandles = [5]multiTrieHandle{ - {0, 0}, // 8c1e77823143d35c: all - {0, 23}, // 8fb58ff8243b45b0: ASCII only - {0, 23}, // 8fb58ff8243b45b0: ASCII only 2 - {0, 24}, // 2ccc43994f11046f: BMP only - {30, 25}, // ce448591bdcb4733: No BMP -} - -// lookupValue determines the type of block n and looks up the value for b. -func (t *multiTrie) lookupValue(n uint32, b byte) uint64 { - switch { - default: - return uint64(multiValues[n<<6+uint32(b)]) - } -} - -// multiValues: 32 blocks, 2048 entries, 16384 bytes -// The third block is the zero block. -var multiValues = [2048]uint64{ - // Block 0x0, offset 0x0 - 0x03: 0x6e361699800b9fb8, 0x04: 0x52d3935a34f6f0b, 0x05: 0x2948319393e7ef10, - 0x07: 0x20f03b006704f663, 0x08: 0x6c15c0732bb2495f, 0x09: 0xe54e2c59d953551, - 0x0f: 0x33d8a825807d8037, 0x10: 0x6ecd93cb12168b92, 0x11: 0x6a81c9c0ce86e884, - 0x1f: 0xa03e77aac8be79b, 0x20: 0x28591d0e7e486efa, 0x21: 0x716fa3bc398dec8, - 0x3f: 0x4fd3bcfa72bce8b0, - // Block 0x1, offset 0x40 - 0x40: 0x3cbaef3db8ba5f12, 0x41: 0x2d262347c1f56357, - 0x7f: 0x782caa2d25a418a9, - // Block 0x2, offset 0x80 - // Block 0x3, offset 0xc0 - 0xc0: 0x6bbd1f937b1ff5d2, 0xc1: 0x732e23088d2eb8a4, - // Block 0x4, offset 0x100 - 0x13f: 0x56f8c4c82f5962dc, - // Block 0x5, offset 0x140 - 0x140: 0x57dc4544729a5da2, 0x141: 0x2f62f9cd307ffa0d, - // Block 0x6, offset 0x180 - 0x1bf: 0x7bf4d0ebf302a088, - // Block 0x7, offset 0x1c0 - 0x1c0: 0x1f0d67f249e59931, 0x1c1: 0x3011def73aa550c7, - // Block 0x8, offset 0x200 - 0x23f: 0x5de81c1dff6bf29d, - // Block 0x9, offset 0x240 - 0x240: 0x752c035737b825e8, 0x241: 0x1e793399081e3bb3, - // Block 0xa, offset 0x280 - 0x2bf: 0x6a28f01979cbf059, - // Block 0xb, offset 0x2c0 - 0x2c0: 0x373a4b0f2cbd4c74, 0x2c1: 0x4fd2c288683b767c, - // Block 0xc, offset 0x300 - 0x33f: 0x5a10ffa9e29184fb, - // Block 0xd, offset 0x340 - 0x340: 0x700f9bdb53fff6a5, 0x341: 0xcde93df0427eb79, - // Block 0xe, offset 0x380 - 0x3bf: 0x74071288fff39c76, - // Block 0xf, offset 0x3c0 - 0x3c0: 0x481fc2f510e5268a, 0x3c1: 0x7565c28164204849, - // Block 0x10, offset 0x400 - 0x43f: 0x5676a62fd49c6bec, - // Block 0x11, offset 0x440 - 0x440: 0x2f2d15776cbafc6b, 0x441: 0x4c55e8dc0ff11a3f, - // Block 0x12, offset 0x480 - 0x4bf: 0x69d6f0fe711fafc9, - // Block 0x13, offset 0x4c0 - 0x4c0: 0x33181de28cfb062d, 0x4c1: 0x2ef3adc6bb2f2d02, - // Block 0x14, offset 0x500 - 0x53f: 0xe03b31814c95f8b, - // Block 0x15, offset 0x540 - 0x540: 0x3bf6dc9a1c115603, 0x541: 0x6984ec9b7f51f7fc, - // Block 0x16, offset 0x580 - 0x5bf: 0x3c02ea92fb168559, - // Block 0x17, offset 0x5c0 - 0x5c0: 0x1badfe42e7629494, 0x5c1: 0x6dc4a554005f7645, - // Block 0x18, offset 0x600 - 0x63f: 0x3bb2ed2a72748f4b, - // Block 0x19, offset 0x640 - 0x640: 0x291354cd6767ec10, 0x641: 0x2c3a4715e3c070d6, - // Block 0x1a, offset 0x680 - 0x6bf: 0x352711cfb7236418, - // Block 0x1b, offset 0x6c0 - 0x6c0: 0x3a59d34fb8bceda, 0x6c1: 0x5e90d8ebedd64fa1, - // Block 0x1c, offset 0x700 - 0x73f: 0x7191a77b28d23110, - // Block 0x1d, offset 0x740 - 0x740: 0x4ca7f0c1623423d8, 0x741: 0x4f7156d996e2d0de, - // Block 0x1e, offset 0x780 - // Block 0x1f, offset 0x7c0 -} - -// multiIndex: 29 blocks, 1856 entries, 1856 bytes -// Block 0 is the zero block. -var multiIndex = [1856]uint8{ - // Block 0x0, offset 0x0 - // Block 0x1, offset 0x40 - // Block 0x2, offset 0x80 - // Block 0x3, offset 0xc0 - 0xc2: 0x01, 0xc3: 0x02, 0xc4: 0x03, 0xc7: 0x04, - 0xc8: 0x05, 0xcf: 0x06, - 0xd0: 0x07, - 0xdf: 0x08, - 0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05, 0xe4: 0x06, 0xe7: 0x07, - 0xe8: 0x08, 0xef: 0x09, - 0xf0: 0x0e, 0xf1: 0x11, 0xf2: 0x13, 0xf3: 0x15, 0xf4: 0x17, - // Block 0x4, offset 0x100 - 0x120: 0x09, - 0x13f: 0x0a, - // Block 0x5, offset 0x140 - 0x140: 0x0b, - 0x17f: 0x0c, - // Block 0x6, offset 0x180 - 0x180: 0x0d, - // Block 0x7, offset 0x1c0 - 0x1ff: 0x0e, - // Block 0x8, offset 0x200 - 0x200: 0x0f, - // Block 0x9, offset 0x240 - 0x27f: 0x10, - // Block 0xa, offset 0x280 - 0x280: 0x11, - // Block 0xb, offset 0x2c0 - 0x2ff: 0x12, - // Block 0xc, offset 0x300 - 0x300: 0x13, - // Block 0xd, offset 0x340 - 0x37f: 0x14, - // Block 0xe, offset 0x380 - 0x380: 0x15, - // Block 0xf, offset 0x3c0 - 0x3ff: 0x16, - // Block 0x10, offset 0x400 - 0x410: 0x0a, - 0x41f: 0x0b, - 0x420: 0x0c, - 0x43f: 0x0d, - // Block 0x11, offset 0x440 - 0x440: 0x17, - // Block 0x12, offset 0x480 - 0x4bf: 0x18, - // Block 0x13, offset 0x4c0 - 0x4c0: 0x0f, - 0x4ff: 0x10, - // Block 0x14, offset 0x500 - 0x500: 0x19, - // Block 0x15, offset 0x540 - 0x540: 0x12, - // Block 0x16, offset 0x580 - 0x5bf: 0x1a, - // Block 0x17, offset 0x5c0 - 0x5ff: 0x14, - // Block 0x18, offset 0x600 - 0x600: 0x1b, - // Block 0x19, offset 0x640 - 0x640: 0x16, - // Block 0x1a, offset 0x680 - // Block 0x1b, offset 0x6c0 - 0x6c2: 0x01, 0x6c3: 0x02, 0x6c4: 0x03, 0x6c7: 0x04, - 0x6c8: 0x05, 0x6cf: 0x06, - 0x6d0: 0x07, - 0x6df: 0x08, - 0x6e0: 0x02, 0x6e1: 0x03, 0x6e2: 0x04, 0x6e3: 0x05, 0x6e4: 0x06, 0x6e7: 0x07, - 0x6e8: 0x08, 0x6ef: 0x09, - // Block 0x1c, offset 0x700 - 0x730: 0x0e, 0x731: 0x11, 0x732: 0x13, 0x733: 0x15, 0x734: 0x17, -} diff --git a/vendor/golang.org/x/text/internal/triegen/example_compact_test.go b/vendor/golang.org/x/text/internal/triegen/example_compact_test.go deleted file mode 100644 index 7cf604ca..00000000 --- a/vendor/golang.org/x/text/internal/triegen/example_compact_test.go +++ /dev/null @@ -1,71 +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 triegen_test - -import ( - "fmt" - "io" - "io/ioutil" - - "golang.org/x/text/internal/triegen" -) - -func ExampleCompacter() { - t := triegen.NewTrie("root") - for r := rune(0); r < 10000; r += 64 { - t.Insert(r, 0x9015BADA55^uint64(r)) - } - sz, _ := t.Gen(ioutil.Discard) - - fmt.Printf("Size normal: %5d\n", sz) - - var c myCompacter - sz, _ = t.Gen(ioutil.Discard, triegen.Compact(&c)) - - fmt.Printf("Size compacted: %5d\n", sz) - - // Output: - // Size normal: 81344 - // Size compacted: 3224 -} - -// A myCompacter accepts a block if only the first value is given. -type myCompacter []uint64 - -func (c *myCompacter) Size(values []uint64) (sz int, ok bool) { - for _, v := range values[1:] { - if v != 0 { - return 0, false - } - } - return 8, true // the size of a uint64 -} - -func (c *myCompacter) Store(v []uint64) uint32 { - x := uint32(len(*c)) - *c = append(*c, v[0]) - return x -} - -func (c *myCompacter) Print(w io.Writer) error { - fmt.Fprintln(w, "var firstValue = []uint64{") - for _, v := range *c { - fmt.Fprintf(w, "\t%#x,\n", v) - } - fmt.Fprintln(w, "}") - return nil -} - -func (c *myCompacter) Handler() string { - return "getFirstValue" - - // Where getFirstValue is included along with the generated code: - // func getFirstValue(n uint32, b byte) uint64 { - // if b == 0x80 { // the first continuation byte - // return firstValue[n] - // } - // return 0 - // } -} diff --git a/vendor/golang.org/x/text/internal/triegen/example_test.go b/vendor/golang.org/x/text/internal/triegen/example_test.go deleted file mode 100644 index 557a152e..00000000 --- a/vendor/golang.org/x/text/internal/triegen/example_test.go +++ /dev/null @@ -1,148 +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 triegen_test - -import ( - "fmt" - "io/ioutil" - "math/rand" - "unicode" - - "golang.org/x/text/internal/triegen" -) - -const seed = 0x12345 - -var genWriter = ioutil.Discard - -func randomRunes() map[rune]uint8 { - rnd := rand.New(rand.NewSource(seed)) - m := map[rune]uint8{} - for len(m) < 100 { - // Only set our random rune if it is a valid Unicode code point. - if r := rune(rnd.Int31n(unicode.MaxRune + 1)); []rune(string(r))[0] == r { - m[r] = 1 - } - } - return m -} - -// Example_build shows how to build a simple trie. It assigns the value 1 to -// 100 random runes generated by randomRunes. -func Example_build() { - t := triegen.NewTrie("rand") - - for r, _ := range randomRunes() { - t.Insert(r, 1) - } - sz, err := t.Gen(genWriter) - - fmt.Printf("Trie size: %d bytes\n", sz) - fmt.Printf("Error: %v\n", err) - - // Output: - // Trie size: 9280 bytes - // Error: -} - -// Example_lookup demonstrates how to use the trie generated by Example_build. -func Example_lookup() { - trie := newRandTrie(0) - - // The same set of runes used by Example_build. - runes := randomRunes() - - // Verify the right value is returned for all runes. - for r := rune(0); r <= unicode.MaxRune; r++ { - // Note that the return type of lookup is uint8. - if v, _ := trie.lookupString(string(r)); v != runes[r] { - fmt.Println("FAILURE") - return - } - } - fmt.Println("SUCCESS") - - // Output: - // SUCCESS -} - -// runeValues generates some random values for a set of interesting runes. -func runeValues() map[rune]uint64 { - rnd := rand.New(rand.NewSource(seed)) - m := map[rune]uint64{} - for p := 4; p <= unicode.MaxRune; p <<= 1 { - for d := -1; d <= 1; d++ { - m[rune(p+d)] = uint64(rnd.Int63()) - } - } - return m -} - -// ExampleGen_build demonstrates the creation of multiple tries sharing common -// blocks. ExampleGen_lookup demonstrates how to use the generated tries. -func ExampleGen_build() { - var tries []*triegen.Trie - - rv := runeValues() - for _, c := range []struct { - include func(rune) bool - name string - }{ - {func(r rune) bool { return true }, "all"}, - {func(r rune) bool { return r < 0x80 }, "ASCII only"}, - {func(r rune) bool { return r < 0x80 }, "ASCII only 2"}, - {func(r rune) bool { return r <= 0xFFFF }, "BMP only"}, - {func(r rune) bool { return r > 0xFFFF }, "No BMP"}, - } { - t := triegen.NewTrie(c.name) - tries = append(tries, t) - - for r, v := range rv { - if c.include(r) { - t.Insert(r, v) - } - } - } - sz, err := triegen.Gen(genWriter, "multi", tries) - - fmt.Printf("Trie size: %d bytes\n", sz) - fmt.Printf("Error: %v\n", err) - - // Output: - // Trie size: 18250 bytes - // Error: -} - -// ExampleGen_lookup shows how to look up values in the trie generated by -// ExampleGen_build. -func ExampleGen_lookup() { - rv := runeValues() - for i, include := range []func(rune) bool{ - func(r rune) bool { return true }, // all - func(r rune) bool { return r < 0x80 }, // ASCII only - func(r rune) bool { return r < 0x80 }, // ASCII only 2 - func(r rune) bool { return r <= 0xFFFF }, // BMP only - func(r rune) bool { return r > 0xFFFF }, // No BMP - } { - t := newMultiTrie(i) - - for r := rune(0); r <= unicode.MaxRune; r++ { - x := uint64(0) - if include(r) { - x = rv[r] - } - // As we convert from a valid rune, we know it is safe to use - // lookupStringUnsafe. - if v := t.lookupStringUnsafe(string(r)); x != v { - fmt.Println("FAILURE") - return - } - } - } - fmt.Println("SUCCESS") - - // Output: - // SUCCESS -} diff --git a/vendor/golang.org/x/text/internal/triegen/gen_test.go b/vendor/golang.org/x/text/internal/triegen/gen_test.go deleted file mode 100644 index 831627d7..00000000 --- a/vendor/golang.org/x/text/internal/triegen/gen_test.go +++ /dev/null @@ -1,68 +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 generate - -package triegen_test - -// The code in this file generates captures and writes the tries generated in -// the examples to data_test.go. To invoke it, run: -// go test -tags=generate -// -// Making the generation code a "test" allows us to link in the necessary test -// code. - -import ( - "log" - "os" - "os/exec" -) - -func init() { - const tmpfile = "tmpout" - const dstfile = "data_test.go" - - f, err := os.Create(tmpfile) - if err != nil { - log.Fatalf("Could not create output file: %v", err) - } - defer os.Remove(tmpfile) - defer f.Close() - - // We exit before this function returns, regardless of success or failure, - // so there's no need to save (and later restore) the existing genWriter - // value. - genWriter = f - - f.Write([]byte(header)) - - Example_build() - ExampleGen_build() - - if err := exec.Command("gofmt", "-w", tmpfile).Run(); err != nil { - log.Fatal(err) - } - os.Remove(dstfile) - os.Rename(tmpfile, dstfile) - - os.Exit(0) -} - -const header = `// This file is generated with "go test -tags generate". DO NOT EDIT! -// +build !generate - -package triegen_test -` - -// Stubs for generated tries. These are needed as we exclude data_test.go if -// the generate flag is set. This will clearly make the tests fail, but that -// is okay. It allows us to bootstrap. - -type trie struct{} - -func (t *trie) lookupString(string) (uint8, int) { return 0, 1 } -func (t *trie) lookupStringUnsafe(string) uint64 { return 0 } - -func newRandTrie(i int) *trie { return &trie{} } -func newMultiTrie(i int) *trie { return &trie{} } diff --git a/vendor/golang.org/x/text/internal/ucd/example_test.go b/vendor/golang.org/x/text/internal/ucd/example_test.go deleted file mode 100644 index 338a50d1..00000000 --- a/vendor/golang.org/x/text/internal/ucd/example_test.go +++ /dev/null @@ -1,81 +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 ucd_test - -import ( - "fmt" - "strings" - - "golang.org/x/text/internal/ucd" -) - -func Example() { - // Read rune-by-rune from UnicodeData. - var count int - p := ucd.New(strings.NewReader(unicodeData)) - for p.Next() { - count++ - if lower := p.Runes(ucd.SimpleLowercaseMapping); lower != nil { - fmt.Printf("lower(%U) -> %U\n", p.Rune(0), lower[0]) - } - } - if err := p.Err(); err != nil { - fmt.Println(err) - } - fmt.Println("Number of runes visited:", count) - - // Read raw ranges from Scripts. - p = ucd.New(strings.NewReader(scripts), ucd.KeepRanges) - for p.Next() { - start, end := p.Range(0) - fmt.Printf("%04X..%04X: %s\n", start, end, p.String(1)) - } - if err := p.Err(); err != nil { - fmt.Println(err) - } - - // Output: - // lower(U+00C0) -> U+00E0 - // lower(U+00C1) -> U+00E1 - // lower(U+00C2) -> U+00E2 - // lower(U+00C3) -> U+00E3 - // lower(U+00C4) -> U+00E4 - // Number of runes visited: 6594 - // 0000..001F: Common - // 0020..0020: Common - // 0021..0023: Common - // 0024..0024: Common -} - -// Excerpt from UnicodeData.txt -const unicodeData = ` -00B9;SUPERSCRIPT ONE;No;0;EN; 0031;;1;1;N;SUPERSCRIPT DIGIT ONE;;;; -00BA;MASCULINE ORDINAL INDICATOR;Lo;0;L; 006F;;;;N;;;;; -00BB;RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK;Pf;0;ON;;;;;Y;RIGHT POINTING GUILLEMET;;;; -00BC;VULGAR FRACTION ONE QUARTER;No;0;ON; 0031 2044 0034;;;1/4;N;FRACTION ONE QUARTER;;;; -00BD;VULGAR FRACTION ONE HALF;No;0;ON; 0031 2044 0032;;;1/2;N;FRACTION ONE HALF;;;; -00BE;VULGAR FRACTION THREE QUARTERS;No;0;ON; 0033 2044 0034;;;3/4;N;FRACTION THREE QUARTERS;;;; -00BF;INVERTED QUESTION MARK;Po;0;ON;;;;;N;;;;; -00C0;LATIN CAPITAL LETTER A WITH GRAVE;Lu;0;L;0041 0300;;;;N;LATIN CAPITAL LETTER A GRAVE;;;00E0; -00C1;LATIN CAPITAL LETTER A WITH ACUTE;Lu;0;L;0041 0301;;;;N;LATIN CAPITAL LETTER A ACUTE;;;00E1; -00C2;LATIN CAPITAL LETTER A WITH CIRCUMFLEX;Lu;0;L;0041 0302;;;;N;LATIN CAPITAL LETTER A CIRCUMFLEX;;;00E2; -00C3;LATIN CAPITAL LETTER A WITH TILDE;Lu;0;L;0041 0303;;;;N;LATIN CAPITAL LETTER A TILDE;;;00E3; -00C4;LATIN CAPITAL LETTER A WITH DIAERESIS;Lu;0;L;0041 0308;;;;N;LATIN CAPITAL LETTER A DIAERESIS;;;00E4; - -# A legacy rune range. -3400;;Lo;0;L;;;;;N;;;;; -4DB5;;Lo;0;L;;;;;N;;;;; -` - -// Excerpt from Scripts.txt -const scripts = ` -# Property: Script -# ================================================ - -0000..001F ; Common # Cc [32] .. -0020 ; Common # Zs SPACE -0021..0023 ; Common # Po [3] EXCLAMATION MARK..NUMBER SIGN -0024 ; Common # Sc DOLLAR SIGN -` diff --git a/vendor/golang.org/x/text/internal/ucd/ucd_test.go b/vendor/golang.org/x/text/internal/ucd/ucd_test.go deleted file mode 100644 index 11a6542e..00000000 --- a/vendor/golang.org/x/text/internal/ucd/ucd_test.go +++ /dev/null @@ -1,105 +0,0 @@ -package ucd - -import ( - "strings" - "testing" -) - -const file = ` -# Comments should be skipped -# rune; bool; uint; int; float; runes; # Y -0..0005; Y; 0; 2; -5.25 ; 0 1 2 3 4 5; -6..0007; Yes ; 6; 1; -4.25 ; 0006 0007; -8; T ; 8 ; 0 ;-3.25 ;;# T -9; True ;9 ; -1;-2.25 ; 0009; - -# more comments to be ignored -@Part0 - -A; N; 10 ; -2; -1.25; ;# N -B; No; 11 ; -3; -0.25; -C; False;12; -4; 0.75; -D; ;13;-5;1.75; - -@Part1 # Another part. -# We test part comments get removed by not commenting the the next line. -E..10FFFF; F; 14 ; -6; 2.75; -` - -var want = []struct { - start, end rune -}{ - {0x00, 0x05}, - {0x06, 0x07}, - {0x08, 0x08}, - {0x09, 0x09}, - {0x0A, 0x0A}, - {0x0B, 0x0B}, - {0x0C, 0x0C}, - {0x0D, 0x0D}, - {0x0E, 0x10FFFF}, -} - -func TestGetters(t *testing.T) { - parts := [][2]string{ - {"Part0", ""}, - {"Part1", "Another part."}, - } - handler := func(p *Parser) { - if len(parts) == 0 { - t.Error("Part handler invoked too many times.") - return - } - want := parts[0] - parts = parts[1:] - if got0, got1 := p.String(0), p.Comment(); got0 != want[0] || got1 != want[1] { - t.Errorf(`part: got %q, %q; want %q"`, got0, got1, want) - } - } - - p := New(strings.NewReader(file), KeepRanges, Part(handler)) - for i := 0; p.Next(); i++ { - start, end := p.Range(0) - w := want[i] - if start != w.start || end != w.end { - t.Fatalf("%d:Range(0); got %#x..%#x; want %#x..%#x", i, start, end, w.start, w.end) - } - if w.start == w.end && p.Rune(0) != w.start { - t.Errorf("%d:Range(0).start: got %U; want %U", i, p.Rune(0), w.start) - } - if got, want := p.Bool(1), w.start <= 9; got != want { - t.Errorf("%d:Bool(1): got %v; want %v", i, got, want) - } - if got := p.Rune(4); got != 0 || p.Err() == nil { - t.Errorf("%d:Rune(%q): got no error; want error", i, p.String(1)) - } - p.err = nil - if got := p.Uint(2); rune(got) != start { - t.Errorf("%d:Uint(2): got %v; want %v", i, got, start) - } - if got, want := p.Int(3), 2-i; got != want { - t.Errorf("%d:Int(3): got %v; want %v", i, got, want) - } - if got, want := p.Float(4), -5.25+float64(i); got != want { - t.Errorf("%d:Int(3): got %v; want %v", i, got, want) - } - if got := p.Runes(5); got == nil { - if p.String(5) != "" { - t.Errorf("%d:Runes(5): expected non-empty list", i) - } - } else { - if got[0] != start || got[len(got)-1] != end { - t.Errorf("%d:Runes(5): got %#x; want %#x..%#x", i, got, start, end) - } - } - if got := p.Comment(); got != "" && got != p.String(1) { - t.Errorf("%d:Comment(): got %v; want %v", i, got, p.String(1)) - } - } - if err := p.Err(); err != nil { - t.Errorf("Parser error: %v", err) - } - if len(parts) != 0 { - t.Errorf("expected %d more invocations of part handler", len(parts)) - } -} diff --git a/vendor/golang.org/x/text/language/Makefile b/vendor/golang.org/x/text/language/Makefile deleted file mode 100644 index 79f00578..00000000 --- a/vendor/golang.org/x/text/language/Makefile +++ /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. - -CLEANFILES+=maketables - -maketables: maketables.go - go build $^ - -tables: maketables - ./maketables > tables.go - gofmt -w -s tables.go - -# Build (but do not run) maketables during testing, -# just to make sure it still compiles. -testshort: maketables diff --git a/vendor/golang.org/x/text/language/coverage_test.go b/vendor/golang.org/x/text/language/coverage_test.go deleted file mode 100644 index 8e08e5ca..00000000 --- a/vendor/golang.org/x/text/language/coverage_test.go +++ /dev/null @@ -1,154 +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 language - -import ( - "fmt" - "reflect" - "testing" -) - -func TestSupported(t *testing.T) { - // To prove the results are correct for a type, we test that the number of - // results is identical to the number of results on record, that all results - // are distinct and that all results are valid. - tests := map[string]int{ - "BaseLanguages": numLanguages, - "Scripts": numScripts, - "Regions": numRegions, - "Tags": 0, - } - sup := reflect.ValueOf(Supported) - for name, num := range tests { - v := sup.MethodByName(name).Call(nil)[0] - if n := v.Len(); n != num { - t.Errorf("len(%s()) was %d; want %d", name, n, num) - } - dup := make(map[string]bool) - for i := 0; i < v.Len(); i++ { - x := v.Index(i).Interface() - // An invalid value will either cause a crash or result in a - // duplicate when passed to Sprint. - s := fmt.Sprint(x) - if dup[s] { - t.Errorf("%s: duplicate entry %q", name, s) - } - dup[s] = true - } - if len(dup) != v.Len() { - t.Errorf("%s: # unique entries was %d; want %d", name, len(dup), v.Len()) - } - } -} - -func TestNewCoverage(t *testing.T) { - bases := []Base{Base{0}, Base{3}, Base{7}} - scripts := []Script{Script{11}, Script{17}, Script{23}} - regions := []Region{Region{101}, Region{103}, Region{107}} - tags := []Tag{Make("pt"), Make("en"), Make("en-GB"), Make("en-US"), Make("pt-PT")} - fbases := func() []Base { return bases } - fscripts := func() []Script { return scripts } - fregions := func() []Region { return regions } - ftags := func() []Tag { return tags } - - tests := []struct { - desc string - list []interface{} - bases []Base - scripts []Script - regions []Region - tags []Tag - }{ - { - desc: "empty", - }, - { - desc: "bases", - list: []interface{}{bases}, - bases: bases, - }, - { - desc: "scripts", - list: []interface{}{scripts}, - scripts: scripts, - }, - { - desc: "regions", - list: []interface{}{regions}, - regions: regions, - }, - { - desc: "bases derives from tags", - list: []interface{}{tags}, - bases: []Base{Base{_en}, Base{_pt}}, - tags: tags, - }, - { - desc: "tags and bases", - list: []interface{}{tags, bases}, - bases: bases, - tags: tags, - }, - { - desc: "fully specified", - list: []interface{}{tags, bases, scripts, regions}, - bases: bases, - scripts: scripts, - regions: regions, - tags: tags, - }, - { - desc: "bases func", - list: []interface{}{fbases}, - bases: bases, - }, - { - desc: "scripts func", - list: []interface{}{fscripts}, - scripts: scripts, - }, - { - desc: "regions func", - list: []interface{}{fregions}, - regions: regions, - }, - { - desc: "tags func", - list: []interface{}{ftags}, - bases: []Base{Base{_en}, Base{_pt}}, - tags: tags, - }, - { - desc: "tags and bases", - list: []interface{}{ftags, fbases}, - bases: bases, - tags: tags, - }, - { - desc: "fully specified", - list: []interface{}{ftags, fbases, fscripts, fregions}, - bases: bases, - scripts: scripts, - regions: regions, - tags: tags, - }, - } - - for i, tt := range tests { - l := NewCoverage(tt.list...) - if a := l.BaseLanguages(); !reflect.DeepEqual(a, tt.bases) { - t.Errorf("%d:%s: BaseLanguages was %v; want %v", i, tt.desc, a, tt.bases) - } - if a := l.Scripts(); !reflect.DeepEqual(a, tt.scripts) { - t.Errorf("%d:%s: Scripts was %v; want %v", i, tt.desc, a, tt.scripts) - } - if a := l.Regions(); !reflect.DeepEqual(a, tt.regions) { - t.Errorf("%d:%s: Regions was %v; want %v", i, tt.desc, a, tt.regions) - } - if a := l.Tags(); !reflect.DeepEqual(a, tt.tags) { - t.Errorf("%d:%s: Tags was %v; want %v", i, tt.desc, a, tt.tags) - } - } -} diff --git a/vendor/golang.org/x/text/language/examples_test.go b/vendor/golang.org/x/text/language/examples_test.go deleted file mode 100644 index d5e8176d..00000000 --- a/vendor/golang.org/x/text/language/examples_test.go +++ /dev/null @@ -1,413 +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 language_test - -import ( - "fmt" - "net/http" - - "golang.org/x/text/language" -) - -func ExampleCanonType() { - p := func(id string) { - fmt.Printf("Default(%s) -> %s\n", id, language.Make(id)) - fmt.Printf("BCP47(%s) -> %s\n", id, language.BCP47.Make(id)) - fmt.Printf("Macro(%s) -> %s\n", id, language.Macro.Make(id)) - fmt.Printf("All(%s) -> %s\n", id, language.All.Make(id)) - } - p("en-Latn") - p("sh") - p("zh-cmn") - p("bjd") - p("iw-Latn-fonipa-u-cu-usd") - // Output: - // Default(en-Latn) -> en-Latn - // BCP47(en-Latn) -> en - // Macro(en-Latn) -> en-Latn - // All(en-Latn) -> en - // Default(sh) -> sr-Latn - // BCP47(sh) -> sh - // Macro(sh) -> sh - // All(sh) -> sr-Latn - // Default(zh-cmn) -> cmn - // BCP47(zh-cmn) -> cmn - // Macro(zh-cmn) -> zh - // All(zh-cmn) -> zh - // Default(bjd) -> drl - // BCP47(bjd) -> drl - // Macro(bjd) -> bjd - // All(bjd) -> drl - // Default(iw-Latn-fonipa-u-cu-usd) -> he-Latn-fonipa-u-cu-usd - // BCP47(iw-Latn-fonipa-u-cu-usd) -> he-Latn-fonipa-u-cu-usd - // Macro(iw-Latn-fonipa-u-cu-usd) -> iw-Latn-fonipa-u-cu-usd - // All(iw-Latn-fonipa-u-cu-usd) -> he-Latn-fonipa-u-cu-usd -} - -func ExampleTag_Base() { - fmt.Println(language.Make("und").Base()) - fmt.Println(language.Make("und-US").Base()) - fmt.Println(language.Make("und-NL").Base()) - fmt.Println(language.Make("und-419").Base()) // Latin America - fmt.Println(language.Make("und-ZZ").Base()) - // Output: - // en Low - // en High - // nl High - // es Low - // en Low -} - -func ExampleTag_Script() { - en := language.Make("en") - sr := language.Make("sr") - sr_Latn := language.Make("sr_Latn") - fmt.Println(en.Script()) - fmt.Println(sr.Script()) - // Was a script explicitly specified? - _, c := sr.Script() - fmt.Println(c == language.Exact) - _, c = sr_Latn.Script() - fmt.Println(c == language.Exact) - // Output: - // Latn High - // Cyrl Low - // false - // true -} - -func ExampleTag_Region() { - ru := language.Make("ru") - en := language.Make("en") - fmt.Println(ru.Region()) - fmt.Println(en.Region()) - // Output: - // RU Low - // US Low -} - -func ExampleRegion_TLD() { - us := language.MustParseRegion("US") - gb := language.MustParseRegion("GB") - uk := language.MustParseRegion("UK") - bu := language.MustParseRegion("BU") - - fmt.Println(us.TLD()) - fmt.Println(gb.TLD()) - fmt.Println(uk.TLD()) - fmt.Println(bu.TLD()) - - fmt.Println(us.Canonicalize().TLD()) - fmt.Println(gb.Canonicalize().TLD()) - fmt.Println(uk.Canonicalize().TLD()) - fmt.Println(bu.Canonicalize().TLD()) - // Output: - // US - // UK - // UK - // ZZ language: region is not a valid ccTLD - // US - // UK - // UK - // MM -} - -func ExampleCompose() { - nl, _ := language.ParseBase("nl") - us, _ := language.ParseRegion("US") - de := language.Make("de-1901-u-co-phonebk") - jp := language.Make("ja-JP") - fi := language.Make("fi-x-ing") - - u, _ := language.ParseExtension("u-nu-arabic") - x, _ := language.ParseExtension("x-piglatin") - - // Combine a base language and region. - fmt.Println(language.Compose(nl, us)) - // Combine a base language and extension. - fmt.Println(language.Compose(nl, x)) - // Replace the region. - fmt.Println(language.Compose(jp, us)) - // Combine several tags. - fmt.Println(language.Compose(us, nl, u)) - - // Replace the base language of a tag. - fmt.Println(language.Compose(de, nl)) - fmt.Println(language.Compose(de, nl, u)) - // Remove the base language. - fmt.Println(language.Compose(de, language.Base{})) - // Remove all variants. - fmt.Println(language.Compose(de, []language.Variant{})) - // Remove all extensions. - fmt.Println(language.Compose(de, []language.Extension{})) - fmt.Println(language.Compose(fi, []language.Extension{})) - // Remove all variants and extensions. - fmt.Println(language.Compose(de.Raw())) - - // An error is gobbled or returned if non-nil. - fmt.Println(language.Compose(language.ParseRegion("ZA"))) - fmt.Println(language.Compose(language.ParseRegion("HH"))) - - // Compose uses the same Default canonicalization as Make. - fmt.Println(language.Compose(language.Raw.Parse("en-Latn-UK"))) - - // Call compose on a different CanonType for different results. - fmt.Println(language.All.Compose(language.Raw.Parse("en-Latn-UK"))) - - // Output: - // nl-US - // nl-x-piglatin - // ja-US - // nl-US-u-nu-arabic - // nl-1901-u-co-phonebk - // nl-1901-u-nu-arabic - // und-1901-u-co-phonebk - // de-u-co-phonebk - // de-1901 - // fi - // de - // und-ZA - // und language: subtag "HH" is well-formed but unknown - // en-Latn-GB - // en-GB -} - -func ExampleParse_errors() { - for _, s := range []string{"Foo", "Bar", "Foobar"} { - _, err := language.Parse(s) - if err != nil { - if inv, ok := err.(language.ValueError); ok { - fmt.Println(inv.Subtag()) - } else { - fmt.Println(s) - } - } - } - for _, s := range []string{"en", "aa-Uuuu", "AC", "ac-u"} { - _, err := language.Parse(s) - switch e := err.(type) { - case language.ValueError: - fmt.Printf("%s: culprit %q\n", s, e.Subtag()) - case nil: - // No error. - default: - // A syntax error. - fmt.Printf("%s: ill-formed\n", s) - } - } - // Output: - // foo - // Foobar - // aa-Uuuu: culprit "Uuuu" - // AC: culprit "ac" - // ac-u: ill-formed -} - -func ExampleParent() { - p := func(tag string) { - fmt.Printf("parent(%v): %v\n", tag, language.Make(tag).Parent()) - } - p("zh-CN") - - // Australian English inherits from World English. - p("en-AU") - - // If the tag has a different maximized script from its parent, a tag with - // this maximized script is inserted. This allows different language tags - // which have the same base language and script in common to inherit from - // a common set of settings. - p("zh-HK") - - // If the maximized script of the parent is not identical, CLDR will skip - // inheriting from it, as it means there will not be many entries in common - // and inheriting from it is nonsensical. - p("zh-Hant") - - // The parent of a tag with variants and extensions is the tag with all - // variants and extensions removed. - p("de-1994-u-co-phonebk") - - // Remove default script. - p("de-Latn-LU") - - // Output: - // parent(zh-CN): zh - // parent(en-AU): en-001 - // parent(zh-HK): zh-Hant - // parent(zh-Hant): und - // parent(de-1994-u-co-phonebk): de - // parent(de-Latn-LU): de -} - -// ExampleMatcher_bestMatch gives some examples of getting the best match of -// a set of tags to any of the tags of given set. -func ExampleMatcher() { - // This is the set of tags from which we want to pick the best match. These - // can be, for example, the supported languages for some package. - tags := []language.Tag{ - language.English, - language.BritishEnglish, - language.French, - language.Afrikaans, - language.BrazilianPortuguese, - language.EuropeanPortuguese, - language.Croatian, - language.SimplifiedChinese, - language.Raw.Make("iw-IL"), - language.Raw.Make("iw"), - language.Raw.Make("he"), - } - m := language.NewMatcher(tags) - - // A simple match. - fmt.Println(m.Match(language.Make("fr"))) - - // Australian English is closer to British than American English. - fmt.Println(m.Match(language.Make("en-AU"))) - - // Default to the first tag passed to the Matcher if there is no match. - fmt.Println(m.Match(language.Make("ar"))) - - // Get the default tag. - fmt.Println(m.Match()) - - fmt.Println("----") - - // Someone specifying sr-Latn is probably fine with getting Croatian. - fmt.Println(m.Match(language.Make("sr-Latn"))) - - // We match SimplifiedChinese, but with Low confidence. - fmt.Println(m.Match(language.TraditionalChinese)) - - // Serbian in Latin script is a closer match to Croatian than Traditional - // Chinese to Simplified Chinese. - fmt.Println(m.Match(language.TraditionalChinese, language.Make("sr-Latn"))) - - fmt.Println("----") - - // In case a multiple variants of a language are available, the most spoken - // variant is typically returned. - fmt.Println(m.Match(language.Portuguese)) - - // Pick the first value passed to Match in case of a tie. - fmt.Println(m.Match(language.Dutch, language.Make("fr-BE"), language.Make("af-NA"))) - fmt.Println(m.Match(language.Dutch, language.Make("af-NA"), language.Make("fr-BE"))) - - fmt.Println("----") - - // If a Matcher is initialized with a language and it's deprecated version, - // it will distinguish between them. - fmt.Println(m.Match(language.Raw.Make("iw"))) - - // However, for non-exact matches, it will treat deprecated versions as - // equivalent and consider other factors first. - fmt.Println(m.Match(language.Raw.Make("he-IL"))) - - fmt.Println("----") - - // User settings passed to the Unicode extension are ignored for matching - // and preserved in the returned tag. - fmt.Println(m.Match(language.Make("de-u-co-phonebk"), language.Make("fr-u-cu-frf"))) - - // Even if the matching language is different. - fmt.Println(m.Match(language.Make("de-u-co-phonebk"), language.Make("br-u-cu-frf"))) - - // If there is no matching language, the options of the first preferred tag are used. - fmt.Println(m.Match(language.Make("de-u-co-phonebk"))) - - // Output: - // fr 2 Exact - // en-GB 1 High - // en 0 No - // en 0 No - // ---- - // hr 6 High - // zh-Hans 7 Low - // hr 6 High - // ---- - // pt-BR 4 High - // fr 2 High - // af 3 High - // ---- - // iw 9 Exact - // he 10 Exact - // ---- - // fr-u-cu-frf 2 Exact - // fr-u-cu-frf 2 High - // en-u-co-phonebk 0 No - - // TODO: "he" should be "he-u-rg-IL High" -} - -func ExampleMatchStrings() { - // languages supported by this service: - matcher := language.NewMatcher([]language.Tag{ - language.English, language.Dutch, language.German, - }) - - http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - lang, _ := r.Cookie("lang") - tag, _ := language.MatchStrings(matcher, lang.String(), r.Header.Get("Accept-Language")) - - fmt.Println("User language:", tag) - }) -} - -func ExampleComprehends() { - // Various levels of comprehensibility. - fmt.Println(language.Comprehends(language.English, language.English)) - fmt.Println(language.Comprehends(language.AmericanEnglish, language.BritishEnglish)) - - // An explicit Und results in no match. - fmt.Println(language.Comprehends(language.English, language.Und)) - - fmt.Println("----") - - // There is usually no mutual comprehensibility between different scripts. - fmt.Println(language.Comprehends(language.Make("en-Dsrt"), language.English)) - - // One exception is for Traditional versus Simplified Chinese, albeit with - // a low confidence. - fmt.Println(language.Comprehends(language.TraditionalChinese, language.SimplifiedChinese)) - - fmt.Println("----") - - // A Swiss German speaker will often understand High German. - fmt.Println(language.Comprehends(language.Make("gsw"), language.Make("de"))) - - // The converse is not generally the case. - fmt.Println(language.Comprehends(language.Make("de"), language.Make("gsw"))) - - // Output: - // Exact - // High - // No - // ---- - // No - // Low - // ---- - // High - // No -} - -func ExampleTag_values() { - us := language.MustParseRegion("US") - en := language.MustParseBase("en") - - lang, _, region := language.AmericanEnglish.Raw() - fmt.Println(lang == en, region == us) - - lang, _, region = language.BritishEnglish.Raw() - fmt.Println(lang == en, region == us) - - // Tags can be compared for exact equivalence using '=='. - en_us, _ := language.Compose(en, us) - fmt.Println(en_us == language.AmericanEnglish) - - // Output: - // true true - // true false - // true -} diff --git a/vendor/golang.org/x/text/language/httpexample_test.go b/vendor/golang.org/x/text/language/httpexample_test.go deleted file mode 100644 index 40d0663c..00000000 --- a/vendor/golang.org/x/text/language/httpexample_test.go +++ /dev/null @@ -1,48 +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 language_test - -import ( - "fmt" - "net/http" - "strings" - - "golang.org/x/text/language" -) - -// matcher is a language.Matcher configured for all supported languages. -var matcher = language.NewMatcher([]language.Tag{ - language.BritishEnglish, - language.Norwegian, - language.German, -}) - -// handler is a http.HandlerFunc. -func handler(w http.ResponseWriter, r *http.Request) { - t, q, err := language.ParseAcceptLanguage(r.Header.Get("Accept-Language")) - // We ignore the error: the default language will be selected for t == nil. - tag, _, _ := matcher.Match(t...) - fmt.Printf("%5v (t: %6v; q: %3v; err: %v)\n", tag, t, q, err) -} - -func ExampleParseAcceptLanguage() { - for _, al := range []string{ - "nn;q=0.3, en-us;q=0.8, en,", - "gsw, en;q=0.7, en-US;q=0.8", - "gsw, nl, da", - "invalid", - } { - // Create dummy request with Accept-Language set and pass it to handler. - r, _ := http.NewRequest("GET", "example.com", strings.NewReader("Hello")) - r.Header.Set("Accept-Language", al) - handler(nil, r) - } - - // Output: - // en-GB (t: [ en en-US nn]; q: [ 1 0.8 0.3]; err: ) - // en-GB (t: [ gsw en-US en]; q: [ 1 0.8 0.7]; err: ) - // de (t: [ gsw nl da]; q: [ 1 1 1]; err: ) - // en-GB (t: []; q: []; err: language: tag is not well-formed) -} diff --git a/vendor/golang.org/x/text/language/language_test.go b/vendor/golang.org/x/text/language/language_test.go deleted file mode 100644 index 9e42d15d..00000000 --- a/vendor/golang.org/x/text/language/language_test.go +++ /dev/null @@ -1,911 +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 language - -import ( - "reflect" - "testing" - - "golang.org/x/text/internal/testtext" -) - -func TestTagSize(t *testing.T) { - id := Tag{} - typ := reflect.TypeOf(id) - if typ.Size() > 24 { - t.Errorf("size of Tag was %d; want 24", typ.Size()) - } -} - -func TestIsRoot(t *testing.T) { - loc := Tag{} - if !loc.IsRoot() { - t.Errorf("unspecified should be root.") - } - for i, tt := range parseTests() { - loc, _ := Parse(tt.in) - undef := tt.lang == "und" && tt.script == "" && tt.region == "" && tt.ext == "" - if loc.IsRoot() != undef { - t.Errorf("%d: was %v; want %v", i, loc.IsRoot(), undef) - } - } -} - -func TestEquality(t *testing.T) { - for i, tt := range parseTests()[48:49] { - s := tt.in - tag := Make(s) - t1 := Make(tag.String()) - if tag != t1 { - t.Errorf("%d:%s: equality test 1 failed\n got: %#v\nwant: %#v)", i, s, t1, tag) - } - t2, _ := Compose(tag) - if tag != t2 { - t.Errorf("%d:%s: equality test 2 failed\n got: %#v\nwant: %#v", i, s, t2, tag) - } - } -} - -func TestMakeString(t *testing.T) { - tests := []struct{ in, out string }{ - {"und", "und"}, - {"und", "und-CW"}, - {"nl", "nl-NL"}, - {"de-1901", "nl-1901"}, - {"de-1901", "de-Arab-1901"}, - {"x-a-b", "de-Arab-x-a-b"}, - {"x-a-b", "x-a-b"}, - } - for i, tt := range tests { - id, _ := Parse(tt.in) - mod, _ := Parse(tt.out) - id.setTagsFrom(mod) - for j := 0; j < 2; j++ { - id.remakeString() - if str := id.String(); str != tt.out { - t.Errorf("%d:%d: found %s; want %s", i, j, id.String(), tt.out) - } - } - // The bytes to string conversion as used in remakeString - // occasionally measures as more than one alloc, breaking this test. - // To alleviate this we set the number of runs to more than 1. - if n := testtext.AllocsPerRun(8, id.remakeString); n > 1 { - t.Errorf("%d: # allocs got %.1f; want <= 1", i, n) - } - } -} - -func TestCompactIndex(t *testing.T) { - tests := []struct { - tag string - index int - ok bool - }{ - // TODO: these values will change with each CLDR update. This issue - // will be solved if we decide to fix the indexes. - {"und", 0, true}, - {"ca-ES-valencia", 1, true}, - {"ca-ES-valencia-u-va-posix", 0, false}, - {"ca-ES-valencia-u-co-phonebk", 1, true}, - {"ca-ES-valencia-u-co-phonebk-va-posix", 0, false}, - {"x-klingon", 0, false}, - {"en-US", 232, true}, - {"en-US-u-va-posix", 2, true}, - {"en", 136, true}, - {"en-u-co-phonebk", 136, true}, - {"en-001", 137, true}, - {"sh", 0, false}, // We don't normalize. - } - for _, tt := range tests { - x, ok := CompactIndex(Raw.MustParse(tt.tag)) - if x != tt.index || ok != tt.ok { - t.Errorf("%s: got %d, %v; want %d %v", tt.tag, x, ok, tt.index, tt.ok) - } - } -} - -func TestMarshal(t *testing.T) { - testCases := []string{ - // TODO: these values will change with each CLDR update. This issue - // will be solved if we decide to fix the indexes. - "und", - "ca-ES-valencia", - "ca-ES-valencia-u-va-posix", - "ca-ES-valencia-u-co-phonebk", - "ca-ES-valencia-u-co-phonebk-va-posix", - "x-klingon", - "en-US", - "en-US-u-va-posix", - "en", - "en-u-co-phonebk", - "en-001", - "sh", - } - for _, tc := range testCases { - var tag Tag - err := tag.UnmarshalText([]byte(tc)) - if err != nil { - t.Errorf("UnmarshalText(%q): unexpected error: %v", tc, err) - } - b, err := tag.MarshalText() - if err != nil { - t.Errorf("MarshalText(%q): unexpected error: %v", tc, err) - } - if got := string(b); got != tc { - t.Errorf("%s: got %q; want %q", tc, got, tc) - } - } -} - -func TestBase(t *testing.T) { - tests := []struct { - loc, lang string - conf Confidence - }{ - {"und", "en", Low}, - {"x-abc", "und", No}, - {"en", "en", Exact}, - {"und-Cyrl", "ru", High}, - // If a region is not included, the official language should be English. - {"und-US", "en", High}, - // TODO: not-explicitly listed scripts should probably be und, No - // Modify addTags to return info on how the match was derived. - // {"und-Aghb", "und", No}, - } - for i, tt := range tests { - loc, _ := Parse(tt.loc) - lang, conf := loc.Base() - if lang.String() != tt.lang { - t.Errorf("%d: language was %s; want %s", i, lang, tt.lang) - } - if conf != tt.conf { - t.Errorf("%d: confidence was %d; want %d", i, conf, tt.conf) - } - } -} - -func TestParseBase(t *testing.T) { - tests := []struct { - in string - out string - ok bool - }{ - {"en", "en", true}, - {"EN", "en", true}, - {"nld", "nl", true}, - {"dut", "dut", true}, // bibliographic - {"aaj", "und", false}, // unknown - {"qaa", "qaa", true}, - {"a", "und", false}, - {"", "und", false}, - {"aaaa", "und", false}, - } - for i, tt := range tests { - x, err := ParseBase(tt.in) - if x.String() != tt.out || err == nil != tt.ok { - t.Errorf("%d:%s: was %s, %v; want %s, %v", i, tt.in, x, err == nil, tt.out, tt.ok) - } - if y, _, _ := Raw.Make(tt.out).Raw(); x != y { - t.Errorf("%d:%s: tag was %s; want %s", i, tt.in, x, y) - } - } -} - -func TestScript(t *testing.T) { - tests := []struct { - loc, scr string - conf Confidence - }{ - {"und", "Latn", Low}, - {"en-Latn", "Latn", Exact}, - {"en", "Latn", High}, - {"sr", "Cyrl", Low}, - {"kk", "Cyrl", High}, - {"kk-CN", "Arab", Low}, - {"cmn", "Hans", Low}, - {"ru", "Cyrl", High}, - {"ru-RU", "Cyrl", High}, - {"yue", "Hant", Low}, - {"x-abc", "Zzzz", Low}, - {"und-zyyy", "Zyyy", Exact}, - } - for i, tt := range tests { - loc, _ := Parse(tt.loc) - sc, conf := loc.Script() - if sc.String() != tt.scr { - t.Errorf("%d:%s: script was %s; want %s", i, tt.loc, sc, tt.scr) - } - if conf != tt.conf { - t.Errorf("%d:%s: confidence was %d; want %d", i, tt.loc, conf, tt.conf) - } - } -} - -func TestParseScript(t *testing.T) { - tests := []struct { - in string - out string - ok bool - }{ - {"Latn", "Latn", true}, - {"zzzz", "Zzzz", true}, - {"zyyy", "Zyyy", true}, - {"Latm", "Zzzz", false}, - {"Zzz", "Zzzz", false}, - {"", "Zzzz", false}, - {"Zzzxx", "Zzzz", false}, - } - for i, tt := range tests { - x, err := ParseScript(tt.in) - if x.String() != tt.out || err == nil != tt.ok { - t.Errorf("%d:%s: was %s, %v; want %s, %v", i, tt.in, x, err == nil, tt.out, tt.ok) - } - if err == nil { - if _, y, _ := Raw.Make("und-" + tt.out).Raw(); x != y { - t.Errorf("%d:%s: tag was %s; want %s", i, tt.in, x, y) - } - } - } -} - -func TestRegion(t *testing.T) { - tests := []struct { - loc, reg string - conf Confidence - }{ - {"und", "US", Low}, - {"en", "US", Low}, - {"zh-Hant", "TW", Low}, - {"en-US", "US", Exact}, - {"cmn", "CN", Low}, - {"ru", "RU", Low}, - {"yue", "HK", Low}, - {"x-abc", "ZZ", Low}, - } - for i, tt := range tests { - loc, _ := Raw.Parse(tt.loc) - reg, conf := loc.Region() - if reg.String() != tt.reg { - t.Errorf("%d:%s: region was %s; want %s", i, tt.loc, reg, tt.reg) - } - if conf != tt.conf { - t.Errorf("%d:%s: confidence was %d; want %d", i, tt.loc, conf, tt.conf) - } - } -} - -func TestEncodeM49(t *testing.T) { - tests := []struct { - m49 int - code string - ok bool - }{ - {1, "001", true}, - {840, "US", true}, - {899, "ZZ", false}, - } - for i, tt := range tests { - if r, err := EncodeM49(tt.m49); r.String() != tt.code || err == nil != tt.ok { - t.Errorf("%d:%d: was %s, %v; want %s, %v", i, tt.m49, r, err == nil, tt.code, tt.ok) - } - } - for i := 1; i <= 1000; i++ { - if r, err := EncodeM49(i); err == nil && r.M49() == 0 { - t.Errorf("%d has no error, but maps to undefined region", i) - } - } -} - -func TestParseRegion(t *testing.T) { - tests := []struct { - in string - out string - ok bool - }{ - {"001", "001", true}, - {"840", "US", true}, - {"899", "ZZ", false}, - {"USA", "US", true}, - {"US", "US", true}, - {"BC", "ZZ", false}, - {"C", "ZZ", false}, - {"CCCC", "ZZ", false}, - {"01", "ZZ", false}, - } - for i, tt := range tests { - r, err := ParseRegion(tt.in) - if r.String() != tt.out || err == nil != tt.ok { - t.Errorf("%d:%s: was %s, %v; want %s, %v", i, tt.in, r, err == nil, tt.out, tt.ok) - } - if err == nil { - if _, _, y := Raw.Make("und-" + tt.out).Raw(); r != y { - t.Errorf("%d:%s: tag was %s; want %s", i, tt.in, r, y) - } - } - } -} - -func TestIsCountry(t *testing.T) { - tests := []struct { - reg string - country bool - }{ - {"US", true}, - {"001", false}, - {"958", false}, - {"419", false}, - {"203", true}, - {"020", true}, - {"900", false}, - {"999", false}, - {"QO", false}, - {"EU", false}, - {"AA", false}, - {"XK", true}, - } - for i, tt := range tests { - reg, _ := getRegionID([]byte(tt.reg)) - r := Region{reg} - if r.IsCountry() != tt.country { - t.Errorf("%d: IsCountry(%s) was %v; want %v", i, tt.reg, r.IsCountry(), tt.country) - } - } -} - -func TestIsGroup(t *testing.T) { - tests := []struct { - reg string - group bool - }{ - {"US", false}, - {"001", true}, - {"958", false}, - {"419", true}, - {"203", false}, - {"020", false}, - {"900", false}, - {"999", false}, - {"QO", true}, - {"EU", true}, - {"AA", false}, - {"XK", false}, - } - for i, tt := range tests { - reg, _ := getRegionID([]byte(tt.reg)) - r := Region{reg} - if r.IsGroup() != tt.group { - t.Errorf("%d: IsGroup(%s) was %v; want %v", i, tt.reg, r.IsGroup(), tt.group) - } - } -} - -func TestContains(t *testing.T) { - tests := []struct { - enclosing, contained string - contains bool - }{ - // A region contains itself. - {"US", "US", true}, - {"001", "001", true}, - - // Direct containment. - {"001", "002", true}, - {"039", "XK", true}, - {"150", "XK", true}, - {"EU", "AT", true}, - {"QO", "AQ", true}, - - // Indirect containemnt. - {"001", "US", true}, - {"001", "419", true}, - {"001", "013", true}, - - // No containment. - {"US", "001", false}, - {"155", "EU", false}, - } - for i, tt := range tests { - enc, _ := getRegionID([]byte(tt.enclosing)) - con, _ := getRegionID([]byte(tt.contained)) - r := Region{enc} - if got := r.Contains(Region{con}); got != tt.contains { - t.Errorf("%d: %s.Contains(%s) was %v; want %v", i, tt.enclosing, tt.contained, got, tt.contains) - } - } -} - -func TestRegionCanonicalize(t *testing.T) { - for i, tt := range []struct{ in, out string }{ - {"UK", "GB"}, - {"TP", "TL"}, - {"QU", "EU"}, - {"SU", "SU"}, - {"VD", "VN"}, - {"DD", "DE"}, - } { - r := MustParseRegion(tt.in) - want := MustParseRegion(tt.out) - if got := r.Canonicalize(); got != want { - t.Errorf("%d: got %v; want %v", i, got, want) - } - } -} - -func TestRegionTLD(t *testing.T) { - for _, tt := range []struct { - in, out string - ok bool - }{ - {"EH", "EH", true}, - {"FR", "FR", true}, - {"TL", "TL", true}, - - // In ccTLD before in ISO. - {"GG", "GG", true}, - - // Non-standard assignment of ccTLD to ISO code. - {"GB", "UK", true}, - - // Exceptionally reserved in ISO and valid ccTLD. - {"UK", "UK", true}, - {"AC", "AC", true}, - {"EU", "EU", true}, - {"SU", "SU", true}, - - // Exceptionally reserved in ISO and invalid ccTLD. - {"CP", "ZZ", false}, - {"DG", "ZZ", false}, - {"EA", "ZZ", false}, - {"FX", "ZZ", false}, - {"IC", "ZZ", false}, - {"TA", "ZZ", false}, - - // Transitionally reserved in ISO (e.g. deprecated) but valid ccTLD as - // it is still being phased out. - {"AN", "AN", true}, - {"TP", "TP", true}, - - // Transitionally reserved in ISO (e.g. deprecated) and invalid ccTLD. - // Defined in package language as it has a mapping in CLDR. - {"BU", "ZZ", false}, - {"CS", "ZZ", false}, - {"NT", "ZZ", false}, - {"YU", "ZZ", false}, - {"ZR", "ZZ", false}, - // Not defined in package: SF. - - // Indeterminately reserved in ISO. - // Defined in package language as it has a legacy mapping in CLDR. - {"DY", "ZZ", false}, - {"RH", "ZZ", false}, - {"VD", "ZZ", false}, - // Not defined in package: EW, FL, JA, LF, PI, RA, RB, RC, RI, RL, RM, - // RN, RP, WG, WL, WV, and YV. - - // Not assigned in ISO, but legacy definitions in CLDR. - {"DD", "ZZ", false}, - {"YD", "ZZ", false}, - - // Normal mappings but somewhat special status in ccTLD. - {"BL", "BL", true}, - {"MF", "MF", true}, - {"BV", "BV", true}, - {"SJ", "SJ", true}, - - // Have values when normalized, but not as is. - {"QU", "ZZ", false}, - - // ISO Private Use. - {"AA", "ZZ", false}, - {"QM", "ZZ", false}, - {"QO", "ZZ", false}, - {"XA", "ZZ", false}, - {"XK", "ZZ", false}, // Sometimes used for Kosovo, but invalid ccTLD. - } { - if tt.in == "" { - continue - } - - r := MustParseRegion(tt.in) - var want Region - if tt.out != "ZZ" { - want = MustParseRegion(tt.out) - } - tld, err := r.TLD() - if got := err == nil; got != tt.ok { - t.Errorf("error(%v): got %v; want %v", r, got, tt.ok) - } - if tld != want { - t.Errorf("TLD(%v): got %v; want %v", r, tld, want) - } - } -} - -func TestCanonicalize(t *testing.T) { - // TODO: do a full test using CLDR data in a separate regression test. - tests := []struct { - in, out string - option CanonType - }{ - {"en-Latn", "en", SuppressScript}, - {"sr-Cyrl", "sr-Cyrl", SuppressScript}, - {"sh", "sr-Latn", Legacy}, - {"sh-HR", "sr-Latn-HR", Legacy}, - {"sh-Cyrl-HR", "sr-Cyrl-HR", Legacy}, - {"tl", "fil", Legacy}, - {"no", "no", Legacy}, - {"no", "nb", Legacy | CLDR}, - {"cmn", "cmn", Legacy}, - {"cmn", "zh", Macro}, - {"cmn-u-co-stroke", "zh-u-co-stroke", Macro}, - {"yue", "yue", Macro}, - {"nb", "no", Macro}, - {"nb", "nb", Macro | CLDR}, - {"no", "no", Macro}, - {"no", "no", Macro | CLDR}, - {"iw", "he", DeprecatedBase}, - {"iw", "he", Deprecated | CLDR}, - {"mo", "ro-MD", Deprecated}, // Adopted by CLDR as of version 25. - {"alb", "sq", Legacy}, // bibliographic - {"dut", "nl", Legacy}, // bibliographic - // As of CLDR 25, mo is no longer considered a legacy mapping. - {"mo", "mo", Legacy | CLDR}, - {"und-AN", "und-AN", Deprecated}, - {"und-YD", "und-YE", DeprecatedRegion}, - {"und-YD", "und-YD", DeprecatedBase}, - {"und-Qaai", "und-Zinh", DeprecatedScript}, - {"und-Qaai", "und-Qaai", DeprecatedBase}, - {"drh", "mn", All}, // drh -> khk -> mn - } - for i, tt := range tests { - in, _ := Raw.Parse(tt.in) - in, _ = tt.option.Canonicalize(in) - if in.String() != tt.out { - t.Errorf("%d:%s: was %s; want %s", i, tt.in, in.String(), tt.out) - } - if int(in.pVariant) > int(in.pExt) || int(in.pExt) > len(in.str) { - t.Errorf("%d:%s:offsets %d <= %d <= %d must be true", i, tt.in, in.pVariant, in.pExt, len(in.str)) - } - } - // Test idempotence. - for _, base := range Supported.BaseLanguages() { - tag, _ := Raw.Compose(base) - got, _ := All.Canonicalize(tag) - want, _ := All.Canonicalize(got) - if got != want { - t.Errorf("idem(%s): got %s; want %s", tag, got, want) - } - } -} - -func TestTypeForKey(t *testing.T) { - tests := []struct{ key, in, out string }{ - {"co", "en", ""}, - {"co", "en-u-abc", ""}, - {"co", "en-u-co-phonebk", "phonebk"}, - {"co", "en-u-co-phonebk-cu-aud", "phonebk"}, - {"co", "x-foo-u-co-phonebk", ""}, - {"nu", "en-u-co-phonebk-nu-arabic", "arabic"}, - {"kc", "cmn-u-co-stroke", ""}, - } - for _, tt := range tests { - if v := Make(tt.in).TypeForKey(tt.key); v != tt.out { - t.Errorf("%q[%q]: was %q; want %q", tt.in, tt.key, v, tt.out) - } - } -} - -func TestSetTypeForKey(t *testing.T) { - tests := []struct { - key, value, in, out string - err bool - }{ - // replace existing value - {"co", "pinyin", "en-u-co-phonebk", "en-u-co-pinyin", false}, - {"co", "pinyin", "en-u-co-phonebk-cu-xau", "en-u-co-pinyin-cu-xau", false}, - {"co", "pinyin", "en-u-co-phonebk-v-xx", "en-u-co-pinyin-v-xx", false}, - {"co", "pinyin", "en-u-co-phonebk-x-x", "en-u-co-pinyin-x-x", false}, - {"nu", "arabic", "en-u-co-phonebk-nu-vaai", "en-u-co-phonebk-nu-arabic", false}, - // add to existing -u extension - {"co", "pinyin", "en-u-ca-gregory", "en-u-ca-gregory-co-pinyin", false}, - {"co", "pinyin", "en-u-ca-gregory-nu-vaai", "en-u-ca-gregory-co-pinyin-nu-vaai", false}, - {"co", "pinyin", "en-u-ca-gregory-v-va", "en-u-ca-gregory-co-pinyin-v-va", false}, - {"co", "pinyin", "en-u-ca-gregory-x-a", "en-u-ca-gregory-co-pinyin-x-a", false}, - {"ca", "gregory", "en-u-co-pinyin", "en-u-ca-gregory-co-pinyin", false}, - // remove pair - {"co", "", "en-u-co-phonebk", "en", false}, - {"co", "", "en-u-ca-gregory-co-phonebk", "en-u-ca-gregory", false}, - {"co", "", "en-u-co-phonebk-nu-arabic", "en-u-nu-arabic", false}, - {"co", "", "en", "en", false}, - // add -u extension - {"co", "pinyin", "en", "en-u-co-pinyin", false}, - {"co", "pinyin", "und", "und-u-co-pinyin", false}, - {"co", "pinyin", "en-a-aaa", "en-a-aaa-u-co-pinyin", false}, - {"co", "pinyin", "en-x-aaa", "en-u-co-pinyin-x-aaa", false}, - {"co", "pinyin", "en-v-aa", "en-u-co-pinyin-v-aa", false}, - {"co", "pinyin", "en-a-aaa-x-x", "en-a-aaa-u-co-pinyin-x-x", false}, - {"co", "pinyin", "en-a-aaa-v-va", "en-a-aaa-u-co-pinyin-v-va", false}, - // error on invalid values - {"co", "pinyinxxx", "en", "en", true}, - {"co", "piny.n", "en", "en", true}, - {"co", "pinyinxxx", "en-a-aaa", "en-a-aaa", true}, - {"co", "pinyinxxx", "en-u-aaa", "en-u-aaa", true}, - {"co", "pinyinxxx", "en-u-aaa-co-pinyin", "en-u-aaa-co-pinyin", true}, - {"co", "pinyi.", "en-u-aaa-co-pinyin", "en-u-aaa-co-pinyin", true}, - {"col", "pinyin", "en", "en", true}, - {"co", "cu", "en", "en", true}, - // error when setting on a private use tag - {"co", "phonebook", "x-foo", "x-foo", true}, - } - for i, tt := range tests { - tag := Make(tt.in) - if v, err := tag.SetTypeForKey(tt.key, tt.value); v.String() != tt.out { - t.Errorf("%d:%q[%q]=%q: was %q; want %q", i, tt.in, tt.key, tt.value, v, tt.out) - } else if (err != nil) != tt.err { - t.Errorf("%d:%q[%q]=%q: error was %v; want %v", i, tt.in, tt.key, tt.value, err != nil, tt.err) - } else if val := v.TypeForKey(tt.key); err == nil && val != tt.value { - t.Errorf("%d:%q[%q]==%q: was %v; want %v", i, tt.out, tt.key, tt.value, val, tt.value) - } - if len(tag.String()) <= 3 { - // Simulate a tag for which the string has not been set. - tag.str, tag.pExt, tag.pVariant = "", 0, 0 - if tag, err := tag.SetTypeForKey(tt.key, tt.value); err == nil { - if val := tag.TypeForKey(tt.key); err == nil && val != tt.value { - t.Errorf("%d:%q[%q]==%q: was %v; want %v", i, tt.out, tt.key, tt.value, val, tt.value) - } - } - } - } -} - -func TestFindKeyAndType(t *testing.T) { - // out is either the matched type in case of a match or the original - // string up till the insertion point. - tests := []struct { - key string - hasExt bool - in, out string - }{ - // Don't search past a private use extension. - {"co", false, "en-x-foo-u-co-pinyin", "en"}, - {"co", false, "x-foo-u-co-pinyin", ""}, - {"co", false, "en-s-fff-x-foo", "en-s-fff"}, - // Insertion points in absence of -u extension. - {"cu", false, "en", ""}, // t.str is "" - {"cu", false, "en-v-va", "en"}, - {"cu", false, "en-a-va", "en-a-va"}, - {"cu", false, "en-a-va-v-va", "en-a-va"}, - {"cu", false, "en-x-a", "en"}, - // Tags with the -u extension. - {"co", true, "en-u-co-standard", "standard"}, - {"co", true, "yue-u-co-pinyin", "pinyin"}, - {"co", true, "en-u-co-abc", "abc"}, - {"co", true, "en-u-co-abc-def", "abc-def"}, - {"co", true, "en-u-co-abc-def-x-foo", "abc-def"}, - {"co", true, "en-u-co-standard-nu-arab", "standard"}, - {"co", true, "yue-u-co-pinyin-nu-arab", "pinyin"}, - // Insertion points. - {"cu", true, "en-u-co-standard", "en-u-co-standard"}, - {"cu", true, "yue-u-co-pinyin-x-foo", "yue-u-co-pinyin"}, - {"cu", true, "en-u-co-abc", "en-u-co-abc"}, - {"cu", true, "en-u-nu-arabic", "en-u"}, - {"cu", true, "en-u-co-abc-def-nu-arabic", "en-u-co-abc-def"}, - } - for i, tt := range tests { - start, end, hasExt := Make(tt.in).findTypeForKey(tt.key) - if start != end { - res := tt.in[start:end] - if res != tt.out { - t.Errorf("%d:%s: was %q; want %q", i, tt.in, res, tt.out) - } - } else { - if hasExt != tt.hasExt { - t.Errorf("%d:%s: hasExt was %v; want %v", i, tt.in, hasExt, tt.hasExt) - continue - } - if tt.in[:start] != tt.out { - t.Errorf("%d:%s: insertion point was %q; want %q", i, tt.in, tt.in[:start], tt.out) - } - } - } -} - -func TestParent(t *testing.T) { - tests := []struct{ in, out string }{ - // Strip variants and extensions first - {"de-u-co-phonebk", "de"}, - {"de-1994", "de"}, - {"de-Latn-1994", "de"}, // remove superfluous script. - - // Ensure the canonical Tag for an entry is in the chain for base-script - // pairs. - {"zh-Hans", "zh"}, - - // Skip the script if it is the maximized version. CLDR files for the - // skipped tag are always empty. - {"zh-Hans-TW", "zh"}, - {"zh-Hans-CN", "zh"}, - - // Insert the script if the maximized script is not the same as the - // maximized script of the base language. - {"zh-TW", "zh-Hant"}, - {"zh-HK", "zh-Hant"}, - {"zh-Hant-TW", "zh-Hant"}, - {"zh-Hant-HK", "zh-Hant"}, - - // Non-default script skips to und. - // CLDR - {"az-Cyrl", "und"}, - {"bs-Cyrl", "und"}, - {"en-Dsrt", "und"}, - {"ha-Arab", "und"}, - {"mn-Mong", "und"}, - {"pa-Arab", "und"}, - {"shi-Latn", "und"}, - {"sr-Latn", "und"}, - {"uz-Arab", "und"}, - {"uz-Cyrl", "und"}, - {"vai-Latn", "und"}, - {"zh-Hant", "und"}, - // extra - {"nl-Cyrl", "und"}, - - // World english inherits from en-001. - {"en-150", "en-001"}, - {"en-AU", "en-001"}, - {"en-BE", "en-001"}, - {"en-GG", "en-001"}, - {"en-GI", "en-001"}, - {"en-HK", "en-001"}, - {"en-IE", "en-001"}, - {"en-IM", "en-001"}, - {"en-IN", "en-001"}, - {"en-JE", "en-001"}, - {"en-MT", "en-001"}, - {"en-NZ", "en-001"}, - {"en-PK", "en-001"}, - {"en-SG", "en-001"}, - - // Spanish in Latin-American countries have es-419 as parent. - {"es-AR", "es-419"}, - {"es-BO", "es-419"}, - {"es-CL", "es-419"}, - {"es-CO", "es-419"}, - {"es-CR", "es-419"}, - {"es-CU", "es-419"}, - {"es-DO", "es-419"}, - {"es-EC", "es-419"}, - {"es-GT", "es-419"}, - {"es-HN", "es-419"}, - {"es-MX", "es-419"}, - {"es-NI", "es-419"}, - {"es-PA", "es-419"}, - {"es-PE", "es-419"}, - {"es-PR", "es-419"}, - {"es-PY", "es-419"}, - {"es-SV", "es-419"}, - {"es-US", "es-419"}, - {"es-UY", "es-419"}, - {"es-VE", "es-419"}, - // exceptions (according to CLDR) - {"es-CW", "es"}, - - // Inherit from pt-PT, instead of pt for these countries. - {"pt-AO", "pt-PT"}, - {"pt-CV", "pt-PT"}, - {"pt-GW", "pt-PT"}, - {"pt-MO", "pt-PT"}, - {"pt-MZ", "pt-PT"}, - {"pt-ST", "pt-PT"}, - {"pt-TL", "pt-PT"}, - } - for _, tt := range tests { - tag := Raw.MustParse(tt.in) - if p := Raw.MustParse(tt.out); p != tag.Parent() { - t.Errorf("%s: was %v; want %v", tt.in, tag.Parent(), p) - } - } -} - -var ( - // Tags without error that don't need to be changed. - benchBasic = []string{ - "en", - "en-Latn", - "en-GB", - "za", - "zh-Hant", - "zh", - "zh-HK", - "ar-MK", - "en-CA", - "fr-CA", - "fr-CH", - "fr", - "lv", - "he-IT", - "tlh", - "ja", - "ja-Jpan", - "ja-Jpan-JP", - "de-1996", - "de-CH", - "sr", - "sr-Latn", - } - // Tags with extensions, not changes required. - benchExt = []string{ - "x-a-b-c-d", - "x-aa-bbbb-cccccccc-d", - "en-x_cc-b-bbb-a-aaa", - "en-c_cc-b-bbb-a-aaa-x-x", - "en-u-co-phonebk", - "en-Cyrl-u-co-phonebk", - "en-US-u-co-phonebk-cu-xau", - "en-nedix-u-co-phonebk", - "en-t-t0-abcd", - "en-t-nl-latn", - "en-t-t0-abcd-x-a", - } - // Change, but not memory allocation required. - benchSimpleChange = []string{ - "EN", - "i-klingon", - "en-latn", - "zh-cmn-Hans-CN", - "iw-NL", - } - // Change and memory allocation required. - benchChangeAlloc = []string{ - "en-c_cc-b-bbb-a-aaa", - "en-u-cu-xua-co-phonebk", - "en-u-cu-xua-co-phonebk-a-cd", - "en-u-def-abc-cu-xua-co-phonebk", - "en-t-en-Cyrl-NL-1994", - "en-t-en-Cyrl-NL-1994-t0-abc-def", - } - // Tags that result in errors. - benchErr = []string{ - // IllFormed - "x_A.-B-C_D", - "en-u-cu-co-phonebk", - "en-u-cu-xau-co", - "en-t-nl-abcd", - // Invalid - "xx", - "nl-Uuuu", - "nl-QB", - } - benchChange = append(benchSimpleChange, benchChangeAlloc...) - benchAll = append(append(append(benchBasic, benchExt...), benchChange...), benchErr...) -) - -func doParse(b *testing.B, tag []string) { - for i := 0; i < b.N; i++ { - // Use the modulo instead of looping over all tags so that we get a somewhat - // meaningful ns/op. - Parse(tag[i%len(tag)]) - } -} - -func BenchmarkParse(b *testing.B) { - doParse(b, benchAll) -} - -func BenchmarkParseBasic(b *testing.B) { - doParse(b, benchBasic) -} - -func BenchmarkParseError(b *testing.B) { - doParse(b, benchErr) -} - -func BenchmarkParseSimpleChange(b *testing.B) { - doParse(b, benchSimpleChange) -} - -func BenchmarkParseChangeAlloc(b *testing.B) { - doParse(b, benchChangeAlloc) -} diff --git a/vendor/golang.org/x/text/language/lookup_test.go b/vendor/golang.org/x/text/language/lookup_test.go deleted file mode 100644 index 9833830c..00000000 --- a/vendor/golang.org/x/text/language/lookup_test.go +++ /dev/null @@ -1,457 +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 language - -import ( - "testing" - - "golang.org/x/text/internal/tag" -) - -func b(s string) []byte { - return []byte(s) -} - -func TestLangID(t *testing.T) { - tests := []struct { - id, bcp47, iso3, norm string - err error - }{ - {id: "", bcp47: "und", iso3: "und", err: errSyntax}, - {id: " ", bcp47: "und", iso3: "und", err: errSyntax}, - {id: " ", bcp47: "und", iso3: "und", err: errSyntax}, - {id: " ", bcp47: "und", iso3: "und", err: errSyntax}, - {id: "xxx", bcp47: "und", iso3: "und", err: mkErrInvalid([]byte("xxx"))}, - {id: "und", bcp47: "und", iso3: "und"}, - {id: "aju", bcp47: "aju", iso3: "aju", norm: "jrb"}, - {id: "jrb", bcp47: "jrb", iso3: "jrb"}, - {id: "es", bcp47: "es", iso3: "spa"}, - {id: "spa", bcp47: "es", iso3: "spa"}, - {id: "ji", bcp47: "ji", iso3: "yid-", norm: "yi"}, - {id: "jw", bcp47: "jw", iso3: "jav-", norm: "jv"}, - {id: "ar", bcp47: "ar", iso3: "ara"}, - {id: "kw", bcp47: "kw", iso3: "cor"}, - {id: "arb", bcp47: "arb", iso3: "arb", norm: "ar"}, - {id: "ar", bcp47: "ar", iso3: "ara"}, - {id: "kur", bcp47: "ku", iso3: "kur"}, - {id: "nl", bcp47: "nl", iso3: "nld"}, - {id: "NL", bcp47: "nl", iso3: "nld"}, - {id: "gsw", bcp47: "gsw", iso3: "gsw"}, - {id: "gSW", bcp47: "gsw", iso3: "gsw"}, - {id: "und", bcp47: "und", iso3: "und"}, - {id: "sh", bcp47: "sh", iso3: "hbs", norm: "sr"}, - {id: "hbs", bcp47: "sh", iso3: "hbs", norm: "sr"}, - {id: "no", bcp47: "no", iso3: "nor", norm: "no"}, - {id: "nor", bcp47: "no", iso3: "nor", norm: "no"}, - {id: "cmn", bcp47: "cmn", iso3: "cmn", norm: "zh"}, - } - for i, tt := range tests { - want, err := getLangID(b(tt.id)) - if err != tt.err { - t.Errorf("%d:err(%s): found %q; want %q", i, tt.id, err, tt.err) - } - if err != nil { - continue - } - if id, _ := getLangISO2(b(tt.bcp47)); len(tt.bcp47) == 2 && want != id { - t.Errorf("%d:getISO2(%s): found %v; want %v", i, tt.bcp47, id, want) - } - if len(tt.iso3) == 3 { - if id, _ := getLangISO3(b(tt.iso3)); want != id { - t.Errorf("%d:getISO3(%s): found %q; want %q", i, tt.iso3, id, want) - } - if id, _ := getLangID(b(tt.iso3)); want != id { - t.Errorf("%d:getID3(%s): found %v; want %v", i, tt.iso3, id, want) - } - } - norm := want - if tt.norm != "" { - norm, _ = getLangID(b(tt.norm)) - } - id, _ := normLang(want) - if id != norm { - t.Errorf("%d:norm(%s): found %v; want %v", i, tt.id, id, norm) - } - if id := want.String(); tt.bcp47 != id { - t.Errorf("%d:String(): found %s; want %s", i, id, tt.bcp47) - } - if id := want.ISO3(); tt.iso3[:3] != id { - t.Errorf("%d:iso3(): found %s; want %s", i, id, tt.iso3[:3]) - } - } -} - -func TestGrandfathered(t *testing.T) { - for _, tt := range []struct{ in, out string }{ - {"art-lojban", "jbo"}, - {"i-ami", "ami"}, - {"i-bnn", "bnn"}, - {"i-hak", "hak"}, - {"i-klingon", "tlh"}, - {"i-lux", "lb"}, - {"i-navajo", "nv"}, - {"i-pwn", "pwn"}, - {"i-tao", "tao"}, - {"i-tay", "tay"}, - {"i-tsu", "tsu"}, - {"no-bok", "nb"}, - {"no-nyn", "nn"}, - {"sgn-BE-FR", "sfb"}, - {"sgn-BE-NL", "vgt"}, - {"sgn-CH-DE", "sgg"}, - {"sgn-ch-de", "sgg"}, - {"zh-guoyu", "cmn"}, - {"zh-hakka", "hak"}, - {"zh-min-nan", "nan"}, - {"zh-xiang", "hsn"}, - - // Grandfathered tags with no modern replacement will be converted as follows: - {"cel-gaulish", "xtg-x-cel-gaulish"}, - {"en-GB-oed", "en-GB-oxendict"}, - {"en-gb-oed", "en-GB-oxendict"}, - {"i-default", "en-x-i-default"}, - {"i-enochian", "und-x-i-enochian"}, - {"i-mingo", "see-x-i-mingo"}, - {"zh-min", "nan-x-zh-min"}, - - {"root", "und"}, - {"en_US_POSIX", "en-US-u-va-posix"}, - {"en_us_posix", "en-US-u-va-posix"}, - {"en-us-posix", "en-US-u-va-posix"}, - } { - got := Raw.Make(tt.in) - want := Raw.MustParse(tt.out) - if got != want { - t.Errorf("%s: got %q; want %q", tt.in, got, want) - } - } -} - -func TestRegionID(t *testing.T) { - tests := []struct { - in, out string - }{ - {"_ ", ""}, - {"_000", ""}, - {"419", "419"}, - {"AA", "AA"}, - {"ATF", "TF"}, - {"HV", "HV"}, - {"CT", "CT"}, - {"DY", "DY"}, - {"IC", "IC"}, - {"FQ", "FQ"}, - {"JT", "JT"}, - {"ZZ", "ZZ"}, - {"EU", "EU"}, - {"QO", "QO"}, - {"FX", "FX"}, - } - for i, tt := range tests { - if tt.in[0] == '_' { - id := tt.in[1:] - if _, err := getRegionID(b(id)); err == nil { - t.Errorf("%d:err(%s): found nil; want error", i, id) - } - continue - } - want, _ := getRegionID(b(tt.in)) - if s := want.String(); s != tt.out { - t.Errorf("%d:%s: found %q; want %q", i, tt.in, s, tt.out) - } - if len(tt.in) == 2 { - want, _ := getRegionISO2(b(tt.in)) - if s := want.String(); s != tt.out { - t.Errorf("%d:getISO2(%s): found %q; want %q", i, tt.in, s, tt.out) - } - } - } -} - -func TestRegionType(t *testing.T) { - for _, tt := range []struct { - r string - t byte - }{ - {"NL", bcp47Region | ccTLD}, - {"EU", bcp47Region | ccTLD}, // exceptionally reserved - {"AN", bcp47Region | ccTLD}, // transitionally reserved - - {"DD", bcp47Region}, // deleted in ISO, deprecated in BCP 47 - {"NT", bcp47Region}, // transitionally reserved, deprecated in BCP 47 - - {"XA", iso3166UserAssigned | bcp47Region}, - {"ZZ", iso3166UserAssigned | bcp47Region}, - {"AA", iso3166UserAssigned | bcp47Region}, - {"QO", iso3166UserAssigned | bcp47Region}, - {"QM", iso3166UserAssigned | bcp47Region}, - {"XK", iso3166UserAssigned | bcp47Region}, - - {"CT", 0}, // deleted in ISO, not in BCP 47, canonicalized in CLDR - } { - r := MustParseRegion(tt.r) - if tp := r.typ(); tp != tt.t { - t.Errorf("Type(%s): got %x; want %x", tt.r, tp, tt.t) - } - } -} - -func TestRegionISO3(t *testing.T) { - tests := []struct { - from, iso3, to string - }{ - {" ", "ZZZ", "ZZ"}, - {"000", "ZZZ", "ZZ"}, - {"AA", "AAA", ""}, - {"CT", "CTE", ""}, - {"DY", "DHY", ""}, - {"EU", "QUU", ""}, - {"HV", "HVO", ""}, - {"IC", "ZZZ", "ZZ"}, - {"JT", "JTN", ""}, - {"PZ", "PCZ", ""}, - {"QU", "QUU", "EU"}, - {"QO", "QOO", ""}, - {"YD", "YMD", ""}, - {"FQ", "ATF", "TF"}, - {"TF", "ATF", ""}, - {"FX", "FXX", ""}, - {"ZZ", "ZZZ", ""}, - {"419", "ZZZ", "ZZ"}, - } - for _, tt := range tests { - r, _ := getRegionID(b(tt.from)) - if s := r.ISO3(); s != tt.iso3 { - t.Errorf("iso3(%q): found %q; want %q", tt.from, s, tt.iso3) - } - if tt.iso3 == "" { - continue - } - want := tt.to - if tt.to == "" { - want = tt.from - } - r, _ = getRegionID(b(want)) - if id, _ := getRegionISO3(b(tt.iso3)); id != r { - t.Errorf("%s: found %q; want %q", tt.iso3, id, want) - } - } -} - -func TestRegionM49(t *testing.T) { - fromTests := []struct { - m49 int - id string - }{ - {0, ""}, - {-1, ""}, - {1000, ""}, - {10000, ""}, - - {001, "001"}, - {104, "MM"}, - {180, "CD"}, - {230, "ET"}, - {231, "ET"}, - {249, "FX"}, - {250, "FR"}, - {276, "DE"}, - {278, "DD"}, - {280, "DE"}, - {419, "419"}, - {626, "TL"}, - {736, "SD"}, - {840, "US"}, - {854, "BF"}, - {891, "CS"}, - {899, ""}, - {958, "AA"}, - {966, "QT"}, - {967, "EU"}, - {999, "ZZ"}, - } - for _, tt := range fromTests { - id, err := getRegionM49(tt.m49) - if want, have := err != nil, tt.id == ""; want != have { - t.Errorf("error(%d): have %v; want %v", tt.m49, have, want) - continue - } - r, _ := getRegionID(b(tt.id)) - if r != id { - t.Errorf("region(%d): have %s; want %s", tt.m49, id, r) - } - } - - toTests := []struct { - m49 int - id string - }{ - {0, "000"}, - {0, "IC"}, // Some codes don't have an ID - - {001, "001"}, - {104, "MM"}, - {104, "BU"}, - {180, "CD"}, - {180, "ZR"}, - {231, "ET"}, - {250, "FR"}, - {249, "FX"}, - {276, "DE"}, - {278, "DD"}, - {419, "419"}, - {626, "TL"}, - {626, "TP"}, - {729, "SD"}, - {826, "GB"}, - {840, "US"}, - {854, "BF"}, - {891, "YU"}, - {891, "CS"}, - {958, "AA"}, - {966, "QT"}, - {967, "EU"}, - {967, "QU"}, - {999, "ZZ"}, - // For codes that don't have an M49 code use the replacement value, - // if available. - {854, "HV"}, // maps to Burkino Faso - } - for _, tt := range toTests { - r, _ := getRegionID(b(tt.id)) - if r.M49() != tt.m49 { - t.Errorf("m49(%q): have %d; want %d", tt.id, r.M49(), tt.m49) - } - } -} - -func TestRegionDeprecation(t *testing.T) { - tests := []struct{ in, out string }{ - {"BU", "MM"}, - {"BUR", "MM"}, - {"CT", "KI"}, - {"DD", "DE"}, - {"DDR", "DE"}, - {"DY", "BJ"}, - {"FX", "FR"}, - {"HV", "BF"}, - {"JT", "UM"}, - {"MI", "UM"}, - {"NH", "VU"}, - {"NQ", "AQ"}, - {"PU", "UM"}, - {"PZ", "PA"}, - {"QU", "EU"}, - {"RH", "ZW"}, - {"TP", "TL"}, - {"UK", "GB"}, - {"VD", "VN"}, - {"WK", "UM"}, - {"YD", "YE"}, - {"NL", "NL"}, - } - for _, tt := range tests { - rIn, _ := getRegionID([]byte(tt.in)) - rOut, _ := getRegionISO2([]byte(tt.out)) - r := normRegion(rIn) - if rOut == rIn && r != 0 { - t.Errorf("%s: was %q; want %q", tt.in, r, tt.in) - } - if rOut != rIn && r != rOut { - t.Errorf("%s: was %q; want %q", tt.in, r, tt.out) - } - - } -} - -func TestGetScriptID(t *testing.T) { - idx := tag.Index("0000BbbbDdddEeeeZzzz\xff\xff\xff\xff") - tests := []struct { - in string - out scriptID - }{ - {" ", 0}, - {" ", 0}, - {" ", 0}, - {"", 0}, - {"Aaaa", 0}, - {"Bbbb", 1}, - {"Dddd", 2}, - {"dddd", 2}, - {"dDDD", 2}, - {"Eeee", 3}, - {"Zzzz", 4}, - } - for i, tt := range tests { - if id, err := getScriptID(idx, b(tt.in)); id != tt.out { - t.Errorf("%d:%s: found %d; want %d", i, tt.in, id, tt.out) - } else if id == 0 && err == nil { - t.Errorf("%d:%s: no error; expected one", i, tt.in) - } - } -} - -func TestIsPrivateUse(t *testing.T) { - type test struct { - s string - private bool - } - tests := []test{ - {"en", false}, - {"und", false}, - {"pzn", false}, - {"qaa", true}, - {"qtz", true}, - {"qua", false}, - } - for i, tt := range tests { - x, _ := getLangID([]byte(tt.s)) - if b := x.IsPrivateUse(); b != tt.private { - t.Errorf("%d: langID.IsPrivateUse(%s) was %v; want %v", i, tt.s, b, tt.private) - } - } - tests = []test{ - {"001", false}, - {"419", false}, - {"899", false}, - {"900", false}, - {"957", false}, - {"958", true}, - {"AA", true}, - {"AC", false}, - {"EU", false}, // CLDR grouping, exceptionally reserved in ISO. - {"QU", true}, // Canonicalizes to EU, User-assigned in ISO. - {"QO", true}, // CLDR grouping, User-assigned in ISO. - {"QA", false}, - {"QM", true}, - {"QZ", true}, - {"XA", true}, - {"XK", true}, // Assigned to Kosovo in CLDR, User-assigned in ISO. - {"XZ", true}, - {"ZW", false}, - {"ZZ", true}, - } - for i, tt := range tests { - x, _ := getRegionID([]byte(tt.s)) - if b := x.IsPrivateUse(); b != tt.private { - t.Errorf("%d: regionID.IsPrivateUse(%s) was %v; want %v", i, tt.s, b, tt.private) - } - } - tests = []test{ - {"Latn", false}, - {"Laaa", false}, // invalid - {"Qaaa", true}, - {"Qabx", true}, - {"Qaby", false}, - {"Zyyy", false}, - {"Zzzz", false}, - } - for i, tt := range tests { - x, _ := getScriptID(script, []byte(tt.s)) - if b := x.IsPrivateUse(); b != tt.private { - t.Errorf("%d: scriptID.IsPrivateUse(%s) was %v; want %v", i, tt.s, b, tt.private) - } - } -} diff --git a/vendor/golang.org/x/text/language/match_test.go b/vendor/golang.org/x/text/language/match_test.go deleted file mode 100644 index 8b60b07a..00000000 --- a/vendor/golang.org/x/text/language/match_test.go +++ /dev/null @@ -1,505 +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 language - -import ( - "bytes" - "flag" - "fmt" - "os" - "path" - "path/filepath" - "strings" - "testing" - - "golang.org/x/text/internal/testtext" - "golang.org/x/text/internal/ucd" -) - -var verbose = flag.Bool("verbose", false, "set to true to print the internal tables of matchers") - -func TestCompliance(t *testing.T) { - filepath.Walk("testdata", func(file string, info os.FileInfo, err error) error { - if info.IsDir() { - return nil - } - r, err := os.Open(file) - if err != nil { - t.Fatal(err) - } - ucd.Parse(r, func(p *ucd.Parser) { - name := strings.Replace(path.Join(p.String(0), p.String(1)), " ", "", -1) - if skip[name] { - return - } - t.Run(info.Name()+"/"+name, func(t *testing.T) { - supported := makeTagList(p.String(0)) - desired := makeTagList(p.String(1)) - gotCombined, index, conf := NewMatcher(supported).Match(desired...) - - gotMatch := supported[index] - wantMatch := mk(p.String(2)) - if gotMatch != wantMatch { - t.Fatalf("match: got %q; want %q (%v)", gotMatch, wantMatch, conf) - } - wantCombined, err := Raw.Parse(p.String(3)) - if err == nil && gotCombined != wantCombined { - t.Errorf("combined: got %q; want %q (%v)", gotCombined, wantCombined, conf) - } - }) - }) - return nil - }) -} - -var skip = map[string]bool{ - // TODO: bugs - // Honor the wildcard match. This may only be useful to select non-exact - // stuff. - "mul,af/nl": true, // match: got "af"; want "mul" - - // TODO: include other extensions. - // combined: got "en-GB-u-ca-buddhist-nu-arab"; want "en-GB-fonipa-t-m0-iso-i0-pinyin-u-ca-buddhist-nu-arab" - "und,en-GB-u-sd-gbsct/en-fonipa-u-nu-Arab-ca-buddhist-t-m0-iso-i0-pinyin": true, - - // Inconsistencies with Mark Davis' implementation where it is not clear - // which is better. - - // Inconsistencies in combined. I think the Go approach is more appropriate. - // We could use -u-rg- and -u-va- as alternative. - "und,fr/fr-BE-fonipa": true, // combined: got "fr"; want "fr-BE-fonipa" - "und,fr-CA/fr-BE-fonipa": true, // combined: got "fr-CA"; want "fr-BE-fonipa" - "und,fr-fonupa/fr-BE-fonipa": true, // combined: got "fr-fonupa"; want "fr-BE-fonipa" - "und,no/nn-BE-fonipa": true, // combined: got "no"; want "no-BE-fonipa" - "50,und,fr-CA-fonupa/fr-BE-fonipa": true, // combined: got "fr-CA-fonupa"; want "fr-BE-fonipa" - - // The initial number is a threshold. As we don't use scoring, we will not - // implement this. - "50,und,fr-Cyrl-CA-fonupa/fr-BE-fonipa": true, - // match: got "und"; want "fr-Cyrl-CA-fonupa" - // combined: got "und"; want "fr-Cyrl-BE-fonipa" - - // Other interesting cases to test: - // - Should same language or same script have the preference if there is - // usually no understanding of the other script? - // - More specific region in desired may replace enclosing supported. -} - -func makeTagList(s string) (tags []Tag) { - for _, s := range strings.Split(s, ",") { - tags = append(tags, mk(strings.TrimSpace(s))) - } - return tags -} - -func TestMatchStrings(t *testing.T) { - testCases := []struct { - supported string - desired string // strings separted by | - tag string - index int - }{{ - supported: "en", - desired: "", - tag: "en", - index: 0, - }, { - supported: "en", - desired: "nl", - tag: "en", - index: 0, - }, { - supported: "en,nl", - desired: "nl", - tag: "nl", - index: 1, - }, { - supported: "en,nl", - desired: "nl|en", - tag: "nl", - index: 1, - }, { - supported: "en-GB,nl", - desired: "en ; q=0.1,nl", - tag: "nl", - index: 1, - }, { - supported: "en-GB,nl", - desired: "en;q=0.005 | dk; q=0.1,nl ", - tag: "en-GB", - index: 0, - }, { - // do not match faulty tags with und - supported: "en,und", - desired: "|en", - tag: "en", - index: 0, - }} - for _, tc := range testCases { - t.Run(path.Join(tc.supported, tc.desired), func(t *testing.T) { - m := NewMatcher(makeTagList(tc.supported)) - tag, index := MatchStrings(m, strings.Split(tc.desired, "|")...) - if tag.String() != tc.tag || index != tc.index { - t.Errorf("got %v, %d; want %v, %d", tag, index, tc.tag, tc.index) - } - }) - } -} - -func TestAddLikelySubtags(t *testing.T) { - tests := []struct{ in, out string }{ - {"aa", "aa-Latn-ET"}, - {"aa-Latn", "aa-Latn-ET"}, - {"aa-Arab", "aa-Arab-ET"}, - {"aa-Arab-ER", "aa-Arab-ER"}, - {"kk", "kk-Cyrl-KZ"}, - {"kk-CN", "kk-Arab-CN"}, - {"cmn", "cmn"}, - {"zh-AU", "zh-Hant-AU"}, - {"zh-VN", "zh-Hant-VN"}, - {"zh-SG", "zh-Hans-SG"}, - {"zh-Hant", "zh-Hant-TW"}, - {"zh-Hani", "zh-Hani-CN"}, - {"und-Hani", "zh-Hani-CN"}, - {"und", "en-Latn-US"}, - {"und-GB", "en-Latn-GB"}, - {"und-CW", "pap-Latn-CW"}, - {"und-YT", "fr-Latn-YT"}, - {"und-Arab", "ar-Arab-EG"}, - {"und-AM", "hy-Armn-AM"}, - {"und-TW", "zh-Hant-TW"}, - {"und-002", "en-Latn-NG"}, - {"und-Latn-002", "en-Latn-NG"}, - {"en-Latn-002", "en-Latn-NG"}, - {"en-002", "en-Latn-NG"}, - {"en-001", "en-Latn-US"}, - {"und-003", "en-Latn-US"}, - {"und-GB", "en-Latn-GB"}, - {"Latn-001", "en-Latn-US"}, - {"en-001", "en-Latn-US"}, - {"es-419", "es-Latn-419"}, - {"he-145", "he-Hebr-IL"}, - {"ky-145", "ky-Latn-TR"}, - {"kk", "kk-Cyrl-KZ"}, - // Don't specialize duplicate and ambiguous matches. - {"kk-034", "kk-Arab-034"}, // Matches IR and AF. Both are Arab. - {"ku-145", "ku-Latn-TR"}, // Matches IQ, TR, and LB, but kk -> TR. - {"und-Arab-CC", "ms-Arab-CC"}, - {"und-Arab-GB", "ks-Arab-GB"}, - {"und-Hans-CC", "zh-Hans-CC"}, - {"und-CC", "en-Latn-CC"}, - {"sr", "sr-Cyrl-RS"}, - {"sr-151", "sr-Latn-151"}, // Matches RO and RU. - // We would like addLikelySubtags to generate the same results if the input - // only changes by adding tags that would otherwise have been added - // by the expansion. - // In other words: - // und-AA -> xx-Scrp-AA implies und-Scrp-AA -> xx-Scrp-AA - // und-AA -> xx-Scrp-AA implies xx-AA -> xx-Scrp-AA - // und-Scrp -> xx-Scrp-AA implies und-Scrp-AA -> xx-Scrp-AA - // und-Scrp -> xx-Scrp-AA implies xx-Scrp -> xx-Scrp-AA - // xx -> xx-Scrp-AA implies xx-Scrp -> xx-Scrp-AA - // xx -> xx-Scrp-AA implies xx-AA -> xx-Scrp-AA - // - // The algorithm specified in - // http://unicode.org/reports/tr35/tr35-9.html#Supplemental_Data, - // Section C.10, does not handle the first case. For example, - // the CLDR data contains an entry und-BJ -> fr-Latn-BJ, but not - // there is no rule for und-Latn-BJ. According to spec, und-Latn-BJ - // would expand to en-Latn-BJ, violating the aforementioned principle. - // We deviate from the spec by letting und-Scrp-AA expand to xx-Scrp-AA - // if a rule of the form und-AA -> xx-Scrp-AA is defined. - // Note that as of version 23, CLDR has some explicitly specified - // entries that do not conform to these rules. The implementation - // will not correct these explicit inconsistencies. A later versions of CLDR - // is supposed to fix this. - {"und-Latn-BJ", "fr-Latn-BJ"}, - {"und-Bugi-ID", "bug-Bugi-ID"}, - // regions, scripts and languages without definitions - {"und-Arab-AA", "ar-Arab-AA"}, - {"und-Afak-RE", "fr-Afak-RE"}, - {"und-Arab-GB", "ks-Arab-GB"}, - {"abp-Arab-GB", "abp-Arab-GB"}, - // script has preference over region - {"und-Arab-NL", "ar-Arab-NL"}, - {"zza", "zza-Latn-TR"}, - // preserve variants and extensions - {"de-1901", "de-Latn-DE-1901"}, - {"de-x-abc", "de-Latn-DE-x-abc"}, - {"de-1901-x-abc", "de-Latn-DE-1901-x-abc"}, - {"x-abc", "x-abc"}, // TODO: is this the desired behavior? - } - for i, tt := range tests { - in, _ := Parse(tt.in) - out, _ := Parse(tt.out) - in, _ = in.addLikelySubtags() - if in.String() != out.String() { - t.Errorf("%d: add(%s) was %s; want %s", i, tt.in, in, tt.out) - } - } -} -func TestMinimize(t *testing.T) { - tests := []struct{ in, out string }{ - {"aa", "aa"}, - {"aa-Latn", "aa"}, - {"aa-Latn-ET", "aa"}, - {"aa-ET", "aa"}, - {"aa-Arab", "aa-Arab"}, - {"aa-Arab-ER", "aa-Arab-ER"}, - {"aa-Arab-ET", "aa-Arab"}, - {"und", "und"}, - {"und-Latn", "und"}, - {"und-Latn-US", "und"}, - {"en-Latn-US", "en"}, - {"cmn", "cmn"}, - {"cmn-Hans", "cmn-Hans"}, - {"cmn-Hant", "cmn-Hant"}, - {"zh-AU", "zh-AU"}, - {"zh-VN", "zh-VN"}, - {"zh-SG", "zh-SG"}, - {"zh-Hant", "zh-Hant"}, - {"zh-Hant-TW", "zh-TW"}, - {"zh-Hans", "zh"}, - {"zh-Hani", "zh-Hani"}, - {"und-Hans", "und-Hans"}, - {"und-Hani", "und-Hani"}, - - {"und-CW", "und-CW"}, - {"und-YT", "und-YT"}, - {"und-Arab", "und-Arab"}, - {"und-AM", "und-AM"}, - {"und-Arab-CC", "und-Arab-CC"}, - {"und-CC", "und-CC"}, - {"und-Latn-BJ", "und-BJ"}, - {"und-Bugi-ID", "und-Bugi"}, - {"bug-Bugi-ID", "bug-Bugi"}, - // regions, scripts and languages without definitions - {"und-Arab-AA", "und-Arab-AA"}, - // preserve variants and extensions - {"de-Latn-1901", "de-1901"}, - {"de-Latn-x-abc", "de-x-abc"}, - {"de-DE-1901-x-abc", "de-1901-x-abc"}, - {"x-abc", "x-abc"}, // TODO: is this the desired behavior? - } - for i, tt := range tests { - in, _ := Parse(tt.in) - out, _ := Parse(tt.out) - min, _ := in.minimize() - if min.String() != out.String() { - t.Errorf("%d: min(%s) was %s; want %s", i, tt.in, min, tt.out) - } - max, _ := min.addLikelySubtags() - if x, _ := in.addLikelySubtags(); x.String() != max.String() { - t.Errorf("%d: max(min(%s)) = %s; want %s", i, tt.in, max, x) - } - } -} - -func TestRegionGroups(t *testing.T) { - testCases := []struct { - a, b string - distance uint8 - }{ - {"zh-TW", "zh-HK", 5}, - {"zh-MO", "zh-HK", 4}, - {"es-ES", "es-AR", 5}, - {"es-ES", "es", 4}, - {"es-419", "es-MX", 4}, - {"es-AR", "es-MX", 4}, - {"es-ES", "es-MX", 5}, - {"es-PT", "es-MX", 5}, - } - for _, tc := range testCases { - a := MustParse(tc.a) - aScript, _ := a.Script() - b := MustParse(tc.b) - bScript, _ := b.Script() - - if aScript != bScript { - t.Errorf("scripts differ: %q vs %q", aScript, bScript) - continue - } - d, _ := regionGroupDist(a.region, b.region, aScript.scriptID, a.lang) - if d != tc.distance { - t.Errorf("got %q; want %q", d, tc.distance) - } - } -} - -func TestIsParadigmLocale(t *testing.T) { - testCases := map[string]bool{ - "en-US": true, - "en-GB": true, - "en-VI": false, - "es-GB": false, - "es-ES": true, - "es-419": true, - } - for str, want := range testCases { - tag := Make(str) - got := isParadigmLocale(tag.lang, tag.region) - if got != want { - t.Errorf("isPL(%q) = %v; want %v", str, got, want) - } - } -} - -// Implementation of String methods for various types for debugging purposes. - -func (m *matcher) String() string { - w := &bytes.Buffer{} - fmt.Fprintln(w, "Default:", m.default_) - for tag, h := range m.index { - fmt.Fprintf(w, " %s: %v\n", tag, h) - } - return w.String() -} - -func (h *matchHeader) String() string { - w := &bytes.Buffer{} - fmt.Fprint(w, "haveTag: ") - for _, h := range h.haveTags { - fmt.Fprintf(w, "%v, ", h) - } - return w.String() -} - -func (t haveTag) String() string { - return fmt.Sprintf("%v:%d:%v:%v-%v|%v", t.tag, t.index, t.conf, t.maxRegion, t.maxScript, t.altScript) -} - -func TestBestMatchAlloc(t *testing.T) { - m := NewMatcher(makeTagList("en sr nl")) - // Go allocates when creating a list of tags from a single tag! - list := []Tag{English} - avg := testtext.AllocsPerRun(1, func() { - m.Match(list...) - }) - if avg > 0 { - t.Errorf("got %f; want 0", avg) - } -} - -var benchHave = []Tag{ - mk("en"), - mk("en-GB"), - mk("za"), - mk("zh-Hant"), - mk("zh-Hans-CN"), - mk("zh"), - mk("zh-HK"), - mk("ar-MK"), - mk("en-CA"), - mk("fr-CA"), - mk("fr-US"), - mk("fr-CH"), - mk("fr"), - mk("lt"), - mk("lv"), - mk("iw"), - mk("iw-NL"), - mk("he"), - mk("he-IT"), - mk("tlh"), - mk("ja"), - mk("ja-Jpan"), - mk("ja-Jpan-JP"), - mk("de"), - mk("de-CH"), - mk("de-AT"), - mk("de-DE"), - mk("sr"), - mk("sr-Latn"), - mk("sr-Cyrl"), - mk("sr-ME"), -} - -var benchWant = [][]Tag{ - []Tag{ - mk("en"), - }, - []Tag{ - mk("en-AU"), - mk("de-HK"), - mk("nl"), - mk("fy"), - mk("lv"), - }, - []Tag{ - mk("en-AU"), - mk("de-HK"), - mk("nl"), - mk("fy"), - }, - []Tag{ - mk("ja-Hant"), - mk("da-HK"), - mk("nl"), - mk("zh-TW"), - }, - []Tag{ - mk("ja-Hant"), - mk("da-HK"), - mk("nl"), - mk("hr"), - }, -} - -func BenchmarkMatch(b *testing.B) { - m := newMatcher(benchHave, nil) - for i := 0; i < b.N; i++ { - for _, want := range benchWant { - m.getBest(want...) - } - } -} - -func BenchmarkMatchExact(b *testing.B) { - want := mk("en") - m := newMatcher(benchHave, nil) - for i := 0; i < b.N; i++ { - m.getBest(want) - } -} - -func BenchmarkMatchAltLanguagePresent(b *testing.B) { - want := mk("hr") - m := newMatcher(benchHave, nil) - for i := 0; i < b.N; i++ { - m.getBest(want) - } -} - -func BenchmarkMatchAltLanguageNotPresent(b *testing.B) { - want := mk("nn") - m := newMatcher(benchHave, nil) - for i := 0; i < b.N; i++ { - m.getBest(want) - } -} - -func BenchmarkMatchAltScriptPresent(b *testing.B) { - want := mk("zh-Hant-CN") - m := newMatcher(benchHave, nil) - for i := 0; i < b.N; i++ { - m.getBest(want) - } -} - -func BenchmarkMatchAltScriptNotPresent(b *testing.B) { - want := mk("fr-Cyrl") - m := newMatcher(benchHave, nil) - for i := 0; i < b.N; i++ { - m.getBest(want) - } -} - -func BenchmarkMatchLimitedExact(b *testing.B) { - want := []Tag{mk("he-NL"), mk("iw-NL")} - m := newMatcher(benchHave, nil) - for i := 0; i < b.N; i++ { - m.getBest(want...) - } -} diff --git a/vendor/golang.org/x/text/language/parse_test.go b/vendor/golang.org/x/text/language/parse_test.go deleted file mode 100644 index 9b40eb44..00000000 --- a/vendor/golang.org/x/text/language/parse_test.go +++ /dev/null @@ -1,517 +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 language - -import ( - "bytes" - "strings" - "testing" - - "golang.org/x/text/internal/tag" -) - -type scanTest struct { - ok bool // true if scanning does not result in an error - in string - tok []string // the expected tokens -} - -var tests = []scanTest{ - {true, "", []string{}}, - {true, "1", []string{"1"}}, - {true, "en", []string{"en"}}, - {true, "root", []string{"root"}}, - {true, "maxchars", []string{"maxchars"}}, - {false, "bad/", []string{}}, - {false, "morethan8", []string{}}, - {false, "-", []string{}}, - {false, "----", []string{}}, - {false, "_", []string{}}, - {true, "en-US", []string{"en", "US"}}, - {true, "en_US", []string{"en", "US"}}, - {false, "en-US-", []string{"en", "US"}}, - {false, "en-US--", []string{"en", "US"}}, - {false, "en-US---", []string{"en", "US"}}, - {false, "en--US", []string{"en", "US"}}, - {false, "-en-US", []string{"en", "US"}}, - {false, "-en--US-", []string{"en", "US"}}, - {false, "-en--US-", []string{"en", "US"}}, - {false, "en-.-US", []string{"en", "US"}}, - {false, ".-en--US-.", []string{"en", "US"}}, - {false, "en-u.-US", []string{"en", "US"}}, - {true, "en-u1-US", []string{"en", "u1", "US"}}, - {true, "maxchar1_maxchar2-maxchar3", []string{"maxchar1", "maxchar2", "maxchar3"}}, - {false, "moreThan8-moreThan8-e", []string{"e"}}, -} - -func TestScan(t *testing.T) { - for i, tt := range tests { - scan := makeScannerString(tt.in) - for j := 0; !scan.done; j++ { - if j >= len(tt.tok) { - t.Errorf("%d: extra token %q", i, scan.token) - } else if tag.Compare(tt.tok[j], scan.token) != 0 { - t.Errorf("%d: token %d: found %q; want %q", i, j, scan.token, tt.tok[j]) - break - } - scan.scan() - } - if s := strings.Join(tt.tok, "-"); tag.Compare(s, bytes.Replace(scan.b, b("_"), b("-"), -1)) != 0 { - t.Errorf("%d: input: found %q; want %q", i, scan.b, s) - } - if (scan.err == nil) != tt.ok { - t.Errorf("%d: ok: found %v; want %v", i, scan.err == nil, tt.ok) - } - } -} - -func TestAcceptMinSize(t *testing.T) { - for i, tt := range tests { - // count number of successive tokens with a minimum size. - for sz := 1; sz <= 8; sz++ { - scan := makeScannerString(tt.in) - scan.end, scan.next = 0, 0 - end := scan.acceptMinSize(sz) - n := 0 - for i := 0; i < len(tt.tok) && len(tt.tok[i]) >= sz; i++ { - n += len(tt.tok[i]) - if i > 0 { - n++ - } - } - if end != n { - t.Errorf("%d:%d: found len %d; want %d", i, sz, end, n) - } - } - } -} - -type parseTest struct { - i int // the index of this test - in string - lang, script, region string - variants, ext string - extList []string // only used when more than one extension is present - invalid bool - rewrite bool // special rewrite not handled by parseTag - changed bool // string needed to be reformatted -} - -func parseTests() []parseTest { - tests := []parseTest{ - {in: "root", lang: "und"}, - {in: "und", lang: "und"}, - {in: "en", lang: "en"}, - {in: "xy", lang: "und", invalid: true}, - {in: "en-ZY", lang: "en", invalid: true}, - {in: "gsw", lang: "gsw"}, - {in: "sr_Latn", lang: "sr", script: "Latn"}, - {in: "af-Arab", lang: "af", script: "Arab"}, - {in: "nl-BE", lang: "nl", region: "BE"}, - {in: "es-419", lang: "es", region: "419"}, - {in: "und-001", lang: "und", region: "001"}, - {in: "de-latn-be", lang: "de", script: "Latn", region: "BE"}, - // Variants - {in: "de-1901", lang: "de", variants: "1901"}, - // Accept with unsuppressed script. - {in: "de-Latn-1901", lang: "de", script: "Latn", variants: "1901"}, - // Specialized. - {in: "sl-rozaj", lang: "sl", variants: "rozaj"}, - {in: "sl-rozaj-lipaw", lang: "sl", variants: "rozaj-lipaw"}, - {in: "sl-rozaj-biske", lang: "sl", variants: "rozaj-biske"}, - {in: "sl-rozaj-biske-1994", lang: "sl", variants: "rozaj-biske-1994"}, - {in: "sl-rozaj-1994", lang: "sl", variants: "rozaj-1994"}, - // Maximum number of variants while adhering to prefix rules. - {in: "sl-rozaj-biske-1994-alalc97-fonipa-fonupa-fonxsamp", lang: "sl", variants: "rozaj-biske-1994-alalc97-fonipa-fonupa-fonxsamp"}, - - // Sorting. - {in: "sl-1994-biske-rozaj", lang: "sl", variants: "rozaj-biske-1994", changed: true}, - {in: "sl-rozaj-biske-1994-alalc97-fonupa-fonipa-fonxsamp", lang: "sl", variants: "rozaj-biske-1994-alalc97-fonipa-fonupa-fonxsamp", changed: true}, - {in: "nl-fonxsamp-alalc97-fonipa-fonupa", lang: "nl", variants: "alalc97-fonipa-fonupa-fonxsamp", changed: true}, - - // Duplicates variants are removed, but not an error. - {in: "nl-fonupa-fonupa", lang: "nl", variants: "fonupa"}, - - // Variants that do not have correct prefixes. We still accept these. - {in: "de-Cyrl-1901", lang: "de", script: "Cyrl", variants: "1901"}, - {in: "sl-rozaj-lipaw-1994", lang: "sl", variants: "rozaj-lipaw-1994"}, - {in: "sl-1994-biske-rozaj-1994-biske-rozaj", lang: "sl", variants: "rozaj-biske-1994", changed: true}, - {in: "de-Cyrl-1901", lang: "de", script: "Cyrl", variants: "1901"}, - - // Invalid variant. - {in: "de-1902", lang: "de", variants: "", invalid: true}, - - {in: "EN_CYRL", lang: "en", script: "Cyrl"}, - // private use and extensions - {in: "x-a-b-c-d", ext: "x-a-b-c-d"}, - {in: "x_A.-B-C_D", ext: "x-b-c-d", invalid: true, changed: true}, - {in: "x-aa-bbbb-cccccccc-d", ext: "x-aa-bbbb-cccccccc-d"}, - {in: "en-c_cc-b-bbb-a-aaa", lang: "en", changed: true, extList: []string{"a-aaa", "b-bbb", "c-cc"}}, - {in: "en-x_cc-b-bbb-a-aaa", lang: "en", ext: "x-cc-b-bbb-a-aaa", changed: true}, - {in: "en-c_cc-b-bbb-a-aaa-x-x", lang: "en", changed: true, extList: []string{"a-aaa", "b-bbb", "c-cc", "x-x"}}, - {in: "en-v-c", lang: "en", ext: "", invalid: true}, - {in: "en-v-abcdefghi", lang: "en", ext: "", invalid: true}, - {in: "en-v-abc-x", lang: "en", ext: "v-abc", invalid: true}, - {in: "en-v-abc-x-", lang: "en", ext: "v-abc", invalid: true}, - {in: "en-v-abc-w-x-xx", lang: "en", extList: []string{"v-abc", "x-xx"}, invalid: true, changed: true}, - {in: "en-v-abc-w-y-yx", lang: "en", extList: []string{"v-abc", "y-yx"}, invalid: true, changed: true}, - {in: "en-v-c-abc", lang: "en", ext: "c-abc", invalid: true, changed: true}, - {in: "en-v-w-abc", lang: "en", ext: "w-abc", invalid: true, changed: true}, - {in: "en-v-x-abc", lang: "en", ext: "x-abc", invalid: true, changed: true}, - {in: "en-v-x-a", lang: "en", ext: "x-a", invalid: true, changed: true}, - {in: "en-9-aa-0-aa-z-bb-x-a", lang: "en", extList: []string{"0-aa", "9-aa", "z-bb", "x-a"}, changed: true}, - {in: "en-u-c", lang: "en", ext: "", invalid: true}, - {in: "en-u-co-phonebk", lang: "en", ext: "u-co-phonebk"}, - {in: "en-u-co-phonebk-ca", lang: "en", ext: "u-co-phonebk", invalid: true}, - {in: "en-u-nu-arabic-co-phonebk-ca", lang: "en", ext: "u-co-phonebk-nu-arabic", invalid: true, changed: true}, - {in: "en-u-nu-arabic-co-phonebk-ca-x", lang: "en", ext: "u-co-phonebk-nu-arabic", invalid: true, changed: true}, - {in: "en-u-nu-arabic-co-phonebk-ca-s", lang: "en", ext: "u-co-phonebk-nu-arabic", invalid: true, changed: true}, - {in: "en-u-nu-arabic-co-phonebk-ca-a12345678", lang: "en", ext: "u-co-phonebk-nu-arabic", invalid: true, changed: true}, - {in: "en-u-co-phonebook", lang: "en", ext: "", invalid: true}, - {in: "en-u-co-phonebook-cu-xau", lang: "en", ext: "u-cu-xau", invalid: true, changed: true}, - {in: "en-Cyrl-u-co-phonebk", lang: "en", script: "Cyrl", ext: "u-co-phonebk"}, - {in: "en-US-u-co-phonebk", lang: "en", region: "US", ext: "u-co-phonebk"}, - {in: "en-US-u-co-phonebk-cu-xau", lang: "en", region: "US", ext: "u-co-phonebk-cu-xau"}, - {in: "en-scotland-u-co-phonebk", lang: "en", variants: "scotland", ext: "u-co-phonebk"}, - {in: "en-u-cu-xua-co-phonebk", lang: "en", ext: "u-co-phonebk-cu-xua", changed: true}, - {in: "en-u-def-abc-cu-xua-co-phonebk", lang: "en", ext: "u-abc-def-co-phonebk-cu-xua", changed: true}, - {in: "en-u-def-abc", lang: "en", ext: "u-abc-def", changed: true}, - {in: "en-u-cu-xua-co-phonebk-a-cd", lang: "en", extList: []string{"a-cd", "u-co-phonebk-cu-xua"}, changed: true}, - // Invalid "u" extension. Drop invalid parts. - {in: "en-u-cu-co-phonebk", lang: "en", extList: []string{"u-co-phonebk"}, invalid: true, changed: true}, - {in: "en-u-cu-xau-co", lang: "en", extList: []string{"u-cu-xau"}, invalid: true}, - // We allow duplicate keys as the LDML spec does not explicitly prohibit it. - // TODO: Consider eliminating duplicates and returning an error. - {in: "en-u-cu-xau-co-phonebk-cu-xau", lang: "en", ext: "u-co-phonebk-cu-xau-cu-xau", changed: true}, - {in: "en-t-en-Cyrl-NL-fonipa", lang: "en", ext: "t-en-cyrl-nl-fonipa", changed: true}, - {in: "en-t-en-Cyrl-NL-fonipa-t0-abc-def", lang: "en", ext: "t-en-cyrl-nl-fonipa-t0-abc-def", changed: true}, - {in: "en-t-t0-abcd", lang: "en", ext: "t-t0-abcd"}, - // Not necessary to have changed here. - {in: "en-t-nl-abcd", lang: "en", ext: "t-nl", invalid: true}, - {in: "en-t-nl-latn", lang: "en", ext: "t-nl-latn"}, - {in: "en-t-t0-abcd-x-a", lang: "en", extList: []string{"t-t0-abcd", "x-a"}}, - // invalid - {in: "", lang: "und", invalid: true}, - {in: "-", lang: "und", invalid: true}, - {in: "x", lang: "und", invalid: true}, - {in: "x-", lang: "und", invalid: true}, - {in: "x--", lang: "und", invalid: true}, - {in: "a-a-b-c-d", lang: "und", invalid: true}, - {in: "en-", lang: "en", invalid: true}, - {in: "enne-", lang: "und", invalid: true}, - {in: "en.", lang: "und", invalid: true}, - {in: "en.-latn", lang: "und", invalid: true}, - {in: "en.-en", lang: "en", invalid: true}, - {in: "x-a-tooManyChars-c-d", ext: "x-a-c-d", invalid: true, changed: true}, - {in: "a-tooManyChars-c-d", lang: "und", invalid: true}, - // TODO: check key-value validity - // { in: "en-u-cu-xd", lang: "en", ext: "u-cu-xd", invalid: true }, - {in: "en-t-abcd", lang: "en", invalid: true}, - {in: "en-Latn-US-en", lang: "en", script: "Latn", region: "US", invalid: true}, - // rewrites (more tests in TestGrandfathered) - {in: "zh-min-nan", lang: "nan"}, - {in: "zh-yue", lang: "yue"}, - {in: "zh-xiang", lang: "hsn", rewrite: true}, - {in: "zh-guoyu", lang: "cmn", rewrite: true}, - {in: "iw", lang: "iw"}, - {in: "sgn-BE-FR", lang: "sfb", rewrite: true}, - {in: "i-klingon", lang: "tlh", rewrite: true}, - } - for i, tt := range tests { - tests[i].i = i - if tt.extList != nil { - tests[i].ext = strings.Join(tt.extList, "-") - } - if tt.ext != "" && tt.extList == nil { - tests[i].extList = []string{tt.ext} - } - } - return tests -} - -func TestParseExtensions(t *testing.T) { - for i, tt := range parseTests() { - if tt.ext == "" || tt.rewrite { - continue - } - scan := makeScannerString(tt.in) - if len(scan.b) > 1 && scan.b[1] != '-' { - scan.end = nextExtension(string(scan.b), 0) - scan.next = scan.end + 1 - scan.scan() - } - start := scan.start - scan.toLower(start, len(scan.b)) - parseExtensions(&scan) - ext := string(scan.b[start:]) - if ext != tt.ext { - t.Errorf("%d(%s): ext was %v; want %v", i, tt.in, ext, tt.ext) - } - if changed := !strings.HasPrefix(tt.in[start:], ext); changed != tt.changed { - t.Errorf("%d(%s): changed was %v; want %v", i, tt.in, changed, tt.changed) - } - } -} - -// partChecks runs checks for each part by calling the function returned by f. -func partChecks(t *testing.T, f func(*parseTest) (Tag, bool)) { - for i, tt := range parseTests() { - tag, skip := f(&tt) - if skip { - continue - } - if l, _ := getLangID(b(tt.lang)); l != tag.lang { - t.Errorf("%d: lang was %q; want %q", i, tag.lang, l) - } - if sc, _ := getScriptID(script, b(tt.script)); sc != tag.script { - t.Errorf("%d: script was %q; want %q", i, tag.script, sc) - } - if r, _ := getRegionID(b(tt.region)); r != tag.region { - t.Errorf("%d: region was %q; want %q", i, tag.region, r) - } - if tag.str == "" { - continue - } - p := int(tag.pVariant) - if p < int(tag.pExt) { - p++ - } - if s, g := tag.str[p:tag.pExt], tt.variants; s != g { - t.Errorf("%d: variants was %q; want %q", i, s, g) - } - p = int(tag.pExt) - if p > 0 && p < len(tag.str) { - p++ - } - if s, g := (tag.str)[p:], tt.ext; s != g { - t.Errorf("%d: extensions were %q; want %q", i, s, g) - } - } -} - -func TestParseTag(t *testing.T) { - partChecks(t, func(tt *parseTest) (id Tag, skip bool) { - if strings.HasPrefix(tt.in, "x-") || tt.rewrite { - return Tag{}, true - } - scan := makeScannerString(tt.in) - id, end := parseTag(&scan) - id.str = string(scan.b[:end]) - tt.ext = "" - tt.extList = []string{} - return id, false - }) -} - -func TestParse(t *testing.T) { - partChecks(t, func(tt *parseTest) (id Tag, skip bool) { - id, err := Raw.Parse(tt.in) - ext := "" - if id.str != "" { - if strings.HasPrefix(id.str, "x-") { - ext = id.str - } else if int(id.pExt) < len(id.str) && id.pExt > 0 { - ext = id.str[id.pExt+1:] - } - } - if tag, _ := Raw.Parse(id.String()); tag.String() != id.String() { - t.Errorf("%d:%s: reparse was %q; want %q", tt.i, tt.in, id.String(), tag.String()) - } - if ext != tt.ext { - t.Errorf("%d:%s: ext was %q; want %q", tt.i, tt.in, ext, tt.ext) - } - changed := id.str != "" && !strings.HasPrefix(tt.in, id.str) - if changed != tt.changed { - t.Errorf("%d:%s: changed was %v; want %v", tt.i, tt.in, changed, tt.changed) - } - if (err != nil) != tt.invalid { - t.Errorf("%d:%s: invalid was %v; want %v. Error: %v", tt.i, tt.in, err != nil, tt.invalid, err) - } - return id, false - }) -} - -func TestErrors(t *testing.T) { - mkInvalid := func(s string) error { - return mkErrInvalid([]byte(s)) - } - tests := []struct { - in string - out error - }{ - // invalid subtags. - {"ac", mkInvalid("ac")}, - {"AC", mkInvalid("ac")}, - {"aa-Uuuu", mkInvalid("Uuuu")}, - {"aa-AB", mkInvalid("AB")}, - // ill-formed wins over invalid. - {"ac-u", errSyntax}, - {"ac-u-ca", errSyntax}, - {"ac-u-ca-co-pinyin", errSyntax}, - {"noob", errSyntax}, - } - for _, tt := range tests { - _, err := Parse(tt.in) - if err != tt.out { - t.Errorf("%s: was %q; want %q", tt.in, err, tt.out) - } - } -} - -func TestCompose1(t *testing.T) { - partChecks(t, func(tt *parseTest) (id Tag, skip bool) { - l, _ := ParseBase(tt.lang) - s, _ := ParseScript(tt.script) - r, _ := ParseRegion(tt.region) - v := []Variant{} - for _, x := range strings.Split(tt.variants, "-") { - p, _ := ParseVariant(x) - v = append(v, p) - } - e := []Extension{} - for _, x := range tt.extList { - p, _ := ParseExtension(x) - e = append(e, p) - } - id, _ = Raw.Compose(l, s, r, v, e) - return id, false - }) -} - -func TestCompose2(t *testing.T) { - partChecks(t, func(tt *parseTest) (id Tag, skip bool) { - l, _ := ParseBase(tt.lang) - s, _ := ParseScript(tt.script) - r, _ := ParseRegion(tt.region) - p := []interface{}{l, s, r, s, r, l} - for _, x := range strings.Split(tt.variants, "-") { - v, _ := ParseVariant(x) - p = append(p, v) - } - for _, x := range tt.extList { - e, _ := ParseExtension(x) - p = append(p, e) - } - id, _ = Raw.Compose(p...) - return id, false - }) -} - -func TestCompose3(t *testing.T) { - partChecks(t, func(tt *parseTest) (id Tag, skip bool) { - id, _ = Raw.Parse(tt.in) - id, _ = Raw.Compose(id) - return id, false - }) -} - -func mk(s string) Tag { - return Raw.Make(s) -} - -func TestParseAcceptLanguage(t *testing.T) { - type res struct { - t Tag - q float32 - } - en := []res{{mk("en"), 1.0}} - tests := []struct { - out []res - in string - ok bool - }{ - {en, "en", true}, - {en, " en", true}, - {en, "en ", true}, - {en, " en ", true}, - {en, "en,", true}, - {en, ",en", true}, - {en, ",,,en,,,", true}, - {en, ",en;q=1", true}, - - // We allow an empty input, contrary to spec. - {nil, "", true}, - {[]res{{mk("aa"), 1}}, "aa;", true}, // allow unspecified weight - - // errors - {nil, ";", false}, - {nil, "$", false}, - {nil, "e;", false}, - {nil, "x;", false}, - {nil, "x", false}, - {nil, "ac", false}, // non-existing language - {nil, "aa;q", false}, - {nil, "aa;q=", false}, - {nil, "aa;q=.", false}, - - // odd fallbacks - { - []res{{mk("en"), 0.1}}, - " english ;q=.1", - true, - }, - { - []res{{mk("it"), 1.0}, {mk("de"), 1.0}, {mk("fr"), 1.0}}, - " italian, deutsch, french", - true, - }, - - // lists - { - []res{{mk("en"), 0.1}}, - "en;q=.1", - true, - }, - { - []res{{mk("mul"), 1.0}}, - "*", - true, - }, - { - []res{{mk("en"), 1.0}, {mk("de"), 1.0}}, - "en,de", - true, - }, - { - []res{{mk("en"), 1.0}, {mk("de"), .5}}, - "en,de;q=0.5", - true, - }, - { - []res{{mk("de"), 0.8}, {mk("en"), 0.5}}, - " en ; q = 0.5 , , de;q=0.8", - true, - }, - { - []res{{mk("en"), 1.0}, {mk("de"), 1.0}, {mk("fr"), 1.0}, {mk("tlh"), 1.0}}, - "en,de,fr,i-klingon", - true, - }, - // sorting - { - []res{{mk("tlh"), 0.4}, {mk("de"), 0.2}, {mk("fr"), 0.2}, {mk("en"), 0.1}}, - "en;q=0.1,de;q=0.2,fr;q=0.2,i-klingon;q=0.4", - true, - }, - // dropping - { - []res{{mk("fr"), 0.2}, {mk("en"), 0.1}}, - "en;q=0.1,de;q=0,fr;q=0.2,i-klingon;q=0.0", - true, - }, - } - for i, tt := range tests { - tags, qs, e := ParseAcceptLanguage(tt.in) - if e == nil != tt.ok { - t.Errorf("%d:%s:err: was %v; want %v", i, tt.in, e == nil, tt.ok) - } - for j, tag := range tags { - if out := tt.out[j]; !tag.equalTags(out.t) || qs[j] != out.q { - t.Errorf("%d:%s: was %s, %1f; want %s, %1f", i, tt.in, tag, qs[j], out.t, out.q) - break - } - } - } -} diff --git a/vendor/golang.org/x/text/secure/bidirule/bench_test.go b/vendor/golang.org/x/text/secure/bidirule/bench_test.go deleted file mode 100644 index 2db922bf..00000000 --- a/vendor/golang.org/x/text/secure/bidirule/bench_test.go +++ /dev/null @@ -1,54 +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 bidirule - -import ( - "testing" - - "golang.org/x/text/internal/testtext" -) - -var benchData = []struct{ name, data string }{ - {"ascii", "Scheveningen"}, - {"arabic", "دبي"}, - {"hangul", "다음과"}, -} - -func doBench(b *testing.B, fn func(b *testing.B, data string)) { - for _, d := range benchData { - testtext.Bench(b, d.name, func(b *testing.B) { fn(b, d.data) }) - } -} - -func BenchmarkSpan(b *testing.B) { - r := New() - doBench(b, func(b *testing.B, str string) { - b.SetBytes(int64(len(str))) - data := []byte(str) - for i := 0; i < b.N; i++ { - r.Reset() - r.Span(data, true) - } - }) -} - -func BenchmarkDirectionASCII(b *testing.B) { - doBench(b, func(b *testing.B, str string) { - b.SetBytes(int64(len(str))) - data := []byte(str) - for i := 0; i < b.N; i++ { - Direction(data) - } - }) -} - -func BenchmarkDirectionStringASCII(b *testing.B) { - doBench(b, func(b *testing.B, str string) { - b.SetBytes(int64(len(str))) - for i := 0; i < b.N; i++ { - DirectionString(str) - } - }) -} diff --git a/vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0_test.go b/vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0_test.go deleted file mode 100644 index 06ec5f5d..00000000 --- a/vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0_test.go +++ /dev/null @@ -1,694 +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.10 - -package bidirule - -import ( - "golang.org/x/text/transform" - "golang.org/x/text/unicode/bidi" -) - -var testCases = [][]ruleTest{ - // Go-specific rules. - // Invalid UTF-8 is invalid. - 0: []ruleTest{{ - in: "", - dir: bidi.LeftToRight, - }, { - in: "\x80", - dir: bidi.LeftToRight, - err: ErrInvalid, - n: 0, - }, { - in: "\xcc", - dir: bidi.LeftToRight, - err: ErrInvalid, - n: 0, - }, { - in: "abc\x80", - dir: bidi.LeftToRight, - err: ErrInvalid, - n: 3, - }, { - in: "abc\xcc", - dir: bidi.LeftToRight, - err: ErrInvalid, - n: 3, - }, { - in: "abc\xccdef", - dir: bidi.LeftToRight, - err: ErrInvalid, - n: 3, - }, { - in: "\xccdef", - dir: bidi.LeftToRight, - err: ErrInvalid, - n: 0, - }, { - in: strR + "\x80", - dir: bidi.RightToLeft, - err: ErrInvalid, - n: len(strR), - }, { - in: strR + "\xcc", - dir: bidi.RightToLeft, - err: ErrInvalid, - n: len(strR), - }, { - in: strAL + "\xcc" + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: len(strAL), - }, { - in: "\xcc" + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 0, - }}, - - // Rule 2.1: The first character must be a character with Bidi property L, - // R, or AL. If it has the R or AL property, it is an RTL label; if it has - // the L property, it is an LTR label. - 1: []ruleTest{{ - in: strL, - dir: bidi.LeftToRight, - }, { - in: strR, - dir: bidi.RightToLeft, - }, { - in: strAL, - dir: bidi.RightToLeft, - }, { - in: strAN, - dir: bidi.RightToLeft, - err: ErrInvalid, - }, { - in: strEN, - dir: bidi.LeftToRight, - err: ErrInvalid, - n: len(strEN), - }, { - in: strES, - dir: bidi.LeftToRight, - err: ErrInvalid, - n: len(strES), - }, { - in: strET, - dir: bidi.LeftToRight, - err: ErrInvalid, - n: len(strET), - }, { - in: strCS, - dir: bidi.LeftToRight, - err: ErrInvalid, - n: len(strCS), - }, { - in: strNSM, - dir: bidi.LeftToRight, - err: ErrInvalid, - n: len(strNSM), - }, { - in: strBN, - dir: bidi.LeftToRight, - err: ErrInvalid, - n: len(strBN), - }, { - in: strB, - dir: bidi.LeftToRight, - err: ErrInvalid, - n: len(strB), - }, { - in: strS, - dir: bidi.LeftToRight, - err: ErrInvalid, - n: len(strS), - }, { - in: strWS, - dir: bidi.LeftToRight, - err: ErrInvalid, - n: len(strWS), - }, { - in: strON, - dir: bidi.LeftToRight, - err: ErrInvalid, - n: len(strON), - }, { - in: strEN + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 3, - }, { - in: strES + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 2, - }, { - in: strET + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 1, - }, { - in: strCS + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 1, - }, { - in: strNSM + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 2, - }, { - in: strBN + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 3, - }, { - in: strB + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 3, - }, { - in: strS + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 1, - }, { - in: strWS + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 1, - }, { - in: strON + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 1, - }}, - - // Rule 2.2: In an RTL label, only characters with the Bidi properties R, - // AL, AN, EN, ES, CS, ET, ON, BN, or NSM are allowed. - 2: []ruleTest{{ - in: strR + strR + strAL, - dir: bidi.RightToLeft, - }, { - in: strR + strAL + strR, - dir: bidi.RightToLeft, - }, { - in: strR + strAN + strAL, - dir: bidi.RightToLeft, - }, { - in: strR + strEN + strR, - dir: bidi.RightToLeft, - }, { - in: strR + strES + strR, - dir: bidi.RightToLeft, - }, { - in: strR + strCS + strR, - dir: bidi.RightToLeft, - }, { - in: strR + strET + strAL, - dir: bidi.RightToLeft, - }, { - in: strR + strON + strR, - dir: bidi.RightToLeft, - }, { - in: strR + strBN + strR, - dir: bidi.RightToLeft, - }, { - in: strR + strNSM + strAL, - dir: bidi.RightToLeft, - }, { - in: strR + strL + strR, - dir: bidi.RightToLeft, - n: len(strR), - err: ErrInvalid, - }, { - in: strR + strB + strR, - dir: bidi.RightToLeft, - n: len(strR), - err: ErrInvalid, - }, { - in: strR + strS + strAL, - dir: bidi.RightToLeft, - n: len(strR), - err: ErrInvalid, - }, { - in: strR + strWS + strAL, - dir: bidi.RightToLeft, - n: len(strR), - err: ErrInvalid, - }, { - in: strAL + strR + strAL, - dir: bidi.RightToLeft, - }, { - in: strAL + strAL + strR, - dir: bidi.RightToLeft, - }, { - in: strAL + strAN + strAL, - dir: bidi.RightToLeft, - }, { - in: strAL + strEN + strR, - dir: bidi.RightToLeft, - }, { - in: strAL + strES + strR, - dir: bidi.RightToLeft, - }, { - in: strAL + strCS + strR, - dir: bidi.RightToLeft, - }, { - in: strAL + strET + strAL, - dir: bidi.RightToLeft, - }, { - in: strAL + strON + strR, - dir: bidi.RightToLeft, - }, { - in: strAL + strBN + strR, - dir: bidi.RightToLeft, - }, { - in: strAL + strNSM + strAL, - dir: bidi.RightToLeft, - }, { - in: strAL + strL + strR, - dir: bidi.RightToLeft, - n: len(strAL), - err: ErrInvalid, - }, { - in: strAL + strB + strR, - dir: bidi.RightToLeft, - n: len(strAL), - err: ErrInvalid, - }, { - in: strAL + strS + strAL, - dir: bidi.RightToLeft, - n: len(strAL), - err: ErrInvalid, - }, { - in: strAL + strWS + strAL, - dir: bidi.RightToLeft, - n: len(strAL), - err: ErrInvalid, - }}, - - // Rule 2.3: In an RTL label, the end of the label must be a character with - // Bidi property R, AL, EN, or AN, followed by zero or more characters with - // Bidi property NSM. - 3: []ruleTest{{ - in: strR + strNSM, - dir: bidi.RightToLeft, - }, { - in: strR + strR, - dir: bidi.RightToLeft, - }, { - in: strR + strAL + strNSM, - dir: bidi.RightToLeft, - }, { - in: strR + strEN + strNSM + strNSM, - dir: bidi.RightToLeft, - }, { - in: strR + strAN, - dir: bidi.RightToLeft, - }, { - in: strR + strES + strNSM, - dir: bidi.RightToLeft, - n: len(strR + strES + strNSM), - err: ErrInvalid, - }, { - in: strR + strCS + strNSM + strNSM, - dir: bidi.RightToLeft, - n: len(strR + strCS + strNSM + strNSM), - err: ErrInvalid, - }, { - in: strR + strET, - dir: bidi.RightToLeft, - n: len(strR + strET), - err: ErrInvalid, - }, { - in: strR + strON + strNSM, - dir: bidi.RightToLeft, - n: len(strR + strON + strNSM), - err: ErrInvalid, - }, { - in: strR + strBN + strNSM + strNSM, - dir: bidi.RightToLeft, - n: len(strR + strBN + strNSM + strNSM), - err: ErrInvalid, - }, { - in: strR + strL + strNSM, - dir: bidi.RightToLeft, - n: len(strR), - err: ErrInvalid, - }, { - in: strR + strB + strNSM + strNSM, - dir: bidi.RightToLeft, - n: len(strR), - err: ErrInvalid, - }, { - in: strR + strS, - dir: bidi.RightToLeft, - n: len(strR), - err: ErrInvalid, - }, { - in: strR + strWS, - dir: bidi.RightToLeft, - n: len(strR), - err: ErrInvalid, - }, { - in: strAL + strNSM, - dir: bidi.RightToLeft, - }, { - in: strAL + strR, - dir: bidi.RightToLeft, - }, { - in: strAL + strAL + strNSM, - dir: bidi.RightToLeft, - }, { - in: strAL + strEN + strNSM + strNSM, - dir: bidi.RightToLeft, - }, { - in: strAL + strAN, - dir: bidi.RightToLeft, - }, { - in: strAL + strES + strNSM, - dir: bidi.RightToLeft, - n: len(strAL + strES + strNSM), - err: ErrInvalid, - }, { - in: strAL + strCS + strNSM + strNSM, - dir: bidi.RightToLeft, - n: len(strAL + strCS + strNSM + strNSM), - err: ErrInvalid, - }, { - in: strAL + strET, - dir: bidi.RightToLeft, - n: len(strAL + strET), - err: ErrInvalid, - }, { - in: strAL + strON + strNSM, - dir: bidi.RightToLeft, - n: len(strAL + strON + strNSM), - err: ErrInvalid, - }, { - in: strAL + strBN + strNSM + strNSM, - dir: bidi.RightToLeft, - n: len(strAL + strBN + strNSM + strNSM), - err: ErrInvalid, - }, { - in: strAL + strL + strNSM, - dir: bidi.RightToLeft, - n: len(strAL), - err: ErrInvalid, - }, { - in: strAL + strB + strNSM + strNSM, - dir: bidi.RightToLeft, - n: len(strAL), - err: ErrInvalid, - }, { - in: strAL + strS, - dir: bidi.RightToLeft, - n: len(strAL), - err: ErrInvalid, - }, { - in: strAL + strWS, - dir: bidi.RightToLeft, - n: len(strAL), - err: ErrInvalid, - }}, - - // Rule 2.4: In an RTL label, if an EN is present, no AN may be present, - // and vice versa. - 4: []ruleTest{{ - in: strR + strEN + strAN, - dir: bidi.RightToLeft, - n: len(strR + strEN), - err: ErrInvalid, - }, { - in: strR + strAN + strEN + strNSM, - dir: bidi.RightToLeft, - n: len(strR + strAN), - err: ErrInvalid, - }, { - in: strAL + strEN + strAN, - dir: bidi.RightToLeft, - n: len(strAL + strEN), - err: ErrInvalid, - }, { - in: strAL + strAN + strEN + strNSM, - dir: bidi.RightToLeft, - n: len(strAL + strAN), - err: ErrInvalid, - }}, - - // Rule 2.5: In an LTR label, only characters with the Bidi properties L, - // EN, ES, CS, ET, ON, BN, or NSM are allowed. - 5: []ruleTest{{ - in: strL + strL + strL, - dir: bidi.LeftToRight, - }, { - in: strL + strEN + strL, - dir: bidi.LeftToRight, - }, { - in: strL + strES + strL, - dir: bidi.LeftToRight, - }, { - in: strL + strCS + strL, - dir: bidi.LeftToRight, - }, { - in: strL + strET + strL, - dir: bidi.LeftToRight, - }, { - in: strL + strON + strL, - dir: bidi.LeftToRight, - }, { - in: strL + strBN + strL, - dir: bidi.LeftToRight, - }, { - in: strL + strNSM + strL, - dir: bidi.LeftToRight, - }, { - in: strL + strR + strL, - dir: bidi.RightToLeft, - n: len(strL), - err: ErrInvalid, - }, { - in: strL + strAL + strL, - dir: bidi.RightToLeft, - n: len(strL), - err: ErrInvalid, - }, { - in: strL + strAN + strL, - dir: bidi.RightToLeft, - n: len(strL), - err: ErrInvalid, - }, { - in: strL + strB + strL, - dir: bidi.LeftToRight, - n: len(strL + strB + strL), - err: ErrInvalid, - }, { - in: strL + strB + strL + strR, - dir: bidi.RightToLeft, - n: len(strL + strB + strL), - err: ErrInvalid, - }, { - in: strL + strS + strL, - dir: bidi.LeftToRight, - n: len(strL + strS + strL), - err: ErrInvalid, - }, { - in: strL + strS + strL + strR, - dir: bidi.RightToLeft, - n: len(strL + strS + strL), - err: ErrInvalid, - }, { - in: strL + strWS + strL, - dir: bidi.LeftToRight, - n: len(strL + strWS + strL), - err: ErrInvalid, - }, { - in: strL + strWS + strL + strR, - dir: bidi.RightToLeft, - n: len(strL + strWS + strL), - err: ErrInvalid, - }}, - - // Rule 2.6: In an LTR label, the end of the label must be a character with - // Bidi property L or EN, followed by zero or more characters with Bidi - // property NSM. - 6: []ruleTest{{ - in: strL, - dir: bidi.LeftToRight, - }, { - in: strL + strNSM, - dir: bidi.LeftToRight, - }, { - in: strL + strNSM + strNSM, - dir: bidi.LeftToRight, - }, { - in: strL + strEN, - dir: bidi.LeftToRight, - }, { - in: strL + strEN + strNSM, - dir: bidi.LeftToRight, - }, { - in: strL + strEN + strNSM + strNSM, - dir: bidi.LeftToRight, - }, { - in: strL + strES, - dir: bidi.LeftToRight, - n: len(strL + strES), - err: ErrInvalid, - }, { - in: strL + strES + strR, - dir: bidi.RightToLeft, - n: len(strL + strES), - err: ErrInvalid, - }, { - in: strL + strCS, - dir: bidi.LeftToRight, - n: len(strL + strCS), - err: ErrInvalid, - }, { - in: strL + strCS + strR, - dir: bidi.RightToLeft, - n: len(strL + strCS), - err: ErrInvalid, - }, { - in: strL + strET, - dir: bidi.LeftToRight, - n: len(strL + strET), - err: ErrInvalid, - }, { - in: strL + strET + strR, - dir: bidi.RightToLeft, - n: len(strL + strET), - err: ErrInvalid, - }, { - in: strL + strON, - dir: bidi.LeftToRight, - n: len(strL + strON), - err: ErrInvalid, - }, { - in: strL + strON + strR, - dir: bidi.RightToLeft, - n: len(strL + strON), - err: ErrInvalid, - }, { - in: strL + strBN, - dir: bidi.LeftToRight, - n: len(strL + strBN), - err: ErrInvalid, - }, { - in: strL + strBN + strR, - dir: bidi.RightToLeft, - n: len(strL + strBN), - err: ErrInvalid, - }, { - in: strL + strR, - dir: bidi.RightToLeft, - n: len(strL), - err: ErrInvalid, - }, { - in: strL + strAL, - dir: bidi.RightToLeft, - n: len(strL), - err: ErrInvalid, - }, { - in: strL + strAN, - dir: bidi.RightToLeft, - n: len(strL), - err: ErrInvalid, - }, { - in: strL + strB, - dir: bidi.LeftToRight, - n: len(strL + strB), - err: ErrInvalid, - }, { - in: strL + strB + strR, - dir: bidi.RightToLeft, - n: len(strL + strB), - err: ErrInvalid, - }, { - in: strL + strS, - dir: bidi.LeftToRight, - n: len(strL + strS), - err: ErrInvalid, - }, { - in: strL + strS + strR, - dir: bidi.RightToLeft, - n: len(strL + strS), - err: ErrInvalid, - }, { - in: strL + strWS, - dir: bidi.LeftToRight, - n: len(strL + strWS), - err: ErrInvalid, - }, { - in: strL + strWS + strR, - dir: bidi.RightToLeft, - n: len(strL + strWS), - err: ErrInvalid, - }}, - - // Incremental processing. - 9: []ruleTest{{ - in: "e\u0301", // é - dir: bidi.LeftToRight, - - pSrc: 2, - nSrc: 1, - err0: transform.ErrShortSrc, - }, { - in: "e\u1000f", // é - dir: bidi.LeftToRight, - - pSrc: 3, - nSrc: 1, - err0: transform.ErrShortSrc, - }, { - // Remain invalid once invalid. - in: strR + "ab", - dir: bidi.RightToLeft, - n: len(strR), - err: ErrInvalid, - - pSrc: len(strR) + 1, - nSrc: len(strR), - err0: ErrInvalid, - }, { - // Short destination - in: "abcdefghij", - dir: bidi.LeftToRight, - - pSrc: 10, - szDst: 5, - nSrc: 5, - err0: transform.ErrShortDst, - }, { - in: "\U000102f7", - dir: bidi.LeftToRight, - n: len("\U000102f7"), - err: ErrInvalid, - }, { - // Short destination splitting input rune - in: "e\u0301", - dir: bidi.LeftToRight, - - pSrc: 3, - szDst: 2, - nSrc: 1, - err0: transform.ErrShortDst, - }, { - // Unicode 10.0.0 IDNA test string. - in: "FAX\u2a77\U0001d186", - dir: bidi.LeftToRight, - n: len("FAX\u2a77\U0001d186"), - err: ErrInvalid, - }, { - in: "\x80\u0660", - dir: bidi.RightToLeft, - n: 0, - err: ErrInvalid, - }}, -} diff --git a/vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0_test.go b/vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0_test.go deleted file mode 100644 index 008874ed..00000000 --- a/vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0_test.go +++ /dev/null @@ -1,668 +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.10 - -package bidirule - -import ( - "golang.org/x/text/transform" - "golang.org/x/text/unicode/bidi" -) - -var testCases = [][]ruleTest{ - // Go-specific rules. - // Invalid UTF-8 is invalid. - 0: []ruleTest{{ - in: "", - dir: bidi.LeftToRight, - }, { - in: "\x80", - dir: bidi.LeftToRight, - err: ErrInvalid, - n: 0, - }, { - in: "\xcc", - dir: bidi.LeftToRight, - err: ErrInvalid, - n: 0, - }, { - in: "abc\x80", - dir: bidi.LeftToRight, - err: ErrInvalid, - n: 3, - }, { - in: "abc\xcc", - dir: bidi.LeftToRight, - err: ErrInvalid, - n: 3, - }, { - in: "abc\xccdef", - dir: bidi.LeftToRight, - err: ErrInvalid, - n: 3, - }, { - in: "\xccdef", - dir: bidi.LeftToRight, - err: ErrInvalid, - n: 0, - }, { - in: strR + "\x80", - dir: bidi.RightToLeft, - err: ErrInvalid, - n: len(strR), - }, { - in: strR + "\xcc", - dir: bidi.RightToLeft, - err: ErrInvalid, - n: len(strR), - }, { - in: strAL + "\xcc" + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: len(strAL), - }, { - in: "\xcc" + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 0, - }}, - - // Rule 2.1: The first character must be a character with Bidi property L, - // R, or AL. If it has the R or AL property, it is an RTL label; if it has - // the L property, it is an LTR label. - 1: []ruleTest{{ - in: strL, - dir: bidi.LeftToRight, - }, { - in: strR, - dir: bidi.RightToLeft, - }, { - in: strAL, - dir: bidi.RightToLeft, - }, { - in: strAN, - dir: bidi.RightToLeft, - err: ErrInvalid, - }, { - in: strEN, - dir: bidi.LeftToRight, - err: nil, // not an RTL string - }, { - in: strES, - dir: bidi.LeftToRight, - err: nil, // not an RTL string - }, { - in: strET, - dir: bidi.LeftToRight, - err: nil, // not an RTL string - }, { - in: strCS, - dir: bidi.LeftToRight, - err: nil, // not an RTL string - }, { - in: strNSM, - dir: bidi.LeftToRight, - err: nil, // not an RTL string - }, { - in: strBN, - dir: bidi.LeftToRight, - err: nil, // not an RTL string - }, { - in: strB, - dir: bidi.LeftToRight, - err: nil, // not an RTL string - }, { - in: strS, - dir: bidi.LeftToRight, - err: nil, // not an RTL string - }, { - in: strWS, - dir: bidi.LeftToRight, - err: nil, // not an RTL string - }, { - in: strON, - dir: bidi.LeftToRight, - err: nil, // not an RTL string - }, { - in: strEN + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 3, - }, { - in: strES + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 2, - }, { - in: strET + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 1, - }, { - in: strCS + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 1, - }, { - in: strNSM + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 2, - }, { - in: strBN + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 3, - }, { - in: strB + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 3, - }, { - in: strS + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 1, - }, { - in: strWS + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 1, - }, { - in: strON + strR, - dir: bidi.RightToLeft, - err: ErrInvalid, - n: 1, - }}, - - // Rule 2.2: In an RTL label, only characters with the Bidi properties R, - // AL, AN, EN, ES, CS, ET, ON, BN, or NSM are allowed. - 2: []ruleTest{{ - in: strR + strR + strAL, - dir: bidi.RightToLeft, - }, { - in: strR + strAL + strR, - dir: bidi.RightToLeft, - }, { - in: strR + strAN + strAL, - dir: bidi.RightToLeft, - }, { - in: strR + strEN + strR, - dir: bidi.RightToLeft, - }, { - in: strR + strES + strR, - dir: bidi.RightToLeft, - }, { - in: strR + strCS + strR, - dir: bidi.RightToLeft, - }, { - in: strR + strET + strAL, - dir: bidi.RightToLeft, - }, { - in: strR + strON + strR, - dir: bidi.RightToLeft, - }, { - in: strR + strBN + strR, - dir: bidi.RightToLeft, - }, { - in: strR + strNSM + strAL, - dir: bidi.RightToLeft, - }, { - in: strR + strL + strR, - dir: bidi.RightToLeft, - n: len(strR), - err: ErrInvalid, - }, { - in: strR + strB + strR, - dir: bidi.RightToLeft, - n: len(strR), - err: ErrInvalid, - }, { - in: strR + strS + strAL, - dir: bidi.RightToLeft, - n: len(strR), - err: ErrInvalid, - }, { - in: strR + strWS + strAL, - dir: bidi.RightToLeft, - n: len(strR), - err: ErrInvalid, - }, { - in: strAL + strR + strAL, - dir: bidi.RightToLeft, - }, { - in: strAL + strAL + strR, - dir: bidi.RightToLeft, - }, { - in: strAL + strAN + strAL, - dir: bidi.RightToLeft, - }, { - in: strAL + strEN + strR, - dir: bidi.RightToLeft, - }, { - in: strAL + strES + strR, - dir: bidi.RightToLeft, - }, { - in: strAL + strCS + strR, - dir: bidi.RightToLeft, - }, { - in: strAL + strET + strAL, - dir: bidi.RightToLeft, - }, { - in: strAL + strON + strR, - dir: bidi.RightToLeft, - }, { - in: strAL + strBN + strR, - dir: bidi.RightToLeft, - }, { - in: strAL + strNSM + strAL, - dir: bidi.RightToLeft, - }, { - in: strAL + strL + strR, - dir: bidi.RightToLeft, - n: len(strAL), - err: ErrInvalid, - }, { - in: strAL + strB + strR, - dir: bidi.RightToLeft, - n: len(strAL), - err: ErrInvalid, - }, { - in: strAL + strS + strAL, - dir: bidi.RightToLeft, - n: len(strAL), - err: ErrInvalid, - }, { - in: strAL + strWS + strAL, - dir: bidi.RightToLeft, - n: len(strAL), - err: ErrInvalid, - }}, - - // Rule 2.3: In an RTL label, the end of the label must be a character with - // Bidi property R, AL, EN, or AN, followed by zero or more characters with - // Bidi property NSM. - 3: []ruleTest{{ - in: strR + strNSM, - dir: bidi.RightToLeft, - }, { - in: strR + strR, - dir: bidi.RightToLeft, - }, { - in: strR + strAL + strNSM, - dir: bidi.RightToLeft, - }, { - in: strR + strEN + strNSM + strNSM, - dir: bidi.RightToLeft, - }, { - in: strR + strAN, - dir: bidi.RightToLeft, - }, { - in: strR + strES + strNSM, - dir: bidi.RightToLeft, - n: len(strR + strES + strNSM), - err: ErrInvalid, - }, { - in: strR + strCS + strNSM + strNSM, - dir: bidi.RightToLeft, - n: len(strR + strCS + strNSM + strNSM), - err: ErrInvalid, - }, { - in: strR + strET, - dir: bidi.RightToLeft, - n: len(strR + strET), - err: ErrInvalid, - }, { - in: strR + strON + strNSM, - dir: bidi.RightToLeft, - n: len(strR + strON + strNSM), - err: ErrInvalid, - }, { - in: strR + strBN + strNSM + strNSM, - dir: bidi.RightToLeft, - n: len(strR + strBN + strNSM + strNSM), - err: ErrInvalid, - }, { - in: strR + strL + strNSM, - dir: bidi.RightToLeft, - n: len(strR), - err: ErrInvalid, - }, { - in: strR + strB + strNSM + strNSM, - dir: bidi.RightToLeft, - n: len(strR), - err: ErrInvalid, - }, { - in: strR + strS, - dir: bidi.RightToLeft, - n: len(strR), - err: ErrInvalid, - }, { - in: strR + strWS, - dir: bidi.RightToLeft, - n: len(strR), - err: ErrInvalid, - }, { - in: strAL + strNSM, - dir: bidi.RightToLeft, - }, { - in: strAL + strR, - dir: bidi.RightToLeft, - }, { - in: strAL + strAL + strNSM, - dir: bidi.RightToLeft, - }, { - in: strAL + strEN + strNSM + strNSM, - dir: bidi.RightToLeft, - }, { - in: strAL + strAN, - dir: bidi.RightToLeft, - }, { - in: strAL + strES + strNSM, - dir: bidi.RightToLeft, - n: len(strAL + strES + strNSM), - err: ErrInvalid, - }, { - in: strAL + strCS + strNSM + strNSM, - dir: bidi.RightToLeft, - n: len(strAL + strCS + strNSM + strNSM), - err: ErrInvalid, - }, { - in: strAL + strET, - dir: bidi.RightToLeft, - n: len(strAL + strET), - err: ErrInvalid, - }, { - in: strAL + strON + strNSM, - dir: bidi.RightToLeft, - n: len(strAL + strON + strNSM), - err: ErrInvalid, - }, { - in: strAL + strBN + strNSM + strNSM, - dir: bidi.RightToLeft, - n: len(strAL + strBN + strNSM + strNSM), - err: ErrInvalid, - }, { - in: strAL + strL + strNSM, - dir: bidi.RightToLeft, - n: len(strAL), - err: ErrInvalid, - }, { - in: strAL + strB + strNSM + strNSM, - dir: bidi.RightToLeft, - n: len(strAL), - err: ErrInvalid, - }, { - in: strAL + strS, - dir: bidi.RightToLeft, - n: len(strAL), - err: ErrInvalid, - }, { - in: strAL + strWS, - dir: bidi.RightToLeft, - n: len(strAL), - err: ErrInvalid, - }}, - - // Rule 2.4: In an RTL label, if an EN is present, no AN may be present, - // and vice versa. - 4: []ruleTest{{ - in: strR + strEN + strAN, - dir: bidi.RightToLeft, - n: len(strR + strEN), - err: ErrInvalid, - }, { - in: strR + strAN + strEN + strNSM, - dir: bidi.RightToLeft, - n: len(strR + strAN), - err: ErrInvalid, - }, { - in: strAL + strEN + strAN, - dir: bidi.RightToLeft, - n: len(strAL + strEN), - err: ErrInvalid, - }, { - in: strAL + strAN + strEN + strNSM, - dir: bidi.RightToLeft, - n: len(strAL + strAN), - err: ErrInvalid, - }}, - - // Rule 2.5: In an LTR label, only characters with the Bidi properties L, - // EN, ES, CS, ET, ON, BN, or NSM are allowed. - 5: []ruleTest{{ - in: strL + strL + strL, - dir: bidi.LeftToRight, - }, { - in: strL + strEN + strL, - dir: bidi.LeftToRight, - }, { - in: strL + strES + strL, - dir: bidi.LeftToRight, - }, { - in: strL + strCS + strL, - dir: bidi.LeftToRight, - }, { - in: strL + strET + strL, - dir: bidi.LeftToRight, - }, { - in: strL + strON + strL, - dir: bidi.LeftToRight, - }, { - in: strL + strBN + strL, - dir: bidi.LeftToRight, - }, { - in: strL + strNSM + strL, - dir: bidi.LeftToRight, - }, { - in: strL + strR + strL, - dir: bidi.RightToLeft, - n: len(strL), - err: ErrInvalid, - }, { - in: strL + strAL + strL, - dir: bidi.RightToLeft, - n: len(strL), - err: ErrInvalid, - }, { - in: strL + strAN + strL, - dir: bidi.RightToLeft, - n: len(strL), - err: ErrInvalid, - }, { - in: strL + strB + strL, - dir: bidi.LeftToRight, - n: len(strL + strAN + strL), - err: nil, - }, { - in: strL + strB + strL + strR, - dir: bidi.RightToLeft, - n: len(strL + strB + strL), - err: ErrInvalid, - }, { - in: strL + strS + strL, - dir: bidi.LeftToRight, - n: len(strL + strS + strL), - err: nil, - }, { - in: strL + strS + strL + strR, - dir: bidi.RightToLeft, - n: len(strL + strS + strL), - err: ErrInvalid, - }, { - in: strL + strWS + strL, - dir: bidi.LeftToRight, - n: len(strL + strWS + strL), - err: nil, - }, { - in: strL + strWS + strL + strR, - dir: bidi.RightToLeft, - n: len(strL + strWS + strL), - err: ErrInvalid, - }}, - - // Rule 2.6: In an LTR label, the end of the label must be a character with - // Bidi property L or EN, followed by zero or more characters with Bidi - // property NSM. - 6: []ruleTest{{ - in: strL, - dir: bidi.LeftToRight, - }, { - in: strL + strNSM, - dir: bidi.LeftToRight, - }, { - in: strL + strNSM + strNSM, - dir: bidi.LeftToRight, - }, { - in: strL + strEN, - dir: bidi.LeftToRight, - }, { - in: strL + strEN + strNSM, - dir: bidi.LeftToRight, - }, { - in: strL + strEN + strNSM + strNSM, - dir: bidi.LeftToRight, - }, { - in: strL + strES, - dir: bidi.LeftToRight, - n: len(strL + strES), - err: nil, - }, { - in: strL + strES + strR, - dir: bidi.RightToLeft, - n: len(strL + strES), - err: ErrInvalid, - }, { - in: strL + strCS, - dir: bidi.LeftToRight, - n: len(strL + strCS), - err: nil, - }, { - in: strL + strCS + strR, - dir: bidi.RightToLeft, - n: len(strL + strCS), - err: ErrInvalid, - }, { - in: strL + strET, - dir: bidi.LeftToRight, - n: len(strL + strET), - err: nil, - }, { - in: strL + strET + strR, - dir: bidi.RightToLeft, - n: len(strL + strET), - err: ErrInvalid, - }, { - in: strL + strON, - dir: bidi.LeftToRight, - n: len(strL + strON), - err: nil, - }, { - in: strL + strON + strR, - dir: bidi.RightToLeft, - n: len(strL + strON), - err: ErrInvalid, - }, { - in: strL + strBN, - dir: bidi.LeftToRight, - n: len(strL + strBN), - err: nil, - }, { - in: strL + strBN + strR, - dir: bidi.RightToLeft, - n: len(strL + strBN), - err: ErrInvalid, - }, { - in: strL + strR, - dir: bidi.RightToLeft, - n: len(strL), - err: ErrInvalid, - }, { - in: strL + strAL, - dir: bidi.RightToLeft, - n: len(strL), - err: ErrInvalid, - }, { - in: strL + strAN, - dir: bidi.RightToLeft, - n: len(strL), - err: ErrInvalid, - }, { - in: strL + strB, - dir: bidi.LeftToRight, - n: len(strL + strB), - err: nil, - }, { - in: strL + strB + strR, - dir: bidi.RightToLeft, - n: len(strL + strB), - err: ErrInvalid, - }, { - in: strL + strB, - dir: bidi.LeftToRight, - n: len(strL + strB), - err: nil, - }, { - in: strL + strB + strR, - dir: bidi.RightToLeft, - n: len(strL + strB), - err: ErrInvalid, - }, { - in: strL + strB, - dir: bidi.LeftToRight, - n: len(strL + strB), - err: nil, - }, { - in: strL + strB + strR, - dir: bidi.RightToLeft, - n: len(strL + strB), - err: ErrInvalid, - }}, - - // Incremental processing. - 9: []ruleTest{{ - in: "e\u0301", // é - dir: bidi.LeftToRight, - - pSrc: 2, - nSrc: 1, - err0: transform.ErrShortSrc, - }, { - in: "e\u1000f", // é - dir: bidi.LeftToRight, - - pSrc: 3, - nSrc: 1, - err0: transform.ErrShortSrc, - }, { - // Remain invalid once invalid. - in: strR + "ab", - dir: bidi.RightToLeft, - n: len(strR), - err: ErrInvalid, - - pSrc: len(strR) + 1, - nSrc: len(strR), - err0: ErrInvalid, - }, { - // Short destination - in: "abcdefghij", - dir: bidi.LeftToRight, - - pSrc: 10, - szDst: 5, - nSrc: 5, - err0: transform.ErrShortDst, - }, { - // Short destination splitting input rune - in: "e\u0301", - dir: bidi.LeftToRight, - - pSrc: 3, - szDst: 2, - nSrc: 1, - err0: transform.ErrShortDst, - }}, -} diff --git a/vendor/golang.org/x/text/secure/bidirule/bidirule_test.go b/vendor/golang.org/x/text/secure/bidirule/bidirule_test.go deleted file mode 100644 index e8fde338..00000000 --- a/vendor/golang.org/x/text/secure/bidirule/bidirule_test.go +++ /dev/null @@ -1,168 +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 bidirule - -import ( - "fmt" - "testing" - - "golang.org/x/text/internal/testtext" - "golang.org/x/text/unicode/bidi" -) - -const ( - strL = "ABC" // Left to right - most letters in LTR scripts - strR = "עברית" // Right to left - most letters in non-Arabic RTL scripts - strAL = "دبي" // Arabic letters - most letters in the Arabic script - strEN = "123" // European Number (0-9, and Extended Arabic-Indic numbers) - strES = "+-" // European Number Separator (+ and -) - strET = "$" // European Number Terminator (currency symbols, the hash sign, the percent sign and so on) - strAN = "\u0660" // Arabic Number; this encompasses the Arabic-Indic numbers, but not the Extended Arabic-Indic numbers - strCS = "," // Common Number Separator (. , / : et al) - strNSM = "\u0300" // Nonspacing Mark - most combining accents - strBN = "\u200d" // Boundary Neutral - control characters (ZWNJ, ZWJ, and others) - strB = "\u2029" // Paragraph Separator - strS = "\u0009" // Segment Separator - strWS = " " // Whitespace, including the SPACE character - strON = "@" // Other Neutrals, including @, &, parentheses, MIDDLE DOT -) - -type ruleTest struct { - in string - dir bidi.Direction - n int // position at which the rule fails - err error - - // For tests that split the string in two. - pSrc int // number of source bytes to consume first - szDst int // size of destination buffer - nSrc int // source bytes consumed and bytes written - err0 error // error after first run -} - -func init() { - for rule, cases := range testCases { - for i, tc := range cases { - if tc.err == nil { - testCases[rule][i].n = len(tc.in) - } - } - } -} - -func doTests(t *testing.T, fn func(t *testing.T, tc ruleTest)) { - for rule, cases := range testCases { - for i, tc := range cases { - name := fmt.Sprintf("%d/%d:%+q:%s", rule, i, tc.in, tc.in) - testtext.Run(t, name, func(t *testing.T) { - fn(t, tc) - }) - } - } -} - -func TestDirection(t *testing.T) { - doTests(t, func(t *testing.T, tc ruleTest) { - dir := Direction([]byte(tc.in)) - if dir != tc.dir { - t.Errorf("dir was %v; want %v", dir, tc.dir) - } - }) -} - -func TestDirectionString(t *testing.T) { - doTests(t, func(t *testing.T, tc ruleTest) { - dir := DirectionString(tc.in) - if dir != tc.dir { - t.Errorf("dir was %v; want %v", dir, tc.dir) - } - }) -} - -func TestValid(t *testing.T) { - doTests(t, func(t *testing.T, tc ruleTest) { - got := Valid([]byte(tc.in)) - want := tc.err == nil - if got != want { - t.Fatalf("Valid: got %v; want %v", got, want) - } - - got = ValidString(tc.in) - want = tc.err == nil - if got != want { - t.Fatalf("Valid: got %v; want %v", got, want) - } - }) -} - -func TestSpan(t *testing.T) { - doTests(t, func(t *testing.T, tc ruleTest) { - // Skip tests that test for limited destination buffer size. - if tc.szDst > 0 { - return - } - - r := New() - src := []byte(tc.in) - - n, err := r.Span(src[:tc.pSrc], tc.pSrc == len(tc.in)) - if err != tc.err0 { - t.Errorf("err0 was %v; want %v", err, tc.err0) - } - if n != tc.nSrc { - t.Fatalf("nSrc was %d; want %d", n, tc.nSrc) - } - - n, err = r.Span(src[n:], true) - if err != tc.err { - t.Errorf("error was %v; want %v", err, tc.err) - } - if got := n + tc.nSrc; got != tc.n { - t.Errorf("n was %d; want %d", got, tc.n) - } - }) -} - -func TestTransform(t *testing.T) { - doTests(t, func(t *testing.T, tc ruleTest) { - r := New() - - src := []byte(tc.in) - dst := make([]byte, len(tc.in)) - if tc.szDst > 0 { - dst = make([]byte, tc.szDst) - } - - // First transform operates on a zero-length string for most tests. - nDst, nSrc, err := r.Transform(dst, src[:tc.pSrc], tc.pSrc == len(tc.in)) - if err != tc.err0 { - t.Errorf("err0 was %v; want %v", err, tc.err0) - } - if nDst != nSrc { - t.Fatalf("nDst (%d) and nSrc (%d) should match", nDst, nSrc) - } - if nSrc != tc.nSrc { - t.Fatalf("nSrc was %d; want %d", nSrc, tc.nSrc) - } - - dst1 := make([]byte, len(tc.in)) - copy(dst1, dst[:nDst]) - - nDst, nSrc, err = r.Transform(dst1[nDst:], src[nSrc:], true) - if err != tc.err { - t.Errorf("error was %v; want %v", err, tc.err) - } - if nDst != nSrc { - t.Fatalf("nDst (%d) and nSrc (%d) should match", nDst, nSrc) - } - n := nSrc + tc.nSrc - if n != tc.n { - t.Fatalf("n was %d; want %d", n, tc.n) - } - if got, want := string(dst1[:n]), tc.in[:tc.n]; got != want { - t.Errorf("got %+q; want %+q", got, want) - } - }) -} diff --git a/vendor/golang.org/x/text/secure/doc.go b/vendor/golang.org/x/text/secure/doc.go deleted file mode 100644 index e531c354..00000000 --- a/vendor/golang.org/x/text/secure/doc.go +++ /dev/null @@ -1,6 +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. - -// secure is a repository of text security related packages. -package secure // import "golang.org/x/text/secure" diff --git a/vendor/golang.org/x/text/transform/examples_test.go b/vendor/golang.org/x/text/transform/examples_test.go deleted file mode 100644 index f2e284db..00000000 --- a/vendor/golang.org/x/text/transform/examples_test.go +++ /dev/null @@ -1,37 +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 transform_test - -import ( - "fmt" - "unicode" - - "golang.org/x/text/transform" - "golang.org/x/text/unicode/norm" -) - -func ExampleRemoveFunc() { - input := []byte(`tschüß; до свидания`) - - b := make([]byte, len(input)) - - t := transform.RemoveFunc(unicode.IsSpace) - n, _, _ := t.Transform(b, input, true) - fmt.Println(string(b[:n])) - - t = transform.RemoveFunc(func(r rune) bool { - return !unicode.Is(unicode.Latin, r) - }) - n, _, _ = t.Transform(b, input, true) - fmt.Println(string(b[:n])) - - n, _, _ = t.Transform(b, norm.NFD.Bytes(input), true) - fmt.Println(string(b[:n])) - - // Output: - // tschüß;досвидания - // tschüß - // tschuß -} diff --git a/vendor/golang.org/x/text/transform/transform_test.go b/vendor/golang.org/x/text/transform/transform_test.go deleted file mode 100644 index 771633d1..00000000 --- a/vendor/golang.org/x/text/transform/transform_test.go +++ /dev/null @@ -1,1317 +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 transform - -import ( - "bytes" - "errors" - "fmt" - "io/ioutil" - "strconv" - "strings" - "testing" - "time" - "unicode/utf8" - - "golang.org/x/text/internal/testtext" -) - -type lowerCaseASCII struct{ NopResetter } - -func (lowerCaseASCII) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - n := len(src) - if n > len(dst) { - n, err = len(dst), ErrShortDst - } - for i, c := range src[:n] { - if 'A' <= c && c <= 'Z' { - c += 'a' - 'A' - } - dst[i] = c - } - return n, n, err -} - -// lowerCaseASCIILookahead lowercases the string and reports ErrShortSrc as long -// as the input is not atEOF. -type lowerCaseASCIILookahead struct{ NopResetter } - -func (lowerCaseASCIILookahead) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - n := len(src) - if n > len(dst) { - n, err = len(dst), ErrShortDst - } - for i, c := range src[:n] { - if 'A' <= c && c <= 'Z' { - c += 'a' - 'A' - } - dst[i] = c - } - if !atEOF { - err = ErrShortSrc - } - return n, n, err -} - -var errYouMentionedX = errors.New("you mentioned X") - -type dontMentionX struct{ NopResetter } - -func (dontMentionX) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - n := len(src) - if n > len(dst) { - n, err = len(dst), ErrShortDst - } - for i, c := range src[:n] { - if c == 'X' { - return i, i, errYouMentionedX - } - dst[i] = c - } - return n, n, err -} - -var errAtEnd = errors.New("error after all text") - -type errorAtEnd struct{ NopResetter } - -func (errorAtEnd) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - n := copy(dst, src) - if n < len(src) { - return n, n, ErrShortDst - } - if atEOF { - return n, n, errAtEnd - } - return n, n, nil -} - -type replaceWithConstant struct { - replacement string - written int -} - -func (t *replaceWithConstant) Reset() { - t.written = 0 -} - -func (t *replaceWithConstant) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - if atEOF { - nDst = copy(dst, t.replacement[t.written:]) - t.written += nDst - if t.written < len(t.replacement) { - err = ErrShortDst - } - } - return nDst, len(src), err -} - -type addAnXAtTheEnd struct{ NopResetter } - -func (addAnXAtTheEnd) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - n := copy(dst, src) - if n < len(src) { - return n, n, ErrShortDst - } - if !atEOF { - return n, n, nil - } - if len(dst) == n { - return n, n, ErrShortDst - } - dst[n] = 'X' - return n + 1, n, nil -} - -// doublerAtEOF is a strange Transformer that transforms "this" to "tthhiiss", -// but only if atEOF is true. -type doublerAtEOF struct{ NopResetter } - -func (doublerAtEOF) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - if !atEOF { - return 0, 0, ErrShortSrc - } - for i, c := range src { - if 2*i+2 >= len(dst) { - return 2 * i, i, ErrShortDst - } - dst[2*i+0] = c - dst[2*i+1] = c - } - return 2 * len(src), len(src), nil -} - -// rleDecode and rleEncode implement a toy run-length encoding: "aabbbbbbbbbb" -// is encoded as "2a10b". The decoding is assumed to not contain any numbers. - -type rleDecode struct{ NopResetter } - -func (rleDecode) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { -loop: - for len(src) > 0 { - n := 0 - for i, c := range src { - if '0' <= c && c <= '9' { - n = 10*n + int(c-'0') - continue - } - if i == 0 { - return nDst, nSrc, errors.New("rleDecode: bad input") - } - if n > len(dst) { - return nDst, nSrc, ErrShortDst - } - for j := 0; j < n; j++ { - dst[j] = c - } - dst, src = dst[n:], src[i+1:] - nDst, nSrc = nDst+n, nSrc+i+1 - continue loop - } - if atEOF { - return nDst, nSrc, errors.New("rleDecode: bad input") - } - return nDst, nSrc, ErrShortSrc - } - return nDst, nSrc, nil -} - -type rleEncode struct { - NopResetter - - // allowStutter means that "xxxxxxxx" can be encoded as "5x3x" - // instead of always as "8x". - allowStutter bool -} - -func (e rleEncode) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - for len(src) > 0 { - n, c0 := len(src), src[0] - for i, c := range src[1:] { - if c != c0 { - n = i + 1 - break - } - } - if n == len(src) && !atEOF && !e.allowStutter { - return nDst, nSrc, ErrShortSrc - } - s := strconv.Itoa(n) - if len(s) >= len(dst) { - return nDst, nSrc, ErrShortDst - } - copy(dst, s) - dst[len(s)] = c0 - dst, src = dst[len(s)+1:], src[n:] - nDst, nSrc = nDst+len(s)+1, nSrc+n - } - return nDst, nSrc, nil -} - -// trickler consumes all input bytes, but writes a single byte at a time to dst. -type trickler []byte - -func (t *trickler) Reset() { - *t = nil -} - -func (t *trickler) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - *t = append(*t, src...) - if len(*t) == 0 { - return 0, 0, nil - } - if len(dst) == 0 { - return 0, len(src), ErrShortDst - } - dst[0] = (*t)[0] - *t = (*t)[1:] - if len(*t) > 0 { - err = ErrShortDst - } - return 1, len(src), err -} - -// delayedTrickler is like trickler, but delays writing output to dst. This is -// highly unlikely to be relevant in practice, but it seems like a good idea -// to have some tolerance as long as progress can be detected. -type delayedTrickler []byte - -func (t *delayedTrickler) Reset() { - *t = nil -} - -func (t *delayedTrickler) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { - if len(*t) > 0 && len(dst) > 0 { - dst[0] = (*t)[0] - *t = (*t)[1:] - nDst = 1 - } - *t = append(*t, src...) - if len(*t) > 0 { - err = ErrShortDst - } - return nDst, len(src), err -} - -type testCase struct { - desc string - t Transformer - src string - dstSize int - srcSize int - ioSize int - wantStr string - wantErr error - wantIter int // number of iterations taken; 0 means we don't care. -} - -func (t testCase) String() string { - return tstr(t.t) + "; " + t.desc -} - -func tstr(t Transformer) string { - if stringer, ok := t.(fmt.Stringer); ok { - return stringer.String() - } - s := fmt.Sprintf("%T", t) - return s[1+strings.Index(s, "."):] -} - -func (c chain) String() string { - buf := &bytes.Buffer{} - buf.WriteString("Chain(") - for i, l := range c.link[:len(c.link)-1] { - if i != 0 { - fmt.Fprint(buf, ", ") - } - buf.WriteString(tstr(l.t)) - } - buf.WriteString(")") - return buf.String() -} - -var testCases = []testCase{ - { - desc: "empty", - t: lowerCaseASCII{}, - src: "", - dstSize: 100, - srcSize: 100, - wantStr: "", - }, - - { - desc: "basic", - t: lowerCaseASCII{}, - src: "Hello WORLD.", - dstSize: 100, - srcSize: 100, - wantStr: "hello world.", - }, - - { - desc: "small dst", - t: lowerCaseASCII{}, - src: "Hello WORLD.", - dstSize: 3, - srcSize: 100, - wantStr: "hello world.", - }, - - { - desc: "small src", - t: lowerCaseASCII{}, - src: "Hello WORLD.", - dstSize: 100, - srcSize: 4, - wantStr: "hello world.", - }, - - { - desc: "small buffers", - t: lowerCaseASCII{}, - src: "Hello WORLD.", - dstSize: 3, - srcSize: 4, - wantStr: "hello world.", - }, - - { - desc: "very small buffers", - t: lowerCaseASCII{}, - src: "Hello WORLD.", - dstSize: 1, - srcSize: 1, - wantStr: "hello world.", - }, - - { - desc: "small dst with lookahead", - t: lowerCaseASCIILookahead{}, - src: "Hello WORLD.", - dstSize: 3, - srcSize: 100, - wantStr: "hello world.", - }, - - { - desc: "small src with lookahead", - t: lowerCaseASCIILookahead{}, - src: "Hello WORLD.", - dstSize: 100, - srcSize: 4, - wantStr: "hello world.", - }, - - { - desc: "small buffers with lookahead", - t: lowerCaseASCIILookahead{}, - src: "Hello WORLD.", - dstSize: 3, - srcSize: 4, - wantStr: "hello world.", - }, - - { - desc: "very small buffers with lookahead", - t: lowerCaseASCIILookahead{}, - src: "Hello WORLD.", - dstSize: 1, - srcSize: 2, - wantStr: "hello world.", - }, - - { - desc: "user error", - t: dontMentionX{}, - src: "The First Rule of Transform Club: don't mention Mister X, ever.", - dstSize: 100, - srcSize: 100, - wantStr: "The First Rule of Transform Club: don't mention Mister ", - wantErr: errYouMentionedX, - }, - - { - desc: "user error at end", - t: errorAtEnd{}, - src: "All goes well until it doesn't.", - dstSize: 100, - srcSize: 100, - wantStr: "All goes well until it doesn't.", - wantErr: errAtEnd, - }, - - { - desc: "user error at end, incremental", - t: errorAtEnd{}, - src: "All goes well until it doesn't.", - dstSize: 10, - srcSize: 10, - wantStr: "All goes well until it doesn't.", - wantErr: errAtEnd, - }, - - { - desc: "replace entire non-empty string with one byte", - t: &replaceWithConstant{replacement: "X"}, - src: "none of this will be copied", - dstSize: 1, - srcSize: 10, - wantStr: "X", - }, - - { - desc: "replace entire empty string with one byte", - t: &replaceWithConstant{replacement: "X"}, - src: "", - dstSize: 1, - srcSize: 10, - wantStr: "X", - }, - - { - desc: "replace entire empty string with seven bytes", - t: &replaceWithConstant{replacement: "ABCDEFG"}, - src: "", - dstSize: 3, - srcSize: 10, - wantStr: "ABCDEFG", - }, - - { - desc: "add an X (initialBufSize-1)", - t: addAnXAtTheEnd{}, - src: aaa[:initialBufSize-1], - dstSize: 10, - srcSize: 10, - wantStr: aaa[:initialBufSize-1] + "X", - }, - - { - desc: "add an X (initialBufSize+0)", - t: addAnXAtTheEnd{}, - src: aaa[:initialBufSize+0], - dstSize: 10, - srcSize: 10, - wantStr: aaa[:initialBufSize+0] + "X", - }, - - { - desc: "add an X (initialBufSize+1)", - t: addAnXAtTheEnd{}, - src: aaa[:initialBufSize+1], - dstSize: 10, - srcSize: 10, - wantStr: aaa[:initialBufSize+1] + "X", - }, - - { - desc: "small buffers", - t: dontMentionX{}, - src: "The First Rule of Transform Club: don't mention Mister X, ever.", - dstSize: 10, - srcSize: 10, - wantStr: "The First Rule of Transform Club: don't mention Mister ", - wantErr: errYouMentionedX, - }, - - { - desc: "very small buffers", - t: dontMentionX{}, - src: "The First Rule of Transform Club: don't mention Mister X, ever.", - dstSize: 1, - srcSize: 1, - wantStr: "The First Rule of Transform Club: don't mention Mister ", - wantErr: errYouMentionedX, - }, - - { - desc: "only transform at EOF", - t: doublerAtEOF{}, - src: "this", - dstSize: 100, - srcSize: 100, - wantStr: "tthhiiss", - }, - - { - desc: "basic", - t: rleDecode{}, - src: "1a2b3c10d11e0f1g", - dstSize: 100, - srcSize: 100, - wantStr: "abbcccddddddddddeeeeeeeeeeeg", - }, - - { - desc: "long", - t: rleDecode{}, - src: "12a23b34c45d56e99z", - dstSize: 100, - srcSize: 100, - wantStr: strings.Repeat("a", 12) + - strings.Repeat("b", 23) + - strings.Repeat("c", 34) + - strings.Repeat("d", 45) + - strings.Repeat("e", 56) + - strings.Repeat("z", 99), - }, - - { - desc: "tight buffers", - t: rleDecode{}, - src: "1a2b3c10d11e0f1g", - dstSize: 11, - srcSize: 3, - wantStr: "abbcccddddddddddeeeeeeeeeeeg", - }, - - { - desc: "short dst", - t: rleDecode{}, - src: "1a2b3c10d11e0f1g", - dstSize: 10, - srcSize: 3, - wantStr: "abbcccdddddddddd", - wantErr: ErrShortDst, - }, - - { - desc: "short src", - t: rleDecode{}, - src: "1a2b3c10d11e0f1g", - dstSize: 11, - srcSize: 2, - ioSize: 2, - wantStr: "abbccc", - wantErr: ErrShortSrc, - }, - - { - desc: "basic", - t: rleEncode{}, - src: "abbcccddddddddddeeeeeeeeeeeg", - dstSize: 100, - srcSize: 100, - wantStr: "1a2b3c10d11e1g", - }, - - { - desc: "long", - t: rleEncode{}, - src: strings.Repeat("a", 12) + - strings.Repeat("b", 23) + - strings.Repeat("c", 34) + - strings.Repeat("d", 45) + - strings.Repeat("e", 56) + - strings.Repeat("z", 99), - dstSize: 100, - srcSize: 100, - wantStr: "12a23b34c45d56e99z", - }, - - { - desc: "tight buffers", - t: rleEncode{}, - src: "abbcccddddddddddeeeeeeeeeeeg", - dstSize: 3, - srcSize: 12, - wantStr: "1a2b3c10d11e1g", - }, - - { - desc: "short dst", - t: rleEncode{}, - src: "abbcccddddddddddeeeeeeeeeeeg", - dstSize: 2, - srcSize: 12, - wantStr: "1a2b3c", - wantErr: ErrShortDst, - }, - - { - desc: "short src", - t: rleEncode{}, - src: "abbcccddddddddddeeeeeeeeeeeg", - dstSize: 3, - srcSize: 11, - ioSize: 11, - wantStr: "1a2b3c10d", - wantErr: ErrShortSrc, - }, - - { - desc: "allowStutter = false", - t: rleEncode{allowStutter: false}, - src: "aaaabbbbbbbbccccddddd", - dstSize: 10, - srcSize: 10, - wantStr: "4a8b4c5d", - }, - - { - desc: "allowStutter = true", - t: rleEncode{allowStutter: true}, - src: "aaaabbbbbbbbccccddddd", - dstSize: 10, - srcSize: 10, - ioSize: 10, - wantStr: "4a6b2b4c4d1d", - }, - - { - desc: "trickler", - t: &trickler{}, - src: "abcdefghijklm", - dstSize: 3, - srcSize: 15, - wantStr: "abcdefghijklm", - }, - - { - desc: "delayedTrickler", - t: &delayedTrickler{}, - src: "abcdefghijklm", - dstSize: 3, - srcSize: 15, - wantStr: "abcdefghijklm", - }, -} - -func TestReader(t *testing.T) { - for _, tc := range testCases { - testtext.Run(t, tc.desc, func(t *testing.T) { - r := NewReader(strings.NewReader(tc.src), tc.t) - // Differently sized dst and src buffers are not part of the - // exported API. We override them manually. - r.dst = make([]byte, tc.dstSize) - r.src = make([]byte, tc.srcSize) - got, err := ioutil.ReadAll(r) - str := string(got) - if str != tc.wantStr || err != tc.wantErr { - t.Errorf("\ngot %q, %v\nwant %q, %v", str, err, tc.wantStr, tc.wantErr) - } - }) - } -} - -func TestWriter(t *testing.T) { - tests := append(testCases, chainTests()...) - for _, tc := range tests { - sizes := []int{1, 2, 3, 4, 5, 10, 100, 1000} - if tc.ioSize > 0 { - sizes = []int{tc.ioSize} - } - for _, sz := range sizes { - testtext.Run(t, fmt.Sprintf("%s/%d", tc.desc, sz), func(t *testing.T) { - bb := &bytes.Buffer{} - w := NewWriter(bb, tc.t) - // Differently sized dst and src buffers are not part of the - // exported API. We override them manually. - w.dst = make([]byte, tc.dstSize) - w.src = make([]byte, tc.srcSize) - src := make([]byte, sz) - var err error - for b := tc.src; len(b) > 0 && err == nil; { - n := copy(src, b) - b = b[n:] - m := 0 - m, err = w.Write(src[:n]) - if m != n && err == nil { - t.Errorf("did not consume all bytes %d < %d", m, n) - } - } - if err == nil { - err = w.Close() - } - str := bb.String() - if str != tc.wantStr || err != tc.wantErr { - t.Errorf("\ngot %q, %v\nwant %q, %v", str, err, tc.wantStr, tc.wantErr) - } - }) - } - } -} - -func TestNop(t *testing.T) { - testCases := []struct { - str string - dstSize int - err error - }{ - {"", 0, nil}, - {"", 10, nil}, - {"a", 0, ErrShortDst}, - {"a", 1, nil}, - {"a", 10, nil}, - } - for i, tc := range testCases { - dst := make([]byte, tc.dstSize) - nDst, nSrc, err := Nop.Transform(dst, []byte(tc.str), true) - want := tc.str - if tc.dstSize < len(want) { - want = want[:tc.dstSize] - } - if got := string(dst[:nDst]); got != want || err != tc.err || nSrc != nDst { - t.Errorf("%d:\ngot %q, %d, %v\nwant %q, %d, %v", i, got, nSrc, err, want, nDst, tc.err) - } - } -} - -func TestDiscard(t *testing.T) { - testCases := []struct { - str string - dstSize int - }{ - {"", 0}, - {"", 10}, - {"a", 0}, - {"ab", 10}, - } - for i, tc := range testCases { - nDst, nSrc, err := Discard.Transform(make([]byte, tc.dstSize), []byte(tc.str), true) - if nDst != 0 || nSrc != len(tc.str) || err != nil { - t.Errorf("%d:\ngot %q, %d, %v\nwant 0, %d, nil", i, nDst, nSrc, err, len(tc.str)) - } - } -} - -// mkChain creates a Chain transformer. x must be alternating between transformer -// and bufSize, like T, (sz, T)* -func mkChain(x ...interface{}) *chain { - t := []Transformer{} - for i := 0; i < len(x); i += 2 { - t = append(t, x[i].(Transformer)) - } - c := Chain(t...).(*chain) - for i, j := 1, 1; i < len(x); i, j = i+2, j+1 { - c.link[j].b = make([]byte, x[i].(int)) - } - return c -} - -func chainTests() []testCase { - return []testCase{ - { - desc: "nil error", - t: mkChain(rleEncode{}, 100, lowerCaseASCII{}), - src: "ABB", - dstSize: 100, - srcSize: 100, - wantStr: "1a2b", - wantErr: nil, - wantIter: 1, - }, - - { - desc: "short dst buffer", - t: mkChain(lowerCaseASCII{}, 3, rleDecode{}), - src: "1a2b3c10d11e0f1g", - dstSize: 10, - srcSize: 3, - wantStr: "abbcccdddddddddd", - wantErr: ErrShortDst, - }, - - { - desc: "short internal dst buffer", - t: mkChain(lowerCaseASCII{}, 3, rleDecode{}, 10, Nop), - src: "1a2b3c10d11e0f1g", - dstSize: 100, - srcSize: 3, - wantStr: "abbcccdddddddddd", - wantErr: errShortInternal, - }, - - { - desc: "short internal dst buffer from input", - t: mkChain(rleDecode{}, 10, Nop), - src: "1a2b3c10d11e0f1g", - dstSize: 100, - srcSize: 3, - wantStr: "abbcccdddddddddd", - wantErr: errShortInternal, - }, - - { - desc: "empty short internal dst buffer", - t: mkChain(lowerCaseASCII{}, 3, rleDecode{}, 10, Nop), - src: "4a7b11e0f1g", - dstSize: 100, - srcSize: 3, - wantStr: "aaaabbbbbbb", - wantErr: errShortInternal, - }, - - { - desc: "empty short internal dst buffer from input", - t: mkChain(rleDecode{}, 10, Nop), - src: "4a7b11e0f1g", - dstSize: 100, - srcSize: 3, - wantStr: "aaaabbbbbbb", - wantErr: errShortInternal, - }, - - { - desc: "short internal src buffer after full dst buffer", - t: mkChain(Nop, 5, rleEncode{}, 10, Nop), - src: "cccccddddd", - dstSize: 100, - srcSize: 100, - wantStr: "", - wantErr: errShortInternal, - wantIter: 1, - }, - - { - desc: "short internal src buffer after short dst buffer; test lastFull", - t: mkChain(rleDecode{}, 5, rleEncode{}, 4, Nop), - src: "2a1b4c6d", - dstSize: 100, - srcSize: 100, - wantStr: "2a1b", - wantErr: errShortInternal, - }, - - { - desc: "short internal src buffer after successful complete fill", - t: mkChain(Nop, 3, rleDecode{}), - src: "123a4b", - dstSize: 4, - srcSize: 3, - wantStr: "", - wantErr: errShortInternal, - wantIter: 1, - }, - - { - desc: "short internal src buffer after short dst buffer; test lastFull", - t: mkChain(rleDecode{}, 5, rleEncode{}), - src: "2a1b4c6d", - dstSize: 4, - srcSize: 100, - wantStr: "2a1b", - wantErr: errShortInternal, - }, - - { - desc: "short src buffer", - t: mkChain(rleEncode{}, 5, Nop), - src: "abbcccddddeeeee", - dstSize: 4, - srcSize: 4, - ioSize: 4, - wantStr: "1a2b3c", - wantErr: ErrShortSrc, - }, - - { - desc: "process all in one go", - t: mkChain(rleEncode{}, 5, Nop), - src: "abbcccddddeeeeeffffff", - dstSize: 100, - srcSize: 100, - wantStr: "1a2b3c4d5e6f", - wantErr: nil, - wantIter: 1, - }, - - { - desc: "complete processing downstream after error", - t: mkChain(dontMentionX{}, 2, rleDecode{}, 5, Nop), - src: "3a4b5eX", - dstSize: 100, - srcSize: 100, - ioSize: 100, - wantStr: "aaabbbbeeeee", - wantErr: errYouMentionedX, - }, - - { - desc: "return downstream fatal errors first (followed by short dst)", - t: mkChain(dontMentionX{}, 8, rleDecode{}, 4, Nop), - src: "3a4b5eX", - dstSize: 100, - srcSize: 100, - ioSize: 100, - wantStr: "aaabbbb", - wantErr: errShortInternal, - }, - - { - desc: "return downstream fatal errors first (followed by short src)", - t: mkChain(dontMentionX{}, 5, Nop, 1, rleDecode{}), - src: "1a5bX", - dstSize: 100, - srcSize: 100, - ioSize: 100, - wantStr: "", - wantErr: errShortInternal, - }, - - { - desc: "short internal", - t: mkChain(Nop, 11, rleEncode{}, 3, Nop), - src: "abbcccddddddddddeeeeeeeeeeeg", - dstSize: 3, - srcSize: 100, - wantStr: "1a2b3c10d", - wantErr: errShortInternal, - }, - } -} - -func doTransform(tc testCase) (res string, iter int, err error) { - tc.t.Reset() - dst := make([]byte, tc.dstSize) - out, in := make([]byte, 0, 2*len(tc.src)), []byte(tc.src) - for { - iter++ - src, atEOF := in, true - if len(src) > tc.srcSize { - src, atEOF = src[:tc.srcSize], false - } - nDst, nSrc, err := tc.t.Transform(dst, src, atEOF) - out = append(out, dst[:nDst]...) - in = in[nSrc:] - switch { - case err == nil && len(in) != 0: - case err == ErrShortSrc && nSrc > 0: - case err == ErrShortDst && (nDst > 0 || nSrc > 0): - default: - return string(out), iter, err - } - } -} - -func TestChain(t *testing.T) { - if c, ok := Chain().(nop); !ok { - t.Errorf("empty chain: %v; want Nop", c) - } - - // Test Chain for a single Transformer. - for _, tc := range testCases { - tc.t = Chain(tc.t) - str, _, err := doTransform(tc) - if str != tc.wantStr || err != tc.wantErr { - t.Errorf("%s:\ngot %q, %v\nwant %q, %v", tc, str, err, tc.wantStr, tc.wantErr) - } - } - - tests := chainTests() - sizes := []int{1, 2, 3, 4, 5, 7, 10, 100, 1000} - addTest := func(tc testCase, t *chain) { - if t.link[0].t != tc.t && tc.wantErr == ErrShortSrc { - tc.wantErr = errShortInternal - } - if t.link[len(t.link)-2].t != tc.t && tc.wantErr == ErrShortDst { - tc.wantErr = errShortInternal - } - tc.t = t - tests = append(tests, tc) - } - for _, tc := range testCases { - for _, sz := range sizes { - tt := tc - tt.dstSize = sz - addTest(tt, mkChain(tc.t, tc.dstSize, Nop)) - addTest(tt, mkChain(tc.t, tc.dstSize, Nop, 2, Nop)) - addTest(tt, mkChain(Nop, tc.srcSize, tc.t, tc.dstSize, Nop)) - if sz >= tc.dstSize && (tc.wantErr != ErrShortDst || sz == tc.dstSize) { - addTest(tt, mkChain(Nop, tc.srcSize, tc.t)) - addTest(tt, mkChain(Nop, 100, Nop, tc.srcSize, tc.t)) - } - } - } - for _, tc := range testCases { - tt := tc - tt.dstSize = 1 - tt.wantStr = "" - addTest(tt, mkChain(tc.t, tc.dstSize, Discard)) - addTest(tt, mkChain(Nop, tc.srcSize, tc.t, tc.dstSize, Discard)) - addTest(tt, mkChain(Nop, tc.srcSize, tc.t, tc.dstSize, Nop, tc.dstSize, Discard)) - } - for _, tc := range testCases { - tt := tc - tt.dstSize = 100 - tt.wantStr = strings.Replace(tc.src, "0f", "", -1) - // Chain encoders and decoders. - if _, ok := tc.t.(rleEncode); ok && tc.wantErr == nil { - addTest(tt, mkChain(tc.t, tc.dstSize, Nop, 1000, rleDecode{})) - addTest(tt, mkChain(tc.t, tc.dstSize, Nop, tc.dstSize, rleDecode{})) - addTest(tt, mkChain(Nop, tc.srcSize, tc.t, tc.dstSize, Nop, 100, rleDecode{})) - // decoding needs larger destinations - addTest(tt, mkChain(Nop, tc.srcSize, tc.t, tc.dstSize, rleDecode{}, 100, Nop)) - addTest(tt, mkChain(Nop, tc.srcSize, tc.t, tc.dstSize, Nop, 100, rleDecode{}, 100, Nop)) - } else if _, ok := tc.t.(rleDecode); ok && tc.wantErr == nil { - // The internal buffer size may need to be the sum of the maximum segment - // size of the two encoders! - addTest(tt, mkChain(tc.t, 2*tc.dstSize, rleEncode{})) - addTest(tt, mkChain(tc.t, tc.dstSize, Nop, 101, rleEncode{})) - addTest(tt, mkChain(Nop, tc.srcSize, tc.t, tc.dstSize, Nop, 100, rleEncode{})) - addTest(tt, mkChain(Nop, tc.srcSize, tc.t, tc.dstSize, Nop, 200, rleEncode{}, 100, Nop)) - } - } - for _, tc := range tests { - str, iter, err := doTransform(tc) - mi := tc.wantIter != 0 && tc.wantIter != iter - if str != tc.wantStr || err != tc.wantErr || mi { - t.Errorf("%s:\ngot iter:%d, %q, %v\nwant iter:%d, %q, %v", tc, iter, str, err, tc.wantIter, tc.wantStr, tc.wantErr) - } - break - } -} - -func TestRemoveFunc(t *testing.T) { - filter := RemoveFunc(func(r rune) bool { - return strings.IndexRune("ab\u0300\u1234,", r) != -1 - }) - tests := []testCase{ - { - src: ",", - wantStr: "", - }, - - { - src: "c", - wantStr: "c", - }, - - { - src: "\u2345", - wantStr: "\u2345", - }, - - { - src: "tschüß", - wantStr: "tschüß", - }, - - { - src: ",до,свидания,", - wantStr: "досвидания", - }, - - { - src: "a\xbd\xb2=\xbc ⌘", - wantStr: "\uFFFD\uFFFD=\uFFFD ⌘", - }, - - { - // If we didn't replace illegal bytes with RuneError, the result - // would be \u0300 or the code would need to be more complex. - src: "\xcc\u0300\x80", - wantStr: "\uFFFD\uFFFD", - }, - - { - src: "\xcc\u0300\x80", - dstSize: 3, - wantStr: "\uFFFD\uFFFD", - wantIter: 2, - }, - - { - // Test a long buffer greater than the internal buffer size - src: "hello\xcc\xcc\xccworld", - srcSize: 13, - wantStr: "hello\uFFFD\uFFFD\uFFFDworld", - wantIter: 1, - }, - - { - src: "\u2345", - dstSize: 2, - wantStr: "", - wantErr: ErrShortDst, - }, - - { - src: "\xcc", - dstSize: 2, - wantStr: "", - wantErr: ErrShortDst, - }, - - { - src: "\u0300", - dstSize: 2, - srcSize: 1, - wantStr: "", - wantErr: ErrShortSrc, - }, - - { - t: RemoveFunc(func(r rune) bool { - return r == utf8.RuneError - }), - src: "\xcc\u0300\x80", - wantStr: "\u0300", - }, - } - - for _, tc := range tests { - tc.desc = tc.src - if tc.t == nil { - tc.t = filter - } - if tc.dstSize == 0 { - tc.dstSize = 100 - } - if tc.srcSize == 0 { - tc.srcSize = 100 - } - str, iter, err := doTransform(tc) - mi := tc.wantIter != 0 && tc.wantIter != iter - if str != tc.wantStr || err != tc.wantErr || mi { - t.Errorf("%+q:\ngot iter:%d, %+q, %v\nwant iter:%d, %+q, %v", tc.src, iter, str, err, tc.wantIter, tc.wantStr, tc.wantErr) - } - - tc.src = str - idem, _, _ := doTransform(tc) - if str != idem { - t.Errorf("%+q: found %+q; want %+q", tc.src, idem, str) - } - } -} - -func testString(t *testing.T, f func(Transformer, string) (string, int, error)) { - for _, tt := range append(testCases, chainTests()...) { - if tt.desc == "allowStutter = true" { - // We don't have control over the buffer size, so we eliminate tests - // that depend on a specific buffer size being set. - continue - } - if tt.wantErr == ErrShortDst || tt.wantErr == ErrShortSrc { - // The result string will be different. - continue - } - testtext.Run(t, tt.desc, func(t *testing.T) { - got, n, err := f(tt.t, tt.src) - if tt.wantErr != err { - t.Errorf("error: got %v; want %v", err, tt.wantErr) - } - // Check that err == nil implies that n == len(tt.src). Note that vice - // versa isn't necessarily true. - if err == nil && n != len(tt.src) { - t.Errorf("err == nil: got %d bytes, want %d", n, err) - } - if got != tt.wantStr { - t.Errorf("string: got %q; want %q", got, tt.wantStr) - } - }) - } -} - -func TestBytes(t *testing.T) { - testString(t, func(z Transformer, s string) (string, int, error) { - b, n, err := Bytes(z, []byte(s)) - return string(b), n, err - }) -} - -func TestAppend(t *testing.T) { - // Create a bunch of subtests for different buffer sizes. - testCases := [][]byte{ - nil, - make([]byte, 0, 0), - make([]byte, 0, 1), - make([]byte, 1, 1), - make([]byte, 1, 5), - make([]byte, 100, 100), - make([]byte, 100, 200), - } - for _, tc := range testCases { - testString(t, func(z Transformer, s string) (string, int, error) { - b, n, err := Append(z, tc, []byte(s)) - return string(b[len(tc):]), n, err - }) - } -} - -func TestString(t *testing.T) { - testtext.Run(t, "transform", func(t *testing.T) { testString(t, String) }) - - // Overrun the internal destination buffer. - for i, s := range []string{ - aaa[:1*initialBufSize-1], - aaa[:1*initialBufSize+0], - aaa[:1*initialBufSize+1], - AAA[:1*initialBufSize-1], - AAA[:1*initialBufSize+0], - AAA[:1*initialBufSize+1], - AAA[:2*initialBufSize-1], - AAA[:2*initialBufSize+0], - AAA[:2*initialBufSize+1], - aaa[:1*initialBufSize-2] + "A", - aaa[:1*initialBufSize-1] + "A", - aaa[:1*initialBufSize+0] + "A", - aaa[:1*initialBufSize+1] + "A", - } { - testtext.Run(t, fmt.Sprint("dst buffer test using lower/", i), func(t *testing.T) { - got, _, _ := String(lowerCaseASCII{}, s) - if want := strings.ToLower(s); got != want { - t.Errorf("got %s (%d); want %s (%d)", got, len(got), want, len(want)) - } - }) - } - - // Overrun the internal source buffer. - for i, s := range []string{ - aaa[:1*initialBufSize-1], - aaa[:1*initialBufSize+0], - aaa[:1*initialBufSize+1], - aaa[:2*initialBufSize+1], - aaa[:2*initialBufSize+0], - aaa[:2*initialBufSize+1], - } { - testtext.Run(t, fmt.Sprint("src buffer test using rleEncode/", i), func(t *testing.T) { - got, _, _ := String(rleEncode{}, s) - if want := fmt.Sprintf("%da", len(s)); got != want { - t.Errorf("got %s (%d); want %s (%d)", got, len(got), want, len(want)) - } - }) - } - - // Test allocations for non-changing strings. - // Note we still need to allocate a single buffer. - for i, s := range []string{ - "", - "123456789", - aaa[:initialBufSize-1], - aaa[:initialBufSize+0], - aaa[:initialBufSize+1], - aaa[:10*initialBufSize], - } { - testtext.Run(t, fmt.Sprint("alloc/", i), func(t *testing.T) { - if n := testtext.AllocsPerRun(5, func() { String(&lowerCaseASCIILookahead{}, s) }); n > 1 { - t.Errorf("#allocs was %f; want 1", n) - } - }) - } -} - -// TestBytesAllocation tests that buffer growth stays limited with the trickler -// transformer, which behaves oddly but within spec. In case buffer growth is -// not correctly handled, the test will either panic with a failed allocation or -// thrash. To ensure the tests terminate under the last condition, we time out -// after some sufficiently long period of time. -func TestBytesAllocation(t *testing.T) { - done := make(chan bool) - go func() { - in := bytes.Repeat([]byte{'a'}, 1000) - tr := trickler(make([]byte, 1)) - Bytes(&tr, in) - done <- true - }() - select { - case <-done: - case <-time.After(3 * time.Second): - t.Error("time out, likely due to excessive allocation") - } -} - -// TestStringAllocation tests that buffer growth stays limited with the trickler -// transformer, which behaves oddly but within spec. In case buffer growth is -// not correctly handled, the test will either panic with a failed allocation or -// thrash. To ensure the tests terminate under the last condition, we time out -// after some sufficiently long period of time. -func TestStringAllocation(t *testing.T) { - done := make(chan bool) - go func() { - tr := trickler(make([]byte, 1)) - String(&tr, aaa[:1000]) - done <- true - }() - select { - case <-done: - case <-time.After(3 * time.Second): - t.Error("time out, likely due to excessive allocation") - } -} - -func BenchmarkStringLowerEmpty(b *testing.B) { - for i := 0; i < b.N; i++ { - String(&lowerCaseASCIILookahead{}, "") - } -} - -func BenchmarkStringLowerIdentical(b *testing.B) { - for i := 0; i < b.N; i++ { - String(&lowerCaseASCIILookahead{}, aaa[:4096]) - } -} - -func BenchmarkStringLowerChanged(b *testing.B) { - for i := 0; i < b.N; i++ { - String(&lowerCaseASCIILookahead{}, AAA[:4096]) - } -} - -var ( - aaa = strings.Repeat("a", 4096) - AAA = strings.Repeat("A", 4096) -) diff --git a/vendor/golang.org/x/text/unicode/bidi/core_test.go b/vendor/golang.org/x/text/unicode/bidi/core_test.go deleted file mode 100644 index f28d386c..00000000 --- a/vendor/golang.org/x/text/unicode/bidi/core_test.go +++ /dev/null @@ -1,224 +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 bidi - -import ( - "flag" - "fmt" - "log" - "strconv" - "strings" - "testing" - - "golang.org/x/text/internal/gen" - "golang.org/x/text/internal/testtext" - "golang.org/x/text/internal/ucd" - "golang.org/x/text/unicode/norm" -) - -var testLevels = flag.Bool("levels", false, "enable testing of levels") - -// TestBidiCore performs the tests in BidiTest.txt. -// See http://www.unicode.org/Public/UCD/latest/ucd/BidiTest.txt. -func TestBidiCore(t *testing.T) { - testtext.SkipIfNotLong(t) - - r := gen.OpenUCDFile("BidiTest.txt") - defer r.Close() - - var wantLevels, wantOrder []string - p := ucd.New(r, ucd.Part(func(p *ucd.Parser) { - s := strings.Split(p.String(0), ":") - switch s[0] { - case "Levels": - wantLevels = strings.Fields(s[1]) - case "Reorder": - wantOrder = strings.Fields(s[1]) - default: - log.Fatalf("Unknown part %q.", s[0]) - } - })) - - for p.Next() { - types := []Class{} - for _, s := range p.Strings(0) { - types = append(types, bidiClass[s]) - } - // We ignore the bracketing part of the algorithm. - pairTypes := make([]bracketType, len(types)) - pairValues := make([]rune, len(types)) - - for i := uint(0); i < 3; i++ { - if p.Uint(1)&(1< 5 { - return fmt.Errorf("before %d > 5", before) - } - r.calls = append(r.calls, fmt.Sprintf("R:%s-%d", anchor, before)) - return nil -} - -func (r *recorder) Insert(level int, str, context, extend string) error { - s := fmt.Sprintf("O:%d:%s", level, str) - if context != "" { - s += "|" + context - } - if extend != "" { - s += "/" + extend - } - r.calls = append(r.calls, s) - return nil -} - -func (r *recorder) Index(id string) { - r.calls = append(r.calls, fmt.Sprintf("I:%s", id)) -} - -func (r *recorder) Error(err error) { - r.calls = append(r.calls, fmt.Sprintf("E:%v", err)) -} - -func TestRuleProcessor(t *testing.T) { - for _, tt := range []struct { - desc string - in string - out string - }{ - {desc: "empty"}, - {desc: "whitespace and comments only", - in: ` - - - # adsfads -# adfadf - `, - }, - { - desc: "reset anchor", - in: ` - & a - &b # - & [ before 3 ] c - & [before 4] d & ee - & [first tertiary ignorable] - &'g' - & 'h''h'h'h' - &'\u0069' # LATIN SMALL LETTER I - `, - out: ` - R:a-0 - R:b-0 - R:c-3 - R:d-4 - R:ee-0 - R:-0 - R:g-0 - R:hhhh-0 - R:i-0 - `, - }, - { - desc: "ordering", - in: ` - & 0 - < 1 <<''2# -<<< 3'3''33'3# - <<<<4 - = 5 << 6 | s - <<<< 7 / z - << 8'' | s / ch - `, - out: ` - R:0-0 - O:1:1 - O:2:'2 - O:3:33333 - O:4:4 - O:5:5 - O:2:6|s - O:4:7/z - O:2:8'|s/ch - `, - }, - { - desc: "index", - in: "< '\ufdd0'A", - out: "I:A", - }, - { - desc: "sequence", - in: ` - & 0 - <<* 1234 - <* a-cde-f - =* q-q - `, - out: ` - R:0-0 - O:2:1 - O:2:2 - O:2:3 - O:2:4 - O:1:a - O:1:b - O:1:c - O:1:d - O:1:e - O:1:f - O:5:q - `, - }, - { - desc: "compact", - in: "&B 5", - }, - { - desc: "err empty order", - in: " < ", - out: "E:1: missing string", - }, - { - desc: "err empty identity", - in: " = ", - out: "E:1: missing string", - }, - { - desc: "err empty context", - in: " < a | ", - out: "E:1: missing string after context", - }, - { - desc: "err empty extend", - in: " < a / ", - out: "E:1: missing string after extension", - }, - { - desc: "err empty sequence", - in: " <* ", - out: "E:1: empty sequence", - }, - { - desc: "err sequence 1", - in: " <* -a", - out: "E:1: range without starter value", - }, - { - desc: "err sequence 3", - in: " <* a-a-b", - out: `O:1:a - E:1: range without starter value - `, - }, - { - desc: "err sequence 3", - in: " <* b-a", - out: `O:1:b - E:1: invalid range 'b'-'a' - `, - }, - { - desc: "err unmatched quote", - in: " < 'b", - out: ` E:1: unmatched single quote - `, - }, - } { - rec := &recorder{} - err := Collation{ - Cr: []*Common{ - {hidden: hidden{CharData: tt.in}}, - }, - }.Process(rec) - if err != nil { - rec.Error(err) - } - got := rec.calls - want := strings.Split(strings.TrimSpace(tt.out), "\n") - if tt.out == "" { - want = nil - } - if len(got) != len(want) { - t.Errorf("%s: nResults: got %d; want %d", tt.desc, len(got), len(want)) - continue - } - for i, g := range got { - if want := strings.TrimSpace(want[i]); g != want { - t.Errorf("%s:%d: got %q; want %q", tt.desc, i, g, want) - } - } - } -} diff --git a/vendor/golang.org/x/text/unicode/cldr/data_test.go b/vendor/golang.org/x/text/unicode/cldr/data_test.go deleted file mode 100644 index 16621896..00000000 --- a/vendor/golang.org/x/text/unicode/cldr/data_test.go +++ /dev/null @@ -1,186 +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 cldr - -// This file contains test data. - -import ( - "io" - "strings" -) - -type testLoader struct { -} - -func (t testLoader) Len() int { - return len(testFiles) -} - -func (t testLoader) Path(i int) string { - return testPaths[i] -} - -func (t testLoader) Reader(i int) (io.ReadCloser, error) { - return &reader{*strings.NewReader(testFiles[i])}, nil -} - -// reader adds a dummy Close method to strings.Reader so that it -// satisfies the io.ReadCloser interface. -type reader struct { - strings.Reader -} - -func (r reader) Close() error { - return nil -} - -var ( - testFiles = []string{de_xml, gsw_xml, root_xml} - testPaths = []string{ - "common/main/de.xml", - "common/main/gsw.xml", - "common/main/root.xml", - } -) - -var root_xml = ` - - - - - - - - [] - [] - [\- ‐ – — … ' ‘ ‚ " “ „ \& #] - {0}… - …{0} - ? - - - - - - - - - - - - - - - - - - - - - - - - 11 - 22 - 33 - 44 - - - - - 1 - 2 - 3 - 4 - - - - - - - - - - -` - -var de_xml = ` - - - - - - - [a ä b c d e ö p q r s ß t u ü v w x y z] - [á à ă] - [A B C D E F G H Z] - {0} … - … {0} - ? - - der die das - - - - - - - - - BBB - - - bbb - - - - - - - - - M - A - - - Maerz - April - Mai - - - - - m - m - - - april - mai - - - - - - - - - yes:y - no:n - - - -` - -var gsw_xml = ` - - - - - - - - - -` diff --git a/vendor/golang.org/x/text/unicode/cldr/examples_test.go b/vendor/golang.org/x/text/unicode/cldr/examples_test.go deleted file mode 100644 index 1a69b007..00000000 --- a/vendor/golang.org/x/text/unicode/cldr/examples_test.go +++ /dev/null @@ -1,21 +0,0 @@ -package cldr_test - -import ( - "fmt" - - "golang.org/x/text/unicode/cldr" -) - -func ExampleSlice() { - var dr *cldr.CLDR // assume this is initialized - - x, _ := dr.LDML("en") - cs := x.Collations.Collation - // remove all but the default - cldr.MakeSlice(&cs).Filter(func(e cldr.Elem) bool { - return e.GetCommon().Type != x.Collations.Default() - }) - for i, c := range cs { - fmt.Println(i, c.Type) - } -} diff --git a/vendor/golang.org/x/text/unicode/cldr/resolve_test.go b/vendor/golang.org/x/text/unicode/cldr/resolve_test.go deleted file mode 100644 index 3d8edaec..00000000 --- a/vendor/golang.org/x/text/unicode/cldr/resolve_test.go +++ /dev/null @@ -1,368 +0,0 @@ -package cldr - -import ( - "fmt" - "log" - "reflect" - "testing" -) - -func failOnError(err error) { - if err != nil { - log.Panic(err) - } -} - -func data() *CLDR { - d := Decoder{} - data, err := d.Decode(testLoader{}) - failOnError(err) - return data -} - -type h struct { - A string `xml:"ha,attr"` - E string `xml:"he"` - D string `xml:",chardata"` - X string -} - -type fieldTest struct { - Common - To string `xml:"to,attr"` - Key string `xml:"key,attr"` - E string `xml:"e"` - D string `xml:",chardata"` - X string - h -} - -var testStruct = fieldTest{ - Common: Common{ - name: "mapping", // exclude "type" as distinguishing attribute - Type: "foo", - Alt: "foo", - }, - To: "nyc", - Key: "k", - E: "E", - D: "D", - h: h{ - A: "A", - E: "E", - D: "D", - }, -} - -func TestIter(t *testing.T) { - tests := map[string]string{ - "Type": "foo", - "Alt": "foo", - "To": "nyc", - "A": "A", - "Alias": "", - } - k := 0 - for i := iter(reflect.ValueOf(testStruct)); !i.done(); i.next() { - v := i.value() - if v.Kind() == reflect.Ptr && v.Elem().Kind() == reflect.String { - v = v.Elem() - } - name := i.field().Name - if w, ok := tests[name]; ok { - s := fmt.Sprint(v.Interface()) - if w != s { - t.Errorf("value: found %q; want %q", w, s) - } - delete(tests, name) - } - k++ - } - if len(tests) != 0 { - t.Errorf("missing fields: %v", tests) - } -} - -func TestFindField(t *testing.T) { - tests := []struct { - name, val string - exist bool - }{ - {"type", "foo", true}, - {"alt", "foo", true}, - {"to", "nyc", true}, - {"he", "E", true}, - {"q", "", false}, - } - vf := reflect.ValueOf(testStruct) - for i, tt := range tests { - v, err := findField(vf, tt.name) - if (err == nil) != tt.exist { - t.Errorf("%d: field %q present is %v; want %v", i, tt.name, err == nil, tt.exist) - } else if tt.exist { - if v.Kind() == reflect.Ptr { - if v.IsNil() { - continue - } - v = v.Elem() - } - if v.String() != tt.val { - t.Errorf("%d: found value %q; want %q", i, v.String(), tt.val) - } - } - } -} - -var keyTests = []struct { - exclude []string - key string -}{ - {[]string{}, "alt=foo;key=k;to=nyc"}, - {[]string{"type"}, "alt=foo;key=k;to=nyc"}, - {[]string{"choice"}, "alt=foo;key=k;to=nyc"}, - {[]string{"alt"}, "key=k;to=nyc"}, - {[]string{"a"}, "alt=foo;key=k;to=nyc"}, - {[]string{"to"}, "alt=foo;key=k"}, - {[]string{"alt", "to"}, "key=k"}, - {[]string{"alt", "to", "key"}, ""}, -} - -func TestAttrKey(t *testing.T) { - v := reflect.ValueOf(&testStruct) - for i, tt := range keyTests { - key := attrKey(v, tt.exclude...) - if key != tt.key { - t.Errorf("%d: found %q, want %q", i, key, tt.key) - } - } -} - -func TestKey(t *testing.T) { - for i, tt := range keyTests { - key := Key(&testStruct, tt.exclude...) - if key != tt.key { - t.Errorf("%d: found %q, want %q", i, key, tt.key) - } - } -} - -func testEnclosing(t *testing.T, x *LDML, name string) { - eq := func(a, b Elem, i int) { - for ; i > 0; i-- { - b = b.enclosing() - } - if a != b { - t.Errorf("%s: found path %q, want %q", name, getPath(a), getPath(b)) - } - } - eq(x, x, 0) - eq(x, x.Identity, 1) - eq(x, x.Dates.Calendars, 2) - eq(x, x.Dates.Calendars.Calendar[0], 3) - eq(x, x.Dates.Calendars.Calendar[1], 3) - //eq(x, x.Dates.Calendars.Calendar[0].Months, 4) - eq(x, x.Dates.Calendars.Calendar[1].Months, 4) -} - -func TestEnclosing(t *testing.T) { - testEnclosing(t, data().RawLDML("de"), "enclosing-raw") - de, _ := data().LDML("de") - testEnclosing(t, de, "enclosing") -} - -func TestDeepCopy(t *testing.T) { - eq := func(have, want string) { - if have != want { - t.Errorf("found %q; want %q", have, want) - } - } - x, _ := data().LDML("de") - vc := deepCopy(reflect.ValueOf(x)) - c := vc.Interface().(*LDML) - linkEnclosing(nil, c) - if x == c { - t.Errorf("did not copy") - } - - eq(c.name, "ldml") - eq(c.Dates.name, "dates") - testEnclosing(t, c, "deepCopy") -} - -type getTest struct { - loc string - path string - field string // used in combination with length - data string - altData string // used for buddhist calendar if value != "" - typ string - length int - missing bool -} - -const ( - budMon = "dates/calendars/calendar[@type='buddhist']/months/" - chnMon = "dates/calendars/calendar[@type='chinese']/months/" - greMon = "dates/calendars/calendar[@type='gregorian']/months/" -) - -func monthVal(path, context, width string, month int) string { - const format = "%s/monthContext[@type='%s']/monthWidth[@type='%s']/month[@type='%d']" - return fmt.Sprintf(format, path, context, width, month) -} - -var rootGetTests = []getTest{ - {loc: "root", path: "identity/language", typ: "root"}, - {loc: "root", path: "characters/moreInformation", data: "?"}, - {loc: "root", path: "characters", field: "exemplarCharacters", length: 3}, - {loc: "root", path: greMon, field: "monthContext", length: 2}, - {loc: "root", path: greMon + "monthContext[@type='format']/monthWidth[@type='narrow']", field: "month", length: 4}, - {loc: "root", path: greMon + "monthContext[@type='stand-alone']/monthWidth[@type='wide']", field: "month", length: 4}, - // unescaping character data - {loc: "root", path: "characters/exemplarCharacters[@type='punctuation']", data: `[\- ‐ – — … ' ‘ ‚ " “ „ \& #]`}, - // default resolution - {loc: "root", path: "dates/calendars/calendar", typ: "gregorian"}, - // alias resolution - {loc: "root", path: budMon, field: "monthContext", length: 2}, - // crossing but non-circular alias resolution - {loc: "root", path: budMon + "monthContext[@type='format']/monthWidth[@type='narrow']", field: "month", length: 4}, - {loc: "root", path: budMon + "monthContext[@type='stand-alone']/monthWidth[@type='wide']", field: "month", length: 4}, - {loc: "root", path: monthVal(greMon, "format", "wide", 1), data: "11"}, - {loc: "root", path: monthVal(greMon, "format", "narrow", 2), data: "2"}, - {loc: "root", path: monthVal(greMon, "stand-alone", "wide", 3), data: "33"}, - {loc: "root", path: monthVal(greMon, "stand-alone", "narrow", 4), data: "4"}, - {loc: "root", path: monthVal(budMon, "format", "wide", 1), data: "11"}, - {loc: "root", path: monthVal(budMon, "format", "narrow", 2), data: "2"}, - {loc: "root", path: monthVal(budMon, "stand-alone", "wide", 3), data: "33"}, - {loc: "root", path: monthVal(budMon, "stand-alone", "narrow", 4), data: "4"}, -} - -// 19 -var deGetTests = []getTest{ - {loc: "de", path: "identity/language", typ: "de"}, - {loc: "de", path: "posix", length: 2}, - {loc: "de", path: "characters", field: "exemplarCharacters", length: 4}, - {loc: "de", path: "characters/exemplarCharacters[@type='auxiliary']", data: `[á à ă]`}, - // identity is a blocking element, so de should not inherit generation from root. - {loc: "de", path: "identity/generation", missing: true}, - // default resolution - {loc: "root", path: "dates/calendars/calendar", typ: "gregorian"}, - - // absolute path alias resolution - {loc: "gsw", path: "posix", field: "messages", length: 1}, - {loc: "gsw", path: "posix/messages/yesstr", data: "yes:y"}, -} - -// 27(greMon) - 52(budMon) - 77(chnMon) -func calGetTests(s string) []getTest { - tests := []getTest{ - {loc: "de", path: s, length: 2}, - {loc: "de", path: s + "monthContext[@type='format']/monthWidth[@type='wide']", field: "month", length: 5}, - {loc: "de", path: monthVal(s, "format", "wide", 1), data: "11"}, - {loc: "de", path: monthVal(s, "format", "wide", 2), data: "22"}, - {loc: "de", path: monthVal(s, "format", "wide", 3), data: "Maerz", altData: "bbb"}, - {loc: "de", path: monthVal(s, "format", "wide", 4), data: "April"}, - {loc: "de", path: monthVal(s, "format", "wide", 5), data: "Mai"}, - - {loc: "de", path: s + "monthContext[@type='format']/monthWidth[@type='narrow']", field: "month", length: 5}, - {loc: "de", path: monthVal(s, "format", "narrow", 1), data: "1"}, - {loc: "de", path: monthVal(s, "format", "narrow", 2), data: "2"}, - {loc: "de", path: monthVal(s, "format", "narrow", 3), data: "M", altData: "BBB"}, - {loc: "de", path: monthVal(s, "format", "narrow", 4), data: "A"}, - {loc: "de", path: monthVal(s, "format", "narrow", 5), data: "m"}, - - {loc: "de", path: s + "monthContext[@type='stand-alone']/monthWidth[@type='wide']", field: "month", length: 5}, - {loc: "de", path: monthVal(s, "stand-alone", "wide", 1), data: "11"}, - {loc: "de", path: monthVal(s, "stand-alone", "wide", 2), data: "22"}, - {loc: "de", path: monthVal(s, "stand-alone", "wide", 3), data: "Maerz", altData: "bbb"}, - {loc: "de", path: monthVal(s, "stand-alone", "wide", 4), data: "april"}, - {loc: "de", path: monthVal(s, "stand-alone", "wide", 5), data: "mai"}, - - {loc: "de", path: s + "monthContext[@type='stand-alone']/monthWidth[@type='narrow']", field: "month", length: 5}, - {loc: "de", path: monthVal(s, "stand-alone", "narrow", 1), data: "1"}, - {loc: "de", path: monthVal(s, "stand-alone", "narrow", 2), data: "2"}, - {loc: "de", path: monthVal(s, "stand-alone", "narrow", 3), data: "m"}, - {loc: "de", path: monthVal(s, "stand-alone", "narrow", 4), data: "4"}, - {loc: "de", path: monthVal(s, "stand-alone", "narrow", 5), data: "m"}, - } - if s == budMon { - for i, t := range tests { - if t.altData != "" { - tests[i].data = t.altData - } - } - } - return tests -} - -var getTests = append(rootGetTests, - append(deGetTests, - append(calGetTests(greMon), - append(calGetTests(budMon), - calGetTests(chnMon)...)...)...)...) - -func TestPath(t *testing.T) { - d := data() - for i, tt := range getTests { - x, _ := d.LDML(tt.loc) - e, err := walkXPath(x, tt.path) - if err != nil { - if !tt.missing { - t.Errorf("%d:error: %v %v", i, err, tt.missing) - } - continue - } - if tt.missing { - t.Errorf("%d: missing is %v; want %v", i, e == nil, tt.missing) - continue - } - if tt.data != "" && e.GetCommon().Data() != tt.data { - t.Errorf("%d: data is %v; want %v", i, e.GetCommon().Data(), tt.data) - continue - } - if tt.typ != "" && e.GetCommon().Type != tt.typ { - t.Errorf("%d: type is %v; want %v", i, e.GetCommon().Type, tt.typ) - continue - } - if tt.field != "" { - slice, _ := findField(reflect.ValueOf(e), tt.field) - if slice.Len() != tt.length { - t.Errorf("%d: length is %v; want %v", i, slice.Len(), tt.length) - continue - } - } - } -} - -func TestGet(t *testing.T) { - d := data() - for i, tt := range getTests { - x, _ := d.LDML(tt.loc) - e, err := Get(x, tt.path) - if err != nil { - if !tt.missing { - t.Errorf("%d:error: %v %v", i, err, tt.missing) - } - continue - } - if tt.missing { - t.Errorf("%d: missing is %v; want %v", i, e == nil, tt.missing) - continue - } - if tt.data != "" && e.GetCommon().Data() != tt.data { - t.Errorf("%d: data is %v; want %v", i, e.GetCommon().Data(), tt.data) - continue - } - if tt.typ != "" && e.GetCommon().Type != tt.typ { - t.Errorf("%d: type is %v; want %v", i, e.GetCommon().Type, tt.typ) - continue - } - if tt.field != "" { - slice, _ := findField(reflect.ValueOf(e), tt.field) - if slice.Len() != tt.length { - t.Errorf("%d: length is %v; want %v", i, slice.Len(), tt.length) - continue - } - } - } -} diff --git a/vendor/golang.org/x/text/unicode/cldr/slice_test.go b/vendor/golang.org/x/text/unicode/cldr/slice_test.go deleted file mode 100644 index 3d487d3b..00000000 --- a/vendor/golang.org/x/text/unicode/cldr/slice_test.go +++ /dev/null @@ -1,175 +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 cldr - -import ( - "reflect" - "testing" -) - -type testSlice []*Common - -func mkElem(alt, typ, ref string) *Common { - return &Common{ - Type: typ, - Reference: ref, - Alt: alt, - } -} - -var ( - testSlice1 = testSlice{ - mkElem("1", "a", "i.a"), - mkElem("1", "b", "i.b"), - mkElem("1", "c", "i.c"), - mkElem("2", "b", "ii"), - mkElem("3", "c", "iii"), - mkElem("4", "a", "iv.a"), - mkElem("4", "d", "iv.d"), - } - testSliceE = testSlice{} -) - -func panics(f func()) (panics bool) { - defer func() { - if err := recover(); err != nil { - panics = true - } - }() - f() - return panics -} - -func TestMakeSlice(t *testing.T) { - foo := 1 - bar := []int{} - tests := []struct { - i interface{} - panics bool - err string - }{ - {&foo, true, "should panic when passed a pointer to the wrong type"}, - {&bar, true, "should panic when slice element of the wrong type"}, - {testSlice1, true, "should panic when passed a slice"}, - {&testSlice1, false, "should not panic"}, - } - for i, tt := range tests { - if panics(func() { MakeSlice(tt.i) }) != tt.panics { - t.Errorf("%d: %s", i, tt.err) - } - } -} - -var anyOfTests = []struct { - sl testSlice - values []string - n int -}{ - {testSliceE, []string{}, 0}, - {testSliceE, []string{"1", "2", "3"}, 0}, - {testSlice1, []string{}, 0}, - {testSlice1, []string{"1"}, 3}, - {testSlice1, []string{"2"}, 1}, - {testSlice1, []string{"5"}, 0}, - {testSlice1, []string{"1", "2", "3"}, 5}, -} - -func TestSelectAnyOf(t *testing.T) { - for i, tt := range anyOfTests { - sl := tt.sl - s := MakeSlice(&sl) - s.SelectAnyOf("alt", tt.values...) - if len(sl) != tt.n { - t.Errorf("%d: found len == %d; want %d", i, len(sl), tt.n) - } - } - sl := testSlice1 - s := MakeSlice(&sl) - if !panics(func() { s.SelectAnyOf("foo") }) { - t.Errorf("should panic on non-existing attribute") - } -} - -func TestFilter(t *testing.T) { - for i, tt := range anyOfTests { - sl := tt.sl - s := MakeSlice(&sl) - s.Filter(func(e Elem) bool { - v, _ := findField(reflect.ValueOf(e), "alt") - return in(tt.values, v.String()) - }) - if len(sl) != tt.n { - t.Errorf("%d: found len == %d; want %d", i, len(sl), tt.n) - } - } -} - -func TestGroup(t *testing.T) { - f := func(excl ...string) func(Elem) string { - return func(e Elem) string { - return Key(e, excl...) - } - } - tests := []struct { - sl testSlice - f func(Elem) string - lens []int - }{ - {testSliceE, f(), []int{}}, - {testSlice1, f(), []int{1, 1, 1, 1, 1, 1, 1}}, - {testSlice1, f("type"), []int{3, 1, 1, 2}}, - {testSlice1, f("alt"), []int{2, 2, 2, 1}}, - {testSlice1, f("alt", "type"), []int{7}}, - {testSlice1, f("alt", "type"), []int{7}}, - } - for i, tt := range tests { - sl := tt.sl - s := MakeSlice(&sl) - g := s.Group(tt.f) - if len(tt.lens) != len(g) { - t.Errorf("%d: found %d; want %d", i, len(g), len(tt.lens)) - continue - } - for j, v := range tt.lens { - if n := g[j].Value().Len(); n != v { - t.Errorf("%d: found %d for length of group %d; want %d", i, n, j, v) - } - } - } -} - -func TestSelectOnePerGroup(t *testing.T) { - tests := []struct { - sl testSlice - attr string - values []string - refs []string - }{ - {testSliceE, "alt", []string{"1"}, []string{}}, - {testSliceE, "type", []string{"a"}, []string{}}, - {testSlice1, "alt", []string{"2", "3", "1"}, []string{"i.a", "ii", "iii"}}, - {testSlice1, "alt", []string{"1", "4"}, []string{"i.a", "i.b", "i.c", "iv.d"}}, - {testSlice1, "type", []string{"c", "d"}, []string{"i.c", "iii", "iv.d"}}, - } - for i, tt := range tests { - sl := tt.sl - s := MakeSlice(&sl) - s.SelectOnePerGroup(tt.attr, tt.values) - if len(sl) != len(tt.refs) { - t.Errorf("%d: found result length %d; want %d", i, len(sl), len(tt.refs)) - continue - } - for j, e := range sl { - if tt.refs[j] != e.Reference { - t.Errorf("%d:%d found %s; want %s", i, j, e.Reference, tt.refs[i]) - } - } - } - sl := testSlice1 - s := MakeSlice(&sl) - if !panics(func() { s.SelectOnePerGroup("foo", nil) }) { - t.Errorf("should panic on non-existing attribute") - } -} diff --git a/vendor/golang.org/x/text/unicode/doc.go b/vendor/golang.org/x/text/unicode/doc.go deleted file mode 100644 index e8f1032d..00000000 --- a/vendor/golang.org/x/text/unicode/doc.go +++ /dev/null @@ -1,8 +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. - -// unicode holds packages with implementations of Unicode standards that are -// mostly used as building blocks for other packages in golang.org/x/text, -// layout engines, or are otherwise more low-level in nature. -package unicode diff --git a/vendor/golang.org/x/text/unicode/norm/composition_test.go b/vendor/golang.org/x/text/unicode/norm/composition_test.go deleted file mode 100644 index 11684069..00000000 --- a/vendor/golang.org/x/text/unicode/norm/composition_test.go +++ /dev/null @@ -1,130 +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 norm - -import "testing" - -// TestCase is used for most tests. -type TestCase struct { - in []rune - out []rune -} - -func runTests(t *testing.T, name string, fm Form, tests []TestCase) { - rb := reorderBuffer{} - rb.init(fm, nil) - for i, test := range tests { - rb.setFlusher(nil, appendFlush) - for j, rune := range test.in { - b := []byte(string(rune)) - src := inputBytes(b) - info := rb.f.info(src, 0) - if j == 0 { - rb.ss.first(info) - } else { - rb.ss.next(info) - } - if rb.insertFlush(src, 0, info) < 0 { - t.Errorf("%s:%d: insert failed for rune %d", name, i, j) - } - } - rb.doFlush() - was := string(rb.out) - want := string(test.out) - if len(was) != len(want) { - t.Errorf("%s:%d: length = %d; want %d", name, i, len(was), len(want)) - } - if was != want { - k, pfx := pidx(was, want) - t.Errorf("%s:%d: \nwas %s%+q; \nwant %s%+q", name, i, pfx, was[k:], pfx, want[k:]) - } - } -} - -func TestFlush(t *testing.T) { - const ( - hello = "Hello " - world = "world!" - ) - buf := make([]byte, maxByteBufferSize) - p := copy(buf, hello) - out := buf[p:] - rb := reorderBuffer{} - rb.initString(NFC, world) - if i := rb.flushCopy(out); i != 0 { - t.Errorf("wrote bytes on flush of empty buffer. (len(out) = %d)", i) - } - - for i := range world { - // No need to set streamSafe values for this test. - rb.insertFlush(rb.src, i, rb.f.info(rb.src, i)) - n := rb.flushCopy(out) - out = out[n:] - p += n - } - - was := buf[:p] - want := hello + world - if string(was) != want { - t.Errorf(`output after flush was "%s"; want "%s"`, string(was), want) - } - if rb.nrune != 0 { - t.Errorf("non-null size of info buffer (rb.nrune == %d)", rb.nrune) - } - if rb.nbyte != 0 { - t.Errorf("non-null size of byte buffer (rb.nbyte == %d)", rb.nbyte) - } -} - -var insertTests = []TestCase{ - {[]rune{'a'}, []rune{'a'}}, - {[]rune{0x300}, []rune{0x300}}, - {[]rune{0x300, 0x316}, []rune{0x316, 0x300}}, // CCC(0x300)==230; CCC(0x316)==220 - {[]rune{0x316, 0x300}, []rune{0x316, 0x300}}, - {[]rune{0x41, 0x316, 0x300}, []rune{0x41, 0x316, 0x300}}, - {[]rune{0x41, 0x300, 0x316}, []rune{0x41, 0x316, 0x300}}, - {[]rune{0x300, 0x316, 0x41}, []rune{0x316, 0x300, 0x41}}, - {[]rune{0x41, 0x300, 0x40, 0x316}, []rune{0x41, 0x300, 0x40, 0x316}}, -} - -func TestInsert(t *testing.T) { - runTests(t, "TestInsert", NFD, insertTests) -} - -var decompositionNFDTest = []TestCase{ - {[]rune{0xC0}, []rune{0x41, 0x300}}, - {[]rune{0xAC00}, []rune{0x1100, 0x1161}}, - {[]rune{0x01C4}, []rune{0x01C4}}, - {[]rune{0x320E}, []rune{0x320E}}, - {[]rune("음ẻ과"), []rune{0x110B, 0x1173, 0x11B7, 0x65, 0x309, 0x1100, 0x116A}}, -} - -var decompositionNFKDTest = []TestCase{ - {[]rune{0xC0}, []rune{0x41, 0x300}}, - {[]rune{0xAC00}, []rune{0x1100, 0x1161}}, - {[]rune{0x01C4}, []rune{0x44, 0x5A, 0x030C}}, - {[]rune{0x320E}, []rune{0x28, 0x1100, 0x1161, 0x29}}, -} - -func TestDecomposition(t *testing.T) { - runTests(t, "TestDecompositionNFD", NFD, decompositionNFDTest) - runTests(t, "TestDecompositionNFKD", NFKD, decompositionNFKDTest) -} - -var compositionTest = []TestCase{ - {[]rune{0x41, 0x300}, []rune{0xC0}}, - {[]rune{0x41, 0x316}, []rune{0x41, 0x316}}, - {[]rune{0x41, 0x300, 0x35D}, []rune{0xC0, 0x35D}}, - {[]rune{0x41, 0x316, 0x300}, []rune{0xC0, 0x316}}, - // blocking starter - {[]rune{0x41, 0x316, 0x40, 0x300}, []rune{0x41, 0x316, 0x40, 0x300}}, - {[]rune{0x1100, 0x1161}, []rune{0xAC00}}, - // parenthesized Hangul, alternate between ASCII and Hangul. - {[]rune{0x28, 0x1100, 0x1161, 0x29}, []rune{0x28, 0xAC00, 0x29}}, -} - -func TestComposition(t *testing.T) { - runTests(t, "TestComposition", NFC, compositionTest) -} diff --git a/vendor/golang.org/x/text/unicode/norm/data10.0.0_test.go b/vendor/golang.org/x/text/unicode/norm/data10.0.0_test.go deleted file mode 100644 index 1d0f73dc..00000000 --- a/vendor/golang.org/x/text/unicode/norm/data10.0.0_test.go +++ /dev/null @@ -1,7424 +0,0 @@ -// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. - -// +build go1.10 - -package norm - -const ( - Yes = iota - No - Maybe -) - -type formData struct { - qc uint8 - combinesForward bool - decomposition string -} - -type runeData struct { - r rune - ccc uint8 - nLead uint8 - nTrail uint8 - f [2]formData // 0: canonical; 1: compatibility -} - -func f(qc uint8, cf bool, dec string) [2]formData { - return [2]formData{{qc, cf, dec}, {qc, cf, dec}} -} - -func g(qc, qck uint8, cf, cfk bool, d, dk string) [2]formData { - return [2]formData{{qc, cf, d}, {qck, cfk, dk}} -} - -var testData = []runeData{ - {0x0, 0, 0, 0, f(Yes, false, "")}, - {0x3c, 0, 0, 0, f(Yes, true, "")}, - {0x3f, 0, 0, 0, f(Yes, false, "")}, - {0x41, 0, 0, 0, f(Yes, true, "")}, - {0x51, 0, 0, 0, f(Yes, false, "")}, - {0x52, 0, 0, 0, f(Yes, true, "")}, - {0x5b, 0, 0, 0, f(Yes, false, "")}, - {0x61, 0, 0, 0, f(Yes, true, "")}, - {0x71, 0, 0, 0, f(Yes, false, "")}, - {0x72, 0, 0, 0, f(Yes, true, "")}, - {0x7b, 0, 0, 0, f(Yes, false, "")}, - {0xa0, 0, 0, 0, g(Yes, No, false, false, "", " ")}, - {0xa1, 0, 0, 0, f(Yes, false, "")}, - {0xa8, 0, 0, 1, g(Yes, No, true, false, "", " ̈")}, - {0xa9, 0, 0, 0, f(Yes, false, "")}, - {0xaa, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0xab, 0, 0, 0, f(Yes, false, "")}, - {0xaf, 0, 0, 1, g(Yes, No, false, false, "", " ̄")}, - {0xb0, 0, 0, 0, f(Yes, false, "")}, - {0xb2, 0, 0, 0, g(Yes, No, false, false, "", "2")}, - {0xb3, 0, 0, 0, g(Yes, No, false, false, "", "3")}, - {0xb4, 0, 0, 1, g(Yes, No, false, false, "", " ́")}, - {0xb5, 0, 0, 0, g(Yes, No, false, false, "", "μ")}, - {0xb6, 0, 0, 0, f(Yes, false, "")}, - {0xb8, 0, 0, 1, g(Yes, No, false, false, "", " ̧")}, - {0xb9, 0, 0, 0, g(Yes, No, false, false, "", "1")}, - {0xba, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0xbb, 0, 0, 0, f(Yes, false, "")}, - {0xbc, 0, 0, 0, g(Yes, No, false, false, "", "1⁄4")}, - {0xbd, 0, 0, 0, g(Yes, No, false, false, "", "1⁄2")}, - {0xbe, 0, 0, 0, g(Yes, No, false, false, "", "3⁄4")}, - {0xbf, 0, 0, 0, f(Yes, false, "")}, - {0xc0, 0, 0, 1, f(Yes, false, "À")}, - {0xc1, 0, 0, 1, f(Yes, false, "Á")}, - {0xc2, 0, 0, 1, f(Yes, true, "Â")}, - {0xc3, 0, 0, 1, f(Yes, false, "Ã")}, - {0xc4, 0, 0, 1, f(Yes, true, "Ä")}, - {0xc5, 0, 0, 1, f(Yes, true, "Å")}, - {0xc6, 0, 0, 0, f(Yes, true, "")}, - {0xc7, 0, 0, 1, f(Yes, true, "Ç")}, - {0xc8, 0, 0, 1, f(Yes, false, "È")}, - {0xc9, 0, 0, 1, f(Yes, false, "É")}, - {0xca, 0, 0, 1, f(Yes, true, "Ê")}, - {0xcb, 0, 0, 1, f(Yes, false, "Ë")}, - {0xcc, 0, 0, 1, f(Yes, false, "Ì")}, - {0xcd, 0, 0, 1, f(Yes, false, "Í")}, - {0xce, 0, 0, 1, f(Yes, false, "Î")}, - {0xcf, 0, 0, 1, f(Yes, true, "Ï")}, - {0xd0, 0, 0, 0, f(Yes, false, "")}, - {0xd1, 0, 0, 1, f(Yes, false, "Ñ")}, - {0xd2, 0, 0, 1, f(Yes, false, "Ò")}, - {0xd3, 0, 0, 1, f(Yes, false, "Ó")}, - {0xd4, 0, 0, 1, f(Yes, true, "Ô")}, - {0xd5, 0, 0, 1, f(Yes, true, "Õ")}, - {0xd6, 0, 0, 1, f(Yes, true, "Ö")}, - {0xd7, 0, 0, 0, f(Yes, false, "")}, - {0xd8, 0, 0, 0, f(Yes, true, "")}, - {0xd9, 0, 0, 1, f(Yes, false, "Ù")}, - {0xda, 0, 0, 1, f(Yes, false, "Ú")}, - {0xdb, 0, 0, 1, f(Yes, false, "Û")}, - {0xdc, 0, 0, 1, f(Yes, true, "Ü")}, - {0xdd, 0, 0, 1, f(Yes, false, "Ý")}, - {0xde, 0, 0, 0, f(Yes, false, "")}, - {0xe0, 0, 0, 1, f(Yes, false, "à")}, - {0xe1, 0, 0, 1, f(Yes, false, "á")}, - {0xe2, 0, 0, 1, f(Yes, true, "â")}, - {0xe3, 0, 0, 1, f(Yes, false, "ã")}, - {0xe4, 0, 0, 1, f(Yes, true, "ä")}, - {0xe5, 0, 0, 1, f(Yes, true, "å")}, - {0xe6, 0, 0, 0, f(Yes, true, "")}, - {0xe7, 0, 0, 1, f(Yes, true, "ç")}, - {0xe8, 0, 0, 1, f(Yes, false, "è")}, - {0xe9, 0, 0, 1, f(Yes, false, "é")}, - {0xea, 0, 0, 1, f(Yes, true, "ê")}, - {0xeb, 0, 0, 1, f(Yes, false, "ë")}, - {0xec, 0, 0, 1, f(Yes, false, "ì")}, - {0xed, 0, 0, 1, f(Yes, false, "í")}, - {0xee, 0, 0, 1, f(Yes, false, "î")}, - {0xef, 0, 0, 1, f(Yes, true, "ï")}, - {0xf0, 0, 0, 0, f(Yes, false, "")}, - {0xf1, 0, 0, 1, f(Yes, false, "ñ")}, - {0xf2, 0, 0, 1, f(Yes, false, "ò")}, - {0xf3, 0, 0, 1, f(Yes, false, "ó")}, - {0xf4, 0, 0, 1, f(Yes, true, "ô")}, - {0xf5, 0, 0, 1, f(Yes, true, "õ")}, - {0xf6, 0, 0, 1, f(Yes, true, "ö")}, - {0xf7, 0, 0, 0, f(Yes, false, "")}, - {0xf8, 0, 0, 0, f(Yes, true, "")}, - {0xf9, 0, 0, 1, f(Yes, false, "ù")}, - {0xfa, 0, 0, 1, f(Yes, false, "ú")}, - {0xfb, 0, 0, 1, f(Yes, false, "û")}, - {0xfc, 0, 0, 1, f(Yes, true, "ü")}, - {0xfd, 0, 0, 1, f(Yes, false, "ý")}, - {0xfe, 0, 0, 0, f(Yes, false, "")}, - {0xff, 0, 0, 1, f(Yes, false, "ÿ")}, - {0x100, 0, 0, 1, f(Yes, false, "Ā")}, - {0x101, 0, 0, 1, f(Yes, false, "ā")}, - {0x102, 0, 0, 1, f(Yes, true, "Ă")}, - {0x103, 0, 0, 1, f(Yes, true, "ă")}, - {0x104, 0, 0, 1, f(Yes, false, "Ą")}, - {0x105, 0, 0, 1, f(Yes, false, "ą")}, - {0x106, 0, 0, 1, f(Yes, false, "Ć")}, - {0x107, 0, 0, 1, f(Yes, false, "ć")}, - {0x108, 0, 0, 1, f(Yes, false, "Ĉ")}, - {0x109, 0, 0, 1, f(Yes, false, "ĉ")}, - {0x10a, 0, 0, 1, f(Yes, false, "Ċ")}, - {0x10b, 0, 0, 1, f(Yes, false, "ċ")}, - {0x10c, 0, 0, 1, f(Yes, false, "Č")}, - {0x10d, 0, 0, 1, f(Yes, false, "č")}, - {0x10e, 0, 0, 1, f(Yes, false, "Ď")}, - {0x10f, 0, 0, 1, f(Yes, false, "ď")}, - {0x110, 0, 0, 0, f(Yes, false, "")}, - {0x112, 0, 0, 1, f(Yes, true, "Ē")}, - {0x113, 0, 0, 1, f(Yes, true, "ē")}, - {0x114, 0, 0, 1, f(Yes, false, "Ĕ")}, - {0x115, 0, 0, 1, f(Yes, false, "ĕ")}, - {0x116, 0, 0, 1, f(Yes, false, "Ė")}, - {0x117, 0, 0, 1, f(Yes, false, "ė")}, - {0x118, 0, 0, 1, f(Yes, false, "Ę")}, - {0x119, 0, 0, 1, f(Yes, false, "ę")}, - {0x11a, 0, 0, 1, f(Yes, false, "Ě")}, - {0x11b, 0, 0, 1, f(Yes, false, "ě")}, - {0x11c, 0, 0, 1, f(Yes, false, "Ĝ")}, - {0x11d, 0, 0, 1, f(Yes, false, "ĝ")}, - {0x11e, 0, 0, 1, f(Yes, false, "Ğ")}, - {0x11f, 0, 0, 1, f(Yes, false, "ğ")}, - {0x120, 0, 0, 1, f(Yes, false, "Ġ")}, - {0x121, 0, 0, 1, f(Yes, false, "ġ")}, - {0x122, 0, 0, 1, f(Yes, false, "Ģ")}, - {0x123, 0, 0, 1, f(Yes, false, "ģ")}, - {0x124, 0, 0, 1, f(Yes, false, "Ĥ")}, - {0x125, 0, 0, 1, f(Yes, false, "ĥ")}, - {0x126, 0, 0, 0, f(Yes, false, "")}, - {0x128, 0, 0, 1, f(Yes, false, "Ĩ")}, - {0x129, 0, 0, 1, f(Yes, false, "ĩ")}, - {0x12a, 0, 0, 1, f(Yes, false, "Ī")}, - {0x12b, 0, 0, 1, f(Yes, false, "ī")}, - {0x12c, 0, 0, 1, f(Yes, false, "Ĭ")}, - {0x12d, 0, 0, 1, f(Yes, false, "ĭ")}, - {0x12e, 0, 0, 1, f(Yes, false, "Į")}, - {0x12f, 0, 0, 1, f(Yes, false, "į")}, - {0x130, 0, 0, 1, f(Yes, false, "İ")}, - {0x131, 0, 0, 0, f(Yes, false, "")}, - {0x132, 0, 0, 0, g(Yes, No, false, false, "", "IJ")}, - {0x133, 0, 0, 0, g(Yes, No, false, false, "", "ij")}, - {0x134, 0, 0, 1, f(Yes, false, "Ĵ")}, - {0x135, 0, 0, 1, f(Yes, false, "ĵ")}, - {0x136, 0, 0, 1, f(Yes, false, "Ķ")}, - {0x137, 0, 0, 1, f(Yes, false, "ķ")}, - {0x138, 0, 0, 0, f(Yes, false, "")}, - {0x139, 0, 0, 1, f(Yes, false, "Ĺ")}, - {0x13a, 0, 0, 1, f(Yes, false, "ĺ")}, - {0x13b, 0, 0, 1, f(Yes, false, "Ļ")}, - {0x13c, 0, 0, 1, f(Yes, false, "ļ")}, - {0x13d, 0, 0, 1, f(Yes, false, "Ľ")}, - {0x13e, 0, 0, 1, f(Yes, false, "ľ")}, - {0x13f, 0, 0, 0, g(Yes, No, false, false, "", "L·")}, - {0x140, 0, 0, 0, g(Yes, No, false, false, "", "l·")}, - {0x141, 0, 0, 0, f(Yes, false, "")}, - {0x143, 0, 0, 1, f(Yes, false, "Ń")}, - {0x144, 0, 0, 1, f(Yes, false, "ń")}, - {0x145, 0, 0, 1, f(Yes, false, "Ņ")}, - {0x146, 0, 0, 1, f(Yes, false, "ņ")}, - {0x147, 0, 0, 1, f(Yes, false, "Ň")}, - {0x148, 0, 0, 1, f(Yes, false, "ň")}, - {0x149, 0, 0, 0, g(Yes, No, false, false, "", "ʼn")}, - {0x14a, 0, 0, 0, f(Yes, false, "")}, - {0x14c, 0, 0, 1, f(Yes, true, "Ō")}, - {0x14d, 0, 0, 1, f(Yes, true, "ō")}, - {0x14e, 0, 0, 1, f(Yes, false, "Ŏ")}, - {0x14f, 0, 0, 1, f(Yes, false, "ŏ")}, - {0x150, 0, 0, 1, f(Yes, false, "Ő")}, - {0x151, 0, 0, 1, f(Yes, false, "ő")}, - {0x152, 0, 0, 0, f(Yes, false, "")}, - {0x154, 0, 0, 1, f(Yes, false, "Ŕ")}, - {0x155, 0, 0, 1, f(Yes, false, "ŕ")}, - {0x156, 0, 0, 1, f(Yes, false, "Ŗ")}, - {0x157, 0, 0, 1, f(Yes, false, "ŗ")}, - {0x158, 0, 0, 1, f(Yes, false, "Ř")}, - {0x159, 0, 0, 1, f(Yes, false, "ř")}, - {0x15a, 0, 0, 1, f(Yes, true, "Ś")}, - {0x15b, 0, 0, 1, f(Yes, true, "ś")}, - {0x15c, 0, 0, 1, f(Yes, false, "Ŝ")}, - {0x15d, 0, 0, 1, f(Yes, false, "ŝ")}, - {0x15e, 0, 0, 1, f(Yes, false, "Ş")}, - {0x15f, 0, 0, 1, f(Yes, false, "ş")}, - {0x160, 0, 0, 1, f(Yes, true, "Š")}, - {0x161, 0, 0, 1, f(Yes, true, "š")}, - {0x162, 0, 0, 1, f(Yes, false, "Ţ")}, - {0x163, 0, 0, 1, f(Yes, false, "ţ")}, - {0x164, 0, 0, 1, f(Yes, false, "Ť")}, - {0x165, 0, 0, 1, f(Yes, false, "ť")}, - {0x166, 0, 0, 0, f(Yes, false, "")}, - {0x168, 0, 0, 1, f(Yes, true, "Ũ")}, - {0x169, 0, 0, 1, f(Yes, true, "ũ")}, - {0x16a, 0, 0, 1, f(Yes, true, "Ū")}, - {0x16b, 0, 0, 1, f(Yes, true, "ū")}, - {0x16c, 0, 0, 1, f(Yes, false, "Ŭ")}, - {0x16d, 0, 0, 1, f(Yes, false, "ŭ")}, - {0x16e, 0, 0, 1, f(Yes, false, "Ů")}, - {0x16f, 0, 0, 1, f(Yes, false, "ů")}, - {0x170, 0, 0, 1, f(Yes, false, "Ű")}, - {0x171, 0, 0, 1, f(Yes, false, "ű")}, - {0x172, 0, 0, 1, f(Yes, false, "Ų")}, - {0x173, 0, 0, 1, f(Yes, false, "ų")}, - {0x174, 0, 0, 1, f(Yes, false, "Ŵ")}, - {0x175, 0, 0, 1, f(Yes, false, "ŵ")}, - {0x176, 0, 0, 1, f(Yes, false, "Ŷ")}, - {0x177, 0, 0, 1, f(Yes, false, "ŷ")}, - {0x178, 0, 0, 1, f(Yes, false, "Ÿ")}, - {0x179, 0, 0, 1, f(Yes, false, "Ź")}, - {0x17a, 0, 0, 1, f(Yes, false, "ź")}, - {0x17b, 0, 0, 1, f(Yes, false, "Ż")}, - {0x17c, 0, 0, 1, f(Yes, false, "ż")}, - {0x17d, 0, 0, 1, f(Yes, false, "Ž")}, - {0x17e, 0, 0, 1, f(Yes, false, "ž")}, - {0x17f, 0, 0, 0, g(Yes, No, true, false, "", "s")}, - {0x180, 0, 0, 0, f(Yes, false, "")}, - {0x1a0, 0, 0, 1, f(Yes, true, "Ơ")}, - {0x1a1, 0, 0, 1, f(Yes, true, "ơ")}, - {0x1a2, 0, 0, 0, f(Yes, false, "")}, - {0x1af, 0, 0, 1, f(Yes, true, "Ư")}, - {0x1b0, 0, 0, 1, f(Yes, true, "ư")}, - {0x1b1, 0, 0, 0, f(Yes, false, "")}, - {0x1b7, 0, 0, 0, f(Yes, true, "")}, - {0x1b8, 0, 0, 0, f(Yes, false, "")}, - {0x1c4, 0, 0, 1, g(Yes, No, false, false, "", "DŽ")}, - {0x1c5, 0, 0, 1, g(Yes, No, false, false, "", "Dž")}, - {0x1c6, 0, 0, 1, g(Yes, No, false, false, "", "dž")}, - {0x1c7, 0, 0, 0, g(Yes, No, false, false, "", "LJ")}, - {0x1c8, 0, 0, 0, g(Yes, No, false, false, "", "Lj")}, - {0x1c9, 0, 0, 0, g(Yes, No, false, false, "", "lj")}, - {0x1ca, 0, 0, 0, g(Yes, No, false, false, "", "NJ")}, - {0x1cb, 0, 0, 0, g(Yes, No, false, false, "", "Nj")}, - {0x1cc, 0, 0, 0, g(Yes, No, false, false, "", "nj")}, - {0x1cd, 0, 0, 1, f(Yes, false, "Ǎ")}, - {0x1ce, 0, 0, 1, f(Yes, false, "ǎ")}, - {0x1cf, 0, 0, 1, f(Yes, false, "Ǐ")}, - {0x1d0, 0, 0, 1, f(Yes, false, "ǐ")}, - {0x1d1, 0, 0, 1, f(Yes, false, "Ǒ")}, - {0x1d2, 0, 0, 1, f(Yes, false, "ǒ")}, - {0x1d3, 0, 0, 1, f(Yes, false, "Ǔ")}, - {0x1d4, 0, 0, 1, f(Yes, false, "ǔ")}, - {0x1d5, 0, 0, 2, f(Yes, false, "Ǖ")}, - {0x1d6, 0, 0, 2, f(Yes, false, "ǖ")}, - {0x1d7, 0, 0, 2, f(Yes, false, "Ǘ")}, - {0x1d8, 0, 0, 2, f(Yes, false, "ǘ")}, - {0x1d9, 0, 0, 2, f(Yes, false, "Ǚ")}, - {0x1da, 0, 0, 2, f(Yes, false, "ǚ")}, - {0x1db, 0, 0, 2, f(Yes, false, "Ǜ")}, - {0x1dc, 0, 0, 2, f(Yes, false, "ǜ")}, - {0x1dd, 0, 0, 0, f(Yes, false, "")}, - {0x1de, 0, 0, 2, f(Yes, false, "Ǟ")}, - {0x1df, 0, 0, 2, f(Yes, false, "ǟ")}, - {0x1e0, 0, 0, 2, f(Yes, false, "Ǡ")}, - {0x1e1, 0, 0, 2, f(Yes, false, "ǡ")}, - {0x1e2, 0, 0, 1, f(Yes, false, "Ǣ")}, - {0x1e3, 0, 0, 1, f(Yes, false, "ǣ")}, - {0x1e4, 0, 0, 0, f(Yes, false, "")}, - {0x1e6, 0, 0, 1, f(Yes, false, "Ǧ")}, - {0x1e7, 0, 0, 1, f(Yes, false, "ǧ")}, - {0x1e8, 0, 0, 1, f(Yes, false, "Ǩ")}, - {0x1e9, 0, 0, 1, f(Yes, false, "ǩ")}, - {0x1ea, 0, 0, 1, f(Yes, true, "Ǫ")}, - {0x1eb, 0, 0, 1, f(Yes, true, "ǫ")}, - {0x1ec, 0, 0, 2, f(Yes, false, "Ǭ")}, - {0x1ed, 0, 0, 2, f(Yes, false, "ǭ")}, - {0x1ee, 0, 0, 1, f(Yes, false, "Ǯ")}, - {0x1ef, 0, 0, 1, f(Yes, false, "ǯ")}, - {0x1f0, 0, 0, 1, f(Yes, false, "ǰ")}, - {0x1f1, 0, 0, 0, g(Yes, No, false, false, "", "DZ")}, - {0x1f2, 0, 0, 0, g(Yes, No, false, false, "", "Dz")}, - {0x1f3, 0, 0, 0, g(Yes, No, false, false, "", "dz")}, - {0x1f4, 0, 0, 1, f(Yes, false, "Ǵ")}, - {0x1f5, 0, 0, 1, f(Yes, false, "ǵ")}, - {0x1f6, 0, 0, 0, f(Yes, false, "")}, - {0x1f8, 0, 0, 1, f(Yes, false, "Ǹ")}, - {0x1f9, 0, 0, 1, f(Yes, false, "ǹ")}, - {0x1fa, 0, 0, 2, f(Yes, false, "Ǻ")}, - {0x1fb, 0, 0, 2, f(Yes, false, "ǻ")}, - {0x1fc, 0, 0, 1, f(Yes, false, "Ǽ")}, - {0x1fd, 0, 0, 1, f(Yes, false, "ǽ")}, - {0x1fe, 0, 0, 1, f(Yes, false, "Ǿ")}, - {0x1ff, 0, 0, 1, f(Yes, false, "ǿ")}, - {0x200, 0, 0, 1, f(Yes, false, "Ȁ")}, - {0x201, 0, 0, 1, f(Yes, false, "ȁ")}, - {0x202, 0, 0, 1, f(Yes, false, "Ȃ")}, - {0x203, 0, 0, 1, f(Yes, false, "ȃ")}, - {0x204, 0, 0, 1, f(Yes, false, "Ȅ")}, - {0x205, 0, 0, 1, f(Yes, false, "ȅ")}, - {0x206, 0, 0, 1, f(Yes, false, "Ȇ")}, - {0x207, 0, 0, 1, f(Yes, false, "ȇ")}, - {0x208, 0, 0, 1, f(Yes, false, "Ȉ")}, - {0x209, 0, 0, 1, f(Yes, false, "ȉ")}, - {0x20a, 0, 0, 1, f(Yes, false, "Ȋ")}, - {0x20b, 0, 0, 1, f(Yes, false, "ȋ")}, - {0x20c, 0, 0, 1, f(Yes, false, "Ȍ")}, - {0x20d, 0, 0, 1, f(Yes, false, "ȍ")}, - {0x20e, 0, 0, 1, f(Yes, false, "Ȏ")}, - {0x20f, 0, 0, 1, f(Yes, false, "ȏ")}, - {0x210, 0, 0, 1, f(Yes, false, "Ȑ")}, - {0x211, 0, 0, 1, f(Yes, false, "ȑ")}, - {0x212, 0, 0, 1, f(Yes, false, "Ȓ")}, - {0x213, 0, 0, 1, f(Yes, false, "ȓ")}, - {0x214, 0, 0, 1, f(Yes, false, "Ȕ")}, - {0x215, 0, 0, 1, f(Yes, false, "ȕ")}, - {0x216, 0, 0, 1, f(Yes, false, "Ȗ")}, - {0x217, 0, 0, 1, f(Yes, false, "ȗ")}, - {0x218, 0, 0, 1, f(Yes, false, "Ș")}, - {0x219, 0, 0, 1, f(Yes, false, "ș")}, - {0x21a, 0, 0, 1, f(Yes, false, "Ț")}, - {0x21b, 0, 0, 1, f(Yes, false, "ț")}, - {0x21c, 0, 0, 0, f(Yes, false, "")}, - {0x21e, 0, 0, 1, f(Yes, false, "Ȟ")}, - {0x21f, 0, 0, 1, f(Yes, false, "ȟ")}, - {0x220, 0, 0, 0, f(Yes, false, "")}, - {0x226, 0, 0, 1, f(Yes, true, "Ȧ")}, - {0x227, 0, 0, 1, f(Yes, true, "ȧ")}, - {0x228, 0, 0, 1, f(Yes, true, "Ȩ")}, - {0x229, 0, 0, 1, f(Yes, true, "ȩ")}, - {0x22a, 0, 0, 2, f(Yes, false, "Ȫ")}, - {0x22b, 0, 0, 2, f(Yes, false, "ȫ")}, - {0x22c, 0, 0, 2, f(Yes, false, "Ȭ")}, - {0x22d, 0, 0, 2, f(Yes, false, "ȭ")}, - {0x22e, 0, 0, 1, f(Yes, true, "Ȯ")}, - {0x22f, 0, 0, 1, f(Yes, true, "ȯ")}, - {0x230, 0, 0, 2, f(Yes, false, "Ȱ")}, - {0x231, 0, 0, 2, f(Yes, false, "ȱ")}, - {0x232, 0, 0, 1, f(Yes, false, "Ȳ")}, - {0x233, 0, 0, 1, f(Yes, false, "ȳ")}, - {0x234, 0, 0, 0, f(Yes, false, "")}, - {0x292, 0, 0, 0, f(Yes, true, "")}, - {0x293, 0, 0, 0, f(Yes, false, "")}, - {0x2b0, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x2b1, 0, 0, 0, g(Yes, No, false, false, "", "ɦ")}, - {0x2b2, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x2b3, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x2b4, 0, 0, 0, g(Yes, No, false, false, "", "ɹ")}, - {0x2b5, 0, 0, 0, g(Yes, No, false, false, "", "ɻ")}, - {0x2b6, 0, 0, 0, g(Yes, No, false, false, "", "ʁ")}, - {0x2b7, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x2b8, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x2b9, 0, 0, 0, f(Yes, false, "")}, - {0x2d8, 0, 0, 1, g(Yes, No, false, false, "", " ̆")}, - {0x2d9, 0, 0, 1, g(Yes, No, false, false, "", " ̇")}, - {0x2da, 0, 0, 1, g(Yes, No, false, false, "", " ̊")}, - {0x2db, 0, 0, 1, g(Yes, No, false, false, "", " ̨")}, - {0x2dc, 0, 0, 1, g(Yes, No, false, false, "", " ̃")}, - {0x2dd, 0, 0, 1, g(Yes, No, false, false, "", " ̋")}, - {0x2de, 0, 0, 0, f(Yes, false, "")}, - {0x2e0, 0, 0, 0, g(Yes, No, false, false, "", "ɣ")}, - {0x2e1, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x2e2, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x2e3, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x2e4, 0, 0, 0, g(Yes, No, false, false, "", "ʕ")}, - {0x2e5, 0, 0, 0, f(Yes, false, "")}, - {0x300, 230, 1, 1, f(Maybe, false, "")}, - {0x305, 230, 1, 1, f(Yes, false, "")}, - {0x306, 230, 1, 1, f(Maybe, false, "")}, - {0x30d, 230, 1, 1, f(Yes, false, "")}, - {0x30f, 230, 1, 1, f(Maybe, false, "")}, - {0x310, 230, 1, 1, f(Yes, false, "")}, - {0x311, 230, 1, 1, f(Maybe, false, "")}, - {0x312, 230, 1, 1, f(Yes, false, "")}, - {0x313, 230, 1, 1, f(Maybe, false, "")}, - {0x315, 232, 1, 1, f(Yes, false, "")}, - {0x316, 220, 1, 1, f(Yes, false, "")}, - {0x31a, 232, 1, 1, f(Yes, false, "")}, - {0x31b, 216, 1, 1, f(Maybe, false, "")}, - {0x31c, 220, 1, 1, f(Yes, false, "")}, - {0x321, 202, 1, 1, f(Yes, false, "")}, - {0x323, 220, 1, 1, f(Maybe, false, "")}, - {0x327, 202, 1, 1, f(Maybe, false, "")}, - {0x329, 220, 1, 1, f(Yes, false, "")}, - {0x32d, 220, 1, 1, f(Maybe, false, "")}, - {0x32f, 220, 1, 1, f(Yes, false, "")}, - {0x330, 220, 1, 1, f(Maybe, false, "")}, - {0x332, 220, 1, 1, f(Yes, false, "")}, - {0x334, 1, 1, 1, f(Yes, false, "")}, - {0x338, 1, 1, 1, f(Maybe, false, "")}, - {0x339, 220, 1, 1, f(Yes, false, "")}, - {0x33d, 230, 1, 1, f(Yes, false, "")}, - {0x340, 230, 1, 1, f(No, false, "̀")}, - {0x341, 230, 1, 1, f(No, false, "́")}, - {0x342, 230, 1, 1, f(Maybe, false, "")}, - {0x343, 230, 1, 1, f(No, false, "̓")}, - {0x344, 230, 2, 2, f(No, false, "̈́")}, - {0x345, 240, 1, 1, f(Maybe, false, "")}, - {0x346, 230, 1, 1, f(Yes, false, "")}, - {0x347, 220, 1, 1, f(Yes, false, "")}, - {0x34a, 230, 1, 1, f(Yes, false, "")}, - {0x34d, 220, 1, 1, f(Yes, false, "")}, - {0x34f, 0, 0, 0, f(Yes, false, "")}, - {0x350, 230, 1, 1, f(Yes, false, "")}, - {0x353, 220, 1, 1, f(Yes, false, "")}, - {0x357, 230, 1, 1, f(Yes, false, "")}, - {0x358, 232, 1, 1, f(Yes, false, "")}, - {0x359, 220, 1, 1, f(Yes, false, "")}, - {0x35b, 230, 1, 1, f(Yes, false, "")}, - {0x35c, 233, 1, 1, f(Yes, false, "")}, - {0x35d, 234, 1, 1, f(Yes, false, "")}, - {0x35f, 233, 1, 1, f(Yes, false, "")}, - {0x360, 234, 1, 1, f(Yes, false, "")}, - {0x362, 233, 1, 1, f(Yes, false, "")}, - {0x363, 230, 1, 1, f(Yes, false, "")}, - {0x370, 0, 0, 0, f(Yes, false, "")}, - {0x374, 0, 0, 0, f(No, false, "ʹ")}, - {0x375, 0, 0, 0, f(Yes, false, "")}, - {0x37a, 0, 0, 1, g(Yes, No, false, false, "", " ͅ")}, - {0x37b, 0, 0, 0, f(Yes, false, "")}, - {0x37e, 0, 0, 0, f(No, false, ";")}, - {0x37f, 0, 0, 0, f(Yes, false, "")}, - {0x384, 0, 0, 1, g(Yes, No, false, false, "", " ́")}, - {0x385, 0, 0, 2, g(Yes, No, false, false, "΅", " ̈́")}, - {0x386, 0, 0, 1, f(Yes, false, "Ά")}, - {0x387, 0, 0, 0, f(No, false, "·")}, - {0x388, 0, 0, 1, f(Yes, false, "Έ")}, - {0x389, 0, 0, 1, f(Yes, false, "Ή")}, - {0x38a, 0, 0, 1, f(Yes, false, "Ί")}, - {0x38b, 0, 0, 0, f(Yes, false, "")}, - {0x38c, 0, 0, 1, f(Yes, false, "Ό")}, - {0x38d, 0, 0, 0, f(Yes, false, "")}, - {0x38e, 0, 0, 1, f(Yes, false, "Ύ")}, - {0x38f, 0, 0, 1, f(Yes, false, "Ώ")}, - {0x390, 0, 0, 2, f(Yes, false, "ΐ")}, - {0x391, 0, 0, 0, f(Yes, true, "")}, - {0x392, 0, 0, 0, f(Yes, false, "")}, - {0x395, 0, 0, 0, f(Yes, true, "")}, - {0x396, 0, 0, 0, f(Yes, false, "")}, - {0x397, 0, 0, 0, f(Yes, true, "")}, - {0x398, 0, 0, 0, f(Yes, false, "")}, - {0x399, 0, 0, 0, f(Yes, true, "")}, - {0x39a, 0, 0, 0, f(Yes, false, "")}, - {0x39f, 0, 0, 0, f(Yes, true, "")}, - {0x3a0, 0, 0, 0, f(Yes, false, "")}, - {0x3a1, 0, 0, 0, f(Yes, true, "")}, - {0x3a2, 0, 0, 0, f(Yes, false, "")}, - {0x3a5, 0, 0, 0, f(Yes, true, "")}, - {0x3a6, 0, 0, 0, f(Yes, false, "")}, - {0x3a9, 0, 0, 0, f(Yes, true, "")}, - {0x3aa, 0, 0, 1, f(Yes, false, "Ϊ")}, - {0x3ab, 0, 0, 1, f(Yes, false, "Ϋ")}, - {0x3ac, 0, 0, 1, f(Yes, true, "ά")}, - {0x3ad, 0, 0, 1, f(Yes, false, "έ")}, - {0x3ae, 0, 0, 1, f(Yes, true, "ή")}, - {0x3af, 0, 0, 1, f(Yes, false, "ί")}, - {0x3b0, 0, 0, 2, f(Yes, false, "ΰ")}, - {0x3b1, 0, 0, 0, f(Yes, true, "")}, - {0x3b2, 0, 0, 0, f(Yes, false, "")}, - {0x3b5, 0, 0, 0, f(Yes, true, "")}, - {0x3b6, 0, 0, 0, f(Yes, false, "")}, - {0x3b7, 0, 0, 0, f(Yes, true, "")}, - {0x3b8, 0, 0, 0, f(Yes, false, "")}, - {0x3b9, 0, 0, 0, f(Yes, true, "")}, - {0x3ba, 0, 0, 0, f(Yes, false, "")}, - {0x3bf, 0, 0, 0, f(Yes, true, "")}, - {0x3c0, 0, 0, 0, f(Yes, false, "")}, - {0x3c1, 0, 0, 0, f(Yes, true, "")}, - {0x3c2, 0, 0, 0, f(Yes, false, "")}, - {0x3c5, 0, 0, 0, f(Yes, true, "")}, - {0x3c6, 0, 0, 0, f(Yes, false, "")}, - {0x3c9, 0, 0, 0, f(Yes, true, "")}, - {0x3ca, 0, 0, 1, f(Yes, true, "ϊ")}, - {0x3cb, 0, 0, 1, f(Yes, true, "ϋ")}, - {0x3cc, 0, 0, 1, f(Yes, false, "ό")}, - {0x3cd, 0, 0, 1, f(Yes, false, "ύ")}, - {0x3ce, 0, 0, 1, f(Yes, true, "ώ")}, - {0x3cf, 0, 0, 0, f(Yes, false, "")}, - {0x3d0, 0, 0, 0, g(Yes, No, false, false, "", "β")}, - {0x3d1, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x3d2, 0, 0, 0, g(Yes, No, true, false, "", "Υ")}, - {0x3d3, 0, 0, 1, g(Yes, No, false, false, "ϓ", "Ύ")}, - {0x3d4, 0, 0, 1, g(Yes, No, false, false, "ϔ", "Ϋ")}, - {0x3d5, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x3d6, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x3d7, 0, 0, 0, f(Yes, false, "")}, - {0x3f0, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x3f1, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x3f2, 0, 0, 0, g(Yes, No, false, false, "", "ς")}, - {0x3f3, 0, 0, 0, f(Yes, false, "")}, - {0x3f4, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x3f5, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x3f6, 0, 0, 0, f(Yes, false, "")}, - {0x3f9, 0, 0, 0, g(Yes, No, false, false, "", "Σ")}, - {0x3fa, 0, 0, 0, f(Yes, false, "")}, - {0x400, 0, 0, 1, f(Yes, false, "Ѐ")}, - {0x401, 0, 0, 1, f(Yes, false, "Ё")}, - {0x402, 0, 0, 0, f(Yes, false, "")}, - {0x403, 0, 0, 1, f(Yes, false, "Ѓ")}, - {0x404, 0, 0, 0, f(Yes, false, "")}, - {0x406, 0, 0, 0, f(Yes, true, "")}, - {0x407, 0, 0, 1, f(Yes, false, "Ї")}, - {0x408, 0, 0, 0, f(Yes, false, "")}, - {0x40c, 0, 0, 1, f(Yes, false, "Ќ")}, - {0x40d, 0, 0, 1, f(Yes, false, "Ѝ")}, - {0x40e, 0, 0, 1, f(Yes, false, "Ў")}, - {0x40f, 0, 0, 0, f(Yes, false, "")}, - {0x410, 0, 0, 0, f(Yes, true, "")}, - {0x411, 0, 0, 0, f(Yes, false, "")}, - {0x413, 0, 0, 0, f(Yes, true, "")}, - {0x414, 0, 0, 0, f(Yes, false, "")}, - {0x415, 0, 0, 0, f(Yes, true, "")}, - {0x419, 0, 0, 1, f(Yes, false, "Й")}, - {0x41a, 0, 0, 0, f(Yes, true, "")}, - {0x41b, 0, 0, 0, f(Yes, false, "")}, - {0x41e, 0, 0, 0, f(Yes, true, "")}, - {0x41f, 0, 0, 0, f(Yes, false, "")}, - {0x423, 0, 0, 0, f(Yes, true, "")}, - {0x424, 0, 0, 0, f(Yes, false, "")}, - {0x427, 0, 0, 0, f(Yes, true, "")}, - {0x428, 0, 0, 0, f(Yes, false, "")}, - {0x42b, 0, 0, 0, f(Yes, true, "")}, - {0x42c, 0, 0, 0, f(Yes, false, "")}, - {0x42d, 0, 0, 0, f(Yes, true, "")}, - {0x42e, 0, 0, 0, f(Yes, false, "")}, - {0x430, 0, 0, 0, f(Yes, true, "")}, - {0x431, 0, 0, 0, f(Yes, false, "")}, - {0x433, 0, 0, 0, f(Yes, true, "")}, - {0x434, 0, 0, 0, f(Yes, false, "")}, - {0x435, 0, 0, 0, f(Yes, true, "")}, - {0x439, 0, 0, 1, f(Yes, false, "й")}, - {0x43a, 0, 0, 0, f(Yes, true, "")}, - {0x43b, 0, 0, 0, f(Yes, false, "")}, - {0x43e, 0, 0, 0, f(Yes, true, "")}, - {0x43f, 0, 0, 0, f(Yes, false, "")}, - {0x443, 0, 0, 0, f(Yes, true, "")}, - {0x444, 0, 0, 0, f(Yes, false, "")}, - {0x447, 0, 0, 0, f(Yes, true, "")}, - {0x448, 0, 0, 0, f(Yes, false, "")}, - {0x44b, 0, 0, 0, f(Yes, true, "")}, - {0x44c, 0, 0, 0, f(Yes, false, "")}, - {0x44d, 0, 0, 0, f(Yes, true, "")}, - {0x44e, 0, 0, 0, f(Yes, false, "")}, - {0x450, 0, 0, 1, f(Yes, false, "ѐ")}, - {0x451, 0, 0, 1, f(Yes, false, "ё")}, - {0x452, 0, 0, 0, f(Yes, false, "")}, - {0x453, 0, 0, 1, f(Yes, false, "ѓ")}, - {0x454, 0, 0, 0, f(Yes, false, "")}, - {0x456, 0, 0, 0, f(Yes, true, "")}, - {0x457, 0, 0, 1, f(Yes, false, "ї")}, - {0x458, 0, 0, 0, f(Yes, false, "")}, - {0x45c, 0, 0, 1, f(Yes, false, "ќ")}, - {0x45d, 0, 0, 1, f(Yes, false, "ѝ")}, - {0x45e, 0, 0, 1, f(Yes, false, "ў")}, - {0x45f, 0, 0, 0, f(Yes, false, "")}, - {0x474, 0, 0, 0, f(Yes, true, "")}, - {0x476, 0, 0, 1, f(Yes, false, "Ѷ")}, - {0x477, 0, 0, 1, f(Yes, false, "ѷ")}, - {0x478, 0, 0, 0, f(Yes, false, "")}, - {0x483, 230, 1, 1, f(Yes, false, "")}, - {0x488, 0, 0, 0, f(Yes, false, "")}, - {0x4c1, 0, 0, 1, f(Yes, false, "Ӂ")}, - {0x4c2, 0, 0, 1, f(Yes, false, "ӂ")}, - {0x4c3, 0, 0, 0, f(Yes, false, "")}, - {0x4d0, 0, 0, 1, f(Yes, false, "Ӑ")}, - {0x4d1, 0, 0, 1, f(Yes, false, "ӑ")}, - {0x4d2, 0, 0, 1, f(Yes, false, "Ӓ")}, - {0x4d3, 0, 0, 1, f(Yes, false, "ӓ")}, - {0x4d4, 0, 0, 0, f(Yes, false, "")}, - {0x4d6, 0, 0, 1, f(Yes, false, "Ӗ")}, - {0x4d7, 0, 0, 1, f(Yes, false, "ӗ")}, - {0x4d8, 0, 0, 0, f(Yes, true, "")}, - {0x4da, 0, 0, 1, f(Yes, false, "Ӛ")}, - {0x4db, 0, 0, 1, f(Yes, false, "ӛ")}, - {0x4dc, 0, 0, 1, f(Yes, false, "Ӝ")}, - {0x4dd, 0, 0, 1, f(Yes, false, "ӝ")}, - {0x4de, 0, 0, 1, f(Yes, false, "Ӟ")}, - {0x4df, 0, 0, 1, f(Yes, false, "ӟ")}, - {0x4e0, 0, 0, 0, f(Yes, false, "")}, - {0x4e2, 0, 0, 1, f(Yes, false, "Ӣ")}, - {0x4e3, 0, 0, 1, f(Yes, false, "ӣ")}, - {0x4e4, 0, 0, 1, f(Yes, false, "Ӥ")}, - {0x4e5, 0, 0, 1, f(Yes, false, "ӥ")}, - {0x4e6, 0, 0, 1, f(Yes, false, "Ӧ")}, - {0x4e7, 0, 0, 1, f(Yes, false, "ӧ")}, - {0x4e8, 0, 0, 0, f(Yes, true, "")}, - {0x4ea, 0, 0, 1, f(Yes, false, "Ӫ")}, - {0x4eb, 0, 0, 1, f(Yes, false, "ӫ")}, - {0x4ec, 0, 0, 1, f(Yes, false, "Ӭ")}, - {0x4ed, 0, 0, 1, f(Yes, false, "ӭ")}, - {0x4ee, 0, 0, 1, f(Yes, false, "Ӯ")}, - {0x4ef, 0, 0, 1, f(Yes, false, "ӯ")}, - {0x4f0, 0, 0, 1, f(Yes, false, "Ӱ")}, - {0x4f1, 0, 0, 1, f(Yes, false, "ӱ")}, - {0x4f2, 0, 0, 1, f(Yes, false, "Ӳ")}, - {0x4f3, 0, 0, 1, f(Yes, false, "ӳ")}, - {0x4f4, 0, 0, 1, f(Yes, false, "Ӵ")}, - {0x4f5, 0, 0, 1, f(Yes, false, "ӵ")}, - {0x4f6, 0, 0, 0, f(Yes, false, "")}, - {0x4f8, 0, 0, 1, f(Yes, false, "Ӹ")}, - {0x4f9, 0, 0, 1, f(Yes, false, "ӹ")}, - {0x4fa, 0, 0, 0, f(Yes, false, "")}, - {0x587, 0, 0, 0, g(Yes, No, false, false, "", "եւ")}, - {0x588, 0, 0, 0, f(Yes, false, "")}, - {0x591, 220, 1, 1, f(Yes, false, "")}, - {0x592, 230, 1, 1, f(Yes, false, "")}, - {0x596, 220, 1, 1, f(Yes, false, "")}, - {0x597, 230, 1, 1, f(Yes, false, "")}, - {0x59a, 222, 1, 1, f(Yes, false, "")}, - {0x59b, 220, 1, 1, f(Yes, false, "")}, - {0x59c, 230, 1, 1, f(Yes, false, "")}, - {0x5a2, 220, 1, 1, f(Yes, false, "")}, - {0x5a8, 230, 1, 1, f(Yes, false, "")}, - {0x5aa, 220, 1, 1, f(Yes, false, "")}, - {0x5ab, 230, 1, 1, f(Yes, false, "")}, - {0x5ad, 222, 1, 1, f(Yes, false, "")}, - {0x5ae, 228, 1, 1, f(Yes, false, "")}, - {0x5af, 230, 1, 1, f(Yes, false, "")}, - {0x5b0, 10, 1, 1, f(Yes, false, "")}, - {0x5b1, 11, 1, 1, f(Yes, false, "")}, - {0x5b2, 12, 1, 1, f(Yes, false, "")}, - {0x5b3, 13, 1, 1, f(Yes, false, "")}, - {0x5b4, 14, 1, 1, f(Yes, false, "")}, - {0x5b5, 15, 1, 1, f(Yes, false, "")}, - {0x5b6, 16, 1, 1, f(Yes, false, "")}, - {0x5b7, 17, 1, 1, f(Yes, false, "")}, - {0x5b8, 18, 1, 1, f(Yes, false, "")}, - {0x5b9, 19, 1, 1, f(Yes, false, "")}, - {0x5bb, 20, 1, 1, f(Yes, false, "")}, - {0x5bc, 21, 1, 1, f(Yes, false, "")}, - {0x5bd, 22, 1, 1, f(Yes, false, "")}, - {0x5be, 0, 0, 0, f(Yes, false, "")}, - {0x5bf, 23, 1, 1, f(Yes, false, "")}, - {0x5c0, 0, 0, 0, f(Yes, false, "")}, - {0x5c1, 24, 1, 1, f(Yes, false, "")}, - {0x5c2, 25, 1, 1, f(Yes, false, "")}, - {0x5c3, 0, 0, 0, f(Yes, false, "")}, - {0x5c4, 230, 1, 1, f(Yes, false, "")}, - {0x5c5, 220, 1, 1, f(Yes, false, "")}, - {0x5c6, 0, 0, 0, f(Yes, false, "")}, - {0x5c7, 18, 1, 1, f(Yes, false, "")}, - {0x5c8, 0, 0, 0, f(Yes, false, "")}, - {0x610, 230, 1, 1, f(Yes, false, "")}, - {0x618, 30, 1, 1, f(Yes, false, "")}, - {0x619, 31, 1, 1, f(Yes, false, "")}, - {0x61a, 32, 1, 1, f(Yes, false, "")}, - {0x61b, 0, 0, 0, f(Yes, false, "")}, - {0x622, 0, 0, 1, f(Yes, false, "آ")}, - {0x623, 0, 0, 1, f(Yes, false, "أ")}, - {0x624, 0, 0, 1, f(Yes, false, "ؤ")}, - {0x625, 0, 0, 1, f(Yes, false, "إ")}, - {0x626, 0, 0, 1, f(Yes, false, "ئ")}, - {0x627, 0, 0, 0, f(Yes, true, "")}, - {0x628, 0, 0, 0, f(Yes, false, "")}, - {0x648, 0, 0, 0, f(Yes, true, "")}, - {0x649, 0, 0, 0, f(Yes, false, "")}, - {0x64a, 0, 0, 0, f(Yes, true, "")}, - {0x64b, 27, 1, 1, f(Yes, false, "")}, - {0x64c, 28, 1, 1, f(Yes, false, "")}, - {0x64d, 29, 1, 1, f(Yes, false, "")}, - {0x64e, 30, 1, 1, f(Yes, false, "")}, - {0x64f, 31, 1, 1, f(Yes, false, "")}, - {0x650, 32, 1, 1, f(Yes, false, "")}, - {0x651, 33, 1, 1, f(Yes, false, "")}, - {0x652, 34, 1, 1, f(Yes, false, "")}, - {0x653, 230, 1, 1, f(Maybe, false, "")}, - {0x655, 220, 1, 1, f(Maybe, false, "")}, - {0x656, 220, 1, 1, f(Yes, false, "")}, - {0x657, 230, 1, 1, f(Yes, false, "")}, - {0x65c, 220, 1, 1, f(Yes, false, "")}, - {0x65d, 230, 1, 1, f(Yes, false, "")}, - {0x65f, 220, 1, 1, f(Yes, false, "")}, - {0x660, 0, 0, 0, f(Yes, false, "")}, - {0x670, 35, 1, 1, f(Yes, false, "")}, - {0x671, 0, 0, 0, f(Yes, false, "")}, - {0x675, 0, 0, 0, g(Yes, No, false, false, "", "اٴ")}, - {0x676, 0, 0, 0, g(Yes, No, false, false, "", "وٴ")}, - {0x677, 0, 0, 0, g(Yes, No, false, false, "", "ۇٴ")}, - {0x678, 0, 0, 0, g(Yes, No, false, false, "", "يٴ")}, - {0x679, 0, 0, 0, f(Yes, false, "")}, - {0x6c0, 0, 0, 1, f(Yes, false, "ۀ")}, - {0x6c1, 0, 0, 0, f(Yes, true, "")}, - {0x6c2, 0, 0, 1, f(Yes, false, "ۂ")}, - {0x6c3, 0, 0, 0, f(Yes, false, "")}, - {0x6d2, 0, 0, 0, f(Yes, true, "")}, - {0x6d3, 0, 0, 1, f(Yes, false, "ۓ")}, - {0x6d4, 0, 0, 0, f(Yes, false, "")}, - {0x6d5, 0, 0, 0, f(Yes, true, "")}, - {0x6d6, 230, 1, 1, f(Yes, false, "")}, - {0x6dd, 0, 0, 0, f(Yes, false, "")}, - {0x6df, 230, 1, 1, f(Yes, false, "")}, - {0x6e3, 220, 1, 1, f(Yes, false, "")}, - {0x6e4, 230, 1, 1, f(Yes, false, "")}, - {0x6e5, 0, 0, 0, f(Yes, false, "")}, - {0x6e7, 230, 1, 1, f(Yes, false, "")}, - {0x6e9, 0, 0, 0, f(Yes, false, "")}, - {0x6ea, 220, 1, 1, f(Yes, false, "")}, - {0x6eb, 230, 1, 1, f(Yes, false, "")}, - {0x6ed, 220, 1, 1, f(Yes, false, "")}, - {0x6ee, 0, 0, 0, f(Yes, false, "")}, - {0x711, 36, 1, 1, f(Yes, false, "")}, - {0x712, 0, 0, 0, f(Yes, false, "")}, - {0x730, 230, 1, 1, f(Yes, false, "")}, - {0x731, 220, 1, 1, f(Yes, false, "")}, - {0x732, 230, 1, 1, f(Yes, false, "")}, - {0x734, 220, 1, 1, f(Yes, false, "")}, - {0x735, 230, 1, 1, f(Yes, false, "")}, - {0x737, 220, 1, 1, f(Yes, false, "")}, - {0x73a, 230, 1, 1, f(Yes, false, "")}, - {0x73b, 220, 1, 1, f(Yes, false, "")}, - {0x73d, 230, 1, 1, f(Yes, false, "")}, - {0x73e, 220, 1, 1, f(Yes, false, "")}, - {0x73f, 230, 1, 1, f(Yes, false, "")}, - {0x742, 220, 1, 1, f(Yes, false, "")}, - {0x743, 230, 1, 1, f(Yes, false, "")}, - {0x744, 220, 1, 1, f(Yes, false, "")}, - {0x745, 230, 1, 1, f(Yes, false, "")}, - {0x746, 220, 1, 1, f(Yes, false, "")}, - {0x747, 230, 1, 1, f(Yes, false, "")}, - {0x748, 220, 1, 1, f(Yes, false, "")}, - {0x749, 230, 1, 1, f(Yes, false, "")}, - {0x74b, 0, 0, 0, f(Yes, false, "")}, - {0x7eb, 230, 1, 1, f(Yes, false, "")}, - {0x7f2, 220, 1, 1, f(Yes, false, "")}, - {0x7f3, 230, 1, 1, f(Yes, false, "")}, - {0x7f4, 0, 0, 0, f(Yes, false, "")}, - {0x816, 230, 1, 1, f(Yes, false, "")}, - {0x81a, 0, 0, 0, f(Yes, false, "")}, - {0x81b, 230, 1, 1, f(Yes, false, "")}, - {0x824, 0, 0, 0, f(Yes, false, "")}, - {0x825, 230, 1, 1, f(Yes, false, "")}, - {0x828, 0, 0, 0, f(Yes, false, "")}, - {0x829, 230, 1, 1, f(Yes, false, "")}, - {0x82e, 0, 0, 0, f(Yes, false, "")}, - {0x859, 220, 1, 1, f(Yes, false, "")}, - {0x85c, 0, 0, 0, f(Yes, false, "")}, - {0x8d4, 230, 1, 1, f(Yes, false, "")}, - {0x8e2, 0, 0, 0, f(Yes, false, "")}, - {0x8e3, 220, 1, 1, f(Yes, false, "")}, - {0x8e4, 230, 1, 1, f(Yes, false, "")}, - {0x8e6, 220, 1, 1, f(Yes, false, "")}, - {0x8e7, 230, 1, 1, f(Yes, false, "")}, - {0x8e9, 220, 1, 1, f(Yes, false, "")}, - {0x8ea, 230, 1, 1, f(Yes, false, "")}, - {0x8ed, 220, 1, 1, f(Yes, false, "")}, - {0x8f0, 27, 1, 1, f(Yes, false, "")}, - {0x8f1, 28, 1, 1, f(Yes, false, "")}, - {0x8f2, 29, 1, 1, f(Yes, false, "")}, - {0x8f3, 230, 1, 1, f(Yes, false, "")}, - {0x8f6, 220, 1, 1, f(Yes, false, "")}, - {0x8f7, 230, 1, 1, f(Yes, false, "")}, - {0x8f9, 220, 1, 1, f(Yes, false, "")}, - {0x8fb, 230, 1, 1, f(Yes, false, "")}, - {0x900, 0, 0, 0, f(Yes, false, "")}, - {0x928, 0, 0, 0, f(Yes, true, "")}, - {0x929, 0, 0, 1, f(Yes, false, "ऩ")}, - {0x92a, 0, 0, 0, f(Yes, false, "")}, - {0x930, 0, 0, 0, f(Yes, true, "")}, - {0x931, 0, 0, 1, f(Yes, false, "ऱ")}, - {0x932, 0, 0, 0, f(Yes, false, "")}, - {0x933, 0, 0, 0, f(Yes, true, "")}, - {0x934, 0, 0, 1, f(Yes, false, "ऴ")}, - {0x935, 0, 0, 0, f(Yes, false, "")}, - {0x93c, 7, 1, 1, f(Maybe, false, "")}, - {0x93d, 0, 0, 0, f(Yes, false, "")}, - {0x94d, 9, 1, 1, f(Yes, false, "")}, - {0x94e, 0, 0, 0, f(Yes, false, "")}, - {0x951, 230, 1, 1, f(Yes, false, "")}, - {0x952, 220, 1, 1, f(Yes, false, "")}, - {0x953, 230, 1, 1, f(Yes, false, "")}, - {0x955, 0, 0, 0, f(Yes, false, "")}, - {0x958, 0, 0, 1, f(No, false, "क़")}, - {0x959, 0, 0, 1, f(No, false, "ख़")}, - {0x95a, 0, 0, 1, f(No, false, "ग़")}, - {0x95b, 0, 0, 1, f(No, false, "ज़")}, - {0x95c, 0, 0, 1, f(No, false, "ड़")}, - {0x95d, 0, 0, 1, f(No, false, "ढ़")}, - {0x95e, 0, 0, 1, f(No, false, "फ़")}, - {0x95f, 0, 0, 1, f(No, false, "य़")}, - {0x960, 0, 0, 0, f(Yes, false, "")}, - {0x9bc, 7, 1, 1, f(Yes, false, "")}, - {0x9bd, 0, 0, 0, f(Yes, false, "")}, - {0x9be, 0, 1, 1, f(Maybe, false, "")}, - {0x9bf, 0, 0, 0, f(Yes, false, "")}, - {0x9c7, 0, 0, 0, f(Yes, true, "")}, - {0x9c8, 0, 0, 0, f(Yes, false, "")}, - {0x9cb, 0, 0, 1, f(Yes, false, "ো")}, - {0x9cc, 0, 0, 1, f(Yes, false, "ৌ")}, - {0x9cd, 9, 1, 1, f(Yes, false, "")}, - {0x9ce, 0, 0, 0, f(Yes, false, "")}, - {0x9d7, 0, 1, 1, f(Maybe, false, "")}, - {0x9d8, 0, 0, 0, f(Yes, false, "")}, - {0x9dc, 0, 0, 1, f(No, false, "ড়")}, - {0x9dd, 0, 0, 1, f(No, false, "ঢ়")}, - {0x9de, 0, 0, 0, f(Yes, false, "")}, - {0x9df, 0, 0, 1, f(No, false, "য়")}, - {0x9e0, 0, 0, 0, f(Yes, false, "")}, - {0xa33, 0, 0, 1, f(No, false, "ਲ਼")}, - {0xa34, 0, 0, 0, f(Yes, false, "")}, - {0xa36, 0, 0, 1, f(No, false, "ਸ਼")}, - {0xa37, 0, 0, 0, f(Yes, false, "")}, - {0xa3c, 7, 1, 1, f(Yes, false, "")}, - {0xa3d, 0, 0, 0, f(Yes, false, "")}, - {0xa4d, 9, 1, 1, f(Yes, false, "")}, - {0xa4e, 0, 0, 0, f(Yes, false, "")}, - {0xa59, 0, 0, 1, f(No, false, "ਖ਼")}, - {0xa5a, 0, 0, 1, f(No, false, "ਗ਼")}, - {0xa5b, 0, 0, 1, f(No, false, "ਜ਼")}, - {0xa5c, 0, 0, 0, f(Yes, false, "")}, - {0xa5e, 0, 0, 1, f(No, false, "ਫ਼")}, - {0xa5f, 0, 0, 0, f(Yes, false, "")}, - {0xabc, 7, 1, 1, f(Yes, false, "")}, - {0xabd, 0, 0, 0, f(Yes, false, "")}, - {0xacd, 9, 1, 1, f(Yes, false, "")}, - {0xace, 0, 0, 0, f(Yes, false, "")}, - {0xb3c, 7, 1, 1, f(Yes, false, "")}, - {0xb3d, 0, 0, 0, f(Yes, false, "")}, - {0xb3e, 0, 1, 1, f(Maybe, false, "")}, - {0xb3f, 0, 0, 0, f(Yes, false, "")}, - {0xb47, 0, 0, 0, f(Yes, true, "")}, - {0xb48, 0, 0, 1, f(Yes, false, "ୈ")}, - {0xb49, 0, 0, 0, f(Yes, false, "")}, - {0xb4b, 0, 0, 1, f(Yes, false, "ୋ")}, - {0xb4c, 0, 0, 1, f(Yes, false, "ୌ")}, - {0xb4d, 9, 1, 1, f(Yes, false, "")}, - {0xb4e, 0, 0, 0, f(Yes, false, "")}, - {0xb56, 0, 1, 1, f(Maybe, false, "")}, - {0xb58, 0, 0, 0, f(Yes, false, "")}, - {0xb5c, 0, 0, 1, f(No, false, "ଡ଼")}, - {0xb5d, 0, 0, 1, f(No, false, "ଢ଼")}, - {0xb5e, 0, 0, 0, f(Yes, false, "")}, - {0xb92, 0, 0, 0, f(Yes, true, "")}, - {0xb93, 0, 0, 0, f(Yes, false, "")}, - {0xb94, 0, 0, 1, f(Yes, false, "ஔ")}, - {0xb95, 0, 0, 0, f(Yes, false, "")}, - {0xbbe, 0, 1, 1, f(Maybe, false, "")}, - {0xbbf, 0, 0, 0, f(Yes, false, "")}, - {0xbc6, 0, 0, 0, f(Yes, true, "")}, - {0xbc8, 0, 0, 0, f(Yes, false, "")}, - {0xbca, 0, 0, 1, f(Yes, false, "ொ")}, - {0xbcb, 0, 0, 1, f(Yes, false, "ோ")}, - {0xbcc, 0, 0, 1, f(Yes, false, "ௌ")}, - {0xbcd, 9, 1, 1, f(Yes, false, "")}, - {0xbce, 0, 0, 0, f(Yes, false, "")}, - {0xbd7, 0, 1, 1, f(Maybe, false, "")}, - {0xbd8, 0, 0, 0, f(Yes, false, "")}, - {0xc46, 0, 0, 0, f(Yes, true, "")}, - {0xc47, 0, 0, 0, f(Yes, false, "")}, - {0xc48, 0, 0, 1, f(Yes, false, "ై")}, - {0xc49, 0, 0, 0, f(Yes, false, "")}, - {0xc4d, 9, 1, 1, f(Yes, false, "")}, - {0xc4e, 0, 0, 0, f(Yes, false, "")}, - {0xc55, 84, 1, 1, f(Yes, false, "")}, - {0xc56, 91, 1, 1, f(Maybe, false, "")}, - {0xc57, 0, 0, 0, f(Yes, false, "")}, - {0xcbc, 7, 1, 1, f(Yes, false, "")}, - {0xcbd, 0, 0, 0, f(Yes, false, "")}, - {0xcbf, 0, 0, 0, f(Yes, true, "")}, - {0xcc0, 0, 0, 1, f(Yes, false, "ೀ")}, - {0xcc1, 0, 0, 0, f(Yes, false, "")}, - {0xcc2, 0, 1, 1, f(Maybe, false, "")}, - {0xcc3, 0, 0, 0, f(Yes, false, "")}, - {0xcc6, 0, 0, 0, f(Yes, true, "")}, - {0xcc7, 0, 0, 1, f(Yes, false, "ೇ")}, - {0xcc8, 0, 0, 1, f(Yes, false, "ೈ")}, - {0xcc9, 0, 0, 0, f(Yes, false, "")}, - {0xcca, 0, 0, 1, f(Yes, true, "ೊ")}, - {0xccb, 0, 0, 2, f(Yes, false, "ೋ")}, - {0xccc, 0, 0, 0, f(Yes, false, "")}, - {0xccd, 9, 1, 1, f(Yes, false, "")}, - {0xcce, 0, 0, 0, f(Yes, false, "")}, - {0xcd5, 0, 1, 1, f(Maybe, false, "")}, - {0xcd7, 0, 0, 0, f(Yes, false, "")}, - {0xd3b, 9, 1, 1, f(Yes, false, "")}, - {0xd3d, 0, 0, 0, f(Yes, false, "")}, - {0xd3e, 0, 1, 1, f(Maybe, false, "")}, - {0xd3f, 0, 0, 0, f(Yes, false, "")}, - {0xd46, 0, 0, 0, f(Yes, true, "")}, - {0xd48, 0, 0, 0, f(Yes, false, "")}, - {0xd4a, 0, 0, 1, f(Yes, false, "ൊ")}, - {0xd4b, 0, 0, 1, f(Yes, false, "ോ")}, - {0xd4c, 0, 0, 1, f(Yes, false, "ൌ")}, - {0xd4d, 9, 1, 1, f(Yes, false, "")}, - {0xd4e, 0, 0, 0, f(Yes, false, "")}, - {0xd57, 0, 1, 1, f(Maybe, false, "")}, - {0xd58, 0, 0, 0, f(Yes, false, "")}, - {0xdca, 9, 1, 1, f(Maybe, false, "")}, - {0xdcb, 0, 0, 0, f(Yes, false, "")}, - {0xdcf, 0, 1, 1, f(Maybe, false, "")}, - {0xdd0, 0, 0, 0, f(Yes, false, "")}, - {0xdd9, 0, 0, 0, f(Yes, true, "")}, - {0xdda, 0, 0, 1, f(Yes, false, "ේ")}, - {0xddb, 0, 0, 0, f(Yes, false, "")}, - {0xddc, 0, 0, 1, f(Yes, true, "ො")}, - {0xddd, 0, 0, 2, f(Yes, false, "ෝ")}, - {0xdde, 0, 0, 1, f(Yes, false, "ෞ")}, - {0xddf, 0, 1, 1, f(Maybe, false, "")}, - {0xde0, 0, 0, 0, f(Yes, false, "")}, - {0xe33, 0, 0, 0, g(Yes, No, false, false, "", "ํา")}, - {0xe34, 0, 0, 0, f(Yes, false, "")}, - {0xe38, 103, 1, 1, f(Yes, false, "")}, - {0xe3a, 9, 1, 1, f(Yes, false, "")}, - {0xe3b, 0, 0, 0, f(Yes, false, "")}, - {0xe48, 107, 1, 1, f(Yes, false, "")}, - {0xe4c, 0, 0, 0, f(Yes, false, "")}, - {0xeb3, 0, 0, 0, g(Yes, No, false, false, "", "ໍາ")}, - {0xeb4, 0, 0, 0, f(Yes, false, "")}, - {0xeb8, 118, 1, 1, f(Yes, false, "")}, - {0xeba, 0, 0, 0, f(Yes, false, "")}, - {0xec8, 122, 1, 1, f(Yes, false, "")}, - {0xecc, 0, 0, 0, f(Yes, false, "")}, - {0xedc, 0, 0, 0, g(Yes, No, false, false, "", "ຫນ")}, - {0xedd, 0, 0, 0, g(Yes, No, false, false, "", "ຫມ")}, - {0xede, 0, 0, 0, f(Yes, false, "")}, - {0xf0c, 0, 0, 0, g(Yes, No, false, false, "", "་")}, - {0xf0d, 0, 0, 0, f(Yes, false, "")}, - {0xf18, 220, 1, 1, f(Yes, false, "")}, - {0xf1a, 0, 0, 0, f(Yes, false, "")}, - {0xf35, 220, 1, 1, f(Yes, false, "")}, - {0xf36, 0, 0, 0, f(Yes, false, "")}, - {0xf37, 220, 1, 1, f(Yes, false, "")}, - {0xf38, 0, 0, 0, f(Yes, false, "")}, - {0xf39, 216, 1, 1, f(Yes, false, "")}, - {0xf3a, 0, 0, 0, f(Yes, false, "")}, - {0xf43, 0, 0, 0, f(No, false, "གྷ")}, - {0xf44, 0, 0, 0, f(Yes, false, "")}, - {0xf4d, 0, 0, 0, f(No, false, "ཌྷ")}, - {0xf4e, 0, 0, 0, f(Yes, false, "")}, - {0xf52, 0, 0, 0, f(No, false, "དྷ")}, - {0xf53, 0, 0, 0, f(Yes, false, "")}, - {0xf57, 0, 0, 0, f(No, false, "བྷ")}, - {0xf58, 0, 0, 0, f(Yes, false, "")}, - {0xf5c, 0, 0, 0, f(No, false, "ཛྷ")}, - {0xf5d, 0, 0, 0, f(Yes, false, "")}, - {0xf69, 0, 0, 0, f(No, false, "ཀྵ")}, - {0xf6a, 0, 0, 0, f(Yes, false, "")}, - {0xf71, 129, 1, 1, f(Yes, false, "")}, - {0xf72, 130, 1, 1, f(Yes, false, "")}, - {0xf73, 0, 2, 2, f(No, false, "ཱི")}, - {0xf74, 132, 1, 1, f(Yes, false, "")}, - {0xf75, 0, 2, 2, f(No, false, "ཱུ")}, - {0xf76, 0, 0, 1, f(No, false, "ྲྀ")}, - {0xf77, 0, 0, 2, g(Yes, No, false, false, "", "ྲཱྀ")}, - {0xf78, 0, 0, 1, f(No, false, "ླྀ")}, - {0xf79, 0, 0, 2, g(Yes, No, false, false, "", "ླཱྀ")}, - {0xf7a, 130, 1, 1, f(Yes, false, "")}, - {0xf7e, 0, 0, 0, f(Yes, false, "")}, - {0xf80, 130, 1, 1, f(Yes, false, "")}, - {0xf81, 0, 2, 2, f(No, false, "ཱྀ")}, - {0xf82, 230, 1, 1, f(Yes, false, "")}, - {0xf84, 9, 1, 1, f(Yes, false, "")}, - {0xf85, 0, 0, 0, f(Yes, false, "")}, - {0xf86, 230, 1, 1, f(Yes, false, "")}, - {0xf88, 0, 0, 0, f(Yes, false, "")}, - {0xf93, 0, 0, 0, f(No, false, "ྒྷ")}, - {0xf94, 0, 0, 0, f(Yes, false, "")}, - {0xf9d, 0, 0, 0, f(No, false, "ྜྷ")}, - {0xf9e, 0, 0, 0, f(Yes, false, "")}, - {0xfa2, 0, 0, 0, f(No, false, "ྡྷ")}, - {0xfa3, 0, 0, 0, f(Yes, false, "")}, - {0xfa7, 0, 0, 0, f(No, false, "ྦྷ")}, - {0xfa8, 0, 0, 0, f(Yes, false, "")}, - {0xfac, 0, 0, 0, f(No, false, "ྫྷ")}, - {0xfad, 0, 0, 0, f(Yes, false, "")}, - {0xfb9, 0, 0, 0, f(No, false, "ྐྵ")}, - {0xfba, 0, 0, 0, f(Yes, false, "")}, - {0xfc6, 220, 1, 1, f(Yes, false, "")}, - {0xfc7, 0, 0, 0, f(Yes, false, "")}, - {0x1025, 0, 0, 0, f(Yes, true, "")}, - {0x1026, 0, 0, 1, f(Yes, false, "ဦ")}, - {0x1027, 0, 0, 0, f(Yes, false, "")}, - {0x102e, 0, 1, 1, f(Maybe, false, "")}, - {0x102f, 0, 0, 0, f(Yes, false, "")}, - {0x1037, 7, 1, 1, f(Yes, false, "")}, - {0x1038, 0, 0, 0, f(Yes, false, "")}, - {0x1039, 9, 1, 1, f(Yes, false, "")}, - {0x103b, 0, 0, 0, f(Yes, false, "")}, - {0x108d, 220, 1, 1, f(Yes, false, "")}, - {0x108e, 0, 0, 0, f(Yes, false, "")}, - {0x10fc, 0, 0, 0, g(Yes, No, false, false, "", "ნ")}, - {0x10fd, 0, 0, 0, f(Yes, false, "")}, - {0x1100, 0, 0, 0, f(Yes, true, "")}, - {0x1113, 0, 0, 0, f(Yes, false, "")}, - {0x1161, 0, 1, 1, f(Maybe, true, "")}, - {0x1176, 0, 0, 0, f(Yes, false, "")}, - {0x11a8, 0, 1, 1, f(Maybe, false, "")}, - {0x11c3, 0, 0, 0, f(Yes, false, "")}, - {0x135d, 230, 1, 1, f(Yes, false, "")}, - {0x1360, 0, 0, 0, f(Yes, false, "")}, - {0x1714, 9, 1, 1, f(Yes, false, "")}, - {0x1715, 0, 0, 0, f(Yes, false, "")}, - {0x1734, 9, 1, 1, f(Yes, false, "")}, - {0x1735, 0, 0, 0, f(Yes, false, "")}, - {0x17d2, 9, 1, 1, f(Yes, false, "")}, - {0x17d3, 0, 0, 0, f(Yes, false, "")}, - {0x17dd, 230, 1, 1, f(Yes, false, "")}, - {0x17de, 0, 0, 0, f(Yes, false, "")}, - {0x18a9, 228, 1, 1, f(Yes, false, "")}, - {0x18aa, 0, 0, 0, f(Yes, false, "")}, - {0x1939, 222, 1, 1, f(Yes, false, "")}, - {0x193a, 230, 1, 1, f(Yes, false, "")}, - {0x193b, 220, 1, 1, f(Yes, false, "")}, - {0x193c, 0, 0, 0, f(Yes, false, "")}, - {0x1a17, 230, 1, 1, f(Yes, false, "")}, - {0x1a18, 220, 1, 1, f(Yes, false, "")}, - {0x1a19, 0, 0, 0, f(Yes, false, "")}, - {0x1a60, 9, 1, 1, f(Yes, false, "")}, - {0x1a61, 0, 0, 0, f(Yes, false, "")}, - {0x1a75, 230, 1, 1, f(Yes, false, "")}, - {0x1a7d, 0, 0, 0, f(Yes, false, "")}, - {0x1a7f, 220, 1, 1, f(Yes, false, "")}, - {0x1a80, 0, 0, 0, f(Yes, false, "")}, - {0x1ab0, 230, 1, 1, f(Yes, false, "")}, - {0x1ab5, 220, 1, 1, f(Yes, false, "")}, - {0x1abb, 230, 1, 1, f(Yes, false, "")}, - {0x1abd, 220, 1, 1, f(Yes, false, "")}, - {0x1abe, 0, 0, 0, f(Yes, false, "")}, - {0x1b05, 0, 0, 0, f(Yes, true, "")}, - {0x1b06, 0, 0, 1, f(Yes, false, "ᬆ")}, - {0x1b07, 0, 0, 0, f(Yes, true, "")}, - {0x1b08, 0, 0, 1, f(Yes, false, "ᬈ")}, - {0x1b09, 0, 0, 0, f(Yes, true, "")}, - {0x1b0a, 0, 0, 1, f(Yes, false, "ᬊ")}, - {0x1b0b, 0, 0, 0, f(Yes, true, "")}, - {0x1b0c, 0, 0, 1, f(Yes, false, "ᬌ")}, - {0x1b0d, 0, 0, 0, f(Yes, true, "")}, - {0x1b0e, 0, 0, 1, f(Yes, false, "ᬎ")}, - {0x1b0f, 0, 0, 0, f(Yes, false, "")}, - {0x1b11, 0, 0, 0, f(Yes, true, "")}, - {0x1b12, 0, 0, 1, f(Yes, false, "ᬒ")}, - {0x1b13, 0, 0, 0, f(Yes, false, "")}, - {0x1b34, 7, 1, 1, f(Yes, false, "")}, - {0x1b35, 0, 1, 1, f(Maybe, false, "")}, - {0x1b36, 0, 0, 0, f(Yes, false, "")}, - {0x1b3a, 0, 0, 0, f(Yes, true, "")}, - {0x1b3b, 0, 0, 1, f(Yes, false, "ᬻ")}, - {0x1b3c, 0, 0, 0, f(Yes, true, "")}, - {0x1b3d, 0, 0, 1, f(Yes, false, "ᬽ")}, - {0x1b3e, 0, 0, 0, f(Yes, true, "")}, - {0x1b40, 0, 0, 1, f(Yes, false, "ᭀ")}, - {0x1b41, 0, 0, 1, f(Yes, false, "ᭁ")}, - {0x1b42, 0, 0, 0, f(Yes, true, "")}, - {0x1b43, 0, 0, 1, f(Yes, false, "ᭃ")}, - {0x1b44, 9, 1, 1, f(Yes, false, "")}, - {0x1b45, 0, 0, 0, f(Yes, false, "")}, - {0x1b6b, 230, 1, 1, f(Yes, false, "")}, - {0x1b6c, 220, 1, 1, f(Yes, false, "")}, - {0x1b6d, 230, 1, 1, f(Yes, false, "")}, - {0x1b74, 0, 0, 0, f(Yes, false, "")}, - {0x1baa, 9, 1, 1, f(Yes, false, "")}, - {0x1bac, 0, 0, 0, f(Yes, false, "")}, - {0x1be6, 7, 1, 1, f(Yes, false, "")}, - {0x1be7, 0, 0, 0, f(Yes, false, "")}, - {0x1bf2, 9, 1, 1, f(Yes, false, "")}, - {0x1bf4, 0, 0, 0, f(Yes, false, "")}, - {0x1c37, 7, 1, 1, f(Yes, false, "")}, - {0x1c38, 0, 0, 0, f(Yes, false, "")}, - {0x1cd0, 230, 1, 1, f(Yes, false, "")}, - {0x1cd3, 0, 0, 0, f(Yes, false, "")}, - {0x1cd4, 1, 1, 1, f(Yes, false, "")}, - {0x1cd5, 220, 1, 1, f(Yes, false, "")}, - {0x1cda, 230, 1, 1, f(Yes, false, "")}, - {0x1cdc, 220, 1, 1, f(Yes, false, "")}, - {0x1ce0, 230, 1, 1, f(Yes, false, "")}, - {0x1ce1, 0, 0, 0, f(Yes, false, "")}, - {0x1ce2, 1, 1, 1, f(Yes, false, "")}, - {0x1ce9, 0, 0, 0, f(Yes, false, "")}, - {0x1ced, 220, 1, 1, f(Yes, false, "")}, - {0x1cee, 0, 0, 0, f(Yes, false, "")}, - {0x1cf4, 230, 1, 1, f(Yes, false, "")}, - {0x1cf5, 0, 0, 0, f(Yes, false, "")}, - {0x1cf8, 230, 1, 1, f(Yes, false, "")}, - {0x1cfa, 0, 0, 0, f(Yes, false, "")}, - {0x1d2c, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d2d, 0, 0, 0, g(Yes, No, false, false, "", "Æ")}, - {0x1d2e, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d2f, 0, 0, 0, f(Yes, false, "")}, - {0x1d30, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d31, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d32, 0, 0, 0, g(Yes, No, false, false, "", "Ǝ")}, - {0x1d33, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d34, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d35, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d36, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d37, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d38, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d39, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d3a, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d3b, 0, 0, 0, f(Yes, false, "")}, - {0x1d3c, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d3d, 0, 0, 0, g(Yes, No, false, false, "", "Ȣ")}, - {0x1d3e, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d3f, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d40, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d41, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d42, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d43, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d44, 0, 0, 0, g(Yes, No, false, false, "", "ɐ")}, - {0x1d45, 0, 0, 0, g(Yes, No, false, false, "", "ɑ")}, - {0x1d46, 0, 0, 0, g(Yes, No, false, false, "", "ᴂ")}, - {0x1d47, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d48, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d49, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d4a, 0, 0, 0, g(Yes, No, false, false, "", "ə")}, - {0x1d4b, 0, 0, 0, g(Yes, No, false, false, "", "ɛ")}, - {0x1d4c, 0, 0, 0, g(Yes, No, false, false, "", "ɜ")}, - {0x1d4d, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d4e, 0, 0, 0, f(Yes, false, "")}, - {0x1d4f, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d50, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d51, 0, 0, 0, g(Yes, No, false, false, "", "ŋ")}, - {0x1d52, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d53, 0, 0, 0, g(Yes, No, false, false, "", "ɔ")}, - {0x1d54, 0, 0, 0, g(Yes, No, false, false, "", "ᴖ")}, - {0x1d55, 0, 0, 0, g(Yes, No, false, false, "", "ᴗ")}, - {0x1d56, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d57, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d58, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d59, 0, 0, 0, g(Yes, No, false, false, "", "ᴝ")}, - {0x1d5a, 0, 0, 0, g(Yes, No, false, false, "", "ɯ")}, - {0x1d5b, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d5c, 0, 0, 0, g(Yes, No, false, false, "", "ᴥ")}, - {0x1d5d, 0, 0, 0, g(Yes, No, false, false, "", "β")}, - {0x1d5e, 0, 0, 0, g(Yes, No, false, false, "", "γ")}, - {0x1d5f, 0, 0, 0, g(Yes, No, false, false, "", "δ")}, - {0x1d60, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d61, 0, 0, 0, g(Yes, No, false, false, "", "χ")}, - {0x1d62, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d63, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d64, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d65, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d66, 0, 0, 0, g(Yes, No, false, false, "", "β")}, - {0x1d67, 0, 0, 0, g(Yes, No, false, false, "", "γ")}, - {0x1d68, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d69, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d6a, 0, 0, 0, g(Yes, No, false, false, "", "χ")}, - {0x1d6b, 0, 0, 0, f(Yes, false, "")}, - {0x1d78, 0, 0, 0, g(Yes, No, false, false, "", "н")}, - {0x1d79, 0, 0, 0, f(Yes, false, "")}, - {0x1d9b, 0, 0, 0, g(Yes, No, false, false, "", "ɒ")}, - {0x1d9c, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d9d, 0, 0, 0, g(Yes, No, false, false, "", "ɕ")}, - {0x1d9e, 0, 0, 0, g(Yes, No, false, false, "", "ð")}, - {0x1d9f, 0, 0, 0, g(Yes, No, false, false, "", "ɜ")}, - {0x1da0, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1da1, 0, 0, 0, g(Yes, No, false, false, "", "ɟ")}, - {0x1da2, 0, 0, 0, g(Yes, No, false, false, "", "ɡ")}, - {0x1da3, 0, 0, 0, g(Yes, No, false, false, "", "ɥ")}, - {0x1da4, 0, 0, 0, g(Yes, No, false, false, "", "ɨ")}, - {0x1da5, 0, 0, 0, g(Yes, No, false, false, "", "ɩ")}, - {0x1da6, 0, 0, 0, g(Yes, No, false, false, "", "ɪ")}, - {0x1da7, 0, 0, 0, g(Yes, No, false, false, "", "ᵻ")}, - {0x1da8, 0, 0, 0, g(Yes, No, false, false, "", "ʝ")}, - {0x1da9, 0, 0, 0, g(Yes, No, false, false, "", "ɭ")}, - {0x1daa, 0, 0, 0, g(Yes, No, false, false, "", "ᶅ")}, - {0x1dab, 0, 0, 0, g(Yes, No, false, false, "", "ʟ")}, - {0x1dac, 0, 0, 0, g(Yes, No, false, false, "", "ɱ")}, - {0x1dad, 0, 0, 0, g(Yes, No, false, false, "", "ɰ")}, - {0x1dae, 0, 0, 0, g(Yes, No, false, false, "", "ɲ")}, - {0x1daf, 0, 0, 0, g(Yes, No, false, false, "", "ɳ")}, - {0x1db0, 0, 0, 0, g(Yes, No, false, false, "", "ɴ")}, - {0x1db1, 0, 0, 0, g(Yes, No, false, false, "", "ɵ")}, - {0x1db2, 0, 0, 0, g(Yes, No, false, false, "", "ɸ")}, - {0x1db3, 0, 0, 0, g(Yes, No, false, false, "", "ʂ")}, - {0x1db4, 0, 0, 0, g(Yes, No, false, false, "", "ʃ")}, - {0x1db5, 0, 0, 0, g(Yes, No, false, false, "", "ƫ")}, - {0x1db6, 0, 0, 0, g(Yes, No, false, false, "", "ʉ")}, - {0x1db7, 0, 0, 0, g(Yes, No, false, false, "", "ʊ")}, - {0x1db8, 0, 0, 0, g(Yes, No, false, false, "", "ᴜ")}, - {0x1db9, 0, 0, 0, g(Yes, No, false, false, "", "ʋ")}, - {0x1dba, 0, 0, 0, g(Yes, No, false, false, "", "ʌ")}, - {0x1dbb, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1dbc, 0, 0, 0, g(Yes, No, false, false, "", "ʐ")}, - {0x1dbd, 0, 0, 0, g(Yes, No, false, false, "", "ʑ")}, - {0x1dbe, 0, 0, 0, g(Yes, No, false, false, "", "ʒ")}, - {0x1dbf, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1dc0, 230, 1, 1, f(Yes, false, "")}, - {0x1dc2, 220, 1, 1, f(Yes, false, "")}, - {0x1dc3, 230, 1, 1, f(Yes, false, "")}, - {0x1dca, 220, 1, 1, f(Yes, false, "")}, - {0x1dcb, 230, 1, 1, f(Yes, false, "")}, - {0x1dcd, 234, 1, 1, f(Yes, false, "")}, - {0x1dce, 214, 1, 1, f(Yes, false, "")}, - {0x1dcf, 220, 1, 1, f(Yes, false, "")}, - {0x1dd0, 202, 1, 1, f(Yes, false, "")}, - {0x1dd1, 230, 1, 1, f(Yes, false, "")}, - {0x1df6, 232, 1, 1, f(Yes, false, "")}, - {0x1df7, 228, 1, 1, f(Yes, false, "")}, - {0x1df9, 220, 1, 1, f(Yes, false, "")}, - {0x1dfa, 0, 0, 0, f(Yes, false, "")}, - {0x1dfb, 230, 1, 1, f(Yes, false, "")}, - {0x1dfc, 233, 1, 1, f(Yes, false, "")}, - {0x1dfd, 220, 1, 1, f(Yes, false, "")}, - {0x1dfe, 230, 1, 1, f(Yes, false, "")}, - {0x1dff, 220, 1, 1, f(Yes, false, "")}, - {0x1e00, 0, 0, 1, f(Yes, false, "Ḁ")}, - {0x1e01, 0, 0, 1, f(Yes, false, "ḁ")}, - {0x1e02, 0, 0, 1, f(Yes, false, "Ḃ")}, - {0x1e03, 0, 0, 1, f(Yes, false, "ḃ")}, - {0x1e04, 0, 0, 1, f(Yes, false, "Ḅ")}, - {0x1e05, 0, 0, 1, f(Yes, false, "ḅ")}, - {0x1e06, 0, 0, 1, f(Yes, false, "Ḇ")}, - {0x1e07, 0, 0, 1, f(Yes, false, "ḇ")}, - {0x1e08, 0, 0, 2, f(Yes, false, "Ḉ")}, - {0x1e09, 0, 0, 2, f(Yes, false, "ḉ")}, - {0x1e0a, 0, 0, 1, f(Yes, false, "Ḋ")}, - {0x1e0b, 0, 0, 1, f(Yes, false, "ḋ")}, - {0x1e0c, 0, 0, 1, f(Yes, false, "Ḍ")}, - {0x1e0d, 0, 0, 1, f(Yes, false, "ḍ")}, - {0x1e0e, 0, 0, 1, f(Yes, false, "Ḏ")}, - {0x1e0f, 0, 0, 1, f(Yes, false, "ḏ")}, - {0x1e10, 0, 0, 1, f(Yes, false, "Ḑ")}, - {0x1e11, 0, 0, 1, f(Yes, false, "ḑ")}, - {0x1e12, 0, 0, 1, f(Yes, false, "Ḓ")}, - {0x1e13, 0, 0, 1, f(Yes, false, "ḓ")}, - {0x1e14, 0, 0, 2, f(Yes, false, "Ḕ")}, - {0x1e15, 0, 0, 2, f(Yes, false, "ḕ")}, - {0x1e16, 0, 0, 2, f(Yes, false, "Ḗ")}, - {0x1e17, 0, 0, 2, f(Yes, false, "ḗ")}, - {0x1e18, 0, 0, 1, f(Yes, false, "Ḙ")}, - {0x1e19, 0, 0, 1, f(Yes, false, "ḙ")}, - {0x1e1a, 0, 0, 1, f(Yes, false, "Ḛ")}, - {0x1e1b, 0, 0, 1, f(Yes, false, "ḛ")}, - {0x1e1c, 0, 0, 2, f(Yes, false, "Ḝ")}, - {0x1e1d, 0, 0, 2, f(Yes, false, "ḝ")}, - {0x1e1e, 0, 0, 1, f(Yes, false, "Ḟ")}, - {0x1e1f, 0, 0, 1, f(Yes, false, "ḟ")}, - {0x1e20, 0, 0, 1, f(Yes, false, "Ḡ")}, - {0x1e21, 0, 0, 1, f(Yes, false, "ḡ")}, - {0x1e22, 0, 0, 1, f(Yes, false, "Ḣ")}, - {0x1e23, 0, 0, 1, f(Yes, false, "ḣ")}, - {0x1e24, 0, 0, 1, f(Yes, false, "Ḥ")}, - {0x1e25, 0, 0, 1, f(Yes, false, "ḥ")}, - {0x1e26, 0, 0, 1, f(Yes, false, "Ḧ")}, - {0x1e27, 0, 0, 1, f(Yes, false, "ḧ")}, - {0x1e28, 0, 0, 1, f(Yes, false, "Ḩ")}, - {0x1e29, 0, 0, 1, f(Yes, false, "ḩ")}, - {0x1e2a, 0, 0, 1, f(Yes, false, "Ḫ")}, - {0x1e2b, 0, 0, 1, f(Yes, false, "ḫ")}, - {0x1e2c, 0, 0, 1, f(Yes, false, "Ḭ")}, - {0x1e2d, 0, 0, 1, f(Yes, false, "ḭ")}, - {0x1e2e, 0, 0, 2, f(Yes, false, "Ḯ")}, - {0x1e2f, 0, 0, 2, f(Yes, false, "ḯ")}, - {0x1e30, 0, 0, 1, f(Yes, false, "Ḱ")}, - {0x1e31, 0, 0, 1, f(Yes, false, "ḱ")}, - {0x1e32, 0, 0, 1, f(Yes, false, "Ḳ")}, - {0x1e33, 0, 0, 1, f(Yes, false, "ḳ")}, - {0x1e34, 0, 0, 1, f(Yes, false, "Ḵ")}, - {0x1e35, 0, 0, 1, f(Yes, false, "ḵ")}, - {0x1e36, 0, 0, 1, f(Yes, true, "Ḷ")}, - {0x1e37, 0, 0, 1, f(Yes, true, "ḷ")}, - {0x1e38, 0, 0, 2, f(Yes, false, "Ḹ")}, - {0x1e39, 0, 0, 2, f(Yes, false, "ḹ")}, - {0x1e3a, 0, 0, 1, f(Yes, false, "Ḻ")}, - {0x1e3b, 0, 0, 1, f(Yes, false, "ḻ")}, - {0x1e3c, 0, 0, 1, f(Yes, false, "Ḽ")}, - {0x1e3d, 0, 0, 1, f(Yes, false, "ḽ")}, - {0x1e3e, 0, 0, 1, f(Yes, false, "Ḿ")}, - {0x1e3f, 0, 0, 1, f(Yes, false, "ḿ")}, - {0x1e40, 0, 0, 1, f(Yes, false, "Ṁ")}, - {0x1e41, 0, 0, 1, f(Yes, false, "ṁ")}, - {0x1e42, 0, 0, 1, f(Yes, false, "Ṃ")}, - {0x1e43, 0, 0, 1, f(Yes, false, "ṃ")}, - {0x1e44, 0, 0, 1, f(Yes, false, "Ṅ")}, - {0x1e45, 0, 0, 1, f(Yes, false, "ṅ")}, - {0x1e46, 0, 0, 1, f(Yes, false, "Ṇ")}, - {0x1e47, 0, 0, 1, f(Yes, false, "ṇ")}, - {0x1e48, 0, 0, 1, f(Yes, false, "Ṉ")}, - {0x1e49, 0, 0, 1, f(Yes, false, "ṉ")}, - {0x1e4a, 0, 0, 1, f(Yes, false, "Ṋ")}, - {0x1e4b, 0, 0, 1, f(Yes, false, "ṋ")}, - {0x1e4c, 0, 0, 2, f(Yes, false, "Ṍ")}, - {0x1e4d, 0, 0, 2, f(Yes, false, "ṍ")}, - {0x1e4e, 0, 0, 2, f(Yes, false, "Ṏ")}, - {0x1e4f, 0, 0, 2, f(Yes, false, "ṏ")}, - {0x1e50, 0, 0, 2, f(Yes, false, "Ṑ")}, - {0x1e51, 0, 0, 2, f(Yes, false, "ṑ")}, - {0x1e52, 0, 0, 2, f(Yes, false, "Ṓ")}, - {0x1e53, 0, 0, 2, f(Yes, false, "ṓ")}, - {0x1e54, 0, 0, 1, f(Yes, false, "Ṕ")}, - {0x1e55, 0, 0, 1, f(Yes, false, "ṕ")}, - {0x1e56, 0, 0, 1, f(Yes, false, "Ṗ")}, - {0x1e57, 0, 0, 1, f(Yes, false, "ṗ")}, - {0x1e58, 0, 0, 1, f(Yes, false, "Ṙ")}, - {0x1e59, 0, 0, 1, f(Yes, false, "ṙ")}, - {0x1e5a, 0, 0, 1, f(Yes, true, "Ṛ")}, - {0x1e5b, 0, 0, 1, f(Yes, true, "ṛ")}, - {0x1e5c, 0, 0, 2, f(Yes, false, "Ṝ")}, - {0x1e5d, 0, 0, 2, f(Yes, false, "ṝ")}, - {0x1e5e, 0, 0, 1, f(Yes, false, "Ṟ")}, - {0x1e5f, 0, 0, 1, f(Yes, false, "ṟ")}, - {0x1e60, 0, 0, 1, f(Yes, false, "Ṡ")}, - {0x1e61, 0, 0, 1, f(Yes, false, "ṡ")}, - {0x1e62, 0, 0, 1, f(Yes, true, "Ṣ")}, - {0x1e63, 0, 0, 1, f(Yes, true, "ṣ")}, - {0x1e64, 0, 0, 2, f(Yes, false, "Ṥ")}, - {0x1e65, 0, 0, 2, f(Yes, false, "ṥ")}, - {0x1e66, 0, 0, 2, f(Yes, false, "Ṧ")}, - {0x1e67, 0, 0, 2, f(Yes, false, "ṧ")}, - {0x1e68, 0, 0, 2, f(Yes, false, "Ṩ")}, - {0x1e69, 0, 0, 2, f(Yes, false, "ṩ")}, - {0x1e6a, 0, 0, 1, f(Yes, false, "Ṫ")}, - {0x1e6b, 0, 0, 1, f(Yes, false, "ṫ")}, - {0x1e6c, 0, 0, 1, f(Yes, false, "Ṭ")}, - {0x1e6d, 0, 0, 1, f(Yes, false, "ṭ")}, - {0x1e6e, 0, 0, 1, f(Yes, false, "Ṯ")}, - {0x1e6f, 0, 0, 1, f(Yes, false, "ṯ")}, - {0x1e70, 0, 0, 1, f(Yes, false, "Ṱ")}, - {0x1e71, 0, 0, 1, f(Yes, false, "ṱ")}, - {0x1e72, 0, 0, 1, f(Yes, false, "Ṳ")}, - {0x1e73, 0, 0, 1, f(Yes, false, "ṳ")}, - {0x1e74, 0, 0, 1, f(Yes, false, "Ṵ")}, - {0x1e75, 0, 0, 1, f(Yes, false, "ṵ")}, - {0x1e76, 0, 0, 1, f(Yes, false, "Ṷ")}, - {0x1e77, 0, 0, 1, f(Yes, false, "ṷ")}, - {0x1e78, 0, 0, 2, f(Yes, false, "Ṹ")}, - {0x1e79, 0, 0, 2, f(Yes, false, "ṹ")}, - {0x1e7a, 0, 0, 2, f(Yes, false, "Ṻ")}, - {0x1e7b, 0, 0, 2, f(Yes, false, "ṻ")}, - {0x1e7c, 0, 0, 1, f(Yes, false, "Ṽ")}, - {0x1e7d, 0, 0, 1, f(Yes, false, "ṽ")}, - {0x1e7e, 0, 0, 1, f(Yes, false, "Ṿ")}, - {0x1e7f, 0, 0, 1, f(Yes, false, "ṿ")}, - {0x1e80, 0, 0, 1, f(Yes, false, "Ẁ")}, - {0x1e81, 0, 0, 1, f(Yes, false, "ẁ")}, - {0x1e82, 0, 0, 1, f(Yes, false, "Ẃ")}, - {0x1e83, 0, 0, 1, f(Yes, false, "ẃ")}, - {0x1e84, 0, 0, 1, f(Yes, false, "Ẅ")}, - {0x1e85, 0, 0, 1, f(Yes, false, "ẅ")}, - {0x1e86, 0, 0, 1, f(Yes, false, "Ẇ")}, - {0x1e87, 0, 0, 1, f(Yes, false, "ẇ")}, - {0x1e88, 0, 0, 1, f(Yes, false, "Ẉ")}, - {0x1e89, 0, 0, 1, f(Yes, false, "ẉ")}, - {0x1e8a, 0, 0, 1, f(Yes, false, "Ẋ")}, - {0x1e8b, 0, 0, 1, f(Yes, false, "ẋ")}, - {0x1e8c, 0, 0, 1, f(Yes, false, "Ẍ")}, - {0x1e8d, 0, 0, 1, f(Yes, false, "ẍ")}, - {0x1e8e, 0, 0, 1, f(Yes, false, "Ẏ")}, - {0x1e8f, 0, 0, 1, f(Yes, false, "ẏ")}, - {0x1e90, 0, 0, 1, f(Yes, false, "Ẑ")}, - {0x1e91, 0, 0, 1, f(Yes, false, "ẑ")}, - {0x1e92, 0, 0, 1, f(Yes, false, "Ẓ")}, - {0x1e93, 0, 0, 1, f(Yes, false, "ẓ")}, - {0x1e94, 0, 0, 1, f(Yes, false, "Ẕ")}, - {0x1e95, 0, 0, 1, f(Yes, false, "ẕ")}, - {0x1e96, 0, 0, 1, f(Yes, false, "ẖ")}, - {0x1e97, 0, 0, 1, f(Yes, false, "ẗ")}, - {0x1e98, 0, 0, 1, f(Yes, false, "ẘ")}, - {0x1e99, 0, 0, 1, f(Yes, false, "ẙ")}, - {0x1e9a, 0, 0, 0, g(Yes, No, false, false, "", "aʾ")}, - {0x1e9b, 0, 0, 1, g(Yes, No, false, false, "ẛ", "ṡ")}, - {0x1e9c, 0, 0, 0, f(Yes, false, "")}, - {0x1ea0, 0, 0, 1, f(Yes, true, "Ạ")}, - {0x1ea1, 0, 0, 1, f(Yes, true, "ạ")}, - {0x1ea2, 0, 0, 1, f(Yes, false, "Ả")}, - {0x1ea3, 0, 0, 1, f(Yes, false, "ả")}, - {0x1ea4, 0, 0, 2, f(Yes, false, "Ấ")}, - {0x1ea5, 0, 0, 2, f(Yes, false, "ấ")}, - {0x1ea6, 0, 0, 2, f(Yes, false, "Ầ")}, - {0x1ea7, 0, 0, 2, f(Yes, false, "ầ")}, - {0x1ea8, 0, 0, 2, f(Yes, false, "Ẩ")}, - {0x1ea9, 0, 0, 2, f(Yes, false, "ẩ")}, - {0x1eaa, 0, 0, 2, f(Yes, false, "Ẫ")}, - {0x1eab, 0, 0, 2, f(Yes, false, "ẫ")}, - {0x1eac, 0, 0, 2, f(Yes, false, "Ậ")}, - {0x1ead, 0, 0, 2, f(Yes, false, "ậ")}, - {0x1eae, 0, 0, 2, f(Yes, false, "Ắ")}, - {0x1eaf, 0, 0, 2, f(Yes, false, "ắ")}, - {0x1eb0, 0, 0, 2, f(Yes, false, "Ằ")}, - {0x1eb1, 0, 0, 2, f(Yes, false, "ằ")}, - {0x1eb2, 0, 0, 2, f(Yes, false, "Ẳ")}, - {0x1eb3, 0, 0, 2, f(Yes, false, "ẳ")}, - {0x1eb4, 0, 0, 2, f(Yes, false, "Ẵ")}, - {0x1eb5, 0, 0, 2, f(Yes, false, "ẵ")}, - {0x1eb6, 0, 0, 2, f(Yes, false, "Ặ")}, - {0x1eb7, 0, 0, 2, f(Yes, false, "ặ")}, - {0x1eb8, 0, 0, 1, f(Yes, true, "Ẹ")}, - {0x1eb9, 0, 0, 1, f(Yes, true, "ẹ")}, - {0x1eba, 0, 0, 1, f(Yes, false, "Ẻ")}, - {0x1ebb, 0, 0, 1, f(Yes, false, "ẻ")}, - {0x1ebc, 0, 0, 1, f(Yes, false, "Ẽ")}, - {0x1ebd, 0, 0, 1, f(Yes, false, "ẽ")}, - {0x1ebe, 0, 0, 2, f(Yes, false, "Ế")}, - {0x1ebf, 0, 0, 2, f(Yes, false, "ế")}, - {0x1ec0, 0, 0, 2, f(Yes, false, "Ề")}, - {0x1ec1, 0, 0, 2, f(Yes, false, "ề")}, - {0x1ec2, 0, 0, 2, f(Yes, false, "Ể")}, - {0x1ec3, 0, 0, 2, f(Yes, false, "ể")}, - {0x1ec4, 0, 0, 2, f(Yes, false, "Ễ")}, - {0x1ec5, 0, 0, 2, f(Yes, false, "ễ")}, - {0x1ec6, 0, 0, 2, f(Yes, false, "Ệ")}, - {0x1ec7, 0, 0, 2, f(Yes, false, "ệ")}, - {0x1ec8, 0, 0, 1, f(Yes, false, "Ỉ")}, - {0x1ec9, 0, 0, 1, f(Yes, false, "ỉ")}, - {0x1eca, 0, 0, 1, f(Yes, false, "Ị")}, - {0x1ecb, 0, 0, 1, f(Yes, false, "ị")}, - {0x1ecc, 0, 0, 1, f(Yes, true, "Ọ")}, - {0x1ecd, 0, 0, 1, f(Yes, true, "ọ")}, - {0x1ece, 0, 0, 1, f(Yes, false, "Ỏ")}, - {0x1ecf, 0, 0, 1, f(Yes, false, "ỏ")}, - {0x1ed0, 0, 0, 2, f(Yes, false, "Ố")}, - {0x1ed1, 0, 0, 2, f(Yes, false, "ố")}, - {0x1ed2, 0, 0, 2, f(Yes, false, "Ồ")}, - {0x1ed3, 0, 0, 2, f(Yes, false, "ồ")}, - {0x1ed4, 0, 0, 2, f(Yes, false, "Ổ")}, - {0x1ed5, 0, 0, 2, f(Yes, false, "ổ")}, - {0x1ed6, 0, 0, 2, f(Yes, false, "Ỗ")}, - {0x1ed7, 0, 0, 2, f(Yes, false, "ỗ")}, - {0x1ed8, 0, 0, 2, f(Yes, false, "Ộ")}, - {0x1ed9, 0, 0, 2, f(Yes, false, "ộ")}, - {0x1eda, 0, 0, 2, f(Yes, false, "Ớ")}, - {0x1edb, 0, 0, 2, f(Yes, false, "ớ")}, - {0x1edc, 0, 0, 2, f(Yes, false, "Ờ")}, - {0x1edd, 0, 0, 2, f(Yes, false, "ờ")}, - {0x1ede, 0, 0, 2, f(Yes, false, "Ở")}, - {0x1edf, 0, 0, 2, f(Yes, false, "ở")}, - {0x1ee0, 0, 0, 2, f(Yes, false, "Ỡ")}, - {0x1ee1, 0, 0, 2, f(Yes, false, "ỡ")}, - {0x1ee2, 0, 0, 2, f(Yes, false, "Ợ")}, - {0x1ee3, 0, 0, 2, f(Yes, false, "ợ")}, - {0x1ee4, 0, 0, 1, f(Yes, false, "Ụ")}, - {0x1ee5, 0, 0, 1, f(Yes, false, "ụ")}, - {0x1ee6, 0, 0, 1, f(Yes, false, "Ủ")}, - {0x1ee7, 0, 0, 1, f(Yes, false, "ủ")}, - {0x1ee8, 0, 0, 2, f(Yes, false, "Ứ")}, - {0x1ee9, 0, 0, 2, f(Yes, false, "ứ")}, - {0x1eea, 0, 0, 2, f(Yes, false, "Ừ")}, - {0x1eeb, 0, 0, 2, f(Yes, false, "ừ")}, - {0x1eec, 0, 0, 2, f(Yes, false, "Ử")}, - {0x1eed, 0, 0, 2, f(Yes, false, "ử")}, - {0x1eee, 0, 0, 2, f(Yes, false, "Ữ")}, - {0x1eef, 0, 0, 2, f(Yes, false, "ữ")}, - {0x1ef0, 0, 0, 2, f(Yes, false, "Ự")}, - {0x1ef1, 0, 0, 2, f(Yes, false, "ự")}, - {0x1ef2, 0, 0, 1, f(Yes, false, "Ỳ")}, - {0x1ef3, 0, 0, 1, f(Yes, false, "ỳ")}, - {0x1ef4, 0, 0, 1, f(Yes, false, "Ỵ")}, - {0x1ef5, 0, 0, 1, f(Yes, false, "ỵ")}, - {0x1ef6, 0, 0, 1, f(Yes, false, "Ỷ")}, - {0x1ef7, 0, 0, 1, f(Yes, false, "ỷ")}, - {0x1ef8, 0, 0, 1, f(Yes, false, "Ỹ")}, - {0x1ef9, 0, 0, 1, f(Yes, false, "ỹ")}, - {0x1efa, 0, 0, 0, f(Yes, false, "")}, - {0x1f00, 0, 0, 1, f(Yes, true, "ἀ")}, - {0x1f01, 0, 0, 1, f(Yes, true, "ἁ")}, - {0x1f02, 0, 0, 2, f(Yes, true, "ἂ")}, - {0x1f03, 0, 0, 2, f(Yes, true, "ἃ")}, - {0x1f04, 0, 0, 2, f(Yes, true, "ἄ")}, - {0x1f05, 0, 0, 2, f(Yes, true, "ἅ")}, - {0x1f06, 0, 0, 2, f(Yes, true, "ἆ")}, - {0x1f07, 0, 0, 2, f(Yes, true, "ἇ")}, - {0x1f08, 0, 0, 1, f(Yes, true, "Ἀ")}, - {0x1f09, 0, 0, 1, f(Yes, true, "Ἁ")}, - {0x1f0a, 0, 0, 2, f(Yes, true, "Ἂ")}, - {0x1f0b, 0, 0, 2, f(Yes, true, "Ἃ")}, - {0x1f0c, 0, 0, 2, f(Yes, true, "Ἄ")}, - {0x1f0d, 0, 0, 2, f(Yes, true, "Ἅ")}, - {0x1f0e, 0, 0, 2, f(Yes, true, "Ἆ")}, - {0x1f0f, 0, 0, 2, f(Yes, true, "Ἇ")}, - {0x1f10, 0, 0, 1, f(Yes, true, "ἐ")}, - {0x1f11, 0, 0, 1, f(Yes, true, "ἑ")}, - {0x1f12, 0, 0, 2, f(Yes, false, "ἒ")}, - {0x1f13, 0, 0, 2, f(Yes, false, "ἓ")}, - {0x1f14, 0, 0, 2, f(Yes, false, "ἔ")}, - {0x1f15, 0, 0, 2, f(Yes, false, "ἕ")}, - {0x1f16, 0, 0, 0, f(Yes, false, "")}, - {0x1f18, 0, 0, 1, f(Yes, true, "Ἐ")}, - {0x1f19, 0, 0, 1, f(Yes, true, "Ἑ")}, - {0x1f1a, 0, 0, 2, f(Yes, false, "Ἒ")}, - {0x1f1b, 0, 0, 2, f(Yes, false, "Ἓ")}, - {0x1f1c, 0, 0, 2, f(Yes, false, "Ἔ")}, - {0x1f1d, 0, 0, 2, f(Yes, false, "Ἕ")}, - {0x1f1e, 0, 0, 0, f(Yes, false, "")}, - {0x1f20, 0, 0, 1, f(Yes, true, "ἠ")}, - {0x1f21, 0, 0, 1, f(Yes, true, "ἡ")}, - {0x1f22, 0, 0, 2, f(Yes, true, "ἢ")}, - {0x1f23, 0, 0, 2, f(Yes, true, "ἣ")}, - {0x1f24, 0, 0, 2, f(Yes, true, "ἤ")}, - {0x1f25, 0, 0, 2, f(Yes, true, "ἥ")}, - {0x1f26, 0, 0, 2, f(Yes, true, "ἦ")}, - {0x1f27, 0, 0, 2, f(Yes, true, "ἧ")}, - {0x1f28, 0, 0, 1, f(Yes, true, "Ἠ")}, - {0x1f29, 0, 0, 1, f(Yes, true, "Ἡ")}, - {0x1f2a, 0, 0, 2, f(Yes, true, "Ἢ")}, - {0x1f2b, 0, 0, 2, f(Yes, true, "Ἣ")}, - {0x1f2c, 0, 0, 2, f(Yes, true, "Ἤ")}, - {0x1f2d, 0, 0, 2, f(Yes, true, "Ἥ")}, - {0x1f2e, 0, 0, 2, f(Yes, true, "Ἦ")}, - {0x1f2f, 0, 0, 2, f(Yes, true, "Ἧ")}, - {0x1f30, 0, 0, 1, f(Yes, true, "ἰ")}, - {0x1f31, 0, 0, 1, f(Yes, true, "ἱ")}, - {0x1f32, 0, 0, 2, f(Yes, false, "ἲ")}, - {0x1f33, 0, 0, 2, f(Yes, false, "ἳ")}, - {0x1f34, 0, 0, 2, f(Yes, false, "ἴ")}, - {0x1f35, 0, 0, 2, f(Yes, false, "ἵ")}, - {0x1f36, 0, 0, 2, f(Yes, false, "ἶ")}, - {0x1f37, 0, 0, 2, f(Yes, false, "ἷ")}, - {0x1f38, 0, 0, 1, f(Yes, true, "Ἰ")}, - {0x1f39, 0, 0, 1, f(Yes, true, "Ἱ")}, - {0x1f3a, 0, 0, 2, f(Yes, false, "Ἲ")}, - {0x1f3b, 0, 0, 2, f(Yes, false, "Ἳ")}, - {0x1f3c, 0, 0, 2, f(Yes, false, "Ἴ")}, - {0x1f3d, 0, 0, 2, f(Yes, false, "Ἵ")}, - {0x1f3e, 0, 0, 2, f(Yes, false, "Ἶ")}, - {0x1f3f, 0, 0, 2, f(Yes, false, "Ἷ")}, - {0x1f40, 0, 0, 1, f(Yes, true, "ὀ")}, - {0x1f41, 0, 0, 1, f(Yes, true, "ὁ")}, - {0x1f42, 0, 0, 2, f(Yes, false, "ὂ")}, - {0x1f43, 0, 0, 2, f(Yes, false, "ὃ")}, - {0x1f44, 0, 0, 2, f(Yes, false, "ὄ")}, - {0x1f45, 0, 0, 2, f(Yes, false, "ὅ")}, - {0x1f46, 0, 0, 0, f(Yes, false, "")}, - {0x1f48, 0, 0, 1, f(Yes, true, "Ὀ")}, - {0x1f49, 0, 0, 1, f(Yes, true, "Ὁ")}, - {0x1f4a, 0, 0, 2, f(Yes, false, "Ὂ")}, - {0x1f4b, 0, 0, 2, f(Yes, false, "Ὃ")}, - {0x1f4c, 0, 0, 2, f(Yes, false, "Ὄ")}, - {0x1f4d, 0, 0, 2, f(Yes, false, "Ὅ")}, - {0x1f4e, 0, 0, 0, f(Yes, false, "")}, - {0x1f50, 0, 0, 1, f(Yes, true, "ὐ")}, - {0x1f51, 0, 0, 1, f(Yes, true, "ὑ")}, - {0x1f52, 0, 0, 2, f(Yes, false, "ὒ")}, - {0x1f53, 0, 0, 2, f(Yes, false, "ὓ")}, - {0x1f54, 0, 0, 2, f(Yes, false, "ὔ")}, - {0x1f55, 0, 0, 2, f(Yes, false, "ὕ")}, - {0x1f56, 0, 0, 2, f(Yes, false, "ὖ")}, - {0x1f57, 0, 0, 2, f(Yes, false, "ὗ")}, - {0x1f58, 0, 0, 0, f(Yes, false, "")}, - {0x1f59, 0, 0, 1, f(Yes, true, "Ὑ")}, - {0x1f5a, 0, 0, 0, f(Yes, false, "")}, - {0x1f5b, 0, 0, 2, f(Yes, false, "Ὓ")}, - {0x1f5c, 0, 0, 0, f(Yes, false, "")}, - {0x1f5d, 0, 0, 2, f(Yes, false, "Ὕ")}, - {0x1f5e, 0, 0, 0, f(Yes, false, "")}, - {0x1f5f, 0, 0, 2, f(Yes, false, "Ὗ")}, - {0x1f60, 0, 0, 1, f(Yes, true, "ὠ")}, - {0x1f61, 0, 0, 1, f(Yes, true, "ὡ")}, - {0x1f62, 0, 0, 2, f(Yes, true, "ὢ")}, - {0x1f63, 0, 0, 2, f(Yes, true, "ὣ")}, - {0x1f64, 0, 0, 2, f(Yes, true, "ὤ")}, - {0x1f65, 0, 0, 2, f(Yes, true, "ὥ")}, - {0x1f66, 0, 0, 2, f(Yes, true, "ὦ")}, - {0x1f67, 0, 0, 2, f(Yes, true, "ὧ")}, - {0x1f68, 0, 0, 1, f(Yes, true, "Ὠ")}, - {0x1f69, 0, 0, 1, f(Yes, true, "Ὡ")}, - {0x1f6a, 0, 0, 2, f(Yes, true, "Ὢ")}, - {0x1f6b, 0, 0, 2, f(Yes, true, "Ὣ")}, - {0x1f6c, 0, 0, 2, f(Yes, true, "Ὤ")}, - {0x1f6d, 0, 0, 2, f(Yes, true, "Ὥ")}, - {0x1f6e, 0, 0, 2, f(Yes, true, "Ὦ")}, - {0x1f6f, 0, 0, 2, f(Yes, true, "Ὧ")}, - {0x1f70, 0, 0, 1, f(Yes, true, "ὰ")}, - {0x1f71, 0, 0, 1, f(No, false, "ά")}, - {0x1f72, 0, 0, 1, f(Yes, false, "ὲ")}, - {0x1f73, 0, 0, 1, f(No, false, "έ")}, - {0x1f74, 0, 0, 1, f(Yes, true, "ὴ")}, - {0x1f75, 0, 0, 1, f(No, false, "ή")}, - {0x1f76, 0, 0, 1, f(Yes, false, "ὶ")}, - {0x1f77, 0, 0, 1, f(No, false, "ί")}, - {0x1f78, 0, 0, 1, f(Yes, false, "ὸ")}, - {0x1f79, 0, 0, 1, f(No, false, "ό")}, - {0x1f7a, 0, 0, 1, f(Yes, false, "ὺ")}, - {0x1f7b, 0, 0, 1, f(No, false, "ύ")}, - {0x1f7c, 0, 0, 1, f(Yes, true, "ὼ")}, - {0x1f7d, 0, 0, 1, f(No, false, "ώ")}, - {0x1f7e, 0, 0, 0, f(Yes, false, "")}, - {0x1f80, 0, 0, 2, f(Yes, false, "ᾀ")}, - {0x1f81, 0, 0, 2, f(Yes, false, "ᾁ")}, - {0x1f82, 0, 0, 3, f(Yes, false, "ᾂ")}, - {0x1f83, 0, 0, 3, f(Yes, false, "ᾃ")}, - {0x1f84, 0, 0, 3, f(Yes, false, "ᾄ")}, - {0x1f85, 0, 0, 3, f(Yes, false, "ᾅ")}, - {0x1f86, 0, 0, 3, f(Yes, false, "ᾆ")}, - {0x1f87, 0, 0, 3, f(Yes, false, "ᾇ")}, - {0x1f88, 0, 0, 2, f(Yes, false, "ᾈ")}, - {0x1f89, 0, 0, 2, f(Yes, false, "ᾉ")}, - {0x1f8a, 0, 0, 3, f(Yes, false, "ᾊ")}, - {0x1f8b, 0, 0, 3, f(Yes, false, "ᾋ")}, - {0x1f8c, 0, 0, 3, f(Yes, false, "ᾌ")}, - {0x1f8d, 0, 0, 3, f(Yes, false, "ᾍ")}, - {0x1f8e, 0, 0, 3, f(Yes, false, "ᾎ")}, - {0x1f8f, 0, 0, 3, f(Yes, false, "ᾏ")}, - {0x1f90, 0, 0, 2, f(Yes, false, "ᾐ")}, - {0x1f91, 0, 0, 2, f(Yes, false, "ᾑ")}, - {0x1f92, 0, 0, 3, f(Yes, false, "ᾒ")}, - {0x1f93, 0, 0, 3, f(Yes, false, "ᾓ")}, - {0x1f94, 0, 0, 3, f(Yes, false, "ᾔ")}, - {0x1f95, 0, 0, 3, f(Yes, false, "ᾕ")}, - {0x1f96, 0, 0, 3, f(Yes, false, "ᾖ")}, - {0x1f97, 0, 0, 3, f(Yes, false, "ᾗ")}, - {0x1f98, 0, 0, 2, f(Yes, false, "ᾘ")}, - {0x1f99, 0, 0, 2, f(Yes, false, "ᾙ")}, - {0x1f9a, 0, 0, 3, f(Yes, false, "ᾚ")}, - {0x1f9b, 0, 0, 3, f(Yes, false, "ᾛ")}, - {0x1f9c, 0, 0, 3, f(Yes, false, "ᾜ")}, - {0x1f9d, 0, 0, 3, f(Yes, false, "ᾝ")}, - {0x1f9e, 0, 0, 3, f(Yes, false, "ᾞ")}, - {0x1f9f, 0, 0, 3, f(Yes, false, "ᾟ")}, - {0x1fa0, 0, 0, 2, f(Yes, false, "ᾠ")}, - {0x1fa1, 0, 0, 2, f(Yes, false, "ᾡ")}, - {0x1fa2, 0, 0, 3, f(Yes, false, "ᾢ")}, - {0x1fa3, 0, 0, 3, f(Yes, false, "ᾣ")}, - {0x1fa4, 0, 0, 3, f(Yes, false, "ᾤ")}, - {0x1fa5, 0, 0, 3, f(Yes, false, "ᾥ")}, - {0x1fa6, 0, 0, 3, f(Yes, false, "ᾦ")}, - {0x1fa7, 0, 0, 3, f(Yes, false, "ᾧ")}, - {0x1fa8, 0, 0, 2, f(Yes, false, "ᾨ")}, - {0x1fa9, 0, 0, 2, f(Yes, false, "ᾩ")}, - {0x1faa, 0, 0, 3, f(Yes, false, "ᾪ")}, - {0x1fab, 0, 0, 3, f(Yes, false, "ᾫ")}, - {0x1fac, 0, 0, 3, f(Yes, false, "ᾬ")}, - {0x1fad, 0, 0, 3, f(Yes, false, "ᾭ")}, - {0x1fae, 0, 0, 3, f(Yes, false, "ᾮ")}, - {0x1faf, 0, 0, 3, f(Yes, false, "ᾯ")}, - {0x1fb0, 0, 0, 1, f(Yes, false, "ᾰ")}, - {0x1fb1, 0, 0, 1, f(Yes, false, "ᾱ")}, - {0x1fb2, 0, 0, 2, f(Yes, false, "ᾲ")}, - {0x1fb3, 0, 0, 1, f(Yes, false, "ᾳ")}, - {0x1fb4, 0, 0, 2, f(Yes, false, "ᾴ")}, - {0x1fb5, 0, 0, 0, f(Yes, false, "")}, - {0x1fb6, 0, 0, 1, f(Yes, true, "ᾶ")}, - {0x1fb7, 0, 0, 2, f(Yes, false, "ᾷ")}, - {0x1fb8, 0, 0, 1, f(Yes, false, "Ᾰ")}, - {0x1fb9, 0, 0, 1, f(Yes, false, "Ᾱ")}, - {0x1fba, 0, 0, 1, f(Yes, false, "Ὰ")}, - {0x1fbb, 0, 0, 1, f(No, false, "Ά")}, - {0x1fbc, 0, 0, 1, f(Yes, false, "ᾼ")}, - {0x1fbd, 0, 0, 1, g(Yes, No, false, false, "", " ̓")}, - {0x1fbe, 0, 0, 0, f(No, false, "ι")}, - {0x1fbf, 0, 0, 1, g(Yes, No, true, false, "", " ̓")}, - {0x1fc0, 0, 0, 1, g(Yes, No, false, false, "", " ͂")}, - {0x1fc1, 0, 0, 2, g(Yes, No, false, false, "῁", " ̈͂")}, - {0x1fc2, 0, 0, 2, f(Yes, false, "ῂ")}, - {0x1fc3, 0, 0, 1, f(Yes, false, "ῃ")}, - {0x1fc4, 0, 0, 2, f(Yes, false, "ῄ")}, - {0x1fc5, 0, 0, 0, f(Yes, false, "")}, - {0x1fc6, 0, 0, 1, f(Yes, true, "ῆ")}, - {0x1fc7, 0, 0, 2, f(Yes, false, "ῇ")}, - {0x1fc8, 0, 0, 1, f(Yes, false, "Ὲ")}, - {0x1fc9, 0, 0, 1, f(No, false, "Έ")}, - {0x1fca, 0, 0, 1, f(Yes, false, "Ὴ")}, - {0x1fcb, 0, 0, 1, f(No, false, "Ή")}, - {0x1fcc, 0, 0, 1, f(Yes, false, "ῌ")}, - {0x1fcd, 0, 0, 2, g(Yes, No, false, false, "῍", " ̓̀")}, - {0x1fce, 0, 0, 2, g(Yes, No, false, false, "῎", " ̓́")}, - {0x1fcf, 0, 0, 2, g(Yes, No, false, false, "῏", " ̓͂")}, - {0x1fd0, 0, 0, 1, f(Yes, false, "ῐ")}, - {0x1fd1, 0, 0, 1, f(Yes, false, "ῑ")}, - {0x1fd2, 0, 0, 2, f(Yes, false, "ῒ")}, - {0x1fd3, 0, 0, 2, f(No, false, "ΐ")}, - {0x1fd4, 0, 0, 0, f(Yes, false, "")}, - {0x1fd6, 0, 0, 1, f(Yes, false, "ῖ")}, - {0x1fd7, 0, 0, 2, f(Yes, false, "ῗ")}, - {0x1fd8, 0, 0, 1, f(Yes, false, "Ῐ")}, - {0x1fd9, 0, 0, 1, f(Yes, false, "Ῑ")}, - {0x1fda, 0, 0, 1, f(Yes, false, "Ὶ")}, - {0x1fdb, 0, 0, 1, f(No, false, "Ί")}, - {0x1fdc, 0, 0, 0, f(Yes, false, "")}, - {0x1fdd, 0, 0, 2, g(Yes, No, false, false, "῝", " ̔̀")}, - {0x1fde, 0, 0, 2, g(Yes, No, false, false, "῞", " ̔́")}, - {0x1fdf, 0, 0, 2, g(Yes, No, false, false, "῟", " ̔͂")}, - {0x1fe0, 0, 0, 1, f(Yes, false, "ῠ")}, - {0x1fe1, 0, 0, 1, f(Yes, false, "ῡ")}, - {0x1fe2, 0, 0, 2, f(Yes, false, "ῢ")}, - {0x1fe3, 0, 0, 2, f(No, false, "ΰ")}, - {0x1fe4, 0, 0, 1, f(Yes, false, "ῤ")}, - {0x1fe5, 0, 0, 1, f(Yes, false, "ῥ")}, - {0x1fe6, 0, 0, 1, f(Yes, false, "ῦ")}, - {0x1fe7, 0, 0, 2, f(Yes, false, "ῧ")}, - {0x1fe8, 0, 0, 1, f(Yes, false, "Ῠ")}, - {0x1fe9, 0, 0, 1, f(Yes, false, "Ῡ")}, - {0x1fea, 0, 0, 1, f(Yes, false, "Ὺ")}, - {0x1feb, 0, 0, 1, f(No, false, "Ύ")}, - {0x1fec, 0, 0, 1, f(Yes, false, "Ῥ")}, - {0x1fed, 0, 0, 2, g(Yes, No, false, false, "῭", " ̈̀")}, - {0x1fee, 0, 0, 2, g(No, No, false, false, "΅", " ̈́")}, - {0x1fef, 0, 0, 0, f(No, false, "`")}, - {0x1ff0, 0, 0, 0, f(Yes, false, "")}, - {0x1ff2, 0, 0, 2, f(Yes, false, "ῲ")}, - {0x1ff3, 0, 0, 1, f(Yes, false, "ῳ")}, - {0x1ff4, 0, 0, 2, f(Yes, false, "ῴ")}, - {0x1ff5, 0, 0, 0, f(Yes, false, "")}, - {0x1ff6, 0, 0, 1, f(Yes, true, "ῶ")}, - {0x1ff7, 0, 0, 2, f(Yes, false, "ῷ")}, - {0x1ff8, 0, 0, 1, f(Yes, false, "Ὸ")}, - {0x1ff9, 0, 0, 1, f(No, false, "Ό")}, - {0x1ffa, 0, 0, 1, f(Yes, false, "Ὼ")}, - {0x1ffb, 0, 0, 1, f(No, false, "Ώ")}, - {0x1ffc, 0, 0, 1, f(Yes, false, "ῼ")}, - {0x1ffd, 0, 0, 1, g(No, No, false, false, "´", " ́")}, - {0x1ffe, 0, 0, 1, g(Yes, No, true, false, "", " ̔")}, - {0x1fff, 0, 0, 0, f(Yes, false, "")}, - {0x2000, 0, 0, 0, g(No, No, false, false, "\u2002", " ")}, - {0x2001, 0, 0, 0, g(No, No, false, false, "\u2003", " ")}, - {0x2002, 0, 0, 0, g(Yes, No, false, false, "", " ")}, - {0x200b, 0, 0, 0, f(Yes, false, "")}, - {0x2011, 0, 0, 0, g(Yes, No, false, false, "", "‐")}, - {0x2012, 0, 0, 0, f(Yes, false, "")}, - {0x2017, 0, 0, 1, g(Yes, No, false, false, "", " ̳")}, - {0x2018, 0, 0, 0, f(Yes, false, "")}, - {0x2024, 0, 0, 0, g(Yes, No, false, false, "", ".")}, - {0x2025, 0, 0, 0, g(Yes, No, false, false, "", "..")}, - {0x2026, 0, 0, 0, g(Yes, No, false, false, "", "...")}, - {0x2027, 0, 0, 0, f(Yes, false, "")}, - {0x202f, 0, 0, 0, g(Yes, No, false, false, "", " ")}, - {0x2030, 0, 0, 0, f(Yes, false, "")}, - {0x2033, 0, 0, 0, g(Yes, No, false, false, "", "′′")}, - {0x2034, 0, 0, 0, g(Yes, No, false, false, "", "′′′")}, - {0x2035, 0, 0, 0, f(Yes, false, "")}, - {0x2036, 0, 0, 0, g(Yes, No, false, false, "", "‵‵")}, - {0x2037, 0, 0, 0, g(Yes, No, false, false, "", "‵‵‵")}, - {0x2038, 0, 0, 0, f(Yes, false, "")}, - {0x203c, 0, 0, 0, g(Yes, No, false, false, "", "!!")}, - {0x203d, 0, 0, 0, f(Yes, false, "")}, - {0x203e, 0, 0, 1, g(Yes, No, false, false, "", " ̅")}, - {0x203f, 0, 0, 0, f(Yes, false, "")}, - {0x2047, 0, 0, 0, g(Yes, No, false, false, "", "??")}, - {0x2048, 0, 0, 0, g(Yes, No, false, false, "", "?!")}, - {0x2049, 0, 0, 0, g(Yes, No, false, false, "", "!?")}, - {0x204a, 0, 0, 0, f(Yes, false, "")}, - {0x2057, 0, 0, 0, g(Yes, No, false, false, "", "′′′′")}, - {0x2058, 0, 0, 0, f(Yes, false, "")}, - {0x205f, 0, 0, 0, g(Yes, No, false, false, "", " ")}, - {0x2060, 0, 0, 0, f(Yes, false, "")}, - {0x2070, 0, 0, 0, g(Yes, No, false, false, "", "0")}, - {0x2071, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x2072, 0, 0, 0, f(Yes, false, "")}, - {0x2074, 0, 0, 0, g(Yes, No, false, false, "", "4")}, - {0x2075, 0, 0, 0, g(Yes, No, false, false, "", "5")}, - {0x2076, 0, 0, 0, g(Yes, No, false, false, "", "6")}, - {0x2077, 0, 0, 0, g(Yes, No, false, false, "", "7")}, - {0x2078, 0, 0, 0, g(Yes, No, false, false, "", "8")}, - {0x2079, 0, 0, 0, g(Yes, No, false, false, "", "9")}, - {0x207a, 0, 0, 0, g(Yes, No, false, false, "", "+")}, - {0x207b, 0, 0, 0, g(Yes, No, false, false, "", "−")}, - {0x207c, 0, 0, 0, g(Yes, No, false, false, "", "=")}, - {0x207d, 0, 0, 0, g(Yes, No, false, false, "", "(")}, - {0x207e, 0, 0, 0, g(Yes, No, false, false, "", ")")}, - {0x207f, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x2080, 0, 0, 0, g(Yes, No, false, false, "", "0")}, - {0x2081, 0, 0, 0, g(Yes, No, false, false, "", "1")}, - {0x2082, 0, 0, 0, g(Yes, No, false, false, "", "2")}, - {0x2083, 0, 0, 0, g(Yes, No, false, false, "", "3")}, - {0x2084, 0, 0, 0, g(Yes, No, false, false, "", "4")}, - {0x2085, 0, 0, 0, g(Yes, No, false, false, "", "5")}, - {0x2086, 0, 0, 0, g(Yes, No, false, false, "", "6")}, - {0x2087, 0, 0, 0, g(Yes, No, false, false, "", "7")}, - {0x2088, 0, 0, 0, g(Yes, No, false, false, "", "8")}, - {0x2089, 0, 0, 0, g(Yes, No, false, false, "", "9")}, - {0x208a, 0, 0, 0, g(Yes, No, false, false, "", "+")}, - {0x208b, 0, 0, 0, g(Yes, No, false, false, "", "−")}, - {0x208c, 0, 0, 0, g(Yes, No, false, false, "", "=")}, - {0x208d, 0, 0, 0, g(Yes, No, false, false, "", "(")}, - {0x208e, 0, 0, 0, g(Yes, No, false, false, "", ")")}, - {0x208f, 0, 0, 0, f(Yes, false, "")}, - {0x2090, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x2091, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x2092, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x2093, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x2094, 0, 0, 0, g(Yes, No, false, false, "", "ə")}, - {0x2095, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x2096, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x2097, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x2098, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x2099, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x209a, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x209b, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x209c, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x209d, 0, 0, 0, f(Yes, false, "")}, - {0x20a8, 0, 0, 0, g(Yes, No, false, false, "", "Rs")}, - {0x20a9, 0, 0, 0, f(Yes, false, "")}, - {0x20d0, 230, 1, 1, f(Yes, false, "")}, - {0x20d2, 1, 1, 1, f(Yes, false, "")}, - {0x20d4, 230, 1, 1, f(Yes, false, "")}, - {0x20d8, 1, 1, 1, f(Yes, false, "")}, - {0x20db, 230, 1, 1, f(Yes, false, "")}, - {0x20dd, 0, 0, 0, f(Yes, false, "")}, - {0x20e1, 230, 1, 1, f(Yes, false, "")}, - {0x20e2, 0, 0, 0, f(Yes, false, "")}, - {0x20e5, 1, 1, 1, f(Yes, false, "")}, - {0x20e7, 230, 1, 1, f(Yes, false, "")}, - {0x20e8, 220, 1, 1, f(Yes, false, "")}, - {0x20e9, 230, 1, 1, f(Yes, false, "")}, - {0x20ea, 1, 1, 1, f(Yes, false, "")}, - {0x20ec, 220, 1, 1, f(Yes, false, "")}, - {0x20f0, 230, 1, 1, f(Yes, false, "")}, - {0x20f1, 0, 0, 0, f(Yes, false, "")}, - {0x2100, 0, 0, 0, g(Yes, No, false, false, "", "a/c")}, - {0x2101, 0, 0, 0, g(Yes, No, false, false, "", "a/s")}, - {0x2102, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x2103, 0, 0, 0, g(Yes, No, false, false, "", "°C")}, - {0x2104, 0, 0, 0, f(Yes, false, "")}, - {0x2105, 0, 0, 0, g(Yes, No, false, false, "", "c/o")}, - {0x2106, 0, 0, 0, g(Yes, No, false, false, "", "c/u")}, - {0x2107, 0, 0, 0, g(Yes, No, false, false, "", "Ɛ")}, - {0x2108, 0, 0, 0, f(Yes, false, "")}, - {0x2109, 0, 0, 0, g(Yes, No, false, false, "", "°F")}, - {0x210a, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x210b, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x210e, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x210f, 0, 0, 0, g(Yes, No, false, false, "", "ħ")}, - {0x2110, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x2112, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x2113, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x2114, 0, 0, 0, f(Yes, false, "")}, - {0x2115, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x2116, 0, 0, 0, g(Yes, No, false, false, "", "No")}, - {0x2117, 0, 0, 0, f(Yes, false, "")}, - {0x2119, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x211a, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x211b, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x211e, 0, 0, 0, f(Yes, false, "")}, - {0x2120, 0, 0, 0, g(Yes, No, false, false, "", "SM")}, - {0x2121, 0, 0, 0, g(Yes, No, false, false, "", "TEL")}, - {0x2122, 0, 0, 0, g(Yes, No, false, false, "", "TM")}, - {0x2123, 0, 0, 0, f(Yes, false, "")}, - {0x2124, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x2125, 0, 0, 0, f(Yes, false, "")}, - {0x2126, 0, 0, 0, f(No, false, "Ω")}, - {0x2127, 0, 0, 0, f(Yes, false, "")}, - {0x2128, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x2129, 0, 0, 0, f(Yes, false, "")}, - {0x212a, 0, 0, 0, f(No, false, "K")}, - {0x212b, 0, 0, 1, f(No, false, "Å")}, - {0x212c, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x212d, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x212e, 0, 0, 0, f(Yes, false, "")}, - {0x212f, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x2130, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x2131, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x2132, 0, 0, 0, f(Yes, false, "")}, - {0x2133, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x2134, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x2135, 0, 0, 0, g(Yes, No, false, false, "", "א")}, - {0x2136, 0, 0, 0, g(Yes, No, false, false, "", "ב")}, - {0x2137, 0, 0, 0, g(Yes, No, false, false, "", "ג")}, - {0x2138, 0, 0, 0, g(Yes, No, false, false, "", "ד")}, - {0x2139, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x213a, 0, 0, 0, f(Yes, false, "")}, - {0x213b, 0, 0, 0, g(Yes, No, false, false, "", "FAX")}, - {0x213c, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x213d, 0, 0, 0, g(Yes, No, false, false, "", "γ")}, - {0x213e, 0, 0, 0, g(Yes, No, false, false, "", "Γ")}, - {0x213f, 0, 0, 0, g(Yes, No, false, false, "", "Π")}, - {0x2140, 0, 0, 0, g(Yes, No, false, false, "", "∑")}, - {0x2141, 0, 0, 0, f(Yes, false, "")}, - {0x2145, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x2146, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x2147, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x2148, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x2149, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x214a, 0, 0, 0, f(Yes, false, "")}, - {0x2150, 0, 0, 0, g(Yes, No, false, false, "", "1⁄7")}, - {0x2151, 0, 0, 0, g(Yes, No, false, false, "", "1⁄9")}, - {0x2152, 0, 0, 0, g(Yes, No, false, false, "", "1⁄10")}, - {0x2153, 0, 0, 0, g(Yes, No, false, false, "", "1⁄3")}, - {0x2154, 0, 0, 0, g(Yes, No, false, false, "", "2⁄3")}, - {0x2155, 0, 0, 0, g(Yes, No, false, false, "", "1⁄5")}, - {0x2156, 0, 0, 0, g(Yes, No, false, false, "", "2⁄5")}, - {0x2157, 0, 0, 0, g(Yes, No, false, false, "", "3⁄5")}, - {0x2158, 0, 0, 0, g(Yes, No, false, false, "", "4⁄5")}, - {0x2159, 0, 0, 0, g(Yes, No, false, false, "", "1⁄6")}, - {0x215a, 0, 0, 0, g(Yes, No, false, false, "", "5⁄6")}, - {0x215b, 0, 0, 0, g(Yes, No, false, false, "", "1⁄8")}, - {0x215c, 0, 0, 0, g(Yes, No, false, false, "", "3⁄8")}, - {0x215d, 0, 0, 0, g(Yes, No, false, false, "", "5⁄8")}, - {0x215e, 0, 0, 0, g(Yes, No, false, false, "", "7⁄8")}, - {0x215f, 0, 0, 0, g(Yes, No, false, false, "", "1⁄")}, - {0x2160, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x2161, 0, 0, 0, g(Yes, No, false, false, "", "II")}, - {0x2162, 0, 0, 0, g(Yes, No, false, false, "", "III")}, - {0x2163, 0, 0, 0, g(Yes, No, false, false, "", "IV")}, - {0x2164, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x2165, 0, 0, 0, g(Yes, No, false, false, "", "VI")}, - {0x2166, 0, 0, 0, g(Yes, No, false, false, "", "VII")}, - {0x2167, 0, 0, 0, g(Yes, No, false, false, "", "VIII")}, - {0x2168, 0, 0, 0, g(Yes, No, false, false, "", "IX")}, - {0x2169, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x216a, 0, 0, 0, g(Yes, No, false, false, "", "XI")}, - {0x216b, 0, 0, 0, g(Yes, No, false, false, "", "XII")}, - {0x216c, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x216d, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x216e, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x216f, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x2170, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x2171, 0, 0, 0, g(Yes, No, false, false, "", "ii")}, - {0x2172, 0, 0, 0, g(Yes, No, false, false, "", "iii")}, - {0x2173, 0, 0, 0, g(Yes, No, false, false, "", "iv")}, - {0x2174, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x2175, 0, 0, 0, g(Yes, No, false, false, "", "vi")}, - {0x2176, 0, 0, 0, g(Yes, No, false, false, "", "vii")}, - {0x2177, 0, 0, 0, g(Yes, No, false, false, "", "viii")}, - {0x2178, 0, 0, 0, g(Yes, No, false, false, "", "ix")}, - {0x2179, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x217a, 0, 0, 0, g(Yes, No, false, false, "", "xi")}, - {0x217b, 0, 0, 0, g(Yes, No, false, false, "", "xii")}, - {0x217c, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x217d, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x217e, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x217f, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x2180, 0, 0, 0, f(Yes, false, "")}, - {0x2189, 0, 0, 0, g(Yes, No, false, false, "", "0⁄3")}, - {0x218a, 0, 0, 0, f(Yes, false, "")}, - {0x2190, 0, 0, 0, f(Yes, true, "")}, - {0x2191, 0, 0, 0, f(Yes, false, "")}, - {0x2192, 0, 0, 0, f(Yes, true, "")}, - {0x2193, 0, 0, 0, f(Yes, false, "")}, - {0x2194, 0, 0, 0, f(Yes, true, "")}, - {0x2195, 0, 0, 0, f(Yes, false, "")}, - {0x219a, 0, 0, 1, f(Yes, false, "↚")}, - {0x219b, 0, 0, 1, f(Yes, false, "↛")}, - {0x219c, 0, 0, 0, f(Yes, false, "")}, - {0x21ae, 0, 0, 1, f(Yes, false, "↮")}, - {0x21af, 0, 0, 0, f(Yes, false, "")}, - {0x21cd, 0, 0, 1, f(Yes, false, "⇍")}, - {0x21ce, 0, 0, 1, f(Yes, false, "⇎")}, - {0x21cf, 0, 0, 1, f(Yes, false, "⇏")}, - {0x21d0, 0, 0, 0, f(Yes, true, "")}, - {0x21d1, 0, 0, 0, f(Yes, false, "")}, - {0x21d2, 0, 0, 0, f(Yes, true, "")}, - {0x21d3, 0, 0, 0, f(Yes, false, "")}, - {0x21d4, 0, 0, 0, f(Yes, true, "")}, - {0x21d5, 0, 0, 0, f(Yes, false, "")}, - {0x2203, 0, 0, 0, f(Yes, true, "")}, - {0x2204, 0, 0, 1, f(Yes, false, "∄")}, - {0x2205, 0, 0, 0, f(Yes, false, "")}, - {0x2208, 0, 0, 0, f(Yes, true, "")}, - {0x2209, 0, 0, 1, f(Yes, false, "∉")}, - {0x220a, 0, 0, 0, f(Yes, false, "")}, - {0x220b, 0, 0, 0, f(Yes, true, "")}, - {0x220c, 0, 0, 1, f(Yes, false, "∌")}, - {0x220d, 0, 0, 0, f(Yes, false, "")}, - {0x2223, 0, 0, 0, f(Yes, true, "")}, - {0x2224, 0, 0, 1, f(Yes, false, "∤")}, - {0x2225, 0, 0, 0, f(Yes, true, "")}, - {0x2226, 0, 0, 1, f(Yes, false, "∦")}, - {0x2227, 0, 0, 0, f(Yes, false, "")}, - {0x222c, 0, 0, 0, g(Yes, No, false, false, "", "∫∫")}, - {0x222d, 0, 0, 0, g(Yes, No, false, false, "", "∫∫∫")}, - {0x222e, 0, 0, 0, f(Yes, false, "")}, - {0x222f, 0, 0, 0, g(Yes, No, false, false, "", "∮∮")}, - {0x2230, 0, 0, 0, g(Yes, No, false, false, "", "∮∮∮")}, - {0x2231, 0, 0, 0, f(Yes, false, "")}, - {0x223c, 0, 0, 0, f(Yes, true, "")}, - {0x223d, 0, 0, 0, f(Yes, false, "")}, - {0x2241, 0, 0, 1, f(Yes, false, "≁")}, - {0x2242, 0, 0, 0, f(Yes, false, "")}, - {0x2243, 0, 0, 0, f(Yes, true, "")}, - {0x2244, 0, 0, 1, f(Yes, false, "≄")}, - {0x2245, 0, 0, 0, f(Yes, true, "")}, - {0x2246, 0, 0, 0, f(Yes, false, "")}, - {0x2247, 0, 0, 1, f(Yes, false, "≇")}, - {0x2248, 0, 0, 0, f(Yes, true, "")}, - {0x2249, 0, 0, 1, f(Yes, false, "≉")}, - {0x224a, 0, 0, 0, f(Yes, false, "")}, - {0x224d, 0, 0, 0, f(Yes, true, "")}, - {0x224e, 0, 0, 0, f(Yes, false, "")}, - {0x2260, 0, 0, 1, f(Yes, false, "≠")}, - {0x2261, 0, 0, 0, f(Yes, true, "")}, - {0x2262, 0, 0, 1, f(Yes, false, "≢")}, - {0x2263, 0, 0, 0, f(Yes, false, "")}, - {0x2264, 0, 0, 0, f(Yes, true, "")}, - {0x2266, 0, 0, 0, f(Yes, false, "")}, - {0x226d, 0, 0, 1, f(Yes, false, "≭")}, - {0x226e, 0, 0, 1, f(Yes, false, "≮")}, - {0x226f, 0, 0, 1, f(Yes, false, "≯")}, - {0x2270, 0, 0, 1, f(Yes, false, "≰")}, - {0x2271, 0, 0, 1, f(Yes, false, "≱")}, - {0x2272, 0, 0, 0, f(Yes, true, "")}, - {0x2274, 0, 0, 1, f(Yes, false, "≴")}, - {0x2275, 0, 0, 1, f(Yes, false, "≵")}, - {0x2276, 0, 0, 0, f(Yes, true, "")}, - {0x2278, 0, 0, 1, f(Yes, false, "≸")}, - {0x2279, 0, 0, 1, f(Yes, false, "≹")}, - {0x227a, 0, 0, 0, f(Yes, true, "")}, - {0x227e, 0, 0, 0, f(Yes, false, "")}, - {0x2280, 0, 0, 1, f(Yes, false, "⊀")}, - {0x2281, 0, 0, 1, f(Yes, false, "⊁")}, - {0x2282, 0, 0, 0, f(Yes, true, "")}, - {0x2284, 0, 0, 1, f(Yes, false, "⊄")}, - {0x2285, 0, 0, 1, f(Yes, false, "⊅")}, - {0x2286, 0, 0, 0, f(Yes, true, "")}, - {0x2288, 0, 0, 1, f(Yes, false, "⊈")}, - {0x2289, 0, 0, 1, f(Yes, false, "⊉")}, - {0x228a, 0, 0, 0, f(Yes, false, "")}, - {0x2291, 0, 0, 0, f(Yes, true, "")}, - {0x2293, 0, 0, 0, f(Yes, false, "")}, - {0x22a2, 0, 0, 0, f(Yes, true, "")}, - {0x22a3, 0, 0, 0, f(Yes, false, "")}, - {0x22a8, 0, 0, 0, f(Yes, true, "")}, - {0x22aa, 0, 0, 0, f(Yes, false, "")}, - {0x22ab, 0, 0, 0, f(Yes, true, "")}, - {0x22ac, 0, 0, 1, f(Yes, false, "⊬")}, - {0x22ad, 0, 0, 1, f(Yes, false, "⊭")}, - {0x22ae, 0, 0, 1, f(Yes, false, "⊮")}, - {0x22af, 0, 0, 1, f(Yes, false, "⊯")}, - {0x22b0, 0, 0, 0, f(Yes, false, "")}, - {0x22b2, 0, 0, 0, f(Yes, true, "")}, - {0x22b6, 0, 0, 0, f(Yes, false, "")}, - {0x22e0, 0, 0, 1, f(Yes, false, "⋠")}, - {0x22e1, 0, 0, 1, f(Yes, false, "⋡")}, - {0x22e2, 0, 0, 1, f(Yes, false, "⋢")}, - {0x22e3, 0, 0, 1, f(Yes, false, "⋣")}, - {0x22e4, 0, 0, 0, f(Yes, false, "")}, - {0x22ea, 0, 0, 1, f(Yes, false, "⋪")}, - {0x22eb, 0, 0, 1, f(Yes, false, "⋫")}, - {0x22ec, 0, 0, 1, f(Yes, false, "⋬")}, - {0x22ed, 0, 0, 1, f(Yes, false, "⋭")}, - {0x22ee, 0, 0, 0, f(Yes, false, "")}, - {0x2329, 0, 0, 0, f(No, false, "〈")}, - {0x232a, 0, 0, 0, f(No, false, "〉")}, - {0x232b, 0, 0, 0, f(Yes, false, "")}, - {0x2460, 0, 0, 0, g(Yes, No, false, false, "", "1")}, - {0x2461, 0, 0, 0, g(Yes, No, false, false, "", "2")}, - {0x2462, 0, 0, 0, g(Yes, No, false, false, "", "3")}, - {0x2463, 0, 0, 0, g(Yes, No, false, false, "", "4")}, - {0x2464, 0, 0, 0, g(Yes, No, false, false, "", "5")}, - {0x2465, 0, 0, 0, g(Yes, No, false, false, "", "6")}, - {0x2466, 0, 0, 0, g(Yes, No, false, false, "", "7")}, - {0x2467, 0, 0, 0, g(Yes, No, false, false, "", "8")}, - {0x2468, 0, 0, 0, g(Yes, No, false, false, "", "9")}, - {0x2469, 0, 0, 0, g(Yes, No, false, false, "", "10")}, - {0x246a, 0, 0, 0, g(Yes, No, false, false, "", "11")}, - {0x246b, 0, 0, 0, g(Yes, No, false, false, "", "12")}, - {0x246c, 0, 0, 0, g(Yes, No, false, false, "", "13")}, - {0x246d, 0, 0, 0, g(Yes, No, false, false, "", "14")}, - {0x246e, 0, 0, 0, g(Yes, No, false, false, "", "15")}, - {0x246f, 0, 0, 0, g(Yes, No, false, false, "", "16")}, - {0x2470, 0, 0, 0, g(Yes, No, false, false, "", "17")}, - {0x2471, 0, 0, 0, g(Yes, No, false, false, "", "18")}, - {0x2472, 0, 0, 0, g(Yes, No, false, false, "", "19")}, - {0x2473, 0, 0, 0, g(Yes, No, false, false, "", "20")}, - {0x2474, 0, 0, 0, g(Yes, No, false, false, "", "(1)")}, - {0x2475, 0, 0, 0, g(Yes, No, false, false, "", "(2)")}, - {0x2476, 0, 0, 0, g(Yes, No, false, false, "", "(3)")}, - {0x2477, 0, 0, 0, g(Yes, No, false, false, "", "(4)")}, - {0x2478, 0, 0, 0, g(Yes, No, false, false, "", "(5)")}, - {0x2479, 0, 0, 0, g(Yes, No, false, false, "", "(6)")}, - {0x247a, 0, 0, 0, g(Yes, No, false, false, "", "(7)")}, - {0x247b, 0, 0, 0, g(Yes, No, false, false, "", "(8)")}, - {0x247c, 0, 0, 0, g(Yes, No, false, false, "", "(9)")}, - {0x247d, 0, 0, 0, g(Yes, No, false, false, "", "(10)")}, - {0x247e, 0, 0, 0, g(Yes, No, false, false, "", "(11)")}, - {0x247f, 0, 0, 0, g(Yes, No, false, false, "", "(12)")}, - {0x2480, 0, 0, 0, g(Yes, No, false, false, "", "(13)")}, - {0x2481, 0, 0, 0, g(Yes, No, false, false, "", "(14)")}, - {0x2482, 0, 0, 0, g(Yes, No, false, false, "", "(15)")}, - {0x2483, 0, 0, 0, g(Yes, No, false, false, "", "(16)")}, - {0x2484, 0, 0, 0, g(Yes, No, false, false, "", "(17)")}, - {0x2485, 0, 0, 0, g(Yes, No, false, false, "", "(18)")}, - {0x2486, 0, 0, 0, g(Yes, No, false, false, "", "(19)")}, - {0x2487, 0, 0, 0, g(Yes, No, false, false, "", "(20)")}, - {0x2488, 0, 0, 0, g(Yes, No, false, false, "", "1.")}, - {0x2489, 0, 0, 0, g(Yes, No, false, false, "", "2.")}, - {0x248a, 0, 0, 0, g(Yes, No, false, false, "", "3.")}, - {0x248b, 0, 0, 0, g(Yes, No, false, false, "", "4.")}, - {0x248c, 0, 0, 0, g(Yes, No, false, false, "", "5.")}, - {0x248d, 0, 0, 0, g(Yes, No, false, false, "", "6.")}, - {0x248e, 0, 0, 0, g(Yes, No, false, false, "", "7.")}, - {0x248f, 0, 0, 0, g(Yes, No, false, false, "", "8.")}, - {0x2490, 0, 0, 0, g(Yes, No, false, false, "", "9.")}, - {0x2491, 0, 0, 0, g(Yes, No, false, false, "", "10.")}, - {0x2492, 0, 0, 0, g(Yes, No, false, false, "", "11.")}, - {0x2493, 0, 0, 0, g(Yes, No, false, false, "", "12.")}, - {0x2494, 0, 0, 0, g(Yes, No, false, false, "", "13.")}, - {0x2495, 0, 0, 0, g(Yes, No, false, false, "", "14.")}, - {0x2496, 0, 0, 0, g(Yes, No, false, false, "", "15.")}, - {0x2497, 0, 0, 0, g(Yes, No, false, false, "", "16.")}, - {0x2498, 0, 0, 0, g(Yes, No, false, false, "", "17.")}, - {0x2499, 0, 0, 0, g(Yes, No, false, false, "", "18.")}, - {0x249a, 0, 0, 0, g(Yes, No, false, false, "", "19.")}, - {0x249b, 0, 0, 0, g(Yes, No, false, false, "", "20.")}, - {0x249c, 0, 0, 0, g(Yes, No, false, false, "", "(a)")}, - {0x249d, 0, 0, 0, g(Yes, No, false, false, "", "(b)")}, - {0x249e, 0, 0, 0, g(Yes, No, false, false, "", "(c)")}, - {0x249f, 0, 0, 0, g(Yes, No, false, false, "", "(d)")}, - {0x24a0, 0, 0, 0, g(Yes, No, false, false, "", "(e)")}, - {0x24a1, 0, 0, 0, g(Yes, No, false, false, "", "(f)")}, - {0x24a2, 0, 0, 0, g(Yes, No, false, false, "", "(g)")}, - {0x24a3, 0, 0, 0, g(Yes, No, false, false, "", "(h)")}, - {0x24a4, 0, 0, 0, g(Yes, No, false, false, "", "(i)")}, - {0x24a5, 0, 0, 0, g(Yes, No, false, false, "", "(j)")}, - {0x24a6, 0, 0, 0, g(Yes, No, false, false, "", "(k)")}, - {0x24a7, 0, 0, 0, g(Yes, No, false, false, "", "(l)")}, - {0x24a8, 0, 0, 0, g(Yes, No, false, false, "", "(m)")}, - {0x24a9, 0, 0, 0, g(Yes, No, false, false, "", "(n)")}, - {0x24aa, 0, 0, 0, g(Yes, No, false, false, "", "(o)")}, - {0x24ab, 0, 0, 0, g(Yes, No, false, false, "", "(p)")}, - {0x24ac, 0, 0, 0, g(Yes, No, false, false, "", "(q)")}, - {0x24ad, 0, 0, 0, g(Yes, No, false, false, "", "(r)")}, - {0x24ae, 0, 0, 0, g(Yes, No, false, false, "", "(s)")}, - {0x24af, 0, 0, 0, g(Yes, No, false, false, "", "(t)")}, - {0x24b0, 0, 0, 0, g(Yes, No, false, false, "", "(u)")}, - {0x24b1, 0, 0, 0, g(Yes, No, false, false, "", "(v)")}, - {0x24b2, 0, 0, 0, g(Yes, No, false, false, "", "(w)")}, - {0x24b3, 0, 0, 0, g(Yes, No, false, false, "", "(x)")}, - {0x24b4, 0, 0, 0, g(Yes, No, false, false, "", "(y)")}, - {0x24b5, 0, 0, 0, g(Yes, No, false, false, "", "(z)")}, - {0x24b6, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x24b7, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x24b8, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x24b9, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x24ba, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x24bb, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x24bc, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x24bd, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x24be, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x24bf, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x24c0, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x24c1, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x24c2, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x24c3, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x24c4, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x24c5, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x24c6, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x24c7, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x24c8, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x24c9, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x24ca, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x24cb, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x24cc, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x24cd, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x24ce, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x24cf, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x24d0, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x24d1, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x24d2, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x24d3, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x24d4, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x24d5, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x24d6, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x24d7, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x24d8, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x24d9, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x24da, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x24db, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x24dc, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x24dd, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x24de, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x24df, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x24e0, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x24e1, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x24e2, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x24e3, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x24e4, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x24e5, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x24e6, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x24e7, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x24e8, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x24e9, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x24ea, 0, 0, 0, g(Yes, No, false, false, "", "0")}, - {0x24eb, 0, 0, 0, f(Yes, false, "")}, - {0x2a0c, 0, 0, 0, g(Yes, No, false, false, "", "∫∫∫∫")}, - {0x2a0d, 0, 0, 0, f(Yes, false, "")}, - {0x2a74, 0, 0, 0, g(Yes, No, false, false, "", "::=")}, - {0x2a75, 0, 0, 0, g(Yes, No, false, false, "", "==")}, - {0x2a76, 0, 0, 0, g(Yes, No, false, false, "", "===")}, - {0x2a77, 0, 0, 0, f(Yes, false, "")}, - {0x2adc, 0, 0, 1, f(No, false, "⫝̸")}, - {0x2add, 0, 0, 0, f(Yes, false, "")}, - {0x2c7c, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x2c7d, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x2c7e, 0, 0, 0, f(Yes, false, "")}, - {0x2cef, 230, 1, 1, f(Yes, false, "")}, - {0x2cf2, 0, 0, 0, f(Yes, false, "")}, - {0x2d6f, 0, 0, 0, g(Yes, No, false, false, "", "ⵡ")}, - {0x2d70, 0, 0, 0, f(Yes, false, "")}, - {0x2d7f, 9, 1, 1, f(Yes, false, "")}, - {0x2d80, 0, 0, 0, f(Yes, false, "")}, - {0x2de0, 230, 1, 1, f(Yes, false, "")}, - {0x2e00, 0, 0, 0, f(Yes, false, "")}, - {0x2e9f, 0, 0, 0, g(Yes, No, false, false, "", "母")}, - {0x2ea0, 0, 0, 0, f(Yes, false, "")}, - {0x2ef3, 0, 0, 0, g(Yes, No, false, false, "", "龟")}, - {0x2ef4, 0, 0, 0, f(Yes, false, "")}, - {0x2f00, 0, 0, 0, g(Yes, No, false, false, "", "一")}, - {0x2f01, 0, 0, 0, g(Yes, No, false, false, "", "丨")}, - {0x2f02, 0, 0, 0, g(Yes, No, false, false, "", "丶")}, - {0x2f03, 0, 0, 0, g(Yes, No, false, false, "", "丿")}, - {0x2f04, 0, 0, 0, g(Yes, No, false, false, "", "乙")}, - {0x2f05, 0, 0, 0, g(Yes, No, false, false, "", "亅")}, - {0x2f06, 0, 0, 0, g(Yes, No, false, false, "", "二")}, - {0x2f07, 0, 0, 0, g(Yes, No, false, false, "", "亠")}, - {0x2f08, 0, 0, 0, g(Yes, No, false, false, "", "人")}, - {0x2f09, 0, 0, 0, g(Yes, No, false, false, "", "儿")}, - {0x2f0a, 0, 0, 0, g(Yes, No, false, false, "", "入")}, - {0x2f0b, 0, 0, 0, g(Yes, No, false, false, "", "八")}, - {0x2f0c, 0, 0, 0, g(Yes, No, false, false, "", "冂")}, - {0x2f0d, 0, 0, 0, g(Yes, No, false, false, "", "冖")}, - {0x2f0e, 0, 0, 0, g(Yes, No, false, false, "", "冫")}, - {0x2f0f, 0, 0, 0, g(Yes, No, false, false, "", "几")}, - {0x2f10, 0, 0, 0, g(Yes, No, false, false, "", "凵")}, - {0x2f11, 0, 0, 0, g(Yes, No, false, false, "", "刀")}, - {0x2f12, 0, 0, 0, g(Yes, No, false, false, "", "力")}, - {0x2f13, 0, 0, 0, g(Yes, No, false, false, "", "勹")}, - {0x2f14, 0, 0, 0, g(Yes, No, false, false, "", "匕")}, - {0x2f15, 0, 0, 0, g(Yes, No, false, false, "", "匚")}, - {0x2f16, 0, 0, 0, g(Yes, No, false, false, "", "匸")}, - {0x2f17, 0, 0, 0, g(Yes, No, false, false, "", "十")}, - {0x2f18, 0, 0, 0, g(Yes, No, false, false, "", "卜")}, - {0x2f19, 0, 0, 0, g(Yes, No, false, false, "", "卩")}, - {0x2f1a, 0, 0, 0, g(Yes, No, false, false, "", "厂")}, - {0x2f1b, 0, 0, 0, g(Yes, No, false, false, "", "厶")}, - {0x2f1c, 0, 0, 0, g(Yes, No, false, false, "", "又")}, - {0x2f1d, 0, 0, 0, g(Yes, No, false, false, "", "口")}, - {0x2f1e, 0, 0, 0, g(Yes, No, false, false, "", "囗")}, - {0x2f1f, 0, 0, 0, g(Yes, No, false, false, "", "土")}, - {0x2f20, 0, 0, 0, g(Yes, No, false, false, "", "士")}, - {0x2f21, 0, 0, 0, g(Yes, No, false, false, "", "夂")}, - {0x2f22, 0, 0, 0, g(Yes, No, false, false, "", "夊")}, - {0x2f23, 0, 0, 0, g(Yes, No, false, false, "", "夕")}, - {0x2f24, 0, 0, 0, g(Yes, No, false, false, "", "大")}, - {0x2f25, 0, 0, 0, g(Yes, No, false, false, "", "女")}, - {0x2f26, 0, 0, 0, g(Yes, No, false, false, "", "子")}, - {0x2f27, 0, 0, 0, g(Yes, No, false, false, "", "宀")}, - {0x2f28, 0, 0, 0, g(Yes, No, false, false, "", "寸")}, - {0x2f29, 0, 0, 0, g(Yes, No, false, false, "", "小")}, - {0x2f2a, 0, 0, 0, g(Yes, No, false, false, "", "尢")}, - {0x2f2b, 0, 0, 0, g(Yes, No, false, false, "", "尸")}, - {0x2f2c, 0, 0, 0, g(Yes, No, false, false, "", "屮")}, - {0x2f2d, 0, 0, 0, g(Yes, No, false, false, "", "山")}, - {0x2f2e, 0, 0, 0, g(Yes, No, false, false, "", "巛")}, - {0x2f2f, 0, 0, 0, g(Yes, No, false, false, "", "工")}, - {0x2f30, 0, 0, 0, g(Yes, No, false, false, "", "己")}, - {0x2f31, 0, 0, 0, g(Yes, No, false, false, "", "巾")}, - {0x2f32, 0, 0, 0, g(Yes, No, false, false, "", "干")}, - {0x2f33, 0, 0, 0, g(Yes, No, false, false, "", "幺")}, - {0x2f34, 0, 0, 0, g(Yes, No, false, false, "", "广")}, - {0x2f35, 0, 0, 0, g(Yes, No, false, false, "", "廴")}, - {0x2f36, 0, 0, 0, g(Yes, No, false, false, "", "廾")}, - {0x2f37, 0, 0, 0, g(Yes, No, false, false, "", "弋")}, - {0x2f38, 0, 0, 0, g(Yes, No, false, false, "", "弓")}, - {0x2f39, 0, 0, 0, g(Yes, No, false, false, "", "彐")}, - {0x2f3a, 0, 0, 0, g(Yes, No, false, false, "", "彡")}, - {0x2f3b, 0, 0, 0, g(Yes, No, false, false, "", "彳")}, - {0x2f3c, 0, 0, 0, g(Yes, No, false, false, "", "心")}, - {0x2f3d, 0, 0, 0, g(Yes, No, false, false, "", "戈")}, - {0x2f3e, 0, 0, 0, g(Yes, No, false, false, "", "戶")}, - {0x2f3f, 0, 0, 0, g(Yes, No, false, false, "", "手")}, - {0x2f40, 0, 0, 0, g(Yes, No, false, false, "", "支")}, - {0x2f41, 0, 0, 0, g(Yes, No, false, false, "", "攴")}, - {0x2f42, 0, 0, 0, g(Yes, No, false, false, "", "文")}, - {0x2f43, 0, 0, 0, g(Yes, No, false, false, "", "斗")}, - {0x2f44, 0, 0, 0, g(Yes, No, false, false, "", "斤")}, - {0x2f45, 0, 0, 0, g(Yes, No, false, false, "", "方")}, - {0x2f46, 0, 0, 0, g(Yes, No, false, false, "", "无")}, - {0x2f47, 0, 0, 0, g(Yes, No, false, false, "", "日")}, - {0x2f48, 0, 0, 0, g(Yes, No, false, false, "", "曰")}, - {0x2f49, 0, 0, 0, g(Yes, No, false, false, "", "月")}, - {0x2f4a, 0, 0, 0, g(Yes, No, false, false, "", "木")}, - {0x2f4b, 0, 0, 0, g(Yes, No, false, false, "", "欠")}, - {0x2f4c, 0, 0, 0, g(Yes, No, false, false, "", "止")}, - {0x2f4d, 0, 0, 0, g(Yes, No, false, false, "", "歹")}, - {0x2f4e, 0, 0, 0, g(Yes, No, false, false, "", "殳")}, - {0x2f4f, 0, 0, 0, g(Yes, No, false, false, "", "毋")}, - {0x2f50, 0, 0, 0, g(Yes, No, false, false, "", "比")}, - {0x2f51, 0, 0, 0, g(Yes, No, false, false, "", "毛")}, - {0x2f52, 0, 0, 0, g(Yes, No, false, false, "", "氏")}, - {0x2f53, 0, 0, 0, g(Yes, No, false, false, "", "气")}, - {0x2f54, 0, 0, 0, g(Yes, No, false, false, "", "水")}, - {0x2f55, 0, 0, 0, g(Yes, No, false, false, "", "火")}, - {0x2f56, 0, 0, 0, g(Yes, No, false, false, "", "爪")}, - {0x2f57, 0, 0, 0, g(Yes, No, false, false, "", "父")}, - {0x2f58, 0, 0, 0, g(Yes, No, false, false, "", "爻")}, - {0x2f59, 0, 0, 0, g(Yes, No, false, false, "", "爿")}, - {0x2f5a, 0, 0, 0, g(Yes, No, false, false, "", "片")}, - {0x2f5b, 0, 0, 0, g(Yes, No, false, false, "", "牙")}, - {0x2f5c, 0, 0, 0, g(Yes, No, false, false, "", "牛")}, - {0x2f5d, 0, 0, 0, g(Yes, No, false, false, "", "犬")}, - {0x2f5e, 0, 0, 0, g(Yes, No, false, false, "", "玄")}, - {0x2f5f, 0, 0, 0, g(Yes, No, false, false, "", "玉")}, - {0x2f60, 0, 0, 0, g(Yes, No, false, false, "", "瓜")}, - {0x2f61, 0, 0, 0, g(Yes, No, false, false, "", "瓦")}, - {0x2f62, 0, 0, 0, g(Yes, No, false, false, "", "甘")}, - {0x2f63, 0, 0, 0, g(Yes, No, false, false, "", "生")}, - {0x2f64, 0, 0, 0, g(Yes, No, false, false, "", "用")}, - {0x2f65, 0, 0, 0, g(Yes, No, false, false, "", "田")}, - {0x2f66, 0, 0, 0, g(Yes, No, false, false, "", "疋")}, - {0x2f67, 0, 0, 0, g(Yes, No, false, false, "", "疒")}, - {0x2f68, 0, 0, 0, g(Yes, No, false, false, "", "癶")}, - {0x2f69, 0, 0, 0, g(Yes, No, false, false, "", "白")}, - {0x2f6a, 0, 0, 0, g(Yes, No, false, false, "", "皮")}, - {0x2f6b, 0, 0, 0, g(Yes, No, false, false, "", "皿")}, - {0x2f6c, 0, 0, 0, g(Yes, No, false, false, "", "目")}, - {0x2f6d, 0, 0, 0, g(Yes, No, false, false, "", "矛")}, - {0x2f6e, 0, 0, 0, g(Yes, No, false, false, "", "矢")}, - {0x2f6f, 0, 0, 0, g(Yes, No, false, false, "", "石")}, - {0x2f70, 0, 0, 0, g(Yes, No, false, false, "", "示")}, - {0x2f71, 0, 0, 0, g(Yes, No, false, false, "", "禸")}, - {0x2f72, 0, 0, 0, g(Yes, No, false, false, "", "禾")}, - {0x2f73, 0, 0, 0, g(Yes, No, false, false, "", "穴")}, - {0x2f74, 0, 0, 0, g(Yes, No, false, false, "", "立")}, - {0x2f75, 0, 0, 0, g(Yes, No, false, false, "", "竹")}, - {0x2f76, 0, 0, 0, g(Yes, No, false, false, "", "米")}, - {0x2f77, 0, 0, 0, g(Yes, No, false, false, "", "糸")}, - {0x2f78, 0, 0, 0, g(Yes, No, false, false, "", "缶")}, - {0x2f79, 0, 0, 0, g(Yes, No, false, false, "", "网")}, - {0x2f7a, 0, 0, 0, g(Yes, No, false, false, "", "羊")}, - {0x2f7b, 0, 0, 0, g(Yes, No, false, false, "", "羽")}, - {0x2f7c, 0, 0, 0, g(Yes, No, false, false, "", "老")}, - {0x2f7d, 0, 0, 0, g(Yes, No, false, false, "", "而")}, - {0x2f7e, 0, 0, 0, g(Yes, No, false, false, "", "耒")}, - {0x2f7f, 0, 0, 0, g(Yes, No, false, false, "", "耳")}, - {0x2f80, 0, 0, 0, g(Yes, No, false, false, "", "聿")}, - {0x2f81, 0, 0, 0, g(Yes, No, false, false, "", "肉")}, - {0x2f82, 0, 0, 0, g(Yes, No, false, false, "", "臣")}, - {0x2f83, 0, 0, 0, g(Yes, No, false, false, "", "自")}, - {0x2f84, 0, 0, 0, g(Yes, No, false, false, "", "至")}, - {0x2f85, 0, 0, 0, g(Yes, No, false, false, "", "臼")}, - {0x2f86, 0, 0, 0, g(Yes, No, false, false, "", "舌")}, - {0x2f87, 0, 0, 0, g(Yes, No, false, false, "", "舛")}, - {0x2f88, 0, 0, 0, g(Yes, No, false, false, "", "舟")}, - {0x2f89, 0, 0, 0, g(Yes, No, false, false, "", "艮")}, - {0x2f8a, 0, 0, 0, g(Yes, No, false, false, "", "色")}, - {0x2f8b, 0, 0, 0, g(Yes, No, false, false, "", "艸")}, - {0x2f8c, 0, 0, 0, g(Yes, No, false, false, "", "虍")}, - {0x2f8d, 0, 0, 0, g(Yes, No, false, false, "", "虫")}, - {0x2f8e, 0, 0, 0, g(Yes, No, false, false, "", "血")}, - {0x2f8f, 0, 0, 0, g(Yes, No, false, false, "", "行")}, - {0x2f90, 0, 0, 0, g(Yes, No, false, false, "", "衣")}, - {0x2f91, 0, 0, 0, g(Yes, No, false, false, "", "襾")}, - {0x2f92, 0, 0, 0, g(Yes, No, false, false, "", "見")}, - {0x2f93, 0, 0, 0, g(Yes, No, false, false, "", "角")}, - {0x2f94, 0, 0, 0, g(Yes, No, false, false, "", "言")}, - {0x2f95, 0, 0, 0, g(Yes, No, false, false, "", "谷")}, - {0x2f96, 0, 0, 0, g(Yes, No, false, false, "", "豆")}, - {0x2f97, 0, 0, 0, g(Yes, No, false, false, "", "豕")}, - {0x2f98, 0, 0, 0, g(Yes, No, false, false, "", "豸")}, - {0x2f99, 0, 0, 0, g(Yes, No, false, false, "", "貝")}, - {0x2f9a, 0, 0, 0, g(Yes, No, false, false, "", "赤")}, - {0x2f9b, 0, 0, 0, g(Yes, No, false, false, "", "走")}, - {0x2f9c, 0, 0, 0, g(Yes, No, false, false, "", "足")}, - {0x2f9d, 0, 0, 0, g(Yes, No, false, false, "", "身")}, - {0x2f9e, 0, 0, 0, g(Yes, No, false, false, "", "車")}, - {0x2f9f, 0, 0, 0, g(Yes, No, false, false, "", "辛")}, - {0x2fa0, 0, 0, 0, g(Yes, No, false, false, "", "辰")}, - {0x2fa1, 0, 0, 0, g(Yes, No, false, false, "", "辵")}, - {0x2fa2, 0, 0, 0, g(Yes, No, false, false, "", "邑")}, - {0x2fa3, 0, 0, 0, g(Yes, No, false, false, "", "酉")}, - {0x2fa4, 0, 0, 0, g(Yes, No, false, false, "", "釆")}, - {0x2fa5, 0, 0, 0, g(Yes, No, false, false, "", "里")}, - {0x2fa6, 0, 0, 0, g(Yes, No, false, false, "", "金")}, - {0x2fa7, 0, 0, 0, g(Yes, No, false, false, "", "長")}, - {0x2fa8, 0, 0, 0, g(Yes, No, false, false, "", "門")}, - {0x2fa9, 0, 0, 0, g(Yes, No, false, false, "", "阜")}, - {0x2faa, 0, 0, 0, g(Yes, No, false, false, "", "隶")}, - {0x2fab, 0, 0, 0, g(Yes, No, false, false, "", "隹")}, - {0x2fac, 0, 0, 0, g(Yes, No, false, false, "", "雨")}, - {0x2fad, 0, 0, 0, g(Yes, No, false, false, "", "靑")}, - {0x2fae, 0, 0, 0, g(Yes, No, false, false, "", "非")}, - {0x2faf, 0, 0, 0, g(Yes, No, false, false, "", "面")}, - {0x2fb0, 0, 0, 0, g(Yes, No, false, false, "", "革")}, - {0x2fb1, 0, 0, 0, g(Yes, No, false, false, "", "韋")}, - {0x2fb2, 0, 0, 0, g(Yes, No, false, false, "", "韭")}, - {0x2fb3, 0, 0, 0, g(Yes, No, false, false, "", "音")}, - {0x2fb4, 0, 0, 0, g(Yes, No, false, false, "", "頁")}, - {0x2fb5, 0, 0, 0, g(Yes, No, false, false, "", "風")}, - {0x2fb6, 0, 0, 0, g(Yes, No, false, false, "", "飛")}, - {0x2fb7, 0, 0, 0, g(Yes, No, false, false, "", "食")}, - {0x2fb8, 0, 0, 0, g(Yes, No, false, false, "", "首")}, - {0x2fb9, 0, 0, 0, g(Yes, No, false, false, "", "香")}, - {0x2fba, 0, 0, 0, g(Yes, No, false, false, "", "馬")}, - {0x2fbb, 0, 0, 0, g(Yes, No, false, false, "", "骨")}, - {0x2fbc, 0, 0, 0, g(Yes, No, false, false, "", "高")}, - {0x2fbd, 0, 0, 0, g(Yes, No, false, false, "", "髟")}, - {0x2fbe, 0, 0, 0, g(Yes, No, false, false, "", "鬥")}, - {0x2fbf, 0, 0, 0, g(Yes, No, false, false, "", "鬯")}, - {0x2fc0, 0, 0, 0, g(Yes, No, false, false, "", "鬲")}, - {0x2fc1, 0, 0, 0, g(Yes, No, false, false, "", "鬼")}, - {0x2fc2, 0, 0, 0, g(Yes, No, false, false, "", "魚")}, - {0x2fc3, 0, 0, 0, g(Yes, No, false, false, "", "鳥")}, - {0x2fc4, 0, 0, 0, g(Yes, No, false, false, "", "鹵")}, - {0x2fc5, 0, 0, 0, g(Yes, No, false, false, "", "鹿")}, - {0x2fc6, 0, 0, 0, g(Yes, No, false, false, "", "麥")}, - {0x2fc7, 0, 0, 0, g(Yes, No, false, false, "", "麻")}, - {0x2fc8, 0, 0, 0, g(Yes, No, false, false, "", "黃")}, - {0x2fc9, 0, 0, 0, g(Yes, No, false, false, "", "黍")}, - {0x2fca, 0, 0, 0, g(Yes, No, false, false, "", "黑")}, - {0x2fcb, 0, 0, 0, g(Yes, No, false, false, "", "黹")}, - {0x2fcc, 0, 0, 0, g(Yes, No, false, false, "", "黽")}, - {0x2fcd, 0, 0, 0, g(Yes, No, false, false, "", "鼎")}, - {0x2fce, 0, 0, 0, g(Yes, No, false, false, "", "鼓")}, - {0x2fcf, 0, 0, 0, g(Yes, No, false, false, "", "鼠")}, - {0x2fd0, 0, 0, 0, g(Yes, No, false, false, "", "鼻")}, - {0x2fd1, 0, 0, 0, g(Yes, No, false, false, "", "齊")}, - {0x2fd2, 0, 0, 0, g(Yes, No, false, false, "", "齒")}, - {0x2fd3, 0, 0, 0, g(Yes, No, false, false, "", "龍")}, - {0x2fd4, 0, 0, 0, g(Yes, No, false, false, "", "龜")}, - {0x2fd5, 0, 0, 0, g(Yes, No, false, false, "", "龠")}, - {0x2fd6, 0, 0, 0, f(Yes, false, "")}, - {0x3000, 0, 0, 0, g(Yes, No, false, false, "", " ")}, - {0x3001, 0, 0, 0, f(Yes, false, "")}, - {0x302a, 218, 1, 1, f(Yes, false, "")}, - {0x302b, 228, 1, 1, f(Yes, false, "")}, - {0x302c, 232, 1, 1, f(Yes, false, "")}, - {0x302d, 222, 1, 1, f(Yes, false, "")}, - {0x302e, 224, 1, 1, f(Yes, false, "")}, - {0x3030, 0, 0, 0, f(Yes, false, "")}, - {0x3036, 0, 0, 0, g(Yes, No, false, false, "", "〒")}, - {0x3037, 0, 0, 0, f(Yes, false, "")}, - {0x3038, 0, 0, 0, g(Yes, No, false, false, "", "十")}, - {0x3039, 0, 0, 0, g(Yes, No, false, false, "", "卄")}, - {0x303a, 0, 0, 0, g(Yes, No, false, false, "", "卅")}, - {0x303b, 0, 0, 0, f(Yes, false, "")}, - {0x3046, 0, 0, 0, f(Yes, true, "")}, - {0x3047, 0, 0, 0, f(Yes, false, "")}, - {0x304b, 0, 0, 0, f(Yes, true, "")}, - {0x304c, 0, 0, 1, f(Yes, false, "が")}, - {0x304d, 0, 0, 0, f(Yes, true, "")}, - {0x304e, 0, 0, 1, f(Yes, false, "ぎ")}, - {0x304f, 0, 0, 0, f(Yes, true, "")}, - {0x3050, 0, 0, 1, f(Yes, false, "ぐ")}, - {0x3051, 0, 0, 0, f(Yes, true, "")}, - {0x3052, 0, 0, 1, f(Yes, false, "げ")}, - {0x3053, 0, 0, 0, f(Yes, true, "")}, - {0x3054, 0, 0, 1, f(Yes, false, "ご")}, - {0x3055, 0, 0, 0, f(Yes, true, "")}, - {0x3056, 0, 0, 1, f(Yes, false, "ざ")}, - {0x3057, 0, 0, 0, f(Yes, true, "")}, - {0x3058, 0, 0, 1, f(Yes, false, "じ")}, - {0x3059, 0, 0, 0, f(Yes, true, "")}, - {0x305a, 0, 0, 1, f(Yes, false, "ず")}, - {0x305b, 0, 0, 0, f(Yes, true, "")}, - {0x305c, 0, 0, 1, f(Yes, false, "ぜ")}, - {0x305d, 0, 0, 0, f(Yes, true, "")}, - {0x305e, 0, 0, 1, f(Yes, false, "ぞ")}, - {0x305f, 0, 0, 0, f(Yes, true, "")}, - {0x3060, 0, 0, 1, f(Yes, false, "だ")}, - {0x3061, 0, 0, 0, f(Yes, true, "")}, - {0x3062, 0, 0, 1, f(Yes, false, "ぢ")}, - {0x3063, 0, 0, 0, f(Yes, false, "")}, - {0x3064, 0, 0, 0, f(Yes, true, "")}, - {0x3065, 0, 0, 1, f(Yes, false, "づ")}, - {0x3066, 0, 0, 0, f(Yes, true, "")}, - {0x3067, 0, 0, 1, f(Yes, false, "で")}, - {0x3068, 0, 0, 0, f(Yes, true, "")}, - {0x3069, 0, 0, 1, f(Yes, false, "ど")}, - {0x306a, 0, 0, 0, f(Yes, false, "")}, - {0x306f, 0, 0, 0, f(Yes, true, "")}, - {0x3070, 0, 0, 1, f(Yes, false, "ば")}, - {0x3071, 0, 0, 1, f(Yes, false, "ぱ")}, - {0x3072, 0, 0, 0, f(Yes, true, "")}, - {0x3073, 0, 0, 1, f(Yes, false, "び")}, - {0x3074, 0, 0, 1, f(Yes, false, "ぴ")}, - {0x3075, 0, 0, 0, f(Yes, true, "")}, - {0x3076, 0, 0, 1, f(Yes, false, "ぶ")}, - {0x3077, 0, 0, 1, f(Yes, false, "ぷ")}, - {0x3078, 0, 0, 0, f(Yes, true, "")}, - {0x3079, 0, 0, 1, f(Yes, false, "べ")}, - {0x307a, 0, 0, 1, f(Yes, false, "ぺ")}, - {0x307b, 0, 0, 0, f(Yes, true, "")}, - {0x307c, 0, 0, 1, f(Yes, false, "ぼ")}, - {0x307d, 0, 0, 1, f(Yes, false, "ぽ")}, - {0x307e, 0, 0, 0, f(Yes, false, "")}, - {0x3094, 0, 0, 1, f(Yes, false, "ゔ")}, - {0x3095, 0, 0, 0, f(Yes, false, "")}, - {0x3099, 8, 1, 1, f(Maybe, false, "")}, - {0x309b, 0, 0, 1, g(Yes, No, false, false, "", " ゙")}, - {0x309c, 0, 0, 1, g(Yes, No, false, false, "", " ゚")}, - {0x309d, 0, 0, 0, f(Yes, true, "")}, - {0x309e, 0, 0, 1, f(Yes, false, "ゞ")}, - {0x309f, 0, 0, 0, g(Yes, No, false, false, "", "より")}, - {0x30a0, 0, 0, 0, f(Yes, false, "")}, - {0x30a6, 0, 0, 0, f(Yes, true, "")}, - {0x30a7, 0, 0, 0, f(Yes, false, "")}, - {0x30ab, 0, 0, 0, f(Yes, true, "")}, - {0x30ac, 0, 0, 1, f(Yes, false, "ガ")}, - {0x30ad, 0, 0, 0, f(Yes, true, "")}, - {0x30ae, 0, 0, 1, f(Yes, false, "ギ")}, - {0x30af, 0, 0, 0, f(Yes, true, "")}, - {0x30b0, 0, 0, 1, f(Yes, false, "グ")}, - {0x30b1, 0, 0, 0, f(Yes, true, "")}, - {0x30b2, 0, 0, 1, f(Yes, false, "ゲ")}, - {0x30b3, 0, 0, 0, f(Yes, true, "")}, - {0x30b4, 0, 0, 1, f(Yes, false, "ゴ")}, - {0x30b5, 0, 0, 0, f(Yes, true, "")}, - {0x30b6, 0, 0, 1, f(Yes, false, "ザ")}, - {0x30b7, 0, 0, 0, f(Yes, true, "")}, - {0x30b8, 0, 0, 1, f(Yes, false, "ジ")}, - {0x30b9, 0, 0, 0, f(Yes, true, "")}, - {0x30ba, 0, 0, 1, f(Yes, false, "ズ")}, - {0x30bb, 0, 0, 0, f(Yes, true, "")}, - {0x30bc, 0, 0, 1, f(Yes, false, "ゼ")}, - {0x30bd, 0, 0, 0, f(Yes, true, "")}, - {0x30be, 0, 0, 1, f(Yes, false, "ゾ")}, - {0x30bf, 0, 0, 0, f(Yes, true, "")}, - {0x30c0, 0, 0, 1, f(Yes, false, "ダ")}, - {0x30c1, 0, 0, 0, f(Yes, true, "")}, - {0x30c2, 0, 0, 1, f(Yes, false, "ヂ")}, - {0x30c3, 0, 0, 0, f(Yes, false, "")}, - {0x30c4, 0, 0, 0, f(Yes, true, "")}, - {0x30c5, 0, 0, 1, f(Yes, false, "ヅ")}, - {0x30c6, 0, 0, 0, f(Yes, true, "")}, - {0x30c7, 0, 0, 1, f(Yes, false, "デ")}, - {0x30c8, 0, 0, 0, f(Yes, true, "")}, - {0x30c9, 0, 0, 1, f(Yes, false, "ド")}, - {0x30ca, 0, 0, 0, f(Yes, false, "")}, - {0x30cf, 0, 0, 0, f(Yes, true, "")}, - {0x30d0, 0, 0, 1, f(Yes, false, "バ")}, - {0x30d1, 0, 0, 1, f(Yes, false, "パ")}, - {0x30d2, 0, 0, 0, f(Yes, true, "")}, - {0x30d3, 0, 0, 1, f(Yes, false, "ビ")}, - {0x30d4, 0, 0, 1, f(Yes, false, "ピ")}, - {0x30d5, 0, 0, 0, f(Yes, true, "")}, - {0x30d6, 0, 0, 1, f(Yes, false, "ブ")}, - {0x30d7, 0, 0, 1, f(Yes, false, "プ")}, - {0x30d8, 0, 0, 0, f(Yes, true, "")}, - {0x30d9, 0, 0, 1, f(Yes, false, "ベ")}, - {0x30da, 0, 0, 1, f(Yes, false, "ペ")}, - {0x30db, 0, 0, 0, f(Yes, true, "")}, - {0x30dc, 0, 0, 1, f(Yes, false, "ボ")}, - {0x30dd, 0, 0, 1, f(Yes, false, "ポ")}, - {0x30de, 0, 0, 0, f(Yes, false, "")}, - {0x30ef, 0, 0, 0, f(Yes, true, "")}, - {0x30f3, 0, 0, 0, f(Yes, false, "")}, - {0x30f4, 0, 0, 1, f(Yes, false, "ヴ")}, - {0x30f5, 0, 0, 0, f(Yes, false, "")}, - {0x30f7, 0, 0, 1, f(Yes, false, "ヷ")}, - {0x30f8, 0, 0, 1, f(Yes, false, "ヸ")}, - {0x30f9, 0, 0, 1, f(Yes, false, "ヹ")}, - {0x30fa, 0, 0, 1, f(Yes, false, "ヺ")}, - {0x30fb, 0, 0, 0, f(Yes, false, "")}, - {0x30fd, 0, 0, 0, f(Yes, true, "")}, - {0x30fe, 0, 0, 1, f(Yes, false, "ヾ")}, - {0x30ff, 0, 0, 0, g(Yes, No, false, false, "", "コト")}, - {0x3100, 0, 0, 0, f(Yes, false, "")}, - {0x3131, 0, 0, 0, g(Yes, No, false, false, "", "ᄀ")}, - {0x3132, 0, 0, 0, g(Yes, No, false, false, "", "ᄁ")}, - {0x3133, 0, 1, 1, g(Yes, No, false, false, "", "ᆪ")}, - {0x3134, 0, 0, 0, g(Yes, No, false, false, "", "ᄂ")}, - {0x3135, 0, 1, 1, g(Yes, No, false, false, "", "ᆬ")}, - {0x3136, 0, 1, 1, g(Yes, No, false, false, "", "ᆭ")}, - {0x3137, 0, 0, 0, g(Yes, No, false, false, "", "ᄃ")}, - {0x3138, 0, 0, 0, g(Yes, No, false, false, "", "ᄄ")}, - {0x3139, 0, 0, 0, g(Yes, No, false, false, "", "ᄅ")}, - {0x313a, 0, 1, 1, g(Yes, No, false, false, "", "ᆰ")}, - {0x313b, 0, 1, 1, g(Yes, No, false, false, "", "ᆱ")}, - {0x313c, 0, 1, 1, g(Yes, No, false, false, "", "ᆲ")}, - {0x313d, 0, 1, 1, g(Yes, No, false, false, "", "ᆳ")}, - {0x313e, 0, 1, 1, g(Yes, No, false, false, "", "ᆴ")}, - {0x313f, 0, 1, 1, g(Yes, No, false, false, "", "ᆵ")}, - {0x3140, 0, 0, 0, g(Yes, No, false, false, "", "ᄚ")}, - {0x3141, 0, 0, 0, g(Yes, No, false, false, "", "ᄆ")}, - {0x3142, 0, 0, 0, g(Yes, No, false, false, "", "ᄇ")}, - {0x3143, 0, 0, 0, g(Yes, No, false, false, "", "ᄈ")}, - {0x3144, 0, 0, 0, g(Yes, No, false, false, "", "ᄡ")}, - {0x3145, 0, 0, 0, g(Yes, No, false, false, "", "ᄉ")}, - {0x3146, 0, 0, 0, g(Yes, No, false, false, "", "ᄊ")}, - {0x3147, 0, 0, 0, g(Yes, No, false, false, "", "ᄋ")}, - {0x3148, 0, 0, 0, g(Yes, No, false, false, "", "ᄌ")}, - {0x3149, 0, 0, 0, g(Yes, No, false, false, "", "ᄍ")}, - {0x314a, 0, 0, 0, g(Yes, No, false, false, "", "ᄎ")}, - {0x314b, 0, 0, 0, g(Yes, No, false, false, "", "ᄏ")}, - {0x314c, 0, 0, 0, g(Yes, No, false, false, "", "ᄐ")}, - {0x314d, 0, 0, 0, g(Yes, No, false, false, "", "ᄑ")}, - {0x314e, 0, 0, 0, g(Yes, No, false, false, "", "ᄒ")}, - {0x314f, 0, 1, 1, g(Yes, No, false, false, "", "ᅡ")}, - {0x3150, 0, 1, 1, g(Yes, No, false, false, "", "ᅢ")}, - {0x3151, 0, 1, 1, g(Yes, No, false, false, "", "ᅣ")}, - {0x3152, 0, 1, 1, g(Yes, No, false, false, "", "ᅤ")}, - {0x3153, 0, 1, 1, g(Yes, No, false, false, "", "ᅥ")}, - {0x3154, 0, 1, 1, g(Yes, No, false, false, "", "ᅦ")}, - {0x3155, 0, 1, 1, g(Yes, No, false, false, "", "ᅧ")}, - {0x3156, 0, 1, 1, g(Yes, No, false, false, "", "ᅨ")}, - {0x3157, 0, 1, 1, g(Yes, No, false, false, "", "ᅩ")}, - {0x3158, 0, 1, 1, g(Yes, No, false, false, "", "ᅪ")}, - {0x3159, 0, 1, 1, g(Yes, No, false, false, "", "ᅫ")}, - {0x315a, 0, 1, 1, g(Yes, No, false, false, "", "ᅬ")}, - {0x315b, 0, 1, 1, g(Yes, No, false, false, "", "ᅭ")}, - {0x315c, 0, 1, 1, g(Yes, No, false, false, "", "ᅮ")}, - {0x315d, 0, 1, 1, g(Yes, No, false, false, "", "ᅯ")}, - {0x315e, 0, 1, 1, g(Yes, No, false, false, "", "ᅰ")}, - {0x315f, 0, 1, 1, g(Yes, No, false, false, "", "ᅱ")}, - {0x3160, 0, 1, 1, g(Yes, No, false, false, "", "ᅲ")}, - {0x3161, 0, 1, 1, g(Yes, No, false, false, "", "ᅳ")}, - {0x3162, 0, 1, 1, g(Yes, No, false, false, "", "ᅴ")}, - {0x3163, 0, 1, 1, g(Yes, No, false, false, "", "ᅵ")}, - {0x3164, 0, 0, 0, g(Yes, No, false, false, "", "ᅠ")}, - {0x3165, 0, 0, 0, g(Yes, No, false, false, "", "ᄔ")}, - {0x3166, 0, 0, 0, g(Yes, No, false, false, "", "ᄕ")}, - {0x3167, 0, 0, 0, g(Yes, No, false, false, "", "ᇇ")}, - {0x3168, 0, 0, 0, g(Yes, No, false, false, "", "ᇈ")}, - {0x3169, 0, 0, 0, g(Yes, No, false, false, "", "ᇌ")}, - {0x316a, 0, 0, 0, g(Yes, No, false, false, "", "ᇎ")}, - {0x316b, 0, 0, 0, g(Yes, No, false, false, "", "ᇓ")}, - {0x316c, 0, 0, 0, g(Yes, No, false, false, "", "ᇗ")}, - {0x316d, 0, 0, 0, g(Yes, No, false, false, "", "ᇙ")}, - {0x316e, 0, 0, 0, g(Yes, No, false, false, "", "ᄜ")}, - {0x316f, 0, 0, 0, g(Yes, No, false, false, "", "ᇝ")}, - {0x3170, 0, 0, 0, g(Yes, No, false, false, "", "ᇟ")}, - {0x3171, 0, 0, 0, g(Yes, No, false, false, "", "ᄝ")}, - {0x3172, 0, 0, 0, g(Yes, No, false, false, "", "ᄞ")}, - {0x3173, 0, 0, 0, g(Yes, No, false, false, "", "ᄠ")}, - {0x3174, 0, 0, 0, g(Yes, No, false, false, "", "ᄢ")}, - {0x3175, 0, 0, 0, g(Yes, No, false, false, "", "ᄣ")}, - {0x3176, 0, 0, 0, g(Yes, No, false, false, "", "ᄧ")}, - {0x3177, 0, 0, 0, g(Yes, No, false, false, "", "ᄩ")}, - {0x3178, 0, 0, 0, g(Yes, No, false, false, "", "ᄫ")}, - {0x3179, 0, 0, 0, g(Yes, No, false, false, "", "ᄬ")}, - {0x317a, 0, 0, 0, g(Yes, No, false, false, "", "ᄭ")}, - {0x317b, 0, 0, 0, g(Yes, No, false, false, "", "ᄮ")}, - {0x317c, 0, 0, 0, g(Yes, No, false, false, "", "ᄯ")}, - {0x317d, 0, 0, 0, g(Yes, No, false, false, "", "ᄲ")}, - {0x317e, 0, 0, 0, g(Yes, No, false, false, "", "ᄶ")}, - {0x317f, 0, 0, 0, g(Yes, No, false, false, "", "ᅀ")}, - {0x3180, 0, 0, 0, g(Yes, No, false, false, "", "ᅇ")}, - {0x3181, 0, 0, 0, g(Yes, No, false, false, "", "ᅌ")}, - {0x3182, 0, 0, 0, g(Yes, No, false, false, "", "ᇱ")}, - {0x3183, 0, 0, 0, g(Yes, No, false, false, "", "ᇲ")}, - {0x3184, 0, 0, 0, g(Yes, No, false, false, "", "ᅗ")}, - {0x3185, 0, 0, 0, g(Yes, No, false, false, "", "ᅘ")}, - {0x3186, 0, 0, 0, g(Yes, No, false, false, "", "ᅙ")}, - {0x3187, 0, 0, 0, g(Yes, No, false, false, "", "ᆄ")}, - {0x3188, 0, 0, 0, g(Yes, No, false, false, "", "ᆅ")}, - {0x3189, 0, 0, 0, g(Yes, No, false, false, "", "ᆈ")}, - {0x318a, 0, 0, 0, g(Yes, No, false, false, "", "ᆑ")}, - {0x318b, 0, 0, 0, g(Yes, No, false, false, "", "ᆒ")}, - {0x318c, 0, 0, 0, g(Yes, No, false, false, "", "ᆔ")}, - {0x318d, 0, 0, 0, g(Yes, No, false, false, "", "ᆞ")}, - {0x318e, 0, 0, 0, g(Yes, No, false, false, "", "ᆡ")}, - {0x318f, 0, 0, 0, f(Yes, false, "")}, - {0x3192, 0, 0, 0, g(Yes, No, false, false, "", "一")}, - {0x3193, 0, 0, 0, g(Yes, No, false, false, "", "二")}, - {0x3194, 0, 0, 0, g(Yes, No, false, false, "", "三")}, - {0x3195, 0, 0, 0, g(Yes, No, false, false, "", "四")}, - {0x3196, 0, 0, 0, g(Yes, No, false, false, "", "上")}, - {0x3197, 0, 0, 0, g(Yes, No, false, false, "", "中")}, - {0x3198, 0, 0, 0, g(Yes, No, false, false, "", "下")}, - {0x3199, 0, 0, 0, g(Yes, No, false, false, "", "甲")}, - {0x319a, 0, 0, 0, g(Yes, No, false, false, "", "乙")}, - {0x319b, 0, 0, 0, g(Yes, No, false, false, "", "丙")}, - {0x319c, 0, 0, 0, g(Yes, No, false, false, "", "丁")}, - {0x319d, 0, 0, 0, g(Yes, No, false, false, "", "天")}, - {0x319e, 0, 0, 0, g(Yes, No, false, false, "", "地")}, - {0x319f, 0, 0, 0, g(Yes, No, false, false, "", "人")}, - {0x31a0, 0, 0, 0, f(Yes, false, "")}, - {0x3200, 0, 0, 0, g(Yes, No, false, false, "", "(ᄀ)")}, - {0x3201, 0, 0, 0, g(Yes, No, false, false, "", "(ᄂ)")}, - {0x3202, 0, 0, 0, g(Yes, No, false, false, "", "(ᄃ)")}, - {0x3203, 0, 0, 0, g(Yes, No, false, false, "", "(ᄅ)")}, - {0x3204, 0, 0, 0, g(Yes, No, false, false, "", "(ᄆ)")}, - {0x3205, 0, 0, 0, g(Yes, No, false, false, "", "(ᄇ)")}, - {0x3206, 0, 0, 0, g(Yes, No, false, false, "", "(ᄉ)")}, - {0x3207, 0, 0, 0, g(Yes, No, false, false, "", "(ᄋ)")}, - {0x3208, 0, 0, 0, g(Yes, No, false, false, "", "(ᄌ)")}, - {0x3209, 0, 0, 0, g(Yes, No, false, false, "", "(ᄎ)")}, - {0x320a, 0, 0, 0, g(Yes, No, false, false, "", "(ᄏ)")}, - {0x320b, 0, 0, 0, g(Yes, No, false, false, "", "(ᄐ)")}, - {0x320c, 0, 0, 0, g(Yes, No, false, false, "", "(ᄑ)")}, - {0x320d, 0, 0, 0, g(Yes, No, false, false, "", "(ᄒ)")}, - {0x320e, 0, 0, 0, g(Yes, No, false, false, "", "(가)")}, - {0x320f, 0, 0, 0, g(Yes, No, false, false, "", "(나)")}, - {0x3210, 0, 0, 0, g(Yes, No, false, false, "", "(다)")}, - {0x3211, 0, 0, 0, g(Yes, No, false, false, "", "(라)")}, - {0x3212, 0, 0, 0, g(Yes, No, false, false, "", "(마)")}, - {0x3213, 0, 0, 0, g(Yes, No, false, false, "", "(바)")}, - {0x3214, 0, 0, 0, g(Yes, No, false, false, "", "(사)")}, - {0x3215, 0, 0, 0, g(Yes, No, false, false, "", "(아)")}, - {0x3216, 0, 0, 0, g(Yes, No, false, false, "", "(자)")}, - {0x3217, 0, 0, 0, g(Yes, No, false, false, "", "(차)")}, - {0x3218, 0, 0, 0, g(Yes, No, false, false, "", "(카)")}, - {0x3219, 0, 0, 0, g(Yes, No, false, false, "", "(타)")}, - {0x321a, 0, 0, 0, g(Yes, No, false, false, "", "(파)")}, - {0x321b, 0, 0, 0, g(Yes, No, false, false, "", "(하)")}, - {0x321c, 0, 0, 0, g(Yes, No, false, false, "", "(주)")}, - {0x321d, 0, 0, 0, g(Yes, No, false, false, "", "(오전)")}, - {0x321e, 0, 0, 0, g(Yes, No, false, false, "", "(오후)")}, - {0x321f, 0, 0, 0, f(Yes, false, "")}, - {0x3220, 0, 0, 0, g(Yes, No, false, false, "", "(一)")}, - {0x3221, 0, 0, 0, g(Yes, No, false, false, "", "(二)")}, - {0x3222, 0, 0, 0, g(Yes, No, false, false, "", "(三)")}, - {0x3223, 0, 0, 0, g(Yes, No, false, false, "", "(四)")}, - {0x3224, 0, 0, 0, g(Yes, No, false, false, "", "(五)")}, - {0x3225, 0, 0, 0, g(Yes, No, false, false, "", "(六)")}, - {0x3226, 0, 0, 0, g(Yes, No, false, false, "", "(七)")}, - {0x3227, 0, 0, 0, g(Yes, No, false, false, "", "(八)")}, - {0x3228, 0, 0, 0, g(Yes, No, false, false, "", "(九)")}, - {0x3229, 0, 0, 0, g(Yes, No, false, false, "", "(十)")}, - {0x322a, 0, 0, 0, g(Yes, No, false, false, "", "(月)")}, - {0x322b, 0, 0, 0, g(Yes, No, false, false, "", "(火)")}, - {0x322c, 0, 0, 0, g(Yes, No, false, false, "", "(水)")}, - {0x322d, 0, 0, 0, g(Yes, No, false, false, "", "(木)")}, - {0x322e, 0, 0, 0, g(Yes, No, false, false, "", "(金)")}, - {0x322f, 0, 0, 0, g(Yes, No, false, false, "", "(土)")}, - {0x3230, 0, 0, 0, g(Yes, No, false, false, "", "(日)")}, - {0x3231, 0, 0, 0, g(Yes, No, false, false, "", "(株)")}, - {0x3232, 0, 0, 0, g(Yes, No, false, false, "", "(有)")}, - {0x3233, 0, 0, 0, g(Yes, No, false, false, "", "(社)")}, - {0x3234, 0, 0, 0, g(Yes, No, false, false, "", "(名)")}, - {0x3235, 0, 0, 0, g(Yes, No, false, false, "", "(特)")}, - {0x3236, 0, 0, 0, g(Yes, No, false, false, "", "(財)")}, - {0x3237, 0, 0, 0, g(Yes, No, false, false, "", "(祝)")}, - {0x3238, 0, 0, 0, g(Yes, No, false, false, "", "(労)")}, - {0x3239, 0, 0, 0, g(Yes, No, false, false, "", "(代)")}, - {0x323a, 0, 0, 0, g(Yes, No, false, false, "", "(呼)")}, - {0x323b, 0, 0, 0, g(Yes, No, false, false, "", "(学)")}, - {0x323c, 0, 0, 0, g(Yes, No, false, false, "", "(監)")}, - {0x323d, 0, 0, 0, g(Yes, No, false, false, "", "(企)")}, - {0x323e, 0, 0, 0, g(Yes, No, false, false, "", "(資)")}, - {0x323f, 0, 0, 0, g(Yes, No, false, false, "", "(協)")}, - {0x3240, 0, 0, 0, g(Yes, No, false, false, "", "(祭)")}, - {0x3241, 0, 0, 0, g(Yes, No, false, false, "", "(休)")}, - {0x3242, 0, 0, 0, g(Yes, No, false, false, "", "(自)")}, - {0x3243, 0, 0, 0, g(Yes, No, false, false, "", "(至)")}, - {0x3244, 0, 0, 0, g(Yes, No, false, false, "", "問")}, - {0x3245, 0, 0, 0, g(Yes, No, false, false, "", "幼")}, - {0x3246, 0, 0, 0, g(Yes, No, false, false, "", "文")}, - {0x3247, 0, 0, 0, g(Yes, No, false, false, "", "箏")}, - {0x3248, 0, 0, 0, f(Yes, false, "")}, - {0x3250, 0, 0, 0, g(Yes, No, false, false, "", "PTE")}, - {0x3251, 0, 0, 0, g(Yes, No, false, false, "", "21")}, - {0x3252, 0, 0, 0, g(Yes, No, false, false, "", "22")}, - {0x3253, 0, 0, 0, g(Yes, No, false, false, "", "23")}, - {0x3254, 0, 0, 0, g(Yes, No, false, false, "", "24")}, - {0x3255, 0, 0, 0, g(Yes, No, false, false, "", "25")}, - {0x3256, 0, 0, 0, g(Yes, No, false, false, "", "26")}, - {0x3257, 0, 0, 0, g(Yes, No, false, false, "", "27")}, - {0x3258, 0, 0, 0, g(Yes, No, false, false, "", "28")}, - {0x3259, 0, 0, 0, g(Yes, No, false, false, "", "29")}, - {0x325a, 0, 0, 0, g(Yes, No, false, false, "", "30")}, - {0x325b, 0, 0, 0, g(Yes, No, false, false, "", "31")}, - {0x325c, 0, 0, 0, g(Yes, No, false, false, "", "32")}, - {0x325d, 0, 0, 0, g(Yes, No, false, false, "", "33")}, - {0x325e, 0, 0, 0, g(Yes, No, false, false, "", "34")}, - {0x325f, 0, 0, 0, g(Yes, No, false, false, "", "35")}, - {0x3260, 0, 0, 0, g(Yes, No, false, false, "", "ᄀ")}, - {0x3261, 0, 0, 0, g(Yes, No, false, false, "", "ᄂ")}, - {0x3262, 0, 0, 0, g(Yes, No, false, false, "", "ᄃ")}, - {0x3263, 0, 0, 0, g(Yes, No, false, false, "", "ᄅ")}, - {0x3264, 0, 0, 0, g(Yes, No, false, false, "", "ᄆ")}, - {0x3265, 0, 0, 0, g(Yes, No, false, false, "", "ᄇ")}, - {0x3266, 0, 0, 0, g(Yes, No, false, false, "", "ᄉ")}, - {0x3267, 0, 0, 0, g(Yes, No, false, false, "", "ᄋ")}, - {0x3268, 0, 0, 0, g(Yes, No, false, false, "", "ᄌ")}, - {0x3269, 0, 0, 0, g(Yes, No, false, false, "", "ᄎ")}, - {0x326a, 0, 0, 0, g(Yes, No, false, false, "", "ᄏ")}, - {0x326b, 0, 0, 0, g(Yes, No, false, false, "", "ᄐ")}, - {0x326c, 0, 0, 0, g(Yes, No, false, false, "", "ᄑ")}, - {0x326d, 0, 0, 0, g(Yes, No, false, false, "", "ᄒ")}, - {0x326e, 0, 0, 1, g(Yes, No, false, false, "", "가")}, - {0x326f, 0, 0, 1, g(Yes, No, false, false, "", "나")}, - {0x3270, 0, 0, 1, g(Yes, No, false, false, "", "다")}, - {0x3271, 0, 0, 1, g(Yes, No, false, false, "", "라")}, - {0x3272, 0, 0, 1, g(Yes, No, false, false, "", "마")}, - {0x3273, 0, 0, 1, g(Yes, No, false, false, "", "바")}, - {0x3274, 0, 0, 1, g(Yes, No, false, false, "", "사")}, - {0x3275, 0, 0, 1, g(Yes, No, false, false, "", "아")}, - {0x3276, 0, 0, 1, g(Yes, No, false, false, "", "자")}, - {0x3277, 0, 0, 1, g(Yes, No, false, false, "", "차")}, - {0x3278, 0, 0, 1, g(Yes, No, false, false, "", "카")}, - {0x3279, 0, 0, 1, g(Yes, No, false, false, "", "타")}, - {0x327a, 0, 0, 1, g(Yes, No, false, false, "", "파")}, - {0x327b, 0, 0, 1, g(Yes, No, false, false, "", "하")}, - {0x327c, 0, 0, 1, g(Yes, No, false, false, "", "참고")}, - {0x327d, 0, 0, 1, g(Yes, No, false, false, "", "주의")}, - {0x327e, 0, 0, 1, g(Yes, No, false, false, "", "우")}, - {0x327f, 0, 0, 0, f(Yes, false, "")}, - {0x3280, 0, 0, 0, g(Yes, No, false, false, "", "一")}, - {0x3281, 0, 0, 0, g(Yes, No, false, false, "", "二")}, - {0x3282, 0, 0, 0, g(Yes, No, false, false, "", "三")}, - {0x3283, 0, 0, 0, g(Yes, No, false, false, "", "四")}, - {0x3284, 0, 0, 0, g(Yes, No, false, false, "", "五")}, - {0x3285, 0, 0, 0, g(Yes, No, false, false, "", "六")}, - {0x3286, 0, 0, 0, g(Yes, No, false, false, "", "七")}, - {0x3287, 0, 0, 0, g(Yes, No, false, false, "", "八")}, - {0x3288, 0, 0, 0, g(Yes, No, false, false, "", "九")}, - {0x3289, 0, 0, 0, g(Yes, No, false, false, "", "十")}, - {0x328a, 0, 0, 0, g(Yes, No, false, false, "", "月")}, - {0x328b, 0, 0, 0, g(Yes, No, false, false, "", "火")}, - {0x328c, 0, 0, 0, g(Yes, No, false, false, "", "水")}, - {0x328d, 0, 0, 0, g(Yes, No, false, false, "", "木")}, - {0x328e, 0, 0, 0, g(Yes, No, false, false, "", "金")}, - {0x328f, 0, 0, 0, g(Yes, No, false, false, "", "土")}, - {0x3290, 0, 0, 0, g(Yes, No, false, false, "", "日")}, - {0x3291, 0, 0, 0, g(Yes, No, false, false, "", "株")}, - {0x3292, 0, 0, 0, g(Yes, No, false, false, "", "有")}, - {0x3293, 0, 0, 0, g(Yes, No, false, false, "", "社")}, - {0x3294, 0, 0, 0, g(Yes, No, false, false, "", "名")}, - {0x3295, 0, 0, 0, g(Yes, No, false, false, "", "特")}, - {0x3296, 0, 0, 0, g(Yes, No, false, false, "", "財")}, - {0x3297, 0, 0, 0, g(Yes, No, false, false, "", "祝")}, - {0x3298, 0, 0, 0, g(Yes, No, false, false, "", "労")}, - {0x3299, 0, 0, 0, g(Yes, No, false, false, "", "秘")}, - {0x329a, 0, 0, 0, g(Yes, No, false, false, "", "男")}, - {0x329b, 0, 0, 0, g(Yes, No, false, false, "", "女")}, - {0x329c, 0, 0, 0, g(Yes, No, false, false, "", "適")}, - {0x329d, 0, 0, 0, g(Yes, No, false, false, "", "優")}, - {0x329e, 0, 0, 0, g(Yes, No, false, false, "", "印")}, - {0x329f, 0, 0, 0, g(Yes, No, false, false, "", "注")}, - {0x32a0, 0, 0, 0, g(Yes, No, false, false, "", "項")}, - {0x32a1, 0, 0, 0, g(Yes, No, false, false, "", "休")}, - {0x32a2, 0, 0, 0, g(Yes, No, false, false, "", "写")}, - {0x32a3, 0, 0, 0, g(Yes, No, false, false, "", "正")}, - {0x32a4, 0, 0, 0, g(Yes, No, false, false, "", "上")}, - {0x32a5, 0, 0, 0, g(Yes, No, false, false, "", "中")}, - {0x32a6, 0, 0, 0, g(Yes, No, false, false, "", "下")}, - {0x32a7, 0, 0, 0, g(Yes, No, false, false, "", "左")}, - {0x32a8, 0, 0, 0, g(Yes, No, false, false, "", "右")}, - {0x32a9, 0, 0, 0, g(Yes, No, false, false, "", "医")}, - {0x32aa, 0, 0, 0, g(Yes, No, false, false, "", "宗")}, - {0x32ab, 0, 0, 0, g(Yes, No, false, false, "", "学")}, - {0x32ac, 0, 0, 0, g(Yes, No, false, false, "", "監")}, - {0x32ad, 0, 0, 0, g(Yes, No, false, false, "", "企")}, - {0x32ae, 0, 0, 0, g(Yes, No, false, false, "", "資")}, - {0x32af, 0, 0, 0, g(Yes, No, false, false, "", "協")}, - {0x32b0, 0, 0, 0, g(Yes, No, false, false, "", "夜")}, - {0x32b1, 0, 0, 0, g(Yes, No, false, false, "", "36")}, - {0x32b2, 0, 0, 0, g(Yes, No, false, false, "", "37")}, - {0x32b3, 0, 0, 0, g(Yes, No, false, false, "", "38")}, - {0x32b4, 0, 0, 0, g(Yes, No, false, false, "", "39")}, - {0x32b5, 0, 0, 0, g(Yes, No, false, false, "", "40")}, - {0x32b6, 0, 0, 0, g(Yes, No, false, false, "", "41")}, - {0x32b7, 0, 0, 0, g(Yes, No, false, false, "", "42")}, - {0x32b8, 0, 0, 0, g(Yes, No, false, false, "", "43")}, - {0x32b9, 0, 0, 0, g(Yes, No, false, false, "", "44")}, - {0x32ba, 0, 0, 0, g(Yes, No, false, false, "", "45")}, - {0x32bb, 0, 0, 0, g(Yes, No, false, false, "", "46")}, - {0x32bc, 0, 0, 0, g(Yes, No, false, false, "", "47")}, - {0x32bd, 0, 0, 0, g(Yes, No, false, false, "", "48")}, - {0x32be, 0, 0, 0, g(Yes, No, false, false, "", "49")}, - {0x32bf, 0, 0, 0, g(Yes, No, false, false, "", "50")}, - {0x32c0, 0, 0, 0, g(Yes, No, false, false, "", "1月")}, - {0x32c1, 0, 0, 0, g(Yes, No, false, false, "", "2月")}, - {0x32c2, 0, 0, 0, g(Yes, No, false, false, "", "3月")}, - {0x32c3, 0, 0, 0, g(Yes, No, false, false, "", "4月")}, - {0x32c4, 0, 0, 0, g(Yes, No, false, false, "", "5月")}, - {0x32c5, 0, 0, 0, g(Yes, No, false, false, "", "6月")}, - {0x32c6, 0, 0, 0, g(Yes, No, false, false, "", "7月")}, - {0x32c7, 0, 0, 0, g(Yes, No, false, false, "", "8月")}, - {0x32c8, 0, 0, 0, g(Yes, No, false, false, "", "9月")}, - {0x32c9, 0, 0, 0, g(Yes, No, false, false, "", "10月")}, - {0x32ca, 0, 0, 0, g(Yes, No, false, false, "", "11月")}, - {0x32cb, 0, 0, 0, g(Yes, No, false, false, "", "12月")}, - {0x32cc, 0, 0, 0, g(Yes, No, false, false, "", "Hg")}, - {0x32cd, 0, 0, 0, g(Yes, No, false, false, "", "erg")}, - {0x32ce, 0, 0, 0, g(Yes, No, false, false, "", "eV")}, - {0x32cf, 0, 0, 0, g(Yes, No, false, false, "", "LTD")}, - {0x32d0, 0, 0, 0, g(Yes, No, false, false, "", "ア")}, - {0x32d1, 0, 0, 0, g(Yes, No, false, false, "", "イ")}, - {0x32d2, 0, 0, 0, g(Yes, No, false, false, "", "ウ")}, - {0x32d3, 0, 0, 0, g(Yes, No, false, false, "", "エ")}, - {0x32d4, 0, 0, 0, g(Yes, No, false, false, "", "オ")}, - {0x32d5, 0, 0, 0, g(Yes, No, false, false, "", "カ")}, - {0x32d6, 0, 0, 0, g(Yes, No, false, false, "", "キ")}, - {0x32d7, 0, 0, 0, g(Yes, No, false, false, "", "ク")}, - {0x32d8, 0, 0, 0, g(Yes, No, false, false, "", "ケ")}, - {0x32d9, 0, 0, 0, g(Yes, No, false, false, "", "コ")}, - {0x32da, 0, 0, 0, g(Yes, No, false, false, "", "サ")}, - {0x32db, 0, 0, 0, g(Yes, No, false, false, "", "シ")}, - {0x32dc, 0, 0, 0, g(Yes, No, false, false, "", "ス")}, - {0x32dd, 0, 0, 0, g(Yes, No, false, false, "", "セ")}, - {0x32de, 0, 0, 0, g(Yes, No, false, false, "", "ソ")}, - {0x32df, 0, 0, 0, g(Yes, No, false, false, "", "タ")}, - {0x32e0, 0, 0, 0, g(Yes, No, false, false, "", "チ")}, - {0x32e1, 0, 0, 0, g(Yes, No, false, false, "", "ツ")}, - {0x32e2, 0, 0, 0, g(Yes, No, false, false, "", "テ")}, - {0x32e3, 0, 0, 0, g(Yes, No, false, false, "", "ト")}, - {0x32e4, 0, 0, 0, g(Yes, No, false, false, "", "ナ")}, - {0x32e5, 0, 0, 0, g(Yes, No, false, false, "", "ニ")}, - {0x32e6, 0, 0, 0, g(Yes, No, false, false, "", "ヌ")}, - {0x32e7, 0, 0, 0, g(Yes, No, false, false, "", "ネ")}, - {0x32e8, 0, 0, 0, g(Yes, No, false, false, "", "ノ")}, - {0x32e9, 0, 0, 0, g(Yes, No, false, false, "", "ハ")}, - {0x32ea, 0, 0, 0, g(Yes, No, false, false, "", "ヒ")}, - {0x32eb, 0, 0, 0, g(Yes, No, false, false, "", "フ")}, - {0x32ec, 0, 0, 0, g(Yes, No, false, false, "", "ヘ")}, - {0x32ed, 0, 0, 0, g(Yes, No, false, false, "", "ホ")}, - {0x32ee, 0, 0, 0, g(Yes, No, false, false, "", "マ")}, - {0x32ef, 0, 0, 0, g(Yes, No, false, false, "", "ミ")}, - {0x32f0, 0, 0, 0, g(Yes, No, false, false, "", "ム")}, - {0x32f1, 0, 0, 0, g(Yes, No, false, false, "", "メ")}, - {0x32f2, 0, 0, 0, g(Yes, No, false, false, "", "モ")}, - {0x32f3, 0, 0, 0, g(Yes, No, false, false, "", "ヤ")}, - {0x32f4, 0, 0, 0, g(Yes, No, false, false, "", "ユ")}, - {0x32f5, 0, 0, 0, g(Yes, No, false, false, "", "ヨ")}, - {0x32f6, 0, 0, 0, g(Yes, No, false, false, "", "ラ")}, - {0x32f7, 0, 0, 0, g(Yes, No, false, false, "", "リ")}, - {0x32f8, 0, 0, 0, g(Yes, No, false, false, "", "ル")}, - {0x32f9, 0, 0, 0, g(Yes, No, false, false, "", "レ")}, - {0x32fa, 0, 0, 0, g(Yes, No, false, false, "", "ロ")}, - {0x32fb, 0, 0, 0, g(Yes, No, false, false, "", "ワ")}, - {0x32fc, 0, 0, 0, g(Yes, No, false, false, "", "ヰ")}, - {0x32fd, 0, 0, 0, g(Yes, No, false, false, "", "ヱ")}, - {0x32fe, 0, 0, 0, g(Yes, No, false, false, "", "ヲ")}, - {0x32ff, 0, 0, 0, f(Yes, false, "")}, - {0x3300, 0, 0, 0, g(Yes, No, false, false, "", "アパート")}, - {0x3301, 0, 0, 0, g(Yes, No, false, false, "", "アルファ")}, - {0x3302, 0, 0, 0, g(Yes, No, false, false, "", "アンペア")}, - {0x3303, 0, 0, 0, g(Yes, No, false, false, "", "アール")}, - {0x3304, 0, 0, 1, g(Yes, No, false, false, "", "イニング")}, - {0x3305, 0, 0, 0, g(Yes, No, false, false, "", "インチ")}, - {0x3306, 0, 0, 0, g(Yes, No, false, false, "", "ウォン")}, - {0x3307, 0, 0, 1, g(Yes, No, false, false, "", "エスクード")}, - {0x3308, 0, 0, 0, g(Yes, No, false, false, "", "エーカー")}, - {0x3309, 0, 0, 0, g(Yes, No, false, false, "", "オンス")}, - {0x330a, 0, 0, 0, g(Yes, No, false, false, "", "オーム")}, - {0x330b, 0, 0, 0, g(Yes, No, false, false, "", "カイリ")}, - {0x330c, 0, 0, 0, g(Yes, No, false, false, "", "カラット")}, - {0x330d, 0, 0, 0, g(Yes, No, false, false, "", "カロリー")}, - {0x330e, 0, 0, 0, g(Yes, No, false, false, "", "ガロン")}, - {0x330f, 0, 0, 0, g(Yes, No, false, false, "", "ガンマ")}, - {0x3310, 0, 0, 1, g(Yes, No, false, false, "", "ギガ")}, - {0x3311, 0, 0, 0, g(Yes, No, false, false, "", "ギニー")}, - {0x3312, 0, 0, 0, g(Yes, No, false, false, "", "キュリー")}, - {0x3313, 0, 0, 0, g(Yes, No, false, false, "", "ギルダー")}, - {0x3314, 0, 0, 0, g(Yes, No, false, false, "", "キロ")}, - {0x3315, 0, 0, 0, g(Yes, No, false, false, "", "キログラム")}, - {0x3316, 0, 0, 0, g(Yes, No, false, false, "", "キロメートル")}, - {0x3317, 0, 0, 0, g(Yes, No, false, false, "", "キロワット")}, - {0x3318, 0, 0, 0, g(Yes, No, false, false, "", "グラム")}, - {0x3319, 0, 0, 0, g(Yes, No, false, false, "", "グラムトン")}, - {0x331a, 0, 0, 0, g(Yes, No, false, false, "", "クルゼイロ")}, - {0x331b, 0, 0, 0, g(Yes, No, false, false, "", "クローネ")}, - {0x331c, 0, 0, 0, g(Yes, No, false, false, "", "ケース")}, - {0x331d, 0, 0, 0, g(Yes, No, false, false, "", "コルナ")}, - {0x331e, 0, 0, 1, g(Yes, No, false, false, "", "コーポ")}, - {0x331f, 0, 0, 0, g(Yes, No, false, false, "", "サイクル")}, - {0x3320, 0, 0, 0, g(Yes, No, false, false, "", "サンチーム")}, - {0x3321, 0, 0, 1, g(Yes, No, false, false, "", "シリング")}, - {0x3322, 0, 0, 0, g(Yes, No, false, false, "", "センチ")}, - {0x3323, 0, 0, 0, g(Yes, No, false, false, "", "セント")}, - {0x3324, 0, 0, 0, g(Yes, No, false, false, "", "ダース")}, - {0x3325, 0, 0, 0, g(Yes, No, false, false, "", "デシ")}, - {0x3326, 0, 0, 0, g(Yes, No, false, false, "", "ドル")}, - {0x3327, 0, 0, 0, g(Yes, No, false, false, "", "トン")}, - {0x3328, 0, 0, 0, g(Yes, No, false, false, "", "ナノ")}, - {0x3329, 0, 0, 0, g(Yes, No, false, false, "", "ノット")}, - {0x332a, 0, 0, 0, g(Yes, No, false, false, "", "ハイツ")}, - {0x332b, 0, 0, 0, g(Yes, No, false, false, "", "パーセント")}, - {0x332c, 0, 0, 0, g(Yes, No, false, false, "", "パーツ")}, - {0x332d, 0, 0, 0, g(Yes, No, false, false, "", "バーレル")}, - {0x332e, 0, 0, 0, g(Yes, No, false, false, "", "ピアストル")}, - {0x332f, 0, 0, 0, g(Yes, No, false, false, "", "ピクル")}, - {0x3330, 0, 0, 0, g(Yes, No, false, false, "", "ピコ")}, - {0x3331, 0, 0, 0, g(Yes, No, false, false, "", "ビル")}, - {0x3332, 0, 0, 1, g(Yes, No, false, false, "", "ファラッド")}, - {0x3333, 0, 0, 0, g(Yes, No, false, false, "", "フィート")}, - {0x3334, 0, 0, 0, g(Yes, No, false, false, "", "ブッシェル")}, - {0x3335, 0, 0, 0, g(Yes, No, false, false, "", "フラン")}, - {0x3336, 0, 0, 0, g(Yes, No, false, false, "", "ヘクタール")}, - {0x3337, 0, 0, 0, g(Yes, No, false, false, "", "ペソ")}, - {0x3338, 0, 0, 0, g(Yes, No, false, false, "", "ペニヒ")}, - {0x3339, 0, 0, 0, g(Yes, No, false, false, "", "ヘルツ")}, - {0x333a, 0, 0, 0, g(Yes, No, false, false, "", "ペンス")}, - {0x333b, 0, 0, 1, g(Yes, No, false, false, "", "ページ")}, - {0x333c, 0, 0, 0, g(Yes, No, false, false, "", "ベータ")}, - {0x333d, 0, 0, 0, g(Yes, No, false, false, "", "ポイント")}, - {0x333e, 0, 0, 0, g(Yes, No, false, false, "", "ボルト")}, - {0x333f, 0, 0, 0, g(Yes, No, false, false, "", "ホン")}, - {0x3340, 0, 0, 1, g(Yes, No, false, false, "", "ポンド")}, - {0x3341, 0, 0, 0, g(Yes, No, false, false, "", "ホール")}, - {0x3342, 0, 0, 0, g(Yes, No, false, false, "", "ホーン")}, - {0x3343, 0, 0, 0, g(Yes, No, false, false, "", "マイクロ")}, - {0x3344, 0, 0, 0, g(Yes, No, false, false, "", "マイル")}, - {0x3345, 0, 0, 0, g(Yes, No, false, false, "", "マッハ")}, - {0x3346, 0, 0, 0, g(Yes, No, false, false, "", "マルク")}, - {0x3347, 0, 0, 0, g(Yes, No, false, false, "", "マンション")}, - {0x3348, 0, 0, 0, g(Yes, No, false, false, "", "ミクロン")}, - {0x3349, 0, 0, 0, g(Yes, No, false, false, "", "ミリ")}, - {0x334a, 0, 0, 0, g(Yes, No, false, false, "", "ミリバール")}, - {0x334b, 0, 0, 1, g(Yes, No, false, false, "", "メガ")}, - {0x334c, 0, 0, 0, g(Yes, No, false, false, "", "メガトン")}, - {0x334d, 0, 0, 0, g(Yes, No, false, false, "", "メートル")}, - {0x334e, 0, 0, 1, g(Yes, No, false, false, "", "ヤード")}, - {0x334f, 0, 0, 0, g(Yes, No, false, false, "", "ヤール")}, - {0x3350, 0, 0, 0, g(Yes, No, false, false, "", "ユアン")}, - {0x3351, 0, 0, 0, g(Yes, No, false, false, "", "リットル")}, - {0x3352, 0, 0, 0, g(Yes, No, false, false, "", "リラ")}, - {0x3353, 0, 0, 0, g(Yes, No, false, false, "", "ルピー")}, - {0x3354, 0, 0, 0, g(Yes, No, false, false, "", "ルーブル")}, - {0x3355, 0, 0, 0, g(Yes, No, false, false, "", "レム")}, - {0x3356, 0, 0, 0, g(Yes, No, false, false, "", "レントゲン")}, - {0x3357, 0, 0, 0, g(Yes, No, false, false, "", "ワット")}, - {0x3358, 0, 0, 0, g(Yes, No, false, false, "", "0点")}, - {0x3359, 0, 0, 0, g(Yes, No, false, false, "", "1点")}, - {0x335a, 0, 0, 0, g(Yes, No, false, false, "", "2点")}, - {0x335b, 0, 0, 0, g(Yes, No, false, false, "", "3点")}, - {0x335c, 0, 0, 0, g(Yes, No, false, false, "", "4点")}, - {0x335d, 0, 0, 0, g(Yes, No, false, false, "", "5点")}, - {0x335e, 0, 0, 0, g(Yes, No, false, false, "", "6点")}, - {0x335f, 0, 0, 0, g(Yes, No, false, false, "", "7点")}, - {0x3360, 0, 0, 0, g(Yes, No, false, false, "", "8点")}, - {0x3361, 0, 0, 0, g(Yes, No, false, false, "", "9点")}, - {0x3362, 0, 0, 0, g(Yes, No, false, false, "", "10点")}, - {0x3363, 0, 0, 0, g(Yes, No, false, false, "", "11点")}, - {0x3364, 0, 0, 0, g(Yes, No, false, false, "", "12点")}, - {0x3365, 0, 0, 0, g(Yes, No, false, false, "", "13点")}, - {0x3366, 0, 0, 0, g(Yes, No, false, false, "", "14点")}, - {0x3367, 0, 0, 0, g(Yes, No, false, false, "", "15点")}, - {0x3368, 0, 0, 0, g(Yes, No, false, false, "", "16点")}, - {0x3369, 0, 0, 0, g(Yes, No, false, false, "", "17点")}, - {0x336a, 0, 0, 0, g(Yes, No, false, false, "", "18点")}, - {0x336b, 0, 0, 0, g(Yes, No, false, false, "", "19点")}, - {0x336c, 0, 0, 0, g(Yes, No, false, false, "", "20点")}, - {0x336d, 0, 0, 0, g(Yes, No, false, false, "", "21点")}, - {0x336e, 0, 0, 0, g(Yes, No, false, false, "", "22点")}, - {0x336f, 0, 0, 0, g(Yes, No, false, false, "", "23点")}, - {0x3370, 0, 0, 0, g(Yes, No, false, false, "", "24点")}, - {0x3371, 0, 0, 0, g(Yes, No, false, false, "", "hPa")}, - {0x3372, 0, 0, 0, g(Yes, No, false, false, "", "da")}, - {0x3373, 0, 0, 0, g(Yes, No, false, false, "", "AU")}, - {0x3374, 0, 0, 0, g(Yes, No, false, false, "", "bar")}, - {0x3375, 0, 0, 0, g(Yes, No, false, false, "", "oV")}, - {0x3376, 0, 0, 0, g(Yes, No, false, false, "", "pc")}, - {0x3377, 0, 0, 0, g(Yes, No, false, false, "", "dm")}, - {0x3378, 0, 0, 0, g(Yes, No, false, false, "", "dm2")}, - {0x3379, 0, 0, 0, g(Yes, No, false, false, "", "dm3")}, - {0x337a, 0, 0, 0, g(Yes, No, false, false, "", "IU")}, - {0x337b, 0, 0, 0, g(Yes, No, false, false, "", "平成")}, - {0x337c, 0, 0, 0, g(Yes, No, false, false, "", "昭和")}, - {0x337d, 0, 0, 0, g(Yes, No, false, false, "", "大正")}, - {0x337e, 0, 0, 0, g(Yes, No, false, false, "", "明治")}, - {0x337f, 0, 0, 0, g(Yes, No, false, false, "", "株式会社")}, - {0x3380, 0, 0, 0, g(Yes, No, false, false, "", "pA")}, - {0x3381, 0, 0, 0, g(Yes, No, false, false, "", "nA")}, - {0x3382, 0, 0, 0, g(Yes, No, false, false, "", "μA")}, - {0x3383, 0, 0, 0, g(Yes, No, false, false, "", "mA")}, - {0x3384, 0, 0, 0, g(Yes, No, false, false, "", "kA")}, - {0x3385, 0, 0, 0, g(Yes, No, false, false, "", "KB")}, - {0x3386, 0, 0, 0, g(Yes, No, false, false, "", "MB")}, - {0x3387, 0, 0, 0, g(Yes, No, false, false, "", "GB")}, - {0x3388, 0, 0, 0, g(Yes, No, false, false, "", "cal")}, - {0x3389, 0, 0, 0, g(Yes, No, false, false, "", "kcal")}, - {0x338a, 0, 0, 0, g(Yes, No, false, false, "", "pF")}, - {0x338b, 0, 0, 0, g(Yes, No, false, false, "", "nF")}, - {0x338c, 0, 0, 0, g(Yes, No, false, false, "", "μF")}, - {0x338d, 0, 0, 0, g(Yes, No, false, false, "", "μg")}, - {0x338e, 0, 0, 0, g(Yes, No, false, false, "", "mg")}, - {0x338f, 0, 0, 0, g(Yes, No, false, false, "", "kg")}, - {0x3390, 0, 0, 0, g(Yes, No, false, false, "", "Hz")}, - {0x3391, 0, 0, 0, g(Yes, No, false, false, "", "kHz")}, - {0x3392, 0, 0, 0, g(Yes, No, false, false, "", "MHz")}, - {0x3393, 0, 0, 0, g(Yes, No, false, false, "", "GHz")}, - {0x3394, 0, 0, 0, g(Yes, No, false, false, "", "THz")}, - {0x3395, 0, 0, 0, g(Yes, No, false, false, "", "μl")}, - {0x3396, 0, 0, 0, g(Yes, No, false, false, "", "ml")}, - {0x3397, 0, 0, 0, g(Yes, No, false, false, "", "dl")}, - {0x3398, 0, 0, 0, g(Yes, No, false, false, "", "kl")}, - {0x3399, 0, 0, 0, g(Yes, No, false, false, "", "fm")}, - {0x339a, 0, 0, 0, g(Yes, No, false, false, "", "nm")}, - {0x339b, 0, 0, 0, g(Yes, No, false, false, "", "μm")}, - {0x339c, 0, 0, 0, g(Yes, No, false, false, "", "mm")}, - {0x339d, 0, 0, 0, g(Yes, No, false, false, "", "cm")}, - {0x339e, 0, 0, 0, g(Yes, No, false, false, "", "km")}, - {0x339f, 0, 0, 0, g(Yes, No, false, false, "", "mm2")}, - {0x33a0, 0, 0, 0, g(Yes, No, false, false, "", "cm2")}, - {0x33a1, 0, 0, 0, g(Yes, No, false, false, "", "m2")}, - {0x33a2, 0, 0, 0, g(Yes, No, false, false, "", "km2")}, - {0x33a3, 0, 0, 0, g(Yes, No, false, false, "", "mm3")}, - {0x33a4, 0, 0, 0, g(Yes, No, false, false, "", "cm3")}, - {0x33a5, 0, 0, 0, g(Yes, No, false, false, "", "m3")}, - {0x33a6, 0, 0, 0, g(Yes, No, false, false, "", "km3")}, - {0x33a7, 0, 0, 0, g(Yes, No, false, false, "", "m∕s")}, - {0x33a8, 0, 0, 0, g(Yes, No, false, false, "", "m∕s2")}, - {0x33a9, 0, 0, 0, g(Yes, No, false, false, "", "Pa")}, - {0x33aa, 0, 0, 0, g(Yes, No, false, false, "", "kPa")}, - {0x33ab, 0, 0, 0, g(Yes, No, false, false, "", "MPa")}, - {0x33ac, 0, 0, 0, g(Yes, No, false, false, "", "GPa")}, - {0x33ad, 0, 0, 0, g(Yes, No, false, false, "", "rad")}, - {0x33ae, 0, 0, 0, g(Yes, No, false, false, "", "rad∕s")}, - {0x33af, 0, 0, 0, g(Yes, No, false, false, "", "rad∕s2")}, - {0x33b0, 0, 0, 0, g(Yes, No, false, false, "", "ps")}, - {0x33b1, 0, 0, 0, g(Yes, No, false, false, "", "ns")}, - {0x33b2, 0, 0, 0, g(Yes, No, false, false, "", "μs")}, - {0x33b3, 0, 0, 0, g(Yes, No, false, false, "", "ms")}, - {0x33b4, 0, 0, 0, g(Yes, No, false, false, "", "pV")}, - {0x33b5, 0, 0, 0, g(Yes, No, false, false, "", "nV")}, - {0x33b6, 0, 0, 0, g(Yes, No, false, false, "", "μV")}, - {0x33b7, 0, 0, 0, g(Yes, No, false, false, "", "mV")}, - {0x33b8, 0, 0, 0, g(Yes, No, false, false, "", "kV")}, - {0x33b9, 0, 0, 0, g(Yes, No, false, false, "", "MV")}, - {0x33ba, 0, 0, 0, g(Yes, No, false, false, "", "pW")}, - {0x33bb, 0, 0, 0, g(Yes, No, false, false, "", "nW")}, - {0x33bc, 0, 0, 0, g(Yes, No, false, false, "", "μW")}, - {0x33bd, 0, 0, 0, g(Yes, No, false, false, "", "mW")}, - {0x33be, 0, 0, 0, g(Yes, No, false, false, "", "kW")}, - {0x33bf, 0, 0, 0, g(Yes, No, false, false, "", "MW")}, - {0x33c0, 0, 0, 0, g(Yes, No, false, false, "", "kΩ")}, - {0x33c1, 0, 0, 0, g(Yes, No, false, false, "", "MΩ")}, - {0x33c2, 0, 0, 0, g(Yes, No, false, false, "", "a.m.")}, - {0x33c3, 0, 0, 0, g(Yes, No, false, false, "", "Bq")}, - {0x33c4, 0, 0, 0, g(Yes, No, false, false, "", "cc")}, - {0x33c5, 0, 0, 0, g(Yes, No, false, false, "", "cd")}, - {0x33c6, 0, 0, 0, g(Yes, No, false, false, "", "C∕kg")}, - {0x33c7, 0, 0, 0, g(Yes, No, false, false, "", "Co.")}, - {0x33c8, 0, 0, 0, g(Yes, No, false, false, "", "dB")}, - {0x33c9, 0, 0, 0, g(Yes, No, false, false, "", "Gy")}, - {0x33ca, 0, 0, 0, g(Yes, No, false, false, "", "ha")}, - {0x33cb, 0, 0, 0, g(Yes, No, false, false, "", "HP")}, - {0x33cc, 0, 0, 0, g(Yes, No, false, false, "", "in")}, - {0x33cd, 0, 0, 0, g(Yes, No, false, false, "", "KK")}, - {0x33ce, 0, 0, 0, g(Yes, No, false, false, "", "KM")}, - {0x33cf, 0, 0, 0, g(Yes, No, false, false, "", "kt")}, - {0x33d0, 0, 0, 0, g(Yes, No, false, false, "", "lm")}, - {0x33d1, 0, 0, 0, g(Yes, No, false, false, "", "ln")}, - {0x33d2, 0, 0, 0, g(Yes, No, false, false, "", "log")}, - {0x33d3, 0, 0, 0, g(Yes, No, false, false, "", "lx")}, - {0x33d4, 0, 0, 0, g(Yes, No, false, false, "", "mb")}, - {0x33d5, 0, 0, 0, g(Yes, No, false, false, "", "mil")}, - {0x33d6, 0, 0, 0, g(Yes, No, false, false, "", "mol")}, - {0x33d7, 0, 0, 0, g(Yes, No, false, false, "", "PH")}, - {0x33d8, 0, 0, 0, g(Yes, No, false, false, "", "p.m.")}, - {0x33d9, 0, 0, 0, g(Yes, No, false, false, "", "PPM")}, - {0x33da, 0, 0, 0, g(Yes, No, false, false, "", "PR")}, - {0x33db, 0, 0, 0, g(Yes, No, false, false, "", "sr")}, - {0x33dc, 0, 0, 0, g(Yes, No, false, false, "", "Sv")}, - {0x33dd, 0, 0, 0, g(Yes, No, false, false, "", "Wb")}, - {0x33de, 0, 0, 0, g(Yes, No, false, false, "", "V∕m")}, - {0x33df, 0, 0, 0, g(Yes, No, false, false, "", "A∕m")}, - {0x33e0, 0, 0, 0, g(Yes, No, false, false, "", "1日")}, - {0x33e1, 0, 0, 0, g(Yes, No, false, false, "", "2日")}, - {0x33e2, 0, 0, 0, g(Yes, No, false, false, "", "3日")}, - {0x33e3, 0, 0, 0, g(Yes, No, false, false, "", "4日")}, - {0x33e4, 0, 0, 0, g(Yes, No, false, false, "", "5日")}, - {0x33e5, 0, 0, 0, g(Yes, No, false, false, "", "6日")}, - {0x33e6, 0, 0, 0, g(Yes, No, false, false, "", "7日")}, - {0x33e7, 0, 0, 0, g(Yes, No, false, false, "", "8日")}, - {0x33e8, 0, 0, 0, g(Yes, No, false, false, "", "9日")}, - {0x33e9, 0, 0, 0, g(Yes, No, false, false, "", "10日")}, - {0x33ea, 0, 0, 0, g(Yes, No, false, false, "", "11日")}, - {0x33eb, 0, 0, 0, g(Yes, No, false, false, "", "12日")}, - {0x33ec, 0, 0, 0, g(Yes, No, false, false, "", "13日")}, - {0x33ed, 0, 0, 0, g(Yes, No, false, false, "", "14日")}, - {0x33ee, 0, 0, 0, g(Yes, No, false, false, "", "15日")}, - {0x33ef, 0, 0, 0, g(Yes, No, false, false, "", "16日")}, - {0x33f0, 0, 0, 0, g(Yes, No, false, false, "", "17日")}, - {0x33f1, 0, 0, 0, g(Yes, No, false, false, "", "18日")}, - {0x33f2, 0, 0, 0, g(Yes, No, false, false, "", "19日")}, - {0x33f3, 0, 0, 0, g(Yes, No, false, false, "", "20日")}, - {0x33f4, 0, 0, 0, g(Yes, No, false, false, "", "21日")}, - {0x33f5, 0, 0, 0, g(Yes, No, false, false, "", "22日")}, - {0x33f6, 0, 0, 0, g(Yes, No, false, false, "", "23日")}, - {0x33f7, 0, 0, 0, g(Yes, No, false, false, "", "24日")}, - {0x33f8, 0, 0, 0, g(Yes, No, false, false, "", "25日")}, - {0x33f9, 0, 0, 0, g(Yes, No, false, false, "", "26日")}, - {0x33fa, 0, 0, 0, g(Yes, No, false, false, "", "27日")}, - {0x33fb, 0, 0, 0, g(Yes, No, false, false, "", "28日")}, - {0x33fc, 0, 0, 0, g(Yes, No, false, false, "", "29日")}, - {0x33fd, 0, 0, 0, g(Yes, No, false, false, "", "30日")}, - {0x33fe, 0, 0, 0, g(Yes, No, false, false, "", "31日")}, - {0x33ff, 0, 0, 0, g(Yes, No, false, false, "", "gal")}, - {0x3400, 0, 0, 0, f(Yes, false, "")}, - {0xa66f, 230, 1, 1, f(Yes, false, "")}, - {0xa670, 0, 0, 0, f(Yes, false, "")}, - {0xa674, 230, 1, 1, f(Yes, false, "")}, - {0xa67e, 0, 0, 0, f(Yes, false, "")}, - {0xa69c, 0, 0, 0, g(Yes, No, false, false, "", "ъ")}, - {0xa69d, 0, 0, 0, g(Yes, No, false, false, "", "ь")}, - {0xa69e, 230, 1, 1, f(Yes, false, "")}, - {0xa6a0, 0, 0, 0, f(Yes, false, "")}, - {0xa6f0, 230, 1, 1, f(Yes, false, "")}, - {0xa6f2, 0, 0, 0, f(Yes, false, "")}, - {0xa770, 0, 0, 0, g(Yes, No, false, false, "", "ꝯ")}, - {0xa771, 0, 0, 0, f(Yes, false, "")}, - {0xa7f8, 0, 0, 0, g(Yes, No, false, false, "", "Ħ")}, - {0xa7f9, 0, 0, 0, g(Yes, No, false, false, "", "œ")}, - {0xa7fa, 0, 0, 0, f(Yes, false, "")}, - {0xa806, 9, 1, 1, f(Yes, false, "")}, - {0xa807, 0, 0, 0, f(Yes, false, "")}, - {0xa8c4, 9, 1, 1, f(Yes, false, "")}, - {0xa8c5, 0, 0, 0, f(Yes, false, "")}, - {0xa8e0, 230, 1, 1, f(Yes, false, "")}, - {0xa8f2, 0, 0, 0, f(Yes, false, "")}, - {0xa92b, 220, 1, 1, f(Yes, false, "")}, - {0xa92e, 0, 0, 0, f(Yes, false, "")}, - {0xa953, 9, 1, 1, f(Yes, false, "")}, - {0xa954, 0, 0, 0, f(Yes, false, "")}, - {0xa9b3, 7, 1, 1, f(Yes, false, "")}, - {0xa9b4, 0, 0, 0, f(Yes, false, "")}, - {0xa9c0, 9, 1, 1, f(Yes, false, "")}, - {0xa9c1, 0, 0, 0, f(Yes, false, "")}, - {0xaab0, 230, 1, 1, f(Yes, false, "")}, - {0xaab1, 0, 0, 0, f(Yes, false, "")}, - {0xaab2, 230, 1, 1, f(Yes, false, "")}, - {0xaab4, 220, 1, 1, f(Yes, false, "")}, - {0xaab5, 0, 0, 0, f(Yes, false, "")}, - {0xaab7, 230, 1, 1, f(Yes, false, "")}, - {0xaab9, 0, 0, 0, f(Yes, false, "")}, - {0xaabe, 230, 1, 1, f(Yes, false, "")}, - {0xaac0, 0, 0, 0, f(Yes, false, "")}, - {0xaac1, 230, 1, 1, f(Yes, false, "")}, - {0xaac2, 0, 0, 0, f(Yes, false, "")}, - {0xaaf6, 9, 1, 1, f(Yes, false, "")}, - {0xaaf7, 0, 0, 0, f(Yes, false, "")}, - {0xab5c, 0, 0, 0, g(Yes, No, false, false, "", "ꜧ")}, - {0xab5d, 0, 0, 0, g(Yes, No, false, false, "", "ꬷ")}, - {0xab5e, 0, 0, 0, g(Yes, No, false, false, "", "ɫ")}, - {0xab5f, 0, 0, 0, g(Yes, No, false, false, "", "ꭒ")}, - {0xab60, 0, 0, 0, f(Yes, false, "")}, - {0xabed, 9, 1, 1, f(Yes, false, "")}, - {0xabee, 0, 0, 0, f(Yes, false, "")}, - {0xac00, 0, 0, 1, f(Yes, true, "")}, - {0xac01, 0, 0, 2, f(Yes, false, "")}, - {0xac1c, 0, 0, 1, f(Yes, true, "")}, - {0xac1d, 0, 0, 2, f(Yes, false, "")}, - {0xac38, 0, 0, 1, f(Yes, true, "")}, - {0xac39, 0, 0, 2, f(Yes, false, "")}, - {0xac54, 0, 0, 1, f(Yes, true, "")}, - {0xac55, 0, 0, 2, f(Yes, false, "")}, - {0xac70, 0, 0, 1, f(Yes, true, "")}, - {0xac71, 0, 0, 2, f(Yes, false, "")}, - {0xac8c, 0, 0, 1, f(Yes, true, "")}, - {0xac8d, 0, 0, 2, f(Yes, false, "")}, - {0xaca8, 0, 0, 1, f(Yes, true, "")}, - {0xaca9, 0, 0, 2, f(Yes, false, "")}, - {0xacc4, 0, 0, 1, f(Yes, true, "")}, - {0xacc5, 0, 0, 2, f(Yes, false, "")}, - {0xace0, 0, 0, 1, f(Yes, true, "")}, - {0xace1, 0, 0, 2, f(Yes, false, "")}, - {0xacfc, 0, 0, 1, f(Yes, true, "")}, - {0xacfd, 0, 0, 2, f(Yes, false, "")}, - {0xad18, 0, 0, 1, f(Yes, true, "")}, - {0xad19, 0, 0, 2, f(Yes, false, "")}, - {0xad34, 0, 0, 1, f(Yes, true, "")}, - {0xad35, 0, 0, 2, f(Yes, false, "")}, - {0xad50, 0, 0, 1, f(Yes, true, "")}, - {0xad51, 0, 0, 2, f(Yes, false, "")}, - {0xad6c, 0, 0, 1, f(Yes, true, "")}, - {0xad6d, 0, 0, 2, f(Yes, false, "")}, - {0xad88, 0, 0, 1, f(Yes, true, "")}, - {0xad89, 0, 0, 2, f(Yes, false, "")}, - {0xada4, 0, 0, 1, f(Yes, true, "")}, - {0xada5, 0, 0, 2, f(Yes, false, "")}, - {0xadc0, 0, 0, 1, f(Yes, true, "")}, - {0xadc1, 0, 0, 2, f(Yes, false, "")}, - {0xaddc, 0, 0, 1, f(Yes, true, "")}, - {0xaddd, 0, 0, 2, f(Yes, false, "")}, - {0xadf8, 0, 0, 1, f(Yes, true, "")}, - {0xadf9, 0, 0, 2, f(Yes, false, "")}, - {0xae14, 0, 0, 1, f(Yes, true, "")}, - {0xae15, 0, 0, 2, f(Yes, false, "")}, - {0xae30, 0, 0, 1, f(Yes, true, "")}, - {0xae31, 0, 0, 2, f(Yes, false, "")}, - {0xae4c, 0, 0, 1, f(Yes, true, "")}, - {0xae4d, 0, 0, 2, f(Yes, false, "")}, - {0xae68, 0, 0, 1, f(Yes, true, "")}, - {0xae69, 0, 0, 2, f(Yes, false, "")}, - {0xae84, 0, 0, 1, f(Yes, true, "")}, - {0xae85, 0, 0, 2, f(Yes, false, "")}, - {0xaea0, 0, 0, 1, f(Yes, true, "")}, - {0xaea1, 0, 0, 2, f(Yes, false, "")}, - {0xaebc, 0, 0, 1, f(Yes, true, "")}, - {0xaebd, 0, 0, 2, f(Yes, false, "")}, - {0xaed8, 0, 0, 1, f(Yes, true, "")}, - {0xaed9, 0, 0, 2, f(Yes, false, "")}, - {0xaef4, 0, 0, 1, f(Yes, true, "")}, - {0xaef5, 0, 0, 2, f(Yes, false, "")}, - {0xaf10, 0, 0, 1, f(Yes, true, "")}, - {0xaf11, 0, 0, 2, f(Yes, false, "")}, - {0xaf2c, 0, 0, 1, f(Yes, true, "")}, - {0xaf2d, 0, 0, 2, f(Yes, false, "")}, - {0xaf48, 0, 0, 1, f(Yes, true, "")}, - {0xaf49, 0, 0, 2, f(Yes, false, "")}, - {0xaf64, 0, 0, 1, f(Yes, true, "")}, - {0xaf65, 0, 0, 2, f(Yes, false, "")}, - {0xaf80, 0, 0, 1, f(Yes, true, "")}, - {0xaf81, 0, 0, 2, f(Yes, false, "")}, - {0xaf9c, 0, 0, 1, f(Yes, true, "")}, - {0xaf9d, 0, 0, 2, f(Yes, false, "")}, - {0xafb8, 0, 0, 1, f(Yes, true, "")}, - {0xafb9, 0, 0, 2, f(Yes, false, "")}, - {0xafd4, 0, 0, 1, f(Yes, true, "")}, - {0xafd5, 0, 0, 2, f(Yes, false, "")}, - {0xaff0, 0, 0, 1, f(Yes, true, "")}, - {0xaff1, 0, 0, 2, f(Yes, false, "")}, - {0xb00c, 0, 0, 1, f(Yes, true, "")}, - {0xb00d, 0, 0, 2, f(Yes, false, "")}, - {0xb028, 0, 0, 1, f(Yes, true, "")}, - {0xb029, 0, 0, 2, f(Yes, false, "")}, - {0xb044, 0, 0, 1, f(Yes, true, "")}, - {0xb045, 0, 0, 2, f(Yes, false, "")}, - {0xb060, 0, 0, 1, f(Yes, true, "")}, - {0xb061, 0, 0, 2, f(Yes, false, "")}, - {0xb07c, 0, 0, 1, f(Yes, true, "")}, - {0xb07d, 0, 0, 2, f(Yes, false, "")}, - {0xb098, 0, 0, 1, f(Yes, true, "")}, - {0xb099, 0, 0, 2, f(Yes, false, "")}, - {0xb0b4, 0, 0, 1, f(Yes, true, "")}, - {0xb0b5, 0, 0, 2, f(Yes, false, "")}, - {0xb0d0, 0, 0, 1, f(Yes, true, "")}, - {0xb0d1, 0, 0, 2, f(Yes, false, "")}, - {0xb0ec, 0, 0, 1, f(Yes, true, "")}, - {0xb0ed, 0, 0, 2, f(Yes, false, "")}, - {0xb108, 0, 0, 1, f(Yes, true, "")}, - {0xb109, 0, 0, 2, f(Yes, false, "")}, - {0xb124, 0, 0, 1, f(Yes, true, "")}, - {0xb125, 0, 0, 2, f(Yes, false, "")}, - {0xb140, 0, 0, 1, f(Yes, true, "")}, - {0xb141, 0, 0, 2, f(Yes, false, "")}, - {0xb15c, 0, 0, 1, f(Yes, true, "")}, - {0xb15d, 0, 0, 2, f(Yes, false, "")}, - {0xb178, 0, 0, 1, f(Yes, true, "")}, - {0xb179, 0, 0, 2, f(Yes, false, "")}, - {0xb194, 0, 0, 1, f(Yes, true, "")}, - {0xb195, 0, 0, 2, f(Yes, false, "")}, - {0xb1b0, 0, 0, 1, f(Yes, true, "")}, - {0xb1b1, 0, 0, 2, f(Yes, false, "")}, - {0xb1cc, 0, 0, 1, f(Yes, true, "")}, - {0xb1cd, 0, 0, 2, f(Yes, false, "")}, - {0xb1e8, 0, 0, 1, f(Yes, true, "")}, - {0xb1e9, 0, 0, 2, f(Yes, false, "")}, - {0xb204, 0, 0, 1, f(Yes, true, "")}, - {0xb205, 0, 0, 2, f(Yes, false, "")}, - {0xb220, 0, 0, 1, f(Yes, true, "")}, - {0xb221, 0, 0, 2, f(Yes, false, "")}, - {0xb23c, 0, 0, 1, f(Yes, true, "")}, - {0xb23d, 0, 0, 2, f(Yes, false, "")}, - {0xb258, 0, 0, 1, f(Yes, true, "")}, - {0xb259, 0, 0, 2, f(Yes, false, "")}, - {0xb274, 0, 0, 1, f(Yes, true, "")}, - {0xb275, 0, 0, 2, f(Yes, false, "")}, - {0xb290, 0, 0, 1, f(Yes, true, "")}, - {0xb291, 0, 0, 2, f(Yes, false, "")}, - {0xb2ac, 0, 0, 1, f(Yes, true, "")}, - {0xb2ad, 0, 0, 2, f(Yes, false, "")}, - {0xb2c8, 0, 0, 1, f(Yes, true, "")}, - {0xb2c9, 0, 0, 2, f(Yes, false, "")}, - {0xb2e4, 0, 0, 1, f(Yes, true, "")}, - {0xb2e5, 0, 0, 2, f(Yes, false, "")}, - {0xb300, 0, 0, 1, f(Yes, true, "")}, - {0xb301, 0, 0, 2, f(Yes, false, "")}, - {0xb31c, 0, 0, 1, f(Yes, true, "")}, - {0xb31d, 0, 0, 2, f(Yes, false, "")}, - {0xb338, 0, 0, 1, f(Yes, true, "")}, - {0xb339, 0, 0, 2, f(Yes, false, "")}, - {0xb354, 0, 0, 1, f(Yes, true, "")}, - {0xb355, 0, 0, 2, f(Yes, false, "")}, - {0xb370, 0, 0, 1, f(Yes, true, "")}, - {0xb371, 0, 0, 2, f(Yes, false, "")}, - {0xb38c, 0, 0, 1, f(Yes, true, "")}, - {0xb38d, 0, 0, 2, f(Yes, false, "")}, - {0xb3a8, 0, 0, 1, f(Yes, true, "")}, - {0xb3a9, 0, 0, 2, f(Yes, false, "")}, - {0xb3c4, 0, 0, 1, f(Yes, true, "")}, - {0xb3c5, 0, 0, 2, f(Yes, false, "")}, - {0xb3e0, 0, 0, 1, f(Yes, true, "")}, - {0xb3e1, 0, 0, 2, f(Yes, false, "")}, - {0xb3fc, 0, 0, 1, f(Yes, true, "")}, - {0xb3fd, 0, 0, 2, f(Yes, false, "")}, - {0xb418, 0, 0, 1, f(Yes, true, "")}, - {0xb419, 0, 0, 2, f(Yes, false, "")}, - {0xb434, 0, 0, 1, f(Yes, true, "")}, - {0xb435, 0, 0, 2, f(Yes, false, "")}, - {0xb450, 0, 0, 1, f(Yes, true, "")}, - {0xb451, 0, 0, 2, f(Yes, false, "")}, - {0xb46c, 0, 0, 1, f(Yes, true, "")}, - {0xb46d, 0, 0, 2, f(Yes, false, "")}, - {0xb488, 0, 0, 1, f(Yes, true, "")}, - {0xb489, 0, 0, 2, f(Yes, false, "")}, - {0xb4a4, 0, 0, 1, f(Yes, true, "")}, - {0xb4a5, 0, 0, 2, f(Yes, false, "")}, - {0xb4c0, 0, 0, 1, f(Yes, true, "")}, - {0xb4c1, 0, 0, 2, f(Yes, false, "")}, - {0xb4dc, 0, 0, 1, f(Yes, true, "")}, - {0xb4dd, 0, 0, 2, f(Yes, false, "")}, - {0xb4f8, 0, 0, 1, f(Yes, true, "")}, - {0xb4f9, 0, 0, 2, f(Yes, false, "")}, - {0xb514, 0, 0, 1, f(Yes, true, "")}, - {0xb515, 0, 0, 2, f(Yes, false, "")}, - {0xb530, 0, 0, 1, f(Yes, true, "")}, - {0xb531, 0, 0, 2, f(Yes, false, "")}, - {0xb54c, 0, 0, 1, f(Yes, true, "")}, - {0xb54d, 0, 0, 2, f(Yes, false, "")}, - {0xb568, 0, 0, 1, f(Yes, true, "")}, - {0xb569, 0, 0, 2, f(Yes, false, "")}, - {0xb584, 0, 0, 1, f(Yes, true, "")}, - {0xb585, 0, 0, 2, f(Yes, false, "")}, - {0xb5a0, 0, 0, 1, f(Yes, true, "")}, - {0xb5a1, 0, 0, 2, f(Yes, false, "")}, - {0xb5bc, 0, 0, 1, f(Yes, true, "")}, - {0xb5bd, 0, 0, 2, f(Yes, false, "")}, - {0xb5d8, 0, 0, 1, f(Yes, true, "")}, - {0xb5d9, 0, 0, 2, f(Yes, false, "")}, - {0xb5f4, 0, 0, 1, f(Yes, true, "")}, - {0xb5f5, 0, 0, 2, f(Yes, false, "")}, - {0xb610, 0, 0, 1, f(Yes, true, "")}, - {0xb611, 0, 0, 2, f(Yes, false, "")}, - {0xb62c, 0, 0, 1, f(Yes, true, "")}, - {0xb62d, 0, 0, 2, f(Yes, false, "")}, - {0xb648, 0, 0, 1, f(Yes, true, "")}, - {0xb649, 0, 0, 2, f(Yes, false, "")}, - {0xb664, 0, 0, 1, f(Yes, true, "")}, - {0xb665, 0, 0, 2, f(Yes, false, "")}, - {0xb680, 0, 0, 1, f(Yes, true, "")}, - {0xb681, 0, 0, 2, f(Yes, false, "")}, - {0xb69c, 0, 0, 1, f(Yes, true, "")}, - {0xb69d, 0, 0, 2, f(Yes, false, "")}, - {0xb6b8, 0, 0, 1, f(Yes, true, "")}, - {0xb6b9, 0, 0, 2, f(Yes, false, "")}, - {0xb6d4, 0, 0, 1, f(Yes, true, "")}, - {0xb6d5, 0, 0, 2, f(Yes, false, "")}, - {0xb6f0, 0, 0, 1, f(Yes, true, "")}, - {0xb6f1, 0, 0, 2, f(Yes, false, "")}, - {0xb70c, 0, 0, 1, f(Yes, true, "")}, - {0xb70d, 0, 0, 2, f(Yes, false, "")}, - {0xb728, 0, 0, 1, f(Yes, true, "")}, - {0xb729, 0, 0, 2, f(Yes, false, "")}, - {0xb744, 0, 0, 1, f(Yes, true, "")}, - {0xb745, 0, 0, 2, f(Yes, false, "")}, - {0xb760, 0, 0, 1, f(Yes, true, "")}, - {0xb761, 0, 0, 2, f(Yes, false, "")}, - {0xb77c, 0, 0, 1, f(Yes, true, "")}, - {0xb77d, 0, 0, 2, f(Yes, false, "")}, - {0xb798, 0, 0, 1, f(Yes, true, "")}, - {0xb799, 0, 0, 2, f(Yes, false, "")}, - {0xb7b4, 0, 0, 1, f(Yes, true, "")}, - {0xb7b5, 0, 0, 2, f(Yes, false, "")}, - {0xb7d0, 0, 0, 1, f(Yes, true, "")}, - {0xb7d1, 0, 0, 2, f(Yes, false, "")}, - {0xb7ec, 0, 0, 1, f(Yes, true, "")}, - {0xb7ed, 0, 0, 2, f(Yes, false, "")}, - {0xb808, 0, 0, 1, f(Yes, true, "")}, - {0xb809, 0, 0, 2, f(Yes, false, "")}, - {0xb824, 0, 0, 1, f(Yes, true, "")}, - {0xb825, 0, 0, 2, f(Yes, false, "")}, - {0xb840, 0, 0, 1, f(Yes, true, "")}, - {0xb841, 0, 0, 2, f(Yes, false, "")}, - {0xb85c, 0, 0, 1, f(Yes, true, "")}, - {0xb85d, 0, 0, 2, f(Yes, false, "")}, - {0xb878, 0, 0, 1, f(Yes, true, "")}, - {0xb879, 0, 0, 2, f(Yes, false, "")}, - {0xb894, 0, 0, 1, f(Yes, true, "")}, - {0xb895, 0, 0, 2, f(Yes, false, "")}, - {0xb8b0, 0, 0, 1, f(Yes, true, "")}, - {0xb8b1, 0, 0, 2, f(Yes, false, "")}, - {0xb8cc, 0, 0, 1, f(Yes, true, "")}, - {0xb8cd, 0, 0, 2, f(Yes, false, "")}, - {0xb8e8, 0, 0, 1, f(Yes, true, "")}, - {0xb8e9, 0, 0, 2, f(Yes, false, "")}, - {0xb904, 0, 0, 1, f(Yes, true, "")}, - {0xb905, 0, 0, 2, f(Yes, false, "")}, - {0xb920, 0, 0, 1, f(Yes, true, "")}, - {0xb921, 0, 0, 2, f(Yes, false, "")}, - {0xb93c, 0, 0, 1, f(Yes, true, "")}, - {0xb93d, 0, 0, 2, f(Yes, false, "")}, - {0xb958, 0, 0, 1, f(Yes, true, "")}, - {0xb959, 0, 0, 2, f(Yes, false, "")}, - {0xb974, 0, 0, 1, f(Yes, true, "")}, - {0xb975, 0, 0, 2, f(Yes, false, "")}, - {0xb990, 0, 0, 1, f(Yes, true, "")}, - {0xb991, 0, 0, 2, f(Yes, false, "")}, - {0xb9ac, 0, 0, 1, f(Yes, true, "")}, - {0xb9ad, 0, 0, 2, f(Yes, false, "")}, - {0xb9c8, 0, 0, 1, f(Yes, true, "")}, - {0xb9c9, 0, 0, 2, f(Yes, false, "")}, - {0xb9e4, 0, 0, 1, f(Yes, true, "")}, - {0xb9e5, 0, 0, 2, f(Yes, false, "")}, - {0xba00, 0, 0, 1, f(Yes, true, "")}, - {0xba01, 0, 0, 2, f(Yes, false, "")}, - {0xba1c, 0, 0, 1, f(Yes, true, "")}, - {0xba1d, 0, 0, 2, f(Yes, false, "")}, - {0xba38, 0, 0, 1, f(Yes, true, "")}, - {0xba39, 0, 0, 2, f(Yes, false, "")}, - {0xba54, 0, 0, 1, f(Yes, true, "")}, - {0xba55, 0, 0, 2, f(Yes, false, "")}, - {0xba70, 0, 0, 1, f(Yes, true, "")}, - {0xba71, 0, 0, 2, f(Yes, false, "")}, - {0xba8c, 0, 0, 1, f(Yes, true, "")}, - {0xba8d, 0, 0, 2, f(Yes, false, "")}, - {0xbaa8, 0, 0, 1, f(Yes, true, "")}, - {0xbaa9, 0, 0, 2, f(Yes, false, "")}, - {0xbac4, 0, 0, 1, f(Yes, true, "")}, - {0xbac5, 0, 0, 2, f(Yes, false, "")}, - {0xbae0, 0, 0, 1, f(Yes, true, "")}, - {0xbae1, 0, 0, 2, f(Yes, false, "")}, - {0xbafc, 0, 0, 1, f(Yes, true, "")}, - {0xbafd, 0, 0, 2, f(Yes, false, "")}, - {0xbb18, 0, 0, 1, f(Yes, true, "")}, - {0xbb19, 0, 0, 2, f(Yes, false, "")}, - {0xbb34, 0, 0, 1, f(Yes, true, "")}, - {0xbb35, 0, 0, 2, f(Yes, false, "")}, - {0xbb50, 0, 0, 1, f(Yes, true, "")}, - {0xbb51, 0, 0, 2, f(Yes, false, "")}, - {0xbb6c, 0, 0, 1, f(Yes, true, "")}, - {0xbb6d, 0, 0, 2, f(Yes, false, "")}, - {0xbb88, 0, 0, 1, f(Yes, true, "")}, - {0xbb89, 0, 0, 2, f(Yes, false, "")}, - {0xbba4, 0, 0, 1, f(Yes, true, "")}, - {0xbba5, 0, 0, 2, f(Yes, false, "")}, - {0xbbc0, 0, 0, 1, f(Yes, true, "")}, - {0xbbc1, 0, 0, 2, f(Yes, false, "")}, - {0xbbdc, 0, 0, 1, f(Yes, true, "")}, - {0xbbdd, 0, 0, 2, f(Yes, false, "")}, - {0xbbf8, 0, 0, 1, f(Yes, true, "")}, - {0xbbf9, 0, 0, 2, f(Yes, false, "")}, - {0xbc14, 0, 0, 1, f(Yes, true, "")}, - {0xbc15, 0, 0, 2, f(Yes, false, "")}, - {0xbc30, 0, 0, 1, f(Yes, true, "")}, - {0xbc31, 0, 0, 2, f(Yes, false, "")}, - {0xbc4c, 0, 0, 1, f(Yes, true, "")}, - {0xbc4d, 0, 0, 2, f(Yes, false, "")}, - {0xbc68, 0, 0, 1, f(Yes, true, "")}, - {0xbc69, 0, 0, 2, f(Yes, false, "")}, - {0xbc84, 0, 0, 1, f(Yes, true, "")}, - {0xbc85, 0, 0, 2, f(Yes, false, "")}, - {0xbca0, 0, 0, 1, f(Yes, true, "")}, - {0xbca1, 0, 0, 2, f(Yes, false, "")}, - {0xbcbc, 0, 0, 1, f(Yes, true, "")}, - {0xbcbd, 0, 0, 2, f(Yes, false, "")}, - {0xbcd8, 0, 0, 1, f(Yes, true, "")}, - {0xbcd9, 0, 0, 2, f(Yes, false, "")}, - {0xbcf4, 0, 0, 1, f(Yes, true, "")}, - {0xbcf5, 0, 0, 2, f(Yes, false, "")}, - {0xbd10, 0, 0, 1, f(Yes, true, "")}, - {0xbd11, 0, 0, 2, f(Yes, false, "")}, - {0xbd2c, 0, 0, 1, f(Yes, true, "")}, - {0xbd2d, 0, 0, 2, f(Yes, false, "")}, - {0xbd48, 0, 0, 1, f(Yes, true, "")}, - {0xbd49, 0, 0, 2, f(Yes, false, "")}, - {0xbd64, 0, 0, 1, f(Yes, true, "")}, - {0xbd65, 0, 0, 2, f(Yes, false, "")}, - {0xbd80, 0, 0, 1, f(Yes, true, "")}, - {0xbd81, 0, 0, 2, f(Yes, false, "")}, - {0xbd9c, 0, 0, 1, f(Yes, true, "")}, - {0xbd9d, 0, 0, 2, f(Yes, false, "")}, - {0xbdb8, 0, 0, 1, f(Yes, true, "")}, - {0xbdb9, 0, 0, 2, f(Yes, false, "")}, - {0xbdd4, 0, 0, 1, f(Yes, true, "")}, - {0xbdd5, 0, 0, 2, f(Yes, false, "")}, - {0xbdf0, 0, 0, 1, f(Yes, true, "")}, - {0xbdf1, 0, 0, 2, f(Yes, false, "")}, - {0xbe0c, 0, 0, 1, f(Yes, true, "")}, - {0xbe0d, 0, 0, 2, f(Yes, false, "")}, - {0xbe28, 0, 0, 1, f(Yes, true, "")}, - {0xbe29, 0, 0, 2, f(Yes, false, "")}, - {0xbe44, 0, 0, 1, f(Yes, true, "")}, - {0xbe45, 0, 0, 2, f(Yes, false, "")}, - {0xbe60, 0, 0, 1, f(Yes, true, "")}, - {0xbe61, 0, 0, 2, f(Yes, false, "")}, - {0xbe7c, 0, 0, 1, f(Yes, true, "")}, - {0xbe7d, 0, 0, 2, f(Yes, false, "")}, - {0xbe98, 0, 0, 1, f(Yes, true, "")}, - {0xbe99, 0, 0, 2, f(Yes, false, "")}, - {0xbeb4, 0, 0, 1, f(Yes, true, "")}, - {0xbeb5, 0, 0, 2, f(Yes, false, "")}, - {0xbed0, 0, 0, 1, f(Yes, true, "")}, - {0xbed1, 0, 0, 2, f(Yes, false, "")}, - {0xbeec, 0, 0, 1, f(Yes, true, "")}, - {0xbeed, 0, 0, 2, f(Yes, false, "")}, - {0xbf08, 0, 0, 1, f(Yes, true, "")}, - {0xbf09, 0, 0, 2, f(Yes, false, "")}, - {0xbf24, 0, 0, 1, f(Yes, true, "")}, - {0xbf25, 0, 0, 2, f(Yes, false, "")}, - {0xbf40, 0, 0, 1, f(Yes, true, "")}, - {0xbf41, 0, 0, 2, f(Yes, false, "")}, - {0xbf5c, 0, 0, 1, f(Yes, true, "")}, - {0xbf5d, 0, 0, 2, f(Yes, false, "")}, - {0xbf78, 0, 0, 1, f(Yes, true, "")}, - {0xbf79, 0, 0, 2, f(Yes, false, "")}, - {0xbf94, 0, 0, 1, f(Yes, true, "")}, - {0xbf95, 0, 0, 2, f(Yes, false, "")}, - {0xbfb0, 0, 0, 1, f(Yes, true, "")}, - {0xbfb1, 0, 0, 2, f(Yes, false, "")}, - {0xbfcc, 0, 0, 1, f(Yes, true, "")}, - {0xbfcd, 0, 0, 2, f(Yes, false, "")}, - {0xbfe8, 0, 0, 1, f(Yes, true, "")}, - {0xbfe9, 0, 0, 2, f(Yes, false, "")}, - {0xc004, 0, 0, 1, f(Yes, true, "")}, - {0xc005, 0, 0, 2, f(Yes, false, "")}, - {0xc020, 0, 0, 1, f(Yes, true, "")}, - {0xc021, 0, 0, 2, f(Yes, false, "")}, - {0xc03c, 0, 0, 1, f(Yes, true, "")}, - {0xc03d, 0, 0, 2, f(Yes, false, "")}, - {0xc058, 0, 0, 1, f(Yes, true, "")}, - {0xc059, 0, 0, 2, f(Yes, false, "")}, - {0xc074, 0, 0, 1, f(Yes, true, "")}, - {0xc075, 0, 0, 2, f(Yes, false, "")}, - {0xc090, 0, 0, 1, f(Yes, true, "")}, - {0xc091, 0, 0, 2, f(Yes, false, "")}, - {0xc0ac, 0, 0, 1, f(Yes, true, "")}, - {0xc0ad, 0, 0, 2, f(Yes, false, "")}, - {0xc0c8, 0, 0, 1, f(Yes, true, "")}, - {0xc0c9, 0, 0, 2, f(Yes, false, "")}, - {0xc0e4, 0, 0, 1, f(Yes, true, "")}, - {0xc0e5, 0, 0, 2, f(Yes, false, "")}, - {0xc100, 0, 0, 1, f(Yes, true, "")}, - {0xc101, 0, 0, 2, f(Yes, false, "")}, - {0xc11c, 0, 0, 1, f(Yes, true, "")}, - {0xc11d, 0, 0, 2, f(Yes, false, "")}, - {0xc138, 0, 0, 1, f(Yes, true, "")}, - {0xc139, 0, 0, 2, f(Yes, false, "")}, - {0xc154, 0, 0, 1, f(Yes, true, "")}, - {0xc155, 0, 0, 2, f(Yes, false, "")}, - {0xc170, 0, 0, 1, f(Yes, true, "")}, - {0xc171, 0, 0, 2, f(Yes, false, "")}, - {0xc18c, 0, 0, 1, f(Yes, true, "")}, - {0xc18d, 0, 0, 2, f(Yes, false, "")}, - {0xc1a8, 0, 0, 1, f(Yes, true, "")}, - {0xc1a9, 0, 0, 2, f(Yes, false, "")}, - {0xc1c4, 0, 0, 1, f(Yes, true, "")}, - {0xc1c5, 0, 0, 2, f(Yes, false, "")}, - {0xc1e0, 0, 0, 1, f(Yes, true, "")}, - {0xc1e1, 0, 0, 2, f(Yes, false, "")}, - {0xc1fc, 0, 0, 1, f(Yes, true, "")}, - {0xc1fd, 0, 0, 2, f(Yes, false, "")}, - {0xc218, 0, 0, 1, f(Yes, true, "")}, - {0xc219, 0, 0, 2, f(Yes, false, "")}, - {0xc234, 0, 0, 1, f(Yes, true, "")}, - {0xc235, 0, 0, 2, f(Yes, false, "")}, - {0xc250, 0, 0, 1, f(Yes, true, "")}, - {0xc251, 0, 0, 2, f(Yes, false, "")}, - {0xc26c, 0, 0, 1, f(Yes, true, "")}, - {0xc26d, 0, 0, 2, f(Yes, false, "")}, - {0xc288, 0, 0, 1, f(Yes, true, "")}, - {0xc289, 0, 0, 2, f(Yes, false, "")}, - {0xc2a4, 0, 0, 1, f(Yes, true, "")}, - {0xc2a5, 0, 0, 2, f(Yes, false, "")}, - {0xc2c0, 0, 0, 1, f(Yes, true, "")}, - {0xc2c1, 0, 0, 2, f(Yes, false, "")}, - {0xc2dc, 0, 0, 1, f(Yes, true, "")}, - {0xc2dd, 0, 0, 2, f(Yes, false, "")}, - {0xc2f8, 0, 0, 1, f(Yes, true, "")}, - {0xc2f9, 0, 0, 2, f(Yes, false, "")}, - {0xc314, 0, 0, 1, f(Yes, true, "")}, - {0xc315, 0, 0, 2, f(Yes, false, "")}, - {0xc330, 0, 0, 1, f(Yes, true, "")}, - {0xc331, 0, 0, 2, f(Yes, false, "")}, - {0xc34c, 0, 0, 1, f(Yes, true, "")}, - {0xc34d, 0, 0, 2, f(Yes, false, "")}, - {0xc368, 0, 0, 1, f(Yes, true, "")}, - {0xc369, 0, 0, 2, f(Yes, false, "")}, - {0xc384, 0, 0, 1, f(Yes, true, "")}, - {0xc385, 0, 0, 2, f(Yes, false, "")}, - {0xc3a0, 0, 0, 1, f(Yes, true, "")}, - {0xc3a1, 0, 0, 2, f(Yes, false, "")}, - {0xc3bc, 0, 0, 1, f(Yes, true, "")}, - {0xc3bd, 0, 0, 2, f(Yes, false, "")}, - {0xc3d8, 0, 0, 1, f(Yes, true, "")}, - {0xc3d9, 0, 0, 2, f(Yes, false, "")}, - {0xc3f4, 0, 0, 1, f(Yes, true, "")}, - {0xc3f5, 0, 0, 2, f(Yes, false, "")}, - {0xc410, 0, 0, 1, f(Yes, true, "")}, - {0xc411, 0, 0, 2, f(Yes, false, "")}, - {0xc42c, 0, 0, 1, f(Yes, true, "")}, - {0xc42d, 0, 0, 2, f(Yes, false, "")}, - {0xc448, 0, 0, 1, f(Yes, true, "")}, - {0xc449, 0, 0, 2, f(Yes, false, "")}, - {0xc464, 0, 0, 1, f(Yes, true, "")}, - {0xc465, 0, 0, 2, f(Yes, false, "")}, - {0xc480, 0, 0, 1, f(Yes, true, "")}, - {0xc481, 0, 0, 2, f(Yes, false, "")}, - {0xc49c, 0, 0, 1, f(Yes, true, "")}, - {0xc49d, 0, 0, 2, f(Yes, false, "")}, - {0xc4b8, 0, 0, 1, f(Yes, true, "")}, - {0xc4b9, 0, 0, 2, f(Yes, false, "")}, - {0xc4d4, 0, 0, 1, f(Yes, true, "")}, - {0xc4d5, 0, 0, 2, f(Yes, false, "")}, - {0xc4f0, 0, 0, 1, f(Yes, true, "")}, - {0xc4f1, 0, 0, 2, f(Yes, false, "")}, - {0xc50c, 0, 0, 1, f(Yes, true, "")}, - {0xc50d, 0, 0, 2, f(Yes, false, "")}, - {0xc528, 0, 0, 1, f(Yes, true, "")}, - {0xc529, 0, 0, 2, f(Yes, false, "")}, - {0xc544, 0, 0, 1, f(Yes, true, "")}, - {0xc545, 0, 0, 2, f(Yes, false, "")}, - {0xc560, 0, 0, 1, f(Yes, true, "")}, - {0xc561, 0, 0, 2, f(Yes, false, "")}, - {0xc57c, 0, 0, 1, f(Yes, true, "")}, - {0xc57d, 0, 0, 2, f(Yes, false, "")}, - {0xc598, 0, 0, 1, f(Yes, true, "")}, - {0xc599, 0, 0, 2, f(Yes, false, "")}, - {0xc5b4, 0, 0, 1, f(Yes, true, "")}, - {0xc5b5, 0, 0, 2, f(Yes, false, "")}, - {0xc5d0, 0, 0, 1, f(Yes, true, "")}, - {0xc5d1, 0, 0, 2, f(Yes, false, "")}, - {0xc5ec, 0, 0, 1, f(Yes, true, "")}, - {0xc5ed, 0, 0, 2, f(Yes, false, "")}, - {0xc608, 0, 0, 1, f(Yes, true, "")}, - {0xc609, 0, 0, 2, f(Yes, false, "")}, - {0xc624, 0, 0, 1, f(Yes, true, "")}, - {0xc625, 0, 0, 2, f(Yes, false, "")}, - {0xc640, 0, 0, 1, f(Yes, true, "")}, - {0xc641, 0, 0, 2, f(Yes, false, "")}, - {0xc65c, 0, 0, 1, f(Yes, true, "")}, - {0xc65d, 0, 0, 2, f(Yes, false, "")}, - {0xc678, 0, 0, 1, f(Yes, true, "")}, - {0xc679, 0, 0, 2, f(Yes, false, "")}, - {0xc694, 0, 0, 1, f(Yes, true, "")}, - {0xc695, 0, 0, 2, f(Yes, false, "")}, - {0xc6b0, 0, 0, 1, f(Yes, true, "")}, - {0xc6b1, 0, 0, 2, f(Yes, false, "")}, - {0xc6cc, 0, 0, 1, f(Yes, true, "")}, - {0xc6cd, 0, 0, 2, f(Yes, false, "")}, - {0xc6e8, 0, 0, 1, f(Yes, true, "")}, - {0xc6e9, 0, 0, 2, f(Yes, false, "")}, - {0xc704, 0, 0, 1, f(Yes, true, "")}, - {0xc705, 0, 0, 2, f(Yes, false, "")}, - {0xc720, 0, 0, 1, f(Yes, true, "")}, - {0xc721, 0, 0, 2, f(Yes, false, "")}, - {0xc73c, 0, 0, 1, f(Yes, true, "")}, - {0xc73d, 0, 0, 2, f(Yes, false, "")}, - {0xc758, 0, 0, 1, f(Yes, true, "")}, - {0xc759, 0, 0, 2, f(Yes, false, "")}, - {0xc774, 0, 0, 1, f(Yes, true, "")}, - {0xc775, 0, 0, 2, f(Yes, false, "")}, - {0xc790, 0, 0, 1, f(Yes, true, "")}, - {0xc791, 0, 0, 2, f(Yes, false, "")}, - {0xc7ac, 0, 0, 1, f(Yes, true, "")}, - {0xc7ad, 0, 0, 2, f(Yes, false, "")}, - {0xc7c8, 0, 0, 1, f(Yes, true, "")}, - {0xc7c9, 0, 0, 2, f(Yes, false, "")}, - {0xc7e4, 0, 0, 1, f(Yes, true, "")}, - {0xc7e5, 0, 0, 2, f(Yes, false, "")}, - {0xc800, 0, 0, 1, f(Yes, true, "")}, - {0xc801, 0, 0, 2, f(Yes, false, "")}, - {0xc81c, 0, 0, 1, f(Yes, true, "")}, - {0xc81d, 0, 0, 2, f(Yes, false, "")}, - {0xc838, 0, 0, 1, f(Yes, true, "")}, - {0xc839, 0, 0, 2, f(Yes, false, "")}, - {0xc854, 0, 0, 1, f(Yes, true, "")}, - {0xc855, 0, 0, 2, f(Yes, false, "")}, - {0xc870, 0, 0, 1, f(Yes, true, "")}, - {0xc871, 0, 0, 2, f(Yes, false, "")}, - {0xc88c, 0, 0, 1, f(Yes, true, "")}, - {0xc88d, 0, 0, 2, f(Yes, false, "")}, - {0xc8a8, 0, 0, 1, f(Yes, true, "")}, - {0xc8a9, 0, 0, 2, f(Yes, false, "")}, - {0xc8c4, 0, 0, 1, f(Yes, true, "")}, - {0xc8c5, 0, 0, 2, f(Yes, false, "")}, - {0xc8e0, 0, 0, 1, f(Yes, true, "")}, - {0xc8e1, 0, 0, 2, f(Yes, false, "")}, - {0xc8fc, 0, 0, 1, f(Yes, true, "")}, - {0xc8fd, 0, 0, 2, f(Yes, false, "")}, - {0xc918, 0, 0, 1, f(Yes, true, "")}, - {0xc919, 0, 0, 2, f(Yes, false, "")}, - {0xc934, 0, 0, 1, f(Yes, true, "")}, - {0xc935, 0, 0, 2, f(Yes, false, "")}, - {0xc950, 0, 0, 1, f(Yes, true, "")}, - {0xc951, 0, 0, 2, f(Yes, false, "")}, - {0xc96c, 0, 0, 1, f(Yes, true, "")}, - {0xc96d, 0, 0, 2, f(Yes, false, "")}, - {0xc988, 0, 0, 1, f(Yes, true, "")}, - {0xc989, 0, 0, 2, f(Yes, false, "")}, - {0xc9a4, 0, 0, 1, f(Yes, true, "")}, - {0xc9a5, 0, 0, 2, f(Yes, false, "")}, - {0xc9c0, 0, 0, 1, f(Yes, true, "")}, - {0xc9c1, 0, 0, 2, f(Yes, false, "")}, - {0xc9dc, 0, 0, 1, f(Yes, true, "")}, - {0xc9dd, 0, 0, 2, f(Yes, false, "")}, - {0xc9f8, 0, 0, 1, f(Yes, true, "")}, - {0xc9f9, 0, 0, 2, f(Yes, false, "")}, - {0xca14, 0, 0, 1, f(Yes, true, "")}, - {0xca15, 0, 0, 2, f(Yes, false, "")}, - {0xca30, 0, 0, 1, f(Yes, true, "")}, - {0xca31, 0, 0, 2, f(Yes, false, "")}, - {0xca4c, 0, 0, 1, f(Yes, true, "")}, - {0xca4d, 0, 0, 2, f(Yes, false, "")}, - {0xca68, 0, 0, 1, f(Yes, true, "")}, - {0xca69, 0, 0, 2, f(Yes, false, "")}, - {0xca84, 0, 0, 1, f(Yes, true, "")}, - {0xca85, 0, 0, 2, f(Yes, false, "")}, - {0xcaa0, 0, 0, 1, f(Yes, true, "")}, - {0xcaa1, 0, 0, 2, f(Yes, false, "")}, - {0xcabc, 0, 0, 1, f(Yes, true, "")}, - {0xcabd, 0, 0, 2, f(Yes, false, "")}, - {0xcad8, 0, 0, 1, f(Yes, true, "")}, - {0xcad9, 0, 0, 2, f(Yes, false, "")}, - {0xcaf4, 0, 0, 1, f(Yes, true, "")}, - {0xcaf5, 0, 0, 2, f(Yes, false, "")}, - {0xcb10, 0, 0, 1, f(Yes, true, "")}, - {0xcb11, 0, 0, 2, f(Yes, false, "")}, - {0xcb2c, 0, 0, 1, f(Yes, true, "")}, - {0xcb2d, 0, 0, 2, f(Yes, false, "")}, - {0xcb48, 0, 0, 1, f(Yes, true, "")}, - {0xcb49, 0, 0, 2, f(Yes, false, "")}, - {0xcb64, 0, 0, 1, f(Yes, true, "")}, - {0xcb65, 0, 0, 2, f(Yes, false, "")}, - {0xcb80, 0, 0, 1, f(Yes, true, "")}, - {0xcb81, 0, 0, 2, f(Yes, false, "")}, - {0xcb9c, 0, 0, 1, f(Yes, true, "")}, - {0xcb9d, 0, 0, 2, f(Yes, false, "")}, - {0xcbb8, 0, 0, 1, f(Yes, true, "")}, - {0xcbb9, 0, 0, 2, f(Yes, false, "")}, - {0xcbd4, 0, 0, 1, f(Yes, true, "")}, - {0xcbd5, 0, 0, 2, f(Yes, false, "")}, - {0xcbf0, 0, 0, 1, f(Yes, true, "")}, - {0xcbf1, 0, 0, 2, f(Yes, false, "")}, - {0xcc0c, 0, 0, 1, f(Yes, true, "")}, - {0xcc0d, 0, 0, 2, f(Yes, false, "")}, - {0xcc28, 0, 0, 1, f(Yes, true, "")}, - {0xcc29, 0, 0, 2, f(Yes, false, "")}, - {0xcc44, 0, 0, 1, f(Yes, true, "")}, - {0xcc45, 0, 0, 2, f(Yes, false, "")}, - {0xcc60, 0, 0, 1, f(Yes, true, "")}, - {0xcc61, 0, 0, 2, f(Yes, false, "")}, - {0xcc7c, 0, 0, 1, f(Yes, true, "")}, - {0xcc7d, 0, 0, 2, f(Yes, false, "")}, - {0xcc98, 0, 0, 1, f(Yes, true, "")}, - {0xcc99, 0, 0, 2, f(Yes, false, "")}, - {0xccb4, 0, 0, 1, f(Yes, true, "")}, - {0xccb5, 0, 0, 2, f(Yes, false, "")}, - {0xccd0, 0, 0, 1, f(Yes, true, "")}, - {0xccd1, 0, 0, 2, f(Yes, false, "")}, - {0xccec, 0, 0, 1, f(Yes, true, "")}, - {0xcced, 0, 0, 2, f(Yes, false, "")}, - {0xcd08, 0, 0, 1, f(Yes, true, "")}, - {0xcd09, 0, 0, 2, f(Yes, false, "")}, - {0xcd24, 0, 0, 1, f(Yes, true, "")}, - {0xcd25, 0, 0, 2, f(Yes, false, "")}, - {0xcd40, 0, 0, 1, f(Yes, true, "")}, - {0xcd41, 0, 0, 2, f(Yes, false, "")}, - {0xcd5c, 0, 0, 1, f(Yes, true, "")}, - {0xcd5d, 0, 0, 2, f(Yes, false, "")}, - {0xcd78, 0, 0, 1, f(Yes, true, "")}, - {0xcd79, 0, 0, 2, f(Yes, false, "")}, - {0xcd94, 0, 0, 1, f(Yes, true, "")}, - {0xcd95, 0, 0, 2, f(Yes, false, "")}, - {0xcdb0, 0, 0, 1, f(Yes, true, "")}, - {0xcdb1, 0, 0, 2, f(Yes, false, "")}, - {0xcdcc, 0, 0, 1, f(Yes, true, "")}, - {0xcdcd, 0, 0, 2, f(Yes, false, "")}, - {0xcde8, 0, 0, 1, f(Yes, true, "")}, - {0xcde9, 0, 0, 2, f(Yes, false, "")}, - {0xce04, 0, 0, 1, f(Yes, true, "")}, - {0xce05, 0, 0, 2, f(Yes, false, "")}, - {0xce20, 0, 0, 1, f(Yes, true, "")}, - {0xce21, 0, 0, 2, f(Yes, false, "")}, - {0xce3c, 0, 0, 1, f(Yes, true, "")}, - {0xce3d, 0, 0, 2, f(Yes, false, "")}, - {0xce58, 0, 0, 1, f(Yes, true, "")}, - {0xce59, 0, 0, 2, f(Yes, false, "")}, - {0xce74, 0, 0, 1, f(Yes, true, "")}, - {0xce75, 0, 0, 2, f(Yes, false, "")}, - {0xce90, 0, 0, 1, f(Yes, true, "")}, - {0xce91, 0, 0, 2, f(Yes, false, "")}, - {0xceac, 0, 0, 1, f(Yes, true, "")}, - {0xcead, 0, 0, 2, f(Yes, false, "")}, - {0xcec8, 0, 0, 1, f(Yes, true, "")}, - {0xcec9, 0, 0, 2, f(Yes, false, "")}, - {0xcee4, 0, 0, 1, f(Yes, true, "")}, - {0xcee5, 0, 0, 2, f(Yes, false, "")}, - {0xcf00, 0, 0, 1, f(Yes, true, "")}, - {0xcf01, 0, 0, 2, f(Yes, false, "")}, - {0xcf1c, 0, 0, 1, f(Yes, true, "")}, - {0xcf1d, 0, 0, 2, f(Yes, false, "")}, - {0xcf38, 0, 0, 1, f(Yes, true, "")}, - {0xcf39, 0, 0, 2, f(Yes, false, "")}, - {0xcf54, 0, 0, 1, f(Yes, true, "")}, - {0xcf55, 0, 0, 2, f(Yes, false, "")}, - {0xcf70, 0, 0, 1, f(Yes, true, "")}, - {0xcf71, 0, 0, 2, f(Yes, false, "")}, - {0xcf8c, 0, 0, 1, f(Yes, true, "")}, - {0xcf8d, 0, 0, 2, f(Yes, false, "")}, - {0xcfa8, 0, 0, 1, f(Yes, true, "")}, - {0xcfa9, 0, 0, 2, f(Yes, false, "")}, - {0xcfc4, 0, 0, 1, f(Yes, true, "")}, - {0xcfc5, 0, 0, 2, f(Yes, false, "")}, - {0xcfe0, 0, 0, 1, f(Yes, true, "")}, - {0xcfe1, 0, 0, 2, f(Yes, false, "")}, - {0xcffc, 0, 0, 1, f(Yes, true, "")}, - {0xcffd, 0, 0, 2, f(Yes, false, "")}, - {0xd018, 0, 0, 1, f(Yes, true, "")}, - {0xd019, 0, 0, 2, f(Yes, false, "")}, - {0xd034, 0, 0, 1, f(Yes, true, "")}, - {0xd035, 0, 0, 2, f(Yes, false, "")}, - {0xd050, 0, 0, 1, f(Yes, true, "")}, - {0xd051, 0, 0, 2, f(Yes, false, "")}, - {0xd06c, 0, 0, 1, f(Yes, true, "")}, - {0xd06d, 0, 0, 2, f(Yes, false, "")}, - {0xd088, 0, 0, 1, f(Yes, true, "")}, - {0xd089, 0, 0, 2, f(Yes, false, "")}, - {0xd0a4, 0, 0, 1, f(Yes, true, "")}, - {0xd0a5, 0, 0, 2, f(Yes, false, "")}, - {0xd0c0, 0, 0, 1, f(Yes, true, "")}, - {0xd0c1, 0, 0, 2, f(Yes, false, "")}, - {0xd0dc, 0, 0, 1, f(Yes, true, "")}, - {0xd0dd, 0, 0, 2, f(Yes, false, "")}, - {0xd0f8, 0, 0, 1, f(Yes, true, "")}, - {0xd0f9, 0, 0, 2, f(Yes, false, "")}, - {0xd114, 0, 0, 1, f(Yes, true, "")}, - {0xd115, 0, 0, 2, f(Yes, false, "")}, - {0xd130, 0, 0, 1, f(Yes, true, "")}, - {0xd131, 0, 0, 2, f(Yes, false, "")}, - {0xd14c, 0, 0, 1, f(Yes, true, "")}, - {0xd14d, 0, 0, 2, f(Yes, false, "")}, - {0xd168, 0, 0, 1, f(Yes, true, "")}, - {0xd169, 0, 0, 2, f(Yes, false, "")}, - {0xd184, 0, 0, 1, f(Yes, true, "")}, - {0xd185, 0, 0, 2, f(Yes, false, "")}, - {0xd1a0, 0, 0, 1, f(Yes, true, "")}, - {0xd1a1, 0, 0, 2, f(Yes, false, "")}, - {0xd1bc, 0, 0, 1, f(Yes, true, "")}, - {0xd1bd, 0, 0, 2, f(Yes, false, "")}, - {0xd1d8, 0, 0, 1, f(Yes, true, "")}, - {0xd1d9, 0, 0, 2, f(Yes, false, "")}, - {0xd1f4, 0, 0, 1, f(Yes, true, "")}, - {0xd1f5, 0, 0, 2, f(Yes, false, "")}, - {0xd210, 0, 0, 1, f(Yes, true, "")}, - {0xd211, 0, 0, 2, f(Yes, false, "")}, - {0xd22c, 0, 0, 1, f(Yes, true, "")}, - {0xd22d, 0, 0, 2, f(Yes, false, "")}, - {0xd248, 0, 0, 1, f(Yes, true, "")}, - {0xd249, 0, 0, 2, f(Yes, false, "")}, - {0xd264, 0, 0, 1, f(Yes, true, "")}, - {0xd265, 0, 0, 2, f(Yes, false, "")}, - {0xd280, 0, 0, 1, f(Yes, true, "")}, - {0xd281, 0, 0, 2, f(Yes, false, "")}, - {0xd29c, 0, 0, 1, f(Yes, true, "")}, - {0xd29d, 0, 0, 2, f(Yes, false, "")}, - {0xd2b8, 0, 0, 1, f(Yes, true, "")}, - {0xd2b9, 0, 0, 2, f(Yes, false, "")}, - {0xd2d4, 0, 0, 1, f(Yes, true, "")}, - {0xd2d5, 0, 0, 2, f(Yes, false, "")}, - {0xd2f0, 0, 0, 1, f(Yes, true, "")}, - {0xd2f1, 0, 0, 2, f(Yes, false, "")}, - {0xd30c, 0, 0, 1, f(Yes, true, "")}, - {0xd30d, 0, 0, 2, f(Yes, false, "")}, - {0xd328, 0, 0, 1, f(Yes, true, "")}, - {0xd329, 0, 0, 2, f(Yes, false, "")}, - {0xd344, 0, 0, 1, f(Yes, true, "")}, - {0xd345, 0, 0, 2, f(Yes, false, "")}, - {0xd360, 0, 0, 1, f(Yes, true, "")}, - {0xd361, 0, 0, 2, f(Yes, false, "")}, - {0xd37c, 0, 0, 1, f(Yes, true, "")}, - {0xd37d, 0, 0, 2, f(Yes, false, "")}, - {0xd398, 0, 0, 1, f(Yes, true, "")}, - {0xd399, 0, 0, 2, f(Yes, false, "")}, - {0xd3b4, 0, 0, 1, f(Yes, true, "")}, - {0xd3b5, 0, 0, 2, f(Yes, false, "")}, - {0xd3d0, 0, 0, 1, f(Yes, true, "")}, - {0xd3d1, 0, 0, 2, f(Yes, false, "")}, - {0xd3ec, 0, 0, 1, f(Yes, true, "")}, - {0xd3ed, 0, 0, 2, f(Yes, false, "")}, - {0xd408, 0, 0, 1, f(Yes, true, "")}, - {0xd409, 0, 0, 2, f(Yes, false, "")}, - {0xd424, 0, 0, 1, f(Yes, true, "")}, - {0xd425, 0, 0, 2, f(Yes, false, "")}, - {0xd440, 0, 0, 1, f(Yes, true, "")}, - {0xd441, 0, 0, 2, f(Yes, false, "")}, - {0xd45c, 0, 0, 1, f(Yes, true, "")}, - {0xd45d, 0, 0, 2, f(Yes, false, "")}, - {0xd478, 0, 0, 1, f(Yes, true, "")}, - {0xd479, 0, 0, 2, f(Yes, false, "")}, - {0xd494, 0, 0, 1, f(Yes, true, "")}, - {0xd495, 0, 0, 2, f(Yes, false, "")}, - {0xd4b0, 0, 0, 1, f(Yes, true, "")}, - {0xd4b1, 0, 0, 2, f(Yes, false, "")}, - {0xd4cc, 0, 0, 1, f(Yes, true, "")}, - {0xd4cd, 0, 0, 2, f(Yes, false, "")}, - {0xd4e8, 0, 0, 1, f(Yes, true, "")}, - {0xd4e9, 0, 0, 2, f(Yes, false, "")}, - {0xd504, 0, 0, 1, f(Yes, true, "")}, - {0xd505, 0, 0, 2, f(Yes, false, "")}, - {0xd520, 0, 0, 1, f(Yes, true, "")}, - {0xd521, 0, 0, 2, f(Yes, false, "")}, - {0xd53c, 0, 0, 1, f(Yes, true, "")}, - {0xd53d, 0, 0, 2, f(Yes, false, "")}, - {0xd558, 0, 0, 1, f(Yes, true, "")}, - {0xd559, 0, 0, 2, f(Yes, false, "")}, - {0xd574, 0, 0, 1, f(Yes, true, "")}, - {0xd575, 0, 0, 2, f(Yes, false, "")}, - {0xd590, 0, 0, 1, f(Yes, true, "")}, - {0xd591, 0, 0, 2, f(Yes, false, "")}, - {0xd5ac, 0, 0, 1, f(Yes, true, "")}, - {0xd5ad, 0, 0, 2, f(Yes, false, "")}, - {0xd5c8, 0, 0, 1, f(Yes, true, "")}, - {0xd5c9, 0, 0, 2, f(Yes, false, "")}, - {0xd5e4, 0, 0, 1, f(Yes, true, "")}, - {0xd5e5, 0, 0, 2, f(Yes, false, "")}, - {0xd600, 0, 0, 1, f(Yes, true, "")}, - {0xd601, 0, 0, 2, f(Yes, false, "")}, - {0xd61c, 0, 0, 1, f(Yes, true, "")}, - {0xd61d, 0, 0, 2, f(Yes, false, "")}, - {0xd638, 0, 0, 1, f(Yes, true, "")}, - {0xd639, 0, 0, 2, f(Yes, false, "")}, - {0xd654, 0, 0, 1, f(Yes, true, "")}, - {0xd655, 0, 0, 2, f(Yes, false, "")}, - {0xd670, 0, 0, 1, f(Yes, true, "")}, - {0xd671, 0, 0, 2, f(Yes, false, "")}, - {0xd68c, 0, 0, 1, f(Yes, true, "")}, - {0xd68d, 0, 0, 2, f(Yes, false, "")}, - {0xd6a8, 0, 0, 1, f(Yes, true, "")}, - {0xd6a9, 0, 0, 2, f(Yes, false, "")}, - {0xd6c4, 0, 0, 1, f(Yes, true, "")}, - {0xd6c5, 0, 0, 2, f(Yes, false, "")}, - {0xd6e0, 0, 0, 1, f(Yes, true, "")}, - {0xd6e1, 0, 0, 2, f(Yes, false, "")}, - {0xd6fc, 0, 0, 1, f(Yes, true, "")}, - {0xd6fd, 0, 0, 2, f(Yes, false, "")}, - {0xd718, 0, 0, 1, f(Yes, true, "")}, - {0xd719, 0, 0, 2, f(Yes, false, "")}, - {0xd734, 0, 0, 1, f(Yes, true, "")}, - {0xd735, 0, 0, 2, f(Yes, false, "")}, - {0xd750, 0, 0, 1, f(Yes, true, "")}, - {0xd751, 0, 0, 2, f(Yes, false, "")}, - {0xd76c, 0, 0, 1, f(Yes, true, "")}, - {0xd76d, 0, 0, 2, f(Yes, false, "")}, - {0xd788, 0, 0, 1, f(Yes, true, "")}, - {0xd789, 0, 0, 2, f(Yes, false, "")}, - {0xd7a4, 0, 0, 0, f(Yes, false, "")}, - {0xf900, 0, 0, 0, f(No, false, "豈")}, - {0xf901, 0, 0, 0, f(No, false, "更")}, - {0xf902, 0, 0, 0, f(No, false, "車")}, - {0xf903, 0, 0, 0, f(No, false, "賈")}, - {0xf904, 0, 0, 0, f(No, false, "滑")}, - {0xf905, 0, 0, 0, f(No, false, "串")}, - {0xf906, 0, 0, 0, f(No, false, "句")}, - {0xf907, 0, 0, 0, f(No, false, "龜")}, - {0xf909, 0, 0, 0, f(No, false, "契")}, - {0xf90a, 0, 0, 0, f(No, false, "金")}, - {0xf90b, 0, 0, 0, f(No, false, "喇")}, - {0xf90c, 0, 0, 0, f(No, false, "奈")}, - {0xf90d, 0, 0, 0, f(No, false, "懶")}, - {0xf90e, 0, 0, 0, f(No, false, "癩")}, - {0xf90f, 0, 0, 0, f(No, false, "羅")}, - {0xf910, 0, 0, 0, f(No, false, "蘿")}, - {0xf911, 0, 0, 0, f(No, false, "螺")}, - {0xf912, 0, 0, 0, f(No, false, "裸")}, - {0xf913, 0, 0, 0, f(No, false, "邏")}, - {0xf914, 0, 0, 0, f(No, false, "樂")}, - {0xf915, 0, 0, 0, f(No, false, "洛")}, - {0xf916, 0, 0, 0, f(No, false, "烙")}, - {0xf917, 0, 0, 0, f(No, false, "珞")}, - {0xf918, 0, 0, 0, f(No, false, "落")}, - {0xf919, 0, 0, 0, f(No, false, "酪")}, - {0xf91a, 0, 0, 0, f(No, false, "駱")}, - {0xf91b, 0, 0, 0, f(No, false, "亂")}, - {0xf91c, 0, 0, 0, f(No, false, "卵")}, - {0xf91d, 0, 0, 0, f(No, false, "欄")}, - {0xf91e, 0, 0, 0, f(No, false, "爛")}, - {0xf91f, 0, 0, 0, f(No, false, "蘭")}, - {0xf920, 0, 0, 0, f(No, false, "鸞")}, - {0xf921, 0, 0, 0, f(No, false, "嵐")}, - {0xf922, 0, 0, 0, f(No, false, "濫")}, - {0xf923, 0, 0, 0, f(No, false, "藍")}, - {0xf924, 0, 0, 0, f(No, false, "襤")}, - {0xf925, 0, 0, 0, f(No, false, "拉")}, - {0xf926, 0, 0, 0, f(No, false, "臘")}, - {0xf927, 0, 0, 0, f(No, false, "蠟")}, - {0xf928, 0, 0, 0, f(No, false, "廊")}, - {0xf929, 0, 0, 0, f(No, false, "朗")}, - {0xf92a, 0, 0, 0, f(No, false, "浪")}, - {0xf92b, 0, 0, 0, f(No, false, "狼")}, - {0xf92c, 0, 0, 0, f(No, false, "郎")}, - {0xf92d, 0, 0, 0, f(No, false, "來")}, - {0xf92e, 0, 0, 0, f(No, false, "冷")}, - {0xf92f, 0, 0, 0, f(No, false, "勞")}, - {0xf930, 0, 0, 0, f(No, false, "擄")}, - {0xf931, 0, 0, 0, f(No, false, "櫓")}, - {0xf932, 0, 0, 0, f(No, false, "爐")}, - {0xf933, 0, 0, 0, f(No, false, "盧")}, - {0xf934, 0, 0, 0, f(No, false, "老")}, - {0xf935, 0, 0, 0, f(No, false, "蘆")}, - {0xf936, 0, 0, 0, f(No, false, "虜")}, - {0xf937, 0, 0, 0, f(No, false, "路")}, - {0xf938, 0, 0, 0, f(No, false, "露")}, - {0xf939, 0, 0, 0, f(No, false, "魯")}, - {0xf93a, 0, 0, 0, f(No, false, "鷺")}, - {0xf93b, 0, 0, 0, f(No, false, "碌")}, - {0xf93c, 0, 0, 0, f(No, false, "祿")}, - {0xf93d, 0, 0, 0, f(No, false, "綠")}, - {0xf93e, 0, 0, 0, f(No, false, "菉")}, - {0xf93f, 0, 0, 0, f(No, false, "錄")}, - {0xf940, 0, 0, 0, f(No, false, "鹿")}, - {0xf941, 0, 0, 0, f(No, false, "論")}, - {0xf942, 0, 0, 0, f(No, false, "壟")}, - {0xf943, 0, 0, 0, f(No, false, "弄")}, - {0xf944, 0, 0, 0, f(No, false, "籠")}, - {0xf945, 0, 0, 0, f(No, false, "聾")}, - {0xf946, 0, 0, 0, f(No, false, "牢")}, - {0xf947, 0, 0, 0, f(No, false, "磊")}, - {0xf948, 0, 0, 0, f(No, false, "賂")}, - {0xf949, 0, 0, 0, f(No, false, "雷")}, - {0xf94a, 0, 0, 0, f(No, false, "壘")}, - {0xf94b, 0, 0, 0, f(No, false, "屢")}, - {0xf94c, 0, 0, 0, f(No, false, "樓")}, - {0xf94d, 0, 0, 0, f(No, false, "淚")}, - {0xf94e, 0, 0, 0, f(No, false, "漏")}, - {0xf94f, 0, 0, 0, f(No, false, "累")}, - {0xf950, 0, 0, 0, f(No, false, "縷")}, - {0xf951, 0, 0, 0, f(No, false, "陋")}, - {0xf952, 0, 0, 0, f(No, false, "勒")}, - {0xf953, 0, 0, 0, f(No, false, "肋")}, - {0xf954, 0, 0, 0, f(No, false, "凜")}, - {0xf955, 0, 0, 0, f(No, false, "凌")}, - {0xf956, 0, 0, 0, f(No, false, "稜")}, - {0xf957, 0, 0, 0, f(No, false, "綾")}, - {0xf958, 0, 0, 0, f(No, false, "菱")}, - {0xf959, 0, 0, 0, f(No, false, "陵")}, - {0xf95a, 0, 0, 0, f(No, false, "讀")}, - {0xf95b, 0, 0, 0, f(No, false, "拏")}, - {0xf95c, 0, 0, 0, f(No, false, "樂")}, - {0xf95d, 0, 0, 0, f(No, false, "諾")}, - {0xf95e, 0, 0, 0, f(No, false, "丹")}, - {0xf95f, 0, 0, 0, f(No, false, "寧")}, - {0xf960, 0, 0, 0, f(No, false, "怒")}, - {0xf961, 0, 0, 0, f(No, false, "率")}, - {0xf962, 0, 0, 0, f(No, false, "異")}, - {0xf963, 0, 0, 0, f(No, false, "北")}, - {0xf964, 0, 0, 0, f(No, false, "磻")}, - {0xf965, 0, 0, 0, f(No, false, "便")}, - {0xf966, 0, 0, 0, f(No, false, "復")}, - {0xf967, 0, 0, 0, f(No, false, "不")}, - {0xf968, 0, 0, 0, f(No, false, "泌")}, - {0xf969, 0, 0, 0, f(No, false, "數")}, - {0xf96a, 0, 0, 0, f(No, false, "索")}, - {0xf96b, 0, 0, 0, f(No, false, "參")}, - {0xf96c, 0, 0, 0, f(No, false, "塞")}, - {0xf96d, 0, 0, 0, f(No, false, "省")}, - {0xf96e, 0, 0, 0, f(No, false, "葉")}, - {0xf96f, 0, 0, 0, f(No, false, "說")}, - {0xf970, 0, 0, 0, f(No, false, "殺")}, - {0xf971, 0, 0, 0, f(No, false, "辰")}, - {0xf972, 0, 0, 0, f(No, false, "沈")}, - {0xf973, 0, 0, 0, f(No, false, "拾")}, - {0xf974, 0, 0, 0, f(No, false, "若")}, - {0xf975, 0, 0, 0, f(No, false, "掠")}, - {0xf976, 0, 0, 0, f(No, false, "略")}, - {0xf977, 0, 0, 0, f(No, false, "亮")}, - {0xf978, 0, 0, 0, f(No, false, "兩")}, - {0xf979, 0, 0, 0, f(No, false, "凉")}, - {0xf97a, 0, 0, 0, f(No, false, "梁")}, - {0xf97b, 0, 0, 0, f(No, false, "糧")}, - {0xf97c, 0, 0, 0, f(No, false, "良")}, - {0xf97d, 0, 0, 0, f(No, false, "諒")}, - {0xf97e, 0, 0, 0, f(No, false, "量")}, - {0xf97f, 0, 0, 0, f(No, false, "勵")}, - {0xf980, 0, 0, 0, f(No, false, "呂")}, - {0xf981, 0, 0, 0, f(No, false, "女")}, - {0xf982, 0, 0, 0, f(No, false, "廬")}, - {0xf983, 0, 0, 0, f(No, false, "旅")}, - {0xf984, 0, 0, 0, f(No, false, "濾")}, - {0xf985, 0, 0, 0, f(No, false, "礪")}, - {0xf986, 0, 0, 0, f(No, false, "閭")}, - {0xf987, 0, 0, 0, f(No, false, "驪")}, - {0xf988, 0, 0, 0, f(No, false, "麗")}, - {0xf989, 0, 0, 0, f(No, false, "黎")}, - {0xf98a, 0, 0, 0, f(No, false, "力")}, - {0xf98b, 0, 0, 0, f(No, false, "曆")}, - {0xf98c, 0, 0, 0, f(No, false, "歷")}, - {0xf98d, 0, 0, 0, f(No, false, "轢")}, - {0xf98e, 0, 0, 0, f(No, false, "年")}, - {0xf98f, 0, 0, 0, f(No, false, "憐")}, - {0xf990, 0, 0, 0, f(No, false, "戀")}, - {0xf991, 0, 0, 0, f(No, false, "撚")}, - {0xf992, 0, 0, 0, f(No, false, "漣")}, - {0xf993, 0, 0, 0, f(No, false, "煉")}, - {0xf994, 0, 0, 0, f(No, false, "璉")}, - {0xf995, 0, 0, 0, f(No, false, "秊")}, - {0xf996, 0, 0, 0, f(No, false, "練")}, - {0xf997, 0, 0, 0, f(No, false, "聯")}, - {0xf998, 0, 0, 0, f(No, false, "輦")}, - {0xf999, 0, 0, 0, f(No, false, "蓮")}, - {0xf99a, 0, 0, 0, f(No, false, "連")}, - {0xf99b, 0, 0, 0, f(No, false, "鍊")}, - {0xf99c, 0, 0, 0, f(No, false, "列")}, - {0xf99d, 0, 0, 0, f(No, false, "劣")}, - {0xf99e, 0, 0, 0, f(No, false, "咽")}, - {0xf99f, 0, 0, 0, f(No, false, "烈")}, - {0xf9a0, 0, 0, 0, f(No, false, "裂")}, - {0xf9a1, 0, 0, 0, f(No, false, "說")}, - {0xf9a2, 0, 0, 0, f(No, false, "廉")}, - {0xf9a3, 0, 0, 0, f(No, false, "念")}, - {0xf9a4, 0, 0, 0, f(No, false, "捻")}, - {0xf9a5, 0, 0, 0, f(No, false, "殮")}, - {0xf9a6, 0, 0, 0, f(No, false, "簾")}, - {0xf9a7, 0, 0, 0, f(No, false, "獵")}, - {0xf9a8, 0, 0, 0, f(No, false, "令")}, - {0xf9a9, 0, 0, 0, f(No, false, "囹")}, - {0xf9aa, 0, 0, 0, f(No, false, "寧")}, - {0xf9ab, 0, 0, 0, f(No, false, "嶺")}, - {0xf9ac, 0, 0, 0, f(No, false, "怜")}, - {0xf9ad, 0, 0, 0, f(No, false, "玲")}, - {0xf9ae, 0, 0, 0, f(No, false, "瑩")}, - {0xf9af, 0, 0, 0, f(No, false, "羚")}, - {0xf9b0, 0, 0, 0, f(No, false, "聆")}, - {0xf9b1, 0, 0, 0, f(No, false, "鈴")}, - {0xf9b2, 0, 0, 0, f(No, false, "零")}, - {0xf9b3, 0, 0, 0, f(No, false, "靈")}, - {0xf9b4, 0, 0, 0, f(No, false, "領")}, - {0xf9b5, 0, 0, 0, f(No, false, "例")}, - {0xf9b6, 0, 0, 0, f(No, false, "禮")}, - {0xf9b7, 0, 0, 0, f(No, false, "醴")}, - {0xf9b8, 0, 0, 0, f(No, false, "隸")}, - {0xf9b9, 0, 0, 0, f(No, false, "惡")}, - {0xf9ba, 0, 0, 0, f(No, false, "了")}, - {0xf9bb, 0, 0, 0, f(No, false, "僚")}, - {0xf9bc, 0, 0, 0, f(No, false, "寮")}, - {0xf9bd, 0, 0, 0, f(No, false, "尿")}, - {0xf9be, 0, 0, 0, f(No, false, "料")}, - {0xf9bf, 0, 0, 0, f(No, false, "樂")}, - {0xf9c0, 0, 0, 0, f(No, false, "燎")}, - {0xf9c1, 0, 0, 0, f(No, false, "療")}, - {0xf9c2, 0, 0, 0, f(No, false, "蓼")}, - {0xf9c3, 0, 0, 0, f(No, false, "遼")}, - {0xf9c4, 0, 0, 0, f(No, false, "龍")}, - {0xf9c5, 0, 0, 0, f(No, false, "暈")}, - {0xf9c6, 0, 0, 0, f(No, false, "阮")}, - {0xf9c7, 0, 0, 0, f(No, false, "劉")}, - {0xf9c8, 0, 0, 0, f(No, false, "杻")}, - {0xf9c9, 0, 0, 0, f(No, false, "柳")}, - {0xf9ca, 0, 0, 0, f(No, false, "流")}, - {0xf9cb, 0, 0, 0, f(No, false, "溜")}, - {0xf9cc, 0, 0, 0, f(No, false, "琉")}, - {0xf9cd, 0, 0, 0, f(No, false, "留")}, - {0xf9ce, 0, 0, 0, f(No, false, "硫")}, - {0xf9cf, 0, 0, 0, f(No, false, "紐")}, - {0xf9d0, 0, 0, 0, f(No, false, "類")}, - {0xf9d1, 0, 0, 0, f(No, false, "六")}, - {0xf9d2, 0, 0, 0, f(No, false, "戮")}, - {0xf9d3, 0, 0, 0, f(No, false, "陸")}, - {0xf9d4, 0, 0, 0, f(No, false, "倫")}, - {0xf9d5, 0, 0, 0, f(No, false, "崙")}, - {0xf9d6, 0, 0, 0, f(No, false, "淪")}, - {0xf9d7, 0, 0, 0, f(No, false, "輪")}, - {0xf9d8, 0, 0, 0, f(No, false, "律")}, - {0xf9d9, 0, 0, 0, f(No, false, "慄")}, - {0xf9da, 0, 0, 0, f(No, false, "栗")}, - {0xf9db, 0, 0, 0, f(No, false, "率")}, - {0xf9dc, 0, 0, 0, f(No, false, "隆")}, - {0xf9dd, 0, 0, 0, f(No, false, "利")}, - {0xf9de, 0, 0, 0, f(No, false, "吏")}, - {0xf9df, 0, 0, 0, f(No, false, "履")}, - {0xf9e0, 0, 0, 0, f(No, false, "易")}, - {0xf9e1, 0, 0, 0, f(No, false, "李")}, - {0xf9e2, 0, 0, 0, f(No, false, "梨")}, - {0xf9e3, 0, 0, 0, f(No, false, "泥")}, - {0xf9e4, 0, 0, 0, f(No, false, "理")}, - {0xf9e5, 0, 0, 0, f(No, false, "痢")}, - {0xf9e6, 0, 0, 0, f(No, false, "罹")}, - {0xf9e7, 0, 0, 0, f(No, false, "裏")}, - {0xf9e8, 0, 0, 0, f(No, false, "裡")}, - {0xf9e9, 0, 0, 0, f(No, false, "里")}, - {0xf9ea, 0, 0, 0, f(No, false, "離")}, - {0xf9eb, 0, 0, 0, f(No, false, "匿")}, - {0xf9ec, 0, 0, 0, f(No, false, "溺")}, - {0xf9ed, 0, 0, 0, f(No, false, "吝")}, - {0xf9ee, 0, 0, 0, f(No, false, "燐")}, - {0xf9ef, 0, 0, 0, f(No, false, "璘")}, - {0xf9f0, 0, 0, 0, f(No, false, "藺")}, - {0xf9f1, 0, 0, 0, f(No, false, "隣")}, - {0xf9f2, 0, 0, 0, f(No, false, "鱗")}, - {0xf9f3, 0, 0, 0, f(No, false, "麟")}, - {0xf9f4, 0, 0, 0, f(No, false, "林")}, - {0xf9f5, 0, 0, 0, f(No, false, "淋")}, - {0xf9f6, 0, 0, 0, f(No, false, "臨")}, - {0xf9f7, 0, 0, 0, f(No, false, "立")}, - {0xf9f8, 0, 0, 0, f(No, false, "笠")}, - {0xf9f9, 0, 0, 0, f(No, false, "粒")}, - {0xf9fa, 0, 0, 0, f(No, false, "狀")}, - {0xf9fb, 0, 0, 0, f(No, false, "炙")}, - {0xf9fc, 0, 0, 0, f(No, false, "識")}, - {0xf9fd, 0, 0, 0, f(No, false, "什")}, - {0xf9fe, 0, 0, 0, f(No, false, "茶")}, - {0xf9ff, 0, 0, 0, f(No, false, "刺")}, - {0xfa00, 0, 0, 0, f(No, false, "切")}, - {0xfa01, 0, 0, 0, f(No, false, "度")}, - {0xfa02, 0, 0, 0, f(No, false, "拓")}, - {0xfa03, 0, 0, 0, f(No, false, "糖")}, - {0xfa04, 0, 0, 0, f(No, false, "宅")}, - {0xfa05, 0, 0, 0, f(No, false, "洞")}, - {0xfa06, 0, 0, 0, f(No, false, "暴")}, - {0xfa07, 0, 0, 0, f(No, false, "輻")}, - {0xfa08, 0, 0, 0, f(No, false, "行")}, - {0xfa09, 0, 0, 0, f(No, false, "降")}, - {0xfa0a, 0, 0, 0, f(No, false, "見")}, - {0xfa0b, 0, 0, 0, f(No, false, "廓")}, - {0xfa0c, 0, 0, 0, f(No, false, "兀")}, - {0xfa0d, 0, 0, 0, f(No, false, "嗀")}, - {0xfa0e, 0, 0, 0, f(Yes, false, "")}, - {0xfa10, 0, 0, 0, f(No, false, "塚")}, - {0xfa11, 0, 0, 0, f(Yes, false, "")}, - {0xfa12, 0, 0, 0, f(No, false, "晴")}, - {0xfa13, 0, 0, 0, f(Yes, false, "")}, - {0xfa15, 0, 0, 0, f(No, false, "凞")}, - {0xfa16, 0, 0, 0, f(No, false, "猪")}, - {0xfa17, 0, 0, 0, f(No, false, "益")}, - {0xfa18, 0, 0, 0, f(No, false, "礼")}, - {0xfa19, 0, 0, 0, f(No, false, "神")}, - {0xfa1a, 0, 0, 0, f(No, false, "祥")}, - {0xfa1b, 0, 0, 0, f(No, false, "福")}, - {0xfa1c, 0, 0, 0, f(No, false, "靖")}, - {0xfa1d, 0, 0, 0, f(No, false, "精")}, - {0xfa1e, 0, 0, 0, f(No, false, "羽")}, - {0xfa1f, 0, 0, 0, f(Yes, false, "")}, - {0xfa20, 0, 0, 0, f(No, false, "蘒")}, - {0xfa21, 0, 0, 0, f(Yes, false, "")}, - {0xfa22, 0, 0, 0, f(No, false, "諸")}, - {0xfa23, 0, 0, 0, f(Yes, false, "")}, - {0xfa25, 0, 0, 0, f(No, false, "逸")}, - {0xfa26, 0, 0, 0, f(No, false, "都")}, - {0xfa27, 0, 0, 0, f(Yes, false, "")}, - {0xfa2a, 0, 0, 0, f(No, false, "飯")}, - {0xfa2b, 0, 0, 0, f(No, false, "飼")}, - {0xfa2c, 0, 0, 0, f(No, false, "館")}, - {0xfa2d, 0, 0, 0, f(No, false, "鶴")}, - {0xfa2e, 0, 0, 0, f(No, false, "郞")}, - {0xfa2f, 0, 0, 0, f(No, false, "隷")}, - {0xfa30, 0, 0, 0, f(No, false, "侮")}, - {0xfa31, 0, 0, 0, f(No, false, "僧")}, - {0xfa32, 0, 0, 0, f(No, false, "免")}, - {0xfa33, 0, 0, 0, f(No, false, "勉")}, - {0xfa34, 0, 0, 0, f(No, false, "勤")}, - {0xfa35, 0, 0, 0, f(No, false, "卑")}, - {0xfa36, 0, 0, 0, f(No, false, "喝")}, - {0xfa37, 0, 0, 0, f(No, false, "嘆")}, - {0xfa38, 0, 0, 0, f(No, false, "器")}, - {0xfa39, 0, 0, 0, f(No, false, "塀")}, - {0xfa3a, 0, 0, 0, f(No, false, "墨")}, - {0xfa3b, 0, 0, 0, f(No, false, "層")}, - {0xfa3c, 0, 0, 0, f(No, false, "屮")}, - {0xfa3d, 0, 0, 0, f(No, false, "悔")}, - {0xfa3e, 0, 0, 0, f(No, false, "慨")}, - {0xfa3f, 0, 0, 0, f(No, false, "憎")}, - {0xfa40, 0, 0, 0, f(No, false, "懲")}, - {0xfa41, 0, 0, 0, f(No, false, "敏")}, - {0xfa42, 0, 0, 0, f(No, false, "既")}, - {0xfa43, 0, 0, 0, f(No, false, "暑")}, - {0xfa44, 0, 0, 0, f(No, false, "梅")}, - {0xfa45, 0, 0, 0, f(No, false, "海")}, - {0xfa46, 0, 0, 0, f(No, false, "渚")}, - {0xfa47, 0, 0, 0, f(No, false, "漢")}, - {0xfa48, 0, 0, 0, f(No, false, "煮")}, - {0xfa49, 0, 0, 0, f(No, false, "爫")}, - {0xfa4a, 0, 0, 0, f(No, false, "琢")}, - {0xfa4b, 0, 0, 0, f(No, false, "碑")}, - {0xfa4c, 0, 0, 0, f(No, false, "社")}, - {0xfa4d, 0, 0, 0, f(No, false, "祉")}, - {0xfa4e, 0, 0, 0, f(No, false, "祈")}, - {0xfa4f, 0, 0, 0, f(No, false, "祐")}, - {0xfa50, 0, 0, 0, f(No, false, "祖")}, - {0xfa51, 0, 0, 0, f(No, false, "祝")}, - {0xfa52, 0, 0, 0, f(No, false, "禍")}, - {0xfa53, 0, 0, 0, f(No, false, "禎")}, - {0xfa54, 0, 0, 0, f(No, false, "穀")}, - {0xfa55, 0, 0, 0, f(No, false, "突")}, - {0xfa56, 0, 0, 0, f(No, false, "節")}, - {0xfa57, 0, 0, 0, f(No, false, "練")}, - {0xfa58, 0, 0, 0, f(No, false, "縉")}, - {0xfa59, 0, 0, 0, f(No, false, "繁")}, - {0xfa5a, 0, 0, 0, f(No, false, "署")}, - {0xfa5b, 0, 0, 0, f(No, false, "者")}, - {0xfa5c, 0, 0, 0, f(No, false, "臭")}, - {0xfa5d, 0, 0, 0, f(No, false, "艹")}, - {0xfa5f, 0, 0, 0, f(No, false, "著")}, - {0xfa60, 0, 0, 0, f(No, false, "褐")}, - {0xfa61, 0, 0, 0, f(No, false, "視")}, - {0xfa62, 0, 0, 0, f(No, false, "謁")}, - {0xfa63, 0, 0, 0, f(No, false, "謹")}, - {0xfa64, 0, 0, 0, f(No, false, "賓")}, - {0xfa65, 0, 0, 0, f(No, false, "贈")}, - {0xfa66, 0, 0, 0, f(No, false, "辶")}, - {0xfa67, 0, 0, 0, f(No, false, "逸")}, - {0xfa68, 0, 0, 0, f(No, false, "難")}, - {0xfa69, 0, 0, 0, f(No, false, "響")}, - {0xfa6a, 0, 0, 0, f(No, false, "頻")}, - {0xfa6b, 0, 0, 0, f(No, false, "恵")}, - {0xfa6c, 0, 0, 0, f(No, false, "𤋮")}, - {0xfa6d, 0, 0, 0, f(No, false, "舘")}, - {0xfa6e, 0, 0, 0, f(Yes, false, "")}, - {0xfa70, 0, 0, 0, f(No, false, "並")}, - {0xfa71, 0, 0, 0, f(No, false, "况")}, - {0xfa72, 0, 0, 0, f(No, false, "全")}, - {0xfa73, 0, 0, 0, f(No, false, "侀")}, - {0xfa74, 0, 0, 0, f(No, false, "充")}, - {0xfa75, 0, 0, 0, f(No, false, "冀")}, - {0xfa76, 0, 0, 0, f(No, false, "勇")}, - {0xfa77, 0, 0, 0, f(No, false, "勺")}, - {0xfa78, 0, 0, 0, f(No, false, "喝")}, - {0xfa79, 0, 0, 0, f(No, false, "啕")}, - {0xfa7a, 0, 0, 0, f(No, false, "喙")}, - {0xfa7b, 0, 0, 0, f(No, false, "嗢")}, - {0xfa7c, 0, 0, 0, f(No, false, "塚")}, - {0xfa7d, 0, 0, 0, f(No, false, "墳")}, - {0xfa7e, 0, 0, 0, f(No, false, "奄")}, - {0xfa7f, 0, 0, 0, f(No, false, "奔")}, - {0xfa80, 0, 0, 0, f(No, false, "婢")}, - {0xfa81, 0, 0, 0, f(No, false, "嬨")}, - {0xfa82, 0, 0, 0, f(No, false, "廒")}, - {0xfa83, 0, 0, 0, f(No, false, "廙")}, - {0xfa84, 0, 0, 0, f(No, false, "彩")}, - {0xfa85, 0, 0, 0, f(No, false, "徭")}, - {0xfa86, 0, 0, 0, f(No, false, "惘")}, - {0xfa87, 0, 0, 0, f(No, false, "慎")}, - {0xfa88, 0, 0, 0, f(No, false, "愈")}, - {0xfa89, 0, 0, 0, f(No, false, "憎")}, - {0xfa8a, 0, 0, 0, f(No, false, "慠")}, - {0xfa8b, 0, 0, 0, f(No, false, "懲")}, - {0xfa8c, 0, 0, 0, f(No, false, "戴")}, - {0xfa8d, 0, 0, 0, f(No, false, "揄")}, - {0xfa8e, 0, 0, 0, f(No, false, "搜")}, - {0xfa8f, 0, 0, 0, f(No, false, "摒")}, - {0xfa90, 0, 0, 0, f(No, false, "敖")}, - {0xfa91, 0, 0, 0, f(No, false, "晴")}, - {0xfa92, 0, 0, 0, f(No, false, "朗")}, - {0xfa93, 0, 0, 0, f(No, false, "望")}, - {0xfa94, 0, 0, 0, f(No, false, "杖")}, - {0xfa95, 0, 0, 0, f(No, false, "歹")}, - {0xfa96, 0, 0, 0, f(No, false, "殺")}, - {0xfa97, 0, 0, 0, f(No, false, "流")}, - {0xfa98, 0, 0, 0, f(No, false, "滛")}, - {0xfa99, 0, 0, 0, f(No, false, "滋")}, - {0xfa9a, 0, 0, 0, f(No, false, "漢")}, - {0xfa9b, 0, 0, 0, f(No, false, "瀞")}, - {0xfa9c, 0, 0, 0, f(No, false, "煮")}, - {0xfa9d, 0, 0, 0, f(No, false, "瞧")}, - {0xfa9e, 0, 0, 0, f(No, false, "爵")}, - {0xfa9f, 0, 0, 0, f(No, false, "犯")}, - {0xfaa0, 0, 0, 0, f(No, false, "猪")}, - {0xfaa1, 0, 0, 0, f(No, false, "瑱")}, - {0xfaa2, 0, 0, 0, f(No, false, "甆")}, - {0xfaa3, 0, 0, 0, f(No, false, "画")}, - {0xfaa4, 0, 0, 0, f(No, false, "瘝")}, - {0xfaa5, 0, 0, 0, f(No, false, "瘟")}, - {0xfaa6, 0, 0, 0, f(No, false, "益")}, - {0xfaa7, 0, 0, 0, f(No, false, "盛")}, - {0xfaa8, 0, 0, 0, f(No, false, "直")}, - {0xfaa9, 0, 0, 0, f(No, false, "睊")}, - {0xfaaa, 0, 0, 0, f(No, false, "着")}, - {0xfaab, 0, 0, 0, f(No, false, "磌")}, - {0xfaac, 0, 0, 0, f(No, false, "窱")}, - {0xfaad, 0, 0, 0, f(No, false, "節")}, - {0xfaae, 0, 0, 0, f(No, false, "类")}, - {0xfaaf, 0, 0, 0, f(No, false, "絛")}, - {0xfab0, 0, 0, 0, f(No, false, "練")}, - {0xfab1, 0, 0, 0, f(No, false, "缾")}, - {0xfab2, 0, 0, 0, f(No, false, "者")}, - {0xfab3, 0, 0, 0, f(No, false, "荒")}, - {0xfab4, 0, 0, 0, f(No, false, "華")}, - {0xfab5, 0, 0, 0, f(No, false, "蝹")}, - {0xfab6, 0, 0, 0, f(No, false, "襁")}, - {0xfab7, 0, 0, 0, f(No, false, "覆")}, - {0xfab8, 0, 0, 0, f(No, false, "視")}, - {0xfab9, 0, 0, 0, f(No, false, "調")}, - {0xfaba, 0, 0, 0, f(No, false, "諸")}, - {0xfabb, 0, 0, 0, f(No, false, "請")}, - {0xfabc, 0, 0, 0, f(No, false, "謁")}, - {0xfabd, 0, 0, 0, f(No, false, "諾")}, - {0xfabe, 0, 0, 0, f(No, false, "諭")}, - {0xfabf, 0, 0, 0, f(No, false, "謹")}, - {0xfac0, 0, 0, 0, f(No, false, "變")}, - {0xfac1, 0, 0, 0, f(No, false, "贈")}, - {0xfac2, 0, 0, 0, f(No, false, "輸")}, - {0xfac3, 0, 0, 0, f(No, false, "遲")}, - {0xfac4, 0, 0, 0, f(No, false, "醙")}, - {0xfac5, 0, 0, 0, f(No, false, "鉶")}, - {0xfac6, 0, 0, 0, f(No, false, "陼")}, - {0xfac7, 0, 0, 0, f(No, false, "難")}, - {0xfac8, 0, 0, 0, f(No, false, "靖")}, - {0xfac9, 0, 0, 0, f(No, false, "韛")}, - {0xfaca, 0, 0, 0, f(No, false, "響")}, - {0xfacb, 0, 0, 0, f(No, false, "頋")}, - {0xfacc, 0, 0, 0, f(No, false, "頻")}, - {0xfacd, 0, 0, 0, f(No, false, "鬒")}, - {0xface, 0, 0, 0, f(No, false, "龜")}, - {0xfacf, 0, 0, 0, f(No, false, "𢡊")}, - {0xfad0, 0, 0, 0, f(No, false, "𢡄")}, - {0xfad1, 0, 0, 0, f(No, false, "𣏕")}, - {0xfad2, 0, 0, 0, f(No, false, "㮝")}, - {0xfad3, 0, 0, 0, f(No, false, "䀘")}, - {0xfad4, 0, 0, 0, f(No, false, "䀹")}, - {0xfad5, 0, 0, 0, f(No, false, "𥉉")}, - {0xfad6, 0, 0, 0, f(No, false, "𥳐")}, - {0xfad7, 0, 0, 0, f(No, false, "𧻓")}, - {0xfad8, 0, 0, 0, f(No, false, "齃")}, - {0xfad9, 0, 0, 0, f(No, false, "龎")}, - {0xfada, 0, 0, 0, f(Yes, false, "")}, - {0xfb00, 0, 0, 0, g(Yes, No, false, false, "", "ff")}, - {0xfb01, 0, 0, 0, g(Yes, No, false, false, "", "fi")}, - {0xfb02, 0, 0, 0, g(Yes, No, false, false, "", "fl")}, - {0xfb03, 0, 0, 0, g(Yes, No, false, false, "", "ffi")}, - {0xfb04, 0, 0, 0, g(Yes, No, false, false, "", "ffl")}, - {0xfb05, 0, 0, 0, g(Yes, No, false, false, "", "st")}, - {0xfb07, 0, 0, 0, f(Yes, false, "")}, - {0xfb13, 0, 0, 0, g(Yes, No, false, false, "", "մն")}, - {0xfb14, 0, 0, 0, g(Yes, No, false, false, "", "մե")}, - {0xfb15, 0, 0, 0, g(Yes, No, false, false, "", "մի")}, - {0xfb16, 0, 0, 0, g(Yes, No, false, false, "", "վն")}, - {0xfb17, 0, 0, 0, g(Yes, No, false, false, "", "մխ")}, - {0xfb18, 0, 0, 0, f(Yes, false, "")}, - {0xfb1d, 0, 0, 1, f(No, false, "יִ")}, - {0xfb1e, 26, 1, 1, f(Yes, false, "")}, - {0xfb1f, 0, 0, 1, f(No, false, "ײַ")}, - {0xfb20, 0, 0, 0, g(Yes, No, false, false, "", "ע")}, - {0xfb21, 0, 0, 0, g(Yes, No, false, false, "", "א")}, - {0xfb22, 0, 0, 0, g(Yes, No, false, false, "", "ד")}, - {0xfb23, 0, 0, 0, g(Yes, No, false, false, "", "ה")}, - {0xfb24, 0, 0, 0, g(Yes, No, false, false, "", "כ")}, - {0xfb25, 0, 0, 0, g(Yes, No, false, false, "", "ל")}, - {0xfb26, 0, 0, 0, g(Yes, No, false, false, "", "ם")}, - {0xfb27, 0, 0, 0, g(Yes, No, false, false, "", "ר")}, - {0xfb28, 0, 0, 0, g(Yes, No, false, false, "", "ת")}, - {0xfb29, 0, 0, 0, g(Yes, No, false, false, "", "+")}, - {0xfb2a, 0, 0, 1, f(No, false, "שׁ")}, - {0xfb2b, 0, 0, 1, f(No, false, "שׂ")}, - {0xfb2c, 0, 0, 2, f(No, false, "שּׁ")}, - {0xfb2d, 0, 0, 2, f(No, false, "שּׂ")}, - {0xfb2e, 0, 0, 1, f(No, false, "אַ")}, - {0xfb2f, 0, 0, 1, f(No, false, "אָ")}, - {0xfb30, 0, 0, 1, f(No, false, "אּ")}, - {0xfb31, 0, 0, 1, f(No, false, "בּ")}, - {0xfb32, 0, 0, 1, f(No, false, "גּ")}, - {0xfb33, 0, 0, 1, f(No, false, "דּ")}, - {0xfb34, 0, 0, 1, f(No, false, "הּ")}, - {0xfb35, 0, 0, 1, f(No, false, "וּ")}, - {0xfb36, 0, 0, 1, f(No, false, "זּ")}, - {0xfb37, 0, 0, 0, f(Yes, false, "")}, - {0xfb38, 0, 0, 1, f(No, false, "טּ")}, - {0xfb39, 0, 0, 1, f(No, false, "יּ")}, - {0xfb3a, 0, 0, 1, f(No, false, "ךּ")}, - {0xfb3b, 0, 0, 1, f(No, false, "כּ")}, - {0xfb3c, 0, 0, 1, f(No, false, "לּ")}, - {0xfb3d, 0, 0, 0, f(Yes, false, "")}, - {0xfb3e, 0, 0, 1, f(No, false, "מּ")}, - {0xfb3f, 0, 0, 0, f(Yes, false, "")}, - {0xfb40, 0, 0, 1, f(No, false, "נּ")}, - {0xfb41, 0, 0, 1, f(No, false, "סּ")}, - {0xfb42, 0, 0, 0, f(Yes, false, "")}, - {0xfb43, 0, 0, 1, f(No, false, "ףּ")}, - {0xfb44, 0, 0, 1, f(No, false, "פּ")}, - {0xfb45, 0, 0, 0, f(Yes, false, "")}, - {0xfb46, 0, 0, 1, f(No, false, "צּ")}, - {0xfb47, 0, 0, 1, f(No, false, "קּ")}, - {0xfb48, 0, 0, 1, f(No, false, "רּ")}, - {0xfb49, 0, 0, 1, f(No, false, "שּ")}, - {0xfb4a, 0, 0, 1, f(No, false, "תּ")}, - {0xfb4b, 0, 0, 1, f(No, false, "וֹ")}, - {0xfb4c, 0, 0, 1, f(No, false, "בֿ")}, - {0xfb4d, 0, 0, 1, f(No, false, "כֿ")}, - {0xfb4e, 0, 0, 1, f(No, false, "פֿ")}, - {0xfb4f, 0, 0, 0, g(Yes, No, false, false, "", "אל")}, - {0xfb50, 0, 0, 0, g(Yes, No, false, false, "", "ٱ")}, - {0xfb52, 0, 0, 0, g(Yes, No, false, false, "", "ٻ")}, - {0xfb56, 0, 0, 0, g(Yes, No, false, false, "", "پ")}, - {0xfb5a, 0, 0, 0, g(Yes, No, false, false, "", "ڀ")}, - {0xfb5e, 0, 0, 0, g(Yes, No, false, false, "", "ٺ")}, - {0xfb62, 0, 0, 0, g(Yes, No, false, false, "", "ٿ")}, - {0xfb66, 0, 0, 0, g(Yes, No, false, false, "", "ٹ")}, - {0xfb6a, 0, 0, 0, g(Yes, No, false, false, "", "ڤ")}, - {0xfb6e, 0, 0, 0, g(Yes, No, false, false, "", "ڦ")}, - {0xfb72, 0, 0, 0, g(Yes, No, false, false, "", "ڄ")}, - {0xfb76, 0, 0, 0, g(Yes, No, false, false, "", "ڃ")}, - {0xfb7a, 0, 0, 0, g(Yes, No, false, false, "", "چ")}, - {0xfb7e, 0, 0, 0, g(Yes, No, false, false, "", "ڇ")}, - {0xfb82, 0, 0, 0, g(Yes, No, false, false, "", "ڍ")}, - {0xfb84, 0, 0, 0, g(Yes, No, false, false, "", "ڌ")}, - {0xfb86, 0, 0, 0, g(Yes, No, false, false, "", "ڎ")}, - {0xfb88, 0, 0, 0, g(Yes, No, false, false, "", "ڈ")}, - {0xfb8a, 0, 0, 0, g(Yes, No, false, false, "", "ژ")}, - {0xfb8c, 0, 0, 0, g(Yes, No, false, false, "", "ڑ")}, - {0xfb8e, 0, 0, 0, g(Yes, No, false, false, "", "ک")}, - {0xfb92, 0, 0, 0, g(Yes, No, false, false, "", "گ")}, - {0xfb96, 0, 0, 0, g(Yes, No, false, false, "", "ڳ")}, - {0xfb9a, 0, 0, 0, g(Yes, No, false, false, "", "ڱ")}, - {0xfb9e, 0, 0, 0, g(Yes, No, false, false, "", "ں")}, - {0xfba0, 0, 0, 0, g(Yes, No, false, false, "", "ڻ")}, - {0xfba4, 0, 0, 1, g(Yes, No, false, false, "", "ۀ")}, - {0xfba6, 0, 0, 0, g(Yes, No, false, false, "", "ہ")}, - {0xfbaa, 0, 0, 0, g(Yes, No, false, false, "", "ھ")}, - {0xfbae, 0, 0, 0, g(Yes, No, false, false, "", "ے")}, - {0xfbb0, 0, 0, 1, g(Yes, No, false, false, "", "ۓ")}, - {0xfbb2, 0, 0, 0, f(Yes, false, "")}, - {0xfbd3, 0, 0, 0, g(Yes, No, false, false, "", "ڭ")}, - {0xfbd7, 0, 0, 0, g(Yes, No, false, false, "", "ۇ")}, - {0xfbd9, 0, 0, 0, g(Yes, No, false, false, "", "ۆ")}, - {0xfbdb, 0, 0, 0, g(Yes, No, false, false, "", "ۈ")}, - {0xfbdd, 0, 0, 0, g(Yes, No, false, false, "", "ۇٴ")}, - {0xfbde, 0, 0, 0, g(Yes, No, false, false, "", "ۋ")}, - {0xfbe0, 0, 0, 0, g(Yes, No, false, false, "", "ۅ")}, - {0xfbe2, 0, 0, 0, g(Yes, No, false, false, "", "ۉ")}, - {0xfbe4, 0, 0, 0, g(Yes, No, false, false, "", "ې")}, - {0xfbe8, 0, 0, 0, g(Yes, No, false, false, "", "ى")}, - {0xfbea, 0, 0, 0, g(Yes, No, false, false, "", "ئا")}, - {0xfbec, 0, 0, 0, g(Yes, No, false, false, "", "ئە")}, - {0xfbee, 0, 0, 0, g(Yes, No, false, false, "", "ئو")}, - {0xfbf0, 0, 0, 0, g(Yes, No, false, false, "", "ئۇ")}, - {0xfbf2, 0, 0, 0, g(Yes, No, false, false, "", "ئۆ")}, - {0xfbf4, 0, 0, 0, g(Yes, No, false, false, "", "ئۈ")}, - {0xfbf6, 0, 0, 0, g(Yes, No, false, false, "", "ئې")}, - {0xfbf9, 0, 0, 0, g(Yes, No, false, false, "", "ئى")}, - {0xfbfc, 0, 0, 0, g(Yes, No, false, false, "", "ی")}, - {0xfc00, 0, 0, 0, g(Yes, No, false, false, "", "ئج")}, - {0xfc01, 0, 0, 0, g(Yes, No, false, false, "", "ئح")}, - {0xfc02, 0, 0, 0, g(Yes, No, false, false, "", "ئم")}, - {0xfc03, 0, 0, 0, g(Yes, No, false, false, "", "ئى")}, - {0xfc04, 0, 0, 0, g(Yes, No, false, false, "", "ئي")}, - {0xfc05, 0, 0, 0, g(Yes, No, false, false, "", "بج")}, - {0xfc06, 0, 0, 0, g(Yes, No, false, false, "", "بح")}, - {0xfc07, 0, 0, 0, g(Yes, No, false, false, "", "بخ")}, - {0xfc08, 0, 0, 0, g(Yes, No, false, false, "", "بم")}, - {0xfc09, 0, 0, 0, g(Yes, No, false, false, "", "بى")}, - {0xfc0a, 0, 0, 0, g(Yes, No, false, false, "", "بي")}, - {0xfc0b, 0, 0, 0, g(Yes, No, false, false, "", "تج")}, - {0xfc0c, 0, 0, 0, g(Yes, No, false, false, "", "تح")}, - {0xfc0d, 0, 0, 0, g(Yes, No, false, false, "", "تخ")}, - {0xfc0e, 0, 0, 0, g(Yes, No, false, false, "", "تم")}, - {0xfc0f, 0, 0, 0, g(Yes, No, false, false, "", "تى")}, - {0xfc10, 0, 0, 0, g(Yes, No, false, false, "", "تي")}, - {0xfc11, 0, 0, 0, g(Yes, No, false, false, "", "ثج")}, - {0xfc12, 0, 0, 0, g(Yes, No, false, false, "", "ثم")}, - {0xfc13, 0, 0, 0, g(Yes, No, false, false, "", "ثى")}, - {0xfc14, 0, 0, 0, g(Yes, No, false, false, "", "ثي")}, - {0xfc15, 0, 0, 0, g(Yes, No, false, false, "", "جح")}, - {0xfc16, 0, 0, 0, g(Yes, No, false, false, "", "جم")}, - {0xfc17, 0, 0, 0, g(Yes, No, false, false, "", "حج")}, - {0xfc18, 0, 0, 0, g(Yes, No, false, false, "", "حم")}, - {0xfc19, 0, 0, 0, g(Yes, No, false, false, "", "خج")}, - {0xfc1a, 0, 0, 0, g(Yes, No, false, false, "", "خح")}, - {0xfc1b, 0, 0, 0, g(Yes, No, false, false, "", "خم")}, - {0xfc1c, 0, 0, 0, g(Yes, No, false, false, "", "سج")}, - {0xfc1d, 0, 0, 0, g(Yes, No, false, false, "", "سح")}, - {0xfc1e, 0, 0, 0, g(Yes, No, false, false, "", "سخ")}, - {0xfc1f, 0, 0, 0, g(Yes, No, false, false, "", "سم")}, - {0xfc20, 0, 0, 0, g(Yes, No, false, false, "", "صح")}, - {0xfc21, 0, 0, 0, g(Yes, No, false, false, "", "صم")}, - {0xfc22, 0, 0, 0, g(Yes, No, false, false, "", "ضج")}, - {0xfc23, 0, 0, 0, g(Yes, No, false, false, "", "ضح")}, - {0xfc24, 0, 0, 0, g(Yes, No, false, false, "", "ضخ")}, - {0xfc25, 0, 0, 0, g(Yes, No, false, false, "", "ضم")}, - {0xfc26, 0, 0, 0, g(Yes, No, false, false, "", "طح")}, - {0xfc27, 0, 0, 0, g(Yes, No, false, false, "", "طم")}, - {0xfc28, 0, 0, 0, g(Yes, No, false, false, "", "ظم")}, - {0xfc29, 0, 0, 0, g(Yes, No, false, false, "", "عج")}, - {0xfc2a, 0, 0, 0, g(Yes, No, false, false, "", "عم")}, - {0xfc2b, 0, 0, 0, g(Yes, No, false, false, "", "غج")}, - {0xfc2c, 0, 0, 0, g(Yes, No, false, false, "", "غم")}, - {0xfc2d, 0, 0, 0, g(Yes, No, false, false, "", "فج")}, - {0xfc2e, 0, 0, 0, g(Yes, No, false, false, "", "فح")}, - {0xfc2f, 0, 0, 0, g(Yes, No, false, false, "", "فخ")}, - {0xfc30, 0, 0, 0, g(Yes, No, false, false, "", "فم")}, - {0xfc31, 0, 0, 0, g(Yes, No, false, false, "", "فى")}, - {0xfc32, 0, 0, 0, g(Yes, No, false, false, "", "في")}, - {0xfc33, 0, 0, 0, g(Yes, No, false, false, "", "قح")}, - {0xfc34, 0, 0, 0, g(Yes, No, false, false, "", "قم")}, - {0xfc35, 0, 0, 0, g(Yes, No, false, false, "", "قى")}, - {0xfc36, 0, 0, 0, g(Yes, No, false, false, "", "قي")}, - {0xfc37, 0, 0, 0, g(Yes, No, false, false, "", "كا")}, - {0xfc38, 0, 0, 0, g(Yes, No, false, false, "", "كج")}, - {0xfc39, 0, 0, 0, g(Yes, No, false, false, "", "كح")}, - {0xfc3a, 0, 0, 0, g(Yes, No, false, false, "", "كخ")}, - {0xfc3b, 0, 0, 0, g(Yes, No, false, false, "", "كل")}, - {0xfc3c, 0, 0, 0, g(Yes, No, false, false, "", "كم")}, - {0xfc3d, 0, 0, 0, g(Yes, No, false, false, "", "كى")}, - {0xfc3e, 0, 0, 0, g(Yes, No, false, false, "", "كي")}, - {0xfc3f, 0, 0, 0, g(Yes, No, false, false, "", "لج")}, - {0xfc40, 0, 0, 0, g(Yes, No, false, false, "", "لح")}, - {0xfc41, 0, 0, 0, g(Yes, No, false, false, "", "لخ")}, - {0xfc42, 0, 0, 0, g(Yes, No, false, false, "", "لم")}, - {0xfc43, 0, 0, 0, g(Yes, No, false, false, "", "لى")}, - {0xfc44, 0, 0, 0, g(Yes, No, false, false, "", "لي")}, - {0xfc45, 0, 0, 0, g(Yes, No, false, false, "", "مج")}, - {0xfc46, 0, 0, 0, g(Yes, No, false, false, "", "مح")}, - {0xfc47, 0, 0, 0, g(Yes, No, false, false, "", "مخ")}, - {0xfc48, 0, 0, 0, g(Yes, No, false, false, "", "مم")}, - {0xfc49, 0, 0, 0, g(Yes, No, false, false, "", "مى")}, - {0xfc4a, 0, 0, 0, g(Yes, No, false, false, "", "مي")}, - {0xfc4b, 0, 0, 0, g(Yes, No, false, false, "", "نج")}, - {0xfc4c, 0, 0, 0, g(Yes, No, false, false, "", "نح")}, - {0xfc4d, 0, 0, 0, g(Yes, No, false, false, "", "نخ")}, - {0xfc4e, 0, 0, 0, g(Yes, No, false, false, "", "نم")}, - {0xfc4f, 0, 0, 0, g(Yes, No, false, false, "", "نى")}, - {0xfc50, 0, 0, 0, g(Yes, No, false, false, "", "ني")}, - {0xfc51, 0, 0, 0, g(Yes, No, false, false, "", "هج")}, - {0xfc52, 0, 0, 0, g(Yes, No, false, false, "", "هم")}, - {0xfc53, 0, 0, 0, g(Yes, No, false, false, "", "هى")}, - {0xfc54, 0, 0, 0, g(Yes, No, false, false, "", "هي")}, - {0xfc55, 0, 0, 0, g(Yes, No, false, false, "", "يج")}, - {0xfc56, 0, 0, 0, g(Yes, No, false, false, "", "يح")}, - {0xfc57, 0, 0, 0, g(Yes, No, false, false, "", "يخ")}, - {0xfc58, 0, 0, 0, g(Yes, No, false, false, "", "يم")}, - {0xfc59, 0, 0, 0, g(Yes, No, false, false, "", "يى")}, - {0xfc5a, 0, 0, 0, g(Yes, No, false, false, "", "يي")}, - {0xfc5b, 0, 0, 1, g(Yes, No, false, false, "", "ذٰ")}, - {0xfc5c, 0, 0, 1, g(Yes, No, false, false, "", "رٰ")}, - {0xfc5d, 0, 0, 1, g(Yes, No, false, false, "", "ىٰ")}, - {0xfc5e, 0, 0, 2, g(Yes, No, false, false, "", " ٌّ")}, - {0xfc5f, 0, 0, 2, g(Yes, No, false, false, "", " ٍّ")}, - {0xfc60, 0, 0, 2, g(Yes, No, false, false, "", " َّ")}, - {0xfc61, 0, 0, 2, g(Yes, No, false, false, "", " ُّ")}, - {0xfc62, 0, 0, 2, g(Yes, No, false, false, "", " ِّ")}, - {0xfc63, 0, 0, 2, g(Yes, No, false, false, "", " ّٰ")}, - {0xfc64, 0, 0, 0, g(Yes, No, false, false, "", "ئر")}, - {0xfc65, 0, 0, 0, g(Yes, No, false, false, "", "ئز")}, - {0xfc66, 0, 0, 0, g(Yes, No, false, false, "", "ئم")}, - {0xfc67, 0, 0, 0, g(Yes, No, false, false, "", "ئن")}, - {0xfc68, 0, 0, 0, g(Yes, No, false, false, "", "ئى")}, - {0xfc69, 0, 0, 0, g(Yes, No, false, false, "", "ئي")}, - {0xfc6a, 0, 0, 0, g(Yes, No, false, false, "", "بر")}, - {0xfc6b, 0, 0, 0, g(Yes, No, false, false, "", "بز")}, - {0xfc6c, 0, 0, 0, g(Yes, No, false, false, "", "بم")}, - {0xfc6d, 0, 0, 0, g(Yes, No, false, false, "", "بن")}, - {0xfc6e, 0, 0, 0, g(Yes, No, false, false, "", "بى")}, - {0xfc6f, 0, 0, 0, g(Yes, No, false, false, "", "بي")}, - {0xfc70, 0, 0, 0, g(Yes, No, false, false, "", "تر")}, - {0xfc71, 0, 0, 0, g(Yes, No, false, false, "", "تز")}, - {0xfc72, 0, 0, 0, g(Yes, No, false, false, "", "تم")}, - {0xfc73, 0, 0, 0, g(Yes, No, false, false, "", "تن")}, - {0xfc74, 0, 0, 0, g(Yes, No, false, false, "", "تى")}, - {0xfc75, 0, 0, 0, g(Yes, No, false, false, "", "تي")}, - {0xfc76, 0, 0, 0, g(Yes, No, false, false, "", "ثر")}, - {0xfc77, 0, 0, 0, g(Yes, No, false, false, "", "ثز")}, - {0xfc78, 0, 0, 0, g(Yes, No, false, false, "", "ثم")}, - {0xfc79, 0, 0, 0, g(Yes, No, false, false, "", "ثن")}, - {0xfc7a, 0, 0, 0, g(Yes, No, false, false, "", "ثى")}, - {0xfc7b, 0, 0, 0, g(Yes, No, false, false, "", "ثي")}, - {0xfc7c, 0, 0, 0, g(Yes, No, false, false, "", "فى")}, - {0xfc7d, 0, 0, 0, g(Yes, No, false, false, "", "في")}, - {0xfc7e, 0, 0, 0, g(Yes, No, false, false, "", "قى")}, - {0xfc7f, 0, 0, 0, g(Yes, No, false, false, "", "قي")}, - {0xfc80, 0, 0, 0, g(Yes, No, false, false, "", "كا")}, - {0xfc81, 0, 0, 0, g(Yes, No, false, false, "", "كل")}, - {0xfc82, 0, 0, 0, g(Yes, No, false, false, "", "كم")}, - {0xfc83, 0, 0, 0, g(Yes, No, false, false, "", "كى")}, - {0xfc84, 0, 0, 0, g(Yes, No, false, false, "", "كي")}, - {0xfc85, 0, 0, 0, g(Yes, No, false, false, "", "لم")}, - {0xfc86, 0, 0, 0, g(Yes, No, false, false, "", "لى")}, - {0xfc87, 0, 0, 0, g(Yes, No, false, false, "", "لي")}, - {0xfc88, 0, 0, 0, g(Yes, No, false, false, "", "ما")}, - {0xfc89, 0, 0, 0, g(Yes, No, false, false, "", "مم")}, - {0xfc8a, 0, 0, 0, g(Yes, No, false, false, "", "نر")}, - {0xfc8b, 0, 0, 0, g(Yes, No, false, false, "", "نز")}, - {0xfc8c, 0, 0, 0, g(Yes, No, false, false, "", "نم")}, - {0xfc8d, 0, 0, 0, g(Yes, No, false, false, "", "نن")}, - {0xfc8e, 0, 0, 0, g(Yes, No, false, false, "", "نى")}, - {0xfc8f, 0, 0, 0, g(Yes, No, false, false, "", "ني")}, - {0xfc90, 0, 0, 1, g(Yes, No, false, false, "", "ىٰ")}, - {0xfc91, 0, 0, 0, g(Yes, No, false, false, "", "ير")}, - {0xfc92, 0, 0, 0, g(Yes, No, false, false, "", "يز")}, - {0xfc93, 0, 0, 0, g(Yes, No, false, false, "", "يم")}, - {0xfc94, 0, 0, 0, g(Yes, No, false, false, "", "ين")}, - {0xfc95, 0, 0, 0, g(Yes, No, false, false, "", "يى")}, - {0xfc96, 0, 0, 0, g(Yes, No, false, false, "", "يي")}, - {0xfc97, 0, 0, 0, g(Yes, No, false, false, "", "ئج")}, - {0xfc98, 0, 0, 0, g(Yes, No, false, false, "", "ئح")}, - {0xfc99, 0, 0, 0, g(Yes, No, false, false, "", "ئخ")}, - {0xfc9a, 0, 0, 0, g(Yes, No, false, false, "", "ئم")}, - {0xfc9b, 0, 0, 0, g(Yes, No, false, false, "", "ئه")}, - {0xfc9c, 0, 0, 0, g(Yes, No, false, false, "", "بج")}, - {0xfc9d, 0, 0, 0, g(Yes, No, false, false, "", "بح")}, - {0xfc9e, 0, 0, 0, g(Yes, No, false, false, "", "بخ")}, - {0xfc9f, 0, 0, 0, g(Yes, No, false, false, "", "بم")}, - {0xfca0, 0, 0, 0, g(Yes, No, false, false, "", "به")}, - {0xfca1, 0, 0, 0, g(Yes, No, false, false, "", "تج")}, - {0xfca2, 0, 0, 0, g(Yes, No, false, false, "", "تح")}, - {0xfca3, 0, 0, 0, g(Yes, No, false, false, "", "تخ")}, - {0xfca4, 0, 0, 0, g(Yes, No, false, false, "", "تم")}, - {0xfca5, 0, 0, 0, g(Yes, No, false, false, "", "ته")}, - {0xfca6, 0, 0, 0, g(Yes, No, false, false, "", "ثم")}, - {0xfca7, 0, 0, 0, g(Yes, No, false, false, "", "جح")}, - {0xfca8, 0, 0, 0, g(Yes, No, false, false, "", "جم")}, - {0xfca9, 0, 0, 0, g(Yes, No, false, false, "", "حج")}, - {0xfcaa, 0, 0, 0, g(Yes, No, false, false, "", "حم")}, - {0xfcab, 0, 0, 0, g(Yes, No, false, false, "", "خج")}, - {0xfcac, 0, 0, 0, g(Yes, No, false, false, "", "خم")}, - {0xfcad, 0, 0, 0, g(Yes, No, false, false, "", "سج")}, - {0xfcae, 0, 0, 0, g(Yes, No, false, false, "", "سح")}, - {0xfcaf, 0, 0, 0, g(Yes, No, false, false, "", "سخ")}, - {0xfcb0, 0, 0, 0, g(Yes, No, false, false, "", "سم")}, - {0xfcb1, 0, 0, 0, g(Yes, No, false, false, "", "صح")}, - {0xfcb2, 0, 0, 0, g(Yes, No, false, false, "", "صخ")}, - {0xfcb3, 0, 0, 0, g(Yes, No, false, false, "", "صم")}, - {0xfcb4, 0, 0, 0, g(Yes, No, false, false, "", "ضج")}, - {0xfcb5, 0, 0, 0, g(Yes, No, false, false, "", "ضح")}, - {0xfcb6, 0, 0, 0, g(Yes, No, false, false, "", "ضخ")}, - {0xfcb7, 0, 0, 0, g(Yes, No, false, false, "", "ضم")}, - {0xfcb8, 0, 0, 0, g(Yes, No, false, false, "", "طح")}, - {0xfcb9, 0, 0, 0, g(Yes, No, false, false, "", "ظم")}, - {0xfcba, 0, 0, 0, g(Yes, No, false, false, "", "عج")}, - {0xfcbb, 0, 0, 0, g(Yes, No, false, false, "", "عم")}, - {0xfcbc, 0, 0, 0, g(Yes, No, false, false, "", "غج")}, - {0xfcbd, 0, 0, 0, g(Yes, No, false, false, "", "غم")}, - {0xfcbe, 0, 0, 0, g(Yes, No, false, false, "", "فج")}, - {0xfcbf, 0, 0, 0, g(Yes, No, false, false, "", "فح")}, - {0xfcc0, 0, 0, 0, g(Yes, No, false, false, "", "فخ")}, - {0xfcc1, 0, 0, 0, g(Yes, No, false, false, "", "فم")}, - {0xfcc2, 0, 0, 0, g(Yes, No, false, false, "", "قح")}, - {0xfcc3, 0, 0, 0, g(Yes, No, false, false, "", "قم")}, - {0xfcc4, 0, 0, 0, g(Yes, No, false, false, "", "كج")}, - {0xfcc5, 0, 0, 0, g(Yes, No, false, false, "", "كح")}, - {0xfcc6, 0, 0, 0, g(Yes, No, false, false, "", "كخ")}, - {0xfcc7, 0, 0, 0, g(Yes, No, false, false, "", "كل")}, - {0xfcc8, 0, 0, 0, g(Yes, No, false, false, "", "كم")}, - {0xfcc9, 0, 0, 0, g(Yes, No, false, false, "", "لج")}, - {0xfcca, 0, 0, 0, g(Yes, No, false, false, "", "لح")}, - {0xfccb, 0, 0, 0, g(Yes, No, false, false, "", "لخ")}, - {0xfccc, 0, 0, 0, g(Yes, No, false, false, "", "لم")}, - {0xfccd, 0, 0, 0, g(Yes, No, false, false, "", "له")}, - {0xfcce, 0, 0, 0, g(Yes, No, false, false, "", "مج")}, - {0xfccf, 0, 0, 0, g(Yes, No, false, false, "", "مح")}, - {0xfcd0, 0, 0, 0, g(Yes, No, false, false, "", "مخ")}, - {0xfcd1, 0, 0, 0, g(Yes, No, false, false, "", "مم")}, - {0xfcd2, 0, 0, 0, g(Yes, No, false, false, "", "نج")}, - {0xfcd3, 0, 0, 0, g(Yes, No, false, false, "", "نح")}, - {0xfcd4, 0, 0, 0, g(Yes, No, false, false, "", "نخ")}, - {0xfcd5, 0, 0, 0, g(Yes, No, false, false, "", "نم")}, - {0xfcd6, 0, 0, 0, g(Yes, No, false, false, "", "نه")}, - {0xfcd7, 0, 0, 0, g(Yes, No, false, false, "", "هج")}, - {0xfcd8, 0, 0, 0, g(Yes, No, false, false, "", "هم")}, - {0xfcd9, 0, 0, 1, g(Yes, No, false, false, "", "هٰ")}, - {0xfcda, 0, 0, 0, g(Yes, No, false, false, "", "يج")}, - {0xfcdb, 0, 0, 0, g(Yes, No, false, false, "", "يح")}, - {0xfcdc, 0, 0, 0, g(Yes, No, false, false, "", "يخ")}, - {0xfcdd, 0, 0, 0, g(Yes, No, false, false, "", "يم")}, - {0xfcde, 0, 0, 0, g(Yes, No, false, false, "", "يه")}, - {0xfcdf, 0, 0, 0, g(Yes, No, false, false, "", "ئم")}, - {0xfce0, 0, 0, 0, g(Yes, No, false, false, "", "ئه")}, - {0xfce1, 0, 0, 0, g(Yes, No, false, false, "", "بم")}, - {0xfce2, 0, 0, 0, g(Yes, No, false, false, "", "به")}, - {0xfce3, 0, 0, 0, g(Yes, No, false, false, "", "تم")}, - {0xfce4, 0, 0, 0, g(Yes, No, false, false, "", "ته")}, - {0xfce5, 0, 0, 0, g(Yes, No, false, false, "", "ثم")}, - {0xfce6, 0, 0, 0, g(Yes, No, false, false, "", "ثه")}, - {0xfce7, 0, 0, 0, g(Yes, No, false, false, "", "سم")}, - {0xfce8, 0, 0, 0, g(Yes, No, false, false, "", "سه")}, - {0xfce9, 0, 0, 0, g(Yes, No, false, false, "", "شم")}, - {0xfcea, 0, 0, 0, g(Yes, No, false, false, "", "شه")}, - {0xfceb, 0, 0, 0, g(Yes, No, false, false, "", "كل")}, - {0xfcec, 0, 0, 0, g(Yes, No, false, false, "", "كم")}, - {0xfced, 0, 0, 0, g(Yes, No, false, false, "", "لم")}, - {0xfcee, 0, 0, 0, g(Yes, No, false, false, "", "نم")}, - {0xfcef, 0, 0, 0, g(Yes, No, false, false, "", "نه")}, - {0xfcf0, 0, 0, 0, g(Yes, No, false, false, "", "يم")}, - {0xfcf1, 0, 0, 0, g(Yes, No, false, false, "", "يه")}, - {0xfcf2, 0, 0, 2, g(Yes, No, false, false, "", "ـَّ")}, - {0xfcf3, 0, 0, 2, g(Yes, No, false, false, "", "ـُّ")}, - {0xfcf4, 0, 0, 2, g(Yes, No, false, false, "", "ـِّ")}, - {0xfcf5, 0, 0, 0, g(Yes, No, false, false, "", "طى")}, - {0xfcf6, 0, 0, 0, g(Yes, No, false, false, "", "طي")}, - {0xfcf7, 0, 0, 0, g(Yes, No, false, false, "", "عى")}, - {0xfcf8, 0, 0, 0, g(Yes, No, false, false, "", "عي")}, - {0xfcf9, 0, 0, 0, g(Yes, No, false, false, "", "غى")}, - {0xfcfa, 0, 0, 0, g(Yes, No, false, false, "", "غي")}, - {0xfcfb, 0, 0, 0, g(Yes, No, false, false, "", "سى")}, - {0xfcfc, 0, 0, 0, g(Yes, No, false, false, "", "سي")}, - {0xfcfd, 0, 0, 0, g(Yes, No, false, false, "", "شى")}, - {0xfcfe, 0, 0, 0, g(Yes, No, false, false, "", "شي")}, - {0xfcff, 0, 0, 0, g(Yes, No, false, false, "", "حى")}, - {0xfd00, 0, 0, 0, g(Yes, No, false, false, "", "حي")}, - {0xfd01, 0, 0, 0, g(Yes, No, false, false, "", "جى")}, - {0xfd02, 0, 0, 0, g(Yes, No, false, false, "", "جي")}, - {0xfd03, 0, 0, 0, g(Yes, No, false, false, "", "خى")}, - {0xfd04, 0, 0, 0, g(Yes, No, false, false, "", "خي")}, - {0xfd05, 0, 0, 0, g(Yes, No, false, false, "", "صى")}, - {0xfd06, 0, 0, 0, g(Yes, No, false, false, "", "صي")}, - {0xfd07, 0, 0, 0, g(Yes, No, false, false, "", "ضى")}, - {0xfd08, 0, 0, 0, g(Yes, No, false, false, "", "ضي")}, - {0xfd09, 0, 0, 0, g(Yes, No, false, false, "", "شج")}, - {0xfd0a, 0, 0, 0, g(Yes, No, false, false, "", "شح")}, - {0xfd0b, 0, 0, 0, g(Yes, No, false, false, "", "شخ")}, - {0xfd0c, 0, 0, 0, g(Yes, No, false, false, "", "شم")}, - {0xfd0d, 0, 0, 0, g(Yes, No, false, false, "", "شر")}, - {0xfd0e, 0, 0, 0, g(Yes, No, false, false, "", "سر")}, - {0xfd0f, 0, 0, 0, g(Yes, No, false, false, "", "صر")}, - {0xfd10, 0, 0, 0, g(Yes, No, false, false, "", "ضر")}, - {0xfd11, 0, 0, 0, g(Yes, No, false, false, "", "طى")}, - {0xfd12, 0, 0, 0, g(Yes, No, false, false, "", "طي")}, - {0xfd13, 0, 0, 0, g(Yes, No, false, false, "", "عى")}, - {0xfd14, 0, 0, 0, g(Yes, No, false, false, "", "عي")}, - {0xfd15, 0, 0, 0, g(Yes, No, false, false, "", "غى")}, - {0xfd16, 0, 0, 0, g(Yes, No, false, false, "", "غي")}, - {0xfd17, 0, 0, 0, g(Yes, No, false, false, "", "سى")}, - {0xfd18, 0, 0, 0, g(Yes, No, false, false, "", "سي")}, - {0xfd19, 0, 0, 0, g(Yes, No, false, false, "", "شى")}, - {0xfd1a, 0, 0, 0, g(Yes, No, false, false, "", "شي")}, - {0xfd1b, 0, 0, 0, g(Yes, No, false, false, "", "حى")}, - {0xfd1c, 0, 0, 0, g(Yes, No, false, false, "", "حي")}, - {0xfd1d, 0, 0, 0, g(Yes, No, false, false, "", "جى")}, - {0xfd1e, 0, 0, 0, g(Yes, No, false, false, "", "جي")}, - {0xfd1f, 0, 0, 0, g(Yes, No, false, false, "", "خى")}, - {0xfd20, 0, 0, 0, g(Yes, No, false, false, "", "خي")}, - {0xfd21, 0, 0, 0, g(Yes, No, false, false, "", "صى")}, - {0xfd22, 0, 0, 0, g(Yes, No, false, false, "", "صي")}, - {0xfd23, 0, 0, 0, g(Yes, No, false, false, "", "ضى")}, - {0xfd24, 0, 0, 0, g(Yes, No, false, false, "", "ضي")}, - {0xfd25, 0, 0, 0, g(Yes, No, false, false, "", "شج")}, - {0xfd26, 0, 0, 0, g(Yes, No, false, false, "", "شح")}, - {0xfd27, 0, 0, 0, g(Yes, No, false, false, "", "شخ")}, - {0xfd28, 0, 0, 0, g(Yes, No, false, false, "", "شم")}, - {0xfd29, 0, 0, 0, g(Yes, No, false, false, "", "شر")}, - {0xfd2a, 0, 0, 0, g(Yes, No, false, false, "", "سر")}, - {0xfd2b, 0, 0, 0, g(Yes, No, false, false, "", "صر")}, - {0xfd2c, 0, 0, 0, g(Yes, No, false, false, "", "ضر")}, - {0xfd2d, 0, 0, 0, g(Yes, No, false, false, "", "شج")}, - {0xfd2e, 0, 0, 0, g(Yes, No, false, false, "", "شح")}, - {0xfd2f, 0, 0, 0, g(Yes, No, false, false, "", "شخ")}, - {0xfd30, 0, 0, 0, g(Yes, No, false, false, "", "شم")}, - {0xfd31, 0, 0, 0, g(Yes, No, false, false, "", "سه")}, - {0xfd32, 0, 0, 0, g(Yes, No, false, false, "", "شه")}, - {0xfd33, 0, 0, 0, g(Yes, No, false, false, "", "طم")}, - {0xfd34, 0, 0, 0, g(Yes, No, false, false, "", "سج")}, - {0xfd35, 0, 0, 0, g(Yes, No, false, false, "", "سح")}, - {0xfd36, 0, 0, 0, g(Yes, No, false, false, "", "سخ")}, - {0xfd37, 0, 0, 0, g(Yes, No, false, false, "", "شج")}, - {0xfd38, 0, 0, 0, g(Yes, No, false, false, "", "شح")}, - {0xfd39, 0, 0, 0, g(Yes, No, false, false, "", "شخ")}, - {0xfd3a, 0, 0, 0, g(Yes, No, false, false, "", "طم")}, - {0xfd3b, 0, 0, 0, g(Yes, No, false, false, "", "ظم")}, - {0xfd3c, 0, 0, 1, g(Yes, No, false, false, "", "اً")}, - {0xfd3e, 0, 0, 0, f(Yes, false, "")}, - {0xfd50, 0, 0, 0, g(Yes, No, false, false, "", "تجم")}, - {0xfd51, 0, 0, 0, g(Yes, No, false, false, "", "تحج")}, - {0xfd53, 0, 0, 0, g(Yes, No, false, false, "", "تحم")}, - {0xfd54, 0, 0, 0, g(Yes, No, false, false, "", "تخم")}, - {0xfd55, 0, 0, 0, g(Yes, No, false, false, "", "تمج")}, - {0xfd56, 0, 0, 0, g(Yes, No, false, false, "", "تمح")}, - {0xfd57, 0, 0, 0, g(Yes, No, false, false, "", "تمخ")}, - {0xfd58, 0, 0, 0, g(Yes, No, false, false, "", "جمح")}, - {0xfd5a, 0, 0, 0, g(Yes, No, false, false, "", "حمي")}, - {0xfd5b, 0, 0, 0, g(Yes, No, false, false, "", "حمى")}, - {0xfd5c, 0, 0, 0, g(Yes, No, false, false, "", "سحج")}, - {0xfd5d, 0, 0, 0, g(Yes, No, false, false, "", "سجح")}, - {0xfd5e, 0, 0, 0, g(Yes, No, false, false, "", "سجى")}, - {0xfd5f, 0, 0, 0, g(Yes, No, false, false, "", "سمح")}, - {0xfd61, 0, 0, 0, g(Yes, No, false, false, "", "سمج")}, - {0xfd62, 0, 0, 0, g(Yes, No, false, false, "", "سمم")}, - {0xfd64, 0, 0, 0, g(Yes, No, false, false, "", "صحح")}, - {0xfd66, 0, 0, 0, g(Yes, No, false, false, "", "صمم")}, - {0xfd67, 0, 0, 0, g(Yes, No, false, false, "", "شحم")}, - {0xfd69, 0, 0, 0, g(Yes, No, false, false, "", "شجي")}, - {0xfd6a, 0, 0, 0, g(Yes, No, false, false, "", "شمخ")}, - {0xfd6c, 0, 0, 0, g(Yes, No, false, false, "", "شمم")}, - {0xfd6e, 0, 0, 0, g(Yes, No, false, false, "", "ضحى")}, - {0xfd6f, 0, 0, 0, g(Yes, No, false, false, "", "ضخم")}, - {0xfd71, 0, 0, 0, g(Yes, No, false, false, "", "طمح")}, - {0xfd73, 0, 0, 0, g(Yes, No, false, false, "", "طمم")}, - {0xfd74, 0, 0, 0, g(Yes, No, false, false, "", "طمي")}, - {0xfd75, 0, 0, 0, g(Yes, No, false, false, "", "عجم")}, - {0xfd76, 0, 0, 0, g(Yes, No, false, false, "", "عمم")}, - {0xfd78, 0, 0, 0, g(Yes, No, false, false, "", "عمى")}, - {0xfd79, 0, 0, 0, g(Yes, No, false, false, "", "غمم")}, - {0xfd7a, 0, 0, 0, g(Yes, No, false, false, "", "غمي")}, - {0xfd7b, 0, 0, 0, g(Yes, No, false, false, "", "غمى")}, - {0xfd7c, 0, 0, 0, g(Yes, No, false, false, "", "فخم")}, - {0xfd7e, 0, 0, 0, g(Yes, No, false, false, "", "قمح")}, - {0xfd7f, 0, 0, 0, g(Yes, No, false, false, "", "قمم")}, - {0xfd80, 0, 0, 0, g(Yes, No, false, false, "", "لحم")}, - {0xfd81, 0, 0, 0, g(Yes, No, false, false, "", "لحي")}, - {0xfd82, 0, 0, 0, g(Yes, No, false, false, "", "لحى")}, - {0xfd83, 0, 0, 0, g(Yes, No, false, false, "", "لجج")}, - {0xfd85, 0, 0, 0, g(Yes, No, false, false, "", "لخم")}, - {0xfd87, 0, 0, 0, g(Yes, No, false, false, "", "لمح")}, - {0xfd89, 0, 0, 0, g(Yes, No, false, false, "", "محج")}, - {0xfd8a, 0, 0, 0, g(Yes, No, false, false, "", "محم")}, - {0xfd8b, 0, 0, 0, g(Yes, No, false, false, "", "محي")}, - {0xfd8c, 0, 0, 0, g(Yes, No, false, false, "", "مجح")}, - {0xfd8d, 0, 0, 0, g(Yes, No, false, false, "", "مجم")}, - {0xfd8e, 0, 0, 0, g(Yes, No, false, false, "", "مخج")}, - {0xfd8f, 0, 0, 0, g(Yes, No, false, false, "", "مخم")}, - {0xfd90, 0, 0, 0, f(Yes, false, "")}, - {0xfd92, 0, 0, 0, g(Yes, No, false, false, "", "مجخ")}, - {0xfd93, 0, 0, 0, g(Yes, No, false, false, "", "همج")}, - {0xfd94, 0, 0, 0, g(Yes, No, false, false, "", "همم")}, - {0xfd95, 0, 0, 0, g(Yes, No, false, false, "", "نحم")}, - {0xfd96, 0, 0, 0, g(Yes, No, false, false, "", "نحى")}, - {0xfd97, 0, 0, 0, g(Yes, No, false, false, "", "نجم")}, - {0xfd99, 0, 0, 0, g(Yes, No, false, false, "", "نجى")}, - {0xfd9a, 0, 0, 0, g(Yes, No, false, false, "", "نمي")}, - {0xfd9b, 0, 0, 0, g(Yes, No, false, false, "", "نمى")}, - {0xfd9c, 0, 0, 0, g(Yes, No, false, false, "", "يمم")}, - {0xfd9e, 0, 0, 0, g(Yes, No, false, false, "", "بخي")}, - {0xfd9f, 0, 0, 0, g(Yes, No, false, false, "", "تجي")}, - {0xfda0, 0, 0, 0, g(Yes, No, false, false, "", "تجى")}, - {0xfda1, 0, 0, 0, g(Yes, No, false, false, "", "تخي")}, - {0xfda2, 0, 0, 0, g(Yes, No, false, false, "", "تخى")}, - {0xfda3, 0, 0, 0, g(Yes, No, false, false, "", "تمي")}, - {0xfda4, 0, 0, 0, g(Yes, No, false, false, "", "تمى")}, - {0xfda5, 0, 0, 0, g(Yes, No, false, false, "", "جمي")}, - {0xfda6, 0, 0, 0, g(Yes, No, false, false, "", "جحى")}, - {0xfda7, 0, 0, 0, g(Yes, No, false, false, "", "جمى")}, - {0xfda8, 0, 0, 0, g(Yes, No, false, false, "", "سخى")}, - {0xfda9, 0, 0, 0, g(Yes, No, false, false, "", "صحي")}, - {0xfdaa, 0, 0, 0, g(Yes, No, false, false, "", "شحي")}, - {0xfdab, 0, 0, 0, g(Yes, No, false, false, "", "ضحي")}, - {0xfdac, 0, 0, 0, g(Yes, No, false, false, "", "لجي")}, - {0xfdad, 0, 0, 0, g(Yes, No, false, false, "", "لمي")}, - {0xfdae, 0, 0, 0, g(Yes, No, false, false, "", "يحي")}, - {0xfdaf, 0, 0, 0, g(Yes, No, false, false, "", "يجي")}, - {0xfdb0, 0, 0, 0, g(Yes, No, false, false, "", "يمي")}, - {0xfdb1, 0, 0, 0, g(Yes, No, false, false, "", "ممي")}, - {0xfdb2, 0, 0, 0, g(Yes, No, false, false, "", "قمي")}, - {0xfdb3, 0, 0, 0, g(Yes, No, false, false, "", "نحي")}, - {0xfdb4, 0, 0, 0, g(Yes, No, false, false, "", "قمح")}, - {0xfdb5, 0, 0, 0, g(Yes, No, false, false, "", "لحم")}, - {0xfdb6, 0, 0, 0, g(Yes, No, false, false, "", "عمي")}, - {0xfdb7, 0, 0, 0, g(Yes, No, false, false, "", "كمي")}, - {0xfdb8, 0, 0, 0, g(Yes, No, false, false, "", "نجح")}, - {0xfdb9, 0, 0, 0, g(Yes, No, false, false, "", "مخي")}, - {0xfdba, 0, 0, 0, g(Yes, No, false, false, "", "لجم")}, - {0xfdbb, 0, 0, 0, g(Yes, No, false, false, "", "كمم")}, - {0xfdbc, 0, 0, 0, g(Yes, No, false, false, "", "لجم")}, - {0xfdbd, 0, 0, 0, g(Yes, No, false, false, "", "نجح")}, - {0xfdbe, 0, 0, 0, g(Yes, No, false, false, "", "جحي")}, - {0xfdbf, 0, 0, 0, g(Yes, No, false, false, "", "حجي")}, - {0xfdc0, 0, 0, 0, g(Yes, No, false, false, "", "مجي")}, - {0xfdc1, 0, 0, 0, g(Yes, No, false, false, "", "فمي")}, - {0xfdc2, 0, 0, 0, g(Yes, No, false, false, "", "بحي")}, - {0xfdc3, 0, 0, 0, g(Yes, No, false, false, "", "كمم")}, - {0xfdc4, 0, 0, 0, g(Yes, No, false, false, "", "عجم")}, - {0xfdc5, 0, 0, 0, g(Yes, No, false, false, "", "صمم")}, - {0xfdc6, 0, 0, 0, g(Yes, No, false, false, "", "سخي")}, - {0xfdc7, 0, 0, 0, g(Yes, No, false, false, "", "نجي")}, - {0xfdc8, 0, 0, 0, f(Yes, false, "")}, - {0xfdf0, 0, 0, 0, g(Yes, No, false, false, "", "صلے")}, - {0xfdf1, 0, 0, 0, g(Yes, No, false, false, "", "قلے")}, - {0xfdf2, 0, 0, 0, g(Yes, No, false, false, "", "الله")}, - {0xfdf3, 0, 0, 0, g(Yes, No, false, false, "", "اكبر")}, - {0xfdf4, 0, 0, 0, g(Yes, No, false, false, "", "محمد")}, - {0xfdf5, 0, 0, 0, g(Yes, No, false, false, "", "صلعم")}, - {0xfdf6, 0, 0, 0, g(Yes, No, false, false, "", "رسول")}, - {0xfdf7, 0, 0, 0, g(Yes, No, false, false, "", "عليه")}, - {0xfdf8, 0, 0, 0, g(Yes, No, false, false, "", "وسلم")}, - {0xfdf9, 0, 0, 0, g(Yes, No, false, false, "", "صلى")}, - {0xfdfa, 0, 0, 0, g(Yes, No, false, false, "", "صلى الله عليه وسلم")}, - {0xfdfb, 0, 0, 0, g(Yes, No, false, false, "", "جل جلاله")}, - {0xfdfc, 0, 0, 0, g(Yes, No, false, false, "", "ریال")}, - {0xfdfd, 0, 0, 0, f(Yes, false, "")}, - {0xfe10, 0, 0, 0, g(Yes, No, false, false, "", ",")}, - {0xfe11, 0, 0, 0, g(Yes, No, false, false, "", "、")}, - {0xfe12, 0, 0, 0, g(Yes, No, false, false, "", "。")}, - {0xfe13, 0, 0, 0, g(Yes, No, false, false, "", ":")}, - {0xfe14, 0, 0, 0, g(Yes, No, false, false, "", ";")}, - {0xfe15, 0, 0, 0, g(Yes, No, false, false, "", "!")}, - {0xfe16, 0, 0, 0, g(Yes, No, false, false, "", "?")}, - {0xfe17, 0, 0, 0, g(Yes, No, false, false, "", "〖")}, - {0xfe18, 0, 0, 0, g(Yes, No, false, false, "", "〗")}, - {0xfe19, 0, 0, 0, g(Yes, No, false, false, "", "...")}, - {0xfe1a, 0, 0, 0, f(Yes, false, "")}, - {0xfe20, 230, 1, 1, f(Yes, false, "")}, - {0xfe27, 220, 1, 1, f(Yes, false, "")}, - {0xfe2e, 230, 1, 1, f(Yes, false, "")}, - {0xfe30, 0, 0, 0, g(Yes, No, false, false, "", "..")}, - {0xfe31, 0, 0, 0, g(Yes, No, false, false, "", "—")}, - {0xfe32, 0, 0, 0, g(Yes, No, false, false, "", "–")}, - {0xfe33, 0, 0, 0, g(Yes, No, false, false, "", "_")}, - {0xfe35, 0, 0, 0, g(Yes, No, false, false, "", "(")}, - {0xfe36, 0, 0, 0, g(Yes, No, false, false, "", ")")}, - {0xfe37, 0, 0, 0, g(Yes, No, false, false, "", "{")}, - {0xfe38, 0, 0, 0, g(Yes, No, false, false, "", "}")}, - {0xfe39, 0, 0, 0, g(Yes, No, false, false, "", "〔")}, - {0xfe3a, 0, 0, 0, g(Yes, No, false, false, "", "〕")}, - {0xfe3b, 0, 0, 0, g(Yes, No, false, false, "", "【")}, - {0xfe3c, 0, 0, 0, g(Yes, No, false, false, "", "】")}, - {0xfe3d, 0, 0, 0, g(Yes, No, false, false, "", "《")}, - {0xfe3e, 0, 0, 0, g(Yes, No, false, false, "", "》")}, - {0xfe3f, 0, 0, 0, g(Yes, No, false, false, "", "〈")}, - {0xfe40, 0, 0, 0, g(Yes, No, false, false, "", "〉")}, - {0xfe41, 0, 0, 0, g(Yes, No, false, false, "", "「")}, - {0xfe42, 0, 0, 0, g(Yes, No, false, false, "", "」")}, - {0xfe43, 0, 0, 0, g(Yes, No, false, false, "", "『")}, - {0xfe44, 0, 0, 0, g(Yes, No, false, false, "", "』")}, - {0xfe45, 0, 0, 0, f(Yes, false, "")}, - {0xfe47, 0, 0, 0, g(Yes, No, false, false, "", "[")}, - {0xfe48, 0, 0, 0, g(Yes, No, false, false, "", "]")}, - {0xfe49, 0, 0, 1, g(Yes, No, false, false, "", " ̅")}, - {0xfe4d, 0, 0, 0, g(Yes, No, false, false, "", "_")}, - {0xfe50, 0, 0, 0, g(Yes, No, false, false, "", ",")}, - {0xfe51, 0, 0, 0, g(Yes, No, false, false, "", "、")}, - {0xfe52, 0, 0, 0, g(Yes, No, false, false, "", ".")}, - {0xfe53, 0, 0, 0, f(Yes, false, "")}, - {0xfe54, 0, 0, 0, g(Yes, No, false, false, "", ";")}, - {0xfe55, 0, 0, 0, g(Yes, No, false, false, "", ":")}, - {0xfe56, 0, 0, 0, g(Yes, No, false, false, "", "?")}, - {0xfe57, 0, 0, 0, g(Yes, No, false, false, "", "!")}, - {0xfe58, 0, 0, 0, g(Yes, No, false, false, "", "—")}, - {0xfe59, 0, 0, 0, g(Yes, No, false, false, "", "(")}, - {0xfe5a, 0, 0, 0, g(Yes, No, false, false, "", ")")}, - {0xfe5b, 0, 0, 0, g(Yes, No, false, false, "", "{")}, - {0xfe5c, 0, 0, 0, g(Yes, No, false, false, "", "}")}, - {0xfe5d, 0, 0, 0, g(Yes, No, false, false, "", "〔")}, - {0xfe5e, 0, 0, 0, g(Yes, No, false, false, "", "〕")}, - {0xfe5f, 0, 0, 0, g(Yes, No, false, false, "", "#")}, - {0xfe60, 0, 0, 0, g(Yes, No, false, false, "", "&")}, - {0xfe61, 0, 0, 0, g(Yes, No, false, false, "", "*")}, - {0xfe62, 0, 0, 0, g(Yes, No, false, false, "", "+")}, - {0xfe63, 0, 0, 0, g(Yes, No, false, false, "", "-")}, - {0xfe64, 0, 0, 0, g(Yes, No, false, false, "", "<")}, - {0xfe65, 0, 0, 0, g(Yes, No, false, false, "", ">")}, - {0xfe66, 0, 0, 0, g(Yes, No, false, false, "", "=")}, - {0xfe67, 0, 0, 0, f(Yes, false, "")}, - {0xfe68, 0, 0, 0, g(Yes, No, false, false, "", "\\")}, - {0xfe69, 0, 0, 0, g(Yes, No, false, false, "", "$")}, - {0xfe6a, 0, 0, 0, g(Yes, No, false, false, "", "%")}, - {0xfe6b, 0, 0, 0, g(Yes, No, false, false, "", "@")}, - {0xfe6c, 0, 0, 0, f(Yes, false, "")}, - {0xfe70, 0, 0, 1, g(Yes, No, false, false, "", " ً")}, - {0xfe71, 0, 0, 1, g(Yes, No, false, false, "", "ـً")}, - {0xfe72, 0, 0, 1, g(Yes, No, false, false, "", " ٌ")}, - {0xfe73, 0, 0, 0, f(Yes, false, "")}, - {0xfe74, 0, 0, 1, g(Yes, No, false, false, "", " ٍ")}, - {0xfe75, 0, 0, 0, f(Yes, false, "")}, - {0xfe76, 0, 0, 1, g(Yes, No, false, false, "", " َ")}, - {0xfe77, 0, 0, 1, g(Yes, No, false, false, "", "ـَ")}, - {0xfe78, 0, 0, 1, g(Yes, No, false, false, "", " ُ")}, - {0xfe79, 0, 0, 1, g(Yes, No, false, false, "", "ـُ")}, - {0xfe7a, 0, 0, 1, g(Yes, No, false, false, "", " ِ")}, - {0xfe7b, 0, 0, 1, g(Yes, No, false, false, "", "ـِ")}, - {0xfe7c, 0, 0, 1, g(Yes, No, false, false, "", " ّ")}, - {0xfe7d, 0, 0, 1, g(Yes, No, false, false, "", "ـّ")}, - {0xfe7e, 0, 0, 1, g(Yes, No, false, false, "", " ْ")}, - {0xfe7f, 0, 0, 1, g(Yes, No, false, false, "", "ـْ")}, - {0xfe80, 0, 0, 0, g(Yes, No, false, false, "", "ء")}, - {0xfe81, 0, 0, 1, g(Yes, No, false, false, "", "آ")}, - {0xfe83, 0, 0, 1, g(Yes, No, false, false, "", "أ")}, - {0xfe85, 0, 0, 1, g(Yes, No, false, false, "", "ؤ")}, - {0xfe87, 0, 0, 1, g(Yes, No, false, false, "", "إ")}, - {0xfe89, 0, 0, 1, g(Yes, No, false, false, "", "ئ")}, - {0xfe8d, 0, 0, 0, g(Yes, No, false, false, "", "ا")}, - {0xfe8f, 0, 0, 0, g(Yes, No, false, false, "", "ب")}, - {0xfe93, 0, 0, 0, g(Yes, No, false, false, "", "ة")}, - {0xfe95, 0, 0, 0, g(Yes, No, false, false, "", "ت")}, - {0xfe99, 0, 0, 0, g(Yes, No, false, false, "", "ث")}, - {0xfe9d, 0, 0, 0, g(Yes, No, false, false, "", "ج")}, - {0xfea1, 0, 0, 0, g(Yes, No, false, false, "", "ح")}, - {0xfea5, 0, 0, 0, g(Yes, No, false, false, "", "خ")}, - {0xfea9, 0, 0, 0, g(Yes, No, false, false, "", "د")}, - {0xfeab, 0, 0, 0, g(Yes, No, false, false, "", "ذ")}, - {0xfead, 0, 0, 0, g(Yes, No, false, false, "", "ر")}, - {0xfeaf, 0, 0, 0, g(Yes, No, false, false, "", "ز")}, - {0xfeb1, 0, 0, 0, g(Yes, No, false, false, "", "س")}, - {0xfeb5, 0, 0, 0, g(Yes, No, false, false, "", "ش")}, - {0xfeb9, 0, 0, 0, g(Yes, No, false, false, "", "ص")}, - {0xfebd, 0, 0, 0, g(Yes, No, false, false, "", "ض")}, - {0xfec1, 0, 0, 0, g(Yes, No, false, false, "", "ط")}, - {0xfec5, 0, 0, 0, g(Yes, No, false, false, "", "ظ")}, - {0xfec9, 0, 0, 0, g(Yes, No, false, false, "", "ع")}, - {0xfecd, 0, 0, 0, g(Yes, No, false, false, "", "غ")}, - {0xfed1, 0, 0, 0, g(Yes, No, false, false, "", "ف")}, - {0xfed5, 0, 0, 0, g(Yes, No, false, false, "", "ق")}, - {0xfed9, 0, 0, 0, g(Yes, No, false, false, "", "ك")}, - {0xfedd, 0, 0, 0, g(Yes, No, false, false, "", "ل")}, - {0xfee1, 0, 0, 0, g(Yes, No, false, false, "", "م")}, - {0xfee5, 0, 0, 0, g(Yes, No, false, false, "", "ن")}, - {0xfee9, 0, 0, 0, g(Yes, No, false, false, "", "ه")}, - {0xfeed, 0, 0, 0, g(Yes, No, false, false, "", "و")}, - {0xfeef, 0, 0, 0, g(Yes, No, false, false, "", "ى")}, - {0xfef1, 0, 0, 0, g(Yes, No, false, false, "", "ي")}, - {0xfef5, 0, 0, 1, g(Yes, No, false, false, "", "لآ")}, - {0xfef7, 0, 0, 1, g(Yes, No, false, false, "", "لأ")}, - {0xfef9, 0, 0, 1, g(Yes, No, false, false, "", "لإ")}, - {0xfefb, 0, 0, 0, g(Yes, No, false, false, "", "لا")}, - {0xfefd, 0, 0, 0, f(Yes, false, "")}, - {0xff01, 0, 0, 0, g(Yes, No, false, false, "", "!")}, - {0xff02, 0, 0, 0, g(Yes, No, false, false, "", "\"")}, - {0xff03, 0, 0, 0, g(Yes, No, false, false, "", "#")}, - {0xff04, 0, 0, 0, g(Yes, No, false, false, "", "$")}, - {0xff05, 0, 0, 0, g(Yes, No, false, false, "", "%")}, - {0xff06, 0, 0, 0, g(Yes, No, false, false, "", "&")}, - {0xff07, 0, 0, 0, g(Yes, No, false, false, "", "'")}, - {0xff08, 0, 0, 0, g(Yes, No, false, false, "", "(")}, - {0xff09, 0, 0, 0, g(Yes, No, false, false, "", ")")}, - {0xff0a, 0, 0, 0, g(Yes, No, false, false, "", "*")}, - {0xff0b, 0, 0, 0, g(Yes, No, false, false, "", "+")}, - {0xff0c, 0, 0, 0, g(Yes, No, false, false, "", ",")}, - {0xff0d, 0, 0, 0, g(Yes, No, false, false, "", "-")}, - {0xff0e, 0, 0, 0, g(Yes, No, false, false, "", ".")}, - {0xff0f, 0, 0, 0, g(Yes, No, false, false, "", "/")}, - {0xff10, 0, 0, 0, g(Yes, No, false, false, "", "0")}, - {0xff11, 0, 0, 0, g(Yes, No, false, false, "", "1")}, - {0xff12, 0, 0, 0, g(Yes, No, false, false, "", "2")}, - {0xff13, 0, 0, 0, g(Yes, No, false, false, "", "3")}, - {0xff14, 0, 0, 0, g(Yes, No, false, false, "", "4")}, - {0xff15, 0, 0, 0, g(Yes, No, false, false, "", "5")}, - {0xff16, 0, 0, 0, g(Yes, No, false, false, "", "6")}, - {0xff17, 0, 0, 0, g(Yes, No, false, false, "", "7")}, - {0xff18, 0, 0, 0, g(Yes, No, false, false, "", "8")}, - {0xff19, 0, 0, 0, g(Yes, No, false, false, "", "9")}, - {0xff1a, 0, 0, 0, g(Yes, No, false, false, "", ":")}, - {0xff1b, 0, 0, 0, g(Yes, No, false, false, "", ";")}, - {0xff1c, 0, 0, 0, g(Yes, No, false, false, "", "<")}, - {0xff1d, 0, 0, 0, g(Yes, No, false, false, "", "=")}, - {0xff1e, 0, 0, 0, g(Yes, No, false, false, "", ">")}, - {0xff1f, 0, 0, 0, g(Yes, No, false, false, "", "?")}, - {0xff20, 0, 0, 0, g(Yes, No, false, false, "", "@")}, - {0xff21, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0xff22, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0xff23, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0xff24, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0xff25, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0xff26, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0xff27, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0xff28, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0xff29, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0xff2a, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0xff2b, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0xff2c, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0xff2d, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0xff2e, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0xff2f, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0xff30, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0xff31, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0xff32, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0xff33, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0xff34, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0xff35, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0xff36, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0xff37, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0xff38, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0xff39, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0xff3a, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0xff3b, 0, 0, 0, g(Yes, No, false, false, "", "[")}, - {0xff3c, 0, 0, 0, g(Yes, No, false, false, "", "\\")}, - {0xff3d, 0, 0, 0, g(Yes, No, false, false, "", "]")}, - {0xff3e, 0, 0, 0, g(Yes, No, false, false, "", "^")}, - {0xff3f, 0, 0, 0, g(Yes, No, false, false, "", "_")}, - {0xff40, 0, 0, 0, g(Yes, No, false, false, "", "`")}, - {0xff41, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0xff42, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0xff43, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0xff44, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0xff45, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0xff46, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0xff47, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0xff48, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0xff49, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0xff4a, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0xff4b, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0xff4c, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0xff4d, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0xff4e, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0xff4f, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0xff50, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0xff51, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0xff52, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0xff53, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0xff54, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0xff55, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0xff56, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0xff57, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0xff58, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0xff59, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0xff5a, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0xff5b, 0, 0, 0, g(Yes, No, false, false, "", "{")}, - {0xff5c, 0, 0, 0, g(Yes, No, false, false, "", "|")}, - {0xff5d, 0, 0, 0, g(Yes, No, false, false, "", "}")}, - {0xff5e, 0, 0, 0, g(Yes, No, false, false, "", "~")}, - {0xff5f, 0, 0, 0, g(Yes, No, false, false, "", "⦅")}, - {0xff60, 0, 0, 0, g(Yes, No, false, false, "", "⦆")}, - {0xff61, 0, 0, 0, g(Yes, No, false, false, "", "。")}, - {0xff62, 0, 0, 0, g(Yes, No, false, false, "", "「")}, - {0xff63, 0, 0, 0, g(Yes, No, false, false, "", "」")}, - {0xff64, 0, 0, 0, g(Yes, No, false, false, "", "、")}, - {0xff65, 0, 0, 0, g(Yes, No, false, false, "", "・")}, - {0xff66, 0, 0, 0, g(Yes, No, false, false, "", "ヲ")}, - {0xff67, 0, 0, 0, g(Yes, No, false, false, "", "ァ")}, - {0xff68, 0, 0, 0, g(Yes, No, false, false, "", "ィ")}, - {0xff69, 0, 0, 0, g(Yes, No, false, false, "", "ゥ")}, - {0xff6a, 0, 0, 0, g(Yes, No, false, false, "", "ェ")}, - {0xff6b, 0, 0, 0, g(Yes, No, false, false, "", "ォ")}, - {0xff6c, 0, 0, 0, g(Yes, No, false, false, "", "ャ")}, - {0xff6d, 0, 0, 0, g(Yes, No, false, false, "", "ュ")}, - {0xff6e, 0, 0, 0, g(Yes, No, false, false, "", "ョ")}, - {0xff6f, 0, 0, 0, g(Yes, No, false, false, "", "ッ")}, - {0xff70, 0, 0, 0, g(Yes, No, false, false, "", "ー")}, - {0xff71, 0, 0, 0, g(Yes, No, false, false, "", "ア")}, - {0xff72, 0, 0, 0, g(Yes, No, false, false, "", "イ")}, - {0xff73, 0, 0, 0, g(Yes, No, false, false, "", "ウ")}, - {0xff74, 0, 0, 0, g(Yes, No, false, false, "", "エ")}, - {0xff75, 0, 0, 0, g(Yes, No, false, false, "", "オ")}, - {0xff76, 0, 0, 0, g(Yes, No, false, false, "", "カ")}, - {0xff77, 0, 0, 0, g(Yes, No, false, false, "", "キ")}, - {0xff78, 0, 0, 0, g(Yes, No, false, false, "", "ク")}, - {0xff79, 0, 0, 0, g(Yes, No, false, false, "", "ケ")}, - {0xff7a, 0, 0, 0, g(Yes, No, false, false, "", "コ")}, - {0xff7b, 0, 0, 0, g(Yes, No, false, false, "", "サ")}, - {0xff7c, 0, 0, 0, g(Yes, No, false, false, "", "シ")}, - {0xff7d, 0, 0, 0, g(Yes, No, false, false, "", "ス")}, - {0xff7e, 0, 0, 0, g(Yes, No, false, false, "", "セ")}, - {0xff7f, 0, 0, 0, g(Yes, No, false, false, "", "ソ")}, - {0xff80, 0, 0, 0, g(Yes, No, false, false, "", "タ")}, - {0xff81, 0, 0, 0, g(Yes, No, false, false, "", "チ")}, - {0xff82, 0, 0, 0, g(Yes, No, false, false, "", "ツ")}, - {0xff83, 0, 0, 0, g(Yes, No, false, false, "", "テ")}, - {0xff84, 0, 0, 0, g(Yes, No, false, false, "", "ト")}, - {0xff85, 0, 0, 0, g(Yes, No, false, false, "", "ナ")}, - {0xff86, 0, 0, 0, g(Yes, No, false, false, "", "ニ")}, - {0xff87, 0, 0, 0, g(Yes, No, false, false, "", "ヌ")}, - {0xff88, 0, 0, 0, g(Yes, No, false, false, "", "ネ")}, - {0xff89, 0, 0, 0, g(Yes, No, false, false, "", "ノ")}, - {0xff8a, 0, 0, 0, g(Yes, No, false, false, "", "ハ")}, - {0xff8b, 0, 0, 0, g(Yes, No, false, false, "", "ヒ")}, - {0xff8c, 0, 0, 0, g(Yes, No, false, false, "", "フ")}, - {0xff8d, 0, 0, 0, g(Yes, No, false, false, "", "ヘ")}, - {0xff8e, 0, 0, 0, g(Yes, No, false, false, "", "ホ")}, - {0xff8f, 0, 0, 0, g(Yes, No, false, false, "", "マ")}, - {0xff90, 0, 0, 0, g(Yes, No, false, false, "", "ミ")}, - {0xff91, 0, 0, 0, g(Yes, No, false, false, "", "ム")}, - {0xff92, 0, 0, 0, g(Yes, No, false, false, "", "メ")}, - {0xff93, 0, 0, 0, g(Yes, No, false, false, "", "モ")}, - {0xff94, 0, 0, 0, g(Yes, No, false, false, "", "ヤ")}, - {0xff95, 0, 0, 0, g(Yes, No, false, false, "", "ユ")}, - {0xff96, 0, 0, 0, g(Yes, No, false, false, "", "ヨ")}, - {0xff97, 0, 0, 0, g(Yes, No, false, false, "", "ラ")}, - {0xff98, 0, 0, 0, g(Yes, No, false, false, "", "リ")}, - {0xff99, 0, 0, 0, g(Yes, No, false, false, "", "ル")}, - {0xff9a, 0, 0, 0, g(Yes, No, false, false, "", "レ")}, - {0xff9b, 0, 0, 0, g(Yes, No, false, false, "", "ロ")}, - {0xff9c, 0, 0, 0, g(Yes, No, false, false, "", "ワ")}, - {0xff9d, 0, 0, 0, g(Yes, No, false, false, "", "ン")}, - {0xff9e, 0, 1, 1, g(Yes, No, false, false, "", "゙")}, - {0xff9f, 0, 1, 1, g(Yes, No, false, false, "", "゚")}, - {0xffa0, 0, 0, 0, g(Yes, No, false, false, "", "ᅠ")}, - {0xffa1, 0, 0, 0, g(Yes, No, false, false, "", "ᄀ")}, - {0xffa2, 0, 0, 0, g(Yes, No, false, false, "", "ᄁ")}, - {0xffa3, 0, 1, 1, g(Yes, No, false, false, "", "ᆪ")}, - {0xffa4, 0, 0, 0, g(Yes, No, false, false, "", "ᄂ")}, - {0xffa5, 0, 1, 1, g(Yes, No, false, false, "", "ᆬ")}, - {0xffa6, 0, 1, 1, g(Yes, No, false, false, "", "ᆭ")}, - {0xffa7, 0, 0, 0, g(Yes, No, false, false, "", "ᄃ")}, - {0xffa8, 0, 0, 0, g(Yes, No, false, false, "", "ᄄ")}, - {0xffa9, 0, 0, 0, g(Yes, No, false, false, "", "ᄅ")}, - {0xffaa, 0, 1, 1, g(Yes, No, false, false, "", "ᆰ")}, - {0xffab, 0, 1, 1, g(Yes, No, false, false, "", "ᆱ")}, - {0xffac, 0, 1, 1, g(Yes, No, false, false, "", "ᆲ")}, - {0xffad, 0, 1, 1, g(Yes, No, false, false, "", "ᆳ")}, - {0xffae, 0, 1, 1, g(Yes, No, false, false, "", "ᆴ")}, - {0xffaf, 0, 1, 1, g(Yes, No, false, false, "", "ᆵ")}, - {0xffb0, 0, 0, 0, g(Yes, No, false, false, "", "ᄚ")}, - {0xffb1, 0, 0, 0, g(Yes, No, false, false, "", "ᄆ")}, - {0xffb2, 0, 0, 0, g(Yes, No, false, false, "", "ᄇ")}, - {0xffb3, 0, 0, 0, g(Yes, No, false, false, "", "ᄈ")}, - {0xffb4, 0, 0, 0, g(Yes, No, false, false, "", "ᄡ")}, - {0xffb5, 0, 0, 0, g(Yes, No, false, false, "", "ᄉ")}, - {0xffb6, 0, 0, 0, g(Yes, No, false, false, "", "ᄊ")}, - {0xffb7, 0, 0, 0, g(Yes, No, false, false, "", "ᄋ")}, - {0xffb8, 0, 0, 0, g(Yes, No, false, false, "", "ᄌ")}, - {0xffb9, 0, 0, 0, g(Yes, No, false, false, "", "ᄍ")}, - {0xffba, 0, 0, 0, g(Yes, No, false, false, "", "ᄎ")}, - {0xffbb, 0, 0, 0, g(Yes, No, false, false, "", "ᄏ")}, - {0xffbc, 0, 0, 0, g(Yes, No, false, false, "", "ᄐ")}, - {0xffbd, 0, 0, 0, g(Yes, No, false, false, "", "ᄑ")}, - {0xffbe, 0, 0, 0, g(Yes, No, false, false, "", "ᄒ")}, - {0xffbf, 0, 0, 0, f(Yes, false, "")}, - {0xffc2, 0, 1, 1, g(Yes, No, false, false, "", "ᅡ")}, - {0xffc3, 0, 1, 1, g(Yes, No, false, false, "", "ᅢ")}, - {0xffc4, 0, 1, 1, g(Yes, No, false, false, "", "ᅣ")}, - {0xffc5, 0, 1, 1, g(Yes, No, false, false, "", "ᅤ")}, - {0xffc6, 0, 1, 1, g(Yes, No, false, false, "", "ᅥ")}, - {0xffc7, 0, 1, 1, g(Yes, No, false, false, "", "ᅦ")}, - {0xffc8, 0, 0, 0, f(Yes, false, "")}, - {0xffca, 0, 1, 1, g(Yes, No, false, false, "", "ᅧ")}, - {0xffcb, 0, 1, 1, g(Yes, No, false, false, "", "ᅨ")}, - {0xffcc, 0, 1, 1, g(Yes, No, false, false, "", "ᅩ")}, - {0xffcd, 0, 1, 1, g(Yes, No, false, false, "", "ᅪ")}, - {0xffce, 0, 1, 1, g(Yes, No, false, false, "", "ᅫ")}, - {0xffcf, 0, 1, 1, g(Yes, No, false, false, "", "ᅬ")}, - {0xffd0, 0, 0, 0, f(Yes, false, "")}, - {0xffd2, 0, 1, 1, g(Yes, No, false, false, "", "ᅭ")}, - {0xffd3, 0, 1, 1, g(Yes, No, false, false, "", "ᅮ")}, - {0xffd4, 0, 1, 1, g(Yes, No, false, false, "", "ᅯ")}, - {0xffd5, 0, 1, 1, g(Yes, No, false, false, "", "ᅰ")}, - {0xffd6, 0, 1, 1, g(Yes, No, false, false, "", "ᅱ")}, - {0xffd7, 0, 1, 1, g(Yes, No, false, false, "", "ᅲ")}, - {0xffd8, 0, 0, 0, f(Yes, false, "")}, - {0xffda, 0, 1, 1, g(Yes, No, false, false, "", "ᅳ")}, - {0xffdb, 0, 1, 1, g(Yes, No, false, false, "", "ᅴ")}, - {0xffdc, 0, 1, 1, g(Yes, No, false, false, "", "ᅵ")}, - {0xffdd, 0, 0, 0, f(Yes, false, "")}, - {0xffe0, 0, 0, 0, g(Yes, No, false, false, "", "¢")}, - {0xffe1, 0, 0, 0, g(Yes, No, false, false, "", "£")}, - {0xffe2, 0, 0, 0, g(Yes, No, false, false, "", "¬")}, - {0xffe3, 0, 0, 1, g(Yes, No, false, false, "", " ̄")}, - {0xffe4, 0, 0, 0, g(Yes, No, false, false, "", "¦")}, - {0xffe5, 0, 0, 0, g(Yes, No, false, false, "", "¥")}, - {0xffe6, 0, 0, 0, g(Yes, No, false, false, "", "₩")}, - {0xffe7, 0, 0, 0, f(Yes, false, "")}, - {0xffe8, 0, 0, 0, g(Yes, No, false, false, "", "│")}, - {0xffe9, 0, 0, 0, g(Yes, No, false, false, "", "←")}, - {0xffea, 0, 0, 0, g(Yes, No, false, false, "", "↑")}, - {0xffeb, 0, 0, 0, g(Yes, No, false, false, "", "→")}, - {0xffec, 0, 0, 0, g(Yes, No, false, false, "", "↓")}, - {0xffed, 0, 0, 0, g(Yes, No, false, false, "", "■")}, - {0xffee, 0, 0, 0, g(Yes, No, false, false, "", "○")}, - {0xffef, 0, 0, 0, f(Yes, false, "")}, - {0x101fd, 220, 1, 1, f(Yes, false, "")}, - {0x101fe, 0, 0, 0, f(Yes, false, "")}, - {0x102e0, 220, 1, 1, f(Yes, false, "")}, - {0x102e1, 0, 0, 0, f(Yes, false, "")}, - {0x10376, 230, 1, 1, f(Yes, false, "")}, - {0x1037b, 0, 0, 0, f(Yes, false, "")}, - {0x10a0d, 220, 1, 1, f(Yes, false, "")}, - {0x10a0e, 0, 0, 0, f(Yes, false, "")}, - {0x10a0f, 230, 1, 1, f(Yes, false, "")}, - {0x10a10, 0, 0, 0, f(Yes, false, "")}, - {0x10a38, 230, 1, 1, f(Yes, false, "")}, - {0x10a39, 1, 1, 1, f(Yes, false, "")}, - {0x10a3a, 220, 1, 1, f(Yes, false, "")}, - {0x10a3b, 0, 0, 0, f(Yes, false, "")}, - {0x10a3f, 9, 1, 1, f(Yes, false, "")}, - {0x10a40, 0, 0, 0, f(Yes, false, "")}, - {0x10ae5, 230, 1, 1, f(Yes, false, "")}, - {0x10ae6, 220, 1, 1, f(Yes, false, "")}, - {0x10ae7, 0, 0, 0, f(Yes, false, "")}, - {0x11046, 9, 1, 1, f(Yes, false, "")}, - {0x11047, 0, 0, 0, f(Yes, false, "")}, - {0x1107f, 9, 1, 1, f(Yes, false, "")}, - {0x11080, 0, 0, 0, f(Yes, false, "")}, - {0x11099, 0, 0, 0, f(Yes, true, "")}, - {0x1109a, 0, 0, 1, f(Yes, false, "𑂚")}, - {0x1109b, 0, 0, 0, f(Yes, true, "")}, - {0x1109c, 0, 0, 1, f(Yes, false, "𑂜")}, - {0x1109d, 0, 0, 0, f(Yes, false, "")}, - {0x110a5, 0, 0, 0, f(Yes, true, "")}, - {0x110a6, 0, 0, 0, f(Yes, false, "")}, - {0x110ab, 0, 0, 1, f(Yes, false, "𑂫")}, - {0x110ac, 0, 0, 0, f(Yes, false, "")}, - {0x110b9, 9, 1, 1, f(Yes, false, "")}, - {0x110ba, 7, 1, 1, f(Maybe, false, "")}, - {0x110bb, 0, 0, 0, f(Yes, false, "")}, - {0x11100, 230, 1, 1, f(Yes, false, "")}, - {0x11103, 0, 0, 0, f(Yes, false, "")}, - {0x11127, 0, 1, 1, f(Maybe, false, "")}, - {0x11128, 0, 0, 0, f(Yes, false, "")}, - {0x1112e, 0, 0, 1, f(Yes, false, "𑄮")}, - {0x1112f, 0, 0, 1, f(Yes, false, "𑄯")}, - {0x11130, 0, 0, 0, f(Yes, false, "")}, - {0x11131, 0, 0, 0, f(Yes, true, "")}, - {0x11133, 9, 1, 1, f(Yes, false, "")}, - {0x11135, 0, 0, 0, f(Yes, false, "")}, - {0x11173, 7, 1, 1, f(Yes, false, "")}, - {0x11174, 0, 0, 0, f(Yes, false, "")}, - {0x111c0, 9, 1, 1, f(Yes, false, "")}, - {0x111c1, 0, 0, 0, f(Yes, false, "")}, - {0x111ca, 7, 1, 1, f(Yes, false, "")}, - {0x111cb, 0, 0, 0, f(Yes, false, "")}, - {0x11235, 9, 1, 1, f(Yes, false, "")}, - {0x11236, 7, 1, 1, f(Yes, false, "")}, - {0x11237, 0, 0, 0, f(Yes, false, "")}, - {0x112e9, 7, 1, 1, f(Yes, false, "")}, - {0x112ea, 9, 1, 1, f(Yes, false, "")}, - {0x112eb, 0, 0, 0, f(Yes, false, "")}, - {0x1133c, 7, 1, 1, f(Yes, false, "")}, - {0x1133d, 0, 0, 0, f(Yes, false, "")}, - {0x1133e, 0, 1, 1, f(Maybe, false, "")}, - {0x1133f, 0, 0, 0, f(Yes, false, "")}, - {0x11347, 0, 0, 0, f(Yes, true, "")}, - {0x11348, 0, 0, 0, f(Yes, false, "")}, - {0x1134b, 0, 0, 1, f(Yes, false, "𑍋")}, - {0x1134c, 0, 0, 1, f(Yes, false, "𑍌")}, - {0x1134d, 9, 1, 1, f(Yes, false, "")}, - {0x1134e, 0, 0, 0, f(Yes, false, "")}, - {0x11357, 0, 1, 1, f(Maybe, false, "")}, - {0x11358, 0, 0, 0, f(Yes, false, "")}, - {0x11366, 230, 1, 1, f(Yes, false, "")}, - {0x1136d, 0, 0, 0, f(Yes, false, "")}, - {0x11370, 230, 1, 1, f(Yes, false, "")}, - {0x11375, 0, 0, 0, f(Yes, false, "")}, - {0x11442, 9, 1, 1, f(Yes, false, "")}, - {0x11443, 0, 0, 0, f(Yes, false, "")}, - {0x11446, 7, 1, 1, f(Yes, false, "")}, - {0x11447, 0, 0, 0, f(Yes, false, "")}, - {0x114b0, 0, 1, 1, f(Maybe, false, "")}, - {0x114b1, 0, 0, 0, f(Yes, false, "")}, - {0x114b9, 0, 0, 0, f(Yes, true, "")}, - {0x114ba, 0, 1, 1, f(Maybe, false, "")}, - {0x114bb, 0, 0, 1, f(Yes, false, "𑒻")}, - {0x114bc, 0, 0, 1, f(Yes, false, "𑒼")}, - {0x114bd, 0, 1, 1, f(Maybe, false, "")}, - {0x114be, 0, 0, 1, f(Yes, false, "𑒾")}, - {0x114bf, 0, 0, 0, f(Yes, false, "")}, - {0x114c2, 9, 1, 1, f(Yes, false, "")}, - {0x114c3, 7, 1, 1, f(Yes, false, "")}, - {0x114c4, 0, 0, 0, f(Yes, false, "")}, - {0x115af, 0, 1, 1, f(Maybe, false, "")}, - {0x115b0, 0, 0, 0, f(Yes, false, "")}, - {0x115b8, 0, 0, 0, f(Yes, true, "")}, - {0x115ba, 0, 0, 1, f(Yes, false, "𑖺")}, - {0x115bb, 0, 0, 1, f(Yes, false, "𑖻")}, - {0x115bc, 0, 0, 0, f(Yes, false, "")}, - {0x115bf, 9, 1, 1, f(Yes, false, "")}, - {0x115c0, 7, 1, 1, f(Yes, false, "")}, - {0x115c1, 0, 0, 0, f(Yes, false, "")}, - {0x1163f, 9, 1, 1, f(Yes, false, "")}, - {0x11640, 0, 0, 0, f(Yes, false, "")}, - {0x116b6, 9, 1, 1, f(Yes, false, "")}, - {0x116b7, 7, 1, 1, f(Yes, false, "")}, - {0x116b8, 0, 0, 0, f(Yes, false, "")}, - {0x1172b, 9, 1, 1, f(Yes, false, "")}, - {0x1172c, 0, 0, 0, f(Yes, false, "")}, - {0x11a34, 9, 1, 1, f(Yes, false, "")}, - {0x11a35, 0, 0, 0, f(Yes, false, "")}, - {0x11a47, 9, 1, 1, f(Yes, false, "")}, - {0x11a48, 0, 0, 0, f(Yes, false, "")}, - {0x11a99, 9, 1, 1, f(Yes, false, "")}, - {0x11a9a, 0, 0, 0, f(Yes, false, "")}, - {0x11c3f, 9, 1, 1, f(Yes, false, "")}, - {0x11c40, 0, 0, 0, f(Yes, false, "")}, - {0x11d42, 7, 1, 1, f(Yes, false, "")}, - {0x11d43, 0, 0, 0, f(Yes, false, "")}, - {0x11d44, 9, 1, 1, f(Yes, false, "")}, - {0x11d46, 0, 0, 0, f(Yes, false, "")}, - {0x16af0, 1, 1, 1, f(Yes, false, "")}, - {0x16af5, 0, 0, 0, f(Yes, false, "")}, - {0x16b30, 230, 1, 1, f(Yes, false, "")}, - {0x16b37, 0, 0, 0, f(Yes, false, "")}, - {0x1bc9e, 1, 1, 1, f(Yes, false, "")}, - {0x1bc9f, 0, 0, 0, f(Yes, false, "")}, - {0x1d15e, 0, 0, 1, f(No, false, "𝅗𝅥")}, - {0x1d15f, 0, 0, 1, f(No, false, "𝅘𝅥")}, - {0x1d160, 0, 0, 2, f(No, false, "𝅘𝅥𝅮")}, - {0x1d161, 0, 0, 2, f(No, false, "𝅘𝅥𝅯")}, - {0x1d162, 0, 0, 2, f(No, false, "𝅘𝅥𝅰")}, - {0x1d163, 0, 0, 2, f(No, false, "𝅘𝅥𝅱")}, - {0x1d164, 0, 0, 2, f(No, false, "𝅘𝅥𝅲")}, - {0x1d165, 216, 1, 1, f(Yes, false, "")}, - {0x1d167, 1, 1, 1, f(Yes, false, "")}, - {0x1d16a, 0, 0, 0, f(Yes, false, "")}, - {0x1d16d, 226, 1, 1, f(Yes, false, "")}, - {0x1d16e, 216, 1, 1, f(Yes, false, "")}, - {0x1d173, 0, 0, 0, f(Yes, false, "")}, - {0x1d17b, 220, 1, 1, f(Yes, false, "")}, - {0x1d183, 0, 0, 0, f(Yes, false, "")}, - {0x1d185, 230, 1, 1, f(Yes, false, "")}, - {0x1d18a, 220, 1, 1, f(Yes, false, "")}, - {0x1d18c, 0, 0, 0, f(Yes, false, "")}, - {0x1d1aa, 230, 1, 1, f(Yes, false, "")}, - {0x1d1ae, 0, 0, 0, f(Yes, false, "")}, - {0x1d1bb, 0, 0, 1, f(No, false, "𝆹𝅥")}, - {0x1d1bc, 0, 0, 1, f(No, false, "𝆺𝅥")}, - {0x1d1bd, 0, 0, 2, f(No, false, "𝆹𝅥𝅮")}, - {0x1d1be, 0, 0, 2, f(No, false, "𝆺𝅥𝅮")}, - {0x1d1bf, 0, 0, 2, f(No, false, "𝆹𝅥𝅯")}, - {0x1d1c0, 0, 0, 2, f(No, false, "𝆺𝅥𝅯")}, - {0x1d1c1, 0, 0, 0, f(Yes, false, "")}, - {0x1d242, 230, 1, 1, f(Yes, false, "")}, - {0x1d245, 0, 0, 0, f(Yes, false, "")}, - {0x1d400, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d401, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d402, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d403, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d404, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d405, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d406, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d407, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d408, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d409, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d40a, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d40b, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d40c, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d40d, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d40e, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d40f, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d410, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d411, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d412, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d413, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d414, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d415, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d416, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d417, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d418, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d419, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d41a, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d41b, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d41c, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d41d, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d41e, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d41f, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d420, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d421, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d422, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d423, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d424, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d425, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d426, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d427, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d428, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d429, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d42a, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d42b, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d42c, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d42d, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d42e, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d42f, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d430, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d431, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d432, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d433, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d434, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d435, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d436, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d437, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d438, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d439, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d43a, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d43b, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d43c, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d43d, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d43e, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d43f, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d440, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d441, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d442, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d443, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d444, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d445, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d446, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d447, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d448, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d449, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d44a, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d44b, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d44c, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d44d, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d44e, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d44f, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d450, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d451, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d452, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d453, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d454, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d455, 0, 0, 0, f(Yes, false, "")}, - {0x1d456, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d457, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d458, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d459, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d45a, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d45b, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d45c, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d45d, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d45e, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d45f, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d460, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d461, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d462, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d463, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d464, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d465, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d466, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d467, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d468, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d469, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d46a, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d46b, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d46c, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d46d, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d46e, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d46f, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d470, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d471, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d472, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d473, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d474, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d475, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d476, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d477, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d478, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d479, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d47a, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d47b, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d47c, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d47d, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d47e, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d47f, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d480, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d481, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d482, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d483, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d484, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d485, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d486, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d487, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d488, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d489, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d48a, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d48b, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d48c, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d48d, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d48e, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d48f, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d490, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d491, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d492, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d493, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d494, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d495, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d496, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d497, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d498, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d499, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d49a, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d49b, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d49c, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d49d, 0, 0, 0, f(Yes, false, "")}, - {0x1d49e, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d49f, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d4a0, 0, 0, 0, f(Yes, false, "")}, - {0x1d4a2, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d4a3, 0, 0, 0, f(Yes, false, "")}, - {0x1d4a5, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d4a6, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d4a7, 0, 0, 0, f(Yes, false, "")}, - {0x1d4a9, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d4aa, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d4ab, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d4ac, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d4ad, 0, 0, 0, f(Yes, false, "")}, - {0x1d4ae, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d4af, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d4b0, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d4b1, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d4b2, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d4b3, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d4b4, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d4b5, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d4b6, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d4b7, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d4b8, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d4b9, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d4ba, 0, 0, 0, f(Yes, false, "")}, - {0x1d4bb, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d4bc, 0, 0, 0, f(Yes, false, "")}, - {0x1d4bd, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d4be, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d4bf, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d4c0, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d4c1, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d4c2, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d4c3, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d4c4, 0, 0, 0, f(Yes, false, "")}, - {0x1d4c5, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d4c6, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d4c7, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d4c8, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d4c9, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d4ca, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d4cb, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d4cc, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d4cd, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d4ce, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d4cf, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d4d0, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d4d1, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d4d2, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d4d3, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d4d4, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d4d5, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d4d6, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d4d7, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d4d8, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d4d9, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d4da, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d4db, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d4dc, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d4dd, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d4de, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d4df, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d4e0, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d4e1, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d4e2, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d4e3, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d4e4, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d4e5, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d4e6, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d4e7, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d4e8, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d4e9, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d4ea, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d4eb, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d4ec, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d4ed, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d4ee, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d4ef, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d4f0, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d4f1, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d4f2, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d4f3, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d4f4, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d4f5, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d4f6, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d4f7, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d4f8, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d4f9, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d4fa, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d4fb, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d4fc, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d4fd, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d4fe, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d4ff, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d500, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d501, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d502, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d503, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d504, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d505, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d506, 0, 0, 0, f(Yes, false, "")}, - {0x1d507, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d508, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d509, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d50a, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d50b, 0, 0, 0, f(Yes, false, "")}, - {0x1d50d, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d50e, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d50f, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d510, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d511, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d512, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d513, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d514, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d515, 0, 0, 0, f(Yes, false, "")}, - {0x1d516, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d517, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d518, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d519, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d51a, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d51b, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d51c, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d51d, 0, 0, 0, f(Yes, false, "")}, - {0x1d51e, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d51f, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d520, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d521, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d522, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d523, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d524, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d525, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d526, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d527, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d528, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d529, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d52a, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d52b, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d52c, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d52d, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d52e, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d52f, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d530, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d531, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d532, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d533, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d534, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d535, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d536, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d537, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d538, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d539, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d53a, 0, 0, 0, f(Yes, false, "")}, - {0x1d53b, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d53c, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d53d, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d53e, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d53f, 0, 0, 0, f(Yes, false, "")}, - {0x1d540, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d541, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d542, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d543, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d544, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d545, 0, 0, 0, f(Yes, false, "")}, - {0x1d546, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d547, 0, 0, 0, f(Yes, false, "")}, - {0x1d54a, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d54b, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d54c, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d54d, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d54e, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d54f, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d550, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d551, 0, 0, 0, f(Yes, false, "")}, - {0x1d552, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d553, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d554, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d555, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d556, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d557, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d558, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d559, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d55a, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d55b, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d55c, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d55d, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d55e, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d55f, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d560, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d561, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d562, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d563, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d564, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d565, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d566, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d567, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d568, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d569, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d56a, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d56b, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d56c, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d56d, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d56e, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d56f, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d570, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d571, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d572, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d573, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d574, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d575, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d576, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d577, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d578, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d579, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d57a, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d57b, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d57c, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d57d, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d57e, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d57f, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d580, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d581, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d582, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d583, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d584, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d585, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d586, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d587, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d588, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d589, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d58a, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d58b, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d58c, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d58d, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d58e, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d58f, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d590, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d591, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d592, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d593, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d594, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d595, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d596, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d597, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d598, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d599, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d59a, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d59b, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d59c, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d59d, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d59e, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d59f, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d5a0, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d5a1, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d5a2, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d5a3, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d5a4, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d5a5, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d5a6, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d5a7, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d5a8, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d5a9, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d5aa, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d5ab, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d5ac, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d5ad, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d5ae, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d5af, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d5b0, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d5b1, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d5b2, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d5b3, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d5b4, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d5b5, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d5b6, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d5b7, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d5b8, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d5b9, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d5ba, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d5bb, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d5bc, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d5bd, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d5be, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d5bf, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d5c0, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d5c1, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d5c2, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d5c3, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d5c4, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d5c5, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d5c6, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d5c7, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d5c8, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d5c9, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d5ca, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d5cb, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d5cc, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d5cd, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d5ce, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d5cf, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d5d0, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d5d1, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d5d2, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d5d3, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d5d4, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d5d5, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d5d6, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d5d7, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d5d8, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d5d9, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d5da, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d5db, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d5dc, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d5dd, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d5de, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d5df, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d5e0, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d5e1, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d5e2, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d5e3, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d5e4, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d5e5, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d5e6, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d5e7, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d5e8, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d5e9, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d5ea, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d5eb, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d5ec, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d5ed, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d5ee, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d5ef, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d5f0, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d5f1, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d5f2, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d5f3, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d5f4, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d5f5, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d5f6, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d5f7, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d5f8, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d5f9, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d5fa, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d5fb, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d5fc, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d5fd, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d5fe, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d5ff, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d600, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d601, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d602, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d603, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d604, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d605, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d606, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d607, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d608, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d609, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d60a, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d60b, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d60c, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d60d, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d60e, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d60f, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d610, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d611, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d612, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d613, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d614, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d615, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d616, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d617, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d618, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d619, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d61a, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d61b, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d61c, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d61d, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d61e, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d61f, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d620, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d621, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d622, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d623, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d624, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d625, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d626, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d627, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d628, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d629, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d62a, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d62b, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d62c, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d62d, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d62e, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d62f, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d630, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d631, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d632, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d633, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d634, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d635, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d636, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d637, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d638, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d639, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d63a, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d63b, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d63c, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d63d, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d63e, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d63f, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d640, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d641, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d642, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d643, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d644, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d645, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d646, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d647, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d648, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d649, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d64a, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d64b, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d64c, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d64d, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d64e, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d64f, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d650, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d651, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d652, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d653, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d654, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d655, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d656, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d657, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d658, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d659, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d65a, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d65b, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d65c, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d65d, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d65e, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d65f, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d660, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d661, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d662, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d663, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d664, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d665, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d666, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d667, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d668, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d669, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d66a, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d66b, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d66c, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d66d, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d66e, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d66f, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d670, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d671, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d672, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d673, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d674, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d675, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d676, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d677, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d678, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d679, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d67a, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d67b, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d67c, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d67d, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d67e, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d67f, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d680, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d681, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d682, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d683, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d684, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d685, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d686, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d687, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d688, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d689, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d68a, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d68b, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d68c, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d68d, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d68e, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d68f, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d690, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d691, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d692, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d693, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d694, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d695, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d696, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d697, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d698, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d699, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d69a, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d69b, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d69c, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d69d, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d69e, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d69f, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d6a0, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d6a1, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d6a2, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d6a3, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d6a4, 0, 0, 0, g(Yes, No, false, false, "", "ı")}, - {0x1d6a5, 0, 0, 0, g(Yes, No, false, false, "", "ȷ")}, - {0x1d6a6, 0, 0, 0, f(Yes, false, "")}, - {0x1d6a8, 0, 0, 0, g(Yes, No, false, false, "", "Α")}, - {0x1d6a9, 0, 0, 0, g(Yes, No, false, false, "", "Β")}, - {0x1d6aa, 0, 0, 0, g(Yes, No, false, false, "", "Γ")}, - {0x1d6ab, 0, 0, 0, g(Yes, No, false, false, "", "Δ")}, - {0x1d6ac, 0, 0, 0, g(Yes, No, false, false, "", "Ε")}, - {0x1d6ad, 0, 0, 0, g(Yes, No, false, false, "", "Ζ")}, - {0x1d6ae, 0, 0, 0, g(Yes, No, false, false, "", "Η")}, - {0x1d6af, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x1d6b0, 0, 0, 0, g(Yes, No, false, false, "", "Ι")}, - {0x1d6b1, 0, 0, 0, g(Yes, No, false, false, "", "Κ")}, - {0x1d6b2, 0, 0, 0, g(Yes, No, false, false, "", "Λ")}, - {0x1d6b3, 0, 0, 0, g(Yes, No, false, false, "", "Μ")}, - {0x1d6b4, 0, 0, 0, g(Yes, No, false, false, "", "Ν")}, - {0x1d6b5, 0, 0, 0, g(Yes, No, false, false, "", "Ξ")}, - {0x1d6b6, 0, 0, 0, g(Yes, No, false, false, "", "Ο")}, - {0x1d6b7, 0, 0, 0, g(Yes, No, false, false, "", "Π")}, - {0x1d6b8, 0, 0, 0, g(Yes, No, false, false, "", "Ρ")}, - {0x1d6b9, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x1d6ba, 0, 0, 0, g(Yes, No, false, false, "", "Σ")}, - {0x1d6bb, 0, 0, 0, g(Yes, No, false, false, "", "Τ")}, - {0x1d6bc, 0, 0, 0, g(Yes, No, false, false, "", "Υ")}, - {0x1d6bd, 0, 0, 0, g(Yes, No, false, false, "", "Φ")}, - {0x1d6be, 0, 0, 0, g(Yes, No, false, false, "", "Χ")}, - {0x1d6bf, 0, 0, 0, g(Yes, No, false, false, "", "Ψ")}, - {0x1d6c0, 0, 0, 0, g(Yes, No, false, false, "", "Ω")}, - {0x1d6c1, 0, 0, 0, g(Yes, No, false, false, "", "∇")}, - {0x1d6c2, 0, 0, 0, g(Yes, No, false, false, "", "α")}, - {0x1d6c3, 0, 0, 0, g(Yes, No, false, false, "", "β")}, - {0x1d6c4, 0, 0, 0, g(Yes, No, false, false, "", "γ")}, - {0x1d6c5, 0, 0, 0, g(Yes, No, false, false, "", "δ")}, - {0x1d6c6, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x1d6c7, 0, 0, 0, g(Yes, No, false, false, "", "ζ")}, - {0x1d6c8, 0, 0, 0, g(Yes, No, false, false, "", "η")}, - {0x1d6c9, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1d6ca, 0, 0, 0, g(Yes, No, false, false, "", "ι")}, - {0x1d6cb, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x1d6cc, 0, 0, 0, g(Yes, No, false, false, "", "λ")}, - {0x1d6cd, 0, 0, 0, g(Yes, No, false, false, "", "μ")}, - {0x1d6ce, 0, 0, 0, g(Yes, No, false, false, "", "ν")}, - {0x1d6cf, 0, 0, 0, g(Yes, No, false, false, "", "ξ")}, - {0x1d6d0, 0, 0, 0, g(Yes, No, false, false, "", "ο")}, - {0x1d6d1, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x1d6d2, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d6d3, 0, 0, 0, g(Yes, No, false, false, "", "ς")}, - {0x1d6d4, 0, 0, 0, g(Yes, No, false, false, "", "σ")}, - {0x1d6d5, 0, 0, 0, g(Yes, No, false, false, "", "τ")}, - {0x1d6d6, 0, 0, 0, g(Yes, No, false, false, "", "υ")}, - {0x1d6d7, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d6d8, 0, 0, 0, g(Yes, No, false, false, "", "χ")}, - {0x1d6d9, 0, 0, 0, g(Yes, No, false, false, "", "ψ")}, - {0x1d6da, 0, 0, 0, g(Yes, No, false, false, "", "ω")}, - {0x1d6db, 0, 0, 0, g(Yes, No, false, false, "", "∂")}, - {0x1d6dc, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x1d6dd, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1d6de, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x1d6df, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d6e0, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d6e1, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x1d6e2, 0, 0, 0, g(Yes, No, false, false, "", "Α")}, - {0x1d6e3, 0, 0, 0, g(Yes, No, false, false, "", "Β")}, - {0x1d6e4, 0, 0, 0, g(Yes, No, false, false, "", "Γ")}, - {0x1d6e5, 0, 0, 0, g(Yes, No, false, false, "", "Δ")}, - {0x1d6e6, 0, 0, 0, g(Yes, No, false, false, "", "Ε")}, - {0x1d6e7, 0, 0, 0, g(Yes, No, false, false, "", "Ζ")}, - {0x1d6e8, 0, 0, 0, g(Yes, No, false, false, "", "Η")}, - {0x1d6e9, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x1d6ea, 0, 0, 0, g(Yes, No, false, false, "", "Ι")}, - {0x1d6eb, 0, 0, 0, g(Yes, No, false, false, "", "Κ")}, - {0x1d6ec, 0, 0, 0, g(Yes, No, false, false, "", "Λ")}, - {0x1d6ed, 0, 0, 0, g(Yes, No, false, false, "", "Μ")}, - {0x1d6ee, 0, 0, 0, g(Yes, No, false, false, "", "Ν")}, - {0x1d6ef, 0, 0, 0, g(Yes, No, false, false, "", "Ξ")}, - {0x1d6f0, 0, 0, 0, g(Yes, No, false, false, "", "Ο")}, - {0x1d6f1, 0, 0, 0, g(Yes, No, false, false, "", "Π")}, - {0x1d6f2, 0, 0, 0, g(Yes, No, false, false, "", "Ρ")}, - {0x1d6f3, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x1d6f4, 0, 0, 0, g(Yes, No, false, false, "", "Σ")}, - {0x1d6f5, 0, 0, 0, g(Yes, No, false, false, "", "Τ")}, - {0x1d6f6, 0, 0, 0, g(Yes, No, false, false, "", "Υ")}, - {0x1d6f7, 0, 0, 0, g(Yes, No, false, false, "", "Φ")}, - {0x1d6f8, 0, 0, 0, g(Yes, No, false, false, "", "Χ")}, - {0x1d6f9, 0, 0, 0, g(Yes, No, false, false, "", "Ψ")}, - {0x1d6fa, 0, 0, 0, g(Yes, No, false, false, "", "Ω")}, - {0x1d6fb, 0, 0, 0, g(Yes, No, false, false, "", "∇")}, - {0x1d6fc, 0, 0, 0, g(Yes, No, false, false, "", "α")}, - {0x1d6fd, 0, 0, 0, g(Yes, No, false, false, "", "β")}, - {0x1d6fe, 0, 0, 0, g(Yes, No, false, false, "", "γ")}, - {0x1d6ff, 0, 0, 0, g(Yes, No, false, false, "", "δ")}, - {0x1d700, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x1d701, 0, 0, 0, g(Yes, No, false, false, "", "ζ")}, - {0x1d702, 0, 0, 0, g(Yes, No, false, false, "", "η")}, - {0x1d703, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1d704, 0, 0, 0, g(Yes, No, false, false, "", "ι")}, - {0x1d705, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x1d706, 0, 0, 0, g(Yes, No, false, false, "", "λ")}, - {0x1d707, 0, 0, 0, g(Yes, No, false, false, "", "μ")}, - {0x1d708, 0, 0, 0, g(Yes, No, false, false, "", "ν")}, - {0x1d709, 0, 0, 0, g(Yes, No, false, false, "", "ξ")}, - {0x1d70a, 0, 0, 0, g(Yes, No, false, false, "", "ο")}, - {0x1d70b, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x1d70c, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d70d, 0, 0, 0, g(Yes, No, false, false, "", "ς")}, - {0x1d70e, 0, 0, 0, g(Yes, No, false, false, "", "σ")}, - {0x1d70f, 0, 0, 0, g(Yes, No, false, false, "", "τ")}, - {0x1d710, 0, 0, 0, g(Yes, No, false, false, "", "υ")}, - {0x1d711, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d712, 0, 0, 0, g(Yes, No, false, false, "", "χ")}, - {0x1d713, 0, 0, 0, g(Yes, No, false, false, "", "ψ")}, - {0x1d714, 0, 0, 0, g(Yes, No, false, false, "", "ω")}, - {0x1d715, 0, 0, 0, g(Yes, No, false, false, "", "∂")}, - {0x1d716, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x1d717, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1d718, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x1d719, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d71a, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d71b, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x1d71c, 0, 0, 0, g(Yes, No, false, false, "", "Α")}, - {0x1d71d, 0, 0, 0, g(Yes, No, false, false, "", "Β")}, - {0x1d71e, 0, 0, 0, g(Yes, No, false, false, "", "Γ")}, - {0x1d71f, 0, 0, 0, g(Yes, No, false, false, "", "Δ")}, - {0x1d720, 0, 0, 0, g(Yes, No, false, false, "", "Ε")}, - {0x1d721, 0, 0, 0, g(Yes, No, false, false, "", "Ζ")}, - {0x1d722, 0, 0, 0, g(Yes, No, false, false, "", "Η")}, - {0x1d723, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x1d724, 0, 0, 0, g(Yes, No, false, false, "", "Ι")}, - {0x1d725, 0, 0, 0, g(Yes, No, false, false, "", "Κ")}, - {0x1d726, 0, 0, 0, g(Yes, No, false, false, "", "Λ")}, - {0x1d727, 0, 0, 0, g(Yes, No, false, false, "", "Μ")}, - {0x1d728, 0, 0, 0, g(Yes, No, false, false, "", "Ν")}, - {0x1d729, 0, 0, 0, g(Yes, No, false, false, "", "Ξ")}, - {0x1d72a, 0, 0, 0, g(Yes, No, false, false, "", "Ο")}, - {0x1d72b, 0, 0, 0, g(Yes, No, false, false, "", "Π")}, - {0x1d72c, 0, 0, 0, g(Yes, No, false, false, "", "Ρ")}, - {0x1d72d, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x1d72e, 0, 0, 0, g(Yes, No, false, false, "", "Σ")}, - {0x1d72f, 0, 0, 0, g(Yes, No, false, false, "", "Τ")}, - {0x1d730, 0, 0, 0, g(Yes, No, false, false, "", "Υ")}, - {0x1d731, 0, 0, 0, g(Yes, No, false, false, "", "Φ")}, - {0x1d732, 0, 0, 0, g(Yes, No, false, false, "", "Χ")}, - {0x1d733, 0, 0, 0, g(Yes, No, false, false, "", "Ψ")}, - {0x1d734, 0, 0, 0, g(Yes, No, false, false, "", "Ω")}, - {0x1d735, 0, 0, 0, g(Yes, No, false, false, "", "∇")}, - {0x1d736, 0, 0, 0, g(Yes, No, false, false, "", "α")}, - {0x1d737, 0, 0, 0, g(Yes, No, false, false, "", "β")}, - {0x1d738, 0, 0, 0, g(Yes, No, false, false, "", "γ")}, - {0x1d739, 0, 0, 0, g(Yes, No, false, false, "", "δ")}, - {0x1d73a, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x1d73b, 0, 0, 0, g(Yes, No, false, false, "", "ζ")}, - {0x1d73c, 0, 0, 0, g(Yes, No, false, false, "", "η")}, - {0x1d73d, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1d73e, 0, 0, 0, g(Yes, No, false, false, "", "ι")}, - {0x1d73f, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x1d740, 0, 0, 0, g(Yes, No, false, false, "", "λ")}, - {0x1d741, 0, 0, 0, g(Yes, No, false, false, "", "μ")}, - {0x1d742, 0, 0, 0, g(Yes, No, false, false, "", "ν")}, - {0x1d743, 0, 0, 0, g(Yes, No, false, false, "", "ξ")}, - {0x1d744, 0, 0, 0, g(Yes, No, false, false, "", "ο")}, - {0x1d745, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x1d746, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d747, 0, 0, 0, g(Yes, No, false, false, "", "ς")}, - {0x1d748, 0, 0, 0, g(Yes, No, false, false, "", "σ")}, - {0x1d749, 0, 0, 0, g(Yes, No, false, false, "", "τ")}, - {0x1d74a, 0, 0, 0, g(Yes, No, false, false, "", "υ")}, - {0x1d74b, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d74c, 0, 0, 0, g(Yes, No, false, false, "", "χ")}, - {0x1d74d, 0, 0, 0, g(Yes, No, false, false, "", "ψ")}, - {0x1d74e, 0, 0, 0, g(Yes, No, false, false, "", "ω")}, - {0x1d74f, 0, 0, 0, g(Yes, No, false, false, "", "∂")}, - {0x1d750, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x1d751, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1d752, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x1d753, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d754, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d755, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x1d756, 0, 0, 0, g(Yes, No, false, false, "", "Α")}, - {0x1d757, 0, 0, 0, g(Yes, No, false, false, "", "Β")}, - {0x1d758, 0, 0, 0, g(Yes, No, false, false, "", "Γ")}, - {0x1d759, 0, 0, 0, g(Yes, No, false, false, "", "Δ")}, - {0x1d75a, 0, 0, 0, g(Yes, No, false, false, "", "Ε")}, - {0x1d75b, 0, 0, 0, g(Yes, No, false, false, "", "Ζ")}, - {0x1d75c, 0, 0, 0, g(Yes, No, false, false, "", "Η")}, - {0x1d75d, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x1d75e, 0, 0, 0, g(Yes, No, false, false, "", "Ι")}, - {0x1d75f, 0, 0, 0, g(Yes, No, false, false, "", "Κ")}, - {0x1d760, 0, 0, 0, g(Yes, No, false, false, "", "Λ")}, - {0x1d761, 0, 0, 0, g(Yes, No, false, false, "", "Μ")}, - {0x1d762, 0, 0, 0, g(Yes, No, false, false, "", "Ν")}, - {0x1d763, 0, 0, 0, g(Yes, No, false, false, "", "Ξ")}, - {0x1d764, 0, 0, 0, g(Yes, No, false, false, "", "Ο")}, - {0x1d765, 0, 0, 0, g(Yes, No, false, false, "", "Π")}, - {0x1d766, 0, 0, 0, g(Yes, No, false, false, "", "Ρ")}, - {0x1d767, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x1d768, 0, 0, 0, g(Yes, No, false, false, "", "Σ")}, - {0x1d769, 0, 0, 0, g(Yes, No, false, false, "", "Τ")}, - {0x1d76a, 0, 0, 0, g(Yes, No, false, false, "", "Υ")}, - {0x1d76b, 0, 0, 0, g(Yes, No, false, false, "", "Φ")}, - {0x1d76c, 0, 0, 0, g(Yes, No, false, false, "", "Χ")}, - {0x1d76d, 0, 0, 0, g(Yes, No, false, false, "", "Ψ")}, - {0x1d76e, 0, 0, 0, g(Yes, No, false, false, "", "Ω")}, - {0x1d76f, 0, 0, 0, g(Yes, No, false, false, "", "∇")}, - {0x1d770, 0, 0, 0, g(Yes, No, false, false, "", "α")}, - {0x1d771, 0, 0, 0, g(Yes, No, false, false, "", "β")}, - {0x1d772, 0, 0, 0, g(Yes, No, false, false, "", "γ")}, - {0x1d773, 0, 0, 0, g(Yes, No, false, false, "", "δ")}, - {0x1d774, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x1d775, 0, 0, 0, g(Yes, No, false, false, "", "ζ")}, - {0x1d776, 0, 0, 0, g(Yes, No, false, false, "", "η")}, - {0x1d777, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1d778, 0, 0, 0, g(Yes, No, false, false, "", "ι")}, - {0x1d779, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x1d77a, 0, 0, 0, g(Yes, No, false, false, "", "λ")}, - {0x1d77b, 0, 0, 0, g(Yes, No, false, false, "", "μ")}, - {0x1d77c, 0, 0, 0, g(Yes, No, false, false, "", "ν")}, - {0x1d77d, 0, 0, 0, g(Yes, No, false, false, "", "ξ")}, - {0x1d77e, 0, 0, 0, g(Yes, No, false, false, "", "ο")}, - {0x1d77f, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x1d780, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d781, 0, 0, 0, g(Yes, No, false, false, "", "ς")}, - {0x1d782, 0, 0, 0, g(Yes, No, false, false, "", "σ")}, - {0x1d783, 0, 0, 0, g(Yes, No, false, false, "", "τ")}, - {0x1d784, 0, 0, 0, g(Yes, No, false, false, "", "υ")}, - {0x1d785, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d786, 0, 0, 0, g(Yes, No, false, false, "", "χ")}, - {0x1d787, 0, 0, 0, g(Yes, No, false, false, "", "ψ")}, - {0x1d788, 0, 0, 0, g(Yes, No, false, false, "", "ω")}, - {0x1d789, 0, 0, 0, g(Yes, No, false, false, "", "∂")}, - {0x1d78a, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x1d78b, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1d78c, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x1d78d, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d78e, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d78f, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x1d790, 0, 0, 0, g(Yes, No, false, false, "", "Α")}, - {0x1d791, 0, 0, 0, g(Yes, No, false, false, "", "Β")}, - {0x1d792, 0, 0, 0, g(Yes, No, false, false, "", "Γ")}, - {0x1d793, 0, 0, 0, g(Yes, No, false, false, "", "Δ")}, - {0x1d794, 0, 0, 0, g(Yes, No, false, false, "", "Ε")}, - {0x1d795, 0, 0, 0, g(Yes, No, false, false, "", "Ζ")}, - {0x1d796, 0, 0, 0, g(Yes, No, false, false, "", "Η")}, - {0x1d797, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x1d798, 0, 0, 0, g(Yes, No, false, false, "", "Ι")}, - {0x1d799, 0, 0, 0, g(Yes, No, false, false, "", "Κ")}, - {0x1d79a, 0, 0, 0, g(Yes, No, false, false, "", "Λ")}, - {0x1d79b, 0, 0, 0, g(Yes, No, false, false, "", "Μ")}, - {0x1d79c, 0, 0, 0, g(Yes, No, false, false, "", "Ν")}, - {0x1d79d, 0, 0, 0, g(Yes, No, false, false, "", "Ξ")}, - {0x1d79e, 0, 0, 0, g(Yes, No, false, false, "", "Ο")}, - {0x1d79f, 0, 0, 0, g(Yes, No, false, false, "", "Π")}, - {0x1d7a0, 0, 0, 0, g(Yes, No, false, false, "", "Ρ")}, - {0x1d7a1, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x1d7a2, 0, 0, 0, g(Yes, No, false, false, "", "Σ")}, - {0x1d7a3, 0, 0, 0, g(Yes, No, false, false, "", "Τ")}, - {0x1d7a4, 0, 0, 0, g(Yes, No, false, false, "", "Υ")}, - {0x1d7a5, 0, 0, 0, g(Yes, No, false, false, "", "Φ")}, - {0x1d7a6, 0, 0, 0, g(Yes, No, false, false, "", "Χ")}, - {0x1d7a7, 0, 0, 0, g(Yes, No, false, false, "", "Ψ")}, - {0x1d7a8, 0, 0, 0, g(Yes, No, false, false, "", "Ω")}, - {0x1d7a9, 0, 0, 0, g(Yes, No, false, false, "", "∇")}, - {0x1d7aa, 0, 0, 0, g(Yes, No, false, false, "", "α")}, - {0x1d7ab, 0, 0, 0, g(Yes, No, false, false, "", "β")}, - {0x1d7ac, 0, 0, 0, g(Yes, No, false, false, "", "γ")}, - {0x1d7ad, 0, 0, 0, g(Yes, No, false, false, "", "δ")}, - {0x1d7ae, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x1d7af, 0, 0, 0, g(Yes, No, false, false, "", "ζ")}, - {0x1d7b0, 0, 0, 0, g(Yes, No, false, false, "", "η")}, - {0x1d7b1, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1d7b2, 0, 0, 0, g(Yes, No, false, false, "", "ι")}, - {0x1d7b3, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x1d7b4, 0, 0, 0, g(Yes, No, false, false, "", "λ")}, - {0x1d7b5, 0, 0, 0, g(Yes, No, false, false, "", "μ")}, - {0x1d7b6, 0, 0, 0, g(Yes, No, false, false, "", "ν")}, - {0x1d7b7, 0, 0, 0, g(Yes, No, false, false, "", "ξ")}, - {0x1d7b8, 0, 0, 0, g(Yes, No, false, false, "", "ο")}, - {0x1d7b9, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x1d7ba, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d7bb, 0, 0, 0, g(Yes, No, false, false, "", "ς")}, - {0x1d7bc, 0, 0, 0, g(Yes, No, false, false, "", "σ")}, - {0x1d7bd, 0, 0, 0, g(Yes, No, false, false, "", "τ")}, - {0x1d7be, 0, 0, 0, g(Yes, No, false, false, "", "υ")}, - {0x1d7bf, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d7c0, 0, 0, 0, g(Yes, No, false, false, "", "χ")}, - {0x1d7c1, 0, 0, 0, g(Yes, No, false, false, "", "ψ")}, - {0x1d7c2, 0, 0, 0, g(Yes, No, false, false, "", "ω")}, - {0x1d7c3, 0, 0, 0, g(Yes, No, false, false, "", "∂")}, - {0x1d7c4, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x1d7c5, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1d7c6, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x1d7c7, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d7c8, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d7c9, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x1d7ca, 0, 0, 0, g(Yes, No, false, false, "", "Ϝ")}, - {0x1d7cb, 0, 0, 0, g(Yes, No, false, false, "", "ϝ")}, - {0x1d7cc, 0, 0, 0, f(Yes, false, "")}, - {0x1d7ce, 0, 0, 0, g(Yes, No, false, false, "", "0")}, - {0x1d7cf, 0, 0, 0, g(Yes, No, false, false, "", "1")}, - {0x1d7d0, 0, 0, 0, g(Yes, No, false, false, "", "2")}, - {0x1d7d1, 0, 0, 0, g(Yes, No, false, false, "", "3")}, - {0x1d7d2, 0, 0, 0, g(Yes, No, false, false, "", "4")}, - {0x1d7d3, 0, 0, 0, g(Yes, No, false, false, "", "5")}, - {0x1d7d4, 0, 0, 0, g(Yes, No, false, false, "", "6")}, - {0x1d7d5, 0, 0, 0, g(Yes, No, false, false, "", "7")}, - {0x1d7d6, 0, 0, 0, g(Yes, No, false, false, "", "8")}, - {0x1d7d7, 0, 0, 0, g(Yes, No, false, false, "", "9")}, - {0x1d7d8, 0, 0, 0, g(Yes, No, false, false, "", "0")}, - {0x1d7d9, 0, 0, 0, g(Yes, No, false, false, "", "1")}, - {0x1d7da, 0, 0, 0, g(Yes, No, false, false, "", "2")}, - {0x1d7db, 0, 0, 0, g(Yes, No, false, false, "", "3")}, - {0x1d7dc, 0, 0, 0, g(Yes, No, false, false, "", "4")}, - {0x1d7dd, 0, 0, 0, g(Yes, No, false, false, "", "5")}, - {0x1d7de, 0, 0, 0, g(Yes, No, false, false, "", "6")}, - {0x1d7df, 0, 0, 0, g(Yes, No, false, false, "", "7")}, - {0x1d7e0, 0, 0, 0, g(Yes, No, false, false, "", "8")}, - {0x1d7e1, 0, 0, 0, g(Yes, No, false, false, "", "9")}, - {0x1d7e2, 0, 0, 0, g(Yes, No, false, false, "", "0")}, - {0x1d7e3, 0, 0, 0, g(Yes, No, false, false, "", "1")}, - {0x1d7e4, 0, 0, 0, g(Yes, No, false, false, "", "2")}, - {0x1d7e5, 0, 0, 0, g(Yes, No, false, false, "", "3")}, - {0x1d7e6, 0, 0, 0, g(Yes, No, false, false, "", "4")}, - {0x1d7e7, 0, 0, 0, g(Yes, No, false, false, "", "5")}, - {0x1d7e8, 0, 0, 0, g(Yes, No, false, false, "", "6")}, - {0x1d7e9, 0, 0, 0, g(Yes, No, false, false, "", "7")}, - {0x1d7ea, 0, 0, 0, g(Yes, No, false, false, "", "8")}, - {0x1d7eb, 0, 0, 0, g(Yes, No, false, false, "", "9")}, - {0x1d7ec, 0, 0, 0, g(Yes, No, false, false, "", "0")}, - {0x1d7ed, 0, 0, 0, g(Yes, No, false, false, "", "1")}, - {0x1d7ee, 0, 0, 0, g(Yes, No, false, false, "", "2")}, - {0x1d7ef, 0, 0, 0, g(Yes, No, false, false, "", "3")}, - {0x1d7f0, 0, 0, 0, g(Yes, No, false, false, "", "4")}, - {0x1d7f1, 0, 0, 0, g(Yes, No, false, false, "", "5")}, - {0x1d7f2, 0, 0, 0, g(Yes, No, false, false, "", "6")}, - {0x1d7f3, 0, 0, 0, g(Yes, No, false, false, "", "7")}, - {0x1d7f4, 0, 0, 0, g(Yes, No, false, false, "", "8")}, - {0x1d7f5, 0, 0, 0, g(Yes, No, false, false, "", "9")}, - {0x1d7f6, 0, 0, 0, g(Yes, No, false, false, "", "0")}, - {0x1d7f7, 0, 0, 0, g(Yes, No, false, false, "", "1")}, - {0x1d7f8, 0, 0, 0, g(Yes, No, false, false, "", "2")}, - {0x1d7f9, 0, 0, 0, g(Yes, No, false, false, "", "3")}, - {0x1d7fa, 0, 0, 0, g(Yes, No, false, false, "", "4")}, - {0x1d7fb, 0, 0, 0, g(Yes, No, false, false, "", "5")}, - {0x1d7fc, 0, 0, 0, g(Yes, No, false, false, "", "6")}, - {0x1d7fd, 0, 0, 0, g(Yes, No, false, false, "", "7")}, - {0x1d7fe, 0, 0, 0, g(Yes, No, false, false, "", "8")}, - {0x1d7ff, 0, 0, 0, g(Yes, No, false, false, "", "9")}, - {0x1d800, 0, 0, 0, f(Yes, false, "")}, - {0x1e000, 230, 1, 1, f(Yes, false, "")}, - {0x1e007, 0, 0, 0, f(Yes, false, "")}, - {0x1e008, 230, 1, 1, f(Yes, false, "")}, - {0x1e019, 0, 0, 0, f(Yes, false, "")}, - {0x1e01b, 230, 1, 1, f(Yes, false, "")}, - {0x1e022, 0, 0, 0, f(Yes, false, "")}, - {0x1e023, 230, 1, 1, f(Yes, false, "")}, - {0x1e025, 0, 0, 0, f(Yes, false, "")}, - {0x1e026, 230, 1, 1, f(Yes, false, "")}, - {0x1e02b, 0, 0, 0, f(Yes, false, "")}, - {0x1e8d0, 220, 1, 1, f(Yes, false, "")}, - {0x1e8d7, 0, 0, 0, f(Yes, false, "")}, - {0x1e944, 230, 1, 1, f(Yes, false, "")}, - {0x1e94a, 7, 1, 1, f(Yes, false, "")}, - {0x1e94b, 0, 0, 0, f(Yes, false, "")}, - {0x1ee00, 0, 0, 0, g(Yes, No, false, false, "", "ا")}, - {0x1ee01, 0, 0, 0, g(Yes, No, false, false, "", "ب")}, - {0x1ee02, 0, 0, 0, g(Yes, No, false, false, "", "ج")}, - {0x1ee03, 0, 0, 0, g(Yes, No, false, false, "", "د")}, - {0x1ee04, 0, 0, 0, f(Yes, false, "")}, - {0x1ee05, 0, 0, 0, g(Yes, No, false, false, "", "و")}, - {0x1ee06, 0, 0, 0, g(Yes, No, false, false, "", "ز")}, - {0x1ee07, 0, 0, 0, g(Yes, No, false, false, "", "ح")}, - {0x1ee08, 0, 0, 0, g(Yes, No, false, false, "", "ط")}, - {0x1ee09, 0, 0, 0, g(Yes, No, false, false, "", "ي")}, - {0x1ee0a, 0, 0, 0, g(Yes, No, false, false, "", "ك")}, - {0x1ee0b, 0, 0, 0, g(Yes, No, false, false, "", "ل")}, - {0x1ee0c, 0, 0, 0, g(Yes, No, false, false, "", "م")}, - {0x1ee0d, 0, 0, 0, g(Yes, No, false, false, "", "ن")}, - {0x1ee0e, 0, 0, 0, g(Yes, No, false, false, "", "س")}, - {0x1ee0f, 0, 0, 0, g(Yes, No, false, false, "", "ع")}, - {0x1ee10, 0, 0, 0, g(Yes, No, false, false, "", "ف")}, - {0x1ee11, 0, 0, 0, g(Yes, No, false, false, "", "ص")}, - {0x1ee12, 0, 0, 0, g(Yes, No, false, false, "", "ق")}, - {0x1ee13, 0, 0, 0, g(Yes, No, false, false, "", "ر")}, - {0x1ee14, 0, 0, 0, g(Yes, No, false, false, "", "ش")}, - {0x1ee15, 0, 0, 0, g(Yes, No, false, false, "", "ت")}, - {0x1ee16, 0, 0, 0, g(Yes, No, false, false, "", "ث")}, - {0x1ee17, 0, 0, 0, g(Yes, No, false, false, "", "خ")}, - {0x1ee18, 0, 0, 0, g(Yes, No, false, false, "", "ذ")}, - {0x1ee19, 0, 0, 0, g(Yes, No, false, false, "", "ض")}, - {0x1ee1a, 0, 0, 0, g(Yes, No, false, false, "", "ظ")}, - {0x1ee1b, 0, 0, 0, g(Yes, No, false, false, "", "غ")}, - {0x1ee1c, 0, 0, 0, g(Yes, No, false, false, "", "ٮ")}, - {0x1ee1d, 0, 0, 0, g(Yes, No, false, false, "", "ں")}, - {0x1ee1e, 0, 0, 0, g(Yes, No, false, false, "", "ڡ")}, - {0x1ee1f, 0, 0, 0, g(Yes, No, false, false, "", "ٯ")}, - {0x1ee20, 0, 0, 0, f(Yes, false, "")}, - {0x1ee21, 0, 0, 0, g(Yes, No, false, false, "", "ب")}, - {0x1ee22, 0, 0, 0, g(Yes, No, false, false, "", "ج")}, - {0x1ee23, 0, 0, 0, f(Yes, false, "")}, - {0x1ee24, 0, 0, 0, g(Yes, No, false, false, "", "ه")}, - {0x1ee25, 0, 0, 0, f(Yes, false, "")}, - {0x1ee27, 0, 0, 0, g(Yes, No, false, false, "", "ح")}, - {0x1ee28, 0, 0, 0, f(Yes, false, "")}, - {0x1ee29, 0, 0, 0, g(Yes, No, false, false, "", "ي")}, - {0x1ee2a, 0, 0, 0, g(Yes, No, false, false, "", "ك")}, - {0x1ee2b, 0, 0, 0, g(Yes, No, false, false, "", "ل")}, - {0x1ee2c, 0, 0, 0, g(Yes, No, false, false, "", "م")}, - {0x1ee2d, 0, 0, 0, g(Yes, No, false, false, "", "ن")}, - {0x1ee2e, 0, 0, 0, g(Yes, No, false, false, "", "س")}, - {0x1ee2f, 0, 0, 0, g(Yes, No, false, false, "", "ع")}, - {0x1ee30, 0, 0, 0, g(Yes, No, false, false, "", "ف")}, - {0x1ee31, 0, 0, 0, g(Yes, No, false, false, "", "ص")}, - {0x1ee32, 0, 0, 0, g(Yes, No, false, false, "", "ق")}, - {0x1ee33, 0, 0, 0, f(Yes, false, "")}, - {0x1ee34, 0, 0, 0, g(Yes, No, false, false, "", "ش")}, - {0x1ee35, 0, 0, 0, g(Yes, No, false, false, "", "ت")}, - {0x1ee36, 0, 0, 0, g(Yes, No, false, false, "", "ث")}, - {0x1ee37, 0, 0, 0, g(Yes, No, false, false, "", "خ")}, - {0x1ee38, 0, 0, 0, f(Yes, false, "")}, - {0x1ee39, 0, 0, 0, g(Yes, No, false, false, "", "ض")}, - {0x1ee3a, 0, 0, 0, f(Yes, false, "")}, - {0x1ee3b, 0, 0, 0, g(Yes, No, false, false, "", "غ")}, - {0x1ee3c, 0, 0, 0, f(Yes, false, "")}, - {0x1ee42, 0, 0, 0, g(Yes, No, false, false, "", "ج")}, - {0x1ee43, 0, 0, 0, f(Yes, false, "")}, - {0x1ee47, 0, 0, 0, g(Yes, No, false, false, "", "ح")}, - {0x1ee48, 0, 0, 0, f(Yes, false, "")}, - {0x1ee49, 0, 0, 0, g(Yes, No, false, false, "", "ي")}, - {0x1ee4a, 0, 0, 0, f(Yes, false, "")}, - {0x1ee4b, 0, 0, 0, g(Yes, No, false, false, "", "ل")}, - {0x1ee4c, 0, 0, 0, f(Yes, false, "")}, - {0x1ee4d, 0, 0, 0, g(Yes, No, false, false, "", "ن")}, - {0x1ee4e, 0, 0, 0, g(Yes, No, false, false, "", "س")}, - {0x1ee4f, 0, 0, 0, g(Yes, No, false, false, "", "ع")}, - {0x1ee50, 0, 0, 0, f(Yes, false, "")}, - {0x1ee51, 0, 0, 0, g(Yes, No, false, false, "", "ص")}, - {0x1ee52, 0, 0, 0, g(Yes, No, false, false, "", "ق")}, - {0x1ee53, 0, 0, 0, f(Yes, false, "")}, - {0x1ee54, 0, 0, 0, g(Yes, No, false, false, "", "ش")}, - {0x1ee55, 0, 0, 0, f(Yes, false, "")}, - {0x1ee57, 0, 0, 0, g(Yes, No, false, false, "", "خ")}, - {0x1ee58, 0, 0, 0, f(Yes, false, "")}, - {0x1ee59, 0, 0, 0, g(Yes, No, false, false, "", "ض")}, - {0x1ee5a, 0, 0, 0, f(Yes, false, "")}, - {0x1ee5b, 0, 0, 0, g(Yes, No, false, false, "", "غ")}, - {0x1ee5c, 0, 0, 0, f(Yes, false, "")}, - {0x1ee5d, 0, 0, 0, g(Yes, No, false, false, "", "ں")}, - {0x1ee5e, 0, 0, 0, f(Yes, false, "")}, - {0x1ee5f, 0, 0, 0, g(Yes, No, false, false, "", "ٯ")}, - {0x1ee60, 0, 0, 0, f(Yes, false, "")}, - {0x1ee61, 0, 0, 0, g(Yes, No, false, false, "", "ب")}, - {0x1ee62, 0, 0, 0, g(Yes, No, false, false, "", "ج")}, - {0x1ee63, 0, 0, 0, f(Yes, false, "")}, - {0x1ee64, 0, 0, 0, g(Yes, No, false, false, "", "ه")}, - {0x1ee65, 0, 0, 0, f(Yes, false, "")}, - {0x1ee67, 0, 0, 0, g(Yes, No, false, false, "", "ح")}, - {0x1ee68, 0, 0, 0, g(Yes, No, false, false, "", "ط")}, - {0x1ee69, 0, 0, 0, g(Yes, No, false, false, "", "ي")}, - {0x1ee6a, 0, 0, 0, g(Yes, No, false, false, "", "ك")}, - {0x1ee6b, 0, 0, 0, f(Yes, false, "")}, - {0x1ee6c, 0, 0, 0, g(Yes, No, false, false, "", "م")}, - {0x1ee6d, 0, 0, 0, g(Yes, No, false, false, "", "ن")}, - {0x1ee6e, 0, 0, 0, g(Yes, No, false, false, "", "س")}, - {0x1ee6f, 0, 0, 0, g(Yes, No, false, false, "", "ع")}, - {0x1ee70, 0, 0, 0, g(Yes, No, false, false, "", "ف")}, - {0x1ee71, 0, 0, 0, g(Yes, No, false, false, "", "ص")}, - {0x1ee72, 0, 0, 0, g(Yes, No, false, false, "", "ق")}, - {0x1ee73, 0, 0, 0, f(Yes, false, "")}, - {0x1ee74, 0, 0, 0, g(Yes, No, false, false, "", "ش")}, - {0x1ee75, 0, 0, 0, g(Yes, No, false, false, "", "ت")}, - {0x1ee76, 0, 0, 0, g(Yes, No, false, false, "", "ث")}, - {0x1ee77, 0, 0, 0, g(Yes, No, false, false, "", "خ")}, - {0x1ee78, 0, 0, 0, f(Yes, false, "")}, - {0x1ee79, 0, 0, 0, g(Yes, No, false, false, "", "ض")}, - {0x1ee7a, 0, 0, 0, g(Yes, No, false, false, "", "ظ")}, - {0x1ee7b, 0, 0, 0, g(Yes, No, false, false, "", "غ")}, - {0x1ee7c, 0, 0, 0, g(Yes, No, false, false, "", "ٮ")}, - {0x1ee7d, 0, 0, 0, f(Yes, false, "")}, - {0x1ee7e, 0, 0, 0, g(Yes, No, false, false, "", "ڡ")}, - {0x1ee7f, 0, 0, 0, f(Yes, false, "")}, - {0x1ee80, 0, 0, 0, g(Yes, No, false, false, "", "ا")}, - {0x1ee81, 0, 0, 0, g(Yes, No, false, false, "", "ب")}, - {0x1ee82, 0, 0, 0, g(Yes, No, false, false, "", "ج")}, - {0x1ee83, 0, 0, 0, g(Yes, No, false, false, "", "د")}, - {0x1ee84, 0, 0, 0, g(Yes, No, false, false, "", "ه")}, - {0x1ee85, 0, 0, 0, g(Yes, No, false, false, "", "و")}, - {0x1ee86, 0, 0, 0, g(Yes, No, false, false, "", "ز")}, - {0x1ee87, 0, 0, 0, g(Yes, No, false, false, "", "ح")}, - {0x1ee88, 0, 0, 0, g(Yes, No, false, false, "", "ط")}, - {0x1ee89, 0, 0, 0, g(Yes, No, false, false, "", "ي")}, - {0x1ee8a, 0, 0, 0, f(Yes, false, "")}, - {0x1ee8b, 0, 0, 0, g(Yes, No, false, false, "", "ل")}, - {0x1ee8c, 0, 0, 0, g(Yes, No, false, false, "", "م")}, - {0x1ee8d, 0, 0, 0, g(Yes, No, false, false, "", "ن")}, - {0x1ee8e, 0, 0, 0, g(Yes, No, false, false, "", "س")}, - {0x1ee8f, 0, 0, 0, g(Yes, No, false, false, "", "ع")}, - {0x1ee90, 0, 0, 0, g(Yes, No, false, false, "", "ف")}, - {0x1ee91, 0, 0, 0, g(Yes, No, false, false, "", "ص")}, - {0x1ee92, 0, 0, 0, g(Yes, No, false, false, "", "ق")}, - {0x1ee93, 0, 0, 0, g(Yes, No, false, false, "", "ر")}, - {0x1ee94, 0, 0, 0, g(Yes, No, false, false, "", "ش")}, - {0x1ee95, 0, 0, 0, g(Yes, No, false, false, "", "ت")}, - {0x1ee96, 0, 0, 0, g(Yes, No, false, false, "", "ث")}, - {0x1ee97, 0, 0, 0, g(Yes, No, false, false, "", "خ")}, - {0x1ee98, 0, 0, 0, g(Yes, No, false, false, "", "ذ")}, - {0x1ee99, 0, 0, 0, g(Yes, No, false, false, "", "ض")}, - {0x1ee9a, 0, 0, 0, g(Yes, No, false, false, "", "ظ")}, - {0x1ee9b, 0, 0, 0, g(Yes, No, false, false, "", "غ")}, - {0x1ee9c, 0, 0, 0, f(Yes, false, "")}, - {0x1eea1, 0, 0, 0, g(Yes, No, false, false, "", "ب")}, - {0x1eea2, 0, 0, 0, g(Yes, No, false, false, "", "ج")}, - {0x1eea3, 0, 0, 0, g(Yes, No, false, false, "", "د")}, - {0x1eea4, 0, 0, 0, f(Yes, false, "")}, - {0x1eea5, 0, 0, 0, g(Yes, No, false, false, "", "و")}, - {0x1eea6, 0, 0, 0, g(Yes, No, false, false, "", "ز")}, - {0x1eea7, 0, 0, 0, g(Yes, No, false, false, "", "ح")}, - {0x1eea8, 0, 0, 0, g(Yes, No, false, false, "", "ط")}, - {0x1eea9, 0, 0, 0, g(Yes, No, false, false, "", "ي")}, - {0x1eeaa, 0, 0, 0, f(Yes, false, "")}, - {0x1eeab, 0, 0, 0, g(Yes, No, false, false, "", "ل")}, - {0x1eeac, 0, 0, 0, g(Yes, No, false, false, "", "م")}, - {0x1eead, 0, 0, 0, g(Yes, No, false, false, "", "ن")}, - {0x1eeae, 0, 0, 0, g(Yes, No, false, false, "", "س")}, - {0x1eeaf, 0, 0, 0, g(Yes, No, false, false, "", "ع")}, - {0x1eeb0, 0, 0, 0, g(Yes, No, false, false, "", "ف")}, - {0x1eeb1, 0, 0, 0, g(Yes, No, false, false, "", "ص")}, - {0x1eeb2, 0, 0, 0, g(Yes, No, false, false, "", "ق")}, - {0x1eeb3, 0, 0, 0, g(Yes, No, false, false, "", "ر")}, - {0x1eeb4, 0, 0, 0, g(Yes, No, false, false, "", "ش")}, - {0x1eeb5, 0, 0, 0, g(Yes, No, false, false, "", "ت")}, - {0x1eeb6, 0, 0, 0, g(Yes, No, false, false, "", "ث")}, - {0x1eeb7, 0, 0, 0, g(Yes, No, false, false, "", "خ")}, - {0x1eeb8, 0, 0, 0, g(Yes, No, false, false, "", "ذ")}, - {0x1eeb9, 0, 0, 0, g(Yes, No, false, false, "", "ض")}, - {0x1eeba, 0, 0, 0, g(Yes, No, false, false, "", "ظ")}, - {0x1eebb, 0, 0, 0, g(Yes, No, false, false, "", "غ")}, - {0x1eebc, 0, 0, 0, f(Yes, false, "")}, - {0x1f100, 0, 0, 0, g(Yes, No, false, false, "", "0.")}, - {0x1f101, 0, 0, 0, g(Yes, No, false, false, "", "0,")}, - {0x1f102, 0, 0, 0, g(Yes, No, false, false, "", "1,")}, - {0x1f103, 0, 0, 0, g(Yes, No, false, false, "", "2,")}, - {0x1f104, 0, 0, 0, g(Yes, No, false, false, "", "3,")}, - {0x1f105, 0, 0, 0, g(Yes, No, false, false, "", "4,")}, - {0x1f106, 0, 0, 0, g(Yes, No, false, false, "", "5,")}, - {0x1f107, 0, 0, 0, g(Yes, No, false, false, "", "6,")}, - {0x1f108, 0, 0, 0, g(Yes, No, false, false, "", "7,")}, - {0x1f109, 0, 0, 0, g(Yes, No, false, false, "", "8,")}, - {0x1f10a, 0, 0, 0, g(Yes, No, false, false, "", "9,")}, - {0x1f10b, 0, 0, 0, f(Yes, false, "")}, - {0x1f110, 0, 0, 0, g(Yes, No, false, false, "", "(A)")}, - {0x1f111, 0, 0, 0, g(Yes, No, false, false, "", "(B)")}, - {0x1f112, 0, 0, 0, g(Yes, No, false, false, "", "(C)")}, - {0x1f113, 0, 0, 0, g(Yes, No, false, false, "", "(D)")}, - {0x1f114, 0, 0, 0, g(Yes, No, false, false, "", "(E)")}, - {0x1f115, 0, 0, 0, g(Yes, No, false, false, "", "(F)")}, - {0x1f116, 0, 0, 0, g(Yes, No, false, false, "", "(G)")}, - {0x1f117, 0, 0, 0, g(Yes, No, false, false, "", "(H)")}, - {0x1f118, 0, 0, 0, g(Yes, No, false, false, "", "(I)")}, - {0x1f119, 0, 0, 0, g(Yes, No, false, false, "", "(J)")}, - {0x1f11a, 0, 0, 0, g(Yes, No, false, false, "", "(K)")}, - {0x1f11b, 0, 0, 0, g(Yes, No, false, false, "", "(L)")}, - {0x1f11c, 0, 0, 0, g(Yes, No, false, false, "", "(M)")}, - {0x1f11d, 0, 0, 0, g(Yes, No, false, false, "", "(N)")}, - {0x1f11e, 0, 0, 0, g(Yes, No, false, false, "", "(O)")}, - {0x1f11f, 0, 0, 0, g(Yes, No, false, false, "", "(P)")}, - {0x1f120, 0, 0, 0, g(Yes, No, false, false, "", "(Q)")}, - {0x1f121, 0, 0, 0, g(Yes, No, false, false, "", "(R)")}, - {0x1f122, 0, 0, 0, g(Yes, No, false, false, "", "(S)")}, - {0x1f123, 0, 0, 0, g(Yes, No, false, false, "", "(T)")}, - {0x1f124, 0, 0, 0, g(Yes, No, false, false, "", "(U)")}, - {0x1f125, 0, 0, 0, g(Yes, No, false, false, "", "(V)")}, - {0x1f126, 0, 0, 0, g(Yes, No, false, false, "", "(W)")}, - {0x1f127, 0, 0, 0, g(Yes, No, false, false, "", "(X)")}, - {0x1f128, 0, 0, 0, g(Yes, No, false, false, "", "(Y)")}, - {0x1f129, 0, 0, 0, g(Yes, No, false, false, "", "(Z)")}, - {0x1f12a, 0, 0, 0, g(Yes, No, false, false, "", "〔S〕")}, - {0x1f12b, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1f12c, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1f12d, 0, 0, 0, g(Yes, No, false, false, "", "CD")}, - {0x1f12e, 0, 0, 0, g(Yes, No, false, false, "", "WZ")}, - {0x1f12f, 0, 0, 0, f(Yes, false, "")}, - {0x1f130, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1f131, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1f132, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1f133, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1f134, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1f135, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1f136, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1f137, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1f138, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1f139, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1f13a, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1f13b, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1f13c, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1f13d, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1f13e, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1f13f, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1f140, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1f141, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1f142, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1f143, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1f144, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1f145, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1f146, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1f147, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1f148, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1f149, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1f14a, 0, 0, 0, g(Yes, No, false, false, "", "HV")}, - {0x1f14b, 0, 0, 0, g(Yes, No, false, false, "", "MV")}, - {0x1f14c, 0, 0, 0, g(Yes, No, false, false, "", "SD")}, - {0x1f14d, 0, 0, 0, g(Yes, No, false, false, "", "SS")}, - {0x1f14e, 0, 0, 0, g(Yes, No, false, false, "", "PPV")}, - {0x1f14f, 0, 0, 0, g(Yes, No, false, false, "", "WC")}, - {0x1f150, 0, 0, 0, f(Yes, false, "")}, - {0x1f16a, 0, 0, 0, g(Yes, No, false, false, "", "MC")}, - {0x1f16b, 0, 0, 0, g(Yes, No, false, false, "", "MD")}, - {0x1f16c, 0, 0, 0, f(Yes, false, "")}, - {0x1f190, 0, 0, 0, g(Yes, No, false, false, "", "DJ")}, - {0x1f191, 0, 0, 0, f(Yes, false, "")}, - {0x1f200, 0, 0, 0, g(Yes, No, false, false, "", "ほか")}, - {0x1f201, 0, 0, 0, g(Yes, No, false, false, "", "ココ")}, - {0x1f202, 0, 0, 0, g(Yes, No, false, false, "", "サ")}, - {0x1f203, 0, 0, 0, f(Yes, false, "")}, - {0x1f210, 0, 0, 0, g(Yes, No, false, false, "", "手")}, - {0x1f211, 0, 0, 0, g(Yes, No, false, false, "", "字")}, - {0x1f212, 0, 0, 0, g(Yes, No, false, false, "", "双")}, - {0x1f213, 0, 0, 1, g(Yes, No, false, false, "", "デ")}, - {0x1f214, 0, 0, 0, g(Yes, No, false, false, "", "二")}, - {0x1f215, 0, 0, 0, g(Yes, No, false, false, "", "多")}, - {0x1f216, 0, 0, 0, g(Yes, No, false, false, "", "解")}, - {0x1f217, 0, 0, 0, g(Yes, No, false, false, "", "天")}, - {0x1f218, 0, 0, 0, g(Yes, No, false, false, "", "交")}, - {0x1f219, 0, 0, 0, g(Yes, No, false, false, "", "映")}, - {0x1f21a, 0, 0, 0, g(Yes, No, false, false, "", "無")}, - {0x1f21b, 0, 0, 0, g(Yes, No, false, false, "", "料")}, - {0x1f21c, 0, 0, 0, g(Yes, No, false, false, "", "前")}, - {0x1f21d, 0, 0, 0, g(Yes, No, false, false, "", "後")}, - {0x1f21e, 0, 0, 0, g(Yes, No, false, false, "", "再")}, - {0x1f21f, 0, 0, 0, g(Yes, No, false, false, "", "新")}, - {0x1f220, 0, 0, 0, g(Yes, No, false, false, "", "初")}, - {0x1f221, 0, 0, 0, g(Yes, No, false, false, "", "終")}, - {0x1f222, 0, 0, 0, g(Yes, No, false, false, "", "生")}, - {0x1f223, 0, 0, 0, g(Yes, No, false, false, "", "販")}, - {0x1f224, 0, 0, 0, g(Yes, No, false, false, "", "声")}, - {0x1f225, 0, 0, 0, g(Yes, No, false, false, "", "吹")}, - {0x1f226, 0, 0, 0, g(Yes, No, false, false, "", "演")}, - {0x1f227, 0, 0, 0, g(Yes, No, false, false, "", "投")}, - {0x1f228, 0, 0, 0, g(Yes, No, false, false, "", "捕")}, - {0x1f229, 0, 0, 0, g(Yes, No, false, false, "", "一")}, - {0x1f22a, 0, 0, 0, g(Yes, No, false, false, "", "三")}, - {0x1f22b, 0, 0, 0, g(Yes, No, false, false, "", "遊")}, - {0x1f22c, 0, 0, 0, g(Yes, No, false, false, "", "左")}, - {0x1f22d, 0, 0, 0, g(Yes, No, false, false, "", "中")}, - {0x1f22e, 0, 0, 0, g(Yes, No, false, false, "", "右")}, - {0x1f22f, 0, 0, 0, g(Yes, No, false, false, "", "指")}, - {0x1f230, 0, 0, 0, g(Yes, No, false, false, "", "走")}, - {0x1f231, 0, 0, 0, g(Yes, No, false, false, "", "打")}, - {0x1f232, 0, 0, 0, g(Yes, No, false, false, "", "禁")}, - {0x1f233, 0, 0, 0, g(Yes, No, false, false, "", "空")}, - {0x1f234, 0, 0, 0, g(Yes, No, false, false, "", "合")}, - {0x1f235, 0, 0, 0, g(Yes, No, false, false, "", "満")}, - {0x1f236, 0, 0, 0, g(Yes, No, false, false, "", "有")}, - {0x1f237, 0, 0, 0, g(Yes, No, false, false, "", "月")}, - {0x1f238, 0, 0, 0, g(Yes, No, false, false, "", "申")}, - {0x1f239, 0, 0, 0, g(Yes, No, false, false, "", "割")}, - {0x1f23a, 0, 0, 0, g(Yes, No, false, false, "", "営")}, - {0x1f23b, 0, 0, 0, g(Yes, No, false, false, "", "配")}, - {0x1f23c, 0, 0, 0, f(Yes, false, "")}, - {0x1f240, 0, 0, 0, g(Yes, No, false, false, "", "〔本〕")}, - {0x1f241, 0, 0, 0, g(Yes, No, false, false, "", "〔三〕")}, - {0x1f242, 0, 0, 0, g(Yes, No, false, false, "", "〔二〕")}, - {0x1f243, 0, 0, 0, g(Yes, No, false, false, "", "〔安〕")}, - {0x1f244, 0, 0, 0, g(Yes, No, false, false, "", "〔点〕")}, - {0x1f245, 0, 0, 0, g(Yes, No, false, false, "", "〔打〕")}, - {0x1f246, 0, 0, 0, g(Yes, No, false, false, "", "〔盗〕")}, - {0x1f247, 0, 0, 0, g(Yes, No, false, false, "", "〔勝〕")}, - {0x1f248, 0, 0, 0, g(Yes, No, false, false, "", "〔敗〕")}, - {0x1f249, 0, 0, 0, f(Yes, false, "")}, - {0x1f250, 0, 0, 0, g(Yes, No, false, false, "", "得")}, - {0x1f251, 0, 0, 0, g(Yes, No, false, false, "", "可")}, - {0x1f252, 0, 0, 0, f(Yes, false, "")}, - {0x2f800, 0, 0, 0, f(No, false, "丽")}, - {0x2f801, 0, 0, 0, f(No, false, "丸")}, - {0x2f802, 0, 0, 0, f(No, false, "乁")}, - {0x2f803, 0, 0, 0, f(No, false, "𠄢")}, - {0x2f804, 0, 0, 0, f(No, false, "你")}, - {0x2f805, 0, 0, 0, f(No, false, "侮")}, - {0x2f806, 0, 0, 0, f(No, false, "侻")}, - {0x2f807, 0, 0, 0, f(No, false, "倂")}, - {0x2f808, 0, 0, 0, f(No, false, "偺")}, - {0x2f809, 0, 0, 0, f(No, false, "備")}, - {0x2f80a, 0, 0, 0, f(No, false, "僧")}, - {0x2f80b, 0, 0, 0, f(No, false, "像")}, - {0x2f80c, 0, 0, 0, f(No, false, "㒞")}, - {0x2f80d, 0, 0, 0, f(No, false, "𠘺")}, - {0x2f80e, 0, 0, 0, f(No, false, "免")}, - {0x2f80f, 0, 0, 0, f(No, false, "兔")}, - {0x2f810, 0, 0, 0, f(No, false, "兤")}, - {0x2f811, 0, 0, 0, f(No, false, "具")}, - {0x2f812, 0, 0, 0, f(No, false, "𠔜")}, - {0x2f813, 0, 0, 0, f(No, false, "㒹")}, - {0x2f814, 0, 0, 0, f(No, false, "內")}, - {0x2f815, 0, 0, 0, f(No, false, "再")}, - {0x2f816, 0, 0, 0, f(No, false, "𠕋")}, - {0x2f817, 0, 0, 0, f(No, false, "冗")}, - {0x2f818, 0, 0, 0, f(No, false, "冤")}, - {0x2f819, 0, 0, 0, f(No, false, "仌")}, - {0x2f81a, 0, 0, 0, f(No, false, "冬")}, - {0x2f81b, 0, 0, 0, f(No, false, "况")}, - {0x2f81c, 0, 0, 0, f(No, false, "𩇟")}, - {0x2f81d, 0, 0, 0, f(No, false, "凵")}, - {0x2f81e, 0, 0, 0, f(No, false, "刃")}, - {0x2f81f, 0, 0, 0, f(No, false, "㓟")}, - {0x2f820, 0, 0, 0, f(No, false, "刻")}, - {0x2f821, 0, 0, 0, f(No, false, "剆")}, - {0x2f822, 0, 0, 0, f(No, false, "割")}, - {0x2f823, 0, 0, 0, f(No, false, "剷")}, - {0x2f824, 0, 0, 0, f(No, false, "㔕")}, - {0x2f825, 0, 0, 0, f(No, false, "勇")}, - {0x2f826, 0, 0, 0, f(No, false, "勉")}, - {0x2f827, 0, 0, 0, f(No, false, "勤")}, - {0x2f828, 0, 0, 0, f(No, false, "勺")}, - {0x2f829, 0, 0, 0, f(No, false, "包")}, - {0x2f82a, 0, 0, 0, f(No, false, "匆")}, - {0x2f82b, 0, 0, 0, f(No, false, "北")}, - {0x2f82c, 0, 0, 0, f(No, false, "卉")}, - {0x2f82d, 0, 0, 0, f(No, false, "卑")}, - {0x2f82e, 0, 0, 0, f(No, false, "博")}, - {0x2f82f, 0, 0, 0, f(No, false, "即")}, - {0x2f830, 0, 0, 0, f(No, false, "卽")}, - {0x2f831, 0, 0, 0, f(No, false, "卿")}, - {0x2f834, 0, 0, 0, f(No, false, "𠨬")}, - {0x2f835, 0, 0, 0, f(No, false, "灰")}, - {0x2f836, 0, 0, 0, f(No, false, "及")}, - {0x2f837, 0, 0, 0, f(No, false, "叟")}, - {0x2f838, 0, 0, 0, f(No, false, "𠭣")}, - {0x2f839, 0, 0, 0, f(No, false, "叫")}, - {0x2f83a, 0, 0, 0, f(No, false, "叱")}, - {0x2f83b, 0, 0, 0, f(No, false, "吆")}, - {0x2f83c, 0, 0, 0, f(No, false, "咞")}, - {0x2f83d, 0, 0, 0, f(No, false, "吸")}, - {0x2f83e, 0, 0, 0, f(No, false, "呈")}, - {0x2f83f, 0, 0, 0, f(No, false, "周")}, - {0x2f840, 0, 0, 0, f(No, false, "咢")}, - {0x2f841, 0, 0, 0, f(No, false, "哶")}, - {0x2f842, 0, 0, 0, f(No, false, "唐")}, - {0x2f843, 0, 0, 0, f(No, false, "啓")}, - {0x2f844, 0, 0, 0, f(No, false, "啣")}, - {0x2f845, 0, 0, 0, f(No, false, "善")}, - {0x2f847, 0, 0, 0, f(No, false, "喙")}, - {0x2f848, 0, 0, 0, f(No, false, "喫")}, - {0x2f849, 0, 0, 0, f(No, false, "喳")}, - {0x2f84a, 0, 0, 0, f(No, false, "嗂")}, - {0x2f84b, 0, 0, 0, f(No, false, "圖")}, - {0x2f84c, 0, 0, 0, f(No, false, "嘆")}, - {0x2f84d, 0, 0, 0, f(No, false, "圗")}, - {0x2f84e, 0, 0, 0, f(No, false, "噑")}, - {0x2f84f, 0, 0, 0, f(No, false, "噴")}, - {0x2f850, 0, 0, 0, f(No, false, "切")}, - {0x2f851, 0, 0, 0, f(No, false, "壮")}, - {0x2f852, 0, 0, 0, f(No, false, "城")}, - {0x2f853, 0, 0, 0, f(No, false, "埴")}, - {0x2f854, 0, 0, 0, f(No, false, "堍")}, - {0x2f855, 0, 0, 0, f(No, false, "型")}, - {0x2f856, 0, 0, 0, f(No, false, "堲")}, - {0x2f857, 0, 0, 0, f(No, false, "報")}, - {0x2f858, 0, 0, 0, f(No, false, "墬")}, - {0x2f859, 0, 0, 0, f(No, false, "𡓤")}, - {0x2f85a, 0, 0, 0, f(No, false, "売")}, - {0x2f85b, 0, 0, 0, f(No, false, "壷")}, - {0x2f85c, 0, 0, 0, f(No, false, "夆")}, - {0x2f85d, 0, 0, 0, f(No, false, "多")}, - {0x2f85e, 0, 0, 0, f(No, false, "夢")}, - {0x2f85f, 0, 0, 0, f(No, false, "奢")}, - {0x2f860, 0, 0, 0, f(No, false, "𡚨")}, - {0x2f861, 0, 0, 0, f(No, false, "𡛪")}, - {0x2f862, 0, 0, 0, f(No, false, "姬")}, - {0x2f863, 0, 0, 0, f(No, false, "娛")}, - {0x2f864, 0, 0, 0, f(No, false, "娧")}, - {0x2f865, 0, 0, 0, f(No, false, "姘")}, - {0x2f866, 0, 0, 0, f(No, false, "婦")}, - {0x2f867, 0, 0, 0, f(No, false, "㛮")}, - {0x2f868, 0, 0, 0, f(No, false, "㛼")}, - {0x2f869, 0, 0, 0, f(No, false, "嬈")}, - {0x2f86a, 0, 0, 0, f(No, false, "嬾")}, - {0x2f86c, 0, 0, 0, f(No, false, "𡧈")}, - {0x2f86d, 0, 0, 0, f(No, false, "寃")}, - {0x2f86e, 0, 0, 0, f(No, false, "寘")}, - {0x2f86f, 0, 0, 0, f(No, false, "寧")}, - {0x2f870, 0, 0, 0, f(No, false, "寳")}, - {0x2f871, 0, 0, 0, f(No, false, "𡬘")}, - {0x2f872, 0, 0, 0, f(No, false, "寿")}, - {0x2f873, 0, 0, 0, f(No, false, "将")}, - {0x2f874, 0, 0, 0, f(No, false, "当")}, - {0x2f875, 0, 0, 0, f(No, false, "尢")}, - {0x2f876, 0, 0, 0, f(No, false, "㞁")}, - {0x2f877, 0, 0, 0, f(No, false, "屠")}, - {0x2f878, 0, 0, 0, f(No, false, "屮")}, - {0x2f879, 0, 0, 0, f(No, false, "峀")}, - {0x2f87a, 0, 0, 0, f(No, false, "岍")}, - {0x2f87b, 0, 0, 0, f(No, false, "𡷤")}, - {0x2f87c, 0, 0, 0, f(No, false, "嵃")}, - {0x2f87d, 0, 0, 0, f(No, false, "𡷦")}, - {0x2f87e, 0, 0, 0, f(No, false, "嵮")}, - {0x2f87f, 0, 0, 0, f(No, false, "嵫")}, - {0x2f880, 0, 0, 0, f(No, false, "嵼")}, - {0x2f881, 0, 0, 0, f(No, false, "巡")}, - {0x2f882, 0, 0, 0, f(No, false, "巢")}, - {0x2f883, 0, 0, 0, f(No, false, "㠯")}, - {0x2f884, 0, 0, 0, f(No, false, "巽")}, - {0x2f885, 0, 0, 0, f(No, false, "帨")}, - {0x2f886, 0, 0, 0, f(No, false, "帽")}, - {0x2f887, 0, 0, 0, f(No, false, "幩")}, - {0x2f888, 0, 0, 0, f(No, false, "㡢")}, - {0x2f889, 0, 0, 0, f(No, false, "𢆃")}, - {0x2f88a, 0, 0, 0, f(No, false, "㡼")}, - {0x2f88b, 0, 0, 0, f(No, false, "庰")}, - {0x2f88c, 0, 0, 0, f(No, false, "庳")}, - {0x2f88d, 0, 0, 0, f(No, false, "庶")}, - {0x2f88e, 0, 0, 0, f(No, false, "廊")}, - {0x2f88f, 0, 0, 0, f(No, false, "𪎒")}, - {0x2f890, 0, 0, 0, f(No, false, "廾")}, - {0x2f891, 0, 0, 0, f(No, false, "𢌱")}, - {0x2f893, 0, 0, 0, f(No, false, "舁")}, - {0x2f894, 0, 0, 0, f(No, false, "弢")}, - {0x2f896, 0, 0, 0, f(No, false, "㣇")}, - {0x2f897, 0, 0, 0, f(No, false, "𣊸")}, - {0x2f898, 0, 0, 0, f(No, false, "𦇚")}, - {0x2f899, 0, 0, 0, f(No, false, "形")}, - {0x2f89a, 0, 0, 0, f(No, false, "彫")}, - {0x2f89b, 0, 0, 0, f(No, false, "㣣")}, - {0x2f89c, 0, 0, 0, f(No, false, "徚")}, - {0x2f89d, 0, 0, 0, f(No, false, "忍")}, - {0x2f89e, 0, 0, 0, f(No, false, "志")}, - {0x2f89f, 0, 0, 0, f(No, false, "忹")}, - {0x2f8a0, 0, 0, 0, f(No, false, "悁")}, - {0x2f8a1, 0, 0, 0, f(No, false, "㤺")}, - {0x2f8a2, 0, 0, 0, f(No, false, "㤜")}, - {0x2f8a3, 0, 0, 0, f(No, false, "悔")}, - {0x2f8a4, 0, 0, 0, f(No, false, "𢛔")}, - {0x2f8a5, 0, 0, 0, f(No, false, "惇")}, - {0x2f8a6, 0, 0, 0, f(No, false, "慈")}, - {0x2f8a7, 0, 0, 0, f(No, false, "慌")}, - {0x2f8a8, 0, 0, 0, f(No, false, "慎")}, - {0x2f8a9, 0, 0, 0, f(No, false, "慌")}, - {0x2f8aa, 0, 0, 0, f(No, false, "慺")}, - {0x2f8ab, 0, 0, 0, f(No, false, "憎")}, - {0x2f8ac, 0, 0, 0, f(No, false, "憲")}, - {0x2f8ad, 0, 0, 0, f(No, false, "憤")}, - {0x2f8ae, 0, 0, 0, f(No, false, "憯")}, - {0x2f8af, 0, 0, 0, f(No, false, "懞")}, - {0x2f8b0, 0, 0, 0, f(No, false, "懲")}, - {0x2f8b1, 0, 0, 0, f(No, false, "懶")}, - {0x2f8b2, 0, 0, 0, f(No, false, "成")}, - {0x2f8b3, 0, 0, 0, f(No, false, "戛")}, - {0x2f8b4, 0, 0, 0, f(No, false, "扝")}, - {0x2f8b5, 0, 0, 0, f(No, false, "抱")}, - {0x2f8b6, 0, 0, 0, f(No, false, "拔")}, - {0x2f8b7, 0, 0, 0, f(No, false, "捐")}, - {0x2f8b8, 0, 0, 0, f(No, false, "𢬌")}, - {0x2f8b9, 0, 0, 0, f(No, false, "挽")}, - {0x2f8ba, 0, 0, 0, f(No, false, "拼")}, - {0x2f8bb, 0, 0, 0, f(No, false, "捨")}, - {0x2f8bc, 0, 0, 0, f(No, false, "掃")}, - {0x2f8bd, 0, 0, 0, f(No, false, "揤")}, - {0x2f8be, 0, 0, 0, f(No, false, "𢯱")}, - {0x2f8bf, 0, 0, 0, f(No, false, "搢")}, - {0x2f8c0, 0, 0, 0, f(No, false, "揅")}, - {0x2f8c1, 0, 0, 0, f(No, false, "掩")}, - {0x2f8c2, 0, 0, 0, f(No, false, "㨮")}, - {0x2f8c3, 0, 0, 0, f(No, false, "摩")}, - {0x2f8c4, 0, 0, 0, f(No, false, "摾")}, - {0x2f8c5, 0, 0, 0, f(No, false, "撝")}, - {0x2f8c6, 0, 0, 0, f(No, false, "摷")}, - {0x2f8c7, 0, 0, 0, f(No, false, "㩬")}, - {0x2f8c8, 0, 0, 0, f(No, false, "敏")}, - {0x2f8c9, 0, 0, 0, f(No, false, "敬")}, - {0x2f8ca, 0, 0, 0, f(No, false, "𣀊")}, - {0x2f8cb, 0, 0, 0, f(No, false, "旣")}, - {0x2f8cc, 0, 0, 0, f(No, false, "書")}, - {0x2f8cd, 0, 0, 0, f(No, false, "晉")}, - {0x2f8ce, 0, 0, 0, f(No, false, "㬙")}, - {0x2f8cf, 0, 0, 0, f(No, false, "暑")}, - {0x2f8d0, 0, 0, 0, f(No, false, "㬈")}, - {0x2f8d1, 0, 0, 0, f(No, false, "㫤")}, - {0x2f8d2, 0, 0, 0, f(No, false, "冒")}, - {0x2f8d3, 0, 0, 0, f(No, false, "冕")}, - {0x2f8d4, 0, 0, 0, f(No, false, "最")}, - {0x2f8d5, 0, 0, 0, f(No, false, "暜")}, - {0x2f8d6, 0, 0, 0, f(No, false, "肭")}, - {0x2f8d7, 0, 0, 0, f(No, false, "䏙")}, - {0x2f8d8, 0, 0, 0, f(No, false, "朗")}, - {0x2f8d9, 0, 0, 0, f(No, false, "望")}, - {0x2f8da, 0, 0, 0, f(No, false, "朡")}, - {0x2f8db, 0, 0, 0, f(No, false, "杞")}, - {0x2f8dc, 0, 0, 0, f(No, false, "杓")}, - {0x2f8dd, 0, 0, 0, f(No, false, "𣏃")}, - {0x2f8de, 0, 0, 0, f(No, false, "㭉")}, - {0x2f8df, 0, 0, 0, f(No, false, "柺")}, - {0x2f8e0, 0, 0, 0, f(No, false, "枅")}, - {0x2f8e1, 0, 0, 0, f(No, false, "桒")}, - {0x2f8e2, 0, 0, 0, f(No, false, "梅")}, - {0x2f8e3, 0, 0, 0, f(No, false, "𣑭")}, - {0x2f8e4, 0, 0, 0, f(No, false, "梎")}, - {0x2f8e5, 0, 0, 0, f(No, false, "栟")}, - {0x2f8e6, 0, 0, 0, f(No, false, "椔")}, - {0x2f8e7, 0, 0, 0, f(No, false, "㮝")}, - {0x2f8e8, 0, 0, 0, f(No, false, "楂")}, - {0x2f8e9, 0, 0, 0, f(No, false, "榣")}, - {0x2f8ea, 0, 0, 0, f(No, false, "槪")}, - {0x2f8eb, 0, 0, 0, f(No, false, "檨")}, - {0x2f8ec, 0, 0, 0, f(No, false, "𣚣")}, - {0x2f8ed, 0, 0, 0, f(No, false, "櫛")}, - {0x2f8ee, 0, 0, 0, f(No, false, "㰘")}, - {0x2f8ef, 0, 0, 0, f(No, false, "次")}, - {0x2f8f0, 0, 0, 0, f(No, false, "𣢧")}, - {0x2f8f1, 0, 0, 0, f(No, false, "歔")}, - {0x2f8f2, 0, 0, 0, f(No, false, "㱎")}, - {0x2f8f3, 0, 0, 0, f(No, false, "歲")}, - {0x2f8f4, 0, 0, 0, f(No, false, "殟")}, - {0x2f8f5, 0, 0, 0, f(No, false, "殺")}, - {0x2f8f6, 0, 0, 0, f(No, false, "殻")}, - {0x2f8f7, 0, 0, 0, f(No, false, "𣪍")}, - {0x2f8f8, 0, 0, 0, f(No, false, "𡴋")}, - {0x2f8f9, 0, 0, 0, f(No, false, "𣫺")}, - {0x2f8fa, 0, 0, 0, f(No, false, "汎")}, - {0x2f8fb, 0, 0, 0, f(No, false, "𣲼")}, - {0x2f8fc, 0, 0, 0, f(No, false, "沿")}, - {0x2f8fd, 0, 0, 0, f(No, false, "泍")}, - {0x2f8fe, 0, 0, 0, f(No, false, "汧")}, - {0x2f8ff, 0, 0, 0, f(No, false, "洖")}, - {0x2f900, 0, 0, 0, f(No, false, "派")}, - {0x2f901, 0, 0, 0, f(No, false, "海")}, - {0x2f902, 0, 0, 0, f(No, false, "流")}, - {0x2f903, 0, 0, 0, f(No, false, "浩")}, - {0x2f904, 0, 0, 0, f(No, false, "浸")}, - {0x2f905, 0, 0, 0, f(No, false, "涅")}, - {0x2f906, 0, 0, 0, f(No, false, "𣴞")}, - {0x2f907, 0, 0, 0, f(No, false, "洴")}, - {0x2f908, 0, 0, 0, f(No, false, "港")}, - {0x2f909, 0, 0, 0, f(No, false, "湮")}, - {0x2f90a, 0, 0, 0, f(No, false, "㴳")}, - {0x2f90b, 0, 0, 0, f(No, false, "滋")}, - {0x2f90c, 0, 0, 0, f(No, false, "滇")}, - {0x2f90d, 0, 0, 0, f(No, false, "𣻑")}, - {0x2f90e, 0, 0, 0, f(No, false, "淹")}, - {0x2f90f, 0, 0, 0, f(No, false, "潮")}, - {0x2f910, 0, 0, 0, f(No, false, "𣽞")}, - {0x2f911, 0, 0, 0, f(No, false, "𣾎")}, - {0x2f912, 0, 0, 0, f(No, false, "濆")}, - {0x2f913, 0, 0, 0, f(No, false, "瀹")}, - {0x2f914, 0, 0, 0, f(No, false, "瀞")}, - {0x2f915, 0, 0, 0, f(No, false, "瀛")}, - {0x2f916, 0, 0, 0, f(No, false, "㶖")}, - {0x2f917, 0, 0, 0, f(No, false, "灊")}, - {0x2f918, 0, 0, 0, f(No, false, "災")}, - {0x2f919, 0, 0, 0, f(No, false, "灷")}, - {0x2f91a, 0, 0, 0, f(No, false, "炭")}, - {0x2f91b, 0, 0, 0, f(No, false, "𠔥")}, - {0x2f91c, 0, 0, 0, f(No, false, "煅")}, - {0x2f91d, 0, 0, 0, f(No, false, "𤉣")}, - {0x2f91e, 0, 0, 0, f(No, false, "熜")}, - {0x2f91f, 0, 0, 0, f(No, false, "𤎫")}, - {0x2f920, 0, 0, 0, f(No, false, "爨")}, - {0x2f921, 0, 0, 0, f(No, false, "爵")}, - {0x2f922, 0, 0, 0, f(No, false, "牐")}, - {0x2f923, 0, 0, 0, f(No, false, "𤘈")}, - {0x2f924, 0, 0, 0, f(No, false, "犀")}, - {0x2f925, 0, 0, 0, f(No, false, "犕")}, - {0x2f926, 0, 0, 0, f(No, false, "𤜵")}, - {0x2f927, 0, 0, 0, f(No, false, "𤠔")}, - {0x2f928, 0, 0, 0, f(No, false, "獺")}, - {0x2f929, 0, 0, 0, f(No, false, "王")}, - {0x2f92a, 0, 0, 0, f(No, false, "㺬")}, - {0x2f92b, 0, 0, 0, f(No, false, "玥")}, - {0x2f92c, 0, 0, 0, f(No, false, "㺸")}, - {0x2f92e, 0, 0, 0, f(No, false, "瑇")}, - {0x2f92f, 0, 0, 0, f(No, false, "瑜")}, - {0x2f930, 0, 0, 0, f(No, false, "瑱")}, - {0x2f931, 0, 0, 0, f(No, false, "璅")}, - {0x2f932, 0, 0, 0, f(No, false, "瓊")}, - {0x2f933, 0, 0, 0, f(No, false, "㼛")}, - {0x2f934, 0, 0, 0, f(No, false, "甤")}, - {0x2f935, 0, 0, 0, f(No, false, "𤰶")}, - {0x2f936, 0, 0, 0, f(No, false, "甾")}, - {0x2f937, 0, 0, 0, f(No, false, "𤲒")}, - {0x2f938, 0, 0, 0, f(No, false, "異")}, - {0x2f939, 0, 0, 0, f(No, false, "𢆟")}, - {0x2f93a, 0, 0, 0, f(No, false, "瘐")}, - {0x2f93b, 0, 0, 0, f(No, false, "𤾡")}, - {0x2f93c, 0, 0, 0, f(No, false, "𤾸")}, - {0x2f93d, 0, 0, 0, f(No, false, "𥁄")}, - {0x2f93e, 0, 0, 0, f(No, false, "㿼")}, - {0x2f93f, 0, 0, 0, f(No, false, "䀈")}, - {0x2f940, 0, 0, 0, f(No, false, "直")}, - {0x2f941, 0, 0, 0, f(No, false, "𥃳")}, - {0x2f942, 0, 0, 0, f(No, false, "𥃲")}, - {0x2f943, 0, 0, 0, f(No, false, "𥄙")}, - {0x2f944, 0, 0, 0, f(No, false, "𥄳")}, - {0x2f945, 0, 0, 0, f(No, false, "眞")}, - {0x2f946, 0, 0, 0, f(No, false, "真")}, - {0x2f948, 0, 0, 0, f(No, false, "睊")}, - {0x2f949, 0, 0, 0, f(No, false, "䀹")}, - {0x2f94a, 0, 0, 0, f(No, false, "瞋")}, - {0x2f94b, 0, 0, 0, f(No, false, "䁆")}, - {0x2f94c, 0, 0, 0, f(No, false, "䂖")}, - {0x2f94d, 0, 0, 0, f(No, false, "𥐝")}, - {0x2f94e, 0, 0, 0, f(No, false, "硎")}, - {0x2f94f, 0, 0, 0, f(No, false, "碌")}, - {0x2f950, 0, 0, 0, f(No, false, "磌")}, - {0x2f951, 0, 0, 0, f(No, false, "䃣")}, - {0x2f952, 0, 0, 0, f(No, false, "𥘦")}, - {0x2f953, 0, 0, 0, f(No, false, "祖")}, - {0x2f954, 0, 0, 0, f(No, false, "𥚚")}, - {0x2f955, 0, 0, 0, f(No, false, "𥛅")}, - {0x2f956, 0, 0, 0, f(No, false, "福")}, - {0x2f957, 0, 0, 0, f(No, false, "秫")}, - {0x2f958, 0, 0, 0, f(No, false, "䄯")}, - {0x2f959, 0, 0, 0, f(No, false, "穀")}, - {0x2f95a, 0, 0, 0, f(No, false, "穊")}, - {0x2f95b, 0, 0, 0, f(No, false, "穏")}, - {0x2f95c, 0, 0, 0, f(No, false, "𥥼")}, - {0x2f95d, 0, 0, 0, f(No, false, "𥪧")}, - {0x2f95f, 0, 0, 0, f(No, false, "竮")}, - {0x2f960, 0, 0, 0, f(No, false, "䈂")}, - {0x2f961, 0, 0, 0, f(No, false, "𥮫")}, - {0x2f962, 0, 0, 0, f(No, false, "篆")}, - {0x2f963, 0, 0, 0, f(No, false, "築")}, - {0x2f964, 0, 0, 0, f(No, false, "䈧")}, - {0x2f965, 0, 0, 0, f(No, false, "𥲀")}, - {0x2f966, 0, 0, 0, f(No, false, "糒")}, - {0x2f967, 0, 0, 0, f(No, false, "䊠")}, - {0x2f968, 0, 0, 0, f(No, false, "糨")}, - {0x2f969, 0, 0, 0, f(No, false, "糣")}, - {0x2f96a, 0, 0, 0, f(No, false, "紀")}, - {0x2f96b, 0, 0, 0, f(No, false, "𥾆")}, - {0x2f96c, 0, 0, 0, f(No, false, "絣")}, - {0x2f96d, 0, 0, 0, f(No, false, "䌁")}, - {0x2f96e, 0, 0, 0, f(No, false, "緇")}, - {0x2f96f, 0, 0, 0, f(No, false, "縂")}, - {0x2f970, 0, 0, 0, f(No, false, "繅")}, - {0x2f971, 0, 0, 0, f(No, false, "䌴")}, - {0x2f972, 0, 0, 0, f(No, false, "𦈨")}, - {0x2f973, 0, 0, 0, f(No, false, "𦉇")}, - {0x2f974, 0, 0, 0, f(No, false, "䍙")}, - {0x2f975, 0, 0, 0, f(No, false, "𦋙")}, - {0x2f976, 0, 0, 0, f(No, false, "罺")}, - {0x2f977, 0, 0, 0, f(No, false, "𦌾")}, - {0x2f978, 0, 0, 0, f(No, false, "羕")}, - {0x2f979, 0, 0, 0, f(No, false, "翺")}, - {0x2f97a, 0, 0, 0, f(No, false, "者")}, - {0x2f97b, 0, 0, 0, f(No, false, "𦓚")}, - {0x2f97c, 0, 0, 0, f(No, false, "𦔣")}, - {0x2f97d, 0, 0, 0, f(No, false, "聠")}, - {0x2f97e, 0, 0, 0, f(No, false, "𦖨")}, - {0x2f97f, 0, 0, 0, f(No, false, "聰")}, - {0x2f980, 0, 0, 0, f(No, false, "𣍟")}, - {0x2f981, 0, 0, 0, f(No, false, "䏕")}, - {0x2f982, 0, 0, 0, f(No, false, "育")}, - {0x2f983, 0, 0, 0, f(No, false, "脃")}, - {0x2f984, 0, 0, 0, f(No, false, "䐋")}, - {0x2f985, 0, 0, 0, f(No, false, "脾")}, - {0x2f986, 0, 0, 0, f(No, false, "媵")}, - {0x2f987, 0, 0, 0, f(No, false, "𦞧")}, - {0x2f988, 0, 0, 0, f(No, false, "𦞵")}, - {0x2f989, 0, 0, 0, f(No, false, "𣎓")}, - {0x2f98a, 0, 0, 0, f(No, false, "𣎜")}, - {0x2f98b, 0, 0, 0, f(No, false, "舁")}, - {0x2f98c, 0, 0, 0, f(No, false, "舄")}, - {0x2f98d, 0, 0, 0, f(No, false, "辞")}, - {0x2f98e, 0, 0, 0, f(No, false, "䑫")}, - {0x2f98f, 0, 0, 0, f(No, false, "芑")}, - {0x2f990, 0, 0, 0, f(No, false, "芋")}, - {0x2f991, 0, 0, 0, f(No, false, "芝")}, - {0x2f992, 0, 0, 0, f(No, false, "劳")}, - {0x2f993, 0, 0, 0, f(No, false, "花")}, - {0x2f994, 0, 0, 0, f(No, false, "芳")}, - {0x2f995, 0, 0, 0, f(No, false, "芽")}, - {0x2f996, 0, 0, 0, f(No, false, "苦")}, - {0x2f997, 0, 0, 0, f(No, false, "𦬼")}, - {0x2f998, 0, 0, 0, f(No, false, "若")}, - {0x2f999, 0, 0, 0, f(No, false, "茝")}, - {0x2f99a, 0, 0, 0, f(No, false, "荣")}, - {0x2f99b, 0, 0, 0, f(No, false, "莭")}, - {0x2f99c, 0, 0, 0, f(No, false, "茣")}, - {0x2f99d, 0, 0, 0, f(No, false, "莽")}, - {0x2f99e, 0, 0, 0, f(No, false, "菧")}, - {0x2f99f, 0, 0, 0, f(No, false, "著")}, - {0x2f9a0, 0, 0, 0, f(No, false, "荓")}, - {0x2f9a1, 0, 0, 0, f(No, false, "菊")}, - {0x2f9a2, 0, 0, 0, f(No, false, "菌")}, - {0x2f9a3, 0, 0, 0, f(No, false, "菜")}, - {0x2f9a4, 0, 0, 0, f(No, false, "𦰶")}, - {0x2f9a5, 0, 0, 0, f(No, false, "𦵫")}, - {0x2f9a6, 0, 0, 0, f(No, false, "𦳕")}, - {0x2f9a7, 0, 0, 0, f(No, false, "䔫")}, - {0x2f9a8, 0, 0, 0, f(No, false, "蓱")}, - {0x2f9a9, 0, 0, 0, f(No, false, "蓳")}, - {0x2f9aa, 0, 0, 0, f(No, false, "蔖")}, - {0x2f9ab, 0, 0, 0, f(No, false, "𧏊")}, - {0x2f9ac, 0, 0, 0, f(No, false, "蕤")}, - {0x2f9ad, 0, 0, 0, f(No, false, "𦼬")}, - {0x2f9ae, 0, 0, 0, f(No, false, "䕝")}, - {0x2f9af, 0, 0, 0, f(No, false, "䕡")}, - {0x2f9b0, 0, 0, 0, f(No, false, "𦾱")}, - {0x2f9b1, 0, 0, 0, f(No, false, "𧃒")}, - {0x2f9b2, 0, 0, 0, f(No, false, "䕫")}, - {0x2f9b3, 0, 0, 0, f(No, false, "虐")}, - {0x2f9b4, 0, 0, 0, f(No, false, "虜")}, - {0x2f9b5, 0, 0, 0, f(No, false, "虧")}, - {0x2f9b6, 0, 0, 0, f(No, false, "虩")}, - {0x2f9b7, 0, 0, 0, f(No, false, "蚩")}, - {0x2f9b8, 0, 0, 0, f(No, false, "蚈")}, - {0x2f9b9, 0, 0, 0, f(No, false, "蜎")}, - {0x2f9ba, 0, 0, 0, f(No, false, "蛢")}, - {0x2f9bb, 0, 0, 0, f(No, false, "蝹")}, - {0x2f9bc, 0, 0, 0, f(No, false, "蜨")}, - {0x2f9bd, 0, 0, 0, f(No, false, "蝫")}, - {0x2f9be, 0, 0, 0, f(No, false, "螆")}, - {0x2f9bf, 0, 0, 0, f(No, false, "䗗")}, - {0x2f9c0, 0, 0, 0, f(No, false, "蟡")}, - {0x2f9c1, 0, 0, 0, f(No, false, "蠁")}, - {0x2f9c2, 0, 0, 0, f(No, false, "䗹")}, - {0x2f9c3, 0, 0, 0, f(No, false, "衠")}, - {0x2f9c4, 0, 0, 0, f(No, false, "衣")}, - {0x2f9c5, 0, 0, 0, f(No, false, "𧙧")}, - {0x2f9c6, 0, 0, 0, f(No, false, "裗")}, - {0x2f9c7, 0, 0, 0, f(No, false, "裞")}, - {0x2f9c8, 0, 0, 0, f(No, false, "䘵")}, - {0x2f9c9, 0, 0, 0, f(No, false, "裺")}, - {0x2f9ca, 0, 0, 0, f(No, false, "㒻")}, - {0x2f9cb, 0, 0, 0, f(No, false, "𧢮")}, - {0x2f9cc, 0, 0, 0, f(No, false, "𧥦")}, - {0x2f9cd, 0, 0, 0, f(No, false, "䚾")}, - {0x2f9ce, 0, 0, 0, f(No, false, "䛇")}, - {0x2f9cf, 0, 0, 0, f(No, false, "誠")}, - {0x2f9d0, 0, 0, 0, f(No, false, "諭")}, - {0x2f9d1, 0, 0, 0, f(No, false, "變")}, - {0x2f9d2, 0, 0, 0, f(No, false, "豕")}, - {0x2f9d3, 0, 0, 0, f(No, false, "𧲨")}, - {0x2f9d4, 0, 0, 0, f(No, false, "貫")}, - {0x2f9d5, 0, 0, 0, f(No, false, "賁")}, - {0x2f9d6, 0, 0, 0, f(No, false, "贛")}, - {0x2f9d7, 0, 0, 0, f(No, false, "起")}, - {0x2f9d8, 0, 0, 0, f(No, false, "𧼯")}, - {0x2f9d9, 0, 0, 0, f(No, false, "𠠄")}, - {0x2f9da, 0, 0, 0, f(No, false, "跋")}, - {0x2f9db, 0, 0, 0, f(No, false, "趼")}, - {0x2f9dc, 0, 0, 0, f(No, false, "跰")}, - {0x2f9dd, 0, 0, 0, f(No, false, "𠣞")}, - {0x2f9de, 0, 0, 0, f(No, false, "軔")}, - {0x2f9df, 0, 0, 0, f(No, false, "輸")}, - {0x2f9e0, 0, 0, 0, f(No, false, "𨗒")}, - {0x2f9e1, 0, 0, 0, f(No, false, "𨗭")}, - {0x2f9e2, 0, 0, 0, f(No, false, "邔")}, - {0x2f9e3, 0, 0, 0, f(No, false, "郱")}, - {0x2f9e4, 0, 0, 0, f(No, false, "鄑")}, - {0x2f9e5, 0, 0, 0, f(No, false, "𨜮")}, - {0x2f9e6, 0, 0, 0, f(No, false, "鄛")}, - {0x2f9e7, 0, 0, 0, f(No, false, "鈸")}, - {0x2f9e8, 0, 0, 0, f(No, false, "鋗")}, - {0x2f9e9, 0, 0, 0, f(No, false, "鋘")}, - {0x2f9ea, 0, 0, 0, f(No, false, "鉼")}, - {0x2f9eb, 0, 0, 0, f(No, false, "鏹")}, - {0x2f9ec, 0, 0, 0, f(No, false, "鐕")}, - {0x2f9ed, 0, 0, 0, f(No, false, "𨯺")}, - {0x2f9ee, 0, 0, 0, f(No, false, "開")}, - {0x2f9ef, 0, 0, 0, f(No, false, "䦕")}, - {0x2f9f0, 0, 0, 0, f(No, false, "閷")}, - {0x2f9f1, 0, 0, 0, f(No, false, "𨵷")}, - {0x2f9f2, 0, 0, 0, f(No, false, "䧦")}, - {0x2f9f3, 0, 0, 0, f(No, false, "雃")}, - {0x2f9f4, 0, 0, 0, f(No, false, "嶲")}, - {0x2f9f5, 0, 0, 0, f(No, false, "霣")}, - {0x2f9f6, 0, 0, 0, f(No, false, "𩅅")}, - {0x2f9f7, 0, 0, 0, f(No, false, "𩈚")}, - {0x2f9f8, 0, 0, 0, f(No, false, "䩮")}, - {0x2f9f9, 0, 0, 0, f(No, false, "䩶")}, - {0x2f9fa, 0, 0, 0, f(No, false, "韠")}, - {0x2f9fb, 0, 0, 0, f(No, false, "𩐊")}, - {0x2f9fc, 0, 0, 0, f(No, false, "䪲")}, - {0x2f9fd, 0, 0, 0, f(No, false, "𩒖")}, - {0x2f9fe, 0, 0, 0, f(No, false, "頋")}, - {0x2fa00, 0, 0, 0, f(No, false, "頩")}, - {0x2fa01, 0, 0, 0, f(No, false, "𩖶")}, - {0x2fa02, 0, 0, 0, f(No, false, "飢")}, - {0x2fa03, 0, 0, 0, f(No, false, "䬳")}, - {0x2fa04, 0, 0, 0, f(No, false, "餩")}, - {0x2fa05, 0, 0, 0, f(No, false, "馧")}, - {0x2fa06, 0, 0, 0, f(No, false, "駂")}, - {0x2fa07, 0, 0, 0, f(No, false, "駾")}, - {0x2fa08, 0, 0, 0, f(No, false, "䯎")}, - {0x2fa09, 0, 0, 0, f(No, false, "𩬰")}, - {0x2fa0a, 0, 0, 0, f(No, false, "鬒")}, - {0x2fa0b, 0, 0, 0, f(No, false, "鱀")}, - {0x2fa0c, 0, 0, 0, f(No, false, "鳽")}, - {0x2fa0d, 0, 0, 0, f(No, false, "䳎")}, - {0x2fa0e, 0, 0, 0, f(No, false, "䳭")}, - {0x2fa0f, 0, 0, 0, f(No, false, "鵧")}, - {0x2fa10, 0, 0, 0, f(No, false, "𪃎")}, - {0x2fa11, 0, 0, 0, f(No, false, "䳸")}, - {0x2fa12, 0, 0, 0, f(No, false, "𪄅")}, - {0x2fa13, 0, 0, 0, f(No, false, "𪈎")}, - {0x2fa14, 0, 0, 0, f(No, false, "𪊑")}, - {0x2fa15, 0, 0, 0, f(No, false, "麻")}, - {0x2fa16, 0, 0, 0, f(No, false, "䵖")}, - {0x2fa17, 0, 0, 0, f(No, false, "黹")}, - {0x2fa18, 0, 0, 0, f(No, false, "黾")}, - {0x2fa19, 0, 0, 0, f(No, false, "鼅")}, - {0x2fa1a, 0, 0, 0, f(No, false, "鼏")}, - {0x2fa1b, 0, 0, 0, f(No, false, "鼖")}, - {0x2fa1c, 0, 0, 0, f(No, false, "鼻")}, - {0x2fa1d, 0, 0, 0, f(No, false, "𪘀")}, - {0x2fa1e, 0, 0, 0, f(Yes, false, "")}, -} diff --git a/vendor/golang.org/x/text/unicode/norm/data9.0.0_test.go b/vendor/golang.org/x/text/unicode/norm/data9.0.0_test.go deleted file mode 100644 index b1be64d5..00000000 --- a/vendor/golang.org/x/text/unicode/norm/data9.0.0_test.go +++ /dev/null @@ -1,7409 +0,0 @@ -// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. - -// +build !go1.10 - -package norm - -const ( - Yes = iota - No - Maybe -) - -type formData struct { - qc uint8 - combinesForward bool - decomposition string -} - -type runeData struct { - r rune - ccc uint8 - nLead uint8 - nTrail uint8 - f [2]formData // 0: canonical; 1: compatibility -} - -func f(qc uint8, cf bool, dec string) [2]formData { - return [2]formData{{qc, cf, dec}, {qc, cf, dec}} -} - -func g(qc, qck uint8, cf, cfk bool, d, dk string) [2]formData { - return [2]formData{{qc, cf, d}, {qck, cfk, dk}} -} - -var testData = []runeData{ - {0x0, 0, 0, 0, f(Yes, false, "")}, - {0x3c, 0, 0, 0, f(Yes, true, "")}, - {0x3f, 0, 0, 0, f(Yes, false, "")}, - {0x41, 0, 0, 0, f(Yes, true, "")}, - {0x51, 0, 0, 0, f(Yes, false, "")}, - {0x52, 0, 0, 0, f(Yes, true, "")}, - {0x5b, 0, 0, 0, f(Yes, false, "")}, - {0x61, 0, 0, 0, f(Yes, true, "")}, - {0x71, 0, 0, 0, f(Yes, false, "")}, - {0x72, 0, 0, 0, f(Yes, true, "")}, - {0x7b, 0, 0, 0, f(Yes, false, "")}, - {0xa0, 0, 0, 0, g(Yes, No, false, false, "", " ")}, - {0xa1, 0, 0, 0, f(Yes, false, "")}, - {0xa8, 0, 0, 1, g(Yes, No, true, false, "", " ̈")}, - {0xa9, 0, 0, 0, f(Yes, false, "")}, - {0xaa, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0xab, 0, 0, 0, f(Yes, false, "")}, - {0xaf, 0, 0, 1, g(Yes, No, false, false, "", " ̄")}, - {0xb0, 0, 0, 0, f(Yes, false, "")}, - {0xb2, 0, 0, 0, g(Yes, No, false, false, "", "2")}, - {0xb3, 0, 0, 0, g(Yes, No, false, false, "", "3")}, - {0xb4, 0, 0, 1, g(Yes, No, false, false, "", " ́")}, - {0xb5, 0, 0, 0, g(Yes, No, false, false, "", "μ")}, - {0xb6, 0, 0, 0, f(Yes, false, "")}, - {0xb8, 0, 0, 1, g(Yes, No, false, false, "", " ̧")}, - {0xb9, 0, 0, 0, g(Yes, No, false, false, "", "1")}, - {0xba, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0xbb, 0, 0, 0, f(Yes, false, "")}, - {0xbc, 0, 0, 0, g(Yes, No, false, false, "", "1⁄4")}, - {0xbd, 0, 0, 0, g(Yes, No, false, false, "", "1⁄2")}, - {0xbe, 0, 0, 0, g(Yes, No, false, false, "", "3⁄4")}, - {0xbf, 0, 0, 0, f(Yes, false, "")}, - {0xc0, 0, 0, 1, f(Yes, false, "À")}, - {0xc1, 0, 0, 1, f(Yes, false, "Á")}, - {0xc2, 0, 0, 1, f(Yes, true, "Â")}, - {0xc3, 0, 0, 1, f(Yes, false, "Ã")}, - {0xc4, 0, 0, 1, f(Yes, true, "Ä")}, - {0xc5, 0, 0, 1, f(Yes, true, "Å")}, - {0xc6, 0, 0, 0, f(Yes, true, "")}, - {0xc7, 0, 0, 1, f(Yes, true, "Ç")}, - {0xc8, 0, 0, 1, f(Yes, false, "È")}, - {0xc9, 0, 0, 1, f(Yes, false, "É")}, - {0xca, 0, 0, 1, f(Yes, true, "Ê")}, - {0xcb, 0, 0, 1, f(Yes, false, "Ë")}, - {0xcc, 0, 0, 1, f(Yes, false, "Ì")}, - {0xcd, 0, 0, 1, f(Yes, false, "Í")}, - {0xce, 0, 0, 1, f(Yes, false, "Î")}, - {0xcf, 0, 0, 1, f(Yes, true, "Ï")}, - {0xd0, 0, 0, 0, f(Yes, false, "")}, - {0xd1, 0, 0, 1, f(Yes, false, "Ñ")}, - {0xd2, 0, 0, 1, f(Yes, false, "Ò")}, - {0xd3, 0, 0, 1, f(Yes, false, "Ó")}, - {0xd4, 0, 0, 1, f(Yes, true, "Ô")}, - {0xd5, 0, 0, 1, f(Yes, true, "Õ")}, - {0xd6, 0, 0, 1, f(Yes, true, "Ö")}, - {0xd7, 0, 0, 0, f(Yes, false, "")}, - {0xd8, 0, 0, 0, f(Yes, true, "")}, - {0xd9, 0, 0, 1, f(Yes, false, "Ù")}, - {0xda, 0, 0, 1, f(Yes, false, "Ú")}, - {0xdb, 0, 0, 1, f(Yes, false, "Û")}, - {0xdc, 0, 0, 1, f(Yes, true, "Ü")}, - {0xdd, 0, 0, 1, f(Yes, false, "Ý")}, - {0xde, 0, 0, 0, f(Yes, false, "")}, - {0xe0, 0, 0, 1, f(Yes, false, "à")}, - {0xe1, 0, 0, 1, f(Yes, false, "á")}, - {0xe2, 0, 0, 1, f(Yes, true, "â")}, - {0xe3, 0, 0, 1, f(Yes, false, "ã")}, - {0xe4, 0, 0, 1, f(Yes, true, "ä")}, - {0xe5, 0, 0, 1, f(Yes, true, "å")}, - {0xe6, 0, 0, 0, f(Yes, true, "")}, - {0xe7, 0, 0, 1, f(Yes, true, "ç")}, - {0xe8, 0, 0, 1, f(Yes, false, "è")}, - {0xe9, 0, 0, 1, f(Yes, false, "é")}, - {0xea, 0, 0, 1, f(Yes, true, "ê")}, - {0xeb, 0, 0, 1, f(Yes, false, "ë")}, - {0xec, 0, 0, 1, f(Yes, false, "ì")}, - {0xed, 0, 0, 1, f(Yes, false, "í")}, - {0xee, 0, 0, 1, f(Yes, false, "î")}, - {0xef, 0, 0, 1, f(Yes, true, "ï")}, - {0xf0, 0, 0, 0, f(Yes, false, "")}, - {0xf1, 0, 0, 1, f(Yes, false, "ñ")}, - {0xf2, 0, 0, 1, f(Yes, false, "ò")}, - {0xf3, 0, 0, 1, f(Yes, false, "ó")}, - {0xf4, 0, 0, 1, f(Yes, true, "ô")}, - {0xf5, 0, 0, 1, f(Yes, true, "õ")}, - {0xf6, 0, 0, 1, f(Yes, true, "ö")}, - {0xf7, 0, 0, 0, f(Yes, false, "")}, - {0xf8, 0, 0, 0, f(Yes, true, "")}, - {0xf9, 0, 0, 1, f(Yes, false, "ù")}, - {0xfa, 0, 0, 1, f(Yes, false, "ú")}, - {0xfb, 0, 0, 1, f(Yes, false, "û")}, - {0xfc, 0, 0, 1, f(Yes, true, "ü")}, - {0xfd, 0, 0, 1, f(Yes, false, "ý")}, - {0xfe, 0, 0, 0, f(Yes, false, "")}, - {0xff, 0, 0, 1, f(Yes, false, "ÿ")}, - {0x100, 0, 0, 1, f(Yes, false, "Ā")}, - {0x101, 0, 0, 1, f(Yes, false, "ā")}, - {0x102, 0, 0, 1, f(Yes, true, "Ă")}, - {0x103, 0, 0, 1, f(Yes, true, "ă")}, - {0x104, 0, 0, 1, f(Yes, false, "Ą")}, - {0x105, 0, 0, 1, f(Yes, false, "ą")}, - {0x106, 0, 0, 1, f(Yes, false, "Ć")}, - {0x107, 0, 0, 1, f(Yes, false, "ć")}, - {0x108, 0, 0, 1, f(Yes, false, "Ĉ")}, - {0x109, 0, 0, 1, f(Yes, false, "ĉ")}, - {0x10a, 0, 0, 1, f(Yes, false, "Ċ")}, - {0x10b, 0, 0, 1, f(Yes, false, "ċ")}, - {0x10c, 0, 0, 1, f(Yes, false, "Č")}, - {0x10d, 0, 0, 1, f(Yes, false, "č")}, - {0x10e, 0, 0, 1, f(Yes, false, "Ď")}, - {0x10f, 0, 0, 1, f(Yes, false, "ď")}, - {0x110, 0, 0, 0, f(Yes, false, "")}, - {0x112, 0, 0, 1, f(Yes, true, "Ē")}, - {0x113, 0, 0, 1, f(Yes, true, "ē")}, - {0x114, 0, 0, 1, f(Yes, false, "Ĕ")}, - {0x115, 0, 0, 1, f(Yes, false, "ĕ")}, - {0x116, 0, 0, 1, f(Yes, false, "Ė")}, - {0x117, 0, 0, 1, f(Yes, false, "ė")}, - {0x118, 0, 0, 1, f(Yes, false, "Ę")}, - {0x119, 0, 0, 1, f(Yes, false, "ę")}, - {0x11a, 0, 0, 1, f(Yes, false, "Ě")}, - {0x11b, 0, 0, 1, f(Yes, false, "ě")}, - {0x11c, 0, 0, 1, f(Yes, false, "Ĝ")}, - {0x11d, 0, 0, 1, f(Yes, false, "ĝ")}, - {0x11e, 0, 0, 1, f(Yes, false, "Ğ")}, - {0x11f, 0, 0, 1, f(Yes, false, "ğ")}, - {0x120, 0, 0, 1, f(Yes, false, "Ġ")}, - {0x121, 0, 0, 1, f(Yes, false, "ġ")}, - {0x122, 0, 0, 1, f(Yes, false, "Ģ")}, - {0x123, 0, 0, 1, f(Yes, false, "ģ")}, - {0x124, 0, 0, 1, f(Yes, false, "Ĥ")}, - {0x125, 0, 0, 1, f(Yes, false, "ĥ")}, - {0x126, 0, 0, 0, f(Yes, false, "")}, - {0x128, 0, 0, 1, f(Yes, false, "Ĩ")}, - {0x129, 0, 0, 1, f(Yes, false, "ĩ")}, - {0x12a, 0, 0, 1, f(Yes, false, "Ī")}, - {0x12b, 0, 0, 1, f(Yes, false, "ī")}, - {0x12c, 0, 0, 1, f(Yes, false, "Ĭ")}, - {0x12d, 0, 0, 1, f(Yes, false, "ĭ")}, - {0x12e, 0, 0, 1, f(Yes, false, "Į")}, - {0x12f, 0, 0, 1, f(Yes, false, "į")}, - {0x130, 0, 0, 1, f(Yes, false, "İ")}, - {0x131, 0, 0, 0, f(Yes, false, "")}, - {0x132, 0, 0, 0, g(Yes, No, false, false, "", "IJ")}, - {0x133, 0, 0, 0, g(Yes, No, false, false, "", "ij")}, - {0x134, 0, 0, 1, f(Yes, false, "Ĵ")}, - {0x135, 0, 0, 1, f(Yes, false, "ĵ")}, - {0x136, 0, 0, 1, f(Yes, false, "Ķ")}, - {0x137, 0, 0, 1, f(Yes, false, "ķ")}, - {0x138, 0, 0, 0, f(Yes, false, "")}, - {0x139, 0, 0, 1, f(Yes, false, "Ĺ")}, - {0x13a, 0, 0, 1, f(Yes, false, "ĺ")}, - {0x13b, 0, 0, 1, f(Yes, false, "Ļ")}, - {0x13c, 0, 0, 1, f(Yes, false, "ļ")}, - {0x13d, 0, 0, 1, f(Yes, false, "Ľ")}, - {0x13e, 0, 0, 1, f(Yes, false, "ľ")}, - {0x13f, 0, 0, 0, g(Yes, No, false, false, "", "L·")}, - {0x140, 0, 0, 0, g(Yes, No, false, false, "", "l·")}, - {0x141, 0, 0, 0, f(Yes, false, "")}, - {0x143, 0, 0, 1, f(Yes, false, "Ń")}, - {0x144, 0, 0, 1, f(Yes, false, "ń")}, - {0x145, 0, 0, 1, f(Yes, false, "Ņ")}, - {0x146, 0, 0, 1, f(Yes, false, "ņ")}, - {0x147, 0, 0, 1, f(Yes, false, "Ň")}, - {0x148, 0, 0, 1, f(Yes, false, "ň")}, - {0x149, 0, 0, 0, g(Yes, No, false, false, "", "ʼn")}, - {0x14a, 0, 0, 0, f(Yes, false, "")}, - {0x14c, 0, 0, 1, f(Yes, true, "Ō")}, - {0x14d, 0, 0, 1, f(Yes, true, "ō")}, - {0x14e, 0, 0, 1, f(Yes, false, "Ŏ")}, - {0x14f, 0, 0, 1, f(Yes, false, "ŏ")}, - {0x150, 0, 0, 1, f(Yes, false, "Ő")}, - {0x151, 0, 0, 1, f(Yes, false, "ő")}, - {0x152, 0, 0, 0, f(Yes, false, "")}, - {0x154, 0, 0, 1, f(Yes, false, "Ŕ")}, - {0x155, 0, 0, 1, f(Yes, false, "ŕ")}, - {0x156, 0, 0, 1, f(Yes, false, "Ŗ")}, - {0x157, 0, 0, 1, f(Yes, false, "ŗ")}, - {0x158, 0, 0, 1, f(Yes, false, "Ř")}, - {0x159, 0, 0, 1, f(Yes, false, "ř")}, - {0x15a, 0, 0, 1, f(Yes, true, "Ś")}, - {0x15b, 0, 0, 1, f(Yes, true, "ś")}, - {0x15c, 0, 0, 1, f(Yes, false, "Ŝ")}, - {0x15d, 0, 0, 1, f(Yes, false, "ŝ")}, - {0x15e, 0, 0, 1, f(Yes, false, "Ş")}, - {0x15f, 0, 0, 1, f(Yes, false, "ş")}, - {0x160, 0, 0, 1, f(Yes, true, "Š")}, - {0x161, 0, 0, 1, f(Yes, true, "š")}, - {0x162, 0, 0, 1, f(Yes, false, "Ţ")}, - {0x163, 0, 0, 1, f(Yes, false, "ţ")}, - {0x164, 0, 0, 1, f(Yes, false, "Ť")}, - {0x165, 0, 0, 1, f(Yes, false, "ť")}, - {0x166, 0, 0, 0, f(Yes, false, "")}, - {0x168, 0, 0, 1, f(Yes, true, "Ũ")}, - {0x169, 0, 0, 1, f(Yes, true, "ũ")}, - {0x16a, 0, 0, 1, f(Yes, true, "Ū")}, - {0x16b, 0, 0, 1, f(Yes, true, "ū")}, - {0x16c, 0, 0, 1, f(Yes, false, "Ŭ")}, - {0x16d, 0, 0, 1, f(Yes, false, "ŭ")}, - {0x16e, 0, 0, 1, f(Yes, false, "Ů")}, - {0x16f, 0, 0, 1, f(Yes, false, "ů")}, - {0x170, 0, 0, 1, f(Yes, false, "Ű")}, - {0x171, 0, 0, 1, f(Yes, false, "ű")}, - {0x172, 0, 0, 1, f(Yes, false, "Ų")}, - {0x173, 0, 0, 1, f(Yes, false, "ų")}, - {0x174, 0, 0, 1, f(Yes, false, "Ŵ")}, - {0x175, 0, 0, 1, f(Yes, false, "ŵ")}, - {0x176, 0, 0, 1, f(Yes, false, "Ŷ")}, - {0x177, 0, 0, 1, f(Yes, false, "ŷ")}, - {0x178, 0, 0, 1, f(Yes, false, "Ÿ")}, - {0x179, 0, 0, 1, f(Yes, false, "Ź")}, - {0x17a, 0, 0, 1, f(Yes, false, "ź")}, - {0x17b, 0, 0, 1, f(Yes, false, "Ż")}, - {0x17c, 0, 0, 1, f(Yes, false, "ż")}, - {0x17d, 0, 0, 1, f(Yes, false, "Ž")}, - {0x17e, 0, 0, 1, f(Yes, false, "ž")}, - {0x17f, 0, 0, 0, g(Yes, No, true, false, "", "s")}, - {0x180, 0, 0, 0, f(Yes, false, "")}, - {0x1a0, 0, 0, 1, f(Yes, true, "Ơ")}, - {0x1a1, 0, 0, 1, f(Yes, true, "ơ")}, - {0x1a2, 0, 0, 0, f(Yes, false, "")}, - {0x1af, 0, 0, 1, f(Yes, true, "Ư")}, - {0x1b0, 0, 0, 1, f(Yes, true, "ư")}, - {0x1b1, 0, 0, 0, f(Yes, false, "")}, - {0x1b7, 0, 0, 0, f(Yes, true, "")}, - {0x1b8, 0, 0, 0, f(Yes, false, "")}, - {0x1c4, 0, 0, 1, g(Yes, No, false, false, "", "DŽ")}, - {0x1c5, 0, 0, 1, g(Yes, No, false, false, "", "Dž")}, - {0x1c6, 0, 0, 1, g(Yes, No, false, false, "", "dž")}, - {0x1c7, 0, 0, 0, g(Yes, No, false, false, "", "LJ")}, - {0x1c8, 0, 0, 0, g(Yes, No, false, false, "", "Lj")}, - {0x1c9, 0, 0, 0, g(Yes, No, false, false, "", "lj")}, - {0x1ca, 0, 0, 0, g(Yes, No, false, false, "", "NJ")}, - {0x1cb, 0, 0, 0, g(Yes, No, false, false, "", "Nj")}, - {0x1cc, 0, 0, 0, g(Yes, No, false, false, "", "nj")}, - {0x1cd, 0, 0, 1, f(Yes, false, "Ǎ")}, - {0x1ce, 0, 0, 1, f(Yes, false, "ǎ")}, - {0x1cf, 0, 0, 1, f(Yes, false, "Ǐ")}, - {0x1d0, 0, 0, 1, f(Yes, false, "ǐ")}, - {0x1d1, 0, 0, 1, f(Yes, false, "Ǒ")}, - {0x1d2, 0, 0, 1, f(Yes, false, "ǒ")}, - {0x1d3, 0, 0, 1, f(Yes, false, "Ǔ")}, - {0x1d4, 0, 0, 1, f(Yes, false, "ǔ")}, - {0x1d5, 0, 0, 2, f(Yes, false, "Ǖ")}, - {0x1d6, 0, 0, 2, f(Yes, false, "ǖ")}, - {0x1d7, 0, 0, 2, f(Yes, false, "Ǘ")}, - {0x1d8, 0, 0, 2, f(Yes, false, "ǘ")}, - {0x1d9, 0, 0, 2, f(Yes, false, "Ǚ")}, - {0x1da, 0, 0, 2, f(Yes, false, "ǚ")}, - {0x1db, 0, 0, 2, f(Yes, false, "Ǜ")}, - {0x1dc, 0, 0, 2, f(Yes, false, "ǜ")}, - {0x1dd, 0, 0, 0, f(Yes, false, "")}, - {0x1de, 0, 0, 2, f(Yes, false, "Ǟ")}, - {0x1df, 0, 0, 2, f(Yes, false, "ǟ")}, - {0x1e0, 0, 0, 2, f(Yes, false, "Ǡ")}, - {0x1e1, 0, 0, 2, f(Yes, false, "ǡ")}, - {0x1e2, 0, 0, 1, f(Yes, false, "Ǣ")}, - {0x1e3, 0, 0, 1, f(Yes, false, "ǣ")}, - {0x1e4, 0, 0, 0, f(Yes, false, "")}, - {0x1e6, 0, 0, 1, f(Yes, false, "Ǧ")}, - {0x1e7, 0, 0, 1, f(Yes, false, "ǧ")}, - {0x1e8, 0, 0, 1, f(Yes, false, "Ǩ")}, - {0x1e9, 0, 0, 1, f(Yes, false, "ǩ")}, - {0x1ea, 0, 0, 1, f(Yes, true, "Ǫ")}, - {0x1eb, 0, 0, 1, f(Yes, true, "ǫ")}, - {0x1ec, 0, 0, 2, f(Yes, false, "Ǭ")}, - {0x1ed, 0, 0, 2, f(Yes, false, "ǭ")}, - {0x1ee, 0, 0, 1, f(Yes, false, "Ǯ")}, - {0x1ef, 0, 0, 1, f(Yes, false, "ǯ")}, - {0x1f0, 0, 0, 1, f(Yes, false, "ǰ")}, - {0x1f1, 0, 0, 0, g(Yes, No, false, false, "", "DZ")}, - {0x1f2, 0, 0, 0, g(Yes, No, false, false, "", "Dz")}, - {0x1f3, 0, 0, 0, g(Yes, No, false, false, "", "dz")}, - {0x1f4, 0, 0, 1, f(Yes, false, "Ǵ")}, - {0x1f5, 0, 0, 1, f(Yes, false, "ǵ")}, - {0x1f6, 0, 0, 0, f(Yes, false, "")}, - {0x1f8, 0, 0, 1, f(Yes, false, "Ǹ")}, - {0x1f9, 0, 0, 1, f(Yes, false, "ǹ")}, - {0x1fa, 0, 0, 2, f(Yes, false, "Ǻ")}, - {0x1fb, 0, 0, 2, f(Yes, false, "ǻ")}, - {0x1fc, 0, 0, 1, f(Yes, false, "Ǽ")}, - {0x1fd, 0, 0, 1, f(Yes, false, "ǽ")}, - {0x1fe, 0, 0, 1, f(Yes, false, "Ǿ")}, - {0x1ff, 0, 0, 1, f(Yes, false, "ǿ")}, - {0x200, 0, 0, 1, f(Yes, false, "Ȁ")}, - {0x201, 0, 0, 1, f(Yes, false, "ȁ")}, - {0x202, 0, 0, 1, f(Yes, false, "Ȃ")}, - {0x203, 0, 0, 1, f(Yes, false, "ȃ")}, - {0x204, 0, 0, 1, f(Yes, false, "Ȅ")}, - {0x205, 0, 0, 1, f(Yes, false, "ȅ")}, - {0x206, 0, 0, 1, f(Yes, false, "Ȇ")}, - {0x207, 0, 0, 1, f(Yes, false, "ȇ")}, - {0x208, 0, 0, 1, f(Yes, false, "Ȉ")}, - {0x209, 0, 0, 1, f(Yes, false, "ȉ")}, - {0x20a, 0, 0, 1, f(Yes, false, "Ȋ")}, - {0x20b, 0, 0, 1, f(Yes, false, "ȋ")}, - {0x20c, 0, 0, 1, f(Yes, false, "Ȍ")}, - {0x20d, 0, 0, 1, f(Yes, false, "ȍ")}, - {0x20e, 0, 0, 1, f(Yes, false, "Ȏ")}, - {0x20f, 0, 0, 1, f(Yes, false, "ȏ")}, - {0x210, 0, 0, 1, f(Yes, false, "Ȑ")}, - {0x211, 0, 0, 1, f(Yes, false, "ȑ")}, - {0x212, 0, 0, 1, f(Yes, false, "Ȓ")}, - {0x213, 0, 0, 1, f(Yes, false, "ȓ")}, - {0x214, 0, 0, 1, f(Yes, false, "Ȕ")}, - {0x215, 0, 0, 1, f(Yes, false, "ȕ")}, - {0x216, 0, 0, 1, f(Yes, false, "Ȗ")}, - {0x217, 0, 0, 1, f(Yes, false, "ȗ")}, - {0x218, 0, 0, 1, f(Yes, false, "Ș")}, - {0x219, 0, 0, 1, f(Yes, false, "ș")}, - {0x21a, 0, 0, 1, f(Yes, false, "Ț")}, - {0x21b, 0, 0, 1, f(Yes, false, "ț")}, - {0x21c, 0, 0, 0, f(Yes, false, "")}, - {0x21e, 0, 0, 1, f(Yes, false, "Ȟ")}, - {0x21f, 0, 0, 1, f(Yes, false, "ȟ")}, - {0x220, 0, 0, 0, f(Yes, false, "")}, - {0x226, 0, 0, 1, f(Yes, true, "Ȧ")}, - {0x227, 0, 0, 1, f(Yes, true, "ȧ")}, - {0x228, 0, 0, 1, f(Yes, true, "Ȩ")}, - {0x229, 0, 0, 1, f(Yes, true, "ȩ")}, - {0x22a, 0, 0, 2, f(Yes, false, "Ȫ")}, - {0x22b, 0, 0, 2, f(Yes, false, "ȫ")}, - {0x22c, 0, 0, 2, f(Yes, false, "Ȭ")}, - {0x22d, 0, 0, 2, f(Yes, false, "ȭ")}, - {0x22e, 0, 0, 1, f(Yes, true, "Ȯ")}, - {0x22f, 0, 0, 1, f(Yes, true, "ȯ")}, - {0x230, 0, 0, 2, f(Yes, false, "Ȱ")}, - {0x231, 0, 0, 2, f(Yes, false, "ȱ")}, - {0x232, 0, 0, 1, f(Yes, false, "Ȳ")}, - {0x233, 0, 0, 1, f(Yes, false, "ȳ")}, - {0x234, 0, 0, 0, f(Yes, false, "")}, - {0x292, 0, 0, 0, f(Yes, true, "")}, - {0x293, 0, 0, 0, f(Yes, false, "")}, - {0x2b0, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x2b1, 0, 0, 0, g(Yes, No, false, false, "", "ɦ")}, - {0x2b2, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x2b3, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x2b4, 0, 0, 0, g(Yes, No, false, false, "", "ɹ")}, - {0x2b5, 0, 0, 0, g(Yes, No, false, false, "", "ɻ")}, - {0x2b6, 0, 0, 0, g(Yes, No, false, false, "", "ʁ")}, - {0x2b7, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x2b8, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x2b9, 0, 0, 0, f(Yes, false, "")}, - {0x2d8, 0, 0, 1, g(Yes, No, false, false, "", " ̆")}, - {0x2d9, 0, 0, 1, g(Yes, No, false, false, "", " ̇")}, - {0x2da, 0, 0, 1, g(Yes, No, false, false, "", " ̊")}, - {0x2db, 0, 0, 1, g(Yes, No, false, false, "", " ̨")}, - {0x2dc, 0, 0, 1, g(Yes, No, false, false, "", " ̃")}, - {0x2dd, 0, 0, 1, g(Yes, No, false, false, "", " ̋")}, - {0x2de, 0, 0, 0, f(Yes, false, "")}, - {0x2e0, 0, 0, 0, g(Yes, No, false, false, "", "ɣ")}, - {0x2e1, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x2e2, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x2e3, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x2e4, 0, 0, 0, g(Yes, No, false, false, "", "ʕ")}, - {0x2e5, 0, 0, 0, f(Yes, false, "")}, - {0x300, 230, 1, 1, f(Maybe, false, "")}, - {0x305, 230, 1, 1, f(Yes, false, "")}, - {0x306, 230, 1, 1, f(Maybe, false, "")}, - {0x30d, 230, 1, 1, f(Yes, false, "")}, - {0x30f, 230, 1, 1, f(Maybe, false, "")}, - {0x310, 230, 1, 1, f(Yes, false, "")}, - {0x311, 230, 1, 1, f(Maybe, false, "")}, - {0x312, 230, 1, 1, f(Yes, false, "")}, - {0x313, 230, 1, 1, f(Maybe, false, "")}, - {0x315, 232, 1, 1, f(Yes, false, "")}, - {0x316, 220, 1, 1, f(Yes, false, "")}, - {0x31a, 232, 1, 1, f(Yes, false, "")}, - {0x31b, 216, 1, 1, f(Maybe, false, "")}, - {0x31c, 220, 1, 1, f(Yes, false, "")}, - {0x321, 202, 1, 1, f(Yes, false, "")}, - {0x323, 220, 1, 1, f(Maybe, false, "")}, - {0x327, 202, 1, 1, f(Maybe, false, "")}, - {0x329, 220, 1, 1, f(Yes, false, "")}, - {0x32d, 220, 1, 1, f(Maybe, false, "")}, - {0x32f, 220, 1, 1, f(Yes, false, "")}, - {0x330, 220, 1, 1, f(Maybe, false, "")}, - {0x332, 220, 1, 1, f(Yes, false, "")}, - {0x334, 1, 1, 1, f(Yes, false, "")}, - {0x338, 1, 1, 1, f(Maybe, false, "")}, - {0x339, 220, 1, 1, f(Yes, false, "")}, - {0x33d, 230, 1, 1, f(Yes, false, "")}, - {0x340, 230, 1, 1, f(No, false, "̀")}, - {0x341, 230, 1, 1, f(No, false, "́")}, - {0x342, 230, 1, 1, f(Maybe, false, "")}, - {0x343, 230, 1, 1, f(No, false, "̓")}, - {0x344, 230, 2, 2, f(No, false, "̈́")}, - {0x345, 240, 1, 1, f(Maybe, false, "")}, - {0x346, 230, 1, 1, f(Yes, false, "")}, - {0x347, 220, 1, 1, f(Yes, false, "")}, - {0x34a, 230, 1, 1, f(Yes, false, "")}, - {0x34d, 220, 1, 1, f(Yes, false, "")}, - {0x34f, 0, 0, 0, f(Yes, false, "")}, - {0x350, 230, 1, 1, f(Yes, false, "")}, - {0x353, 220, 1, 1, f(Yes, false, "")}, - {0x357, 230, 1, 1, f(Yes, false, "")}, - {0x358, 232, 1, 1, f(Yes, false, "")}, - {0x359, 220, 1, 1, f(Yes, false, "")}, - {0x35b, 230, 1, 1, f(Yes, false, "")}, - {0x35c, 233, 1, 1, f(Yes, false, "")}, - {0x35d, 234, 1, 1, f(Yes, false, "")}, - {0x35f, 233, 1, 1, f(Yes, false, "")}, - {0x360, 234, 1, 1, f(Yes, false, "")}, - {0x362, 233, 1, 1, f(Yes, false, "")}, - {0x363, 230, 1, 1, f(Yes, false, "")}, - {0x370, 0, 0, 0, f(Yes, false, "")}, - {0x374, 0, 0, 0, f(No, false, "ʹ")}, - {0x375, 0, 0, 0, f(Yes, false, "")}, - {0x37a, 0, 0, 1, g(Yes, No, false, false, "", " ͅ")}, - {0x37b, 0, 0, 0, f(Yes, false, "")}, - {0x37e, 0, 0, 0, f(No, false, ";")}, - {0x37f, 0, 0, 0, f(Yes, false, "")}, - {0x384, 0, 0, 1, g(Yes, No, false, false, "", " ́")}, - {0x385, 0, 0, 2, g(Yes, No, false, false, "΅", " ̈́")}, - {0x386, 0, 0, 1, f(Yes, false, "Ά")}, - {0x387, 0, 0, 0, f(No, false, "·")}, - {0x388, 0, 0, 1, f(Yes, false, "Έ")}, - {0x389, 0, 0, 1, f(Yes, false, "Ή")}, - {0x38a, 0, 0, 1, f(Yes, false, "Ί")}, - {0x38b, 0, 0, 0, f(Yes, false, "")}, - {0x38c, 0, 0, 1, f(Yes, false, "Ό")}, - {0x38d, 0, 0, 0, f(Yes, false, "")}, - {0x38e, 0, 0, 1, f(Yes, false, "Ύ")}, - {0x38f, 0, 0, 1, f(Yes, false, "Ώ")}, - {0x390, 0, 0, 2, f(Yes, false, "ΐ")}, - {0x391, 0, 0, 0, f(Yes, true, "")}, - {0x392, 0, 0, 0, f(Yes, false, "")}, - {0x395, 0, 0, 0, f(Yes, true, "")}, - {0x396, 0, 0, 0, f(Yes, false, "")}, - {0x397, 0, 0, 0, f(Yes, true, "")}, - {0x398, 0, 0, 0, f(Yes, false, "")}, - {0x399, 0, 0, 0, f(Yes, true, "")}, - {0x39a, 0, 0, 0, f(Yes, false, "")}, - {0x39f, 0, 0, 0, f(Yes, true, "")}, - {0x3a0, 0, 0, 0, f(Yes, false, "")}, - {0x3a1, 0, 0, 0, f(Yes, true, "")}, - {0x3a2, 0, 0, 0, f(Yes, false, "")}, - {0x3a5, 0, 0, 0, f(Yes, true, "")}, - {0x3a6, 0, 0, 0, f(Yes, false, "")}, - {0x3a9, 0, 0, 0, f(Yes, true, "")}, - {0x3aa, 0, 0, 1, f(Yes, false, "Ϊ")}, - {0x3ab, 0, 0, 1, f(Yes, false, "Ϋ")}, - {0x3ac, 0, 0, 1, f(Yes, true, "ά")}, - {0x3ad, 0, 0, 1, f(Yes, false, "έ")}, - {0x3ae, 0, 0, 1, f(Yes, true, "ή")}, - {0x3af, 0, 0, 1, f(Yes, false, "ί")}, - {0x3b0, 0, 0, 2, f(Yes, false, "ΰ")}, - {0x3b1, 0, 0, 0, f(Yes, true, "")}, - {0x3b2, 0, 0, 0, f(Yes, false, "")}, - {0x3b5, 0, 0, 0, f(Yes, true, "")}, - {0x3b6, 0, 0, 0, f(Yes, false, "")}, - {0x3b7, 0, 0, 0, f(Yes, true, "")}, - {0x3b8, 0, 0, 0, f(Yes, false, "")}, - {0x3b9, 0, 0, 0, f(Yes, true, "")}, - {0x3ba, 0, 0, 0, f(Yes, false, "")}, - {0x3bf, 0, 0, 0, f(Yes, true, "")}, - {0x3c0, 0, 0, 0, f(Yes, false, "")}, - {0x3c1, 0, 0, 0, f(Yes, true, "")}, - {0x3c2, 0, 0, 0, f(Yes, false, "")}, - {0x3c5, 0, 0, 0, f(Yes, true, "")}, - {0x3c6, 0, 0, 0, f(Yes, false, "")}, - {0x3c9, 0, 0, 0, f(Yes, true, "")}, - {0x3ca, 0, 0, 1, f(Yes, true, "ϊ")}, - {0x3cb, 0, 0, 1, f(Yes, true, "ϋ")}, - {0x3cc, 0, 0, 1, f(Yes, false, "ό")}, - {0x3cd, 0, 0, 1, f(Yes, false, "ύ")}, - {0x3ce, 0, 0, 1, f(Yes, true, "ώ")}, - {0x3cf, 0, 0, 0, f(Yes, false, "")}, - {0x3d0, 0, 0, 0, g(Yes, No, false, false, "", "β")}, - {0x3d1, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x3d2, 0, 0, 0, g(Yes, No, true, false, "", "Υ")}, - {0x3d3, 0, 0, 1, g(Yes, No, false, false, "ϓ", "Ύ")}, - {0x3d4, 0, 0, 1, g(Yes, No, false, false, "ϔ", "Ϋ")}, - {0x3d5, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x3d6, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x3d7, 0, 0, 0, f(Yes, false, "")}, - {0x3f0, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x3f1, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x3f2, 0, 0, 0, g(Yes, No, false, false, "", "ς")}, - {0x3f3, 0, 0, 0, f(Yes, false, "")}, - {0x3f4, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x3f5, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x3f6, 0, 0, 0, f(Yes, false, "")}, - {0x3f9, 0, 0, 0, g(Yes, No, false, false, "", "Σ")}, - {0x3fa, 0, 0, 0, f(Yes, false, "")}, - {0x400, 0, 0, 1, f(Yes, false, "Ѐ")}, - {0x401, 0, 0, 1, f(Yes, false, "Ё")}, - {0x402, 0, 0, 0, f(Yes, false, "")}, - {0x403, 0, 0, 1, f(Yes, false, "Ѓ")}, - {0x404, 0, 0, 0, f(Yes, false, "")}, - {0x406, 0, 0, 0, f(Yes, true, "")}, - {0x407, 0, 0, 1, f(Yes, false, "Ї")}, - {0x408, 0, 0, 0, f(Yes, false, "")}, - {0x40c, 0, 0, 1, f(Yes, false, "Ќ")}, - {0x40d, 0, 0, 1, f(Yes, false, "Ѝ")}, - {0x40e, 0, 0, 1, f(Yes, false, "Ў")}, - {0x40f, 0, 0, 0, f(Yes, false, "")}, - {0x410, 0, 0, 0, f(Yes, true, "")}, - {0x411, 0, 0, 0, f(Yes, false, "")}, - {0x413, 0, 0, 0, f(Yes, true, "")}, - {0x414, 0, 0, 0, f(Yes, false, "")}, - {0x415, 0, 0, 0, f(Yes, true, "")}, - {0x419, 0, 0, 1, f(Yes, false, "Й")}, - {0x41a, 0, 0, 0, f(Yes, true, "")}, - {0x41b, 0, 0, 0, f(Yes, false, "")}, - {0x41e, 0, 0, 0, f(Yes, true, "")}, - {0x41f, 0, 0, 0, f(Yes, false, "")}, - {0x423, 0, 0, 0, f(Yes, true, "")}, - {0x424, 0, 0, 0, f(Yes, false, "")}, - {0x427, 0, 0, 0, f(Yes, true, "")}, - {0x428, 0, 0, 0, f(Yes, false, "")}, - {0x42b, 0, 0, 0, f(Yes, true, "")}, - {0x42c, 0, 0, 0, f(Yes, false, "")}, - {0x42d, 0, 0, 0, f(Yes, true, "")}, - {0x42e, 0, 0, 0, f(Yes, false, "")}, - {0x430, 0, 0, 0, f(Yes, true, "")}, - {0x431, 0, 0, 0, f(Yes, false, "")}, - {0x433, 0, 0, 0, f(Yes, true, "")}, - {0x434, 0, 0, 0, f(Yes, false, "")}, - {0x435, 0, 0, 0, f(Yes, true, "")}, - {0x439, 0, 0, 1, f(Yes, false, "й")}, - {0x43a, 0, 0, 0, f(Yes, true, "")}, - {0x43b, 0, 0, 0, f(Yes, false, "")}, - {0x43e, 0, 0, 0, f(Yes, true, "")}, - {0x43f, 0, 0, 0, f(Yes, false, "")}, - {0x443, 0, 0, 0, f(Yes, true, "")}, - {0x444, 0, 0, 0, f(Yes, false, "")}, - {0x447, 0, 0, 0, f(Yes, true, "")}, - {0x448, 0, 0, 0, f(Yes, false, "")}, - {0x44b, 0, 0, 0, f(Yes, true, "")}, - {0x44c, 0, 0, 0, f(Yes, false, "")}, - {0x44d, 0, 0, 0, f(Yes, true, "")}, - {0x44e, 0, 0, 0, f(Yes, false, "")}, - {0x450, 0, 0, 1, f(Yes, false, "ѐ")}, - {0x451, 0, 0, 1, f(Yes, false, "ё")}, - {0x452, 0, 0, 0, f(Yes, false, "")}, - {0x453, 0, 0, 1, f(Yes, false, "ѓ")}, - {0x454, 0, 0, 0, f(Yes, false, "")}, - {0x456, 0, 0, 0, f(Yes, true, "")}, - {0x457, 0, 0, 1, f(Yes, false, "ї")}, - {0x458, 0, 0, 0, f(Yes, false, "")}, - {0x45c, 0, 0, 1, f(Yes, false, "ќ")}, - {0x45d, 0, 0, 1, f(Yes, false, "ѝ")}, - {0x45e, 0, 0, 1, f(Yes, false, "ў")}, - {0x45f, 0, 0, 0, f(Yes, false, "")}, - {0x474, 0, 0, 0, f(Yes, true, "")}, - {0x476, 0, 0, 1, f(Yes, false, "Ѷ")}, - {0x477, 0, 0, 1, f(Yes, false, "ѷ")}, - {0x478, 0, 0, 0, f(Yes, false, "")}, - {0x483, 230, 1, 1, f(Yes, false, "")}, - {0x488, 0, 0, 0, f(Yes, false, "")}, - {0x4c1, 0, 0, 1, f(Yes, false, "Ӂ")}, - {0x4c2, 0, 0, 1, f(Yes, false, "ӂ")}, - {0x4c3, 0, 0, 0, f(Yes, false, "")}, - {0x4d0, 0, 0, 1, f(Yes, false, "Ӑ")}, - {0x4d1, 0, 0, 1, f(Yes, false, "ӑ")}, - {0x4d2, 0, 0, 1, f(Yes, false, "Ӓ")}, - {0x4d3, 0, 0, 1, f(Yes, false, "ӓ")}, - {0x4d4, 0, 0, 0, f(Yes, false, "")}, - {0x4d6, 0, 0, 1, f(Yes, false, "Ӗ")}, - {0x4d7, 0, 0, 1, f(Yes, false, "ӗ")}, - {0x4d8, 0, 0, 0, f(Yes, true, "")}, - {0x4da, 0, 0, 1, f(Yes, false, "Ӛ")}, - {0x4db, 0, 0, 1, f(Yes, false, "ӛ")}, - {0x4dc, 0, 0, 1, f(Yes, false, "Ӝ")}, - {0x4dd, 0, 0, 1, f(Yes, false, "ӝ")}, - {0x4de, 0, 0, 1, f(Yes, false, "Ӟ")}, - {0x4df, 0, 0, 1, f(Yes, false, "ӟ")}, - {0x4e0, 0, 0, 0, f(Yes, false, "")}, - {0x4e2, 0, 0, 1, f(Yes, false, "Ӣ")}, - {0x4e3, 0, 0, 1, f(Yes, false, "ӣ")}, - {0x4e4, 0, 0, 1, f(Yes, false, "Ӥ")}, - {0x4e5, 0, 0, 1, f(Yes, false, "ӥ")}, - {0x4e6, 0, 0, 1, f(Yes, false, "Ӧ")}, - {0x4e7, 0, 0, 1, f(Yes, false, "ӧ")}, - {0x4e8, 0, 0, 0, f(Yes, true, "")}, - {0x4ea, 0, 0, 1, f(Yes, false, "Ӫ")}, - {0x4eb, 0, 0, 1, f(Yes, false, "ӫ")}, - {0x4ec, 0, 0, 1, f(Yes, false, "Ӭ")}, - {0x4ed, 0, 0, 1, f(Yes, false, "ӭ")}, - {0x4ee, 0, 0, 1, f(Yes, false, "Ӯ")}, - {0x4ef, 0, 0, 1, f(Yes, false, "ӯ")}, - {0x4f0, 0, 0, 1, f(Yes, false, "Ӱ")}, - {0x4f1, 0, 0, 1, f(Yes, false, "ӱ")}, - {0x4f2, 0, 0, 1, f(Yes, false, "Ӳ")}, - {0x4f3, 0, 0, 1, f(Yes, false, "ӳ")}, - {0x4f4, 0, 0, 1, f(Yes, false, "Ӵ")}, - {0x4f5, 0, 0, 1, f(Yes, false, "ӵ")}, - {0x4f6, 0, 0, 0, f(Yes, false, "")}, - {0x4f8, 0, 0, 1, f(Yes, false, "Ӹ")}, - {0x4f9, 0, 0, 1, f(Yes, false, "ӹ")}, - {0x4fa, 0, 0, 0, f(Yes, false, "")}, - {0x587, 0, 0, 0, g(Yes, No, false, false, "", "եւ")}, - {0x588, 0, 0, 0, f(Yes, false, "")}, - {0x591, 220, 1, 1, f(Yes, false, "")}, - {0x592, 230, 1, 1, f(Yes, false, "")}, - {0x596, 220, 1, 1, f(Yes, false, "")}, - {0x597, 230, 1, 1, f(Yes, false, "")}, - {0x59a, 222, 1, 1, f(Yes, false, "")}, - {0x59b, 220, 1, 1, f(Yes, false, "")}, - {0x59c, 230, 1, 1, f(Yes, false, "")}, - {0x5a2, 220, 1, 1, f(Yes, false, "")}, - {0x5a8, 230, 1, 1, f(Yes, false, "")}, - {0x5aa, 220, 1, 1, f(Yes, false, "")}, - {0x5ab, 230, 1, 1, f(Yes, false, "")}, - {0x5ad, 222, 1, 1, f(Yes, false, "")}, - {0x5ae, 228, 1, 1, f(Yes, false, "")}, - {0x5af, 230, 1, 1, f(Yes, false, "")}, - {0x5b0, 10, 1, 1, f(Yes, false, "")}, - {0x5b1, 11, 1, 1, f(Yes, false, "")}, - {0x5b2, 12, 1, 1, f(Yes, false, "")}, - {0x5b3, 13, 1, 1, f(Yes, false, "")}, - {0x5b4, 14, 1, 1, f(Yes, false, "")}, - {0x5b5, 15, 1, 1, f(Yes, false, "")}, - {0x5b6, 16, 1, 1, f(Yes, false, "")}, - {0x5b7, 17, 1, 1, f(Yes, false, "")}, - {0x5b8, 18, 1, 1, f(Yes, false, "")}, - {0x5b9, 19, 1, 1, f(Yes, false, "")}, - {0x5bb, 20, 1, 1, f(Yes, false, "")}, - {0x5bc, 21, 1, 1, f(Yes, false, "")}, - {0x5bd, 22, 1, 1, f(Yes, false, "")}, - {0x5be, 0, 0, 0, f(Yes, false, "")}, - {0x5bf, 23, 1, 1, f(Yes, false, "")}, - {0x5c0, 0, 0, 0, f(Yes, false, "")}, - {0x5c1, 24, 1, 1, f(Yes, false, "")}, - {0x5c2, 25, 1, 1, f(Yes, false, "")}, - {0x5c3, 0, 0, 0, f(Yes, false, "")}, - {0x5c4, 230, 1, 1, f(Yes, false, "")}, - {0x5c5, 220, 1, 1, f(Yes, false, "")}, - {0x5c6, 0, 0, 0, f(Yes, false, "")}, - {0x5c7, 18, 1, 1, f(Yes, false, "")}, - {0x5c8, 0, 0, 0, f(Yes, false, "")}, - {0x610, 230, 1, 1, f(Yes, false, "")}, - {0x618, 30, 1, 1, f(Yes, false, "")}, - {0x619, 31, 1, 1, f(Yes, false, "")}, - {0x61a, 32, 1, 1, f(Yes, false, "")}, - {0x61b, 0, 0, 0, f(Yes, false, "")}, - {0x622, 0, 0, 1, f(Yes, false, "آ")}, - {0x623, 0, 0, 1, f(Yes, false, "أ")}, - {0x624, 0, 0, 1, f(Yes, false, "ؤ")}, - {0x625, 0, 0, 1, f(Yes, false, "إ")}, - {0x626, 0, 0, 1, f(Yes, false, "ئ")}, - {0x627, 0, 0, 0, f(Yes, true, "")}, - {0x628, 0, 0, 0, f(Yes, false, "")}, - {0x648, 0, 0, 0, f(Yes, true, "")}, - {0x649, 0, 0, 0, f(Yes, false, "")}, - {0x64a, 0, 0, 0, f(Yes, true, "")}, - {0x64b, 27, 1, 1, f(Yes, false, "")}, - {0x64c, 28, 1, 1, f(Yes, false, "")}, - {0x64d, 29, 1, 1, f(Yes, false, "")}, - {0x64e, 30, 1, 1, f(Yes, false, "")}, - {0x64f, 31, 1, 1, f(Yes, false, "")}, - {0x650, 32, 1, 1, f(Yes, false, "")}, - {0x651, 33, 1, 1, f(Yes, false, "")}, - {0x652, 34, 1, 1, f(Yes, false, "")}, - {0x653, 230, 1, 1, f(Maybe, false, "")}, - {0x655, 220, 1, 1, f(Maybe, false, "")}, - {0x656, 220, 1, 1, f(Yes, false, "")}, - {0x657, 230, 1, 1, f(Yes, false, "")}, - {0x65c, 220, 1, 1, f(Yes, false, "")}, - {0x65d, 230, 1, 1, f(Yes, false, "")}, - {0x65f, 220, 1, 1, f(Yes, false, "")}, - {0x660, 0, 0, 0, f(Yes, false, "")}, - {0x670, 35, 1, 1, f(Yes, false, "")}, - {0x671, 0, 0, 0, f(Yes, false, "")}, - {0x675, 0, 0, 0, g(Yes, No, false, false, "", "اٴ")}, - {0x676, 0, 0, 0, g(Yes, No, false, false, "", "وٴ")}, - {0x677, 0, 0, 0, g(Yes, No, false, false, "", "ۇٴ")}, - {0x678, 0, 0, 0, g(Yes, No, false, false, "", "يٴ")}, - {0x679, 0, 0, 0, f(Yes, false, "")}, - {0x6c0, 0, 0, 1, f(Yes, false, "ۀ")}, - {0x6c1, 0, 0, 0, f(Yes, true, "")}, - {0x6c2, 0, 0, 1, f(Yes, false, "ۂ")}, - {0x6c3, 0, 0, 0, f(Yes, false, "")}, - {0x6d2, 0, 0, 0, f(Yes, true, "")}, - {0x6d3, 0, 0, 1, f(Yes, false, "ۓ")}, - {0x6d4, 0, 0, 0, f(Yes, false, "")}, - {0x6d5, 0, 0, 0, f(Yes, true, "")}, - {0x6d6, 230, 1, 1, f(Yes, false, "")}, - {0x6dd, 0, 0, 0, f(Yes, false, "")}, - {0x6df, 230, 1, 1, f(Yes, false, "")}, - {0x6e3, 220, 1, 1, f(Yes, false, "")}, - {0x6e4, 230, 1, 1, f(Yes, false, "")}, - {0x6e5, 0, 0, 0, f(Yes, false, "")}, - {0x6e7, 230, 1, 1, f(Yes, false, "")}, - {0x6e9, 0, 0, 0, f(Yes, false, "")}, - {0x6ea, 220, 1, 1, f(Yes, false, "")}, - {0x6eb, 230, 1, 1, f(Yes, false, "")}, - {0x6ed, 220, 1, 1, f(Yes, false, "")}, - {0x6ee, 0, 0, 0, f(Yes, false, "")}, - {0x711, 36, 1, 1, f(Yes, false, "")}, - {0x712, 0, 0, 0, f(Yes, false, "")}, - {0x730, 230, 1, 1, f(Yes, false, "")}, - {0x731, 220, 1, 1, f(Yes, false, "")}, - {0x732, 230, 1, 1, f(Yes, false, "")}, - {0x734, 220, 1, 1, f(Yes, false, "")}, - {0x735, 230, 1, 1, f(Yes, false, "")}, - {0x737, 220, 1, 1, f(Yes, false, "")}, - {0x73a, 230, 1, 1, f(Yes, false, "")}, - {0x73b, 220, 1, 1, f(Yes, false, "")}, - {0x73d, 230, 1, 1, f(Yes, false, "")}, - {0x73e, 220, 1, 1, f(Yes, false, "")}, - {0x73f, 230, 1, 1, f(Yes, false, "")}, - {0x742, 220, 1, 1, f(Yes, false, "")}, - {0x743, 230, 1, 1, f(Yes, false, "")}, - {0x744, 220, 1, 1, f(Yes, false, "")}, - {0x745, 230, 1, 1, f(Yes, false, "")}, - {0x746, 220, 1, 1, f(Yes, false, "")}, - {0x747, 230, 1, 1, f(Yes, false, "")}, - {0x748, 220, 1, 1, f(Yes, false, "")}, - {0x749, 230, 1, 1, f(Yes, false, "")}, - {0x74b, 0, 0, 0, f(Yes, false, "")}, - {0x7eb, 230, 1, 1, f(Yes, false, "")}, - {0x7f2, 220, 1, 1, f(Yes, false, "")}, - {0x7f3, 230, 1, 1, f(Yes, false, "")}, - {0x7f4, 0, 0, 0, f(Yes, false, "")}, - {0x816, 230, 1, 1, f(Yes, false, "")}, - {0x81a, 0, 0, 0, f(Yes, false, "")}, - {0x81b, 230, 1, 1, f(Yes, false, "")}, - {0x824, 0, 0, 0, f(Yes, false, "")}, - {0x825, 230, 1, 1, f(Yes, false, "")}, - {0x828, 0, 0, 0, f(Yes, false, "")}, - {0x829, 230, 1, 1, f(Yes, false, "")}, - {0x82e, 0, 0, 0, f(Yes, false, "")}, - {0x859, 220, 1, 1, f(Yes, false, "")}, - {0x85c, 0, 0, 0, f(Yes, false, "")}, - {0x8d4, 230, 1, 1, f(Yes, false, "")}, - {0x8e2, 0, 0, 0, f(Yes, false, "")}, - {0x8e3, 220, 1, 1, f(Yes, false, "")}, - {0x8e4, 230, 1, 1, f(Yes, false, "")}, - {0x8e6, 220, 1, 1, f(Yes, false, "")}, - {0x8e7, 230, 1, 1, f(Yes, false, "")}, - {0x8e9, 220, 1, 1, f(Yes, false, "")}, - {0x8ea, 230, 1, 1, f(Yes, false, "")}, - {0x8ed, 220, 1, 1, f(Yes, false, "")}, - {0x8f0, 27, 1, 1, f(Yes, false, "")}, - {0x8f1, 28, 1, 1, f(Yes, false, "")}, - {0x8f2, 29, 1, 1, f(Yes, false, "")}, - {0x8f3, 230, 1, 1, f(Yes, false, "")}, - {0x8f6, 220, 1, 1, f(Yes, false, "")}, - {0x8f7, 230, 1, 1, f(Yes, false, "")}, - {0x8f9, 220, 1, 1, f(Yes, false, "")}, - {0x8fb, 230, 1, 1, f(Yes, false, "")}, - {0x900, 0, 0, 0, f(Yes, false, "")}, - {0x928, 0, 0, 0, f(Yes, true, "")}, - {0x929, 0, 0, 1, f(Yes, false, "ऩ")}, - {0x92a, 0, 0, 0, f(Yes, false, "")}, - {0x930, 0, 0, 0, f(Yes, true, "")}, - {0x931, 0, 0, 1, f(Yes, false, "ऱ")}, - {0x932, 0, 0, 0, f(Yes, false, "")}, - {0x933, 0, 0, 0, f(Yes, true, "")}, - {0x934, 0, 0, 1, f(Yes, false, "ऴ")}, - {0x935, 0, 0, 0, f(Yes, false, "")}, - {0x93c, 7, 1, 1, f(Maybe, false, "")}, - {0x93d, 0, 0, 0, f(Yes, false, "")}, - {0x94d, 9, 1, 1, f(Yes, false, "")}, - {0x94e, 0, 0, 0, f(Yes, false, "")}, - {0x951, 230, 1, 1, f(Yes, false, "")}, - {0x952, 220, 1, 1, f(Yes, false, "")}, - {0x953, 230, 1, 1, f(Yes, false, "")}, - {0x955, 0, 0, 0, f(Yes, false, "")}, - {0x958, 0, 0, 1, f(No, false, "क़")}, - {0x959, 0, 0, 1, f(No, false, "ख़")}, - {0x95a, 0, 0, 1, f(No, false, "ग़")}, - {0x95b, 0, 0, 1, f(No, false, "ज़")}, - {0x95c, 0, 0, 1, f(No, false, "ड़")}, - {0x95d, 0, 0, 1, f(No, false, "ढ़")}, - {0x95e, 0, 0, 1, f(No, false, "फ़")}, - {0x95f, 0, 0, 1, f(No, false, "य़")}, - {0x960, 0, 0, 0, f(Yes, false, "")}, - {0x9bc, 7, 1, 1, f(Yes, false, "")}, - {0x9bd, 0, 0, 0, f(Yes, false, "")}, - {0x9be, 0, 1, 1, f(Maybe, false, "")}, - {0x9bf, 0, 0, 0, f(Yes, false, "")}, - {0x9c7, 0, 0, 0, f(Yes, true, "")}, - {0x9c8, 0, 0, 0, f(Yes, false, "")}, - {0x9cb, 0, 0, 1, f(Yes, false, "ো")}, - {0x9cc, 0, 0, 1, f(Yes, false, "ৌ")}, - {0x9cd, 9, 1, 1, f(Yes, false, "")}, - {0x9ce, 0, 0, 0, f(Yes, false, "")}, - {0x9d7, 0, 1, 1, f(Maybe, false, "")}, - {0x9d8, 0, 0, 0, f(Yes, false, "")}, - {0x9dc, 0, 0, 1, f(No, false, "ড়")}, - {0x9dd, 0, 0, 1, f(No, false, "ঢ়")}, - {0x9de, 0, 0, 0, f(Yes, false, "")}, - {0x9df, 0, 0, 1, f(No, false, "য়")}, - {0x9e0, 0, 0, 0, f(Yes, false, "")}, - {0xa33, 0, 0, 1, f(No, false, "ਲ਼")}, - {0xa34, 0, 0, 0, f(Yes, false, "")}, - {0xa36, 0, 0, 1, f(No, false, "ਸ਼")}, - {0xa37, 0, 0, 0, f(Yes, false, "")}, - {0xa3c, 7, 1, 1, f(Yes, false, "")}, - {0xa3d, 0, 0, 0, f(Yes, false, "")}, - {0xa4d, 9, 1, 1, f(Yes, false, "")}, - {0xa4e, 0, 0, 0, f(Yes, false, "")}, - {0xa59, 0, 0, 1, f(No, false, "ਖ਼")}, - {0xa5a, 0, 0, 1, f(No, false, "ਗ਼")}, - {0xa5b, 0, 0, 1, f(No, false, "ਜ਼")}, - {0xa5c, 0, 0, 0, f(Yes, false, "")}, - {0xa5e, 0, 0, 1, f(No, false, "ਫ਼")}, - {0xa5f, 0, 0, 0, f(Yes, false, "")}, - {0xabc, 7, 1, 1, f(Yes, false, "")}, - {0xabd, 0, 0, 0, f(Yes, false, "")}, - {0xacd, 9, 1, 1, f(Yes, false, "")}, - {0xace, 0, 0, 0, f(Yes, false, "")}, - {0xb3c, 7, 1, 1, f(Yes, false, "")}, - {0xb3d, 0, 0, 0, f(Yes, false, "")}, - {0xb3e, 0, 1, 1, f(Maybe, false, "")}, - {0xb3f, 0, 0, 0, f(Yes, false, "")}, - {0xb47, 0, 0, 0, f(Yes, true, "")}, - {0xb48, 0, 0, 1, f(Yes, false, "ୈ")}, - {0xb49, 0, 0, 0, f(Yes, false, "")}, - {0xb4b, 0, 0, 1, f(Yes, false, "ୋ")}, - {0xb4c, 0, 0, 1, f(Yes, false, "ୌ")}, - {0xb4d, 9, 1, 1, f(Yes, false, "")}, - {0xb4e, 0, 0, 0, f(Yes, false, "")}, - {0xb56, 0, 1, 1, f(Maybe, false, "")}, - {0xb58, 0, 0, 0, f(Yes, false, "")}, - {0xb5c, 0, 0, 1, f(No, false, "ଡ଼")}, - {0xb5d, 0, 0, 1, f(No, false, "ଢ଼")}, - {0xb5e, 0, 0, 0, f(Yes, false, "")}, - {0xb92, 0, 0, 0, f(Yes, true, "")}, - {0xb93, 0, 0, 0, f(Yes, false, "")}, - {0xb94, 0, 0, 1, f(Yes, false, "ஔ")}, - {0xb95, 0, 0, 0, f(Yes, false, "")}, - {0xbbe, 0, 1, 1, f(Maybe, false, "")}, - {0xbbf, 0, 0, 0, f(Yes, false, "")}, - {0xbc6, 0, 0, 0, f(Yes, true, "")}, - {0xbc8, 0, 0, 0, f(Yes, false, "")}, - {0xbca, 0, 0, 1, f(Yes, false, "ொ")}, - {0xbcb, 0, 0, 1, f(Yes, false, "ோ")}, - {0xbcc, 0, 0, 1, f(Yes, false, "ௌ")}, - {0xbcd, 9, 1, 1, f(Yes, false, "")}, - {0xbce, 0, 0, 0, f(Yes, false, "")}, - {0xbd7, 0, 1, 1, f(Maybe, false, "")}, - {0xbd8, 0, 0, 0, f(Yes, false, "")}, - {0xc46, 0, 0, 0, f(Yes, true, "")}, - {0xc47, 0, 0, 0, f(Yes, false, "")}, - {0xc48, 0, 0, 1, f(Yes, false, "ై")}, - {0xc49, 0, 0, 0, f(Yes, false, "")}, - {0xc4d, 9, 1, 1, f(Yes, false, "")}, - {0xc4e, 0, 0, 0, f(Yes, false, "")}, - {0xc55, 84, 1, 1, f(Yes, false, "")}, - {0xc56, 91, 1, 1, f(Maybe, false, "")}, - {0xc57, 0, 0, 0, f(Yes, false, "")}, - {0xcbc, 7, 1, 1, f(Yes, false, "")}, - {0xcbd, 0, 0, 0, f(Yes, false, "")}, - {0xcbf, 0, 0, 0, f(Yes, true, "")}, - {0xcc0, 0, 0, 1, f(Yes, false, "ೀ")}, - {0xcc1, 0, 0, 0, f(Yes, false, "")}, - {0xcc2, 0, 1, 1, f(Maybe, false, "")}, - {0xcc3, 0, 0, 0, f(Yes, false, "")}, - {0xcc6, 0, 0, 0, f(Yes, true, "")}, - {0xcc7, 0, 0, 1, f(Yes, false, "ೇ")}, - {0xcc8, 0, 0, 1, f(Yes, false, "ೈ")}, - {0xcc9, 0, 0, 0, f(Yes, false, "")}, - {0xcca, 0, 0, 1, f(Yes, true, "ೊ")}, - {0xccb, 0, 0, 2, f(Yes, false, "ೋ")}, - {0xccc, 0, 0, 0, f(Yes, false, "")}, - {0xccd, 9, 1, 1, f(Yes, false, "")}, - {0xcce, 0, 0, 0, f(Yes, false, "")}, - {0xcd5, 0, 1, 1, f(Maybe, false, "")}, - {0xcd7, 0, 0, 0, f(Yes, false, "")}, - {0xd3e, 0, 1, 1, f(Maybe, false, "")}, - {0xd3f, 0, 0, 0, f(Yes, false, "")}, - {0xd46, 0, 0, 0, f(Yes, true, "")}, - {0xd48, 0, 0, 0, f(Yes, false, "")}, - {0xd4a, 0, 0, 1, f(Yes, false, "ൊ")}, - {0xd4b, 0, 0, 1, f(Yes, false, "ോ")}, - {0xd4c, 0, 0, 1, f(Yes, false, "ൌ")}, - {0xd4d, 9, 1, 1, f(Yes, false, "")}, - {0xd4e, 0, 0, 0, f(Yes, false, "")}, - {0xd57, 0, 1, 1, f(Maybe, false, "")}, - {0xd58, 0, 0, 0, f(Yes, false, "")}, - {0xdca, 9, 1, 1, f(Maybe, false, "")}, - {0xdcb, 0, 0, 0, f(Yes, false, "")}, - {0xdcf, 0, 1, 1, f(Maybe, false, "")}, - {0xdd0, 0, 0, 0, f(Yes, false, "")}, - {0xdd9, 0, 0, 0, f(Yes, true, "")}, - {0xdda, 0, 0, 1, f(Yes, false, "ේ")}, - {0xddb, 0, 0, 0, f(Yes, false, "")}, - {0xddc, 0, 0, 1, f(Yes, true, "ො")}, - {0xddd, 0, 0, 2, f(Yes, false, "ෝ")}, - {0xdde, 0, 0, 1, f(Yes, false, "ෞ")}, - {0xddf, 0, 1, 1, f(Maybe, false, "")}, - {0xde0, 0, 0, 0, f(Yes, false, "")}, - {0xe33, 0, 0, 0, g(Yes, No, false, false, "", "ํา")}, - {0xe34, 0, 0, 0, f(Yes, false, "")}, - {0xe38, 103, 1, 1, f(Yes, false, "")}, - {0xe3a, 9, 1, 1, f(Yes, false, "")}, - {0xe3b, 0, 0, 0, f(Yes, false, "")}, - {0xe48, 107, 1, 1, f(Yes, false, "")}, - {0xe4c, 0, 0, 0, f(Yes, false, "")}, - {0xeb3, 0, 0, 0, g(Yes, No, false, false, "", "ໍາ")}, - {0xeb4, 0, 0, 0, f(Yes, false, "")}, - {0xeb8, 118, 1, 1, f(Yes, false, "")}, - {0xeba, 0, 0, 0, f(Yes, false, "")}, - {0xec8, 122, 1, 1, f(Yes, false, "")}, - {0xecc, 0, 0, 0, f(Yes, false, "")}, - {0xedc, 0, 0, 0, g(Yes, No, false, false, "", "ຫນ")}, - {0xedd, 0, 0, 0, g(Yes, No, false, false, "", "ຫມ")}, - {0xede, 0, 0, 0, f(Yes, false, "")}, - {0xf0c, 0, 0, 0, g(Yes, No, false, false, "", "་")}, - {0xf0d, 0, 0, 0, f(Yes, false, "")}, - {0xf18, 220, 1, 1, f(Yes, false, "")}, - {0xf1a, 0, 0, 0, f(Yes, false, "")}, - {0xf35, 220, 1, 1, f(Yes, false, "")}, - {0xf36, 0, 0, 0, f(Yes, false, "")}, - {0xf37, 220, 1, 1, f(Yes, false, "")}, - {0xf38, 0, 0, 0, f(Yes, false, "")}, - {0xf39, 216, 1, 1, f(Yes, false, "")}, - {0xf3a, 0, 0, 0, f(Yes, false, "")}, - {0xf43, 0, 0, 0, f(No, false, "གྷ")}, - {0xf44, 0, 0, 0, f(Yes, false, "")}, - {0xf4d, 0, 0, 0, f(No, false, "ཌྷ")}, - {0xf4e, 0, 0, 0, f(Yes, false, "")}, - {0xf52, 0, 0, 0, f(No, false, "དྷ")}, - {0xf53, 0, 0, 0, f(Yes, false, "")}, - {0xf57, 0, 0, 0, f(No, false, "བྷ")}, - {0xf58, 0, 0, 0, f(Yes, false, "")}, - {0xf5c, 0, 0, 0, f(No, false, "ཛྷ")}, - {0xf5d, 0, 0, 0, f(Yes, false, "")}, - {0xf69, 0, 0, 0, f(No, false, "ཀྵ")}, - {0xf6a, 0, 0, 0, f(Yes, false, "")}, - {0xf71, 129, 1, 1, f(Yes, false, "")}, - {0xf72, 130, 1, 1, f(Yes, false, "")}, - {0xf73, 0, 2, 2, f(No, false, "ཱི")}, - {0xf74, 132, 1, 1, f(Yes, false, "")}, - {0xf75, 0, 2, 2, f(No, false, "ཱུ")}, - {0xf76, 0, 0, 1, f(No, false, "ྲྀ")}, - {0xf77, 0, 0, 2, g(Yes, No, false, false, "", "ྲཱྀ")}, - {0xf78, 0, 0, 1, f(No, false, "ླྀ")}, - {0xf79, 0, 0, 2, g(Yes, No, false, false, "", "ླཱྀ")}, - {0xf7a, 130, 1, 1, f(Yes, false, "")}, - {0xf7e, 0, 0, 0, f(Yes, false, "")}, - {0xf80, 130, 1, 1, f(Yes, false, "")}, - {0xf81, 0, 2, 2, f(No, false, "ཱྀ")}, - {0xf82, 230, 1, 1, f(Yes, false, "")}, - {0xf84, 9, 1, 1, f(Yes, false, "")}, - {0xf85, 0, 0, 0, f(Yes, false, "")}, - {0xf86, 230, 1, 1, f(Yes, false, "")}, - {0xf88, 0, 0, 0, f(Yes, false, "")}, - {0xf93, 0, 0, 0, f(No, false, "ྒྷ")}, - {0xf94, 0, 0, 0, f(Yes, false, "")}, - {0xf9d, 0, 0, 0, f(No, false, "ྜྷ")}, - {0xf9e, 0, 0, 0, f(Yes, false, "")}, - {0xfa2, 0, 0, 0, f(No, false, "ྡྷ")}, - {0xfa3, 0, 0, 0, f(Yes, false, "")}, - {0xfa7, 0, 0, 0, f(No, false, "ྦྷ")}, - {0xfa8, 0, 0, 0, f(Yes, false, "")}, - {0xfac, 0, 0, 0, f(No, false, "ྫྷ")}, - {0xfad, 0, 0, 0, f(Yes, false, "")}, - {0xfb9, 0, 0, 0, f(No, false, "ྐྵ")}, - {0xfba, 0, 0, 0, f(Yes, false, "")}, - {0xfc6, 220, 1, 1, f(Yes, false, "")}, - {0xfc7, 0, 0, 0, f(Yes, false, "")}, - {0x1025, 0, 0, 0, f(Yes, true, "")}, - {0x1026, 0, 0, 1, f(Yes, false, "ဦ")}, - {0x1027, 0, 0, 0, f(Yes, false, "")}, - {0x102e, 0, 1, 1, f(Maybe, false, "")}, - {0x102f, 0, 0, 0, f(Yes, false, "")}, - {0x1037, 7, 1, 1, f(Yes, false, "")}, - {0x1038, 0, 0, 0, f(Yes, false, "")}, - {0x1039, 9, 1, 1, f(Yes, false, "")}, - {0x103b, 0, 0, 0, f(Yes, false, "")}, - {0x108d, 220, 1, 1, f(Yes, false, "")}, - {0x108e, 0, 0, 0, f(Yes, false, "")}, - {0x10fc, 0, 0, 0, g(Yes, No, false, false, "", "ნ")}, - {0x10fd, 0, 0, 0, f(Yes, false, "")}, - {0x1100, 0, 0, 0, f(Yes, true, "")}, - {0x1113, 0, 0, 0, f(Yes, false, "")}, - {0x1161, 0, 1, 1, f(Maybe, true, "")}, - {0x1176, 0, 0, 0, f(Yes, false, "")}, - {0x11a8, 0, 1, 1, f(Maybe, false, "")}, - {0x11c3, 0, 0, 0, f(Yes, false, "")}, - {0x135d, 230, 1, 1, f(Yes, false, "")}, - {0x1360, 0, 0, 0, f(Yes, false, "")}, - {0x1714, 9, 1, 1, f(Yes, false, "")}, - {0x1715, 0, 0, 0, f(Yes, false, "")}, - {0x1734, 9, 1, 1, f(Yes, false, "")}, - {0x1735, 0, 0, 0, f(Yes, false, "")}, - {0x17d2, 9, 1, 1, f(Yes, false, "")}, - {0x17d3, 0, 0, 0, f(Yes, false, "")}, - {0x17dd, 230, 1, 1, f(Yes, false, "")}, - {0x17de, 0, 0, 0, f(Yes, false, "")}, - {0x18a9, 228, 1, 1, f(Yes, false, "")}, - {0x18aa, 0, 0, 0, f(Yes, false, "")}, - {0x1939, 222, 1, 1, f(Yes, false, "")}, - {0x193a, 230, 1, 1, f(Yes, false, "")}, - {0x193b, 220, 1, 1, f(Yes, false, "")}, - {0x193c, 0, 0, 0, f(Yes, false, "")}, - {0x1a17, 230, 1, 1, f(Yes, false, "")}, - {0x1a18, 220, 1, 1, f(Yes, false, "")}, - {0x1a19, 0, 0, 0, f(Yes, false, "")}, - {0x1a60, 9, 1, 1, f(Yes, false, "")}, - {0x1a61, 0, 0, 0, f(Yes, false, "")}, - {0x1a75, 230, 1, 1, f(Yes, false, "")}, - {0x1a7d, 0, 0, 0, f(Yes, false, "")}, - {0x1a7f, 220, 1, 1, f(Yes, false, "")}, - {0x1a80, 0, 0, 0, f(Yes, false, "")}, - {0x1ab0, 230, 1, 1, f(Yes, false, "")}, - {0x1ab5, 220, 1, 1, f(Yes, false, "")}, - {0x1abb, 230, 1, 1, f(Yes, false, "")}, - {0x1abd, 220, 1, 1, f(Yes, false, "")}, - {0x1abe, 0, 0, 0, f(Yes, false, "")}, - {0x1b05, 0, 0, 0, f(Yes, true, "")}, - {0x1b06, 0, 0, 1, f(Yes, false, "ᬆ")}, - {0x1b07, 0, 0, 0, f(Yes, true, "")}, - {0x1b08, 0, 0, 1, f(Yes, false, "ᬈ")}, - {0x1b09, 0, 0, 0, f(Yes, true, "")}, - {0x1b0a, 0, 0, 1, f(Yes, false, "ᬊ")}, - {0x1b0b, 0, 0, 0, f(Yes, true, "")}, - {0x1b0c, 0, 0, 1, f(Yes, false, "ᬌ")}, - {0x1b0d, 0, 0, 0, f(Yes, true, "")}, - {0x1b0e, 0, 0, 1, f(Yes, false, "ᬎ")}, - {0x1b0f, 0, 0, 0, f(Yes, false, "")}, - {0x1b11, 0, 0, 0, f(Yes, true, "")}, - {0x1b12, 0, 0, 1, f(Yes, false, "ᬒ")}, - {0x1b13, 0, 0, 0, f(Yes, false, "")}, - {0x1b34, 7, 1, 1, f(Yes, false, "")}, - {0x1b35, 0, 1, 1, f(Maybe, false, "")}, - {0x1b36, 0, 0, 0, f(Yes, false, "")}, - {0x1b3a, 0, 0, 0, f(Yes, true, "")}, - {0x1b3b, 0, 0, 1, f(Yes, false, "ᬻ")}, - {0x1b3c, 0, 0, 0, f(Yes, true, "")}, - {0x1b3d, 0, 0, 1, f(Yes, false, "ᬽ")}, - {0x1b3e, 0, 0, 0, f(Yes, true, "")}, - {0x1b40, 0, 0, 1, f(Yes, false, "ᭀ")}, - {0x1b41, 0, 0, 1, f(Yes, false, "ᭁ")}, - {0x1b42, 0, 0, 0, f(Yes, true, "")}, - {0x1b43, 0, 0, 1, f(Yes, false, "ᭃ")}, - {0x1b44, 9, 1, 1, f(Yes, false, "")}, - {0x1b45, 0, 0, 0, f(Yes, false, "")}, - {0x1b6b, 230, 1, 1, f(Yes, false, "")}, - {0x1b6c, 220, 1, 1, f(Yes, false, "")}, - {0x1b6d, 230, 1, 1, f(Yes, false, "")}, - {0x1b74, 0, 0, 0, f(Yes, false, "")}, - {0x1baa, 9, 1, 1, f(Yes, false, "")}, - {0x1bac, 0, 0, 0, f(Yes, false, "")}, - {0x1be6, 7, 1, 1, f(Yes, false, "")}, - {0x1be7, 0, 0, 0, f(Yes, false, "")}, - {0x1bf2, 9, 1, 1, f(Yes, false, "")}, - {0x1bf4, 0, 0, 0, f(Yes, false, "")}, - {0x1c37, 7, 1, 1, f(Yes, false, "")}, - {0x1c38, 0, 0, 0, f(Yes, false, "")}, - {0x1cd0, 230, 1, 1, f(Yes, false, "")}, - {0x1cd3, 0, 0, 0, f(Yes, false, "")}, - {0x1cd4, 1, 1, 1, f(Yes, false, "")}, - {0x1cd5, 220, 1, 1, f(Yes, false, "")}, - {0x1cda, 230, 1, 1, f(Yes, false, "")}, - {0x1cdc, 220, 1, 1, f(Yes, false, "")}, - {0x1ce0, 230, 1, 1, f(Yes, false, "")}, - {0x1ce1, 0, 0, 0, f(Yes, false, "")}, - {0x1ce2, 1, 1, 1, f(Yes, false, "")}, - {0x1ce9, 0, 0, 0, f(Yes, false, "")}, - {0x1ced, 220, 1, 1, f(Yes, false, "")}, - {0x1cee, 0, 0, 0, f(Yes, false, "")}, - {0x1cf4, 230, 1, 1, f(Yes, false, "")}, - {0x1cf5, 0, 0, 0, f(Yes, false, "")}, - {0x1cf8, 230, 1, 1, f(Yes, false, "")}, - {0x1cfa, 0, 0, 0, f(Yes, false, "")}, - {0x1d2c, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d2d, 0, 0, 0, g(Yes, No, false, false, "", "Æ")}, - {0x1d2e, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d2f, 0, 0, 0, f(Yes, false, "")}, - {0x1d30, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d31, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d32, 0, 0, 0, g(Yes, No, false, false, "", "Ǝ")}, - {0x1d33, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d34, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d35, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d36, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d37, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d38, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d39, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d3a, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d3b, 0, 0, 0, f(Yes, false, "")}, - {0x1d3c, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d3d, 0, 0, 0, g(Yes, No, false, false, "", "Ȣ")}, - {0x1d3e, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d3f, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d40, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d41, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d42, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d43, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d44, 0, 0, 0, g(Yes, No, false, false, "", "ɐ")}, - {0x1d45, 0, 0, 0, g(Yes, No, false, false, "", "ɑ")}, - {0x1d46, 0, 0, 0, g(Yes, No, false, false, "", "ᴂ")}, - {0x1d47, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d48, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d49, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d4a, 0, 0, 0, g(Yes, No, false, false, "", "ə")}, - {0x1d4b, 0, 0, 0, g(Yes, No, false, false, "", "ɛ")}, - {0x1d4c, 0, 0, 0, g(Yes, No, false, false, "", "ɜ")}, - {0x1d4d, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d4e, 0, 0, 0, f(Yes, false, "")}, - {0x1d4f, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d50, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d51, 0, 0, 0, g(Yes, No, false, false, "", "ŋ")}, - {0x1d52, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d53, 0, 0, 0, g(Yes, No, false, false, "", "ɔ")}, - {0x1d54, 0, 0, 0, g(Yes, No, false, false, "", "ᴖ")}, - {0x1d55, 0, 0, 0, g(Yes, No, false, false, "", "ᴗ")}, - {0x1d56, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d57, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d58, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d59, 0, 0, 0, g(Yes, No, false, false, "", "ᴝ")}, - {0x1d5a, 0, 0, 0, g(Yes, No, false, false, "", "ɯ")}, - {0x1d5b, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d5c, 0, 0, 0, g(Yes, No, false, false, "", "ᴥ")}, - {0x1d5d, 0, 0, 0, g(Yes, No, false, false, "", "β")}, - {0x1d5e, 0, 0, 0, g(Yes, No, false, false, "", "γ")}, - {0x1d5f, 0, 0, 0, g(Yes, No, false, false, "", "δ")}, - {0x1d60, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d61, 0, 0, 0, g(Yes, No, false, false, "", "χ")}, - {0x1d62, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d63, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d64, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d65, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d66, 0, 0, 0, g(Yes, No, false, false, "", "β")}, - {0x1d67, 0, 0, 0, g(Yes, No, false, false, "", "γ")}, - {0x1d68, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d69, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d6a, 0, 0, 0, g(Yes, No, false, false, "", "χ")}, - {0x1d6b, 0, 0, 0, f(Yes, false, "")}, - {0x1d78, 0, 0, 0, g(Yes, No, false, false, "", "н")}, - {0x1d79, 0, 0, 0, f(Yes, false, "")}, - {0x1d9b, 0, 0, 0, g(Yes, No, false, false, "", "ɒ")}, - {0x1d9c, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d9d, 0, 0, 0, g(Yes, No, false, false, "", "ɕ")}, - {0x1d9e, 0, 0, 0, g(Yes, No, false, false, "", "ð")}, - {0x1d9f, 0, 0, 0, g(Yes, No, false, false, "", "ɜ")}, - {0x1da0, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1da1, 0, 0, 0, g(Yes, No, false, false, "", "ɟ")}, - {0x1da2, 0, 0, 0, g(Yes, No, false, false, "", "ɡ")}, - {0x1da3, 0, 0, 0, g(Yes, No, false, false, "", "ɥ")}, - {0x1da4, 0, 0, 0, g(Yes, No, false, false, "", "ɨ")}, - {0x1da5, 0, 0, 0, g(Yes, No, false, false, "", "ɩ")}, - {0x1da6, 0, 0, 0, g(Yes, No, false, false, "", "ɪ")}, - {0x1da7, 0, 0, 0, g(Yes, No, false, false, "", "ᵻ")}, - {0x1da8, 0, 0, 0, g(Yes, No, false, false, "", "ʝ")}, - {0x1da9, 0, 0, 0, g(Yes, No, false, false, "", "ɭ")}, - {0x1daa, 0, 0, 0, g(Yes, No, false, false, "", "ᶅ")}, - {0x1dab, 0, 0, 0, g(Yes, No, false, false, "", "ʟ")}, - {0x1dac, 0, 0, 0, g(Yes, No, false, false, "", "ɱ")}, - {0x1dad, 0, 0, 0, g(Yes, No, false, false, "", "ɰ")}, - {0x1dae, 0, 0, 0, g(Yes, No, false, false, "", "ɲ")}, - {0x1daf, 0, 0, 0, g(Yes, No, false, false, "", "ɳ")}, - {0x1db0, 0, 0, 0, g(Yes, No, false, false, "", "ɴ")}, - {0x1db1, 0, 0, 0, g(Yes, No, false, false, "", "ɵ")}, - {0x1db2, 0, 0, 0, g(Yes, No, false, false, "", "ɸ")}, - {0x1db3, 0, 0, 0, g(Yes, No, false, false, "", "ʂ")}, - {0x1db4, 0, 0, 0, g(Yes, No, false, false, "", "ʃ")}, - {0x1db5, 0, 0, 0, g(Yes, No, false, false, "", "ƫ")}, - {0x1db6, 0, 0, 0, g(Yes, No, false, false, "", "ʉ")}, - {0x1db7, 0, 0, 0, g(Yes, No, false, false, "", "ʊ")}, - {0x1db8, 0, 0, 0, g(Yes, No, false, false, "", "ᴜ")}, - {0x1db9, 0, 0, 0, g(Yes, No, false, false, "", "ʋ")}, - {0x1dba, 0, 0, 0, g(Yes, No, false, false, "", "ʌ")}, - {0x1dbb, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1dbc, 0, 0, 0, g(Yes, No, false, false, "", "ʐ")}, - {0x1dbd, 0, 0, 0, g(Yes, No, false, false, "", "ʑ")}, - {0x1dbe, 0, 0, 0, g(Yes, No, false, false, "", "ʒ")}, - {0x1dbf, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1dc0, 230, 1, 1, f(Yes, false, "")}, - {0x1dc2, 220, 1, 1, f(Yes, false, "")}, - {0x1dc3, 230, 1, 1, f(Yes, false, "")}, - {0x1dca, 220, 1, 1, f(Yes, false, "")}, - {0x1dcb, 230, 1, 1, f(Yes, false, "")}, - {0x1dcd, 234, 1, 1, f(Yes, false, "")}, - {0x1dce, 214, 1, 1, f(Yes, false, "")}, - {0x1dcf, 220, 1, 1, f(Yes, false, "")}, - {0x1dd0, 202, 1, 1, f(Yes, false, "")}, - {0x1dd1, 230, 1, 1, f(Yes, false, "")}, - {0x1df6, 0, 0, 0, f(Yes, false, "")}, - {0x1dfb, 230, 1, 1, f(Yes, false, "")}, - {0x1dfc, 233, 1, 1, f(Yes, false, "")}, - {0x1dfd, 220, 1, 1, f(Yes, false, "")}, - {0x1dfe, 230, 1, 1, f(Yes, false, "")}, - {0x1dff, 220, 1, 1, f(Yes, false, "")}, - {0x1e00, 0, 0, 1, f(Yes, false, "Ḁ")}, - {0x1e01, 0, 0, 1, f(Yes, false, "ḁ")}, - {0x1e02, 0, 0, 1, f(Yes, false, "Ḃ")}, - {0x1e03, 0, 0, 1, f(Yes, false, "ḃ")}, - {0x1e04, 0, 0, 1, f(Yes, false, "Ḅ")}, - {0x1e05, 0, 0, 1, f(Yes, false, "ḅ")}, - {0x1e06, 0, 0, 1, f(Yes, false, "Ḇ")}, - {0x1e07, 0, 0, 1, f(Yes, false, "ḇ")}, - {0x1e08, 0, 0, 2, f(Yes, false, "Ḉ")}, - {0x1e09, 0, 0, 2, f(Yes, false, "ḉ")}, - {0x1e0a, 0, 0, 1, f(Yes, false, "Ḋ")}, - {0x1e0b, 0, 0, 1, f(Yes, false, "ḋ")}, - {0x1e0c, 0, 0, 1, f(Yes, false, "Ḍ")}, - {0x1e0d, 0, 0, 1, f(Yes, false, "ḍ")}, - {0x1e0e, 0, 0, 1, f(Yes, false, "Ḏ")}, - {0x1e0f, 0, 0, 1, f(Yes, false, "ḏ")}, - {0x1e10, 0, 0, 1, f(Yes, false, "Ḑ")}, - {0x1e11, 0, 0, 1, f(Yes, false, "ḑ")}, - {0x1e12, 0, 0, 1, f(Yes, false, "Ḓ")}, - {0x1e13, 0, 0, 1, f(Yes, false, "ḓ")}, - {0x1e14, 0, 0, 2, f(Yes, false, "Ḕ")}, - {0x1e15, 0, 0, 2, f(Yes, false, "ḕ")}, - {0x1e16, 0, 0, 2, f(Yes, false, "Ḗ")}, - {0x1e17, 0, 0, 2, f(Yes, false, "ḗ")}, - {0x1e18, 0, 0, 1, f(Yes, false, "Ḙ")}, - {0x1e19, 0, 0, 1, f(Yes, false, "ḙ")}, - {0x1e1a, 0, 0, 1, f(Yes, false, "Ḛ")}, - {0x1e1b, 0, 0, 1, f(Yes, false, "ḛ")}, - {0x1e1c, 0, 0, 2, f(Yes, false, "Ḝ")}, - {0x1e1d, 0, 0, 2, f(Yes, false, "ḝ")}, - {0x1e1e, 0, 0, 1, f(Yes, false, "Ḟ")}, - {0x1e1f, 0, 0, 1, f(Yes, false, "ḟ")}, - {0x1e20, 0, 0, 1, f(Yes, false, "Ḡ")}, - {0x1e21, 0, 0, 1, f(Yes, false, "ḡ")}, - {0x1e22, 0, 0, 1, f(Yes, false, "Ḣ")}, - {0x1e23, 0, 0, 1, f(Yes, false, "ḣ")}, - {0x1e24, 0, 0, 1, f(Yes, false, "Ḥ")}, - {0x1e25, 0, 0, 1, f(Yes, false, "ḥ")}, - {0x1e26, 0, 0, 1, f(Yes, false, "Ḧ")}, - {0x1e27, 0, 0, 1, f(Yes, false, "ḧ")}, - {0x1e28, 0, 0, 1, f(Yes, false, "Ḩ")}, - {0x1e29, 0, 0, 1, f(Yes, false, "ḩ")}, - {0x1e2a, 0, 0, 1, f(Yes, false, "Ḫ")}, - {0x1e2b, 0, 0, 1, f(Yes, false, "ḫ")}, - {0x1e2c, 0, 0, 1, f(Yes, false, "Ḭ")}, - {0x1e2d, 0, 0, 1, f(Yes, false, "ḭ")}, - {0x1e2e, 0, 0, 2, f(Yes, false, "Ḯ")}, - {0x1e2f, 0, 0, 2, f(Yes, false, "ḯ")}, - {0x1e30, 0, 0, 1, f(Yes, false, "Ḱ")}, - {0x1e31, 0, 0, 1, f(Yes, false, "ḱ")}, - {0x1e32, 0, 0, 1, f(Yes, false, "Ḳ")}, - {0x1e33, 0, 0, 1, f(Yes, false, "ḳ")}, - {0x1e34, 0, 0, 1, f(Yes, false, "Ḵ")}, - {0x1e35, 0, 0, 1, f(Yes, false, "ḵ")}, - {0x1e36, 0, 0, 1, f(Yes, true, "Ḷ")}, - {0x1e37, 0, 0, 1, f(Yes, true, "ḷ")}, - {0x1e38, 0, 0, 2, f(Yes, false, "Ḹ")}, - {0x1e39, 0, 0, 2, f(Yes, false, "ḹ")}, - {0x1e3a, 0, 0, 1, f(Yes, false, "Ḻ")}, - {0x1e3b, 0, 0, 1, f(Yes, false, "ḻ")}, - {0x1e3c, 0, 0, 1, f(Yes, false, "Ḽ")}, - {0x1e3d, 0, 0, 1, f(Yes, false, "ḽ")}, - {0x1e3e, 0, 0, 1, f(Yes, false, "Ḿ")}, - {0x1e3f, 0, 0, 1, f(Yes, false, "ḿ")}, - {0x1e40, 0, 0, 1, f(Yes, false, "Ṁ")}, - {0x1e41, 0, 0, 1, f(Yes, false, "ṁ")}, - {0x1e42, 0, 0, 1, f(Yes, false, "Ṃ")}, - {0x1e43, 0, 0, 1, f(Yes, false, "ṃ")}, - {0x1e44, 0, 0, 1, f(Yes, false, "Ṅ")}, - {0x1e45, 0, 0, 1, f(Yes, false, "ṅ")}, - {0x1e46, 0, 0, 1, f(Yes, false, "Ṇ")}, - {0x1e47, 0, 0, 1, f(Yes, false, "ṇ")}, - {0x1e48, 0, 0, 1, f(Yes, false, "Ṉ")}, - {0x1e49, 0, 0, 1, f(Yes, false, "ṉ")}, - {0x1e4a, 0, 0, 1, f(Yes, false, "Ṋ")}, - {0x1e4b, 0, 0, 1, f(Yes, false, "ṋ")}, - {0x1e4c, 0, 0, 2, f(Yes, false, "Ṍ")}, - {0x1e4d, 0, 0, 2, f(Yes, false, "ṍ")}, - {0x1e4e, 0, 0, 2, f(Yes, false, "Ṏ")}, - {0x1e4f, 0, 0, 2, f(Yes, false, "ṏ")}, - {0x1e50, 0, 0, 2, f(Yes, false, "Ṑ")}, - {0x1e51, 0, 0, 2, f(Yes, false, "ṑ")}, - {0x1e52, 0, 0, 2, f(Yes, false, "Ṓ")}, - {0x1e53, 0, 0, 2, f(Yes, false, "ṓ")}, - {0x1e54, 0, 0, 1, f(Yes, false, "Ṕ")}, - {0x1e55, 0, 0, 1, f(Yes, false, "ṕ")}, - {0x1e56, 0, 0, 1, f(Yes, false, "Ṗ")}, - {0x1e57, 0, 0, 1, f(Yes, false, "ṗ")}, - {0x1e58, 0, 0, 1, f(Yes, false, "Ṙ")}, - {0x1e59, 0, 0, 1, f(Yes, false, "ṙ")}, - {0x1e5a, 0, 0, 1, f(Yes, true, "Ṛ")}, - {0x1e5b, 0, 0, 1, f(Yes, true, "ṛ")}, - {0x1e5c, 0, 0, 2, f(Yes, false, "Ṝ")}, - {0x1e5d, 0, 0, 2, f(Yes, false, "ṝ")}, - {0x1e5e, 0, 0, 1, f(Yes, false, "Ṟ")}, - {0x1e5f, 0, 0, 1, f(Yes, false, "ṟ")}, - {0x1e60, 0, 0, 1, f(Yes, false, "Ṡ")}, - {0x1e61, 0, 0, 1, f(Yes, false, "ṡ")}, - {0x1e62, 0, 0, 1, f(Yes, true, "Ṣ")}, - {0x1e63, 0, 0, 1, f(Yes, true, "ṣ")}, - {0x1e64, 0, 0, 2, f(Yes, false, "Ṥ")}, - {0x1e65, 0, 0, 2, f(Yes, false, "ṥ")}, - {0x1e66, 0, 0, 2, f(Yes, false, "Ṧ")}, - {0x1e67, 0, 0, 2, f(Yes, false, "ṧ")}, - {0x1e68, 0, 0, 2, f(Yes, false, "Ṩ")}, - {0x1e69, 0, 0, 2, f(Yes, false, "ṩ")}, - {0x1e6a, 0, 0, 1, f(Yes, false, "Ṫ")}, - {0x1e6b, 0, 0, 1, f(Yes, false, "ṫ")}, - {0x1e6c, 0, 0, 1, f(Yes, false, "Ṭ")}, - {0x1e6d, 0, 0, 1, f(Yes, false, "ṭ")}, - {0x1e6e, 0, 0, 1, f(Yes, false, "Ṯ")}, - {0x1e6f, 0, 0, 1, f(Yes, false, "ṯ")}, - {0x1e70, 0, 0, 1, f(Yes, false, "Ṱ")}, - {0x1e71, 0, 0, 1, f(Yes, false, "ṱ")}, - {0x1e72, 0, 0, 1, f(Yes, false, "Ṳ")}, - {0x1e73, 0, 0, 1, f(Yes, false, "ṳ")}, - {0x1e74, 0, 0, 1, f(Yes, false, "Ṵ")}, - {0x1e75, 0, 0, 1, f(Yes, false, "ṵ")}, - {0x1e76, 0, 0, 1, f(Yes, false, "Ṷ")}, - {0x1e77, 0, 0, 1, f(Yes, false, "ṷ")}, - {0x1e78, 0, 0, 2, f(Yes, false, "Ṹ")}, - {0x1e79, 0, 0, 2, f(Yes, false, "ṹ")}, - {0x1e7a, 0, 0, 2, f(Yes, false, "Ṻ")}, - {0x1e7b, 0, 0, 2, f(Yes, false, "ṻ")}, - {0x1e7c, 0, 0, 1, f(Yes, false, "Ṽ")}, - {0x1e7d, 0, 0, 1, f(Yes, false, "ṽ")}, - {0x1e7e, 0, 0, 1, f(Yes, false, "Ṿ")}, - {0x1e7f, 0, 0, 1, f(Yes, false, "ṿ")}, - {0x1e80, 0, 0, 1, f(Yes, false, "Ẁ")}, - {0x1e81, 0, 0, 1, f(Yes, false, "ẁ")}, - {0x1e82, 0, 0, 1, f(Yes, false, "Ẃ")}, - {0x1e83, 0, 0, 1, f(Yes, false, "ẃ")}, - {0x1e84, 0, 0, 1, f(Yes, false, "Ẅ")}, - {0x1e85, 0, 0, 1, f(Yes, false, "ẅ")}, - {0x1e86, 0, 0, 1, f(Yes, false, "Ẇ")}, - {0x1e87, 0, 0, 1, f(Yes, false, "ẇ")}, - {0x1e88, 0, 0, 1, f(Yes, false, "Ẉ")}, - {0x1e89, 0, 0, 1, f(Yes, false, "ẉ")}, - {0x1e8a, 0, 0, 1, f(Yes, false, "Ẋ")}, - {0x1e8b, 0, 0, 1, f(Yes, false, "ẋ")}, - {0x1e8c, 0, 0, 1, f(Yes, false, "Ẍ")}, - {0x1e8d, 0, 0, 1, f(Yes, false, "ẍ")}, - {0x1e8e, 0, 0, 1, f(Yes, false, "Ẏ")}, - {0x1e8f, 0, 0, 1, f(Yes, false, "ẏ")}, - {0x1e90, 0, 0, 1, f(Yes, false, "Ẑ")}, - {0x1e91, 0, 0, 1, f(Yes, false, "ẑ")}, - {0x1e92, 0, 0, 1, f(Yes, false, "Ẓ")}, - {0x1e93, 0, 0, 1, f(Yes, false, "ẓ")}, - {0x1e94, 0, 0, 1, f(Yes, false, "Ẕ")}, - {0x1e95, 0, 0, 1, f(Yes, false, "ẕ")}, - {0x1e96, 0, 0, 1, f(Yes, false, "ẖ")}, - {0x1e97, 0, 0, 1, f(Yes, false, "ẗ")}, - {0x1e98, 0, 0, 1, f(Yes, false, "ẘ")}, - {0x1e99, 0, 0, 1, f(Yes, false, "ẙ")}, - {0x1e9a, 0, 0, 0, g(Yes, No, false, false, "", "aʾ")}, - {0x1e9b, 0, 0, 1, g(Yes, No, false, false, "ẛ", "ṡ")}, - {0x1e9c, 0, 0, 0, f(Yes, false, "")}, - {0x1ea0, 0, 0, 1, f(Yes, true, "Ạ")}, - {0x1ea1, 0, 0, 1, f(Yes, true, "ạ")}, - {0x1ea2, 0, 0, 1, f(Yes, false, "Ả")}, - {0x1ea3, 0, 0, 1, f(Yes, false, "ả")}, - {0x1ea4, 0, 0, 2, f(Yes, false, "Ấ")}, - {0x1ea5, 0, 0, 2, f(Yes, false, "ấ")}, - {0x1ea6, 0, 0, 2, f(Yes, false, "Ầ")}, - {0x1ea7, 0, 0, 2, f(Yes, false, "ầ")}, - {0x1ea8, 0, 0, 2, f(Yes, false, "Ẩ")}, - {0x1ea9, 0, 0, 2, f(Yes, false, "ẩ")}, - {0x1eaa, 0, 0, 2, f(Yes, false, "Ẫ")}, - {0x1eab, 0, 0, 2, f(Yes, false, "ẫ")}, - {0x1eac, 0, 0, 2, f(Yes, false, "Ậ")}, - {0x1ead, 0, 0, 2, f(Yes, false, "ậ")}, - {0x1eae, 0, 0, 2, f(Yes, false, "Ắ")}, - {0x1eaf, 0, 0, 2, f(Yes, false, "ắ")}, - {0x1eb0, 0, 0, 2, f(Yes, false, "Ằ")}, - {0x1eb1, 0, 0, 2, f(Yes, false, "ằ")}, - {0x1eb2, 0, 0, 2, f(Yes, false, "Ẳ")}, - {0x1eb3, 0, 0, 2, f(Yes, false, "ẳ")}, - {0x1eb4, 0, 0, 2, f(Yes, false, "Ẵ")}, - {0x1eb5, 0, 0, 2, f(Yes, false, "ẵ")}, - {0x1eb6, 0, 0, 2, f(Yes, false, "Ặ")}, - {0x1eb7, 0, 0, 2, f(Yes, false, "ặ")}, - {0x1eb8, 0, 0, 1, f(Yes, true, "Ẹ")}, - {0x1eb9, 0, 0, 1, f(Yes, true, "ẹ")}, - {0x1eba, 0, 0, 1, f(Yes, false, "Ẻ")}, - {0x1ebb, 0, 0, 1, f(Yes, false, "ẻ")}, - {0x1ebc, 0, 0, 1, f(Yes, false, "Ẽ")}, - {0x1ebd, 0, 0, 1, f(Yes, false, "ẽ")}, - {0x1ebe, 0, 0, 2, f(Yes, false, "Ế")}, - {0x1ebf, 0, 0, 2, f(Yes, false, "ế")}, - {0x1ec0, 0, 0, 2, f(Yes, false, "Ề")}, - {0x1ec1, 0, 0, 2, f(Yes, false, "ề")}, - {0x1ec2, 0, 0, 2, f(Yes, false, "Ể")}, - {0x1ec3, 0, 0, 2, f(Yes, false, "ể")}, - {0x1ec4, 0, 0, 2, f(Yes, false, "Ễ")}, - {0x1ec5, 0, 0, 2, f(Yes, false, "ễ")}, - {0x1ec6, 0, 0, 2, f(Yes, false, "Ệ")}, - {0x1ec7, 0, 0, 2, f(Yes, false, "ệ")}, - {0x1ec8, 0, 0, 1, f(Yes, false, "Ỉ")}, - {0x1ec9, 0, 0, 1, f(Yes, false, "ỉ")}, - {0x1eca, 0, 0, 1, f(Yes, false, "Ị")}, - {0x1ecb, 0, 0, 1, f(Yes, false, "ị")}, - {0x1ecc, 0, 0, 1, f(Yes, true, "Ọ")}, - {0x1ecd, 0, 0, 1, f(Yes, true, "ọ")}, - {0x1ece, 0, 0, 1, f(Yes, false, "Ỏ")}, - {0x1ecf, 0, 0, 1, f(Yes, false, "ỏ")}, - {0x1ed0, 0, 0, 2, f(Yes, false, "Ố")}, - {0x1ed1, 0, 0, 2, f(Yes, false, "ố")}, - {0x1ed2, 0, 0, 2, f(Yes, false, "Ồ")}, - {0x1ed3, 0, 0, 2, f(Yes, false, "ồ")}, - {0x1ed4, 0, 0, 2, f(Yes, false, "Ổ")}, - {0x1ed5, 0, 0, 2, f(Yes, false, "ổ")}, - {0x1ed6, 0, 0, 2, f(Yes, false, "Ỗ")}, - {0x1ed7, 0, 0, 2, f(Yes, false, "ỗ")}, - {0x1ed8, 0, 0, 2, f(Yes, false, "Ộ")}, - {0x1ed9, 0, 0, 2, f(Yes, false, "ộ")}, - {0x1eda, 0, 0, 2, f(Yes, false, "Ớ")}, - {0x1edb, 0, 0, 2, f(Yes, false, "ớ")}, - {0x1edc, 0, 0, 2, f(Yes, false, "Ờ")}, - {0x1edd, 0, 0, 2, f(Yes, false, "ờ")}, - {0x1ede, 0, 0, 2, f(Yes, false, "Ở")}, - {0x1edf, 0, 0, 2, f(Yes, false, "ở")}, - {0x1ee0, 0, 0, 2, f(Yes, false, "Ỡ")}, - {0x1ee1, 0, 0, 2, f(Yes, false, "ỡ")}, - {0x1ee2, 0, 0, 2, f(Yes, false, "Ợ")}, - {0x1ee3, 0, 0, 2, f(Yes, false, "ợ")}, - {0x1ee4, 0, 0, 1, f(Yes, false, "Ụ")}, - {0x1ee5, 0, 0, 1, f(Yes, false, "ụ")}, - {0x1ee6, 0, 0, 1, f(Yes, false, "Ủ")}, - {0x1ee7, 0, 0, 1, f(Yes, false, "ủ")}, - {0x1ee8, 0, 0, 2, f(Yes, false, "Ứ")}, - {0x1ee9, 0, 0, 2, f(Yes, false, "ứ")}, - {0x1eea, 0, 0, 2, f(Yes, false, "Ừ")}, - {0x1eeb, 0, 0, 2, f(Yes, false, "ừ")}, - {0x1eec, 0, 0, 2, f(Yes, false, "Ử")}, - {0x1eed, 0, 0, 2, f(Yes, false, "ử")}, - {0x1eee, 0, 0, 2, f(Yes, false, "Ữ")}, - {0x1eef, 0, 0, 2, f(Yes, false, "ữ")}, - {0x1ef0, 0, 0, 2, f(Yes, false, "Ự")}, - {0x1ef1, 0, 0, 2, f(Yes, false, "ự")}, - {0x1ef2, 0, 0, 1, f(Yes, false, "Ỳ")}, - {0x1ef3, 0, 0, 1, f(Yes, false, "ỳ")}, - {0x1ef4, 0, 0, 1, f(Yes, false, "Ỵ")}, - {0x1ef5, 0, 0, 1, f(Yes, false, "ỵ")}, - {0x1ef6, 0, 0, 1, f(Yes, false, "Ỷ")}, - {0x1ef7, 0, 0, 1, f(Yes, false, "ỷ")}, - {0x1ef8, 0, 0, 1, f(Yes, false, "Ỹ")}, - {0x1ef9, 0, 0, 1, f(Yes, false, "ỹ")}, - {0x1efa, 0, 0, 0, f(Yes, false, "")}, - {0x1f00, 0, 0, 1, f(Yes, true, "ἀ")}, - {0x1f01, 0, 0, 1, f(Yes, true, "ἁ")}, - {0x1f02, 0, 0, 2, f(Yes, true, "ἂ")}, - {0x1f03, 0, 0, 2, f(Yes, true, "ἃ")}, - {0x1f04, 0, 0, 2, f(Yes, true, "ἄ")}, - {0x1f05, 0, 0, 2, f(Yes, true, "ἅ")}, - {0x1f06, 0, 0, 2, f(Yes, true, "ἆ")}, - {0x1f07, 0, 0, 2, f(Yes, true, "ἇ")}, - {0x1f08, 0, 0, 1, f(Yes, true, "Ἀ")}, - {0x1f09, 0, 0, 1, f(Yes, true, "Ἁ")}, - {0x1f0a, 0, 0, 2, f(Yes, true, "Ἂ")}, - {0x1f0b, 0, 0, 2, f(Yes, true, "Ἃ")}, - {0x1f0c, 0, 0, 2, f(Yes, true, "Ἄ")}, - {0x1f0d, 0, 0, 2, f(Yes, true, "Ἅ")}, - {0x1f0e, 0, 0, 2, f(Yes, true, "Ἆ")}, - {0x1f0f, 0, 0, 2, f(Yes, true, "Ἇ")}, - {0x1f10, 0, 0, 1, f(Yes, true, "ἐ")}, - {0x1f11, 0, 0, 1, f(Yes, true, "ἑ")}, - {0x1f12, 0, 0, 2, f(Yes, false, "ἒ")}, - {0x1f13, 0, 0, 2, f(Yes, false, "ἓ")}, - {0x1f14, 0, 0, 2, f(Yes, false, "ἔ")}, - {0x1f15, 0, 0, 2, f(Yes, false, "ἕ")}, - {0x1f16, 0, 0, 0, f(Yes, false, "")}, - {0x1f18, 0, 0, 1, f(Yes, true, "Ἐ")}, - {0x1f19, 0, 0, 1, f(Yes, true, "Ἑ")}, - {0x1f1a, 0, 0, 2, f(Yes, false, "Ἒ")}, - {0x1f1b, 0, 0, 2, f(Yes, false, "Ἓ")}, - {0x1f1c, 0, 0, 2, f(Yes, false, "Ἔ")}, - {0x1f1d, 0, 0, 2, f(Yes, false, "Ἕ")}, - {0x1f1e, 0, 0, 0, f(Yes, false, "")}, - {0x1f20, 0, 0, 1, f(Yes, true, "ἠ")}, - {0x1f21, 0, 0, 1, f(Yes, true, "ἡ")}, - {0x1f22, 0, 0, 2, f(Yes, true, "ἢ")}, - {0x1f23, 0, 0, 2, f(Yes, true, "ἣ")}, - {0x1f24, 0, 0, 2, f(Yes, true, "ἤ")}, - {0x1f25, 0, 0, 2, f(Yes, true, "ἥ")}, - {0x1f26, 0, 0, 2, f(Yes, true, "ἦ")}, - {0x1f27, 0, 0, 2, f(Yes, true, "ἧ")}, - {0x1f28, 0, 0, 1, f(Yes, true, "Ἠ")}, - {0x1f29, 0, 0, 1, f(Yes, true, "Ἡ")}, - {0x1f2a, 0, 0, 2, f(Yes, true, "Ἢ")}, - {0x1f2b, 0, 0, 2, f(Yes, true, "Ἣ")}, - {0x1f2c, 0, 0, 2, f(Yes, true, "Ἤ")}, - {0x1f2d, 0, 0, 2, f(Yes, true, "Ἥ")}, - {0x1f2e, 0, 0, 2, f(Yes, true, "Ἦ")}, - {0x1f2f, 0, 0, 2, f(Yes, true, "Ἧ")}, - {0x1f30, 0, 0, 1, f(Yes, true, "ἰ")}, - {0x1f31, 0, 0, 1, f(Yes, true, "ἱ")}, - {0x1f32, 0, 0, 2, f(Yes, false, "ἲ")}, - {0x1f33, 0, 0, 2, f(Yes, false, "ἳ")}, - {0x1f34, 0, 0, 2, f(Yes, false, "ἴ")}, - {0x1f35, 0, 0, 2, f(Yes, false, "ἵ")}, - {0x1f36, 0, 0, 2, f(Yes, false, "ἶ")}, - {0x1f37, 0, 0, 2, f(Yes, false, "ἷ")}, - {0x1f38, 0, 0, 1, f(Yes, true, "Ἰ")}, - {0x1f39, 0, 0, 1, f(Yes, true, "Ἱ")}, - {0x1f3a, 0, 0, 2, f(Yes, false, "Ἲ")}, - {0x1f3b, 0, 0, 2, f(Yes, false, "Ἳ")}, - {0x1f3c, 0, 0, 2, f(Yes, false, "Ἴ")}, - {0x1f3d, 0, 0, 2, f(Yes, false, "Ἵ")}, - {0x1f3e, 0, 0, 2, f(Yes, false, "Ἶ")}, - {0x1f3f, 0, 0, 2, f(Yes, false, "Ἷ")}, - {0x1f40, 0, 0, 1, f(Yes, true, "ὀ")}, - {0x1f41, 0, 0, 1, f(Yes, true, "ὁ")}, - {0x1f42, 0, 0, 2, f(Yes, false, "ὂ")}, - {0x1f43, 0, 0, 2, f(Yes, false, "ὃ")}, - {0x1f44, 0, 0, 2, f(Yes, false, "ὄ")}, - {0x1f45, 0, 0, 2, f(Yes, false, "ὅ")}, - {0x1f46, 0, 0, 0, f(Yes, false, "")}, - {0x1f48, 0, 0, 1, f(Yes, true, "Ὀ")}, - {0x1f49, 0, 0, 1, f(Yes, true, "Ὁ")}, - {0x1f4a, 0, 0, 2, f(Yes, false, "Ὂ")}, - {0x1f4b, 0, 0, 2, f(Yes, false, "Ὃ")}, - {0x1f4c, 0, 0, 2, f(Yes, false, "Ὄ")}, - {0x1f4d, 0, 0, 2, f(Yes, false, "Ὅ")}, - {0x1f4e, 0, 0, 0, f(Yes, false, "")}, - {0x1f50, 0, 0, 1, f(Yes, true, "ὐ")}, - {0x1f51, 0, 0, 1, f(Yes, true, "ὑ")}, - {0x1f52, 0, 0, 2, f(Yes, false, "ὒ")}, - {0x1f53, 0, 0, 2, f(Yes, false, "ὓ")}, - {0x1f54, 0, 0, 2, f(Yes, false, "ὔ")}, - {0x1f55, 0, 0, 2, f(Yes, false, "ὕ")}, - {0x1f56, 0, 0, 2, f(Yes, false, "ὖ")}, - {0x1f57, 0, 0, 2, f(Yes, false, "ὗ")}, - {0x1f58, 0, 0, 0, f(Yes, false, "")}, - {0x1f59, 0, 0, 1, f(Yes, true, "Ὑ")}, - {0x1f5a, 0, 0, 0, f(Yes, false, "")}, - {0x1f5b, 0, 0, 2, f(Yes, false, "Ὓ")}, - {0x1f5c, 0, 0, 0, f(Yes, false, "")}, - {0x1f5d, 0, 0, 2, f(Yes, false, "Ὕ")}, - {0x1f5e, 0, 0, 0, f(Yes, false, "")}, - {0x1f5f, 0, 0, 2, f(Yes, false, "Ὗ")}, - {0x1f60, 0, 0, 1, f(Yes, true, "ὠ")}, - {0x1f61, 0, 0, 1, f(Yes, true, "ὡ")}, - {0x1f62, 0, 0, 2, f(Yes, true, "ὢ")}, - {0x1f63, 0, 0, 2, f(Yes, true, "ὣ")}, - {0x1f64, 0, 0, 2, f(Yes, true, "ὤ")}, - {0x1f65, 0, 0, 2, f(Yes, true, "ὥ")}, - {0x1f66, 0, 0, 2, f(Yes, true, "ὦ")}, - {0x1f67, 0, 0, 2, f(Yes, true, "ὧ")}, - {0x1f68, 0, 0, 1, f(Yes, true, "Ὠ")}, - {0x1f69, 0, 0, 1, f(Yes, true, "Ὡ")}, - {0x1f6a, 0, 0, 2, f(Yes, true, "Ὢ")}, - {0x1f6b, 0, 0, 2, f(Yes, true, "Ὣ")}, - {0x1f6c, 0, 0, 2, f(Yes, true, "Ὤ")}, - {0x1f6d, 0, 0, 2, f(Yes, true, "Ὥ")}, - {0x1f6e, 0, 0, 2, f(Yes, true, "Ὦ")}, - {0x1f6f, 0, 0, 2, f(Yes, true, "Ὧ")}, - {0x1f70, 0, 0, 1, f(Yes, true, "ὰ")}, - {0x1f71, 0, 0, 1, f(No, false, "ά")}, - {0x1f72, 0, 0, 1, f(Yes, false, "ὲ")}, - {0x1f73, 0, 0, 1, f(No, false, "έ")}, - {0x1f74, 0, 0, 1, f(Yes, true, "ὴ")}, - {0x1f75, 0, 0, 1, f(No, false, "ή")}, - {0x1f76, 0, 0, 1, f(Yes, false, "ὶ")}, - {0x1f77, 0, 0, 1, f(No, false, "ί")}, - {0x1f78, 0, 0, 1, f(Yes, false, "ὸ")}, - {0x1f79, 0, 0, 1, f(No, false, "ό")}, - {0x1f7a, 0, 0, 1, f(Yes, false, "ὺ")}, - {0x1f7b, 0, 0, 1, f(No, false, "ύ")}, - {0x1f7c, 0, 0, 1, f(Yes, true, "ὼ")}, - {0x1f7d, 0, 0, 1, f(No, false, "ώ")}, - {0x1f7e, 0, 0, 0, f(Yes, false, "")}, - {0x1f80, 0, 0, 2, f(Yes, false, "ᾀ")}, - {0x1f81, 0, 0, 2, f(Yes, false, "ᾁ")}, - {0x1f82, 0, 0, 3, f(Yes, false, "ᾂ")}, - {0x1f83, 0, 0, 3, f(Yes, false, "ᾃ")}, - {0x1f84, 0, 0, 3, f(Yes, false, "ᾄ")}, - {0x1f85, 0, 0, 3, f(Yes, false, "ᾅ")}, - {0x1f86, 0, 0, 3, f(Yes, false, "ᾆ")}, - {0x1f87, 0, 0, 3, f(Yes, false, "ᾇ")}, - {0x1f88, 0, 0, 2, f(Yes, false, "ᾈ")}, - {0x1f89, 0, 0, 2, f(Yes, false, "ᾉ")}, - {0x1f8a, 0, 0, 3, f(Yes, false, "ᾊ")}, - {0x1f8b, 0, 0, 3, f(Yes, false, "ᾋ")}, - {0x1f8c, 0, 0, 3, f(Yes, false, "ᾌ")}, - {0x1f8d, 0, 0, 3, f(Yes, false, "ᾍ")}, - {0x1f8e, 0, 0, 3, f(Yes, false, "ᾎ")}, - {0x1f8f, 0, 0, 3, f(Yes, false, "ᾏ")}, - {0x1f90, 0, 0, 2, f(Yes, false, "ᾐ")}, - {0x1f91, 0, 0, 2, f(Yes, false, "ᾑ")}, - {0x1f92, 0, 0, 3, f(Yes, false, "ᾒ")}, - {0x1f93, 0, 0, 3, f(Yes, false, "ᾓ")}, - {0x1f94, 0, 0, 3, f(Yes, false, "ᾔ")}, - {0x1f95, 0, 0, 3, f(Yes, false, "ᾕ")}, - {0x1f96, 0, 0, 3, f(Yes, false, "ᾖ")}, - {0x1f97, 0, 0, 3, f(Yes, false, "ᾗ")}, - {0x1f98, 0, 0, 2, f(Yes, false, "ᾘ")}, - {0x1f99, 0, 0, 2, f(Yes, false, "ᾙ")}, - {0x1f9a, 0, 0, 3, f(Yes, false, "ᾚ")}, - {0x1f9b, 0, 0, 3, f(Yes, false, "ᾛ")}, - {0x1f9c, 0, 0, 3, f(Yes, false, "ᾜ")}, - {0x1f9d, 0, 0, 3, f(Yes, false, "ᾝ")}, - {0x1f9e, 0, 0, 3, f(Yes, false, "ᾞ")}, - {0x1f9f, 0, 0, 3, f(Yes, false, "ᾟ")}, - {0x1fa0, 0, 0, 2, f(Yes, false, "ᾠ")}, - {0x1fa1, 0, 0, 2, f(Yes, false, "ᾡ")}, - {0x1fa2, 0, 0, 3, f(Yes, false, "ᾢ")}, - {0x1fa3, 0, 0, 3, f(Yes, false, "ᾣ")}, - {0x1fa4, 0, 0, 3, f(Yes, false, "ᾤ")}, - {0x1fa5, 0, 0, 3, f(Yes, false, "ᾥ")}, - {0x1fa6, 0, 0, 3, f(Yes, false, "ᾦ")}, - {0x1fa7, 0, 0, 3, f(Yes, false, "ᾧ")}, - {0x1fa8, 0, 0, 2, f(Yes, false, "ᾨ")}, - {0x1fa9, 0, 0, 2, f(Yes, false, "ᾩ")}, - {0x1faa, 0, 0, 3, f(Yes, false, "ᾪ")}, - {0x1fab, 0, 0, 3, f(Yes, false, "ᾫ")}, - {0x1fac, 0, 0, 3, f(Yes, false, "ᾬ")}, - {0x1fad, 0, 0, 3, f(Yes, false, "ᾭ")}, - {0x1fae, 0, 0, 3, f(Yes, false, "ᾮ")}, - {0x1faf, 0, 0, 3, f(Yes, false, "ᾯ")}, - {0x1fb0, 0, 0, 1, f(Yes, false, "ᾰ")}, - {0x1fb1, 0, 0, 1, f(Yes, false, "ᾱ")}, - {0x1fb2, 0, 0, 2, f(Yes, false, "ᾲ")}, - {0x1fb3, 0, 0, 1, f(Yes, false, "ᾳ")}, - {0x1fb4, 0, 0, 2, f(Yes, false, "ᾴ")}, - {0x1fb5, 0, 0, 0, f(Yes, false, "")}, - {0x1fb6, 0, 0, 1, f(Yes, true, "ᾶ")}, - {0x1fb7, 0, 0, 2, f(Yes, false, "ᾷ")}, - {0x1fb8, 0, 0, 1, f(Yes, false, "Ᾰ")}, - {0x1fb9, 0, 0, 1, f(Yes, false, "Ᾱ")}, - {0x1fba, 0, 0, 1, f(Yes, false, "Ὰ")}, - {0x1fbb, 0, 0, 1, f(No, false, "Ά")}, - {0x1fbc, 0, 0, 1, f(Yes, false, "ᾼ")}, - {0x1fbd, 0, 0, 1, g(Yes, No, false, false, "", " ̓")}, - {0x1fbe, 0, 0, 0, f(No, false, "ι")}, - {0x1fbf, 0, 0, 1, g(Yes, No, true, false, "", " ̓")}, - {0x1fc0, 0, 0, 1, g(Yes, No, false, false, "", " ͂")}, - {0x1fc1, 0, 0, 2, g(Yes, No, false, false, "῁", " ̈͂")}, - {0x1fc2, 0, 0, 2, f(Yes, false, "ῂ")}, - {0x1fc3, 0, 0, 1, f(Yes, false, "ῃ")}, - {0x1fc4, 0, 0, 2, f(Yes, false, "ῄ")}, - {0x1fc5, 0, 0, 0, f(Yes, false, "")}, - {0x1fc6, 0, 0, 1, f(Yes, true, "ῆ")}, - {0x1fc7, 0, 0, 2, f(Yes, false, "ῇ")}, - {0x1fc8, 0, 0, 1, f(Yes, false, "Ὲ")}, - {0x1fc9, 0, 0, 1, f(No, false, "Έ")}, - {0x1fca, 0, 0, 1, f(Yes, false, "Ὴ")}, - {0x1fcb, 0, 0, 1, f(No, false, "Ή")}, - {0x1fcc, 0, 0, 1, f(Yes, false, "ῌ")}, - {0x1fcd, 0, 0, 2, g(Yes, No, false, false, "῍", " ̓̀")}, - {0x1fce, 0, 0, 2, g(Yes, No, false, false, "῎", " ̓́")}, - {0x1fcf, 0, 0, 2, g(Yes, No, false, false, "῏", " ̓͂")}, - {0x1fd0, 0, 0, 1, f(Yes, false, "ῐ")}, - {0x1fd1, 0, 0, 1, f(Yes, false, "ῑ")}, - {0x1fd2, 0, 0, 2, f(Yes, false, "ῒ")}, - {0x1fd3, 0, 0, 2, f(No, false, "ΐ")}, - {0x1fd4, 0, 0, 0, f(Yes, false, "")}, - {0x1fd6, 0, 0, 1, f(Yes, false, "ῖ")}, - {0x1fd7, 0, 0, 2, f(Yes, false, "ῗ")}, - {0x1fd8, 0, 0, 1, f(Yes, false, "Ῐ")}, - {0x1fd9, 0, 0, 1, f(Yes, false, "Ῑ")}, - {0x1fda, 0, 0, 1, f(Yes, false, "Ὶ")}, - {0x1fdb, 0, 0, 1, f(No, false, "Ί")}, - {0x1fdc, 0, 0, 0, f(Yes, false, "")}, - {0x1fdd, 0, 0, 2, g(Yes, No, false, false, "῝", " ̔̀")}, - {0x1fde, 0, 0, 2, g(Yes, No, false, false, "῞", " ̔́")}, - {0x1fdf, 0, 0, 2, g(Yes, No, false, false, "῟", " ̔͂")}, - {0x1fe0, 0, 0, 1, f(Yes, false, "ῠ")}, - {0x1fe1, 0, 0, 1, f(Yes, false, "ῡ")}, - {0x1fe2, 0, 0, 2, f(Yes, false, "ῢ")}, - {0x1fe3, 0, 0, 2, f(No, false, "ΰ")}, - {0x1fe4, 0, 0, 1, f(Yes, false, "ῤ")}, - {0x1fe5, 0, 0, 1, f(Yes, false, "ῥ")}, - {0x1fe6, 0, 0, 1, f(Yes, false, "ῦ")}, - {0x1fe7, 0, 0, 2, f(Yes, false, "ῧ")}, - {0x1fe8, 0, 0, 1, f(Yes, false, "Ῠ")}, - {0x1fe9, 0, 0, 1, f(Yes, false, "Ῡ")}, - {0x1fea, 0, 0, 1, f(Yes, false, "Ὺ")}, - {0x1feb, 0, 0, 1, f(No, false, "Ύ")}, - {0x1fec, 0, 0, 1, f(Yes, false, "Ῥ")}, - {0x1fed, 0, 0, 2, g(Yes, No, false, false, "῭", " ̈̀")}, - {0x1fee, 0, 0, 2, g(No, No, false, false, "΅", " ̈́")}, - {0x1fef, 0, 0, 0, f(No, false, "`")}, - {0x1ff0, 0, 0, 0, f(Yes, false, "")}, - {0x1ff2, 0, 0, 2, f(Yes, false, "ῲ")}, - {0x1ff3, 0, 0, 1, f(Yes, false, "ῳ")}, - {0x1ff4, 0, 0, 2, f(Yes, false, "ῴ")}, - {0x1ff5, 0, 0, 0, f(Yes, false, "")}, - {0x1ff6, 0, 0, 1, f(Yes, true, "ῶ")}, - {0x1ff7, 0, 0, 2, f(Yes, false, "ῷ")}, - {0x1ff8, 0, 0, 1, f(Yes, false, "Ὸ")}, - {0x1ff9, 0, 0, 1, f(No, false, "Ό")}, - {0x1ffa, 0, 0, 1, f(Yes, false, "Ὼ")}, - {0x1ffb, 0, 0, 1, f(No, false, "Ώ")}, - {0x1ffc, 0, 0, 1, f(Yes, false, "ῼ")}, - {0x1ffd, 0, 0, 1, g(No, No, false, false, "´", " ́")}, - {0x1ffe, 0, 0, 1, g(Yes, No, true, false, "", " ̔")}, - {0x1fff, 0, 0, 0, f(Yes, false, "")}, - {0x2000, 0, 0, 0, g(No, No, false, false, "\u2002", " ")}, - {0x2001, 0, 0, 0, g(No, No, false, false, "\u2003", " ")}, - {0x2002, 0, 0, 0, g(Yes, No, false, false, "", " ")}, - {0x200b, 0, 0, 0, f(Yes, false, "")}, - {0x2011, 0, 0, 0, g(Yes, No, false, false, "", "‐")}, - {0x2012, 0, 0, 0, f(Yes, false, "")}, - {0x2017, 0, 0, 1, g(Yes, No, false, false, "", " ̳")}, - {0x2018, 0, 0, 0, f(Yes, false, "")}, - {0x2024, 0, 0, 0, g(Yes, No, false, false, "", ".")}, - {0x2025, 0, 0, 0, g(Yes, No, false, false, "", "..")}, - {0x2026, 0, 0, 0, g(Yes, No, false, false, "", "...")}, - {0x2027, 0, 0, 0, f(Yes, false, "")}, - {0x202f, 0, 0, 0, g(Yes, No, false, false, "", " ")}, - {0x2030, 0, 0, 0, f(Yes, false, "")}, - {0x2033, 0, 0, 0, g(Yes, No, false, false, "", "′′")}, - {0x2034, 0, 0, 0, g(Yes, No, false, false, "", "′′′")}, - {0x2035, 0, 0, 0, f(Yes, false, "")}, - {0x2036, 0, 0, 0, g(Yes, No, false, false, "", "‵‵")}, - {0x2037, 0, 0, 0, g(Yes, No, false, false, "", "‵‵‵")}, - {0x2038, 0, 0, 0, f(Yes, false, "")}, - {0x203c, 0, 0, 0, g(Yes, No, false, false, "", "!!")}, - {0x203d, 0, 0, 0, f(Yes, false, "")}, - {0x203e, 0, 0, 1, g(Yes, No, false, false, "", " ̅")}, - {0x203f, 0, 0, 0, f(Yes, false, "")}, - {0x2047, 0, 0, 0, g(Yes, No, false, false, "", "??")}, - {0x2048, 0, 0, 0, g(Yes, No, false, false, "", "?!")}, - {0x2049, 0, 0, 0, g(Yes, No, false, false, "", "!?")}, - {0x204a, 0, 0, 0, f(Yes, false, "")}, - {0x2057, 0, 0, 0, g(Yes, No, false, false, "", "′′′′")}, - {0x2058, 0, 0, 0, f(Yes, false, "")}, - {0x205f, 0, 0, 0, g(Yes, No, false, false, "", " ")}, - {0x2060, 0, 0, 0, f(Yes, false, "")}, - {0x2070, 0, 0, 0, g(Yes, No, false, false, "", "0")}, - {0x2071, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x2072, 0, 0, 0, f(Yes, false, "")}, - {0x2074, 0, 0, 0, g(Yes, No, false, false, "", "4")}, - {0x2075, 0, 0, 0, g(Yes, No, false, false, "", "5")}, - {0x2076, 0, 0, 0, g(Yes, No, false, false, "", "6")}, - {0x2077, 0, 0, 0, g(Yes, No, false, false, "", "7")}, - {0x2078, 0, 0, 0, g(Yes, No, false, false, "", "8")}, - {0x2079, 0, 0, 0, g(Yes, No, false, false, "", "9")}, - {0x207a, 0, 0, 0, g(Yes, No, false, false, "", "+")}, - {0x207b, 0, 0, 0, g(Yes, No, false, false, "", "−")}, - {0x207c, 0, 0, 0, g(Yes, No, false, false, "", "=")}, - {0x207d, 0, 0, 0, g(Yes, No, false, false, "", "(")}, - {0x207e, 0, 0, 0, g(Yes, No, false, false, "", ")")}, - {0x207f, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x2080, 0, 0, 0, g(Yes, No, false, false, "", "0")}, - {0x2081, 0, 0, 0, g(Yes, No, false, false, "", "1")}, - {0x2082, 0, 0, 0, g(Yes, No, false, false, "", "2")}, - {0x2083, 0, 0, 0, g(Yes, No, false, false, "", "3")}, - {0x2084, 0, 0, 0, g(Yes, No, false, false, "", "4")}, - {0x2085, 0, 0, 0, g(Yes, No, false, false, "", "5")}, - {0x2086, 0, 0, 0, g(Yes, No, false, false, "", "6")}, - {0x2087, 0, 0, 0, g(Yes, No, false, false, "", "7")}, - {0x2088, 0, 0, 0, g(Yes, No, false, false, "", "8")}, - {0x2089, 0, 0, 0, g(Yes, No, false, false, "", "9")}, - {0x208a, 0, 0, 0, g(Yes, No, false, false, "", "+")}, - {0x208b, 0, 0, 0, g(Yes, No, false, false, "", "−")}, - {0x208c, 0, 0, 0, g(Yes, No, false, false, "", "=")}, - {0x208d, 0, 0, 0, g(Yes, No, false, false, "", "(")}, - {0x208e, 0, 0, 0, g(Yes, No, false, false, "", ")")}, - {0x208f, 0, 0, 0, f(Yes, false, "")}, - {0x2090, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x2091, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x2092, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x2093, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x2094, 0, 0, 0, g(Yes, No, false, false, "", "ə")}, - {0x2095, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x2096, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x2097, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x2098, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x2099, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x209a, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x209b, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x209c, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x209d, 0, 0, 0, f(Yes, false, "")}, - {0x20a8, 0, 0, 0, g(Yes, No, false, false, "", "Rs")}, - {0x20a9, 0, 0, 0, f(Yes, false, "")}, - {0x20d0, 230, 1, 1, f(Yes, false, "")}, - {0x20d2, 1, 1, 1, f(Yes, false, "")}, - {0x20d4, 230, 1, 1, f(Yes, false, "")}, - {0x20d8, 1, 1, 1, f(Yes, false, "")}, - {0x20db, 230, 1, 1, f(Yes, false, "")}, - {0x20dd, 0, 0, 0, f(Yes, false, "")}, - {0x20e1, 230, 1, 1, f(Yes, false, "")}, - {0x20e2, 0, 0, 0, f(Yes, false, "")}, - {0x20e5, 1, 1, 1, f(Yes, false, "")}, - {0x20e7, 230, 1, 1, f(Yes, false, "")}, - {0x20e8, 220, 1, 1, f(Yes, false, "")}, - {0x20e9, 230, 1, 1, f(Yes, false, "")}, - {0x20ea, 1, 1, 1, f(Yes, false, "")}, - {0x20ec, 220, 1, 1, f(Yes, false, "")}, - {0x20f0, 230, 1, 1, f(Yes, false, "")}, - {0x20f1, 0, 0, 0, f(Yes, false, "")}, - {0x2100, 0, 0, 0, g(Yes, No, false, false, "", "a/c")}, - {0x2101, 0, 0, 0, g(Yes, No, false, false, "", "a/s")}, - {0x2102, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x2103, 0, 0, 0, g(Yes, No, false, false, "", "°C")}, - {0x2104, 0, 0, 0, f(Yes, false, "")}, - {0x2105, 0, 0, 0, g(Yes, No, false, false, "", "c/o")}, - {0x2106, 0, 0, 0, g(Yes, No, false, false, "", "c/u")}, - {0x2107, 0, 0, 0, g(Yes, No, false, false, "", "Ɛ")}, - {0x2108, 0, 0, 0, f(Yes, false, "")}, - {0x2109, 0, 0, 0, g(Yes, No, false, false, "", "°F")}, - {0x210a, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x210b, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x210e, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x210f, 0, 0, 0, g(Yes, No, false, false, "", "ħ")}, - {0x2110, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x2112, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x2113, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x2114, 0, 0, 0, f(Yes, false, "")}, - {0x2115, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x2116, 0, 0, 0, g(Yes, No, false, false, "", "No")}, - {0x2117, 0, 0, 0, f(Yes, false, "")}, - {0x2119, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x211a, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x211b, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x211e, 0, 0, 0, f(Yes, false, "")}, - {0x2120, 0, 0, 0, g(Yes, No, false, false, "", "SM")}, - {0x2121, 0, 0, 0, g(Yes, No, false, false, "", "TEL")}, - {0x2122, 0, 0, 0, g(Yes, No, false, false, "", "TM")}, - {0x2123, 0, 0, 0, f(Yes, false, "")}, - {0x2124, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x2125, 0, 0, 0, f(Yes, false, "")}, - {0x2126, 0, 0, 0, f(No, false, "Ω")}, - {0x2127, 0, 0, 0, f(Yes, false, "")}, - {0x2128, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x2129, 0, 0, 0, f(Yes, false, "")}, - {0x212a, 0, 0, 0, f(No, false, "K")}, - {0x212b, 0, 0, 1, f(No, false, "Å")}, - {0x212c, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x212d, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x212e, 0, 0, 0, f(Yes, false, "")}, - {0x212f, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x2130, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x2131, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x2132, 0, 0, 0, f(Yes, false, "")}, - {0x2133, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x2134, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x2135, 0, 0, 0, g(Yes, No, false, false, "", "א")}, - {0x2136, 0, 0, 0, g(Yes, No, false, false, "", "ב")}, - {0x2137, 0, 0, 0, g(Yes, No, false, false, "", "ג")}, - {0x2138, 0, 0, 0, g(Yes, No, false, false, "", "ד")}, - {0x2139, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x213a, 0, 0, 0, f(Yes, false, "")}, - {0x213b, 0, 0, 0, g(Yes, No, false, false, "", "FAX")}, - {0x213c, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x213d, 0, 0, 0, g(Yes, No, false, false, "", "γ")}, - {0x213e, 0, 0, 0, g(Yes, No, false, false, "", "Γ")}, - {0x213f, 0, 0, 0, g(Yes, No, false, false, "", "Π")}, - {0x2140, 0, 0, 0, g(Yes, No, false, false, "", "∑")}, - {0x2141, 0, 0, 0, f(Yes, false, "")}, - {0x2145, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x2146, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x2147, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x2148, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x2149, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x214a, 0, 0, 0, f(Yes, false, "")}, - {0x2150, 0, 0, 0, g(Yes, No, false, false, "", "1⁄7")}, - {0x2151, 0, 0, 0, g(Yes, No, false, false, "", "1⁄9")}, - {0x2152, 0, 0, 0, g(Yes, No, false, false, "", "1⁄10")}, - {0x2153, 0, 0, 0, g(Yes, No, false, false, "", "1⁄3")}, - {0x2154, 0, 0, 0, g(Yes, No, false, false, "", "2⁄3")}, - {0x2155, 0, 0, 0, g(Yes, No, false, false, "", "1⁄5")}, - {0x2156, 0, 0, 0, g(Yes, No, false, false, "", "2⁄5")}, - {0x2157, 0, 0, 0, g(Yes, No, false, false, "", "3⁄5")}, - {0x2158, 0, 0, 0, g(Yes, No, false, false, "", "4⁄5")}, - {0x2159, 0, 0, 0, g(Yes, No, false, false, "", "1⁄6")}, - {0x215a, 0, 0, 0, g(Yes, No, false, false, "", "5⁄6")}, - {0x215b, 0, 0, 0, g(Yes, No, false, false, "", "1⁄8")}, - {0x215c, 0, 0, 0, g(Yes, No, false, false, "", "3⁄8")}, - {0x215d, 0, 0, 0, g(Yes, No, false, false, "", "5⁄8")}, - {0x215e, 0, 0, 0, g(Yes, No, false, false, "", "7⁄8")}, - {0x215f, 0, 0, 0, g(Yes, No, false, false, "", "1⁄")}, - {0x2160, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x2161, 0, 0, 0, g(Yes, No, false, false, "", "II")}, - {0x2162, 0, 0, 0, g(Yes, No, false, false, "", "III")}, - {0x2163, 0, 0, 0, g(Yes, No, false, false, "", "IV")}, - {0x2164, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x2165, 0, 0, 0, g(Yes, No, false, false, "", "VI")}, - {0x2166, 0, 0, 0, g(Yes, No, false, false, "", "VII")}, - {0x2167, 0, 0, 0, g(Yes, No, false, false, "", "VIII")}, - {0x2168, 0, 0, 0, g(Yes, No, false, false, "", "IX")}, - {0x2169, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x216a, 0, 0, 0, g(Yes, No, false, false, "", "XI")}, - {0x216b, 0, 0, 0, g(Yes, No, false, false, "", "XII")}, - {0x216c, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x216d, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x216e, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x216f, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x2170, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x2171, 0, 0, 0, g(Yes, No, false, false, "", "ii")}, - {0x2172, 0, 0, 0, g(Yes, No, false, false, "", "iii")}, - {0x2173, 0, 0, 0, g(Yes, No, false, false, "", "iv")}, - {0x2174, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x2175, 0, 0, 0, g(Yes, No, false, false, "", "vi")}, - {0x2176, 0, 0, 0, g(Yes, No, false, false, "", "vii")}, - {0x2177, 0, 0, 0, g(Yes, No, false, false, "", "viii")}, - {0x2178, 0, 0, 0, g(Yes, No, false, false, "", "ix")}, - {0x2179, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x217a, 0, 0, 0, g(Yes, No, false, false, "", "xi")}, - {0x217b, 0, 0, 0, g(Yes, No, false, false, "", "xii")}, - {0x217c, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x217d, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x217e, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x217f, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x2180, 0, 0, 0, f(Yes, false, "")}, - {0x2189, 0, 0, 0, g(Yes, No, false, false, "", "0⁄3")}, - {0x218a, 0, 0, 0, f(Yes, false, "")}, - {0x2190, 0, 0, 0, f(Yes, true, "")}, - {0x2191, 0, 0, 0, f(Yes, false, "")}, - {0x2192, 0, 0, 0, f(Yes, true, "")}, - {0x2193, 0, 0, 0, f(Yes, false, "")}, - {0x2194, 0, 0, 0, f(Yes, true, "")}, - {0x2195, 0, 0, 0, f(Yes, false, "")}, - {0x219a, 0, 0, 1, f(Yes, false, "↚")}, - {0x219b, 0, 0, 1, f(Yes, false, "↛")}, - {0x219c, 0, 0, 0, f(Yes, false, "")}, - {0x21ae, 0, 0, 1, f(Yes, false, "↮")}, - {0x21af, 0, 0, 0, f(Yes, false, "")}, - {0x21cd, 0, 0, 1, f(Yes, false, "⇍")}, - {0x21ce, 0, 0, 1, f(Yes, false, "⇎")}, - {0x21cf, 0, 0, 1, f(Yes, false, "⇏")}, - {0x21d0, 0, 0, 0, f(Yes, true, "")}, - {0x21d1, 0, 0, 0, f(Yes, false, "")}, - {0x21d2, 0, 0, 0, f(Yes, true, "")}, - {0x21d3, 0, 0, 0, f(Yes, false, "")}, - {0x21d4, 0, 0, 0, f(Yes, true, "")}, - {0x21d5, 0, 0, 0, f(Yes, false, "")}, - {0x2203, 0, 0, 0, f(Yes, true, "")}, - {0x2204, 0, 0, 1, f(Yes, false, "∄")}, - {0x2205, 0, 0, 0, f(Yes, false, "")}, - {0x2208, 0, 0, 0, f(Yes, true, "")}, - {0x2209, 0, 0, 1, f(Yes, false, "∉")}, - {0x220a, 0, 0, 0, f(Yes, false, "")}, - {0x220b, 0, 0, 0, f(Yes, true, "")}, - {0x220c, 0, 0, 1, f(Yes, false, "∌")}, - {0x220d, 0, 0, 0, f(Yes, false, "")}, - {0x2223, 0, 0, 0, f(Yes, true, "")}, - {0x2224, 0, 0, 1, f(Yes, false, "∤")}, - {0x2225, 0, 0, 0, f(Yes, true, "")}, - {0x2226, 0, 0, 1, f(Yes, false, "∦")}, - {0x2227, 0, 0, 0, f(Yes, false, "")}, - {0x222c, 0, 0, 0, g(Yes, No, false, false, "", "∫∫")}, - {0x222d, 0, 0, 0, g(Yes, No, false, false, "", "∫∫∫")}, - {0x222e, 0, 0, 0, f(Yes, false, "")}, - {0x222f, 0, 0, 0, g(Yes, No, false, false, "", "∮∮")}, - {0x2230, 0, 0, 0, g(Yes, No, false, false, "", "∮∮∮")}, - {0x2231, 0, 0, 0, f(Yes, false, "")}, - {0x223c, 0, 0, 0, f(Yes, true, "")}, - {0x223d, 0, 0, 0, f(Yes, false, "")}, - {0x2241, 0, 0, 1, f(Yes, false, "≁")}, - {0x2242, 0, 0, 0, f(Yes, false, "")}, - {0x2243, 0, 0, 0, f(Yes, true, "")}, - {0x2244, 0, 0, 1, f(Yes, false, "≄")}, - {0x2245, 0, 0, 0, f(Yes, true, "")}, - {0x2246, 0, 0, 0, f(Yes, false, "")}, - {0x2247, 0, 0, 1, f(Yes, false, "≇")}, - {0x2248, 0, 0, 0, f(Yes, true, "")}, - {0x2249, 0, 0, 1, f(Yes, false, "≉")}, - {0x224a, 0, 0, 0, f(Yes, false, "")}, - {0x224d, 0, 0, 0, f(Yes, true, "")}, - {0x224e, 0, 0, 0, f(Yes, false, "")}, - {0x2260, 0, 0, 1, f(Yes, false, "≠")}, - {0x2261, 0, 0, 0, f(Yes, true, "")}, - {0x2262, 0, 0, 1, f(Yes, false, "≢")}, - {0x2263, 0, 0, 0, f(Yes, false, "")}, - {0x2264, 0, 0, 0, f(Yes, true, "")}, - {0x2266, 0, 0, 0, f(Yes, false, "")}, - {0x226d, 0, 0, 1, f(Yes, false, "≭")}, - {0x226e, 0, 0, 1, f(Yes, false, "≮")}, - {0x226f, 0, 0, 1, f(Yes, false, "≯")}, - {0x2270, 0, 0, 1, f(Yes, false, "≰")}, - {0x2271, 0, 0, 1, f(Yes, false, "≱")}, - {0x2272, 0, 0, 0, f(Yes, true, "")}, - {0x2274, 0, 0, 1, f(Yes, false, "≴")}, - {0x2275, 0, 0, 1, f(Yes, false, "≵")}, - {0x2276, 0, 0, 0, f(Yes, true, "")}, - {0x2278, 0, 0, 1, f(Yes, false, "≸")}, - {0x2279, 0, 0, 1, f(Yes, false, "≹")}, - {0x227a, 0, 0, 0, f(Yes, true, "")}, - {0x227e, 0, 0, 0, f(Yes, false, "")}, - {0x2280, 0, 0, 1, f(Yes, false, "⊀")}, - {0x2281, 0, 0, 1, f(Yes, false, "⊁")}, - {0x2282, 0, 0, 0, f(Yes, true, "")}, - {0x2284, 0, 0, 1, f(Yes, false, "⊄")}, - {0x2285, 0, 0, 1, f(Yes, false, "⊅")}, - {0x2286, 0, 0, 0, f(Yes, true, "")}, - {0x2288, 0, 0, 1, f(Yes, false, "⊈")}, - {0x2289, 0, 0, 1, f(Yes, false, "⊉")}, - {0x228a, 0, 0, 0, f(Yes, false, "")}, - {0x2291, 0, 0, 0, f(Yes, true, "")}, - {0x2293, 0, 0, 0, f(Yes, false, "")}, - {0x22a2, 0, 0, 0, f(Yes, true, "")}, - {0x22a3, 0, 0, 0, f(Yes, false, "")}, - {0x22a8, 0, 0, 0, f(Yes, true, "")}, - {0x22aa, 0, 0, 0, f(Yes, false, "")}, - {0x22ab, 0, 0, 0, f(Yes, true, "")}, - {0x22ac, 0, 0, 1, f(Yes, false, "⊬")}, - {0x22ad, 0, 0, 1, f(Yes, false, "⊭")}, - {0x22ae, 0, 0, 1, f(Yes, false, "⊮")}, - {0x22af, 0, 0, 1, f(Yes, false, "⊯")}, - {0x22b0, 0, 0, 0, f(Yes, false, "")}, - {0x22b2, 0, 0, 0, f(Yes, true, "")}, - {0x22b6, 0, 0, 0, f(Yes, false, "")}, - {0x22e0, 0, 0, 1, f(Yes, false, "⋠")}, - {0x22e1, 0, 0, 1, f(Yes, false, "⋡")}, - {0x22e2, 0, 0, 1, f(Yes, false, "⋢")}, - {0x22e3, 0, 0, 1, f(Yes, false, "⋣")}, - {0x22e4, 0, 0, 0, f(Yes, false, "")}, - {0x22ea, 0, 0, 1, f(Yes, false, "⋪")}, - {0x22eb, 0, 0, 1, f(Yes, false, "⋫")}, - {0x22ec, 0, 0, 1, f(Yes, false, "⋬")}, - {0x22ed, 0, 0, 1, f(Yes, false, "⋭")}, - {0x22ee, 0, 0, 0, f(Yes, false, "")}, - {0x2329, 0, 0, 0, f(No, false, "〈")}, - {0x232a, 0, 0, 0, f(No, false, "〉")}, - {0x232b, 0, 0, 0, f(Yes, false, "")}, - {0x2460, 0, 0, 0, g(Yes, No, false, false, "", "1")}, - {0x2461, 0, 0, 0, g(Yes, No, false, false, "", "2")}, - {0x2462, 0, 0, 0, g(Yes, No, false, false, "", "3")}, - {0x2463, 0, 0, 0, g(Yes, No, false, false, "", "4")}, - {0x2464, 0, 0, 0, g(Yes, No, false, false, "", "5")}, - {0x2465, 0, 0, 0, g(Yes, No, false, false, "", "6")}, - {0x2466, 0, 0, 0, g(Yes, No, false, false, "", "7")}, - {0x2467, 0, 0, 0, g(Yes, No, false, false, "", "8")}, - {0x2468, 0, 0, 0, g(Yes, No, false, false, "", "9")}, - {0x2469, 0, 0, 0, g(Yes, No, false, false, "", "10")}, - {0x246a, 0, 0, 0, g(Yes, No, false, false, "", "11")}, - {0x246b, 0, 0, 0, g(Yes, No, false, false, "", "12")}, - {0x246c, 0, 0, 0, g(Yes, No, false, false, "", "13")}, - {0x246d, 0, 0, 0, g(Yes, No, false, false, "", "14")}, - {0x246e, 0, 0, 0, g(Yes, No, false, false, "", "15")}, - {0x246f, 0, 0, 0, g(Yes, No, false, false, "", "16")}, - {0x2470, 0, 0, 0, g(Yes, No, false, false, "", "17")}, - {0x2471, 0, 0, 0, g(Yes, No, false, false, "", "18")}, - {0x2472, 0, 0, 0, g(Yes, No, false, false, "", "19")}, - {0x2473, 0, 0, 0, g(Yes, No, false, false, "", "20")}, - {0x2474, 0, 0, 0, g(Yes, No, false, false, "", "(1)")}, - {0x2475, 0, 0, 0, g(Yes, No, false, false, "", "(2)")}, - {0x2476, 0, 0, 0, g(Yes, No, false, false, "", "(3)")}, - {0x2477, 0, 0, 0, g(Yes, No, false, false, "", "(4)")}, - {0x2478, 0, 0, 0, g(Yes, No, false, false, "", "(5)")}, - {0x2479, 0, 0, 0, g(Yes, No, false, false, "", "(6)")}, - {0x247a, 0, 0, 0, g(Yes, No, false, false, "", "(7)")}, - {0x247b, 0, 0, 0, g(Yes, No, false, false, "", "(8)")}, - {0x247c, 0, 0, 0, g(Yes, No, false, false, "", "(9)")}, - {0x247d, 0, 0, 0, g(Yes, No, false, false, "", "(10)")}, - {0x247e, 0, 0, 0, g(Yes, No, false, false, "", "(11)")}, - {0x247f, 0, 0, 0, g(Yes, No, false, false, "", "(12)")}, - {0x2480, 0, 0, 0, g(Yes, No, false, false, "", "(13)")}, - {0x2481, 0, 0, 0, g(Yes, No, false, false, "", "(14)")}, - {0x2482, 0, 0, 0, g(Yes, No, false, false, "", "(15)")}, - {0x2483, 0, 0, 0, g(Yes, No, false, false, "", "(16)")}, - {0x2484, 0, 0, 0, g(Yes, No, false, false, "", "(17)")}, - {0x2485, 0, 0, 0, g(Yes, No, false, false, "", "(18)")}, - {0x2486, 0, 0, 0, g(Yes, No, false, false, "", "(19)")}, - {0x2487, 0, 0, 0, g(Yes, No, false, false, "", "(20)")}, - {0x2488, 0, 0, 0, g(Yes, No, false, false, "", "1.")}, - {0x2489, 0, 0, 0, g(Yes, No, false, false, "", "2.")}, - {0x248a, 0, 0, 0, g(Yes, No, false, false, "", "3.")}, - {0x248b, 0, 0, 0, g(Yes, No, false, false, "", "4.")}, - {0x248c, 0, 0, 0, g(Yes, No, false, false, "", "5.")}, - {0x248d, 0, 0, 0, g(Yes, No, false, false, "", "6.")}, - {0x248e, 0, 0, 0, g(Yes, No, false, false, "", "7.")}, - {0x248f, 0, 0, 0, g(Yes, No, false, false, "", "8.")}, - {0x2490, 0, 0, 0, g(Yes, No, false, false, "", "9.")}, - {0x2491, 0, 0, 0, g(Yes, No, false, false, "", "10.")}, - {0x2492, 0, 0, 0, g(Yes, No, false, false, "", "11.")}, - {0x2493, 0, 0, 0, g(Yes, No, false, false, "", "12.")}, - {0x2494, 0, 0, 0, g(Yes, No, false, false, "", "13.")}, - {0x2495, 0, 0, 0, g(Yes, No, false, false, "", "14.")}, - {0x2496, 0, 0, 0, g(Yes, No, false, false, "", "15.")}, - {0x2497, 0, 0, 0, g(Yes, No, false, false, "", "16.")}, - {0x2498, 0, 0, 0, g(Yes, No, false, false, "", "17.")}, - {0x2499, 0, 0, 0, g(Yes, No, false, false, "", "18.")}, - {0x249a, 0, 0, 0, g(Yes, No, false, false, "", "19.")}, - {0x249b, 0, 0, 0, g(Yes, No, false, false, "", "20.")}, - {0x249c, 0, 0, 0, g(Yes, No, false, false, "", "(a)")}, - {0x249d, 0, 0, 0, g(Yes, No, false, false, "", "(b)")}, - {0x249e, 0, 0, 0, g(Yes, No, false, false, "", "(c)")}, - {0x249f, 0, 0, 0, g(Yes, No, false, false, "", "(d)")}, - {0x24a0, 0, 0, 0, g(Yes, No, false, false, "", "(e)")}, - {0x24a1, 0, 0, 0, g(Yes, No, false, false, "", "(f)")}, - {0x24a2, 0, 0, 0, g(Yes, No, false, false, "", "(g)")}, - {0x24a3, 0, 0, 0, g(Yes, No, false, false, "", "(h)")}, - {0x24a4, 0, 0, 0, g(Yes, No, false, false, "", "(i)")}, - {0x24a5, 0, 0, 0, g(Yes, No, false, false, "", "(j)")}, - {0x24a6, 0, 0, 0, g(Yes, No, false, false, "", "(k)")}, - {0x24a7, 0, 0, 0, g(Yes, No, false, false, "", "(l)")}, - {0x24a8, 0, 0, 0, g(Yes, No, false, false, "", "(m)")}, - {0x24a9, 0, 0, 0, g(Yes, No, false, false, "", "(n)")}, - {0x24aa, 0, 0, 0, g(Yes, No, false, false, "", "(o)")}, - {0x24ab, 0, 0, 0, g(Yes, No, false, false, "", "(p)")}, - {0x24ac, 0, 0, 0, g(Yes, No, false, false, "", "(q)")}, - {0x24ad, 0, 0, 0, g(Yes, No, false, false, "", "(r)")}, - {0x24ae, 0, 0, 0, g(Yes, No, false, false, "", "(s)")}, - {0x24af, 0, 0, 0, g(Yes, No, false, false, "", "(t)")}, - {0x24b0, 0, 0, 0, g(Yes, No, false, false, "", "(u)")}, - {0x24b1, 0, 0, 0, g(Yes, No, false, false, "", "(v)")}, - {0x24b2, 0, 0, 0, g(Yes, No, false, false, "", "(w)")}, - {0x24b3, 0, 0, 0, g(Yes, No, false, false, "", "(x)")}, - {0x24b4, 0, 0, 0, g(Yes, No, false, false, "", "(y)")}, - {0x24b5, 0, 0, 0, g(Yes, No, false, false, "", "(z)")}, - {0x24b6, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x24b7, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x24b8, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x24b9, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x24ba, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x24bb, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x24bc, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x24bd, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x24be, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x24bf, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x24c0, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x24c1, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x24c2, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x24c3, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x24c4, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x24c5, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x24c6, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x24c7, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x24c8, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x24c9, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x24ca, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x24cb, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x24cc, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x24cd, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x24ce, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x24cf, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x24d0, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x24d1, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x24d2, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x24d3, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x24d4, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x24d5, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x24d6, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x24d7, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x24d8, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x24d9, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x24da, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x24db, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x24dc, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x24dd, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x24de, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x24df, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x24e0, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x24e1, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x24e2, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x24e3, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x24e4, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x24e5, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x24e6, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x24e7, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x24e8, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x24e9, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x24ea, 0, 0, 0, g(Yes, No, false, false, "", "0")}, - {0x24eb, 0, 0, 0, f(Yes, false, "")}, - {0x2a0c, 0, 0, 0, g(Yes, No, false, false, "", "∫∫∫∫")}, - {0x2a0d, 0, 0, 0, f(Yes, false, "")}, - {0x2a74, 0, 0, 0, g(Yes, No, false, false, "", "::=")}, - {0x2a75, 0, 0, 0, g(Yes, No, false, false, "", "==")}, - {0x2a76, 0, 0, 0, g(Yes, No, false, false, "", "===")}, - {0x2a77, 0, 0, 0, f(Yes, false, "")}, - {0x2adc, 0, 0, 1, f(No, false, "⫝̸")}, - {0x2add, 0, 0, 0, f(Yes, false, "")}, - {0x2c7c, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x2c7d, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x2c7e, 0, 0, 0, f(Yes, false, "")}, - {0x2cef, 230, 1, 1, f(Yes, false, "")}, - {0x2cf2, 0, 0, 0, f(Yes, false, "")}, - {0x2d6f, 0, 0, 0, g(Yes, No, false, false, "", "ⵡ")}, - {0x2d70, 0, 0, 0, f(Yes, false, "")}, - {0x2d7f, 9, 1, 1, f(Yes, false, "")}, - {0x2d80, 0, 0, 0, f(Yes, false, "")}, - {0x2de0, 230, 1, 1, f(Yes, false, "")}, - {0x2e00, 0, 0, 0, f(Yes, false, "")}, - {0x2e9f, 0, 0, 0, g(Yes, No, false, false, "", "母")}, - {0x2ea0, 0, 0, 0, f(Yes, false, "")}, - {0x2ef3, 0, 0, 0, g(Yes, No, false, false, "", "龟")}, - {0x2ef4, 0, 0, 0, f(Yes, false, "")}, - {0x2f00, 0, 0, 0, g(Yes, No, false, false, "", "一")}, - {0x2f01, 0, 0, 0, g(Yes, No, false, false, "", "丨")}, - {0x2f02, 0, 0, 0, g(Yes, No, false, false, "", "丶")}, - {0x2f03, 0, 0, 0, g(Yes, No, false, false, "", "丿")}, - {0x2f04, 0, 0, 0, g(Yes, No, false, false, "", "乙")}, - {0x2f05, 0, 0, 0, g(Yes, No, false, false, "", "亅")}, - {0x2f06, 0, 0, 0, g(Yes, No, false, false, "", "二")}, - {0x2f07, 0, 0, 0, g(Yes, No, false, false, "", "亠")}, - {0x2f08, 0, 0, 0, g(Yes, No, false, false, "", "人")}, - {0x2f09, 0, 0, 0, g(Yes, No, false, false, "", "儿")}, - {0x2f0a, 0, 0, 0, g(Yes, No, false, false, "", "入")}, - {0x2f0b, 0, 0, 0, g(Yes, No, false, false, "", "八")}, - {0x2f0c, 0, 0, 0, g(Yes, No, false, false, "", "冂")}, - {0x2f0d, 0, 0, 0, g(Yes, No, false, false, "", "冖")}, - {0x2f0e, 0, 0, 0, g(Yes, No, false, false, "", "冫")}, - {0x2f0f, 0, 0, 0, g(Yes, No, false, false, "", "几")}, - {0x2f10, 0, 0, 0, g(Yes, No, false, false, "", "凵")}, - {0x2f11, 0, 0, 0, g(Yes, No, false, false, "", "刀")}, - {0x2f12, 0, 0, 0, g(Yes, No, false, false, "", "力")}, - {0x2f13, 0, 0, 0, g(Yes, No, false, false, "", "勹")}, - {0x2f14, 0, 0, 0, g(Yes, No, false, false, "", "匕")}, - {0x2f15, 0, 0, 0, g(Yes, No, false, false, "", "匚")}, - {0x2f16, 0, 0, 0, g(Yes, No, false, false, "", "匸")}, - {0x2f17, 0, 0, 0, g(Yes, No, false, false, "", "十")}, - {0x2f18, 0, 0, 0, g(Yes, No, false, false, "", "卜")}, - {0x2f19, 0, 0, 0, g(Yes, No, false, false, "", "卩")}, - {0x2f1a, 0, 0, 0, g(Yes, No, false, false, "", "厂")}, - {0x2f1b, 0, 0, 0, g(Yes, No, false, false, "", "厶")}, - {0x2f1c, 0, 0, 0, g(Yes, No, false, false, "", "又")}, - {0x2f1d, 0, 0, 0, g(Yes, No, false, false, "", "口")}, - {0x2f1e, 0, 0, 0, g(Yes, No, false, false, "", "囗")}, - {0x2f1f, 0, 0, 0, g(Yes, No, false, false, "", "土")}, - {0x2f20, 0, 0, 0, g(Yes, No, false, false, "", "士")}, - {0x2f21, 0, 0, 0, g(Yes, No, false, false, "", "夂")}, - {0x2f22, 0, 0, 0, g(Yes, No, false, false, "", "夊")}, - {0x2f23, 0, 0, 0, g(Yes, No, false, false, "", "夕")}, - {0x2f24, 0, 0, 0, g(Yes, No, false, false, "", "大")}, - {0x2f25, 0, 0, 0, g(Yes, No, false, false, "", "女")}, - {0x2f26, 0, 0, 0, g(Yes, No, false, false, "", "子")}, - {0x2f27, 0, 0, 0, g(Yes, No, false, false, "", "宀")}, - {0x2f28, 0, 0, 0, g(Yes, No, false, false, "", "寸")}, - {0x2f29, 0, 0, 0, g(Yes, No, false, false, "", "小")}, - {0x2f2a, 0, 0, 0, g(Yes, No, false, false, "", "尢")}, - {0x2f2b, 0, 0, 0, g(Yes, No, false, false, "", "尸")}, - {0x2f2c, 0, 0, 0, g(Yes, No, false, false, "", "屮")}, - {0x2f2d, 0, 0, 0, g(Yes, No, false, false, "", "山")}, - {0x2f2e, 0, 0, 0, g(Yes, No, false, false, "", "巛")}, - {0x2f2f, 0, 0, 0, g(Yes, No, false, false, "", "工")}, - {0x2f30, 0, 0, 0, g(Yes, No, false, false, "", "己")}, - {0x2f31, 0, 0, 0, g(Yes, No, false, false, "", "巾")}, - {0x2f32, 0, 0, 0, g(Yes, No, false, false, "", "干")}, - {0x2f33, 0, 0, 0, g(Yes, No, false, false, "", "幺")}, - {0x2f34, 0, 0, 0, g(Yes, No, false, false, "", "广")}, - {0x2f35, 0, 0, 0, g(Yes, No, false, false, "", "廴")}, - {0x2f36, 0, 0, 0, g(Yes, No, false, false, "", "廾")}, - {0x2f37, 0, 0, 0, g(Yes, No, false, false, "", "弋")}, - {0x2f38, 0, 0, 0, g(Yes, No, false, false, "", "弓")}, - {0x2f39, 0, 0, 0, g(Yes, No, false, false, "", "彐")}, - {0x2f3a, 0, 0, 0, g(Yes, No, false, false, "", "彡")}, - {0x2f3b, 0, 0, 0, g(Yes, No, false, false, "", "彳")}, - {0x2f3c, 0, 0, 0, g(Yes, No, false, false, "", "心")}, - {0x2f3d, 0, 0, 0, g(Yes, No, false, false, "", "戈")}, - {0x2f3e, 0, 0, 0, g(Yes, No, false, false, "", "戶")}, - {0x2f3f, 0, 0, 0, g(Yes, No, false, false, "", "手")}, - {0x2f40, 0, 0, 0, g(Yes, No, false, false, "", "支")}, - {0x2f41, 0, 0, 0, g(Yes, No, false, false, "", "攴")}, - {0x2f42, 0, 0, 0, g(Yes, No, false, false, "", "文")}, - {0x2f43, 0, 0, 0, g(Yes, No, false, false, "", "斗")}, - {0x2f44, 0, 0, 0, g(Yes, No, false, false, "", "斤")}, - {0x2f45, 0, 0, 0, g(Yes, No, false, false, "", "方")}, - {0x2f46, 0, 0, 0, g(Yes, No, false, false, "", "无")}, - {0x2f47, 0, 0, 0, g(Yes, No, false, false, "", "日")}, - {0x2f48, 0, 0, 0, g(Yes, No, false, false, "", "曰")}, - {0x2f49, 0, 0, 0, g(Yes, No, false, false, "", "月")}, - {0x2f4a, 0, 0, 0, g(Yes, No, false, false, "", "木")}, - {0x2f4b, 0, 0, 0, g(Yes, No, false, false, "", "欠")}, - {0x2f4c, 0, 0, 0, g(Yes, No, false, false, "", "止")}, - {0x2f4d, 0, 0, 0, g(Yes, No, false, false, "", "歹")}, - {0x2f4e, 0, 0, 0, g(Yes, No, false, false, "", "殳")}, - {0x2f4f, 0, 0, 0, g(Yes, No, false, false, "", "毋")}, - {0x2f50, 0, 0, 0, g(Yes, No, false, false, "", "比")}, - {0x2f51, 0, 0, 0, g(Yes, No, false, false, "", "毛")}, - {0x2f52, 0, 0, 0, g(Yes, No, false, false, "", "氏")}, - {0x2f53, 0, 0, 0, g(Yes, No, false, false, "", "气")}, - {0x2f54, 0, 0, 0, g(Yes, No, false, false, "", "水")}, - {0x2f55, 0, 0, 0, g(Yes, No, false, false, "", "火")}, - {0x2f56, 0, 0, 0, g(Yes, No, false, false, "", "爪")}, - {0x2f57, 0, 0, 0, g(Yes, No, false, false, "", "父")}, - {0x2f58, 0, 0, 0, g(Yes, No, false, false, "", "爻")}, - {0x2f59, 0, 0, 0, g(Yes, No, false, false, "", "爿")}, - {0x2f5a, 0, 0, 0, g(Yes, No, false, false, "", "片")}, - {0x2f5b, 0, 0, 0, g(Yes, No, false, false, "", "牙")}, - {0x2f5c, 0, 0, 0, g(Yes, No, false, false, "", "牛")}, - {0x2f5d, 0, 0, 0, g(Yes, No, false, false, "", "犬")}, - {0x2f5e, 0, 0, 0, g(Yes, No, false, false, "", "玄")}, - {0x2f5f, 0, 0, 0, g(Yes, No, false, false, "", "玉")}, - {0x2f60, 0, 0, 0, g(Yes, No, false, false, "", "瓜")}, - {0x2f61, 0, 0, 0, g(Yes, No, false, false, "", "瓦")}, - {0x2f62, 0, 0, 0, g(Yes, No, false, false, "", "甘")}, - {0x2f63, 0, 0, 0, g(Yes, No, false, false, "", "生")}, - {0x2f64, 0, 0, 0, g(Yes, No, false, false, "", "用")}, - {0x2f65, 0, 0, 0, g(Yes, No, false, false, "", "田")}, - {0x2f66, 0, 0, 0, g(Yes, No, false, false, "", "疋")}, - {0x2f67, 0, 0, 0, g(Yes, No, false, false, "", "疒")}, - {0x2f68, 0, 0, 0, g(Yes, No, false, false, "", "癶")}, - {0x2f69, 0, 0, 0, g(Yes, No, false, false, "", "白")}, - {0x2f6a, 0, 0, 0, g(Yes, No, false, false, "", "皮")}, - {0x2f6b, 0, 0, 0, g(Yes, No, false, false, "", "皿")}, - {0x2f6c, 0, 0, 0, g(Yes, No, false, false, "", "目")}, - {0x2f6d, 0, 0, 0, g(Yes, No, false, false, "", "矛")}, - {0x2f6e, 0, 0, 0, g(Yes, No, false, false, "", "矢")}, - {0x2f6f, 0, 0, 0, g(Yes, No, false, false, "", "石")}, - {0x2f70, 0, 0, 0, g(Yes, No, false, false, "", "示")}, - {0x2f71, 0, 0, 0, g(Yes, No, false, false, "", "禸")}, - {0x2f72, 0, 0, 0, g(Yes, No, false, false, "", "禾")}, - {0x2f73, 0, 0, 0, g(Yes, No, false, false, "", "穴")}, - {0x2f74, 0, 0, 0, g(Yes, No, false, false, "", "立")}, - {0x2f75, 0, 0, 0, g(Yes, No, false, false, "", "竹")}, - {0x2f76, 0, 0, 0, g(Yes, No, false, false, "", "米")}, - {0x2f77, 0, 0, 0, g(Yes, No, false, false, "", "糸")}, - {0x2f78, 0, 0, 0, g(Yes, No, false, false, "", "缶")}, - {0x2f79, 0, 0, 0, g(Yes, No, false, false, "", "网")}, - {0x2f7a, 0, 0, 0, g(Yes, No, false, false, "", "羊")}, - {0x2f7b, 0, 0, 0, g(Yes, No, false, false, "", "羽")}, - {0x2f7c, 0, 0, 0, g(Yes, No, false, false, "", "老")}, - {0x2f7d, 0, 0, 0, g(Yes, No, false, false, "", "而")}, - {0x2f7e, 0, 0, 0, g(Yes, No, false, false, "", "耒")}, - {0x2f7f, 0, 0, 0, g(Yes, No, false, false, "", "耳")}, - {0x2f80, 0, 0, 0, g(Yes, No, false, false, "", "聿")}, - {0x2f81, 0, 0, 0, g(Yes, No, false, false, "", "肉")}, - {0x2f82, 0, 0, 0, g(Yes, No, false, false, "", "臣")}, - {0x2f83, 0, 0, 0, g(Yes, No, false, false, "", "自")}, - {0x2f84, 0, 0, 0, g(Yes, No, false, false, "", "至")}, - {0x2f85, 0, 0, 0, g(Yes, No, false, false, "", "臼")}, - {0x2f86, 0, 0, 0, g(Yes, No, false, false, "", "舌")}, - {0x2f87, 0, 0, 0, g(Yes, No, false, false, "", "舛")}, - {0x2f88, 0, 0, 0, g(Yes, No, false, false, "", "舟")}, - {0x2f89, 0, 0, 0, g(Yes, No, false, false, "", "艮")}, - {0x2f8a, 0, 0, 0, g(Yes, No, false, false, "", "色")}, - {0x2f8b, 0, 0, 0, g(Yes, No, false, false, "", "艸")}, - {0x2f8c, 0, 0, 0, g(Yes, No, false, false, "", "虍")}, - {0x2f8d, 0, 0, 0, g(Yes, No, false, false, "", "虫")}, - {0x2f8e, 0, 0, 0, g(Yes, No, false, false, "", "血")}, - {0x2f8f, 0, 0, 0, g(Yes, No, false, false, "", "行")}, - {0x2f90, 0, 0, 0, g(Yes, No, false, false, "", "衣")}, - {0x2f91, 0, 0, 0, g(Yes, No, false, false, "", "襾")}, - {0x2f92, 0, 0, 0, g(Yes, No, false, false, "", "見")}, - {0x2f93, 0, 0, 0, g(Yes, No, false, false, "", "角")}, - {0x2f94, 0, 0, 0, g(Yes, No, false, false, "", "言")}, - {0x2f95, 0, 0, 0, g(Yes, No, false, false, "", "谷")}, - {0x2f96, 0, 0, 0, g(Yes, No, false, false, "", "豆")}, - {0x2f97, 0, 0, 0, g(Yes, No, false, false, "", "豕")}, - {0x2f98, 0, 0, 0, g(Yes, No, false, false, "", "豸")}, - {0x2f99, 0, 0, 0, g(Yes, No, false, false, "", "貝")}, - {0x2f9a, 0, 0, 0, g(Yes, No, false, false, "", "赤")}, - {0x2f9b, 0, 0, 0, g(Yes, No, false, false, "", "走")}, - {0x2f9c, 0, 0, 0, g(Yes, No, false, false, "", "足")}, - {0x2f9d, 0, 0, 0, g(Yes, No, false, false, "", "身")}, - {0x2f9e, 0, 0, 0, g(Yes, No, false, false, "", "車")}, - {0x2f9f, 0, 0, 0, g(Yes, No, false, false, "", "辛")}, - {0x2fa0, 0, 0, 0, g(Yes, No, false, false, "", "辰")}, - {0x2fa1, 0, 0, 0, g(Yes, No, false, false, "", "辵")}, - {0x2fa2, 0, 0, 0, g(Yes, No, false, false, "", "邑")}, - {0x2fa3, 0, 0, 0, g(Yes, No, false, false, "", "酉")}, - {0x2fa4, 0, 0, 0, g(Yes, No, false, false, "", "釆")}, - {0x2fa5, 0, 0, 0, g(Yes, No, false, false, "", "里")}, - {0x2fa6, 0, 0, 0, g(Yes, No, false, false, "", "金")}, - {0x2fa7, 0, 0, 0, g(Yes, No, false, false, "", "長")}, - {0x2fa8, 0, 0, 0, g(Yes, No, false, false, "", "門")}, - {0x2fa9, 0, 0, 0, g(Yes, No, false, false, "", "阜")}, - {0x2faa, 0, 0, 0, g(Yes, No, false, false, "", "隶")}, - {0x2fab, 0, 0, 0, g(Yes, No, false, false, "", "隹")}, - {0x2fac, 0, 0, 0, g(Yes, No, false, false, "", "雨")}, - {0x2fad, 0, 0, 0, g(Yes, No, false, false, "", "靑")}, - {0x2fae, 0, 0, 0, g(Yes, No, false, false, "", "非")}, - {0x2faf, 0, 0, 0, g(Yes, No, false, false, "", "面")}, - {0x2fb0, 0, 0, 0, g(Yes, No, false, false, "", "革")}, - {0x2fb1, 0, 0, 0, g(Yes, No, false, false, "", "韋")}, - {0x2fb2, 0, 0, 0, g(Yes, No, false, false, "", "韭")}, - {0x2fb3, 0, 0, 0, g(Yes, No, false, false, "", "音")}, - {0x2fb4, 0, 0, 0, g(Yes, No, false, false, "", "頁")}, - {0x2fb5, 0, 0, 0, g(Yes, No, false, false, "", "風")}, - {0x2fb6, 0, 0, 0, g(Yes, No, false, false, "", "飛")}, - {0x2fb7, 0, 0, 0, g(Yes, No, false, false, "", "食")}, - {0x2fb8, 0, 0, 0, g(Yes, No, false, false, "", "首")}, - {0x2fb9, 0, 0, 0, g(Yes, No, false, false, "", "香")}, - {0x2fba, 0, 0, 0, g(Yes, No, false, false, "", "馬")}, - {0x2fbb, 0, 0, 0, g(Yes, No, false, false, "", "骨")}, - {0x2fbc, 0, 0, 0, g(Yes, No, false, false, "", "高")}, - {0x2fbd, 0, 0, 0, g(Yes, No, false, false, "", "髟")}, - {0x2fbe, 0, 0, 0, g(Yes, No, false, false, "", "鬥")}, - {0x2fbf, 0, 0, 0, g(Yes, No, false, false, "", "鬯")}, - {0x2fc0, 0, 0, 0, g(Yes, No, false, false, "", "鬲")}, - {0x2fc1, 0, 0, 0, g(Yes, No, false, false, "", "鬼")}, - {0x2fc2, 0, 0, 0, g(Yes, No, false, false, "", "魚")}, - {0x2fc3, 0, 0, 0, g(Yes, No, false, false, "", "鳥")}, - {0x2fc4, 0, 0, 0, g(Yes, No, false, false, "", "鹵")}, - {0x2fc5, 0, 0, 0, g(Yes, No, false, false, "", "鹿")}, - {0x2fc6, 0, 0, 0, g(Yes, No, false, false, "", "麥")}, - {0x2fc7, 0, 0, 0, g(Yes, No, false, false, "", "麻")}, - {0x2fc8, 0, 0, 0, g(Yes, No, false, false, "", "黃")}, - {0x2fc9, 0, 0, 0, g(Yes, No, false, false, "", "黍")}, - {0x2fca, 0, 0, 0, g(Yes, No, false, false, "", "黑")}, - {0x2fcb, 0, 0, 0, g(Yes, No, false, false, "", "黹")}, - {0x2fcc, 0, 0, 0, g(Yes, No, false, false, "", "黽")}, - {0x2fcd, 0, 0, 0, g(Yes, No, false, false, "", "鼎")}, - {0x2fce, 0, 0, 0, g(Yes, No, false, false, "", "鼓")}, - {0x2fcf, 0, 0, 0, g(Yes, No, false, false, "", "鼠")}, - {0x2fd0, 0, 0, 0, g(Yes, No, false, false, "", "鼻")}, - {0x2fd1, 0, 0, 0, g(Yes, No, false, false, "", "齊")}, - {0x2fd2, 0, 0, 0, g(Yes, No, false, false, "", "齒")}, - {0x2fd3, 0, 0, 0, g(Yes, No, false, false, "", "龍")}, - {0x2fd4, 0, 0, 0, g(Yes, No, false, false, "", "龜")}, - {0x2fd5, 0, 0, 0, g(Yes, No, false, false, "", "龠")}, - {0x2fd6, 0, 0, 0, f(Yes, false, "")}, - {0x3000, 0, 0, 0, g(Yes, No, false, false, "", " ")}, - {0x3001, 0, 0, 0, f(Yes, false, "")}, - {0x302a, 218, 1, 1, f(Yes, false, "")}, - {0x302b, 228, 1, 1, f(Yes, false, "")}, - {0x302c, 232, 1, 1, f(Yes, false, "")}, - {0x302d, 222, 1, 1, f(Yes, false, "")}, - {0x302e, 224, 1, 1, f(Yes, false, "")}, - {0x3030, 0, 0, 0, f(Yes, false, "")}, - {0x3036, 0, 0, 0, g(Yes, No, false, false, "", "〒")}, - {0x3037, 0, 0, 0, f(Yes, false, "")}, - {0x3038, 0, 0, 0, g(Yes, No, false, false, "", "十")}, - {0x3039, 0, 0, 0, g(Yes, No, false, false, "", "卄")}, - {0x303a, 0, 0, 0, g(Yes, No, false, false, "", "卅")}, - {0x303b, 0, 0, 0, f(Yes, false, "")}, - {0x3046, 0, 0, 0, f(Yes, true, "")}, - {0x3047, 0, 0, 0, f(Yes, false, "")}, - {0x304b, 0, 0, 0, f(Yes, true, "")}, - {0x304c, 0, 0, 1, f(Yes, false, "が")}, - {0x304d, 0, 0, 0, f(Yes, true, "")}, - {0x304e, 0, 0, 1, f(Yes, false, "ぎ")}, - {0x304f, 0, 0, 0, f(Yes, true, "")}, - {0x3050, 0, 0, 1, f(Yes, false, "ぐ")}, - {0x3051, 0, 0, 0, f(Yes, true, "")}, - {0x3052, 0, 0, 1, f(Yes, false, "げ")}, - {0x3053, 0, 0, 0, f(Yes, true, "")}, - {0x3054, 0, 0, 1, f(Yes, false, "ご")}, - {0x3055, 0, 0, 0, f(Yes, true, "")}, - {0x3056, 0, 0, 1, f(Yes, false, "ざ")}, - {0x3057, 0, 0, 0, f(Yes, true, "")}, - {0x3058, 0, 0, 1, f(Yes, false, "じ")}, - {0x3059, 0, 0, 0, f(Yes, true, "")}, - {0x305a, 0, 0, 1, f(Yes, false, "ず")}, - {0x305b, 0, 0, 0, f(Yes, true, "")}, - {0x305c, 0, 0, 1, f(Yes, false, "ぜ")}, - {0x305d, 0, 0, 0, f(Yes, true, "")}, - {0x305e, 0, 0, 1, f(Yes, false, "ぞ")}, - {0x305f, 0, 0, 0, f(Yes, true, "")}, - {0x3060, 0, 0, 1, f(Yes, false, "だ")}, - {0x3061, 0, 0, 0, f(Yes, true, "")}, - {0x3062, 0, 0, 1, f(Yes, false, "ぢ")}, - {0x3063, 0, 0, 0, f(Yes, false, "")}, - {0x3064, 0, 0, 0, f(Yes, true, "")}, - {0x3065, 0, 0, 1, f(Yes, false, "づ")}, - {0x3066, 0, 0, 0, f(Yes, true, "")}, - {0x3067, 0, 0, 1, f(Yes, false, "で")}, - {0x3068, 0, 0, 0, f(Yes, true, "")}, - {0x3069, 0, 0, 1, f(Yes, false, "ど")}, - {0x306a, 0, 0, 0, f(Yes, false, "")}, - {0x306f, 0, 0, 0, f(Yes, true, "")}, - {0x3070, 0, 0, 1, f(Yes, false, "ば")}, - {0x3071, 0, 0, 1, f(Yes, false, "ぱ")}, - {0x3072, 0, 0, 0, f(Yes, true, "")}, - {0x3073, 0, 0, 1, f(Yes, false, "び")}, - {0x3074, 0, 0, 1, f(Yes, false, "ぴ")}, - {0x3075, 0, 0, 0, f(Yes, true, "")}, - {0x3076, 0, 0, 1, f(Yes, false, "ぶ")}, - {0x3077, 0, 0, 1, f(Yes, false, "ぷ")}, - {0x3078, 0, 0, 0, f(Yes, true, "")}, - {0x3079, 0, 0, 1, f(Yes, false, "べ")}, - {0x307a, 0, 0, 1, f(Yes, false, "ぺ")}, - {0x307b, 0, 0, 0, f(Yes, true, "")}, - {0x307c, 0, 0, 1, f(Yes, false, "ぼ")}, - {0x307d, 0, 0, 1, f(Yes, false, "ぽ")}, - {0x307e, 0, 0, 0, f(Yes, false, "")}, - {0x3094, 0, 0, 1, f(Yes, false, "ゔ")}, - {0x3095, 0, 0, 0, f(Yes, false, "")}, - {0x3099, 8, 1, 1, f(Maybe, false, "")}, - {0x309b, 0, 0, 1, g(Yes, No, false, false, "", " ゙")}, - {0x309c, 0, 0, 1, g(Yes, No, false, false, "", " ゚")}, - {0x309d, 0, 0, 0, f(Yes, true, "")}, - {0x309e, 0, 0, 1, f(Yes, false, "ゞ")}, - {0x309f, 0, 0, 0, g(Yes, No, false, false, "", "より")}, - {0x30a0, 0, 0, 0, f(Yes, false, "")}, - {0x30a6, 0, 0, 0, f(Yes, true, "")}, - {0x30a7, 0, 0, 0, f(Yes, false, "")}, - {0x30ab, 0, 0, 0, f(Yes, true, "")}, - {0x30ac, 0, 0, 1, f(Yes, false, "ガ")}, - {0x30ad, 0, 0, 0, f(Yes, true, "")}, - {0x30ae, 0, 0, 1, f(Yes, false, "ギ")}, - {0x30af, 0, 0, 0, f(Yes, true, "")}, - {0x30b0, 0, 0, 1, f(Yes, false, "グ")}, - {0x30b1, 0, 0, 0, f(Yes, true, "")}, - {0x30b2, 0, 0, 1, f(Yes, false, "ゲ")}, - {0x30b3, 0, 0, 0, f(Yes, true, "")}, - {0x30b4, 0, 0, 1, f(Yes, false, "ゴ")}, - {0x30b5, 0, 0, 0, f(Yes, true, "")}, - {0x30b6, 0, 0, 1, f(Yes, false, "ザ")}, - {0x30b7, 0, 0, 0, f(Yes, true, "")}, - {0x30b8, 0, 0, 1, f(Yes, false, "ジ")}, - {0x30b9, 0, 0, 0, f(Yes, true, "")}, - {0x30ba, 0, 0, 1, f(Yes, false, "ズ")}, - {0x30bb, 0, 0, 0, f(Yes, true, "")}, - {0x30bc, 0, 0, 1, f(Yes, false, "ゼ")}, - {0x30bd, 0, 0, 0, f(Yes, true, "")}, - {0x30be, 0, 0, 1, f(Yes, false, "ゾ")}, - {0x30bf, 0, 0, 0, f(Yes, true, "")}, - {0x30c0, 0, 0, 1, f(Yes, false, "ダ")}, - {0x30c1, 0, 0, 0, f(Yes, true, "")}, - {0x30c2, 0, 0, 1, f(Yes, false, "ヂ")}, - {0x30c3, 0, 0, 0, f(Yes, false, "")}, - {0x30c4, 0, 0, 0, f(Yes, true, "")}, - {0x30c5, 0, 0, 1, f(Yes, false, "ヅ")}, - {0x30c6, 0, 0, 0, f(Yes, true, "")}, - {0x30c7, 0, 0, 1, f(Yes, false, "デ")}, - {0x30c8, 0, 0, 0, f(Yes, true, "")}, - {0x30c9, 0, 0, 1, f(Yes, false, "ド")}, - {0x30ca, 0, 0, 0, f(Yes, false, "")}, - {0x30cf, 0, 0, 0, f(Yes, true, "")}, - {0x30d0, 0, 0, 1, f(Yes, false, "バ")}, - {0x30d1, 0, 0, 1, f(Yes, false, "パ")}, - {0x30d2, 0, 0, 0, f(Yes, true, "")}, - {0x30d3, 0, 0, 1, f(Yes, false, "ビ")}, - {0x30d4, 0, 0, 1, f(Yes, false, "ピ")}, - {0x30d5, 0, 0, 0, f(Yes, true, "")}, - {0x30d6, 0, 0, 1, f(Yes, false, "ブ")}, - {0x30d7, 0, 0, 1, f(Yes, false, "プ")}, - {0x30d8, 0, 0, 0, f(Yes, true, "")}, - {0x30d9, 0, 0, 1, f(Yes, false, "ベ")}, - {0x30da, 0, 0, 1, f(Yes, false, "ペ")}, - {0x30db, 0, 0, 0, f(Yes, true, "")}, - {0x30dc, 0, 0, 1, f(Yes, false, "ボ")}, - {0x30dd, 0, 0, 1, f(Yes, false, "ポ")}, - {0x30de, 0, 0, 0, f(Yes, false, "")}, - {0x30ef, 0, 0, 0, f(Yes, true, "")}, - {0x30f3, 0, 0, 0, f(Yes, false, "")}, - {0x30f4, 0, 0, 1, f(Yes, false, "ヴ")}, - {0x30f5, 0, 0, 0, f(Yes, false, "")}, - {0x30f7, 0, 0, 1, f(Yes, false, "ヷ")}, - {0x30f8, 0, 0, 1, f(Yes, false, "ヸ")}, - {0x30f9, 0, 0, 1, f(Yes, false, "ヹ")}, - {0x30fa, 0, 0, 1, f(Yes, false, "ヺ")}, - {0x30fb, 0, 0, 0, f(Yes, false, "")}, - {0x30fd, 0, 0, 0, f(Yes, true, "")}, - {0x30fe, 0, 0, 1, f(Yes, false, "ヾ")}, - {0x30ff, 0, 0, 0, g(Yes, No, false, false, "", "コト")}, - {0x3100, 0, 0, 0, f(Yes, false, "")}, - {0x3131, 0, 0, 0, g(Yes, No, false, false, "", "ᄀ")}, - {0x3132, 0, 0, 0, g(Yes, No, false, false, "", "ᄁ")}, - {0x3133, 0, 1, 1, g(Yes, No, false, false, "", "ᆪ")}, - {0x3134, 0, 0, 0, g(Yes, No, false, false, "", "ᄂ")}, - {0x3135, 0, 1, 1, g(Yes, No, false, false, "", "ᆬ")}, - {0x3136, 0, 1, 1, g(Yes, No, false, false, "", "ᆭ")}, - {0x3137, 0, 0, 0, g(Yes, No, false, false, "", "ᄃ")}, - {0x3138, 0, 0, 0, g(Yes, No, false, false, "", "ᄄ")}, - {0x3139, 0, 0, 0, g(Yes, No, false, false, "", "ᄅ")}, - {0x313a, 0, 1, 1, g(Yes, No, false, false, "", "ᆰ")}, - {0x313b, 0, 1, 1, g(Yes, No, false, false, "", "ᆱ")}, - {0x313c, 0, 1, 1, g(Yes, No, false, false, "", "ᆲ")}, - {0x313d, 0, 1, 1, g(Yes, No, false, false, "", "ᆳ")}, - {0x313e, 0, 1, 1, g(Yes, No, false, false, "", "ᆴ")}, - {0x313f, 0, 1, 1, g(Yes, No, false, false, "", "ᆵ")}, - {0x3140, 0, 0, 0, g(Yes, No, false, false, "", "ᄚ")}, - {0x3141, 0, 0, 0, g(Yes, No, false, false, "", "ᄆ")}, - {0x3142, 0, 0, 0, g(Yes, No, false, false, "", "ᄇ")}, - {0x3143, 0, 0, 0, g(Yes, No, false, false, "", "ᄈ")}, - {0x3144, 0, 0, 0, g(Yes, No, false, false, "", "ᄡ")}, - {0x3145, 0, 0, 0, g(Yes, No, false, false, "", "ᄉ")}, - {0x3146, 0, 0, 0, g(Yes, No, false, false, "", "ᄊ")}, - {0x3147, 0, 0, 0, g(Yes, No, false, false, "", "ᄋ")}, - {0x3148, 0, 0, 0, g(Yes, No, false, false, "", "ᄌ")}, - {0x3149, 0, 0, 0, g(Yes, No, false, false, "", "ᄍ")}, - {0x314a, 0, 0, 0, g(Yes, No, false, false, "", "ᄎ")}, - {0x314b, 0, 0, 0, g(Yes, No, false, false, "", "ᄏ")}, - {0x314c, 0, 0, 0, g(Yes, No, false, false, "", "ᄐ")}, - {0x314d, 0, 0, 0, g(Yes, No, false, false, "", "ᄑ")}, - {0x314e, 0, 0, 0, g(Yes, No, false, false, "", "ᄒ")}, - {0x314f, 0, 1, 1, g(Yes, No, false, false, "", "ᅡ")}, - {0x3150, 0, 1, 1, g(Yes, No, false, false, "", "ᅢ")}, - {0x3151, 0, 1, 1, g(Yes, No, false, false, "", "ᅣ")}, - {0x3152, 0, 1, 1, g(Yes, No, false, false, "", "ᅤ")}, - {0x3153, 0, 1, 1, g(Yes, No, false, false, "", "ᅥ")}, - {0x3154, 0, 1, 1, g(Yes, No, false, false, "", "ᅦ")}, - {0x3155, 0, 1, 1, g(Yes, No, false, false, "", "ᅧ")}, - {0x3156, 0, 1, 1, g(Yes, No, false, false, "", "ᅨ")}, - {0x3157, 0, 1, 1, g(Yes, No, false, false, "", "ᅩ")}, - {0x3158, 0, 1, 1, g(Yes, No, false, false, "", "ᅪ")}, - {0x3159, 0, 1, 1, g(Yes, No, false, false, "", "ᅫ")}, - {0x315a, 0, 1, 1, g(Yes, No, false, false, "", "ᅬ")}, - {0x315b, 0, 1, 1, g(Yes, No, false, false, "", "ᅭ")}, - {0x315c, 0, 1, 1, g(Yes, No, false, false, "", "ᅮ")}, - {0x315d, 0, 1, 1, g(Yes, No, false, false, "", "ᅯ")}, - {0x315e, 0, 1, 1, g(Yes, No, false, false, "", "ᅰ")}, - {0x315f, 0, 1, 1, g(Yes, No, false, false, "", "ᅱ")}, - {0x3160, 0, 1, 1, g(Yes, No, false, false, "", "ᅲ")}, - {0x3161, 0, 1, 1, g(Yes, No, false, false, "", "ᅳ")}, - {0x3162, 0, 1, 1, g(Yes, No, false, false, "", "ᅴ")}, - {0x3163, 0, 1, 1, g(Yes, No, false, false, "", "ᅵ")}, - {0x3164, 0, 0, 0, g(Yes, No, false, false, "", "ᅠ")}, - {0x3165, 0, 0, 0, g(Yes, No, false, false, "", "ᄔ")}, - {0x3166, 0, 0, 0, g(Yes, No, false, false, "", "ᄕ")}, - {0x3167, 0, 0, 0, g(Yes, No, false, false, "", "ᇇ")}, - {0x3168, 0, 0, 0, g(Yes, No, false, false, "", "ᇈ")}, - {0x3169, 0, 0, 0, g(Yes, No, false, false, "", "ᇌ")}, - {0x316a, 0, 0, 0, g(Yes, No, false, false, "", "ᇎ")}, - {0x316b, 0, 0, 0, g(Yes, No, false, false, "", "ᇓ")}, - {0x316c, 0, 0, 0, g(Yes, No, false, false, "", "ᇗ")}, - {0x316d, 0, 0, 0, g(Yes, No, false, false, "", "ᇙ")}, - {0x316e, 0, 0, 0, g(Yes, No, false, false, "", "ᄜ")}, - {0x316f, 0, 0, 0, g(Yes, No, false, false, "", "ᇝ")}, - {0x3170, 0, 0, 0, g(Yes, No, false, false, "", "ᇟ")}, - {0x3171, 0, 0, 0, g(Yes, No, false, false, "", "ᄝ")}, - {0x3172, 0, 0, 0, g(Yes, No, false, false, "", "ᄞ")}, - {0x3173, 0, 0, 0, g(Yes, No, false, false, "", "ᄠ")}, - {0x3174, 0, 0, 0, g(Yes, No, false, false, "", "ᄢ")}, - {0x3175, 0, 0, 0, g(Yes, No, false, false, "", "ᄣ")}, - {0x3176, 0, 0, 0, g(Yes, No, false, false, "", "ᄧ")}, - {0x3177, 0, 0, 0, g(Yes, No, false, false, "", "ᄩ")}, - {0x3178, 0, 0, 0, g(Yes, No, false, false, "", "ᄫ")}, - {0x3179, 0, 0, 0, g(Yes, No, false, false, "", "ᄬ")}, - {0x317a, 0, 0, 0, g(Yes, No, false, false, "", "ᄭ")}, - {0x317b, 0, 0, 0, g(Yes, No, false, false, "", "ᄮ")}, - {0x317c, 0, 0, 0, g(Yes, No, false, false, "", "ᄯ")}, - {0x317d, 0, 0, 0, g(Yes, No, false, false, "", "ᄲ")}, - {0x317e, 0, 0, 0, g(Yes, No, false, false, "", "ᄶ")}, - {0x317f, 0, 0, 0, g(Yes, No, false, false, "", "ᅀ")}, - {0x3180, 0, 0, 0, g(Yes, No, false, false, "", "ᅇ")}, - {0x3181, 0, 0, 0, g(Yes, No, false, false, "", "ᅌ")}, - {0x3182, 0, 0, 0, g(Yes, No, false, false, "", "ᇱ")}, - {0x3183, 0, 0, 0, g(Yes, No, false, false, "", "ᇲ")}, - {0x3184, 0, 0, 0, g(Yes, No, false, false, "", "ᅗ")}, - {0x3185, 0, 0, 0, g(Yes, No, false, false, "", "ᅘ")}, - {0x3186, 0, 0, 0, g(Yes, No, false, false, "", "ᅙ")}, - {0x3187, 0, 0, 0, g(Yes, No, false, false, "", "ᆄ")}, - {0x3188, 0, 0, 0, g(Yes, No, false, false, "", "ᆅ")}, - {0x3189, 0, 0, 0, g(Yes, No, false, false, "", "ᆈ")}, - {0x318a, 0, 0, 0, g(Yes, No, false, false, "", "ᆑ")}, - {0x318b, 0, 0, 0, g(Yes, No, false, false, "", "ᆒ")}, - {0x318c, 0, 0, 0, g(Yes, No, false, false, "", "ᆔ")}, - {0x318d, 0, 0, 0, g(Yes, No, false, false, "", "ᆞ")}, - {0x318e, 0, 0, 0, g(Yes, No, false, false, "", "ᆡ")}, - {0x318f, 0, 0, 0, f(Yes, false, "")}, - {0x3192, 0, 0, 0, g(Yes, No, false, false, "", "一")}, - {0x3193, 0, 0, 0, g(Yes, No, false, false, "", "二")}, - {0x3194, 0, 0, 0, g(Yes, No, false, false, "", "三")}, - {0x3195, 0, 0, 0, g(Yes, No, false, false, "", "四")}, - {0x3196, 0, 0, 0, g(Yes, No, false, false, "", "上")}, - {0x3197, 0, 0, 0, g(Yes, No, false, false, "", "中")}, - {0x3198, 0, 0, 0, g(Yes, No, false, false, "", "下")}, - {0x3199, 0, 0, 0, g(Yes, No, false, false, "", "甲")}, - {0x319a, 0, 0, 0, g(Yes, No, false, false, "", "乙")}, - {0x319b, 0, 0, 0, g(Yes, No, false, false, "", "丙")}, - {0x319c, 0, 0, 0, g(Yes, No, false, false, "", "丁")}, - {0x319d, 0, 0, 0, g(Yes, No, false, false, "", "天")}, - {0x319e, 0, 0, 0, g(Yes, No, false, false, "", "地")}, - {0x319f, 0, 0, 0, g(Yes, No, false, false, "", "人")}, - {0x31a0, 0, 0, 0, f(Yes, false, "")}, - {0x3200, 0, 0, 0, g(Yes, No, false, false, "", "(ᄀ)")}, - {0x3201, 0, 0, 0, g(Yes, No, false, false, "", "(ᄂ)")}, - {0x3202, 0, 0, 0, g(Yes, No, false, false, "", "(ᄃ)")}, - {0x3203, 0, 0, 0, g(Yes, No, false, false, "", "(ᄅ)")}, - {0x3204, 0, 0, 0, g(Yes, No, false, false, "", "(ᄆ)")}, - {0x3205, 0, 0, 0, g(Yes, No, false, false, "", "(ᄇ)")}, - {0x3206, 0, 0, 0, g(Yes, No, false, false, "", "(ᄉ)")}, - {0x3207, 0, 0, 0, g(Yes, No, false, false, "", "(ᄋ)")}, - {0x3208, 0, 0, 0, g(Yes, No, false, false, "", "(ᄌ)")}, - {0x3209, 0, 0, 0, g(Yes, No, false, false, "", "(ᄎ)")}, - {0x320a, 0, 0, 0, g(Yes, No, false, false, "", "(ᄏ)")}, - {0x320b, 0, 0, 0, g(Yes, No, false, false, "", "(ᄐ)")}, - {0x320c, 0, 0, 0, g(Yes, No, false, false, "", "(ᄑ)")}, - {0x320d, 0, 0, 0, g(Yes, No, false, false, "", "(ᄒ)")}, - {0x320e, 0, 0, 0, g(Yes, No, false, false, "", "(가)")}, - {0x320f, 0, 0, 0, g(Yes, No, false, false, "", "(나)")}, - {0x3210, 0, 0, 0, g(Yes, No, false, false, "", "(다)")}, - {0x3211, 0, 0, 0, g(Yes, No, false, false, "", "(라)")}, - {0x3212, 0, 0, 0, g(Yes, No, false, false, "", "(마)")}, - {0x3213, 0, 0, 0, g(Yes, No, false, false, "", "(바)")}, - {0x3214, 0, 0, 0, g(Yes, No, false, false, "", "(사)")}, - {0x3215, 0, 0, 0, g(Yes, No, false, false, "", "(아)")}, - {0x3216, 0, 0, 0, g(Yes, No, false, false, "", "(자)")}, - {0x3217, 0, 0, 0, g(Yes, No, false, false, "", "(차)")}, - {0x3218, 0, 0, 0, g(Yes, No, false, false, "", "(카)")}, - {0x3219, 0, 0, 0, g(Yes, No, false, false, "", "(타)")}, - {0x321a, 0, 0, 0, g(Yes, No, false, false, "", "(파)")}, - {0x321b, 0, 0, 0, g(Yes, No, false, false, "", "(하)")}, - {0x321c, 0, 0, 0, g(Yes, No, false, false, "", "(주)")}, - {0x321d, 0, 0, 0, g(Yes, No, false, false, "", "(오전)")}, - {0x321e, 0, 0, 0, g(Yes, No, false, false, "", "(오후)")}, - {0x321f, 0, 0, 0, f(Yes, false, "")}, - {0x3220, 0, 0, 0, g(Yes, No, false, false, "", "(一)")}, - {0x3221, 0, 0, 0, g(Yes, No, false, false, "", "(二)")}, - {0x3222, 0, 0, 0, g(Yes, No, false, false, "", "(三)")}, - {0x3223, 0, 0, 0, g(Yes, No, false, false, "", "(四)")}, - {0x3224, 0, 0, 0, g(Yes, No, false, false, "", "(五)")}, - {0x3225, 0, 0, 0, g(Yes, No, false, false, "", "(六)")}, - {0x3226, 0, 0, 0, g(Yes, No, false, false, "", "(七)")}, - {0x3227, 0, 0, 0, g(Yes, No, false, false, "", "(八)")}, - {0x3228, 0, 0, 0, g(Yes, No, false, false, "", "(九)")}, - {0x3229, 0, 0, 0, g(Yes, No, false, false, "", "(十)")}, - {0x322a, 0, 0, 0, g(Yes, No, false, false, "", "(月)")}, - {0x322b, 0, 0, 0, g(Yes, No, false, false, "", "(火)")}, - {0x322c, 0, 0, 0, g(Yes, No, false, false, "", "(水)")}, - {0x322d, 0, 0, 0, g(Yes, No, false, false, "", "(木)")}, - {0x322e, 0, 0, 0, g(Yes, No, false, false, "", "(金)")}, - {0x322f, 0, 0, 0, g(Yes, No, false, false, "", "(土)")}, - {0x3230, 0, 0, 0, g(Yes, No, false, false, "", "(日)")}, - {0x3231, 0, 0, 0, g(Yes, No, false, false, "", "(株)")}, - {0x3232, 0, 0, 0, g(Yes, No, false, false, "", "(有)")}, - {0x3233, 0, 0, 0, g(Yes, No, false, false, "", "(社)")}, - {0x3234, 0, 0, 0, g(Yes, No, false, false, "", "(名)")}, - {0x3235, 0, 0, 0, g(Yes, No, false, false, "", "(特)")}, - {0x3236, 0, 0, 0, g(Yes, No, false, false, "", "(財)")}, - {0x3237, 0, 0, 0, g(Yes, No, false, false, "", "(祝)")}, - {0x3238, 0, 0, 0, g(Yes, No, false, false, "", "(労)")}, - {0x3239, 0, 0, 0, g(Yes, No, false, false, "", "(代)")}, - {0x323a, 0, 0, 0, g(Yes, No, false, false, "", "(呼)")}, - {0x323b, 0, 0, 0, g(Yes, No, false, false, "", "(学)")}, - {0x323c, 0, 0, 0, g(Yes, No, false, false, "", "(監)")}, - {0x323d, 0, 0, 0, g(Yes, No, false, false, "", "(企)")}, - {0x323e, 0, 0, 0, g(Yes, No, false, false, "", "(資)")}, - {0x323f, 0, 0, 0, g(Yes, No, false, false, "", "(協)")}, - {0x3240, 0, 0, 0, g(Yes, No, false, false, "", "(祭)")}, - {0x3241, 0, 0, 0, g(Yes, No, false, false, "", "(休)")}, - {0x3242, 0, 0, 0, g(Yes, No, false, false, "", "(自)")}, - {0x3243, 0, 0, 0, g(Yes, No, false, false, "", "(至)")}, - {0x3244, 0, 0, 0, g(Yes, No, false, false, "", "問")}, - {0x3245, 0, 0, 0, g(Yes, No, false, false, "", "幼")}, - {0x3246, 0, 0, 0, g(Yes, No, false, false, "", "文")}, - {0x3247, 0, 0, 0, g(Yes, No, false, false, "", "箏")}, - {0x3248, 0, 0, 0, f(Yes, false, "")}, - {0x3250, 0, 0, 0, g(Yes, No, false, false, "", "PTE")}, - {0x3251, 0, 0, 0, g(Yes, No, false, false, "", "21")}, - {0x3252, 0, 0, 0, g(Yes, No, false, false, "", "22")}, - {0x3253, 0, 0, 0, g(Yes, No, false, false, "", "23")}, - {0x3254, 0, 0, 0, g(Yes, No, false, false, "", "24")}, - {0x3255, 0, 0, 0, g(Yes, No, false, false, "", "25")}, - {0x3256, 0, 0, 0, g(Yes, No, false, false, "", "26")}, - {0x3257, 0, 0, 0, g(Yes, No, false, false, "", "27")}, - {0x3258, 0, 0, 0, g(Yes, No, false, false, "", "28")}, - {0x3259, 0, 0, 0, g(Yes, No, false, false, "", "29")}, - {0x325a, 0, 0, 0, g(Yes, No, false, false, "", "30")}, - {0x325b, 0, 0, 0, g(Yes, No, false, false, "", "31")}, - {0x325c, 0, 0, 0, g(Yes, No, false, false, "", "32")}, - {0x325d, 0, 0, 0, g(Yes, No, false, false, "", "33")}, - {0x325e, 0, 0, 0, g(Yes, No, false, false, "", "34")}, - {0x325f, 0, 0, 0, g(Yes, No, false, false, "", "35")}, - {0x3260, 0, 0, 0, g(Yes, No, false, false, "", "ᄀ")}, - {0x3261, 0, 0, 0, g(Yes, No, false, false, "", "ᄂ")}, - {0x3262, 0, 0, 0, g(Yes, No, false, false, "", "ᄃ")}, - {0x3263, 0, 0, 0, g(Yes, No, false, false, "", "ᄅ")}, - {0x3264, 0, 0, 0, g(Yes, No, false, false, "", "ᄆ")}, - {0x3265, 0, 0, 0, g(Yes, No, false, false, "", "ᄇ")}, - {0x3266, 0, 0, 0, g(Yes, No, false, false, "", "ᄉ")}, - {0x3267, 0, 0, 0, g(Yes, No, false, false, "", "ᄋ")}, - {0x3268, 0, 0, 0, g(Yes, No, false, false, "", "ᄌ")}, - {0x3269, 0, 0, 0, g(Yes, No, false, false, "", "ᄎ")}, - {0x326a, 0, 0, 0, g(Yes, No, false, false, "", "ᄏ")}, - {0x326b, 0, 0, 0, g(Yes, No, false, false, "", "ᄐ")}, - {0x326c, 0, 0, 0, g(Yes, No, false, false, "", "ᄑ")}, - {0x326d, 0, 0, 0, g(Yes, No, false, false, "", "ᄒ")}, - {0x326e, 0, 0, 1, g(Yes, No, false, false, "", "가")}, - {0x326f, 0, 0, 1, g(Yes, No, false, false, "", "나")}, - {0x3270, 0, 0, 1, g(Yes, No, false, false, "", "다")}, - {0x3271, 0, 0, 1, g(Yes, No, false, false, "", "라")}, - {0x3272, 0, 0, 1, g(Yes, No, false, false, "", "마")}, - {0x3273, 0, 0, 1, g(Yes, No, false, false, "", "바")}, - {0x3274, 0, 0, 1, g(Yes, No, false, false, "", "사")}, - {0x3275, 0, 0, 1, g(Yes, No, false, false, "", "아")}, - {0x3276, 0, 0, 1, g(Yes, No, false, false, "", "자")}, - {0x3277, 0, 0, 1, g(Yes, No, false, false, "", "차")}, - {0x3278, 0, 0, 1, g(Yes, No, false, false, "", "카")}, - {0x3279, 0, 0, 1, g(Yes, No, false, false, "", "타")}, - {0x327a, 0, 0, 1, g(Yes, No, false, false, "", "파")}, - {0x327b, 0, 0, 1, g(Yes, No, false, false, "", "하")}, - {0x327c, 0, 0, 1, g(Yes, No, false, false, "", "참고")}, - {0x327d, 0, 0, 1, g(Yes, No, false, false, "", "주의")}, - {0x327e, 0, 0, 1, g(Yes, No, false, false, "", "우")}, - {0x327f, 0, 0, 0, f(Yes, false, "")}, - {0x3280, 0, 0, 0, g(Yes, No, false, false, "", "一")}, - {0x3281, 0, 0, 0, g(Yes, No, false, false, "", "二")}, - {0x3282, 0, 0, 0, g(Yes, No, false, false, "", "三")}, - {0x3283, 0, 0, 0, g(Yes, No, false, false, "", "四")}, - {0x3284, 0, 0, 0, g(Yes, No, false, false, "", "五")}, - {0x3285, 0, 0, 0, g(Yes, No, false, false, "", "六")}, - {0x3286, 0, 0, 0, g(Yes, No, false, false, "", "七")}, - {0x3287, 0, 0, 0, g(Yes, No, false, false, "", "八")}, - {0x3288, 0, 0, 0, g(Yes, No, false, false, "", "九")}, - {0x3289, 0, 0, 0, g(Yes, No, false, false, "", "十")}, - {0x328a, 0, 0, 0, g(Yes, No, false, false, "", "月")}, - {0x328b, 0, 0, 0, g(Yes, No, false, false, "", "火")}, - {0x328c, 0, 0, 0, g(Yes, No, false, false, "", "水")}, - {0x328d, 0, 0, 0, g(Yes, No, false, false, "", "木")}, - {0x328e, 0, 0, 0, g(Yes, No, false, false, "", "金")}, - {0x328f, 0, 0, 0, g(Yes, No, false, false, "", "土")}, - {0x3290, 0, 0, 0, g(Yes, No, false, false, "", "日")}, - {0x3291, 0, 0, 0, g(Yes, No, false, false, "", "株")}, - {0x3292, 0, 0, 0, g(Yes, No, false, false, "", "有")}, - {0x3293, 0, 0, 0, g(Yes, No, false, false, "", "社")}, - {0x3294, 0, 0, 0, g(Yes, No, false, false, "", "名")}, - {0x3295, 0, 0, 0, g(Yes, No, false, false, "", "特")}, - {0x3296, 0, 0, 0, g(Yes, No, false, false, "", "財")}, - {0x3297, 0, 0, 0, g(Yes, No, false, false, "", "祝")}, - {0x3298, 0, 0, 0, g(Yes, No, false, false, "", "労")}, - {0x3299, 0, 0, 0, g(Yes, No, false, false, "", "秘")}, - {0x329a, 0, 0, 0, g(Yes, No, false, false, "", "男")}, - {0x329b, 0, 0, 0, g(Yes, No, false, false, "", "女")}, - {0x329c, 0, 0, 0, g(Yes, No, false, false, "", "適")}, - {0x329d, 0, 0, 0, g(Yes, No, false, false, "", "優")}, - {0x329e, 0, 0, 0, g(Yes, No, false, false, "", "印")}, - {0x329f, 0, 0, 0, g(Yes, No, false, false, "", "注")}, - {0x32a0, 0, 0, 0, g(Yes, No, false, false, "", "項")}, - {0x32a1, 0, 0, 0, g(Yes, No, false, false, "", "休")}, - {0x32a2, 0, 0, 0, g(Yes, No, false, false, "", "写")}, - {0x32a3, 0, 0, 0, g(Yes, No, false, false, "", "正")}, - {0x32a4, 0, 0, 0, g(Yes, No, false, false, "", "上")}, - {0x32a5, 0, 0, 0, g(Yes, No, false, false, "", "中")}, - {0x32a6, 0, 0, 0, g(Yes, No, false, false, "", "下")}, - {0x32a7, 0, 0, 0, g(Yes, No, false, false, "", "左")}, - {0x32a8, 0, 0, 0, g(Yes, No, false, false, "", "右")}, - {0x32a9, 0, 0, 0, g(Yes, No, false, false, "", "医")}, - {0x32aa, 0, 0, 0, g(Yes, No, false, false, "", "宗")}, - {0x32ab, 0, 0, 0, g(Yes, No, false, false, "", "学")}, - {0x32ac, 0, 0, 0, g(Yes, No, false, false, "", "監")}, - {0x32ad, 0, 0, 0, g(Yes, No, false, false, "", "企")}, - {0x32ae, 0, 0, 0, g(Yes, No, false, false, "", "資")}, - {0x32af, 0, 0, 0, g(Yes, No, false, false, "", "協")}, - {0x32b0, 0, 0, 0, g(Yes, No, false, false, "", "夜")}, - {0x32b1, 0, 0, 0, g(Yes, No, false, false, "", "36")}, - {0x32b2, 0, 0, 0, g(Yes, No, false, false, "", "37")}, - {0x32b3, 0, 0, 0, g(Yes, No, false, false, "", "38")}, - {0x32b4, 0, 0, 0, g(Yes, No, false, false, "", "39")}, - {0x32b5, 0, 0, 0, g(Yes, No, false, false, "", "40")}, - {0x32b6, 0, 0, 0, g(Yes, No, false, false, "", "41")}, - {0x32b7, 0, 0, 0, g(Yes, No, false, false, "", "42")}, - {0x32b8, 0, 0, 0, g(Yes, No, false, false, "", "43")}, - {0x32b9, 0, 0, 0, g(Yes, No, false, false, "", "44")}, - {0x32ba, 0, 0, 0, g(Yes, No, false, false, "", "45")}, - {0x32bb, 0, 0, 0, g(Yes, No, false, false, "", "46")}, - {0x32bc, 0, 0, 0, g(Yes, No, false, false, "", "47")}, - {0x32bd, 0, 0, 0, g(Yes, No, false, false, "", "48")}, - {0x32be, 0, 0, 0, g(Yes, No, false, false, "", "49")}, - {0x32bf, 0, 0, 0, g(Yes, No, false, false, "", "50")}, - {0x32c0, 0, 0, 0, g(Yes, No, false, false, "", "1月")}, - {0x32c1, 0, 0, 0, g(Yes, No, false, false, "", "2月")}, - {0x32c2, 0, 0, 0, g(Yes, No, false, false, "", "3月")}, - {0x32c3, 0, 0, 0, g(Yes, No, false, false, "", "4月")}, - {0x32c4, 0, 0, 0, g(Yes, No, false, false, "", "5月")}, - {0x32c5, 0, 0, 0, g(Yes, No, false, false, "", "6月")}, - {0x32c6, 0, 0, 0, g(Yes, No, false, false, "", "7月")}, - {0x32c7, 0, 0, 0, g(Yes, No, false, false, "", "8月")}, - {0x32c8, 0, 0, 0, g(Yes, No, false, false, "", "9月")}, - {0x32c9, 0, 0, 0, g(Yes, No, false, false, "", "10月")}, - {0x32ca, 0, 0, 0, g(Yes, No, false, false, "", "11月")}, - {0x32cb, 0, 0, 0, g(Yes, No, false, false, "", "12月")}, - {0x32cc, 0, 0, 0, g(Yes, No, false, false, "", "Hg")}, - {0x32cd, 0, 0, 0, g(Yes, No, false, false, "", "erg")}, - {0x32ce, 0, 0, 0, g(Yes, No, false, false, "", "eV")}, - {0x32cf, 0, 0, 0, g(Yes, No, false, false, "", "LTD")}, - {0x32d0, 0, 0, 0, g(Yes, No, false, false, "", "ア")}, - {0x32d1, 0, 0, 0, g(Yes, No, false, false, "", "イ")}, - {0x32d2, 0, 0, 0, g(Yes, No, false, false, "", "ウ")}, - {0x32d3, 0, 0, 0, g(Yes, No, false, false, "", "エ")}, - {0x32d4, 0, 0, 0, g(Yes, No, false, false, "", "オ")}, - {0x32d5, 0, 0, 0, g(Yes, No, false, false, "", "カ")}, - {0x32d6, 0, 0, 0, g(Yes, No, false, false, "", "キ")}, - {0x32d7, 0, 0, 0, g(Yes, No, false, false, "", "ク")}, - {0x32d8, 0, 0, 0, g(Yes, No, false, false, "", "ケ")}, - {0x32d9, 0, 0, 0, g(Yes, No, false, false, "", "コ")}, - {0x32da, 0, 0, 0, g(Yes, No, false, false, "", "サ")}, - {0x32db, 0, 0, 0, g(Yes, No, false, false, "", "シ")}, - {0x32dc, 0, 0, 0, g(Yes, No, false, false, "", "ス")}, - {0x32dd, 0, 0, 0, g(Yes, No, false, false, "", "セ")}, - {0x32de, 0, 0, 0, g(Yes, No, false, false, "", "ソ")}, - {0x32df, 0, 0, 0, g(Yes, No, false, false, "", "タ")}, - {0x32e0, 0, 0, 0, g(Yes, No, false, false, "", "チ")}, - {0x32e1, 0, 0, 0, g(Yes, No, false, false, "", "ツ")}, - {0x32e2, 0, 0, 0, g(Yes, No, false, false, "", "テ")}, - {0x32e3, 0, 0, 0, g(Yes, No, false, false, "", "ト")}, - {0x32e4, 0, 0, 0, g(Yes, No, false, false, "", "ナ")}, - {0x32e5, 0, 0, 0, g(Yes, No, false, false, "", "ニ")}, - {0x32e6, 0, 0, 0, g(Yes, No, false, false, "", "ヌ")}, - {0x32e7, 0, 0, 0, g(Yes, No, false, false, "", "ネ")}, - {0x32e8, 0, 0, 0, g(Yes, No, false, false, "", "ノ")}, - {0x32e9, 0, 0, 0, g(Yes, No, false, false, "", "ハ")}, - {0x32ea, 0, 0, 0, g(Yes, No, false, false, "", "ヒ")}, - {0x32eb, 0, 0, 0, g(Yes, No, false, false, "", "フ")}, - {0x32ec, 0, 0, 0, g(Yes, No, false, false, "", "ヘ")}, - {0x32ed, 0, 0, 0, g(Yes, No, false, false, "", "ホ")}, - {0x32ee, 0, 0, 0, g(Yes, No, false, false, "", "マ")}, - {0x32ef, 0, 0, 0, g(Yes, No, false, false, "", "ミ")}, - {0x32f0, 0, 0, 0, g(Yes, No, false, false, "", "ム")}, - {0x32f1, 0, 0, 0, g(Yes, No, false, false, "", "メ")}, - {0x32f2, 0, 0, 0, g(Yes, No, false, false, "", "モ")}, - {0x32f3, 0, 0, 0, g(Yes, No, false, false, "", "ヤ")}, - {0x32f4, 0, 0, 0, g(Yes, No, false, false, "", "ユ")}, - {0x32f5, 0, 0, 0, g(Yes, No, false, false, "", "ヨ")}, - {0x32f6, 0, 0, 0, g(Yes, No, false, false, "", "ラ")}, - {0x32f7, 0, 0, 0, g(Yes, No, false, false, "", "リ")}, - {0x32f8, 0, 0, 0, g(Yes, No, false, false, "", "ル")}, - {0x32f9, 0, 0, 0, g(Yes, No, false, false, "", "レ")}, - {0x32fa, 0, 0, 0, g(Yes, No, false, false, "", "ロ")}, - {0x32fb, 0, 0, 0, g(Yes, No, false, false, "", "ワ")}, - {0x32fc, 0, 0, 0, g(Yes, No, false, false, "", "ヰ")}, - {0x32fd, 0, 0, 0, g(Yes, No, false, false, "", "ヱ")}, - {0x32fe, 0, 0, 0, g(Yes, No, false, false, "", "ヲ")}, - {0x32ff, 0, 0, 0, f(Yes, false, "")}, - {0x3300, 0, 0, 0, g(Yes, No, false, false, "", "アパート")}, - {0x3301, 0, 0, 0, g(Yes, No, false, false, "", "アルファ")}, - {0x3302, 0, 0, 0, g(Yes, No, false, false, "", "アンペア")}, - {0x3303, 0, 0, 0, g(Yes, No, false, false, "", "アール")}, - {0x3304, 0, 0, 1, g(Yes, No, false, false, "", "イニング")}, - {0x3305, 0, 0, 0, g(Yes, No, false, false, "", "インチ")}, - {0x3306, 0, 0, 0, g(Yes, No, false, false, "", "ウォン")}, - {0x3307, 0, 0, 1, g(Yes, No, false, false, "", "エスクード")}, - {0x3308, 0, 0, 0, g(Yes, No, false, false, "", "エーカー")}, - {0x3309, 0, 0, 0, g(Yes, No, false, false, "", "オンス")}, - {0x330a, 0, 0, 0, g(Yes, No, false, false, "", "オーム")}, - {0x330b, 0, 0, 0, g(Yes, No, false, false, "", "カイリ")}, - {0x330c, 0, 0, 0, g(Yes, No, false, false, "", "カラット")}, - {0x330d, 0, 0, 0, g(Yes, No, false, false, "", "カロリー")}, - {0x330e, 0, 0, 0, g(Yes, No, false, false, "", "ガロン")}, - {0x330f, 0, 0, 0, g(Yes, No, false, false, "", "ガンマ")}, - {0x3310, 0, 0, 1, g(Yes, No, false, false, "", "ギガ")}, - {0x3311, 0, 0, 0, g(Yes, No, false, false, "", "ギニー")}, - {0x3312, 0, 0, 0, g(Yes, No, false, false, "", "キュリー")}, - {0x3313, 0, 0, 0, g(Yes, No, false, false, "", "ギルダー")}, - {0x3314, 0, 0, 0, g(Yes, No, false, false, "", "キロ")}, - {0x3315, 0, 0, 0, g(Yes, No, false, false, "", "キログラム")}, - {0x3316, 0, 0, 0, g(Yes, No, false, false, "", "キロメートル")}, - {0x3317, 0, 0, 0, g(Yes, No, false, false, "", "キロワット")}, - {0x3318, 0, 0, 0, g(Yes, No, false, false, "", "グラム")}, - {0x3319, 0, 0, 0, g(Yes, No, false, false, "", "グラムトン")}, - {0x331a, 0, 0, 0, g(Yes, No, false, false, "", "クルゼイロ")}, - {0x331b, 0, 0, 0, g(Yes, No, false, false, "", "クローネ")}, - {0x331c, 0, 0, 0, g(Yes, No, false, false, "", "ケース")}, - {0x331d, 0, 0, 0, g(Yes, No, false, false, "", "コルナ")}, - {0x331e, 0, 0, 1, g(Yes, No, false, false, "", "コーポ")}, - {0x331f, 0, 0, 0, g(Yes, No, false, false, "", "サイクル")}, - {0x3320, 0, 0, 0, g(Yes, No, false, false, "", "サンチーム")}, - {0x3321, 0, 0, 1, g(Yes, No, false, false, "", "シリング")}, - {0x3322, 0, 0, 0, g(Yes, No, false, false, "", "センチ")}, - {0x3323, 0, 0, 0, g(Yes, No, false, false, "", "セント")}, - {0x3324, 0, 0, 0, g(Yes, No, false, false, "", "ダース")}, - {0x3325, 0, 0, 0, g(Yes, No, false, false, "", "デシ")}, - {0x3326, 0, 0, 0, g(Yes, No, false, false, "", "ドル")}, - {0x3327, 0, 0, 0, g(Yes, No, false, false, "", "トン")}, - {0x3328, 0, 0, 0, g(Yes, No, false, false, "", "ナノ")}, - {0x3329, 0, 0, 0, g(Yes, No, false, false, "", "ノット")}, - {0x332a, 0, 0, 0, g(Yes, No, false, false, "", "ハイツ")}, - {0x332b, 0, 0, 0, g(Yes, No, false, false, "", "パーセント")}, - {0x332c, 0, 0, 0, g(Yes, No, false, false, "", "パーツ")}, - {0x332d, 0, 0, 0, g(Yes, No, false, false, "", "バーレル")}, - {0x332e, 0, 0, 0, g(Yes, No, false, false, "", "ピアストル")}, - {0x332f, 0, 0, 0, g(Yes, No, false, false, "", "ピクル")}, - {0x3330, 0, 0, 0, g(Yes, No, false, false, "", "ピコ")}, - {0x3331, 0, 0, 0, g(Yes, No, false, false, "", "ビル")}, - {0x3332, 0, 0, 1, g(Yes, No, false, false, "", "ファラッド")}, - {0x3333, 0, 0, 0, g(Yes, No, false, false, "", "フィート")}, - {0x3334, 0, 0, 0, g(Yes, No, false, false, "", "ブッシェル")}, - {0x3335, 0, 0, 0, g(Yes, No, false, false, "", "フラン")}, - {0x3336, 0, 0, 0, g(Yes, No, false, false, "", "ヘクタール")}, - {0x3337, 0, 0, 0, g(Yes, No, false, false, "", "ペソ")}, - {0x3338, 0, 0, 0, g(Yes, No, false, false, "", "ペニヒ")}, - {0x3339, 0, 0, 0, g(Yes, No, false, false, "", "ヘルツ")}, - {0x333a, 0, 0, 0, g(Yes, No, false, false, "", "ペンス")}, - {0x333b, 0, 0, 1, g(Yes, No, false, false, "", "ページ")}, - {0x333c, 0, 0, 0, g(Yes, No, false, false, "", "ベータ")}, - {0x333d, 0, 0, 0, g(Yes, No, false, false, "", "ポイント")}, - {0x333e, 0, 0, 0, g(Yes, No, false, false, "", "ボルト")}, - {0x333f, 0, 0, 0, g(Yes, No, false, false, "", "ホン")}, - {0x3340, 0, 0, 1, g(Yes, No, false, false, "", "ポンド")}, - {0x3341, 0, 0, 0, g(Yes, No, false, false, "", "ホール")}, - {0x3342, 0, 0, 0, g(Yes, No, false, false, "", "ホーン")}, - {0x3343, 0, 0, 0, g(Yes, No, false, false, "", "マイクロ")}, - {0x3344, 0, 0, 0, g(Yes, No, false, false, "", "マイル")}, - {0x3345, 0, 0, 0, g(Yes, No, false, false, "", "マッハ")}, - {0x3346, 0, 0, 0, g(Yes, No, false, false, "", "マルク")}, - {0x3347, 0, 0, 0, g(Yes, No, false, false, "", "マンション")}, - {0x3348, 0, 0, 0, g(Yes, No, false, false, "", "ミクロン")}, - {0x3349, 0, 0, 0, g(Yes, No, false, false, "", "ミリ")}, - {0x334a, 0, 0, 0, g(Yes, No, false, false, "", "ミリバール")}, - {0x334b, 0, 0, 1, g(Yes, No, false, false, "", "メガ")}, - {0x334c, 0, 0, 0, g(Yes, No, false, false, "", "メガトン")}, - {0x334d, 0, 0, 0, g(Yes, No, false, false, "", "メートル")}, - {0x334e, 0, 0, 1, g(Yes, No, false, false, "", "ヤード")}, - {0x334f, 0, 0, 0, g(Yes, No, false, false, "", "ヤール")}, - {0x3350, 0, 0, 0, g(Yes, No, false, false, "", "ユアン")}, - {0x3351, 0, 0, 0, g(Yes, No, false, false, "", "リットル")}, - {0x3352, 0, 0, 0, g(Yes, No, false, false, "", "リラ")}, - {0x3353, 0, 0, 0, g(Yes, No, false, false, "", "ルピー")}, - {0x3354, 0, 0, 0, g(Yes, No, false, false, "", "ルーブル")}, - {0x3355, 0, 0, 0, g(Yes, No, false, false, "", "レム")}, - {0x3356, 0, 0, 0, g(Yes, No, false, false, "", "レントゲン")}, - {0x3357, 0, 0, 0, g(Yes, No, false, false, "", "ワット")}, - {0x3358, 0, 0, 0, g(Yes, No, false, false, "", "0点")}, - {0x3359, 0, 0, 0, g(Yes, No, false, false, "", "1点")}, - {0x335a, 0, 0, 0, g(Yes, No, false, false, "", "2点")}, - {0x335b, 0, 0, 0, g(Yes, No, false, false, "", "3点")}, - {0x335c, 0, 0, 0, g(Yes, No, false, false, "", "4点")}, - {0x335d, 0, 0, 0, g(Yes, No, false, false, "", "5点")}, - {0x335e, 0, 0, 0, g(Yes, No, false, false, "", "6点")}, - {0x335f, 0, 0, 0, g(Yes, No, false, false, "", "7点")}, - {0x3360, 0, 0, 0, g(Yes, No, false, false, "", "8点")}, - {0x3361, 0, 0, 0, g(Yes, No, false, false, "", "9点")}, - {0x3362, 0, 0, 0, g(Yes, No, false, false, "", "10点")}, - {0x3363, 0, 0, 0, g(Yes, No, false, false, "", "11点")}, - {0x3364, 0, 0, 0, g(Yes, No, false, false, "", "12点")}, - {0x3365, 0, 0, 0, g(Yes, No, false, false, "", "13点")}, - {0x3366, 0, 0, 0, g(Yes, No, false, false, "", "14点")}, - {0x3367, 0, 0, 0, g(Yes, No, false, false, "", "15点")}, - {0x3368, 0, 0, 0, g(Yes, No, false, false, "", "16点")}, - {0x3369, 0, 0, 0, g(Yes, No, false, false, "", "17点")}, - {0x336a, 0, 0, 0, g(Yes, No, false, false, "", "18点")}, - {0x336b, 0, 0, 0, g(Yes, No, false, false, "", "19点")}, - {0x336c, 0, 0, 0, g(Yes, No, false, false, "", "20点")}, - {0x336d, 0, 0, 0, g(Yes, No, false, false, "", "21点")}, - {0x336e, 0, 0, 0, g(Yes, No, false, false, "", "22点")}, - {0x336f, 0, 0, 0, g(Yes, No, false, false, "", "23点")}, - {0x3370, 0, 0, 0, g(Yes, No, false, false, "", "24点")}, - {0x3371, 0, 0, 0, g(Yes, No, false, false, "", "hPa")}, - {0x3372, 0, 0, 0, g(Yes, No, false, false, "", "da")}, - {0x3373, 0, 0, 0, g(Yes, No, false, false, "", "AU")}, - {0x3374, 0, 0, 0, g(Yes, No, false, false, "", "bar")}, - {0x3375, 0, 0, 0, g(Yes, No, false, false, "", "oV")}, - {0x3376, 0, 0, 0, g(Yes, No, false, false, "", "pc")}, - {0x3377, 0, 0, 0, g(Yes, No, false, false, "", "dm")}, - {0x3378, 0, 0, 0, g(Yes, No, false, false, "", "dm2")}, - {0x3379, 0, 0, 0, g(Yes, No, false, false, "", "dm3")}, - {0x337a, 0, 0, 0, g(Yes, No, false, false, "", "IU")}, - {0x337b, 0, 0, 0, g(Yes, No, false, false, "", "平成")}, - {0x337c, 0, 0, 0, g(Yes, No, false, false, "", "昭和")}, - {0x337d, 0, 0, 0, g(Yes, No, false, false, "", "大正")}, - {0x337e, 0, 0, 0, g(Yes, No, false, false, "", "明治")}, - {0x337f, 0, 0, 0, g(Yes, No, false, false, "", "株式会社")}, - {0x3380, 0, 0, 0, g(Yes, No, false, false, "", "pA")}, - {0x3381, 0, 0, 0, g(Yes, No, false, false, "", "nA")}, - {0x3382, 0, 0, 0, g(Yes, No, false, false, "", "μA")}, - {0x3383, 0, 0, 0, g(Yes, No, false, false, "", "mA")}, - {0x3384, 0, 0, 0, g(Yes, No, false, false, "", "kA")}, - {0x3385, 0, 0, 0, g(Yes, No, false, false, "", "KB")}, - {0x3386, 0, 0, 0, g(Yes, No, false, false, "", "MB")}, - {0x3387, 0, 0, 0, g(Yes, No, false, false, "", "GB")}, - {0x3388, 0, 0, 0, g(Yes, No, false, false, "", "cal")}, - {0x3389, 0, 0, 0, g(Yes, No, false, false, "", "kcal")}, - {0x338a, 0, 0, 0, g(Yes, No, false, false, "", "pF")}, - {0x338b, 0, 0, 0, g(Yes, No, false, false, "", "nF")}, - {0x338c, 0, 0, 0, g(Yes, No, false, false, "", "μF")}, - {0x338d, 0, 0, 0, g(Yes, No, false, false, "", "μg")}, - {0x338e, 0, 0, 0, g(Yes, No, false, false, "", "mg")}, - {0x338f, 0, 0, 0, g(Yes, No, false, false, "", "kg")}, - {0x3390, 0, 0, 0, g(Yes, No, false, false, "", "Hz")}, - {0x3391, 0, 0, 0, g(Yes, No, false, false, "", "kHz")}, - {0x3392, 0, 0, 0, g(Yes, No, false, false, "", "MHz")}, - {0x3393, 0, 0, 0, g(Yes, No, false, false, "", "GHz")}, - {0x3394, 0, 0, 0, g(Yes, No, false, false, "", "THz")}, - {0x3395, 0, 0, 0, g(Yes, No, false, false, "", "μl")}, - {0x3396, 0, 0, 0, g(Yes, No, false, false, "", "ml")}, - {0x3397, 0, 0, 0, g(Yes, No, false, false, "", "dl")}, - {0x3398, 0, 0, 0, g(Yes, No, false, false, "", "kl")}, - {0x3399, 0, 0, 0, g(Yes, No, false, false, "", "fm")}, - {0x339a, 0, 0, 0, g(Yes, No, false, false, "", "nm")}, - {0x339b, 0, 0, 0, g(Yes, No, false, false, "", "μm")}, - {0x339c, 0, 0, 0, g(Yes, No, false, false, "", "mm")}, - {0x339d, 0, 0, 0, g(Yes, No, false, false, "", "cm")}, - {0x339e, 0, 0, 0, g(Yes, No, false, false, "", "km")}, - {0x339f, 0, 0, 0, g(Yes, No, false, false, "", "mm2")}, - {0x33a0, 0, 0, 0, g(Yes, No, false, false, "", "cm2")}, - {0x33a1, 0, 0, 0, g(Yes, No, false, false, "", "m2")}, - {0x33a2, 0, 0, 0, g(Yes, No, false, false, "", "km2")}, - {0x33a3, 0, 0, 0, g(Yes, No, false, false, "", "mm3")}, - {0x33a4, 0, 0, 0, g(Yes, No, false, false, "", "cm3")}, - {0x33a5, 0, 0, 0, g(Yes, No, false, false, "", "m3")}, - {0x33a6, 0, 0, 0, g(Yes, No, false, false, "", "km3")}, - {0x33a7, 0, 0, 0, g(Yes, No, false, false, "", "m∕s")}, - {0x33a8, 0, 0, 0, g(Yes, No, false, false, "", "m∕s2")}, - {0x33a9, 0, 0, 0, g(Yes, No, false, false, "", "Pa")}, - {0x33aa, 0, 0, 0, g(Yes, No, false, false, "", "kPa")}, - {0x33ab, 0, 0, 0, g(Yes, No, false, false, "", "MPa")}, - {0x33ac, 0, 0, 0, g(Yes, No, false, false, "", "GPa")}, - {0x33ad, 0, 0, 0, g(Yes, No, false, false, "", "rad")}, - {0x33ae, 0, 0, 0, g(Yes, No, false, false, "", "rad∕s")}, - {0x33af, 0, 0, 0, g(Yes, No, false, false, "", "rad∕s2")}, - {0x33b0, 0, 0, 0, g(Yes, No, false, false, "", "ps")}, - {0x33b1, 0, 0, 0, g(Yes, No, false, false, "", "ns")}, - {0x33b2, 0, 0, 0, g(Yes, No, false, false, "", "μs")}, - {0x33b3, 0, 0, 0, g(Yes, No, false, false, "", "ms")}, - {0x33b4, 0, 0, 0, g(Yes, No, false, false, "", "pV")}, - {0x33b5, 0, 0, 0, g(Yes, No, false, false, "", "nV")}, - {0x33b6, 0, 0, 0, g(Yes, No, false, false, "", "μV")}, - {0x33b7, 0, 0, 0, g(Yes, No, false, false, "", "mV")}, - {0x33b8, 0, 0, 0, g(Yes, No, false, false, "", "kV")}, - {0x33b9, 0, 0, 0, g(Yes, No, false, false, "", "MV")}, - {0x33ba, 0, 0, 0, g(Yes, No, false, false, "", "pW")}, - {0x33bb, 0, 0, 0, g(Yes, No, false, false, "", "nW")}, - {0x33bc, 0, 0, 0, g(Yes, No, false, false, "", "μW")}, - {0x33bd, 0, 0, 0, g(Yes, No, false, false, "", "mW")}, - {0x33be, 0, 0, 0, g(Yes, No, false, false, "", "kW")}, - {0x33bf, 0, 0, 0, g(Yes, No, false, false, "", "MW")}, - {0x33c0, 0, 0, 0, g(Yes, No, false, false, "", "kΩ")}, - {0x33c1, 0, 0, 0, g(Yes, No, false, false, "", "MΩ")}, - {0x33c2, 0, 0, 0, g(Yes, No, false, false, "", "a.m.")}, - {0x33c3, 0, 0, 0, g(Yes, No, false, false, "", "Bq")}, - {0x33c4, 0, 0, 0, g(Yes, No, false, false, "", "cc")}, - {0x33c5, 0, 0, 0, g(Yes, No, false, false, "", "cd")}, - {0x33c6, 0, 0, 0, g(Yes, No, false, false, "", "C∕kg")}, - {0x33c7, 0, 0, 0, g(Yes, No, false, false, "", "Co.")}, - {0x33c8, 0, 0, 0, g(Yes, No, false, false, "", "dB")}, - {0x33c9, 0, 0, 0, g(Yes, No, false, false, "", "Gy")}, - {0x33ca, 0, 0, 0, g(Yes, No, false, false, "", "ha")}, - {0x33cb, 0, 0, 0, g(Yes, No, false, false, "", "HP")}, - {0x33cc, 0, 0, 0, g(Yes, No, false, false, "", "in")}, - {0x33cd, 0, 0, 0, g(Yes, No, false, false, "", "KK")}, - {0x33ce, 0, 0, 0, g(Yes, No, false, false, "", "KM")}, - {0x33cf, 0, 0, 0, g(Yes, No, false, false, "", "kt")}, - {0x33d0, 0, 0, 0, g(Yes, No, false, false, "", "lm")}, - {0x33d1, 0, 0, 0, g(Yes, No, false, false, "", "ln")}, - {0x33d2, 0, 0, 0, g(Yes, No, false, false, "", "log")}, - {0x33d3, 0, 0, 0, g(Yes, No, false, false, "", "lx")}, - {0x33d4, 0, 0, 0, g(Yes, No, false, false, "", "mb")}, - {0x33d5, 0, 0, 0, g(Yes, No, false, false, "", "mil")}, - {0x33d6, 0, 0, 0, g(Yes, No, false, false, "", "mol")}, - {0x33d7, 0, 0, 0, g(Yes, No, false, false, "", "PH")}, - {0x33d8, 0, 0, 0, g(Yes, No, false, false, "", "p.m.")}, - {0x33d9, 0, 0, 0, g(Yes, No, false, false, "", "PPM")}, - {0x33da, 0, 0, 0, g(Yes, No, false, false, "", "PR")}, - {0x33db, 0, 0, 0, g(Yes, No, false, false, "", "sr")}, - {0x33dc, 0, 0, 0, g(Yes, No, false, false, "", "Sv")}, - {0x33dd, 0, 0, 0, g(Yes, No, false, false, "", "Wb")}, - {0x33de, 0, 0, 0, g(Yes, No, false, false, "", "V∕m")}, - {0x33df, 0, 0, 0, g(Yes, No, false, false, "", "A∕m")}, - {0x33e0, 0, 0, 0, g(Yes, No, false, false, "", "1日")}, - {0x33e1, 0, 0, 0, g(Yes, No, false, false, "", "2日")}, - {0x33e2, 0, 0, 0, g(Yes, No, false, false, "", "3日")}, - {0x33e3, 0, 0, 0, g(Yes, No, false, false, "", "4日")}, - {0x33e4, 0, 0, 0, g(Yes, No, false, false, "", "5日")}, - {0x33e5, 0, 0, 0, g(Yes, No, false, false, "", "6日")}, - {0x33e6, 0, 0, 0, g(Yes, No, false, false, "", "7日")}, - {0x33e7, 0, 0, 0, g(Yes, No, false, false, "", "8日")}, - {0x33e8, 0, 0, 0, g(Yes, No, false, false, "", "9日")}, - {0x33e9, 0, 0, 0, g(Yes, No, false, false, "", "10日")}, - {0x33ea, 0, 0, 0, g(Yes, No, false, false, "", "11日")}, - {0x33eb, 0, 0, 0, g(Yes, No, false, false, "", "12日")}, - {0x33ec, 0, 0, 0, g(Yes, No, false, false, "", "13日")}, - {0x33ed, 0, 0, 0, g(Yes, No, false, false, "", "14日")}, - {0x33ee, 0, 0, 0, g(Yes, No, false, false, "", "15日")}, - {0x33ef, 0, 0, 0, g(Yes, No, false, false, "", "16日")}, - {0x33f0, 0, 0, 0, g(Yes, No, false, false, "", "17日")}, - {0x33f1, 0, 0, 0, g(Yes, No, false, false, "", "18日")}, - {0x33f2, 0, 0, 0, g(Yes, No, false, false, "", "19日")}, - {0x33f3, 0, 0, 0, g(Yes, No, false, false, "", "20日")}, - {0x33f4, 0, 0, 0, g(Yes, No, false, false, "", "21日")}, - {0x33f5, 0, 0, 0, g(Yes, No, false, false, "", "22日")}, - {0x33f6, 0, 0, 0, g(Yes, No, false, false, "", "23日")}, - {0x33f7, 0, 0, 0, g(Yes, No, false, false, "", "24日")}, - {0x33f8, 0, 0, 0, g(Yes, No, false, false, "", "25日")}, - {0x33f9, 0, 0, 0, g(Yes, No, false, false, "", "26日")}, - {0x33fa, 0, 0, 0, g(Yes, No, false, false, "", "27日")}, - {0x33fb, 0, 0, 0, g(Yes, No, false, false, "", "28日")}, - {0x33fc, 0, 0, 0, g(Yes, No, false, false, "", "29日")}, - {0x33fd, 0, 0, 0, g(Yes, No, false, false, "", "30日")}, - {0x33fe, 0, 0, 0, g(Yes, No, false, false, "", "31日")}, - {0x33ff, 0, 0, 0, g(Yes, No, false, false, "", "gal")}, - {0x3400, 0, 0, 0, f(Yes, false, "")}, - {0xa66f, 230, 1, 1, f(Yes, false, "")}, - {0xa670, 0, 0, 0, f(Yes, false, "")}, - {0xa674, 230, 1, 1, f(Yes, false, "")}, - {0xa67e, 0, 0, 0, f(Yes, false, "")}, - {0xa69c, 0, 0, 0, g(Yes, No, false, false, "", "ъ")}, - {0xa69d, 0, 0, 0, g(Yes, No, false, false, "", "ь")}, - {0xa69e, 230, 1, 1, f(Yes, false, "")}, - {0xa6a0, 0, 0, 0, f(Yes, false, "")}, - {0xa6f0, 230, 1, 1, f(Yes, false, "")}, - {0xa6f2, 0, 0, 0, f(Yes, false, "")}, - {0xa770, 0, 0, 0, g(Yes, No, false, false, "", "ꝯ")}, - {0xa771, 0, 0, 0, f(Yes, false, "")}, - {0xa7f8, 0, 0, 0, g(Yes, No, false, false, "", "Ħ")}, - {0xa7f9, 0, 0, 0, g(Yes, No, false, false, "", "œ")}, - {0xa7fa, 0, 0, 0, f(Yes, false, "")}, - {0xa806, 9, 1, 1, f(Yes, false, "")}, - {0xa807, 0, 0, 0, f(Yes, false, "")}, - {0xa8c4, 9, 1, 1, f(Yes, false, "")}, - {0xa8c5, 0, 0, 0, f(Yes, false, "")}, - {0xa8e0, 230, 1, 1, f(Yes, false, "")}, - {0xa8f2, 0, 0, 0, f(Yes, false, "")}, - {0xa92b, 220, 1, 1, f(Yes, false, "")}, - {0xa92e, 0, 0, 0, f(Yes, false, "")}, - {0xa953, 9, 1, 1, f(Yes, false, "")}, - {0xa954, 0, 0, 0, f(Yes, false, "")}, - {0xa9b3, 7, 1, 1, f(Yes, false, "")}, - {0xa9b4, 0, 0, 0, f(Yes, false, "")}, - {0xa9c0, 9, 1, 1, f(Yes, false, "")}, - {0xa9c1, 0, 0, 0, f(Yes, false, "")}, - {0xaab0, 230, 1, 1, f(Yes, false, "")}, - {0xaab1, 0, 0, 0, f(Yes, false, "")}, - {0xaab2, 230, 1, 1, f(Yes, false, "")}, - {0xaab4, 220, 1, 1, f(Yes, false, "")}, - {0xaab5, 0, 0, 0, f(Yes, false, "")}, - {0xaab7, 230, 1, 1, f(Yes, false, "")}, - {0xaab9, 0, 0, 0, f(Yes, false, "")}, - {0xaabe, 230, 1, 1, f(Yes, false, "")}, - {0xaac0, 0, 0, 0, f(Yes, false, "")}, - {0xaac1, 230, 1, 1, f(Yes, false, "")}, - {0xaac2, 0, 0, 0, f(Yes, false, "")}, - {0xaaf6, 9, 1, 1, f(Yes, false, "")}, - {0xaaf7, 0, 0, 0, f(Yes, false, "")}, - {0xab5c, 0, 0, 0, g(Yes, No, false, false, "", "ꜧ")}, - {0xab5d, 0, 0, 0, g(Yes, No, false, false, "", "ꬷ")}, - {0xab5e, 0, 0, 0, g(Yes, No, false, false, "", "ɫ")}, - {0xab5f, 0, 0, 0, g(Yes, No, false, false, "", "ꭒ")}, - {0xab60, 0, 0, 0, f(Yes, false, "")}, - {0xabed, 9, 1, 1, f(Yes, false, "")}, - {0xabee, 0, 0, 0, f(Yes, false, "")}, - {0xac00, 0, 0, 1, f(Yes, true, "")}, - {0xac01, 0, 0, 2, f(Yes, false, "")}, - {0xac1c, 0, 0, 1, f(Yes, true, "")}, - {0xac1d, 0, 0, 2, f(Yes, false, "")}, - {0xac38, 0, 0, 1, f(Yes, true, "")}, - {0xac39, 0, 0, 2, f(Yes, false, "")}, - {0xac54, 0, 0, 1, f(Yes, true, "")}, - {0xac55, 0, 0, 2, f(Yes, false, "")}, - {0xac70, 0, 0, 1, f(Yes, true, "")}, - {0xac71, 0, 0, 2, f(Yes, false, "")}, - {0xac8c, 0, 0, 1, f(Yes, true, "")}, - {0xac8d, 0, 0, 2, f(Yes, false, "")}, - {0xaca8, 0, 0, 1, f(Yes, true, "")}, - {0xaca9, 0, 0, 2, f(Yes, false, "")}, - {0xacc4, 0, 0, 1, f(Yes, true, "")}, - {0xacc5, 0, 0, 2, f(Yes, false, "")}, - {0xace0, 0, 0, 1, f(Yes, true, "")}, - {0xace1, 0, 0, 2, f(Yes, false, "")}, - {0xacfc, 0, 0, 1, f(Yes, true, "")}, - {0xacfd, 0, 0, 2, f(Yes, false, "")}, - {0xad18, 0, 0, 1, f(Yes, true, "")}, - {0xad19, 0, 0, 2, f(Yes, false, "")}, - {0xad34, 0, 0, 1, f(Yes, true, "")}, - {0xad35, 0, 0, 2, f(Yes, false, "")}, - {0xad50, 0, 0, 1, f(Yes, true, "")}, - {0xad51, 0, 0, 2, f(Yes, false, "")}, - {0xad6c, 0, 0, 1, f(Yes, true, "")}, - {0xad6d, 0, 0, 2, f(Yes, false, "")}, - {0xad88, 0, 0, 1, f(Yes, true, "")}, - {0xad89, 0, 0, 2, f(Yes, false, "")}, - {0xada4, 0, 0, 1, f(Yes, true, "")}, - {0xada5, 0, 0, 2, f(Yes, false, "")}, - {0xadc0, 0, 0, 1, f(Yes, true, "")}, - {0xadc1, 0, 0, 2, f(Yes, false, "")}, - {0xaddc, 0, 0, 1, f(Yes, true, "")}, - {0xaddd, 0, 0, 2, f(Yes, false, "")}, - {0xadf8, 0, 0, 1, f(Yes, true, "")}, - {0xadf9, 0, 0, 2, f(Yes, false, "")}, - {0xae14, 0, 0, 1, f(Yes, true, "")}, - {0xae15, 0, 0, 2, f(Yes, false, "")}, - {0xae30, 0, 0, 1, f(Yes, true, "")}, - {0xae31, 0, 0, 2, f(Yes, false, "")}, - {0xae4c, 0, 0, 1, f(Yes, true, "")}, - {0xae4d, 0, 0, 2, f(Yes, false, "")}, - {0xae68, 0, 0, 1, f(Yes, true, "")}, - {0xae69, 0, 0, 2, f(Yes, false, "")}, - {0xae84, 0, 0, 1, f(Yes, true, "")}, - {0xae85, 0, 0, 2, f(Yes, false, "")}, - {0xaea0, 0, 0, 1, f(Yes, true, "")}, - {0xaea1, 0, 0, 2, f(Yes, false, "")}, - {0xaebc, 0, 0, 1, f(Yes, true, "")}, - {0xaebd, 0, 0, 2, f(Yes, false, "")}, - {0xaed8, 0, 0, 1, f(Yes, true, "")}, - {0xaed9, 0, 0, 2, f(Yes, false, "")}, - {0xaef4, 0, 0, 1, f(Yes, true, "")}, - {0xaef5, 0, 0, 2, f(Yes, false, "")}, - {0xaf10, 0, 0, 1, f(Yes, true, "")}, - {0xaf11, 0, 0, 2, f(Yes, false, "")}, - {0xaf2c, 0, 0, 1, f(Yes, true, "")}, - {0xaf2d, 0, 0, 2, f(Yes, false, "")}, - {0xaf48, 0, 0, 1, f(Yes, true, "")}, - {0xaf49, 0, 0, 2, f(Yes, false, "")}, - {0xaf64, 0, 0, 1, f(Yes, true, "")}, - {0xaf65, 0, 0, 2, f(Yes, false, "")}, - {0xaf80, 0, 0, 1, f(Yes, true, "")}, - {0xaf81, 0, 0, 2, f(Yes, false, "")}, - {0xaf9c, 0, 0, 1, f(Yes, true, "")}, - {0xaf9d, 0, 0, 2, f(Yes, false, "")}, - {0xafb8, 0, 0, 1, f(Yes, true, "")}, - {0xafb9, 0, 0, 2, f(Yes, false, "")}, - {0xafd4, 0, 0, 1, f(Yes, true, "")}, - {0xafd5, 0, 0, 2, f(Yes, false, "")}, - {0xaff0, 0, 0, 1, f(Yes, true, "")}, - {0xaff1, 0, 0, 2, f(Yes, false, "")}, - {0xb00c, 0, 0, 1, f(Yes, true, "")}, - {0xb00d, 0, 0, 2, f(Yes, false, "")}, - {0xb028, 0, 0, 1, f(Yes, true, "")}, - {0xb029, 0, 0, 2, f(Yes, false, "")}, - {0xb044, 0, 0, 1, f(Yes, true, "")}, - {0xb045, 0, 0, 2, f(Yes, false, "")}, - {0xb060, 0, 0, 1, f(Yes, true, "")}, - {0xb061, 0, 0, 2, f(Yes, false, "")}, - {0xb07c, 0, 0, 1, f(Yes, true, "")}, - {0xb07d, 0, 0, 2, f(Yes, false, "")}, - {0xb098, 0, 0, 1, f(Yes, true, "")}, - {0xb099, 0, 0, 2, f(Yes, false, "")}, - {0xb0b4, 0, 0, 1, f(Yes, true, "")}, - {0xb0b5, 0, 0, 2, f(Yes, false, "")}, - {0xb0d0, 0, 0, 1, f(Yes, true, "")}, - {0xb0d1, 0, 0, 2, f(Yes, false, "")}, - {0xb0ec, 0, 0, 1, f(Yes, true, "")}, - {0xb0ed, 0, 0, 2, f(Yes, false, "")}, - {0xb108, 0, 0, 1, f(Yes, true, "")}, - {0xb109, 0, 0, 2, f(Yes, false, "")}, - {0xb124, 0, 0, 1, f(Yes, true, "")}, - {0xb125, 0, 0, 2, f(Yes, false, "")}, - {0xb140, 0, 0, 1, f(Yes, true, "")}, - {0xb141, 0, 0, 2, f(Yes, false, "")}, - {0xb15c, 0, 0, 1, f(Yes, true, "")}, - {0xb15d, 0, 0, 2, f(Yes, false, "")}, - {0xb178, 0, 0, 1, f(Yes, true, "")}, - {0xb179, 0, 0, 2, f(Yes, false, "")}, - {0xb194, 0, 0, 1, f(Yes, true, "")}, - {0xb195, 0, 0, 2, f(Yes, false, "")}, - {0xb1b0, 0, 0, 1, f(Yes, true, "")}, - {0xb1b1, 0, 0, 2, f(Yes, false, "")}, - {0xb1cc, 0, 0, 1, f(Yes, true, "")}, - {0xb1cd, 0, 0, 2, f(Yes, false, "")}, - {0xb1e8, 0, 0, 1, f(Yes, true, "")}, - {0xb1e9, 0, 0, 2, f(Yes, false, "")}, - {0xb204, 0, 0, 1, f(Yes, true, "")}, - {0xb205, 0, 0, 2, f(Yes, false, "")}, - {0xb220, 0, 0, 1, f(Yes, true, "")}, - {0xb221, 0, 0, 2, f(Yes, false, "")}, - {0xb23c, 0, 0, 1, f(Yes, true, "")}, - {0xb23d, 0, 0, 2, f(Yes, false, "")}, - {0xb258, 0, 0, 1, f(Yes, true, "")}, - {0xb259, 0, 0, 2, f(Yes, false, "")}, - {0xb274, 0, 0, 1, f(Yes, true, "")}, - {0xb275, 0, 0, 2, f(Yes, false, "")}, - {0xb290, 0, 0, 1, f(Yes, true, "")}, - {0xb291, 0, 0, 2, f(Yes, false, "")}, - {0xb2ac, 0, 0, 1, f(Yes, true, "")}, - {0xb2ad, 0, 0, 2, f(Yes, false, "")}, - {0xb2c8, 0, 0, 1, f(Yes, true, "")}, - {0xb2c9, 0, 0, 2, f(Yes, false, "")}, - {0xb2e4, 0, 0, 1, f(Yes, true, "")}, - {0xb2e5, 0, 0, 2, f(Yes, false, "")}, - {0xb300, 0, 0, 1, f(Yes, true, "")}, - {0xb301, 0, 0, 2, f(Yes, false, "")}, - {0xb31c, 0, 0, 1, f(Yes, true, "")}, - {0xb31d, 0, 0, 2, f(Yes, false, "")}, - {0xb338, 0, 0, 1, f(Yes, true, "")}, - {0xb339, 0, 0, 2, f(Yes, false, "")}, - {0xb354, 0, 0, 1, f(Yes, true, "")}, - {0xb355, 0, 0, 2, f(Yes, false, "")}, - {0xb370, 0, 0, 1, f(Yes, true, "")}, - {0xb371, 0, 0, 2, f(Yes, false, "")}, - {0xb38c, 0, 0, 1, f(Yes, true, "")}, - {0xb38d, 0, 0, 2, f(Yes, false, "")}, - {0xb3a8, 0, 0, 1, f(Yes, true, "")}, - {0xb3a9, 0, 0, 2, f(Yes, false, "")}, - {0xb3c4, 0, 0, 1, f(Yes, true, "")}, - {0xb3c5, 0, 0, 2, f(Yes, false, "")}, - {0xb3e0, 0, 0, 1, f(Yes, true, "")}, - {0xb3e1, 0, 0, 2, f(Yes, false, "")}, - {0xb3fc, 0, 0, 1, f(Yes, true, "")}, - {0xb3fd, 0, 0, 2, f(Yes, false, "")}, - {0xb418, 0, 0, 1, f(Yes, true, "")}, - {0xb419, 0, 0, 2, f(Yes, false, "")}, - {0xb434, 0, 0, 1, f(Yes, true, "")}, - {0xb435, 0, 0, 2, f(Yes, false, "")}, - {0xb450, 0, 0, 1, f(Yes, true, "")}, - {0xb451, 0, 0, 2, f(Yes, false, "")}, - {0xb46c, 0, 0, 1, f(Yes, true, "")}, - {0xb46d, 0, 0, 2, f(Yes, false, "")}, - {0xb488, 0, 0, 1, f(Yes, true, "")}, - {0xb489, 0, 0, 2, f(Yes, false, "")}, - {0xb4a4, 0, 0, 1, f(Yes, true, "")}, - {0xb4a5, 0, 0, 2, f(Yes, false, "")}, - {0xb4c0, 0, 0, 1, f(Yes, true, "")}, - {0xb4c1, 0, 0, 2, f(Yes, false, "")}, - {0xb4dc, 0, 0, 1, f(Yes, true, "")}, - {0xb4dd, 0, 0, 2, f(Yes, false, "")}, - {0xb4f8, 0, 0, 1, f(Yes, true, "")}, - {0xb4f9, 0, 0, 2, f(Yes, false, "")}, - {0xb514, 0, 0, 1, f(Yes, true, "")}, - {0xb515, 0, 0, 2, f(Yes, false, "")}, - {0xb530, 0, 0, 1, f(Yes, true, "")}, - {0xb531, 0, 0, 2, f(Yes, false, "")}, - {0xb54c, 0, 0, 1, f(Yes, true, "")}, - {0xb54d, 0, 0, 2, f(Yes, false, "")}, - {0xb568, 0, 0, 1, f(Yes, true, "")}, - {0xb569, 0, 0, 2, f(Yes, false, "")}, - {0xb584, 0, 0, 1, f(Yes, true, "")}, - {0xb585, 0, 0, 2, f(Yes, false, "")}, - {0xb5a0, 0, 0, 1, f(Yes, true, "")}, - {0xb5a1, 0, 0, 2, f(Yes, false, "")}, - {0xb5bc, 0, 0, 1, f(Yes, true, "")}, - {0xb5bd, 0, 0, 2, f(Yes, false, "")}, - {0xb5d8, 0, 0, 1, f(Yes, true, "")}, - {0xb5d9, 0, 0, 2, f(Yes, false, "")}, - {0xb5f4, 0, 0, 1, f(Yes, true, "")}, - {0xb5f5, 0, 0, 2, f(Yes, false, "")}, - {0xb610, 0, 0, 1, f(Yes, true, "")}, - {0xb611, 0, 0, 2, f(Yes, false, "")}, - {0xb62c, 0, 0, 1, f(Yes, true, "")}, - {0xb62d, 0, 0, 2, f(Yes, false, "")}, - {0xb648, 0, 0, 1, f(Yes, true, "")}, - {0xb649, 0, 0, 2, f(Yes, false, "")}, - {0xb664, 0, 0, 1, f(Yes, true, "")}, - {0xb665, 0, 0, 2, f(Yes, false, "")}, - {0xb680, 0, 0, 1, f(Yes, true, "")}, - {0xb681, 0, 0, 2, f(Yes, false, "")}, - {0xb69c, 0, 0, 1, f(Yes, true, "")}, - {0xb69d, 0, 0, 2, f(Yes, false, "")}, - {0xb6b8, 0, 0, 1, f(Yes, true, "")}, - {0xb6b9, 0, 0, 2, f(Yes, false, "")}, - {0xb6d4, 0, 0, 1, f(Yes, true, "")}, - {0xb6d5, 0, 0, 2, f(Yes, false, "")}, - {0xb6f0, 0, 0, 1, f(Yes, true, "")}, - {0xb6f1, 0, 0, 2, f(Yes, false, "")}, - {0xb70c, 0, 0, 1, f(Yes, true, "")}, - {0xb70d, 0, 0, 2, f(Yes, false, "")}, - {0xb728, 0, 0, 1, f(Yes, true, "")}, - {0xb729, 0, 0, 2, f(Yes, false, "")}, - {0xb744, 0, 0, 1, f(Yes, true, "")}, - {0xb745, 0, 0, 2, f(Yes, false, "")}, - {0xb760, 0, 0, 1, f(Yes, true, "")}, - {0xb761, 0, 0, 2, f(Yes, false, "")}, - {0xb77c, 0, 0, 1, f(Yes, true, "")}, - {0xb77d, 0, 0, 2, f(Yes, false, "")}, - {0xb798, 0, 0, 1, f(Yes, true, "")}, - {0xb799, 0, 0, 2, f(Yes, false, "")}, - {0xb7b4, 0, 0, 1, f(Yes, true, "")}, - {0xb7b5, 0, 0, 2, f(Yes, false, "")}, - {0xb7d0, 0, 0, 1, f(Yes, true, "")}, - {0xb7d1, 0, 0, 2, f(Yes, false, "")}, - {0xb7ec, 0, 0, 1, f(Yes, true, "")}, - {0xb7ed, 0, 0, 2, f(Yes, false, "")}, - {0xb808, 0, 0, 1, f(Yes, true, "")}, - {0xb809, 0, 0, 2, f(Yes, false, "")}, - {0xb824, 0, 0, 1, f(Yes, true, "")}, - {0xb825, 0, 0, 2, f(Yes, false, "")}, - {0xb840, 0, 0, 1, f(Yes, true, "")}, - {0xb841, 0, 0, 2, f(Yes, false, "")}, - {0xb85c, 0, 0, 1, f(Yes, true, "")}, - {0xb85d, 0, 0, 2, f(Yes, false, "")}, - {0xb878, 0, 0, 1, f(Yes, true, "")}, - {0xb879, 0, 0, 2, f(Yes, false, "")}, - {0xb894, 0, 0, 1, f(Yes, true, "")}, - {0xb895, 0, 0, 2, f(Yes, false, "")}, - {0xb8b0, 0, 0, 1, f(Yes, true, "")}, - {0xb8b1, 0, 0, 2, f(Yes, false, "")}, - {0xb8cc, 0, 0, 1, f(Yes, true, "")}, - {0xb8cd, 0, 0, 2, f(Yes, false, "")}, - {0xb8e8, 0, 0, 1, f(Yes, true, "")}, - {0xb8e9, 0, 0, 2, f(Yes, false, "")}, - {0xb904, 0, 0, 1, f(Yes, true, "")}, - {0xb905, 0, 0, 2, f(Yes, false, "")}, - {0xb920, 0, 0, 1, f(Yes, true, "")}, - {0xb921, 0, 0, 2, f(Yes, false, "")}, - {0xb93c, 0, 0, 1, f(Yes, true, "")}, - {0xb93d, 0, 0, 2, f(Yes, false, "")}, - {0xb958, 0, 0, 1, f(Yes, true, "")}, - {0xb959, 0, 0, 2, f(Yes, false, "")}, - {0xb974, 0, 0, 1, f(Yes, true, "")}, - {0xb975, 0, 0, 2, f(Yes, false, "")}, - {0xb990, 0, 0, 1, f(Yes, true, "")}, - {0xb991, 0, 0, 2, f(Yes, false, "")}, - {0xb9ac, 0, 0, 1, f(Yes, true, "")}, - {0xb9ad, 0, 0, 2, f(Yes, false, "")}, - {0xb9c8, 0, 0, 1, f(Yes, true, "")}, - {0xb9c9, 0, 0, 2, f(Yes, false, "")}, - {0xb9e4, 0, 0, 1, f(Yes, true, "")}, - {0xb9e5, 0, 0, 2, f(Yes, false, "")}, - {0xba00, 0, 0, 1, f(Yes, true, "")}, - {0xba01, 0, 0, 2, f(Yes, false, "")}, - {0xba1c, 0, 0, 1, f(Yes, true, "")}, - {0xba1d, 0, 0, 2, f(Yes, false, "")}, - {0xba38, 0, 0, 1, f(Yes, true, "")}, - {0xba39, 0, 0, 2, f(Yes, false, "")}, - {0xba54, 0, 0, 1, f(Yes, true, "")}, - {0xba55, 0, 0, 2, f(Yes, false, "")}, - {0xba70, 0, 0, 1, f(Yes, true, "")}, - {0xba71, 0, 0, 2, f(Yes, false, "")}, - {0xba8c, 0, 0, 1, f(Yes, true, "")}, - {0xba8d, 0, 0, 2, f(Yes, false, "")}, - {0xbaa8, 0, 0, 1, f(Yes, true, "")}, - {0xbaa9, 0, 0, 2, f(Yes, false, "")}, - {0xbac4, 0, 0, 1, f(Yes, true, "")}, - {0xbac5, 0, 0, 2, f(Yes, false, "")}, - {0xbae0, 0, 0, 1, f(Yes, true, "")}, - {0xbae1, 0, 0, 2, f(Yes, false, "")}, - {0xbafc, 0, 0, 1, f(Yes, true, "")}, - {0xbafd, 0, 0, 2, f(Yes, false, "")}, - {0xbb18, 0, 0, 1, f(Yes, true, "")}, - {0xbb19, 0, 0, 2, f(Yes, false, "")}, - {0xbb34, 0, 0, 1, f(Yes, true, "")}, - {0xbb35, 0, 0, 2, f(Yes, false, "")}, - {0xbb50, 0, 0, 1, f(Yes, true, "")}, - {0xbb51, 0, 0, 2, f(Yes, false, "")}, - {0xbb6c, 0, 0, 1, f(Yes, true, "")}, - {0xbb6d, 0, 0, 2, f(Yes, false, "")}, - {0xbb88, 0, 0, 1, f(Yes, true, "")}, - {0xbb89, 0, 0, 2, f(Yes, false, "")}, - {0xbba4, 0, 0, 1, f(Yes, true, "")}, - {0xbba5, 0, 0, 2, f(Yes, false, "")}, - {0xbbc0, 0, 0, 1, f(Yes, true, "")}, - {0xbbc1, 0, 0, 2, f(Yes, false, "")}, - {0xbbdc, 0, 0, 1, f(Yes, true, "")}, - {0xbbdd, 0, 0, 2, f(Yes, false, "")}, - {0xbbf8, 0, 0, 1, f(Yes, true, "")}, - {0xbbf9, 0, 0, 2, f(Yes, false, "")}, - {0xbc14, 0, 0, 1, f(Yes, true, "")}, - {0xbc15, 0, 0, 2, f(Yes, false, "")}, - {0xbc30, 0, 0, 1, f(Yes, true, "")}, - {0xbc31, 0, 0, 2, f(Yes, false, "")}, - {0xbc4c, 0, 0, 1, f(Yes, true, "")}, - {0xbc4d, 0, 0, 2, f(Yes, false, "")}, - {0xbc68, 0, 0, 1, f(Yes, true, "")}, - {0xbc69, 0, 0, 2, f(Yes, false, "")}, - {0xbc84, 0, 0, 1, f(Yes, true, "")}, - {0xbc85, 0, 0, 2, f(Yes, false, "")}, - {0xbca0, 0, 0, 1, f(Yes, true, "")}, - {0xbca1, 0, 0, 2, f(Yes, false, "")}, - {0xbcbc, 0, 0, 1, f(Yes, true, "")}, - {0xbcbd, 0, 0, 2, f(Yes, false, "")}, - {0xbcd8, 0, 0, 1, f(Yes, true, "")}, - {0xbcd9, 0, 0, 2, f(Yes, false, "")}, - {0xbcf4, 0, 0, 1, f(Yes, true, "")}, - {0xbcf5, 0, 0, 2, f(Yes, false, "")}, - {0xbd10, 0, 0, 1, f(Yes, true, "")}, - {0xbd11, 0, 0, 2, f(Yes, false, "")}, - {0xbd2c, 0, 0, 1, f(Yes, true, "")}, - {0xbd2d, 0, 0, 2, f(Yes, false, "")}, - {0xbd48, 0, 0, 1, f(Yes, true, "")}, - {0xbd49, 0, 0, 2, f(Yes, false, "")}, - {0xbd64, 0, 0, 1, f(Yes, true, "")}, - {0xbd65, 0, 0, 2, f(Yes, false, "")}, - {0xbd80, 0, 0, 1, f(Yes, true, "")}, - {0xbd81, 0, 0, 2, f(Yes, false, "")}, - {0xbd9c, 0, 0, 1, f(Yes, true, "")}, - {0xbd9d, 0, 0, 2, f(Yes, false, "")}, - {0xbdb8, 0, 0, 1, f(Yes, true, "")}, - {0xbdb9, 0, 0, 2, f(Yes, false, "")}, - {0xbdd4, 0, 0, 1, f(Yes, true, "")}, - {0xbdd5, 0, 0, 2, f(Yes, false, "")}, - {0xbdf0, 0, 0, 1, f(Yes, true, "")}, - {0xbdf1, 0, 0, 2, f(Yes, false, "")}, - {0xbe0c, 0, 0, 1, f(Yes, true, "")}, - {0xbe0d, 0, 0, 2, f(Yes, false, "")}, - {0xbe28, 0, 0, 1, f(Yes, true, "")}, - {0xbe29, 0, 0, 2, f(Yes, false, "")}, - {0xbe44, 0, 0, 1, f(Yes, true, "")}, - {0xbe45, 0, 0, 2, f(Yes, false, "")}, - {0xbe60, 0, 0, 1, f(Yes, true, "")}, - {0xbe61, 0, 0, 2, f(Yes, false, "")}, - {0xbe7c, 0, 0, 1, f(Yes, true, "")}, - {0xbe7d, 0, 0, 2, f(Yes, false, "")}, - {0xbe98, 0, 0, 1, f(Yes, true, "")}, - {0xbe99, 0, 0, 2, f(Yes, false, "")}, - {0xbeb4, 0, 0, 1, f(Yes, true, "")}, - {0xbeb5, 0, 0, 2, f(Yes, false, "")}, - {0xbed0, 0, 0, 1, f(Yes, true, "")}, - {0xbed1, 0, 0, 2, f(Yes, false, "")}, - {0xbeec, 0, 0, 1, f(Yes, true, "")}, - {0xbeed, 0, 0, 2, f(Yes, false, "")}, - {0xbf08, 0, 0, 1, f(Yes, true, "")}, - {0xbf09, 0, 0, 2, f(Yes, false, "")}, - {0xbf24, 0, 0, 1, f(Yes, true, "")}, - {0xbf25, 0, 0, 2, f(Yes, false, "")}, - {0xbf40, 0, 0, 1, f(Yes, true, "")}, - {0xbf41, 0, 0, 2, f(Yes, false, "")}, - {0xbf5c, 0, 0, 1, f(Yes, true, "")}, - {0xbf5d, 0, 0, 2, f(Yes, false, "")}, - {0xbf78, 0, 0, 1, f(Yes, true, "")}, - {0xbf79, 0, 0, 2, f(Yes, false, "")}, - {0xbf94, 0, 0, 1, f(Yes, true, "")}, - {0xbf95, 0, 0, 2, f(Yes, false, "")}, - {0xbfb0, 0, 0, 1, f(Yes, true, "")}, - {0xbfb1, 0, 0, 2, f(Yes, false, "")}, - {0xbfcc, 0, 0, 1, f(Yes, true, "")}, - {0xbfcd, 0, 0, 2, f(Yes, false, "")}, - {0xbfe8, 0, 0, 1, f(Yes, true, "")}, - {0xbfe9, 0, 0, 2, f(Yes, false, "")}, - {0xc004, 0, 0, 1, f(Yes, true, "")}, - {0xc005, 0, 0, 2, f(Yes, false, "")}, - {0xc020, 0, 0, 1, f(Yes, true, "")}, - {0xc021, 0, 0, 2, f(Yes, false, "")}, - {0xc03c, 0, 0, 1, f(Yes, true, "")}, - {0xc03d, 0, 0, 2, f(Yes, false, "")}, - {0xc058, 0, 0, 1, f(Yes, true, "")}, - {0xc059, 0, 0, 2, f(Yes, false, "")}, - {0xc074, 0, 0, 1, f(Yes, true, "")}, - {0xc075, 0, 0, 2, f(Yes, false, "")}, - {0xc090, 0, 0, 1, f(Yes, true, "")}, - {0xc091, 0, 0, 2, f(Yes, false, "")}, - {0xc0ac, 0, 0, 1, f(Yes, true, "")}, - {0xc0ad, 0, 0, 2, f(Yes, false, "")}, - {0xc0c8, 0, 0, 1, f(Yes, true, "")}, - {0xc0c9, 0, 0, 2, f(Yes, false, "")}, - {0xc0e4, 0, 0, 1, f(Yes, true, "")}, - {0xc0e5, 0, 0, 2, f(Yes, false, "")}, - {0xc100, 0, 0, 1, f(Yes, true, "")}, - {0xc101, 0, 0, 2, f(Yes, false, "")}, - {0xc11c, 0, 0, 1, f(Yes, true, "")}, - {0xc11d, 0, 0, 2, f(Yes, false, "")}, - {0xc138, 0, 0, 1, f(Yes, true, "")}, - {0xc139, 0, 0, 2, f(Yes, false, "")}, - {0xc154, 0, 0, 1, f(Yes, true, "")}, - {0xc155, 0, 0, 2, f(Yes, false, "")}, - {0xc170, 0, 0, 1, f(Yes, true, "")}, - {0xc171, 0, 0, 2, f(Yes, false, "")}, - {0xc18c, 0, 0, 1, f(Yes, true, "")}, - {0xc18d, 0, 0, 2, f(Yes, false, "")}, - {0xc1a8, 0, 0, 1, f(Yes, true, "")}, - {0xc1a9, 0, 0, 2, f(Yes, false, "")}, - {0xc1c4, 0, 0, 1, f(Yes, true, "")}, - {0xc1c5, 0, 0, 2, f(Yes, false, "")}, - {0xc1e0, 0, 0, 1, f(Yes, true, "")}, - {0xc1e1, 0, 0, 2, f(Yes, false, "")}, - {0xc1fc, 0, 0, 1, f(Yes, true, "")}, - {0xc1fd, 0, 0, 2, f(Yes, false, "")}, - {0xc218, 0, 0, 1, f(Yes, true, "")}, - {0xc219, 0, 0, 2, f(Yes, false, "")}, - {0xc234, 0, 0, 1, f(Yes, true, "")}, - {0xc235, 0, 0, 2, f(Yes, false, "")}, - {0xc250, 0, 0, 1, f(Yes, true, "")}, - {0xc251, 0, 0, 2, f(Yes, false, "")}, - {0xc26c, 0, 0, 1, f(Yes, true, "")}, - {0xc26d, 0, 0, 2, f(Yes, false, "")}, - {0xc288, 0, 0, 1, f(Yes, true, "")}, - {0xc289, 0, 0, 2, f(Yes, false, "")}, - {0xc2a4, 0, 0, 1, f(Yes, true, "")}, - {0xc2a5, 0, 0, 2, f(Yes, false, "")}, - {0xc2c0, 0, 0, 1, f(Yes, true, "")}, - {0xc2c1, 0, 0, 2, f(Yes, false, "")}, - {0xc2dc, 0, 0, 1, f(Yes, true, "")}, - {0xc2dd, 0, 0, 2, f(Yes, false, "")}, - {0xc2f8, 0, 0, 1, f(Yes, true, "")}, - {0xc2f9, 0, 0, 2, f(Yes, false, "")}, - {0xc314, 0, 0, 1, f(Yes, true, "")}, - {0xc315, 0, 0, 2, f(Yes, false, "")}, - {0xc330, 0, 0, 1, f(Yes, true, "")}, - {0xc331, 0, 0, 2, f(Yes, false, "")}, - {0xc34c, 0, 0, 1, f(Yes, true, "")}, - {0xc34d, 0, 0, 2, f(Yes, false, "")}, - {0xc368, 0, 0, 1, f(Yes, true, "")}, - {0xc369, 0, 0, 2, f(Yes, false, "")}, - {0xc384, 0, 0, 1, f(Yes, true, "")}, - {0xc385, 0, 0, 2, f(Yes, false, "")}, - {0xc3a0, 0, 0, 1, f(Yes, true, "")}, - {0xc3a1, 0, 0, 2, f(Yes, false, "")}, - {0xc3bc, 0, 0, 1, f(Yes, true, "")}, - {0xc3bd, 0, 0, 2, f(Yes, false, "")}, - {0xc3d8, 0, 0, 1, f(Yes, true, "")}, - {0xc3d9, 0, 0, 2, f(Yes, false, "")}, - {0xc3f4, 0, 0, 1, f(Yes, true, "")}, - {0xc3f5, 0, 0, 2, f(Yes, false, "")}, - {0xc410, 0, 0, 1, f(Yes, true, "")}, - {0xc411, 0, 0, 2, f(Yes, false, "")}, - {0xc42c, 0, 0, 1, f(Yes, true, "")}, - {0xc42d, 0, 0, 2, f(Yes, false, "")}, - {0xc448, 0, 0, 1, f(Yes, true, "")}, - {0xc449, 0, 0, 2, f(Yes, false, "")}, - {0xc464, 0, 0, 1, f(Yes, true, "")}, - {0xc465, 0, 0, 2, f(Yes, false, "")}, - {0xc480, 0, 0, 1, f(Yes, true, "")}, - {0xc481, 0, 0, 2, f(Yes, false, "")}, - {0xc49c, 0, 0, 1, f(Yes, true, "")}, - {0xc49d, 0, 0, 2, f(Yes, false, "")}, - {0xc4b8, 0, 0, 1, f(Yes, true, "")}, - {0xc4b9, 0, 0, 2, f(Yes, false, "")}, - {0xc4d4, 0, 0, 1, f(Yes, true, "")}, - {0xc4d5, 0, 0, 2, f(Yes, false, "")}, - {0xc4f0, 0, 0, 1, f(Yes, true, "")}, - {0xc4f1, 0, 0, 2, f(Yes, false, "")}, - {0xc50c, 0, 0, 1, f(Yes, true, "")}, - {0xc50d, 0, 0, 2, f(Yes, false, "")}, - {0xc528, 0, 0, 1, f(Yes, true, "")}, - {0xc529, 0, 0, 2, f(Yes, false, "")}, - {0xc544, 0, 0, 1, f(Yes, true, "")}, - {0xc545, 0, 0, 2, f(Yes, false, "")}, - {0xc560, 0, 0, 1, f(Yes, true, "")}, - {0xc561, 0, 0, 2, f(Yes, false, "")}, - {0xc57c, 0, 0, 1, f(Yes, true, "")}, - {0xc57d, 0, 0, 2, f(Yes, false, "")}, - {0xc598, 0, 0, 1, f(Yes, true, "")}, - {0xc599, 0, 0, 2, f(Yes, false, "")}, - {0xc5b4, 0, 0, 1, f(Yes, true, "")}, - {0xc5b5, 0, 0, 2, f(Yes, false, "")}, - {0xc5d0, 0, 0, 1, f(Yes, true, "")}, - {0xc5d1, 0, 0, 2, f(Yes, false, "")}, - {0xc5ec, 0, 0, 1, f(Yes, true, "")}, - {0xc5ed, 0, 0, 2, f(Yes, false, "")}, - {0xc608, 0, 0, 1, f(Yes, true, "")}, - {0xc609, 0, 0, 2, f(Yes, false, "")}, - {0xc624, 0, 0, 1, f(Yes, true, "")}, - {0xc625, 0, 0, 2, f(Yes, false, "")}, - {0xc640, 0, 0, 1, f(Yes, true, "")}, - {0xc641, 0, 0, 2, f(Yes, false, "")}, - {0xc65c, 0, 0, 1, f(Yes, true, "")}, - {0xc65d, 0, 0, 2, f(Yes, false, "")}, - {0xc678, 0, 0, 1, f(Yes, true, "")}, - {0xc679, 0, 0, 2, f(Yes, false, "")}, - {0xc694, 0, 0, 1, f(Yes, true, "")}, - {0xc695, 0, 0, 2, f(Yes, false, "")}, - {0xc6b0, 0, 0, 1, f(Yes, true, "")}, - {0xc6b1, 0, 0, 2, f(Yes, false, "")}, - {0xc6cc, 0, 0, 1, f(Yes, true, "")}, - {0xc6cd, 0, 0, 2, f(Yes, false, "")}, - {0xc6e8, 0, 0, 1, f(Yes, true, "")}, - {0xc6e9, 0, 0, 2, f(Yes, false, "")}, - {0xc704, 0, 0, 1, f(Yes, true, "")}, - {0xc705, 0, 0, 2, f(Yes, false, "")}, - {0xc720, 0, 0, 1, f(Yes, true, "")}, - {0xc721, 0, 0, 2, f(Yes, false, "")}, - {0xc73c, 0, 0, 1, f(Yes, true, "")}, - {0xc73d, 0, 0, 2, f(Yes, false, "")}, - {0xc758, 0, 0, 1, f(Yes, true, "")}, - {0xc759, 0, 0, 2, f(Yes, false, "")}, - {0xc774, 0, 0, 1, f(Yes, true, "")}, - {0xc775, 0, 0, 2, f(Yes, false, "")}, - {0xc790, 0, 0, 1, f(Yes, true, "")}, - {0xc791, 0, 0, 2, f(Yes, false, "")}, - {0xc7ac, 0, 0, 1, f(Yes, true, "")}, - {0xc7ad, 0, 0, 2, f(Yes, false, "")}, - {0xc7c8, 0, 0, 1, f(Yes, true, "")}, - {0xc7c9, 0, 0, 2, f(Yes, false, "")}, - {0xc7e4, 0, 0, 1, f(Yes, true, "")}, - {0xc7e5, 0, 0, 2, f(Yes, false, "")}, - {0xc800, 0, 0, 1, f(Yes, true, "")}, - {0xc801, 0, 0, 2, f(Yes, false, "")}, - {0xc81c, 0, 0, 1, f(Yes, true, "")}, - {0xc81d, 0, 0, 2, f(Yes, false, "")}, - {0xc838, 0, 0, 1, f(Yes, true, "")}, - {0xc839, 0, 0, 2, f(Yes, false, "")}, - {0xc854, 0, 0, 1, f(Yes, true, "")}, - {0xc855, 0, 0, 2, f(Yes, false, "")}, - {0xc870, 0, 0, 1, f(Yes, true, "")}, - {0xc871, 0, 0, 2, f(Yes, false, "")}, - {0xc88c, 0, 0, 1, f(Yes, true, "")}, - {0xc88d, 0, 0, 2, f(Yes, false, "")}, - {0xc8a8, 0, 0, 1, f(Yes, true, "")}, - {0xc8a9, 0, 0, 2, f(Yes, false, "")}, - {0xc8c4, 0, 0, 1, f(Yes, true, "")}, - {0xc8c5, 0, 0, 2, f(Yes, false, "")}, - {0xc8e0, 0, 0, 1, f(Yes, true, "")}, - {0xc8e1, 0, 0, 2, f(Yes, false, "")}, - {0xc8fc, 0, 0, 1, f(Yes, true, "")}, - {0xc8fd, 0, 0, 2, f(Yes, false, "")}, - {0xc918, 0, 0, 1, f(Yes, true, "")}, - {0xc919, 0, 0, 2, f(Yes, false, "")}, - {0xc934, 0, 0, 1, f(Yes, true, "")}, - {0xc935, 0, 0, 2, f(Yes, false, "")}, - {0xc950, 0, 0, 1, f(Yes, true, "")}, - {0xc951, 0, 0, 2, f(Yes, false, "")}, - {0xc96c, 0, 0, 1, f(Yes, true, "")}, - {0xc96d, 0, 0, 2, f(Yes, false, "")}, - {0xc988, 0, 0, 1, f(Yes, true, "")}, - {0xc989, 0, 0, 2, f(Yes, false, "")}, - {0xc9a4, 0, 0, 1, f(Yes, true, "")}, - {0xc9a5, 0, 0, 2, f(Yes, false, "")}, - {0xc9c0, 0, 0, 1, f(Yes, true, "")}, - {0xc9c1, 0, 0, 2, f(Yes, false, "")}, - {0xc9dc, 0, 0, 1, f(Yes, true, "")}, - {0xc9dd, 0, 0, 2, f(Yes, false, "")}, - {0xc9f8, 0, 0, 1, f(Yes, true, "")}, - {0xc9f9, 0, 0, 2, f(Yes, false, "")}, - {0xca14, 0, 0, 1, f(Yes, true, "")}, - {0xca15, 0, 0, 2, f(Yes, false, "")}, - {0xca30, 0, 0, 1, f(Yes, true, "")}, - {0xca31, 0, 0, 2, f(Yes, false, "")}, - {0xca4c, 0, 0, 1, f(Yes, true, "")}, - {0xca4d, 0, 0, 2, f(Yes, false, "")}, - {0xca68, 0, 0, 1, f(Yes, true, "")}, - {0xca69, 0, 0, 2, f(Yes, false, "")}, - {0xca84, 0, 0, 1, f(Yes, true, "")}, - {0xca85, 0, 0, 2, f(Yes, false, "")}, - {0xcaa0, 0, 0, 1, f(Yes, true, "")}, - {0xcaa1, 0, 0, 2, f(Yes, false, "")}, - {0xcabc, 0, 0, 1, f(Yes, true, "")}, - {0xcabd, 0, 0, 2, f(Yes, false, "")}, - {0xcad8, 0, 0, 1, f(Yes, true, "")}, - {0xcad9, 0, 0, 2, f(Yes, false, "")}, - {0xcaf4, 0, 0, 1, f(Yes, true, "")}, - {0xcaf5, 0, 0, 2, f(Yes, false, "")}, - {0xcb10, 0, 0, 1, f(Yes, true, "")}, - {0xcb11, 0, 0, 2, f(Yes, false, "")}, - {0xcb2c, 0, 0, 1, f(Yes, true, "")}, - {0xcb2d, 0, 0, 2, f(Yes, false, "")}, - {0xcb48, 0, 0, 1, f(Yes, true, "")}, - {0xcb49, 0, 0, 2, f(Yes, false, "")}, - {0xcb64, 0, 0, 1, f(Yes, true, "")}, - {0xcb65, 0, 0, 2, f(Yes, false, "")}, - {0xcb80, 0, 0, 1, f(Yes, true, "")}, - {0xcb81, 0, 0, 2, f(Yes, false, "")}, - {0xcb9c, 0, 0, 1, f(Yes, true, "")}, - {0xcb9d, 0, 0, 2, f(Yes, false, "")}, - {0xcbb8, 0, 0, 1, f(Yes, true, "")}, - {0xcbb9, 0, 0, 2, f(Yes, false, "")}, - {0xcbd4, 0, 0, 1, f(Yes, true, "")}, - {0xcbd5, 0, 0, 2, f(Yes, false, "")}, - {0xcbf0, 0, 0, 1, f(Yes, true, "")}, - {0xcbf1, 0, 0, 2, f(Yes, false, "")}, - {0xcc0c, 0, 0, 1, f(Yes, true, "")}, - {0xcc0d, 0, 0, 2, f(Yes, false, "")}, - {0xcc28, 0, 0, 1, f(Yes, true, "")}, - {0xcc29, 0, 0, 2, f(Yes, false, "")}, - {0xcc44, 0, 0, 1, f(Yes, true, "")}, - {0xcc45, 0, 0, 2, f(Yes, false, "")}, - {0xcc60, 0, 0, 1, f(Yes, true, "")}, - {0xcc61, 0, 0, 2, f(Yes, false, "")}, - {0xcc7c, 0, 0, 1, f(Yes, true, "")}, - {0xcc7d, 0, 0, 2, f(Yes, false, "")}, - {0xcc98, 0, 0, 1, f(Yes, true, "")}, - {0xcc99, 0, 0, 2, f(Yes, false, "")}, - {0xccb4, 0, 0, 1, f(Yes, true, "")}, - {0xccb5, 0, 0, 2, f(Yes, false, "")}, - {0xccd0, 0, 0, 1, f(Yes, true, "")}, - {0xccd1, 0, 0, 2, f(Yes, false, "")}, - {0xccec, 0, 0, 1, f(Yes, true, "")}, - {0xcced, 0, 0, 2, f(Yes, false, "")}, - {0xcd08, 0, 0, 1, f(Yes, true, "")}, - {0xcd09, 0, 0, 2, f(Yes, false, "")}, - {0xcd24, 0, 0, 1, f(Yes, true, "")}, - {0xcd25, 0, 0, 2, f(Yes, false, "")}, - {0xcd40, 0, 0, 1, f(Yes, true, "")}, - {0xcd41, 0, 0, 2, f(Yes, false, "")}, - {0xcd5c, 0, 0, 1, f(Yes, true, "")}, - {0xcd5d, 0, 0, 2, f(Yes, false, "")}, - {0xcd78, 0, 0, 1, f(Yes, true, "")}, - {0xcd79, 0, 0, 2, f(Yes, false, "")}, - {0xcd94, 0, 0, 1, f(Yes, true, "")}, - {0xcd95, 0, 0, 2, f(Yes, false, "")}, - {0xcdb0, 0, 0, 1, f(Yes, true, "")}, - {0xcdb1, 0, 0, 2, f(Yes, false, "")}, - {0xcdcc, 0, 0, 1, f(Yes, true, "")}, - {0xcdcd, 0, 0, 2, f(Yes, false, "")}, - {0xcde8, 0, 0, 1, f(Yes, true, "")}, - {0xcde9, 0, 0, 2, f(Yes, false, "")}, - {0xce04, 0, 0, 1, f(Yes, true, "")}, - {0xce05, 0, 0, 2, f(Yes, false, "")}, - {0xce20, 0, 0, 1, f(Yes, true, "")}, - {0xce21, 0, 0, 2, f(Yes, false, "")}, - {0xce3c, 0, 0, 1, f(Yes, true, "")}, - {0xce3d, 0, 0, 2, f(Yes, false, "")}, - {0xce58, 0, 0, 1, f(Yes, true, "")}, - {0xce59, 0, 0, 2, f(Yes, false, "")}, - {0xce74, 0, 0, 1, f(Yes, true, "")}, - {0xce75, 0, 0, 2, f(Yes, false, "")}, - {0xce90, 0, 0, 1, f(Yes, true, "")}, - {0xce91, 0, 0, 2, f(Yes, false, "")}, - {0xceac, 0, 0, 1, f(Yes, true, "")}, - {0xcead, 0, 0, 2, f(Yes, false, "")}, - {0xcec8, 0, 0, 1, f(Yes, true, "")}, - {0xcec9, 0, 0, 2, f(Yes, false, "")}, - {0xcee4, 0, 0, 1, f(Yes, true, "")}, - {0xcee5, 0, 0, 2, f(Yes, false, "")}, - {0xcf00, 0, 0, 1, f(Yes, true, "")}, - {0xcf01, 0, 0, 2, f(Yes, false, "")}, - {0xcf1c, 0, 0, 1, f(Yes, true, "")}, - {0xcf1d, 0, 0, 2, f(Yes, false, "")}, - {0xcf38, 0, 0, 1, f(Yes, true, "")}, - {0xcf39, 0, 0, 2, f(Yes, false, "")}, - {0xcf54, 0, 0, 1, f(Yes, true, "")}, - {0xcf55, 0, 0, 2, f(Yes, false, "")}, - {0xcf70, 0, 0, 1, f(Yes, true, "")}, - {0xcf71, 0, 0, 2, f(Yes, false, "")}, - {0xcf8c, 0, 0, 1, f(Yes, true, "")}, - {0xcf8d, 0, 0, 2, f(Yes, false, "")}, - {0xcfa8, 0, 0, 1, f(Yes, true, "")}, - {0xcfa9, 0, 0, 2, f(Yes, false, "")}, - {0xcfc4, 0, 0, 1, f(Yes, true, "")}, - {0xcfc5, 0, 0, 2, f(Yes, false, "")}, - {0xcfe0, 0, 0, 1, f(Yes, true, "")}, - {0xcfe1, 0, 0, 2, f(Yes, false, "")}, - {0xcffc, 0, 0, 1, f(Yes, true, "")}, - {0xcffd, 0, 0, 2, f(Yes, false, "")}, - {0xd018, 0, 0, 1, f(Yes, true, "")}, - {0xd019, 0, 0, 2, f(Yes, false, "")}, - {0xd034, 0, 0, 1, f(Yes, true, "")}, - {0xd035, 0, 0, 2, f(Yes, false, "")}, - {0xd050, 0, 0, 1, f(Yes, true, "")}, - {0xd051, 0, 0, 2, f(Yes, false, "")}, - {0xd06c, 0, 0, 1, f(Yes, true, "")}, - {0xd06d, 0, 0, 2, f(Yes, false, "")}, - {0xd088, 0, 0, 1, f(Yes, true, "")}, - {0xd089, 0, 0, 2, f(Yes, false, "")}, - {0xd0a4, 0, 0, 1, f(Yes, true, "")}, - {0xd0a5, 0, 0, 2, f(Yes, false, "")}, - {0xd0c0, 0, 0, 1, f(Yes, true, "")}, - {0xd0c1, 0, 0, 2, f(Yes, false, "")}, - {0xd0dc, 0, 0, 1, f(Yes, true, "")}, - {0xd0dd, 0, 0, 2, f(Yes, false, "")}, - {0xd0f8, 0, 0, 1, f(Yes, true, "")}, - {0xd0f9, 0, 0, 2, f(Yes, false, "")}, - {0xd114, 0, 0, 1, f(Yes, true, "")}, - {0xd115, 0, 0, 2, f(Yes, false, "")}, - {0xd130, 0, 0, 1, f(Yes, true, "")}, - {0xd131, 0, 0, 2, f(Yes, false, "")}, - {0xd14c, 0, 0, 1, f(Yes, true, "")}, - {0xd14d, 0, 0, 2, f(Yes, false, "")}, - {0xd168, 0, 0, 1, f(Yes, true, "")}, - {0xd169, 0, 0, 2, f(Yes, false, "")}, - {0xd184, 0, 0, 1, f(Yes, true, "")}, - {0xd185, 0, 0, 2, f(Yes, false, "")}, - {0xd1a0, 0, 0, 1, f(Yes, true, "")}, - {0xd1a1, 0, 0, 2, f(Yes, false, "")}, - {0xd1bc, 0, 0, 1, f(Yes, true, "")}, - {0xd1bd, 0, 0, 2, f(Yes, false, "")}, - {0xd1d8, 0, 0, 1, f(Yes, true, "")}, - {0xd1d9, 0, 0, 2, f(Yes, false, "")}, - {0xd1f4, 0, 0, 1, f(Yes, true, "")}, - {0xd1f5, 0, 0, 2, f(Yes, false, "")}, - {0xd210, 0, 0, 1, f(Yes, true, "")}, - {0xd211, 0, 0, 2, f(Yes, false, "")}, - {0xd22c, 0, 0, 1, f(Yes, true, "")}, - {0xd22d, 0, 0, 2, f(Yes, false, "")}, - {0xd248, 0, 0, 1, f(Yes, true, "")}, - {0xd249, 0, 0, 2, f(Yes, false, "")}, - {0xd264, 0, 0, 1, f(Yes, true, "")}, - {0xd265, 0, 0, 2, f(Yes, false, "")}, - {0xd280, 0, 0, 1, f(Yes, true, "")}, - {0xd281, 0, 0, 2, f(Yes, false, "")}, - {0xd29c, 0, 0, 1, f(Yes, true, "")}, - {0xd29d, 0, 0, 2, f(Yes, false, "")}, - {0xd2b8, 0, 0, 1, f(Yes, true, "")}, - {0xd2b9, 0, 0, 2, f(Yes, false, "")}, - {0xd2d4, 0, 0, 1, f(Yes, true, "")}, - {0xd2d5, 0, 0, 2, f(Yes, false, "")}, - {0xd2f0, 0, 0, 1, f(Yes, true, "")}, - {0xd2f1, 0, 0, 2, f(Yes, false, "")}, - {0xd30c, 0, 0, 1, f(Yes, true, "")}, - {0xd30d, 0, 0, 2, f(Yes, false, "")}, - {0xd328, 0, 0, 1, f(Yes, true, "")}, - {0xd329, 0, 0, 2, f(Yes, false, "")}, - {0xd344, 0, 0, 1, f(Yes, true, "")}, - {0xd345, 0, 0, 2, f(Yes, false, "")}, - {0xd360, 0, 0, 1, f(Yes, true, "")}, - {0xd361, 0, 0, 2, f(Yes, false, "")}, - {0xd37c, 0, 0, 1, f(Yes, true, "")}, - {0xd37d, 0, 0, 2, f(Yes, false, "")}, - {0xd398, 0, 0, 1, f(Yes, true, "")}, - {0xd399, 0, 0, 2, f(Yes, false, "")}, - {0xd3b4, 0, 0, 1, f(Yes, true, "")}, - {0xd3b5, 0, 0, 2, f(Yes, false, "")}, - {0xd3d0, 0, 0, 1, f(Yes, true, "")}, - {0xd3d1, 0, 0, 2, f(Yes, false, "")}, - {0xd3ec, 0, 0, 1, f(Yes, true, "")}, - {0xd3ed, 0, 0, 2, f(Yes, false, "")}, - {0xd408, 0, 0, 1, f(Yes, true, "")}, - {0xd409, 0, 0, 2, f(Yes, false, "")}, - {0xd424, 0, 0, 1, f(Yes, true, "")}, - {0xd425, 0, 0, 2, f(Yes, false, "")}, - {0xd440, 0, 0, 1, f(Yes, true, "")}, - {0xd441, 0, 0, 2, f(Yes, false, "")}, - {0xd45c, 0, 0, 1, f(Yes, true, "")}, - {0xd45d, 0, 0, 2, f(Yes, false, "")}, - {0xd478, 0, 0, 1, f(Yes, true, "")}, - {0xd479, 0, 0, 2, f(Yes, false, "")}, - {0xd494, 0, 0, 1, f(Yes, true, "")}, - {0xd495, 0, 0, 2, f(Yes, false, "")}, - {0xd4b0, 0, 0, 1, f(Yes, true, "")}, - {0xd4b1, 0, 0, 2, f(Yes, false, "")}, - {0xd4cc, 0, 0, 1, f(Yes, true, "")}, - {0xd4cd, 0, 0, 2, f(Yes, false, "")}, - {0xd4e8, 0, 0, 1, f(Yes, true, "")}, - {0xd4e9, 0, 0, 2, f(Yes, false, "")}, - {0xd504, 0, 0, 1, f(Yes, true, "")}, - {0xd505, 0, 0, 2, f(Yes, false, "")}, - {0xd520, 0, 0, 1, f(Yes, true, "")}, - {0xd521, 0, 0, 2, f(Yes, false, "")}, - {0xd53c, 0, 0, 1, f(Yes, true, "")}, - {0xd53d, 0, 0, 2, f(Yes, false, "")}, - {0xd558, 0, 0, 1, f(Yes, true, "")}, - {0xd559, 0, 0, 2, f(Yes, false, "")}, - {0xd574, 0, 0, 1, f(Yes, true, "")}, - {0xd575, 0, 0, 2, f(Yes, false, "")}, - {0xd590, 0, 0, 1, f(Yes, true, "")}, - {0xd591, 0, 0, 2, f(Yes, false, "")}, - {0xd5ac, 0, 0, 1, f(Yes, true, "")}, - {0xd5ad, 0, 0, 2, f(Yes, false, "")}, - {0xd5c8, 0, 0, 1, f(Yes, true, "")}, - {0xd5c9, 0, 0, 2, f(Yes, false, "")}, - {0xd5e4, 0, 0, 1, f(Yes, true, "")}, - {0xd5e5, 0, 0, 2, f(Yes, false, "")}, - {0xd600, 0, 0, 1, f(Yes, true, "")}, - {0xd601, 0, 0, 2, f(Yes, false, "")}, - {0xd61c, 0, 0, 1, f(Yes, true, "")}, - {0xd61d, 0, 0, 2, f(Yes, false, "")}, - {0xd638, 0, 0, 1, f(Yes, true, "")}, - {0xd639, 0, 0, 2, f(Yes, false, "")}, - {0xd654, 0, 0, 1, f(Yes, true, "")}, - {0xd655, 0, 0, 2, f(Yes, false, "")}, - {0xd670, 0, 0, 1, f(Yes, true, "")}, - {0xd671, 0, 0, 2, f(Yes, false, "")}, - {0xd68c, 0, 0, 1, f(Yes, true, "")}, - {0xd68d, 0, 0, 2, f(Yes, false, "")}, - {0xd6a8, 0, 0, 1, f(Yes, true, "")}, - {0xd6a9, 0, 0, 2, f(Yes, false, "")}, - {0xd6c4, 0, 0, 1, f(Yes, true, "")}, - {0xd6c5, 0, 0, 2, f(Yes, false, "")}, - {0xd6e0, 0, 0, 1, f(Yes, true, "")}, - {0xd6e1, 0, 0, 2, f(Yes, false, "")}, - {0xd6fc, 0, 0, 1, f(Yes, true, "")}, - {0xd6fd, 0, 0, 2, f(Yes, false, "")}, - {0xd718, 0, 0, 1, f(Yes, true, "")}, - {0xd719, 0, 0, 2, f(Yes, false, "")}, - {0xd734, 0, 0, 1, f(Yes, true, "")}, - {0xd735, 0, 0, 2, f(Yes, false, "")}, - {0xd750, 0, 0, 1, f(Yes, true, "")}, - {0xd751, 0, 0, 2, f(Yes, false, "")}, - {0xd76c, 0, 0, 1, f(Yes, true, "")}, - {0xd76d, 0, 0, 2, f(Yes, false, "")}, - {0xd788, 0, 0, 1, f(Yes, true, "")}, - {0xd789, 0, 0, 2, f(Yes, false, "")}, - {0xd7a4, 0, 0, 0, f(Yes, false, "")}, - {0xf900, 0, 0, 0, f(No, false, "豈")}, - {0xf901, 0, 0, 0, f(No, false, "更")}, - {0xf902, 0, 0, 0, f(No, false, "車")}, - {0xf903, 0, 0, 0, f(No, false, "賈")}, - {0xf904, 0, 0, 0, f(No, false, "滑")}, - {0xf905, 0, 0, 0, f(No, false, "串")}, - {0xf906, 0, 0, 0, f(No, false, "句")}, - {0xf907, 0, 0, 0, f(No, false, "龜")}, - {0xf909, 0, 0, 0, f(No, false, "契")}, - {0xf90a, 0, 0, 0, f(No, false, "金")}, - {0xf90b, 0, 0, 0, f(No, false, "喇")}, - {0xf90c, 0, 0, 0, f(No, false, "奈")}, - {0xf90d, 0, 0, 0, f(No, false, "懶")}, - {0xf90e, 0, 0, 0, f(No, false, "癩")}, - {0xf90f, 0, 0, 0, f(No, false, "羅")}, - {0xf910, 0, 0, 0, f(No, false, "蘿")}, - {0xf911, 0, 0, 0, f(No, false, "螺")}, - {0xf912, 0, 0, 0, f(No, false, "裸")}, - {0xf913, 0, 0, 0, f(No, false, "邏")}, - {0xf914, 0, 0, 0, f(No, false, "樂")}, - {0xf915, 0, 0, 0, f(No, false, "洛")}, - {0xf916, 0, 0, 0, f(No, false, "烙")}, - {0xf917, 0, 0, 0, f(No, false, "珞")}, - {0xf918, 0, 0, 0, f(No, false, "落")}, - {0xf919, 0, 0, 0, f(No, false, "酪")}, - {0xf91a, 0, 0, 0, f(No, false, "駱")}, - {0xf91b, 0, 0, 0, f(No, false, "亂")}, - {0xf91c, 0, 0, 0, f(No, false, "卵")}, - {0xf91d, 0, 0, 0, f(No, false, "欄")}, - {0xf91e, 0, 0, 0, f(No, false, "爛")}, - {0xf91f, 0, 0, 0, f(No, false, "蘭")}, - {0xf920, 0, 0, 0, f(No, false, "鸞")}, - {0xf921, 0, 0, 0, f(No, false, "嵐")}, - {0xf922, 0, 0, 0, f(No, false, "濫")}, - {0xf923, 0, 0, 0, f(No, false, "藍")}, - {0xf924, 0, 0, 0, f(No, false, "襤")}, - {0xf925, 0, 0, 0, f(No, false, "拉")}, - {0xf926, 0, 0, 0, f(No, false, "臘")}, - {0xf927, 0, 0, 0, f(No, false, "蠟")}, - {0xf928, 0, 0, 0, f(No, false, "廊")}, - {0xf929, 0, 0, 0, f(No, false, "朗")}, - {0xf92a, 0, 0, 0, f(No, false, "浪")}, - {0xf92b, 0, 0, 0, f(No, false, "狼")}, - {0xf92c, 0, 0, 0, f(No, false, "郎")}, - {0xf92d, 0, 0, 0, f(No, false, "來")}, - {0xf92e, 0, 0, 0, f(No, false, "冷")}, - {0xf92f, 0, 0, 0, f(No, false, "勞")}, - {0xf930, 0, 0, 0, f(No, false, "擄")}, - {0xf931, 0, 0, 0, f(No, false, "櫓")}, - {0xf932, 0, 0, 0, f(No, false, "爐")}, - {0xf933, 0, 0, 0, f(No, false, "盧")}, - {0xf934, 0, 0, 0, f(No, false, "老")}, - {0xf935, 0, 0, 0, f(No, false, "蘆")}, - {0xf936, 0, 0, 0, f(No, false, "虜")}, - {0xf937, 0, 0, 0, f(No, false, "路")}, - {0xf938, 0, 0, 0, f(No, false, "露")}, - {0xf939, 0, 0, 0, f(No, false, "魯")}, - {0xf93a, 0, 0, 0, f(No, false, "鷺")}, - {0xf93b, 0, 0, 0, f(No, false, "碌")}, - {0xf93c, 0, 0, 0, f(No, false, "祿")}, - {0xf93d, 0, 0, 0, f(No, false, "綠")}, - {0xf93e, 0, 0, 0, f(No, false, "菉")}, - {0xf93f, 0, 0, 0, f(No, false, "錄")}, - {0xf940, 0, 0, 0, f(No, false, "鹿")}, - {0xf941, 0, 0, 0, f(No, false, "論")}, - {0xf942, 0, 0, 0, f(No, false, "壟")}, - {0xf943, 0, 0, 0, f(No, false, "弄")}, - {0xf944, 0, 0, 0, f(No, false, "籠")}, - {0xf945, 0, 0, 0, f(No, false, "聾")}, - {0xf946, 0, 0, 0, f(No, false, "牢")}, - {0xf947, 0, 0, 0, f(No, false, "磊")}, - {0xf948, 0, 0, 0, f(No, false, "賂")}, - {0xf949, 0, 0, 0, f(No, false, "雷")}, - {0xf94a, 0, 0, 0, f(No, false, "壘")}, - {0xf94b, 0, 0, 0, f(No, false, "屢")}, - {0xf94c, 0, 0, 0, f(No, false, "樓")}, - {0xf94d, 0, 0, 0, f(No, false, "淚")}, - {0xf94e, 0, 0, 0, f(No, false, "漏")}, - {0xf94f, 0, 0, 0, f(No, false, "累")}, - {0xf950, 0, 0, 0, f(No, false, "縷")}, - {0xf951, 0, 0, 0, f(No, false, "陋")}, - {0xf952, 0, 0, 0, f(No, false, "勒")}, - {0xf953, 0, 0, 0, f(No, false, "肋")}, - {0xf954, 0, 0, 0, f(No, false, "凜")}, - {0xf955, 0, 0, 0, f(No, false, "凌")}, - {0xf956, 0, 0, 0, f(No, false, "稜")}, - {0xf957, 0, 0, 0, f(No, false, "綾")}, - {0xf958, 0, 0, 0, f(No, false, "菱")}, - {0xf959, 0, 0, 0, f(No, false, "陵")}, - {0xf95a, 0, 0, 0, f(No, false, "讀")}, - {0xf95b, 0, 0, 0, f(No, false, "拏")}, - {0xf95c, 0, 0, 0, f(No, false, "樂")}, - {0xf95d, 0, 0, 0, f(No, false, "諾")}, - {0xf95e, 0, 0, 0, f(No, false, "丹")}, - {0xf95f, 0, 0, 0, f(No, false, "寧")}, - {0xf960, 0, 0, 0, f(No, false, "怒")}, - {0xf961, 0, 0, 0, f(No, false, "率")}, - {0xf962, 0, 0, 0, f(No, false, "異")}, - {0xf963, 0, 0, 0, f(No, false, "北")}, - {0xf964, 0, 0, 0, f(No, false, "磻")}, - {0xf965, 0, 0, 0, f(No, false, "便")}, - {0xf966, 0, 0, 0, f(No, false, "復")}, - {0xf967, 0, 0, 0, f(No, false, "不")}, - {0xf968, 0, 0, 0, f(No, false, "泌")}, - {0xf969, 0, 0, 0, f(No, false, "數")}, - {0xf96a, 0, 0, 0, f(No, false, "索")}, - {0xf96b, 0, 0, 0, f(No, false, "參")}, - {0xf96c, 0, 0, 0, f(No, false, "塞")}, - {0xf96d, 0, 0, 0, f(No, false, "省")}, - {0xf96e, 0, 0, 0, f(No, false, "葉")}, - {0xf96f, 0, 0, 0, f(No, false, "說")}, - {0xf970, 0, 0, 0, f(No, false, "殺")}, - {0xf971, 0, 0, 0, f(No, false, "辰")}, - {0xf972, 0, 0, 0, f(No, false, "沈")}, - {0xf973, 0, 0, 0, f(No, false, "拾")}, - {0xf974, 0, 0, 0, f(No, false, "若")}, - {0xf975, 0, 0, 0, f(No, false, "掠")}, - {0xf976, 0, 0, 0, f(No, false, "略")}, - {0xf977, 0, 0, 0, f(No, false, "亮")}, - {0xf978, 0, 0, 0, f(No, false, "兩")}, - {0xf979, 0, 0, 0, f(No, false, "凉")}, - {0xf97a, 0, 0, 0, f(No, false, "梁")}, - {0xf97b, 0, 0, 0, f(No, false, "糧")}, - {0xf97c, 0, 0, 0, f(No, false, "良")}, - {0xf97d, 0, 0, 0, f(No, false, "諒")}, - {0xf97e, 0, 0, 0, f(No, false, "量")}, - {0xf97f, 0, 0, 0, f(No, false, "勵")}, - {0xf980, 0, 0, 0, f(No, false, "呂")}, - {0xf981, 0, 0, 0, f(No, false, "女")}, - {0xf982, 0, 0, 0, f(No, false, "廬")}, - {0xf983, 0, 0, 0, f(No, false, "旅")}, - {0xf984, 0, 0, 0, f(No, false, "濾")}, - {0xf985, 0, 0, 0, f(No, false, "礪")}, - {0xf986, 0, 0, 0, f(No, false, "閭")}, - {0xf987, 0, 0, 0, f(No, false, "驪")}, - {0xf988, 0, 0, 0, f(No, false, "麗")}, - {0xf989, 0, 0, 0, f(No, false, "黎")}, - {0xf98a, 0, 0, 0, f(No, false, "力")}, - {0xf98b, 0, 0, 0, f(No, false, "曆")}, - {0xf98c, 0, 0, 0, f(No, false, "歷")}, - {0xf98d, 0, 0, 0, f(No, false, "轢")}, - {0xf98e, 0, 0, 0, f(No, false, "年")}, - {0xf98f, 0, 0, 0, f(No, false, "憐")}, - {0xf990, 0, 0, 0, f(No, false, "戀")}, - {0xf991, 0, 0, 0, f(No, false, "撚")}, - {0xf992, 0, 0, 0, f(No, false, "漣")}, - {0xf993, 0, 0, 0, f(No, false, "煉")}, - {0xf994, 0, 0, 0, f(No, false, "璉")}, - {0xf995, 0, 0, 0, f(No, false, "秊")}, - {0xf996, 0, 0, 0, f(No, false, "練")}, - {0xf997, 0, 0, 0, f(No, false, "聯")}, - {0xf998, 0, 0, 0, f(No, false, "輦")}, - {0xf999, 0, 0, 0, f(No, false, "蓮")}, - {0xf99a, 0, 0, 0, f(No, false, "連")}, - {0xf99b, 0, 0, 0, f(No, false, "鍊")}, - {0xf99c, 0, 0, 0, f(No, false, "列")}, - {0xf99d, 0, 0, 0, f(No, false, "劣")}, - {0xf99e, 0, 0, 0, f(No, false, "咽")}, - {0xf99f, 0, 0, 0, f(No, false, "烈")}, - {0xf9a0, 0, 0, 0, f(No, false, "裂")}, - {0xf9a1, 0, 0, 0, f(No, false, "說")}, - {0xf9a2, 0, 0, 0, f(No, false, "廉")}, - {0xf9a3, 0, 0, 0, f(No, false, "念")}, - {0xf9a4, 0, 0, 0, f(No, false, "捻")}, - {0xf9a5, 0, 0, 0, f(No, false, "殮")}, - {0xf9a6, 0, 0, 0, f(No, false, "簾")}, - {0xf9a7, 0, 0, 0, f(No, false, "獵")}, - {0xf9a8, 0, 0, 0, f(No, false, "令")}, - {0xf9a9, 0, 0, 0, f(No, false, "囹")}, - {0xf9aa, 0, 0, 0, f(No, false, "寧")}, - {0xf9ab, 0, 0, 0, f(No, false, "嶺")}, - {0xf9ac, 0, 0, 0, f(No, false, "怜")}, - {0xf9ad, 0, 0, 0, f(No, false, "玲")}, - {0xf9ae, 0, 0, 0, f(No, false, "瑩")}, - {0xf9af, 0, 0, 0, f(No, false, "羚")}, - {0xf9b0, 0, 0, 0, f(No, false, "聆")}, - {0xf9b1, 0, 0, 0, f(No, false, "鈴")}, - {0xf9b2, 0, 0, 0, f(No, false, "零")}, - {0xf9b3, 0, 0, 0, f(No, false, "靈")}, - {0xf9b4, 0, 0, 0, f(No, false, "領")}, - {0xf9b5, 0, 0, 0, f(No, false, "例")}, - {0xf9b6, 0, 0, 0, f(No, false, "禮")}, - {0xf9b7, 0, 0, 0, f(No, false, "醴")}, - {0xf9b8, 0, 0, 0, f(No, false, "隸")}, - {0xf9b9, 0, 0, 0, f(No, false, "惡")}, - {0xf9ba, 0, 0, 0, f(No, false, "了")}, - {0xf9bb, 0, 0, 0, f(No, false, "僚")}, - {0xf9bc, 0, 0, 0, f(No, false, "寮")}, - {0xf9bd, 0, 0, 0, f(No, false, "尿")}, - {0xf9be, 0, 0, 0, f(No, false, "料")}, - {0xf9bf, 0, 0, 0, f(No, false, "樂")}, - {0xf9c0, 0, 0, 0, f(No, false, "燎")}, - {0xf9c1, 0, 0, 0, f(No, false, "療")}, - {0xf9c2, 0, 0, 0, f(No, false, "蓼")}, - {0xf9c3, 0, 0, 0, f(No, false, "遼")}, - {0xf9c4, 0, 0, 0, f(No, false, "龍")}, - {0xf9c5, 0, 0, 0, f(No, false, "暈")}, - {0xf9c6, 0, 0, 0, f(No, false, "阮")}, - {0xf9c7, 0, 0, 0, f(No, false, "劉")}, - {0xf9c8, 0, 0, 0, f(No, false, "杻")}, - {0xf9c9, 0, 0, 0, f(No, false, "柳")}, - {0xf9ca, 0, 0, 0, f(No, false, "流")}, - {0xf9cb, 0, 0, 0, f(No, false, "溜")}, - {0xf9cc, 0, 0, 0, f(No, false, "琉")}, - {0xf9cd, 0, 0, 0, f(No, false, "留")}, - {0xf9ce, 0, 0, 0, f(No, false, "硫")}, - {0xf9cf, 0, 0, 0, f(No, false, "紐")}, - {0xf9d0, 0, 0, 0, f(No, false, "類")}, - {0xf9d1, 0, 0, 0, f(No, false, "六")}, - {0xf9d2, 0, 0, 0, f(No, false, "戮")}, - {0xf9d3, 0, 0, 0, f(No, false, "陸")}, - {0xf9d4, 0, 0, 0, f(No, false, "倫")}, - {0xf9d5, 0, 0, 0, f(No, false, "崙")}, - {0xf9d6, 0, 0, 0, f(No, false, "淪")}, - {0xf9d7, 0, 0, 0, f(No, false, "輪")}, - {0xf9d8, 0, 0, 0, f(No, false, "律")}, - {0xf9d9, 0, 0, 0, f(No, false, "慄")}, - {0xf9da, 0, 0, 0, f(No, false, "栗")}, - {0xf9db, 0, 0, 0, f(No, false, "率")}, - {0xf9dc, 0, 0, 0, f(No, false, "隆")}, - {0xf9dd, 0, 0, 0, f(No, false, "利")}, - {0xf9de, 0, 0, 0, f(No, false, "吏")}, - {0xf9df, 0, 0, 0, f(No, false, "履")}, - {0xf9e0, 0, 0, 0, f(No, false, "易")}, - {0xf9e1, 0, 0, 0, f(No, false, "李")}, - {0xf9e2, 0, 0, 0, f(No, false, "梨")}, - {0xf9e3, 0, 0, 0, f(No, false, "泥")}, - {0xf9e4, 0, 0, 0, f(No, false, "理")}, - {0xf9e5, 0, 0, 0, f(No, false, "痢")}, - {0xf9e6, 0, 0, 0, f(No, false, "罹")}, - {0xf9e7, 0, 0, 0, f(No, false, "裏")}, - {0xf9e8, 0, 0, 0, f(No, false, "裡")}, - {0xf9e9, 0, 0, 0, f(No, false, "里")}, - {0xf9ea, 0, 0, 0, f(No, false, "離")}, - {0xf9eb, 0, 0, 0, f(No, false, "匿")}, - {0xf9ec, 0, 0, 0, f(No, false, "溺")}, - {0xf9ed, 0, 0, 0, f(No, false, "吝")}, - {0xf9ee, 0, 0, 0, f(No, false, "燐")}, - {0xf9ef, 0, 0, 0, f(No, false, "璘")}, - {0xf9f0, 0, 0, 0, f(No, false, "藺")}, - {0xf9f1, 0, 0, 0, f(No, false, "隣")}, - {0xf9f2, 0, 0, 0, f(No, false, "鱗")}, - {0xf9f3, 0, 0, 0, f(No, false, "麟")}, - {0xf9f4, 0, 0, 0, f(No, false, "林")}, - {0xf9f5, 0, 0, 0, f(No, false, "淋")}, - {0xf9f6, 0, 0, 0, f(No, false, "臨")}, - {0xf9f7, 0, 0, 0, f(No, false, "立")}, - {0xf9f8, 0, 0, 0, f(No, false, "笠")}, - {0xf9f9, 0, 0, 0, f(No, false, "粒")}, - {0xf9fa, 0, 0, 0, f(No, false, "狀")}, - {0xf9fb, 0, 0, 0, f(No, false, "炙")}, - {0xf9fc, 0, 0, 0, f(No, false, "識")}, - {0xf9fd, 0, 0, 0, f(No, false, "什")}, - {0xf9fe, 0, 0, 0, f(No, false, "茶")}, - {0xf9ff, 0, 0, 0, f(No, false, "刺")}, - {0xfa00, 0, 0, 0, f(No, false, "切")}, - {0xfa01, 0, 0, 0, f(No, false, "度")}, - {0xfa02, 0, 0, 0, f(No, false, "拓")}, - {0xfa03, 0, 0, 0, f(No, false, "糖")}, - {0xfa04, 0, 0, 0, f(No, false, "宅")}, - {0xfa05, 0, 0, 0, f(No, false, "洞")}, - {0xfa06, 0, 0, 0, f(No, false, "暴")}, - {0xfa07, 0, 0, 0, f(No, false, "輻")}, - {0xfa08, 0, 0, 0, f(No, false, "行")}, - {0xfa09, 0, 0, 0, f(No, false, "降")}, - {0xfa0a, 0, 0, 0, f(No, false, "見")}, - {0xfa0b, 0, 0, 0, f(No, false, "廓")}, - {0xfa0c, 0, 0, 0, f(No, false, "兀")}, - {0xfa0d, 0, 0, 0, f(No, false, "嗀")}, - {0xfa0e, 0, 0, 0, f(Yes, false, "")}, - {0xfa10, 0, 0, 0, f(No, false, "塚")}, - {0xfa11, 0, 0, 0, f(Yes, false, "")}, - {0xfa12, 0, 0, 0, f(No, false, "晴")}, - {0xfa13, 0, 0, 0, f(Yes, false, "")}, - {0xfa15, 0, 0, 0, f(No, false, "凞")}, - {0xfa16, 0, 0, 0, f(No, false, "猪")}, - {0xfa17, 0, 0, 0, f(No, false, "益")}, - {0xfa18, 0, 0, 0, f(No, false, "礼")}, - {0xfa19, 0, 0, 0, f(No, false, "神")}, - {0xfa1a, 0, 0, 0, f(No, false, "祥")}, - {0xfa1b, 0, 0, 0, f(No, false, "福")}, - {0xfa1c, 0, 0, 0, f(No, false, "靖")}, - {0xfa1d, 0, 0, 0, f(No, false, "精")}, - {0xfa1e, 0, 0, 0, f(No, false, "羽")}, - {0xfa1f, 0, 0, 0, f(Yes, false, "")}, - {0xfa20, 0, 0, 0, f(No, false, "蘒")}, - {0xfa21, 0, 0, 0, f(Yes, false, "")}, - {0xfa22, 0, 0, 0, f(No, false, "諸")}, - {0xfa23, 0, 0, 0, f(Yes, false, "")}, - {0xfa25, 0, 0, 0, f(No, false, "逸")}, - {0xfa26, 0, 0, 0, f(No, false, "都")}, - {0xfa27, 0, 0, 0, f(Yes, false, "")}, - {0xfa2a, 0, 0, 0, f(No, false, "飯")}, - {0xfa2b, 0, 0, 0, f(No, false, "飼")}, - {0xfa2c, 0, 0, 0, f(No, false, "館")}, - {0xfa2d, 0, 0, 0, f(No, false, "鶴")}, - {0xfa2e, 0, 0, 0, f(No, false, "郞")}, - {0xfa2f, 0, 0, 0, f(No, false, "隷")}, - {0xfa30, 0, 0, 0, f(No, false, "侮")}, - {0xfa31, 0, 0, 0, f(No, false, "僧")}, - {0xfa32, 0, 0, 0, f(No, false, "免")}, - {0xfa33, 0, 0, 0, f(No, false, "勉")}, - {0xfa34, 0, 0, 0, f(No, false, "勤")}, - {0xfa35, 0, 0, 0, f(No, false, "卑")}, - {0xfa36, 0, 0, 0, f(No, false, "喝")}, - {0xfa37, 0, 0, 0, f(No, false, "嘆")}, - {0xfa38, 0, 0, 0, f(No, false, "器")}, - {0xfa39, 0, 0, 0, f(No, false, "塀")}, - {0xfa3a, 0, 0, 0, f(No, false, "墨")}, - {0xfa3b, 0, 0, 0, f(No, false, "層")}, - {0xfa3c, 0, 0, 0, f(No, false, "屮")}, - {0xfa3d, 0, 0, 0, f(No, false, "悔")}, - {0xfa3e, 0, 0, 0, f(No, false, "慨")}, - {0xfa3f, 0, 0, 0, f(No, false, "憎")}, - {0xfa40, 0, 0, 0, f(No, false, "懲")}, - {0xfa41, 0, 0, 0, f(No, false, "敏")}, - {0xfa42, 0, 0, 0, f(No, false, "既")}, - {0xfa43, 0, 0, 0, f(No, false, "暑")}, - {0xfa44, 0, 0, 0, f(No, false, "梅")}, - {0xfa45, 0, 0, 0, f(No, false, "海")}, - {0xfa46, 0, 0, 0, f(No, false, "渚")}, - {0xfa47, 0, 0, 0, f(No, false, "漢")}, - {0xfa48, 0, 0, 0, f(No, false, "煮")}, - {0xfa49, 0, 0, 0, f(No, false, "爫")}, - {0xfa4a, 0, 0, 0, f(No, false, "琢")}, - {0xfa4b, 0, 0, 0, f(No, false, "碑")}, - {0xfa4c, 0, 0, 0, f(No, false, "社")}, - {0xfa4d, 0, 0, 0, f(No, false, "祉")}, - {0xfa4e, 0, 0, 0, f(No, false, "祈")}, - {0xfa4f, 0, 0, 0, f(No, false, "祐")}, - {0xfa50, 0, 0, 0, f(No, false, "祖")}, - {0xfa51, 0, 0, 0, f(No, false, "祝")}, - {0xfa52, 0, 0, 0, f(No, false, "禍")}, - {0xfa53, 0, 0, 0, f(No, false, "禎")}, - {0xfa54, 0, 0, 0, f(No, false, "穀")}, - {0xfa55, 0, 0, 0, f(No, false, "突")}, - {0xfa56, 0, 0, 0, f(No, false, "節")}, - {0xfa57, 0, 0, 0, f(No, false, "練")}, - {0xfa58, 0, 0, 0, f(No, false, "縉")}, - {0xfa59, 0, 0, 0, f(No, false, "繁")}, - {0xfa5a, 0, 0, 0, f(No, false, "署")}, - {0xfa5b, 0, 0, 0, f(No, false, "者")}, - {0xfa5c, 0, 0, 0, f(No, false, "臭")}, - {0xfa5d, 0, 0, 0, f(No, false, "艹")}, - {0xfa5f, 0, 0, 0, f(No, false, "著")}, - {0xfa60, 0, 0, 0, f(No, false, "褐")}, - {0xfa61, 0, 0, 0, f(No, false, "視")}, - {0xfa62, 0, 0, 0, f(No, false, "謁")}, - {0xfa63, 0, 0, 0, f(No, false, "謹")}, - {0xfa64, 0, 0, 0, f(No, false, "賓")}, - {0xfa65, 0, 0, 0, f(No, false, "贈")}, - {0xfa66, 0, 0, 0, f(No, false, "辶")}, - {0xfa67, 0, 0, 0, f(No, false, "逸")}, - {0xfa68, 0, 0, 0, f(No, false, "難")}, - {0xfa69, 0, 0, 0, f(No, false, "響")}, - {0xfa6a, 0, 0, 0, f(No, false, "頻")}, - {0xfa6b, 0, 0, 0, f(No, false, "恵")}, - {0xfa6c, 0, 0, 0, f(No, false, "𤋮")}, - {0xfa6d, 0, 0, 0, f(No, false, "舘")}, - {0xfa6e, 0, 0, 0, f(Yes, false, "")}, - {0xfa70, 0, 0, 0, f(No, false, "並")}, - {0xfa71, 0, 0, 0, f(No, false, "况")}, - {0xfa72, 0, 0, 0, f(No, false, "全")}, - {0xfa73, 0, 0, 0, f(No, false, "侀")}, - {0xfa74, 0, 0, 0, f(No, false, "充")}, - {0xfa75, 0, 0, 0, f(No, false, "冀")}, - {0xfa76, 0, 0, 0, f(No, false, "勇")}, - {0xfa77, 0, 0, 0, f(No, false, "勺")}, - {0xfa78, 0, 0, 0, f(No, false, "喝")}, - {0xfa79, 0, 0, 0, f(No, false, "啕")}, - {0xfa7a, 0, 0, 0, f(No, false, "喙")}, - {0xfa7b, 0, 0, 0, f(No, false, "嗢")}, - {0xfa7c, 0, 0, 0, f(No, false, "塚")}, - {0xfa7d, 0, 0, 0, f(No, false, "墳")}, - {0xfa7e, 0, 0, 0, f(No, false, "奄")}, - {0xfa7f, 0, 0, 0, f(No, false, "奔")}, - {0xfa80, 0, 0, 0, f(No, false, "婢")}, - {0xfa81, 0, 0, 0, f(No, false, "嬨")}, - {0xfa82, 0, 0, 0, f(No, false, "廒")}, - {0xfa83, 0, 0, 0, f(No, false, "廙")}, - {0xfa84, 0, 0, 0, f(No, false, "彩")}, - {0xfa85, 0, 0, 0, f(No, false, "徭")}, - {0xfa86, 0, 0, 0, f(No, false, "惘")}, - {0xfa87, 0, 0, 0, f(No, false, "慎")}, - {0xfa88, 0, 0, 0, f(No, false, "愈")}, - {0xfa89, 0, 0, 0, f(No, false, "憎")}, - {0xfa8a, 0, 0, 0, f(No, false, "慠")}, - {0xfa8b, 0, 0, 0, f(No, false, "懲")}, - {0xfa8c, 0, 0, 0, f(No, false, "戴")}, - {0xfa8d, 0, 0, 0, f(No, false, "揄")}, - {0xfa8e, 0, 0, 0, f(No, false, "搜")}, - {0xfa8f, 0, 0, 0, f(No, false, "摒")}, - {0xfa90, 0, 0, 0, f(No, false, "敖")}, - {0xfa91, 0, 0, 0, f(No, false, "晴")}, - {0xfa92, 0, 0, 0, f(No, false, "朗")}, - {0xfa93, 0, 0, 0, f(No, false, "望")}, - {0xfa94, 0, 0, 0, f(No, false, "杖")}, - {0xfa95, 0, 0, 0, f(No, false, "歹")}, - {0xfa96, 0, 0, 0, f(No, false, "殺")}, - {0xfa97, 0, 0, 0, f(No, false, "流")}, - {0xfa98, 0, 0, 0, f(No, false, "滛")}, - {0xfa99, 0, 0, 0, f(No, false, "滋")}, - {0xfa9a, 0, 0, 0, f(No, false, "漢")}, - {0xfa9b, 0, 0, 0, f(No, false, "瀞")}, - {0xfa9c, 0, 0, 0, f(No, false, "煮")}, - {0xfa9d, 0, 0, 0, f(No, false, "瞧")}, - {0xfa9e, 0, 0, 0, f(No, false, "爵")}, - {0xfa9f, 0, 0, 0, f(No, false, "犯")}, - {0xfaa0, 0, 0, 0, f(No, false, "猪")}, - {0xfaa1, 0, 0, 0, f(No, false, "瑱")}, - {0xfaa2, 0, 0, 0, f(No, false, "甆")}, - {0xfaa3, 0, 0, 0, f(No, false, "画")}, - {0xfaa4, 0, 0, 0, f(No, false, "瘝")}, - {0xfaa5, 0, 0, 0, f(No, false, "瘟")}, - {0xfaa6, 0, 0, 0, f(No, false, "益")}, - {0xfaa7, 0, 0, 0, f(No, false, "盛")}, - {0xfaa8, 0, 0, 0, f(No, false, "直")}, - {0xfaa9, 0, 0, 0, f(No, false, "睊")}, - {0xfaaa, 0, 0, 0, f(No, false, "着")}, - {0xfaab, 0, 0, 0, f(No, false, "磌")}, - {0xfaac, 0, 0, 0, f(No, false, "窱")}, - {0xfaad, 0, 0, 0, f(No, false, "節")}, - {0xfaae, 0, 0, 0, f(No, false, "类")}, - {0xfaaf, 0, 0, 0, f(No, false, "絛")}, - {0xfab0, 0, 0, 0, f(No, false, "練")}, - {0xfab1, 0, 0, 0, f(No, false, "缾")}, - {0xfab2, 0, 0, 0, f(No, false, "者")}, - {0xfab3, 0, 0, 0, f(No, false, "荒")}, - {0xfab4, 0, 0, 0, f(No, false, "華")}, - {0xfab5, 0, 0, 0, f(No, false, "蝹")}, - {0xfab6, 0, 0, 0, f(No, false, "襁")}, - {0xfab7, 0, 0, 0, f(No, false, "覆")}, - {0xfab8, 0, 0, 0, f(No, false, "視")}, - {0xfab9, 0, 0, 0, f(No, false, "調")}, - {0xfaba, 0, 0, 0, f(No, false, "諸")}, - {0xfabb, 0, 0, 0, f(No, false, "請")}, - {0xfabc, 0, 0, 0, f(No, false, "謁")}, - {0xfabd, 0, 0, 0, f(No, false, "諾")}, - {0xfabe, 0, 0, 0, f(No, false, "諭")}, - {0xfabf, 0, 0, 0, f(No, false, "謹")}, - {0xfac0, 0, 0, 0, f(No, false, "變")}, - {0xfac1, 0, 0, 0, f(No, false, "贈")}, - {0xfac2, 0, 0, 0, f(No, false, "輸")}, - {0xfac3, 0, 0, 0, f(No, false, "遲")}, - {0xfac4, 0, 0, 0, f(No, false, "醙")}, - {0xfac5, 0, 0, 0, f(No, false, "鉶")}, - {0xfac6, 0, 0, 0, f(No, false, "陼")}, - {0xfac7, 0, 0, 0, f(No, false, "難")}, - {0xfac8, 0, 0, 0, f(No, false, "靖")}, - {0xfac9, 0, 0, 0, f(No, false, "韛")}, - {0xfaca, 0, 0, 0, f(No, false, "響")}, - {0xfacb, 0, 0, 0, f(No, false, "頋")}, - {0xfacc, 0, 0, 0, f(No, false, "頻")}, - {0xfacd, 0, 0, 0, f(No, false, "鬒")}, - {0xface, 0, 0, 0, f(No, false, "龜")}, - {0xfacf, 0, 0, 0, f(No, false, "𢡊")}, - {0xfad0, 0, 0, 0, f(No, false, "𢡄")}, - {0xfad1, 0, 0, 0, f(No, false, "𣏕")}, - {0xfad2, 0, 0, 0, f(No, false, "㮝")}, - {0xfad3, 0, 0, 0, f(No, false, "䀘")}, - {0xfad4, 0, 0, 0, f(No, false, "䀹")}, - {0xfad5, 0, 0, 0, f(No, false, "𥉉")}, - {0xfad6, 0, 0, 0, f(No, false, "𥳐")}, - {0xfad7, 0, 0, 0, f(No, false, "𧻓")}, - {0xfad8, 0, 0, 0, f(No, false, "齃")}, - {0xfad9, 0, 0, 0, f(No, false, "龎")}, - {0xfada, 0, 0, 0, f(Yes, false, "")}, - {0xfb00, 0, 0, 0, g(Yes, No, false, false, "", "ff")}, - {0xfb01, 0, 0, 0, g(Yes, No, false, false, "", "fi")}, - {0xfb02, 0, 0, 0, g(Yes, No, false, false, "", "fl")}, - {0xfb03, 0, 0, 0, g(Yes, No, false, false, "", "ffi")}, - {0xfb04, 0, 0, 0, g(Yes, No, false, false, "", "ffl")}, - {0xfb05, 0, 0, 0, g(Yes, No, false, false, "", "st")}, - {0xfb07, 0, 0, 0, f(Yes, false, "")}, - {0xfb13, 0, 0, 0, g(Yes, No, false, false, "", "մն")}, - {0xfb14, 0, 0, 0, g(Yes, No, false, false, "", "մե")}, - {0xfb15, 0, 0, 0, g(Yes, No, false, false, "", "մի")}, - {0xfb16, 0, 0, 0, g(Yes, No, false, false, "", "վն")}, - {0xfb17, 0, 0, 0, g(Yes, No, false, false, "", "մխ")}, - {0xfb18, 0, 0, 0, f(Yes, false, "")}, - {0xfb1d, 0, 0, 1, f(No, false, "יִ")}, - {0xfb1e, 26, 1, 1, f(Yes, false, "")}, - {0xfb1f, 0, 0, 1, f(No, false, "ײַ")}, - {0xfb20, 0, 0, 0, g(Yes, No, false, false, "", "ע")}, - {0xfb21, 0, 0, 0, g(Yes, No, false, false, "", "א")}, - {0xfb22, 0, 0, 0, g(Yes, No, false, false, "", "ד")}, - {0xfb23, 0, 0, 0, g(Yes, No, false, false, "", "ה")}, - {0xfb24, 0, 0, 0, g(Yes, No, false, false, "", "כ")}, - {0xfb25, 0, 0, 0, g(Yes, No, false, false, "", "ל")}, - {0xfb26, 0, 0, 0, g(Yes, No, false, false, "", "ם")}, - {0xfb27, 0, 0, 0, g(Yes, No, false, false, "", "ר")}, - {0xfb28, 0, 0, 0, g(Yes, No, false, false, "", "ת")}, - {0xfb29, 0, 0, 0, g(Yes, No, false, false, "", "+")}, - {0xfb2a, 0, 0, 1, f(No, false, "שׁ")}, - {0xfb2b, 0, 0, 1, f(No, false, "שׂ")}, - {0xfb2c, 0, 0, 2, f(No, false, "שּׁ")}, - {0xfb2d, 0, 0, 2, f(No, false, "שּׂ")}, - {0xfb2e, 0, 0, 1, f(No, false, "אַ")}, - {0xfb2f, 0, 0, 1, f(No, false, "אָ")}, - {0xfb30, 0, 0, 1, f(No, false, "אּ")}, - {0xfb31, 0, 0, 1, f(No, false, "בּ")}, - {0xfb32, 0, 0, 1, f(No, false, "גּ")}, - {0xfb33, 0, 0, 1, f(No, false, "דּ")}, - {0xfb34, 0, 0, 1, f(No, false, "הּ")}, - {0xfb35, 0, 0, 1, f(No, false, "וּ")}, - {0xfb36, 0, 0, 1, f(No, false, "זּ")}, - {0xfb37, 0, 0, 0, f(Yes, false, "")}, - {0xfb38, 0, 0, 1, f(No, false, "טּ")}, - {0xfb39, 0, 0, 1, f(No, false, "יּ")}, - {0xfb3a, 0, 0, 1, f(No, false, "ךּ")}, - {0xfb3b, 0, 0, 1, f(No, false, "כּ")}, - {0xfb3c, 0, 0, 1, f(No, false, "לּ")}, - {0xfb3d, 0, 0, 0, f(Yes, false, "")}, - {0xfb3e, 0, 0, 1, f(No, false, "מּ")}, - {0xfb3f, 0, 0, 0, f(Yes, false, "")}, - {0xfb40, 0, 0, 1, f(No, false, "נּ")}, - {0xfb41, 0, 0, 1, f(No, false, "סּ")}, - {0xfb42, 0, 0, 0, f(Yes, false, "")}, - {0xfb43, 0, 0, 1, f(No, false, "ףּ")}, - {0xfb44, 0, 0, 1, f(No, false, "פּ")}, - {0xfb45, 0, 0, 0, f(Yes, false, "")}, - {0xfb46, 0, 0, 1, f(No, false, "צּ")}, - {0xfb47, 0, 0, 1, f(No, false, "קּ")}, - {0xfb48, 0, 0, 1, f(No, false, "רּ")}, - {0xfb49, 0, 0, 1, f(No, false, "שּ")}, - {0xfb4a, 0, 0, 1, f(No, false, "תּ")}, - {0xfb4b, 0, 0, 1, f(No, false, "וֹ")}, - {0xfb4c, 0, 0, 1, f(No, false, "בֿ")}, - {0xfb4d, 0, 0, 1, f(No, false, "כֿ")}, - {0xfb4e, 0, 0, 1, f(No, false, "פֿ")}, - {0xfb4f, 0, 0, 0, g(Yes, No, false, false, "", "אל")}, - {0xfb50, 0, 0, 0, g(Yes, No, false, false, "", "ٱ")}, - {0xfb52, 0, 0, 0, g(Yes, No, false, false, "", "ٻ")}, - {0xfb56, 0, 0, 0, g(Yes, No, false, false, "", "پ")}, - {0xfb5a, 0, 0, 0, g(Yes, No, false, false, "", "ڀ")}, - {0xfb5e, 0, 0, 0, g(Yes, No, false, false, "", "ٺ")}, - {0xfb62, 0, 0, 0, g(Yes, No, false, false, "", "ٿ")}, - {0xfb66, 0, 0, 0, g(Yes, No, false, false, "", "ٹ")}, - {0xfb6a, 0, 0, 0, g(Yes, No, false, false, "", "ڤ")}, - {0xfb6e, 0, 0, 0, g(Yes, No, false, false, "", "ڦ")}, - {0xfb72, 0, 0, 0, g(Yes, No, false, false, "", "ڄ")}, - {0xfb76, 0, 0, 0, g(Yes, No, false, false, "", "ڃ")}, - {0xfb7a, 0, 0, 0, g(Yes, No, false, false, "", "چ")}, - {0xfb7e, 0, 0, 0, g(Yes, No, false, false, "", "ڇ")}, - {0xfb82, 0, 0, 0, g(Yes, No, false, false, "", "ڍ")}, - {0xfb84, 0, 0, 0, g(Yes, No, false, false, "", "ڌ")}, - {0xfb86, 0, 0, 0, g(Yes, No, false, false, "", "ڎ")}, - {0xfb88, 0, 0, 0, g(Yes, No, false, false, "", "ڈ")}, - {0xfb8a, 0, 0, 0, g(Yes, No, false, false, "", "ژ")}, - {0xfb8c, 0, 0, 0, g(Yes, No, false, false, "", "ڑ")}, - {0xfb8e, 0, 0, 0, g(Yes, No, false, false, "", "ک")}, - {0xfb92, 0, 0, 0, g(Yes, No, false, false, "", "گ")}, - {0xfb96, 0, 0, 0, g(Yes, No, false, false, "", "ڳ")}, - {0xfb9a, 0, 0, 0, g(Yes, No, false, false, "", "ڱ")}, - {0xfb9e, 0, 0, 0, g(Yes, No, false, false, "", "ں")}, - {0xfba0, 0, 0, 0, g(Yes, No, false, false, "", "ڻ")}, - {0xfba4, 0, 0, 1, g(Yes, No, false, false, "", "ۀ")}, - {0xfba6, 0, 0, 0, g(Yes, No, false, false, "", "ہ")}, - {0xfbaa, 0, 0, 0, g(Yes, No, false, false, "", "ھ")}, - {0xfbae, 0, 0, 0, g(Yes, No, false, false, "", "ے")}, - {0xfbb0, 0, 0, 1, g(Yes, No, false, false, "", "ۓ")}, - {0xfbb2, 0, 0, 0, f(Yes, false, "")}, - {0xfbd3, 0, 0, 0, g(Yes, No, false, false, "", "ڭ")}, - {0xfbd7, 0, 0, 0, g(Yes, No, false, false, "", "ۇ")}, - {0xfbd9, 0, 0, 0, g(Yes, No, false, false, "", "ۆ")}, - {0xfbdb, 0, 0, 0, g(Yes, No, false, false, "", "ۈ")}, - {0xfbdd, 0, 0, 0, g(Yes, No, false, false, "", "ۇٴ")}, - {0xfbde, 0, 0, 0, g(Yes, No, false, false, "", "ۋ")}, - {0xfbe0, 0, 0, 0, g(Yes, No, false, false, "", "ۅ")}, - {0xfbe2, 0, 0, 0, g(Yes, No, false, false, "", "ۉ")}, - {0xfbe4, 0, 0, 0, g(Yes, No, false, false, "", "ې")}, - {0xfbe8, 0, 0, 0, g(Yes, No, false, false, "", "ى")}, - {0xfbea, 0, 0, 0, g(Yes, No, false, false, "", "ئا")}, - {0xfbec, 0, 0, 0, g(Yes, No, false, false, "", "ئە")}, - {0xfbee, 0, 0, 0, g(Yes, No, false, false, "", "ئو")}, - {0xfbf0, 0, 0, 0, g(Yes, No, false, false, "", "ئۇ")}, - {0xfbf2, 0, 0, 0, g(Yes, No, false, false, "", "ئۆ")}, - {0xfbf4, 0, 0, 0, g(Yes, No, false, false, "", "ئۈ")}, - {0xfbf6, 0, 0, 0, g(Yes, No, false, false, "", "ئې")}, - {0xfbf9, 0, 0, 0, g(Yes, No, false, false, "", "ئى")}, - {0xfbfc, 0, 0, 0, g(Yes, No, false, false, "", "ی")}, - {0xfc00, 0, 0, 0, g(Yes, No, false, false, "", "ئج")}, - {0xfc01, 0, 0, 0, g(Yes, No, false, false, "", "ئح")}, - {0xfc02, 0, 0, 0, g(Yes, No, false, false, "", "ئم")}, - {0xfc03, 0, 0, 0, g(Yes, No, false, false, "", "ئى")}, - {0xfc04, 0, 0, 0, g(Yes, No, false, false, "", "ئي")}, - {0xfc05, 0, 0, 0, g(Yes, No, false, false, "", "بج")}, - {0xfc06, 0, 0, 0, g(Yes, No, false, false, "", "بح")}, - {0xfc07, 0, 0, 0, g(Yes, No, false, false, "", "بخ")}, - {0xfc08, 0, 0, 0, g(Yes, No, false, false, "", "بم")}, - {0xfc09, 0, 0, 0, g(Yes, No, false, false, "", "بى")}, - {0xfc0a, 0, 0, 0, g(Yes, No, false, false, "", "بي")}, - {0xfc0b, 0, 0, 0, g(Yes, No, false, false, "", "تج")}, - {0xfc0c, 0, 0, 0, g(Yes, No, false, false, "", "تح")}, - {0xfc0d, 0, 0, 0, g(Yes, No, false, false, "", "تخ")}, - {0xfc0e, 0, 0, 0, g(Yes, No, false, false, "", "تم")}, - {0xfc0f, 0, 0, 0, g(Yes, No, false, false, "", "تى")}, - {0xfc10, 0, 0, 0, g(Yes, No, false, false, "", "تي")}, - {0xfc11, 0, 0, 0, g(Yes, No, false, false, "", "ثج")}, - {0xfc12, 0, 0, 0, g(Yes, No, false, false, "", "ثم")}, - {0xfc13, 0, 0, 0, g(Yes, No, false, false, "", "ثى")}, - {0xfc14, 0, 0, 0, g(Yes, No, false, false, "", "ثي")}, - {0xfc15, 0, 0, 0, g(Yes, No, false, false, "", "جح")}, - {0xfc16, 0, 0, 0, g(Yes, No, false, false, "", "جم")}, - {0xfc17, 0, 0, 0, g(Yes, No, false, false, "", "حج")}, - {0xfc18, 0, 0, 0, g(Yes, No, false, false, "", "حم")}, - {0xfc19, 0, 0, 0, g(Yes, No, false, false, "", "خج")}, - {0xfc1a, 0, 0, 0, g(Yes, No, false, false, "", "خح")}, - {0xfc1b, 0, 0, 0, g(Yes, No, false, false, "", "خم")}, - {0xfc1c, 0, 0, 0, g(Yes, No, false, false, "", "سج")}, - {0xfc1d, 0, 0, 0, g(Yes, No, false, false, "", "سح")}, - {0xfc1e, 0, 0, 0, g(Yes, No, false, false, "", "سخ")}, - {0xfc1f, 0, 0, 0, g(Yes, No, false, false, "", "سم")}, - {0xfc20, 0, 0, 0, g(Yes, No, false, false, "", "صح")}, - {0xfc21, 0, 0, 0, g(Yes, No, false, false, "", "صم")}, - {0xfc22, 0, 0, 0, g(Yes, No, false, false, "", "ضج")}, - {0xfc23, 0, 0, 0, g(Yes, No, false, false, "", "ضح")}, - {0xfc24, 0, 0, 0, g(Yes, No, false, false, "", "ضخ")}, - {0xfc25, 0, 0, 0, g(Yes, No, false, false, "", "ضم")}, - {0xfc26, 0, 0, 0, g(Yes, No, false, false, "", "طح")}, - {0xfc27, 0, 0, 0, g(Yes, No, false, false, "", "طم")}, - {0xfc28, 0, 0, 0, g(Yes, No, false, false, "", "ظم")}, - {0xfc29, 0, 0, 0, g(Yes, No, false, false, "", "عج")}, - {0xfc2a, 0, 0, 0, g(Yes, No, false, false, "", "عم")}, - {0xfc2b, 0, 0, 0, g(Yes, No, false, false, "", "غج")}, - {0xfc2c, 0, 0, 0, g(Yes, No, false, false, "", "غم")}, - {0xfc2d, 0, 0, 0, g(Yes, No, false, false, "", "فج")}, - {0xfc2e, 0, 0, 0, g(Yes, No, false, false, "", "فح")}, - {0xfc2f, 0, 0, 0, g(Yes, No, false, false, "", "فخ")}, - {0xfc30, 0, 0, 0, g(Yes, No, false, false, "", "فم")}, - {0xfc31, 0, 0, 0, g(Yes, No, false, false, "", "فى")}, - {0xfc32, 0, 0, 0, g(Yes, No, false, false, "", "في")}, - {0xfc33, 0, 0, 0, g(Yes, No, false, false, "", "قح")}, - {0xfc34, 0, 0, 0, g(Yes, No, false, false, "", "قم")}, - {0xfc35, 0, 0, 0, g(Yes, No, false, false, "", "قى")}, - {0xfc36, 0, 0, 0, g(Yes, No, false, false, "", "قي")}, - {0xfc37, 0, 0, 0, g(Yes, No, false, false, "", "كا")}, - {0xfc38, 0, 0, 0, g(Yes, No, false, false, "", "كج")}, - {0xfc39, 0, 0, 0, g(Yes, No, false, false, "", "كح")}, - {0xfc3a, 0, 0, 0, g(Yes, No, false, false, "", "كخ")}, - {0xfc3b, 0, 0, 0, g(Yes, No, false, false, "", "كل")}, - {0xfc3c, 0, 0, 0, g(Yes, No, false, false, "", "كم")}, - {0xfc3d, 0, 0, 0, g(Yes, No, false, false, "", "كى")}, - {0xfc3e, 0, 0, 0, g(Yes, No, false, false, "", "كي")}, - {0xfc3f, 0, 0, 0, g(Yes, No, false, false, "", "لج")}, - {0xfc40, 0, 0, 0, g(Yes, No, false, false, "", "لح")}, - {0xfc41, 0, 0, 0, g(Yes, No, false, false, "", "لخ")}, - {0xfc42, 0, 0, 0, g(Yes, No, false, false, "", "لم")}, - {0xfc43, 0, 0, 0, g(Yes, No, false, false, "", "لى")}, - {0xfc44, 0, 0, 0, g(Yes, No, false, false, "", "لي")}, - {0xfc45, 0, 0, 0, g(Yes, No, false, false, "", "مج")}, - {0xfc46, 0, 0, 0, g(Yes, No, false, false, "", "مح")}, - {0xfc47, 0, 0, 0, g(Yes, No, false, false, "", "مخ")}, - {0xfc48, 0, 0, 0, g(Yes, No, false, false, "", "مم")}, - {0xfc49, 0, 0, 0, g(Yes, No, false, false, "", "مى")}, - {0xfc4a, 0, 0, 0, g(Yes, No, false, false, "", "مي")}, - {0xfc4b, 0, 0, 0, g(Yes, No, false, false, "", "نج")}, - {0xfc4c, 0, 0, 0, g(Yes, No, false, false, "", "نح")}, - {0xfc4d, 0, 0, 0, g(Yes, No, false, false, "", "نخ")}, - {0xfc4e, 0, 0, 0, g(Yes, No, false, false, "", "نم")}, - {0xfc4f, 0, 0, 0, g(Yes, No, false, false, "", "نى")}, - {0xfc50, 0, 0, 0, g(Yes, No, false, false, "", "ني")}, - {0xfc51, 0, 0, 0, g(Yes, No, false, false, "", "هج")}, - {0xfc52, 0, 0, 0, g(Yes, No, false, false, "", "هم")}, - {0xfc53, 0, 0, 0, g(Yes, No, false, false, "", "هى")}, - {0xfc54, 0, 0, 0, g(Yes, No, false, false, "", "هي")}, - {0xfc55, 0, 0, 0, g(Yes, No, false, false, "", "يج")}, - {0xfc56, 0, 0, 0, g(Yes, No, false, false, "", "يح")}, - {0xfc57, 0, 0, 0, g(Yes, No, false, false, "", "يخ")}, - {0xfc58, 0, 0, 0, g(Yes, No, false, false, "", "يم")}, - {0xfc59, 0, 0, 0, g(Yes, No, false, false, "", "يى")}, - {0xfc5a, 0, 0, 0, g(Yes, No, false, false, "", "يي")}, - {0xfc5b, 0, 0, 1, g(Yes, No, false, false, "", "ذٰ")}, - {0xfc5c, 0, 0, 1, g(Yes, No, false, false, "", "رٰ")}, - {0xfc5d, 0, 0, 1, g(Yes, No, false, false, "", "ىٰ")}, - {0xfc5e, 0, 0, 2, g(Yes, No, false, false, "", " ٌّ")}, - {0xfc5f, 0, 0, 2, g(Yes, No, false, false, "", " ٍّ")}, - {0xfc60, 0, 0, 2, g(Yes, No, false, false, "", " َّ")}, - {0xfc61, 0, 0, 2, g(Yes, No, false, false, "", " ُّ")}, - {0xfc62, 0, 0, 2, g(Yes, No, false, false, "", " ِّ")}, - {0xfc63, 0, 0, 2, g(Yes, No, false, false, "", " ّٰ")}, - {0xfc64, 0, 0, 0, g(Yes, No, false, false, "", "ئر")}, - {0xfc65, 0, 0, 0, g(Yes, No, false, false, "", "ئز")}, - {0xfc66, 0, 0, 0, g(Yes, No, false, false, "", "ئم")}, - {0xfc67, 0, 0, 0, g(Yes, No, false, false, "", "ئن")}, - {0xfc68, 0, 0, 0, g(Yes, No, false, false, "", "ئى")}, - {0xfc69, 0, 0, 0, g(Yes, No, false, false, "", "ئي")}, - {0xfc6a, 0, 0, 0, g(Yes, No, false, false, "", "بر")}, - {0xfc6b, 0, 0, 0, g(Yes, No, false, false, "", "بز")}, - {0xfc6c, 0, 0, 0, g(Yes, No, false, false, "", "بم")}, - {0xfc6d, 0, 0, 0, g(Yes, No, false, false, "", "بن")}, - {0xfc6e, 0, 0, 0, g(Yes, No, false, false, "", "بى")}, - {0xfc6f, 0, 0, 0, g(Yes, No, false, false, "", "بي")}, - {0xfc70, 0, 0, 0, g(Yes, No, false, false, "", "تر")}, - {0xfc71, 0, 0, 0, g(Yes, No, false, false, "", "تز")}, - {0xfc72, 0, 0, 0, g(Yes, No, false, false, "", "تم")}, - {0xfc73, 0, 0, 0, g(Yes, No, false, false, "", "تن")}, - {0xfc74, 0, 0, 0, g(Yes, No, false, false, "", "تى")}, - {0xfc75, 0, 0, 0, g(Yes, No, false, false, "", "تي")}, - {0xfc76, 0, 0, 0, g(Yes, No, false, false, "", "ثر")}, - {0xfc77, 0, 0, 0, g(Yes, No, false, false, "", "ثز")}, - {0xfc78, 0, 0, 0, g(Yes, No, false, false, "", "ثم")}, - {0xfc79, 0, 0, 0, g(Yes, No, false, false, "", "ثن")}, - {0xfc7a, 0, 0, 0, g(Yes, No, false, false, "", "ثى")}, - {0xfc7b, 0, 0, 0, g(Yes, No, false, false, "", "ثي")}, - {0xfc7c, 0, 0, 0, g(Yes, No, false, false, "", "فى")}, - {0xfc7d, 0, 0, 0, g(Yes, No, false, false, "", "في")}, - {0xfc7e, 0, 0, 0, g(Yes, No, false, false, "", "قى")}, - {0xfc7f, 0, 0, 0, g(Yes, No, false, false, "", "قي")}, - {0xfc80, 0, 0, 0, g(Yes, No, false, false, "", "كا")}, - {0xfc81, 0, 0, 0, g(Yes, No, false, false, "", "كل")}, - {0xfc82, 0, 0, 0, g(Yes, No, false, false, "", "كم")}, - {0xfc83, 0, 0, 0, g(Yes, No, false, false, "", "كى")}, - {0xfc84, 0, 0, 0, g(Yes, No, false, false, "", "كي")}, - {0xfc85, 0, 0, 0, g(Yes, No, false, false, "", "لم")}, - {0xfc86, 0, 0, 0, g(Yes, No, false, false, "", "لى")}, - {0xfc87, 0, 0, 0, g(Yes, No, false, false, "", "لي")}, - {0xfc88, 0, 0, 0, g(Yes, No, false, false, "", "ما")}, - {0xfc89, 0, 0, 0, g(Yes, No, false, false, "", "مم")}, - {0xfc8a, 0, 0, 0, g(Yes, No, false, false, "", "نر")}, - {0xfc8b, 0, 0, 0, g(Yes, No, false, false, "", "نز")}, - {0xfc8c, 0, 0, 0, g(Yes, No, false, false, "", "نم")}, - {0xfc8d, 0, 0, 0, g(Yes, No, false, false, "", "نن")}, - {0xfc8e, 0, 0, 0, g(Yes, No, false, false, "", "نى")}, - {0xfc8f, 0, 0, 0, g(Yes, No, false, false, "", "ني")}, - {0xfc90, 0, 0, 1, g(Yes, No, false, false, "", "ىٰ")}, - {0xfc91, 0, 0, 0, g(Yes, No, false, false, "", "ير")}, - {0xfc92, 0, 0, 0, g(Yes, No, false, false, "", "يز")}, - {0xfc93, 0, 0, 0, g(Yes, No, false, false, "", "يم")}, - {0xfc94, 0, 0, 0, g(Yes, No, false, false, "", "ين")}, - {0xfc95, 0, 0, 0, g(Yes, No, false, false, "", "يى")}, - {0xfc96, 0, 0, 0, g(Yes, No, false, false, "", "يي")}, - {0xfc97, 0, 0, 0, g(Yes, No, false, false, "", "ئج")}, - {0xfc98, 0, 0, 0, g(Yes, No, false, false, "", "ئح")}, - {0xfc99, 0, 0, 0, g(Yes, No, false, false, "", "ئخ")}, - {0xfc9a, 0, 0, 0, g(Yes, No, false, false, "", "ئم")}, - {0xfc9b, 0, 0, 0, g(Yes, No, false, false, "", "ئه")}, - {0xfc9c, 0, 0, 0, g(Yes, No, false, false, "", "بج")}, - {0xfc9d, 0, 0, 0, g(Yes, No, false, false, "", "بح")}, - {0xfc9e, 0, 0, 0, g(Yes, No, false, false, "", "بخ")}, - {0xfc9f, 0, 0, 0, g(Yes, No, false, false, "", "بم")}, - {0xfca0, 0, 0, 0, g(Yes, No, false, false, "", "به")}, - {0xfca1, 0, 0, 0, g(Yes, No, false, false, "", "تج")}, - {0xfca2, 0, 0, 0, g(Yes, No, false, false, "", "تح")}, - {0xfca3, 0, 0, 0, g(Yes, No, false, false, "", "تخ")}, - {0xfca4, 0, 0, 0, g(Yes, No, false, false, "", "تم")}, - {0xfca5, 0, 0, 0, g(Yes, No, false, false, "", "ته")}, - {0xfca6, 0, 0, 0, g(Yes, No, false, false, "", "ثم")}, - {0xfca7, 0, 0, 0, g(Yes, No, false, false, "", "جح")}, - {0xfca8, 0, 0, 0, g(Yes, No, false, false, "", "جم")}, - {0xfca9, 0, 0, 0, g(Yes, No, false, false, "", "حج")}, - {0xfcaa, 0, 0, 0, g(Yes, No, false, false, "", "حم")}, - {0xfcab, 0, 0, 0, g(Yes, No, false, false, "", "خج")}, - {0xfcac, 0, 0, 0, g(Yes, No, false, false, "", "خم")}, - {0xfcad, 0, 0, 0, g(Yes, No, false, false, "", "سج")}, - {0xfcae, 0, 0, 0, g(Yes, No, false, false, "", "سح")}, - {0xfcaf, 0, 0, 0, g(Yes, No, false, false, "", "سخ")}, - {0xfcb0, 0, 0, 0, g(Yes, No, false, false, "", "سم")}, - {0xfcb1, 0, 0, 0, g(Yes, No, false, false, "", "صح")}, - {0xfcb2, 0, 0, 0, g(Yes, No, false, false, "", "صخ")}, - {0xfcb3, 0, 0, 0, g(Yes, No, false, false, "", "صم")}, - {0xfcb4, 0, 0, 0, g(Yes, No, false, false, "", "ضج")}, - {0xfcb5, 0, 0, 0, g(Yes, No, false, false, "", "ضح")}, - {0xfcb6, 0, 0, 0, g(Yes, No, false, false, "", "ضخ")}, - {0xfcb7, 0, 0, 0, g(Yes, No, false, false, "", "ضم")}, - {0xfcb8, 0, 0, 0, g(Yes, No, false, false, "", "طح")}, - {0xfcb9, 0, 0, 0, g(Yes, No, false, false, "", "ظم")}, - {0xfcba, 0, 0, 0, g(Yes, No, false, false, "", "عج")}, - {0xfcbb, 0, 0, 0, g(Yes, No, false, false, "", "عم")}, - {0xfcbc, 0, 0, 0, g(Yes, No, false, false, "", "غج")}, - {0xfcbd, 0, 0, 0, g(Yes, No, false, false, "", "غم")}, - {0xfcbe, 0, 0, 0, g(Yes, No, false, false, "", "فج")}, - {0xfcbf, 0, 0, 0, g(Yes, No, false, false, "", "فح")}, - {0xfcc0, 0, 0, 0, g(Yes, No, false, false, "", "فخ")}, - {0xfcc1, 0, 0, 0, g(Yes, No, false, false, "", "فم")}, - {0xfcc2, 0, 0, 0, g(Yes, No, false, false, "", "قح")}, - {0xfcc3, 0, 0, 0, g(Yes, No, false, false, "", "قم")}, - {0xfcc4, 0, 0, 0, g(Yes, No, false, false, "", "كج")}, - {0xfcc5, 0, 0, 0, g(Yes, No, false, false, "", "كح")}, - {0xfcc6, 0, 0, 0, g(Yes, No, false, false, "", "كخ")}, - {0xfcc7, 0, 0, 0, g(Yes, No, false, false, "", "كل")}, - {0xfcc8, 0, 0, 0, g(Yes, No, false, false, "", "كم")}, - {0xfcc9, 0, 0, 0, g(Yes, No, false, false, "", "لج")}, - {0xfcca, 0, 0, 0, g(Yes, No, false, false, "", "لح")}, - {0xfccb, 0, 0, 0, g(Yes, No, false, false, "", "لخ")}, - {0xfccc, 0, 0, 0, g(Yes, No, false, false, "", "لم")}, - {0xfccd, 0, 0, 0, g(Yes, No, false, false, "", "له")}, - {0xfcce, 0, 0, 0, g(Yes, No, false, false, "", "مج")}, - {0xfccf, 0, 0, 0, g(Yes, No, false, false, "", "مح")}, - {0xfcd0, 0, 0, 0, g(Yes, No, false, false, "", "مخ")}, - {0xfcd1, 0, 0, 0, g(Yes, No, false, false, "", "مم")}, - {0xfcd2, 0, 0, 0, g(Yes, No, false, false, "", "نج")}, - {0xfcd3, 0, 0, 0, g(Yes, No, false, false, "", "نح")}, - {0xfcd4, 0, 0, 0, g(Yes, No, false, false, "", "نخ")}, - {0xfcd5, 0, 0, 0, g(Yes, No, false, false, "", "نم")}, - {0xfcd6, 0, 0, 0, g(Yes, No, false, false, "", "نه")}, - {0xfcd7, 0, 0, 0, g(Yes, No, false, false, "", "هج")}, - {0xfcd8, 0, 0, 0, g(Yes, No, false, false, "", "هم")}, - {0xfcd9, 0, 0, 1, g(Yes, No, false, false, "", "هٰ")}, - {0xfcda, 0, 0, 0, g(Yes, No, false, false, "", "يج")}, - {0xfcdb, 0, 0, 0, g(Yes, No, false, false, "", "يح")}, - {0xfcdc, 0, 0, 0, g(Yes, No, false, false, "", "يخ")}, - {0xfcdd, 0, 0, 0, g(Yes, No, false, false, "", "يم")}, - {0xfcde, 0, 0, 0, g(Yes, No, false, false, "", "يه")}, - {0xfcdf, 0, 0, 0, g(Yes, No, false, false, "", "ئم")}, - {0xfce0, 0, 0, 0, g(Yes, No, false, false, "", "ئه")}, - {0xfce1, 0, 0, 0, g(Yes, No, false, false, "", "بم")}, - {0xfce2, 0, 0, 0, g(Yes, No, false, false, "", "به")}, - {0xfce3, 0, 0, 0, g(Yes, No, false, false, "", "تم")}, - {0xfce4, 0, 0, 0, g(Yes, No, false, false, "", "ته")}, - {0xfce5, 0, 0, 0, g(Yes, No, false, false, "", "ثم")}, - {0xfce6, 0, 0, 0, g(Yes, No, false, false, "", "ثه")}, - {0xfce7, 0, 0, 0, g(Yes, No, false, false, "", "سم")}, - {0xfce8, 0, 0, 0, g(Yes, No, false, false, "", "سه")}, - {0xfce9, 0, 0, 0, g(Yes, No, false, false, "", "شم")}, - {0xfcea, 0, 0, 0, g(Yes, No, false, false, "", "شه")}, - {0xfceb, 0, 0, 0, g(Yes, No, false, false, "", "كل")}, - {0xfcec, 0, 0, 0, g(Yes, No, false, false, "", "كم")}, - {0xfced, 0, 0, 0, g(Yes, No, false, false, "", "لم")}, - {0xfcee, 0, 0, 0, g(Yes, No, false, false, "", "نم")}, - {0xfcef, 0, 0, 0, g(Yes, No, false, false, "", "نه")}, - {0xfcf0, 0, 0, 0, g(Yes, No, false, false, "", "يم")}, - {0xfcf1, 0, 0, 0, g(Yes, No, false, false, "", "يه")}, - {0xfcf2, 0, 0, 2, g(Yes, No, false, false, "", "ـَّ")}, - {0xfcf3, 0, 0, 2, g(Yes, No, false, false, "", "ـُّ")}, - {0xfcf4, 0, 0, 2, g(Yes, No, false, false, "", "ـِّ")}, - {0xfcf5, 0, 0, 0, g(Yes, No, false, false, "", "طى")}, - {0xfcf6, 0, 0, 0, g(Yes, No, false, false, "", "طي")}, - {0xfcf7, 0, 0, 0, g(Yes, No, false, false, "", "عى")}, - {0xfcf8, 0, 0, 0, g(Yes, No, false, false, "", "عي")}, - {0xfcf9, 0, 0, 0, g(Yes, No, false, false, "", "غى")}, - {0xfcfa, 0, 0, 0, g(Yes, No, false, false, "", "غي")}, - {0xfcfb, 0, 0, 0, g(Yes, No, false, false, "", "سى")}, - {0xfcfc, 0, 0, 0, g(Yes, No, false, false, "", "سي")}, - {0xfcfd, 0, 0, 0, g(Yes, No, false, false, "", "شى")}, - {0xfcfe, 0, 0, 0, g(Yes, No, false, false, "", "شي")}, - {0xfcff, 0, 0, 0, g(Yes, No, false, false, "", "حى")}, - {0xfd00, 0, 0, 0, g(Yes, No, false, false, "", "حي")}, - {0xfd01, 0, 0, 0, g(Yes, No, false, false, "", "جى")}, - {0xfd02, 0, 0, 0, g(Yes, No, false, false, "", "جي")}, - {0xfd03, 0, 0, 0, g(Yes, No, false, false, "", "خى")}, - {0xfd04, 0, 0, 0, g(Yes, No, false, false, "", "خي")}, - {0xfd05, 0, 0, 0, g(Yes, No, false, false, "", "صى")}, - {0xfd06, 0, 0, 0, g(Yes, No, false, false, "", "صي")}, - {0xfd07, 0, 0, 0, g(Yes, No, false, false, "", "ضى")}, - {0xfd08, 0, 0, 0, g(Yes, No, false, false, "", "ضي")}, - {0xfd09, 0, 0, 0, g(Yes, No, false, false, "", "شج")}, - {0xfd0a, 0, 0, 0, g(Yes, No, false, false, "", "شح")}, - {0xfd0b, 0, 0, 0, g(Yes, No, false, false, "", "شخ")}, - {0xfd0c, 0, 0, 0, g(Yes, No, false, false, "", "شم")}, - {0xfd0d, 0, 0, 0, g(Yes, No, false, false, "", "شر")}, - {0xfd0e, 0, 0, 0, g(Yes, No, false, false, "", "سر")}, - {0xfd0f, 0, 0, 0, g(Yes, No, false, false, "", "صر")}, - {0xfd10, 0, 0, 0, g(Yes, No, false, false, "", "ضر")}, - {0xfd11, 0, 0, 0, g(Yes, No, false, false, "", "طى")}, - {0xfd12, 0, 0, 0, g(Yes, No, false, false, "", "طي")}, - {0xfd13, 0, 0, 0, g(Yes, No, false, false, "", "عى")}, - {0xfd14, 0, 0, 0, g(Yes, No, false, false, "", "عي")}, - {0xfd15, 0, 0, 0, g(Yes, No, false, false, "", "غى")}, - {0xfd16, 0, 0, 0, g(Yes, No, false, false, "", "غي")}, - {0xfd17, 0, 0, 0, g(Yes, No, false, false, "", "سى")}, - {0xfd18, 0, 0, 0, g(Yes, No, false, false, "", "سي")}, - {0xfd19, 0, 0, 0, g(Yes, No, false, false, "", "شى")}, - {0xfd1a, 0, 0, 0, g(Yes, No, false, false, "", "شي")}, - {0xfd1b, 0, 0, 0, g(Yes, No, false, false, "", "حى")}, - {0xfd1c, 0, 0, 0, g(Yes, No, false, false, "", "حي")}, - {0xfd1d, 0, 0, 0, g(Yes, No, false, false, "", "جى")}, - {0xfd1e, 0, 0, 0, g(Yes, No, false, false, "", "جي")}, - {0xfd1f, 0, 0, 0, g(Yes, No, false, false, "", "خى")}, - {0xfd20, 0, 0, 0, g(Yes, No, false, false, "", "خي")}, - {0xfd21, 0, 0, 0, g(Yes, No, false, false, "", "صى")}, - {0xfd22, 0, 0, 0, g(Yes, No, false, false, "", "صي")}, - {0xfd23, 0, 0, 0, g(Yes, No, false, false, "", "ضى")}, - {0xfd24, 0, 0, 0, g(Yes, No, false, false, "", "ضي")}, - {0xfd25, 0, 0, 0, g(Yes, No, false, false, "", "شج")}, - {0xfd26, 0, 0, 0, g(Yes, No, false, false, "", "شح")}, - {0xfd27, 0, 0, 0, g(Yes, No, false, false, "", "شخ")}, - {0xfd28, 0, 0, 0, g(Yes, No, false, false, "", "شم")}, - {0xfd29, 0, 0, 0, g(Yes, No, false, false, "", "شر")}, - {0xfd2a, 0, 0, 0, g(Yes, No, false, false, "", "سر")}, - {0xfd2b, 0, 0, 0, g(Yes, No, false, false, "", "صر")}, - {0xfd2c, 0, 0, 0, g(Yes, No, false, false, "", "ضر")}, - {0xfd2d, 0, 0, 0, g(Yes, No, false, false, "", "شج")}, - {0xfd2e, 0, 0, 0, g(Yes, No, false, false, "", "شح")}, - {0xfd2f, 0, 0, 0, g(Yes, No, false, false, "", "شخ")}, - {0xfd30, 0, 0, 0, g(Yes, No, false, false, "", "شم")}, - {0xfd31, 0, 0, 0, g(Yes, No, false, false, "", "سه")}, - {0xfd32, 0, 0, 0, g(Yes, No, false, false, "", "شه")}, - {0xfd33, 0, 0, 0, g(Yes, No, false, false, "", "طم")}, - {0xfd34, 0, 0, 0, g(Yes, No, false, false, "", "سج")}, - {0xfd35, 0, 0, 0, g(Yes, No, false, false, "", "سح")}, - {0xfd36, 0, 0, 0, g(Yes, No, false, false, "", "سخ")}, - {0xfd37, 0, 0, 0, g(Yes, No, false, false, "", "شج")}, - {0xfd38, 0, 0, 0, g(Yes, No, false, false, "", "شح")}, - {0xfd39, 0, 0, 0, g(Yes, No, false, false, "", "شخ")}, - {0xfd3a, 0, 0, 0, g(Yes, No, false, false, "", "طم")}, - {0xfd3b, 0, 0, 0, g(Yes, No, false, false, "", "ظم")}, - {0xfd3c, 0, 0, 1, g(Yes, No, false, false, "", "اً")}, - {0xfd3e, 0, 0, 0, f(Yes, false, "")}, - {0xfd50, 0, 0, 0, g(Yes, No, false, false, "", "تجم")}, - {0xfd51, 0, 0, 0, g(Yes, No, false, false, "", "تحج")}, - {0xfd53, 0, 0, 0, g(Yes, No, false, false, "", "تحم")}, - {0xfd54, 0, 0, 0, g(Yes, No, false, false, "", "تخم")}, - {0xfd55, 0, 0, 0, g(Yes, No, false, false, "", "تمج")}, - {0xfd56, 0, 0, 0, g(Yes, No, false, false, "", "تمح")}, - {0xfd57, 0, 0, 0, g(Yes, No, false, false, "", "تمخ")}, - {0xfd58, 0, 0, 0, g(Yes, No, false, false, "", "جمح")}, - {0xfd5a, 0, 0, 0, g(Yes, No, false, false, "", "حمي")}, - {0xfd5b, 0, 0, 0, g(Yes, No, false, false, "", "حمى")}, - {0xfd5c, 0, 0, 0, g(Yes, No, false, false, "", "سحج")}, - {0xfd5d, 0, 0, 0, g(Yes, No, false, false, "", "سجح")}, - {0xfd5e, 0, 0, 0, g(Yes, No, false, false, "", "سجى")}, - {0xfd5f, 0, 0, 0, g(Yes, No, false, false, "", "سمح")}, - {0xfd61, 0, 0, 0, g(Yes, No, false, false, "", "سمج")}, - {0xfd62, 0, 0, 0, g(Yes, No, false, false, "", "سمم")}, - {0xfd64, 0, 0, 0, g(Yes, No, false, false, "", "صحح")}, - {0xfd66, 0, 0, 0, g(Yes, No, false, false, "", "صمم")}, - {0xfd67, 0, 0, 0, g(Yes, No, false, false, "", "شحم")}, - {0xfd69, 0, 0, 0, g(Yes, No, false, false, "", "شجي")}, - {0xfd6a, 0, 0, 0, g(Yes, No, false, false, "", "شمخ")}, - {0xfd6c, 0, 0, 0, g(Yes, No, false, false, "", "شمم")}, - {0xfd6e, 0, 0, 0, g(Yes, No, false, false, "", "ضحى")}, - {0xfd6f, 0, 0, 0, g(Yes, No, false, false, "", "ضخم")}, - {0xfd71, 0, 0, 0, g(Yes, No, false, false, "", "طمح")}, - {0xfd73, 0, 0, 0, g(Yes, No, false, false, "", "طمم")}, - {0xfd74, 0, 0, 0, g(Yes, No, false, false, "", "طمي")}, - {0xfd75, 0, 0, 0, g(Yes, No, false, false, "", "عجم")}, - {0xfd76, 0, 0, 0, g(Yes, No, false, false, "", "عمم")}, - {0xfd78, 0, 0, 0, g(Yes, No, false, false, "", "عمى")}, - {0xfd79, 0, 0, 0, g(Yes, No, false, false, "", "غمم")}, - {0xfd7a, 0, 0, 0, g(Yes, No, false, false, "", "غمي")}, - {0xfd7b, 0, 0, 0, g(Yes, No, false, false, "", "غمى")}, - {0xfd7c, 0, 0, 0, g(Yes, No, false, false, "", "فخم")}, - {0xfd7e, 0, 0, 0, g(Yes, No, false, false, "", "قمح")}, - {0xfd7f, 0, 0, 0, g(Yes, No, false, false, "", "قمم")}, - {0xfd80, 0, 0, 0, g(Yes, No, false, false, "", "لحم")}, - {0xfd81, 0, 0, 0, g(Yes, No, false, false, "", "لحي")}, - {0xfd82, 0, 0, 0, g(Yes, No, false, false, "", "لحى")}, - {0xfd83, 0, 0, 0, g(Yes, No, false, false, "", "لجج")}, - {0xfd85, 0, 0, 0, g(Yes, No, false, false, "", "لخم")}, - {0xfd87, 0, 0, 0, g(Yes, No, false, false, "", "لمح")}, - {0xfd89, 0, 0, 0, g(Yes, No, false, false, "", "محج")}, - {0xfd8a, 0, 0, 0, g(Yes, No, false, false, "", "محم")}, - {0xfd8b, 0, 0, 0, g(Yes, No, false, false, "", "محي")}, - {0xfd8c, 0, 0, 0, g(Yes, No, false, false, "", "مجح")}, - {0xfd8d, 0, 0, 0, g(Yes, No, false, false, "", "مجم")}, - {0xfd8e, 0, 0, 0, g(Yes, No, false, false, "", "مخج")}, - {0xfd8f, 0, 0, 0, g(Yes, No, false, false, "", "مخم")}, - {0xfd90, 0, 0, 0, f(Yes, false, "")}, - {0xfd92, 0, 0, 0, g(Yes, No, false, false, "", "مجخ")}, - {0xfd93, 0, 0, 0, g(Yes, No, false, false, "", "همج")}, - {0xfd94, 0, 0, 0, g(Yes, No, false, false, "", "همم")}, - {0xfd95, 0, 0, 0, g(Yes, No, false, false, "", "نحم")}, - {0xfd96, 0, 0, 0, g(Yes, No, false, false, "", "نحى")}, - {0xfd97, 0, 0, 0, g(Yes, No, false, false, "", "نجم")}, - {0xfd99, 0, 0, 0, g(Yes, No, false, false, "", "نجى")}, - {0xfd9a, 0, 0, 0, g(Yes, No, false, false, "", "نمي")}, - {0xfd9b, 0, 0, 0, g(Yes, No, false, false, "", "نمى")}, - {0xfd9c, 0, 0, 0, g(Yes, No, false, false, "", "يمم")}, - {0xfd9e, 0, 0, 0, g(Yes, No, false, false, "", "بخي")}, - {0xfd9f, 0, 0, 0, g(Yes, No, false, false, "", "تجي")}, - {0xfda0, 0, 0, 0, g(Yes, No, false, false, "", "تجى")}, - {0xfda1, 0, 0, 0, g(Yes, No, false, false, "", "تخي")}, - {0xfda2, 0, 0, 0, g(Yes, No, false, false, "", "تخى")}, - {0xfda3, 0, 0, 0, g(Yes, No, false, false, "", "تمي")}, - {0xfda4, 0, 0, 0, g(Yes, No, false, false, "", "تمى")}, - {0xfda5, 0, 0, 0, g(Yes, No, false, false, "", "جمي")}, - {0xfda6, 0, 0, 0, g(Yes, No, false, false, "", "جحى")}, - {0xfda7, 0, 0, 0, g(Yes, No, false, false, "", "جمى")}, - {0xfda8, 0, 0, 0, g(Yes, No, false, false, "", "سخى")}, - {0xfda9, 0, 0, 0, g(Yes, No, false, false, "", "صحي")}, - {0xfdaa, 0, 0, 0, g(Yes, No, false, false, "", "شحي")}, - {0xfdab, 0, 0, 0, g(Yes, No, false, false, "", "ضحي")}, - {0xfdac, 0, 0, 0, g(Yes, No, false, false, "", "لجي")}, - {0xfdad, 0, 0, 0, g(Yes, No, false, false, "", "لمي")}, - {0xfdae, 0, 0, 0, g(Yes, No, false, false, "", "يحي")}, - {0xfdaf, 0, 0, 0, g(Yes, No, false, false, "", "يجي")}, - {0xfdb0, 0, 0, 0, g(Yes, No, false, false, "", "يمي")}, - {0xfdb1, 0, 0, 0, g(Yes, No, false, false, "", "ممي")}, - {0xfdb2, 0, 0, 0, g(Yes, No, false, false, "", "قمي")}, - {0xfdb3, 0, 0, 0, g(Yes, No, false, false, "", "نحي")}, - {0xfdb4, 0, 0, 0, g(Yes, No, false, false, "", "قمح")}, - {0xfdb5, 0, 0, 0, g(Yes, No, false, false, "", "لحم")}, - {0xfdb6, 0, 0, 0, g(Yes, No, false, false, "", "عمي")}, - {0xfdb7, 0, 0, 0, g(Yes, No, false, false, "", "كمي")}, - {0xfdb8, 0, 0, 0, g(Yes, No, false, false, "", "نجح")}, - {0xfdb9, 0, 0, 0, g(Yes, No, false, false, "", "مخي")}, - {0xfdba, 0, 0, 0, g(Yes, No, false, false, "", "لجم")}, - {0xfdbb, 0, 0, 0, g(Yes, No, false, false, "", "كمم")}, - {0xfdbc, 0, 0, 0, g(Yes, No, false, false, "", "لجم")}, - {0xfdbd, 0, 0, 0, g(Yes, No, false, false, "", "نجح")}, - {0xfdbe, 0, 0, 0, g(Yes, No, false, false, "", "جحي")}, - {0xfdbf, 0, 0, 0, g(Yes, No, false, false, "", "حجي")}, - {0xfdc0, 0, 0, 0, g(Yes, No, false, false, "", "مجي")}, - {0xfdc1, 0, 0, 0, g(Yes, No, false, false, "", "فمي")}, - {0xfdc2, 0, 0, 0, g(Yes, No, false, false, "", "بحي")}, - {0xfdc3, 0, 0, 0, g(Yes, No, false, false, "", "كمم")}, - {0xfdc4, 0, 0, 0, g(Yes, No, false, false, "", "عجم")}, - {0xfdc5, 0, 0, 0, g(Yes, No, false, false, "", "صمم")}, - {0xfdc6, 0, 0, 0, g(Yes, No, false, false, "", "سخي")}, - {0xfdc7, 0, 0, 0, g(Yes, No, false, false, "", "نجي")}, - {0xfdc8, 0, 0, 0, f(Yes, false, "")}, - {0xfdf0, 0, 0, 0, g(Yes, No, false, false, "", "صلے")}, - {0xfdf1, 0, 0, 0, g(Yes, No, false, false, "", "قلے")}, - {0xfdf2, 0, 0, 0, g(Yes, No, false, false, "", "الله")}, - {0xfdf3, 0, 0, 0, g(Yes, No, false, false, "", "اكبر")}, - {0xfdf4, 0, 0, 0, g(Yes, No, false, false, "", "محمد")}, - {0xfdf5, 0, 0, 0, g(Yes, No, false, false, "", "صلعم")}, - {0xfdf6, 0, 0, 0, g(Yes, No, false, false, "", "رسول")}, - {0xfdf7, 0, 0, 0, g(Yes, No, false, false, "", "عليه")}, - {0xfdf8, 0, 0, 0, g(Yes, No, false, false, "", "وسلم")}, - {0xfdf9, 0, 0, 0, g(Yes, No, false, false, "", "صلى")}, - {0xfdfa, 0, 0, 0, g(Yes, No, false, false, "", "صلى الله عليه وسلم")}, - {0xfdfb, 0, 0, 0, g(Yes, No, false, false, "", "جل جلاله")}, - {0xfdfc, 0, 0, 0, g(Yes, No, false, false, "", "ریال")}, - {0xfdfd, 0, 0, 0, f(Yes, false, "")}, - {0xfe10, 0, 0, 0, g(Yes, No, false, false, "", ",")}, - {0xfe11, 0, 0, 0, g(Yes, No, false, false, "", "、")}, - {0xfe12, 0, 0, 0, g(Yes, No, false, false, "", "。")}, - {0xfe13, 0, 0, 0, g(Yes, No, false, false, "", ":")}, - {0xfe14, 0, 0, 0, g(Yes, No, false, false, "", ";")}, - {0xfe15, 0, 0, 0, g(Yes, No, false, false, "", "!")}, - {0xfe16, 0, 0, 0, g(Yes, No, false, false, "", "?")}, - {0xfe17, 0, 0, 0, g(Yes, No, false, false, "", "〖")}, - {0xfe18, 0, 0, 0, g(Yes, No, false, false, "", "〗")}, - {0xfe19, 0, 0, 0, g(Yes, No, false, false, "", "...")}, - {0xfe1a, 0, 0, 0, f(Yes, false, "")}, - {0xfe20, 230, 1, 1, f(Yes, false, "")}, - {0xfe27, 220, 1, 1, f(Yes, false, "")}, - {0xfe2e, 230, 1, 1, f(Yes, false, "")}, - {0xfe30, 0, 0, 0, g(Yes, No, false, false, "", "..")}, - {0xfe31, 0, 0, 0, g(Yes, No, false, false, "", "—")}, - {0xfe32, 0, 0, 0, g(Yes, No, false, false, "", "–")}, - {0xfe33, 0, 0, 0, g(Yes, No, false, false, "", "_")}, - {0xfe35, 0, 0, 0, g(Yes, No, false, false, "", "(")}, - {0xfe36, 0, 0, 0, g(Yes, No, false, false, "", ")")}, - {0xfe37, 0, 0, 0, g(Yes, No, false, false, "", "{")}, - {0xfe38, 0, 0, 0, g(Yes, No, false, false, "", "}")}, - {0xfe39, 0, 0, 0, g(Yes, No, false, false, "", "〔")}, - {0xfe3a, 0, 0, 0, g(Yes, No, false, false, "", "〕")}, - {0xfe3b, 0, 0, 0, g(Yes, No, false, false, "", "【")}, - {0xfe3c, 0, 0, 0, g(Yes, No, false, false, "", "】")}, - {0xfe3d, 0, 0, 0, g(Yes, No, false, false, "", "《")}, - {0xfe3e, 0, 0, 0, g(Yes, No, false, false, "", "》")}, - {0xfe3f, 0, 0, 0, g(Yes, No, false, false, "", "〈")}, - {0xfe40, 0, 0, 0, g(Yes, No, false, false, "", "〉")}, - {0xfe41, 0, 0, 0, g(Yes, No, false, false, "", "「")}, - {0xfe42, 0, 0, 0, g(Yes, No, false, false, "", "」")}, - {0xfe43, 0, 0, 0, g(Yes, No, false, false, "", "『")}, - {0xfe44, 0, 0, 0, g(Yes, No, false, false, "", "』")}, - {0xfe45, 0, 0, 0, f(Yes, false, "")}, - {0xfe47, 0, 0, 0, g(Yes, No, false, false, "", "[")}, - {0xfe48, 0, 0, 0, g(Yes, No, false, false, "", "]")}, - {0xfe49, 0, 0, 1, g(Yes, No, false, false, "", " ̅")}, - {0xfe4d, 0, 0, 0, g(Yes, No, false, false, "", "_")}, - {0xfe50, 0, 0, 0, g(Yes, No, false, false, "", ",")}, - {0xfe51, 0, 0, 0, g(Yes, No, false, false, "", "、")}, - {0xfe52, 0, 0, 0, g(Yes, No, false, false, "", ".")}, - {0xfe53, 0, 0, 0, f(Yes, false, "")}, - {0xfe54, 0, 0, 0, g(Yes, No, false, false, "", ";")}, - {0xfe55, 0, 0, 0, g(Yes, No, false, false, "", ":")}, - {0xfe56, 0, 0, 0, g(Yes, No, false, false, "", "?")}, - {0xfe57, 0, 0, 0, g(Yes, No, false, false, "", "!")}, - {0xfe58, 0, 0, 0, g(Yes, No, false, false, "", "—")}, - {0xfe59, 0, 0, 0, g(Yes, No, false, false, "", "(")}, - {0xfe5a, 0, 0, 0, g(Yes, No, false, false, "", ")")}, - {0xfe5b, 0, 0, 0, g(Yes, No, false, false, "", "{")}, - {0xfe5c, 0, 0, 0, g(Yes, No, false, false, "", "}")}, - {0xfe5d, 0, 0, 0, g(Yes, No, false, false, "", "〔")}, - {0xfe5e, 0, 0, 0, g(Yes, No, false, false, "", "〕")}, - {0xfe5f, 0, 0, 0, g(Yes, No, false, false, "", "#")}, - {0xfe60, 0, 0, 0, g(Yes, No, false, false, "", "&")}, - {0xfe61, 0, 0, 0, g(Yes, No, false, false, "", "*")}, - {0xfe62, 0, 0, 0, g(Yes, No, false, false, "", "+")}, - {0xfe63, 0, 0, 0, g(Yes, No, false, false, "", "-")}, - {0xfe64, 0, 0, 0, g(Yes, No, false, false, "", "<")}, - {0xfe65, 0, 0, 0, g(Yes, No, false, false, "", ">")}, - {0xfe66, 0, 0, 0, g(Yes, No, false, false, "", "=")}, - {0xfe67, 0, 0, 0, f(Yes, false, "")}, - {0xfe68, 0, 0, 0, g(Yes, No, false, false, "", "\\")}, - {0xfe69, 0, 0, 0, g(Yes, No, false, false, "", "$")}, - {0xfe6a, 0, 0, 0, g(Yes, No, false, false, "", "%")}, - {0xfe6b, 0, 0, 0, g(Yes, No, false, false, "", "@")}, - {0xfe6c, 0, 0, 0, f(Yes, false, "")}, - {0xfe70, 0, 0, 1, g(Yes, No, false, false, "", " ً")}, - {0xfe71, 0, 0, 1, g(Yes, No, false, false, "", "ـً")}, - {0xfe72, 0, 0, 1, g(Yes, No, false, false, "", " ٌ")}, - {0xfe73, 0, 0, 0, f(Yes, false, "")}, - {0xfe74, 0, 0, 1, g(Yes, No, false, false, "", " ٍ")}, - {0xfe75, 0, 0, 0, f(Yes, false, "")}, - {0xfe76, 0, 0, 1, g(Yes, No, false, false, "", " َ")}, - {0xfe77, 0, 0, 1, g(Yes, No, false, false, "", "ـَ")}, - {0xfe78, 0, 0, 1, g(Yes, No, false, false, "", " ُ")}, - {0xfe79, 0, 0, 1, g(Yes, No, false, false, "", "ـُ")}, - {0xfe7a, 0, 0, 1, g(Yes, No, false, false, "", " ِ")}, - {0xfe7b, 0, 0, 1, g(Yes, No, false, false, "", "ـِ")}, - {0xfe7c, 0, 0, 1, g(Yes, No, false, false, "", " ّ")}, - {0xfe7d, 0, 0, 1, g(Yes, No, false, false, "", "ـّ")}, - {0xfe7e, 0, 0, 1, g(Yes, No, false, false, "", " ْ")}, - {0xfe7f, 0, 0, 1, g(Yes, No, false, false, "", "ـْ")}, - {0xfe80, 0, 0, 0, g(Yes, No, false, false, "", "ء")}, - {0xfe81, 0, 0, 1, g(Yes, No, false, false, "", "آ")}, - {0xfe83, 0, 0, 1, g(Yes, No, false, false, "", "أ")}, - {0xfe85, 0, 0, 1, g(Yes, No, false, false, "", "ؤ")}, - {0xfe87, 0, 0, 1, g(Yes, No, false, false, "", "إ")}, - {0xfe89, 0, 0, 1, g(Yes, No, false, false, "", "ئ")}, - {0xfe8d, 0, 0, 0, g(Yes, No, false, false, "", "ا")}, - {0xfe8f, 0, 0, 0, g(Yes, No, false, false, "", "ب")}, - {0xfe93, 0, 0, 0, g(Yes, No, false, false, "", "ة")}, - {0xfe95, 0, 0, 0, g(Yes, No, false, false, "", "ت")}, - {0xfe99, 0, 0, 0, g(Yes, No, false, false, "", "ث")}, - {0xfe9d, 0, 0, 0, g(Yes, No, false, false, "", "ج")}, - {0xfea1, 0, 0, 0, g(Yes, No, false, false, "", "ح")}, - {0xfea5, 0, 0, 0, g(Yes, No, false, false, "", "خ")}, - {0xfea9, 0, 0, 0, g(Yes, No, false, false, "", "د")}, - {0xfeab, 0, 0, 0, g(Yes, No, false, false, "", "ذ")}, - {0xfead, 0, 0, 0, g(Yes, No, false, false, "", "ر")}, - {0xfeaf, 0, 0, 0, g(Yes, No, false, false, "", "ز")}, - {0xfeb1, 0, 0, 0, g(Yes, No, false, false, "", "س")}, - {0xfeb5, 0, 0, 0, g(Yes, No, false, false, "", "ش")}, - {0xfeb9, 0, 0, 0, g(Yes, No, false, false, "", "ص")}, - {0xfebd, 0, 0, 0, g(Yes, No, false, false, "", "ض")}, - {0xfec1, 0, 0, 0, g(Yes, No, false, false, "", "ط")}, - {0xfec5, 0, 0, 0, g(Yes, No, false, false, "", "ظ")}, - {0xfec9, 0, 0, 0, g(Yes, No, false, false, "", "ع")}, - {0xfecd, 0, 0, 0, g(Yes, No, false, false, "", "غ")}, - {0xfed1, 0, 0, 0, g(Yes, No, false, false, "", "ف")}, - {0xfed5, 0, 0, 0, g(Yes, No, false, false, "", "ق")}, - {0xfed9, 0, 0, 0, g(Yes, No, false, false, "", "ك")}, - {0xfedd, 0, 0, 0, g(Yes, No, false, false, "", "ل")}, - {0xfee1, 0, 0, 0, g(Yes, No, false, false, "", "م")}, - {0xfee5, 0, 0, 0, g(Yes, No, false, false, "", "ن")}, - {0xfee9, 0, 0, 0, g(Yes, No, false, false, "", "ه")}, - {0xfeed, 0, 0, 0, g(Yes, No, false, false, "", "و")}, - {0xfeef, 0, 0, 0, g(Yes, No, false, false, "", "ى")}, - {0xfef1, 0, 0, 0, g(Yes, No, false, false, "", "ي")}, - {0xfef5, 0, 0, 1, g(Yes, No, false, false, "", "لآ")}, - {0xfef7, 0, 0, 1, g(Yes, No, false, false, "", "لأ")}, - {0xfef9, 0, 0, 1, g(Yes, No, false, false, "", "لإ")}, - {0xfefb, 0, 0, 0, g(Yes, No, false, false, "", "لا")}, - {0xfefd, 0, 0, 0, f(Yes, false, "")}, - {0xff01, 0, 0, 0, g(Yes, No, false, false, "", "!")}, - {0xff02, 0, 0, 0, g(Yes, No, false, false, "", "\"")}, - {0xff03, 0, 0, 0, g(Yes, No, false, false, "", "#")}, - {0xff04, 0, 0, 0, g(Yes, No, false, false, "", "$")}, - {0xff05, 0, 0, 0, g(Yes, No, false, false, "", "%")}, - {0xff06, 0, 0, 0, g(Yes, No, false, false, "", "&")}, - {0xff07, 0, 0, 0, g(Yes, No, false, false, "", "'")}, - {0xff08, 0, 0, 0, g(Yes, No, false, false, "", "(")}, - {0xff09, 0, 0, 0, g(Yes, No, false, false, "", ")")}, - {0xff0a, 0, 0, 0, g(Yes, No, false, false, "", "*")}, - {0xff0b, 0, 0, 0, g(Yes, No, false, false, "", "+")}, - {0xff0c, 0, 0, 0, g(Yes, No, false, false, "", ",")}, - {0xff0d, 0, 0, 0, g(Yes, No, false, false, "", "-")}, - {0xff0e, 0, 0, 0, g(Yes, No, false, false, "", ".")}, - {0xff0f, 0, 0, 0, g(Yes, No, false, false, "", "/")}, - {0xff10, 0, 0, 0, g(Yes, No, false, false, "", "0")}, - {0xff11, 0, 0, 0, g(Yes, No, false, false, "", "1")}, - {0xff12, 0, 0, 0, g(Yes, No, false, false, "", "2")}, - {0xff13, 0, 0, 0, g(Yes, No, false, false, "", "3")}, - {0xff14, 0, 0, 0, g(Yes, No, false, false, "", "4")}, - {0xff15, 0, 0, 0, g(Yes, No, false, false, "", "5")}, - {0xff16, 0, 0, 0, g(Yes, No, false, false, "", "6")}, - {0xff17, 0, 0, 0, g(Yes, No, false, false, "", "7")}, - {0xff18, 0, 0, 0, g(Yes, No, false, false, "", "8")}, - {0xff19, 0, 0, 0, g(Yes, No, false, false, "", "9")}, - {0xff1a, 0, 0, 0, g(Yes, No, false, false, "", ":")}, - {0xff1b, 0, 0, 0, g(Yes, No, false, false, "", ";")}, - {0xff1c, 0, 0, 0, g(Yes, No, false, false, "", "<")}, - {0xff1d, 0, 0, 0, g(Yes, No, false, false, "", "=")}, - {0xff1e, 0, 0, 0, g(Yes, No, false, false, "", ">")}, - {0xff1f, 0, 0, 0, g(Yes, No, false, false, "", "?")}, - {0xff20, 0, 0, 0, g(Yes, No, false, false, "", "@")}, - {0xff21, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0xff22, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0xff23, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0xff24, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0xff25, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0xff26, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0xff27, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0xff28, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0xff29, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0xff2a, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0xff2b, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0xff2c, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0xff2d, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0xff2e, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0xff2f, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0xff30, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0xff31, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0xff32, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0xff33, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0xff34, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0xff35, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0xff36, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0xff37, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0xff38, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0xff39, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0xff3a, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0xff3b, 0, 0, 0, g(Yes, No, false, false, "", "[")}, - {0xff3c, 0, 0, 0, g(Yes, No, false, false, "", "\\")}, - {0xff3d, 0, 0, 0, g(Yes, No, false, false, "", "]")}, - {0xff3e, 0, 0, 0, g(Yes, No, false, false, "", "^")}, - {0xff3f, 0, 0, 0, g(Yes, No, false, false, "", "_")}, - {0xff40, 0, 0, 0, g(Yes, No, false, false, "", "`")}, - {0xff41, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0xff42, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0xff43, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0xff44, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0xff45, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0xff46, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0xff47, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0xff48, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0xff49, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0xff4a, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0xff4b, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0xff4c, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0xff4d, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0xff4e, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0xff4f, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0xff50, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0xff51, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0xff52, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0xff53, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0xff54, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0xff55, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0xff56, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0xff57, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0xff58, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0xff59, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0xff5a, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0xff5b, 0, 0, 0, g(Yes, No, false, false, "", "{")}, - {0xff5c, 0, 0, 0, g(Yes, No, false, false, "", "|")}, - {0xff5d, 0, 0, 0, g(Yes, No, false, false, "", "}")}, - {0xff5e, 0, 0, 0, g(Yes, No, false, false, "", "~")}, - {0xff5f, 0, 0, 0, g(Yes, No, false, false, "", "⦅")}, - {0xff60, 0, 0, 0, g(Yes, No, false, false, "", "⦆")}, - {0xff61, 0, 0, 0, g(Yes, No, false, false, "", "。")}, - {0xff62, 0, 0, 0, g(Yes, No, false, false, "", "「")}, - {0xff63, 0, 0, 0, g(Yes, No, false, false, "", "」")}, - {0xff64, 0, 0, 0, g(Yes, No, false, false, "", "、")}, - {0xff65, 0, 0, 0, g(Yes, No, false, false, "", "・")}, - {0xff66, 0, 0, 0, g(Yes, No, false, false, "", "ヲ")}, - {0xff67, 0, 0, 0, g(Yes, No, false, false, "", "ァ")}, - {0xff68, 0, 0, 0, g(Yes, No, false, false, "", "ィ")}, - {0xff69, 0, 0, 0, g(Yes, No, false, false, "", "ゥ")}, - {0xff6a, 0, 0, 0, g(Yes, No, false, false, "", "ェ")}, - {0xff6b, 0, 0, 0, g(Yes, No, false, false, "", "ォ")}, - {0xff6c, 0, 0, 0, g(Yes, No, false, false, "", "ャ")}, - {0xff6d, 0, 0, 0, g(Yes, No, false, false, "", "ュ")}, - {0xff6e, 0, 0, 0, g(Yes, No, false, false, "", "ョ")}, - {0xff6f, 0, 0, 0, g(Yes, No, false, false, "", "ッ")}, - {0xff70, 0, 0, 0, g(Yes, No, false, false, "", "ー")}, - {0xff71, 0, 0, 0, g(Yes, No, false, false, "", "ア")}, - {0xff72, 0, 0, 0, g(Yes, No, false, false, "", "イ")}, - {0xff73, 0, 0, 0, g(Yes, No, false, false, "", "ウ")}, - {0xff74, 0, 0, 0, g(Yes, No, false, false, "", "エ")}, - {0xff75, 0, 0, 0, g(Yes, No, false, false, "", "オ")}, - {0xff76, 0, 0, 0, g(Yes, No, false, false, "", "カ")}, - {0xff77, 0, 0, 0, g(Yes, No, false, false, "", "キ")}, - {0xff78, 0, 0, 0, g(Yes, No, false, false, "", "ク")}, - {0xff79, 0, 0, 0, g(Yes, No, false, false, "", "ケ")}, - {0xff7a, 0, 0, 0, g(Yes, No, false, false, "", "コ")}, - {0xff7b, 0, 0, 0, g(Yes, No, false, false, "", "サ")}, - {0xff7c, 0, 0, 0, g(Yes, No, false, false, "", "シ")}, - {0xff7d, 0, 0, 0, g(Yes, No, false, false, "", "ス")}, - {0xff7e, 0, 0, 0, g(Yes, No, false, false, "", "セ")}, - {0xff7f, 0, 0, 0, g(Yes, No, false, false, "", "ソ")}, - {0xff80, 0, 0, 0, g(Yes, No, false, false, "", "タ")}, - {0xff81, 0, 0, 0, g(Yes, No, false, false, "", "チ")}, - {0xff82, 0, 0, 0, g(Yes, No, false, false, "", "ツ")}, - {0xff83, 0, 0, 0, g(Yes, No, false, false, "", "テ")}, - {0xff84, 0, 0, 0, g(Yes, No, false, false, "", "ト")}, - {0xff85, 0, 0, 0, g(Yes, No, false, false, "", "ナ")}, - {0xff86, 0, 0, 0, g(Yes, No, false, false, "", "ニ")}, - {0xff87, 0, 0, 0, g(Yes, No, false, false, "", "ヌ")}, - {0xff88, 0, 0, 0, g(Yes, No, false, false, "", "ネ")}, - {0xff89, 0, 0, 0, g(Yes, No, false, false, "", "ノ")}, - {0xff8a, 0, 0, 0, g(Yes, No, false, false, "", "ハ")}, - {0xff8b, 0, 0, 0, g(Yes, No, false, false, "", "ヒ")}, - {0xff8c, 0, 0, 0, g(Yes, No, false, false, "", "フ")}, - {0xff8d, 0, 0, 0, g(Yes, No, false, false, "", "ヘ")}, - {0xff8e, 0, 0, 0, g(Yes, No, false, false, "", "ホ")}, - {0xff8f, 0, 0, 0, g(Yes, No, false, false, "", "マ")}, - {0xff90, 0, 0, 0, g(Yes, No, false, false, "", "ミ")}, - {0xff91, 0, 0, 0, g(Yes, No, false, false, "", "ム")}, - {0xff92, 0, 0, 0, g(Yes, No, false, false, "", "メ")}, - {0xff93, 0, 0, 0, g(Yes, No, false, false, "", "モ")}, - {0xff94, 0, 0, 0, g(Yes, No, false, false, "", "ヤ")}, - {0xff95, 0, 0, 0, g(Yes, No, false, false, "", "ユ")}, - {0xff96, 0, 0, 0, g(Yes, No, false, false, "", "ヨ")}, - {0xff97, 0, 0, 0, g(Yes, No, false, false, "", "ラ")}, - {0xff98, 0, 0, 0, g(Yes, No, false, false, "", "リ")}, - {0xff99, 0, 0, 0, g(Yes, No, false, false, "", "ル")}, - {0xff9a, 0, 0, 0, g(Yes, No, false, false, "", "レ")}, - {0xff9b, 0, 0, 0, g(Yes, No, false, false, "", "ロ")}, - {0xff9c, 0, 0, 0, g(Yes, No, false, false, "", "ワ")}, - {0xff9d, 0, 0, 0, g(Yes, No, false, false, "", "ン")}, - {0xff9e, 0, 1, 1, g(Yes, No, false, false, "", "゙")}, - {0xff9f, 0, 1, 1, g(Yes, No, false, false, "", "゚")}, - {0xffa0, 0, 0, 0, g(Yes, No, false, false, "", "ᅠ")}, - {0xffa1, 0, 0, 0, g(Yes, No, false, false, "", "ᄀ")}, - {0xffa2, 0, 0, 0, g(Yes, No, false, false, "", "ᄁ")}, - {0xffa3, 0, 1, 1, g(Yes, No, false, false, "", "ᆪ")}, - {0xffa4, 0, 0, 0, g(Yes, No, false, false, "", "ᄂ")}, - {0xffa5, 0, 1, 1, g(Yes, No, false, false, "", "ᆬ")}, - {0xffa6, 0, 1, 1, g(Yes, No, false, false, "", "ᆭ")}, - {0xffa7, 0, 0, 0, g(Yes, No, false, false, "", "ᄃ")}, - {0xffa8, 0, 0, 0, g(Yes, No, false, false, "", "ᄄ")}, - {0xffa9, 0, 0, 0, g(Yes, No, false, false, "", "ᄅ")}, - {0xffaa, 0, 1, 1, g(Yes, No, false, false, "", "ᆰ")}, - {0xffab, 0, 1, 1, g(Yes, No, false, false, "", "ᆱ")}, - {0xffac, 0, 1, 1, g(Yes, No, false, false, "", "ᆲ")}, - {0xffad, 0, 1, 1, g(Yes, No, false, false, "", "ᆳ")}, - {0xffae, 0, 1, 1, g(Yes, No, false, false, "", "ᆴ")}, - {0xffaf, 0, 1, 1, g(Yes, No, false, false, "", "ᆵ")}, - {0xffb0, 0, 0, 0, g(Yes, No, false, false, "", "ᄚ")}, - {0xffb1, 0, 0, 0, g(Yes, No, false, false, "", "ᄆ")}, - {0xffb2, 0, 0, 0, g(Yes, No, false, false, "", "ᄇ")}, - {0xffb3, 0, 0, 0, g(Yes, No, false, false, "", "ᄈ")}, - {0xffb4, 0, 0, 0, g(Yes, No, false, false, "", "ᄡ")}, - {0xffb5, 0, 0, 0, g(Yes, No, false, false, "", "ᄉ")}, - {0xffb6, 0, 0, 0, g(Yes, No, false, false, "", "ᄊ")}, - {0xffb7, 0, 0, 0, g(Yes, No, false, false, "", "ᄋ")}, - {0xffb8, 0, 0, 0, g(Yes, No, false, false, "", "ᄌ")}, - {0xffb9, 0, 0, 0, g(Yes, No, false, false, "", "ᄍ")}, - {0xffba, 0, 0, 0, g(Yes, No, false, false, "", "ᄎ")}, - {0xffbb, 0, 0, 0, g(Yes, No, false, false, "", "ᄏ")}, - {0xffbc, 0, 0, 0, g(Yes, No, false, false, "", "ᄐ")}, - {0xffbd, 0, 0, 0, g(Yes, No, false, false, "", "ᄑ")}, - {0xffbe, 0, 0, 0, g(Yes, No, false, false, "", "ᄒ")}, - {0xffbf, 0, 0, 0, f(Yes, false, "")}, - {0xffc2, 0, 1, 1, g(Yes, No, false, false, "", "ᅡ")}, - {0xffc3, 0, 1, 1, g(Yes, No, false, false, "", "ᅢ")}, - {0xffc4, 0, 1, 1, g(Yes, No, false, false, "", "ᅣ")}, - {0xffc5, 0, 1, 1, g(Yes, No, false, false, "", "ᅤ")}, - {0xffc6, 0, 1, 1, g(Yes, No, false, false, "", "ᅥ")}, - {0xffc7, 0, 1, 1, g(Yes, No, false, false, "", "ᅦ")}, - {0xffc8, 0, 0, 0, f(Yes, false, "")}, - {0xffca, 0, 1, 1, g(Yes, No, false, false, "", "ᅧ")}, - {0xffcb, 0, 1, 1, g(Yes, No, false, false, "", "ᅨ")}, - {0xffcc, 0, 1, 1, g(Yes, No, false, false, "", "ᅩ")}, - {0xffcd, 0, 1, 1, g(Yes, No, false, false, "", "ᅪ")}, - {0xffce, 0, 1, 1, g(Yes, No, false, false, "", "ᅫ")}, - {0xffcf, 0, 1, 1, g(Yes, No, false, false, "", "ᅬ")}, - {0xffd0, 0, 0, 0, f(Yes, false, "")}, - {0xffd2, 0, 1, 1, g(Yes, No, false, false, "", "ᅭ")}, - {0xffd3, 0, 1, 1, g(Yes, No, false, false, "", "ᅮ")}, - {0xffd4, 0, 1, 1, g(Yes, No, false, false, "", "ᅯ")}, - {0xffd5, 0, 1, 1, g(Yes, No, false, false, "", "ᅰ")}, - {0xffd6, 0, 1, 1, g(Yes, No, false, false, "", "ᅱ")}, - {0xffd7, 0, 1, 1, g(Yes, No, false, false, "", "ᅲ")}, - {0xffd8, 0, 0, 0, f(Yes, false, "")}, - {0xffda, 0, 1, 1, g(Yes, No, false, false, "", "ᅳ")}, - {0xffdb, 0, 1, 1, g(Yes, No, false, false, "", "ᅴ")}, - {0xffdc, 0, 1, 1, g(Yes, No, false, false, "", "ᅵ")}, - {0xffdd, 0, 0, 0, f(Yes, false, "")}, - {0xffe0, 0, 0, 0, g(Yes, No, false, false, "", "¢")}, - {0xffe1, 0, 0, 0, g(Yes, No, false, false, "", "£")}, - {0xffe2, 0, 0, 0, g(Yes, No, false, false, "", "¬")}, - {0xffe3, 0, 0, 1, g(Yes, No, false, false, "", " ̄")}, - {0xffe4, 0, 0, 0, g(Yes, No, false, false, "", "¦")}, - {0xffe5, 0, 0, 0, g(Yes, No, false, false, "", "¥")}, - {0xffe6, 0, 0, 0, g(Yes, No, false, false, "", "₩")}, - {0xffe7, 0, 0, 0, f(Yes, false, "")}, - {0xffe8, 0, 0, 0, g(Yes, No, false, false, "", "│")}, - {0xffe9, 0, 0, 0, g(Yes, No, false, false, "", "←")}, - {0xffea, 0, 0, 0, g(Yes, No, false, false, "", "↑")}, - {0xffeb, 0, 0, 0, g(Yes, No, false, false, "", "→")}, - {0xffec, 0, 0, 0, g(Yes, No, false, false, "", "↓")}, - {0xffed, 0, 0, 0, g(Yes, No, false, false, "", "■")}, - {0xffee, 0, 0, 0, g(Yes, No, false, false, "", "○")}, - {0xffef, 0, 0, 0, f(Yes, false, "")}, - {0x101fd, 220, 1, 1, f(Yes, false, "")}, - {0x101fe, 0, 0, 0, f(Yes, false, "")}, - {0x102e0, 220, 1, 1, f(Yes, false, "")}, - {0x102e1, 0, 0, 0, f(Yes, false, "")}, - {0x10376, 230, 1, 1, f(Yes, false, "")}, - {0x1037b, 0, 0, 0, f(Yes, false, "")}, - {0x10a0d, 220, 1, 1, f(Yes, false, "")}, - {0x10a0e, 0, 0, 0, f(Yes, false, "")}, - {0x10a0f, 230, 1, 1, f(Yes, false, "")}, - {0x10a10, 0, 0, 0, f(Yes, false, "")}, - {0x10a38, 230, 1, 1, f(Yes, false, "")}, - {0x10a39, 1, 1, 1, f(Yes, false, "")}, - {0x10a3a, 220, 1, 1, f(Yes, false, "")}, - {0x10a3b, 0, 0, 0, f(Yes, false, "")}, - {0x10a3f, 9, 1, 1, f(Yes, false, "")}, - {0x10a40, 0, 0, 0, f(Yes, false, "")}, - {0x10ae5, 230, 1, 1, f(Yes, false, "")}, - {0x10ae6, 220, 1, 1, f(Yes, false, "")}, - {0x10ae7, 0, 0, 0, f(Yes, false, "")}, - {0x11046, 9, 1, 1, f(Yes, false, "")}, - {0x11047, 0, 0, 0, f(Yes, false, "")}, - {0x1107f, 9, 1, 1, f(Yes, false, "")}, - {0x11080, 0, 0, 0, f(Yes, false, "")}, - {0x11099, 0, 0, 0, f(Yes, true, "")}, - {0x1109a, 0, 0, 1, f(Yes, false, "𑂚")}, - {0x1109b, 0, 0, 0, f(Yes, true, "")}, - {0x1109c, 0, 0, 1, f(Yes, false, "𑂜")}, - {0x1109d, 0, 0, 0, f(Yes, false, "")}, - {0x110a5, 0, 0, 0, f(Yes, true, "")}, - {0x110a6, 0, 0, 0, f(Yes, false, "")}, - {0x110ab, 0, 0, 1, f(Yes, false, "𑂫")}, - {0x110ac, 0, 0, 0, f(Yes, false, "")}, - {0x110b9, 9, 1, 1, f(Yes, false, "")}, - {0x110ba, 7, 1, 1, f(Maybe, false, "")}, - {0x110bb, 0, 0, 0, f(Yes, false, "")}, - {0x11100, 230, 1, 1, f(Yes, false, "")}, - {0x11103, 0, 0, 0, f(Yes, false, "")}, - {0x11127, 0, 1, 1, f(Maybe, false, "")}, - {0x11128, 0, 0, 0, f(Yes, false, "")}, - {0x1112e, 0, 0, 1, f(Yes, false, "𑄮")}, - {0x1112f, 0, 0, 1, f(Yes, false, "𑄯")}, - {0x11130, 0, 0, 0, f(Yes, false, "")}, - {0x11131, 0, 0, 0, f(Yes, true, "")}, - {0x11133, 9, 1, 1, f(Yes, false, "")}, - {0x11135, 0, 0, 0, f(Yes, false, "")}, - {0x11173, 7, 1, 1, f(Yes, false, "")}, - {0x11174, 0, 0, 0, f(Yes, false, "")}, - {0x111c0, 9, 1, 1, f(Yes, false, "")}, - {0x111c1, 0, 0, 0, f(Yes, false, "")}, - {0x111ca, 7, 1, 1, f(Yes, false, "")}, - {0x111cb, 0, 0, 0, f(Yes, false, "")}, - {0x11235, 9, 1, 1, f(Yes, false, "")}, - {0x11236, 7, 1, 1, f(Yes, false, "")}, - {0x11237, 0, 0, 0, f(Yes, false, "")}, - {0x112e9, 7, 1, 1, f(Yes, false, "")}, - {0x112ea, 9, 1, 1, f(Yes, false, "")}, - {0x112eb, 0, 0, 0, f(Yes, false, "")}, - {0x1133c, 7, 1, 1, f(Yes, false, "")}, - {0x1133d, 0, 0, 0, f(Yes, false, "")}, - {0x1133e, 0, 1, 1, f(Maybe, false, "")}, - {0x1133f, 0, 0, 0, f(Yes, false, "")}, - {0x11347, 0, 0, 0, f(Yes, true, "")}, - {0x11348, 0, 0, 0, f(Yes, false, "")}, - {0x1134b, 0, 0, 1, f(Yes, false, "𑍋")}, - {0x1134c, 0, 0, 1, f(Yes, false, "𑍌")}, - {0x1134d, 9, 1, 1, f(Yes, false, "")}, - {0x1134e, 0, 0, 0, f(Yes, false, "")}, - {0x11357, 0, 1, 1, f(Maybe, false, "")}, - {0x11358, 0, 0, 0, f(Yes, false, "")}, - {0x11366, 230, 1, 1, f(Yes, false, "")}, - {0x1136d, 0, 0, 0, f(Yes, false, "")}, - {0x11370, 230, 1, 1, f(Yes, false, "")}, - {0x11375, 0, 0, 0, f(Yes, false, "")}, - {0x11442, 9, 1, 1, f(Yes, false, "")}, - {0x11443, 0, 0, 0, f(Yes, false, "")}, - {0x11446, 7, 1, 1, f(Yes, false, "")}, - {0x11447, 0, 0, 0, f(Yes, false, "")}, - {0x114b0, 0, 1, 1, f(Maybe, false, "")}, - {0x114b1, 0, 0, 0, f(Yes, false, "")}, - {0x114b9, 0, 0, 0, f(Yes, true, "")}, - {0x114ba, 0, 1, 1, f(Maybe, false, "")}, - {0x114bb, 0, 0, 1, f(Yes, false, "𑒻")}, - {0x114bc, 0, 0, 1, f(Yes, false, "𑒼")}, - {0x114bd, 0, 1, 1, f(Maybe, false, "")}, - {0x114be, 0, 0, 1, f(Yes, false, "𑒾")}, - {0x114bf, 0, 0, 0, f(Yes, false, "")}, - {0x114c2, 9, 1, 1, f(Yes, false, "")}, - {0x114c3, 7, 1, 1, f(Yes, false, "")}, - {0x114c4, 0, 0, 0, f(Yes, false, "")}, - {0x115af, 0, 1, 1, f(Maybe, false, "")}, - {0x115b0, 0, 0, 0, f(Yes, false, "")}, - {0x115b8, 0, 0, 0, f(Yes, true, "")}, - {0x115ba, 0, 0, 1, f(Yes, false, "𑖺")}, - {0x115bb, 0, 0, 1, f(Yes, false, "𑖻")}, - {0x115bc, 0, 0, 0, f(Yes, false, "")}, - {0x115bf, 9, 1, 1, f(Yes, false, "")}, - {0x115c0, 7, 1, 1, f(Yes, false, "")}, - {0x115c1, 0, 0, 0, f(Yes, false, "")}, - {0x1163f, 9, 1, 1, f(Yes, false, "")}, - {0x11640, 0, 0, 0, f(Yes, false, "")}, - {0x116b6, 9, 1, 1, f(Yes, false, "")}, - {0x116b7, 7, 1, 1, f(Yes, false, "")}, - {0x116b8, 0, 0, 0, f(Yes, false, "")}, - {0x1172b, 9, 1, 1, f(Yes, false, "")}, - {0x1172c, 0, 0, 0, f(Yes, false, "")}, - {0x11c3f, 9, 1, 1, f(Yes, false, "")}, - {0x11c40, 0, 0, 0, f(Yes, false, "")}, - {0x16af0, 1, 1, 1, f(Yes, false, "")}, - {0x16af5, 0, 0, 0, f(Yes, false, "")}, - {0x16b30, 230, 1, 1, f(Yes, false, "")}, - {0x16b37, 0, 0, 0, f(Yes, false, "")}, - {0x1bc9e, 1, 1, 1, f(Yes, false, "")}, - {0x1bc9f, 0, 0, 0, f(Yes, false, "")}, - {0x1d15e, 0, 0, 1, f(No, false, "𝅗𝅥")}, - {0x1d15f, 0, 0, 1, f(No, false, "𝅘𝅥")}, - {0x1d160, 0, 0, 2, f(No, false, "𝅘𝅥𝅮")}, - {0x1d161, 0, 0, 2, f(No, false, "𝅘𝅥𝅯")}, - {0x1d162, 0, 0, 2, f(No, false, "𝅘𝅥𝅰")}, - {0x1d163, 0, 0, 2, f(No, false, "𝅘𝅥𝅱")}, - {0x1d164, 0, 0, 2, f(No, false, "𝅘𝅥𝅲")}, - {0x1d165, 216, 1, 1, f(Yes, false, "")}, - {0x1d167, 1, 1, 1, f(Yes, false, "")}, - {0x1d16a, 0, 0, 0, f(Yes, false, "")}, - {0x1d16d, 226, 1, 1, f(Yes, false, "")}, - {0x1d16e, 216, 1, 1, f(Yes, false, "")}, - {0x1d173, 0, 0, 0, f(Yes, false, "")}, - {0x1d17b, 220, 1, 1, f(Yes, false, "")}, - {0x1d183, 0, 0, 0, f(Yes, false, "")}, - {0x1d185, 230, 1, 1, f(Yes, false, "")}, - {0x1d18a, 220, 1, 1, f(Yes, false, "")}, - {0x1d18c, 0, 0, 0, f(Yes, false, "")}, - {0x1d1aa, 230, 1, 1, f(Yes, false, "")}, - {0x1d1ae, 0, 0, 0, f(Yes, false, "")}, - {0x1d1bb, 0, 0, 1, f(No, false, "𝆹𝅥")}, - {0x1d1bc, 0, 0, 1, f(No, false, "𝆺𝅥")}, - {0x1d1bd, 0, 0, 2, f(No, false, "𝆹𝅥𝅮")}, - {0x1d1be, 0, 0, 2, f(No, false, "𝆺𝅥𝅮")}, - {0x1d1bf, 0, 0, 2, f(No, false, "𝆹𝅥𝅯")}, - {0x1d1c0, 0, 0, 2, f(No, false, "𝆺𝅥𝅯")}, - {0x1d1c1, 0, 0, 0, f(Yes, false, "")}, - {0x1d242, 230, 1, 1, f(Yes, false, "")}, - {0x1d245, 0, 0, 0, f(Yes, false, "")}, - {0x1d400, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d401, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d402, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d403, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d404, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d405, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d406, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d407, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d408, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d409, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d40a, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d40b, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d40c, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d40d, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d40e, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d40f, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d410, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d411, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d412, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d413, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d414, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d415, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d416, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d417, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d418, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d419, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d41a, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d41b, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d41c, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d41d, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d41e, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d41f, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d420, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d421, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d422, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d423, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d424, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d425, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d426, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d427, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d428, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d429, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d42a, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d42b, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d42c, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d42d, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d42e, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d42f, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d430, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d431, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d432, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d433, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d434, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d435, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d436, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d437, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d438, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d439, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d43a, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d43b, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d43c, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d43d, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d43e, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d43f, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d440, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d441, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d442, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d443, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d444, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d445, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d446, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d447, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d448, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d449, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d44a, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d44b, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d44c, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d44d, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d44e, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d44f, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d450, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d451, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d452, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d453, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d454, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d455, 0, 0, 0, f(Yes, false, "")}, - {0x1d456, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d457, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d458, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d459, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d45a, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d45b, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d45c, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d45d, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d45e, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d45f, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d460, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d461, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d462, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d463, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d464, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d465, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d466, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d467, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d468, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d469, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d46a, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d46b, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d46c, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d46d, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d46e, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d46f, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d470, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d471, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d472, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d473, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d474, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d475, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d476, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d477, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d478, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d479, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d47a, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d47b, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d47c, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d47d, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d47e, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d47f, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d480, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d481, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d482, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d483, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d484, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d485, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d486, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d487, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d488, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d489, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d48a, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d48b, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d48c, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d48d, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d48e, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d48f, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d490, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d491, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d492, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d493, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d494, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d495, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d496, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d497, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d498, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d499, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d49a, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d49b, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d49c, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d49d, 0, 0, 0, f(Yes, false, "")}, - {0x1d49e, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d49f, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d4a0, 0, 0, 0, f(Yes, false, "")}, - {0x1d4a2, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d4a3, 0, 0, 0, f(Yes, false, "")}, - {0x1d4a5, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d4a6, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d4a7, 0, 0, 0, f(Yes, false, "")}, - {0x1d4a9, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d4aa, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d4ab, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d4ac, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d4ad, 0, 0, 0, f(Yes, false, "")}, - {0x1d4ae, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d4af, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d4b0, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d4b1, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d4b2, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d4b3, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d4b4, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d4b5, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d4b6, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d4b7, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d4b8, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d4b9, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d4ba, 0, 0, 0, f(Yes, false, "")}, - {0x1d4bb, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d4bc, 0, 0, 0, f(Yes, false, "")}, - {0x1d4bd, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d4be, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d4bf, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d4c0, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d4c1, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d4c2, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d4c3, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d4c4, 0, 0, 0, f(Yes, false, "")}, - {0x1d4c5, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d4c6, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d4c7, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d4c8, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d4c9, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d4ca, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d4cb, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d4cc, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d4cd, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d4ce, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d4cf, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d4d0, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d4d1, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d4d2, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d4d3, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d4d4, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d4d5, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d4d6, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d4d7, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d4d8, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d4d9, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d4da, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d4db, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d4dc, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d4dd, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d4de, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d4df, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d4e0, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d4e1, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d4e2, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d4e3, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d4e4, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d4e5, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d4e6, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d4e7, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d4e8, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d4e9, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d4ea, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d4eb, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d4ec, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d4ed, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d4ee, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d4ef, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d4f0, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d4f1, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d4f2, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d4f3, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d4f4, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d4f5, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d4f6, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d4f7, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d4f8, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d4f9, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d4fa, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d4fb, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d4fc, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d4fd, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d4fe, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d4ff, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d500, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d501, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d502, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d503, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d504, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d505, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d506, 0, 0, 0, f(Yes, false, "")}, - {0x1d507, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d508, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d509, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d50a, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d50b, 0, 0, 0, f(Yes, false, "")}, - {0x1d50d, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d50e, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d50f, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d510, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d511, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d512, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d513, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d514, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d515, 0, 0, 0, f(Yes, false, "")}, - {0x1d516, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d517, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d518, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d519, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d51a, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d51b, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d51c, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d51d, 0, 0, 0, f(Yes, false, "")}, - {0x1d51e, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d51f, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d520, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d521, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d522, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d523, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d524, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d525, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d526, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d527, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d528, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d529, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d52a, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d52b, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d52c, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d52d, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d52e, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d52f, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d530, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d531, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d532, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d533, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d534, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d535, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d536, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d537, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d538, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d539, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d53a, 0, 0, 0, f(Yes, false, "")}, - {0x1d53b, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d53c, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d53d, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d53e, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d53f, 0, 0, 0, f(Yes, false, "")}, - {0x1d540, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d541, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d542, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d543, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d544, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d545, 0, 0, 0, f(Yes, false, "")}, - {0x1d546, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d547, 0, 0, 0, f(Yes, false, "")}, - {0x1d54a, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d54b, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d54c, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d54d, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d54e, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d54f, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d550, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d551, 0, 0, 0, f(Yes, false, "")}, - {0x1d552, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d553, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d554, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d555, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d556, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d557, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d558, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d559, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d55a, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d55b, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d55c, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d55d, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d55e, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d55f, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d560, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d561, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d562, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d563, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d564, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d565, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d566, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d567, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d568, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d569, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d56a, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d56b, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d56c, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d56d, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d56e, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d56f, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d570, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d571, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d572, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d573, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d574, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d575, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d576, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d577, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d578, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d579, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d57a, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d57b, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d57c, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d57d, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d57e, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d57f, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d580, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d581, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d582, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d583, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d584, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d585, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d586, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d587, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d588, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d589, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d58a, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d58b, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d58c, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d58d, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d58e, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d58f, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d590, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d591, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d592, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d593, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d594, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d595, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d596, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d597, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d598, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d599, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d59a, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d59b, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d59c, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d59d, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d59e, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d59f, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d5a0, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d5a1, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d5a2, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d5a3, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d5a4, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d5a5, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d5a6, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d5a7, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d5a8, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d5a9, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d5aa, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d5ab, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d5ac, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d5ad, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d5ae, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d5af, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d5b0, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d5b1, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d5b2, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d5b3, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d5b4, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d5b5, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d5b6, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d5b7, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d5b8, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d5b9, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d5ba, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d5bb, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d5bc, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d5bd, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d5be, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d5bf, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d5c0, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d5c1, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d5c2, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d5c3, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d5c4, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d5c5, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d5c6, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d5c7, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d5c8, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d5c9, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d5ca, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d5cb, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d5cc, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d5cd, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d5ce, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d5cf, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d5d0, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d5d1, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d5d2, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d5d3, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d5d4, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d5d5, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d5d6, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d5d7, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d5d8, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d5d9, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d5da, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d5db, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d5dc, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d5dd, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d5de, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d5df, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d5e0, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d5e1, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d5e2, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d5e3, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d5e4, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d5e5, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d5e6, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d5e7, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d5e8, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d5e9, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d5ea, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d5eb, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d5ec, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d5ed, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d5ee, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d5ef, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d5f0, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d5f1, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d5f2, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d5f3, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d5f4, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d5f5, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d5f6, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d5f7, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d5f8, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d5f9, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d5fa, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d5fb, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d5fc, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d5fd, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d5fe, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d5ff, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d600, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d601, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d602, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d603, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d604, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d605, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d606, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d607, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d608, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d609, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d60a, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d60b, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d60c, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d60d, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d60e, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d60f, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d610, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d611, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d612, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d613, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d614, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d615, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d616, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d617, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d618, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d619, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d61a, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d61b, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d61c, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d61d, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d61e, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d61f, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d620, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d621, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d622, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d623, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d624, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d625, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d626, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d627, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d628, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d629, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d62a, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d62b, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d62c, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d62d, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d62e, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d62f, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d630, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d631, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d632, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d633, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d634, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d635, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d636, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d637, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d638, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d639, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d63a, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d63b, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d63c, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d63d, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d63e, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d63f, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d640, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d641, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d642, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d643, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d644, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d645, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d646, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d647, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d648, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d649, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d64a, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d64b, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d64c, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d64d, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d64e, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d64f, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d650, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d651, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d652, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d653, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d654, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d655, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d656, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d657, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d658, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d659, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d65a, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d65b, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d65c, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d65d, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d65e, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d65f, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d660, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d661, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d662, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d663, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d664, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d665, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d666, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d667, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d668, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d669, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d66a, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d66b, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d66c, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d66d, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d66e, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d66f, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d670, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1d671, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1d672, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1d673, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1d674, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1d675, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1d676, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1d677, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1d678, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1d679, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1d67a, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1d67b, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1d67c, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1d67d, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1d67e, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1d67f, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1d680, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1d681, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1d682, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1d683, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1d684, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1d685, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1d686, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1d687, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1d688, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1d689, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1d68a, 0, 0, 0, g(Yes, No, false, false, "", "a")}, - {0x1d68b, 0, 0, 0, g(Yes, No, false, false, "", "b")}, - {0x1d68c, 0, 0, 0, g(Yes, No, false, false, "", "c")}, - {0x1d68d, 0, 0, 0, g(Yes, No, false, false, "", "d")}, - {0x1d68e, 0, 0, 0, g(Yes, No, false, false, "", "e")}, - {0x1d68f, 0, 0, 0, g(Yes, No, false, false, "", "f")}, - {0x1d690, 0, 0, 0, g(Yes, No, false, false, "", "g")}, - {0x1d691, 0, 0, 0, g(Yes, No, false, false, "", "h")}, - {0x1d692, 0, 0, 0, g(Yes, No, false, false, "", "i")}, - {0x1d693, 0, 0, 0, g(Yes, No, false, false, "", "j")}, - {0x1d694, 0, 0, 0, g(Yes, No, false, false, "", "k")}, - {0x1d695, 0, 0, 0, g(Yes, No, false, false, "", "l")}, - {0x1d696, 0, 0, 0, g(Yes, No, false, false, "", "m")}, - {0x1d697, 0, 0, 0, g(Yes, No, false, false, "", "n")}, - {0x1d698, 0, 0, 0, g(Yes, No, false, false, "", "o")}, - {0x1d699, 0, 0, 0, g(Yes, No, false, false, "", "p")}, - {0x1d69a, 0, 0, 0, g(Yes, No, false, false, "", "q")}, - {0x1d69b, 0, 0, 0, g(Yes, No, false, false, "", "r")}, - {0x1d69c, 0, 0, 0, g(Yes, No, false, false, "", "s")}, - {0x1d69d, 0, 0, 0, g(Yes, No, false, false, "", "t")}, - {0x1d69e, 0, 0, 0, g(Yes, No, false, false, "", "u")}, - {0x1d69f, 0, 0, 0, g(Yes, No, false, false, "", "v")}, - {0x1d6a0, 0, 0, 0, g(Yes, No, false, false, "", "w")}, - {0x1d6a1, 0, 0, 0, g(Yes, No, false, false, "", "x")}, - {0x1d6a2, 0, 0, 0, g(Yes, No, false, false, "", "y")}, - {0x1d6a3, 0, 0, 0, g(Yes, No, false, false, "", "z")}, - {0x1d6a4, 0, 0, 0, g(Yes, No, false, false, "", "ı")}, - {0x1d6a5, 0, 0, 0, g(Yes, No, false, false, "", "ȷ")}, - {0x1d6a6, 0, 0, 0, f(Yes, false, "")}, - {0x1d6a8, 0, 0, 0, g(Yes, No, false, false, "", "Α")}, - {0x1d6a9, 0, 0, 0, g(Yes, No, false, false, "", "Β")}, - {0x1d6aa, 0, 0, 0, g(Yes, No, false, false, "", "Γ")}, - {0x1d6ab, 0, 0, 0, g(Yes, No, false, false, "", "Δ")}, - {0x1d6ac, 0, 0, 0, g(Yes, No, false, false, "", "Ε")}, - {0x1d6ad, 0, 0, 0, g(Yes, No, false, false, "", "Ζ")}, - {0x1d6ae, 0, 0, 0, g(Yes, No, false, false, "", "Η")}, - {0x1d6af, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x1d6b0, 0, 0, 0, g(Yes, No, false, false, "", "Ι")}, - {0x1d6b1, 0, 0, 0, g(Yes, No, false, false, "", "Κ")}, - {0x1d6b2, 0, 0, 0, g(Yes, No, false, false, "", "Λ")}, - {0x1d6b3, 0, 0, 0, g(Yes, No, false, false, "", "Μ")}, - {0x1d6b4, 0, 0, 0, g(Yes, No, false, false, "", "Ν")}, - {0x1d6b5, 0, 0, 0, g(Yes, No, false, false, "", "Ξ")}, - {0x1d6b6, 0, 0, 0, g(Yes, No, false, false, "", "Ο")}, - {0x1d6b7, 0, 0, 0, g(Yes, No, false, false, "", "Π")}, - {0x1d6b8, 0, 0, 0, g(Yes, No, false, false, "", "Ρ")}, - {0x1d6b9, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x1d6ba, 0, 0, 0, g(Yes, No, false, false, "", "Σ")}, - {0x1d6bb, 0, 0, 0, g(Yes, No, false, false, "", "Τ")}, - {0x1d6bc, 0, 0, 0, g(Yes, No, false, false, "", "Υ")}, - {0x1d6bd, 0, 0, 0, g(Yes, No, false, false, "", "Φ")}, - {0x1d6be, 0, 0, 0, g(Yes, No, false, false, "", "Χ")}, - {0x1d6bf, 0, 0, 0, g(Yes, No, false, false, "", "Ψ")}, - {0x1d6c0, 0, 0, 0, g(Yes, No, false, false, "", "Ω")}, - {0x1d6c1, 0, 0, 0, g(Yes, No, false, false, "", "∇")}, - {0x1d6c2, 0, 0, 0, g(Yes, No, false, false, "", "α")}, - {0x1d6c3, 0, 0, 0, g(Yes, No, false, false, "", "β")}, - {0x1d6c4, 0, 0, 0, g(Yes, No, false, false, "", "γ")}, - {0x1d6c5, 0, 0, 0, g(Yes, No, false, false, "", "δ")}, - {0x1d6c6, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x1d6c7, 0, 0, 0, g(Yes, No, false, false, "", "ζ")}, - {0x1d6c8, 0, 0, 0, g(Yes, No, false, false, "", "η")}, - {0x1d6c9, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1d6ca, 0, 0, 0, g(Yes, No, false, false, "", "ι")}, - {0x1d6cb, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x1d6cc, 0, 0, 0, g(Yes, No, false, false, "", "λ")}, - {0x1d6cd, 0, 0, 0, g(Yes, No, false, false, "", "μ")}, - {0x1d6ce, 0, 0, 0, g(Yes, No, false, false, "", "ν")}, - {0x1d6cf, 0, 0, 0, g(Yes, No, false, false, "", "ξ")}, - {0x1d6d0, 0, 0, 0, g(Yes, No, false, false, "", "ο")}, - {0x1d6d1, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x1d6d2, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d6d3, 0, 0, 0, g(Yes, No, false, false, "", "ς")}, - {0x1d6d4, 0, 0, 0, g(Yes, No, false, false, "", "σ")}, - {0x1d6d5, 0, 0, 0, g(Yes, No, false, false, "", "τ")}, - {0x1d6d6, 0, 0, 0, g(Yes, No, false, false, "", "υ")}, - {0x1d6d7, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d6d8, 0, 0, 0, g(Yes, No, false, false, "", "χ")}, - {0x1d6d9, 0, 0, 0, g(Yes, No, false, false, "", "ψ")}, - {0x1d6da, 0, 0, 0, g(Yes, No, false, false, "", "ω")}, - {0x1d6db, 0, 0, 0, g(Yes, No, false, false, "", "∂")}, - {0x1d6dc, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x1d6dd, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1d6de, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x1d6df, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d6e0, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d6e1, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x1d6e2, 0, 0, 0, g(Yes, No, false, false, "", "Α")}, - {0x1d6e3, 0, 0, 0, g(Yes, No, false, false, "", "Β")}, - {0x1d6e4, 0, 0, 0, g(Yes, No, false, false, "", "Γ")}, - {0x1d6e5, 0, 0, 0, g(Yes, No, false, false, "", "Δ")}, - {0x1d6e6, 0, 0, 0, g(Yes, No, false, false, "", "Ε")}, - {0x1d6e7, 0, 0, 0, g(Yes, No, false, false, "", "Ζ")}, - {0x1d6e8, 0, 0, 0, g(Yes, No, false, false, "", "Η")}, - {0x1d6e9, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x1d6ea, 0, 0, 0, g(Yes, No, false, false, "", "Ι")}, - {0x1d6eb, 0, 0, 0, g(Yes, No, false, false, "", "Κ")}, - {0x1d6ec, 0, 0, 0, g(Yes, No, false, false, "", "Λ")}, - {0x1d6ed, 0, 0, 0, g(Yes, No, false, false, "", "Μ")}, - {0x1d6ee, 0, 0, 0, g(Yes, No, false, false, "", "Ν")}, - {0x1d6ef, 0, 0, 0, g(Yes, No, false, false, "", "Ξ")}, - {0x1d6f0, 0, 0, 0, g(Yes, No, false, false, "", "Ο")}, - {0x1d6f1, 0, 0, 0, g(Yes, No, false, false, "", "Π")}, - {0x1d6f2, 0, 0, 0, g(Yes, No, false, false, "", "Ρ")}, - {0x1d6f3, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x1d6f4, 0, 0, 0, g(Yes, No, false, false, "", "Σ")}, - {0x1d6f5, 0, 0, 0, g(Yes, No, false, false, "", "Τ")}, - {0x1d6f6, 0, 0, 0, g(Yes, No, false, false, "", "Υ")}, - {0x1d6f7, 0, 0, 0, g(Yes, No, false, false, "", "Φ")}, - {0x1d6f8, 0, 0, 0, g(Yes, No, false, false, "", "Χ")}, - {0x1d6f9, 0, 0, 0, g(Yes, No, false, false, "", "Ψ")}, - {0x1d6fa, 0, 0, 0, g(Yes, No, false, false, "", "Ω")}, - {0x1d6fb, 0, 0, 0, g(Yes, No, false, false, "", "∇")}, - {0x1d6fc, 0, 0, 0, g(Yes, No, false, false, "", "α")}, - {0x1d6fd, 0, 0, 0, g(Yes, No, false, false, "", "β")}, - {0x1d6fe, 0, 0, 0, g(Yes, No, false, false, "", "γ")}, - {0x1d6ff, 0, 0, 0, g(Yes, No, false, false, "", "δ")}, - {0x1d700, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x1d701, 0, 0, 0, g(Yes, No, false, false, "", "ζ")}, - {0x1d702, 0, 0, 0, g(Yes, No, false, false, "", "η")}, - {0x1d703, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1d704, 0, 0, 0, g(Yes, No, false, false, "", "ι")}, - {0x1d705, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x1d706, 0, 0, 0, g(Yes, No, false, false, "", "λ")}, - {0x1d707, 0, 0, 0, g(Yes, No, false, false, "", "μ")}, - {0x1d708, 0, 0, 0, g(Yes, No, false, false, "", "ν")}, - {0x1d709, 0, 0, 0, g(Yes, No, false, false, "", "ξ")}, - {0x1d70a, 0, 0, 0, g(Yes, No, false, false, "", "ο")}, - {0x1d70b, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x1d70c, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d70d, 0, 0, 0, g(Yes, No, false, false, "", "ς")}, - {0x1d70e, 0, 0, 0, g(Yes, No, false, false, "", "σ")}, - {0x1d70f, 0, 0, 0, g(Yes, No, false, false, "", "τ")}, - {0x1d710, 0, 0, 0, g(Yes, No, false, false, "", "υ")}, - {0x1d711, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d712, 0, 0, 0, g(Yes, No, false, false, "", "χ")}, - {0x1d713, 0, 0, 0, g(Yes, No, false, false, "", "ψ")}, - {0x1d714, 0, 0, 0, g(Yes, No, false, false, "", "ω")}, - {0x1d715, 0, 0, 0, g(Yes, No, false, false, "", "∂")}, - {0x1d716, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x1d717, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1d718, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x1d719, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d71a, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d71b, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x1d71c, 0, 0, 0, g(Yes, No, false, false, "", "Α")}, - {0x1d71d, 0, 0, 0, g(Yes, No, false, false, "", "Β")}, - {0x1d71e, 0, 0, 0, g(Yes, No, false, false, "", "Γ")}, - {0x1d71f, 0, 0, 0, g(Yes, No, false, false, "", "Δ")}, - {0x1d720, 0, 0, 0, g(Yes, No, false, false, "", "Ε")}, - {0x1d721, 0, 0, 0, g(Yes, No, false, false, "", "Ζ")}, - {0x1d722, 0, 0, 0, g(Yes, No, false, false, "", "Η")}, - {0x1d723, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x1d724, 0, 0, 0, g(Yes, No, false, false, "", "Ι")}, - {0x1d725, 0, 0, 0, g(Yes, No, false, false, "", "Κ")}, - {0x1d726, 0, 0, 0, g(Yes, No, false, false, "", "Λ")}, - {0x1d727, 0, 0, 0, g(Yes, No, false, false, "", "Μ")}, - {0x1d728, 0, 0, 0, g(Yes, No, false, false, "", "Ν")}, - {0x1d729, 0, 0, 0, g(Yes, No, false, false, "", "Ξ")}, - {0x1d72a, 0, 0, 0, g(Yes, No, false, false, "", "Ο")}, - {0x1d72b, 0, 0, 0, g(Yes, No, false, false, "", "Π")}, - {0x1d72c, 0, 0, 0, g(Yes, No, false, false, "", "Ρ")}, - {0x1d72d, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x1d72e, 0, 0, 0, g(Yes, No, false, false, "", "Σ")}, - {0x1d72f, 0, 0, 0, g(Yes, No, false, false, "", "Τ")}, - {0x1d730, 0, 0, 0, g(Yes, No, false, false, "", "Υ")}, - {0x1d731, 0, 0, 0, g(Yes, No, false, false, "", "Φ")}, - {0x1d732, 0, 0, 0, g(Yes, No, false, false, "", "Χ")}, - {0x1d733, 0, 0, 0, g(Yes, No, false, false, "", "Ψ")}, - {0x1d734, 0, 0, 0, g(Yes, No, false, false, "", "Ω")}, - {0x1d735, 0, 0, 0, g(Yes, No, false, false, "", "∇")}, - {0x1d736, 0, 0, 0, g(Yes, No, false, false, "", "α")}, - {0x1d737, 0, 0, 0, g(Yes, No, false, false, "", "β")}, - {0x1d738, 0, 0, 0, g(Yes, No, false, false, "", "γ")}, - {0x1d739, 0, 0, 0, g(Yes, No, false, false, "", "δ")}, - {0x1d73a, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x1d73b, 0, 0, 0, g(Yes, No, false, false, "", "ζ")}, - {0x1d73c, 0, 0, 0, g(Yes, No, false, false, "", "η")}, - {0x1d73d, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1d73e, 0, 0, 0, g(Yes, No, false, false, "", "ι")}, - {0x1d73f, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x1d740, 0, 0, 0, g(Yes, No, false, false, "", "λ")}, - {0x1d741, 0, 0, 0, g(Yes, No, false, false, "", "μ")}, - {0x1d742, 0, 0, 0, g(Yes, No, false, false, "", "ν")}, - {0x1d743, 0, 0, 0, g(Yes, No, false, false, "", "ξ")}, - {0x1d744, 0, 0, 0, g(Yes, No, false, false, "", "ο")}, - {0x1d745, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x1d746, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d747, 0, 0, 0, g(Yes, No, false, false, "", "ς")}, - {0x1d748, 0, 0, 0, g(Yes, No, false, false, "", "σ")}, - {0x1d749, 0, 0, 0, g(Yes, No, false, false, "", "τ")}, - {0x1d74a, 0, 0, 0, g(Yes, No, false, false, "", "υ")}, - {0x1d74b, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d74c, 0, 0, 0, g(Yes, No, false, false, "", "χ")}, - {0x1d74d, 0, 0, 0, g(Yes, No, false, false, "", "ψ")}, - {0x1d74e, 0, 0, 0, g(Yes, No, false, false, "", "ω")}, - {0x1d74f, 0, 0, 0, g(Yes, No, false, false, "", "∂")}, - {0x1d750, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x1d751, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1d752, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x1d753, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d754, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d755, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x1d756, 0, 0, 0, g(Yes, No, false, false, "", "Α")}, - {0x1d757, 0, 0, 0, g(Yes, No, false, false, "", "Β")}, - {0x1d758, 0, 0, 0, g(Yes, No, false, false, "", "Γ")}, - {0x1d759, 0, 0, 0, g(Yes, No, false, false, "", "Δ")}, - {0x1d75a, 0, 0, 0, g(Yes, No, false, false, "", "Ε")}, - {0x1d75b, 0, 0, 0, g(Yes, No, false, false, "", "Ζ")}, - {0x1d75c, 0, 0, 0, g(Yes, No, false, false, "", "Η")}, - {0x1d75d, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x1d75e, 0, 0, 0, g(Yes, No, false, false, "", "Ι")}, - {0x1d75f, 0, 0, 0, g(Yes, No, false, false, "", "Κ")}, - {0x1d760, 0, 0, 0, g(Yes, No, false, false, "", "Λ")}, - {0x1d761, 0, 0, 0, g(Yes, No, false, false, "", "Μ")}, - {0x1d762, 0, 0, 0, g(Yes, No, false, false, "", "Ν")}, - {0x1d763, 0, 0, 0, g(Yes, No, false, false, "", "Ξ")}, - {0x1d764, 0, 0, 0, g(Yes, No, false, false, "", "Ο")}, - {0x1d765, 0, 0, 0, g(Yes, No, false, false, "", "Π")}, - {0x1d766, 0, 0, 0, g(Yes, No, false, false, "", "Ρ")}, - {0x1d767, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x1d768, 0, 0, 0, g(Yes, No, false, false, "", "Σ")}, - {0x1d769, 0, 0, 0, g(Yes, No, false, false, "", "Τ")}, - {0x1d76a, 0, 0, 0, g(Yes, No, false, false, "", "Υ")}, - {0x1d76b, 0, 0, 0, g(Yes, No, false, false, "", "Φ")}, - {0x1d76c, 0, 0, 0, g(Yes, No, false, false, "", "Χ")}, - {0x1d76d, 0, 0, 0, g(Yes, No, false, false, "", "Ψ")}, - {0x1d76e, 0, 0, 0, g(Yes, No, false, false, "", "Ω")}, - {0x1d76f, 0, 0, 0, g(Yes, No, false, false, "", "∇")}, - {0x1d770, 0, 0, 0, g(Yes, No, false, false, "", "α")}, - {0x1d771, 0, 0, 0, g(Yes, No, false, false, "", "β")}, - {0x1d772, 0, 0, 0, g(Yes, No, false, false, "", "γ")}, - {0x1d773, 0, 0, 0, g(Yes, No, false, false, "", "δ")}, - {0x1d774, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x1d775, 0, 0, 0, g(Yes, No, false, false, "", "ζ")}, - {0x1d776, 0, 0, 0, g(Yes, No, false, false, "", "η")}, - {0x1d777, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1d778, 0, 0, 0, g(Yes, No, false, false, "", "ι")}, - {0x1d779, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x1d77a, 0, 0, 0, g(Yes, No, false, false, "", "λ")}, - {0x1d77b, 0, 0, 0, g(Yes, No, false, false, "", "μ")}, - {0x1d77c, 0, 0, 0, g(Yes, No, false, false, "", "ν")}, - {0x1d77d, 0, 0, 0, g(Yes, No, false, false, "", "ξ")}, - {0x1d77e, 0, 0, 0, g(Yes, No, false, false, "", "ο")}, - {0x1d77f, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x1d780, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d781, 0, 0, 0, g(Yes, No, false, false, "", "ς")}, - {0x1d782, 0, 0, 0, g(Yes, No, false, false, "", "σ")}, - {0x1d783, 0, 0, 0, g(Yes, No, false, false, "", "τ")}, - {0x1d784, 0, 0, 0, g(Yes, No, false, false, "", "υ")}, - {0x1d785, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d786, 0, 0, 0, g(Yes, No, false, false, "", "χ")}, - {0x1d787, 0, 0, 0, g(Yes, No, false, false, "", "ψ")}, - {0x1d788, 0, 0, 0, g(Yes, No, false, false, "", "ω")}, - {0x1d789, 0, 0, 0, g(Yes, No, false, false, "", "∂")}, - {0x1d78a, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x1d78b, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1d78c, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x1d78d, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d78e, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d78f, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x1d790, 0, 0, 0, g(Yes, No, false, false, "", "Α")}, - {0x1d791, 0, 0, 0, g(Yes, No, false, false, "", "Β")}, - {0x1d792, 0, 0, 0, g(Yes, No, false, false, "", "Γ")}, - {0x1d793, 0, 0, 0, g(Yes, No, false, false, "", "Δ")}, - {0x1d794, 0, 0, 0, g(Yes, No, false, false, "", "Ε")}, - {0x1d795, 0, 0, 0, g(Yes, No, false, false, "", "Ζ")}, - {0x1d796, 0, 0, 0, g(Yes, No, false, false, "", "Η")}, - {0x1d797, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x1d798, 0, 0, 0, g(Yes, No, false, false, "", "Ι")}, - {0x1d799, 0, 0, 0, g(Yes, No, false, false, "", "Κ")}, - {0x1d79a, 0, 0, 0, g(Yes, No, false, false, "", "Λ")}, - {0x1d79b, 0, 0, 0, g(Yes, No, false, false, "", "Μ")}, - {0x1d79c, 0, 0, 0, g(Yes, No, false, false, "", "Ν")}, - {0x1d79d, 0, 0, 0, g(Yes, No, false, false, "", "Ξ")}, - {0x1d79e, 0, 0, 0, g(Yes, No, false, false, "", "Ο")}, - {0x1d79f, 0, 0, 0, g(Yes, No, false, false, "", "Π")}, - {0x1d7a0, 0, 0, 0, g(Yes, No, false, false, "", "Ρ")}, - {0x1d7a1, 0, 0, 0, g(Yes, No, false, false, "", "Θ")}, - {0x1d7a2, 0, 0, 0, g(Yes, No, false, false, "", "Σ")}, - {0x1d7a3, 0, 0, 0, g(Yes, No, false, false, "", "Τ")}, - {0x1d7a4, 0, 0, 0, g(Yes, No, false, false, "", "Υ")}, - {0x1d7a5, 0, 0, 0, g(Yes, No, false, false, "", "Φ")}, - {0x1d7a6, 0, 0, 0, g(Yes, No, false, false, "", "Χ")}, - {0x1d7a7, 0, 0, 0, g(Yes, No, false, false, "", "Ψ")}, - {0x1d7a8, 0, 0, 0, g(Yes, No, false, false, "", "Ω")}, - {0x1d7a9, 0, 0, 0, g(Yes, No, false, false, "", "∇")}, - {0x1d7aa, 0, 0, 0, g(Yes, No, false, false, "", "α")}, - {0x1d7ab, 0, 0, 0, g(Yes, No, false, false, "", "β")}, - {0x1d7ac, 0, 0, 0, g(Yes, No, false, false, "", "γ")}, - {0x1d7ad, 0, 0, 0, g(Yes, No, false, false, "", "δ")}, - {0x1d7ae, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x1d7af, 0, 0, 0, g(Yes, No, false, false, "", "ζ")}, - {0x1d7b0, 0, 0, 0, g(Yes, No, false, false, "", "η")}, - {0x1d7b1, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1d7b2, 0, 0, 0, g(Yes, No, false, false, "", "ι")}, - {0x1d7b3, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x1d7b4, 0, 0, 0, g(Yes, No, false, false, "", "λ")}, - {0x1d7b5, 0, 0, 0, g(Yes, No, false, false, "", "μ")}, - {0x1d7b6, 0, 0, 0, g(Yes, No, false, false, "", "ν")}, - {0x1d7b7, 0, 0, 0, g(Yes, No, false, false, "", "ξ")}, - {0x1d7b8, 0, 0, 0, g(Yes, No, false, false, "", "ο")}, - {0x1d7b9, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x1d7ba, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d7bb, 0, 0, 0, g(Yes, No, false, false, "", "ς")}, - {0x1d7bc, 0, 0, 0, g(Yes, No, false, false, "", "σ")}, - {0x1d7bd, 0, 0, 0, g(Yes, No, false, false, "", "τ")}, - {0x1d7be, 0, 0, 0, g(Yes, No, false, false, "", "υ")}, - {0x1d7bf, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d7c0, 0, 0, 0, g(Yes, No, false, false, "", "χ")}, - {0x1d7c1, 0, 0, 0, g(Yes, No, false, false, "", "ψ")}, - {0x1d7c2, 0, 0, 0, g(Yes, No, false, false, "", "ω")}, - {0x1d7c3, 0, 0, 0, g(Yes, No, false, false, "", "∂")}, - {0x1d7c4, 0, 0, 0, g(Yes, No, false, false, "", "ε")}, - {0x1d7c5, 0, 0, 0, g(Yes, No, false, false, "", "θ")}, - {0x1d7c6, 0, 0, 0, g(Yes, No, false, false, "", "κ")}, - {0x1d7c7, 0, 0, 0, g(Yes, No, false, false, "", "φ")}, - {0x1d7c8, 0, 0, 0, g(Yes, No, false, false, "", "ρ")}, - {0x1d7c9, 0, 0, 0, g(Yes, No, false, false, "", "π")}, - {0x1d7ca, 0, 0, 0, g(Yes, No, false, false, "", "Ϝ")}, - {0x1d7cb, 0, 0, 0, g(Yes, No, false, false, "", "ϝ")}, - {0x1d7cc, 0, 0, 0, f(Yes, false, "")}, - {0x1d7ce, 0, 0, 0, g(Yes, No, false, false, "", "0")}, - {0x1d7cf, 0, 0, 0, g(Yes, No, false, false, "", "1")}, - {0x1d7d0, 0, 0, 0, g(Yes, No, false, false, "", "2")}, - {0x1d7d1, 0, 0, 0, g(Yes, No, false, false, "", "3")}, - {0x1d7d2, 0, 0, 0, g(Yes, No, false, false, "", "4")}, - {0x1d7d3, 0, 0, 0, g(Yes, No, false, false, "", "5")}, - {0x1d7d4, 0, 0, 0, g(Yes, No, false, false, "", "6")}, - {0x1d7d5, 0, 0, 0, g(Yes, No, false, false, "", "7")}, - {0x1d7d6, 0, 0, 0, g(Yes, No, false, false, "", "8")}, - {0x1d7d7, 0, 0, 0, g(Yes, No, false, false, "", "9")}, - {0x1d7d8, 0, 0, 0, g(Yes, No, false, false, "", "0")}, - {0x1d7d9, 0, 0, 0, g(Yes, No, false, false, "", "1")}, - {0x1d7da, 0, 0, 0, g(Yes, No, false, false, "", "2")}, - {0x1d7db, 0, 0, 0, g(Yes, No, false, false, "", "3")}, - {0x1d7dc, 0, 0, 0, g(Yes, No, false, false, "", "4")}, - {0x1d7dd, 0, 0, 0, g(Yes, No, false, false, "", "5")}, - {0x1d7de, 0, 0, 0, g(Yes, No, false, false, "", "6")}, - {0x1d7df, 0, 0, 0, g(Yes, No, false, false, "", "7")}, - {0x1d7e0, 0, 0, 0, g(Yes, No, false, false, "", "8")}, - {0x1d7e1, 0, 0, 0, g(Yes, No, false, false, "", "9")}, - {0x1d7e2, 0, 0, 0, g(Yes, No, false, false, "", "0")}, - {0x1d7e3, 0, 0, 0, g(Yes, No, false, false, "", "1")}, - {0x1d7e4, 0, 0, 0, g(Yes, No, false, false, "", "2")}, - {0x1d7e5, 0, 0, 0, g(Yes, No, false, false, "", "3")}, - {0x1d7e6, 0, 0, 0, g(Yes, No, false, false, "", "4")}, - {0x1d7e7, 0, 0, 0, g(Yes, No, false, false, "", "5")}, - {0x1d7e8, 0, 0, 0, g(Yes, No, false, false, "", "6")}, - {0x1d7e9, 0, 0, 0, g(Yes, No, false, false, "", "7")}, - {0x1d7ea, 0, 0, 0, g(Yes, No, false, false, "", "8")}, - {0x1d7eb, 0, 0, 0, g(Yes, No, false, false, "", "9")}, - {0x1d7ec, 0, 0, 0, g(Yes, No, false, false, "", "0")}, - {0x1d7ed, 0, 0, 0, g(Yes, No, false, false, "", "1")}, - {0x1d7ee, 0, 0, 0, g(Yes, No, false, false, "", "2")}, - {0x1d7ef, 0, 0, 0, g(Yes, No, false, false, "", "3")}, - {0x1d7f0, 0, 0, 0, g(Yes, No, false, false, "", "4")}, - {0x1d7f1, 0, 0, 0, g(Yes, No, false, false, "", "5")}, - {0x1d7f2, 0, 0, 0, g(Yes, No, false, false, "", "6")}, - {0x1d7f3, 0, 0, 0, g(Yes, No, false, false, "", "7")}, - {0x1d7f4, 0, 0, 0, g(Yes, No, false, false, "", "8")}, - {0x1d7f5, 0, 0, 0, g(Yes, No, false, false, "", "9")}, - {0x1d7f6, 0, 0, 0, g(Yes, No, false, false, "", "0")}, - {0x1d7f7, 0, 0, 0, g(Yes, No, false, false, "", "1")}, - {0x1d7f8, 0, 0, 0, g(Yes, No, false, false, "", "2")}, - {0x1d7f9, 0, 0, 0, g(Yes, No, false, false, "", "3")}, - {0x1d7fa, 0, 0, 0, g(Yes, No, false, false, "", "4")}, - {0x1d7fb, 0, 0, 0, g(Yes, No, false, false, "", "5")}, - {0x1d7fc, 0, 0, 0, g(Yes, No, false, false, "", "6")}, - {0x1d7fd, 0, 0, 0, g(Yes, No, false, false, "", "7")}, - {0x1d7fe, 0, 0, 0, g(Yes, No, false, false, "", "8")}, - {0x1d7ff, 0, 0, 0, g(Yes, No, false, false, "", "9")}, - {0x1d800, 0, 0, 0, f(Yes, false, "")}, - {0x1e000, 230, 1, 1, f(Yes, false, "")}, - {0x1e007, 0, 0, 0, f(Yes, false, "")}, - {0x1e008, 230, 1, 1, f(Yes, false, "")}, - {0x1e019, 0, 0, 0, f(Yes, false, "")}, - {0x1e01b, 230, 1, 1, f(Yes, false, "")}, - {0x1e022, 0, 0, 0, f(Yes, false, "")}, - {0x1e023, 230, 1, 1, f(Yes, false, "")}, - {0x1e025, 0, 0, 0, f(Yes, false, "")}, - {0x1e026, 230, 1, 1, f(Yes, false, "")}, - {0x1e02b, 0, 0, 0, f(Yes, false, "")}, - {0x1e8d0, 220, 1, 1, f(Yes, false, "")}, - {0x1e8d7, 0, 0, 0, f(Yes, false, "")}, - {0x1e944, 230, 1, 1, f(Yes, false, "")}, - {0x1e94a, 7, 1, 1, f(Yes, false, "")}, - {0x1e94b, 0, 0, 0, f(Yes, false, "")}, - {0x1ee00, 0, 0, 0, g(Yes, No, false, false, "", "ا")}, - {0x1ee01, 0, 0, 0, g(Yes, No, false, false, "", "ب")}, - {0x1ee02, 0, 0, 0, g(Yes, No, false, false, "", "ج")}, - {0x1ee03, 0, 0, 0, g(Yes, No, false, false, "", "د")}, - {0x1ee04, 0, 0, 0, f(Yes, false, "")}, - {0x1ee05, 0, 0, 0, g(Yes, No, false, false, "", "و")}, - {0x1ee06, 0, 0, 0, g(Yes, No, false, false, "", "ز")}, - {0x1ee07, 0, 0, 0, g(Yes, No, false, false, "", "ح")}, - {0x1ee08, 0, 0, 0, g(Yes, No, false, false, "", "ط")}, - {0x1ee09, 0, 0, 0, g(Yes, No, false, false, "", "ي")}, - {0x1ee0a, 0, 0, 0, g(Yes, No, false, false, "", "ك")}, - {0x1ee0b, 0, 0, 0, g(Yes, No, false, false, "", "ل")}, - {0x1ee0c, 0, 0, 0, g(Yes, No, false, false, "", "م")}, - {0x1ee0d, 0, 0, 0, g(Yes, No, false, false, "", "ن")}, - {0x1ee0e, 0, 0, 0, g(Yes, No, false, false, "", "س")}, - {0x1ee0f, 0, 0, 0, g(Yes, No, false, false, "", "ع")}, - {0x1ee10, 0, 0, 0, g(Yes, No, false, false, "", "ف")}, - {0x1ee11, 0, 0, 0, g(Yes, No, false, false, "", "ص")}, - {0x1ee12, 0, 0, 0, g(Yes, No, false, false, "", "ق")}, - {0x1ee13, 0, 0, 0, g(Yes, No, false, false, "", "ر")}, - {0x1ee14, 0, 0, 0, g(Yes, No, false, false, "", "ش")}, - {0x1ee15, 0, 0, 0, g(Yes, No, false, false, "", "ت")}, - {0x1ee16, 0, 0, 0, g(Yes, No, false, false, "", "ث")}, - {0x1ee17, 0, 0, 0, g(Yes, No, false, false, "", "خ")}, - {0x1ee18, 0, 0, 0, g(Yes, No, false, false, "", "ذ")}, - {0x1ee19, 0, 0, 0, g(Yes, No, false, false, "", "ض")}, - {0x1ee1a, 0, 0, 0, g(Yes, No, false, false, "", "ظ")}, - {0x1ee1b, 0, 0, 0, g(Yes, No, false, false, "", "غ")}, - {0x1ee1c, 0, 0, 0, g(Yes, No, false, false, "", "ٮ")}, - {0x1ee1d, 0, 0, 0, g(Yes, No, false, false, "", "ں")}, - {0x1ee1e, 0, 0, 0, g(Yes, No, false, false, "", "ڡ")}, - {0x1ee1f, 0, 0, 0, g(Yes, No, false, false, "", "ٯ")}, - {0x1ee20, 0, 0, 0, f(Yes, false, "")}, - {0x1ee21, 0, 0, 0, g(Yes, No, false, false, "", "ب")}, - {0x1ee22, 0, 0, 0, g(Yes, No, false, false, "", "ج")}, - {0x1ee23, 0, 0, 0, f(Yes, false, "")}, - {0x1ee24, 0, 0, 0, g(Yes, No, false, false, "", "ه")}, - {0x1ee25, 0, 0, 0, f(Yes, false, "")}, - {0x1ee27, 0, 0, 0, g(Yes, No, false, false, "", "ح")}, - {0x1ee28, 0, 0, 0, f(Yes, false, "")}, - {0x1ee29, 0, 0, 0, g(Yes, No, false, false, "", "ي")}, - {0x1ee2a, 0, 0, 0, g(Yes, No, false, false, "", "ك")}, - {0x1ee2b, 0, 0, 0, g(Yes, No, false, false, "", "ل")}, - {0x1ee2c, 0, 0, 0, g(Yes, No, false, false, "", "م")}, - {0x1ee2d, 0, 0, 0, g(Yes, No, false, false, "", "ن")}, - {0x1ee2e, 0, 0, 0, g(Yes, No, false, false, "", "س")}, - {0x1ee2f, 0, 0, 0, g(Yes, No, false, false, "", "ع")}, - {0x1ee30, 0, 0, 0, g(Yes, No, false, false, "", "ف")}, - {0x1ee31, 0, 0, 0, g(Yes, No, false, false, "", "ص")}, - {0x1ee32, 0, 0, 0, g(Yes, No, false, false, "", "ق")}, - {0x1ee33, 0, 0, 0, f(Yes, false, "")}, - {0x1ee34, 0, 0, 0, g(Yes, No, false, false, "", "ش")}, - {0x1ee35, 0, 0, 0, g(Yes, No, false, false, "", "ت")}, - {0x1ee36, 0, 0, 0, g(Yes, No, false, false, "", "ث")}, - {0x1ee37, 0, 0, 0, g(Yes, No, false, false, "", "خ")}, - {0x1ee38, 0, 0, 0, f(Yes, false, "")}, - {0x1ee39, 0, 0, 0, g(Yes, No, false, false, "", "ض")}, - {0x1ee3a, 0, 0, 0, f(Yes, false, "")}, - {0x1ee3b, 0, 0, 0, g(Yes, No, false, false, "", "غ")}, - {0x1ee3c, 0, 0, 0, f(Yes, false, "")}, - {0x1ee42, 0, 0, 0, g(Yes, No, false, false, "", "ج")}, - {0x1ee43, 0, 0, 0, f(Yes, false, "")}, - {0x1ee47, 0, 0, 0, g(Yes, No, false, false, "", "ح")}, - {0x1ee48, 0, 0, 0, f(Yes, false, "")}, - {0x1ee49, 0, 0, 0, g(Yes, No, false, false, "", "ي")}, - {0x1ee4a, 0, 0, 0, f(Yes, false, "")}, - {0x1ee4b, 0, 0, 0, g(Yes, No, false, false, "", "ل")}, - {0x1ee4c, 0, 0, 0, f(Yes, false, "")}, - {0x1ee4d, 0, 0, 0, g(Yes, No, false, false, "", "ن")}, - {0x1ee4e, 0, 0, 0, g(Yes, No, false, false, "", "س")}, - {0x1ee4f, 0, 0, 0, g(Yes, No, false, false, "", "ع")}, - {0x1ee50, 0, 0, 0, f(Yes, false, "")}, - {0x1ee51, 0, 0, 0, g(Yes, No, false, false, "", "ص")}, - {0x1ee52, 0, 0, 0, g(Yes, No, false, false, "", "ق")}, - {0x1ee53, 0, 0, 0, f(Yes, false, "")}, - {0x1ee54, 0, 0, 0, g(Yes, No, false, false, "", "ش")}, - {0x1ee55, 0, 0, 0, f(Yes, false, "")}, - {0x1ee57, 0, 0, 0, g(Yes, No, false, false, "", "خ")}, - {0x1ee58, 0, 0, 0, f(Yes, false, "")}, - {0x1ee59, 0, 0, 0, g(Yes, No, false, false, "", "ض")}, - {0x1ee5a, 0, 0, 0, f(Yes, false, "")}, - {0x1ee5b, 0, 0, 0, g(Yes, No, false, false, "", "غ")}, - {0x1ee5c, 0, 0, 0, f(Yes, false, "")}, - {0x1ee5d, 0, 0, 0, g(Yes, No, false, false, "", "ں")}, - {0x1ee5e, 0, 0, 0, f(Yes, false, "")}, - {0x1ee5f, 0, 0, 0, g(Yes, No, false, false, "", "ٯ")}, - {0x1ee60, 0, 0, 0, f(Yes, false, "")}, - {0x1ee61, 0, 0, 0, g(Yes, No, false, false, "", "ب")}, - {0x1ee62, 0, 0, 0, g(Yes, No, false, false, "", "ج")}, - {0x1ee63, 0, 0, 0, f(Yes, false, "")}, - {0x1ee64, 0, 0, 0, g(Yes, No, false, false, "", "ه")}, - {0x1ee65, 0, 0, 0, f(Yes, false, "")}, - {0x1ee67, 0, 0, 0, g(Yes, No, false, false, "", "ح")}, - {0x1ee68, 0, 0, 0, g(Yes, No, false, false, "", "ط")}, - {0x1ee69, 0, 0, 0, g(Yes, No, false, false, "", "ي")}, - {0x1ee6a, 0, 0, 0, g(Yes, No, false, false, "", "ك")}, - {0x1ee6b, 0, 0, 0, f(Yes, false, "")}, - {0x1ee6c, 0, 0, 0, g(Yes, No, false, false, "", "م")}, - {0x1ee6d, 0, 0, 0, g(Yes, No, false, false, "", "ن")}, - {0x1ee6e, 0, 0, 0, g(Yes, No, false, false, "", "س")}, - {0x1ee6f, 0, 0, 0, g(Yes, No, false, false, "", "ع")}, - {0x1ee70, 0, 0, 0, g(Yes, No, false, false, "", "ف")}, - {0x1ee71, 0, 0, 0, g(Yes, No, false, false, "", "ص")}, - {0x1ee72, 0, 0, 0, g(Yes, No, false, false, "", "ق")}, - {0x1ee73, 0, 0, 0, f(Yes, false, "")}, - {0x1ee74, 0, 0, 0, g(Yes, No, false, false, "", "ش")}, - {0x1ee75, 0, 0, 0, g(Yes, No, false, false, "", "ت")}, - {0x1ee76, 0, 0, 0, g(Yes, No, false, false, "", "ث")}, - {0x1ee77, 0, 0, 0, g(Yes, No, false, false, "", "خ")}, - {0x1ee78, 0, 0, 0, f(Yes, false, "")}, - {0x1ee79, 0, 0, 0, g(Yes, No, false, false, "", "ض")}, - {0x1ee7a, 0, 0, 0, g(Yes, No, false, false, "", "ظ")}, - {0x1ee7b, 0, 0, 0, g(Yes, No, false, false, "", "غ")}, - {0x1ee7c, 0, 0, 0, g(Yes, No, false, false, "", "ٮ")}, - {0x1ee7d, 0, 0, 0, f(Yes, false, "")}, - {0x1ee7e, 0, 0, 0, g(Yes, No, false, false, "", "ڡ")}, - {0x1ee7f, 0, 0, 0, f(Yes, false, "")}, - {0x1ee80, 0, 0, 0, g(Yes, No, false, false, "", "ا")}, - {0x1ee81, 0, 0, 0, g(Yes, No, false, false, "", "ب")}, - {0x1ee82, 0, 0, 0, g(Yes, No, false, false, "", "ج")}, - {0x1ee83, 0, 0, 0, g(Yes, No, false, false, "", "د")}, - {0x1ee84, 0, 0, 0, g(Yes, No, false, false, "", "ه")}, - {0x1ee85, 0, 0, 0, g(Yes, No, false, false, "", "و")}, - {0x1ee86, 0, 0, 0, g(Yes, No, false, false, "", "ز")}, - {0x1ee87, 0, 0, 0, g(Yes, No, false, false, "", "ح")}, - {0x1ee88, 0, 0, 0, g(Yes, No, false, false, "", "ط")}, - {0x1ee89, 0, 0, 0, g(Yes, No, false, false, "", "ي")}, - {0x1ee8a, 0, 0, 0, f(Yes, false, "")}, - {0x1ee8b, 0, 0, 0, g(Yes, No, false, false, "", "ل")}, - {0x1ee8c, 0, 0, 0, g(Yes, No, false, false, "", "م")}, - {0x1ee8d, 0, 0, 0, g(Yes, No, false, false, "", "ن")}, - {0x1ee8e, 0, 0, 0, g(Yes, No, false, false, "", "س")}, - {0x1ee8f, 0, 0, 0, g(Yes, No, false, false, "", "ع")}, - {0x1ee90, 0, 0, 0, g(Yes, No, false, false, "", "ف")}, - {0x1ee91, 0, 0, 0, g(Yes, No, false, false, "", "ص")}, - {0x1ee92, 0, 0, 0, g(Yes, No, false, false, "", "ق")}, - {0x1ee93, 0, 0, 0, g(Yes, No, false, false, "", "ر")}, - {0x1ee94, 0, 0, 0, g(Yes, No, false, false, "", "ش")}, - {0x1ee95, 0, 0, 0, g(Yes, No, false, false, "", "ت")}, - {0x1ee96, 0, 0, 0, g(Yes, No, false, false, "", "ث")}, - {0x1ee97, 0, 0, 0, g(Yes, No, false, false, "", "خ")}, - {0x1ee98, 0, 0, 0, g(Yes, No, false, false, "", "ذ")}, - {0x1ee99, 0, 0, 0, g(Yes, No, false, false, "", "ض")}, - {0x1ee9a, 0, 0, 0, g(Yes, No, false, false, "", "ظ")}, - {0x1ee9b, 0, 0, 0, g(Yes, No, false, false, "", "غ")}, - {0x1ee9c, 0, 0, 0, f(Yes, false, "")}, - {0x1eea1, 0, 0, 0, g(Yes, No, false, false, "", "ب")}, - {0x1eea2, 0, 0, 0, g(Yes, No, false, false, "", "ج")}, - {0x1eea3, 0, 0, 0, g(Yes, No, false, false, "", "د")}, - {0x1eea4, 0, 0, 0, f(Yes, false, "")}, - {0x1eea5, 0, 0, 0, g(Yes, No, false, false, "", "و")}, - {0x1eea6, 0, 0, 0, g(Yes, No, false, false, "", "ز")}, - {0x1eea7, 0, 0, 0, g(Yes, No, false, false, "", "ح")}, - {0x1eea8, 0, 0, 0, g(Yes, No, false, false, "", "ط")}, - {0x1eea9, 0, 0, 0, g(Yes, No, false, false, "", "ي")}, - {0x1eeaa, 0, 0, 0, f(Yes, false, "")}, - {0x1eeab, 0, 0, 0, g(Yes, No, false, false, "", "ل")}, - {0x1eeac, 0, 0, 0, g(Yes, No, false, false, "", "م")}, - {0x1eead, 0, 0, 0, g(Yes, No, false, false, "", "ن")}, - {0x1eeae, 0, 0, 0, g(Yes, No, false, false, "", "س")}, - {0x1eeaf, 0, 0, 0, g(Yes, No, false, false, "", "ع")}, - {0x1eeb0, 0, 0, 0, g(Yes, No, false, false, "", "ف")}, - {0x1eeb1, 0, 0, 0, g(Yes, No, false, false, "", "ص")}, - {0x1eeb2, 0, 0, 0, g(Yes, No, false, false, "", "ق")}, - {0x1eeb3, 0, 0, 0, g(Yes, No, false, false, "", "ر")}, - {0x1eeb4, 0, 0, 0, g(Yes, No, false, false, "", "ش")}, - {0x1eeb5, 0, 0, 0, g(Yes, No, false, false, "", "ت")}, - {0x1eeb6, 0, 0, 0, g(Yes, No, false, false, "", "ث")}, - {0x1eeb7, 0, 0, 0, g(Yes, No, false, false, "", "خ")}, - {0x1eeb8, 0, 0, 0, g(Yes, No, false, false, "", "ذ")}, - {0x1eeb9, 0, 0, 0, g(Yes, No, false, false, "", "ض")}, - {0x1eeba, 0, 0, 0, g(Yes, No, false, false, "", "ظ")}, - {0x1eebb, 0, 0, 0, g(Yes, No, false, false, "", "غ")}, - {0x1eebc, 0, 0, 0, f(Yes, false, "")}, - {0x1f100, 0, 0, 0, g(Yes, No, false, false, "", "0.")}, - {0x1f101, 0, 0, 0, g(Yes, No, false, false, "", "0,")}, - {0x1f102, 0, 0, 0, g(Yes, No, false, false, "", "1,")}, - {0x1f103, 0, 0, 0, g(Yes, No, false, false, "", "2,")}, - {0x1f104, 0, 0, 0, g(Yes, No, false, false, "", "3,")}, - {0x1f105, 0, 0, 0, g(Yes, No, false, false, "", "4,")}, - {0x1f106, 0, 0, 0, g(Yes, No, false, false, "", "5,")}, - {0x1f107, 0, 0, 0, g(Yes, No, false, false, "", "6,")}, - {0x1f108, 0, 0, 0, g(Yes, No, false, false, "", "7,")}, - {0x1f109, 0, 0, 0, g(Yes, No, false, false, "", "8,")}, - {0x1f10a, 0, 0, 0, g(Yes, No, false, false, "", "9,")}, - {0x1f10b, 0, 0, 0, f(Yes, false, "")}, - {0x1f110, 0, 0, 0, g(Yes, No, false, false, "", "(A)")}, - {0x1f111, 0, 0, 0, g(Yes, No, false, false, "", "(B)")}, - {0x1f112, 0, 0, 0, g(Yes, No, false, false, "", "(C)")}, - {0x1f113, 0, 0, 0, g(Yes, No, false, false, "", "(D)")}, - {0x1f114, 0, 0, 0, g(Yes, No, false, false, "", "(E)")}, - {0x1f115, 0, 0, 0, g(Yes, No, false, false, "", "(F)")}, - {0x1f116, 0, 0, 0, g(Yes, No, false, false, "", "(G)")}, - {0x1f117, 0, 0, 0, g(Yes, No, false, false, "", "(H)")}, - {0x1f118, 0, 0, 0, g(Yes, No, false, false, "", "(I)")}, - {0x1f119, 0, 0, 0, g(Yes, No, false, false, "", "(J)")}, - {0x1f11a, 0, 0, 0, g(Yes, No, false, false, "", "(K)")}, - {0x1f11b, 0, 0, 0, g(Yes, No, false, false, "", "(L)")}, - {0x1f11c, 0, 0, 0, g(Yes, No, false, false, "", "(M)")}, - {0x1f11d, 0, 0, 0, g(Yes, No, false, false, "", "(N)")}, - {0x1f11e, 0, 0, 0, g(Yes, No, false, false, "", "(O)")}, - {0x1f11f, 0, 0, 0, g(Yes, No, false, false, "", "(P)")}, - {0x1f120, 0, 0, 0, g(Yes, No, false, false, "", "(Q)")}, - {0x1f121, 0, 0, 0, g(Yes, No, false, false, "", "(R)")}, - {0x1f122, 0, 0, 0, g(Yes, No, false, false, "", "(S)")}, - {0x1f123, 0, 0, 0, g(Yes, No, false, false, "", "(T)")}, - {0x1f124, 0, 0, 0, g(Yes, No, false, false, "", "(U)")}, - {0x1f125, 0, 0, 0, g(Yes, No, false, false, "", "(V)")}, - {0x1f126, 0, 0, 0, g(Yes, No, false, false, "", "(W)")}, - {0x1f127, 0, 0, 0, g(Yes, No, false, false, "", "(X)")}, - {0x1f128, 0, 0, 0, g(Yes, No, false, false, "", "(Y)")}, - {0x1f129, 0, 0, 0, g(Yes, No, false, false, "", "(Z)")}, - {0x1f12a, 0, 0, 0, g(Yes, No, false, false, "", "〔S〕")}, - {0x1f12b, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1f12c, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1f12d, 0, 0, 0, g(Yes, No, false, false, "", "CD")}, - {0x1f12e, 0, 0, 0, g(Yes, No, false, false, "", "WZ")}, - {0x1f12f, 0, 0, 0, f(Yes, false, "")}, - {0x1f130, 0, 0, 0, g(Yes, No, false, false, "", "A")}, - {0x1f131, 0, 0, 0, g(Yes, No, false, false, "", "B")}, - {0x1f132, 0, 0, 0, g(Yes, No, false, false, "", "C")}, - {0x1f133, 0, 0, 0, g(Yes, No, false, false, "", "D")}, - {0x1f134, 0, 0, 0, g(Yes, No, false, false, "", "E")}, - {0x1f135, 0, 0, 0, g(Yes, No, false, false, "", "F")}, - {0x1f136, 0, 0, 0, g(Yes, No, false, false, "", "G")}, - {0x1f137, 0, 0, 0, g(Yes, No, false, false, "", "H")}, - {0x1f138, 0, 0, 0, g(Yes, No, false, false, "", "I")}, - {0x1f139, 0, 0, 0, g(Yes, No, false, false, "", "J")}, - {0x1f13a, 0, 0, 0, g(Yes, No, false, false, "", "K")}, - {0x1f13b, 0, 0, 0, g(Yes, No, false, false, "", "L")}, - {0x1f13c, 0, 0, 0, g(Yes, No, false, false, "", "M")}, - {0x1f13d, 0, 0, 0, g(Yes, No, false, false, "", "N")}, - {0x1f13e, 0, 0, 0, g(Yes, No, false, false, "", "O")}, - {0x1f13f, 0, 0, 0, g(Yes, No, false, false, "", "P")}, - {0x1f140, 0, 0, 0, g(Yes, No, false, false, "", "Q")}, - {0x1f141, 0, 0, 0, g(Yes, No, false, false, "", "R")}, - {0x1f142, 0, 0, 0, g(Yes, No, false, false, "", "S")}, - {0x1f143, 0, 0, 0, g(Yes, No, false, false, "", "T")}, - {0x1f144, 0, 0, 0, g(Yes, No, false, false, "", "U")}, - {0x1f145, 0, 0, 0, g(Yes, No, false, false, "", "V")}, - {0x1f146, 0, 0, 0, g(Yes, No, false, false, "", "W")}, - {0x1f147, 0, 0, 0, g(Yes, No, false, false, "", "X")}, - {0x1f148, 0, 0, 0, g(Yes, No, false, false, "", "Y")}, - {0x1f149, 0, 0, 0, g(Yes, No, false, false, "", "Z")}, - {0x1f14a, 0, 0, 0, g(Yes, No, false, false, "", "HV")}, - {0x1f14b, 0, 0, 0, g(Yes, No, false, false, "", "MV")}, - {0x1f14c, 0, 0, 0, g(Yes, No, false, false, "", "SD")}, - {0x1f14d, 0, 0, 0, g(Yes, No, false, false, "", "SS")}, - {0x1f14e, 0, 0, 0, g(Yes, No, false, false, "", "PPV")}, - {0x1f14f, 0, 0, 0, g(Yes, No, false, false, "", "WC")}, - {0x1f150, 0, 0, 0, f(Yes, false, "")}, - {0x1f16a, 0, 0, 0, g(Yes, No, false, false, "", "MC")}, - {0x1f16b, 0, 0, 0, g(Yes, No, false, false, "", "MD")}, - {0x1f16c, 0, 0, 0, f(Yes, false, "")}, - {0x1f190, 0, 0, 0, g(Yes, No, false, false, "", "DJ")}, - {0x1f191, 0, 0, 0, f(Yes, false, "")}, - {0x1f200, 0, 0, 0, g(Yes, No, false, false, "", "ほか")}, - {0x1f201, 0, 0, 0, g(Yes, No, false, false, "", "ココ")}, - {0x1f202, 0, 0, 0, g(Yes, No, false, false, "", "サ")}, - {0x1f203, 0, 0, 0, f(Yes, false, "")}, - {0x1f210, 0, 0, 0, g(Yes, No, false, false, "", "手")}, - {0x1f211, 0, 0, 0, g(Yes, No, false, false, "", "字")}, - {0x1f212, 0, 0, 0, g(Yes, No, false, false, "", "双")}, - {0x1f213, 0, 0, 1, g(Yes, No, false, false, "", "デ")}, - {0x1f214, 0, 0, 0, g(Yes, No, false, false, "", "二")}, - {0x1f215, 0, 0, 0, g(Yes, No, false, false, "", "多")}, - {0x1f216, 0, 0, 0, g(Yes, No, false, false, "", "解")}, - {0x1f217, 0, 0, 0, g(Yes, No, false, false, "", "天")}, - {0x1f218, 0, 0, 0, g(Yes, No, false, false, "", "交")}, - {0x1f219, 0, 0, 0, g(Yes, No, false, false, "", "映")}, - {0x1f21a, 0, 0, 0, g(Yes, No, false, false, "", "無")}, - {0x1f21b, 0, 0, 0, g(Yes, No, false, false, "", "料")}, - {0x1f21c, 0, 0, 0, g(Yes, No, false, false, "", "前")}, - {0x1f21d, 0, 0, 0, g(Yes, No, false, false, "", "後")}, - {0x1f21e, 0, 0, 0, g(Yes, No, false, false, "", "再")}, - {0x1f21f, 0, 0, 0, g(Yes, No, false, false, "", "新")}, - {0x1f220, 0, 0, 0, g(Yes, No, false, false, "", "初")}, - {0x1f221, 0, 0, 0, g(Yes, No, false, false, "", "終")}, - {0x1f222, 0, 0, 0, g(Yes, No, false, false, "", "生")}, - {0x1f223, 0, 0, 0, g(Yes, No, false, false, "", "販")}, - {0x1f224, 0, 0, 0, g(Yes, No, false, false, "", "声")}, - {0x1f225, 0, 0, 0, g(Yes, No, false, false, "", "吹")}, - {0x1f226, 0, 0, 0, g(Yes, No, false, false, "", "演")}, - {0x1f227, 0, 0, 0, g(Yes, No, false, false, "", "投")}, - {0x1f228, 0, 0, 0, g(Yes, No, false, false, "", "捕")}, - {0x1f229, 0, 0, 0, g(Yes, No, false, false, "", "一")}, - {0x1f22a, 0, 0, 0, g(Yes, No, false, false, "", "三")}, - {0x1f22b, 0, 0, 0, g(Yes, No, false, false, "", "遊")}, - {0x1f22c, 0, 0, 0, g(Yes, No, false, false, "", "左")}, - {0x1f22d, 0, 0, 0, g(Yes, No, false, false, "", "中")}, - {0x1f22e, 0, 0, 0, g(Yes, No, false, false, "", "右")}, - {0x1f22f, 0, 0, 0, g(Yes, No, false, false, "", "指")}, - {0x1f230, 0, 0, 0, g(Yes, No, false, false, "", "走")}, - {0x1f231, 0, 0, 0, g(Yes, No, false, false, "", "打")}, - {0x1f232, 0, 0, 0, g(Yes, No, false, false, "", "禁")}, - {0x1f233, 0, 0, 0, g(Yes, No, false, false, "", "空")}, - {0x1f234, 0, 0, 0, g(Yes, No, false, false, "", "合")}, - {0x1f235, 0, 0, 0, g(Yes, No, false, false, "", "満")}, - {0x1f236, 0, 0, 0, g(Yes, No, false, false, "", "有")}, - {0x1f237, 0, 0, 0, g(Yes, No, false, false, "", "月")}, - {0x1f238, 0, 0, 0, g(Yes, No, false, false, "", "申")}, - {0x1f239, 0, 0, 0, g(Yes, No, false, false, "", "割")}, - {0x1f23a, 0, 0, 0, g(Yes, No, false, false, "", "営")}, - {0x1f23b, 0, 0, 0, g(Yes, No, false, false, "", "配")}, - {0x1f23c, 0, 0, 0, f(Yes, false, "")}, - {0x1f240, 0, 0, 0, g(Yes, No, false, false, "", "〔本〕")}, - {0x1f241, 0, 0, 0, g(Yes, No, false, false, "", "〔三〕")}, - {0x1f242, 0, 0, 0, g(Yes, No, false, false, "", "〔二〕")}, - {0x1f243, 0, 0, 0, g(Yes, No, false, false, "", "〔安〕")}, - {0x1f244, 0, 0, 0, g(Yes, No, false, false, "", "〔点〕")}, - {0x1f245, 0, 0, 0, g(Yes, No, false, false, "", "〔打〕")}, - {0x1f246, 0, 0, 0, g(Yes, No, false, false, "", "〔盗〕")}, - {0x1f247, 0, 0, 0, g(Yes, No, false, false, "", "〔勝〕")}, - {0x1f248, 0, 0, 0, g(Yes, No, false, false, "", "〔敗〕")}, - {0x1f249, 0, 0, 0, f(Yes, false, "")}, - {0x1f250, 0, 0, 0, g(Yes, No, false, false, "", "得")}, - {0x1f251, 0, 0, 0, g(Yes, No, false, false, "", "可")}, - {0x1f252, 0, 0, 0, f(Yes, false, "")}, - {0x2f800, 0, 0, 0, f(No, false, "丽")}, - {0x2f801, 0, 0, 0, f(No, false, "丸")}, - {0x2f802, 0, 0, 0, f(No, false, "乁")}, - {0x2f803, 0, 0, 0, f(No, false, "𠄢")}, - {0x2f804, 0, 0, 0, f(No, false, "你")}, - {0x2f805, 0, 0, 0, f(No, false, "侮")}, - {0x2f806, 0, 0, 0, f(No, false, "侻")}, - {0x2f807, 0, 0, 0, f(No, false, "倂")}, - {0x2f808, 0, 0, 0, f(No, false, "偺")}, - {0x2f809, 0, 0, 0, f(No, false, "備")}, - {0x2f80a, 0, 0, 0, f(No, false, "僧")}, - {0x2f80b, 0, 0, 0, f(No, false, "像")}, - {0x2f80c, 0, 0, 0, f(No, false, "㒞")}, - {0x2f80d, 0, 0, 0, f(No, false, "𠘺")}, - {0x2f80e, 0, 0, 0, f(No, false, "免")}, - {0x2f80f, 0, 0, 0, f(No, false, "兔")}, - {0x2f810, 0, 0, 0, f(No, false, "兤")}, - {0x2f811, 0, 0, 0, f(No, false, "具")}, - {0x2f812, 0, 0, 0, f(No, false, "𠔜")}, - {0x2f813, 0, 0, 0, f(No, false, "㒹")}, - {0x2f814, 0, 0, 0, f(No, false, "內")}, - {0x2f815, 0, 0, 0, f(No, false, "再")}, - {0x2f816, 0, 0, 0, f(No, false, "𠕋")}, - {0x2f817, 0, 0, 0, f(No, false, "冗")}, - {0x2f818, 0, 0, 0, f(No, false, "冤")}, - {0x2f819, 0, 0, 0, f(No, false, "仌")}, - {0x2f81a, 0, 0, 0, f(No, false, "冬")}, - {0x2f81b, 0, 0, 0, f(No, false, "况")}, - {0x2f81c, 0, 0, 0, f(No, false, "𩇟")}, - {0x2f81d, 0, 0, 0, f(No, false, "凵")}, - {0x2f81e, 0, 0, 0, f(No, false, "刃")}, - {0x2f81f, 0, 0, 0, f(No, false, "㓟")}, - {0x2f820, 0, 0, 0, f(No, false, "刻")}, - {0x2f821, 0, 0, 0, f(No, false, "剆")}, - {0x2f822, 0, 0, 0, f(No, false, "割")}, - {0x2f823, 0, 0, 0, f(No, false, "剷")}, - {0x2f824, 0, 0, 0, f(No, false, "㔕")}, - {0x2f825, 0, 0, 0, f(No, false, "勇")}, - {0x2f826, 0, 0, 0, f(No, false, "勉")}, - {0x2f827, 0, 0, 0, f(No, false, "勤")}, - {0x2f828, 0, 0, 0, f(No, false, "勺")}, - {0x2f829, 0, 0, 0, f(No, false, "包")}, - {0x2f82a, 0, 0, 0, f(No, false, "匆")}, - {0x2f82b, 0, 0, 0, f(No, false, "北")}, - {0x2f82c, 0, 0, 0, f(No, false, "卉")}, - {0x2f82d, 0, 0, 0, f(No, false, "卑")}, - {0x2f82e, 0, 0, 0, f(No, false, "博")}, - {0x2f82f, 0, 0, 0, f(No, false, "即")}, - {0x2f830, 0, 0, 0, f(No, false, "卽")}, - {0x2f831, 0, 0, 0, f(No, false, "卿")}, - {0x2f834, 0, 0, 0, f(No, false, "𠨬")}, - {0x2f835, 0, 0, 0, f(No, false, "灰")}, - {0x2f836, 0, 0, 0, f(No, false, "及")}, - {0x2f837, 0, 0, 0, f(No, false, "叟")}, - {0x2f838, 0, 0, 0, f(No, false, "𠭣")}, - {0x2f839, 0, 0, 0, f(No, false, "叫")}, - {0x2f83a, 0, 0, 0, f(No, false, "叱")}, - {0x2f83b, 0, 0, 0, f(No, false, "吆")}, - {0x2f83c, 0, 0, 0, f(No, false, "咞")}, - {0x2f83d, 0, 0, 0, f(No, false, "吸")}, - {0x2f83e, 0, 0, 0, f(No, false, "呈")}, - {0x2f83f, 0, 0, 0, f(No, false, "周")}, - {0x2f840, 0, 0, 0, f(No, false, "咢")}, - {0x2f841, 0, 0, 0, f(No, false, "哶")}, - {0x2f842, 0, 0, 0, f(No, false, "唐")}, - {0x2f843, 0, 0, 0, f(No, false, "啓")}, - {0x2f844, 0, 0, 0, f(No, false, "啣")}, - {0x2f845, 0, 0, 0, f(No, false, "善")}, - {0x2f847, 0, 0, 0, f(No, false, "喙")}, - {0x2f848, 0, 0, 0, f(No, false, "喫")}, - {0x2f849, 0, 0, 0, f(No, false, "喳")}, - {0x2f84a, 0, 0, 0, f(No, false, "嗂")}, - {0x2f84b, 0, 0, 0, f(No, false, "圖")}, - {0x2f84c, 0, 0, 0, f(No, false, "嘆")}, - {0x2f84d, 0, 0, 0, f(No, false, "圗")}, - {0x2f84e, 0, 0, 0, f(No, false, "噑")}, - {0x2f84f, 0, 0, 0, f(No, false, "噴")}, - {0x2f850, 0, 0, 0, f(No, false, "切")}, - {0x2f851, 0, 0, 0, f(No, false, "壮")}, - {0x2f852, 0, 0, 0, f(No, false, "城")}, - {0x2f853, 0, 0, 0, f(No, false, "埴")}, - {0x2f854, 0, 0, 0, f(No, false, "堍")}, - {0x2f855, 0, 0, 0, f(No, false, "型")}, - {0x2f856, 0, 0, 0, f(No, false, "堲")}, - {0x2f857, 0, 0, 0, f(No, false, "報")}, - {0x2f858, 0, 0, 0, f(No, false, "墬")}, - {0x2f859, 0, 0, 0, f(No, false, "𡓤")}, - {0x2f85a, 0, 0, 0, f(No, false, "売")}, - {0x2f85b, 0, 0, 0, f(No, false, "壷")}, - {0x2f85c, 0, 0, 0, f(No, false, "夆")}, - {0x2f85d, 0, 0, 0, f(No, false, "多")}, - {0x2f85e, 0, 0, 0, f(No, false, "夢")}, - {0x2f85f, 0, 0, 0, f(No, false, "奢")}, - {0x2f860, 0, 0, 0, f(No, false, "𡚨")}, - {0x2f861, 0, 0, 0, f(No, false, "𡛪")}, - {0x2f862, 0, 0, 0, f(No, false, "姬")}, - {0x2f863, 0, 0, 0, f(No, false, "娛")}, - {0x2f864, 0, 0, 0, f(No, false, "娧")}, - {0x2f865, 0, 0, 0, f(No, false, "姘")}, - {0x2f866, 0, 0, 0, f(No, false, "婦")}, - {0x2f867, 0, 0, 0, f(No, false, "㛮")}, - {0x2f868, 0, 0, 0, f(No, false, "㛼")}, - {0x2f869, 0, 0, 0, f(No, false, "嬈")}, - {0x2f86a, 0, 0, 0, f(No, false, "嬾")}, - {0x2f86c, 0, 0, 0, f(No, false, "𡧈")}, - {0x2f86d, 0, 0, 0, f(No, false, "寃")}, - {0x2f86e, 0, 0, 0, f(No, false, "寘")}, - {0x2f86f, 0, 0, 0, f(No, false, "寧")}, - {0x2f870, 0, 0, 0, f(No, false, "寳")}, - {0x2f871, 0, 0, 0, f(No, false, "𡬘")}, - {0x2f872, 0, 0, 0, f(No, false, "寿")}, - {0x2f873, 0, 0, 0, f(No, false, "将")}, - {0x2f874, 0, 0, 0, f(No, false, "当")}, - {0x2f875, 0, 0, 0, f(No, false, "尢")}, - {0x2f876, 0, 0, 0, f(No, false, "㞁")}, - {0x2f877, 0, 0, 0, f(No, false, "屠")}, - {0x2f878, 0, 0, 0, f(No, false, "屮")}, - {0x2f879, 0, 0, 0, f(No, false, "峀")}, - {0x2f87a, 0, 0, 0, f(No, false, "岍")}, - {0x2f87b, 0, 0, 0, f(No, false, "𡷤")}, - {0x2f87c, 0, 0, 0, f(No, false, "嵃")}, - {0x2f87d, 0, 0, 0, f(No, false, "𡷦")}, - {0x2f87e, 0, 0, 0, f(No, false, "嵮")}, - {0x2f87f, 0, 0, 0, f(No, false, "嵫")}, - {0x2f880, 0, 0, 0, f(No, false, "嵼")}, - {0x2f881, 0, 0, 0, f(No, false, "巡")}, - {0x2f882, 0, 0, 0, f(No, false, "巢")}, - {0x2f883, 0, 0, 0, f(No, false, "㠯")}, - {0x2f884, 0, 0, 0, f(No, false, "巽")}, - {0x2f885, 0, 0, 0, f(No, false, "帨")}, - {0x2f886, 0, 0, 0, f(No, false, "帽")}, - {0x2f887, 0, 0, 0, f(No, false, "幩")}, - {0x2f888, 0, 0, 0, f(No, false, "㡢")}, - {0x2f889, 0, 0, 0, f(No, false, "𢆃")}, - {0x2f88a, 0, 0, 0, f(No, false, "㡼")}, - {0x2f88b, 0, 0, 0, f(No, false, "庰")}, - {0x2f88c, 0, 0, 0, f(No, false, "庳")}, - {0x2f88d, 0, 0, 0, f(No, false, "庶")}, - {0x2f88e, 0, 0, 0, f(No, false, "廊")}, - {0x2f88f, 0, 0, 0, f(No, false, "𪎒")}, - {0x2f890, 0, 0, 0, f(No, false, "廾")}, - {0x2f891, 0, 0, 0, f(No, false, "𢌱")}, - {0x2f893, 0, 0, 0, f(No, false, "舁")}, - {0x2f894, 0, 0, 0, f(No, false, "弢")}, - {0x2f896, 0, 0, 0, f(No, false, "㣇")}, - {0x2f897, 0, 0, 0, f(No, false, "𣊸")}, - {0x2f898, 0, 0, 0, f(No, false, "𦇚")}, - {0x2f899, 0, 0, 0, f(No, false, "形")}, - {0x2f89a, 0, 0, 0, f(No, false, "彫")}, - {0x2f89b, 0, 0, 0, f(No, false, "㣣")}, - {0x2f89c, 0, 0, 0, f(No, false, "徚")}, - {0x2f89d, 0, 0, 0, f(No, false, "忍")}, - {0x2f89e, 0, 0, 0, f(No, false, "志")}, - {0x2f89f, 0, 0, 0, f(No, false, "忹")}, - {0x2f8a0, 0, 0, 0, f(No, false, "悁")}, - {0x2f8a1, 0, 0, 0, f(No, false, "㤺")}, - {0x2f8a2, 0, 0, 0, f(No, false, "㤜")}, - {0x2f8a3, 0, 0, 0, f(No, false, "悔")}, - {0x2f8a4, 0, 0, 0, f(No, false, "𢛔")}, - {0x2f8a5, 0, 0, 0, f(No, false, "惇")}, - {0x2f8a6, 0, 0, 0, f(No, false, "慈")}, - {0x2f8a7, 0, 0, 0, f(No, false, "慌")}, - {0x2f8a8, 0, 0, 0, f(No, false, "慎")}, - {0x2f8a9, 0, 0, 0, f(No, false, "慌")}, - {0x2f8aa, 0, 0, 0, f(No, false, "慺")}, - {0x2f8ab, 0, 0, 0, f(No, false, "憎")}, - {0x2f8ac, 0, 0, 0, f(No, false, "憲")}, - {0x2f8ad, 0, 0, 0, f(No, false, "憤")}, - {0x2f8ae, 0, 0, 0, f(No, false, "憯")}, - {0x2f8af, 0, 0, 0, f(No, false, "懞")}, - {0x2f8b0, 0, 0, 0, f(No, false, "懲")}, - {0x2f8b1, 0, 0, 0, f(No, false, "懶")}, - {0x2f8b2, 0, 0, 0, f(No, false, "成")}, - {0x2f8b3, 0, 0, 0, f(No, false, "戛")}, - {0x2f8b4, 0, 0, 0, f(No, false, "扝")}, - {0x2f8b5, 0, 0, 0, f(No, false, "抱")}, - {0x2f8b6, 0, 0, 0, f(No, false, "拔")}, - {0x2f8b7, 0, 0, 0, f(No, false, "捐")}, - {0x2f8b8, 0, 0, 0, f(No, false, "𢬌")}, - {0x2f8b9, 0, 0, 0, f(No, false, "挽")}, - {0x2f8ba, 0, 0, 0, f(No, false, "拼")}, - {0x2f8bb, 0, 0, 0, f(No, false, "捨")}, - {0x2f8bc, 0, 0, 0, f(No, false, "掃")}, - {0x2f8bd, 0, 0, 0, f(No, false, "揤")}, - {0x2f8be, 0, 0, 0, f(No, false, "𢯱")}, - {0x2f8bf, 0, 0, 0, f(No, false, "搢")}, - {0x2f8c0, 0, 0, 0, f(No, false, "揅")}, - {0x2f8c1, 0, 0, 0, f(No, false, "掩")}, - {0x2f8c2, 0, 0, 0, f(No, false, "㨮")}, - {0x2f8c3, 0, 0, 0, f(No, false, "摩")}, - {0x2f8c4, 0, 0, 0, f(No, false, "摾")}, - {0x2f8c5, 0, 0, 0, f(No, false, "撝")}, - {0x2f8c6, 0, 0, 0, f(No, false, "摷")}, - {0x2f8c7, 0, 0, 0, f(No, false, "㩬")}, - {0x2f8c8, 0, 0, 0, f(No, false, "敏")}, - {0x2f8c9, 0, 0, 0, f(No, false, "敬")}, - {0x2f8ca, 0, 0, 0, f(No, false, "𣀊")}, - {0x2f8cb, 0, 0, 0, f(No, false, "旣")}, - {0x2f8cc, 0, 0, 0, f(No, false, "書")}, - {0x2f8cd, 0, 0, 0, f(No, false, "晉")}, - {0x2f8ce, 0, 0, 0, f(No, false, "㬙")}, - {0x2f8cf, 0, 0, 0, f(No, false, "暑")}, - {0x2f8d0, 0, 0, 0, f(No, false, "㬈")}, - {0x2f8d1, 0, 0, 0, f(No, false, "㫤")}, - {0x2f8d2, 0, 0, 0, f(No, false, "冒")}, - {0x2f8d3, 0, 0, 0, f(No, false, "冕")}, - {0x2f8d4, 0, 0, 0, f(No, false, "最")}, - {0x2f8d5, 0, 0, 0, f(No, false, "暜")}, - {0x2f8d6, 0, 0, 0, f(No, false, "肭")}, - {0x2f8d7, 0, 0, 0, f(No, false, "䏙")}, - {0x2f8d8, 0, 0, 0, f(No, false, "朗")}, - {0x2f8d9, 0, 0, 0, f(No, false, "望")}, - {0x2f8da, 0, 0, 0, f(No, false, "朡")}, - {0x2f8db, 0, 0, 0, f(No, false, "杞")}, - {0x2f8dc, 0, 0, 0, f(No, false, "杓")}, - {0x2f8dd, 0, 0, 0, f(No, false, "𣏃")}, - {0x2f8de, 0, 0, 0, f(No, false, "㭉")}, - {0x2f8df, 0, 0, 0, f(No, false, "柺")}, - {0x2f8e0, 0, 0, 0, f(No, false, "枅")}, - {0x2f8e1, 0, 0, 0, f(No, false, "桒")}, - {0x2f8e2, 0, 0, 0, f(No, false, "梅")}, - {0x2f8e3, 0, 0, 0, f(No, false, "𣑭")}, - {0x2f8e4, 0, 0, 0, f(No, false, "梎")}, - {0x2f8e5, 0, 0, 0, f(No, false, "栟")}, - {0x2f8e6, 0, 0, 0, f(No, false, "椔")}, - {0x2f8e7, 0, 0, 0, f(No, false, "㮝")}, - {0x2f8e8, 0, 0, 0, f(No, false, "楂")}, - {0x2f8e9, 0, 0, 0, f(No, false, "榣")}, - {0x2f8ea, 0, 0, 0, f(No, false, "槪")}, - {0x2f8eb, 0, 0, 0, f(No, false, "檨")}, - {0x2f8ec, 0, 0, 0, f(No, false, "𣚣")}, - {0x2f8ed, 0, 0, 0, f(No, false, "櫛")}, - {0x2f8ee, 0, 0, 0, f(No, false, "㰘")}, - {0x2f8ef, 0, 0, 0, f(No, false, "次")}, - {0x2f8f0, 0, 0, 0, f(No, false, "𣢧")}, - {0x2f8f1, 0, 0, 0, f(No, false, "歔")}, - {0x2f8f2, 0, 0, 0, f(No, false, "㱎")}, - {0x2f8f3, 0, 0, 0, f(No, false, "歲")}, - {0x2f8f4, 0, 0, 0, f(No, false, "殟")}, - {0x2f8f5, 0, 0, 0, f(No, false, "殺")}, - {0x2f8f6, 0, 0, 0, f(No, false, "殻")}, - {0x2f8f7, 0, 0, 0, f(No, false, "𣪍")}, - {0x2f8f8, 0, 0, 0, f(No, false, "𡴋")}, - {0x2f8f9, 0, 0, 0, f(No, false, "𣫺")}, - {0x2f8fa, 0, 0, 0, f(No, false, "汎")}, - {0x2f8fb, 0, 0, 0, f(No, false, "𣲼")}, - {0x2f8fc, 0, 0, 0, f(No, false, "沿")}, - {0x2f8fd, 0, 0, 0, f(No, false, "泍")}, - {0x2f8fe, 0, 0, 0, f(No, false, "汧")}, - {0x2f8ff, 0, 0, 0, f(No, false, "洖")}, - {0x2f900, 0, 0, 0, f(No, false, "派")}, - {0x2f901, 0, 0, 0, f(No, false, "海")}, - {0x2f902, 0, 0, 0, f(No, false, "流")}, - {0x2f903, 0, 0, 0, f(No, false, "浩")}, - {0x2f904, 0, 0, 0, f(No, false, "浸")}, - {0x2f905, 0, 0, 0, f(No, false, "涅")}, - {0x2f906, 0, 0, 0, f(No, false, "𣴞")}, - {0x2f907, 0, 0, 0, f(No, false, "洴")}, - {0x2f908, 0, 0, 0, f(No, false, "港")}, - {0x2f909, 0, 0, 0, f(No, false, "湮")}, - {0x2f90a, 0, 0, 0, f(No, false, "㴳")}, - {0x2f90b, 0, 0, 0, f(No, false, "滋")}, - {0x2f90c, 0, 0, 0, f(No, false, "滇")}, - {0x2f90d, 0, 0, 0, f(No, false, "𣻑")}, - {0x2f90e, 0, 0, 0, f(No, false, "淹")}, - {0x2f90f, 0, 0, 0, f(No, false, "潮")}, - {0x2f910, 0, 0, 0, f(No, false, "𣽞")}, - {0x2f911, 0, 0, 0, f(No, false, "𣾎")}, - {0x2f912, 0, 0, 0, f(No, false, "濆")}, - {0x2f913, 0, 0, 0, f(No, false, "瀹")}, - {0x2f914, 0, 0, 0, f(No, false, "瀞")}, - {0x2f915, 0, 0, 0, f(No, false, "瀛")}, - {0x2f916, 0, 0, 0, f(No, false, "㶖")}, - {0x2f917, 0, 0, 0, f(No, false, "灊")}, - {0x2f918, 0, 0, 0, f(No, false, "災")}, - {0x2f919, 0, 0, 0, f(No, false, "灷")}, - {0x2f91a, 0, 0, 0, f(No, false, "炭")}, - {0x2f91b, 0, 0, 0, f(No, false, "𠔥")}, - {0x2f91c, 0, 0, 0, f(No, false, "煅")}, - {0x2f91d, 0, 0, 0, f(No, false, "𤉣")}, - {0x2f91e, 0, 0, 0, f(No, false, "熜")}, - {0x2f91f, 0, 0, 0, f(No, false, "𤎫")}, - {0x2f920, 0, 0, 0, f(No, false, "爨")}, - {0x2f921, 0, 0, 0, f(No, false, "爵")}, - {0x2f922, 0, 0, 0, f(No, false, "牐")}, - {0x2f923, 0, 0, 0, f(No, false, "𤘈")}, - {0x2f924, 0, 0, 0, f(No, false, "犀")}, - {0x2f925, 0, 0, 0, f(No, false, "犕")}, - {0x2f926, 0, 0, 0, f(No, false, "𤜵")}, - {0x2f927, 0, 0, 0, f(No, false, "𤠔")}, - {0x2f928, 0, 0, 0, f(No, false, "獺")}, - {0x2f929, 0, 0, 0, f(No, false, "王")}, - {0x2f92a, 0, 0, 0, f(No, false, "㺬")}, - {0x2f92b, 0, 0, 0, f(No, false, "玥")}, - {0x2f92c, 0, 0, 0, f(No, false, "㺸")}, - {0x2f92e, 0, 0, 0, f(No, false, "瑇")}, - {0x2f92f, 0, 0, 0, f(No, false, "瑜")}, - {0x2f930, 0, 0, 0, f(No, false, "瑱")}, - {0x2f931, 0, 0, 0, f(No, false, "璅")}, - {0x2f932, 0, 0, 0, f(No, false, "瓊")}, - {0x2f933, 0, 0, 0, f(No, false, "㼛")}, - {0x2f934, 0, 0, 0, f(No, false, "甤")}, - {0x2f935, 0, 0, 0, f(No, false, "𤰶")}, - {0x2f936, 0, 0, 0, f(No, false, "甾")}, - {0x2f937, 0, 0, 0, f(No, false, "𤲒")}, - {0x2f938, 0, 0, 0, f(No, false, "異")}, - {0x2f939, 0, 0, 0, f(No, false, "𢆟")}, - {0x2f93a, 0, 0, 0, f(No, false, "瘐")}, - {0x2f93b, 0, 0, 0, f(No, false, "𤾡")}, - {0x2f93c, 0, 0, 0, f(No, false, "𤾸")}, - {0x2f93d, 0, 0, 0, f(No, false, "𥁄")}, - {0x2f93e, 0, 0, 0, f(No, false, "㿼")}, - {0x2f93f, 0, 0, 0, f(No, false, "䀈")}, - {0x2f940, 0, 0, 0, f(No, false, "直")}, - {0x2f941, 0, 0, 0, f(No, false, "𥃳")}, - {0x2f942, 0, 0, 0, f(No, false, "𥃲")}, - {0x2f943, 0, 0, 0, f(No, false, "𥄙")}, - {0x2f944, 0, 0, 0, f(No, false, "𥄳")}, - {0x2f945, 0, 0, 0, f(No, false, "眞")}, - {0x2f946, 0, 0, 0, f(No, false, "真")}, - {0x2f948, 0, 0, 0, f(No, false, "睊")}, - {0x2f949, 0, 0, 0, f(No, false, "䀹")}, - {0x2f94a, 0, 0, 0, f(No, false, "瞋")}, - {0x2f94b, 0, 0, 0, f(No, false, "䁆")}, - {0x2f94c, 0, 0, 0, f(No, false, "䂖")}, - {0x2f94d, 0, 0, 0, f(No, false, "𥐝")}, - {0x2f94e, 0, 0, 0, f(No, false, "硎")}, - {0x2f94f, 0, 0, 0, f(No, false, "碌")}, - {0x2f950, 0, 0, 0, f(No, false, "磌")}, - {0x2f951, 0, 0, 0, f(No, false, "䃣")}, - {0x2f952, 0, 0, 0, f(No, false, "𥘦")}, - {0x2f953, 0, 0, 0, f(No, false, "祖")}, - {0x2f954, 0, 0, 0, f(No, false, "𥚚")}, - {0x2f955, 0, 0, 0, f(No, false, "𥛅")}, - {0x2f956, 0, 0, 0, f(No, false, "福")}, - {0x2f957, 0, 0, 0, f(No, false, "秫")}, - {0x2f958, 0, 0, 0, f(No, false, "䄯")}, - {0x2f959, 0, 0, 0, f(No, false, "穀")}, - {0x2f95a, 0, 0, 0, f(No, false, "穊")}, - {0x2f95b, 0, 0, 0, f(No, false, "穏")}, - {0x2f95c, 0, 0, 0, f(No, false, "𥥼")}, - {0x2f95d, 0, 0, 0, f(No, false, "𥪧")}, - {0x2f95f, 0, 0, 0, f(No, false, "竮")}, - {0x2f960, 0, 0, 0, f(No, false, "䈂")}, - {0x2f961, 0, 0, 0, f(No, false, "𥮫")}, - {0x2f962, 0, 0, 0, f(No, false, "篆")}, - {0x2f963, 0, 0, 0, f(No, false, "築")}, - {0x2f964, 0, 0, 0, f(No, false, "䈧")}, - {0x2f965, 0, 0, 0, f(No, false, "𥲀")}, - {0x2f966, 0, 0, 0, f(No, false, "糒")}, - {0x2f967, 0, 0, 0, f(No, false, "䊠")}, - {0x2f968, 0, 0, 0, f(No, false, "糨")}, - {0x2f969, 0, 0, 0, f(No, false, "糣")}, - {0x2f96a, 0, 0, 0, f(No, false, "紀")}, - {0x2f96b, 0, 0, 0, f(No, false, "𥾆")}, - {0x2f96c, 0, 0, 0, f(No, false, "絣")}, - {0x2f96d, 0, 0, 0, f(No, false, "䌁")}, - {0x2f96e, 0, 0, 0, f(No, false, "緇")}, - {0x2f96f, 0, 0, 0, f(No, false, "縂")}, - {0x2f970, 0, 0, 0, f(No, false, "繅")}, - {0x2f971, 0, 0, 0, f(No, false, "䌴")}, - {0x2f972, 0, 0, 0, f(No, false, "𦈨")}, - {0x2f973, 0, 0, 0, f(No, false, "𦉇")}, - {0x2f974, 0, 0, 0, f(No, false, "䍙")}, - {0x2f975, 0, 0, 0, f(No, false, "𦋙")}, - {0x2f976, 0, 0, 0, f(No, false, "罺")}, - {0x2f977, 0, 0, 0, f(No, false, "𦌾")}, - {0x2f978, 0, 0, 0, f(No, false, "羕")}, - {0x2f979, 0, 0, 0, f(No, false, "翺")}, - {0x2f97a, 0, 0, 0, f(No, false, "者")}, - {0x2f97b, 0, 0, 0, f(No, false, "𦓚")}, - {0x2f97c, 0, 0, 0, f(No, false, "𦔣")}, - {0x2f97d, 0, 0, 0, f(No, false, "聠")}, - {0x2f97e, 0, 0, 0, f(No, false, "𦖨")}, - {0x2f97f, 0, 0, 0, f(No, false, "聰")}, - {0x2f980, 0, 0, 0, f(No, false, "𣍟")}, - {0x2f981, 0, 0, 0, f(No, false, "䏕")}, - {0x2f982, 0, 0, 0, f(No, false, "育")}, - {0x2f983, 0, 0, 0, f(No, false, "脃")}, - {0x2f984, 0, 0, 0, f(No, false, "䐋")}, - {0x2f985, 0, 0, 0, f(No, false, "脾")}, - {0x2f986, 0, 0, 0, f(No, false, "媵")}, - {0x2f987, 0, 0, 0, f(No, false, "𦞧")}, - {0x2f988, 0, 0, 0, f(No, false, "𦞵")}, - {0x2f989, 0, 0, 0, f(No, false, "𣎓")}, - {0x2f98a, 0, 0, 0, f(No, false, "𣎜")}, - {0x2f98b, 0, 0, 0, f(No, false, "舁")}, - {0x2f98c, 0, 0, 0, f(No, false, "舄")}, - {0x2f98d, 0, 0, 0, f(No, false, "辞")}, - {0x2f98e, 0, 0, 0, f(No, false, "䑫")}, - {0x2f98f, 0, 0, 0, f(No, false, "芑")}, - {0x2f990, 0, 0, 0, f(No, false, "芋")}, - {0x2f991, 0, 0, 0, f(No, false, "芝")}, - {0x2f992, 0, 0, 0, f(No, false, "劳")}, - {0x2f993, 0, 0, 0, f(No, false, "花")}, - {0x2f994, 0, 0, 0, f(No, false, "芳")}, - {0x2f995, 0, 0, 0, f(No, false, "芽")}, - {0x2f996, 0, 0, 0, f(No, false, "苦")}, - {0x2f997, 0, 0, 0, f(No, false, "𦬼")}, - {0x2f998, 0, 0, 0, f(No, false, "若")}, - {0x2f999, 0, 0, 0, f(No, false, "茝")}, - {0x2f99a, 0, 0, 0, f(No, false, "荣")}, - {0x2f99b, 0, 0, 0, f(No, false, "莭")}, - {0x2f99c, 0, 0, 0, f(No, false, "茣")}, - {0x2f99d, 0, 0, 0, f(No, false, "莽")}, - {0x2f99e, 0, 0, 0, f(No, false, "菧")}, - {0x2f99f, 0, 0, 0, f(No, false, "著")}, - {0x2f9a0, 0, 0, 0, f(No, false, "荓")}, - {0x2f9a1, 0, 0, 0, f(No, false, "菊")}, - {0x2f9a2, 0, 0, 0, f(No, false, "菌")}, - {0x2f9a3, 0, 0, 0, f(No, false, "菜")}, - {0x2f9a4, 0, 0, 0, f(No, false, "𦰶")}, - {0x2f9a5, 0, 0, 0, f(No, false, "𦵫")}, - {0x2f9a6, 0, 0, 0, f(No, false, "𦳕")}, - {0x2f9a7, 0, 0, 0, f(No, false, "䔫")}, - {0x2f9a8, 0, 0, 0, f(No, false, "蓱")}, - {0x2f9a9, 0, 0, 0, f(No, false, "蓳")}, - {0x2f9aa, 0, 0, 0, f(No, false, "蔖")}, - {0x2f9ab, 0, 0, 0, f(No, false, "𧏊")}, - {0x2f9ac, 0, 0, 0, f(No, false, "蕤")}, - {0x2f9ad, 0, 0, 0, f(No, false, "𦼬")}, - {0x2f9ae, 0, 0, 0, f(No, false, "䕝")}, - {0x2f9af, 0, 0, 0, f(No, false, "䕡")}, - {0x2f9b0, 0, 0, 0, f(No, false, "𦾱")}, - {0x2f9b1, 0, 0, 0, f(No, false, "𧃒")}, - {0x2f9b2, 0, 0, 0, f(No, false, "䕫")}, - {0x2f9b3, 0, 0, 0, f(No, false, "虐")}, - {0x2f9b4, 0, 0, 0, f(No, false, "虜")}, - {0x2f9b5, 0, 0, 0, f(No, false, "虧")}, - {0x2f9b6, 0, 0, 0, f(No, false, "虩")}, - {0x2f9b7, 0, 0, 0, f(No, false, "蚩")}, - {0x2f9b8, 0, 0, 0, f(No, false, "蚈")}, - {0x2f9b9, 0, 0, 0, f(No, false, "蜎")}, - {0x2f9ba, 0, 0, 0, f(No, false, "蛢")}, - {0x2f9bb, 0, 0, 0, f(No, false, "蝹")}, - {0x2f9bc, 0, 0, 0, f(No, false, "蜨")}, - {0x2f9bd, 0, 0, 0, f(No, false, "蝫")}, - {0x2f9be, 0, 0, 0, f(No, false, "螆")}, - {0x2f9bf, 0, 0, 0, f(No, false, "䗗")}, - {0x2f9c0, 0, 0, 0, f(No, false, "蟡")}, - {0x2f9c1, 0, 0, 0, f(No, false, "蠁")}, - {0x2f9c2, 0, 0, 0, f(No, false, "䗹")}, - {0x2f9c3, 0, 0, 0, f(No, false, "衠")}, - {0x2f9c4, 0, 0, 0, f(No, false, "衣")}, - {0x2f9c5, 0, 0, 0, f(No, false, "𧙧")}, - {0x2f9c6, 0, 0, 0, f(No, false, "裗")}, - {0x2f9c7, 0, 0, 0, f(No, false, "裞")}, - {0x2f9c8, 0, 0, 0, f(No, false, "䘵")}, - {0x2f9c9, 0, 0, 0, f(No, false, "裺")}, - {0x2f9ca, 0, 0, 0, f(No, false, "㒻")}, - {0x2f9cb, 0, 0, 0, f(No, false, "𧢮")}, - {0x2f9cc, 0, 0, 0, f(No, false, "𧥦")}, - {0x2f9cd, 0, 0, 0, f(No, false, "䚾")}, - {0x2f9ce, 0, 0, 0, f(No, false, "䛇")}, - {0x2f9cf, 0, 0, 0, f(No, false, "誠")}, - {0x2f9d0, 0, 0, 0, f(No, false, "諭")}, - {0x2f9d1, 0, 0, 0, f(No, false, "變")}, - {0x2f9d2, 0, 0, 0, f(No, false, "豕")}, - {0x2f9d3, 0, 0, 0, f(No, false, "𧲨")}, - {0x2f9d4, 0, 0, 0, f(No, false, "貫")}, - {0x2f9d5, 0, 0, 0, f(No, false, "賁")}, - {0x2f9d6, 0, 0, 0, f(No, false, "贛")}, - {0x2f9d7, 0, 0, 0, f(No, false, "起")}, - {0x2f9d8, 0, 0, 0, f(No, false, "𧼯")}, - {0x2f9d9, 0, 0, 0, f(No, false, "𠠄")}, - {0x2f9da, 0, 0, 0, f(No, false, "跋")}, - {0x2f9db, 0, 0, 0, f(No, false, "趼")}, - {0x2f9dc, 0, 0, 0, f(No, false, "跰")}, - {0x2f9dd, 0, 0, 0, f(No, false, "𠣞")}, - {0x2f9de, 0, 0, 0, f(No, false, "軔")}, - {0x2f9df, 0, 0, 0, f(No, false, "輸")}, - {0x2f9e0, 0, 0, 0, f(No, false, "𨗒")}, - {0x2f9e1, 0, 0, 0, f(No, false, "𨗭")}, - {0x2f9e2, 0, 0, 0, f(No, false, "邔")}, - {0x2f9e3, 0, 0, 0, f(No, false, "郱")}, - {0x2f9e4, 0, 0, 0, f(No, false, "鄑")}, - {0x2f9e5, 0, 0, 0, f(No, false, "𨜮")}, - {0x2f9e6, 0, 0, 0, f(No, false, "鄛")}, - {0x2f9e7, 0, 0, 0, f(No, false, "鈸")}, - {0x2f9e8, 0, 0, 0, f(No, false, "鋗")}, - {0x2f9e9, 0, 0, 0, f(No, false, "鋘")}, - {0x2f9ea, 0, 0, 0, f(No, false, "鉼")}, - {0x2f9eb, 0, 0, 0, f(No, false, "鏹")}, - {0x2f9ec, 0, 0, 0, f(No, false, "鐕")}, - {0x2f9ed, 0, 0, 0, f(No, false, "𨯺")}, - {0x2f9ee, 0, 0, 0, f(No, false, "開")}, - {0x2f9ef, 0, 0, 0, f(No, false, "䦕")}, - {0x2f9f0, 0, 0, 0, f(No, false, "閷")}, - {0x2f9f1, 0, 0, 0, f(No, false, "𨵷")}, - {0x2f9f2, 0, 0, 0, f(No, false, "䧦")}, - {0x2f9f3, 0, 0, 0, f(No, false, "雃")}, - {0x2f9f4, 0, 0, 0, f(No, false, "嶲")}, - {0x2f9f5, 0, 0, 0, f(No, false, "霣")}, - {0x2f9f6, 0, 0, 0, f(No, false, "𩅅")}, - {0x2f9f7, 0, 0, 0, f(No, false, "𩈚")}, - {0x2f9f8, 0, 0, 0, f(No, false, "䩮")}, - {0x2f9f9, 0, 0, 0, f(No, false, "䩶")}, - {0x2f9fa, 0, 0, 0, f(No, false, "韠")}, - {0x2f9fb, 0, 0, 0, f(No, false, "𩐊")}, - {0x2f9fc, 0, 0, 0, f(No, false, "䪲")}, - {0x2f9fd, 0, 0, 0, f(No, false, "𩒖")}, - {0x2f9fe, 0, 0, 0, f(No, false, "頋")}, - {0x2fa00, 0, 0, 0, f(No, false, "頩")}, - {0x2fa01, 0, 0, 0, f(No, false, "𩖶")}, - {0x2fa02, 0, 0, 0, f(No, false, "飢")}, - {0x2fa03, 0, 0, 0, f(No, false, "䬳")}, - {0x2fa04, 0, 0, 0, f(No, false, "餩")}, - {0x2fa05, 0, 0, 0, f(No, false, "馧")}, - {0x2fa06, 0, 0, 0, f(No, false, "駂")}, - {0x2fa07, 0, 0, 0, f(No, false, "駾")}, - {0x2fa08, 0, 0, 0, f(No, false, "䯎")}, - {0x2fa09, 0, 0, 0, f(No, false, "𩬰")}, - {0x2fa0a, 0, 0, 0, f(No, false, "鬒")}, - {0x2fa0b, 0, 0, 0, f(No, false, "鱀")}, - {0x2fa0c, 0, 0, 0, f(No, false, "鳽")}, - {0x2fa0d, 0, 0, 0, f(No, false, "䳎")}, - {0x2fa0e, 0, 0, 0, f(No, false, "䳭")}, - {0x2fa0f, 0, 0, 0, f(No, false, "鵧")}, - {0x2fa10, 0, 0, 0, f(No, false, "𪃎")}, - {0x2fa11, 0, 0, 0, f(No, false, "䳸")}, - {0x2fa12, 0, 0, 0, f(No, false, "𪄅")}, - {0x2fa13, 0, 0, 0, f(No, false, "𪈎")}, - {0x2fa14, 0, 0, 0, f(No, false, "𪊑")}, - {0x2fa15, 0, 0, 0, f(No, false, "麻")}, - {0x2fa16, 0, 0, 0, f(No, false, "䵖")}, - {0x2fa17, 0, 0, 0, f(No, false, "黹")}, - {0x2fa18, 0, 0, 0, f(No, false, "黾")}, - {0x2fa19, 0, 0, 0, f(No, false, "鼅")}, - {0x2fa1a, 0, 0, 0, f(No, false, "鼏")}, - {0x2fa1b, 0, 0, 0, f(No, false, "鼖")}, - {0x2fa1c, 0, 0, 0, f(No, false, "鼻")}, - {0x2fa1d, 0, 0, 0, f(No, false, "𪘀")}, - {0x2fa1e, 0, 0, 0, f(Yes, false, "")}, -} diff --git a/vendor/golang.org/x/text/unicode/norm/example_iter_test.go b/vendor/golang.org/x/text/unicode/norm/example_iter_test.go deleted file mode 100644 index 82df89c7..00000000 --- a/vendor/golang.org/x/text/unicode/norm/example_iter_test.go +++ /dev/null @@ -1,82 +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 norm_test - -import ( - "bytes" - "fmt" - "unicode/utf8" - - "golang.org/x/text/unicode/norm" -) - -// EqualSimple uses a norm.Iter to compare two non-normalized -// strings for equivalence. -func EqualSimple(a, b string) bool { - var ia, ib norm.Iter - ia.InitString(norm.NFKD, a) - ib.InitString(norm.NFKD, b) - for !ia.Done() && !ib.Done() { - if !bytes.Equal(ia.Next(), ib.Next()) { - return false - } - } - return ia.Done() && ib.Done() -} - -// FindPrefix finds the longest common prefix of ASCII characters -// of a and b. -func FindPrefix(a, b string) int { - i := 0 - for ; i < len(a) && i < len(b) && a[i] < utf8.RuneSelf && a[i] == b[i]; i++ { - } - return i -} - -// EqualOpt is like EqualSimple, but optimizes the special -// case for ASCII characters. -func EqualOpt(a, b string) bool { - n := FindPrefix(a, b) - a, b = a[n:], b[n:] - var ia, ib norm.Iter - ia.InitString(norm.NFKD, a) - ib.InitString(norm.NFKD, b) - for !ia.Done() && !ib.Done() { - if !bytes.Equal(ia.Next(), ib.Next()) { - return false - } - if n := int64(FindPrefix(a[ia.Pos():], b[ib.Pos():])); n != 0 { - ia.Seek(n, 1) - ib.Seek(n, 1) - } - } - return ia.Done() && ib.Done() -} - -var compareTests = []struct{ a, b string }{ - {"aaa", "aaa"}, - {"aaa", "aab"}, - {"a\u0300a", "\u00E0a"}, - {"a\u0300\u0320b", "a\u0320\u0300b"}, - {"\u1E0A\u0323", "\x44\u0323\u0307"}, - // A character that decomposes into multiple segments - // spans several iterations. - {"\u3304", "\u30A4\u30CB\u30F3\u30AF\u3099"}, -} - -func ExampleIter() { - for i, t := range compareTests { - r0 := EqualSimple(t.a, t.b) - r1 := EqualOpt(t.a, t.b) - fmt.Printf("%d: %v %v\n", i, r0, r1) - } - // Output: - // 0: true true - // 1: false false - // 2: true true - // 3: true true - // 4: true true - // 5: true true -} diff --git a/vendor/golang.org/x/text/unicode/norm/example_test.go b/vendor/golang.org/x/text/unicode/norm/example_test.go deleted file mode 100644 index 8f3b1565..00000000 --- a/vendor/golang.org/x/text/unicode/norm/example_test.go +++ /dev/null @@ -1,27 +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 norm_test - -import ( - "fmt" - - "golang.org/x/text/unicode/norm" -) - -func ExampleForm_NextBoundary() { - s := norm.NFD.String("Mêlée") - - for i := 0; i < len(s); { - d := norm.NFC.NextBoundaryInString(s[i:], true) - fmt.Printf("%[1]s: %+[1]q\n", s[i:i+d]) - i += d - } - // Output: - // M: "M" - // ê: "e\u0302" - // l: "l" - // é: "e\u0301" - // e: "e" -} diff --git a/vendor/golang.org/x/text/unicode/norm/forminfo_test.go b/vendor/golang.org/x/text/unicode/norm/forminfo_test.go deleted file mode 100644 index e15ba9be..00000000 --- a/vendor/golang.org/x/text/unicode/norm/forminfo_test.go +++ /dev/null @@ -1,54 +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 test - -package norm - -import "testing" - -func TestProperties(t *testing.T) { - var d runeData - CK := [2]string{"C", "K"} - for k, r := 1, rune(0); r < 0x2ffff; r++ { - if k < len(testData) && r == testData[k].r { - d = testData[k] - k++ - } - s := string(r) - for j, p := range []Properties{NFC.PropertiesString(s), NFKC.PropertiesString(s)} { - f := d.f[j] - if p.CCC() != d.ccc { - t.Errorf("%U: ccc(%s): was %d; want %d %X", r, CK[j], p.CCC(), d.ccc, p.index) - } - if p.isYesC() != (f.qc == Yes) { - t.Errorf("%U: YesC(%s): was %v; want %v", r, CK[j], p.isYesC(), f.qc == Yes) - } - if p.combinesBackward() != (f.qc == Maybe) { - t.Errorf("%U: combines backwards(%s): was %v; want %v", r, CK[j], p.combinesBackward(), f.qc == Maybe) - } - if p.nLeadingNonStarters() != d.nLead { - t.Errorf("%U: nLead(%s): was %d; want %d %#v %#v", r, CK[j], p.nLeadingNonStarters(), d.nLead, p, d) - } - if p.nTrailingNonStarters() != d.nTrail { - t.Errorf("%U: nTrail(%s): was %d; want %d %#v %#v", r, CK[j], p.nTrailingNonStarters(), d.nTrail, p, d) - } - if p.combinesForward() != f.combinesForward { - t.Errorf("%U: combines forward(%s): was %v; want %v %#v", r, CK[j], p.combinesForward(), f.combinesForward, p) - } - // Skip Hangul as it is algorithmically computed. - if r >= hangulBase && r < hangulEnd { - continue - } - if p.hasDecomposition() { - if has := f.decomposition != ""; !has { - t.Errorf("%U: hasDecomposition(%s): was %v; want %v", r, CK[j], p.hasDecomposition(), has) - } - if string(p.Decomposition()) != f.decomposition { - t.Errorf("%U: decomp(%s): was %+q; want %+q", r, CK[j], p.Decomposition(), f.decomposition) - } - } - } - } -} diff --git a/vendor/golang.org/x/text/unicode/norm/iter_test.go b/vendor/golang.org/x/text/unicode/norm/iter_test.go deleted file mode 100644 index d95aa304..00000000 --- a/vendor/golang.org/x/text/unicode/norm/iter_test.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package norm - -import ( - "strings" - "testing" -) - -func doIterNorm(f Form, s string) []byte { - acc := []byte{} - i := Iter{} - i.InitString(f, s) - for !i.Done() { - acc = append(acc, i.Next()...) - } - return acc -} - -func TestIterNext(t *testing.T) { - runNormTests(t, "IterNext", func(f Form, out []byte, s string) []byte { - return doIterNorm(f, string(append(out, s...))) - }) -} - -type SegmentTest struct { - in string - out []string -} - -var segmentTests = []SegmentTest{ - {"\u1E0A\u0323a", []string{"\x44\u0323\u0307", "a", ""}}, - {rep('a', segSize), append(strings.Split(rep('a', segSize), ""), "")}, - {rep('a', segSize+2), append(strings.Split(rep('a', segSize+2), ""), "")}, - {rep('a', segSize) + "\u0300aa", - append(strings.Split(rep('a', segSize-1), ""), "a\u0300", "a", "a", "")}, - - // U+0f73 is NOT treated as a starter as it is a modifier - {"a" + grave(29) + "\u0f73", []string{"a" + grave(29), cgj + "\u0f73"}}, - {"a\u0f73", []string{"a\u0f73"}}, - - // U+ff9e is treated as a non-starter. - // TODO: should we? Note that this will only affect iteration, as whether - // or not we do so does not affect the normalization output and will either - // way result in consistent iteration output. - {"a" + grave(30) + "\uff9e", []string{"a" + grave(30), cgj + "\uff9e"}}, - {"a\uff9e", []string{"a\uff9e"}}, -} - -var segmentTestsK = []SegmentTest{ - {"\u3332", []string{"\u30D5", "\u30A1", "\u30E9", "\u30C3", "\u30C8\u3099", ""}}, - // last segment of multi-segment decomposition needs normalization - {"\u3332\u093C", []string{"\u30D5", "\u30A1", "\u30E9", "\u30C3", "\u30C8\u093C\u3099", ""}}, - {"\u320E", []string{"\x28", "\uAC00", "\x29"}}, - - // last segment should be copied to start of buffer. - {"\ufdfa", []string{"\u0635", "\u0644", "\u0649", " ", "\u0627", "\u0644", "\u0644", "\u0647", " ", "\u0639", "\u0644", "\u064a", "\u0647", " ", "\u0648", "\u0633", "\u0644", "\u0645", ""}}, - {"\ufdfa" + grave(30), []string{"\u0635", "\u0644", "\u0649", " ", "\u0627", "\u0644", "\u0644", "\u0647", " ", "\u0639", "\u0644", "\u064a", "\u0647", " ", "\u0648", "\u0633", "\u0644", "\u0645" + grave(30), ""}}, - {"\uFDFA" + grave(64), []string{"\u0635", "\u0644", "\u0649", " ", "\u0627", "\u0644", "\u0644", "\u0647", " ", "\u0639", "\u0644", "\u064a", "\u0647", " ", "\u0648", "\u0633", "\u0644", "\u0645" + grave(30), cgj + grave(30), cgj + grave(4), ""}}, - - // Hangul and Jamo are grouped together. - {"\uAC00", []string{"\u1100\u1161", ""}}, - {"\uAC01", []string{"\u1100\u1161\u11A8", ""}}, - {"\u1100\u1161", []string{"\u1100\u1161", ""}}, -} - -// Note that, by design, segmentation is equal for composing and decomposing forms. -func TestIterSegmentation(t *testing.T) { - segmentTest(t, "SegmentTestD", NFD, segmentTests) - segmentTest(t, "SegmentTestC", NFC, segmentTests) - segmentTest(t, "SegmentTestKD", NFKD, segmentTestsK) - segmentTest(t, "SegmentTestKC", NFKC, segmentTestsK) -} - -func segmentTest(t *testing.T, name string, f Form, tests []SegmentTest) { - iter := Iter{} - for i, tt := range tests { - iter.InitString(f, tt.in) - for j, seg := range tt.out { - if seg == "" { - if !iter.Done() { - res := string(iter.Next()) - t.Errorf(`%s:%d:%d: expected Done()==true, found segment %+q`, name, i, j, res) - } - continue - } - if iter.Done() { - t.Errorf("%s:%d:%d: Done()==true, want false", name, i, j) - } - seg = f.String(seg) - if res := string(iter.Next()); res != seg { - t.Errorf(`%s:%d:%d" segment was %+q (%d); want %+q (%d)`, name, i, j, pc(res), len(res), pc(seg), len(seg)) - } - } - } -} diff --git a/vendor/golang.org/x/text/unicode/norm/normalize_test.go b/vendor/golang.org/x/text/unicode/norm/normalize_test.go deleted file mode 100644 index e3c0ac73..00000000 --- a/vendor/golang.org/x/text/unicode/norm/normalize_test.go +++ /dev/null @@ -1,1287 +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 norm - -import ( - "bytes" - "flag" - "fmt" - "io" - "log" - "strings" - "testing" - "unicode/utf8" - - "golang.org/x/text/internal/testtext" - "golang.org/x/text/transform" -) - -var ( - testn = flag.Int("testn", -1, "specific test number to run or -1 for all") -) - -// pc replaces any rune r that is repeated n times, for n > 1, with r{n}. -func pc(s string) []byte { - b := bytes.NewBuffer(make([]byte, 0, len(s))) - for i := 0; i < len(s); { - r, sz := utf8.DecodeRuneInString(s[i:]) - n := 0 - if sz == 1 { - // Special-case one-byte case to handle repetition for invalid UTF-8. - for c := s[i]; i+n < len(s) && s[i+n] == c; n++ { - } - } else { - for _, r2 := range s[i:] { - if r2 != r { - break - } - n++ - } - } - b.WriteString(s[i : i+sz]) - if n > 1 { - fmt.Fprintf(b, "{%d}", n) - } - i += sz * n - } - return b.Bytes() -} - -// pidx finds the index from which two strings start to differ, plus context. -// It returns the index and ellipsis if the index is greater than 0. -func pidx(a, b string) (i int, prefix string) { - for ; i < len(a) && i < len(b) && a[i] == b[i]; i++ { - } - if i < 8 { - return 0, "" - } - i -= 3 // ensure taking at least one full rune before the difference. - for k := i - 7; i > k && !utf8.RuneStart(a[i]); i-- { - } - return i, "..." -} - -type PositionTest struct { - input string - pos int - buffer string // expected contents of reorderBuffer, if applicable -} - -type positionFunc func(rb *reorderBuffer, s string) (int, []byte) - -func runPosTests(t *testing.T, name string, f Form, fn positionFunc, tests []PositionTest) { - rb := reorderBuffer{} - rb.init(f, nil) - for i, test := range tests { - rb.reset() - rb.src = inputString(test.input) - rb.nsrc = len(test.input) - pos, out := fn(&rb, test.input) - if pos != test.pos { - t.Errorf("%s:%d: position is %d; want %d", name, i, pos, test.pos) - } - if outs := string(out); outs != test.buffer { - k, pfx := pidx(outs, test.buffer) - t.Errorf("%s:%d: buffer \nwas %s%+q; \nwant %s%+q", name, i, pfx, pc(outs[k:]), pfx, pc(test.buffer[k:])) - } - } -} - -func grave(n int) string { - return rep(0x0300, n) -} - -func rep(r rune, n int) string { - return strings.Repeat(string(r), n) -} - -const segSize = maxByteBufferSize - -var cgj = GraphemeJoiner - -var decomposeSegmentTests = []PositionTest{ - // illegal runes - {"\xC2", 0, ""}, - {"\xC0", 1, "\xC0"}, - {"\u00E0\x80", 2, "\u0061\u0300"}, - // starter - {"a", 1, "a"}, - {"ab", 1, "a"}, - // starter + composing - {"a\u0300", 3, "a\u0300"}, - {"a\u0300b", 3, "a\u0300"}, - // with decomposition - {"\u00C0", 2, "A\u0300"}, - {"\u00C0b", 2, "A\u0300"}, - // long - {grave(31), 60, grave(30) + cgj}, - {"a" + grave(31), 61, "a" + grave(30) + cgj}, - - // Stability tests: see http://www.unicode.org/review/pr-29.html. - // U+0300 COMBINING GRAVE ACCENT;Mn;230;NSM;;;;;N;NON-SPACING GRAVE;;;; - // U+0B47 ORIYA VOWEL SIGN E;Mc;0;L;;;;;N;;;;; - // U+0B3E ORIYA VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; - // U+1100 HANGUL CHOSEONG KIYEOK;Lo;0;L;;;;;N;;;;; - // U+1161 HANGUL JUNGSEONG A;Lo;0;L;;;;;N;;;;; - {"\u0B47\u0300\u0B3E", 8, "\u0B47\u0300\u0B3E"}, - {"\u1100\u0300\u1161", 8, "\u1100\u0300\u1161"}, - {"\u0B47\u0B3E", 6, "\u0B47\u0B3E"}, - {"\u1100\u1161", 6, "\u1100\u1161"}, - - // U+04DA MALAYALAM VOWEL SIGN O;Mc;0;L;0D46 0D3E;;;;N;;;;; - // Sequence of decomposing characters that are starters and modifiers. - {"\u0d4a" + strings.Repeat("\u0d3e", 31), 90, "\u0d46" + strings.Repeat("\u0d3e", 30) + cgj}, - - {grave(30), 60, grave(30)}, - // U+FF9E is a starter, but decomposes to U+3099, which is not. - {grave(30) + "\uff9e", 60, grave(30) + cgj}, - // ends with incomplete UTF-8 encoding - {"\xCC", 0, ""}, - {"\u0300\xCC", 2, "\u0300"}, -} - -func decomposeSegmentF(rb *reorderBuffer, s string) (int, []byte) { - rb.initString(NFD, s) - rb.setFlusher(nil, appendFlush) - p := decomposeSegment(rb, 0, true) - return p, rb.out -} - -func TestDecomposeSegment(t *testing.T) { - runPosTests(t, "TestDecomposeSegment", NFC, decomposeSegmentF, decomposeSegmentTests) -} - -var firstBoundaryTests = []PositionTest{ - // no boundary - {"", -1, ""}, - {"\u0300", -1, ""}, - {"\x80\x80", -1, ""}, - // illegal runes - {"\xff", 0, ""}, - {"\u0300\xff", 2, ""}, - {"\u0300\xc0\x80\x80", 2, ""}, - // boundaries - {"a", 0, ""}, - {"\u0300a", 2, ""}, - // Hangul - {"\u1103\u1161", 0, ""}, - {"\u110B\u1173\u11B7", 0, ""}, - {"\u1161\u110B\u1173\u11B7", 3, ""}, - {"\u1173\u11B7\u1103\u1161", 6, ""}, - // too many combining characters. - {grave(maxNonStarters - 1), -1, ""}, - {grave(maxNonStarters), 60, ""}, - {grave(maxNonStarters + 1), 60, ""}, -} - -func firstBoundaryF(rb *reorderBuffer, s string) (int, []byte) { - return rb.f.form.FirstBoundary([]byte(s)), nil -} - -func firstBoundaryStringF(rb *reorderBuffer, s string) (int, []byte) { - return rb.f.form.FirstBoundaryInString(s), nil -} - -func TestFirstBoundary(t *testing.T) { - runPosTests(t, "TestFirstBoundary", NFC, firstBoundaryF, firstBoundaryTests) - runPosTests(t, "TestFirstBoundaryInString", NFC, firstBoundaryStringF, firstBoundaryTests) -} - -func TestNextBoundary(t *testing.T) { - testCases := []struct { - input string - atEOF bool - want int - }{ - // no boundary - {"", true, 0}, - {"", false, -1}, - {"\u0300", true, 2}, - {"\u0300", false, -1}, - {"\x80\x80", true, 1}, - {"\x80\x80", false, 1}, - // illegal runes - {"\xff", false, 1}, - {"\u0300\xff", false, 2}, - {"\u0300\xc0\x80\x80", false, 2}, - {"\xc2\x80\x80", false, 2}, - {"\xc2", false, -1}, - {"\xc2", true, 1}, - {"a\u0300\xc2", false, -1}, - {"a\u0300\xc2", true, 3}, - // boundaries - {"a", true, 1}, - {"a", false, -1}, - {"aa", false, 1}, - {"\u0300", true, 2}, - {"\u0300", false, -1}, - {"\u0300a", false, 2}, - // Hangul - {"\u1103\u1161", true, 6}, - {"\u1103\u1161", false, -1}, - {"\u110B\u1173\u11B7", false, -1}, - {"\u110B\u1173\u11B7\u110B\u1173\u11B7", false, 9}, - {"\u1161\u110B\u1173\u11B7", false, 3}, - {"\u1173\u11B7\u1103\u1161", false, 6}, - // too many combining characters. - {grave(maxNonStarters - 1), false, -1}, - {grave(maxNonStarters), false, 60}, - {grave(maxNonStarters + 1), false, 60}, - } - - for _, tc := range testCases { - if got := NFC.NextBoundary([]byte(tc.input), tc.atEOF); got != tc.want { - t.Errorf("NextBoundary(%+q, %v) = %d; want %d", tc.input, tc.atEOF, got, tc.want) - } - if got := NFC.NextBoundaryInString(tc.input, tc.atEOF); got != tc.want { - t.Errorf("NextBoundaryInString(%+q, %v) = %d; want %d", tc.input, tc.atEOF, got, tc.want) - } - } -} - -var decomposeToLastTests = []PositionTest{ - // ends with inert character - {"Hello!", 6, ""}, - {"\u0632", 2, ""}, - {"a\u0301\u0635", 5, ""}, - // ends with non-inert starter - {"a", 0, "a"}, - {"a\u0301a", 3, "a"}, - {"a\u0301\u03B9", 3, "\u03B9"}, - {"a\u0327", 0, "a\u0327"}, - // illegal runes - {"\xFF", 1, ""}, - {"aa\xFF", 3, ""}, - {"\xC0\x80\x80", 3, ""}, - {"\xCC\x80\x80", 3, ""}, - // ends with incomplete UTF-8 encoding - {"a\xCC", 2, ""}, - // ends with combining characters - {"\u0300\u0301", 0, "\u0300\u0301"}, - {"a\u0300\u0301", 0, "a\u0300\u0301"}, - {"a\u0301\u0308", 0, "a\u0301\u0308"}, - {"a\u0308\u0301", 0, "a\u0308\u0301"}, - {"aaaa\u0300\u0301", 3, "a\u0300\u0301"}, - {"\u0300a\u0300\u0301", 2, "a\u0300\u0301"}, - {"\u00C0", 0, "A\u0300"}, - {"a\u00C0", 1, "A\u0300"}, - // decomposing - {"a\u0300\u00E0", 3, "a\u0300"}, - // multisegment decompositions (flushes leading segments) - {"a\u0300\uFDC0", 7, "\u064A"}, - {"\uFDC0" + grave(29), 4, "\u064A" + grave(29)}, - {"\uFDC0" + grave(30), 4, "\u064A" + grave(30)}, - {"\uFDC0" + grave(31), 5, grave(30)}, - {"\uFDFA" + grave(14), 31, "\u0645" + grave(14)}, - // Overflow - {"\u00E0" + grave(29), 0, "a" + grave(30)}, - {"\u00E0" + grave(30), 2, grave(30)}, - // Hangul - {"a\u1103", 1, "\u1103"}, - {"a\u110B", 1, "\u110B"}, - {"a\u110B\u1173", 1, "\u110B\u1173"}, - // See comment in composition.go:compBoundaryAfter. - {"a\u110B\u1173\u11B7", 1, "\u110B\u1173\u11B7"}, - {"a\uC73C", 1, "\u110B\u1173"}, - {"다음", 3, "\u110B\u1173\u11B7"}, - {"다", 0, "\u1103\u1161"}, - {"\u1103\u1161\u110B\u1173\u11B7", 6, "\u110B\u1173\u11B7"}, - {"\u110B\u1173\u11B7\u1103\u1161", 9, "\u1103\u1161"}, - {"다음음", 6, "\u110B\u1173\u11B7"}, - {"음다다", 6, "\u1103\u1161"}, - // maximized buffer - {"a" + grave(30), 0, "a" + grave(30)}, - // Buffer overflow - {"a" + grave(31), 3, grave(30)}, - // weird UTF-8 - {"a\u0300\u11B7", 0, "a\u0300\u11B7"}, -} - -func decomposeToLast(rb *reorderBuffer, s string) (int, []byte) { - rb.setFlusher([]byte(s), appendFlush) - decomposeToLastBoundary(rb) - buf := rb.flush(nil) - return len(rb.out), buf -} - -func TestDecomposeToLastBoundary(t *testing.T) { - runPosTests(t, "TestDecomposeToLastBoundary", NFKC, decomposeToLast, decomposeToLastTests) -} - -var lastBoundaryTests = []PositionTest{ - // ends with inert character - {"Hello!", 6, ""}, - {"\u0632", 2, ""}, - // ends with non-inert starter - {"a", 0, ""}, - // illegal runes - {"\xff", 1, ""}, - {"aa\xff", 3, ""}, - {"a\xff\u0300", 1, ""}, // TODO: should probably be 2. - {"\xc0\x80\x80", 3, ""}, - {"\xc0\x80\x80\u0300", 3, ""}, - // ends with incomplete UTF-8 encoding - {"\xCC", -1, ""}, - {"\xE0\x80", -1, ""}, - {"\xF0\x80\x80", -1, ""}, - {"a\xCC", 0, ""}, - {"\x80\xCC", 1, ""}, - {"\xCC\xCC", 1, ""}, - // ends with combining characters - {"a\u0300\u0301", 0, ""}, - {"aaaa\u0300\u0301", 3, ""}, - {"\u0300a\u0300\u0301", 2, ""}, - {"\u00C2", 0, ""}, - {"a\u00C2", 1, ""}, - // decomposition may recombine - {"\u0226", 0, ""}, - // no boundary - {"", -1, ""}, - {"\u0300\u0301", -1, ""}, - {"\u0300", -1, ""}, - {"\x80\x80", -1, ""}, - {"\x80\x80\u0301", -1, ""}, - // Hangul - {"다음", 3, ""}, - {"다", 0, ""}, - {"\u1103\u1161\u110B\u1173\u11B7", 6, ""}, - {"\u110B\u1173\u11B7\u1103\u1161", 9, ""}, - // too many combining characters. - {grave(maxNonStarters - 1), -1, ""}, - // May still be preceded with a non-starter. - {grave(maxNonStarters), -1, ""}, - // May still need to insert a cgj after the last combiner. - {grave(maxNonStarters + 1), 2, ""}, - {grave(maxNonStarters + 2), 4, ""}, - - {"a" + grave(maxNonStarters-1), 0, ""}, - {"a" + grave(maxNonStarters), 0, ""}, - // May still need to insert a cgj after the last combiner. - {"a" + grave(maxNonStarters+1), 3, ""}, - {"a" + grave(maxNonStarters+2), 5, ""}, -} - -func lastBoundaryF(rb *reorderBuffer, s string) (int, []byte) { - return rb.f.form.LastBoundary([]byte(s)), nil -} - -func TestLastBoundary(t *testing.T) { - runPosTests(t, "TestLastBoundary", NFC, lastBoundaryF, lastBoundaryTests) -} - -type spanTest struct { - input string - atEOF bool - n int - err error -} - -var quickSpanTests = []spanTest{ - {"", true, 0, nil}, - // starters - {"a", true, 1, nil}, - {"abc", true, 3, nil}, - {"\u043Eb", true, 3, nil}, - // incomplete last rune. - {"\xCC", true, 1, nil}, - {"\xCC", false, 0, transform.ErrShortSrc}, - {"a\xCC", true, 2, nil}, - {"a\xCC", false, 0, transform.ErrShortSrc}, // TODO: could be 1 for NFD - // incorrectly ordered combining characters - {"\u0300\u0316", true, 0, transform.ErrEndOfSpan}, - {"\u0300\u0316", false, 0, transform.ErrEndOfSpan}, - {"\u0300\u0316cd", true, 0, transform.ErrEndOfSpan}, - {"\u0300\u0316cd", false, 0, transform.ErrEndOfSpan}, - // have a maximum number of combining characters. - {rep(0x035D, 30) + "\u035B", true, 0, transform.ErrEndOfSpan}, - {"a" + rep(0x035D, 30) + "\u035B", true, 0, transform.ErrEndOfSpan}, - {"Ɵ" + rep(0x035D, 30) + "\u035B", true, 0, transform.ErrEndOfSpan}, - {"aa" + rep(0x035D, 30) + "\u035B", true, 1, transform.ErrEndOfSpan}, - {rep(0x035D, 30) + cgj + "\u035B", true, 64, nil}, - {"a" + rep(0x035D, 30) + cgj + "\u035B", true, 65, nil}, - {"Ɵ" + rep(0x035D, 30) + cgj + "\u035B", true, 66, nil}, - {"aa" + rep(0x035D, 30) + cgj + "\u035B", true, 66, nil}, - - {"a" + rep(0x035D, 30) + cgj + "\u035B", false, 61, transform.ErrShortSrc}, - {"Ɵ" + rep(0x035D, 30) + cgj + "\u035B", false, 62, transform.ErrShortSrc}, - {"aa" + rep(0x035D, 30) + cgj + "\u035B", false, 62, transform.ErrShortSrc}, -} - -var quickSpanNFDTests = []spanTest{ - // needs decomposing - {"\u00C0", true, 0, transform.ErrEndOfSpan}, - {"abc\u00C0", true, 3, transform.ErrEndOfSpan}, - // correctly ordered combining characters - {"\u0300", true, 2, nil}, - {"ab\u0300", true, 4, nil}, - {"ab\u0300cd", true, 6, nil}, - {"\u0300cd", true, 4, nil}, - {"\u0316\u0300", true, 4, nil}, - {"ab\u0316\u0300", true, 6, nil}, - {"ab\u0316\u0300cd", true, 8, nil}, - {"ab\u0316\u0300\u00C0", true, 6, transform.ErrEndOfSpan}, - {"\u0316\u0300cd", true, 6, nil}, - {"\u043E\u0308b", true, 5, nil}, - // incorrectly ordered combining characters - {"ab\u0300\u0316", true, 1, transform.ErrEndOfSpan}, // TODO: we could skip 'b' as well. - {"ab\u0300\u0316cd", true, 1, transform.ErrEndOfSpan}, - // Hangul - {"같은", true, 0, transform.ErrEndOfSpan}, -} - -var quickSpanNFCTests = []spanTest{ - // okay composed - {"\u00C0", true, 2, nil}, - {"abc\u00C0", true, 5, nil}, - // correctly ordered combining characters - // TODO: b may combine with modifiers, which is why this fails. We could - // make a more precise test that that actually checks whether last - // characters combines. Probably not worth it. - {"ab\u0300", true, 1, transform.ErrEndOfSpan}, - {"ab\u0300cd", true, 1, transform.ErrEndOfSpan}, - {"ab\u0316\u0300", true, 1, transform.ErrEndOfSpan}, - {"ab\u0316\u0300cd", true, 1, transform.ErrEndOfSpan}, - {"\u00C0\u035D", true, 4, nil}, - // we do not special case leading combining characters - {"\u0300cd", true, 0, transform.ErrEndOfSpan}, - {"\u0300", true, 0, transform.ErrEndOfSpan}, - {"\u0316\u0300", true, 0, transform.ErrEndOfSpan}, - {"\u0316\u0300cd", true, 0, transform.ErrEndOfSpan}, - // incorrectly ordered combining characters - {"ab\u0300\u0316", true, 1, transform.ErrEndOfSpan}, - {"ab\u0300\u0316cd", true, 1, transform.ErrEndOfSpan}, - // Hangul - {"같은", true, 6, nil}, - {"같은", false, 3, transform.ErrShortSrc}, - // We return the start of the violating segment in case of overflow. - {grave(30) + "\uff9e", true, 0, transform.ErrEndOfSpan}, - {grave(30), true, 0, transform.ErrEndOfSpan}, -} - -func runSpanTests(t *testing.T, name string, f Form, testCases []spanTest) { - for i, tc := range testCases { - s := fmt.Sprintf("Bytes/%s/%d=%+q/atEOF=%v", name, i, pc(tc.input), tc.atEOF) - ok := testtext.Run(t, s, func(t *testing.T) { - n, err := f.Span([]byte(tc.input), tc.atEOF) - if n != tc.n || err != tc.err { - t.Errorf("\n got %d, %v;\nwant %d, %v", n, err, tc.n, tc.err) - } - }) - if !ok { - continue // Don't do the String variant if the Bytes variant failed. - } - s = fmt.Sprintf("String/%s/%d=%+q/atEOF=%v", name, i, pc(tc.input), tc.atEOF) - testtext.Run(t, s, func(t *testing.T) { - n, err := f.SpanString(tc.input, tc.atEOF) - if n != tc.n || err != tc.err { - t.Errorf("\n got %d, %v;\nwant %d, %v", n, err, tc.n, tc.err) - } - }) - } -} - -func TestSpan(t *testing.T) { - runSpanTests(t, "NFD", NFD, quickSpanTests) - runSpanTests(t, "NFD", NFD, quickSpanNFDTests) - runSpanTests(t, "NFC", NFC, quickSpanTests) - runSpanTests(t, "NFC", NFC, quickSpanNFCTests) -} - -var isNormalTests = []PositionTest{ - {"", 1, ""}, - // illegal runes - {"\xff", 1, ""}, - // starters - {"a", 1, ""}, - {"abc", 1, ""}, - {"\u043Eb", 1, ""}, - // incorrectly ordered combining characters - {"\u0300\u0316", 0, ""}, - {"ab\u0300\u0316", 0, ""}, - {"ab\u0300\u0316cd", 0, ""}, - {"\u0300\u0316cd", 0, ""}, -} -var isNormalNFDTests = []PositionTest{ - // needs decomposing - {"\u00C0", 0, ""}, - {"abc\u00C0", 0, ""}, - // correctly ordered combining characters - {"\u0300", 1, ""}, - {"ab\u0300", 1, ""}, - {"ab\u0300cd", 1, ""}, - {"\u0300cd", 1, ""}, - {"\u0316\u0300", 1, ""}, - {"ab\u0316\u0300", 1, ""}, - {"ab\u0316\u0300cd", 1, ""}, - {"\u0316\u0300cd", 1, ""}, - {"\u043E\u0308b", 1, ""}, - // Hangul - {"같은", 0, ""}, -} -var isNormalNFCTests = []PositionTest{ - // okay composed - {"\u00C0", 1, ""}, - {"abc\u00C0", 1, ""}, - // need reordering - {"a\u0300", 0, ""}, - {"a\u0300cd", 0, ""}, - {"a\u0316\u0300", 0, ""}, - {"a\u0316\u0300cd", 0, ""}, - // correctly ordered combining characters - {"ab\u0300", 1, ""}, - {"ab\u0300cd", 1, ""}, - {"ab\u0316\u0300", 1, ""}, - {"ab\u0316\u0300cd", 1, ""}, - {"\u00C0\u035D", 1, ""}, - {"\u0300", 1, ""}, - {"\u0316\u0300cd", 1, ""}, - // Hangul - {"같은", 1, ""}, -} - -var isNormalNFKXTests = []PositionTest{ - // Special case. - {"\u00BC", 0, ""}, -} - -func isNormalF(rb *reorderBuffer, s string) (int, []byte) { - if rb.f.form.IsNormal([]byte(s)) { - return 1, nil - } - return 0, nil -} - -func isNormalStringF(rb *reorderBuffer, s string) (int, []byte) { - if rb.f.form.IsNormalString(s) { - return 1, nil - } - return 0, nil -} - -func TestIsNormal(t *testing.T) { - runPosTests(t, "TestIsNormalNFD1", NFD, isNormalF, isNormalTests) - runPosTests(t, "TestIsNormalNFD2", NFD, isNormalF, isNormalNFDTests) - runPosTests(t, "TestIsNormalNFC1", NFC, isNormalF, isNormalTests) - runPosTests(t, "TestIsNormalNFC2", NFC, isNormalF, isNormalNFCTests) - runPosTests(t, "TestIsNormalNFKD1", NFKD, isNormalF, isNormalTests) - runPosTests(t, "TestIsNormalNFKD2", NFKD, isNormalF, isNormalNFDTests) - runPosTests(t, "TestIsNormalNFKD3", NFKD, isNormalF, isNormalNFKXTests) - runPosTests(t, "TestIsNormalNFKC1", NFKC, isNormalF, isNormalTests) - runPosTests(t, "TestIsNormalNFKC2", NFKC, isNormalF, isNormalNFCTests) - runPosTests(t, "TestIsNormalNFKC3", NFKC, isNormalF, isNormalNFKXTests) -} - -func TestIsNormalString(t *testing.T) { - runPosTests(t, "TestIsNormalNFD1", NFD, isNormalStringF, isNormalTests) - runPosTests(t, "TestIsNormalNFD2", NFD, isNormalStringF, isNormalNFDTests) - runPosTests(t, "TestIsNormalNFC1", NFC, isNormalStringF, isNormalTests) - runPosTests(t, "TestIsNormalNFC2", NFC, isNormalStringF, isNormalNFCTests) -} - -type AppendTest struct { - left string - right string - out string -} - -type appendFunc func(f Form, out []byte, s string) []byte - -var fstr = []string{"NFC", "NFD", "NFKC", "NFKD"} - -func runNormTests(t *testing.T, name string, fn appendFunc) { - for f := NFC; f <= NFKD; f++ { - runAppendTests(t, name, f, fn, normTests[f]) - } -} - -func runAppendTests(t *testing.T, name string, f Form, fn appendFunc, tests []AppendTest) { - for i, test := range tests { - t.Run(fmt.Sprintf("%s/%d", fstr[f], i), func(t *testing.T) { - id := pc(test.left + test.right) - if *testn >= 0 && i != *testn { - return - } - t.Run("fn", func(t *testing.T) { - out := []byte(test.left) - have := string(fn(f, out, test.right)) - if len(have) != len(test.out) { - t.Errorf("%+q: length is %d; want %d (%+q vs %+q)", id, len(have), len(test.out), pc(have), pc(test.out)) - } - if have != test.out { - k, pf := pidx(have, test.out) - t.Errorf("%+q:\nwas %s%+q; \nwant %s%+q", id, pf, pc(have[k:]), pf, pc(test.out[k:])) - } - }) - - // Bootstrap by normalizing input. Ensures that the various variants - // behave the same. - for g := NFC; g <= NFKD; g++ { - if f == g { - continue - } - t.Run(fstr[g], func(t *testing.T) { - want := g.String(test.left + test.right) - have := string(fn(g, g.AppendString(nil, test.left), test.right)) - if len(have) != len(want) { - t.Errorf("%+q: length is %d; want %d (%+q vs %+q)", id, len(have), len(want), pc(have), pc(want)) - } - if have != want { - k, pf := pidx(have, want) - t.Errorf("%+q:\nwas %s%+q; \nwant %s%+q", id, pf, pc(have[k:]), pf, pc(want[k:])) - } - }) - } - }) - } -} - -var normTests = [][]AppendTest{ - appendTestsNFC, - appendTestsNFD, - appendTestsNFKC, - appendTestsNFKD, -} - -var appendTestsNFC = []AppendTest{ - {"", ascii, ascii}, - {"", txt_all, txt_all}, - {"\uff9e", grave(30), "\uff9e" + grave(29) + cgj + grave(1)}, - {grave(30), "\uff9e", grave(30) + cgj + "\uff9e"}, - - // Tests designed for Iter. - { // ordering of non-composing combining characters - "", - "\u0305\u0316", - "\u0316\u0305", - }, - { // segment overflow - "", - "a" + rep(0x0305, maxNonStarters+4) + "\u0316", - "a" + rep(0x0305, maxNonStarters) + cgj + "\u0316" + rep(0x305, 4), - }, - - { // Combine across non-blocking non-starters. - // U+0327 COMBINING CEDILLA;Mn;202;NSM;;;;;N;NON-SPACING CEDILLA;;;; - // U+0325 COMBINING RING BELOW;Mn;220;NSM;;;;;N;NON-SPACING RING BELOW;;;; - "", "a\u0327\u0325", "\u1e01\u0327", - }, - - { // Jamo V+T does not combine. - "", - "\u1161\u11a8", - "\u1161\u11a8", - }, - - // Stability tests: see http://www.unicode.org/review/pr-29.html. - {"", "\u0b47\u0300\u0b3e", "\u0b47\u0300\u0b3e"}, - {"", "\u1100\u0300\u1161", "\u1100\u0300\u1161"}, - {"", "\u0b47\u0b3e", "\u0b4b"}, - {"", "\u1100\u1161", "\uac00"}, - - // U+04DA MALAYALAM VOWEL SIGN O;Mc;0;L;0D46 0D3E;;;;N;;;;; - { // 0d4a starts a new segment. - "", - "\u0d4a" + strings.Repeat("\u0d3e", 15) + "\u0d4a" + strings.Repeat("\u0d3e", 15), - "\u0d4a" + strings.Repeat("\u0d3e", 15) + "\u0d4a" + strings.Repeat("\u0d3e", 15), - }, - - { // Split combining characters. - // TODO: don't insert CGJ before starters. - "", - "\u0d46" + strings.Repeat("\u0d3e", 31), - "\u0d4a" + strings.Repeat("\u0d3e", 29) + cgj + "\u0d3e", - }, - - { // Split combining characters. - "", - "\u0d4a" + strings.Repeat("\u0d3e", 30), - "\u0d4a" + strings.Repeat("\u0d3e", 29) + cgj + "\u0d3e", - }, - - { // https://golang.org/issues/20079 - "", - "\xeb\u0344", - "\xeb\u0308\u0301", - }, - - { // https://golang.org/issues/20079 - "", - "\uac00" + strings.Repeat("\u0300", 30), - "\uac00" + strings.Repeat("\u0300", 29) + "\u034f\u0300", - }, - - { // https://golang.org/issues/20079 - "", - "\xeb" + strings.Repeat("\u0300", 31), - "\xeb" + strings.Repeat("\u0300", 30) + "\u034f\u0300", - }, -} - -var appendTestsNFD = []AppendTest{ - // TODO: Move some of the tests here. -} - -var appendTestsNFKC = []AppendTest{ - // empty buffers - {"", "", ""}, - {"a", "", "a"}, - {"", "a", "a"}, - {"", "\u0041\u0307\u0304", "\u01E0"}, - // segment split across buffers - {"", "a\u0300b", "\u00E0b"}, - {"a", "\u0300b", "\u00E0b"}, - {"a", "\u0300\u0316", "\u00E0\u0316"}, - {"a", "\u0316\u0300", "\u00E0\u0316"}, - {"a", "\u0300a\u0300", "\u00E0\u00E0"}, - {"a", "\u0300a\u0300a\u0300", "\u00E0\u00E0\u00E0"}, - {"a", "\u0300aaa\u0300aaa\u0300", "\u00E0aa\u00E0aa\u00E0"}, - {"a\u0300", "\u0327", "\u00E0\u0327"}, - {"a\u0327", "\u0300", "\u00E0\u0327"}, - {"a\u0316", "\u0300", "\u00E0\u0316"}, - {"\u0041\u0307", "\u0304", "\u01E0"}, - // Hangul - {"", "\u110B\u1173", "\uC73C"}, - {"", "\u1103\u1161", "\uB2E4"}, - {"", "\u110B\u1173\u11B7", "\uC74C"}, - {"", "\u320E", "\x28\uAC00\x29"}, - {"", "\x28\u1100\u1161\x29", "\x28\uAC00\x29"}, - {"\u1103", "\u1161", "\uB2E4"}, - {"\u110B", "\u1173\u11B7", "\uC74C"}, - {"\u110B\u1173", "\u11B7", "\uC74C"}, - {"\uC73C", "\u11B7", "\uC74C"}, - // UTF-8 encoding split across buffers - {"a\xCC", "\x80", "\u00E0"}, - {"a\xCC", "\x80b", "\u00E0b"}, - {"a\xCC", "\x80a\u0300", "\u00E0\u00E0"}, - {"a\xCC", "\x80\x80", "\u00E0\x80"}, - {"a\xCC", "\x80\xCC", "\u00E0\xCC"}, - {"a\u0316\xCC", "\x80a\u0316\u0300", "\u00E0\u0316\u00E0\u0316"}, - // ending in incomplete UTF-8 encoding - {"", "\xCC", "\xCC"}, - {"a", "\xCC", "a\xCC"}, - {"a", "b\xCC", "ab\xCC"}, - {"\u0226", "\xCC", "\u0226\xCC"}, - // illegal runes - {"", "\x80", "\x80"}, - {"", "\x80\x80\x80", "\x80\x80\x80"}, - {"", "\xCC\x80\x80\x80", "\xCC\x80\x80\x80"}, - {"", "a\x80", "a\x80"}, - {"", "a\x80\x80\x80", "a\x80\x80\x80"}, - {"", "a\x80\x80\x80\x80\x80\x80", "a\x80\x80\x80\x80\x80\x80"}, - {"a", "\x80\x80\x80", "a\x80\x80\x80"}, - // overflow - {"", strings.Repeat("\x80", 33), strings.Repeat("\x80", 33)}, - {strings.Repeat("\x80", 33), "", strings.Repeat("\x80", 33)}, - {strings.Repeat("\x80", 33), strings.Repeat("\x80", 33), strings.Repeat("\x80", 66)}, - // overflow of combining characters - {"", grave(34), grave(30) + cgj + grave(4)}, - {"", grave(36), grave(30) + cgj + grave(6)}, - {grave(29), grave(5), grave(30) + cgj + grave(4)}, - {grave(30), grave(4), grave(30) + cgj + grave(4)}, - {grave(30), grave(3), grave(30) + cgj + grave(3)}, - {grave(30) + "\xCC", "\x80", grave(30) + cgj + grave(1)}, - {"", "\uFDFA" + grave(14), "\u0635\u0644\u0649 \u0627\u0644\u0644\u0647 \u0639\u0644\u064a\u0647 \u0648\u0633\u0644\u0645" + grave(14)}, - {"", "\uFDFA" + grave(28) + "\u0316", "\u0635\u0644\u0649 \u0627\u0644\u0644\u0647 \u0639\u0644\u064a\u0647 \u0648\u0633\u0644\u0645\u0316" + grave(28)}, - // - First rune has a trailing non-starter. - {"\u00d5", grave(30), "\u00d5" + grave(29) + cgj + grave(1)}, - // - U+FF9E decomposes into a non-starter in compatibility mode. A CGJ must be - // inserted even when FF9E starts a new segment. - {"\uff9e", grave(30), "\u3099" + grave(29) + cgj + grave(1)}, - {grave(30), "\uff9e", grave(30) + cgj + "\u3099"}, - // - Many non-starter decompositions in a row causing overflow. - {"", rep(0x340, 31), rep(0x300, 30) + cgj + "\u0300"}, - {"", rep(0xFF9E, 31), rep(0x3099, 30) + cgj + "\u3099"}, - - {"", "\u0644\u0625" + rep(0x300, 31), "\u0644\u0625" + rep(0x300, 29) + cgj + "\u0300\u0300"}, - {"", "\ufef9" + rep(0x300, 31), "\u0644\u0625" + rep(0x300, 29) + cgj + rep(0x0300, 2)}, - {"", "\ufef9" + rep(0x300, 31), "\u0644\u0625" + rep(0x300, 29) + cgj + rep(0x0300, 2)}, - - // U+0F81 TIBETAN VOWEL SIGN REVERSED II splits into two modifiers. - {"", "\u0f7f" + rep(0xf71, 29) + "\u0f81", "\u0f7f" + rep(0xf71, 29) + cgj + "\u0f71\u0f80"}, - {"", "\u0f7f" + rep(0xf71, 28) + "\u0f81", "\u0f7f" + rep(0xf71, 29) + "\u0f80"}, - {"", "\u0f7f" + rep(0xf81, 16), "\u0f7f" + rep(0xf71, 15) + rep(0xf80, 15) + cgj + "\u0f71\u0f80"}, - - // weird UTF-8 - {"\u00E0\xE1", "\x86", "\u00E0\xE1\x86"}, - {"a\u0300\u11B7", "\u0300", "\u00E0\u11B7\u0300"}, - {"a\u0300\u11B7\u0300", "\u0300", "\u00E0\u11B7\u0300\u0300"}, - {"\u0300", "\xF8\x80\x80\x80\x80\u0300", "\u0300\xF8\x80\x80\x80\x80\u0300"}, - {"\u0300", "\xFC\x80\x80\x80\x80\x80\u0300", "\u0300\xFC\x80\x80\x80\x80\x80\u0300"}, - {"\xF8\x80\x80\x80\x80\u0300", "\u0300", "\xF8\x80\x80\x80\x80\u0300\u0300"}, - {"\xFC\x80\x80\x80\x80\x80\u0300", "\u0300", "\xFC\x80\x80\x80\x80\x80\u0300\u0300"}, - {"\xF8\x80\x80\x80", "\x80\u0300\u0300", "\xF8\x80\x80\x80\x80\u0300\u0300"}, - - {"", strings.Repeat("a\u0316\u0300", 6), strings.Repeat("\u00E0\u0316", 6)}, - // large input. - {"", strings.Repeat("a\u0300\u0316", 31), strings.Repeat("\u00E0\u0316", 31)}, - {"", strings.Repeat("a\u0300\u0316", 4000), strings.Repeat("\u00E0\u0316", 4000)}, - {"", strings.Repeat("\x80\x80", 4000), strings.Repeat("\x80\x80", 4000)}, - {"", "\u0041\u0307\u0304", "\u01E0"}, -} - -var appendTestsNFKD = []AppendTest{ - {"", "a" + grave(64), "a" + grave(30) + cgj + grave(30) + cgj + grave(4)}, - - { // segment overflow on unchanged character - "", - "a" + grave(64) + "\u0316", - "a" + grave(30) + cgj + grave(30) + cgj + "\u0316" + grave(4), - }, - { // segment overflow on unchanged character + start value - "", - "a" + grave(98) + "\u0316", - "a" + grave(30) + cgj + grave(30) + cgj + grave(30) + cgj + "\u0316" + grave(8), - }, - { // segment overflow on decomposition. (U+0340 decomposes to U+0300.) - "", - "a" + grave(59) + "\u0340", - "a" + grave(30) + cgj + grave(30), - }, - { // segment overflow on non-starter decomposition - "", - "a" + grave(33) + "\u0340" + grave(30) + "\u0320", - "a" + grave(30) + cgj + grave(30) + cgj + "\u0320" + grave(4), - }, - { // start value after ASCII overflow - "", - rep('a', segSize) + grave(32) + "\u0320", - rep('a', segSize) + grave(30) + cgj + "\u0320" + grave(2), - }, - { // Jamo overflow - "", - "\u1100\u1161" + grave(30) + "\u0320" + grave(2), - "\u1100\u1161" + grave(29) + cgj + "\u0320" + grave(3), - }, - { // Hangul - "", - "\uac00", - "\u1100\u1161", - }, - { // Hangul overflow - "", - "\uac00" + grave(32) + "\u0320", - "\u1100\u1161" + grave(29) + cgj + "\u0320" + grave(3), - }, - { // Hangul overflow in Hangul mode. - "", - "\uac00\uac00" + grave(32) + "\u0320", - "\u1100\u1161\u1100\u1161" + grave(29) + cgj + "\u0320" + grave(3), - }, - { // Hangul overflow in Hangul mode. - "", - strings.Repeat("\uac00", 3) + grave(32) + "\u0320", - strings.Repeat("\u1100\u1161", 3) + grave(29) + cgj + "\u0320" + grave(3), - }, - { // start value after cc=0 - "", - "您您" + grave(34) + "\u0320", - "您您" + grave(30) + cgj + "\u0320" + grave(4), - }, - { // start value after normalization - "", - "\u0300\u0320a" + grave(34) + "\u0320", - "\u0320\u0300a" + grave(30) + cgj + "\u0320" + grave(4), - }, - { - // U+0F81 TIBETAN VOWEL SIGN REVERSED II splits into two modifiers. - "", - "a\u0f7f" + rep(0xf71, 29) + "\u0f81", - "a\u0f7f" + rep(0xf71, 29) + cgj + "\u0f71\u0f80", - }, -} - -func TestAppend(t *testing.T) { - runNormTests(t, "Append", func(f Form, out []byte, s string) []byte { - return f.Append(out, []byte(s)...) - }) -} - -func TestAppendString(t *testing.T) { - runNormTests(t, "AppendString", func(f Form, out []byte, s string) []byte { - return f.AppendString(out, s) - }) -} - -func TestBytes(t *testing.T) { - runNormTests(t, "Bytes", func(f Form, out []byte, s string) []byte { - buf := []byte{} - buf = append(buf, out...) - buf = append(buf, s...) - return f.Bytes(buf) - }) -} - -func TestString(t *testing.T) { - runNormTests(t, "String", func(f Form, out []byte, s string) []byte { - outs := string(out) + s - return []byte(f.String(outs)) - }) -} - -func TestLinking(t *testing.T) { - const prog = ` - package main - import "fmt" - import "golang.org/x/text/unicode/norm" - func main() { fmt.Println(norm.%s) } - ` - baseline, errB := testtext.CodeSize(fmt.Sprintf(prog, "MaxSegmentSize")) - withTables, errT := testtext.CodeSize(fmt.Sprintf(prog, `NFC.String("")`)) - if errB != nil || errT != nil { - t.Skipf("code size failed: %v and %v", errB, errT) - } - // Tables are at least 50K - if d := withTables - baseline; d < 50*1024 { - t.Errorf("tables appear not to be dropped: %d - %d = %d", - withTables, baseline, d) - } -} - -func appendBench(f Form, in []byte) func() { - buf := make([]byte, 0, 4*len(in)) - return func() { - f.Append(buf, in...) - } -} - -func bytesBench(f Form, in []byte) func() { - return func() { - f.Bytes(in) - } -} - -func iterBench(f Form, in []byte) func() { - iter := Iter{} - return func() { - iter.Init(f, in) - for !iter.Done() { - iter.Next() - } - } -} - -func transformBench(f Form, in []byte) func() { - buf := make([]byte, 4*len(in)) - return func() { - if _, n, err := f.Transform(buf, in, true); err != nil || len(in) != n { - log.Panic(n, len(in), err) - } - } -} - -func readerBench(f Form, in []byte) func() { - buf := make([]byte, 4*len(in)) - return func() { - r := f.Reader(bytes.NewReader(in)) - var err error - for err == nil { - _, err = r.Read(buf) - } - if err != io.EOF { - panic("") - } - } -} - -func writerBench(f Form, in []byte) func() { - buf := make([]byte, 0, 4*len(in)) - return func() { - r := f.Writer(bytes.NewBuffer(buf)) - if _, err := r.Write(in); err != nil { - panic("") - } - } -} - -func appendBenchmarks(bm []func(), f Form, in []byte) []func() { - bm = append(bm, appendBench(f, in)) - bm = append(bm, iterBench(f, in)) - bm = append(bm, transformBench(f, in)) - bm = append(bm, readerBench(f, in)) - bm = append(bm, writerBench(f, in)) - return bm -} - -func doFormBenchmark(b *testing.B, inf, f Form, s string) { - b.StopTimer() - in := inf.Bytes([]byte(s)) - bm := appendBenchmarks(nil, f, in) - b.SetBytes(int64(len(in) * len(bm))) - b.StartTimer() - for i := 0; i < b.N; i++ { - for _, fn := range bm { - fn() - } - } -} - -func doSingle(b *testing.B, f func(Form, []byte) func(), s []byte) { - b.StopTimer() - fn := f(NFC, s) - b.SetBytes(int64(len(s))) - b.StartTimer() - for i := 0; i < b.N; i++ { - fn() - } -} - -var ( - smallNoChange = []byte("nörmalization") - smallChange = []byte("No\u0308rmalization") - ascii = strings.Repeat("There is nothing to change here! ", 500) -) - -func lowerBench(f Form, in []byte) func() { - // Use package strings instead of bytes as it doesn't allocate memory - // if there aren't any changes. - s := string(in) - return func() { - strings.ToLower(s) - } -} - -func BenchmarkLowerCaseNoChange(b *testing.B) { - doSingle(b, lowerBench, smallNoChange) -} -func BenchmarkLowerCaseChange(b *testing.B) { - doSingle(b, lowerBench, smallChange) -} - -func quickSpanBench(f Form, in []byte) func() { - return func() { - f.QuickSpan(in) - } -} - -func BenchmarkQuickSpanChangeNFC(b *testing.B) { - doSingle(b, quickSpanBench, smallNoChange) -} - -func BenchmarkBytesNoChangeNFC(b *testing.B) { - doSingle(b, bytesBench, smallNoChange) -} -func BenchmarkBytesChangeNFC(b *testing.B) { - doSingle(b, bytesBench, smallChange) -} - -func BenchmarkAppendNoChangeNFC(b *testing.B) { - doSingle(b, appendBench, smallNoChange) -} -func BenchmarkAppendChangeNFC(b *testing.B) { - doSingle(b, appendBench, smallChange) -} -func BenchmarkAppendLargeNFC(b *testing.B) { - doSingle(b, appendBench, txt_all_bytes) -} - -func BenchmarkIterNoChangeNFC(b *testing.B) { - doSingle(b, iterBench, smallNoChange) -} -func BenchmarkIterChangeNFC(b *testing.B) { - doSingle(b, iterBench, smallChange) -} -func BenchmarkIterLargeNFC(b *testing.B) { - doSingle(b, iterBench, txt_all_bytes) -} - -func BenchmarkTransformNoChangeNFC(b *testing.B) { - doSingle(b, transformBench, smallNoChange) -} -func BenchmarkTransformChangeNFC(b *testing.B) { - doSingle(b, transformBench, smallChange) -} -func BenchmarkTransformLargeNFC(b *testing.B) { - doSingle(b, transformBench, txt_all_bytes) -} - -func BenchmarkNormalizeAsciiNFC(b *testing.B) { - doFormBenchmark(b, NFC, NFC, ascii) -} -func BenchmarkNormalizeAsciiNFD(b *testing.B) { - doFormBenchmark(b, NFC, NFD, ascii) -} -func BenchmarkNormalizeAsciiNFKC(b *testing.B) { - doFormBenchmark(b, NFC, NFKC, ascii) -} -func BenchmarkNormalizeAsciiNFKD(b *testing.B) { - doFormBenchmark(b, NFC, NFKD, ascii) -} - -func BenchmarkNormalizeNFC2NFC(b *testing.B) { - doFormBenchmark(b, NFC, NFC, txt_all) -} -func BenchmarkNormalizeNFC2NFD(b *testing.B) { - doFormBenchmark(b, NFC, NFD, txt_all) -} -func BenchmarkNormalizeNFD2NFC(b *testing.B) { - doFormBenchmark(b, NFD, NFC, txt_all) -} -func BenchmarkNormalizeNFD2NFD(b *testing.B) { - doFormBenchmark(b, NFD, NFD, txt_all) -} - -// Hangul is often special-cased, so we test it separately. -func BenchmarkNormalizeHangulNFC2NFC(b *testing.B) { - doFormBenchmark(b, NFC, NFC, txt_kr) -} -func BenchmarkNormalizeHangulNFC2NFD(b *testing.B) { - doFormBenchmark(b, NFC, NFD, txt_kr) -} -func BenchmarkNormalizeHangulNFD2NFC(b *testing.B) { - doFormBenchmark(b, NFD, NFC, txt_kr) -} -func BenchmarkNormalizeHangulNFD2NFD(b *testing.B) { - doFormBenchmark(b, NFD, NFD, txt_kr) -} - -var forms = []Form{NFC, NFD, NFKC, NFKD} - -func doTextBenchmark(b *testing.B, s string) { - b.StopTimer() - in := []byte(s) - bm := []func(){} - for _, f := range forms { - bm = appendBenchmarks(bm, f, in) - } - b.SetBytes(int64(len(s) * len(bm))) - b.StartTimer() - for i := 0; i < b.N; i++ { - for _, f := range bm { - f() - } - } -} - -func BenchmarkCanonicalOrdering(b *testing.B) { - doTextBenchmark(b, txt_canon) -} -func BenchmarkExtendedLatin(b *testing.B) { - doTextBenchmark(b, txt_vn) -} -func BenchmarkMiscTwoByteUtf8(b *testing.B) { - doTextBenchmark(b, twoByteUtf8) -} -func BenchmarkMiscThreeByteUtf8(b *testing.B) { - doTextBenchmark(b, threeByteUtf8) -} -func BenchmarkHangul(b *testing.B) { - doTextBenchmark(b, txt_kr) -} -func BenchmarkJapanese(b *testing.B) { - doTextBenchmark(b, txt_jp) -} -func BenchmarkChinese(b *testing.B) { - doTextBenchmark(b, txt_cn) -} -func BenchmarkOverflow(b *testing.B) { - doTextBenchmark(b, overflow) -} - -var overflow = string(bytes.Repeat([]byte("\u035D"), 4096)) + "\u035B" - -// Tests sampled from the Canonical ordering tests (Part 2) of -// http://unicode.org/Public/UNIDATA/NormalizationTest.txt -const txt_canon = `\u0061\u0315\u0300\u05AE\u0300\u0062 \u0061\u0300\u0315\u0300\u05AE\u0062 -\u0061\u0302\u0315\u0300\u05AE\u0062 \u0061\u0307\u0315\u0300\u05AE\u0062 -\u0061\u0315\u0300\u05AE\u030A\u0062 \u0061\u059A\u0316\u302A\u031C\u0062 -\u0061\u032E\u059A\u0316\u302A\u0062 \u0061\u0338\u093C\u0334\u0062 -\u0061\u059A\u0316\u302A\u0339 \u0061\u0341\u0315\u0300\u05AE\u0062 -\u0061\u0348\u059A\u0316\u302A\u0062 \u0061\u0361\u0345\u035D\u035C\u0062 -\u0061\u0366\u0315\u0300\u05AE\u0062 \u0061\u0315\u0300\u05AE\u0486\u0062 -\u0061\u05A4\u059A\u0316\u302A\u0062 \u0061\u0315\u0300\u05AE\u0613\u0062 -\u0061\u0315\u0300\u05AE\u0615\u0062 \u0061\u0617\u0315\u0300\u05AE\u0062 -\u0061\u0619\u0618\u064D\u064E\u0062 \u0061\u0315\u0300\u05AE\u0654\u0062 -\u0061\u0315\u0300\u05AE\u06DC\u0062 \u0061\u0733\u0315\u0300\u05AE\u0062 -\u0061\u0744\u059A\u0316\u302A\u0062 \u0061\u0315\u0300\u05AE\u0745\u0062 -\u0061\u09CD\u05B0\u094D\u3099\u0062 \u0061\u0E38\u0E48\u0E38\u0C56\u0062 -\u0061\u0EB8\u0E48\u0E38\u0E49\u0062 \u0061\u0F72\u0F71\u0EC8\u0F71\u0062 -\u0061\u1039\u05B0\u094D\u3099\u0062 \u0061\u05B0\u094D\u3099\u1A60\u0062 -\u0061\u3099\u093C\u0334\u1BE6\u0062 \u0061\u3099\u093C\u0334\u1C37\u0062 -\u0061\u1CD9\u059A\u0316\u302A\u0062 \u0061\u2DED\u0315\u0300\u05AE\u0062 -\u0061\u2DEF\u0315\u0300\u05AE\u0062 \u0061\u302D\u302E\u059A\u0316\u0062` - -// Taken from http://creativecommons.org/licenses/by-sa/3.0/vn/ -const txt_vn = `Với các điều kiện sau: Ghi nhận công của tác giả. -Nếu bạn sử dụng, chuyển đổi, hoặc xây dựng dự án từ -nội dung được chia sẻ này, bạn phải áp dụng giấy phép này hoặc -một giấy phép khác có các điều khoản tương tự như giấy phép này -cho dự án của bạn. Hiểu rằng: Miễn — Bất kỳ các điều kiện nào -trên đây cũng có thể được miễn bỏ nếu bạn được sự cho phép của -người sở hữu bản quyền. Phạm vi công chúng — Khi tác phẩm hoặc -bất kỳ chương nào của tác phẩm đã trong vùng dành cho công -chúng theo quy định của pháp luật thì tình trạng của nó không -bị ảnh hưởng bởi giấy phép trong bất kỳ trường hợp nào.` - -// Taken from http://creativecommons.org/licenses/by-sa/1.0/deed.ru -const txt_ru = `При обязательном соблюдении следующих условий: -Attribution — Вы должны атрибутировать произведение (указывать -автора и источник) в порядке, предусмотренном автором или -лицензиаром (но только так, чтобы никоим образом не подразумевалось, -что они поддерживают вас или использование вами данного произведения). -Υπό τις ακόλουθες προϋποθέσεις:` - -// Taken from http://creativecommons.org/licenses/by-sa/3.0/gr/ -const txt_gr = `Αναφορά Δημιουργού — Θα πρέπει να κάνετε την αναφορά στο έργο με τον -τρόπο που έχει οριστεί από το δημιουργό ή το χορηγούντο την άδεια -(χωρίς όμως να εννοείται με οποιονδήποτε τρόπο ότι εγκρίνουν εσάς ή -τη χρήση του έργου από εσάς). Παρόμοια Διανομή — Εάν αλλοιώσετε, -τροποποιήσετε ή δημιουργήσετε περαιτέρω βασισμένοι στο έργο θα -μπορείτε να διανέμετε το έργο που θα προκύψει μόνο με την ίδια ή -παρόμοια άδεια.` - -// Taken from http://creativecommons.org/licenses/by-sa/3.0/deed.ar -const txt_ar = `بموجب الشروط التالية نسب المصنف — يجب عليك أن -تنسب العمل بالطريقة التي تحددها المؤلف أو المرخص (ولكن ليس بأي حال من -الأحوال أن توحي وتقترح بتحول أو استخدامك للعمل). -المشاركة على قدم المساواة — إذا كنت يعدل ، والتغيير ، أو الاستفادة -من هذا العمل ، قد ينتج عن توزيع العمل إلا في ظل تشابه او تطابق فى واحد -لهذا الترخيص.` - -// Taken from http://creativecommons.org/licenses/by-sa/1.0/il/ -const txt_il = `בכפוף לתנאים הבאים: ייחוס — עליך לייחס את היצירה (לתת קרדיט) באופן -המצויין על-ידי היוצר או מעניק הרישיון (אך לא בשום אופן המרמז על כך -שהם תומכים בך או בשימוש שלך ביצירה). שיתוף זהה — אם תחליט/י לשנות, -לעבד או ליצור יצירה נגזרת בהסתמך על יצירה זו, תוכל/י להפיץ את יצירתך -החדשה רק תחת אותו הרישיון או רישיון דומה לרישיון זה.` - -const twoByteUtf8 = txt_ru + txt_gr + txt_ar + txt_il - -// Taken from http://creativecommons.org/licenses/by-sa/2.0/kr/ -const txt_kr = `다음과 같은 조건을 따라야 합니다: 저작자표시 -(Attribution) — 저작자나 이용허락자가 정한 방법으로 저작물의 -원저작자를 표시하여야 합니다(그러나 원저작자가 이용자나 이용자의 -이용을 보증하거나 추천한다는 의미로 표시해서는 안됩니다). -동일조건변경허락 — 이 저작물을 이용하여 만든 이차적 저작물에는 본 -라이선스와 동일한 라이선스를 적용해야 합니다.` - -// Taken from http://creativecommons.org/licenses/by-sa/3.0/th/ -const txt_th = `ภายใต้เงื่อนไข ดังต่อไปนี้ : แสดงที่มา — คุณต้องแสดงที่ -มาของงานดังกล่าว ตามรูปแบบที่ผู้สร้างสรรค์หรือผู้อนุญาตกำหนด (แต่ -ไม่ใช่ในลักษณะที่ว่า พวกเขาสนับสนุนคุณหรือสนับสนุนการที่ -คุณนำงานไปใช้) อนุญาตแบบเดียวกัน — หากคุณดัดแปลง เปลี่ยนรูป หรื -อต่อเติมงานนี้ คุณต้องใช้สัญญาอนุญาตแบบเดียวกันหรือแบบที่เหมื -อนกับสัญญาอนุญาตที่ใช้กับงานนี้เท่านั้น` - -const threeByteUtf8 = txt_th - -// Taken from http://creativecommons.org/licenses/by-sa/2.0/jp/ -const txt_jp = `あなたの従うべき条件は以下の通りです。 -表示 — あなたは原著作者のクレジットを表示しなければなりません。 -継承 — もしあなたがこの作品を改変、変形または加工した場合、 -あなたはその結果生じた作品をこの作品と同一の許諾条件の下でのみ -頒布することができます。` - -// http://creativecommons.org/licenses/by-sa/2.5/cn/ -const txt_cn = `您可以自由: 复制、发行、展览、表演、放映、 -广播或通过信息网络传播本作品 创作演绎作品 -对本作品进行商业性使用 惟须遵守下列条件: -署名 — 您必须按照作者或者许可人指定的方式对作品进行署名。 -相同方式共享 — 如果您改变、转换本作品或者以本作品为基础进行创作, -您只能采用与本协议相同的许可协议发布基于本作品的演绎作品。` - -const txt_cjk = txt_cn + txt_jp + txt_kr -const txt_all = txt_vn + twoByteUtf8 + threeByteUtf8 + txt_cjk - -var txt_all_bytes = []byte(txt_all) diff --git a/vendor/golang.org/x/text/unicode/norm/readwriter_test.go b/vendor/golang.org/x/text/unicode/norm/readwriter_test.go deleted file mode 100644 index b7756ba2..00000000 --- a/vendor/golang.org/x/text/unicode/norm/readwriter_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 norm - -import ( - "bytes" - "fmt" - "testing" -) - -var bufSizes = []int{1, 2, 3, 4, 5, 6, 7, 8, 100, 101, 102, 103, 4000, 4001, 4002, 4003} - -func readFunc(size int) appendFunc { - return func(f Form, out []byte, s string) []byte { - out = append(out, s...) - r := f.Reader(bytes.NewBuffer(out)) - buf := make([]byte, size) - result := []byte{} - for n, err := 0, error(nil); err == nil; { - n, err = r.Read(buf) - result = append(result, buf[:n]...) - } - return result - } -} - -func TestReader(t *testing.T) { - for _, s := range bufSizes { - name := fmt.Sprintf("TestReader%d", s) - runNormTests(t, name, readFunc(s)) - } -} - -func writeFunc(size int) appendFunc { - return func(f Form, out []byte, s string) []byte { - in := append(out, s...) - result := new(bytes.Buffer) - w := f.Writer(result) - buf := make([]byte, size) - for n := 0; len(in) > 0; in = in[n:] { - n = copy(buf, in) - _, _ = w.Write(buf[:n]) - } - w.Close() - return result.Bytes() - } -} - -func TestWriter(t *testing.T) { - for _, s := range bufSizes { - name := fmt.Sprintf("TestWriter%d", s) - runNormTests(t, name, writeFunc(s)) - } -} diff --git a/vendor/golang.org/x/text/unicode/norm/transform_test.go b/vendor/golang.org/x/text/unicode/norm/transform_test.go deleted file mode 100644 index d596ff3d..00000000 --- a/vendor/golang.org/x/text/unicode/norm/transform_test.go +++ /dev/null @@ -1,101 +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 norm - -import ( - "fmt" - "testing" - - "golang.org/x/text/transform" -) - -func TestTransform(t *testing.T) { - tests := []struct { - f Form - in, out string - eof bool - dstSize int - err error - }{ - {NFC, "ab", "ab", true, 2, nil}, - {NFC, "qx", "qx", true, 2, nil}, - {NFD, "qx", "qx", true, 2, nil}, - {NFC, "", "", true, 1, nil}, - {NFD, "", "", true, 1, nil}, - {NFC, "", "", false, 1, nil}, - {NFD, "", "", false, 1, nil}, - - // Normalized segment does not fit in destination. - {NFD, "ö", "", true, 1, transform.ErrShortDst}, - {NFD, "ö", "", true, 2, transform.ErrShortDst}, - - // As an artifact of the algorithm, only full segments are written. - // This is not strictly required, and some bytes could be written. - // In practice, for Transform to not block, the destination buffer - // should be at least MaxSegmentSize to work anyway and these edge - // conditions will be relatively rare. - {NFC, "ab", "", true, 1, transform.ErrShortDst}, - // This is even true for inert runes. - {NFC, "qx", "", true, 1, transform.ErrShortDst}, - {NFC, "a\u0300abc", "\u00e0a", true, 4, transform.ErrShortDst}, - - // We cannot write a segment if successive runes could still change the result. - {NFD, "ö", "", false, 3, transform.ErrShortSrc}, - {NFC, "a\u0300", "", false, 4, transform.ErrShortSrc}, - {NFD, "a\u0300", "", false, 4, transform.ErrShortSrc}, - {NFC, "ö", "", false, 3, transform.ErrShortSrc}, - - {NFC, "a\u0300", "", true, 1, transform.ErrShortDst}, - // Theoretically could fit, but won't due to simplified checks. - {NFC, "a\u0300", "", true, 2, transform.ErrShortDst}, - {NFC, "a\u0300", "", true, 3, transform.ErrShortDst}, - {NFC, "a\u0300", "\u00e0", true, 4, nil}, - - {NFD, "öa\u0300", "o\u0308", false, 8, transform.ErrShortSrc}, - {NFD, "öa\u0300ö", "o\u0308a\u0300", true, 8, transform.ErrShortDst}, - {NFD, "öa\u0300ö", "o\u0308a\u0300", false, 12, transform.ErrShortSrc}, - - // Illegal input is copied verbatim. - {NFD, "\xbd\xb2=\xbc ", "\xbd\xb2=\xbc ", true, 8, nil}, - } - b := make([]byte, 100) - for i, tt := range tests { - nDst, _, err := tt.f.Transform(b[:tt.dstSize], []byte(tt.in), tt.eof) - out := string(b[:nDst]) - if out != tt.out || err != tt.err { - t.Errorf("%d: was %+q (%v); want %+q (%v)", i, out, err, tt.out, tt.err) - } - if want := tt.f.String(tt.in)[:nDst]; want != out { - t.Errorf("%d: incorrect normalization: was %+q; want %+q", i, out, want) - } - } -} - -var transBufSizes = []int{ - MaxTransformChunkSize, - 3 * MaxTransformChunkSize / 2, - 2 * MaxTransformChunkSize, - 3 * MaxTransformChunkSize, - 100 * MaxTransformChunkSize, -} - -func doTransNorm(f Form, buf []byte, b []byte) []byte { - acc := []byte{} - for p := 0; p < len(b); { - nd, ns, _ := f.Transform(buf[:], b[p:], true) - p += ns - acc = append(acc, buf[:nd]...) - } - return acc -} - -func TestTransformNorm(t *testing.T) { - for _, sz := range transBufSizes { - buf := make([]byte, sz) - runNormTests(t, fmt.Sprintf("Transform:%d", sz), func(f Form, out []byte, s string) []byte { - return doTransNorm(f, buf, append(out, s...)) - }) - } -} diff --git a/vendor/golang.org/x/text/unicode/norm/ucd_test.go b/vendor/golang.org/x/text/unicode/norm/ucd_test.go deleted file mode 100644 index 29205a6a..00000000 --- a/vendor/golang.org/x/text/unicode/norm/ucd_test.go +++ /dev/null @@ -1,275 +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 norm - -import ( - "bufio" - "bytes" - "fmt" - "regexp" - "runtime" - "strconv" - "strings" - "sync" - "testing" - "time" - "unicode/utf8" - - "golang.org/x/text/internal/gen" - "golang.org/x/text/internal/testtext" -) - -var once sync.Once - -func skipShort(t *testing.T) { - testtext.SkipIfNotLong(t) - - once.Do(func() { loadTestData(t) }) -} - -// This regression test runs the test set in NormalizationTest.txt -// (taken from http://www.unicode.org/Public//ucd/). -// -// NormalizationTest.txt has form: -// @Part0 # Specific cases -// # -// 1E0A;1E0A;0044 0307;1E0A;0044 0307; # (Ḋ; Ḋ; D◌̇; Ḋ; D◌̇; ) LATIN CAPITAL LETTER D WITH DOT ABOVE -// 1E0C;1E0C;0044 0323;1E0C;0044 0323; # (Ḍ; Ḍ; D◌̣; Ḍ; D◌̣; ) LATIN CAPITAL LETTER D WITH DOT BELOW -// -// Each test has 5 columns (c1, c2, c3, c4, c5), where -// (c1, c2, c3, c4, c5) == (c1, NFC(c1), NFD(c1), NFKC(c1), NFKD(c1)) -// -// CONFORMANCE: -// 1. The following invariants must be true for all conformant implementations -// -// NFC -// c2 == NFC(c1) == NFC(c2) == NFC(c3) -// c4 == NFC(c4) == NFC(c5) -// -// NFD -// c3 == NFD(c1) == NFD(c2) == NFD(c3) -// c5 == NFD(c4) == NFD(c5) -// -// NFKC -// c4 == NFKC(c1) == NFKC(c2) == NFKC(c3) == NFKC(c4) == NFKC(c5) -// -// NFKD -// c5 == NFKD(c1) == NFKD(c2) == NFKD(c3) == NFKD(c4) == NFKD(c5) -// -// 2. For every code point X assigned in this version of Unicode that is not -// specifically listed in Part 1, the following invariants must be true -// for all conformant implementations: -// -// X == NFC(X) == NFD(X) == NFKC(X) == NFKD(X) -// - -// Column types. -const ( - cRaw = iota - cNFC - cNFD - cNFKC - cNFKD - cMaxColumns -) - -// Holds data from NormalizationTest.txt -var part []Part - -type Part struct { - name string - number int - tests []Test -} - -type Test struct { - name string - partnr int - number int - r rune // used for character by character test - cols [cMaxColumns]string // Each has 5 entries, see below. -} - -func (t Test) Name() string { - if t.number < 0 { - return part[t.partnr].name - } - return fmt.Sprintf("%s:%d", part[t.partnr].name, t.number) -} - -var partRe = regexp.MustCompile(`@Part(\d) # (.*)$`) -var testRe = regexp.MustCompile(`^` + strings.Repeat(`([\dA-F ]+);`, 5) + ` # (.*)$`) - -var counter int - -// Load the data form NormalizationTest.txt -func loadTestData(t *testing.T) { - f := gen.OpenUCDFile("NormalizationTest.txt") - defer f.Close() - scanner := bufio.NewScanner(f) - for scanner.Scan() { - line := scanner.Text() - if len(line) == 0 || line[0] == '#' { - continue - } - m := partRe.FindStringSubmatch(line) - if m != nil { - if len(m) < 3 { - t.Fatal("Failed to parse Part: ", line) - } - i, err := strconv.Atoi(m[1]) - if err != nil { - t.Fatal(err) - } - name := m[2] - part = append(part, Part{name: name[:len(name)-1], number: i}) - continue - } - m = testRe.FindStringSubmatch(line) - if m == nil || len(m) < 7 { - t.Fatalf(`Failed to parse: "%s" result: %#v`, line, m) - } - test := Test{name: m[6], partnr: len(part) - 1, number: counter} - counter++ - for j := 1; j < len(m)-1; j++ { - for _, split := range strings.Split(m[j], " ") { - r, err := strconv.ParseUint(split, 16, 64) - if err != nil { - t.Fatal(err) - } - if test.r == 0 { - // save for CharacterByCharacterTests - test.r = rune(r) - } - var buf [utf8.UTFMax]byte - sz := utf8.EncodeRune(buf[:], rune(r)) - test.cols[j-1] += string(buf[:sz]) - } - } - part := &part[len(part)-1] - part.tests = append(part.tests, test) - } - if scanner.Err() != nil { - t.Fatal(scanner.Err()) - } -} - -func cmpResult(t *testing.T, tc *Test, name string, f Form, gold, test, result string) { - if gold != result { - t.Errorf("%s:%s: %s(%+q)=%+q; want %+q: %s", - tc.Name(), name, fstr[f], test, result, gold, tc.name) - } -} - -func cmpIsNormal(t *testing.T, tc *Test, name string, f Form, test string, result, want bool) { - if result != want { - t.Errorf("%s:%s: %s(%+q)=%v; want %v", tc.Name(), name, fstr[f], test, result, want) - } -} - -func doTest(t *testing.T, tc *Test, f Form, gold, test string) { - testb := []byte(test) - result := f.Bytes(testb) - cmpResult(t, tc, "Bytes", f, gold, test, string(result)) - - sresult := f.String(test) - cmpResult(t, tc, "String", f, gold, test, sresult) - - acc := []byte{} - i := Iter{} - i.InitString(f, test) - for !i.Done() { - acc = append(acc, i.Next()...) - } - cmpResult(t, tc, "Iter.Next", f, gold, test, string(acc)) - - buf := make([]byte, 128) - acc = nil - for p := 0; p < len(testb); { - nDst, nSrc, _ := f.Transform(buf, testb[p:], true) - acc = append(acc, buf[:nDst]...) - p += nSrc - } - cmpResult(t, tc, "Transform", f, gold, test, string(acc)) - - for i := range test { - out := f.Append(f.Bytes([]byte(test[:i])), []byte(test[i:])...) - cmpResult(t, tc, fmt.Sprintf(":Append:%d", i), f, gold, test, string(out)) - } - cmpIsNormal(t, tc, "IsNormal", f, test, f.IsNormal([]byte(test)), test == gold) - cmpIsNormal(t, tc, "IsNormalString", f, test, f.IsNormalString(test), test == gold) -} - -func doConformanceTests(t *testing.T, tc *Test, partn int) { - for i := 0; i <= 2; i++ { - doTest(t, tc, NFC, tc.cols[1], tc.cols[i]) - doTest(t, tc, NFD, tc.cols[2], tc.cols[i]) - doTest(t, tc, NFKC, tc.cols[3], tc.cols[i]) - doTest(t, tc, NFKD, tc.cols[4], tc.cols[i]) - } - for i := 3; i <= 4; i++ { - doTest(t, tc, NFC, tc.cols[3], tc.cols[i]) - doTest(t, tc, NFD, tc.cols[4], tc.cols[i]) - doTest(t, tc, NFKC, tc.cols[3], tc.cols[i]) - doTest(t, tc, NFKD, tc.cols[4], tc.cols[i]) - } -} - -func TestCharacterByCharacter(t *testing.T) { - skipShort(t) - tests := part[1].tests - var last rune = 0 - for i := 0; i <= len(tests); i++ { // last one is special case - var r rune - if i == len(tests) { - r = 0x2FA1E // Don't have to go to 0x10FFFF - } else { - r = tests[i].r - } - for last++; last < r; last++ { - // Check all characters that were not explicitly listed in the test. - tc := &Test{partnr: 1, number: -1} - char := string(last) - doTest(t, tc, NFC, char, char) - doTest(t, tc, NFD, char, char) - doTest(t, tc, NFKC, char, char) - doTest(t, tc, NFKD, char, char) - } - if i < len(tests) { - doConformanceTests(t, &tests[i], 1) - } - } -} - -func TestStandardTests(t *testing.T) { - skipShort(t) - for _, j := range []int{0, 2, 3} { - for _, test := range part[j].tests { - doConformanceTests(t, &test, j) - } - } -} - -// TestPerformance verifies that normalization is O(n). If any of the -// code does not properly check for maxCombiningChars, normalization -// may exhibit O(n**2) behavior. -func TestPerformance(t *testing.T) { - skipShort(t) - runtime.GOMAXPROCS(2) - success := make(chan bool, 1) - go func() { - buf := bytes.Repeat([]byte("\u035D"), 1024*1024) - buf = append(buf, "\u035B"...) - NFC.Append(nil, buf...) - success <- true - }() - timeout := time.After(1 * time.Second) - select { - case <-success: - // test completed before the timeout - case <-timeout: - t.Errorf(`unexpectedly long time to complete PerformanceTest`) - } -} diff --git a/vendor/golang.org/x/text/unicode/rangetable/merge_test.go b/vendor/golang.org/x/text/unicode/rangetable/merge_test.go deleted file mode 100644 index 93ed0fca..00000000 --- a/vendor/golang.org/x/text/unicode/rangetable/merge_test.go +++ /dev/null @@ -1,184 +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 rangetable - -import ( - "testing" - "unicode" -) - -var ( - maxRuneTable = &unicode.RangeTable{ - R32: []unicode.Range32{ - {unicode.MaxRune, unicode.MaxRune, 1}, - }, - } - - overlap1 = &unicode.RangeTable{ - R16: []unicode.Range16{ - {0x100, 0xfffc, 4}, - }, - R32: []unicode.Range32{ - {0x100000, 0x10fffc, 4}, - }, - } - - overlap2 = &unicode.RangeTable{ - R16: []unicode.Range16{ - {0x101, 0xfffd, 4}, - }, - R32: []unicode.Range32{ - {0x100001, 0x10fffd, 3}, - }, - } - - // The following table should be compacted into two entries for R16 and R32. - optimize = &unicode.RangeTable{ - R16: []unicode.Range16{ - {0x1, 0x1, 1}, - {0x2, 0x2, 1}, - {0x3, 0x3, 1}, - {0x5, 0x5, 1}, - {0x7, 0x7, 1}, - {0x9, 0x9, 1}, - {0xb, 0xf, 2}, - }, - R32: []unicode.Range32{ - {0x10001, 0x10001, 1}, - {0x10002, 0x10002, 1}, - {0x10003, 0x10003, 1}, - {0x10005, 0x10005, 1}, - {0x10007, 0x10007, 1}, - {0x10009, 0x10009, 1}, - {0x1000b, 0x1000f, 2}, - }, - } -) - -func TestMerge(t *testing.T) { - for i, tt := range [][]*unicode.RangeTable{ - {unicode.Cc, unicode.Cf}, - {unicode.L, unicode.Ll}, - {unicode.L, unicode.Ll, unicode.Lu}, - {unicode.Ll, unicode.Lu}, - {unicode.M}, - unicode.GraphicRanges, - cased, - - // Merge R16 only and R32 only and vice versa. - {unicode.Khmer, unicode.Khudawadi}, - {unicode.Imperial_Aramaic, unicode.Radical}, - - // Merge with empty. - {&unicode.RangeTable{}}, - {&unicode.RangeTable{}, &unicode.RangeTable{}}, - {&unicode.RangeTable{}, &unicode.RangeTable{}, &unicode.RangeTable{}}, - {&unicode.RangeTable{}, unicode.Hiragana}, - {unicode.Inherited, &unicode.RangeTable{}}, - {&unicode.RangeTable{}, unicode.Hanunoo, &unicode.RangeTable{}}, - - // Hypothetical tables. - {maxRuneTable}, - {overlap1, overlap2}, - - // Optimization - {optimize}, - } { - rt := Merge(tt...) - for r := rune(0); r <= unicode.MaxRune; r++ { - if got, want := unicode.Is(rt, r), unicode.In(r, tt...); got != want { - t.Fatalf("%d:%U: got %v; want %v", i, r, got, want) - } - } - // Test optimization and correctness for R16. - for k := 0; k < len(rt.R16)-1; k++ { - if lo, hi := rt.R16[k].Lo, rt.R16[k].Hi; lo > hi { - t.Errorf("%d: Lo (%x) > Hi (%x)", i, lo, hi) - } - if hi, lo := rt.R16[k].Hi, rt.R16[k+1].Lo; hi >= lo { - t.Errorf("%d: Hi (%x) >= next Lo (%x)", i, hi, lo) - } - if rt.R16[k].Hi+rt.R16[k].Stride == rt.R16[k+1].Lo { - t.Errorf("%d: missed optimization for R16 at %d between %X and %x", - i, k, rt.R16[k], rt.R16[k+1]) - } - } - // Test optimization and correctness for R32. - for k := 0; k < len(rt.R32)-1; k++ { - if lo, hi := rt.R32[k].Lo, rt.R32[k].Hi; lo > hi { - t.Errorf("%d: Lo (%x) > Hi (%x)", i, lo, hi) - } - if hi, lo := rt.R32[k].Hi, rt.R32[k+1].Lo; hi >= lo { - t.Errorf("%d: Hi (%x) >= next Lo (%x)", i, hi, lo) - } - if rt.R32[k].Hi+rt.R32[k].Stride == rt.R32[k+1].Lo { - t.Errorf("%d: missed optimization for R32 at %d between %X and %X", - i, k, rt.R32[k], rt.R32[k+1]) - } - } - } -} - -const runes = "Hello World in 2015!,\U0010fffd" - -func BenchmarkNotMerged(t *testing.B) { - for i := 0; i < t.N; i++ { - for _, r := range runes { - unicode.In(r, unicode.GraphicRanges...) - } - } -} - -func BenchmarkMerged(t *testing.B) { - rt := Merge(unicode.GraphicRanges...) - - for i := 0; i < t.N; i++ { - for _, r := range runes { - unicode.Is(rt, r) - } - } -} - -var cased = []*unicode.RangeTable{ - unicode.Lower, - unicode.Upper, - unicode.Title, - unicode.Other_Lowercase, - unicode.Other_Uppercase, -} - -func BenchmarkNotMergedCased(t *testing.B) { - for i := 0; i < t.N; i++ { - for _, r := range runes { - unicode.In(r, cased...) - } - } -} - -func BenchmarkMergedCased(t *testing.B) { - // This reduces len(R16) from 243 to 82 and len(R32) from 65 to 35 for - // Unicode 7.0.0. - rt := Merge(cased...) - - for i := 0; i < t.N; i++ { - for _, r := range runes { - unicode.Is(rt, r) - } - } -} - -func BenchmarkInit(t *testing.B) { - for i := 0; i < t.N; i++ { - Merge(cased...) - Merge(unicode.GraphicRanges...) - } -} - -func BenchmarkInit2(t *testing.B) { - // Hypothetical near-worst-case performance. - for i := 0; i < t.N; i++ { - Merge(overlap1, overlap2) - } -} diff --git a/vendor/golang.org/x/text/unicode/rangetable/rangetable_test.go b/vendor/golang.org/x/text/unicode/rangetable/rangetable_test.go deleted file mode 100644 index 5a355aa3..00000000 --- a/vendor/golang.org/x/text/unicode/rangetable/rangetable_test.go +++ /dev/null @@ -1,55 +0,0 @@ -package rangetable - -import ( - "reflect" - "testing" - "unicode" -) - -var ( - empty = &unicode.RangeTable{} - many = &unicode.RangeTable{ - R16: []unicode.Range16{{0, 0xffff, 5}}, - R32: []unicode.Range32{{0x10004, 0x10009, 5}}, - LatinOffset: 0, - } -) - -func TestVisit(t *testing.T) { - Visit(empty, func(got rune) { - t.Error("call from empty RangeTable") - }) - - var want rune - Visit(many, func(got rune) { - if got != want { - t.Errorf("got %U; want %U", got, want) - } - want += 5 - }) - if want -= 5; want != 0x10009 { - t.Errorf("last run was %U; want U+10009", want) - } -} - -func TestNew(t *testing.T) { - for i, rt := range []*unicode.RangeTable{ - empty, - unicode.Co, - unicode.Letter, - unicode.ASCII_Hex_Digit, - many, - maxRuneTable, - } { - var got, want []rune - Visit(rt, func(r rune) { - want = append(want, r) - }) - Visit(New(want...), func(r rune) { - got = append(got, r) - }) - if !reflect.DeepEqual(got, want) { - t.Errorf("%d:\ngot %v;\nwant %v", i, got, want) - } - } -} diff --git a/vendor/golang.org/x/time/CONTRIBUTING.md b/vendor/golang.org/x/time/CONTRIBUTING.md deleted file mode 100644 index d0485e88..00000000 --- a/vendor/golang.org/x/time/CONTRIBUTING.md +++ /dev/null @@ -1,26 +0,0 @@ -# Contributing to Go - -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? - -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. - -## Contributing code - -Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) -before sending patches. - -Unless otherwise noted, the Go source files are distributed under -the BSD-style license found in the LICENSE file. diff --git a/vendor/golang.org/x/time/README.md b/vendor/golang.org/x/time/README.md deleted file mode 100644 index ce9becdd..00000000 --- a/vendor/golang.org/x/time/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Go Time - -This repository provides supplementary Go time packages. - -## Download/Install - -The easiest way to install is to run `go get -u golang.org/x/time`. You can -also manually git clone the repository to `$GOPATH/src/golang.org/x/time`. - -## Report Issues / Send Patches - -This repository uses Gerrit for code changes. To learn how to submit changes to -this repository, see https://golang.org/doc/contribute.html. - -The main issue tracker for the time repository is located at -https://github.com/golang/go/issues. Prefix your issue with "x/time:" in the -subject line, so it is easy to find. diff --git a/vendor/golang.org/x/time/rate/rate_test.go b/vendor/golang.org/x/time/rate/rate_test.go deleted file mode 100644 index ec8c66dd..00000000 --- a/vendor/golang.org/x/time/rate/rate_test.go +++ /dev/null @@ -1,459 +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 go1.7 - -package rate - -import ( - "context" - "math" - "runtime" - "sync" - "sync/atomic" - "testing" - "time" -) - -func TestLimit(t *testing.T) { - if Limit(10) == Inf { - t.Errorf("Limit(10) == Inf should be false") - } -} - -func closeEnough(a, b Limit) bool { - return (math.Abs(float64(a)/float64(b)) - 1.0) < 1e-9 -} - -func TestEvery(t *testing.T) { - cases := []struct { - interval time.Duration - lim Limit - }{ - {0, Inf}, - {-1, Inf}, - {1 * time.Nanosecond, Limit(1e9)}, - {1 * time.Microsecond, Limit(1e6)}, - {1 * time.Millisecond, Limit(1e3)}, - {10 * time.Millisecond, Limit(100)}, - {100 * time.Millisecond, Limit(10)}, - {1 * time.Second, Limit(1)}, - {2 * time.Second, Limit(0.5)}, - {time.Duration(2.5 * float64(time.Second)), Limit(0.4)}, - {4 * time.Second, Limit(0.25)}, - {10 * time.Second, Limit(0.1)}, - {time.Duration(math.MaxInt64), Limit(1e9 / float64(math.MaxInt64))}, - } - for _, tc := range cases { - lim := Every(tc.interval) - if !closeEnough(lim, tc.lim) { - t.Errorf("Every(%v) = %v want %v", tc.interval, lim, tc.lim) - } - } -} - -const ( - d = 100 * time.Millisecond -) - -var ( - t0 = time.Now() - t1 = t0.Add(time.Duration(1) * d) - t2 = t0.Add(time.Duration(2) * d) - t3 = t0.Add(time.Duration(3) * d) - t4 = t0.Add(time.Duration(4) * d) - t5 = t0.Add(time.Duration(5) * d) - t9 = t0.Add(time.Duration(9) * d) -) - -type allow struct { - t time.Time - n int - ok bool -} - -func run(t *testing.T, lim *Limiter, allows []allow) { - for i, allow := range allows { - ok := lim.AllowN(allow.t, allow.n) - if ok != allow.ok { - t.Errorf("step %d: lim.AllowN(%v, %v) = %v want %v", - i, allow.t, allow.n, ok, allow.ok) - } - } -} - -func TestLimiterBurst1(t *testing.T) { - run(t, NewLimiter(10, 1), []allow{ - {t0, 1, true}, - {t0, 1, false}, - {t0, 1, false}, - {t1, 1, true}, - {t1, 1, false}, - {t1, 1, false}, - {t2, 2, false}, // burst size is 1, so n=2 always fails - {t2, 1, true}, - {t2, 1, false}, - }) -} - -func TestLimiterBurst3(t *testing.T) { - run(t, NewLimiter(10, 3), []allow{ - {t0, 2, true}, - {t0, 2, false}, - {t0, 1, true}, - {t0, 1, false}, - {t1, 4, false}, - {t2, 1, true}, - {t3, 1, true}, - {t4, 1, true}, - {t4, 1, true}, - {t4, 1, false}, - {t4, 1, false}, - {t9, 3, true}, - {t9, 0, true}, - }) -} - -func TestLimiterJumpBackwards(t *testing.T) { - run(t, NewLimiter(10, 3), []allow{ - {t1, 1, true}, // start at t1 - {t0, 1, true}, // jump back to t0, two tokens remain - {t0, 1, true}, - {t0, 1, false}, - {t0, 1, false}, - {t1, 1, true}, // got a token - {t1, 1, false}, - {t1, 1, false}, - {t2, 1, true}, // got another token - {t2, 1, false}, - {t2, 1, false}, - }) -} - -func TestSimultaneousRequests(t *testing.T) { - const ( - limit = 1 - burst = 5 - numRequests = 15 - ) - var ( - wg sync.WaitGroup - numOK = uint32(0) - ) - - // Very slow replenishing bucket. - lim := NewLimiter(limit, burst) - - // Tries to take a token, atomically updates the counter and decreases the wait - // group counter. - f := func() { - defer wg.Done() - if ok := lim.Allow(); ok { - atomic.AddUint32(&numOK, 1) - } - } - - wg.Add(numRequests) - for i := 0; i < numRequests; i++ { - go f() - } - wg.Wait() - if numOK != burst { - t.Errorf("numOK = %d, want %d", numOK, burst) - } -} - -func TestLongRunningQPS(t *testing.T) { - if testing.Short() { - t.Skip("skipping in short mode") - } - if runtime.GOOS == "openbsd" { - t.Skip("low resolution time.Sleep invalidates test (golang.org/issue/14183)") - return - } - - // The test runs for a few seconds executing many requests and then checks - // that overall number of requests is reasonable. - const ( - limit = 100 - burst = 100 - ) - var numOK = int32(0) - - lim := NewLimiter(limit, burst) - - var wg sync.WaitGroup - f := func() { - if ok := lim.Allow(); ok { - atomic.AddInt32(&numOK, 1) - } - wg.Done() - } - - start := time.Now() - end := start.Add(5 * time.Second) - for time.Now().Before(end) { - wg.Add(1) - go f() - - // This will still offer ~500 requests per second, but won't consume - // outrageous amount of CPU. - time.Sleep(2 * time.Millisecond) - } - wg.Wait() - elapsed := time.Since(start) - ideal := burst + (limit * float64(elapsed) / float64(time.Second)) - - // We should never get more requests than allowed. - if want := int32(ideal + 1); numOK > want { - t.Errorf("numOK = %d, want %d (ideal %f)", numOK, want, ideal) - } - // We should get very close to the number of requests allowed. - if want := int32(0.999 * ideal); numOK < want { - t.Errorf("numOK = %d, want %d (ideal %f)", numOK, want, ideal) - } -} - -type request struct { - t time.Time - n int - act time.Time - ok bool -} - -// dFromDuration converts a duration to a multiple of the global constant d -func dFromDuration(dur time.Duration) int { - // Adding a millisecond to be swallowed by the integer division - // because we don't care about small inaccuracies - return int((dur + time.Millisecond) / d) -} - -// dSince returns multiples of d since t0 -func dSince(t time.Time) int { - return dFromDuration(t.Sub(t0)) -} - -func runReserve(t *testing.T, lim *Limiter, req request) *Reservation { - return runReserveMax(t, lim, req, InfDuration) -} - -func runReserveMax(t *testing.T, lim *Limiter, req request, maxReserve time.Duration) *Reservation { - r := lim.reserveN(req.t, req.n, maxReserve) - if r.ok && (dSince(r.timeToAct) != dSince(req.act)) || r.ok != req.ok { - t.Errorf("lim.reserveN(t%d, %v, %v) = (t%d, %v) want (t%d, %v)", - dSince(req.t), req.n, maxReserve, dSince(r.timeToAct), r.ok, dSince(req.act), req.ok) - } - return &r -} - -func TestSimpleReserve(t *testing.T) { - lim := NewLimiter(10, 2) - - runReserve(t, lim, request{t0, 2, t0, true}) - runReserve(t, lim, request{t0, 2, t2, true}) - runReserve(t, lim, request{t3, 2, t4, true}) -} - -func TestMix(t *testing.T) { - lim := NewLimiter(10, 2) - - runReserve(t, lim, request{t0, 3, t1, false}) // should return false because n > Burst - runReserve(t, lim, request{t0, 2, t0, true}) - run(t, lim, []allow{{t1, 2, false}}) // not enought tokens - don't allow - runReserve(t, lim, request{t1, 2, t2, true}) - run(t, lim, []allow{{t1, 1, false}}) // negative tokens - don't allow - run(t, lim, []allow{{t3, 1, true}}) -} - -func TestCancelInvalid(t *testing.T) { - lim := NewLimiter(10, 2) - - runReserve(t, lim, request{t0, 2, t0, true}) - r := runReserve(t, lim, request{t0, 3, t3, false}) - r.CancelAt(t0) // should have no effect - runReserve(t, lim, request{t0, 2, t2, true}) // did not get extra tokens -} - -func TestCancelLast(t *testing.T) { - lim := NewLimiter(10, 2) - - runReserve(t, lim, request{t0, 2, t0, true}) - r := runReserve(t, lim, request{t0, 2, t2, true}) - r.CancelAt(t1) // got 2 tokens back - runReserve(t, lim, request{t1, 2, t2, true}) -} - -func TestCancelTooLate(t *testing.T) { - lim := NewLimiter(10, 2) - - runReserve(t, lim, request{t0, 2, t0, true}) - r := runReserve(t, lim, request{t0, 2, t2, true}) - r.CancelAt(t3) // too late to cancel - should have no effect - runReserve(t, lim, request{t3, 2, t4, true}) -} - -func TestCancel0Tokens(t *testing.T) { - lim := NewLimiter(10, 2) - - runReserve(t, lim, request{t0, 2, t0, true}) - r := runReserve(t, lim, request{t0, 1, t1, true}) - runReserve(t, lim, request{t0, 1, t2, true}) - r.CancelAt(t0) // got 0 tokens back - runReserve(t, lim, request{t0, 1, t3, true}) -} - -func TestCancel1Token(t *testing.T) { - lim := NewLimiter(10, 2) - - runReserve(t, lim, request{t0, 2, t0, true}) - r := runReserve(t, lim, request{t0, 2, t2, true}) - runReserve(t, lim, request{t0, 1, t3, true}) - r.CancelAt(t2) // got 1 token back - runReserve(t, lim, request{t2, 2, t4, true}) -} - -func TestCancelMulti(t *testing.T) { - lim := NewLimiter(10, 4) - - runReserve(t, lim, request{t0, 4, t0, true}) - rA := runReserve(t, lim, request{t0, 3, t3, true}) - runReserve(t, lim, request{t0, 1, t4, true}) - rC := runReserve(t, lim, request{t0, 1, t5, true}) - rC.CancelAt(t1) // get 1 token back - rA.CancelAt(t1) // get 2 tokens back, as if C was never reserved - runReserve(t, lim, request{t1, 3, t5, true}) -} - -func TestReserveJumpBack(t *testing.T) { - lim := NewLimiter(10, 2) - - runReserve(t, lim, request{t1, 2, t1, true}) // start at t1 - runReserve(t, lim, request{t0, 1, t1, true}) // should violate Limit,Burst - runReserve(t, lim, request{t2, 2, t3, true}) -} - -func TestReserveJumpBackCancel(t *testing.T) { - lim := NewLimiter(10, 2) - - runReserve(t, lim, request{t1, 2, t1, true}) // start at t1 - r := runReserve(t, lim, request{t1, 2, t3, true}) - runReserve(t, lim, request{t1, 1, t4, true}) - r.CancelAt(t0) // cancel at t0, get 1 token back - runReserve(t, lim, request{t1, 2, t4, true}) // should violate Limit,Burst -} - -func TestReserveSetLimit(t *testing.T) { - lim := NewLimiter(5, 2) - - runReserve(t, lim, request{t0, 2, t0, true}) - runReserve(t, lim, request{t0, 2, t4, true}) - lim.SetLimitAt(t2, 10) - runReserve(t, lim, request{t2, 1, t4, true}) // violates Limit and Burst -} - -func TestReserveSetLimitCancel(t *testing.T) { - lim := NewLimiter(5, 2) - - runReserve(t, lim, request{t0, 2, t0, true}) - r := runReserve(t, lim, request{t0, 2, t4, true}) - lim.SetLimitAt(t2, 10) - r.CancelAt(t2) // 2 tokens back - runReserve(t, lim, request{t2, 2, t3, true}) -} - -func TestReserveMax(t *testing.T) { - lim := NewLimiter(10, 2) - maxT := d - - runReserveMax(t, lim, request{t0, 2, t0, true}, maxT) - runReserveMax(t, lim, request{t0, 1, t1, true}, maxT) // reserve for close future - runReserveMax(t, lim, request{t0, 1, t2, false}, maxT) // time to act too far in the future -} - -type wait struct { - name string - ctx context.Context - n int - delay int // in multiples of d - nilErr bool -} - -func runWait(t *testing.T, lim *Limiter, w wait) { - start := time.Now() - err := lim.WaitN(w.ctx, w.n) - delay := time.Now().Sub(start) - if (w.nilErr && err != nil) || (!w.nilErr && err == nil) || w.delay != dFromDuration(delay) { - errString := "" - if !w.nilErr { - errString = "" - } - t.Errorf("lim.WaitN(%v, lim, %v) = %v with delay %v ; want %v with delay %v", - w.name, w.n, err, delay, errString, d*time.Duration(w.delay)) - } -} - -func TestWaitSimple(t *testing.T) { - lim := NewLimiter(10, 3) - - ctx, cancel := context.WithCancel(context.Background()) - cancel() - runWait(t, lim, wait{"already-cancelled", ctx, 1, 0, false}) - - runWait(t, lim, wait{"exceed-burst-error", context.Background(), 4, 0, false}) - - runWait(t, lim, wait{"act-now", context.Background(), 2, 0, true}) - runWait(t, lim, wait{"act-later", context.Background(), 3, 2, true}) -} - -func TestWaitCancel(t *testing.T) { - lim := NewLimiter(10, 3) - - ctx, cancel := context.WithCancel(context.Background()) - runWait(t, lim, wait{"act-now", ctx, 2, 0, true}) // after this lim.tokens = 1 - go func() { - time.Sleep(d) - cancel() - }() - runWait(t, lim, wait{"will-cancel", ctx, 3, 1, false}) - // should get 3 tokens back, and have lim.tokens = 2 - t.Logf("tokens:%v last:%v lastEvent:%v", lim.tokens, lim.last, lim.lastEvent) - runWait(t, lim, wait{"act-now-after-cancel", context.Background(), 2, 0, true}) -} - -func TestWaitTimeout(t *testing.T) { - lim := NewLimiter(10, 3) - - ctx, cancel := context.WithTimeout(context.Background(), d) - defer cancel() - runWait(t, lim, wait{"act-now", ctx, 2, 0, true}) - runWait(t, lim, wait{"w-timeout-err", ctx, 3, 0, false}) -} - -func TestWaitInf(t *testing.T) { - lim := NewLimiter(Inf, 0) - - runWait(t, lim, wait{"exceed-burst-no-error", context.Background(), 3, 0, true}) -} - -func BenchmarkAllowN(b *testing.B) { - lim := NewLimiter(Every(1*time.Second), 1) - now := time.Now() - b.ReportAllocs() - b.ResetTimer() - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - lim.AllowN(now, 1) - } - }) -} - -func BenchmarkWaitNNoDelay(b *testing.B) { - lim := NewLimiter(Limit(b.N), b.N) - ctx := context.Background() - b.ReportAllocs() - b.ResetTimer() - for i := 0; i < b.N; i++ { - lim.WaitN(ctx, 1) - } -} diff --git a/vendor/golang.org/x/tools/.gitattributes b/vendor/golang.org/x/tools/.gitattributes deleted file mode 100644 index d2f212e5..00000000 --- a/vendor/golang.org/x/tools/.gitattributes +++ /dev/null @@ -1,10 +0,0 @@ -# Treat all files in this repo as binary, with no git magic updating -# line endings. Windows users contributing to Go will need to use a -# modern version of git and editors capable of LF line endings. -# -# We'll prevent accidental CRLF line endings from entering the repo -# via the git-review gofmt checks. -# -# See golang.org/issue/9281 - -* -text diff --git a/vendor/golang.org/x/tools/.gitignore b/vendor/golang.org/x/tools/.gitignore deleted file mode 100644 index 5a9d62ef..00000000 --- a/vendor/golang.org/x/tools/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Add no patterns to .gitignore except for files generated by the build. -last-change diff --git a/vendor/golang.org/x/tools/CONTRIBUTING.md b/vendor/golang.org/x/tools/CONTRIBUTING.md deleted file mode 100644 index d0485e88..00000000 --- a/vendor/golang.org/x/tools/CONTRIBUTING.md +++ /dev/null @@ -1,26 +0,0 @@ -# Contributing to Go - -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? - -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. - -## Contributing code - -Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) -before sending patches. - -Unless otherwise noted, the Go source files are distributed under -the BSD-style license found in the LICENSE file. diff --git a/vendor/golang.org/x/tools/README.md b/vendor/golang.org/x/tools/README.md deleted file mode 100644 index 20be9e1a..00000000 --- a/vendor/golang.org/x/tools/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# Go Tools - -This subrepository holds the source for various packages and tools that support -the Go programming language. - -Some of the tools, `godoc` and `vet` for example, are included in binary Go -distributions. - -Others, including the Go `guru` and the test coverage tool, can be fetched with -`go get`. - -Packages include a type-checker for Go and an implementation of the -Static Single Assignment form (SSA) representation for Go programs. - -## Download/Install - -The easiest way to install is to run `go get -u golang.org/x/tools/...`. You can -also manually git clone the repository to `$GOPATH/src/golang.org/x/tools`. - -## Report Issues / Send Patches - -This repository uses Gerrit for code changes. To learn how to submit changes to -this repository, see https://golang.org/doc/contribute.html. - -The main issue tracker for the tools repository is located at -https://github.com/golang/go/issues. Prefix your issue with "x/tools/(your -subdir):" in the subject line, so it is easy to find. diff --git a/vendor/golang.org/x/tools/cmd/getgo/LICENSE b/vendor/golang.org/x/tools/cmd/getgo/LICENSE new file mode 100644 index 00000000..32017f8f --- /dev/null +++ b/vendor/golang.org/x/tools/cmd/getgo/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2017 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/tools/codereview.cfg b/vendor/golang.org/x/tools/codereview.cfg deleted file mode 100644 index 3f8b14b6..00000000 --- a/vendor/golang.org/x/tools/codereview.cfg +++ /dev/null @@ -1 +0,0 @@ -issuerepo: golang/go diff --git a/vendor/golang.org/x/tools/go/ast/astutil/enclosing_test.go b/vendor/golang.org/x/tools/go/ast/astutil/enclosing_test.go deleted file mode 100644 index 107f87c5..00000000 --- a/vendor/golang.org/x/tools/go/ast/astutil/enclosing_test.go +++ /dev/null @@ -1,195 +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 astutil_test - -// This file defines tests of PathEnclosingInterval. - -// TODO(adonovan): exhaustive tests that run over the whole input -// tree, not just handcrafted examples. - -import ( - "bytes" - "fmt" - "go/ast" - "go/parser" - "go/token" - "strings" - "testing" - - "golang.org/x/tools/go/ast/astutil" -) - -// pathToString returns a string containing the concrete types of the -// nodes in path. -func pathToString(path []ast.Node) string { - var buf bytes.Buffer - fmt.Fprint(&buf, "[") - for i, n := range path { - if i > 0 { - fmt.Fprint(&buf, " ") - } - fmt.Fprint(&buf, strings.TrimPrefix(fmt.Sprintf("%T", n), "*ast.")) - } - fmt.Fprint(&buf, "]") - return buf.String() -} - -// findInterval parses input and returns the [start, end) positions of -// the first occurrence of substr in input. f==nil indicates failure; -// an error has already been reported in that case. -// -func findInterval(t *testing.T, fset *token.FileSet, input, substr string) (f *ast.File, start, end token.Pos) { - f, err := parser.ParseFile(fset, "", input, 0) - if err != nil { - t.Errorf("parse error: %s", err) - return - } - - i := strings.Index(input, substr) - if i < 0 { - t.Errorf("%q is not a substring of input", substr) - f = nil - return - } - - filePos := fset.File(f.Package) - return f, filePos.Pos(i), filePos.Pos(i + len(substr)) -} - -// Common input for following tests. -const input = ` -// Hello. -package main -import "fmt" -func f() {} -func main() { - z := (x + y) // add them - f() // NB: ExprStmt and its CallExpr have same Pos/End -} -` - -func TestPathEnclosingInterval_Exact(t *testing.T) { - // For the exact tests, we check that a substring is mapped to - // the canonical string for the node it denotes. - tests := []struct { - substr string // first occurrence of this string indicates interval - node string // complete text of expected containing node - }{ - {"package", - input[11 : len(input)-1]}, - {"\npack", - input[11 : len(input)-1]}, - {"main", - "main"}, - {"import", - "import \"fmt\""}, - {"\"fmt\"", - "\"fmt\""}, - {"\nfunc f() {}\n", - "func f() {}"}, - {"x ", - "x"}, - {" y", - "y"}, - {"z", - "z"}, - {" + ", - "x + y"}, - {" :=", - "z := (x + y)"}, - {"x + y", - "x + y"}, - {"(x + y)", - "(x + y)"}, - {" (x + y) ", - "(x + y)"}, - {" (x + y) // add", - "(x + y)"}, - {"func", - "func f() {}"}, - {"func f() {}", - "func f() {}"}, - {"\nfun", - "func f() {}"}, - {" f", - "f"}, - } - for _, test := range tests { - f, start, end := findInterval(t, new(token.FileSet), input, test.substr) - if f == nil { - continue - } - - path, exact := astutil.PathEnclosingInterval(f, start, end) - if !exact { - t.Errorf("PathEnclosingInterval(%q) not exact", test.substr) - continue - } - - if len(path) == 0 { - if test.node != "" { - t.Errorf("PathEnclosingInterval(%q).path: got [], want %q", - test.substr, test.node) - } - continue - } - - if got := input[path[0].Pos():path[0].End()]; got != test.node { - t.Errorf("PathEnclosingInterval(%q): got %q, want %q (path was %s)", - test.substr, got, test.node, pathToString(path)) - continue - } - } -} - -func TestPathEnclosingInterval_Paths(t *testing.T) { - // For these tests, we check only the path of the enclosing - // node, but not its complete text because it's often quite - // large when !exact. - tests := []struct { - substr string // first occurrence of this string indicates interval - path string // the pathToString(),exact of the expected path - }{ - {"// add", - "[BlockStmt FuncDecl File],false"}, - {"(x + y", - "[ParenExpr AssignStmt BlockStmt FuncDecl File],false"}, - {"x +", - "[BinaryExpr ParenExpr AssignStmt BlockStmt FuncDecl File],false"}, - {"z := (x", - "[AssignStmt BlockStmt FuncDecl File],false"}, - {"func f", - "[FuncDecl File],false"}, - {"func f()", - "[FuncDecl File],false"}, - {" f()", - "[FuncDecl File],false"}, - {"() {}", - "[FuncDecl File],false"}, - {"// Hello", - "[File],false"}, - {" f", - "[Ident FuncDecl File],true"}, - {"func ", - "[FuncDecl File],true"}, - {"mai", - "[Ident File],true"}, - {"f() // NB", - "[CallExpr ExprStmt BlockStmt FuncDecl File],true"}, - } - for _, test := range tests { - f, start, end := findInterval(t, new(token.FileSet), input, test.substr) - if f == nil { - continue - } - - path, exact := astutil.PathEnclosingInterval(f, start, end) - if got := fmt.Sprintf("%s,%v", pathToString(path), exact); got != test.path { - t.Errorf("PathEnclosingInterval(%q): got %q, want %q", - test.substr, got, test.path) - continue - } - } -} diff --git a/vendor/golang.org/x/tools/go/ast/astutil/imports_test.go b/vendor/golang.org/x/tools/go/ast/astutil/imports_test.go deleted file mode 100644 index da775ef4..00000000 --- a/vendor/golang.org/x/tools/go/ast/astutil/imports_test.go +++ /dev/null @@ -1,1820 +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 astutil - -import ( - "bytes" - "go/ast" - "go/format" - "go/parser" - "go/token" - "reflect" - "strconv" - "testing" -) - -var fset = token.NewFileSet() - -func parse(t *testing.T, name, in string) *ast.File { - file, err := parser.ParseFile(fset, name, in, parser.ParseComments) - if err != nil { - t.Fatalf("%s parse: %v", name, err) - } - return file -} - -func print(t *testing.T, name string, f *ast.File) string { - var buf bytes.Buffer - if err := format.Node(&buf, fset, f); err != nil { - t.Fatalf("%s gofmt: %v", name, err) - } - return string(buf.Bytes()) -} - -type test struct { - name string - renamedPkg string - pkg string - in string - out string - broken bool // known broken -} - -var addTests = []test{ - { - name: "leave os alone", - pkg: "os", - in: `package main - -import ( - "os" -) -`, - out: `package main - -import ( - "os" -) -`, - }, - { - name: "import.1", - pkg: "os", - in: `package main -`, - out: `package main - -import "os" -`, - }, - { - name: "import.2", - pkg: "os", - in: `package main - -// Comment -import "C" -`, - out: `package main - -// Comment -import "C" -import "os" -`, - }, - { - name: "import.3", - pkg: "os", - in: `package main - -// Comment -import "C" - -import ( - "io" - "utf8" -) -`, - out: `package main - -// Comment -import "C" - -import ( - "io" - "os" - "utf8" -) -`, - }, - { - name: "import.17", - pkg: "x/y/z", - in: `package main - -// Comment -import "C" - -import ( - "a" - "b" - - "x/w" - - "d/f" -) -`, - out: `package main - -// Comment -import "C" - -import ( - "a" - "b" - - "x/w" - "x/y/z" - - "d/f" -) -`, - }, - { - name: "issue #19190", - pkg: "x.org/y/z", - in: `package main - -// Comment -import "C" - -import ( - "bytes" - "os" - - "d.com/f" -) -`, - out: `package main - -// Comment -import "C" - -import ( - "bytes" - "os" - - "d.com/f" - "x.org/y/z" -) -`, - }, - { - name: "issue #19190 with existing grouped import packages", - pkg: "x.org/y/z", - in: `package main - -// Comment -import "C" - -import ( - "bytes" - "os" - - "c.com/f" - "d.com/f" - - "y.com/a" - "y.com/b" - "y.com/c" -) -`, - out: `package main - -// Comment -import "C" - -import ( - "bytes" - "os" - - "c.com/f" - "d.com/f" - "x.org/y/z" - - "y.com/a" - "y.com/b" - "y.com/c" -) -`, - }, - { - name: "issue #19190 - match score is still respected", - pkg: "y.org/c", - in: `package main - -import ( - "x.org/a" - - "y.org/b" -) -`, - out: `package main - -import ( - "x.org/a" - - "y.org/b" - "y.org/c" -) -`, - }, - { - name: "import into singular group", - pkg: "bytes", - in: `package main - -import "os" - -`, - out: `package main - -import ( - "bytes" - "os" -) -`, - }, - { - name: "import into singular group with comment", - pkg: "bytes", - in: `package main - -import /* why */ /* comment here? */ "os" - -`, - out: `package main - -import /* why */ /* comment here? */ ( - "bytes" - "os" -) -`, - }, - { - name: "import into group with leading comment", - pkg: "strings", - in: `package main - -import ( - // comment before bytes - "bytes" - "os" -) - -`, - out: `package main - -import ( - // comment before bytes - "bytes" - "os" - "strings" -) -`, - }, - { - name: "", - renamedPkg: "fmtpkg", - pkg: "fmt", - in: `package main - -import "os" - -`, - out: `package main - -import ( - fmtpkg "fmt" - "os" -) -`, - }, - { - name: "struct comment", - pkg: "time", - in: `package main - -// This is a comment before a struct. -type T struct { - t time.Time -} -`, - out: `package main - -import "time" - -// This is a comment before a struct. -type T struct { - t time.Time -} -`, - }, - { - name: "issue 8729 import C", - pkg: "time", - in: `package main - -import "C" - -// comment -type T time.Time -`, - out: `package main - -import "C" -import "time" - -// comment -type T time.Time -`, - }, - { - name: "issue 8729 empty import", - pkg: "time", - in: `package main - -import () - -// comment -type T time.Time -`, - out: `package main - -import "time" - -// comment -type T time.Time -`, - }, - { - name: "issue 8729 comment on package line", - pkg: "time", - in: `package main // comment - -type T time.Time -`, - out: `package main // comment - -import "time" - -type T time.Time -`, - }, - { - name: "issue 8729 comment after package", - pkg: "time", - in: `package main -// comment - -type T time.Time -`, - out: `package main - -import "time" - -// comment - -type T time.Time -`, - }, - { - name: "issue 8729 comment before and on package line", - pkg: "time", - in: `// comment before -package main // comment on - -type T time.Time -`, - out: `// comment before -package main // comment on - -import "time" - -type T time.Time -`, - }, - - // Issue 9961: Match prefixes using path segments rather than bytes - { - name: "issue 9961", - pkg: "regexp", - in: `package main - -import ( - "flag" - "testing" - - "rsc.io/p" -) -`, - out: `package main - -import ( - "flag" - "regexp" - "testing" - - "rsc.io/p" -) -`, - }, - // Issue 10337: Preserve comment position - { - name: "issue 10337", - pkg: "fmt", - in: `package main - -import ( - "bytes" // a - "log" // c -) -`, - out: `package main - -import ( - "bytes" // a - "fmt" - "log" // c -) -`, - }, - { - name: "issue 10337 new import at the start", - pkg: "bytes", - in: `package main - -import ( - "fmt" // b - "log" // c -) -`, - out: `package main - -import ( - "bytes" - "fmt" // b - "log" // c -) -`, - }, - { - name: "issue 10337 new import at the end", - pkg: "log", - in: `package main - -import ( - "bytes" // a - "fmt" // b -) -`, - out: `package main - -import ( - "bytes" // a - "fmt" // b - "log" -) -`, - }, - // Issue 14075: Merge import declarations - { - name: "issue 14075", - pkg: "bufio", - in: `package main - -import "bytes" -import "fmt" -`, - out: `package main - -import ( - "bufio" - "bytes" - "fmt" -) -`, - }, - { - name: "issue 14075 update position", - pkg: "bufio", - in: `package main - -import "bytes" -import ( - "fmt" -) -`, - out: `package main - -import ( - "bufio" - "bytes" - "fmt" -) -`, - }, - { - name: `issue 14075 ignore import "C"`, - pkg: "bufio", - in: `package main - -// Comment -import "C" - -import "bytes" -import "fmt" -`, - out: `package main - -// Comment -import "C" - -import ( - "bufio" - "bytes" - "fmt" -) -`, - }, - { - name: `issue 14075 ignore adjacent import "C"`, - pkg: "bufio", - in: `package main - -// Comment -import "C" -import "fmt" -`, - out: `package main - -// Comment -import "C" -import ( - "bufio" - "fmt" -) -`, - }, - { - name: `issue 14075 ignore adjacent import "C" (without factored import)`, - pkg: "bufio", - in: `package main - -// Comment -import "C" -import "fmt" -`, - out: `package main - -// Comment -import "C" -import ( - "bufio" - "fmt" -) -`, - }, - { - name: `issue 14075 ignore single import "C"`, - pkg: "bufio", - in: `package main - -// Comment -import "C" -`, - out: `package main - -// Comment -import "C" -import "bufio" -`, - }, - { - name: `issue 17212 several single-import lines with shared prefix ending in a slash`, - pkg: "net/http", - in: `package main - -import "bufio" -import "net/url" -`, - out: `package main - -import ( - "bufio" - "net/http" - "net/url" -) -`, - }, - { - name: `issue 17212 block imports lines with shared prefix ending in a slash`, - pkg: "net/http", - in: `package main - -import ( - "bufio" - "net/url" -) -`, - out: `package main - -import ( - "bufio" - "net/http" - "net/url" -) -`, - }, - { - name: `issue 17213 many single-import lines`, - pkg: "fmt", - in: `package main - -import "bufio" -import "bytes" -import "errors" -`, - out: `package main - -import ( - "bufio" - "bytes" - "errors" - "fmt" -) -`, - }, -} - -func TestAddImport(t *testing.T) { - for _, test := range addTests { - file := parse(t, test.name, test.in) - var before bytes.Buffer - ast.Fprint(&before, fset, file, nil) - AddNamedImport(fset, file, test.renamedPkg, test.pkg) - if got := print(t, test.name, file); got != test.out { - if test.broken { - t.Logf("%s is known broken:\ngot: %s\nwant: %s", test.name, got, test.out) - } else { - t.Errorf("%s:\ngot: %s\nwant: %s", test.name, got, test.out) - } - var after bytes.Buffer - ast.Fprint(&after, fset, file, nil) - - t.Logf("AST before:\n%s\nAST after:\n%s\n", before.String(), after.String()) - } - } -} - -func TestDoubleAddImport(t *testing.T) { - file := parse(t, "doubleimport", "package main\n") - AddImport(fset, file, "os") - AddImport(fset, file, "bytes") - want := `package main - -import ( - "bytes" - "os" -) -` - if got := print(t, "doubleimport", file); got != want { - t.Errorf("got: %s\nwant: %s", got, want) - } -} - -func TestDoubleAddNamedImport(t *testing.T) { - file := parse(t, "doublenamedimport", "package main\n") - AddNamedImport(fset, file, "o", "os") - AddNamedImport(fset, file, "i", "io") - want := `package main - -import ( - i "io" - o "os" -) -` - if got := print(t, "doublenamedimport", file); got != want { - t.Errorf("got: %s\nwant: %s", got, want) - } -} - -// Part of issue 8729. -func TestDoubleAddImportWithDeclComment(t *testing.T) { - file := parse(t, "doubleimport", `package main - -import ( -) - -// comment -type I int -`) - // The AddImport order here matters. - AddImport(fset, file, "golang.org/x/tools/go/ast/astutil") - AddImport(fset, file, "os") - want := `package main - -import ( - "golang.org/x/tools/go/ast/astutil" - "os" -) - -// comment -type I int -` - if got := print(t, "doubleimport_with_decl_comment", file); got != want { - t.Errorf("got: %s\nwant: %s", got, want) - } -} - -var deleteTests = []test{ - { - name: "import.4", - pkg: "os", - in: `package main - -import ( - "os" -) -`, - out: `package main -`, - }, - { - name: "import.5", - pkg: "os", - in: `package main - -// Comment -import "C" -import "os" -`, - out: `package main - -// Comment -import "C" -`, - }, - { - name: "import.6", - pkg: "os", - in: `package main - -// Comment -import "C" - -import ( - "io" - "os" - "utf8" -) -`, - out: `package main - -// Comment -import "C" - -import ( - "io" - "utf8" -) -`, - }, - { - name: "import.7", - pkg: "io", - in: `package main - -import ( - "io" // a - "os" // b - "utf8" // c -) -`, - out: `package main - -import ( - // a - "os" // b - "utf8" // c -) -`, - }, - { - name: "import.8", - pkg: "os", - in: `package main - -import ( - "io" // a - "os" // b - "utf8" // c -) -`, - out: `package main - -import ( - "io" // a - // b - "utf8" // c -) -`, - }, - { - name: "import.9", - pkg: "utf8", - in: `package main - -import ( - "io" // a - "os" // b - "utf8" // c -) -`, - out: `package main - -import ( - "io" // a - "os" // b - // c -) -`, - }, - { - name: "import.10", - pkg: "io", - in: `package main - -import ( - "io" - "os" - "utf8" -) -`, - out: `package main - -import ( - "os" - "utf8" -) -`, - }, - { - name: "import.11", - pkg: "os", - in: `package main - -import ( - "io" - "os" - "utf8" -) -`, - out: `package main - -import ( - "io" - "utf8" -) -`, - }, - { - name: "import.12", - pkg: "utf8", - in: `package main - -import ( - "io" - "os" - "utf8" -) -`, - out: `package main - -import ( - "io" - "os" -) -`, - }, - { - name: "handle.raw.quote.imports", - pkg: "os", - in: "package main\n\nimport `os`", - out: `package main -`, - }, - { - name: "import.13", - pkg: "io", - in: `package main - -import ( - "fmt" - - "io" - "os" - "utf8" - - "go/format" -) -`, - out: `package main - -import ( - "fmt" - - "os" - "utf8" - - "go/format" -) -`, - }, - { - name: "import.14", - pkg: "io", - in: `package main - -import ( - "fmt" // a - - "io" // b - "os" // c - "utf8" // d - - "go/format" // e -) -`, - out: `package main - -import ( - "fmt" // a - - // b - "os" // c - "utf8" // d - - "go/format" // e -) -`, - }, - { - name: "import.15", - pkg: "double", - in: `package main - -import ( - "double" - "double" -) -`, - out: `package main -`, - }, - { - name: "import.16", - pkg: "bubble", - in: `package main - -import ( - "toil" - "bubble" - "bubble" - "trouble" -) -`, - out: `package main - -import ( - "toil" - "trouble" -) -`, - }, - { - name: "import.17", - pkg: "quad", - in: `package main - -import ( - "quad" - "quad" -) - -import ( - "quad" - "quad" -) -`, - out: `package main -`, - }, - { - name: "import.18", - renamedPkg: "x", - pkg: "fmt", - in: `package main - -import ( - "fmt" - x "fmt" -) -`, - out: `package main - -import ( - "fmt" -) -`, - }, - { - name: "import.18", - renamedPkg: "x", - pkg: "fmt", - in: `package main - -import x "fmt" -import y "fmt" -`, - out: `package main - -import y "fmt" -`, - }, - // Issue #15432, #18051 - { - name: "import.19", - pkg: "fmt", - in: `package main - -import ( - "fmt" - - // Some comment. - "io" -)`, - out: `package main - -import ( - // Some comment. - "io" -) -`, - }, - { - name: "import.20", - pkg: "fmt", - in: `package main - -import ( - "fmt" - - // Some - // comment. - "io" -)`, - out: `package main - -import ( - // Some - // comment. - "io" -) -`, - }, - { - name: "import.21", - pkg: "fmt", - in: `package main - -import ( - "fmt" - - /* - Some - comment. - */ - "io" -)`, - out: `package main - -import ( - /* - Some - comment. - */ - "io" -) -`, - }, - { - name: "import.22", - pkg: "fmt", - in: `package main - -import ( - /* Some */ - // comment. - "io" - "fmt" -)`, - out: `package main - -import ( - /* Some */ - // comment. - "io" -) -`, - }, - { - name: "import.23", - pkg: "fmt", - in: `package main - -import ( - // comment 1 - "fmt" - // comment 2 - "io" -)`, - out: `package main - -import ( - // comment 2 - "io" -) -`, - }, - { - name: "import.24", - pkg: "fmt", - in: `package main - -import ( - "fmt" // comment 1 - "io" // comment 2 -)`, - out: `package main - -import ( - "io" // comment 2 -) -`, - }, - { - name: "import.25", - pkg: "fmt", - in: `package main - -import ( - "fmt" - /* comment */ "io" -)`, - out: `package main - -import ( - /* comment */ "io" -) -`, - }, - { - name: "import.26", - pkg: "fmt", - in: `package main - -import ( - "fmt" - "io" /* comment */ -)`, - out: `package main - -import ( - "io" /* comment */ -) -`, - }, - { - name: "import.27", - pkg: "fmt", - in: `package main - -import ( - "fmt" /* comment */ - "io" -)`, - out: `package main - -import ( - "io" -) -`, - }, - { - name: "import.28", - pkg: "fmt", - in: `package main - -import ( - /* comment */ "fmt" - "io" -)`, - out: `package main - -import ( - "io" -) -`, - }, - { - name: "import.29", - pkg: "fmt", - in: `package main - -// comment 1 -import ( - "fmt" - "io" // comment 2 -)`, - out: `package main - -// comment 1 -import ( - "io" // comment 2 -) -`, - }, - { - name: "import.30", - pkg: "fmt", - in: `package main - -// comment 1 -import ( - "fmt" // comment 2 - "io" -)`, - out: `package main - -// comment 1 -import ( - "io" -) -`, - }, - { - name: "import.31", - pkg: "fmt", - in: `package main - -// comment 1 -import ( - "fmt" - /* comment 2 */ "io" -)`, - out: `package main - -// comment 1 -import ( - /* comment 2 */ "io" -) -`, - }, - { - name: "import.32", - pkg: "fmt", - renamedPkg: "f", - in: `package main - -// comment 1 -import ( - f "fmt" - /* comment 2 */ i "io" -)`, - out: `package main - -// comment 1 -import ( - /* comment 2 */ i "io" -) -`, - }, - { - name: "import.33", - pkg: "fmt", - renamedPkg: "f", - in: `package main - -// comment 1 -import ( - /* comment 2 */ f "fmt" - i "io" -)`, - out: `package main - -// comment 1 -import ( - i "io" -) -`, - }, - { - name: "import.34", - pkg: "fmt", - renamedPkg: "f", - in: `package main - -// comment 1 -import ( - f "fmt" /* comment 2 */ - i "io" -)`, - out: `package main - -// comment 1 -import ( - i "io" -) -`, - }, - { - name: "import.35", - pkg: "fmt", - in: `package main - -// comment 1 -import ( - "fmt" - // comment 2 - "io" -)`, - out: `package main - -// comment 1 -import ( - // comment 2 - "io" -) -`, - }, - { - name: "import.36", - pkg: "fmt", - in: `package main - -/* comment 1 */ -import ( - "fmt" - /* comment 2 */ - "io" -)`, - out: `package main - -/* comment 1 */ -import ( - /* comment 2 */ - "io" -) -`, - }, - - // Issue 20229: MergeLine panic on weird input - { - name: "import.37", - pkg: "io", - in: `package main -import("_" -"io")`, - out: `package main - -import ( - "_" -) -`, - }, -} - -func TestDeleteImport(t *testing.T) { - for _, test := range deleteTests { - file := parse(t, test.name, test.in) - DeleteNamedImport(fset, file, test.renamedPkg, test.pkg) - if got := print(t, test.name, file); got != test.out { - t.Errorf("%s:\ngot: %s\nwant: %s", test.name, got, test.out) - } - } -} - -type rewriteTest struct { - name string - srcPkg string - dstPkg string - in string - out string -} - -var rewriteTests = []rewriteTest{ - { - name: "import.13", - srcPkg: "utf8", - dstPkg: "encoding/utf8", - in: `package main - -import ( - "io" - "os" - "utf8" // thanks ken -) -`, - out: `package main - -import ( - "encoding/utf8" // thanks ken - "io" - "os" -) -`, - }, - { - name: "import.14", - srcPkg: "asn1", - dstPkg: "encoding/asn1", - in: `package main - -import ( - "asn1" - "crypto" - "crypto/rsa" - _ "crypto/sha1" - "crypto/x509" - "crypto/x509/pkix" - "time" -) - -var x = 1 -`, - out: `package main - -import ( - "crypto" - "crypto/rsa" - _ "crypto/sha1" - "crypto/x509" - "crypto/x509/pkix" - "encoding/asn1" - "time" -) - -var x = 1 -`, - }, - { - name: "import.15", - srcPkg: "url", - dstPkg: "net/url", - in: `package main - -import ( - "bufio" - "net" - "path" - "url" -) - -var x = 1 // comment on x, not on url -`, - out: `package main - -import ( - "bufio" - "net" - "net/url" - "path" -) - -var x = 1 // comment on x, not on url -`, - }, - { - name: "import.16", - srcPkg: "http", - dstPkg: "net/http", - in: `package main - -import ( - "flag" - "http" - "log" - "text/template" -) - -var addr = flag.String("addr", ":1718", "http service address") // Q=17, R=18 -`, - out: `package main - -import ( - "flag" - "log" - "net/http" - "text/template" -) - -var addr = flag.String("addr", ":1718", "http service address") // Q=17, R=18 -`, - }, -} - -func TestRewriteImport(t *testing.T) { - for _, test := range rewriteTests { - file := parse(t, test.name, test.in) - RewriteImport(fset, file, test.srcPkg, test.dstPkg) - if got := print(t, test.name, file); got != test.out { - t.Errorf("%s:\ngot: %s\nwant: %s", test.name, got, test.out) - } - } -} - -var importsTests = []struct { - name string - in string - want [][]string -}{ - { - name: "no packages", - in: `package foo -`, - want: nil, - }, - { - name: "one group", - in: `package foo - -import ( - "fmt" - "testing" -) -`, - want: [][]string{{"fmt", "testing"}}, - }, - { - name: "four groups", - in: `package foo - -import "C" -import ( - "fmt" - "testing" - - "appengine" - - "myproject/mylib1" - "myproject/mylib2" -) -`, - want: [][]string{ - {"C"}, - {"fmt", "testing"}, - {"appengine"}, - {"myproject/mylib1", "myproject/mylib2"}, - }, - }, - { - name: "multiple factored groups", - in: `package foo - -import ( - "fmt" - "testing" - - "appengine" -) -import ( - "reflect" - - "bytes" -) -`, - want: [][]string{ - {"fmt", "testing"}, - {"appengine"}, - {"reflect"}, - {"bytes"}, - }, - }, -} - -func unquote(s string) string { - res, err := strconv.Unquote(s) - if err != nil { - return "could_not_unquote" - } - return res -} - -func TestImports(t *testing.T) { - fset := token.NewFileSet() - for _, test := range importsTests { - f, err := parser.ParseFile(fset, "test.go", test.in, 0) - if err != nil { - t.Errorf("%s: %v", test.name, err) - continue - } - var got [][]string - for _, group := range Imports(fset, f) { - var b []string - for _, spec := range group { - b = append(b, unquote(spec.Path.Value)) - } - got = append(got, b) - } - if !reflect.DeepEqual(got, test.want) { - t.Errorf("Imports(%s)=%v, want %v", test.name, got, test.want) - } - } -} - -var usesImportTests = []struct { - name string - path string - in string - want bool -}{ - { - name: "no packages", - path: "io", - in: `package foo -`, - want: false, - }, - { - name: "import.1", - path: "io", - in: `package foo - -import "io" - -var _ io.Writer -`, - want: true, - }, - { - name: "import.2", - path: "io", - in: `package foo - -import "io" -`, - want: false, - }, - { - name: "import.3", - path: "io", - in: `package foo - -import "io" - -var io = 42 -`, - want: false, - }, - { - name: "import.4", - path: "io", - in: `package foo - -import i "io" - -var _ i.Writer -`, - want: true, - }, - { - name: "import.5", - path: "io", - in: `package foo - -import i "io" -`, - want: false, - }, - { - name: "import.6", - path: "io", - in: `package foo - -import i "io" - -var i = 42 -var io = 42 -`, - want: false, - }, - { - name: "import.7", - path: "encoding/json", - in: `package foo - -import "encoding/json" - -var _ json.Encoder -`, - want: true, - }, - { - name: "import.8", - path: "encoding/json", - in: `package foo - -import "encoding/json" -`, - want: false, - }, - { - name: "import.9", - path: "encoding/json", - in: `package foo - -import "encoding/json" - -var json = 42 -`, - want: false, - }, - { - name: "import.10", - path: "encoding/json", - in: `package foo - -import j "encoding/json" - -var _ j.Encoder -`, - want: true, - }, - { - name: "import.11", - path: "encoding/json", - in: `package foo - -import j "encoding/json" -`, - want: false, - }, - { - name: "import.12", - path: "encoding/json", - in: `package foo - -import j "encoding/json" - -var j = 42 -var json = 42 -`, - want: false, - }, - { - name: "import.13", - path: "io", - in: `package foo - -import _ "io" -`, - want: true, - }, - { - name: "import.14", - path: "io", - in: `package foo - -import . "io" -`, - want: true, - }, -} - -func TestUsesImport(t *testing.T) { - fset := token.NewFileSet() - for _, test := range usesImportTests { - f, err := parser.ParseFile(fset, "test.go", test.in, 0) - if err != nil { - t.Errorf("%s: %v", test.name, err) - continue - } - got := UsesImport(f, test.path) - if got != test.want { - t.Errorf("UsesImport(%s)=%v, want %v", test.name, got, test.want) - } - } -} diff --git a/vendor/golang.org/x/tools/go/ast/astutil/rewrite_test.go b/vendor/golang.org/x/tools/go/ast/astutil/rewrite_test.go deleted file mode 100644 index 1c86970f..00000000 --- a/vendor/golang.org/x/tools/go/ast/astutil/rewrite_test.go +++ /dev/null @@ -1,248 +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 astutil_test - -import ( - "bytes" - "go/ast" - "go/format" - "go/parser" - "go/token" - "testing" - - "golang.org/x/tools/go/ast/astutil" -) - -var rewriteTests = [...]struct { - name string - orig, want string - pre, post astutil.ApplyFunc -}{ - {name: "nop", orig: "package p\n", want: "package p\n"}, - - {name: "replace", - orig: `package p - -var x int -`, - want: `package p - -var t T -`, - post: func(c *astutil.Cursor) bool { - if _, ok := c.Node().(*ast.ValueSpec); ok { - c.Replace(valspec("t", "T")) - return false - } - return true - }, - }, - - {name: "set doc strings", - orig: `package p - -const z = 0 - -type T struct{} - -var x int -`, - want: `package p -// a foo is a foo -const z = 0 -// a foo is a foo -type T struct{} -// a foo is a foo -var x int -`, - post: func(c *astutil.Cursor) bool { - if _, ok := c.Parent().(*ast.GenDecl); ok && c.Name() == "Doc" && c.Node() == nil { - c.Replace(&ast.CommentGroup{List: []*ast.Comment{{Text: "// a foo is a foo"}}}) - } - return true - }, - }, - - {name: "insert names", - orig: `package p - -const a = 1 -`, - want: `package p - -const a, b, c = 1, 2, 3 -`, - pre: func(c *astutil.Cursor) bool { - if _, ok := c.Parent().(*ast.ValueSpec); ok { - switch c.Name() { - case "Names": - c.InsertAfter(ast.NewIdent("c")) - c.InsertAfter(ast.NewIdent("b")) - case "Values": - c.InsertAfter(&ast.BasicLit{Kind: token.INT, Value: "3"}) - c.InsertAfter(&ast.BasicLit{Kind: token.INT, Value: "2"}) - } - } - return true - }, - }, - - {name: "insert", - orig: `package p - -var ( - x int - y int -) -`, - want: `package p - -var before1 int -var before2 int - -var ( - x int - y int -) -var after2 int -var after1 int -`, - pre: func(c *astutil.Cursor) bool { - if _, ok := c.Node().(*ast.GenDecl); ok { - c.InsertBefore(vardecl("before1", "int")) - c.InsertAfter(vardecl("after1", "int")) - c.InsertAfter(vardecl("after2", "int")) - c.InsertBefore(vardecl("before2", "int")) - } - return true - }, - }, - - {name: "delete", - orig: `package p - -var x int -var y int -var z int -`, - want: `package p - -var y int -var z int -`, - pre: func(c *astutil.Cursor) bool { - n := c.Node() - if d, ok := n.(*ast.GenDecl); ok && d.Specs[0].(*ast.ValueSpec).Names[0].Name == "x" { - c.Delete() - } - return true - }, - }, - - {name: "insertafter-delete", - orig: `package p - -var x int -var y int -var z int -`, - want: `package p - -var x1 int - -var y int -var z int -`, - pre: func(c *astutil.Cursor) bool { - n := c.Node() - if d, ok := n.(*ast.GenDecl); ok && d.Specs[0].(*ast.ValueSpec).Names[0].Name == "x" { - c.InsertAfter(vardecl("x1", "int")) - c.Delete() - } - return true - }, - }, - - {name: "delete-insertafter", - orig: `package p - -var x int -var y int -var z int -`, - want: `package p - -var y int -var x1 int -var z int -`, - pre: func(c *astutil.Cursor) bool { - n := c.Node() - if d, ok := n.(*ast.GenDecl); ok && d.Specs[0].(*ast.ValueSpec).Names[0].Name == "x" { - c.Delete() - // The cursor is now effectively atop the 'var y int' node. - c.InsertAfter(vardecl("x1", "int")) - } - return true - }, - }, -} - -func valspec(name, typ string) *ast.ValueSpec { - return &ast.ValueSpec{Names: []*ast.Ident{ast.NewIdent(name)}, - Type: ast.NewIdent(typ), - } -} - -func vardecl(name, typ string) *ast.GenDecl { - return &ast.GenDecl{ - Tok: token.VAR, - Specs: []ast.Spec{valspec(name, typ)}, - } -} - -func TestRewrite(t *testing.T) { - t.Run("*", func(t *testing.T) { - for _, test := range rewriteTests { - test := test - t.Run(test.name, func(t *testing.T) { - t.Parallel() - fset := token.NewFileSet() - f, err := parser.ParseFile(fset, test.name, test.orig, parser.ParseComments) - if err != nil { - t.Fatal(err) - } - n := astutil.Apply(f, test.pre, test.post) - var buf bytes.Buffer - if err := format.Node(&buf, fset, n); err != nil { - t.Fatal(err) - } - got := buf.String() - if got != test.want { - t.Errorf("got:\n\n%s\nwant:\n\n%s\n", got, test.want) - } - }) - } - }) -} - -var sink ast.Node - -func BenchmarkRewrite(b *testing.B) { - for _, test := range rewriteTests { - b.Run(test.name, func(b *testing.B) { - for i := 0; i < b.N; i++ { - b.StopTimer() - fset := token.NewFileSet() - f, err := parser.ParseFile(fset, test.name, test.orig, parser.ParseComments) - if err != nil { - b.Fatal(err) - } - b.StartTimer() - sink = astutil.Apply(f, test.pre, test.post) - } - }) - } -} diff --git a/vendor/golang.org/x/tools/imports/fix_test.go b/vendor/golang.org/x/tools/imports/fix_test.go deleted file mode 100644 index 0d413e43..00000000 --- a/vendor/golang.org/x/tools/imports/fix_test.go +++ /dev/null @@ -1,2367 +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 imports - -import ( - "bytes" - "context" - "flag" - "go/build" - "io/ioutil" - "os" - "path/filepath" - "runtime" - "strings" - "sync" - "testing" -) - -var only = flag.String("only", "", "If non-empty, the fix test to run") - -var tests = []struct { - name string - formatOnly bool - in, out string -}{ - // Adding an import to an existing parenthesized import - { - name: "factored_imports_add", - in: `package foo -import ( - "fmt" -) -func bar() { -var b bytes.Buffer -fmt.Println(b.String()) -} -`, - out: `package foo - -import ( - "bytes" - "fmt" -) - -func bar() { - var b bytes.Buffer - fmt.Println(b.String()) -} -`, - }, - - // Adding an import to an existing parenthesized import, - // verifying it goes into the first section. - { - name: "factored_imports_add_first_sec", - in: `package foo -import ( - "fmt" - - "appengine" -) -func bar() { -var b bytes.Buffer -_ = appengine.IsDevServer -fmt.Println(b.String()) -} -`, - out: `package foo - -import ( - "bytes" - "fmt" - - "appengine" -) - -func bar() { - var b bytes.Buffer - _ = appengine.IsDevServer - fmt.Println(b.String()) -} -`, - }, - - // Adding an import to an existing parenthesized import, - // verifying it goes into the first section. (test 2) - { - name: "factored_imports_add_first_sec_2", - in: `package foo -import ( - "fmt" - - "appengine" -) -func bar() { -_ = math.NaN -_ = fmt.Sprintf -_ = appengine.IsDevServer -} -`, - out: `package foo - -import ( - "fmt" - "math" - - "appengine" -) - -func bar() { - _ = math.NaN - _ = fmt.Sprintf - _ = appengine.IsDevServer -} -`, - }, - - // Adding a new import line, without parens - { - name: "add_import_section", - in: `package foo -func bar() { -var b bytes.Buffer -} -`, - out: `package foo - -import "bytes" - -func bar() { - var b bytes.Buffer -} -`, - }, - - // Adding two new imports, which should make a parenthesized import decl. - { - name: "add_import_paren_section", - in: `package foo -func bar() { -_, _ := bytes.Buffer, zip.NewReader -} -`, - out: `package foo - -import ( - "archive/zip" - "bytes" -) - -func bar() { - _, _ := bytes.Buffer, zip.NewReader -} -`, - }, - - // Make sure we don't add things twice - { - name: "no_double_add", - in: `package foo -func bar() { -_, _ := bytes.Buffer, bytes.NewReader -} -`, - out: `package foo - -import "bytes" - -func bar() { - _, _ := bytes.Buffer, bytes.NewReader -} -`, - }, - - // Remove unused imports, 1 of a factored block - { - name: "remove_unused_1_of_2", - in: `package foo -import ( -"bytes" -"fmt" -) - -func bar() { -_, _ := bytes.Buffer, bytes.NewReader -} -`, - out: `package foo - -import ( - "bytes" -) - -func bar() { - _, _ := bytes.Buffer, bytes.NewReader -} -`, - }, - - // Remove unused imports, 2 of 2 - { - name: "remove_unused_2_of_2", - in: `package foo -import ( -"bytes" -"fmt" -) - -func bar() { -} -`, - out: `package foo - -func bar() { -} -`, - }, - - // Remove unused imports, 1 of 1 - { - name: "remove_unused_1_of_1", - in: `package foo - -import "fmt" - -func bar() { -} -`, - out: `package foo - -func bar() { -} -`, - }, - - // Don't remove empty imports. - { - name: "dont_remove_empty_imports", - in: `package foo -import ( -_ "image/png" -_ "image/jpeg" -) -`, - out: `package foo - -import ( - _ "image/jpeg" - _ "image/png" -) -`, - }, - - // Don't remove dot imports. - { - name: "dont_remove_dot_imports", - in: `package foo -import ( -. "foo" -. "bar" -) -`, - out: `package foo - -import ( - . "bar" - . "foo" -) -`, - }, - - // Skip refs the parser can resolve. - { - name: "skip_resolved_refs", - in: `package foo - -func f() { - type t struct{ Println func(string) } - fmt := t{Println: func(string) {}} - fmt.Println("foo") -} -`, - out: `package foo - -func f() { - type t struct{ Println func(string) } - fmt := t{Println: func(string) {}} - fmt.Println("foo") -} -`, - }, - - // Do not add a package we already have a resolution for. - { - name: "skip_template", - in: `package foo - -import "html/template" - -func f() { t = template.New("sometemplate") } -`, - out: `package foo - -import "html/template" - -func f() { t = template.New("sometemplate") } -`, - }, - - // Don't touch cgo - { - name: "cgo", - in: `package foo - -/* -#include -*/ -import "C" -`, - out: `package foo - -/* -#include -*/ -import "C" -`, - }, - - // Put some things in their own section - { - name: "make_sections", - in: `package foo - -import ( -"os" -) - -func foo () { -_, _ = os.Args, fmt.Println -_, _ = appengine.FooSomething, user.Current -} -`, - out: `package foo - -import ( - "fmt" - "os" - - "appengine" - "appengine/user" -) - -func foo() { - _, _ = os.Args, fmt.Println - _, _ = appengine.FooSomething, user.Current -} -`, - }, - - // Delete existing empty import block - { - name: "delete_empty_import_block", - in: `package foo - -import () -`, - out: `package foo -`, - }, - - // Use existing empty import block - { - name: "use_empty_import_block", - in: `package foo - -import () - -func f() { - _ = fmt.Println -} -`, - out: `package foo - -import "fmt" - -func f() { - _ = fmt.Println -} -`, - }, - - // Blank line before adding new section. - { - name: "blank_line_before_new_group", - in: `package foo - -import ( - "fmt" - "net" -) - -func f() { - _ = net.Dial - _ = fmt.Printf - _ = snappy.Foo -} -`, - out: `package foo - -import ( - "fmt" - "net" - - "code.google.com/p/snappy-go/snappy" -) - -func f() { - _ = net.Dial - _ = fmt.Printf - _ = snappy.Foo -} -`, - }, - - // Blank line between standard library and third-party stuff. - { - name: "blank_line_separating_std_and_third_party", - in: `package foo - -import ( - "code.google.com/p/snappy-go/snappy" - "fmt" - "net" -) - -func f() { - _ = net.Dial - _ = fmt.Printf - _ = snappy.Foo -} -`, - out: `package foo - -import ( - "fmt" - "net" - - "code.google.com/p/snappy-go/snappy" -) - -func f() { - _ = net.Dial - _ = fmt.Printf - _ = snappy.Foo -} -`, - }, - - // golang.org/issue/6884 - { - name: "issue 6884", - in: `package main - -// A comment -func main() { - fmt.Println("Hello, world") -} -`, - out: `package main - -import "fmt" - -// A comment -func main() { - fmt.Println("Hello, world") -} -`, - }, - - // golang.org/issue/7132 - { - name: "issue 7132", - in: `package main - -import ( -"fmt" - -"gu" -"github.com/foo/bar" -) - -var ( -a = bar.a -b = gu.a -c = fmt.Printf -) -`, - out: `package main - -import ( - "fmt" - - "gu" - - "github.com/foo/bar" -) - -var ( - a = bar.a - b = gu.a - c = fmt.Printf -) -`, - }, - - { - name: "renamed package", - in: `package main - -var _ = str.HasPrefix -`, - out: `package main - -import str "strings" - -var _ = str.HasPrefix -`, - }, - - { - name: "fragment with main", - in: `func main(){fmt.Println("Hello, world")}`, - out: `package main - -import "fmt" - -func main() { fmt.Println("Hello, world") } -`, - }, - - { - name: "fragment without main", - in: `func notmain(){fmt.Println("Hello, world")}`, - out: `import "fmt" - -func notmain() { fmt.Println("Hello, world") }`, - }, - - // Remove first import within in a 2nd/3rd/4th/etc. section. - // golang.org/issue/7679 - { - name: "issue 7679", - in: `package main - -import ( - "fmt" - - "github.com/foo/bar" - "github.com/foo/qux" -) - -func main() { - var _ = fmt.Println - //var _ = bar.A - var _ = qux.B -} -`, - out: `package main - -import ( - "fmt" - - "github.com/foo/qux" -) - -func main() { - var _ = fmt.Println - //var _ = bar.A - var _ = qux.B -} -`, - }, - - // Blank line can be added before all types of import declarations. - // golang.org/issue/7866 - { - name: "issue 7866", - in: `package main - -import ( - "fmt" - renamed_bar "github.com/foo/bar" - - . "github.com/foo/baz" - "io" - - _ "github.com/foo/qux" - "strings" -) - -func main() { - _, _, _, _, _ = fmt.Errorf, io.Copy, strings.Contains, renamed_bar.A, B -} -`, - out: `package main - -import ( - "fmt" - - renamed_bar "github.com/foo/bar" - - "io" - - . "github.com/foo/baz" - - "strings" - - _ "github.com/foo/qux" -) - -func main() { - _, _, _, _, _ = fmt.Errorf, io.Copy, strings.Contains, renamed_bar.A, B -} -`, - }, - - // Non-idempotent comment formatting - // golang.org/issue/8035 - { - name: "issue 8035", - in: `package main - -import ( - "fmt" // A - "go/ast" // B - _ "launchpad.net/gocheck" // C -) - -func main() { _, _ = fmt.Print, ast.Walk } -`, - out: `package main - -import ( - "fmt" // A - "go/ast" // B - - _ "launchpad.net/gocheck" // C -) - -func main() { _, _ = fmt.Print, ast.Walk } -`, - }, - - // Failure to delete all duplicate imports - // golang.org/issue/8459 - { - name: "issue 8459", - in: `package main - -import ( - "fmt" - "log" - "log" - "math" -) - -func main() { fmt.Println("pi:", math.Pi) } -`, - out: `package main - -import ( - "fmt" - "math" -) - -func main() { fmt.Println("pi:", math.Pi) } -`, - }, - - // Too aggressive prefix matching - // golang.org/issue/9961 - { - name: "issue 9961", - in: `package p - -import ( - "zip" - - "rsc.io/p" -) - -var ( - _ = fmt.Print - _ = zip.Store - _ p.P - _ = regexp.Compile -) -`, - out: `package p - -import ( - "fmt" - "regexp" - "zip" - - "rsc.io/p" -) - -var ( - _ = fmt.Print - _ = zip.Store - _ p.P - _ = regexp.Compile -) -`, - }, - - // Unused named import is mistaken for unnamed import - // golang.org/issue/8149 - { - name: "issue 8149", - in: `package main - -import foo "fmt" - -func main() { fmt.Println() } -`, - out: `package main - -import "fmt" - -func main() { fmt.Println() } -`, - }, - - // Unused named import is mistaken for unnamed import - // golang.org/issue/8149 - { - name: "issue 8149", - in: `package main - -import ( - "fmt" - x "fmt" -) - -func main() { fmt.Println() } -`, - out: `package main - -import ( - "fmt" -) - -func main() { fmt.Println() } -`, - }, - - // FormatOnly - { - name: "format only", - formatOnly: true, - in: `package main - -import ( -"fmt" -"golang.org/x/foo" -) - -func main() {} -`, - out: `package main - -import ( - "fmt" - - "golang.org/x/foo" -) - -func main() {} -`, - }, - - { - name: "do not make grouped imports non-grouped", - in: `package p - -import ( - "bytes" - "fmt" -) - -var _ = fmt.Sprintf -`, - out: `package p - -import ( - "fmt" -) - -var _ = fmt.Sprintf -`, - }, - - { - name: "issue #19190 1", - in: `package main - -import ( - "time" -) - -func main() { - _ = snappy.Encode - _ = p.P - _ = time.Parse -} -`, - out: `package main - -import ( - "time" - - "code.google.com/p/snappy-go/snappy" - "rsc.io/p" -) - -func main() { - _ = snappy.Encode - _ = p.P - _ = time.Parse -} -`, - }, - - { - name: "issue #19190 2", - in: `package main - -import ( - "time" - - "code.google.com/p/snappy-go/snappy" -) - -func main() { - _ = snappy.Encode - _ = p.P - _ = time.Parse -} -`, - out: `package main - -import ( - "time" - - "code.google.com/p/snappy-go/snappy" - "rsc.io/p" -) - -func main() { - _ = snappy.Encode - _ = p.P - _ = time.Parse -} -`, - }, - - { - name: "issue #12097", - in: `// a -// b -// c - -func main() { - _ = fmt.Println -}`, - out: `package main - -import "fmt" - -// a -// b -// c - -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 -`, - }, -} - -func TestFixImports(t *testing.T) { - simplePkgs := map[string]string{ - "appengine": "appengine", - "bytes": "bytes", - "fmt": "fmt", - "math": "math", - "os": "os", - "p": "rsc.io/p", - "regexp": "regexp", - "snappy": "code.google.com/p/snappy-go/snappy", - "str": "strings", - "user": "appengine/user", - "zip": "archive/zip", - } - old := findImport - defer func() { - findImport = old - }() - findImport = func(_ context.Context, pkgName string, symbols map[string]bool, filename string) (string, bool, error) { - return simplePkgs[pkgName], pkgName == "str", nil - } - - options := &Options{ - TabWidth: 8, - TabIndent: true, - Comments: true, - Fragment: true, - } - - for _, tt := range tests { - options.FormatOnly = tt.formatOnly - if *only != "" && tt.name != *only { - continue - } - buf, err := Process(tt.name+".go", []byte(tt.in), 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) - } - } -} - -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) { - switch runtime.GOOS { - case "windows", "plan9": - t.Skipf("skipping test on %q as there are no symlinks", runtime.GOOS) - } - - newGoPath, err := ioutil.TempDir("", "symlinktest") - if err != nil { - t.Fatal(err) - } - defer os.RemoveAll(newGoPath) - - // Create: - // $GOPATH/target/ - // $GOPATH/target/f.go // package mypkg\nvar Foo = 123\n - // $GOPATH/src/x/ - // $GOPATH/src/x/mypkg => $GOPATH/target // symlink - // $GOPATH/src/x/apkg => $GOPATH/src/x // symlink loop - // Test: - // $GOPATH/src/myotherpkg/toformat.go referencing mypkg.Foo - - targetPath := newGoPath + "/target" - if err := os.MkdirAll(targetPath, 0755); err != nil { - t.Fatal(err) - } - if err := ioutil.WriteFile(targetPath+"/f.go", []byte("package mypkg\nvar Foo = 123\n"), 0666); err != nil { - t.Fatal(err) - } - - symlinkPath := newGoPath + "/src/x/mypkg" - if err := os.MkdirAll(filepath.Dir(symlinkPath), 0755); err != nil { - t.Fatal(err) - } - if err := os.Symlink(targetPath, symlinkPath); err != nil { - t.Fatal(err) - } - - // Add a symlink loop. - if err := os.Symlink(newGoPath+"/src/x", newGoPath+"/src/x/apkg"); err != nil { - t.Fatal(err) - } - - withEmptyGoPath(func() { - build.Default.GOPATH = newGoPath - - input := `package p - -var ( - _ = fmt.Print - _ = mypkg.Foo -) -` - output := `package p - -import ( - "fmt" - "x/mypkg" -) - -var ( - _ = fmt.Print - _ = mypkg.Foo -) -` - buf, err := Process(newGoPath+"/src/myotherpkg/toformat.go", []byte(input), &Options{}) - if err != nil { - t.Fatal(err) - } - if got := string(buf); got != output { - t.Fatalf("results differ\nGOT:\n%s\nWANT:\n%s\n", got, output) - } - }) - - // Add a .goimportsignore and ensure it is respected. - if err := ioutil.WriteFile(newGoPath+"/src/.goimportsignore", []byte("x/mypkg\n"), 0666); err != nil { - t.Fatal(err) - } - - withEmptyGoPath(func() { - build.Default.GOPATH = newGoPath - - input := `package p - -var ( - _ = fmt.Print - _ = mypkg.Foo -) -` - output := `package p - -import "fmt" - -var ( - _ = fmt.Print - _ = mypkg.Foo -) -` - buf, err := Process(newGoPath+"/src/myotherpkg/toformat.go", []byte(input), &Options{}) - if err != nil { - t.Fatal(err) - } - if got := string(buf); got != output { - t.Fatalf("ignored results differ\nGOT:\n%s\nWANT:\n%s\n", got, output) - } - }) - -} - -// 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 -// that the package name is "mypkg". -func TestFixImportsVendorPackage(t *testing.T) { - // Skip this test on go versions with no vendor support. - if _, err := os.Stat(filepath.Join(runtime.GOROOT(), "src/vendor")); err != nil { - t.Skip(err) - } - testConfig{ - gopathFiles: map[string]string{ - "mypkg.com/outpkg/vendor/mypkg.com/mypkg.v1/f.go": "package mypkg\nvar Foo = 123\n", - }, - }.test(t, func(t *goimportTest) { - input := `package p - -import ( - "fmt" - - "mypkg.com/mypkg.v1" -) - -var ( - _ = fmt.Print - _ = mypkg.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) - } - }) -} - -func TestFindImportGoPath(t *testing.T) { - goroot, err := ioutil.TempDir("", "goimports-") - if err != nil { - t.Fatal(err) - } - defer os.RemoveAll(goroot) - - origStdlib := stdlib - defer func() { - stdlib = origStdlib - }() - stdlib = nil - - withEmptyGoPath(func() { - // Test against imaginary bits/bytes package in std lib - bytesDir := filepath.Join(goroot, "src", "pkg", "bits", "bytes") - for _, tag := range build.Default.ReleaseTags { - // Go 1.4 rearranged the GOROOT tree to remove the "pkg" path component. - if tag == "go1.4" { - bytesDir = filepath.Join(goroot, "src", "bits", "bytes") - } - } - if err := os.MkdirAll(bytesDir, 0755); err != nil { - t.Fatal(err) - } - bytesSrcPath := filepath.Join(bytesDir, "bytes.go") - bytesPkgPath := "bits/bytes" - bytesSrc := []byte(`package bytes - -type Buffer2 struct {} -`) - if err := ioutil.WriteFile(bytesSrcPath, bytesSrc, 0775); err != nil { - t.Fatal(err) - } - build.Default.GOROOT = goroot - - got, rename, err := findImportGoPath(context.Background(), "bytes", map[string]bool{"Buffer2": true}, "x.go") - if err != nil { - t.Fatal(err) - } - if got != bytesPkgPath || rename { - t.Errorf(`findImportGoPath("bytes", Buffer2 ...)=%q, %t, want "%s", false`, got, rename, bytesPkgPath) - } - - got, rename, err = findImportGoPath(context.Background(), "bytes", map[string]bool{"Missing": true}, "x.go") - if err != nil { - t.Fatal(err) - } - if got != "" || rename { - t.Errorf(`findImportGoPath("bytes", Missing ...)=%q, %t, want "", false`, got, rename) - } - }) -} - -func withEmptyGoPath(fn func()) { - populateIgnoreOnce = sync.Once{} - scanGoRootOnce = sync.Once{} - scanGoPathOnce = sync.Once{} - dirScan = nil - ignoredDirs = nil - scanGoRootDone = make(chan struct{}) - - oldGOPATH := build.Default.GOPATH - oldGOROOT := build.Default.GOROOT - oldCompiler := build.Default.Compiler - build.Default.GOPATH = "" - build.Default.Compiler = "gc" - testHookScanDir = func(string) {} - - defer func() { - testHookScanDir = func(string) {} - build.Default.GOPATH = oldGOPATH - build.Default.GOROOT = oldGOROOT - build.Default.Compiler = oldCompiler - }() - - fn() -} - -func TestFindImportInternal(t *testing.T) { - withEmptyGoPath(func() { - // Check for src/internal/race, not just src/internal, - // so that we can run this test also against go1.5 - // (which doesn't contain that file). - _, err := os.Stat(filepath.Join(runtime.GOROOT(), "src/internal/race")) - if err != nil { - t.Skip(err) - } - - 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) - } - if got != "internal/race" || rename { - t.Errorf(`findImportGoPath("race", Acquire ...) = %q, %t; want "internal/race", false`, got, rename) - } - - // should not be able to use internal from outside that tree - got, rename, err = findImportGoPath(context.Background(), "race", map[string]bool{"Acquire": true}, filepath.Join(runtime.GOROOT(), "x.go")) - if err != nil { - t.Fatal(err) - } - if got != "" || rename { - t.Errorf(`findImportGoPath("race", Acquire ...)=%q, %t, want "", false`, got, rename) - } - }) -} - -// rand.Read should prefer crypto/rand.Read, not math/rand.Read. -func TestFindImportRandRead(t *testing.T) { - withEmptyGoPath(func() { - file := filepath.Join(runtime.GOROOT(), "src/foo/x.go") // dummy - tests := []struct { - syms []string - want string - }{ - { - syms: []string{"Read"}, - want: "crypto/rand", - }, - { - syms: []string{"Read", "NewZipf"}, - want: "math/rand", - }, - { - syms: []string{"NewZipf"}, - want: "math/rand", - }, - { - syms: []string{"Read", "Prime"}, - want: "crypto/rand", - }, - } - for _, tt := range tests { - m := map[string]bool{} - for _, sym := range tt.syms { - m[sym] = true - } - got, _, err := findImportGoPath(context.Background(), "rand", m, file) - if err != nil { - t.Errorf("for %q: %v", tt.syms, err) - continue - } - if got != tt.want { - t.Errorf("for %q, findImportGoPath = %q; want %q", tt.syms, got, tt.want) - } - } - }) -} - -func TestFindImportVendor(t *testing.T) { - testConfig{ - gorootFiles: map[string]string{ - "vendor/golang.org/x/net/http2/hpack/huffman.go": "package hpack\nfunc HuffmanDecode() { }\n", - }, - }.test(t, func(t *goimportTest) { - 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) - } - want := "golang.org/x/net/http2/hpack" - if got != want || rename { - t.Errorf(`findImportGoPath("hpack", HuffmanDecode ...) = %q, %t; want %q, false`, got, rename, want) - } - }) -} - -func TestProcessVendor(t *testing.T) { - withEmptyGoPath(func() { - _, err := os.Stat(filepath.Join(runtime.GOROOT(), "src/vendor")) - if err != nil { - t.Skip(err) - } - - target := filepath.Join(runtime.GOROOT(), "src/math/x.go") - out, err := Process(target, []byte("package http\nimport \"bytes\"\nfunc f() { strings.NewReader(); hpack.HuffmanDecode() }\n"), nil) - - if err != nil { - t.Fatal(err) - } - - want := "golang_org/x/net/http2/hpack" - if _, err := os.Stat(filepath.Join(runtime.GOROOT(), "src/vendor", want)); os.IsNotExist(err) { - want = "golang.org/x/net/http2/hpack" - } - - if !bytes.Contains(out, []byte(want)) { - t.Fatalf("Process(%q) did not add expected hpack import %q; got:\n%s", target, want, out) - } - }) -} - -func TestFindImportStdlib(t *testing.T) { - tests := []struct { - pkg string - symbols []string - want string - }{ - {"http", []string{"Get"}, "net/http"}, - {"http", []string{"Get", "Post"}, "net/http"}, - {"http", []string{"Get", "Foo"}, ""}, - {"bytes", []string{"Buffer"}, "bytes"}, - {"ioutil", []string{"Discard"}, "io/ioutil"}, - } - for _, tt := range tests { - got, ok := findImportStdlib(tt.pkg, strSet(tt.symbols)) - if (got != "") != ok { - t.Error("findImportStdlib return value inconsistent") - } - if got != tt.want { - t.Errorf("findImportStdlib(%q, %q) = %q, want %q", tt.pkg, tt.symbols, got, tt.want) - } - } -} - -type testConfig struct { - // goroot and gopath optionally specifies the path on disk - // to use for the GOROOT and GOPATH. If empty, a temp directory - // is made if needed. - goroot, gopath string - - // gorootFiles optionally specifies the complete contents of GOROOT to use, - // If nil, the normal current $GOROOT is used. - gorootFiles map[string]string // paths relative to $GOROOT/src to contents - - // gopathFiles is like gorootFiles, but for $GOPATH. - // If nil, there is no GOPATH, though. - gopathFiles map[string]string // paths relative to $GOPATH/src to contents -} - -func mustTempDir(t *testing.T, prefix string) string { - dir, err := ioutil.TempDir("", prefix) - if err != nil { - t.Fatal(err) - } - return dir -} - -func mapToDir(destDir string, files map[string]string) error { - for path, contents := range files { - file := filepath.Join(destDir, "src", path) - if err := os.MkdirAll(filepath.Dir(file), 0755); err != nil { - return 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 { - return err - } - } - return nil -} - -func (c testConfig) test(t *testing.T, fn func(*goimportTest)) { - goroot := c.goroot - gopath := c.gopath - - if c.gorootFiles != nil && goroot == "" { - goroot = mustTempDir(t, "goroot-") - defer os.RemoveAll(goroot) - } - if err := mapToDir(goroot, c.gorootFiles); err != nil { - t.Fatal(err) - } - - if c.gopathFiles != nil && gopath == "" { - gopath = mustTempDir(t, "gopath-") - defer os.RemoveAll(gopath) - } - if err := mapToDir(gopath, c.gopathFiles); err != nil { - t.Fatal(err) - } - - withEmptyGoPath(func() { - if goroot != "" { - build.Default.GOROOT = goroot - } - build.Default.GOPATH = gopath - - it := &goimportTest{ - T: t, - goroot: build.Default.GOROOT, - gopath: gopath, - ctx: &build.Default, - } - fn(it) - }) -} - -type goimportTest struct { - *testing.T - ctx *build.Context - goroot string - gopath string -} - -// Tests that added imports are renamed when the import path's base doesn't -// match its package name. For example, we want to generate: -// -// import cloudbilling "google.golang.org/api/cloudbilling/v1" -func TestRenameWhenPackageNameMismatch(t *testing.T) { - testConfig{ - gopathFiles: map[string]string{ - "foo/bar/v1/x.go": "package bar \n const X = 1", - }, - }.test(t, func(t *goimportTest) { - buf, err := Process(t.gopath+"/src/test/t.go", []byte("package main \n const Y = bar.X"), &Options{}) - if err != nil { - t.Fatal(err) - } - const want = `package main - -import bar "foo/bar/v1" - -const Y = bar.X -` - if string(buf) != want { - t.Errorf("Got:\n%s\nWant:\n%s", buf, want) - } - }) -} - -// Tests that the LocalPrefix option causes imports -// to be added into a later group (num=3). -func TestLocalPrefix(t *testing.T) { - 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 - -import ( - "runtime" - - "foo/bar" -) - -const Y = bar.X -const _ = runtime.GOOS -`, - }, - { - 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 -`, - }, - { - 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 -// on Go itself) don't cause the GOPATH to be scanned (which might be -// much bigger). -func TestOptimizationWhenInGoroot(t *testing.T) { - testConfig{ - gopathFiles: map[string]string{ - "foo/foo.go": "package foo\nconst X = 1\n", - }, - }.test(t, func(t *goimportTest) { - testHookScanDir = func(dir string) { - if dir != filepath.Join(build.Default.GOROOT, "src") { - t.Errorf("unexpected dir scan of %s", dir) - } - } - const in = "package foo\n\nconst Y = bar.X\n" - buf, err := Process(t.goroot+"/src/foo/foo.go", []byte(in), nil) - if err != nil { - t.Fatal(err) - } - if string(buf) != in { - t.Errorf("got:\n%q\nwant unchanged:\n%q\n", in, buf) - } - }) -} - -// Tests that "package documentation" files are ignored. -func TestIgnoreDocumentationPackage(t *testing.T) { - testConfig{ - gopathFiles: map[string]string{ - "foo/foo.go": "package foo\nconst X = 1\n", - "foo/doc.go": "package documentation \n // just to confuse things\n", - }, - }.test(t, func(t *goimportTest) { - const in = "package x\n\nconst Y = foo.X\n" - const want = "package x\n\nimport \"foo\"\n\nconst Y = foo.X\n" - buf, err := Process(t.gopath+"/src/x/x.go", []byte(in), nil) - if err != nil { - t.Fatal(err) - } - if string(buf) != want { - t.Errorf("wrong output.\ngot:\n%q\nwant:\n%q\n", in, want) - } - }) -} - -// Tests importPathToNameGoPathParse and in particular that it stops -// after finding the first non-documentation package name, not -// reporting an error on inconsistent package names (since it should -// never make it that far). -func TestImportPathToNameGoPathParse(t *testing.T) { - testConfig{ - gopathFiles: map[string]string{ - "example.net/pkg/doc.go": "package documentation\n", // ignored - "example.net/pkg/gen.go": "package main\n", // also ignored - "example.net/pkg/pkg.go": "package the_pkg_name_to_find\n and this syntax error is ignored because of parser.PackageClauseOnly", - "example.net/pkg/z.go": "package inconsistent\n", // inconsistent but ignored - }, - }.test(t, func(t *goimportTest) { - got, err := importPathToNameGoPathParse("example.net/pkg", filepath.Join(t.gopath, "src", "other.net")) - if err != nil { - t.Fatal(err) - } - const want = "the_pkg_name_to_find" - if got != want { - t.Errorf("importPathToNameGoPathParse(..) = %q; want %q", got, want) - } - }) -} - -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", - "otherwise-longer-so-worse.example.net/foo/pkg/pkg.go": "package pkg\nconst X = 1", - }, - }.test(t, func(t *goimportTest) { - const in = "package x\n\nconst _ = pkg.X\n" - const want = "package x\n\nimport \"otherwise-longer-so-worse.example.net/foo/pkg\"\n\nconst _ = pkg.X\n" - buf, err := Process(t.gopath+"/src/x/x.go", []byte(in), nil) - if err != nil { - t.Fatal(err) - } - if string(buf) != want { - t.Errorf("wrong output.\ngot:\n%q\nwant:\n%q\n", buf, want) - } - }) -} - -// Skip "node_modules" directory. -func TestSkipNodeModules(t *testing.T) { - testConfig{ - gopathFiles: map[string]string{ - "example.net/node_modules/pkg/a.go": "package pkg\nconst X = 1", - "otherwise-longer.net/not_modules/pkg/a.go": "package pkg\nconst X = 1", - }, - }.test(t, func(t *goimportTest) { - const in = "package x\n\nconst _ = pkg.X\n" - const want = "package x\n\nimport \"otherwise-longer.net/not_modules/pkg\"\n\nconst _ = pkg.X\n" - buf, err := Process(t.gopath+"/src/x/x.go", []byte(in), nil) - if err != nil { - t.Fatal(err) - } - if string(buf) != want { - t.Errorf("wrong output.\ngot:\n%q\nwant:\n%q\n", buf, want) - } - }) -} - -// golang.org/issue/16458 -- if GOROOT is a prefix of GOPATH, GOPATH is ignored. -func TestGoRootPrefixOfGoPath(t *testing.T) { - dir := mustTempDir(t, "importstest") - defer os.RemoveAll(dir) - testConfig{ - goroot: filepath.Join(dir, "go"), - gopath: filepath.Join(dir, "gopath"), - gopathFiles: map[string]string{ - "example.com/foo/pkg.go": "package foo\nconst X = 1", - }, - }.test(t, func(t *goimportTest) { - const in = "package x\n\nconst _ = foo.X\n" - const want = "package x\n\nimport \"example.com/foo\"\n\nconst _ = foo.X\n" - buf, err := Process(t.gopath+"/src/x/x.go", []byte(in), nil) - if err != nil { - t.Fatal(err) - } - if string(buf) != want { - t.Errorf("wrong output.\ngot:\n%q\nwant:\n%q\n", buf, want) - } - }) - -} - -const testGlobalImportsUsesGlobal = `package globalimporttest - -func doSomething() { - t := time.Now() -} -` - -const testGlobalImportsGlobalDecl = `package globalimporttest - -type Time struct{} - -func (t Time) Now() Time { - return Time{} -} - -var time Time -` - -// Tests that package global variables with the same name and function name as -// a function in a separate package do not result in an import which masks -// the global variable -func TestGlobalImports(t *testing.T) { - const pkg = "globalimporttest" - const usesGlobalFile = pkg + "/uses_global.go" - testConfig{ - gopathFiles: map[string]string{ - usesGlobalFile: testGlobalImportsUsesGlobal, - pkg + "/global.go": testGlobalImportsGlobalDecl, - }, - }.test(t, func(t *goimportTest) { - buf, err := Process( - t.gopath+"/src/"+usesGlobalFile, []byte(testGlobalImportsUsesGlobal), nil) - if err != nil { - t.Fatal(err) - } - if string(buf) != testGlobalImportsUsesGlobal { - t.Errorf("wrong output.\ngot:\n%q\nwant:\n%q\n", buf, testGlobalImportsUsesGlobal) - } - }) -} - -// Tests that sibling files - other files in the same package - can provide an -// import that may not be the default one otherwise. -func TestSiblingImports(t *testing.T) { - - // provide is the sibling file that provides the desired import. - const provide = `package siblingimporttest - -import "local/log" -import "my/bytes" - -func LogSomething() { - log.Print("Something") - bytes.SomeFunc() -} -` - - // need is the file being tested that needs the import. - const need = `package siblingimporttest - -var _ = bytes.Buffer{} - -func LogSomethingElse() { - log.Print("Something else") -} -` - - // want is the expected result file - const want = `package siblingimporttest - -import ( - "bytes" - "local/log" -) - -var _ = bytes.Buffer{} - -func LogSomethingElse() { - log.Print("Something else") -} -` - - const pkg = "siblingimporttest" - const siblingFile = pkg + "/needs_import.go" - testConfig{ - gopathFiles: map[string]string{ - siblingFile: need, - pkg + "/provides_import.go": provide, - }, - }.test(t, func(t *goimportTest) { - buf, err := Process( - t.gopath+"/src/"+siblingFile, []byte(need), nil) - if err != nil { - t.Fatal(err) - } - if string(buf) != want { - t.Errorf("wrong output.\ngot:\n%q\nwant:\n%q\n", buf, want) - } - }) -} - -func strSet(ss []string) map[string]bool { - m := make(map[string]bool) - for _, s := range ss { - m[s] = true - } - return m -} - -func TestPkgIsCandidate(t *testing.T) { - tests := [...]struct { - filename string - pkgIdent string - pkg *pkg - want bool - }{ - // normal match - 0: { - filename: "/gopath/src/my/pkg/pkg.go", - pkgIdent: "client", - pkg: &pkg{ - dir: "/gopath/src/client", - importPath: "client", - importPathShort: "client", - }, - want: true, - }, - // not a match - 1: { - filename: "/gopath/src/my/pkg/pkg.go", - pkgIdent: "zzz", - pkg: &pkg{ - dir: "/gopath/src/client", - importPath: "client", - importPathShort: "client", - }, - want: false, - }, - // would be a match, but "client" appears too deep. - 2: { - filename: "/gopath/src/my/pkg/pkg.go", - pkgIdent: "client", - pkg: &pkg{ - dir: "/gopath/src/client/foo/foo/foo", - importPath: "client/foo/foo", - importPathShort: "client/foo/foo", - }, - want: false, - }, - // not an exact match, but substring is good enough. - 3: { - filename: "/gopath/src/my/pkg/pkg.go", - pkgIdent: "client", - pkg: &pkg{ - dir: "/gopath/src/foo/go-client", - importPath: "foo/go-client", - importPathShort: "foo/go-client", - }, - want: true, - }, - // "internal" package, and not visible - 4: { - filename: "/gopath/src/my/pkg/pkg.go", - pkgIdent: "client", - pkg: &pkg{ - dir: "/gopath/src/foo/internal/client", - importPath: "foo/internal/client", - importPathShort: "foo/internal/client", - }, - want: false, - }, - // "internal" package but visible - 5: { - filename: "/gopath/src/foo/bar.go", - pkgIdent: "client", - pkg: &pkg{ - dir: "/gopath/src/foo/internal/client", - importPath: "foo/internal/client", - importPathShort: "foo/internal/client", - }, - want: true, - }, - // "vendor" package not visible - 6: { - filename: "/gopath/src/foo/bar.go", - pkgIdent: "client", - pkg: &pkg{ - dir: "/gopath/src/other/vendor/client", - importPath: "other/vendor/client", - importPathShort: "client", - }, - want: false, - }, - // "vendor" package, visible - 7: { - filename: "/gopath/src/foo/bar.go", - pkgIdent: "client", - pkg: &pkg{ - dir: "/gopath/src/foo/vendor/client", - importPath: "other/foo/client", - importPathShort: "client", - }, - want: true, - }, - // Ignore hyphens. - 8: { - filename: "/gopath/src/foo/bar.go", - pkgIdent: "socketio", - pkg: &pkg{ - dir: "/gopath/src/foo/socket-io", - importPath: "foo/socket-io", - importPathShort: "foo/socket-io", - }, - want: true, - }, - // Ignore case. - 9: { - filename: "/gopath/src/foo/bar.go", - pkgIdent: "fooprod", - pkg: &pkg{ - dir: "/gopath/src/foo/FooPROD", - importPath: "foo/FooPROD", - importPathShort: "foo/FooPROD", - }, - want: true, - }, - // Ignoring both hyphens and case together. - 10: { - filename: "/gopath/src/foo/bar.go", - pkgIdent: "fooprod", - pkg: &pkg{ - dir: "/gopath/src/foo/Foo-PROD", - importPath: "foo/Foo-PROD", - importPathShort: "foo/Foo-PROD", - }, - want: true, - }, - } - for i, tt := range tests { - got := pkgIsCandidate(tt.filename, tt.pkgIdent, tt.pkg) - if got != tt.want { - t.Errorf("test %d. pkgIsCandidate(%q, %q, %+v) = %v; want %v", - i, tt.filename, tt.pkgIdent, *tt.pkg, got, tt.want) - } - } -} - -func TestShouldTraverse(t *testing.T) { - switch runtime.GOOS { - case "windows", "plan9": - t.Skipf("skipping symlink-requiring test on %s", runtime.GOOS) - } - - dir, err := ioutil.TempDir("", "goimports-") - if err != nil { - t.Fatal(err) - } - defer os.RemoveAll(dir) - - // Note: mapToDir prepends "src" to each element, since - // mapToDir was made for creating GOPATHs. - if err := mapToDir(dir, map[string]string{ - "foo/foo2/file.txt": "", - "foo/foo2/link-to-src": "LINK:" + dir + "/src", - "foo/foo2/link-to-src-foo": "LINK:" + dir + "/src/foo", - "foo/foo2/link-to-dot": "LINK:.", - "bar/bar2/file.txt": "", - "bar/bar2/link-to-src-foo": "LINK:" + dir + "/src/foo", - - "a/b/c": "LINK:" + dir + "/src/a/d", - "a/d/e": "LINK:" + dir + "/src/a/b", - }); err != nil { - t.Fatal(err) - } - tests := []struct { - dir string - file string - want bool - }{ - { - dir: dir + "/src/foo/foo2", - file: "link-to-src-foo", - want: false, // loop - }, - { - dir: dir + "/src/foo/foo2", - file: "link-to-src", - want: false, // loop - }, - { - dir: dir + "/src/foo/foo2", - file: "link-to-dot", - want: false, // loop - }, - { - dir: dir + "/src/bar/bar2", - file: "link-to-src-foo", - want: true, // not a loop - }, - { - dir: dir + "/src/a/b/c", - file: "e", - want: false, // loop: "e" is the same as "b". - }, - } - for i, tt := range tests { - fi, err := os.Stat(filepath.Join(tt.dir, tt.file)) - if err != nil { - t.Errorf("%d. Stat = %v", i, err) - continue - } - got := shouldTraverse(tt.dir, fi) - if got != tt.want { - t.Errorf("%d. shouldTraverse(%q, %q) = %v; want %v", i, tt.dir, tt.file, got, tt.want) - } - } -} - -// Issue 20941: this used to panic on Windows. -func TestProcessStdin(t *testing.T) { - got, err := Process("", []byte("package main\nfunc main() {\n\tfmt.Println(123)\n}\n"), nil) - if err != nil { - t.Fatal(err) - } - if !strings.Contains(string(got), `"fmt"`) { - t.Errorf("expected fmt import; got: %s", got) - } -} - -// Tests LocalPackagePromotion when there is a local package that matches, it -// should be the closest match. -// https://golang.org/issues/17557 -func TestLocalPackagePromotion(t *testing.T) { - testConfig{ - gopathFiles: map[string]string{ - "config.net/config/config.go": "package config\n type SystemConfig struct {}", // Will match but should not be first choice - "mycompany.net/config/config.go": "package config\n type SystemConfig struct {}", // Will match but should not be first choice - "mycompany.net/tool/config/config.go": "package config\n type SystemConfig struct {}", // Local package should be promoted over shorter package - }, - }.test(t, func(t *goimportTest) { - const in = "package main\n var c = &config.SystemConfig{}" - const want = `package main - -import "mycompany.net/tool/config" - -var c = &config.SystemConfig{} -` - got, err := Process(filepath.Join(t.gopath, "src", "mycompany.net/tool/main.go"), []byte(in), nil) - if err != nil { - t.Fatal(err) - } - if string(got) != want { - t.Errorf("Process = %q; want %q", got, want) - } - }) -} - -// Tests FindImportInLocalGoFiles looks at the import lines for other Go files in the -// local directory, since the user is likely to import the same packages in the current -// Go file. If an import is found that satisfies the need, it should be used over the -// standard library. -// https://golang.org/issues/17557 -func TestFindImportInLocalGoFiles(t *testing.T) { - testConfig{ - gopathFiles: map[string]string{ - "bytes.net/bytes/bytes.go": "package bytes\n type Buffer struct {}", // Should be selected over standard library - "mycompany.net/tool/io.go": "package main\n import \"bytes.net/bytes\"\n var _ = &bytes.Buffer{}", // Contains package import that will cause stdlib to be ignored - "mycompany.net/tool/err.go": "package main\n import \"bogus.net/bytes\"\n var _ = &bytes.Buffer{}", // Contains import which is not resolved, so it is ignored - }, - }.test(t, func(t *goimportTest) { - const in = "package main\n var _ = &bytes.Buffer{}" - const want = `package main - -import "bytes.net/bytes" - -var _ = &bytes.Buffer{} -` - got, err := Process(filepath.Join(t.gopath, "src", "mycompany.net/tool/main.go"), []byte(in), nil) - if err != nil { - t.Fatal(err) - } - if string(got) != want { - t.Errorf("Process = got %q; want %q", got, want) - } - }) -} - -func TestImportNoGoFiles(t *testing.T) { - testConfig{ - gopathFiles: map[string]string{}, - }.test(t, func(t *goimportTest) { - const in = "package main\n var _ = &bytes.Buffer{}" - const want = `package main - -import "bytes" - -var _ = &bytes.Buffer{} -` - got, err := Process(filepath.Join(t.gopath, "src", "mycompany.net/tool/main.go"), []byte(in), nil) - if err != nil { - t.Fatal(err) - } - if string(got) != want { - t.Errorf("Process = got %q; want %q", got, want) - } - }) -} - -// A happy path test for Process -func TestProcess(t *testing.T) { - in := `package testimports - - var s = fmt.Sprintf("%s", "value") -` - out, err := Process("foo", []byte(in), nil) - - if err != nil { - t.Errorf("Process returned error.\n got:\n%v\nwant:\nnil", err) - } - - want := `package testimports - -import "fmt" - -var s = fmt.Sprintf("%s", "value") -` - if got := string(out); got != want { - t.Errorf("Process returned unexpected result.\ngot:\n%v\nwant:\n%v", got, want) - } -} - -// Ensures a token as large as 500000 bytes can be handled -// https://golang.org/issues/18201 -func TestProcessLargeToken(t *testing.T) { - largeString := strings.Repeat("x", 500000) - - in := `package testimports - -import ( - "fmt" - "mydomain.mystuff/mypkg" -) - -const s = fmt.Sprintf("%s", "` + largeString + `") -const x = mypkg.Sprintf("%s", "my package") - -// end -` - - out, err := Process("foo", []byte(in), nil) - - if err != nil { - t.Errorf("Process returned error.\n got:\n%v\nwant:\nnil", err) - } - - want := `package testimports - -import ( - "fmt" - - "mydomain.mystuff/mypkg" -) - -const s = fmt.Sprintf("%s", "` + largeString + `") -const x = mypkg.Sprintf("%s", "my package") - -// end -` - if got := string(out); got != want { - t.Errorf("Process returned unexpected result.\ngot:\n%.100v\nwant:\n%.100v", got, want) - } -} diff --git a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_test.go b/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_test.go deleted file mode 100644 index e9ab0d59..00000000 --- a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_test.go +++ /dev/null @@ -1,190 +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 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/vendor/golang.org/x/tools/third_party/moduleloader/LICENSE b/vendor/golang.org/x/tools/third_party/moduleloader/LICENSE new file mode 100644 index 00000000..1723a224 --- /dev/null +++ b/vendor/golang.org/x/tools/third_party/moduleloader/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2013-2016 Guy Bedford, Luke Hoban, Addy Osmani + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/vendor/golang.org/x/tools/third_party/typescript/LICENSE b/vendor/golang.org/x/tools/third_party/typescript/LICENSE new file mode 100644 index 00000000..e7259f84 --- /dev/null +++ b/vendor/golang.org/x/tools/third_party/typescript/LICENSE @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/vendor/golang.org/x/tools/third_party/webcomponents/LICENSE b/vendor/golang.org/x/tools/third_party/webcomponents/LICENSE new file mode 100644 index 00000000..e648283b --- /dev/null +++ b/vendor/golang.org/x/tools/third_party/webcomponents/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2015 The Polymer Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/vendor/google.golang.org/genproto/.travis.yml b/vendor/google.golang.org/genproto/.travis.yml deleted file mode 100644 index bbe8fb30..00000000 --- a/vendor/google.golang.org/genproto/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: go -go: - - 1.6 - - 1.7 - - 1.x -go_import_path: google.golang.org/genproto - -script: -- go test -v ./... -- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then - go get -u -v cloud.google.com/go/...; - fi diff --git a/vendor/google.golang.org/genproto/CONTRIBUTING.md b/vendor/google.golang.org/genproto/CONTRIBUTING.md deleted file mode 100644 index 2827b7d3..00000000 --- a/vendor/google.golang.org/genproto/CONTRIBUTING.md +++ /dev/null @@ -1,27 +0,0 @@ -Want to contribute? Great! First, read this page (including the small print at the end). - -### Before you contribute -Before we can use your code, you must sign the -[Google Individual Contributor License Agreement] -(https://cla.developers.google.com/about/google-individual) -(CLA), which you can do online. The CLA is necessary mainly because you own the -copyright to your changes, even after your contribution becomes part of our -codebase, so we need your permission to use and distribute your code. We also -need to be sure of various other things—for instance that you'll tell us if you -know that your code infringes on other people's patents. You don't have to sign -the CLA until after you've submitted your code for review and a member has -approved it, but you must do it before we can put your code into our codebase. -Before you start working on a larger contribution, you should get in touch with -us first through the issue tracker with your idea so that we can help out and -possibly guide you. Coordinating up front makes it much easier to avoid -frustration later on. - -### Code reviews -All submissions, including submissions by project members, require review. We -use Github pull requests for this purpose. - -### The small print -Contributions made by corporations are covered by a different agreement than -the one above, the -[Software Grant and Corporate Contributor License Agreement] -(https://cla.developers.google.com/about/google-corporate). diff --git a/vendor/google.golang.org/genproto/README.md b/vendor/google.golang.org/genproto/README.md deleted file mode 100644 index 51d0bae5..00000000 --- a/vendor/google.golang.org/genproto/README.md +++ /dev/null @@ -1,28 +0,0 @@ -Go generated proto packages -=========================== - -[![Build Status](https://travis-ci.org/google/go-genproto.svg?branch=master)](https://travis-ci.org/google/go-genproto) -[![GoDoc](https://godoc.org/google.golang.org/genproto?status.svg)](https://godoc.org/google.golang.org/genproto) - -> **IMPORTANT** This repository is currently experimental. The structure -> of the contained packages is subject to change. Please see the original -> source repositories (listed below) to find out the status of the each -> protocol buffer's associated service. - -This repository contains the generated Go packages for common protocol buffer -types, and the generated [gRPC][1] code necessary for interacting with Google's gRPC -APIs. - -There are two sources for the proto files used in this repository: - -1. [google/protobuf][2]: the code in the `protobuf` and `ptypes` subdirectories - is derived from this repo. The messages in `protobuf` are used to describe - protocol buffer messages themselves. The messages under `ptypes` define the - common well-known types. -2. [googleapis/googleapis][3]: the code in the `googleapis` is derived from this - repo. The packages here contain types specifically for interacting with Google - APIs. - -[1]: http://grpc.io -[2]: https://github.com/google/protobuf/ -[3]: https://github.com/googleapis/googleapis/ diff --git a/vendor/google.golang.org/genproto/regen.go b/vendor/google.golang.org/genproto/regen.go deleted file mode 100644 index 53779b92..00000000 --- a/vendor/google.golang.org/genproto/regen.go +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2016 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 - -// Regen.go regenerates the genproto repository. -// -// Regen.go recursively walks through each directory named by given arguments, -// looking for all .proto files. (Symlinks are not followed.) -// If the pkg_prefix flag is not an empty string, -// any proto file without `go_package` option -// or whose option does not begin with the prefix is ignored. -// If multiple roots contain files with the same name, -// eg "root1/path/to/file" and "root2/path/to/file", -// only the first file is processed; the rest are ignored. -// Protoc is executed on remaining files, -// one invocation per set of files declaring the same Go package. -package main - -import ( - "flag" - "fmt" - "io/ioutil" - "log" - "os" - "os/exec" - "path/filepath" - "regexp" - "strconv" - "strings" -) - -var goPkgOptRe = regexp.MustCompile(`(?m)^option go_package = (.*);`) - -func usage() { - fmt.Fprintln(os.Stderr, `usage: go run regen.go -go_out=path/to/output [-pkg_prefix=pkg/prefix] roots... - -Most users will not need to run this file directly. -To regenerate this repository, run regen.sh instead.`) - flag.PrintDefaults() -} - -func main() { - goOutDir := flag.String("go_out", "", "go_out argument to pass to protoc-gen-go") - pkgPrefix := flag.String("pkg_prefix", "", "only include proto files with go_package starting with this prefix") - flag.Usage = usage - flag.Parse() - - if *goOutDir == "" { - log.Fatal("need go_out flag") - } - - seenFiles := make(map[string]bool) - pkgFiles := make(map[string][]string) - for _, root := range flag.Args() { - walkFn := func(path string, info os.FileInfo, err error) error { - if err != nil { - return err - } - if !info.Mode().IsRegular() || !strings.HasSuffix(path, ".proto") { - return nil - } - - switch rel, err := filepath.Rel(root, path); { - case err != nil: - return err - case seenFiles[rel]: - return nil - default: - seenFiles[rel] = true - } - - pkg, err := goPkg(path) - if err != nil { - return err - } - pkgFiles[pkg] = append(pkgFiles[pkg], path) - return nil - } - if err := filepath.Walk(root, walkFn); err != nil { - log.Fatal(err) - } - } - for pkg, fnames := range pkgFiles { - if !strings.HasPrefix(pkg, *pkgPrefix) { - continue - } - if out, err := protoc(*goOutDir, flag.Args(), fnames); err != nil { - log.Fatalf("error executing protoc: %s\n%s", err, out) - } - } -} - -// goPkg reports the import path declared in the given file's -// `go_package` option. If the option is missing, goPkg returns empty string. -func goPkg(fname string) (string, error) { - content, err := ioutil.ReadFile(fname) - if err != nil { - return "", err - } - - var pkgName string - if match := goPkgOptRe.FindSubmatch(content); len(match) > 0 { - pn, err := strconv.Unquote(string(match[1])) - if err != nil { - return "", err - } - pkgName = pn - } - if p := strings.IndexRune(pkgName, ';'); p > 0 { - pkgName = pkgName[:p] - } - return pkgName, nil -} - -// protoc executes the "protoc" command on files named in fnames, -// passing go_out and include flags specified in goOut and includes respectively. -// protoc returns combined output from stdout and stderr. -func protoc(goOut string, includes, fnames []string) ([]byte, error) { - args := []string{"--go_out=plugins=grpc:" + goOut} - for _, inc := range includes { - args = append(args, "-I", inc) - } - args = append(args, fnames...) - return exec.Command("protoc", args...).CombinedOutput() -} diff --git a/vendor/google.golang.org/genproto/regen.sh b/vendor/google.golang.org/genproto/regen.sh deleted file mode 100755 index 53e00fc3..00000000 --- a/vendor/google.golang.org/genproto/regen.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 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. - -# This script rebuilds the generated code for the 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. - -set -e - -PKG=google.golang.org/genproto -PROTO_REPO=https://github.com/google/protobuf -PROTO_SUBDIR=src/google/protobuf -GOOGLEAPIS_REPO=https://github.com/googleapis/googleapis -API_COMMON_REPO=https://github.com/googleapis/api-common-protos.git - -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 - -root=$(go list -f '{{.Root}}' $PKG/... | head -n1) -if [ -z "$root" ]; then - die "cannot find root of $PKG" -fi - -remove_dirs= -trap 'rm -rf $remove_dirs' EXIT - -if [ -z "$PROTOBUF" ]; then - proto_repo_dir=$(mktemp -d -t regen-cds-proto.XXXXXX) - git clone -q $PROTO_REPO $proto_repo_dir & - remove_dirs="$proto_repo_dir" - # The protoc include directory is actually the "src" directory of the repo. - protodir="$proto_repo_dir/src" -else - protodir="$PROTOBUF/src" -fi - -if [ -z "$GOOGLEAPIS" ]; then - apidir=$(mktemp -d -t regen-cds-api.XXXXXX) - git clone -q $GOOGLEAPIS_REPO $apidir & - remove_dirs="$remove_dirs $apidir" -else - apidir="$GOOGLEAPIS" -fi - -if [ -z "$COMMONPROTOS" ]; then - commondir=$(mktemp -d -t regen-cds-common.XXXXXX) - git clone -q $API_COMMON_REPO $commondir & - remove_dirs="$remove_dirs $commondir" -else - commondir="$COMMONPROTOS" -fi - -wait - -# Nuke everything, we'll generate them back -rm -r googleapis/ protobuf/ - -go run regen.go -go_out "$root/src" -pkg_prefix "$PKG" "$commondir" "$apidir" "$protodir" - -# Sanity check the build. -echo 1>&2 "Checking that the libraries build..." -go build -v ./... - -echo 1>&2 "All done!" diff --git a/vendor/google.golang.org/grpc/.travis.yml b/vendor/google.golang.org/grpc/.travis.yml deleted file mode 100644 index 5b5bfb13..00000000 --- a/vendor/google.golang.org/grpc/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -language: go - -matrix: - include: - - go: 1.10.x - env: VET=1 RACE=1 - - go: 1.6.x - - go: 1.7.x - - go: 1.8.x - - go: 1.9.x - - go: 1.9.x - env: GAE=1 - - go: 1.10.x - env: RUN386=1 - - go: 1.10.x - env: GRPC_GO_RETRY=on - -go_import_path: google.golang.org/grpc - -before_install: - - if [[ -n "$RUN386" ]]; then export GOARCH=386; fi - - if [[ "$TRAVIS_EVENT_TYPE" = "cron" && -z "$RUN386" ]]; then RACE=1; fi - - if [[ "$TRAVIS_EVENT_TYPE" != "cron" ]]; then VET_SKIP_PROTO=1; fi - -install: - - if [[ "$GAE" = 1 ]]; then source ./install_gae.sh; fi - - if [[ "$VET" = 1 ]]; then ./vet.sh -install; fi - -script: - - set -e - - if [[ "$GAE" = 1 ]]; then make testappengine; exit 0; fi - - if [[ "$VET" = 1 ]]; then ./vet.sh; fi - - make test - - if [[ "$RACE" = 1 ]]; then make testrace; fi diff --git a/vendor/google.golang.org/grpc/CONTRIBUTING.md b/vendor/google.golang.org/grpc/CONTRIBUTING.md deleted file mode 100644 index 0863eb26..00000000 --- a/vendor/google.golang.org/grpc/CONTRIBUTING.md +++ /dev/null @@ -1,36 +0,0 @@ -# How to contribute - -We definitely welcome your patches and contributions to gRPC! - -If you are new to github, please start by reading [Pull Request howto](https://help.github.com/articles/about-pull-requests/) - -## Legal requirements - -In order to protect both you and ourselves, you will need to sign the -[Contributor License Agreement](https://identity.linuxfoundation.org/projects/cncf). - -## Guidelines for Pull Requests -How to get your contributions merged smoothly and quickly. - -- Create **small PRs** that are narrowly focused on **addressing a single concern**. We often times receive PRs that are trying to fix several things at a time, but only one fix is considered acceptable, nothing gets merged and both author's & review's time is wasted. Create more PRs to address different concerns and everyone will be happy. - -- For speculative changes, consider opening an issue and discussing it first. If you are suggesting a behavioral or API change, consider starting with a [gRFC proposal](https://github.com/grpc/proposal). - -- Provide a good **PR description** as a record of **what** change is being made and **why** it was made. Link to a github issue if it exists. - -- Don't fix code style and formatting unless you are already changing that line to address an issue. PRs with irrelevant changes won't be merged. If you do want to fix formatting or style, do that in a separate PR. - -- Unless your PR is trivial, you should expect there will be reviewer comments that you'll need to address before merging. We expect you to be reasonably responsive to those comments, otherwise the PR will be closed after 2-3 weeks of inactivity. - -- Maintain **clean commit history** and use **meaningful commit messages**. PRs with messy commit history are difficult to review and won't be merged. Use `rebase -i upstream/master` to curate your commit history and/or to bring in latest changes from master (but avoid rebasing in the middle of a code review). - -- Keep your PR up to date with upstream/master (if there are merge conflicts, we can't really merge your change). - -- **All tests need to be passing** before your change can be merged. We recommend you **run tests locally** before creating your PR to catch breakages early on. - - `make all` to test everything, OR - - `make vet` to catch vet errors - - `make test` to run the tests - - `make testrace` to run tests in race mode - -- Exceptions to the rules can be made if there's a compelling reason for doing so. - diff --git a/vendor/google.golang.org/grpc/Makefile b/vendor/google.golang.org/grpc/Makefile deleted file mode 100644 index 50454530..00000000 --- a/vendor/google.golang.org/grpc/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -all: vet test testrace - -deps: - go get -d -v google.golang.org/grpc/... - -updatedeps: - go get -d -v -u -f google.golang.org/grpc/... - -testdeps: - go get -d -v -t google.golang.org/grpc/... - -testgaedeps: - goapp get -d -v -t -tags 'appengine appenginevm' google.golang.org/grpc/... - -updatetestdeps: - go get -d -v -t -u -f google.golang.org/grpc/... - -build: deps - go build google.golang.org/grpc/... - -proto: - @ if ! which protoc > /dev/null; then \ - echo "error: protoc not installed" >&2; \ - exit 1; \ - fi - go generate google.golang.org/grpc/... - -vet: - ./vet.sh - -test: testdeps - go test -cpu 1,4 -timeout 5m google.golang.org/grpc/... - -testrace: testdeps - go test -race -cpu 1,4 -timeout 7m google.golang.org/grpc/... - -testappengine: testgaedeps - goapp test -cpu 1,4 -timeout 5m google.golang.org/grpc/... - -clean: - go clean -i google.golang.org/grpc/... - -.PHONY: \ - all \ - deps \ - updatedeps \ - testdeps \ - testgaedeps \ - updatetestdeps \ - build \ - proto \ - vet \ - test \ - testrace \ - clean diff --git a/vendor/google.golang.org/grpc/README.md b/vendor/google.golang.org/grpc/README.md deleted file mode 100644 index 789adfd6..00000000 --- a/vendor/google.golang.org/grpc/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# gRPC-Go - -[![Build Status](https://travis-ci.org/grpc/grpc-go.svg)](https://travis-ci.org/grpc/grpc-go) [![GoDoc](https://godoc.org/google.golang.org/grpc?status.svg)](https://godoc.org/google.golang.org/grpc) [![GoReportCard](https://goreportcard.com/badge/grpc/grpc-go)](https://goreportcard.com/report/github.com/grpc/grpc-go) - -The Go implementation of [gRPC](https://grpc.io/): A high performance, open source, general RPC framework that puts mobile and HTTP/2 first. For more information see the [gRPC Quick Start: Go](https://grpc.io/docs/quickstart/go.html) guide. - -Installation ------------- - -To install this package, you need to install Go and setup your Go workspace on your computer. The simplest way to install the library is to run: - -``` -$ go get -u google.golang.org/grpc -``` - -Prerequisites -------------- - -This requires Go 1.6 or later. Go 1.7 will be required soon. - -Constraints ------------ -The grpc package should only depend on standard Go packages and a small number of exceptions. If your contribution introduces new dependencies which are NOT in the [list](http://godoc.org/google.golang.org/grpc?imports), you need a discussion with gRPC-Go authors and consultants. - -Documentation -------------- -See [API documentation](https://godoc.org/google.golang.org/grpc) for package and API descriptions and find examples in the [examples directory](examples/). - -Performance ------------ -See the current benchmarks for some of the languages supported in [this dashboard](https://performance-dot-grpc-testing.appspot.com/explore?dashboard=5652536396611584&widget=490377658&container=1286539696). - -Status ------- -General Availability [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). - -FAQ ---- - -#### Compiling error, undefined: grpc.SupportPackageIsVersion - -Please update proto package, gRPC package and rebuild the proto files: - - `go get -u github.com/golang/protobuf/{proto,protoc-gen-go}` - - `go get -u google.golang.org/grpc` - - `protoc --go_out=plugins=grpc:. *.proto` diff --git a/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin_test.go b/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin_test.go deleted file mode 100644 index 70d8af71..00000000 --- a/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin_test.go +++ /dev/null @@ -1,477 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package roundrobin_test - -import ( - "fmt" - "net" - "sync" - "testing" - "time" - - "golang.org/x/net/context" - "google.golang.org/grpc" - "google.golang.org/grpc/balancer/roundrobin" - "google.golang.org/grpc/codes" - _ "google.golang.org/grpc/grpclog/glogger" - "google.golang.org/grpc/internal/leakcheck" - "google.golang.org/grpc/peer" - "google.golang.org/grpc/resolver" - "google.golang.org/grpc/resolver/manual" - "google.golang.org/grpc/status" - testpb "google.golang.org/grpc/test/grpc_testing" -) - -type testServer struct { - testpb.TestServiceServer -} - -func (s *testServer) EmptyCall(ctx context.Context, in *testpb.Empty) (*testpb.Empty, error) { - return &testpb.Empty{}, nil -} - -func (s *testServer) FullDuplexCall(stream testpb.TestService_FullDuplexCallServer) error { - return nil -} - -type test struct { - servers []*grpc.Server - addresses []string -} - -func (t *test) cleanup() { - for _, s := range t.servers { - s.Stop() - } -} - -func startTestServers(count int) (_ *test, err error) { - t := &test{} - - defer func() { - if err != nil { - for _, s := range t.servers { - s.Stop() - } - } - }() - for i := 0; i < count; i++ { - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - return nil, fmt.Errorf("Failed to listen %v", err) - } - - s := grpc.NewServer() - testpb.RegisterTestServiceServer(s, &testServer{}) - t.servers = append(t.servers, s) - t.addresses = append(t.addresses, lis.Addr().String()) - - go func(s *grpc.Server, l net.Listener) { - s.Serve(l) - }(s, lis) - } - - return t, nil -} - -func TestOneBackend(t *testing.T) { - defer leakcheck.Check(t) - r, cleanup := manual.GenerateAndRegisterManualResolver() - defer cleanup() - - test, err := startTestServers(1) - if err != nil { - t.Fatalf("failed to start servers: %v", err) - } - defer test.cleanup() - - cc, err := grpc.Dial(r.Scheme()+":///test.server", grpc.WithInsecure(), grpc.WithBalancerName(roundrobin.Name)) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - testc := testpb.NewTestServiceClient(cc) - // The first RPC should fail because there's no address. - ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) - defer cancel() - if _, err := testc.EmptyCall(ctx, &testpb.Empty{}); err == nil || status.Code(err) != codes.DeadlineExceeded { - t.Fatalf("EmptyCall() = _, %v, want _, DeadlineExceeded", err) - } - - r.NewAddress([]resolver.Address{{Addr: test.addresses[0]}}) - // The second RPC should succeed. - if _, err := testc.EmptyCall(context.Background(), &testpb.Empty{}); err != nil { - t.Fatalf("EmptyCall() = _, %v, want _, ", err) - } -} - -func TestBackendsRoundRobin(t *testing.T) { - defer leakcheck.Check(t) - r, cleanup := manual.GenerateAndRegisterManualResolver() - defer cleanup() - - backendCount := 5 - test, err := startTestServers(backendCount) - if err != nil { - t.Fatalf("failed to start servers: %v", err) - } - defer test.cleanup() - - cc, err := grpc.Dial(r.Scheme()+":///test.server", grpc.WithInsecure(), grpc.WithBalancerName(roundrobin.Name)) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - testc := testpb.NewTestServiceClient(cc) - // The first RPC should fail because there's no address. - ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) - defer cancel() - if _, err := testc.EmptyCall(ctx, &testpb.Empty{}); err == nil || status.Code(err) != codes.DeadlineExceeded { - t.Fatalf("EmptyCall() = _, %v, want _, DeadlineExceeded", err) - } - - var resolvedAddrs []resolver.Address - for i := 0; i < backendCount; i++ { - resolvedAddrs = append(resolvedAddrs, resolver.Address{Addr: test.addresses[i]}) - } - - r.NewAddress(resolvedAddrs) - var p peer.Peer - // Make sure connections to all servers are up. - for si := 0; si < backendCount; si++ { - var connected bool - for i := 0; i < 1000; i++ { - if _, err := testc.EmptyCall(context.Background(), &testpb.Empty{}, grpc.Peer(&p)); err != nil { - t.Fatalf("EmptyCall() = _, %v, want _, ", err) - } - if p.Addr.String() == test.addresses[si] { - connected = true - break - } - time.Sleep(time.Millisecond) - } - if !connected { - t.Fatalf("Connection to %v was not up after more than 1 second", test.addresses[si]) - } - } - - for i := 0; i < 3*backendCount; i++ { - if _, err := testc.EmptyCall(context.Background(), &testpb.Empty{}, grpc.Peer(&p)); err != nil { - t.Fatalf("EmptyCall() = _, %v, want _, ", err) - } - if p.Addr.String() != test.addresses[i%backendCount] { - t.Fatalf("Index %d: want peer %v, got peer %v", i, test.addresses[i%backendCount], p.Addr.String()) - } - } -} - -func TestAddressesRemoved(t *testing.T) { - defer leakcheck.Check(t) - r, cleanup := manual.GenerateAndRegisterManualResolver() - defer cleanup() - - test, err := startTestServers(1) - if err != nil { - t.Fatalf("failed to start servers: %v", err) - } - defer test.cleanup() - - cc, err := grpc.Dial(r.Scheme()+":///test.server", grpc.WithInsecure(), grpc.WithBalancerName(roundrobin.Name)) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - testc := testpb.NewTestServiceClient(cc) - // The first RPC should fail because there's no address. - ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) - defer cancel() - if _, err := testc.EmptyCall(ctx, &testpb.Empty{}); err == nil || status.Code(err) != codes.DeadlineExceeded { - t.Fatalf("EmptyCall() = _, %v, want _, DeadlineExceeded", err) - } - - r.NewAddress([]resolver.Address{{Addr: test.addresses[0]}}) - // The second RPC should succeed. - if _, err := testc.EmptyCall(context.Background(), &testpb.Empty{}); err != nil { - t.Fatalf("EmptyCall() = _, %v, want _, ", err) - } - - r.NewAddress([]resolver.Address{}) - for i := 0; i < 1000; i++ { - ctx, cancel := context.WithTimeout(context.Background(), 50*time.Millisecond) - defer cancel() - if _, err := testc.EmptyCall(ctx, &testpb.Empty{}, grpc.FailFast(false)); status.Code(err) == codes.DeadlineExceeded { - return - } - time.Sleep(time.Millisecond) - } - t.Fatalf("No RPC failed after removing all addresses, want RPC to fail with DeadlineExceeded") -} - -func TestCloseWithPendingRPC(t *testing.T) { - defer leakcheck.Check(t) - r, cleanup := manual.GenerateAndRegisterManualResolver() - defer cleanup() - - test, err := startTestServers(1) - if err != nil { - t.Fatalf("failed to start servers: %v", err) - } - defer test.cleanup() - - cc, err := grpc.Dial(r.Scheme()+":///test.server", grpc.WithInsecure(), grpc.WithBalancerName(roundrobin.Name)) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - testc := testpb.NewTestServiceClient(cc) - - var wg sync.WaitGroup - for i := 0; i < 3; i++ { - wg.Add(1) - go func() { - defer wg.Done() - // This RPC blocks until cc is closed. - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) - if _, err := testc.EmptyCall(ctx, &testpb.Empty{}); status.Code(err) == codes.DeadlineExceeded { - t.Errorf("RPC failed because of deadline after cc is closed; want error the client connection is closing") - } - cancel() - }() - } - cc.Close() - wg.Wait() -} - -func TestNewAddressWhileBlocking(t *testing.T) { - defer leakcheck.Check(t) - r, cleanup := manual.GenerateAndRegisterManualResolver() - defer cleanup() - - test, err := startTestServers(1) - if err != nil { - t.Fatalf("failed to start servers: %v", err) - } - defer test.cleanup() - - cc, err := grpc.Dial(r.Scheme()+":///test.server", grpc.WithInsecure(), grpc.WithBalancerName(roundrobin.Name)) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - testc := testpb.NewTestServiceClient(cc) - // The first RPC should fail because there's no address. - ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) - defer cancel() - if _, err := testc.EmptyCall(ctx, &testpb.Empty{}); err == nil || status.Code(err) != codes.DeadlineExceeded { - t.Fatalf("EmptyCall() = _, %v, want _, DeadlineExceeded", err) - } - - r.NewAddress([]resolver.Address{{Addr: test.addresses[0]}}) - // The second RPC should succeed. - ctx, cancel = context.WithTimeout(context.Background(), 2*time.Second) - defer cancel() - if _, err := testc.EmptyCall(ctx, &testpb.Empty{}); err != nil { - t.Fatalf("EmptyCall() = _, %v, want _, nil", err) - } - - r.NewAddress([]resolver.Address{}) - - var wg sync.WaitGroup - for i := 0; i < 3; i++ { - wg.Add(1) - go func() { - defer wg.Done() - // This RPC blocks until NewAddress is called. - testc.EmptyCall(context.Background(), &testpb.Empty{}) - }() - } - time.Sleep(50 * time.Millisecond) - r.NewAddress([]resolver.Address{{Addr: test.addresses[0]}}) - wg.Wait() -} - -func TestOneServerDown(t *testing.T) { - defer leakcheck.Check(t) - r, cleanup := manual.GenerateAndRegisterManualResolver() - defer cleanup() - - backendCount := 3 - test, err := startTestServers(backendCount) - if err != nil { - t.Fatalf("failed to start servers: %v", err) - } - defer test.cleanup() - - cc, err := grpc.Dial(r.Scheme()+":///test.server", grpc.WithInsecure(), grpc.WithBalancerName(roundrobin.Name), grpc.WithWaitForHandshake()) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - testc := testpb.NewTestServiceClient(cc) - // The first RPC should fail because there's no address. - ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) - defer cancel() - if _, err := testc.EmptyCall(ctx, &testpb.Empty{}); err == nil || status.Code(err) != codes.DeadlineExceeded { - t.Fatalf("EmptyCall() = _, %v, want _, DeadlineExceeded", err) - } - - var resolvedAddrs []resolver.Address - for i := 0; i < backendCount; i++ { - resolvedAddrs = append(resolvedAddrs, resolver.Address{Addr: test.addresses[i]}) - } - - r.NewAddress(resolvedAddrs) - var p peer.Peer - // Make sure connections to all servers are up. - for si := 0; si < backendCount; si++ { - var connected bool - for i := 0; i < 1000; i++ { - if _, err := testc.EmptyCall(context.Background(), &testpb.Empty{}, grpc.Peer(&p)); err != nil { - t.Fatalf("EmptyCall() = _, %v, want _, ", err) - } - if p.Addr.String() == test.addresses[si] { - connected = true - break - } - time.Sleep(time.Millisecond) - } - if !connected { - t.Fatalf("Connection to %v was not up after more than 1 second", test.addresses[si]) - } - } - - for i := 0; i < 3*backendCount; i++ { - if _, err := testc.EmptyCall(context.Background(), &testpb.Empty{}, grpc.Peer(&p)); err != nil { - t.Fatalf("EmptyCall() = _, %v, want _, ", err) - } - if p.Addr.String() != test.addresses[i%backendCount] { - t.Fatalf("Index %d: want peer %v, got peer %v", i, test.addresses[i%backendCount], p.Addr.String()) - } - } - - // Stop one server, RPCs should roundrobin among the remaining servers. - backendCount-- - test.servers[backendCount].Stop() - // Loop until see server[backendCount-1] twice without seeing server[backendCount]. - var targetSeen int - for i := 0; i < 1000; i++ { - if _, err := testc.EmptyCall(context.Background(), &testpb.Empty{}, grpc.Peer(&p)); err != nil { - targetSeen = 0 - t.Logf("EmptyCall() = _, %v, want _, ", err) - // Due to a race, this RPC could possibly get the connection that - // was closing, and this RPC may fail. Keep trying when this - // happens. - continue - } - switch p.Addr.String() { - case test.addresses[backendCount-1]: - targetSeen++ - case test.addresses[backendCount]: - // Reset targetSeen if peer is server[backendCount]. - targetSeen = 0 - } - // Break to make sure the last picked address is server[-1], so the following for loop won't be flaky. - if targetSeen >= 2 { - break - } - } - if targetSeen != 2 { - t.Fatal("Failed to see server[backendCount-1] twice without seeing server[backendCount]") - } - for i := 0; i < 3*backendCount; i++ { - if _, err := testc.EmptyCall(context.Background(), &testpb.Empty{}, grpc.Peer(&p)); err != nil { - t.Fatalf("EmptyCall() = _, %v, want _, ", err) - } - if p.Addr.String() != test.addresses[i%backendCount] { - t.Errorf("Index %d: want peer %v, got peer %v", i, test.addresses[i%backendCount], p.Addr.String()) - } - } -} - -func TestAllServersDown(t *testing.T) { - defer leakcheck.Check(t) - r, cleanup := manual.GenerateAndRegisterManualResolver() - defer cleanup() - - backendCount := 3 - test, err := startTestServers(backendCount) - if err != nil { - t.Fatalf("failed to start servers: %v", err) - } - defer test.cleanup() - - cc, err := grpc.Dial(r.Scheme()+":///test.server", grpc.WithInsecure(), grpc.WithBalancerName(roundrobin.Name), grpc.WithWaitForHandshake()) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - testc := testpb.NewTestServiceClient(cc) - // The first RPC should fail because there's no address. - ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) - defer cancel() - if _, err := testc.EmptyCall(ctx, &testpb.Empty{}); err == nil || status.Code(err) != codes.DeadlineExceeded { - t.Fatalf("EmptyCall() = _, %v, want _, DeadlineExceeded", err) - } - - var resolvedAddrs []resolver.Address - for i := 0; i < backendCount; i++ { - resolvedAddrs = append(resolvedAddrs, resolver.Address{Addr: test.addresses[i]}) - } - - r.NewAddress(resolvedAddrs) - var p peer.Peer - // Make sure connections to all servers are up. - for si := 0; si < backendCount; si++ { - var connected bool - for i := 0; i < 1000; i++ { - if _, err := testc.EmptyCall(context.Background(), &testpb.Empty{}, grpc.Peer(&p)); err != nil { - t.Fatalf("EmptyCall() = _, %v, want _, ", err) - } - if p.Addr.String() == test.addresses[si] { - connected = true - break - } - time.Sleep(time.Millisecond) - } - if !connected { - t.Fatalf("Connection to %v was not up after more than 1 second", test.addresses[si]) - } - } - - for i := 0; i < 3*backendCount; i++ { - if _, err := testc.EmptyCall(context.Background(), &testpb.Empty{}, grpc.Peer(&p)); err != nil { - t.Fatalf("EmptyCall() = _, %v, want _, ", err) - } - if p.Addr.String() != test.addresses[i%backendCount] { - t.Fatalf("Index %d: want peer %v, got peer %v", i, test.addresses[i%backendCount], p.Addr.String()) - } - } - - // All servers are stopped, failfast RPC should fail with unavailable. - for i := 0; i < backendCount; i++ { - test.servers[i].Stop() - } - time.Sleep(100 * time.Millisecond) - for i := 0; i < 1000; i++ { - if _, err := testc.EmptyCall(context.Background(), &testpb.Empty{}); status.Code(err) == codes.Unavailable { - return - } - time.Sleep(time.Millisecond) - } - t.Fatalf("Failfast RPCs didn't fail with Unavailable after all servers are stopped") -} diff --git a/vendor/google.golang.org/grpc/balancer_switching_test.go b/vendor/google.golang.org/grpc/balancer_switching_test.go deleted file mode 100644 index 0dcd9165..00000000 --- a/vendor/google.golang.org/grpc/balancer_switching_test.go +++ /dev/null @@ -1,469 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package grpc - -import ( - "fmt" - "math" - "testing" - "time" - - "golang.org/x/net/context" - "google.golang.org/grpc/balancer" - "google.golang.org/grpc/balancer/roundrobin" - "google.golang.org/grpc/connectivity" - _ "google.golang.org/grpc/grpclog/glogger" - "google.golang.org/grpc/internal/leakcheck" - "google.golang.org/grpc/resolver" - "google.golang.org/grpc/resolver/manual" -) - -var _ balancer.Builder = &magicalLB{} -var _ balancer.Balancer = &magicalLB{} - -// magicalLB is a ringer for grpclb. It is used to avoid circular dependencies on the grpclb package -type magicalLB struct{} - -func (b *magicalLB) Name() string { - return "grpclb" -} - -func (b *magicalLB) Build(cc balancer.ClientConn, opts balancer.BuildOptions) balancer.Balancer { - return b -} - -func (b *magicalLB) HandleSubConnStateChange(balancer.SubConn, connectivity.State) {} - -func (b *magicalLB) HandleResolvedAddrs([]resolver.Address, error) {} - -func (b *magicalLB) Close() {} - -func init() { - balancer.Register(&magicalLB{}) -} - -func checkPickFirst(cc *ClientConn, servers []*server) error { - var ( - req = "port" - reply string - err error - ) - connected := false - for i := 0; i < 5000; i++ { - if err = cc.Invoke(context.Background(), "/foo/bar", &req, &reply); errorDesc(err) == servers[0].port { - if connected { - // connected is set to false if peer is not server[0]. So if - // connected is true here, this is the second time we saw - // server[0] in a row. Break because pickfirst is in effect. - break - } - connected = true - } else { - connected = false - } - time.Sleep(time.Millisecond) - } - if !connected { - return fmt.Errorf("pickfirst is not in effect after 5 second, EmptyCall() = _, %v, want _, %v", err, servers[0].port) - } - // The following RPCs should all succeed with the first server. - for i := 0; i < 3; i++ { - err = cc.Invoke(context.Background(), "/foo/bar", &req, &reply) - if errorDesc(err) != servers[0].port { - return fmt.Errorf("Index %d: want peer %v, got peer %v", i, servers[0].port, err) - } - } - return nil -} - -func checkRoundRobin(cc *ClientConn, servers []*server) error { - var ( - req = "port" - reply string - err error - ) - - // Make sure connections to all servers are up. - for i := 0; i < 2; i++ { - // Do this check twice, otherwise the first RPC's transport may still be - // picked by the closing pickfirst balancer, and the test becomes flaky. - for _, s := range servers { - var up bool - for i := 0; i < 5000; i++ { - if err = cc.Invoke(context.Background(), "/foo/bar", &req, &reply); errorDesc(err) == s.port { - up = true - break - } - time.Sleep(time.Millisecond) - } - if !up { - return fmt.Errorf("server %v is not up within 5 second", s.port) - } - } - } - - serverCount := len(servers) - for i := 0; i < 3*serverCount; i++ { - err = cc.Invoke(context.Background(), "/foo/bar", &req, &reply) - if errorDesc(err) != servers[i%serverCount].port { - return fmt.Errorf("Index %d: want peer %v, got peer %v", i, servers[i%serverCount].port, err) - } - } - return nil -} - -func TestSwitchBalancer(t *testing.T) { - defer leakcheck.Check(t) - r, rcleanup := manual.GenerateAndRegisterManualResolver() - defer rcleanup() - - numServers := 2 - servers, _, scleanup := startServers(t, numServers, math.MaxInt32) - defer scleanup() - - cc, err := Dial(r.Scheme()+":///test.server", WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - r.NewAddress([]resolver.Address{{Addr: servers[0].addr}, {Addr: servers[1].addr}}) - // The default balancer is pickfirst. - if err := checkPickFirst(cc, servers); err != nil { - t.Fatalf("check pickfirst returned non-nil error: %v", err) - } - // Switch to roundrobin. - cc.handleServiceConfig(`{"loadBalancingPolicy": "round_robin"}`) - if err := checkRoundRobin(cc, servers); err != nil { - t.Fatalf("check roundrobin returned non-nil error: %v", err) - } - // Switch to pickfirst. - cc.handleServiceConfig(`{"loadBalancingPolicy": "pick_first"}`) - if err := checkPickFirst(cc, servers); err != nil { - t.Fatalf("check pickfirst returned non-nil error: %v", err) - } -} - -// Test that balancer specified by dial option will not be overridden. -func TestBalancerDialOption(t *testing.T) { - defer leakcheck.Check(t) - r, rcleanup := manual.GenerateAndRegisterManualResolver() - defer rcleanup() - - numServers := 2 - servers, _, scleanup := startServers(t, numServers, math.MaxInt32) - defer scleanup() - - cc, err := Dial(r.Scheme()+":///test.server", WithInsecure(), WithCodec(testCodec{}), WithBalancerName(roundrobin.Name)) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - r.NewAddress([]resolver.Address{{Addr: servers[0].addr}, {Addr: servers[1].addr}}) - // The init balancer is roundrobin. - if err := checkRoundRobin(cc, servers); err != nil { - t.Fatalf("check roundrobin returned non-nil error: %v", err) - } - // Switch to pickfirst. - cc.handleServiceConfig(`{"loadBalancingPolicy": "pick_first"}`) - // Balancer is still roundrobin. - if err := checkRoundRobin(cc, servers); err != nil { - t.Fatalf("check roundrobin returned non-nil error: %v", err) - } -} - -// First addr update contains grpclb. -func TestSwitchBalancerGRPCLBFirst(t *testing.T) { - defer leakcheck.Check(t) - r, rcleanup := manual.GenerateAndRegisterManualResolver() - defer rcleanup() - - cc, err := Dial(r.Scheme()+":///test.server", WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - - // ClientConn will switch balancer to grpclb when receives an address of - // type GRPCLB. - r.NewAddress([]resolver.Address{{Addr: "backend"}, {Addr: "grpclb", Type: resolver.GRPCLB}}) - var isGRPCLB bool - for i := 0; i < 5000; i++ { - cc.mu.Lock() - isGRPCLB = cc.curBalancerName == "grpclb" - cc.mu.Unlock() - if isGRPCLB { - break - } - time.Sleep(time.Millisecond) - } - if !isGRPCLB { - t.Fatalf("after 5 second, cc.balancer is of type %v, not grpclb", cc.curBalancerName) - } - - // New update containing new backend and new grpclb. Should not switch - // balancer. - r.NewAddress([]resolver.Address{{Addr: "backend2"}, {Addr: "grpclb2", Type: resolver.GRPCLB}}) - for i := 0; i < 200; i++ { - cc.mu.Lock() - isGRPCLB = cc.curBalancerName == "grpclb" - cc.mu.Unlock() - if !isGRPCLB { - break - } - time.Sleep(time.Millisecond) - } - if !isGRPCLB { - t.Fatalf("within 200 ms, cc.balancer switched to !grpclb, want grpclb") - } - - var isPickFirst bool - // Switch balancer to pickfirst. - r.NewAddress([]resolver.Address{{Addr: "backend"}}) - for i := 0; i < 5000; i++ { - cc.mu.Lock() - isPickFirst = cc.curBalancerName == PickFirstBalancerName - cc.mu.Unlock() - if isPickFirst { - break - } - time.Sleep(time.Millisecond) - } - if !isPickFirst { - t.Fatalf("after 5 second, cc.balancer is of type %v, not pick_first", cc.curBalancerName) - } -} - -// First addr update does not contain grpclb. -func TestSwitchBalancerGRPCLBSecond(t *testing.T) { - defer leakcheck.Check(t) - r, rcleanup := manual.GenerateAndRegisterManualResolver() - defer rcleanup() - - cc, err := Dial(r.Scheme()+":///test.server", WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - - r.NewAddress([]resolver.Address{{Addr: "backend"}}) - var isPickFirst bool - for i := 0; i < 5000; i++ { - cc.mu.Lock() - isPickFirst = cc.curBalancerName == PickFirstBalancerName - cc.mu.Unlock() - if isPickFirst { - break - } - time.Sleep(time.Millisecond) - } - if !isPickFirst { - t.Fatalf("after 5 second, cc.balancer is of type %v, not pick_first", cc.curBalancerName) - } - - // ClientConn will switch balancer to grpclb when receives an address of - // type GRPCLB. - r.NewAddress([]resolver.Address{{Addr: "backend"}, {Addr: "grpclb", Type: resolver.GRPCLB}}) - var isGRPCLB bool - for i := 0; i < 5000; i++ { - cc.mu.Lock() - isGRPCLB = cc.curBalancerName == "grpclb" - cc.mu.Unlock() - if isGRPCLB { - break - } - time.Sleep(time.Millisecond) - } - if !isGRPCLB { - t.Fatalf("after 5 second, cc.balancer is of type %v, not grpclb", cc.curBalancerName) - } - - // New update containing new backend and new grpclb. Should not switch - // balancer. - r.NewAddress([]resolver.Address{{Addr: "backend2"}, {Addr: "grpclb2", Type: resolver.GRPCLB}}) - for i := 0; i < 200; i++ { - cc.mu.Lock() - isGRPCLB = cc.curBalancerName == "grpclb" - cc.mu.Unlock() - if !isGRPCLB { - break - } - time.Sleep(time.Millisecond) - } - if !isGRPCLB { - t.Fatalf("within 200 ms, cc.balancer switched to !grpclb, want grpclb") - } - - // Switch balancer back. - r.NewAddress([]resolver.Address{{Addr: "backend"}}) - for i := 0; i < 5000; i++ { - cc.mu.Lock() - isPickFirst = cc.curBalancerName == PickFirstBalancerName - cc.mu.Unlock() - if isPickFirst { - break - } - time.Sleep(time.Millisecond) - } - if !isPickFirst { - t.Fatalf("after 5 second, cc.balancer is of type %v, not pick_first", cc.curBalancerName) - } -} - -// Test that if the current balancer is roundrobin, after switching to grpclb, -// when the resolved address doesn't contain grpclb addresses, balancer will be -// switched back to roundrobin. -func TestSwitchBalancerGRPCLBRoundRobin(t *testing.T) { - defer leakcheck.Check(t) - r, rcleanup := manual.GenerateAndRegisterManualResolver() - defer rcleanup() - - cc, err := Dial(r.Scheme()+":///test.server", WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - - r.NewServiceConfig(`{"loadBalancingPolicy": "round_robin"}`) - - r.NewAddress([]resolver.Address{{Addr: "backend"}}) - var isRoundRobin bool - for i := 0; i < 5000; i++ { - cc.mu.Lock() - isRoundRobin = cc.curBalancerName == "round_robin" - cc.mu.Unlock() - if isRoundRobin { - break - } - time.Sleep(time.Millisecond) - } - if !isRoundRobin { - t.Fatalf("after 5 second, cc.balancer is of type %v, not round_robin", cc.curBalancerName) - } - - // ClientConn will switch balancer to grpclb when receives an address of - // type GRPCLB. - r.NewAddress([]resolver.Address{{Addr: "grpclb", Type: resolver.GRPCLB}}) - var isGRPCLB bool - for i := 0; i < 5000; i++ { - cc.mu.Lock() - isGRPCLB = cc.curBalancerName == "grpclb" - cc.mu.Unlock() - if isGRPCLB { - break - } - time.Sleep(time.Millisecond) - } - if !isGRPCLB { - t.Fatalf("after 5 second, cc.balancer is of type %v, not grpclb", cc.curBalancerName) - } - - // Switch balancer back. - r.NewAddress([]resolver.Address{{Addr: "backend"}}) - for i := 0; i < 5000; i++ { - cc.mu.Lock() - isRoundRobin = cc.curBalancerName == "round_robin" - cc.mu.Unlock() - if isRoundRobin { - break - } - time.Sleep(time.Millisecond) - } - if !isRoundRobin { - t.Fatalf("after 5 second, cc.balancer is of type %v, not round_robin", cc.curBalancerName) - } -} - -// Test that if resolved address list contains grpclb, the balancer option in -// service config won't take effect. But when there's no grpclb address in a new -// resolved address list, balancer will be switched to the new one. -func TestSwitchBalancerGRPCLBServiceConfig(t *testing.T) { - defer leakcheck.Check(t) - r, rcleanup := manual.GenerateAndRegisterManualResolver() - defer rcleanup() - - cc, err := Dial(r.Scheme()+":///test.server", WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - - r.NewAddress([]resolver.Address{{Addr: "backend"}}) - var isPickFirst bool - for i := 0; i < 5000; i++ { - cc.mu.Lock() - isPickFirst = cc.curBalancerName == PickFirstBalancerName - cc.mu.Unlock() - if isPickFirst { - break - } - time.Sleep(time.Millisecond) - } - if !isPickFirst { - t.Fatalf("after 5 second, cc.balancer is of type %v, not pick_first", cc.curBalancerName) - } - - // ClientConn will switch balancer to grpclb when receives an address of - // type GRPCLB. - r.NewAddress([]resolver.Address{{Addr: "grpclb", Type: resolver.GRPCLB}}) - var isGRPCLB bool - for i := 0; i < 5000; i++ { - cc.mu.Lock() - isGRPCLB = cc.curBalancerName == "grpclb" - cc.mu.Unlock() - if isGRPCLB { - break - } - time.Sleep(time.Millisecond) - } - if !isGRPCLB { - t.Fatalf("after 5 second, cc.balancer is of type %v, not grpclb", cc.curBalancerName) - } - - r.NewServiceConfig(`{"loadBalancingPolicy": "round_robin"}`) - var isRoundRobin bool - for i := 0; i < 200; i++ { - cc.mu.Lock() - isRoundRobin = cc.curBalancerName == "round_robin" - cc.mu.Unlock() - if isRoundRobin { - break - } - time.Sleep(time.Millisecond) - } - // Balancer should NOT switch to round_robin because resolved list contains - // grpclb. - if isRoundRobin { - t.Fatalf("within 200 ms, cc.balancer switched to round_robin, want grpclb") - } - - // Switch balancer back. - r.NewAddress([]resolver.Address{{Addr: "backend"}}) - for i := 0; i < 5000; i++ { - cc.mu.Lock() - isRoundRobin = cc.curBalancerName == "round_robin" - cc.mu.Unlock() - if isRoundRobin { - break - } - time.Sleep(time.Millisecond) - } - if !isRoundRobin { - t.Fatalf("after 5 second, cc.balancer is of type %v, not round_robin", cc.curBalancerName) - } -} diff --git a/vendor/google.golang.org/grpc/balancer_test.go b/vendor/google.golang.org/grpc/balancer_test.go deleted file mode 100644 index 8675e7d5..00000000 --- a/vendor/google.golang.org/grpc/balancer_test.go +++ /dev/null @@ -1,804 +0,0 @@ -/* - * - * Copyright 2016 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package grpc - -import ( - "fmt" - "math" - "strconv" - "sync" - "testing" - "time" - - "golang.org/x/net/context" - "google.golang.org/grpc/codes" - _ "google.golang.org/grpc/grpclog/glogger" - "google.golang.org/grpc/internal/leakcheck" - "google.golang.org/grpc/naming" - "google.golang.org/grpc/status" - - // V1 balancer tests use passthrough resolver instead of dns. - // TODO(bar) remove this when removing v1 balaner entirely. - - _ "google.golang.org/grpc/resolver/passthrough" -) - -type testWatcher struct { - // the channel to receives name resolution updates - update chan *naming.Update - // the side channel to get to know how many updates in a batch - side chan int - // the channel to notify update injector that the update reading is done - readDone chan int -} - -func (w *testWatcher) Next() (updates []*naming.Update, err error) { - n := <-w.side - if n == 0 { - return nil, fmt.Errorf("w.side is closed") - } - for i := 0; i < n; i++ { - u := <-w.update - if u != nil { - updates = append(updates, u) - } - } - w.readDone <- 0 - return -} - -func (w *testWatcher) Close() { - close(w.side) -} - -// Inject naming resolution updates to the testWatcher. -func (w *testWatcher) inject(updates []*naming.Update) { - w.side <- len(updates) - for _, u := range updates { - w.update <- u - } - <-w.readDone -} - -type testNameResolver struct { - w *testWatcher - addr string -} - -func (r *testNameResolver) Resolve(target string) (naming.Watcher, error) { - r.w = &testWatcher{ - update: make(chan *naming.Update, 1), - side: make(chan int, 1), - readDone: make(chan int), - } - r.w.side <- 1 - r.w.update <- &naming.Update{ - Op: naming.Add, - Addr: r.addr, - } - go func() { - <-r.w.readDone - }() - return r.w, nil -} - -func startServers(t *testing.T, numServers int, maxStreams uint32) ([]*server, *testNameResolver, func()) { - var servers []*server - for i := 0; i < numServers; i++ { - s := newTestServer() - servers = append(servers, s) - go s.start(t, 0, maxStreams) - s.wait(t, 2*time.Second) - } - // Point to server[0] - addr := "localhost:" + servers[0].port - return servers, &testNameResolver{ - addr: addr, - }, func() { - for i := 0; i < numServers; i++ { - servers[i].stop() - } - } -} - -func TestNameDiscovery(t *testing.T) { - defer leakcheck.Check(t) - // Start 2 servers on 2 ports. - numServers := 2 - servers, r, cleanup := startServers(t, numServers, math.MaxUint32) - defer cleanup() - cc, err := Dial("passthrough:///foo.bar.com", WithBalancer(RoundRobin(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("Failed to create ClientConn: %v", err) - } - defer cc.Close() - req := "port" - var reply string - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err == nil || errorDesc(err) != servers[0].port { - t.Fatalf("grpc.Invoke(_, _, _, _, _) = %v, want %s", err, servers[0].port) - } - // Inject the name resolution change to remove servers[0] and add servers[1]. - var updates []*naming.Update - updates = append(updates, &naming.Update{ - Op: naming.Delete, - Addr: "localhost:" + servers[0].port, - }) - updates = append(updates, &naming.Update{ - Op: naming.Add, - Addr: "localhost:" + servers[1].port, - }) - r.w.inject(updates) - // Loop until the rpcs in flight talks to servers[1]. - for { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err != nil && errorDesc(err) == servers[1].port { - break - } - time.Sleep(10 * time.Millisecond) - } -} - -func TestEmptyAddrs(t *testing.T) { - defer leakcheck.Check(t) - servers, r, cleanup := startServers(t, 1, math.MaxUint32) - defer cleanup() - cc, err := Dial("passthrough:///foo.bar.com", WithBalancer(RoundRobin(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("Failed to create ClientConn: %v", err) - } - defer cc.Close() - var reply string - if err := cc.Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply); err != nil || reply != expectedResponse { - t.Fatalf("grpc.Invoke(_, _, _, _, _) = %v, reply = %q, want %q, ", err, reply, expectedResponse) - } - // Inject name resolution change to remove the server so that there is no address - // available after that. - u := &naming.Update{ - Op: naming.Delete, - Addr: "localhost:" + servers[0].port, - } - r.w.inject([]*naming.Update{u}) - // Loop until the above updates apply. - for { - time.Sleep(10 * time.Millisecond) - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) - if err := cc.Invoke(ctx, "/foo/bar", &expectedRequest, &reply); err != nil { - cancel() - break - } - cancel() - } -} - -func TestRoundRobin(t *testing.T) { - defer leakcheck.Check(t) - // Start 3 servers on 3 ports. - numServers := 3 - servers, r, cleanup := startServers(t, numServers, math.MaxUint32) - defer cleanup() - cc, err := Dial("passthrough:///foo.bar.com", WithBalancer(RoundRobin(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("Failed to create ClientConn: %v", err) - } - defer cc.Close() - // Add servers[1] to the service discovery. - u := &naming.Update{ - Op: naming.Add, - Addr: "localhost:" + servers[1].port, - } - r.w.inject([]*naming.Update{u}) - req := "port" - var reply string - // Loop until servers[1] is up - for { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err != nil && errorDesc(err) == servers[1].port { - break - } - time.Sleep(10 * time.Millisecond) - } - // Add server2[2] to the service discovery. - u = &naming.Update{ - Op: naming.Add, - Addr: "localhost:" + servers[2].port, - } - r.w.inject([]*naming.Update{u}) - // Loop until both servers[2] are up. - for { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err != nil && errorDesc(err) == servers[2].port { - break - } - time.Sleep(10 * time.Millisecond) - } - // Check the incoming RPCs served in a round-robin manner. - for i := 0; i < 10; i++ { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err == nil || errorDesc(err) != servers[i%numServers].port { - t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", i, err, servers[i%numServers].port) - } - } -} - -func TestCloseWithPendingRPC(t *testing.T) { - defer leakcheck.Check(t) - servers, r, cleanup := startServers(t, 1, math.MaxUint32) - defer cleanup() - cc, err := Dial("passthrough:///foo.bar.com", WithBalancer(RoundRobin(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("Failed to create ClientConn: %v", err) - } - defer cc.Close() - var reply string - if err := cc.Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, FailFast(false)); err != nil { - t.Fatalf("grpc.Invoke(_, _, _, _, _) = %v, want %s", err, servers[0].port) - } - // Remove the server. - updates := []*naming.Update{{ - Op: naming.Delete, - Addr: "localhost:" + servers[0].port, - }} - r.w.inject(updates) - // Loop until the above update applies. - for { - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) - if err := cc.Invoke(ctx, "/foo/bar", &expectedRequest, &reply, FailFast(false)); status.Code(err) == codes.DeadlineExceeded { - cancel() - break - } - time.Sleep(10 * time.Millisecond) - cancel() - } - // Issue 2 RPCs which should be completed with error status once cc is closed. - var wg sync.WaitGroup - wg.Add(2) - go func() { - defer wg.Done() - var reply string - if err := cc.Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, FailFast(false)); err == nil { - t.Errorf("grpc.Invoke(_, _, _, _, _) = %v, want not nil", err) - } - }() - go func() { - defer wg.Done() - var reply string - time.Sleep(5 * time.Millisecond) - if err := cc.Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, FailFast(false)); err == nil { - t.Errorf("grpc.Invoke(_, _, _, _, _) = %v, want not nil", err) - } - }() - time.Sleep(5 * time.Millisecond) - cc.Close() - wg.Wait() -} - -func TestGetOnWaitChannel(t *testing.T) { - defer leakcheck.Check(t) - servers, r, cleanup := startServers(t, 1, math.MaxUint32) - defer cleanup() - cc, err := Dial("passthrough:///foo.bar.com", WithBalancer(RoundRobin(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("Failed to create ClientConn: %v", err) - } - defer cc.Close() - // Remove all servers so that all upcoming RPCs will block on waitCh. - updates := []*naming.Update{{ - Op: naming.Delete, - Addr: "localhost:" + servers[0].port, - }} - r.w.inject(updates) - for { - var reply string - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) - if err := cc.Invoke(ctx, "/foo/bar", &expectedRequest, &reply, FailFast(false)); status.Code(err) == codes.DeadlineExceeded { - cancel() - break - } - cancel() - time.Sleep(10 * time.Millisecond) - } - var wg sync.WaitGroup - wg.Add(1) - go func() { - defer wg.Done() - var reply string - if err := cc.Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, FailFast(false)); err != nil { - t.Errorf("grpc.Invoke(_, _, _, _, _) = %v, want ", err) - } - }() - // Add a connected server to get the above RPC through. - updates = []*naming.Update{{ - Op: naming.Add, - Addr: "localhost:" + servers[0].port, - }} - r.w.inject(updates) - // Wait until the above RPC succeeds. - wg.Wait() -} - -func TestOneServerDown(t *testing.T) { - defer leakcheck.Check(t) - // Start 2 servers. - numServers := 2 - servers, r, cleanup := startServers(t, numServers, math.MaxUint32) - defer cleanup() - cc, err := Dial("passthrough:///foo.bar.com", WithBalancer(RoundRobin(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{}), WithWaitForHandshake()) - if err != nil { - t.Fatalf("Failed to create ClientConn: %v", err) - } - defer cc.Close() - // Add servers[1] to the service discovery. - var updates []*naming.Update - updates = append(updates, &naming.Update{ - Op: naming.Add, - Addr: "localhost:" + servers[1].port, - }) - r.w.inject(updates) - req := "port" - var reply string - // Loop until servers[1] is up - for { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err != nil && errorDesc(err) == servers[1].port { - break - } - time.Sleep(10 * time.Millisecond) - } - - var wg sync.WaitGroup - numRPC := 100 - sleepDuration := 10 * time.Millisecond - wg.Add(1) - go func() { - time.Sleep(sleepDuration) - // After sleepDuration, kill server[0]. - servers[0].stop() - wg.Done() - }() - - // All non-failfast RPCs should not block because there's at least one connection available. - for i := 0; i < numRPC; i++ { - wg.Add(1) - go func() { - time.Sleep(sleepDuration) - // After sleepDuration, invoke RPC. - // server[0] is killed around the same time to make it racy between balancer and gRPC internals. - cc.Invoke(context.Background(), "/foo/bar", &req, &reply, FailFast(false)) - wg.Done() - }() - } - wg.Wait() -} - -func TestOneAddressRemoval(t *testing.T) { - defer leakcheck.Check(t) - // Start 2 servers. - numServers := 2 - servers, r, cleanup := startServers(t, numServers, math.MaxUint32) - defer cleanup() - cc, err := Dial("passthrough:///foo.bar.com", WithBalancer(RoundRobin(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("Failed to create ClientConn: %v", err) - } - defer cc.Close() - // Add servers[1] to the service discovery. - var updates []*naming.Update - updates = append(updates, &naming.Update{ - Op: naming.Add, - Addr: "localhost:" + servers[1].port, - }) - r.w.inject(updates) - req := "port" - var reply string - // Loop until servers[1] is up - for { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err != nil && errorDesc(err) == servers[1].port { - break - } - time.Sleep(10 * time.Millisecond) - } - - var wg sync.WaitGroup - numRPC := 100 - sleepDuration := 10 * time.Millisecond - wg.Add(1) - go func() { - time.Sleep(sleepDuration) - // After sleepDuration, delete server[0]. - var updates []*naming.Update - updates = append(updates, &naming.Update{ - Op: naming.Delete, - Addr: "localhost:" + servers[0].port, - }) - r.w.inject(updates) - wg.Done() - }() - - // All non-failfast RPCs should not fail because there's at least one connection available. - for i := 0; i < numRPC; i++ { - wg.Add(1) - go func() { - var reply string - time.Sleep(sleepDuration) - // After sleepDuration, invoke RPC. - // server[0] is removed around the same time to make it racy between balancer and gRPC internals. - if err := cc.Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, FailFast(false)); err != nil { - t.Errorf("grpc.Invoke(_, _, _, _, _) = %v, want nil", err) - } - wg.Done() - }() - } - wg.Wait() -} - -func checkServerUp(t *testing.T, currentServer *server) { - req := "port" - port := currentServer.port - cc, err := Dial("passthrough:///localhost:"+port, WithBlock(), WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("Failed to create ClientConn: %v", err) - } - defer cc.Close() - var reply string - for { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err != nil && errorDesc(err) == port { - break - } - time.Sleep(10 * time.Millisecond) - } -} - -func TestPickFirstEmptyAddrs(t *testing.T) { - defer leakcheck.Check(t) - servers, r, cleanup := startServers(t, 1, math.MaxUint32) - defer cleanup() - cc, err := Dial("passthrough:///foo.bar.com", WithBalancer(pickFirstBalancerV1(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("Failed to create ClientConn: %v", err) - } - defer cc.Close() - var reply string - if err := cc.Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply); err != nil || reply != expectedResponse { - t.Fatalf("grpc.Invoke(_, _, _, _, _) = %v, reply = %q, want %q, ", err, reply, expectedResponse) - } - // Inject name resolution change to remove the server so that there is no address - // available after that. - u := &naming.Update{ - Op: naming.Delete, - Addr: "localhost:" + servers[0].port, - } - r.w.inject([]*naming.Update{u}) - // Loop until the above updates apply. - for { - time.Sleep(10 * time.Millisecond) - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) - if err := cc.Invoke(ctx, "/foo/bar", &expectedRequest, &reply); err != nil { - cancel() - break - } - cancel() - } -} - -func TestPickFirstCloseWithPendingRPC(t *testing.T) { - defer leakcheck.Check(t) - servers, r, cleanup := startServers(t, 1, math.MaxUint32) - defer cleanup() - cc, err := Dial("passthrough:///foo.bar.com", WithBalancer(pickFirstBalancerV1(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("Failed to create ClientConn: %v", err) - } - defer cc.Close() - var reply string - if err := cc.Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, FailFast(false)); err != nil { - t.Fatalf("grpc.Invoke(_, _, _, _, _) = %v, want %s", err, servers[0].port) - } - // Remove the server. - updates := []*naming.Update{{ - Op: naming.Delete, - Addr: "localhost:" + servers[0].port, - }} - r.w.inject(updates) - // Loop until the above update applies. - for { - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) - if err := cc.Invoke(ctx, "/foo/bar", &expectedRequest, &reply, FailFast(false)); status.Code(err) == codes.DeadlineExceeded { - cancel() - break - } - time.Sleep(10 * time.Millisecond) - cancel() - } - // Issue 2 RPCs which should be completed with error status once cc is closed. - var wg sync.WaitGroup - wg.Add(2) - go func() { - defer wg.Done() - var reply string - if err := cc.Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, FailFast(false)); err == nil { - t.Errorf("grpc.Invoke(_, _, _, _, _) = %v, want not nil", err) - } - }() - go func() { - defer wg.Done() - var reply string - time.Sleep(5 * time.Millisecond) - if err := cc.Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, FailFast(false)); err == nil { - t.Errorf("grpc.Invoke(_, _, _, _, _) = %v, want not nil", err) - } - }() - time.Sleep(5 * time.Millisecond) - cc.Close() - wg.Wait() -} - -func TestPickFirstOrderAllServerUp(t *testing.T) { - defer leakcheck.Check(t) - // Start 3 servers on 3 ports. - numServers := 3 - servers, r, cleanup := startServers(t, numServers, math.MaxUint32) - defer cleanup() - cc, err := Dial("passthrough:///foo.bar.com", WithBalancer(pickFirstBalancerV1(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("Failed to create ClientConn: %v", err) - } - defer cc.Close() - // Add servers[1] and [2] to the service discovery. - u := &naming.Update{ - Op: naming.Add, - Addr: "localhost:" + servers[1].port, - } - r.w.inject([]*naming.Update{u}) - - u = &naming.Update{ - Op: naming.Add, - Addr: "localhost:" + servers[2].port, - } - r.w.inject([]*naming.Update{u}) - - // Loop until all 3 servers are up - checkServerUp(t, servers[0]) - checkServerUp(t, servers[1]) - checkServerUp(t, servers[2]) - - // Check the incoming RPCs served in server[0] - req := "port" - var reply string - for i := 0; i < 20; i++ { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err == nil || errorDesc(err) != servers[0].port { - t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 0, err, servers[0].port) - } - time.Sleep(10 * time.Millisecond) - } - - // Delete server[0] in the balancer, the incoming RPCs served in server[1] - // For test addrconn, close server[0] instead - u = &naming.Update{ - Op: naming.Delete, - Addr: "localhost:" + servers[0].port, - } - r.w.inject([]*naming.Update{u}) - // Loop until it changes to server[1] - for { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err != nil && errorDesc(err) == servers[1].port { - break - } - time.Sleep(10 * time.Millisecond) - } - for i := 0; i < 20; i++ { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err == nil || errorDesc(err) != servers[1].port { - t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 1, err, servers[1].port) - } - time.Sleep(10 * time.Millisecond) - } - - // Add server[0] back to the balancer, the incoming RPCs served in server[1] - // Add is append operation, the order of Notify now is {server[1].port server[2].port server[0].port} - u = &naming.Update{ - Op: naming.Add, - Addr: "localhost:" + servers[0].port, - } - r.w.inject([]*naming.Update{u}) - for i := 0; i < 20; i++ { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err == nil || errorDesc(err) != servers[1].port { - t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 1, err, servers[1].port) - } - time.Sleep(10 * time.Millisecond) - } - - // Delete server[1] in the balancer, the incoming RPCs served in server[2] - u = &naming.Update{ - Op: naming.Delete, - Addr: "localhost:" + servers[1].port, - } - r.w.inject([]*naming.Update{u}) - for { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err != nil && errorDesc(err) == servers[2].port { - break - } - time.Sleep(1 * time.Second) - } - for i := 0; i < 20; i++ { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err == nil || errorDesc(err) != servers[2].port { - t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 2, err, servers[2].port) - } - time.Sleep(10 * time.Millisecond) - } - - // Delete server[2] in the balancer, the incoming RPCs served in server[0] - u = &naming.Update{ - Op: naming.Delete, - Addr: "localhost:" + servers[2].port, - } - r.w.inject([]*naming.Update{u}) - for { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err != nil && errorDesc(err) == servers[0].port { - break - } - time.Sleep(1 * time.Second) - } - for i := 0; i < 20; i++ { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err == nil || errorDesc(err) != servers[0].port { - t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 0, err, servers[0].port) - } - time.Sleep(10 * time.Millisecond) - } -} - -func TestPickFirstOrderOneServerDown(t *testing.T) { - defer leakcheck.Check(t) - // Start 3 servers on 3 ports. - numServers := 3 - servers, r, cleanup := startServers(t, numServers, math.MaxUint32) - defer cleanup() - cc, err := Dial("passthrough:///foo.bar.com", WithBalancer(pickFirstBalancerV1(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{}), WithWaitForHandshake()) - if err != nil { - t.Fatalf("Failed to create ClientConn: %v", err) - } - defer cc.Close() - // Add servers[1] and [2] to the service discovery. - u := &naming.Update{ - Op: naming.Add, - Addr: "localhost:" + servers[1].port, - } - r.w.inject([]*naming.Update{u}) - - u = &naming.Update{ - Op: naming.Add, - Addr: "localhost:" + servers[2].port, - } - r.w.inject([]*naming.Update{u}) - - // Loop until all 3 servers are up - checkServerUp(t, servers[0]) - checkServerUp(t, servers[1]) - checkServerUp(t, servers[2]) - - // Check the incoming RPCs served in server[0] - req := "port" - var reply string - for i := 0; i < 20; i++ { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err == nil || errorDesc(err) != servers[0].port { - t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 0, err, servers[0].port) - } - time.Sleep(10 * time.Millisecond) - } - - // server[0] down, incoming RPCs served in server[1], but the order of Notify still remains - // {server[0] server[1] server[2]} - servers[0].stop() - // Loop until it changes to server[1] - for { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err != nil && errorDesc(err) == servers[1].port { - break - } - time.Sleep(10 * time.Millisecond) - } - for i := 0; i < 20; i++ { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err == nil || errorDesc(err) != servers[1].port { - t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 1, err, servers[1].port) - } - time.Sleep(10 * time.Millisecond) - } - - // up the server[0] back, the incoming RPCs served in server[1] - p, _ := strconv.Atoi(servers[0].port) - servers[0] = newTestServer() - go servers[0].start(t, p, math.MaxUint32) - defer servers[0].stop() - servers[0].wait(t, 2*time.Second) - checkServerUp(t, servers[0]) - - for i := 0; i < 20; i++ { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err == nil || errorDesc(err) != servers[1].port { - t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 1, err, servers[1].port) - } - time.Sleep(10 * time.Millisecond) - } - - // Delete server[1] in the balancer, the incoming RPCs served in server[0] - u = &naming.Update{ - Op: naming.Delete, - Addr: "localhost:" + servers[1].port, - } - r.w.inject([]*naming.Update{u}) - for { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err != nil && errorDesc(err) == servers[0].port { - break - } - time.Sleep(1 * time.Second) - } - for i := 0; i < 20; i++ { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err == nil || errorDesc(err) != servers[0].port { - t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 0, err, servers[0].port) - } - time.Sleep(10 * time.Millisecond) - } -} - -func TestPickFirstOneAddressRemoval(t *testing.T) { - defer leakcheck.Check(t) - // Start 2 servers. - numServers := 2 - servers, r, cleanup := startServers(t, numServers, math.MaxUint32) - defer cleanup() - cc, err := Dial("passthrough:///localhost:"+servers[0].port, WithBalancer(pickFirstBalancerV1(r)), WithBlock(), WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("Failed to create ClientConn: %v", err) - } - defer cc.Close() - // Add servers[1] to the service discovery. - var updates []*naming.Update - updates = append(updates, &naming.Update{ - Op: naming.Add, - Addr: "localhost:" + servers[1].port, - }) - r.w.inject(updates) - - // Create a new cc to Loop until servers[1] is up - checkServerUp(t, servers[0]) - checkServerUp(t, servers[1]) - - var wg sync.WaitGroup - numRPC := 100 - sleepDuration := 10 * time.Millisecond - wg.Add(1) - go func() { - time.Sleep(sleepDuration) - // After sleepDuration, delete server[0]. - var updates []*naming.Update - updates = append(updates, &naming.Update{ - Op: naming.Delete, - Addr: "localhost:" + servers[0].port, - }) - r.w.inject(updates) - wg.Done() - }() - - // All non-failfast RPCs should not fail because there's at least one connection available. - for i := 0; i < numRPC; i++ { - wg.Add(1) - go func() { - var reply string - time.Sleep(sleepDuration) - // After sleepDuration, invoke RPC. - // server[0] is removed around the same time to make it racy between balancer and gRPC internals. - if err := cc.Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply, FailFast(false)); err != nil { - t.Errorf("grpc.Invoke(_, _, _, _, _) = %v, want nil", err) - } - wg.Done() - }() - } - wg.Wait() -} diff --git a/vendor/google.golang.org/grpc/call_test.go b/vendor/google.golang.org/grpc/call_test.go deleted file mode 100644 index df936400..00000000 --- a/vendor/google.golang.org/grpc/call_test.go +++ /dev/null @@ -1,293 +0,0 @@ -/* - * - * Copyright 2014 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package grpc - -import ( - "fmt" - "io" - "math" - "net" - "strconv" - "strings" - "sync" - "testing" - "time" - - "golang.org/x/net/context" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/internal/leakcheck" - "google.golang.org/grpc/internal/transport" - "google.golang.org/grpc/status" -) - -var ( - expectedRequest = "ping" - expectedResponse = "pong" - weirdError = "format verbs: %v%s" - sizeLargeErr = 1024 * 1024 - canceled = 0 -) - -type testCodec struct { -} - -func (testCodec) Marshal(v interface{}) ([]byte, error) { - return []byte(*(v.(*string))), nil -} - -func (testCodec) Unmarshal(data []byte, v interface{}) error { - *(v.(*string)) = string(data) - return nil -} - -func (testCodec) String() string { - return "test" -} - -type testStreamHandler struct { - port string - t transport.ServerTransport -} - -func (h *testStreamHandler) handleStream(t *testing.T, s *transport.Stream) { - p := &parser{r: s} - for { - pf, req, err := p.recvMsg(math.MaxInt32) - if err == io.EOF { - break - } - if err != nil { - return - } - if pf != compressionNone { - t.Errorf("Received the mistaken message format %d, want %d", pf, compressionNone) - return - } - var v string - codec := testCodec{} - if err := codec.Unmarshal(req, &v); err != nil { - t.Errorf("Failed to unmarshal the received message: %v", err) - return - } - if v == "weird error" { - h.t.WriteStatus(s, status.New(codes.Internal, weirdError)) - return - } - if v == "canceled" { - canceled++ - h.t.WriteStatus(s, status.New(codes.Internal, "")) - return - } - if v == "port" { - h.t.WriteStatus(s, status.New(codes.Internal, h.port)) - return - } - - if v != expectedRequest { - h.t.WriteStatus(s, status.New(codes.Internal, strings.Repeat("A", sizeLargeErr))) - return - } - } - // send a response back to end the stream. - data, err := encode(testCodec{}, &expectedResponse) - if err != nil { - t.Errorf("Failed to encode the response: %v", err) - return - } - hdr, payload := msgHeader(data, nil) - h.t.Write(s, hdr, payload, &transport.Options{}) - h.t.WriteStatus(s, status.New(codes.OK, "")) -} - -type server struct { - lis net.Listener - port string - addr string - startedErr chan error // sent nil or an error after server starts - mu sync.Mutex - conns map[transport.ServerTransport]bool -} - -func newTestServer() *server { - return &server{startedErr: make(chan error, 1)} -} - -// start starts server. Other goroutines should block on s.startedErr for further operations. -func (s *server) start(t *testing.T, port int, maxStreams uint32) { - var err error - if port == 0 { - s.lis, err = net.Listen("tcp", "localhost:0") - } else { - s.lis, err = net.Listen("tcp", "localhost:"+strconv.Itoa(port)) - } - if err != nil { - s.startedErr <- fmt.Errorf("failed to listen: %v", err) - return - } - s.addr = s.lis.Addr().String() - _, p, err := net.SplitHostPort(s.addr) - if err != nil { - s.startedErr <- fmt.Errorf("failed to parse listener address: %v", err) - return - } - s.port = p - s.conns = make(map[transport.ServerTransport]bool) - s.startedErr <- nil - for { - conn, err := s.lis.Accept() - if err != nil { - return - } - config := &transport.ServerConfig{ - MaxStreams: maxStreams, - } - st, err := transport.NewServerTransport("http2", conn, config) - if err != nil { - continue - } - s.mu.Lock() - if s.conns == nil { - s.mu.Unlock() - st.Close() - return - } - s.conns[st] = true - s.mu.Unlock() - h := &testStreamHandler{ - port: s.port, - t: st, - } - go st.HandleStreams(func(s *transport.Stream) { - go h.handleStream(t, s) - }, func(ctx context.Context, method string) context.Context { - return ctx - }) - } -} - -func (s *server) wait(t *testing.T, timeout time.Duration) { - select { - case err := <-s.startedErr: - if err != nil { - t.Fatal(err) - } - case <-time.After(timeout): - t.Fatalf("Timed out after %v waiting for server to be ready", timeout) - } -} - -func (s *server) stop() { - s.lis.Close() - s.mu.Lock() - for c := range s.conns { - c.Close() - } - s.conns = nil - s.mu.Unlock() -} - -func setUp(t *testing.T, port int, maxStreams uint32) (*server, *ClientConn) { - server := newTestServer() - go server.start(t, port, maxStreams) - server.wait(t, 2*time.Second) - addr := "localhost:" + server.port - cc, err := Dial(addr, WithBlock(), WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("Failed to create ClientConn: %v", err) - } - return server, cc -} - -func TestInvoke(t *testing.T) { - defer leakcheck.Check(t) - server, cc := setUp(t, 0, math.MaxUint32) - var reply string - if err := cc.Invoke(context.Background(), "/foo/bar", &expectedRequest, &reply); err != nil || reply != expectedResponse { - t.Fatalf("grpc.Invoke(_, _, _, _, _) = %v, want ", err) - } - cc.Close() - server.stop() -} - -func TestInvokeLargeErr(t *testing.T) { - defer leakcheck.Check(t) - server, cc := setUp(t, 0, math.MaxUint32) - var reply string - req := "hello" - err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply) - if _, ok := status.FromError(err); !ok { - t.Fatalf("grpc.Invoke(_, _, _, _, _) receives non rpc error.") - } - if status.Code(err) != codes.Internal || len(errorDesc(err)) != sizeLargeErr { - t.Fatalf("grpc.Invoke(_, _, _, _, _) = %v, want an error of code %d and desc size %d", err, codes.Internal, sizeLargeErr) - } - cc.Close() - server.stop() -} - -// TestInvokeErrorSpecialChars checks that error messages don't get mangled. -func TestInvokeErrorSpecialChars(t *testing.T) { - defer leakcheck.Check(t) - server, cc := setUp(t, 0, math.MaxUint32) - var reply string - req := "weird error" - err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply) - if _, ok := status.FromError(err); !ok { - t.Fatalf("grpc.Invoke(_, _, _, _, _) receives non rpc error.") - } - if got, want := errorDesc(err), weirdError; got != want { - t.Fatalf("grpc.Invoke(_, _, _, _, _) error = %q, want %q", got, want) - } - cc.Close() - server.stop() -} - -// TestInvokeCancel checks that an Invoke with a canceled context is not sent. -func TestInvokeCancel(t *testing.T) { - defer leakcheck.Check(t) - server, cc := setUp(t, 0, math.MaxUint32) - var reply string - req := "canceled" - for i := 0; i < 100; i++ { - ctx, cancel := context.WithCancel(context.Background()) - cancel() - cc.Invoke(ctx, "/foo/bar", &req, &reply) - } - if canceled != 0 { - t.Fatalf("received %d of 100 canceled requests", canceled) - } - cc.Close() - server.stop() -} - -// TestInvokeCancelClosedNonFail checks that a canceled non-failfast RPC -// on a closed client will terminate. -func TestInvokeCancelClosedNonFailFast(t *testing.T) { - defer leakcheck.Check(t) - server, cc := setUp(t, 0, math.MaxUint32) - var reply string - cc.Close() - req := "hello" - ctx, cancel := context.WithCancel(context.Background()) - cancel() - if err := cc.Invoke(ctx, "/foo/bar", &req, &reply, FailFast(false)); err == nil { - t.Fatalf("canceled invoke on closed connection should fail") - } - server.stop() -} diff --git a/vendor/google.golang.org/grpc/clientconn_test.go b/vendor/google.golang.org/grpc/clientconn_test.go deleted file mode 100644 index f2614dec..00000000 --- a/vendor/google.golang.org/grpc/clientconn_test.go +++ /dev/null @@ -1,703 +0,0 @@ -/* - * - * Copyright 2014 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package grpc - -import ( - "math" - "net" - "sync/atomic" - "testing" - "time" - - "golang.org/x/net/context" - "golang.org/x/net/http2" - "google.golang.org/grpc/connectivity" - "google.golang.org/grpc/credentials" - "google.golang.org/grpc/internal/backoff" - "google.golang.org/grpc/internal/leakcheck" - "google.golang.org/grpc/keepalive" - "google.golang.org/grpc/naming" - "google.golang.org/grpc/resolver" - "google.golang.org/grpc/resolver/manual" - _ "google.golang.org/grpc/resolver/passthrough" - "google.golang.org/grpc/testdata" -) - -var ( - mutableMinConnectTimeout = time.Second * 20 -) - -func init() { - getMinConnectTimeout = func() time.Duration { - return time.Duration(atomic.LoadInt64((*int64)(&mutableMinConnectTimeout))) - } -} - -func assertState(wantState connectivity.State, cc *ClientConn) (connectivity.State, bool) { - ctx, cancel := context.WithTimeout(context.Background(), time.Second) - defer cancel() - var state connectivity.State - for state = cc.GetState(); state != wantState && cc.WaitForStateChange(ctx, state); state = cc.GetState() { - } - return state, state == wantState -} - -func TestDialWithMultipleBackendsNotSendingServerPreface(t *testing.T) { - defer leakcheck.Check(t) - numServers := 2 - servers := make([]net.Listener, numServers) - var err error - for i := 0; i < numServers; i++ { - servers[i], err = net.Listen("tcp", "localhost:0") - if err != nil { - t.Fatalf("Error while listening. Err: %v", err) - } - } - dones := make([]chan struct{}, numServers) - for i := 0; i < numServers; i++ { - dones[i] = make(chan struct{}) - } - for i := 0; i < numServers; i++ { - go func(i int) { - defer func() { - close(dones[i]) - }() - conn, err := servers[i].Accept() - if err != nil { - t.Errorf("Error while accepting. Err: %v", err) - return - } - defer conn.Close() - switch i { - case 0: // 1st server accepts the connection and immediately closes it. - case 1: // 2nd server accepts the connection and sends settings frames. - framer := http2.NewFramer(conn, conn) - if err := framer.WriteSettings(http2.Setting{}); err != nil { - t.Errorf("Error while writing settings frame. %v", err) - return - } - conn.SetDeadline(time.Now().Add(time.Second)) - buf := make([]byte, 1024) - for { // Make sure the connection stays healthy. - _, err = conn.Read(buf) - if err == nil { - continue - } - if nerr, ok := err.(net.Error); !ok || !nerr.Timeout() { - t.Errorf("Server expected the conn.Read(_) to timeout instead got error: %v", err) - } - return - } - } - }(i) - } - r, cleanup := manual.GenerateAndRegisterManualResolver() - defer cleanup() - resolvedAddrs := make([]resolver.Address, numServers) - for i := 0; i < numServers; i++ { - resolvedAddrs[i] = resolver.Address{Addr: servers[i].Addr().String()} - } - r.InitialAddrs(resolvedAddrs) - client, err := Dial(r.Scheme()+":///test.server", WithInsecure()) - if err != nil { - t.Errorf("Dial failed. Err: %v", err) - } else { - defer client.Close() - } - time.Sleep(time.Second) // Close the servers after a second for cleanup. - for _, s := range servers { - s.Close() - } - for _, done := range dones { - <-done - } -} - -func TestDialWaitsForServerSettings(t *testing.T) { - defer leakcheck.Check(t) - server, err := net.Listen("tcp", "localhost:0") - if err != nil { - t.Fatalf("Error while listening. Err: %v", err) - } - defer server.Close() - done := make(chan struct{}) - sent := make(chan struct{}) - dialDone := make(chan struct{}) - go func() { // Launch the server. - defer func() { - close(done) - }() - conn, err := server.Accept() - if err != nil { - t.Errorf("Error while accepting. Err: %v", err) - return - } - defer conn.Close() - // Sleep for a little bit to make sure that Dial on client - // side blocks until settings are received. - time.Sleep(500 * time.Millisecond) - framer := http2.NewFramer(conn, conn) - close(sent) - if err := framer.WriteSettings(http2.Setting{}); err != nil { - t.Errorf("Error while writing settings. Err: %v", err) - return - } - <-dialDone // Close conn only after dial returns. - }() - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) - defer cancel() - client, err := DialContext(ctx, server.Addr().String(), WithInsecure(), WithWaitForHandshake(), WithBlock()) - close(dialDone) - if err != nil { - cancel() - t.Fatalf("Error while dialing. Err: %v", err) - } - defer client.Close() - select { - case <-sent: - default: - t.Fatalf("Dial returned before server settings were sent") - } - <-done - -} - -func TestCloseConnectionWhenServerPrefaceNotReceived(t *testing.T) { - // 1. Client connects to a server that doesn't send preface. - // 2. After minConnectTimeout(500 ms here), client disconnects and retries. - // 3. The new server sends its preface. - // 4. Client doesn't kill the connection this time. - mctBkp := getMinConnectTimeout() - // Call this only after transportMonitor goroutine has ended. - defer func() { - atomic.StoreInt64((*int64)(&mutableMinConnectTimeout), int64(mctBkp)) - - }() - defer leakcheck.Check(t) - atomic.StoreInt64((*int64)(&mutableMinConnectTimeout), int64(time.Millisecond)*500) - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - t.Fatalf("Error while listening. Err: %v", err) - } - var ( - conn2 net.Conn - over uint32 - ) - defer func() { - lis.Close() - // conn2 shouldn't be closed until the client has - // observed a successful test. - if conn2 != nil { - conn2.Close() - } - }() - done := make(chan struct{}) - accepted := make(chan struct{}) - go func() { // Launch the server. - defer close(done) - conn1, err := lis.Accept() - if err != nil { - t.Errorf("Error while accepting. Err: %v", err) - return - } - defer conn1.Close() - // Don't send server settings and the client should close the connection and try again. - conn2, err = lis.Accept() // Accept a reconnection request from client. - if err != nil { - t.Errorf("Error while accepting. Err: %v", err) - return - } - close(accepted) - framer := http2.NewFramer(conn2, conn2) - if err = framer.WriteSettings(http2.Setting{}); err != nil { - t.Errorf("Error while writing settings. Err: %v", err) - return - } - b := make([]byte, 8) - for { - _, err = conn2.Read(b) - if err == nil { - continue - } - if atomic.LoadUint32(&over) == 1 { - // The connection stayed alive for the timer. - // Success. - return - } - t.Errorf("Unexpected error while reading. Err: %v, want timeout error", err) - break - } - }() - client, err := Dial(lis.Addr().String(), WithInsecure()) - if err != nil { - t.Fatalf("Error while dialing. Err: %v", err) - } - // wait for connection to be accepted on the server. - timer := time.NewTimer(time.Second * 10) - select { - case <-accepted: - case <-timer.C: - t.Fatalf("Client didn't make another connection request in time.") - } - // Make sure the connection stays alive for sometime. - time.Sleep(time.Second * 2) - atomic.StoreUint32(&over, 1) - client.Close() - <-done -} - -func TestBackoffWhenNoServerPrefaceReceived(t *testing.T) { - defer leakcheck.Check(t) - server, err := net.Listen("tcp", "localhost:0") - if err != nil { - t.Fatalf("Error while listening. Err: %v", err) - } - defer server.Close() - done := make(chan struct{}) - go func() { // Launch the server. - defer func() { - close(done) - }() - conn, err := server.Accept() // Accept the connection only to close it immediately. - if err != nil { - t.Errorf("Error while accepting. Err: %v", err) - return - } - prevAt := time.Now() - conn.Close() - var prevDuration time.Duration - // Make sure the retry attempts are backed off properly. - for i := 0; i < 3; i++ { - conn, err := server.Accept() - if err != nil { - t.Errorf("Error while accepting. Err: %v", err) - return - } - meow := time.Now() - conn.Close() - dr := meow.Sub(prevAt) - if dr <= prevDuration { - t.Errorf("Client backoff did not increase with retries. Previous duration: %v, current duration: %v", prevDuration, dr) - return - } - prevDuration = dr - prevAt = meow - } - }() - client, err := Dial(server.Addr().String(), WithInsecure()) - if err != nil { - t.Fatalf("Error while dialing. Err: %v", err) - } - defer client.Close() - <-done - -} - -func TestConnectivityStates(t *testing.T) { - defer leakcheck.Check(t) - servers, resolver, cleanup := startServers(t, 2, math.MaxUint32) - defer cleanup() - cc, err := Dial("passthrough:///foo.bar.com", WithBalancer(RoundRobin(resolver)), WithInsecure()) - if err != nil { - t.Fatalf("Dial(\"foo.bar.com\", WithBalancer(_)) = _, %v, want _ ", err) - } - defer cc.Close() - wantState := connectivity.Ready - if state, ok := assertState(wantState, cc); !ok { - t.Fatalf("asserState(%s) = %s, false, want %s, true", wantState, state, wantState) - } - // Send an update to delete the server connection (tearDown addrConn). - update := []*naming.Update{ - { - Op: naming.Delete, - Addr: "localhost:" + servers[0].port, - }, - } - resolver.w.inject(update) - wantState = connectivity.TransientFailure - if state, ok := assertState(wantState, cc); !ok { - t.Fatalf("asserState(%s) = %s, false, want %s, true", wantState, state, wantState) - } - update[0] = &naming.Update{ - Op: naming.Add, - Addr: "localhost:" + servers[1].port, - } - resolver.w.inject(update) - wantState = connectivity.Ready - if state, ok := assertState(wantState, cc); !ok { - t.Fatalf("asserState(%s) = %s, false, want %s, true", wantState, state, wantState) - } - -} - -func TestWithTimeout(t *testing.T) { - defer leakcheck.Check(t) - conn, err := Dial("passthrough:///Non-Existent.Server:80", WithTimeout(time.Millisecond), WithBlock(), WithInsecure()) - if err == nil { - conn.Close() - } - if err != context.DeadlineExceeded { - t.Fatalf("Dial(_, _) = %v, %v, want %v", conn, err, context.DeadlineExceeded) - } -} - -func TestWithTransportCredentialsTLS(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) - defer cancel() - defer leakcheck.Check(t) - creds, err := credentials.NewClientTLSFromFile(testdata.Path("ca.pem"), "x.test.youtube.com") - if err != nil { - t.Fatalf("Failed to create credentials %v", err) - } - conn, err := DialContext(ctx, "passthrough:///Non-Existent.Server:80", WithTransportCredentials(creds), WithBlock()) - if err == nil { - conn.Close() - } - if err != context.DeadlineExceeded { - t.Fatalf("Dial(_, _) = %v, %v, want %v", conn, err, context.DeadlineExceeded) - } -} - -func TestDefaultAuthority(t *testing.T) { - defer leakcheck.Check(t) - target := "Non-Existent.Server:8080" - conn, err := Dial(target, WithInsecure()) - if err != nil { - t.Fatalf("Dial(_, _) = _, %v, want _, ", err) - } - defer conn.Close() - if conn.authority != target { - t.Fatalf("%v.authority = %v, want %v", conn, conn.authority, target) - } -} - -func TestTLSServerNameOverwrite(t *testing.T) { - defer leakcheck.Check(t) - overwriteServerName := "over.write.server.name" - creds, err := credentials.NewClientTLSFromFile(testdata.Path("ca.pem"), overwriteServerName) - if err != nil { - t.Fatalf("Failed to create credentials %v", err) - } - conn, err := Dial("passthrough:///Non-Existent.Server:80", WithTransportCredentials(creds)) - if err != nil { - t.Fatalf("Dial(_, _) = _, %v, want _, ", err) - } - defer conn.Close() - if conn.authority != overwriteServerName { - t.Fatalf("%v.authority = %v, want %v", conn, conn.authority, overwriteServerName) - } -} - -func TestWithAuthority(t *testing.T) { - defer leakcheck.Check(t) - overwriteServerName := "over.write.server.name" - conn, err := Dial("passthrough:///Non-Existent.Server:80", WithInsecure(), WithAuthority(overwriteServerName)) - if err != nil { - t.Fatalf("Dial(_, _) = _, %v, want _, ", err) - } - defer conn.Close() - if conn.authority != overwriteServerName { - t.Fatalf("%v.authority = %v, want %v", conn, conn.authority, overwriteServerName) - } -} - -func TestWithAuthorityAndTLS(t *testing.T) { - defer leakcheck.Check(t) - overwriteServerName := "over.write.server.name" - creds, err := credentials.NewClientTLSFromFile(testdata.Path("ca.pem"), overwriteServerName) - if err != nil { - t.Fatalf("Failed to create credentials %v", err) - } - conn, err := Dial("passthrough:///Non-Existent.Server:80", WithTransportCredentials(creds), WithAuthority("no.effect.authority")) - if err != nil { - t.Fatalf("Dial(_, _) = _, %v, want _, ", err) - } - defer conn.Close() - if conn.authority != overwriteServerName { - t.Fatalf("%v.authority = %v, want %v", conn, conn.authority, overwriteServerName) - } -} - -func TestDialContextCancel(t *testing.T) { - defer leakcheck.Check(t) - ctx, cancel := context.WithCancel(context.Background()) - cancel() - if _, err := DialContext(ctx, "Non-Existent.Server:80", WithBlock(), WithInsecure()); err != context.Canceled { - t.Fatalf("DialContext(%v, _) = _, %v, want _, %v", ctx, err, context.Canceled) - } -} - -// blockingBalancer mimics the behavior of balancers whose initialization takes a long time. -// In this test, reading from blockingBalancer.Notify() blocks forever. -type blockingBalancer struct { - ch chan []Address -} - -func newBlockingBalancer() Balancer { - return &blockingBalancer{ch: make(chan []Address)} -} -func (b *blockingBalancer) Start(target string, config BalancerConfig) error { - return nil -} -func (b *blockingBalancer) Up(addr Address) func(error) { - return nil -} -func (b *blockingBalancer) Get(ctx context.Context, opts BalancerGetOptions) (addr Address, put func(), err error) { - return Address{}, nil, nil -} -func (b *blockingBalancer) Notify() <-chan []Address { - return b.ch -} -func (b *blockingBalancer) Close() error { - close(b.ch) - return nil -} - -func TestDialWithBlockingBalancer(t *testing.T) { - defer leakcheck.Check(t) - ctx, cancel := context.WithCancel(context.Background()) - dialDone := make(chan struct{}) - go func() { - DialContext(ctx, "Non-Existent.Server:80", WithBlock(), WithInsecure(), WithBalancer(newBlockingBalancer())) - close(dialDone) - }() - cancel() - <-dialDone -} - -// securePerRPCCredentials always requires transport security. -type securePerRPCCredentials struct{} - -func (c securePerRPCCredentials) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) { - return nil, nil -} - -func (c securePerRPCCredentials) RequireTransportSecurity() bool { - return true -} - -func TestCredentialsMisuse(t *testing.T) { - defer leakcheck.Check(t) - tlsCreds, err := credentials.NewClientTLSFromFile(testdata.Path("ca.pem"), "x.test.youtube.com") - if err != nil { - t.Fatalf("Failed to create authenticator %v", err) - } - // Two conflicting credential configurations - if _, err := Dial("passthrough:///Non-Existent.Server:80", WithTransportCredentials(tlsCreds), WithBlock(), WithInsecure()); err != errCredentialsConflict { - t.Fatalf("Dial(_, _) = _, %v, want _, %v", err, errCredentialsConflict) - } - // security info on insecure connection - if _, err := Dial("passthrough:///Non-Existent.Server:80", WithPerRPCCredentials(securePerRPCCredentials{}), WithBlock(), WithInsecure()); err != errTransportCredentialsMissing { - t.Fatalf("Dial(_, _) = _, %v, want _, %v", err, errTransportCredentialsMissing) - } -} - -func TestWithBackoffConfigDefault(t *testing.T) { - defer leakcheck.Check(t) - testBackoffConfigSet(t, &DefaultBackoffConfig) -} - -func TestWithBackoffConfig(t *testing.T) { - defer leakcheck.Check(t) - b := BackoffConfig{MaxDelay: DefaultBackoffConfig.MaxDelay / 2} - expected := b - testBackoffConfigSet(t, &expected, WithBackoffConfig(b)) -} - -func TestWithBackoffMaxDelay(t *testing.T) { - defer leakcheck.Check(t) - md := DefaultBackoffConfig.MaxDelay / 2 - expected := BackoffConfig{MaxDelay: md} - testBackoffConfigSet(t, &expected, WithBackoffMaxDelay(md)) -} - -func testBackoffConfigSet(t *testing.T, expected *BackoffConfig, opts ...DialOption) { - opts = append(opts, WithInsecure()) - conn, err := Dial("passthrough:///foo:80", opts...) - if err != nil { - t.Fatalf("unexpected error dialing connection: %v", err) - } - defer conn.Close() - - if conn.dopts.bs == nil { - t.Fatalf("backoff config not set") - } - - actual, ok := conn.dopts.bs.(backoff.Exponential) - if !ok { - t.Fatalf("unexpected type of backoff config: %#v", conn.dopts.bs) - } - - expectedValue := backoff.Exponential{ - MaxDelay: expected.MaxDelay, - } - if actual != expectedValue { - t.Fatalf("unexpected backoff config on connection: %v, want %v", actual, expected) - } -} - -// emptyBalancer returns an empty set of servers. -type emptyBalancer struct { - ch chan []Address -} - -func newEmptyBalancer() Balancer { - return &emptyBalancer{ch: make(chan []Address, 1)} -} -func (b *emptyBalancer) Start(_ string, _ BalancerConfig) error { - b.ch <- nil - return nil -} -func (b *emptyBalancer) Up(_ Address) func(error) { - return nil -} -func (b *emptyBalancer) Get(_ context.Context, _ BalancerGetOptions) (Address, func(), error) { - return Address{}, nil, nil -} -func (b *emptyBalancer) Notify() <-chan []Address { - return b.ch -} -func (b *emptyBalancer) Close() error { - close(b.ch) - return nil -} - -func TestNonblockingDialWithEmptyBalancer(t *testing.T) { - defer leakcheck.Check(t) - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - dialDone := make(chan error) - go func() { - dialDone <- func() error { - conn, err := DialContext(ctx, "Non-Existent.Server:80", WithInsecure(), WithBalancer(newEmptyBalancer())) - if err != nil { - return err - } - return conn.Close() - }() - }() - if err := <-dialDone; err != nil { - t.Fatalf("unexpected error dialing connection: %s", err) - } -} - -func TestResolverServiceConfigBeforeAddressNotPanic(t *testing.T) { - defer leakcheck.Check(t) - r, rcleanup := manual.GenerateAndRegisterManualResolver() - defer rcleanup() - - cc, err := Dial(r.Scheme()+":///test.server", WithInsecure()) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - - // SwitchBalancer before NewAddress. There was no balancer created, this - // makes sure we don't call close on nil balancerWrapper. - r.NewServiceConfig(`{"loadBalancingPolicy": "round_robin"}`) // This should not panic. - - time.Sleep(time.Second) // Sleep to make sure the service config is handled by ClientConn. -} - -func TestResolverEmptyUpdateNotPanic(t *testing.T) { - defer leakcheck.Check(t) - r, rcleanup := manual.GenerateAndRegisterManualResolver() - defer rcleanup() - - cc, err := Dial(r.Scheme()+":///test.server", WithInsecure()) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - - // This make sure we don't create addrConn with empty address list. - r.NewAddress([]resolver.Address{}) // This should not panic. - - time.Sleep(time.Second) // Sleep to make sure the service config is handled by ClientConn. -} - -func TestClientUpdatesParamsAfterGoAway(t *testing.T) { - defer leakcheck.Check(t) - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - t.Fatalf("Failed to listen. Err: %v", err) - } - defer lis.Close() - addr := lis.Addr().String() - s := NewServer() - go s.Serve(lis) - defer s.Stop() - cc, err := Dial(addr, WithBlock(), WithInsecure(), WithKeepaliveParams(keepalive.ClientParameters{ - Time: 50 * time.Millisecond, - Timeout: 100 * time.Millisecond, - PermitWithoutStream: true, - })) - if err != nil { - t.Fatalf("Dial(%s, _) = _, %v, want _, ", addr, err) - } - defer cc.Close() - time.Sleep(1 * time.Second) - cc.mu.RLock() - defer cc.mu.RUnlock() - v := cc.mkp.Time - if v < 100*time.Millisecond { - t.Fatalf("cc.dopts.copts.Keepalive.Time = %v , want 100ms", v) - } -} - -func TestDisableServiceConfigOption(t *testing.T) { - r, cleanup := manual.GenerateAndRegisterManualResolver() - defer cleanup() - addr := r.Scheme() + ":///non.existent" - cc, err := Dial(addr, WithInsecure(), WithDisableServiceConfig()) - if err != nil { - t.Fatalf("Dial(%s, _) = _, %v, want _, ", addr, err) - } - defer cc.Close() - r.NewServiceConfig(`{ - "methodConfig": [ - { - "name": [ - { - "service": "foo", - "method": "Bar" - } - ], - "waitForReady": true - } - ] -}`) - time.Sleep(1 * time.Second) - m := cc.GetMethodConfig("/foo/Bar") - if m.WaitForReady != nil { - t.Fatalf("want: method (\"/foo/bar/\") config to be empty, got: %v", m) - } -} - -func TestGetClientConnTarget(t *testing.T) { - addr := "nonexist:///non.existent" - cc, err := Dial(addr, WithInsecure()) - if err != nil { - t.Fatalf("Dial(%s, _) = _, %v, want _, ", addr, err) - } - defer cc.Close() - if cc.Target() != addr { - t.Fatalf("Target() = %s, want %s", cc.Target(), addr) - } -} diff --git a/vendor/google.golang.org/grpc/codec_test.go b/vendor/google.golang.org/grpc/codec_test.go deleted file mode 100644 index 3fda708e..00000000 --- a/vendor/google.golang.org/grpc/codec_test.go +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * Copyright 2014 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package grpc - -import ( - "testing" - - "google.golang.org/grpc/encoding" - "google.golang.org/grpc/encoding/proto" -) - -func TestGetCodecForProtoIsNotNil(t *testing.T) { - if encoding.GetCodec(proto.Name) == nil { - t.Fatalf("encoding.GetCodec(%q) must not be nil by default", proto.Name) - } -} diff --git a/vendor/google.golang.org/grpc/codegen.sh b/vendor/google.golang.org/grpc/codegen.sh deleted file mode 100755 index 4cdc6ba7..00000000 --- a/vendor/google.golang.org/grpc/codegen.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -# This script serves as an example to demonstrate how to generate the gRPC-Go -# interface and the related messages from .proto file. -# -# It assumes the installation of i) Google proto buffer compiler at -# https://github.com/google/protobuf (after v2.6.1) and ii) the Go codegen -# plugin at https://github.com/golang/protobuf (after 2015-02-20). If you have -# not, please install them first. -# -# We recommend running this script at $GOPATH/src. -# -# If this is not what you need, feel free to make your own scripts. Again, this -# script is for demonstration purpose. -# -proto=$1 -protoc --go_out=plugins=grpc:. $proto diff --git a/vendor/google.golang.org/grpc/codes/codes_test.go b/vendor/google.golang.org/grpc/codes/codes_test.go deleted file mode 100644 index d3e32d22..00000000 --- a/vendor/google.golang.org/grpc/codes/codes_test.go +++ /dev/null @@ -1,84 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package codes - -import ( - "encoding/json" - "reflect" - "testing" - - cpb "google.golang.org/genproto/googleapis/rpc/code" -) - -func TestUnmarshalJSON(t *testing.T) { - for s, v := range cpb.Code_value { - want := Code(v) - var got Code - if err := got.UnmarshalJSON([]byte(`"` + s + `"`)); err != nil || got != want { - t.Errorf("got.UnmarshalJSON(%q) = %v; want . got=%v; want %v", s, err, got, want) - } - } -} - -func TestJSONUnmarshal(t *testing.T) { - var got []Code - want := []Code{OK, NotFound, Internal, Canceled} - in := `["OK", "NOT_FOUND", "INTERNAL", "CANCELLED"]` - err := json.Unmarshal([]byte(in), &got) - if err != nil || !reflect.DeepEqual(got, want) { - t.Fatalf("json.Unmarshal(%q, &got) = %v; want . got=%v; want %v", in, err, got, want) - } -} - -func TestUnmarshalJSON_NilReceiver(t *testing.T) { - var got *Code - in := OK.String() - if err := got.UnmarshalJSON([]byte(in)); err == nil { - t.Errorf("got.UnmarshalJSON(%q) = nil; want . got=%v", in, got) - } -} - -func TestUnmarshalJSON_UnknownInput(t *testing.T) { - var got Code - for _, in := range [][]byte{[]byte(""), []byte("xxx"), []byte("Code(17)"), nil} { - if err := got.UnmarshalJSON([]byte(in)); err == nil { - t.Errorf("got.UnmarshalJSON(%q) = nil; want . got=%v", in, got) - } - } -} - -func TestUnmarshalJSON_MarshalUnmarshal(t *testing.T) { - for i := 0; i < _maxCode; i++ { - var cUnMarshaled Code - c := Code(i) - - cJSON, err := json.Marshal(c) - if err != nil { - t.Errorf("marshalling %q failed: %v", c, err) - } - - if err := json.Unmarshal(cJSON, &cUnMarshaled); err != nil { - t.Errorf("unmarshalling code failed: %s", err) - } - - if c != cUnMarshaled { - t.Errorf("code is %q after marshalling/unmarshalling, expected %q", cUnMarshaled, c) - } - } -} diff --git a/vendor/google.golang.org/grpc/credentials/credentials_test.go b/vendor/google.golang.org/grpc/credentials/credentials_test.go deleted file mode 100644 index 9b13db51..00000000 --- a/vendor/google.golang.org/grpc/credentials/credentials_test.go +++ /dev/null @@ -1,206 +0,0 @@ -/* - * - * Copyright 2016 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package credentials - -import ( - "crypto/tls" - "net" - "testing" - - "golang.org/x/net/context" - "google.golang.org/grpc/testdata" -) - -func TestTLSOverrideServerName(t *testing.T) { - expectedServerName := "server.name" - c := NewTLS(nil) - c.OverrideServerName(expectedServerName) - if c.Info().ServerName != expectedServerName { - t.Fatalf("c.Info().ServerName = %v, want %v", c.Info().ServerName, expectedServerName) - } -} - -func TestTLSClone(t *testing.T) { - expectedServerName := "server.name" - c := NewTLS(nil) - c.OverrideServerName(expectedServerName) - cc := c.Clone() - if cc.Info().ServerName != expectedServerName { - t.Fatalf("cc.Info().ServerName = %v, want %v", cc.Info().ServerName, expectedServerName) - } - cc.OverrideServerName("") - if c.Info().ServerName != expectedServerName { - t.Fatalf("Change in clone should not affect the original, c.Info().ServerName = %v, want %v", c.Info().ServerName, expectedServerName) - } - -} - -type serverHandshake func(net.Conn) (AuthInfo, error) - -func TestClientHandshakeReturnsAuthInfo(t *testing.T) { - done := make(chan AuthInfo, 1) - lis := launchServer(t, tlsServerHandshake, done) - defer lis.Close() - lisAddr := lis.Addr().String() - clientAuthInfo := clientHandle(t, gRPCClientHandshake, lisAddr) - // wait until server sends serverAuthInfo or fails. - serverAuthInfo, ok := <-done - if !ok { - t.Fatalf("Error at server-side") - } - if !compare(clientAuthInfo, serverAuthInfo) { - t.Fatalf("c.ClientHandshake(_, %v, _) = %v, want %v.", lisAddr, clientAuthInfo, serverAuthInfo) - } -} - -func TestServerHandshakeReturnsAuthInfo(t *testing.T) { - done := make(chan AuthInfo, 1) - lis := launchServer(t, gRPCServerHandshake, done) - defer lis.Close() - clientAuthInfo := clientHandle(t, tlsClientHandshake, lis.Addr().String()) - // wait until server sends serverAuthInfo or fails. - serverAuthInfo, ok := <-done - if !ok { - t.Fatalf("Error at server-side") - } - if !compare(clientAuthInfo, serverAuthInfo) { - t.Fatalf("ServerHandshake(_) = %v, want %v.", serverAuthInfo, clientAuthInfo) - } -} - -func TestServerAndClientHandshake(t *testing.T) { - done := make(chan AuthInfo, 1) - lis := launchServer(t, gRPCServerHandshake, done) - defer lis.Close() - clientAuthInfo := clientHandle(t, gRPCClientHandshake, lis.Addr().String()) - // wait until server sends serverAuthInfo or fails. - serverAuthInfo, ok := <-done - if !ok { - t.Fatalf("Error at server-side") - } - if !compare(clientAuthInfo, serverAuthInfo) { - t.Fatalf("AuthInfo returned by server: %v and client: %v aren't same", serverAuthInfo, clientAuthInfo) - } -} - -func compare(a1, a2 AuthInfo) bool { - if a1.AuthType() != a2.AuthType() { - return false - } - switch a1.AuthType() { - case "tls": - state1 := a1.(TLSInfo).State - state2 := a2.(TLSInfo).State - if state1.Version == state2.Version && - state1.HandshakeComplete == state2.HandshakeComplete && - state1.CipherSuite == state2.CipherSuite && - state1.NegotiatedProtocol == state2.NegotiatedProtocol { - return true - } - return false - default: - return false - } -} - -func launchServer(t *testing.T, hs serverHandshake, done chan AuthInfo) net.Listener { - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - t.Fatalf("Failed to listen: %v", err) - } - go serverHandle(t, hs, done, lis) - return lis -} - -// Is run in a separate goroutine. -func serverHandle(t *testing.T, hs serverHandshake, done chan AuthInfo, lis net.Listener) { - serverRawConn, err := lis.Accept() - if err != nil { - t.Errorf("Server failed to accept connection: %v", err) - close(done) - return - } - serverAuthInfo, err := hs(serverRawConn) - if err != nil { - t.Errorf("Server failed while handshake. Error: %v", err) - serverRawConn.Close() - close(done) - return - } - done <- serverAuthInfo -} - -func clientHandle(t *testing.T, hs func(net.Conn, string) (AuthInfo, error), lisAddr string) AuthInfo { - conn, err := net.Dial("tcp", lisAddr) - if err != nil { - t.Fatalf("Client failed to connect to %s. Error: %v", lisAddr, err) - } - defer conn.Close() - clientAuthInfo, err := hs(conn, lisAddr) - if err != nil { - t.Fatalf("Error on client while handshake. Error: %v", err) - } - return clientAuthInfo -} - -// Server handshake implementation in gRPC. -func gRPCServerHandshake(conn net.Conn) (AuthInfo, error) { - serverTLS, err := NewServerTLSFromFile(testdata.Path("server1.pem"), testdata.Path("server1.key")) - if err != nil { - return nil, err - } - _, serverAuthInfo, err := serverTLS.ServerHandshake(conn) - if err != nil { - return nil, err - } - return serverAuthInfo, nil -} - -// Client handshake implementation in gRPC. -func gRPCClientHandshake(conn net.Conn, lisAddr string) (AuthInfo, error) { - clientTLS := NewTLS(&tls.Config{InsecureSkipVerify: true}) - _, authInfo, err := clientTLS.ClientHandshake(context.Background(), lisAddr, conn) - if err != nil { - return nil, err - } - return authInfo, nil -} - -func tlsServerHandshake(conn net.Conn) (AuthInfo, error) { - cert, err := tls.LoadX509KeyPair(testdata.Path("server1.pem"), testdata.Path("server1.key")) - if err != nil { - return nil, err - } - serverTLSConfig := &tls.Config{Certificates: []tls.Certificate{cert}} - serverConn := tls.Server(conn, serverTLSConfig) - err = serverConn.Handshake() - if err != nil { - return nil, err - } - return TLSInfo{State: serverConn.ConnectionState()}, nil -} - -func tlsClientHandshake(conn net.Conn, _ string) (AuthInfo, error) { - clientTLSConfig := &tls.Config{InsecureSkipVerify: true} - clientConn := tls.Client(conn, clientTLSConfig) - if err := clientConn.Handshake(); err != nil { - return nil, err - } - return TLSInfo{State: clientConn.ConnectionState()}, nil -} diff --git a/vendor/google.golang.org/grpc/encoding/proto/proto_benchmark_test.go b/vendor/google.golang.org/grpc/encoding/proto/proto_benchmark_test.go deleted file mode 100644 index 63ea57de..00000000 --- a/vendor/google.golang.org/grpc/encoding/proto/proto_benchmark_test.go +++ /dev/null @@ -1,100 +0,0 @@ -// +build go1.7 - -/* - * - * Copyright 2014 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package proto - -import ( - "fmt" - "testing" - - "github.com/golang/protobuf/proto" - "google.golang.org/grpc/encoding" - "google.golang.org/grpc/test/codec_perf" -) - -func setupBenchmarkProtoCodecInputs(payloadBaseSize uint32) []proto.Message { - payloadBase := make([]byte, payloadBaseSize) - // arbitrary byte slices - payloadSuffixes := [][]byte{ - []byte("one"), - []byte("two"), - []byte("three"), - []byte("four"), - []byte("five"), - } - protoStructs := make([]proto.Message, 0) - - for _, p := range payloadSuffixes { - ps := &codec_perf.Buffer{} - ps.Body = append(payloadBase, p...) - protoStructs = append(protoStructs, ps) - } - - return protoStructs -} - -// The possible use of certain protobuf APIs like the proto.Buffer API potentially involves caching -// on our side. This can add checks around memory allocations and possible contention. -// Example run: go test -v -run=^$ -bench=BenchmarkProtoCodec -benchmem -func BenchmarkProtoCodec(b *testing.B) { - // range of message sizes - payloadBaseSizes := make([]uint32, 0) - for i := uint32(0); i <= 12; i += 4 { - payloadBaseSizes = append(payloadBaseSizes, 1<= rune(0) && i < ' ') || (i > '~' && i <= rune(127)); i++ { - output := encodeGrpcMessage(string(i)) - expected := fmt.Sprintf("%%%02X", i) - if output != expected { - t.Errorf("encodeGrpcMessage(%v) = %v, want %v", string(i), output, expected) - } - } -} - -func TestDecodeGrpcMessage(t *testing.T) { - for _, tt := range []struct { - input string - expected string - }{ - {"", ""}, - {"Hello", "Hello"}, - {"H%61o", "Hao"}, - {"H%6", "H%6"}, - {"%G0", "%G0"}, - {"%E7%B3%BB%E7%BB%9F", "系统"}, - {"%EF%BF%BD", "�"}, - } { - actual := decodeGrpcMessage(tt.input) - if tt.expected != actual { - t.Errorf("decodeGrpcMessage(%q) = %q, want %q", tt.input, actual, tt.expected) - } - } - - // make sure that all the visible ASCII chars except '%' are not percent decoded. - for i := ' '; i <= '~' && i != '%'; i++ { - output := decodeGrpcMessage(string(i)) - if output != string(i) { - t.Errorf("decodeGrpcMessage(%v) = %v, want %v", string(i), output, string(i)) - } - } - - // make sure that all the invisible ASCII chars and '%' are percent decoded. - for i := rune(0); i == '%' || (i >= rune(0) && i < ' ') || (i > '~' && i <= rune(127)); i++ { - output := decodeGrpcMessage(fmt.Sprintf("%%%02X", i)) - if output != string(i) { - t.Errorf("decodeGrpcMessage(%v) = %v, want %v", fmt.Sprintf("%%%02X", i), output, string(i)) - } - } -} - -// Decode an encoded string should get the same thing back, except for invalid -// utf8 chars. -func TestDecodeEncodeGrpcMessage(t *testing.T) { - testCases := []struct { - orig string - want string - }{ - {"", ""}, - {"hello", "hello"}, - {"h%6", "h%6"}, - {"%G0", "%G0"}, - {"系统", "系统"}, - {"Hello, 世界", "Hello, 世界"}, - - {string([]byte{0xff, 0xfe, 0xfd}), "���"}, - {string([]byte{0xff}) + "Hello" + string([]byte{0xfe}) + "世界" + string([]byte{0xfd}), "�Hello�世界�"}, - } - for _, tC := range testCases { - got := decodeGrpcMessage(encodeGrpcMessage(tC.orig)) - if got != tC.want { - t.Errorf("decodeGrpcMessage(encodeGrpcMessage(%q)) = %q, want %q", tC.orig, got, tC.want) - } - } -} - -const binaryValue = string(128) - -func TestEncodeMetadataHeader(t *testing.T) { - for _, test := range []struct { - // input - kin string - vin string - // output - vout string - }{ - {"key", "abc", "abc"}, - {"KEY", "abc", "abc"}, - {"key-bin", "abc", "YWJj"}, - {"key-bin", binaryValue, "woA"}, - } { - v := encodeMetadataHeader(test.kin, test.vin) - if !reflect.DeepEqual(v, test.vout) { - t.Fatalf("encodeMetadataHeader(%q, %q) = %q, want %q", test.kin, test.vin, v, test.vout) - } - } -} - -func TestDecodeMetadataHeader(t *testing.T) { - for _, test := range []struct { - // input - kin string - vin string - // output - vout string - err error - }{ - {"a", "abc", "abc", nil}, - {"key-bin", "Zm9vAGJhcg==", "foo\x00bar", nil}, - {"key-bin", "Zm9vAGJhcg", "foo\x00bar", nil}, - {"key-bin", "woA=", binaryValue, nil}, - {"a", "abc,efg", "abc,efg", nil}, - } { - v, err := decodeMetadataHeader(test.kin, test.vin) - if !reflect.DeepEqual(v, test.vout) || !reflect.DeepEqual(err, test.err) { - t.Fatalf("decodeMetadataHeader(%q, %q) = %q, %v, want %q, %v", test.kin, test.vin, v, err, test.vout, test.err) - } - } -} diff --git a/vendor/google.golang.org/grpc/internal/transport/transport_test.go b/vendor/google.golang.org/grpc/internal/transport/transport_test.go deleted file mode 100644 index 52be96f0..00000000 --- a/vendor/google.golang.org/grpc/internal/transport/transport_test.go +++ /dev/null @@ -1,2349 +0,0 @@ -/* - * - * Copyright 2014 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package transport - -import ( - "bufio" - "bytes" - "encoding/binary" - "errors" - "fmt" - "io" - "math" - "net" - "net/http" - "reflect" - "runtime" - "strconv" - "strings" - "sync" - "testing" - "time" - - "golang.org/x/net/context" - "golang.org/x/net/http2" - "golang.org/x/net/http2/hpack" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/internal/leakcheck" - "google.golang.org/grpc/keepalive" - "google.golang.org/grpc/status" -) - -type server struct { - lis net.Listener - port string - startedErr chan error // error (or nil) with server start value - mu sync.Mutex - conns map[ServerTransport]bool - h *testStreamHandler - ready chan struct{} -} - -var ( - expectedRequest = []byte("ping") - expectedResponse = []byte("pong") - expectedRequestLarge = make([]byte, initialWindowSize*2) - expectedResponseLarge = make([]byte, initialWindowSize*2) - expectedInvalidHeaderField = "invalid/content-type" -) - -type testStreamHandler struct { - t *http2Server - notify chan struct{} - getNotified chan struct{} -} - -type hType int - -const ( - normal hType = iota - suspended - notifyCall - misbehaved - encodingRequiredStatus - invalidHeaderField - delayRead - pingpong -) - -func (h *testStreamHandler) handleStreamAndNotify(s *Stream) { - if h.notify == nil { - return - } - go func() { - select { - case <-h.notify: - default: - close(h.notify) - } - }() -} - -func (h *testStreamHandler) handleStream(t *testing.T, s *Stream) { - req := expectedRequest - resp := expectedResponse - if s.Method() == "foo.Large" { - req = expectedRequestLarge - resp = expectedResponseLarge - } - p := make([]byte, len(req)) - _, err := s.Read(p) - if err != nil { - return - } - if !bytes.Equal(p, req) { - t.Fatalf("handleStream got %v, want %v", p, req) - } - // send a response back to the client. - h.t.Write(s, nil, resp, &Options{}) - // send the trailer to end the stream. - h.t.WriteStatus(s, status.New(codes.OK, "")) -} - -func (h *testStreamHandler) handleStreamPingPong(t *testing.T, s *Stream) { - header := make([]byte, 5) - for { - if _, err := s.Read(header); err != nil { - if err == io.EOF { - h.t.WriteStatus(s, status.New(codes.OK, "")) - return - } - t.Fatalf("Error on server while reading data header: %v", err) - } - sz := binary.BigEndian.Uint32(header[1:]) - msg := make([]byte, int(sz)) - if _, err := s.Read(msg); err != nil { - t.Fatalf("Error on server while reading message: %v", err) - } - buf := make([]byte, sz+5) - buf[0] = byte(0) - binary.BigEndian.PutUint32(buf[1:], uint32(sz)) - copy(buf[5:], msg) - h.t.Write(s, nil, buf, &Options{}) - } -} - -func (h *testStreamHandler) handleStreamMisbehave(t *testing.T, s *Stream) { - conn, ok := s.st.(*http2Server) - if !ok { - t.Fatalf("Failed to convert %v to *http2Server", s.st) - } - var sent int - p := make([]byte, http2MaxFrameLen) - for sent < initialWindowSize { - n := initialWindowSize - sent - // The last message may be smaller than http2MaxFrameLen - if n <= http2MaxFrameLen { - if s.Method() == "foo.Connection" { - // Violate connection level flow control window of client but do not - // violate any stream level windows. - p = make([]byte, n) - } else { - // Violate stream level flow control window of client. - p = make([]byte, n+1) - } - } - conn.controlBuf.put(&dataFrame{ - streamID: s.id, - h: nil, - d: p, - onEachWrite: func() {}, - }) - sent += len(p) - } -} - -func (h *testStreamHandler) handleStreamEncodingRequiredStatus(t *testing.T, s *Stream) { - // raw newline is not accepted by http2 framer so it must be encoded. - h.t.WriteStatus(s, encodingTestStatus) -} - -func (h *testStreamHandler) handleStreamInvalidHeaderField(t *testing.T, s *Stream) { - headerFields := []hpack.HeaderField{} - headerFields = append(headerFields, hpack.HeaderField{Name: "content-type", Value: expectedInvalidHeaderField}) - h.t.controlBuf.put(&headerFrame{ - streamID: s.id, - hf: headerFields, - endStream: false, - }) -} - -// handleStreamDelayRead delays reads so that the other side has to halt on -// stream-level flow control. -// This handler assumes dynamic flow control is turned off and assumes window -// sizes to be set to defaultWindowSize. -func (h *testStreamHandler) handleStreamDelayRead(t *testing.T, s *Stream) { - req := expectedRequest - resp := expectedResponse - if s.Method() == "foo.Large" { - req = expectedRequestLarge - resp = expectedResponseLarge - } - var ( - mu sync.Mutex - total int - ) - s.wq.replenish = func(n int) { - mu.Lock() - total += n - mu.Unlock() - s.wq.realReplenish(n) - } - getTotal := func() int { - mu.Lock() - defer mu.Unlock() - return total - } - done := make(chan struct{}) - defer close(done) - go func() { - for { - select { - // Prevent goroutine from leaking. - case <-done: - return - default: - } - if getTotal() == defaultWindowSize { - // Signal the client to start reading and - // thereby send window update. - close(h.notify) - return - } - runtime.Gosched() - } - }() - p := make([]byte, len(req)) - - // Let the other side run out of stream-level window before - // starting to read and thereby sending a window update. - timer := time.NewTimer(time.Second * 10) - select { - case <-h.getNotified: - timer.Stop() - case <-timer.C: - t.Errorf("Server timed-out.") - return - } - _, err := s.Read(p) - if err != nil { - t.Errorf("s.Read(_) = _, %v, want _, ", err) - return - } - - if !bytes.Equal(p, req) { - t.Errorf("handleStream got %v, want %v", p, req) - return - } - // This write will cause server to run out of stream level, - // flow control and the other side won't send a window update - // until that happens. - if err := h.t.Write(s, nil, resp, &Options{}); err != nil { - t.Errorf("server Write got %v, want ", err) - return - } - // Read one more time to ensure that everything remains fine and - // that the goroutine, that we launched earlier to signal client - // to read, gets enough time to process. - _, err = s.Read(p) - if err != nil { - t.Errorf("s.Read(_) = _, %v, want _, nil", err) - return - } - // send the trailer to end the stream. - if err := h.t.WriteStatus(s, status.New(codes.OK, "")); err != nil { - t.Errorf("server WriteStatus got %v, want ", err) - return - } -} - -// start starts server. Other goroutines should block on s.readyChan for further operations. -func (s *server) start(t *testing.T, port int, serverConfig *ServerConfig, ht hType) { - var err error - if port == 0 { - s.lis, err = net.Listen("tcp", "localhost:0") - } else { - s.lis, err = net.Listen("tcp", "localhost:"+strconv.Itoa(port)) - } - if err != nil { - s.startedErr <- fmt.Errorf("failed to listen: %v", err) - return - } - _, p, err := net.SplitHostPort(s.lis.Addr().String()) - if err != nil { - s.startedErr <- fmt.Errorf("failed to parse listener address: %v", err) - return - } - s.port = p - s.conns = make(map[ServerTransport]bool) - s.startedErr <- nil - for { - conn, err := s.lis.Accept() - if err != nil { - return - } - transport, err := NewServerTransport("http2", conn, serverConfig) - if err != nil { - return - } - s.mu.Lock() - if s.conns == nil { - s.mu.Unlock() - transport.Close() - return - } - s.conns[transport] = true - h := &testStreamHandler{t: transport.(*http2Server)} - s.h = h - s.mu.Unlock() - switch ht { - case notifyCall: - go transport.HandleStreams(h.handleStreamAndNotify, - func(ctx context.Context, _ string) context.Context { - return ctx - }) - case suspended: - go transport.HandleStreams(func(*Stream) {}, // Do nothing to handle the stream. - func(ctx context.Context, method string) context.Context { - return ctx - }) - case misbehaved: - go transport.HandleStreams(func(s *Stream) { - go h.handleStreamMisbehave(t, s) - }, func(ctx context.Context, method string) context.Context { - return ctx - }) - case encodingRequiredStatus: - go transport.HandleStreams(func(s *Stream) { - go h.handleStreamEncodingRequiredStatus(t, s) - }, func(ctx context.Context, method string) context.Context { - return ctx - }) - case invalidHeaderField: - go transport.HandleStreams(func(s *Stream) { - go h.handleStreamInvalidHeaderField(t, s) - }, func(ctx context.Context, method string) context.Context { - return ctx - }) - case delayRead: - h.notify = make(chan struct{}) - h.getNotified = make(chan struct{}) - s.mu.Lock() - close(s.ready) - s.mu.Unlock() - go transport.HandleStreams(func(s *Stream) { - go h.handleStreamDelayRead(t, s) - }, func(ctx context.Context, method string) context.Context { - return ctx - }) - case pingpong: - go transport.HandleStreams(func(s *Stream) { - go h.handleStreamPingPong(t, s) - }, func(ctx context.Context, method string) context.Context { - return ctx - }) - default: - go transport.HandleStreams(func(s *Stream) { - go h.handleStream(t, s) - }, func(ctx context.Context, method string) context.Context { - return ctx - }) - } - } -} - -func (s *server) wait(t *testing.T, timeout time.Duration) { - select { - case err := <-s.startedErr: - if err != nil { - t.Fatal(err) - } - case <-time.After(timeout): - t.Fatalf("Timed out after %v waiting for server to be ready", timeout) - } -} - -func (s *server) stop() { - s.lis.Close() - s.mu.Lock() - for c := range s.conns { - c.Close() - } - s.conns = nil - s.mu.Unlock() -} - -func setUpServerOnly(t *testing.T, port int, serverConfig *ServerConfig, ht hType) *server { - server := &server{startedErr: make(chan error, 1), ready: make(chan struct{})} - go server.start(t, port, serverConfig, ht) - server.wait(t, 2*time.Second) - return server -} - -func setUp(t *testing.T, port int, maxStreams uint32, ht hType) (*server, *http2Client, func()) { - return setUpWithOptions(t, port, &ServerConfig{MaxStreams: maxStreams}, ht, ConnectOptions{}, func() {}) -} - -func setUpWithOptions(t *testing.T, port int, serverConfig *ServerConfig, ht hType, copts ConnectOptions, onHandshake func()) (*server, *http2Client, func()) { - server := setUpServerOnly(t, port, serverConfig, ht) - addr := "localhost:" + server.port - target := TargetInfo{ - Addr: addr, - } - connectCtx, cancel := context.WithDeadline(context.Background(), time.Now().Add(2*time.Second)) - ct, connErr := NewClientTransport(connectCtx, context.Background(), target, copts, onHandshake) - if connErr != nil { - cancel() // Do not cancel in success path. - t.Fatalf("failed to create transport: %v", connErr) - } - return server, ct.(*http2Client), cancel -} - -func setUpWithNoPingServer(t *testing.T, copts ConnectOptions, done chan net.Conn) (*http2Client, func()) { - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - t.Fatalf("Failed to listen: %v", err) - } - // Launch a non responsive server. - go func() { - defer lis.Close() - conn, err := lis.Accept() - if err != nil { - t.Errorf("Error at server-side while accepting: %v", err) - close(done) - return - } - done <- conn - }() - connectCtx, cancel := context.WithDeadline(context.Background(), time.Now().Add(2*time.Second)) - tr, err := NewClientTransport(connectCtx, context.Background(), TargetInfo{Addr: lis.Addr().String()}, copts, func() {}) - if err != nil { - cancel() // Do not cancel in success path. - // Server clean-up. - lis.Close() - if conn, ok := <-done; ok { - conn.Close() - } - t.Fatalf("Failed to dial: %v", err) - } - return tr.(*http2Client), cancel -} - -// TestInflightStreamClosing ensures that closing in-flight stream -// sends status error to concurrent stream reader. -func TestInflightStreamClosing(t *testing.T) { - serverConfig := &ServerConfig{} - server, client, cancel := setUpWithOptions(t, 0, serverConfig, suspended, ConnectOptions{}, func() {}) - defer cancel() - defer server.stop() - defer client.Close() - - stream, err := client.NewStream(context.Background(), &CallHdr{}) - if err != nil { - t.Fatalf("Client failed to create RPC request: %v", err) - } - - donec := make(chan struct{}) - serr := status.Error(codes.Internal, "client connection is closing") - go func() { - defer close(donec) - if _, err := stream.Read(make([]byte, defaultWindowSize)); err != serr { - t.Errorf("unexpected Stream error %v, expected %v", err, serr) - } - }() - - // should unblock concurrent stream.Read - client.CloseStream(stream, serr) - - // wait for stream.Read error - timeout := time.NewTimer(5 * time.Second) - select { - case <-donec: - if !timeout.Stop() { - <-timeout.C - } - case <-timeout.C: - t.Fatalf("Test timed out, expected a status error.") - } -} - -// TestMaxConnectionIdle tests that a server will send GoAway to a idle client. -// An idle client is one who doesn't make any RPC calls for a duration of -// MaxConnectionIdle time. -func TestMaxConnectionIdle(t *testing.T) { - serverConfig := &ServerConfig{ - KeepaliveParams: keepalive.ServerParameters{ - MaxConnectionIdle: 2 * time.Second, - }, - } - server, client, cancel := setUpWithOptions(t, 0, serverConfig, suspended, ConnectOptions{}, func() {}) - defer cancel() - defer server.stop() - defer client.Close() - stream, err := client.NewStream(context.Background(), &CallHdr{}) - if err != nil { - t.Fatalf("Client failed to create RPC request: %v", err) - } - client.closeStream(stream, io.EOF, true, http2.ErrCodeCancel, nil, nil, false) - // wait for server to see that closed stream and max-age logic to send goaway after no new RPCs are mode - timeout := time.NewTimer(time.Second * 4) - select { - case <-client.GoAway(): - if !timeout.Stop() { - <-timeout.C - } - case <-timeout.C: - t.Fatalf("Test timed out, expected a GoAway from the server.") - } -} - -// TestMaxConenctionIdleNegative tests that a server will not send GoAway to a non-idle(busy) client. -func TestMaxConnectionIdleNegative(t *testing.T) { - serverConfig := &ServerConfig{ - KeepaliveParams: keepalive.ServerParameters{ - MaxConnectionIdle: 2 * time.Second, - }, - } - server, client, cancel := setUpWithOptions(t, 0, serverConfig, suspended, ConnectOptions{}, func() {}) - defer cancel() - defer server.stop() - defer client.Close() - _, err := client.NewStream(context.Background(), &CallHdr{}) - if err != nil { - t.Fatalf("Client failed to create RPC request: %v", err) - } - timeout := time.NewTimer(time.Second * 4) - select { - case <-client.GoAway(): - if !timeout.Stop() { - <-timeout.C - } - t.Fatalf("A non-idle client received a GoAway.") - case <-timeout.C: - } - -} - -// TestMaxConnectionAge tests that a server will send GoAway after a duration of MaxConnectionAge. -func TestMaxConnectionAge(t *testing.T) { - serverConfig := &ServerConfig{ - KeepaliveParams: keepalive.ServerParameters{ - MaxConnectionAge: 2 * time.Second, - }, - } - server, client, cancel := setUpWithOptions(t, 0, serverConfig, suspended, ConnectOptions{}, func() {}) - defer cancel() - defer server.stop() - defer client.Close() - _, err := client.NewStream(context.Background(), &CallHdr{}) - if err != nil { - t.Fatalf("Client failed to create stream: %v", err) - } - // Wait for max-age logic to send GoAway. - timeout := time.NewTimer(4 * time.Second) - select { - case <-client.GoAway(): - if !timeout.Stop() { - <-timeout.C - } - case <-timeout.C: - t.Fatalf("Test timer out, expected a GoAway from the server.") - } -} - -const ( - defaultWriteBufSize = 32 * 1024 - defaultReadBufSize = 32 * 1024 -) - -// TestKeepaliveServer tests that a server closes connection with a client that doesn't respond to keepalive pings. -func TestKeepaliveServer(t *testing.T) { - serverConfig := &ServerConfig{ - KeepaliveParams: keepalive.ServerParameters{ - Time: 2 * time.Second, - Timeout: 1 * time.Second, - }, - } - server, c, cancel := setUpWithOptions(t, 0, serverConfig, suspended, ConnectOptions{}, func() {}) - defer cancel() - defer server.stop() - defer c.Close() - client, err := net.Dial("tcp", server.lis.Addr().String()) - if err != nil { - t.Fatalf("Failed to dial: %v", err) - } - defer client.Close() - - // Set read deadline on client conn so that it doesn't block forever in errorsome cases. - client.SetDeadline(time.Now().Add(10 * time.Second)) - - if n, err := client.Write(clientPreface); err != nil || n != len(clientPreface) { - t.Fatalf("Error writing client preface; n=%v, err=%v", n, err) - } - framer := newFramer(client, defaultWriteBufSize, defaultReadBufSize, 0) - if err := framer.fr.WriteSettings(http2.Setting{}); err != nil { - t.Fatal("Error writing settings frame:", err) - } - framer.writer.Flush() - // Wait for keepalive logic to close the connection. - time.Sleep(4 * time.Second) - b := make([]byte, 24) - for { - _, err = client.Read(b) - if err == nil { - continue - } - if err != io.EOF { - t.Fatalf("client.Read(_) = _,%v, want io.EOF", err) - } - break - } -} - -// TestKeepaliveServerNegative tests that a server doesn't close connection with a client that responds to keepalive pings. -func TestKeepaliveServerNegative(t *testing.T) { - serverConfig := &ServerConfig{ - KeepaliveParams: keepalive.ServerParameters{ - Time: 2 * time.Second, - Timeout: 1 * time.Second, - }, - } - server, client, cancel := setUpWithOptions(t, 0, serverConfig, suspended, ConnectOptions{}, func() {}) - defer cancel() - defer server.stop() - defer client.Close() - // Give keepalive logic some time by sleeping. - time.Sleep(4 * time.Second) - // Assert that client is still active. - client.mu.Lock() - defer client.mu.Unlock() - if client.state != reachable { - t.Fatalf("Test failed: Expected server-client connection to be healthy.") - } -} - -func TestKeepaliveClientClosesIdleTransport(t *testing.T) { - done := make(chan net.Conn, 1) - tr, cancel := setUpWithNoPingServer(t, ConnectOptions{KeepaliveParams: keepalive.ClientParameters{ - Time: 2 * time.Second, // Keepalive time = 2 sec. - Timeout: 1 * time.Second, // Keepalive timeout = 1 sec. - PermitWithoutStream: true, // Run keepalive even with no RPCs. - }}, done) - defer cancel() - defer tr.Close() - conn, ok := <-done - if !ok { - t.Fatalf("Server didn't return connection object") - } - defer conn.Close() - // Sleep for keepalive to close the connection. - time.Sleep(4 * time.Second) - // Assert that the connection was closed. - tr.mu.Lock() - defer tr.mu.Unlock() - if tr.state == reachable { - t.Fatalf("Test Failed: Expected client transport to have closed.") - } -} - -func TestKeepaliveClientStaysHealthyOnIdleTransport(t *testing.T) { - done := make(chan net.Conn, 1) - tr, cancel := setUpWithNoPingServer(t, ConnectOptions{KeepaliveParams: keepalive.ClientParameters{ - Time: 2 * time.Second, // Keepalive time = 2 sec. - Timeout: 1 * time.Second, // Keepalive timeout = 1 sec. - }}, done) - defer cancel() - defer tr.Close() - conn, ok := <-done - if !ok { - t.Fatalf("server didn't reutrn connection object") - } - defer conn.Close() - // Give keepalive some time. - time.Sleep(4 * time.Second) - // Assert that connections is still healthy. - tr.mu.Lock() - defer tr.mu.Unlock() - if tr.state != reachable { - t.Fatalf("Test failed: Expected client transport to be healthy.") - } -} - -func TestKeepaliveClientClosesWithActiveStreams(t *testing.T) { - done := make(chan net.Conn, 1) - tr, cancel := setUpWithNoPingServer(t, ConnectOptions{KeepaliveParams: keepalive.ClientParameters{ - Time: 2 * time.Second, // Keepalive time = 2 sec. - Timeout: 1 * time.Second, // Keepalive timeout = 1 sec. - }}, done) - defer cancel() - defer tr.Close() - conn, ok := <-done - if !ok { - t.Fatalf("Server didn't return connection object") - } - defer conn.Close() - // Create a stream. - _, err := tr.NewStream(context.Background(), &CallHdr{}) - if err != nil { - t.Fatalf("Failed to create a new stream: %v", err) - } - // Give keepalive some time. - time.Sleep(4 * time.Second) - // Assert that transport was closed. - tr.mu.Lock() - defer tr.mu.Unlock() - if tr.state == reachable { - t.Fatalf("Test failed: Expected client transport to have closed.") - } -} - -func TestKeepaliveClientStaysHealthyWithResponsiveServer(t *testing.T) { - s, tr, cancel := setUpWithOptions(t, 0, &ServerConfig{MaxStreams: math.MaxUint32}, normal, ConnectOptions{KeepaliveParams: keepalive.ClientParameters{ - Time: 2 * time.Second, // Keepalive time = 2 sec. - Timeout: 1 * time.Second, // Keepalive timeout = 1 sec. - PermitWithoutStream: true, // Run keepalive even with no RPCs. - }}, func() {}) - defer cancel() - defer s.stop() - defer tr.Close() - // Give keep alive some time. - time.Sleep(4 * time.Second) - // Assert that transport is healthy. - tr.mu.Lock() - defer tr.mu.Unlock() - if tr.state != reachable { - t.Fatalf("Test failed: Expected client transport to be healthy.") - } -} - -func TestKeepaliveServerEnforcementWithAbusiveClientNoRPC(t *testing.T) { - serverConfig := &ServerConfig{ - KeepalivePolicy: keepalive.EnforcementPolicy{ - MinTime: 2 * time.Second, - }, - } - clientOptions := ConnectOptions{ - KeepaliveParams: keepalive.ClientParameters{ - Time: 50 * time.Millisecond, - Timeout: 1 * time.Second, - PermitWithoutStream: true, - }, - } - server, client, cancel := setUpWithOptions(t, 0, serverConfig, normal, clientOptions, func() {}) - defer cancel() - defer server.stop() - defer client.Close() - - timeout := time.NewTimer(10 * time.Second) - select { - case <-client.GoAway(): - if !timeout.Stop() { - <-timeout.C - } - case <-timeout.C: - t.Fatalf("Test failed: Expected a GoAway from server.") - } - time.Sleep(500 * time.Millisecond) - client.mu.Lock() - defer client.mu.Unlock() - if client.state == reachable { - t.Fatalf("Test failed: Expected the connection to be closed.") - } -} - -func TestKeepaliveServerEnforcementWithAbusiveClientWithRPC(t *testing.T) { - serverConfig := &ServerConfig{ - KeepalivePolicy: keepalive.EnforcementPolicy{ - MinTime: 2 * time.Second, - }, - } - clientOptions := ConnectOptions{ - KeepaliveParams: keepalive.ClientParameters{ - Time: 50 * time.Millisecond, - Timeout: 1 * time.Second, - }, - } - server, client, cancel := setUpWithOptions(t, 0, serverConfig, suspended, clientOptions, func() {}) - defer cancel() - defer server.stop() - defer client.Close() - - if _, err := client.NewStream(context.Background(), &CallHdr{}); err != nil { - t.Fatalf("Client failed to create stream.") - } - timeout := time.NewTimer(10 * time.Second) - select { - case <-client.GoAway(): - if !timeout.Stop() { - <-timeout.C - } - case <-timeout.C: - t.Fatalf("Test failed: Expected a GoAway from server.") - } - time.Sleep(500 * time.Millisecond) - client.mu.Lock() - defer client.mu.Unlock() - if client.state == reachable { - t.Fatalf("Test failed: Expected the connection to be closed.") - } -} - -func TestKeepaliveServerEnforcementWithObeyingClientNoRPC(t *testing.T) { - serverConfig := &ServerConfig{ - KeepalivePolicy: keepalive.EnforcementPolicy{ - MinTime: 100 * time.Millisecond, - PermitWithoutStream: true, - }, - } - clientOptions := ConnectOptions{ - KeepaliveParams: keepalive.ClientParameters{ - Time: 101 * time.Millisecond, - Timeout: 1 * time.Second, - PermitWithoutStream: true, - }, - } - server, client, cancel := setUpWithOptions(t, 0, serverConfig, normal, clientOptions, func() {}) - defer cancel() - defer server.stop() - defer client.Close() - - // Give keepalive enough time. - time.Sleep(3 * time.Second) - // Assert that connection is healthy. - client.mu.Lock() - defer client.mu.Unlock() - if client.state != reachable { - t.Fatalf("Test failed: Expected connection to be healthy.") - } -} - -func TestKeepaliveServerEnforcementWithObeyingClientWithRPC(t *testing.T) { - serverConfig := &ServerConfig{ - KeepalivePolicy: keepalive.EnforcementPolicy{ - MinTime: 100 * time.Millisecond, - }, - } - clientOptions := ConnectOptions{ - KeepaliveParams: keepalive.ClientParameters{ - Time: 101 * time.Millisecond, - Timeout: 1 * time.Second, - }, - } - server, client, cancel := setUpWithOptions(t, 0, serverConfig, suspended, clientOptions, func() {}) - defer cancel() - defer server.stop() - defer client.Close() - - if _, err := client.NewStream(context.Background(), &CallHdr{}); err != nil { - t.Fatalf("Client failed to create stream.") - } - - // Give keepalive enough time. - time.Sleep(3 * time.Second) - // Assert that connection is healthy. - client.mu.Lock() - defer client.mu.Unlock() - if client.state != reachable { - t.Fatalf("Test failed: Expected connection to be healthy.") - } -} - -func TestClientSendAndReceive(t *testing.T) { - server, ct, cancel := setUp(t, 0, math.MaxUint32, normal) - defer cancel() - callHdr := &CallHdr{ - Host: "localhost", - Method: "foo.Small", - } - s1, err1 := ct.NewStream(context.Background(), callHdr) - if err1 != nil { - t.Fatalf("failed to open stream: %v", err1) - } - if s1.id != 1 { - t.Fatalf("wrong stream id: %d", s1.id) - } - s2, err2 := ct.NewStream(context.Background(), callHdr) - if err2 != nil { - t.Fatalf("failed to open stream: %v", err2) - } - if s2.id != 3 { - t.Fatalf("wrong stream id: %d", s2.id) - } - opts := Options{Last: true} - if err := ct.Write(s1, nil, expectedRequest, &opts); err != nil && err != io.EOF { - t.Fatalf("failed to send data: %v", err) - } - p := make([]byte, len(expectedResponse)) - _, recvErr := s1.Read(p) - if recvErr != nil || !bytes.Equal(p, expectedResponse) { - t.Fatalf("Error: %v, want ; Result: %v, want %v", recvErr, p, expectedResponse) - } - _, recvErr = s1.Read(p) - if recvErr != io.EOF { - t.Fatalf("Error: %v; want ", recvErr) - } - ct.Close() - server.stop() -} - -func TestClientErrorNotify(t *testing.T) { - server, ct, cancel := setUp(t, 0, math.MaxUint32, normal) - defer cancel() - go server.stop() - // ct.reader should detect the error and activate ct.Error(). - <-ct.Error() - ct.Close() -} - -func performOneRPC(ct ClientTransport) { - callHdr := &CallHdr{ - Host: "localhost", - Method: "foo.Small", - } - s, err := ct.NewStream(context.Background(), callHdr) - if err != nil { - return - } - opts := Options{Last: true} - if err := ct.Write(s, []byte{}, expectedRequest, &opts); err == nil || err == io.EOF { - time.Sleep(5 * time.Millisecond) - // The following s.Recv()'s could error out because the - // underlying transport is gone. - // - // Read response - p := make([]byte, len(expectedResponse)) - s.Read(p) - // Read io.EOF - s.Read(p) - } -} - -func TestClientMix(t *testing.T) { - s, ct, cancel := setUp(t, 0, math.MaxUint32, normal) - defer cancel() - go func(s *server) { - time.Sleep(5 * time.Second) - s.stop() - }(s) - go func(ct ClientTransport) { - <-ct.Error() - ct.Close() - }(ct) - for i := 0; i < 1000; i++ { - time.Sleep(10 * time.Millisecond) - go performOneRPC(ct) - } -} - -func TestLargeMessage(t *testing.T) { - server, ct, cancel := setUp(t, 0, math.MaxUint32, normal) - defer cancel() - callHdr := &CallHdr{ - Host: "localhost", - Method: "foo.Large", - } - var wg sync.WaitGroup - for i := 0; i < 2; i++ { - wg.Add(1) - go func() { - defer wg.Done() - s, err := ct.NewStream(context.Background(), callHdr) - if err != nil { - t.Errorf("%v.NewStream(_, _) = _, %v, want _, ", ct, err) - } - if err := ct.Write(s, []byte{}, expectedRequestLarge, &Options{Last: true}); err != nil && err != io.EOF { - t.Errorf("%v.Write(_, _, _) = %v, want ", ct, err) - } - p := make([]byte, len(expectedResponseLarge)) - if _, err := s.Read(p); err != nil || !bytes.Equal(p, expectedResponseLarge) { - t.Errorf("s.Read(%v) = _, %v, want %v, ", err, p, expectedResponse) - } - if _, err = s.Read(p); err != io.EOF { - t.Errorf("Failed to complete the stream %v; want ", err) - } - }() - } - wg.Wait() - ct.Close() - server.stop() -} - -func TestLargeMessageWithDelayRead(t *testing.T) { - // Disable dynamic flow control. - sc := &ServerConfig{ - InitialWindowSize: defaultWindowSize, - InitialConnWindowSize: defaultWindowSize, - } - co := ConnectOptions{ - InitialWindowSize: defaultWindowSize, - InitialConnWindowSize: defaultWindowSize, - } - server, ct, cancel := setUpWithOptions(t, 0, sc, delayRead, co, func() {}) - defer cancel() - defer server.stop() - defer ct.Close() - server.mu.Lock() - ready := server.ready - server.mu.Unlock() - callHdr := &CallHdr{ - Host: "localhost", - Method: "foo.Large", - } - ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(time.Second*10)) - defer cancel() - s, err := ct.NewStream(ctx, callHdr) - if err != nil { - t.Fatalf("%v.NewStream(_, _) = _, %v, want _, ", ct, err) - return - } - // Wait for server's handerler to be initialized - select { - case <-ready: - case <-ctx.Done(): - t.Fatalf("Client timed out waiting for server handler to be initialized.") - } - server.mu.Lock() - serviceHandler := server.h - server.mu.Unlock() - var ( - mu sync.Mutex - total int - ) - s.wq.replenish = func(n int) { - mu.Lock() - total += n - mu.Unlock() - s.wq.realReplenish(n) - } - getTotal := func() int { - mu.Lock() - defer mu.Unlock() - return total - } - done := make(chan struct{}) - defer close(done) - go func() { - for { - select { - // Prevent goroutine from leaking in case of error. - case <-done: - return - default: - } - if getTotal() == defaultWindowSize { - // unblock server to be able to read and - // thereby send stream level window update. - close(serviceHandler.getNotified) - return - } - runtime.Gosched() - } - }() - // This write will cause client to run out of stream level, - // flow control and the other side won't send a window update - // until that happens. - if err := ct.Write(s, []byte{}, expectedRequestLarge, &Options{}); err != nil { - t.Fatalf("write(_, _, _) = %v, want ", err) - } - p := make([]byte, len(expectedResponseLarge)) - - // Wait for the other side to run out of stream level flow control before - // reading and thereby sending a window update. - select { - case <-serviceHandler.notify: - case <-ctx.Done(): - t.Fatalf("Client timed out") - } - if _, err := s.Read(p); err != nil || !bytes.Equal(p, expectedResponseLarge) { - t.Fatalf("s.Read(_) = _, %v, want _, ", err) - } - if err := ct.Write(s, []byte{}, expectedRequestLarge, &Options{Last: true}); err != nil { - t.Fatalf("Write(_, _, _) = %v, want ", err) - } - if _, err = s.Read(p); err != io.EOF { - t.Fatalf("Failed to complete the stream %v; want ", err) - } -} - -func TestGracefulClose(t *testing.T) { - server, ct, cancel := setUp(t, 0, math.MaxUint32, pingpong) - defer func() { - // Stop the server's listener to make the server's goroutines terminate - // (after the last active stream is done). - server.lis.Close() - // Check for goroutine leaks (i.e. GracefulClose with an active stream - // doesn't eventually close the connection when that stream completes). - leakcheck.Check(t) - // Correctly clean up the server - server.stop() - cancel() - }() - ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(time.Second*10)) - defer cancel() - s, err := ct.NewStream(ctx, &CallHdr{}) - if err != nil { - t.Fatalf("NewStream(_, _) = _, %v, want _, ", err) - } - msg := make([]byte, 1024) - outgoingHeader := make([]byte, 5) - outgoingHeader[0] = byte(0) - binary.BigEndian.PutUint32(outgoingHeader[1:], uint32(len(msg))) - incomingHeader := make([]byte, 5) - if err := ct.Write(s, outgoingHeader, msg, &Options{}); err != nil { - t.Fatalf("Error while writing: %v", err) - } - if _, err := s.Read(incomingHeader); err != nil { - t.Fatalf("Error while reading: %v", err) - } - sz := binary.BigEndian.Uint32(incomingHeader[1:]) - recvMsg := make([]byte, int(sz)) - if _, err := s.Read(recvMsg); err != nil { - t.Fatalf("Error while reading: %v", err) - } - if err = ct.GracefulClose(); err != nil { - t.Fatalf("GracefulClose() = %v, want ", err) - } - var wg sync.WaitGroup - // Expect the failure for all the follow-up streams because ct has been closed gracefully. - for i := 0; i < 200; i++ { - wg.Add(1) - go func() { - defer wg.Done() - str, err := ct.NewStream(context.Background(), &CallHdr{}) - if err == ErrConnClosing { - return - } else if err != nil { - t.Errorf("_.NewStream(_, _) = _, %v, want _, %v", err, ErrConnClosing) - return - } - ct.Write(str, nil, nil, &Options{Last: true}) - if _, err := str.Read(make([]byte, 8)); err != errStreamDrain && err != ErrConnClosing { - t.Errorf("_.Read(_) = _, %v, want _, %v or %v", err, errStreamDrain, ErrConnClosing) - } - }() - } - ct.Write(s, nil, nil, &Options{Last: true}) - if _, err := s.Read(incomingHeader); err != io.EOF { - t.Fatalf("Client expected EOF from the server. Got: %v", err) - } - // The stream which was created before graceful close can still proceed. - wg.Wait() -} - -func TestLargeMessageSuspension(t *testing.T) { - server, ct, cancelsvr := setUp(t, 0, math.MaxUint32, suspended) - defer cancelsvr() - callHdr := &CallHdr{ - Host: "localhost", - Method: "foo.Large", - } - // Set a long enough timeout for writing a large message out. - ctx, cancel := context.WithTimeout(context.Background(), time.Second) - defer cancel() - s, err := ct.NewStream(ctx, callHdr) - if err != nil { - t.Fatalf("failed to open stream: %v", err) - } - // Launch a goroutine simillar to the stream monitoring goroutine in - // stream.go to keep track of context timeout and call CloseStream. - go func() { - <-ctx.Done() - ct.CloseStream(s, ContextErr(ctx.Err())) - }() - // Write should not be done successfully due to flow control. - msg := make([]byte, initialWindowSize*8) - ct.Write(s, nil, msg, &Options{}) - err = ct.Write(s, nil, msg, &Options{Last: true}) - if err != errStreamDone { - t.Fatalf("Write got %v, want io.EOF", err) - } - expectedErr := status.Error(codes.DeadlineExceeded, context.DeadlineExceeded.Error()) - if _, err := s.Read(make([]byte, 8)); err.Error() != expectedErr.Error() { - t.Fatalf("Read got %v of type %T, want %v", err, err, expectedErr) - } - ct.Close() - server.stop() -} - -func TestMaxStreams(t *testing.T) { - serverConfig := &ServerConfig{ - MaxStreams: 1, - } - server, ct, cancel := setUpWithOptions(t, 0, serverConfig, suspended, ConnectOptions{}, func() {}) - defer cancel() - defer ct.Close() - defer server.stop() - callHdr := &CallHdr{ - Host: "localhost", - Method: "foo.Large", - } - s, err := ct.NewStream(context.Background(), callHdr) - if err != nil { - t.Fatalf("Failed to open stream: %v", err) - } - // Keep creating streams until one fails with deadline exceeded, marking the application - // of server settings on client. - slist := []*Stream{} - pctx, cancel := context.WithCancel(context.Background()) - defer cancel() - timer := time.NewTimer(time.Second * 10) - expectedErr := status.Error(codes.DeadlineExceeded, context.DeadlineExceeded.Error()) - for { - select { - case <-timer.C: - t.Fatalf("Test timeout: client didn't receive server settings.") - default: - } - ctx, cancel := context.WithDeadline(pctx, time.Now().Add(time.Second)) - // This is only to get rid of govet. All these context are based on a base - // context which is canceled at the end of the test. - defer cancel() - if str, err := ct.NewStream(ctx, callHdr); err == nil { - slist = append(slist, str) - continue - } else if err.Error() != expectedErr.Error() { - t.Fatalf("ct.NewStream(_,_) = _, %v, want _, %v", err, expectedErr) - } - timer.Stop() - break - } - done := make(chan struct{}) - // Try and create a new stream. - go func() { - defer close(done) - ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(time.Second*10)) - defer cancel() - if _, err := ct.NewStream(ctx, callHdr); err != nil { - t.Errorf("Failed to open stream: %v", err) - } - }() - // Close all the extra streams created and make sure the new stream is not created. - for _, str := range slist { - ct.CloseStream(str, nil) - } - select { - case <-done: - t.Fatalf("Test failed: didn't expect new stream to be created just yet.") - default: - } - // Close the first stream created so that the new stream can finally be created. - ct.CloseStream(s, nil) - <-done - ct.Close() - <-ct.writerDone - if ct.maxConcurrentStreams != 1 { - t.Fatalf("ct.maxConcurrentStreams: %d, want 1", ct.maxConcurrentStreams) - } -} - -func TestServerContextCanceledOnClosedConnection(t *testing.T) { - server, ct, cancel := setUp(t, 0, math.MaxUint32, suspended) - defer cancel() - callHdr := &CallHdr{ - Host: "localhost", - Method: "foo", - } - var sc *http2Server - // Wait until the server transport is setup. - for { - server.mu.Lock() - if len(server.conns) == 0 { - server.mu.Unlock() - time.Sleep(time.Millisecond) - continue - } - for k := range server.conns { - var ok bool - sc, ok = k.(*http2Server) - if !ok { - t.Fatalf("Failed to convert %v to *http2Server", k) - } - } - server.mu.Unlock() - break - } - s, err := ct.NewStream(context.Background(), callHdr) - if err != nil { - t.Fatalf("Failed to open stream: %v", err) - } - ct.controlBuf.put(&dataFrame{ - streamID: s.id, - endStream: false, - h: nil, - d: make([]byte, http2MaxFrameLen), - onEachWrite: func() {}, - }) - // Loop until the server side stream is created. - var ss *Stream - for { - time.Sleep(time.Second) - sc.mu.Lock() - if len(sc.activeStreams) == 0 { - sc.mu.Unlock() - continue - } - ss = sc.activeStreams[s.id] - sc.mu.Unlock() - break - } - ct.Close() - select { - case <-ss.Context().Done(): - if ss.Context().Err() != context.Canceled { - t.Fatalf("ss.Context().Err() got %v, want %v", ss.Context().Err(), context.Canceled) - } - case <-time.After(5 * time.Second): - t.Fatalf("Failed to cancel the context of the sever side stream.") - } - server.stop() -} - -func TestClientConnDecoupledFromApplicationRead(t *testing.T) { - connectOptions := ConnectOptions{ - InitialWindowSize: defaultWindowSize, - InitialConnWindowSize: defaultWindowSize, - } - server, client, cancel := setUpWithOptions(t, 0, &ServerConfig{}, notifyCall, connectOptions, func() {}) - defer cancel() - defer server.stop() - defer client.Close() - - waitWhileTrue(t, func() (bool, error) { - server.mu.Lock() - defer server.mu.Unlock() - - if len(server.conns) == 0 { - return true, fmt.Errorf("timed-out while waiting for connection to be created on the server") - } - return false, nil - }) - - var st *http2Server - server.mu.Lock() - for k := range server.conns { - st = k.(*http2Server) - } - notifyChan := make(chan struct{}) - server.h.notify = notifyChan - server.mu.Unlock() - cstream1, err := client.NewStream(context.Background(), &CallHdr{}) - if err != nil { - t.Fatalf("Client failed to create first stream. Err: %v", err) - } - - <-notifyChan - var sstream1 *Stream - // Access stream on the server. - st.mu.Lock() - for _, v := range st.activeStreams { - if v.id == cstream1.id { - sstream1 = v - } - } - st.mu.Unlock() - if sstream1 == nil { - t.Fatalf("Didn't find stream corresponding to client cstream.id: %v on the server", cstream1.id) - } - // Exhaust client's connection window. - if err := st.Write(sstream1, []byte{}, make([]byte, defaultWindowSize), &Options{}); err != nil { - t.Fatalf("Server failed to write data. Err: %v", err) - } - notifyChan = make(chan struct{}) - server.mu.Lock() - server.h.notify = notifyChan - server.mu.Unlock() - // Create another stream on client. - cstream2, err := client.NewStream(context.Background(), &CallHdr{}) - if err != nil { - t.Fatalf("Client failed to create second stream. Err: %v", err) - } - <-notifyChan - var sstream2 *Stream - st.mu.Lock() - for _, v := range st.activeStreams { - if v.id == cstream2.id { - sstream2 = v - } - } - st.mu.Unlock() - if sstream2 == nil { - t.Fatalf("Didn't find stream corresponding to client cstream.id: %v on the server", cstream2.id) - } - // Server should be able to send data on the new stream, even though the client hasn't read anything on the first stream. - if err := st.Write(sstream2, []byte{}, make([]byte, defaultWindowSize), &Options{}); err != nil { - t.Fatalf("Server failed to write data. Err: %v", err) - } - - // Client should be able to read data on second stream. - if _, err := cstream2.Read(make([]byte, defaultWindowSize)); err != nil { - t.Fatalf("_.Read(_) = _, %v, want _, ", err) - } - - // Client should be able to read data on first stream. - if _, err := cstream1.Read(make([]byte, defaultWindowSize)); err != nil { - t.Fatalf("_.Read(_) = _, %v, want _, ", err) - } -} - -func TestServerConnDecoupledFromApplicationRead(t *testing.T) { - serverConfig := &ServerConfig{ - InitialWindowSize: defaultWindowSize, - InitialConnWindowSize: defaultWindowSize, - } - server, client, cancel := setUpWithOptions(t, 0, serverConfig, suspended, ConnectOptions{}, func() {}) - defer cancel() - defer server.stop() - defer client.Close() - waitWhileTrue(t, func() (bool, error) { - server.mu.Lock() - defer server.mu.Unlock() - - if len(server.conns) == 0 { - return true, fmt.Errorf("timed-out while waiting for connection to be created on the server") - } - return false, nil - }) - var st *http2Server - server.mu.Lock() - for k := range server.conns { - st = k.(*http2Server) - } - server.mu.Unlock() - cstream1, err := client.NewStream(context.Background(), &CallHdr{}) - if err != nil { - t.Fatalf("Failed to create 1st stream. Err: %v", err) - } - // Exhaust server's connection window. - if err := client.Write(cstream1, nil, make([]byte, defaultWindowSize), &Options{Last: true}); err != nil { - t.Fatalf("Client failed to write data. Err: %v", err) - } - //Client should be able to create another stream and send data on it. - cstream2, err := client.NewStream(context.Background(), &CallHdr{}) - if err != nil { - t.Fatalf("Failed to create 2nd stream. Err: %v", err) - } - if err := client.Write(cstream2, nil, make([]byte, defaultWindowSize), &Options{}); err != nil { - t.Fatalf("Client failed to write data. Err: %v", err) - } - // Get the streams on server. - waitWhileTrue(t, func() (bool, error) { - st.mu.Lock() - defer st.mu.Unlock() - - if len(st.activeStreams) != 2 { - return true, fmt.Errorf("timed-out while waiting for server to have created the streams") - } - return false, nil - }) - var sstream1 *Stream - st.mu.Lock() - for _, v := range st.activeStreams { - if v.id == 1 { - sstream1 = v - } - } - st.mu.Unlock() - // Reading from the stream on server should succeed. - if _, err := sstream1.Read(make([]byte, defaultWindowSize)); err != nil { - t.Fatalf("_.Read(_) = %v, want ", err) - } - - if _, err := sstream1.Read(make([]byte, 1)); err != io.EOF { - t.Fatalf("_.Read(_) = %v, want io.EOF", err) - } - -} - -func TestServerWithMisbehavedClient(t *testing.T) { - server := setUpServerOnly(t, 0, &ServerConfig{}, suspended) - defer server.stop() - // Create a client that can override server stream quota. - mconn, err := net.Dial("tcp", server.lis.Addr().String()) - if err != nil { - t.Fatalf("Clent failed to dial:%v", err) - } - defer mconn.Close() - if err := mconn.SetWriteDeadline(time.Now().Add(time.Second * 10)); err != nil { - t.Fatalf("Failed to set write deadline: %v", err) - } - if n, err := mconn.Write(clientPreface); err != nil || n != len(clientPreface) { - t.Fatalf("mconn.Write(clientPreface) = %d, %v, want %d, ", n, err, len(clientPreface)) - } - // success chan indicates that reader received a RSTStream from server. - success := make(chan struct{}) - var mu sync.Mutex - framer := http2.NewFramer(mconn, mconn) - if err := framer.WriteSettings(); err != nil { - t.Fatalf("Error while writing settings: %v", err) - } - go func() { // Launch a reader for this misbehaving client. - for { - frame, err := framer.ReadFrame() - if err != nil { - return - } - switch frame := frame.(type) { - case *http2.PingFrame: - // Write ping ack back so that server's BDP estimation works right. - mu.Lock() - framer.WritePing(true, frame.Data) - mu.Unlock() - case *http2.RSTStreamFrame: - if frame.Header().StreamID != 1 || http2.ErrCode(frame.ErrCode) != http2.ErrCodeFlowControl { - t.Errorf("RST stream received with streamID: %d and code: %v, want streamID: 1 and code: http2.ErrCodeFlowControl", frame.Header().StreamID, http2.ErrCode(frame.ErrCode)) - } - close(success) - return - default: - // Do nothing. - } - - } - }() - // Create a stream. - var buf bytes.Buffer - henc := hpack.NewEncoder(&buf) - // TODO(mmukhi): Remove unnecessary fields. - if err := henc.WriteField(hpack.HeaderField{Name: ":method", Value: "POST"}); err != nil { - t.Fatalf("Error while encoding header: %v", err) - } - if err := henc.WriteField(hpack.HeaderField{Name: ":path", Value: "foo"}); err != nil { - t.Fatalf("Error while encoding header: %v", err) - } - if err := henc.WriteField(hpack.HeaderField{Name: ":authority", Value: "localhost"}); err != nil { - t.Fatalf("Error while encoding header: %v", err) - } - if err := henc.WriteField(hpack.HeaderField{Name: "content-type", Value: "application/grpc"}); err != nil { - t.Fatalf("Error while encoding header: %v", err) - } - mu.Lock() - if err := framer.WriteHeaders(http2.HeadersFrameParam{StreamID: 1, BlockFragment: buf.Bytes(), EndHeaders: true}); err != nil { - mu.Unlock() - t.Fatalf("Error while writing headers: %v", err) - } - mu.Unlock() - - // Test server behavior for violation of stream flow control window size restriction. - timer := time.NewTimer(time.Second * 5) - dbuf := make([]byte, http2MaxFrameLen) - for { - select { - case <-timer.C: - t.Fatalf("Test timed out.") - case <-success: - return - default: - } - mu.Lock() - if err := framer.WriteData(1, false, dbuf); err != nil { - mu.Unlock() - // Error here means the server could have closed the connection due to flow control - // violation. Make sure that is the case by waiting for success chan to be closed. - select { - case <-timer.C: - t.Fatalf("Error while writing data: %v", err) - case <-success: - return - } - } - mu.Unlock() - // This for loop is capable of hogging the CPU and cause starvation - // in Go versions prior to 1.9, - // in single CPU environment. Explicitly relinquish processor. - runtime.Gosched() - } -} - -func TestClientWithMisbehavedServer(t *testing.T) { - // Create a misbehaving server. - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - t.Fatalf("Error while listening: %v", err) - } - defer lis.Close() - // success chan indicates that the server received - // RSTStream from the client. - success := make(chan struct{}) - go func() { // Launch the misbehaving server. - sconn, err := lis.Accept() - if err != nil { - t.Errorf("Error while accepting: %v", err) - return - } - defer sconn.Close() - if _, err := io.ReadFull(sconn, make([]byte, len(clientPreface))); err != nil { - t.Errorf("Error while reading clieng preface: %v", err) - return - } - sfr := http2.NewFramer(sconn, sconn) - if err := sfr.WriteSettingsAck(); err != nil { - t.Errorf("Error while writing settings: %v", err) - return - } - var mu sync.Mutex - for { - frame, err := sfr.ReadFrame() - if err != nil { - return - } - switch frame := frame.(type) { - case *http2.HeadersFrame: - // When the client creates a stream, violate the stream flow control. - go func() { - buf := make([]byte, http2MaxFrameLen) - for { - mu.Lock() - if err := sfr.WriteData(1, false, buf); err != nil { - mu.Unlock() - return - } - mu.Unlock() - // This for loop is capable of hogging the CPU and cause starvation - // in Go versions prior to 1.9, - // in single CPU environment. Explicitly relinquish processor. - runtime.Gosched() - } - }() - case *http2.RSTStreamFrame: - if frame.Header().StreamID != 1 || http2.ErrCode(frame.ErrCode) != http2.ErrCodeFlowControl { - t.Errorf("RST stream received with streamID: %d and code: %v, want streamID: 1 and code: http2.ErrCodeFlowControl", frame.Header().StreamID, http2.ErrCode(frame.ErrCode)) - } - close(success) - return - case *http2.PingFrame: - mu.Lock() - sfr.WritePing(true, frame.Data) - mu.Unlock() - default: - } - } - }() - connectCtx, cancel := context.WithDeadline(context.Background(), time.Now().Add(2*time.Second)) - defer cancel() - ct, err := NewClientTransport(connectCtx, context.Background(), TargetInfo{Addr: lis.Addr().String()}, ConnectOptions{}, func() {}) - if err != nil { - t.Fatalf("Error while creating client transport: %v", err) - } - defer ct.Close() - str, err := ct.NewStream(context.Background(), &CallHdr{}) - if err != nil { - t.Fatalf("Error while creating stream: %v", err) - } - timer := time.NewTimer(time.Second * 5) - go func() { // This go routine mimics the one in stream.go to call CloseStream. - <-str.Done() - ct.CloseStream(str, nil) - }() - select { - case <-timer.C: - t.Fatalf("Test timed-out.") - case <-success: - } -} - -var encodingTestStatus = status.New(codes.Internal, "\n") - -func TestEncodingRequiredStatus(t *testing.T) { - server, ct, cancel := setUp(t, 0, math.MaxUint32, encodingRequiredStatus) - defer cancel() - callHdr := &CallHdr{ - Host: "localhost", - Method: "foo", - } - s, err := ct.NewStream(context.Background(), callHdr) - if err != nil { - return - } - opts := Options{Last: true} - if err := ct.Write(s, nil, expectedRequest, &opts); err != nil && err != errStreamDone { - t.Fatalf("Failed to write the request: %v", err) - } - p := make([]byte, http2MaxFrameLen) - if _, err := s.trReader.(*transportReader).Read(p); err != io.EOF { - t.Fatalf("Read got error %v, want %v", err, io.EOF) - } - if !reflect.DeepEqual(s.Status(), encodingTestStatus) { - t.Fatalf("stream with status %v, want %v", s.Status(), encodingTestStatus) - } - ct.Close() - server.stop() -} - -func TestInvalidHeaderField(t *testing.T) { - server, ct, cancel := setUp(t, 0, math.MaxUint32, invalidHeaderField) - defer cancel() - callHdr := &CallHdr{ - Host: "localhost", - Method: "foo", - } - s, err := ct.NewStream(context.Background(), callHdr) - if err != nil { - return - } - p := make([]byte, http2MaxFrameLen) - _, err = s.trReader.(*transportReader).Read(p) - if se, ok := status.FromError(err); !ok || se.Code() != codes.Internal || !strings.Contains(err.Error(), expectedInvalidHeaderField) { - t.Fatalf("Read got error %v, want error with code %s and contains %q", err, codes.Internal, expectedInvalidHeaderField) - } - ct.Close() - server.stop() -} - -func TestIsReservedHeader(t *testing.T) { - tests := []struct { - h string - want bool - }{ - {"", false}, // but should be rejected earlier - {"foo", false}, - {"content-type", true}, - {"user-agent", true}, - {":anything", true}, - {"grpc-message-type", true}, - {"grpc-encoding", true}, - {"grpc-message", true}, - {"grpc-status", true}, - {"grpc-timeout", true}, - {"te", true}, - } - for _, tt := range tests { - got := isReservedHeader(tt.h) - if got != tt.want { - t.Errorf("isReservedHeader(%q) = %v; want %v", tt.h, got, tt.want) - } - } -} - -func TestContextErr(t *testing.T) { - for _, test := range []struct { - // input - errIn error - // outputs - errOut error - }{ - {context.DeadlineExceeded, status.Error(codes.DeadlineExceeded, context.DeadlineExceeded.Error())}, - {context.Canceled, status.Error(codes.Canceled, context.Canceled.Error())}, - } { - err := ContextErr(test.errIn) - if err.Error() != test.errOut.Error() { - t.Fatalf("ContextErr{%v} = %v \nwant %v", test.errIn, err, test.errOut) - } - } -} - -func max(a, b int32) int32 { - if a > b { - return a - } - return b -} - -type windowSizeConfig struct { - serverStream int32 - serverConn int32 - clientStream int32 - clientConn int32 -} - -func TestAccountCheckWindowSizeWithLargeWindow(t *testing.T) { - wc := windowSizeConfig{ - serverStream: 10 * 1024 * 1024, - serverConn: 12 * 1024 * 1024, - clientStream: 6 * 1024 * 1024, - clientConn: 8 * 1024 * 1024, - } - testFlowControlAccountCheck(t, 1024*1024, wc) -} - -func TestAccountCheckWindowSizeWithSmallWindow(t *testing.T) { - wc := windowSizeConfig{ - serverStream: defaultWindowSize, - // Note this is smaller than initialConnWindowSize which is the current default. - serverConn: defaultWindowSize, - clientStream: defaultWindowSize, - clientConn: defaultWindowSize, - } - testFlowControlAccountCheck(t, 1024*1024, wc) -} - -func TestAccountCheckDynamicWindowSmallMessage(t *testing.T) { - testFlowControlAccountCheck(t, 1024, windowSizeConfig{}) -} - -func TestAccountCheckDynamicWindowLargeMessage(t *testing.T) { - testFlowControlAccountCheck(t, 1024*1024, windowSizeConfig{}) -} - -func testFlowControlAccountCheck(t *testing.T, msgSize int, wc windowSizeConfig) { - sc := &ServerConfig{ - InitialWindowSize: wc.serverStream, - InitialConnWindowSize: wc.serverConn, - } - co := ConnectOptions{ - InitialWindowSize: wc.clientStream, - InitialConnWindowSize: wc.clientConn, - } - server, client, cancel := setUpWithOptions(t, 0, sc, pingpong, co, func() {}) - defer cancel() - defer server.stop() - defer client.Close() - waitWhileTrue(t, func() (bool, error) { - server.mu.Lock() - defer server.mu.Unlock() - if len(server.conns) == 0 { - return true, fmt.Errorf("timed out while waiting for server transport to be created") - } - return false, nil - }) - var st *http2Server - server.mu.Lock() - for k := range server.conns { - st = k.(*http2Server) - } - server.mu.Unlock() - const numStreams = 10 - clientStreams := make([]*Stream, numStreams) - for i := 0; i < numStreams; i++ { - var err error - clientStreams[i], err = client.NewStream(context.Background(), &CallHdr{}) - if err != nil { - t.Fatalf("Failed to create stream. Err: %v", err) - } - } - var wg sync.WaitGroup - // For each stream send pingpong messages to the server. - for _, stream := range clientStreams { - wg.Add(1) - go func(stream *Stream) { - defer wg.Done() - buf := make([]byte, msgSize+5) - buf[0] = byte(0) - binary.BigEndian.PutUint32(buf[1:], uint32(msgSize)) - opts := Options{} - header := make([]byte, 5) - for i := 1; i <= 10; i++ { - if err := client.Write(stream, nil, buf, &opts); err != nil { - t.Errorf("Error on client while writing message: %v", err) - return - } - if _, err := stream.Read(header); err != nil { - t.Errorf("Error on client while reading data frame header: %v", err) - return - } - sz := binary.BigEndian.Uint32(header[1:]) - recvMsg := make([]byte, int(sz)) - if _, err := stream.Read(recvMsg); err != nil { - t.Errorf("Error on client while reading data: %v", err) - return - } - if len(recvMsg) != msgSize { - t.Errorf("Length of message received by client: %v, want: %v", len(recvMsg), msgSize) - return - } - } - }(stream) - } - wg.Wait() - serverStreams := map[uint32]*Stream{} - loopyClientStreams := map[uint32]*outStream{} - loopyServerStreams := map[uint32]*outStream{} - // Get all the streams from server reader and writer and client writer. - st.mu.Lock() - for _, stream := range clientStreams { - id := stream.id - serverStreams[id] = st.activeStreams[id] - loopyServerStreams[id] = st.loopy.estdStreams[id] - loopyClientStreams[id] = client.loopy.estdStreams[id] - - } - st.mu.Unlock() - // Close all streams - for _, stream := range clientStreams { - client.Write(stream, nil, nil, &Options{Last: true}) - if _, err := stream.Read(make([]byte, 5)); err != io.EOF { - t.Fatalf("Client expected an EOF from the server. Got: %v", err) - } - } - // Close down both server and client so that their internals can be read without data - // races. - client.Close() - st.Close() - <-st.readerDone - <-st.writerDone - <-client.readerDone - <-client.writerDone - for _, cstream := range clientStreams { - id := cstream.id - sstream := serverStreams[id] - loopyServerStream := loopyServerStreams[id] - loopyClientStream := loopyClientStreams[id] - // Check stream flow control. - if int(cstream.fc.limit+cstream.fc.delta-cstream.fc.pendingData-cstream.fc.pendingUpdate) != int(st.loopy.oiws)-loopyServerStream.bytesOutStanding { - t.Fatalf("Account mismatch: client stream inflow limit(%d) + delta(%d) - pendingData(%d) - pendingUpdate(%d) != server outgoing InitialWindowSize(%d) - outgoingStream.bytesOutStanding(%d)", cstream.fc.limit, cstream.fc.delta, cstream.fc.pendingData, cstream.fc.pendingUpdate, st.loopy.oiws, loopyServerStream.bytesOutStanding) - } - if int(sstream.fc.limit+sstream.fc.delta-sstream.fc.pendingData-sstream.fc.pendingUpdate) != int(client.loopy.oiws)-loopyClientStream.bytesOutStanding { - t.Fatalf("Account mismatch: server stream inflow limit(%d) + delta(%d) - pendingData(%d) - pendingUpdate(%d) != client outgoing InitialWindowSize(%d) - outgoingStream.bytesOutStanding(%d)", sstream.fc.limit, sstream.fc.delta, sstream.fc.pendingData, sstream.fc.pendingUpdate, client.loopy.oiws, loopyClientStream.bytesOutStanding) - } - } - // Check transport flow control. - if client.fc.limit != client.fc.unacked+st.loopy.sendQuota { - t.Fatalf("Account mismatch: client transport inflow(%d) != client unacked(%d) + server sendQuota(%d)", client.fc.limit, client.fc.unacked, st.loopy.sendQuota) - } - if st.fc.limit != st.fc.unacked+client.loopy.sendQuota { - t.Fatalf("Account mismatch: server transport inflow(%d) != server unacked(%d) + client sendQuota(%d)", st.fc.limit, st.fc.unacked, client.loopy.sendQuota) - } -} - -func waitWhileTrue(t *testing.T, condition func() (bool, error)) { - var ( - wait bool - err error - ) - timer := time.NewTimer(time.Second * 5) - for { - wait, err = condition() - if wait { - select { - case <-timer.C: - t.Fatalf(err.Error()) - default: - time.Sleep(50 * time.Millisecond) - continue - } - } - if !timer.Stop() { - <-timer.C - } - break - } -} - -// A function of type writeHeaders writes out -// http status with the given stream ID using the given framer. -type writeHeaders func(*http2.Framer, uint32, int) error - -func writeOneHeader(framer *http2.Framer, sid uint32, httpStatus int) error { - var buf bytes.Buffer - henc := hpack.NewEncoder(&buf) - henc.WriteField(hpack.HeaderField{Name: ":status", Value: fmt.Sprint(httpStatus)}) - return framer.WriteHeaders(http2.HeadersFrameParam{ - StreamID: sid, - BlockFragment: buf.Bytes(), - EndStream: true, - EndHeaders: true, - }) -} - -func writeTwoHeaders(framer *http2.Framer, sid uint32, httpStatus int) error { - var buf bytes.Buffer - henc := hpack.NewEncoder(&buf) - henc.WriteField(hpack.HeaderField{ - Name: ":status", - Value: fmt.Sprint(http.StatusOK), - }) - if err := framer.WriteHeaders(http2.HeadersFrameParam{ - StreamID: sid, - BlockFragment: buf.Bytes(), - EndHeaders: true, - }); err != nil { - return err - } - buf.Reset() - henc.WriteField(hpack.HeaderField{ - Name: ":status", - Value: fmt.Sprint(httpStatus), - }) - return framer.WriteHeaders(http2.HeadersFrameParam{ - StreamID: sid, - BlockFragment: buf.Bytes(), - EndStream: true, - EndHeaders: true, - }) -} - -type httpServer struct { - conn net.Conn - httpStatus int - wh writeHeaders -} - -func (s *httpServer) start(t *testing.T, lis net.Listener) { - // Launch an HTTP server to send back header with httpStatus. - go func() { - var err error - s.conn, err = lis.Accept() - if err != nil { - t.Errorf("Error accepting connection: %v", err) - return - } - // Read preface sent by client. - if _, err = io.ReadFull(s.conn, make([]byte, len(http2.ClientPreface))); err != nil { - t.Errorf("Error at server-side while reading preface from client. Err: %v", err) - return - } - reader := bufio.NewReaderSize(s.conn, defaultWriteBufSize) - writer := bufio.NewWriterSize(s.conn, defaultReadBufSize) - framer := http2.NewFramer(writer, reader) - if err = framer.WriteSettingsAck(); err != nil { - t.Errorf("Error at server-side while sending Settings ack. Err: %v", err) - return - } - var sid uint32 - // Read frames until a header is received. - for { - frame, err := framer.ReadFrame() - if err != nil { - t.Errorf("Error at server-side while reading frame. Err: %v", err) - return - } - if hframe, ok := frame.(*http2.HeadersFrame); ok { - sid = hframe.Header().StreamID - break - } - } - if err = s.wh(framer, sid, s.httpStatus); err != nil { - t.Errorf("Error at server-side while writing headers. Err: %v", err) - return - } - writer.Flush() - }() -} - -func (s *httpServer) cleanUp() { - if s.conn != nil { - s.conn.Close() - } -} - -func setUpHTTPStatusTest(t *testing.T, httpStatus int, wh writeHeaders) (stream *Stream, cleanUp func(), cancel func()) { - var ( - err error - lis net.Listener - server *httpServer - client ClientTransport - ) - cleanUp = func() { - if lis != nil { - lis.Close() - } - if server != nil { - server.cleanUp() - } - if client != nil { - client.Close() - } - } - defer func() { - if err != nil { - cleanUp() - } - }() - lis, err = net.Listen("tcp", "localhost:0") - if err != nil { - t.Fatalf("Failed to listen. Err: %v", err) - } - server = &httpServer{ - httpStatus: httpStatus, - wh: wh, - } - server.start(t, lis) - var connectCtx context.Context - connectCtx, cancel = context.WithDeadline(context.Background(), time.Now().Add(2*time.Second)) - client, err = newHTTP2Client(connectCtx, context.Background(), TargetInfo{Addr: lis.Addr().String()}, ConnectOptions{}, func() {}) - if err != nil { - cancel() // Do not cancel in success path. - t.Fatalf("Error creating client. Err: %v", err) - } - stream, err = client.NewStream(context.Background(), &CallHdr{Method: "bogus/method"}) - if err != nil { - t.Fatalf("Error creating stream at client-side. Err: %v", err) - } - return -} - -func TestHTTPToGRPCStatusMapping(t *testing.T) { - for k := range httpStatusConvTab { - testHTTPToGRPCStatusMapping(t, k, writeOneHeader) - } -} - -func testHTTPToGRPCStatusMapping(t *testing.T, httpStatus int, wh writeHeaders) { - stream, cleanUp, cancel := setUpHTTPStatusTest(t, httpStatus, wh) - defer cancel() - defer cleanUp() - want := httpStatusConvTab[httpStatus] - buf := make([]byte, 8) - _, err := stream.Read(buf) - if err == nil { - t.Fatalf("Stream.Read(_) unexpectedly returned no error. Expected stream error with code %v", want) - } - serr, ok := status.FromError(err) - if !ok { - t.Fatalf("err.(Type) = %T, want status error", err) - } - if want != serr.Code() { - t.Fatalf("Want error code: %v, got: %v", want, serr.Code()) - } -} - -func TestHTTPStatusOKAndMissingGRPCStatus(t *testing.T) { - stream, cleanUp, cancel := setUpHTTPStatusTest(t, http.StatusOK, writeOneHeader) - defer cancel() - defer cleanUp() - buf := make([]byte, 8) - _, err := stream.Read(buf) - if err != io.EOF { - t.Fatalf("stream.Read(_) = _, %v, want _, io.EOF", err) - } - want := codes.Unknown - if stream.status.Code() != want { - t.Fatalf("Status code of stream: %v, want: %v", stream.status.Code(), want) - } -} - -func TestHTTPStatusNottOKAndMissingGRPCStatusInSecondHeader(t *testing.T) { - testHTTPToGRPCStatusMapping(t, http.StatusUnauthorized, writeTwoHeaders) -} - -// If any error occurs on a call to Stream.Read, future calls -// should continue to return that same error. -func TestReadGivesSameErrorAfterAnyErrorOccurs(t *testing.T) { - testRecvBuffer := newRecvBuffer() - s := &Stream{ - ctx: context.Background(), - buf: testRecvBuffer, - requestRead: func(int) {}, - } - s.trReader = &transportReader{ - reader: &recvBufferReader{ - ctx: s.ctx, - ctxDone: s.ctx.Done(), - recv: s.buf, - }, - windowHandler: func(int) {}, - } - testData := make([]byte, 1) - testData[0] = 5 - testErr := errors.New("test error") - s.write(recvMsg{data: testData, err: testErr}) - - inBuf := make([]byte, 1) - actualCount, actualErr := s.Read(inBuf) - if actualCount != 0 { - t.Errorf("actualCount, _ := s.Read(_) differs; want 0; got %v", actualCount) - } - if actualErr.Error() != testErr.Error() { - t.Errorf("_ , actualErr := s.Read(_) differs; want actualErr.Error() to be %v; got %v", testErr.Error(), actualErr.Error()) - } - - s.write(recvMsg{data: testData, err: nil}) - s.write(recvMsg{data: testData, err: errors.New("different error from first")}) - - for i := 0; i < 2; i++ { - inBuf := make([]byte, 1) - actualCount, actualErr := s.Read(inBuf) - if actualCount != 0 { - t.Errorf("actualCount, _ := s.Read(_) differs; want %v; got %v", 0, actualCount) - } - if actualErr.Error() != testErr.Error() { - t.Errorf("_ , actualErr := s.Read(_) differs; want actualErr.Error() to be %v; got %v", testErr.Error(), actualErr.Error()) - } - } -} - -func TestPingPong1B(t *testing.T) { - runPingPongTest(t, 1) -} - -func TestPingPong1KB(t *testing.T) { - runPingPongTest(t, 1024) -} - -func TestPingPong64KB(t *testing.T) { - runPingPongTest(t, 65536) -} - -func TestPingPong1MB(t *testing.T) { - runPingPongTest(t, 1048576) -} - -//This is a stress-test of flow control logic. -func runPingPongTest(t *testing.T, msgSize int) { - server, client, cancel := setUp(t, 0, 0, pingpong) - defer cancel() - defer server.stop() - defer client.Close() - waitWhileTrue(t, func() (bool, error) { - server.mu.Lock() - defer server.mu.Unlock() - if len(server.conns) == 0 { - return true, fmt.Errorf("timed out while waiting for server transport to be created") - } - return false, nil - }) - stream, err := client.NewStream(context.Background(), &CallHdr{}) - if err != nil { - t.Fatalf("Failed to create stream. Err: %v", err) - } - msg := make([]byte, msgSize) - outgoingHeader := make([]byte, 5) - outgoingHeader[0] = byte(0) - binary.BigEndian.PutUint32(outgoingHeader[1:], uint32(msgSize)) - opts := &Options{} - incomingHeader := make([]byte, 5) - done := make(chan struct{}) - go func() { - timer := time.NewTimer(time.Second * 5) - <-timer.C - close(done) - }() - for { - select { - case <-done: - client.Write(stream, nil, nil, &Options{Last: true}) - if _, err := stream.Read(incomingHeader); err != io.EOF { - t.Fatalf("Client expected EOF from the server. Got: %v", err) - } - return - default: - if err := client.Write(stream, outgoingHeader, msg, opts); err != nil { - t.Fatalf("Error on client while writing message. Err: %v", err) - } - if _, err := stream.Read(incomingHeader); err != nil { - t.Fatalf("Error on client while reading data header. Err: %v", err) - } - sz := binary.BigEndian.Uint32(incomingHeader[1:]) - recvMsg := make([]byte, int(sz)) - if _, err := stream.Read(recvMsg); err != nil { - t.Fatalf("Error on client while reading data. Err: %v", err) - } - } - } -} - -type tableSizeLimit struct { - mu sync.Mutex - limits []uint32 -} - -func (t *tableSizeLimit) add(limit uint32) { - t.mu.Lock() - t.limits = append(t.limits, limit) - t.mu.Unlock() -} - -func (t *tableSizeLimit) getLen() int { - t.mu.Lock() - defer t.mu.Unlock() - return len(t.limits) -} - -func (t *tableSizeLimit) getIndex(i int) uint32 { - t.mu.Lock() - defer t.mu.Unlock() - return t.limits[i] -} - -func TestHeaderTblSize(t *testing.T) { - limits := &tableSizeLimit{} - updateHeaderTblSize = func(e *hpack.Encoder, v uint32) { - e.SetMaxDynamicTableSizeLimit(v) - limits.add(v) - } - defer func() { - updateHeaderTblSize = func(e *hpack.Encoder, v uint32) { - e.SetMaxDynamicTableSizeLimit(v) - } - }() - - server, ct, cancel := setUp(t, 0, math.MaxUint32, normal) - defer cancel() - defer ct.Close() - defer server.stop() - _, err := ct.NewStream(context.Background(), &CallHdr{}) - if err != nil { - t.Fatalf("failed to open stream: %v", err) - } - - var svrTransport ServerTransport - var i int - for i = 0; i < 1000; i++ { - server.mu.Lock() - if len(server.conns) != 0 { - server.mu.Unlock() - break - } - server.mu.Unlock() - time.Sleep(10 * time.Millisecond) - continue - } - if i == 1000 { - t.Fatalf("unable to create any server transport after 10s") - } - - for st := range server.conns { - svrTransport = st - break - } - svrTransport.(*http2Server).controlBuf.put(&outgoingSettings{ - ss: []http2.Setting{ - { - ID: http2.SettingHeaderTableSize, - Val: uint32(100), - }, - }, - }) - - for i = 0; i < 1000; i++ { - if limits.getLen() != 1 { - time.Sleep(10 * time.Millisecond) - continue - } - if val := limits.getIndex(0); val != uint32(100) { - t.Fatalf("expected limits[0] = 100, got %d", val) - } - break - } - if i == 1000 { - t.Fatalf("expected len(limits) = 1 within 10s, got != 1") - } - - ct.controlBuf.put(&outgoingSettings{ - ss: []http2.Setting{ - { - ID: http2.SettingHeaderTableSize, - Val: uint32(200), - }, - }, - }) - - for i := 0; i < 1000; i++ { - if limits.getLen() != 2 { - time.Sleep(10 * time.Millisecond) - continue - } - if val := limits.getIndex(1); val != uint32(200) { - t.Fatalf("expected limits[1] = 200, got %d", val) - } - break - } - if i == 1000 { - t.Fatalf("expected len(limits) = 2 within 10s, got != 2") - } -} diff --git a/vendor/google.golang.org/grpc/metadata/metadata_test.go b/vendor/google.golang.org/grpc/metadata/metadata_test.go deleted file mode 100644 index 4392145d..00000000 --- a/vendor/google.golang.org/grpc/metadata/metadata_test.go +++ /dev/null @@ -1,251 +0,0 @@ -/* - * - * Copyright 2014 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package metadata - -import ( - "reflect" - "strconv" - "testing" - - "golang.org/x/net/context" -) - -func TestPairsMD(t *testing.T) { - for _, test := range []struct { - // input - kv []string - // output - md MD - }{ - {[]string{}, MD{}}, - {[]string{"k1", "v1", "k1", "v2"}, MD{"k1": []string{"v1", "v2"}}}, - } { - md := Pairs(test.kv...) - if !reflect.DeepEqual(md, test.md) { - t.Fatalf("Pairs(%v) = %v, want %v", test.kv, md, test.md) - } - } -} - -func TestCopy(t *testing.T) { - const key, val = "key", "val" - orig := Pairs(key, val) - copy := orig.Copy() - if !reflect.DeepEqual(orig, copy) { - t.Errorf("copied value not equal to the original, got %v, want %v", copy, orig) - } - orig[key][0] = "foo" - if v := copy[key][0]; v != val { - t.Errorf("change in original should not affect copy, got %q, want %q", v, val) - } -} - -func TestJoin(t *testing.T) { - for _, test := range []struct { - mds []MD - want MD - }{ - {[]MD{}, MD{}}, - {[]MD{Pairs("foo", "bar")}, Pairs("foo", "bar")}, - {[]MD{Pairs("foo", "bar"), Pairs("foo", "baz")}, Pairs("foo", "bar", "foo", "baz")}, - {[]MD{Pairs("foo", "bar"), Pairs("foo", "baz"), Pairs("zip", "zap")}, Pairs("foo", "bar", "foo", "baz", "zip", "zap")}, - } { - md := Join(test.mds...) - if !reflect.DeepEqual(md, test.want) { - t.Errorf("context's metadata is %v, want %v", md, test.want) - } - } -} - -func TestGet(t *testing.T) { - for _, test := range []struct { - md MD - key string - wantVals []string - }{ - {md: Pairs("My-Optional-Header", "42"), key: "My-Optional-Header", wantVals: []string{"42"}}, - {md: Pairs("Header", "42", "Header", "43", "Header", "44", "other", "1"), key: "HEADER", wantVals: []string{"42", "43", "44"}}, - {md: Pairs("HEADER", "10"), key: "HEADER", wantVals: []string{"10"}}, - } { - vals := test.md.Get(test.key) - if !reflect.DeepEqual(vals, test.wantVals) { - t.Errorf("value of metadata %v is %v, want %v", test.key, vals, test.wantVals) - } - } -} - -func TestSet(t *testing.T) { - for _, test := range []struct { - md MD - setKey string - setVals []string - want MD - }{ - { - md: Pairs("My-Optional-Header", "42", "other-key", "999"), - setKey: "Other-Key", - setVals: []string{"1"}, - want: Pairs("my-optional-header", "42", "other-key", "1"), - }, - { - md: Pairs("My-Optional-Header", "42"), - setKey: "Other-Key", - setVals: []string{"1", "2", "3"}, - want: Pairs("my-optional-header", "42", "other-key", "1", "other-key", "2", "other-key", "3"), - }, - { - md: Pairs("My-Optional-Header", "42"), - setKey: "Other-Key", - setVals: []string{}, - want: Pairs("my-optional-header", "42"), - }, - } { - test.md.Set(test.setKey, test.setVals...) - if !reflect.DeepEqual(test.md, test.want) { - t.Errorf("value of metadata is %v, want %v", test.md, test.want) - } - } -} - -func TestAppend(t *testing.T) { - for _, test := range []struct { - md MD - appendKey string - appendVals []string - want MD - }{ - { - md: Pairs("My-Optional-Header", "42"), - appendKey: "Other-Key", - appendVals: []string{"1"}, - want: Pairs("my-optional-header", "42", "other-key", "1"), - }, - { - md: Pairs("My-Optional-Header", "42"), - appendKey: "my-OptIoNal-HeAder", - appendVals: []string{"1", "2", "3"}, - want: Pairs("my-optional-header", "42", "my-optional-header", "1", - "my-optional-header", "2", "my-optional-header", "3"), - }, - { - md: Pairs("My-Optional-Header", "42"), - appendKey: "my-OptIoNal-HeAder", - appendVals: []string{}, - want: Pairs("my-optional-header", "42"), - }, - } { - test.md.Append(test.appendKey, test.appendVals...) - if !reflect.DeepEqual(test.md, test.want) { - t.Errorf("value of metadata is %v, want %v", test.md, test.want) - } - } -} - -func TestAppendToOutgoingContext(t *testing.T) { - // Pre-existing metadata - ctx := NewOutgoingContext(context.Background(), Pairs("k1", "v1", "k2", "v2")) - ctx = AppendToOutgoingContext(ctx, "k1", "v3") - ctx = AppendToOutgoingContext(ctx, "k1", "v4") - md, ok := FromOutgoingContext(ctx) - if !ok { - t.Errorf("Expected MD to exist in ctx, but got none") - } - want := Pairs("k1", "v1", "k1", "v3", "k1", "v4", "k2", "v2") - if !reflect.DeepEqual(md, want) { - t.Errorf("context's metadata is %v, want %v", md, want) - } - - // No existing metadata - ctx = AppendToOutgoingContext(context.Background(), "k1", "v1") - md, ok = FromOutgoingContext(ctx) - if !ok { - t.Errorf("Expected MD to exist in ctx, but got none") - } - want = Pairs("k1", "v1") - if !reflect.DeepEqual(md, want) { - t.Errorf("context's metadata is %v, want %v", md, want) - } -} - -func TestAppendToOutgoingContext_Repeated(t *testing.T) { - ctx := context.Background() - - for i := 0; i < 100; i = i + 2 { - ctx1 := AppendToOutgoingContext(ctx, "k", strconv.Itoa(i)) - ctx2 := AppendToOutgoingContext(ctx, "k", strconv.Itoa(i+1)) - - md1, _ := FromOutgoingContext(ctx1) - md2, _ := FromOutgoingContext(ctx2) - - if reflect.DeepEqual(md1, md2) { - t.Fatalf("md1, md2 = %v, %v; should not be equal", md1, md2) - } - - ctx = ctx1 - } -} - -func TestAppendToOutgoingContext_FromKVSlice(t *testing.T) { - const k, v = "a", "b" - kv := []string{k, v} - ctx := AppendToOutgoingContext(context.Background(), kv...) - md, _ := FromOutgoingContext(ctx) - if md[k][0] != v { - t.Fatalf("md[%q] = %q; want %q", k, md[k], v) - } - kv[1] = "xxx" - md, _ = FromOutgoingContext(ctx) - if md[k][0] != v { - t.Fatalf("md[%q] = %q; want %q", k, md[k], v) - } -} - -// Old/slow approach to adding metadata to context -func Benchmark_AddingMetadata_ContextManipulationApproach(b *testing.B) { - // TODO: Add in N=1-100 tests once Go1.6 support is removed. - const num = 10 - for n := 0; n < b.N; n++ { - ctx := context.Background() - for i := 0; i < num; i++ { - md, _ := FromOutgoingContext(ctx) - NewOutgoingContext(ctx, Join(Pairs("k1", "v1", "k2", "v2"), md)) - } - } -} - -// Newer/faster approach to adding metadata to context -func BenchmarkAppendToOutgoingContext(b *testing.B) { - const num = 10 - for n := 0; n < b.N; n++ { - ctx := context.Background() - for i := 0; i < num; i++ { - ctx = AppendToOutgoingContext(ctx, "k1", "v1", "k2", "v2") - } - } -} - -func BenchmarkFromOutgoingContext(b *testing.B) { - ctx := context.Background() - ctx = NewOutgoingContext(ctx, MD{"k3": {"v3", "v4"}}) - ctx = AppendToOutgoingContext(ctx, "k1", "v1", "k2", "v2") - - for n := 0; n < b.N; n++ { - FromOutgoingContext(ctx) - } -} diff --git a/vendor/google.golang.org/grpc/naming/dns_resolver_test.go b/vendor/google.golang.org/grpc/naming/dns_resolver_test.go deleted file mode 100644 index be1ac1ae..00000000 --- a/vendor/google.golang.org/grpc/naming/dns_resolver_test.go +++ /dev/null @@ -1,315 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES 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" - "net" - "reflect" - "sync" - "testing" - "time" -) - -func newUpdateWithMD(op Operation, addr, lb string) *Update { - return &Update{ - Op: op, - Addr: addr, - Metadata: AddrMetadataGRPCLB{AddrType: GRPCLB, ServerName: lb}, - } -} - -func toMap(u []*Update) map[string]*Update { - m := make(map[string]*Update) - for _, v := range u { - m[v.Addr] = v - } - return m -} - -func TestCompileUpdate(t *testing.T) { - tests := []struct { - oldAddrs []string - newAddrs []string - want []*Update - }{ - { - []string{}, - []string{"1.0.0.1"}, - []*Update{{Op: Add, Addr: "1.0.0.1"}}, - }, - { - []string{"1.0.0.1"}, - []string{"1.0.0.1"}, - []*Update{}, - }, - { - []string{"1.0.0.0"}, - []string{"1.0.0.1"}, - []*Update{{Op: Delete, Addr: "1.0.0.0"}, {Op: Add, Addr: "1.0.0.1"}}, - }, - { - []string{"1.0.0.1"}, - []string{"1.0.0.0"}, - []*Update{{Op: Add, Addr: "1.0.0.0"}, {Op: Delete, Addr: "1.0.0.1"}}, - }, - { - []string{"1.0.0.1"}, - []string{"1.0.0.1", "1.0.0.2", "1.0.0.3"}, - []*Update{{Op: Add, Addr: "1.0.0.2"}, {Op: Add, Addr: "1.0.0.3"}}, - }, - { - []string{"1.0.0.1", "1.0.0.2", "1.0.0.3"}, - []string{"1.0.0.0"}, - []*Update{{Op: Add, Addr: "1.0.0.0"}, {Op: Delete, Addr: "1.0.0.1"}, {Op: Delete, Addr: "1.0.0.2"}, {Op: Delete, Addr: "1.0.0.3"}}, - }, - { - []string{"1.0.0.1", "1.0.0.3", "1.0.0.5"}, - []string{"1.0.0.2", "1.0.0.3", "1.0.0.6"}, - []*Update{{Op: Delete, Addr: "1.0.0.1"}, {Op: Add, Addr: "1.0.0.2"}, {Op: Delete, Addr: "1.0.0.5"}, {Op: Add, Addr: "1.0.0.6"}}, - }, - { - []string{"1.0.0.1", "1.0.0.1", "1.0.0.2"}, - []string{"1.0.0.1"}, - []*Update{{Op: Delete, Addr: "1.0.0.2"}}, - }, - } - - var w dnsWatcher - for _, c := range tests { - w.curAddrs = make(map[string]*Update) - newUpdates := make(map[string]*Update) - for _, a := range c.oldAddrs { - w.curAddrs[a] = &Update{Addr: a} - } - for _, a := range c.newAddrs { - newUpdates[a] = &Update{Addr: a} - } - r := w.compileUpdate(newUpdates) - if !reflect.DeepEqual(toMap(c.want), toMap(r)) { - t.Errorf("w(%+v).compileUpdate(%+v) = %+v, want %+v", c.oldAddrs, c.newAddrs, updatesToSlice(r), updatesToSlice(c.want)) - } - } -} - -func TestResolveFunc(t *testing.T) { - tests := []struct { - addr string - want error - }{ - // TODO(yuxuanli): More false cases? - {"www.google.com", nil}, - {"foo.bar:12345", nil}, - {"127.0.0.1", nil}, - {"127.0.0.1:12345", nil}, - {"[::1]:80", nil}, - {"[2001:db8:a0b:12f0::1]:21", nil}, - {":80", nil}, - {"127.0.0...1:12345", nil}, - {"[fe80::1%lo0]:80", nil}, - {"golang.org:http", nil}, - {"[2001:db8::1]:http", nil}, - {":", nil}, - {"", errMissingAddr}, - {"[2001:db8:a0b:12f0::1", fmt.Errorf("invalid target address %v", "[2001:db8:a0b:12f0::1")}, - } - - r, err := NewDNSResolver() - if err != nil { - t.Errorf("%v", err) - } - for _, v := range tests { - _, err := r.Resolve(v.addr) - if !reflect.DeepEqual(err, v.want) { - t.Errorf("Resolve(%q) = %v, want %v", v.addr, err, v.want) - } - } -} - -var hostLookupTbl = map[string][]string{ - "foo.bar.com": {"1.2.3.4", "5.6.7.8"}, - "ipv4.single.fake": {"1.2.3.4"}, - "ipv4.multi.fake": {"1.2.3.4", "5.6.7.8", "9.10.11.12"}, - "ipv6.single.fake": {"2607:f8b0:400a:801::1001"}, - "ipv6.multi.fake": {"2607:f8b0:400a:801::1001", "2607:f8b0:400a:801::1002", "2607:f8b0:400a:801::1003"}, -} - -func hostLookup(host string) ([]string, error) { - if addrs, ok := hostLookupTbl[host]; ok { - return addrs, nil - } - return nil, fmt.Errorf("failed to lookup host:%s resolution in hostLookupTbl", host) -} - -var srvLookupTbl = map[string][]*net.SRV{ - "_grpclb._tcp.srv.ipv4.single.fake": {&net.SRV{Target: "ipv4.single.fake", Port: 1234}}, - "_grpclb._tcp.srv.ipv4.multi.fake": {&net.SRV{Target: "ipv4.multi.fake", Port: 1234}}, - "_grpclb._tcp.srv.ipv6.single.fake": {&net.SRV{Target: "ipv6.single.fake", Port: 1234}}, - "_grpclb._tcp.srv.ipv6.multi.fake": {&net.SRV{Target: "ipv6.multi.fake", Port: 1234}}, -} - -func srvLookup(service, proto, name string) (string, []*net.SRV, error) { - cname := "_" + service + "._" + proto + "." + name - if srvs, ok := srvLookupTbl[cname]; ok { - return cname, srvs, nil - } - return "", nil, fmt.Errorf("failed to lookup srv record for %s in srvLookupTbl", cname) -} - -func updatesToSlice(updates []*Update) []Update { - res := make([]Update, len(updates)) - for i, u := range updates { - res[i] = *u - } - return res -} - -func testResolver(t *testing.T, freq time.Duration, slp time.Duration) { - tests := []struct { - target string - want []*Update - }{ - { - "foo.bar.com", - []*Update{{Op: Add, Addr: "1.2.3.4" + colonDefaultPort}, {Op: Add, Addr: "5.6.7.8" + colonDefaultPort}}, - }, - { - "foo.bar.com:1234", - []*Update{{Op: Add, Addr: "1.2.3.4:1234"}, {Op: Add, Addr: "5.6.7.8:1234"}}, - }, - { - "srv.ipv4.single.fake", - []*Update{newUpdateWithMD(Add, "1.2.3.4:1234", "ipv4.single.fake")}, - }, - { - "srv.ipv4.multi.fake", - []*Update{ - newUpdateWithMD(Add, "1.2.3.4:1234", "ipv4.multi.fake"), - newUpdateWithMD(Add, "5.6.7.8:1234", "ipv4.multi.fake"), - newUpdateWithMD(Add, "9.10.11.12:1234", "ipv4.multi.fake")}, - }, - { - "srv.ipv6.single.fake", - []*Update{newUpdateWithMD(Add, "[2607:f8b0:400a:801::1001]:1234", "ipv6.single.fake")}, - }, - { - "srv.ipv6.multi.fake", - []*Update{ - newUpdateWithMD(Add, "[2607:f8b0:400a:801::1001]:1234", "ipv6.multi.fake"), - newUpdateWithMD(Add, "[2607:f8b0:400a:801::1002]:1234", "ipv6.multi.fake"), - newUpdateWithMD(Add, "[2607:f8b0:400a:801::1003]:1234", "ipv6.multi.fake"), - }, - }, - } - - for _, a := range tests { - r, err := NewDNSResolverWithFreq(freq) - if err != nil { - t.Fatalf("%v\n", err) - } - w, err := r.Resolve(a.target) - if err != nil { - t.Fatalf("%v\n", err) - } - updates, err := w.Next() - if err != nil { - t.Fatalf("%v\n", err) - } - if !reflect.DeepEqual(toMap(a.want), toMap(updates)) { - t.Errorf("Resolve(%q) = %+v, want %+v\n", a.target, updatesToSlice(updates), updatesToSlice(a.want)) - } - var wg sync.WaitGroup - wg.Add(1) - go func() { - defer wg.Done() - for { - _, err := w.Next() - if err != nil { - return - } - t.Error("Execution shouldn't reach here, since w.Next() should be blocked until close happen.") - } - }() - // Sleep for sometime to let watcher do more than one lookup - time.Sleep(slp) - w.Close() - wg.Wait() - } -} - -func TestResolve(t *testing.T) { - defer replaceNetFunc()() - testResolver(t, time.Millisecond*5, time.Millisecond*10) -} - -const colonDefaultPort = ":" + defaultPort - -func TestIPWatcher(t *testing.T) { - tests := []struct { - target string - want []*Update - }{ - {"127.0.0.1", []*Update{{Op: Add, Addr: "127.0.0.1" + colonDefaultPort}}}, - {"127.0.0.1:12345", []*Update{{Op: Add, Addr: "127.0.0.1:12345"}}}, - {"::1", []*Update{{Op: Add, Addr: "[::1]" + colonDefaultPort}}}, - {"[::1]:12345", []*Update{{Op: Add, Addr: "[::1]:12345"}}}, - {"[::1]:", []*Update{{Op: Add, Addr: "[::1]:443"}}}, - {"2001:db8:85a3::8a2e:370:7334", []*Update{{Op: Add, Addr: "[2001:db8:85a3::8a2e:370:7334]" + colonDefaultPort}}}, - {"[2001:db8:85a3::8a2e:370:7334]", []*Update{{Op: Add, Addr: "[2001:db8:85a3::8a2e:370:7334]" + colonDefaultPort}}}, - {"[2001:db8:85a3::8a2e:370:7334]:12345", []*Update{{Op: Add, Addr: "[2001:db8:85a3::8a2e:370:7334]:12345"}}}, - {"[2001:db8::1]:http", []*Update{{Op: Add, Addr: "[2001:db8::1]:http"}}}, - // TODO(yuxuanli): zone support? - } - - for _, v := range tests { - r, err := NewDNSResolverWithFreq(time.Millisecond * 5) - if err != nil { - t.Fatalf("%v\n", err) - } - w, err := r.Resolve(v.target) - if err != nil { - t.Fatalf("%v\n", err) - } - var updates []*Update - var wg sync.WaitGroup - wg.Add(1) - count := 0 - go func() { - defer wg.Done() - for { - u, err := w.Next() - if err != nil { - return - } - updates = u - count++ - } - }() - // Sleep for sometime to let watcher do more than one lookup - time.Sleep(time.Millisecond * 10) - w.Close() - wg.Wait() - if !reflect.DeepEqual(v.want, updates) { - t.Errorf("Resolve(%q) = %v, want %+v\n", v.target, updatesToSlice(updates), updatesToSlice(v.want)) - } - if count != 1 { - t.Errorf("IPWatcher Next() should return only once, not %d times\n", count) - } - } -} diff --git a/vendor/google.golang.org/grpc/naming/go17_test.go b/vendor/google.golang.org/grpc/naming/go17_test.go deleted file mode 100644 index db39b9ab..00000000 --- a/vendor/google.golang.org/grpc/naming/go17_test.go +++ /dev/null @@ -1,42 +0,0 @@ -// +build go1.6, !go1.8 - -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES 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 ( - "net" - - "golang.org/x/net/context" -) - -func replaceNetFunc() func() { - oldLookupHost := lookupHost - oldLookupSRV := lookupSRV - lookupHost = func(ctx context.Context, host string) ([]string, error) { - return hostLookup(host) - } - lookupSRV = func(ctx context.Context, service, proto, name string) (string, []*net.SRV, error) { - return srvLookup(service, proto, name) - } - return func() { - lookupHost = oldLookupHost - lookupSRV = oldLookupSRV - } -} diff --git a/vendor/google.golang.org/grpc/naming/go18_test.go b/vendor/google.golang.org/grpc/naming/go18_test.go deleted file mode 100644 index 5e297539..00000000 --- a/vendor/google.golang.org/grpc/naming/go18_test.go +++ /dev/null @@ -1,41 +0,0 @@ -// +build go1.8 - -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES 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 ( - "context" - "net" -) - -func replaceNetFunc() func() { - oldLookupHost := lookupHost - oldLookupSRV := lookupSRV - lookupHost = func(ctx context.Context, host string) ([]string, error) { - return hostLookup(host) - } - lookupSRV = func(ctx context.Context, service, proto, name string) (string, []*net.SRV, error) { - return srvLookup(service, proto, name) - } - return func() { - lookupHost = oldLookupHost - lookupSRV = oldLookupSRV - } -} diff --git a/vendor/google.golang.org/grpc/picker_wrapper_test.go b/vendor/google.golang.org/grpc/picker_wrapper_test.go deleted file mode 100644 index 34c6c891..00000000 --- a/vendor/google.golang.org/grpc/picker_wrapper_test.go +++ /dev/null @@ -1,160 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package grpc - -import ( - "fmt" - "sync/atomic" - "testing" - "time" - - "golang.org/x/net/context" - "google.golang.org/grpc/balancer" - "google.golang.org/grpc/connectivity" - _ "google.golang.org/grpc/grpclog/glogger" - "google.golang.org/grpc/internal/leakcheck" - "google.golang.org/grpc/internal/transport" -) - -const goroutineCount = 5 - -var ( - testT = &testTransport{} - testSC = &acBalancerWrapper{ac: &addrConn{ - state: connectivity.Ready, - transport: testT, - }} - testSCNotReady = &acBalancerWrapper{ac: &addrConn{ - state: connectivity.TransientFailure, - }} -) - -type testTransport struct { - transport.ClientTransport -} - -type testingPicker struct { - err error - sc balancer.SubConn - maxCalled int64 -} - -func (p *testingPicker) Pick(ctx context.Context, opts balancer.PickOptions) (balancer.SubConn, func(balancer.DoneInfo), error) { - if atomic.AddInt64(&p.maxCalled, -1) < 0 { - return nil, nil, fmt.Errorf("Pick called to many times (> goroutineCount)") - } - if p.err != nil { - return nil, nil, p.err - } - return p.sc, nil, nil -} - -func TestBlockingPickTimeout(t *testing.T) { - defer leakcheck.Check(t) - bp := newPickerWrapper() - ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) - defer cancel() - if _, _, err := bp.pick(ctx, true, balancer.PickOptions{}); err != context.DeadlineExceeded { - t.Errorf("bp.pick returned error %v, want DeadlineExceeded", err) - } -} - -func TestBlockingPick(t *testing.T) { - defer leakcheck.Check(t) - bp := newPickerWrapper() - // All goroutines should block because picker is nil in bp. - var finishedCount uint64 - for i := goroutineCount; i > 0; i-- { - go func() { - if tr, _, err := bp.pick(context.Background(), true, balancer.PickOptions{}); err != nil || tr != testT { - t.Errorf("bp.pick returned non-nil error: %v", err) - } - atomic.AddUint64(&finishedCount, 1) - }() - } - time.Sleep(50 * time.Millisecond) - if c := atomic.LoadUint64(&finishedCount); c != 0 { - t.Errorf("finished goroutines count: %v, want 0", c) - } - bp.updatePicker(&testingPicker{sc: testSC, maxCalled: goroutineCount}) -} - -func TestBlockingPickNoSubAvailable(t *testing.T) { - defer leakcheck.Check(t) - bp := newPickerWrapper() - var finishedCount uint64 - bp.updatePicker(&testingPicker{err: balancer.ErrNoSubConnAvailable, maxCalled: goroutineCount}) - // All goroutines should block because picker returns no sc available. - for i := goroutineCount; i > 0; i-- { - go func() { - if tr, _, err := bp.pick(context.Background(), true, balancer.PickOptions{}); err != nil || tr != testT { - t.Errorf("bp.pick returned non-nil error: %v", err) - } - atomic.AddUint64(&finishedCount, 1) - }() - } - time.Sleep(50 * time.Millisecond) - if c := atomic.LoadUint64(&finishedCount); c != 0 { - t.Errorf("finished goroutines count: %v, want 0", c) - } - bp.updatePicker(&testingPicker{sc: testSC, maxCalled: goroutineCount}) -} - -func TestBlockingPickTransientWaitforready(t *testing.T) { - defer leakcheck.Check(t) - bp := newPickerWrapper() - bp.updatePicker(&testingPicker{err: balancer.ErrTransientFailure, maxCalled: goroutineCount}) - var finishedCount uint64 - // All goroutines should block because picker returns transientFailure and - // picks are not failfast. - for i := goroutineCount; i > 0; i-- { - go func() { - if tr, _, err := bp.pick(context.Background(), false, balancer.PickOptions{}); err != nil || tr != testT { - t.Errorf("bp.pick returned non-nil error: %v", err) - } - atomic.AddUint64(&finishedCount, 1) - }() - } - time.Sleep(time.Millisecond) - if c := atomic.LoadUint64(&finishedCount); c != 0 { - t.Errorf("finished goroutines count: %v, want 0", c) - } - bp.updatePicker(&testingPicker{sc: testSC, maxCalled: goroutineCount}) -} - -func TestBlockingPickSCNotReady(t *testing.T) { - defer leakcheck.Check(t) - bp := newPickerWrapper() - bp.updatePicker(&testingPicker{sc: testSCNotReady, maxCalled: goroutineCount}) - var finishedCount uint64 - // All goroutines should block because sc is not ready. - for i := goroutineCount; i > 0; i-- { - go func() { - if tr, _, err := bp.pick(context.Background(), true, balancer.PickOptions{}); err != nil || tr != testT { - t.Errorf("bp.pick returned non-nil error: %v", err) - } - atomic.AddUint64(&finishedCount, 1) - }() - } - time.Sleep(time.Millisecond) - if c := atomic.LoadUint64(&finishedCount); c != 0 { - t.Errorf("finished goroutines count: %v, want 0", c) - } - bp.updatePicker(&testingPicker{sc: testSC, maxCalled: goroutineCount}) -} diff --git a/vendor/google.golang.org/grpc/pickfirst_test.go b/vendor/google.golang.org/grpc/pickfirst_test.go deleted file mode 100644 index 7f8169f1..00000000 --- a/vendor/google.golang.org/grpc/pickfirst_test.go +++ /dev/null @@ -1,360 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package grpc - -import ( - "math" - "sync" - "testing" - "time" - - "golang.org/x/net/context" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/internal/leakcheck" - "google.golang.org/grpc/resolver" - "google.golang.org/grpc/resolver/manual" - "google.golang.org/grpc/status" -) - -func errorDesc(err error) string { - if s, ok := status.FromError(err); ok { - return s.Message() - } - return err.Error() -} - -func TestOneBackendPickfirst(t *testing.T) { - defer leakcheck.Check(t) - r, rcleanup := manual.GenerateAndRegisterManualResolver() - defer rcleanup() - - numServers := 1 - servers, _, scleanup := startServers(t, numServers, math.MaxInt32) - defer scleanup() - - cc, err := Dial(r.Scheme()+":///test.server", WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - // The first RPC should fail because there's no address. - ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) - defer cancel() - req := "port" - var reply string - if err := cc.Invoke(ctx, "/foo/bar", &req, &reply); err == nil || status.Code(err) != codes.DeadlineExceeded { - t.Fatalf("EmptyCall() = _, %v, want _, DeadlineExceeded", err) - } - - r.NewAddress([]resolver.Address{{Addr: servers[0].addr}}) - // The second RPC should succeed. - for i := 0; i < 1000; i++ { - if err = cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err != nil && errorDesc(err) == servers[0].port { - return - } - time.Sleep(time.Millisecond) - } - t.Fatalf("EmptyCall() = _, %v, want _, %v", err, servers[0].port) -} - -func TestBackendsPickfirst(t *testing.T) { - defer leakcheck.Check(t) - r, rcleanup := manual.GenerateAndRegisterManualResolver() - defer rcleanup() - - numServers := 2 - servers, _, scleanup := startServers(t, numServers, math.MaxInt32) - defer scleanup() - - cc, err := Dial(r.Scheme()+":///test.server", WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - // The first RPC should fail because there's no address. - ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) - defer cancel() - req := "port" - var reply string - if err := cc.Invoke(ctx, "/foo/bar", &req, &reply); err == nil || status.Code(err) != codes.DeadlineExceeded { - t.Fatalf("EmptyCall() = _, %v, want _, DeadlineExceeded", err) - } - - r.NewAddress([]resolver.Address{{Addr: servers[0].addr}, {Addr: servers[1].addr}}) - // The second RPC should succeed with the first server. - for i := 0; i < 1000; i++ { - if err = cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err != nil && errorDesc(err) == servers[0].port { - return - } - time.Sleep(time.Millisecond) - } - t.Fatalf("EmptyCall() = _, %v, want _, %v", err, servers[0].port) -} - -func TestNewAddressWhileBlockingPickfirst(t *testing.T) { - defer leakcheck.Check(t) - r, rcleanup := manual.GenerateAndRegisterManualResolver() - defer rcleanup() - - numServers := 1 - servers, _, scleanup := startServers(t, numServers, math.MaxInt32) - defer scleanup() - - cc, err := Dial(r.Scheme()+":///test.server", WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - // The first RPC should fail because there's no address. - ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) - defer cancel() - req := "port" - var reply string - if err := cc.Invoke(ctx, "/foo/bar", &req, &reply); err == nil || status.Code(err) != codes.DeadlineExceeded { - t.Fatalf("EmptyCall() = _, %v, want _, DeadlineExceeded", err) - } - - var wg sync.WaitGroup - for i := 0; i < 3; i++ { - wg.Add(1) - go func() { - defer wg.Done() - // This RPC blocks until NewAddress is called. - cc.Invoke(context.Background(), "/foo/bar", &req, &reply) - }() - } - time.Sleep(50 * time.Millisecond) - r.NewAddress([]resolver.Address{{Addr: servers[0].addr}}) - wg.Wait() -} - -func TestCloseWithPendingRPCPickfirst(t *testing.T) { - defer leakcheck.Check(t) - r, rcleanup := manual.GenerateAndRegisterManualResolver() - defer rcleanup() - - numServers := 1 - _, _, scleanup := startServers(t, numServers, math.MaxInt32) - defer scleanup() - - cc, err := Dial(r.Scheme()+":///test.server", WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - // The first RPC should fail because there's no address. - ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) - defer cancel() - req := "port" - var reply string - if err := cc.Invoke(ctx, "/foo/bar", &req, &reply); err == nil || status.Code(err) != codes.DeadlineExceeded { - t.Fatalf("EmptyCall() = _, %v, want _, DeadlineExceeded", err) - } - - var wg sync.WaitGroup - for i := 0; i < 3; i++ { - wg.Add(1) - go func() { - defer wg.Done() - // This RPC blocks until NewAddress is called. - cc.Invoke(context.Background(), "/foo/bar", &req, &reply) - }() - } - time.Sleep(50 * time.Millisecond) - cc.Close() - wg.Wait() -} - -func TestOneServerDownPickfirst(t *testing.T) { - defer leakcheck.Check(t) - r, rcleanup := manual.GenerateAndRegisterManualResolver() - defer rcleanup() - - numServers := 2 - servers, _, scleanup := startServers(t, numServers, math.MaxInt32) - defer scleanup() - - cc, err := Dial(r.Scheme()+":///test.server", WithInsecure(), WithCodec(testCodec{}), WithWaitForHandshake()) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - // The first RPC should fail because there's no address. - ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) - defer cancel() - req := "port" - var reply string - if err := cc.Invoke(ctx, "/foo/bar", &req, &reply); err == nil || status.Code(err) != codes.DeadlineExceeded { - t.Fatalf("EmptyCall() = _, %v, want _, DeadlineExceeded", err) - } - - r.NewAddress([]resolver.Address{{Addr: servers[0].addr}, {Addr: servers[1].addr}}) - // The second RPC should succeed with the first server. - for i := 0; i < 1000; i++ { - if err = cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err != nil && errorDesc(err) == servers[0].port { - break - } - time.Sleep(time.Millisecond) - } - - servers[0].stop() - for i := 0; i < 1000; i++ { - if err = cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err != nil && errorDesc(err) == servers[1].port { - return - } - time.Sleep(time.Millisecond) - } - t.Fatalf("EmptyCall() = _, %v, want _, %v", err, servers[0].port) -} - -func TestAllServersDownPickfirst(t *testing.T) { - defer leakcheck.Check(t) - r, rcleanup := manual.GenerateAndRegisterManualResolver() - defer rcleanup() - - numServers := 2 - servers, _, scleanup := startServers(t, numServers, math.MaxInt32) - defer scleanup() - - cc, err := Dial(r.Scheme()+":///test.server", WithInsecure(), WithCodec(testCodec{}), WithWaitForHandshake()) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - // The first RPC should fail because there's no address. - ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) - defer cancel() - req := "port" - var reply string - if err := cc.Invoke(ctx, "/foo/bar", &req, &reply); err == nil || status.Code(err) != codes.DeadlineExceeded { - t.Fatalf("EmptyCall() = _, %v, want _, DeadlineExceeded", err) - } - - r.NewAddress([]resolver.Address{{Addr: servers[0].addr}, {Addr: servers[1].addr}}) - // The second RPC should succeed with the first server. - for i := 0; i < 1000; i++ { - if err = cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err != nil && errorDesc(err) == servers[0].port { - break - } - time.Sleep(time.Millisecond) - } - - for i := 0; i < numServers; i++ { - servers[i].stop() - } - for i := 0; i < 1000; i++ { - if err = cc.Invoke(context.Background(), "/foo/bar", &req, &reply); status.Code(err) == codes.Unavailable { - return - } - time.Sleep(time.Millisecond) - } - t.Fatalf("EmptyCall() = _, %v, want _, error with code unavailable", err) -} - -func TestAddressesRemovedPickfirst(t *testing.T) { - defer leakcheck.Check(t) - r, rcleanup := manual.GenerateAndRegisterManualResolver() - defer rcleanup() - - numServers := 3 - servers, _, scleanup := startServers(t, numServers, math.MaxInt32) - defer scleanup() - - cc, err := Dial(r.Scheme()+":///test.server", WithInsecure(), WithCodec(testCodec{})) - if err != nil { - t.Fatalf("failed to dial: %v", err) - } - defer cc.Close() - // The first RPC should fail because there's no address. - ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) - defer cancel() - req := "port" - var reply string - if err := cc.Invoke(ctx, "/foo/bar", &req, &reply); err == nil || status.Code(err) != codes.DeadlineExceeded { - t.Fatalf("EmptyCall() = _, %v, want _, DeadlineExceeded", err) - } - - r.NewAddress([]resolver.Address{{Addr: servers[0].addr}, {Addr: servers[1].addr}, {Addr: servers[2].addr}}) - for i := 0; i < 1000; i++ { - if err = cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err != nil && errorDesc(err) == servers[0].port { - break - } - time.Sleep(time.Millisecond) - } - for i := 0; i < 20; i++ { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err == nil || errorDesc(err) != servers[0].port { - t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 0, err, servers[0].port) - } - time.Sleep(10 * time.Millisecond) - } - - // Remove server[0]. - r.NewAddress([]resolver.Address{{Addr: servers[1].addr}, {Addr: servers[2].addr}}) - for i := 0; i < 1000; i++ { - if err = cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err != nil && errorDesc(err) == servers[1].port { - break - } - time.Sleep(time.Millisecond) - } - for i := 0; i < 20; i++ { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err == nil || errorDesc(err) != servers[1].port { - t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 1, err, servers[1].port) - } - time.Sleep(10 * time.Millisecond) - } - - // Append server[0], nothing should change. - r.NewAddress([]resolver.Address{{Addr: servers[1].addr}, {Addr: servers[2].addr}, {Addr: servers[0].addr}}) - for i := 0; i < 20; i++ { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err == nil || errorDesc(err) != servers[1].port { - t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 1, err, servers[1].port) - } - time.Sleep(10 * time.Millisecond) - } - - // Remove server[1]. - r.NewAddress([]resolver.Address{{Addr: servers[2].addr}, {Addr: servers[0].addr}}) - for i := 0; i < 1000; i++ { - if err = cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err != nil && errorDesc(err) == servers[2].port { - break - } - time.Sleep(time.Millisecond) - } - for i := 0; i < 20; i++ { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err == nil || errorDesc(err) != servers[2].port { - t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 2, err, servers[2].port) - } - time.Sleep(10 * time.Millisecond) - } - - // Remove server[2]. - r.NewAddress([]resolver.Address{{Addr: servers[0].addr}}) - for i := 0; i < 1000; i++ { - if err = cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err != nil && errorDesc(err) == servers[0].port { - break - } - time.Sleep(time.Millisecond) - } - for i := 0; i < 20; i++ { - if err := cc.Invoke(context.Background(), "/foo/bar", &req, &reply); err == nil || errorDesc(err) != servers[0].port { - t.Fatalf("Index %d: Invoke(_, _, _, _, _) = %v, want %s", 0, err, servers[0].port) - } - time.Sleep(10 * time.Millisecond) - } -} diff --git a/vendor/google.golang.org/grpc/proxy_test.go b/vendor/google.golang.org/grpc/proxy_test.go deleted file mode 100644 index 7183ba34..00000000 --- a/vendor/google.golang.org/grpc/proxy_test.go +++ /dev/null @@ -1,182 +0,0 @@ -// +build !race - -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package grpc - -import ( - "bufio" - "io" - "net" - "net/http" - "net/url" - "testing" - "time" - - "golang.org/x/net/context" - "google.golang.org/grpc/internal/leakcheck" -) - -const ( - envTestAddr = "1.2.3.4:8080" - envProxyAddr = "2.3.4.5:7687" -) - -// overwriteAndRestore overwrite function httpProxyFromEnvironment and -// returns a function to restore the default values. -func overwrite(hpfe func(req *http.Request) (*url.URL, error)) func() { - backHPFE := httpProxyFromEnvironment - httpProxyFromEnvironment = hpfe - return func() { - httpProxyFromEnvironment = backHPFE - } -} - -type proxyServer struct { - t *testing.T - lis net.Listener - in net.Conn - out net.Conn -} - -func (p *proxyServer) run() { - in, err := p.lis.Accept() - if err != nil { - return - } - p.in = in - - req, err := http.ReadRequest(bufio.NewReader(in)) - if err != nil { - p.t.Errorf("failed to read CONNECT req: %v", err) - return - } - if req.Method != http.MethodConnect || req.UserAgent() != grpcUA { - resp := http.Response{StatusCode: http.StatusMethodNotAllowed} - resp.Write(p.in) - p.in.Close() - p.t.Errorf("get wrong CONNECT req: %+v", req) - return - } - - out, err := net.Dial("tcp", req.URL.Host) - if err != nil { - p.t.Errorf("failed to dial to server: %v", err) - return - } - resp := http.Response{StatusCode: http.StatusOK, Proto: "HTTP/1.0"} - resp.Write(p.in) - p.out = out - go io.Copy(p.in, p.out) - go io.Copy(p.out, p.in) -} - -func (p *proxyServer) stop() { - p.lis.Close() - if p.in != nil { - p.in.Close() - } - if p.out != nil { - p.out.Close() - } -} - -func TestHTTPConnect(t *testing.T) { - defer leakcheck.Check(t) - plis, err := net.Listen("tcp", "localhost:0") - if err != nil { - t.Fatalf("failed to listen: %v", err) - } - p := &proxyServer{t: t, lis: plis} - go p.run() - defer p.stop() - - blis, err := net.Listen("tcp", "localhost:0") - if err != nil { - t.Fatalf("failed to listen: %v", err) - } - - msg := []byte{4, 3, 5, 2} - recvBuf := make([]byte, len(msg)) - done := make(chan struct{}) - go func() { - in, err := blis.Accept() - if err != nil { - t.Errorf("failed to accept: %v", err) - return - } - defer in.Close() - in.Read(recvBuf) - close(done) - }() - - // Overwrite the function in the test and restore them in defer. - hpfe := func(req *http.Request) (*url.URL, error) { - return &url.URL{Host: plis.Addr().String()}, nil - } - defer overwrite(hpfe)() - - // Dial to proxy server. - dialer := newProxyDialer(func(ctx context.Context, addr string) (net.Conn, error) { - if deadline, ok := ctx.Deadline(); ok { - return net.DialTimeout("tcp", addr, deadline.Sub(time.Now())) - } - return net.Dial("tcp", addr) - }) - ctx, cancel := context.WithTimeout(context.Background(), time.Second) - defer cancel() - c, err := dialer(ctx, blis.Addr().String()) - if err != nil { - t.Fatalf("http connect Dial failed: %v", err) - } - defer c.Close() - - // Send msg on the connection. - c.Write(msg) - <-done - - // Check received msg. - if string(recvBuf) != string(msg) { - t.Fatalf("received msg: %v, want %v", recvBuf, msg) - } -} - -func TestMapAddressEnv(t *testing.T) { - defer leakcheck.Check(t) - // Overwrite the function in the test and restore them in defer. - hpfe := func(req *http.Request) (*url.URL, error) { - if req.URL.Host == envTestAddr { - return &url.URL{ - Scheme: "https", - Host: envProxyAddr, - }, nil - } - return nil, nil - } - defer overwrite(hpfe)() - - // envTestAddr should be handled by ProxyFromEnvironment. - got, err := mapAddress(context.Background(), envTestAddr) - if err != nil { - t.Error(err) - } - if got != envProxyAddr { - t.Errorf("want %v, got %v", envProxyAddr, got) - } -} diff --git a/vendor/google.golang.org/grpc/resolver/dns/dns_resolver_test.go b/vendor/google.golang.org/grpc/resolver/dns/dns_resolver_test.go deleted file mode 100644 index 53d6a871..00000000 --- a/vendor/google.golang.org/grpc/resolver/dns/dns_resolver_test.go +++ /dev/null @@ -1,995 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package dns - -import ( - "fmt" - "net" - "os" - "reflect" - "sync" - "testing" - "time" - - "google.golang.org/grpc/internal/leakcheck" - "google.golang.org/grpc/resolver" -) - -func TestMain(m *testing.M) { - cleanup := replaceNetFunc() - code := m.Run() - cleanup() - os.Exit(code) -} - -const ( - txtBytesLimit = 255 -) - -type testClientConn struct { - target string - m1 sync.Mutex - addrs []resolver.Address - a int // how many times NewAddress() has been called - m2 sync.Mutex - sc string - s int -} - -func (t *testClientConn) NewAddress(addresses []resolver.Address) { - t.m1.Lock() - defer t.m1.Unlock() - t.addrs = addresses - t.a++ -} - -func (t *testClientConn) getAddress() ([]resolver.Address, int) { - t.m1.Lock() - defer t.m1.Unlock() - return t.addrs, t.a -} - -func (t *testClientConn) NewServiceConfig(serviceConfig string) { - t.m2.Lock() - defer t.m2.Unlock() - t.sc = serviceConfig - t.s++ -} - -func (t *testClientConn) getSc() (string, int) { - t.m2.Lock() - defer t.m2.Unlock() - return t.sc, t.s -} - -var hostLookupTbl = struct { - sync.Mutex - tbl map[string][]string -}{ - tbl: map[string][]string{ - "foo.bar.com": {"1.2.3.4", "5.6.7.8"}, - "ipv4.single.fake": {"1.2.3.4"}, - "srv.ipv4.single.fake": {"2.4.6.8"}, - "ipv4.multi.fake": {"1.2.3.4", "5.6.7.8", "9.10.11.12"}, - "ipv6.single.fake": {"2607:f8b0:400a:801::1001"}, - "ipv6.multi.fake": {"2607:f8b0:400a:801::1001", "2607:f8b0:400a:801::1002", "2607:f8b0:400a:801::1003"}, - }, -} - -func hostLookup(host string) ([]string, error) { - hostLookupTbl.Lock() - defer hostLookupTbl.Unlock() - if addrs, cnt := hostLookupTbl.tbl[host]; cnt { - return addrs, nil - } - return nil, fmt.Errorf("failed to lookup host:%s resolution in hostLookupTbl", host) -} - -var srvLookupTbl = struct { - sync.Mutex - tbl map[string][]*net.SRV -}{ - tbl: map[string][]*net.SRV{ - "_grpclb._tcp.srv.ipv4.single.fake": {&net.SRV{Target: "ipv4.single.fake", Port: 1234}}, - "_grpclb._tcp.srv.ipv4.multi.fake": {&net.SRV{Target: "ipv4.multi.fake", Port: 1234}}, - "_grpclb._tcp.srv.ipv6.single.fake": {&net.SRV{Target: "ipv6.single.fake", Port: 1234}}, - "_grpclb._tcp.srv.ipv6.multi.fake": {&net.SRV{Target: "ipv6.multi.fake", Port: 1234}}, - }, -} - -func srvLookup(service, proto, name string) (string, []*net.SRV, error) { - cname := "_" + service + "._" + proto + "." + name - srvLookupTbl.Lock() - defer srvLookupTbl.Unlock() - if srvs, cnt := srvLookupTbl.tbl[cname]; cnt { - return cname, srvs, nil - } - return "", nil, fmt.Errorf("failed to lookup srv record for %s in srvLookupTbl", cname) -} - -// div divides a byte slice into a slice of strings, each of which is of maximum -// 255 bytes length, which is the length limit per TXT record in DNS. -func div(b []byte) []string { - var r []string - for i := 0; i < len(b); i += txtBytesLimit { - if i+txtBytesLimit > len(b) { - r = append(r, string(b[i:])) - } else { - r = append(r, string(b[i:i+txtBytesLimit])) - } - } - return r -} - -// scfs contains an array of service config file string in JSON format. -// Notes about the scfs contents and usage: -// scfs contains 4 service config file JSON strings for testing. Inside each -// service config file, there are multiple choices. scfs[0:3] each contains 5 -// choices, and first 3 choices are nonmatching choices based on canarying rule, -// while the last two are matched choices. scfs[3] only contains 3 choices, and -// all of them are nonmatching based on canarying rule. For each of scfs[0:3], -// the eventually returned service config, which is from the first of the two -// matched choices, is stored in the corresponding scs element (e.g. -// scfs[0]->scs[0]). scfs and scs elements are used in pair to test the dns -// resolver functionality, with scfs as the input and scs used for validation of -// the output. For scfs[3], it corresponds to empty service config, since there -// isn't a matched choice. -var scfs = []string{ - `[ - { - "clientLanguage": [ - "CPP", - "JAVA" - ], - "serviceConfig": { - "loadBalancingPolicy": "grpclb", - "methodConfig": [ - { - "name": [ - { - "service": "all" - } - ], - "timeout": "1s" - } - ] - } - }, - { - "percentage": 0, - "serviceConfig": { - "loadBalancingPolicy": "grpclb", - "methodConfig": [ - { - "name": [ - { - "service": "all" - } - ], - "timeout": "1s" - } - ] - } - }, - { - "clientHostName": [ - "localhost" - ], - "serviceConfig": { - "loadBalancingPolicy": "grpclb", - "methodConfig": [ - { - "name": [ - { - "service": "all" - } - ], - "timeout": "1s" - } - ] - } - }, - { - "clientLanguage": [ - "GO" - ], - "percentage": 100, - "serviceConfig": { - "methodConfig": [ - { - "name": [ - { - "method": "bar" - } - ], - "maxRequestMessageBytes": 1024, - "maxResponseMessageBytes": 1024 - } - ] - } - }, - { - "serviceConfig": { - "loadBalancingPolicy": "round_robin", - "methodConfig": [ - { - "name": [ - { - "service": "foo", - "method": "bar" - } - ], - "waitForReady": true - } - ] - } - } -]`, - `[ - { - "clientLanguage": [ - "CPP", - "JAVA" - ], - "serviceConfig": { - "loadBalancingPolicy": "grpclb", - "methodConfig": [ - { - "name": [ - { - "service": "all" - } - ], - "timeout": "1s" - } - ] - } - }, - { - "percentage": 0, - "serviceConfig": { - "loadBalancingPolicy": "grpclb", - "methodConfig": [ - { - "name": [ - { - "service": "all" - } - ], - "timeout": "1s" - } - ] - } - }, - { - "clientHostName": [ - "localhost" - ], - "serviceConfig": { - "loadBalancingPolicy": "grpclb", - "methodConfig": [ - { - "name": [ - { - "service": "all" - } - ], - "timeout": "1s" - } - ] - } - }, - { - "clientLanguage": [ - "GO" - ], - "percentage": 100, - "serviceConfig": { - "methodConfig": [ - { - "name": [ - { - "service": "foo", - "method": "bar" - } - ], - "waitForReady": true, - "timeout": "1s", - "maxRequestMessageBytes": 1024, - "maxResponseMessageBytes": 1024 - } - ] - } - }, - { - "serviceConfig": { - "loadBalancingPolicy": "round_robin", - "methodConfig": [ - { - "name": [ - { - "service": "foo", - "method": "bar" - } - ], - "waitForReady": true - } - ] - } - } -]`, - `[ - { - "clientLanguage": [ - "CPP", - "JAVA" - ], - "serviceConfig": { - "loadBalancingPolicy": "grpclb", - "methodConfig": [ - { - "name": [ - { - "service": "all" - } - ], - "timeout": "1s" - } - ] - } - }, - { - "percentage": 0, - "serviceConfig": { - "loadBalancingPolicy": "grpclb", - "methodConfig": [ - { - "name": [ - { - "service": "all" - } - ], - "timeout": "1s" - } - ] - } - }, - { - "clientHostName": [ - "localhost" - ], - "serviceConfig": { - "loadBalancingPolicy": "grpclb", - "methodConfig": [ - { - "name": [ - { - "service": "all" - } - ], - "timeout": "1s" - } - ] - } - }, - { - "clientLanguage": [ - "GO" - ], - "percentage": 100, - "serviceConfig": { - "loadBalancingPolicy": "round_robin", - "methodConfig": [ - { - "name": [ - { - "service": "foo" - } - ], - "waitForReady": true, - "timeout": "1s" - }, - { - "name": [ - { - "service": "bar" - } - ], - "waitForReady": false - } - ] - } - }, - { - "serviceConfig": { - "loadBalancingPolicy": "round_robin", - "methodConfig": [ - { - "name": [ - { - "service": "foo", - "method": "bar" - } - ], - "waitForReady": true - } - ] - } - } -]`, - `[ - { - "clientLanguage": [ - "CPP", - "JAVA" - ], - "serviceConfig": { - "loadBalancingPolicy": "grpclb", - "methodConfig": [ - { - "name": [ - { - "service": "all" - } - ], - "timeout": "1s" - } - ] - } - }, - { - "percentage": 0, - "serviceConfig": { - "loadBalancingPolicy": "grpclb", - "methodConfig": [ - { - "name": [ - { - "service": "all" - } - ], - "timeout": "1s" - } - ] - } - }, - { - "clientHostName": [ - "localhost" - ], - "serviceConfig": { - "loadBalancingPolicy": "grpclb", - "methodConfig": [ - { - "name": [ - { - "service": "all" - } - ], - "timeout": "1s" - } - ] - } - } -]`, -} - -// scs contains an array of service config string in JSON format. -var scs = []string{ - `{ - "methodConfig": [ - { - "name": [ - { - "method": "bar" - } - ], - "maxRequestMessageBytes": 1024, - "maxResponseMessageBytes": 1024 - } - ] - }`, - `{ - "methodConfig": [ - { - "name": [ - { - "service": "foo", - "method": "bar" - } - ], - "waitForReady": true, - "timeout": "1s", - "maxRequestMessageBytes": 1024, - "maxResponseMessageBytes": 1024 - } - ] - }`, - `{ - "loadBalancingPolicy": "round_robin", - "methodConfig": [ - { - "name": [ - { - "service": "foo" - } - ], - "waitForReady": true, - "timeout": "1s" - }, - { - "name": [ - { - "service": "bar" - } - ], - "waitForReady": false - } - ] - }`, -} - -// scLookupTbl is a set, which contains targets that have service config. Target -// not in this set should not have service config. -var scLookupTbl = map[string]bool{ - "foo.bar.com": true, - "srv.ipv4.single.fake": true, - "srv.ipv4.multi.fake": true, - "no.attribute": true, -} - -// generateSCF generates a slice of strings (aggregately representing a single -// service config file) for the input name, which mocks the result from a real -// DNS TXT record lookup. -func generateSCF(name string) []string { - var b []byte - switch name { - case "foo.bar.com": - b = []byte(scfs[0]) - case "srv.ipv4.single.fake": - b = []byte(scfs[1]) - case "srv.ipv4.multi.fake": - b = []byte(scfs[2]) - default: - b = []byte(scfs[3]) - } - if name == "no.attribute" { - return div(b) - } - return div(append([]byte(txtAttribute), b...)) -} - -// generateSC returns a service config string in JSON format for the input name. -func generateSC(name string) string { - _, cnt := scLookupTbl[name] - if !cnt || name == "no.attribute" { - return "" - } - switch name { - case "foo.bar.com": - return scs[0] - case "srv.ipv4.single.fake": - return scs[1] - case "srv.ipv4.multi.fake": - return scs[2] - default: - return "" - } -} - -var txtLookupTbl = struct { - sync.Mutex - tbl map[string][]string -}{ - tbl: map[string][]string{ - "foo.bar.com": generateSCF("foo.bar.com"), - "srv.ipv4.single.fake": generateSCF("srv.ipv4.single.fake"), - "srv.ipv4.multi.fake": generateSCF("srv.ipv4.multi.fake"), - "srv.ipv6.single.fake": generateSCF("srv.ipv6.single.fake"), - "srv.ipv6.multi.fake": generateSCF("srv.ipv6.multi.fake"), - "no.attribute": generateSCF("no.attribute"), - }, -} - -func txtLookup(host string) ([]string, error) { - txtLookupTbl.Lock() - defer txtLookupTbl.Unlock() - if scs, cnt := txtLookupTbl.tbl[host]; cnt { - return scs, nil - } - return nil, fmt.Errorf("failed to lookup TXT:%s resolution in txtLookupTbl", host) -} - -func TestResolve(t *testing.T) { - testDNSResolver(t) - testDNSResolveNow(t) - testIPResolver(t) -} - -func testDNSResolver(t *testing.T) { - defer leakcheck.Check(t) - tests := []struct { - target string - addrWant []resolver.Address - scWant string - }{ - { - "foo.bar.com", - []resolver.Address{{Addr: "1.2.3.4" + colonDefaultPort}, {Addr: "5.6.7.8" + colonDefaultPort}}, - generateSC("foo.bar.com"), - }, - { - "foo.bar.com:1234", - []resolver.Address{{Addr: "1.2.3.4:1234"}, {Addr: "5.6.7.8:1234"}}, - generateSC("foo.bar.com"), - }, - { - "srv.ipv4.single.fake", - []resolver.Address{{Addr: "1.2.3.4:1234", Type: resolver.GRPCLB, ServerName: "ipv4.single.fake"}, {Addr: "2.4.6.8" + colonDefaultPort}}, - generateSC("srv.ipv4.single.fake"), - }, - { - "srv.ipv4.multi.fake", - []resolver.Address{ - {Addr: "1.2.3.4:1234", Type: resolver.GRPCLB, ServerName: "ipv4.multi.fake"}, - {Addr: "5.6.7.8:1234", Type: resolver.GRPCLB, ServerName: "ipv4.multi.fake"}, - {Addr: "9.10.11.12:1234", Type: resolver.GRPCLB, ServerName: "ipv4.multi.fake"}, - }, - generateSC("srv.ipv4.multi.fake"), - }, - { - "srv.ipv6.single.fake", - []resolver.Address{{Addr: "[2607:f8b0:400a:801::1001]:1234", Type: resolver.GRPCLB, ServerName: "ipv6.single.fake"}}, - generateSC("srv.ipv6.single.fake"), - }, - { - "srv.ipv6.multi.fake", - []resolver.Address{ - {Addr: "[2607:f8b0:400a:801::1001]:1234", Type: resolver.GRPCLB, ServerName: "ipv6.multi.fake"}, - {Addr: "[2607:f8b0:400a:801::1002]:1234", Type: resolver.GRPCLB, ServerName: "ipv6.multi.fake"}, - {Addr: "[2607:f8b0:400a:801::1003]:1234", Type: resolver.GRPCLB, ServerName: "ipv6.multi.fake"}, - }, - generateSC("srv.ipv6.multi.fake"), - }, - { - "no.attribute", - nil, - generateSC("no.attribute"), - }, - } - - for _, a := range tests { - b := NewBuilder() - cc := &testClientConn{target: a.target} - r, err := b.Build(resolver.Target{Endpoint: a.target}, cc, resolver.BuildOption{}) - if err != nil { - t.Fatalf("%v\n", err) - } - var addrs []resolver.Address - var cnt int - for { - addrs, cnt = cc.getAddress() - if cnt > 0 { - break - } - time.Sleep(time.Millisecond) - } - var sc string - for { - sc, cnt = cc.getSc() - if cnt > 0 { - break - } - time.Sleep(time.Millisecond) - } - if !reflect.DeepEqual(a.addrWant, addrs) { - t.Errorf("Resolved addresses of target: %q = %+v, want %+v\n", a.target, addrs, a.addrWant) - } - if !reflect.DeepEqual(a.scWant, sc) { - t.Errorf("Resolved service config of target: %q = %+v, want %+v\n", a.target, sc, a.scWant) - } - r.Close() - } -} - -func mutateTbl(target string) func() { - hostLookupTbl.Lock() - oldHostTblEntry := hostLookupTbl.tbl[target] - hostLookupTbl.tbl[target] = hostLookupTbl.tbl[target][:len(oldHostTblEntry)-1] - hostLookupTbl.Unlock() - txtLookupTbl.Lock() - oldTxtTblEntry := txtLookupTbl.tbl[target] - txtLookupTbl.tbl[target] = []string{""} - txtLookupTbl.Unlock() - - return func() { - hostLookupTbl.Lock() - hostLookupTbl.tbl[target] = oldHostTblEntry - hostLookupTbl.Unlock() - txtLookupTbl.Lock() - txtLookupTbl.tbl[target] = oldTxtTblEntry - txtLookupTbl.Unlock() - } -} - -func testDNSResolveNow(t *testing.T) { - defer leakcheck.Check(t) - tests := []struct { - target string - addrWant []resolver.Address - addrNext []resolver.Address - scWant string - scNext string - }{ - { - "foo.bar.com", - []resolver.Address{{Addr: "1.2.3.4" + colonDefaultPort}, {Addr: "5.6.7.8" + colonDefaultPort}}, - []resolver.Address{{Addr: "1.2.3.4" + colonDefaultPort}}, - generateSC("foo.bar.com"), - "", - }, - } - - for _, a := range tests { - b := NewBuilder() - cc := &testClientConn{target: a.target} - r, err := b.Build(resolver.Target{Endpoint: a.target}, cc, resolver.BuildOption{}) - if err != nil { - t.Fatalf("%v\n", err) - } - var addrs []resolver.Address - var cnt int - for { - addrs, cnt = cc.getAddress() - if cnt > 0 { - break - } - time.Sleep(time.Millisecond) - } - var sc string - for { - sc, cnt = cc.getSc() - if cnt > 0 { - break - } - time.Sleep(time.Millisecond) - } - if !reflect.DeepEqual(a.addrWant, addrs) { - t.Errorf("Resolved addresses of target: %q = %+v, want %+v\n", a.target, addrs, a.addrWant) - } - if !reflect.DeepEqual(a.scWant, sc) { - t.Errorf("Resolved service config of target: %q = %+v, want %+v\n", a.target, sc, a.scWant) - } - revertTbl := mutateTbl(a.target) - r.ResolveNow(resolver.ResolveNowOption{}) - for { - addrs, cnt = cc.getAddress() - if cnt == 2 { - break - } - time.Sleep(time.Millisecond) - } - for { - sc, cnt = cc.getSc() - if cnt == 2 { - break - } - time.Sleep(time.Millisecond) - } - if !reflect.DeepEqual(a.addrNext, addrs) { - t.Errorf("Resolved addresses of target: %q = %+v, want %+v\n", a.target, addrs, a.addrNext) - } - if !reflect.DeepEqual(a.scNext, sc) { - t.Errorf("Resolved service config of target: %q = %+v, want %+v\n", a.target, sc, a.scNext) - } - revertTbl() - r.Close() - } -} - -const colonDefaultPort = ":" + defaultPort - -func testIPResolver(t *testing.T) { - defer leakcheck.Check(t) - tests := []struct { - target string - want []resolver.Address - }{ - {"127.0.0.1", []resolver.Address{{Addr: "127.0.0.1" + colonDefaultPort}}}, - {"127.0.0.1:12345", []resolver.Address{{Addr: "127.0.0.1:12345"}}}, - {"::1", []resolver.Address{{Addr: "[::1]" + colonDefaultPort}}}, - {"[::1]:12345", []resolver.Address{{Addr: "[::1]:12345"}}}, - {"[::1]", []resolver.Address{{Addr: "[::1]:443"}}}, - {"2001:db8:85a3::8a2e:370:7334", []resolver.Address{{Addr: "[2001:db8:85a3::8a2e:370:7334]" + colonDefaultPort}}}, - {"[2001:db8:85a3::8a2e:370:7334]", []resolver.Address{{Addr: "[2001:db8:85a3::8a2e:370:7334]" + colonDefaultPort}}}, - {"[2001:db8:85a3::8a2e:370:7334]:12345", []resolver.Address{{Addr: "[2001:db8:85a3::8a2e:370:7334]:12345"}}}, - {"[2001:db8::1]:http", []resolver.Address{{Addr: "[2001:db8::1]:http"}}}, - // TODO(yuxuanli): zone support? - } - - for _, v := range tests { - b := NewBuilder() - cc := &testClientConn{target: v.target} - r, err := b.Build(resolver.Target{Endpoint: v.target}, cc, resolver.BuildOption{}) - if err != nil { - t.Fatalf("%v\n", err) - } - var addrs []resolver.Address - var cnt int - for { - addrs, cnt = cc.getAddress() - if cnt > 0 { - break - } - time.Sleep(time.Millisecond) - } - if !reflect.DeepEqual(v.want, addrs) { - t.Errorf("Resolved addresses of target: %q = %+v, want %+v\n", v.target, addrs, v.want) - } - r.ResolveNow(resolver.ResolveNowOption{}) - for { - addrs, cnt = cc.getAddress() - if cnt == 2 { - break - } - time.Sleep(time.Millisecond) - } - if !reflect.DeepEqual(v.want, addrs) { - t.Errorf("Resolved addresses of target: %q = %+v, want %+v\n", v.target, addrs, v.want) - } - r.Close() - } -} - -func TestResolveFunc(t *testing.T) { - defer leakcheck.Check(t) - tests := []struct { - addr string - want error - }{ - // TODO(yuxuanli): More false cases? - {"www.google.com", nil}, - {"foo.bar:12345", nil}, - {"127.0.0.1", nil}, - {"::", nil}, - {"127.0.0.1:12345", nil}, - {"[::1]:80", nil}, - {"[2001:db8:a0b:12f0::1]:21", nil}, - {":80", nil}, - {"127.0.0...1:12345", nil}, - {"[fe80::1%lo0]:80", nil}, - {"golang.org:http", nil}, - {"[2001:db8::1]:http", nil}, - {"[2001:db8::1]:", errEndsWithColon}, - {":", errEndsWithColon}, - {"", errMissingAddr}, - {"[2001:db8:a0b:12f0::1", errForInvalidTarget}, - } - - b := NewBuilder() - for _, v := range tests { - cc := &testClientConn{target: v.addr} - r, err := b.Build(resolver.Target{Endpoint: v.addr}, cc, resolver.BuildOption{}) - if err == nil { - r.Close() - } - if !reflect.DeepEqual(err, v.want) { - t.Errorf("Build(%q, cc, resolver.BuildOption{}) = %v, want %v", v.addr, err, v.want) - } - } -} - -func TestDisableServiceConfig(t *testing.T) { - defer leakcheck.Check(t) - tests := []struct { - target string - scWant string - disableServiceConfig bool - }{ - { - "foo.bar.com", - generateSC("foo.bar.com"), - false, - }, - { - "foo.bar.com", - "", - true, - }, - } - - for _, a := range tests { - b := NewBuilder() - cc := &testClientConn{target: a.target} - r, err := b.Build(resolver.Target{Endpoint: a.target}, cc, resolver.BuildOption{DisableServiceConfig: a.disableServiceConfig}) - if err != nil { - t.Fatalf("%v\n", err) - } - var cnt int - var sc string - for { - sc, cnt = cc.getSc() - if cnt > 0 { - break - } - time.Sleep(time.Millisecond) - } - if !reflect.DeepEqual(a.scWant, sc) { - t.Errorf("Resolved service config of target: %q = %+v, want %+v\n", a.target, sc, a.scWant) - } - r.Close() - } -} - -func TestDNSResolverRetry(t *testing.T) { - b := NewBuilder() - target := "ipv4.single.fake" - cc := &testClientConn{target: target} - r, err := b.Build(resolver.Target{Endpoint: target}, cc, resolver.BuildOption{}) - if err != nil { - t.Fatalf("%v\n", err) - } - var addrs []resolver.Address - for { - addrs, _ = cc.getAddress() - if len(addrs) == 1 { - break - } - time.Sleep(time.Millisecond) - } - want := []resolver.Address{{Addr: "1.2.3.4" + colonDefaultPort}} - if !reflect.DeepEqual(want, addrs) { - t.Errorf("Resolved addresses of target: %q = %+v, want %+v\n", target, addrs, want) - } - // mutate the host lookup table so the target has 0 address returned. - revertTbl := mutateTbl(target) - // trigger a resolve that will get empty address list - r.ResolveNow(resolver.ResolveNowOption{}) - for { - addrs, _ = cc.getAddress() - if len(addrs) == 0 { - break - } - time.Sleep(time.Millisecond) - } - revertTbl() - // wait for the retry to happen in two seconds. - timer := time.NewTimer(2 * time.Second) - for { - b := false - select { - case <-timer.C: - b = true - default: - addrs, _ = cc.getAddress() - if len(addrs) == 1 { - b = true - break - } - time.Sleep(time.Millisecond) - } - if b { - break - } - } - if !reflect.DeepEqual(want, addrs) { - t.Errorf("Resolved addresses of target: %q = %+v, want %+v\n", target, addrs, want) - } - r.Close() -} diff --git a/vendor/google.golang.org/grpc/resolver/dns/go17_test.go b/vendor/google.golang.org/grpc/resolver/dns/go17_test.go deleted file mode 100644 index 21eaa888..00000000 --- a/vendor/google.golang.org/grpc/resolver/dns/go17_test.go +++ /dev/null @@ -1,50 +0,0 @@ -// +build go1.6, !go1.8 - -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package dns - -import ( - "fmt" - "net" - - "golang.org/x/net/context" -) - -var errForInvalidTarget = fmt.Errorf("invalid target address [2001:db8:a0b:12f0::1, error info: missing ']' in address [2001:db8:a0b:12f0::1:443") - -func replaceNetFunc() func() { - oldLookupHost := lookupHost - oldLookupSRV := lookupSRV - oldLookupTXT := lookupTXT - lookupHost = func(ctx context.Context, host string) ([]string, error) { - return hostLookup(host) - } - lookupSRV = func(ctx context.Context, service, proto, name string) (string, []*net.SRV, error) { - return srvLookup(service, proto, name) - } - lookupTXT = func(ctx context.Context, host string) ([]string, error) { - return txtLookup(host) - } - return func() { - lookupHost = oldLookupHost - lookupSRV = oldLookupSRV - lookupTXT = oldLookupTXT - } -} diff --git a/vendor/google.golang.org/grpc/resolver/dns/go18_test.go b/vendor/google.golang.org/grpc/resolver/dns/go18_test.go deleted file mode 100644 index b0149c86..00000000 --- a/vendor/google.golang.org/grpc/resolver/dns/go18_test.go +++ /dev/null @@ -1,49 +0,0 @@ -// +build go1.8 - -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package dns - -import ( - "context" - "fmt" - "net" -) - -var errForInvalidTarget = fmt.Errorf("invalid target address [2001:db8:a0b:12f0::1, error info: address [2001:db8:a0b:12f0::1:443: missing ']' in address") - -func replaceNetFunc() func() { - oldLookupHost := lookupHost - oldLookupSRV := lookupSRV - oldLookupTXT := lookupTXT - lookupHost = func(ctx context.Context, host string) ([]string, error) { - return hostLookup(host) - } - lookupSRV = func(ctx context.Context, service, proto, name string) (string, []*net.SRV, error) { - return srvLookup(service, proto, name) - } - lookupTXT = func(ctx context.Context, host string) ([]string, error) { - return txtLookup(host) - } - return func() { - lookupHost = oldLookupHost - lookupSRV = oldLookupSRV - lookupTXT = oldLookupTXT - } -} diff --git a/vendor/google.golang.org/grpc/resolver_conn_wrapper_test.go b/vendor/google.golang.org/grpc/resolver_conn_wrapper_test.go deleted file mode 100644 index 6f1367a2..00000000 --- a/vendor/google.golang.org/grpc/resolver_conn_wrapper_test.go +++ /dev/null @@ -1,113 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package grpc - -import ( - "fmt" - "net" - "testing" - "time" - - "google.golang.org/grpc/resolver" -) - -func TestParseTarget(t *testing.T) { - for _, test := range []resolver.Target{ - {Scheme: "dns", Authority: "", Endpoint: "google.com"}, - {Scheme: "dns", Authority: "a.server.com", Endpoint: "google.com"}, - {Scheme: "dns", Authority: "a.server.com", Endpoint: "google.com/?a=b"}, - {Scheme: "passthrough", Authority: "", Endpoint: "/unix/socket/address"}, - } { - str := test.Scheme + "://" + test.Authority + "/" + test.Endpoint - got := parseTarget(str) - if got != test { - t.Errorf("parseTarget(%q) = %+v, want %+v", str, got, test) - } - } -} - -func TestParseTargetString(t *testing.T) { - for _, test := range []struct { - targetStr string - want resolver.Target - }{ - {targetStr: "", want: resolver.Target{Scheme: "", Authority: "", Endpoint: ""}}, - {targetStr: ":///", want: resolver.Target{Scheme: "", Authority: "", Endpoint: ""}}, - {targetStr: "a:///", want: resolver.Target{Scheme: "a", Authority: "", Endpoint: ""}}, - {targetStr: "://a/", want: resolver.Target{Scheme: "", Authority: "a", Endpoint: ""}}, - {targetStr: ":///a", want: resolver.Target{Scheme: "", Authority: "", Endpoint: "a"}}, - {targetStr: "a://b/", want: resolver.Target{Scheme: "a", Authority: "b", Endpoint: ""}}, - {targetStr: "a:///b", want: resolver.Target{Scheme: "a", Authority: "", Endpoint: "b"}}, - {targetStr: "://a/b", want: resolver.Target{Scheme: "", Authority: "a", Endpoint: "b"}}, - {targetStr: "a://b/c", want: resolver.Target{Scheme: "a", Authority: "b", Endpoint: "c"}}, - {targetStr: "dns:///google.com", want: resolver.Target{Scheme: "dns", Authority: "", Endpoint: "google.com"}}, - {targetStr: "dns://a.server.com/google.com", want: resolver.Target{Scheme: "dns", Authority: "a.server.com", Endpoint: "google.com"}}, - {targetStr: "dns://a.server.com/google.com/?a=b", want: resolver.Target{Scheme: "dns", Authority: "a.server.com", Endpoint: "google.com/?a=b"}}, - - {targetStr: "/", want: resolver.Target{Scheme: "", Authority: "", Endpoint: "/"}}, - {targetStr: "google.com", want: resolver.Target{Scheme: "", Authority: "", Endpoint: "google.com"}}, - {targetStr: "google.com/?a=b", want: resolver.Target{Scheme: "", Authority: "", Endpoint: "google.com/?a=b"}}, - {targetStr: "/unix/socket/address", want: resolver.Target{Scheme: "", Authority: "", Endpoint: "/unix/socket/address"}}, - - // If we can only parse part of the target. - {targetStr: "://", want: resolver.Target{Scheme: "", Authority: "", Endpoint: "://"}}, - {targetStr: "unix://domain", want: resolver.Target{Scheme: "", Authority: "", Endpoint: "unix://domain"}}, - {targetStr: "a:b", want: resolver.Target{Scheme: "", Authority: "", Endpoint: "a:b"}}, - {targetStr: "a/b", want: resolver.Target{Scheme: "", Authority: "", Endpoint: "a/b"}}, - {targetStr: "a:/b", want: resolver.Target{Scheme: "", Authority: "", Endpoint: "a:/b"}}, - {targetStr: "a//b", want: resolver.Target{Scheme: "", Authority: "", Endpoint: "a//b"}}, - {targetStr: "a://b", want: resolver.Target{Scheme: "", Authority: "", Endpoint: "a://b"}}, - } { - got := parseTarget(test.targetStr) - if got != test.want { - t.Errorf("parseTarget(%q) = %+v, want %+v", test.targetStr, got, test.want) - } - } -} - -// The target string with unknown scheme should be kept unchanged and passed to -// the dialer. -func TestDialParseTargetUnknownScheme(t *testing.T) { - for _, test := range []struct { - targetStr string - want string - }{ - {"/unix/socket/address", "/unix/socket/address"}, - - // Special test for "unix:///". - {"unix:///unix/socket/address", "unix:///unix/socket/address"}, - - // For known scheme. - {"passthrough://a.server.com/google.com", "google.com"}, - } { - dialStrCh := make(chan string, 1) - cc, err := Dial(test.targetStr, WithInsecure(), WithDialer(func(t string, _ time.Duration) (net.Conn, error) { - dialStrCh <- t - return nil, fmt.Errorf("test dialer, always error") - })) - if err != nil { - t.Fatalf("Failed to create ClientConn: %v", err) - } - got := <-dialStrCh - cc.Close() - if got != test.want { - t.Errorf("Dial(%q), dialer got %q, want %q", test.targetStr, got, test.want) - } - } -} diff --git a/vendor/google.golang.org/grpc/rpc_util_test.go b/vendor/google.golang.org/grpc/rpc_util_test.go deleted file mode 100644 index 0335fc7d..00000000 --- a/vendor/google.golang.org/grpc/rpc_util_test.go +++ /dev/null @@ -1,288 +0,0 @@ -/* - * - * Copyright 2014 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package grpc - -import ( - "bytes" - "compress/gzip" - "io" - "math" - "reflect" - "testing" - - "github.com/golang/protobuf/proto" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/encoding" - protoenc "google.golang.org/grpc/encoding/proto" - "google.golang.org/grpc/internal/transport" - "google.golang.org/grpc/status" - perfpb "google.golang.org/grpc/test/codec_perf" -) - -type fullReader struct { - reader io.Reader -} - -func (f fullReader) Read(p []byte) (int, error) { - return io.ReadFull(f.reader, p) -} - -var _ CallOption = EmptyCallOption{} // ensure EmptyCallOption implements the interface - -func TestSimpleParsing(t *testing.T) { - bigMsg := bytes.Repeat([]byte{'x'}, 1<<24) - for _, test := range []struct { - // input - p []byte - // outputs - err error - b []byte - pt payloadFormat - }{ - {nil, io.EOF, nil, compressionNone}, - {[]byte{0, 0, 0, 0, 0}, nil, nil, compressionNone}, - {[]byte{0, 0, 0, 0, 1, 'a'}, nil, []byte{'a'}, compressionNone}, - {[]byte{1, 0}, io.ErrUnexpectedEOF, nil, compressionNone}, - {[]byte{0, 0, 0, 0, 10, 'a'}, io.ErrUnexpectedEOF, nil, compressionNone}, - // Check that messages with length >= 2^24 are parsed. - {append([]byte{0, 1, 0, 0, 0}, bigMsg...), nil, bigMsg, compressionNone}, - } { - buf := fullReader{bytes.NewReader(test.p)} - parser := &parser{r: buf} - pt, b, err := parser.recvMsg(math.MaxInt32) - if err != test.err || !bytes.Equal(b, test.b) || pt != test.pt { - t.Fatalf("parser{%v}.recvMsg(_) = %v, %v, %v\nwant %v, %v, %v", test.p, pt, b, err, test.pt, test.b, test.err) - } - } -} - -func TestMultipleParsing(t *testing.T) { - // Set a byte stream consists of 3 messages with their headers. - p := []byte{0, 0, 0, 0, 1, 'a', 0, 0, 0, 0, 2, 'b', 'c', 0, 0, 0, 0, 1, 'd'} - b := fullReader{bytes.NewReader(p)} - parser := &parser{r: b} - - wantRecvs := []struct { - pt payloadFormat - data []byte - }{ - {compressionNone, []byte("a")}, - {compressionNone, []byte("bc")}, - {compressionNone, []byte("d")}, - } - for i, want := range wantRecvs { - pt, data, err := parser.recvMsg(math.MaxInt32) - if err != nil || pt != want.pt || !reflect.DeepEqual(data, want.data) { - t.Fatalf("after %d calls, parser{%v}.recvMsg(_) = %v, %v, %v\nwant %v, %v, ", - i, p, pt, data, err, want.pt, want.data) - } - } - - pt, data, err := parser.recvMsg(math.MaxInt32) - if err != io.EOF { - t.Fatalf("after %d recvMsgs calls, parser{%v}.recvMsg(_) = %v, %v, %v\nwant _, _, %v", - len(wantRecvs), p, pt, data, err, io.EOF) - } -} - -func TestEncode(t *testing.T) { - for _, test := range []struct { - // input - msg proto.Message - // outputs - hdr []byte - data []byte - err error - }{ - {nil, []byte{0, 0, 0, 0, 0}, []byte{}, nil}, - } { - data, err := encode(encoding.GetCodec(protoenc.Name), test.msg) - if err != test.err || !bytes.Equal(data, test.data) { - t.Errorf("encode(_, %v) = %v, %v; want %v, %v", test.msg, data, err, test.data, test.err) - continue - } - if hdr, _ := msgHeader(data, nil); !bytes.Equal(hdr, test.hdr) { - t.Errorf("msgHeader(%v, false) = %v; want %v", data, hdr, test.hdr) - } - } -} - -func TestCompress(t *testing.T) { - bestCompressor, err := NewGZIPCompressorWithLevel(gzip.BestCompression) - if err != nil { - t.Fatalf("Could not initialize gzip compressor with best compression.") - } - bestSpeedCompressor, err := NewGZIPCompressorWithLevel(gzip.BestSpeed) - if err != nil { - t.Fatalf("Could not initialize gzip compressor with best speed compression.") - } - - defaultCompressor, err := NewGZIPCompressorWithLevel(gzip.BestSpeed) - if err != nil { - t.Fatalf("Could not initialize gzip compressor with default compression.") - } - - level5, err := NewGZIPCompressorWithLevel(5) - if err != nil { - t.Fatalf("Could not initialize gzip compressor with level 5 compression.") - } - - for _, test := range []struct { - // input - data []byte - cp Compressor - dc Decompressor - // outputs - err error - }{ - {make([]byte, 1024), NewGZIPCompressor(), NewGZIPDecompressor(), nil}, - {make([]byte, 1024), bestCompressor, NewGZIPDecompressor(), nil}, - {make([]byte, 1024), bestSpeedCompressor, NewGZIPDecompressor(), nil}, - {make([]byte, 1024), defaultCompressor, NewGZIPDecompressor(), nil}, - {make([]byte, 1024), level5, NewGZIPDecompressor(), nil}, - } { - b := new(bytes.Buffer) - if err := test.cp.Do(b, test.data); err != test.err { - t.Fatalf("Compressor.Do(_, %v) = %v, want %v", test.data, err, test.err) - } - if b.Len() >= len(test.data) { - t.Fatalf("The compressor fails to compress data.") - } - if p, err := test.dc.Do(b); err != nil || !bytes.Equal(test.data, p) { - t.Fatalf("Decompressor.Do(%v) = %v, %v, want %v, ", b, p, err, test.data) - } - } -} - -func TestToRPCErr(t *testing.T) { - for _, test := range []struct { - // input - errIn error - // outputs - errOut error - }{ - {transport.ErrConnClosing, status.Error(codes.Unavailable, transport.ErrConnClosing.Desc)}, - {io.ErrUnexpectedEOF, status.Error(codes.Internal, io.ErrUnexpectedEOF.Error())}, - } { - err := toRPCErr(test.errIn) - if _, ok := status.FromError(err); !ok { - t.Fatalf("toRPCErr{%v} returned type %T, want %T", test.errIn, err, status.Error(codes.Unknown, "")) - } - if !reflect.DeepEqual(err, test.errOut) { - t.Fatalf("toRPCErr{%v} = %v \nwant %v", test.errIn, err, test.errOut) - } - } -} - -func TestParseDialTarget(t *testing.T) { - for _, test := range []struct { - target, wantNet, wantAddr string - }{ - {"unix:etcd:0", "unix", "etcd:0"}, - {"unix:///tmp/unix-3", "unix", "/tmp/unix-3"}, - {"unix://domain", "unix", "domain"}, - {"unix://etcd:0", "unix", "etcd:0"}, - {"unix:///etcd:0", "unix", "/etcd:0"}, - {"passthrough://unix://domain", "tcp", "passthrough://unix://domain"}, - {"https://google.com:443", "tcp", "https://google.com:443"}, - {"dns:///google.com", "tcp", "dns:///google.com"}, - {"/unix/socket/address", "tcp", "/unix/socket/address"}, - } { - gotNet, gotAddr := parseDialTarget(test.target) - if gotNet != test.wantNet || gotAddr != test.wantAddr { - t.Errorf("parseDialTarget(%q) = %s, %s want %s, %s", test.target, gotNet, gotAddr, test.wantNet, test.wantAddr) - } - } -} - -// bmEncode benchmarks encoding a Protocol Buffer message containing mSize -// bytes. -func bmEncode(b *testing.B, mSize int) { - cdc := encoding.GetCodec(protoenc.Name) - msg := &perfpb.Buffer{Body: make([]byte, mSize)} - encodeData, _ := encode(cdc, msg) - encodedSz := int64(len(encodeData)) - b.ReportAllocs() - b.ResetTimer() - for i := 0; i < b.N; i++ { - encode(cdc, msg) - } - b.SetBytes(encodedSz) -} - -func BenchmarkEncode1B(b *testing.B) { - bmEncode(b, 1) -} - -func BenchmarkEncode1KiB(b *testing.B) { - bmEncode(b, 1024) -} - -func BenchmarkEncode8KiB(b *testing.B) { - bmEncode(b, 8*1024) -} - -func BenchmarkEncode64KiB(b *testing.B) { - bmEncode(b, 64*1024) -} - -func BenchmarkEncode512KiB(b *testing.B) { - bmEncode(b, 512*1024) -} - -func BenchmarkEncode1MiB(b *testing.B) { - bmEncode(b, 1024*1024) -} - -// bmCompressor benchmarks a compressor of a Protocol Buffer message containing -// mSize bytes. -func bmCompressor(b *testing.B, mSize int, cp Compressor) { - payload := make([]byte, mSize) - cBuf := bytes.NewBuffer(make([]byte, mSize)) - b.ReportAllocs() - b.ResetTimer() - for i := 0; i < b.N; i++ { - cp.Do(cBuf, payload) - cBuf.Reset() - } -} - -func BenchmarkGZIPCompressor1B(b *testing.B) { - bmCompressor(b, 1, NewGZIPCompressor()) -} - -func BenchmarkGZIPCompressor1KiB(b *testing.B) { - bmCompressor(b, 1024, NewGZIPCompressor()) -} - -func BenchmarkGZIPCompressor8KiB(b *testing.B) { - bmCompressor(b, 8*1024, NewGZIPCompressor()) -} - -func BenchmarkGZIPCompressor64KiB(b *testing.B) { - bmCompressor(b, 64*1024, NewGZIPCompressor()) -} - -func BenchmarkGZIPCompressor512KiB(b *testing.B) { - bmCompressor(b, 512*1024, NewGZIPCompressor()) -} - -func BenchmarkGZIPCompressor1MiB(b *testing.B) { - bmCompressor(b, 1024*1024, NewGZIPCompressor()) -} diff --git a/vendor/google.golang.org/grpc/server_test.go b/vendor/google.golang.org/grpc/server_test.go deleted file mode 100644 index 11ce8673..00000000 --- a/vendor/google.golang.org/grpc/server_test.go +++ /dev/null @@ -1,136 +0,0 @@ -/* - * - * Copyright 2016 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package grpc - -import ( - "net" - "reflect" - "strings" - "testing" - "time" - - "golang.org/x/net/context" - "google.golang.org/grpc/internal/leakcheck" - "google.golang.org/grpc/internal/transport" -) - -type emptyServiceServer interface{} - -type testServer struct{} - -func TestStopBeforeServe(t *testing.T) { - defer leakcheck.Check(t) - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - t.Fatalf("failed to create listener: %v", err) - } - - server := NewServer() - server.Stop() - err = server.Serve(lis) - if err != ErrServerStopped { - t.Fatalf("server.Serve() error = %v, want %v", err, ErrServerStopped) - } - - // server.Serve is responsible for closing the listener, even if the - // server was already stopped. - err = lis.Close() - if got, want := errorDesc(err), "use of closed"; !strings.Contains(got, want) { - t.Errorf("Close() error = %q, want %q", got, want) - } -} - -func TestGracefulStop(t *testing.T) { - defer leakcheck.Check(t) - - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - t.Fatalf("failed to create listener: %v", err) - } - - server := NewServer() - go func() { - // make sure Serve() is called - time.Sleep(time.Millisecond * 500) - server.GracefulStop() - }() - - err = server.Serve(lis) - if err != nil { - t.Fatalf("Serve() returned non-nil error on GracefulStop: %v", err) - } -} - -func TestGetServiceInfo(t *testing.T) { - defer leakcheck.Check(t) - testSd := ServiceDesc{ - ServiceName: "grpc.testing.EmptyService", - HandlerType: (*emptyServiceServer)(nil), - Methods: []MethodDesc{ - { - MethodName: "EmptyCall", - Handler: nil, - }, - }, - Streams: []StreamDesc{ - { - StreamName: "EmptyStream", - Handler: nil, - ServerStreams: false, - ClientStreams: true, - }, - }, - Metadata: []int{0, 2, 1, 3}, - } - - server := NewServer() - server.RegisterService(&testSd, &testServer{}) - - info := server.GetServiceInfo() - want := map[string]ServiceInfo{ - "grpc.testing.EmptyService": { - Methods: []MethodInfo{ - { - Name: "EmptyCall", - IsClientStream: false, - IsServerStream: false, - }, - { - Name: "EmptyStream", - IsClientStream: true, - IsServerStream: false, - }}, - Metadata: []int{0, 2, 1, 3}, - }, - } - - if !reflect.DeepEqual(info, want) { - t.Errorf("GetServiceInfo() = %+v, want %+v", info, want) - } -} - -func TestStreamContext(t *testing.T) { - expectedStream := &transport.Stream{} - ctx := NewContextWithServerTransportStream(context.Background(), expectedStream) - s := ServerTransportStreamFromContext(ctx) - stream, ok := s.(*transport.Stream) - if !ok || expectedStream != stream { - t.Fatalf("GetStreamFromContext(%v) = %v, %t, want: %v, true", ctx, stream, ok, expectedStream) - } -} diff --git a/vendor/google.golang.org/grpc/service_config_test.go b/vendor/google.golang.org/grpc/service_config_test.go deleted file mode 100644 index 8301a506..00000000 --- a/vendor/google.golang.org/grpc/service_config_test.go +++ /dev/null @@ -1,386 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package grpc - -import ( - "fmt" - "math" - "reflect" - "testing" - "time" -) - -func TestParseLoadBalancer(t *testing.T) { - testcases := []struct { - scjs string - wantSC ServiceConfig - wantErr bool - }{ - { - `{ - "loadBalancingPolicy": "round_robin", - "methodConfig": [ - { - "name": [ - { - "service": "foo", - "method": "Bar" - } - ], - "waitForReady": true - } - ] -}`, - ServiceConfig{ - LB: newString("round_robin"), - Methods: map[string]MethodConfig{ - "/foo/Bar": { - WaitForReady: newBool(true), - }, - }, - }, - false, - }, - { - `{ - "loadBalancingPolicy": 1, - "methodConfig": [ - { - "name": [ - { - "service": "foo", - "method": "Bar" - } - ], - "waitForReady": false - } - ] -}`, - ServiceConfig{}, - true, - }, - } - - for _, c := range testcases { - sc, err := parseServiceConfig(c.scjs) - if c.wantErr != (err != nil) || !reflect.DeepEqual(sc, c.wantSC) { - t.Fatalf("parseServiceConfig(%s) = %+v, %v, want %+v, %v", c.scjs, sc, err, c.wantSC, c.wantErr) - } - } -} - -func TestParseWaitForReady(t *testing.T) { - testcases := []struct { - scjs string - wantSC ServiceConfig - wantErr bool - }{ - { - `{ - "methodConfig": [ - { - "name": [ - { - "service": "foo", - "method": "Bar" - } - ], - "waitForReady": true - } - ] -}`, - ServiceConfig{ - Methods: map[string]MethodConfig{ - "/foo/Bar": { - WaitForReady: newBool(true), - }, - }, - }, - false, - }, - { - `{ - "methodConfig": [ - { - "name": [ - { - "service": "foo", - "method": "Bar" - } - ], - "waitForReady": false - } - ] -}`, - ServiceConfig{ - Methods: map[string]MethodConfig{ - "/foo/Bar": { - WaitForReady: newBool(false), - }, - }, - }, - false, - }, - { - `{ - "methodConfig": [ - { - "name": [ - { - "service": "foo", - "method": "Bar" - } - ], - "waitForReady": fall - }, - { - "name": [ - { - "service": "foo", - "method": "Bar" - } - ], - "waitForReady": true - } - ] -}`, - ServiceConfig{}, - true, - }, - } - - for _, c := range testcases { - sc, err := parseServiceConfig(c.scjs) - if c.wantErr != (err != nil) || !reflect.DeepEqual(sc, c.wantSC) { - t.Fatalf("parseServiceConfig(%s) = %+v, %v, want %+v, %v", c.scjs, sc, err, c.wantSC, c.wantErr) - } - } -} - -func TestPraseTimeOut(t *testing.T) { - testcases := []struct { - scjs string - wantSC ServiceConfig - wantErr bool - }{ - { - `{ - "methodConfig": [ - { - "name": [ - { - "service": "foo", - "method": "Bar" - } - ], - "timeout": "1s" - } - ] -}`, - ServiceConfig{ - Methods: map[string]MethodConfig{ - "/foo/Bar": { - Timeout: newDuration(time.Second), - }, - }, - }, - false, - }, - { - `{ - "methodConfig": [ - { - "name": [ - { - "service": "foo", - "method": "Bar" - } - ], - "timeout": "3c" - } - ] -}`, - ServiceConfig{}, - true, - }, - { - `{ - "methodConfig": [ - { - "name": [ - { - "service": "foo", - "method": "Bar" - } - ], - "timeout": "3c" - }, - { - "name": [ - { - "service": "foo", - "method": "Bar" - } - ], - "timeout": "1s" - } - ] -}`, - ServiceConfig{}, - true, - }, - } - - for _, c := range testcases { - sc, err := parseServiceConfig(c.scjs) - if c.wantErr != (err != nil) || !reflect.DeepEqual(sc, c.wantSC) { - t.Fatalf("parseServiceConfig(%s) = %+v, %v, want %+v, %v", c.scjs, sc, err, c.wantSC, c.wantErr) - } - } -} - -func TestPraseMsgSize(t *testing.T) { - testcases := []struct { - scjs string - wantSC ServiceConfig - wantErr bool - }{ - { - `{ - "methodConfig": [ - { - "name": [ - { - "service": "foo", - "method": "Bar" - } - ], - "maxRequestMessageBytes": 1024, - "maxResponseMessageBytes": 2048 - } - ] -}`, - ServiceConfig{ - Methods: map[string]MethodConfig{ - "/foo/Bar": { - MaxReqSize: newInt(1024), - MaxRespSize: newInt(2048), - }, - }, - }, - false, - }, - { - `{ - "methodConfig": [ - { - "name": [ - { - "service": "foo", - "method": "Bar" - } - ], - "maxRequestMessageBytes": "1024", - "maxResponseMessageBytes": "2048" - }, - { - "name": [ - { - "service": "foo", - "method": "Bar" - } - ], - "maxRequestMessageBytes": 1024, - "maxResponseMessageBytes": 2048 - } - ] -}`, - ServiceConfig{}, - true, - }, - } - - for _, c := range testcases { - sc, err := parseServiceConfig(c.scjs) - if c.wantErr != (err != nil) || !reflect.DeepEqual(sc, c.wantSC) { - t.Fatalf("parseServiceConfig(%s) = %+v, %v, want %+v, %v", c.scjs, sc, err, c.wantSC, c.wantErr) - } - } -} - -func TestParseDuration(t *testing.T) { - testCases := []struct { - s *string - want *time.Duration - err bool - }{ - {s: nil, want: nil}, - {s: newString("1s"), want: newDuration(time.Second)}, - {s: newString("-1s"), want: newDuration(-time.Second)}, - {s: newString("1.1s"), want: newDuration(1100 * time.Millisecond)}, - {s: newString("1.s"), want: newDuration(time.Second)}, - {s: newString("1.0s"), want: newDuration(time.Second)}, - {s: newString(".002s"), want: newDuration(2 * time.Millisecond)}, - {s: newString(".002000s"), want: newDuration(2 * time.Millisecond)}, - {s: newString("0.003s"), want: newDuration(3 * time.Millisecond)}, - {s: newString("0.000004s"), want: newDuration(4 * time.Microsecond)}, - {s: newString("5000.000000009s"), want: newDuration(5000*time.Second + 9*time.Nanosecond)}, - {s: newString("4999.999999999s"), want: newDuration(5000*time.Second - time.Nanosecond)}, - {s: newString("1"), err: true}, - {s: newString("s"), err: true}, - {s: newString(".s"), err: true}, - {s: newString("1 s"), err: true}, - {s: newString(" 1s"), err: true}, - {s: newString("1ms"), err: true}, - {s: newString("1.1.1s"), err: true}, - {s: newString("Xs"), err: true}, - {s: newString("as"), err: true}, - {s: newString(".0000000001s"), err: true}, - {s: newString(fmt.Sprint(math.MaxInt32) + "s"), want: newDuration(math.MaxInt32 * time.Second)}, - {s: newString(fmt.Sprint(int64(math.MaxInt32)+1) + "s"), err: true}, - } - for _, tc := range testCases { - got, err := parseDuration(tc.s) - if tc.err != (err != nil) || - (got == nil) != (tc.want == nil) || - (got != nil && *got != *tc.want) { - wantErr := "" - if tc.err { - wantErr = "" - } - s := "" - if tc.s != nil { - s = `&"` + *tc.s + `"` - } - t.Errorf("parseDuration(%v) = %v, %v; want %v, %v", s, got, err, tc.want, wantErr) - } - } -} - -func newBool(b bool) *bool { - return &b -} - -func newDuration(b time.Duration) *time.Duration { - return &b -} - -func newString(b string) *string { - return &b -} diff --git a/vendor/google.golang.org/grpc/stats/stats_test.go b/vendor/google.golang.org/grpc/stats/stats_test.go deleted file mode 100644 index 00a5e4f3..00000000 --- a/vendor/google.golang.org/grpc/stats/stats_test.go +++ /dev/null @@ -1,1257 +0,0 @@ -// +build go1.7 - -/* - * - * Copyright 2016 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES 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_test - -import ( - "fmt" - "io" - "net" - "reflect" - "sync" - "testing" - "time" - - "github.com/golang/protobuf/proto" - "golang.org/x/net/context" - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/stats" - testpb "google.golang.org/grpc/stats/grpc_testing" - "google.golang.org/grpc/status" -) - -func init() { - grpc.EnableTracing = false -} - -type connCtxKey struct{} -type rpcCtxKey struct{} - -var ( - // For headers: - testMetadata = metadata.MD{ - "key1": []string{"value1"}, - "key2": []string{"value2"}, - } - // For trailers: - testTrailerMetadata = metadata.MD{ - "tkey1": []string{"trailerValue1"}, - "tkey2": []string{"trailerValue2"}, - } - // The id for which the service handler should return error. - errorID int32 = 32202 -) - -type testServer struct{} - -func (s *testServer) UnaryCall(ctx context.Context, in *testpb.SimpleRequest) (*testpb.SimpleResponse, error) { - md, ok := metadata.FromIncomingContext(ctx) - if ok { - if err := grpc.SendHeader(ctx, md); err != nil { - return nil, status.Errorf(status.Code(err), "grpc.SendHeader(_, %v) = %v, want ", md, err) - } - if err := grpc.SetTrailer(ctx, testTrailerMetadata); err != nil { - return nil, status.Errorf(status.Code(err), "grpc.SetTrailer(_, %v) = %v, want ", testTrailerMetadata, err) - } - } - - if in.Id == errorID { - return nil, fmt.Errorf("got error id: %v", in.Id) - } - - return &testpb.SimpleResponse{Id: in.Id}, nil -} - -func (s *testServer) FullDuplexCall(stream testpb.TestService_FullDuplexCallServer) error { - md, ok := metadata.FromIncomingContext(stream.Context()) - if ok { - if err := stream.SendHeader(md); err != nil { - return status.Errorf(status.Code(err), "%v.SendHeader(%v) = %v, want %v", stream, md, err, nil) - } - stream.SetTrailer(testTrailerMetadata) - } - for { - in, err := stream.Recv() - if err == io.EOF { - // read done. - return nil - } - if err != nil { - return err - } - - if in.Id == errorID { - return fmt.Errorf("got error id: %v", in.Id) - } - - if err := stream.Send(&testpb.SimpleResponse{Id: in.Id}); err != nil { - return err - } - } -} - -func (s *testServer) ClientStreamCall(stream testpb.TestService_ClientStreamCallServer) error { - md, ok := metadata.FromIncomingContext(stream.Context()) - if ok { - if err := stream.SendHeader(md); err != nil { - return status.Errorf(status.Code(err), "%v.SendHeader(%v) = %v, want %v", stream, md, err, nil) - } - stream.SetTrailer(testTrailerMetadata) - } - for { - in, err := stream.Recv() - if err == io.EOF { - // read done. - return stream.SendAndClose(&testpb.SimpleResponse{Id: int32(0)}) - } - if err != nil { - return err - } - - if in.Id == errorID { - return fmt.Errorf("got error id: %v", in.Id) - } - } -} - -func (s *testServer) ServerStreamCall(in *testpb.SimpleRequest, stream testpb.TestService_ServerStreamCallServer) error { - md, ok := metadata.FromIncomingContext(stream.Context()) - if ok { - if err := stream.SendHeader(md); err != nil { - return status.Errorf(status.Code(err), "%v.SendHeader(%v) = %v, want %v", stream, md, err, nil) - } - stream.SetTrailer(testTrailerMetadata) - } - - if in.Id == errorID { - return fmt.Errorf("got error id: %v", in.Id) - } - - for i := 0; i < 5; i++ { - if err := stream.Send(&testpb.SimpleResponse{Id: in.Id}); err != nil { - return err - } - } - return nil -} - -// test is an end-to-end test. It should be created with the newTest -// func, modified as needed, and then started with its startServer method. -// It should be cleaned up with the tearDown method. -type test struct { - t *testing.T - compress string - clientStatsHandler stats.Handler - serverStatsHandler stats.Handler - - testServer testpb.TestServiceServer // nil means none - // srv and srvAddr are set once startServer is called. - srv *grpc.Server - srvAddr string - - cc *grpc.ClientConn // nil until requested via clientConn -} - -func (te *test) tearDown() { - if te.cc != nil { - te.cc.Close() - te.cc = nil - } - te.srv.Stop() -} - -type testConfig struct { - compress string -} - -// newTest returns a new test using the provided testing.T and -// environment. It is returned with default values. Tests should -// modify it before calling its startServer and clientConn methods. -func newTest(t *testing.T, tc *testConfig, ch stats.Handler, sh stats.Handler) *test { - te := &test{ - t: t, - compress: tc.compress, - clientStatsHandler: ch, - serverStatsHandler: sh, - } - return te -} - -// startServer starts a gRPC server listening. Callers should defer a -// call to te.tearDown to clean up. -func (te *test) startServer(ts testpb.TestServiceServer) { - te.testServer = ts - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - te.t.Fatalf("Failed to listen: %v", err) - } - var opts []grpc.ServerOption - if te.compress == "gzip" { - opts = append(opts, - grpc.RPCCompressor(grpc.NewGZIPCompressor()), - grpc.RPCDecompressor(grpc.NewGZIPDecompressor()), - ) - } - if te.serverStatsHandler != nil { - opts = append(opts, grpc.StatsHandler(te.serverStatsHandler)) - } - s := grpc.NewServer(opts...) - te.srv = s - if te.testServer != nil { - testpb.RegisterTestServiceServer(s, te.testServer) - } - - go s.Serve(lis) - te.srvAddr = lis.Addr().String() -} - -func (te *test) clientConn() *grpc.ClientConn { - if te.cc != nil { - return te.cc - } - opts := []grpc.DialOption{grpc.WithInsecure(), grpc.WithBlock()} - if te.compress == "gzip" { - opts = append(opts, - grpc.WithCompressor(grpc.NewGZIPCompressor()), - grpc.WithDecompressor(grpc.NewGZIPDecompressor()), - ) - } - if te.clientStatsHandler != nil { - opts = append(opts, grpc.WithStatsHandler(te.clientStatsHandler)) - } - - var err error - te.cc, err = grpc.Dial(te.srvAddr, opts...) - if err != nil { - te.t.Fatalf("Dial(%q) = %v", te.srvAddr, err) - } - return te.cc -} - -type rpcType int - -const ( - unaryRPC rpcType = iota - clientStreamRPC - serverStreamRPC - fullDuplexStreamRPC -) - -type rpcConfig struct { - count int // Number of requests and responses for streaming RPCs. - success bool // Whether the RPC should succeed or return error. - failfast bool - callType rpcType // Type of RPC. -} - -func (te *test) doUnaryCall(c *rpcConfig) (*testpb.SimpleRequest, *testpb.SimpleResponse, error) { - var ( - resp *testpb.SimpleResponse - req *testpb.SimpleRequest - err error - ) - tc := testpb.NewTestServiceClient(te.clientConn()) - if c.success { - req = &testpb.SimpleRequest{Id: errorID + 1} - } else { - req = &testpb.SimpleRequest{Id: errorID} - } - ctx := metadata.NewOutgoingContext(context.Background(), testMetadata) - - resp, err = tc.UnaryCall(ctx, req, grpc.FailFast(c.failfast)) - return req, resp, err -} - -func (te *test) doFullDuplexCallRoundtrip(c *rpcConfig) ([]*testpb.SimpleRequest, []*testpb.SimpleResponse, error) { - var ( - reqs []*testpb.SimpleRequest - resps []*testpb.SimpleResponse - err error - ) - tc := testpb.NewTestServiceClient(te.clientConn()) - stream, err := tc.FullDuplexCall(metadata.NewOutgoingContext(context.Background(), testMetadata), grpc.FailFast(c.failfast)) - if err != nil { - return reqs, resps, err - } - var startID int32 - if !c.success { - startID = errorID - } - for i := 0; i < c.count; i++ { - req := &testpb.SimpleRequest{ - Id: int32(i) + startID, - } - reqs = append(reqs, req) - if err = stream.Send(req); err != nil { - return reqs, resps, err - } - var resp *testpb.SimpleResponse - if resp, err = stream.Recv(); err != nil { - return reqs, resps, err - } - resps = append(resps, resp) - } - if err = stream.CloseSend(); err != nil && err != io.EOF { - return reqs, resps, err - } - if _, err = stream.Recv(); err != io.EOF { - return reqs, resps, err - } - - return reqs, resps, nil -} - -func (te *test) doClientStreamCall(c *rpcConfig) ([]*testpb.SimpleRequest, *testpb.SimpleResponse, error) { - var ( - reqs []*testpb.SimpleRequest - resp *testpb.SimpleResponse - err error - ) - tc := testpb.NewTestServiceClient(te.clientConn()) - stream, err := tc.ClientStreamCall(metadata.NewOutgoingContext(context.Background(), testMetadata), grpc.FailFast(c.failfast)) - if err != nil { - return reqs, resp, err - } - var startID int32 - if !c.success { - startID = errorID - } - for i := 0; i < c.count; i++ { - req := &testpb.SimpleRequest{ - Id: int32(i) + startID, - } - reqs = append(reqs, req) - if err = stream.Send(req); err != nil { - return reqs, resp, err - } - } - resp, err = stream.CloseAndRecv() - return reqs, resp, err -} - -func (te *test) doServerStreamCall(c *rpcConfig) (*testpb.SimpleRequest, []*testpb.SimpleResponse, error) { - var ( - req *testpb.SimpleRequest - resps []*testpb.SimpleResponse - err error - ) - - tc := testpb.NewTestServiceClient(te.clientConn()) - - var startID int32 - if !c.success { - startID = errorID - } - req = &testpb.SimpleRequest{Id: startID} - stream, err := tc.ServerStreamCall(metadata.NewOutgoingContext(context.Background(), testMetadata), req, grpc.FailFast(c.failfast)) - if err != nil { - return req, resps, err - } - for { - var resp *testpb.SimpleResponse - resp, err := stream.Recv() - if err == io.EOF { - return req, resps, nil - } else if err != nil { - return req, resps, err - } - resps = append(resps, resp) - } -} - -type expectedData struct { - method string - serverAddr string - compression string - reqIdx int - requests []*testpb.SimpleRequest - respIdx int - responses []*testpb.SimpleResponse - err error - failfast bool -} - -type gotData struct { - ctx context.Context - client bool - s interface{} // This could be RPCStats or ConnStats. -} - -const ( - begin int = iota - end - inPayload - inHeader - inTrailer - outPayload - outHeader - outTrailer - connbegin - connend -) - -func checkBegin(t *testing.T, d *gotData, e *expectedData) { - var ( - ok bool - st *stats.Begin - ) - if st, ok = d.s.(*stats.Begin); !ok { - t.Fatalf("got %T, want Begin", d.s) - } - if d.ctx == nil { - t.Fatalf("d.ctx = nil, want ") - } - if st.BeginTime.IsZero() { - t.Fatalf("st.BeginTime = %v, want ", st.BeginTime) - } - if d.client { - if st.FailFast != e.failfast { - t.Fatalf("st.FailFast = %v, want %v", st.FailFast, e.failfast) - } - } -} - -func checkInHeader(t *testing.T, d *gotData, e *expectedData) { - var ( - ok bool - st *stats.InHeader - ) - if st, ok = d.s.(*stats.InHeader); !ok { - t.Fatalf("got %T, want InHeader", d.s) - } - if d.ctx == nil { - t.Fatalf("d.ctx = nil, want ") - } - if !d.client { - if st.FullMethod != e.method { - t.Fatalf("st.FullMethod = %s, want %v", st.FullMethod, e.method) - } - if st.LocalAddr.String() != e.serverAddr { - t.Fatalf("st.LocalAddr = %v, want %v", st.LocalAddr, e.serverAddr) - } - if st.Compression != e.compression { - t.Fatalf("st.Compression = %v, want %v", st.Compression, e.compression) - } - - if connInfo, ok := d.ctx.Value(connCtxKey{}).(*stats.ConnTagInfo); ok { - if connInfo.RemoteAddr != st.RemoteAddr { - t.Fatalf("connInfo.RemoteAddr = %v, want %v", connInfo.RemoteAddr, st.RemoteAddr) - } - if connInfo.LocalAddr != st.LocalAddr { - t.Fatalf("connInfo.LocalAddr = %v, want %v", connInfo.LocalAddr, st.LocalAddr) - } - } else { - t.Fatalf("got context %v, want one with connCtxKey", d.ctx) - } - if rpcInfo, ok := d.ctx.Value(rpcCtxKey{}).(*stats.RPCTagInfo); ok { - if rpcInfo.FullMethodName != st.FullMethod { - t.Fatalf("rpcInfo.FullMethod = %s, want %v", rpcInfo.FullMethodName, st.FullMethod) - } - } else { - t.Fatalf("got context %v, want one with rpcCtxKey", d.ctx) - } - } -} - -func checkInPayload(t *testing.T, d *gotData, e *expectedData) { - var ( - ok bool - st *stats.InPayload - ) - if st, ok = d.s.(*stats.InPayload); !ok { - t.Fatalf("got %T, want InPayload", d.s) - } - if d.ctx == nil { - t.Fatalf("d.ctx = nil, want ") - } - if d.client { - b, err := proto.Marshal(e.responses[e.respIdx]) - if err != nil { - t.Fatalf("failed to marshal message: %v", err) - } - if reflect.TypeOf(st.Payload) != reflect.TypeOf(e.responses[e.respIdx]) { - t.Fatalf("st.Payload = %T, want %T", st.Payload, e.responses[e.respIdx]) - } - e.respIdx++ - if string(st.Data) != string(b) { - t.Fatalf("st.Data = %v, want %v", st.Data, b) - } - if st.Length != len(b) { - t.Fatalf("st.Lenght = %v, want %v", st.Length, len(b)) - } - } else { - b, err := proto.Marshal(e.requests[e.reqIdx]) - if err != nil { - t.Fatalf("failed to marshal message: %v", err) - } - if reflect.TypeOf(st.Payload) != reflect.TypeOf(e.requests[e.reqIdx]) { - t.Fatalf("st.Payload = %T, want %T", st.Payload, e.requests[e.reqIdx]) - } - e.reqIdx++ - if string(st.Data) != string(b) { - t.Fatalf("st.Data = %v, want %v", st.Data, b) - } - if st.Length != len(b) { - t.Fatalf("st.Lenght = %v, want %v", st.Length, len(b)) - } - } - // TODO check WireLength and ReceivedTime. - if st.RecvTime.IsZero() { - t.Fatalf("st.ReceivedTime = %v, want ", st.RecvTime) - } -} - -func checkInTrailer(t *testing.T, d *gotData, e *expectedData) { - var ( - ok bool - ) - if _, ok = d.s.(*stats.InTrailer); !ok { - t.Fatalf("got %T, want InTrailer", d.s) - } - if d.ctx == nil { - t.Fatalf("d.ctx = nil, want ") - } -} - -func checkOutHeader(t *testing.T, d *gotData, e *expectedData) { - var ( - ok bool - st *stats.OutHeader - ) - if st, ok = d.s.(*stats.OutHeader); !ok { - t.Fatalf("got %T, want OutHeader", d.s) - } - if d.ctx == nil { - t.Fatalf("d.ctx = nil, want ") - } - if d.client { - if st.FullMethod != e.method { - t.Fatalf("st.FullMethod = %s, want %v", st.FullMethod, e.method) - } - if st.RemoteAddr.String() != e.serverAddr { - t.Fatalf("st.RemoteAddr = %v, want %v", st.RemoteAddr, e.serverAddr) - } - if st.Compression != e.compression { - t.Fatalf("st.Compression = %v, want %v", st.Compression, e.compression) - } - - if rpcInfo, ok := d.ctx.Value(rpcCtxKey{}).(*stats.RPCTagInfo); ok { - if rpcInfo.FullMethodName != st.FullMethod { - t.Fatalf("rpcInfo.FullMethod = %s, want %v", rpcInfo.FullMethodName, st.FullMethod) - } - } else { - t.Fatalf("got context %v, want one with rpcCtxKey", d.ctx) - } - } -} - -func checkOutPayload(t *testing.T, d *gotData, e *expectedData) { - var ( - ok bool - st *stats.OutPayload - ) - if st, ok = d.s.(*stats.OutPayload); !ok { - t.Fatalf("got %T, want OutPayload", d.s) - } - if d.ctx == nil { - t.Fatalf("d.ctx = nil, want ") - } - if d.client { - b, err := proto.Marshal(e.requests[e.reqIdx]) - if err != nil { - t.Fatalf("failed to marshal message: %v", err) - } - if reflect.TypeOf(st.Payload) != reflect.TypeOf(e.requests[e.reqIdx]) { - t.Fatalf("st.Payload = %T, want %T", st.Payload, e.requests[e.reqIdx]) - } - e.reqIdx++ - if string(st.Data) != string(b) { - t.Fatalf("st.Data = %v, want %v", st.Data, b) - } - if st.Length != len(b) { - t.Fatalf("st.Lenght = %v, want %v", st.Length, len(b)) - } - } else { - b, err := proto.Marshal(e.responses[e.respIdx]) - if err != nil { - t.Fatalf("failed to marshal message: %v", err) - } - if reflect.TypeOf(st.Payload) != reflect.TypeOf(e.responses[e.respIdx]) { - t.Fatalf("st.Payload = %T, want %T", st.Payload, e.responses[e.respIdx]) - } - e.respIdx++ - if string(st.Data) != string(b) { - t.Fatalf("st.Data = %v, want %v", st.Data, b) - } - if st.Length != len(b) { - t.Fatalf("st.Lenght = %v, want %v", st.Length, len(b)) - } - } - // TODO check WireLength and ReceivedTime. - if st.SentTime.IsZero() { - t.Fatalf("st.SentTime = %v, want ", st.SentTime) - } -} - -func checkOutTrailer(t *testing.T, d *gotData, e *expectedData) { - var ( - ok bool - st *stats.OutTrailer - ) - if st, ok = d.s.(*stats.OutTrailer); !ok { - t.Fatalf("got %T, want OutTrailer", d.s) - } - if d.ctx == nil { - t.Fatalf("d.ctx = nil, want ") - } - if st.Client { - t.Fatalf("st IsClient = true, want false") - } -} - -func checkEnd(t *testing.T, d *gotData, e *expectedData) { - var ( - ok bool - st *stats.End - ) - if st, ok = d.s.(*stats.End); !ok { - t.Fatalf("got %T, want End", d.s) - } - if d.ctx == nil { - t.Fatalf("d.ctx = nil, want ") - } - if st.BeginTime.IsZero() { - t.Fatalf("st.BeginTime = %v, want ", st.BeginTime) - } - if st.EndTime.IsZero() { - t.Fatalf("st.EndTime = %v, want ", st.EndTime) - } - - actual, ok := status.FromError(st.Error) - if !ok { - t.Fatalf("expected st.Error to be a statusError, got %v (type %T)", st.Error, st.Error) - } - - expectedStatus, _ := status.FromError(e.err) - if actual.Code() != expectedStatus.Code() || actual.Message() != expectedStatus.Message() { - t.Fatalf("st.Error = %v, want %v", st.Error, e.err) - } -} - -func checkConnBegin(t *testing.T, d *gotData, e *expectedData) { - var ( - ok bool - st *stats.ConnBegin - ) - if st, ok = d.s.(*stats.ConnBegin); !ok { - t.Fatalf("got %T, want ConnBegin", d.s) - } - if d.ctx == nil { - t.Fatalf("d.ctx = nil, want ") - } - st.IsClient() // TODO remove this. -} - -func checkConnEnd(t *testing.T, d *gotData, e *expectedData) { - var ( - ok bool - st *stats.ConnEnd - ) - if st, ok = d.s.(*stats.ConnEnd); !ok { - t.Fatalf("got %T, want ConnEnd", d.s) - } - if d.ctx == nil { - t.Fatalf("d.ctx = nil, want ") - } - st.IsClient() // TODO remove this. -} - -type statshandler struct { - mu sync.Mutex - gotRPC []*gotData - gotConn []*gotData -} - -func (h *statshandler) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context { - return context.WithValue(ctx, connCtxKey{}, info) -} - -func (h *statshandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context { - return context.WithValue(ctx, rpcCtxKey{}, info) -} - -func (h *statshandler) HandleConn(ctx context.Context, s stats.ConnStats) { - h.mu.Lock() - defer h.mu.Unlock() - h.gotConn = append(h.gotConn, &gotData{ctx, s.IsClient(), s}) -} - -func (h *statshandler) HandleRPC(ctx context.Context, s stats.RPCStats) { - h.mu.Lock() - defer h.mu.Unlock() - h.gotRPC = append(h.gotRPC, &gotData{ctx, s.IsClient(), s}) -} - -func checkConnStats(t *testing.T, got []*gotData) { - if len(got) <= 0 || len(got)%2 != 0 { - for i, g := range got { - t.Errorf(" - %v, %T = %+v, ctx: %v", i, g.s, g.s, g.ctx) - } - t.Fatalf("got %v stats, want even positive number", len(got)) - } - // The first conn stats must be a ConnBegin. - checkConnBegin(t, got[0], nil) - // The last conn stats must be a ConnEnd. - checkConnEnd(t, got[len(got)-1], nil) -} - -func checkServerStats(t *testing.T, got []*gotData, expect *expectedData, checkFuncs []func(t *testing.T, d *gotData, e *expectedData)) { - if len(got) != len(checkFuncs) { - for i, g := range got { - t.Errorf(" - %v, %T", i, g.s) - } - t.Fatalf("got %v stats, want %v stats", len(got), len(checkFuncs)) - } - - var rpcctx context.Context - for i := 0; i < len(got); i++ { - if _, ok := got[i].s.(stats.RPCStats); ok { - if rpcctx != nil && got[i].ctx != rpcctx { - t.Fatalf("got different contexts with stats %T", got[i].s) - } - rpcctx = got[i].ctx - } - } - - for i, f := range checkFuncs { - f(t, got[i], expect) - } -} - -func testServerStats(t *testing.T, tc *testConfig, cc *rpcConfig, checkFuncs []func(t *testing.T, d *gotData, e *expectedData)) { - h := &statshandler{} - te := newTest(t, tc, nil, h) - te.startServer(&testServer{}) - defer te.tearDown() - - var ( - reqs []*testpb.SimpleRequest - resps []*testpb.SimpleResponse - err error - method string - - req *testpb.SimpleRequest - resp *testpb.SimpleResponse - e error - ) - - switch cc.callType { - case unaryRPC: - method = "/grpc.testing.TestService/UnaryCall" - req, resp, e = te.doUnaryCall(cc) - reqs = []*testpb.SimpleRequest{req} - resps = []*testpb.SimpleResponse{resp} - err = e - case clientStreamRPC: - method = "/grpc.testing.TestService/ClientStreamCall" - reqs, resp, e = te.doClientStreamCall(cc) - resps = []*testpb.SimpleResponse{resp} - err = e - case serverStreamRPC: - method = "/grpc.testing.TestService/ServerStreamCall" - req, resps, e = te.doServerStreamCall(cc) - reqs = []*testpb.SimpleRequest{req} - err = e - case fullDuplexStreamRPC: - method = "/grpc.testing.TestService/FullDuplexCall" - reqs, resps, err = te.doFullDuplexCallRoundtrip(cc) - } - if cc.success != (err == nil) { - t.Fatalf("cc.success: %v, got error: %v", cc.success, err) - } - te.cc.Close() - te.srv.GracefulStop() // Wait for the server to stop. - - for { - h.mu.Lock() - if len(h.gotRPC) >= len(checkFuncs) { - h.mu.Unlock() - break - } - h.mu.Unlock() - time.Sleep(10 * time.Millisecond) - } - - for { - h.mu.Lock() - if _, ok := h.gotConn[len(h.gotConn)-1].s.(*stats.ConnEnd); ok { - h.mu.Unlock() - break - } - h.mu.Unlock() - time.Sleep(10 * time.Millisecond) - } - - expect := &expectedData{ - serverAddr: te.srvAddr, - compression: tc.compress, - method: method, - requests: reqs, - responses: resps, - err: err, - } - - h.mu.Lock() - checkConnStats(t, h.gotConn) - h.mu.Unlock() - checkServerStats(t, h.gotRPC, expect, checkFuncs) -} - -func TestServerStatsUnaryRPC(t *testing.T) { - testServerStats(t, &testConfig{compress: ""}, &rpcConfig{success: true, callType: unaryRPC}, []func(t *testing.T, d *gotData, e *expectedData){ - checkInHeader, - checkBegin, - checkInPayload, - checkOutHeader, - checkOutPayload, - checkOutTrailer, - checkEnd, - }) -} - -func TestServerStatsUnaryRPCError(t *testing.T) { - testServerStats(t, &testConfig{compress: ""}, &rpcConfig{success: false, callType: unaryRPC}, []func(t *testing.T, d *gotData, e *expectedData){ - checkInHeader, - checkBegin, - checkInPayload, - checkOutHeader, - checkOutTrailer, - checkEnd, - }) -} - -func TestServerStatsClientStreamRPC(t *testing.T) { - count := 5 - checkFuncs := []func(t *testing.T, d *gotData, e *expectedData){ - checkInHeader, - checkBegin, - checkOutHeader, - } - ioPayFuncs := []func(t *testing.T, d *gotData, e *expectedData){ - checkInPayload, - } - for i := 0; i < count; i++ { - checkFuncs = append(checkFuncs, ioPayFuncs...) - } - checkFuncs = append(checkFuncs, - checkOutPayload, - checkOutTrailer, - checkEnd, - ) - testServerStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: true, callType: clientStreamRPC}, checkFuncs) -} - -func TestServerStatsClientStreamRPCError(t *testing.T) { - count := 1 - testServerStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: false, callType: clientStreamRPC}, []func(t *testing.T, d *gotData, e *expectedData){ - checkInHeader, - checkBegin, - checkOutHeader, - checkInPayload, - checkOutTrailer, - checkEnd, - }) -} - -func TestServerStatsServerStreamRPC(t *testing.T) { - count := 5 - checkFuncs := []func(t *testing.T, d *gotData, e *expectedData){ - checkInHeader, - checkBegin, - checkInPayload, - checkOutHeader, - } - ioPayFuncs := []func(t *testing.T, d *gotData, e *expectedData){ - checkOutPayload, - } - for i := 0; i < count; i++ { - checkFuncs = append(checkFuncs, ioPayFuncs...) - } - checkFuncs = append(checkFuncs, - checkOutTrailer, - checkEnd, - ) - testServerStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: true, callType: serverStreamRPC}, checkFuncs) -} - -func TestServerStatsServerStreamRPCError(t *testing.T) { - count := 5 - testServerStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: false, callType: serverStreamRPC}, []func(t *testing.T, d *gotData, e *expectedData){ - checkInHeader, - checkBegin, - checkInPayload, - checkOutHeader, - checkOutTrailer, - checkEnd, - }) -} - -func TestServerStatsFullDuplexRPC(t *testing.T) { - count := 5 - checkFuncs := []func(t *testing.T, d *gotData, e *expectedData){ - checkInHeader, - checkBegin, - checkOutHeader, - } - ioPayFuncs := []func(t *testing.T, d *gotData, e *expectedData){ - checkInPayload, - checkOutPayload, - } - for i := 0; i < count; i++ { - checkFuncs = append(checkFuncs, ioPayFuncs...) - } - checkFuncs = append(checkFuncs, - checkOutTrailer, - checkEnd, - ) - testServerStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: true, callType: fullDuplexStreamRPC}, checkFuncs) -} - -func TestServerStatsFullDuplexRPCError(t *testing.T) { - count := 5 - testServerStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: false, callType: fullDuplexStreamRPC}, []func(t *testing.T, d *gotData, e *expectedData){ - checkInHeader, - checkBegin, - checkOutHeader, - checkInPayload, - checkOutTrailer, - checkEnd, - }) -} - -type checkFuncWithCount struct { - f func(t *testing.T, d *gotData, e *expectedData) - c int // expected count -} - -func checkClientStats(t *testing.T, got []*gotData, expect *expectedData, checkFuncs map[int]*checkFuncWithCount) { - var expectLen int - for _, v := range checkFuncs { - expectLen += v.c - } - if len(got) != expectLen { - for i, g := range got { - t.Errorf(" - %v, %T", i, g.s) - } - t.Fatalf("got %v stats, want %v stats", len(got), expectLen) - } - - var tagInfoInCtx *stats.RPCTagInfo - for i := 0; i < len(got); i++ { - if _, ok := got[i].s.(stats.RPCStats); ok { - tagInfoInCtxNew, _ := got[i].ctx.Value(rpcCtxKey{}).(*stats.RPCTagInfo) - if tagInfoInCtx != nil && tagInfoInCtx != tagInfoInCtxNew { - t.Fatalf("got context containing different tagInfo with stats %T", got[i].s) - } - tagInfoInCtx = tagInfoInCtxNew - } - } - - for _, s := range got { - switch s.s.(type) { - case *stats.Begin: - if checkFuncs[begin].c <= 0 { - t.Fatalf("unexpected stats: %T", s.s) - } - checkFuncs[begin].f(t, s, expect) - checkFuncs[begin].c-- - case *stats.OutHeader: - if checkFuncs[outHeader].c <= 0 { - t.Fatalf("unexpected stats: %T", s.s) - } - checkFuncs[outHeader].f(t, s, expect) - checkFuncs[outHeader].c-- - case *stats.OutPayload: - if checkFuncs[outPayload].c <= 0 { - t.Fatalf("unexpected stats: %T", s.s) - } - checkFuncs[outPayload].f(t, s, expect) - checkFuncs[outPayload].c-- - case *stats.InHeader: - if checkFuncs[inHeader].c <= 0 { - t.Fatalf("unexpected stats: %T", s.s) - } - checkFuncs[inHeader].f(t, s, expect) - checkFuncs[inHeader].c-- - case *stats.InPayload: - if checkFuncs[inPayload].c <= 0 { - t.Fatalf("unexpected stats: %T", s.s) - } - checkFuncs[inPayload].f(t, s, expect) - checkFuncs[inPayload].c-- - case *stats.InTrailer: - if checkFuncs[inTrailer].c <= 0 { - t.Fatalf("unexpected stats: %T", s.s) - } - checkFuncs[inTrailer].f(t, s, expect) - checkFuncs[inTrailer].c-- - case *stats.End: - if checkFuncs[end].c <= 0 { - t.Fatalf("unexpected stats: %T", s.s) - } - checkFuncs[end].f(t, s, expect) - checkFuncs[end].c-- - case *stats.ConnBegin: - if checkFuncs[connbegin].c <= 0 { - t.Fatalf("unexpected stats: %T", s.s) - } - checkFuncs[connbegin].f(t, s, expect) - checkFuncs[connbegin].c-- - case *stats.ConnEnd: - if checkFuncs[connend].c <= 0 { - t.Fatalf("unexpected stats: %T", s.s) - } - checkFuncs[connend].f(t, s, expect) - checkFuncs[connend].c-- - default: - t.Fatalf("unexpected stats: %T", s.s) - } - } -} - -func testClientStats(t *testing.T, tc *testConfig, cc *rpcConfig, checkFuncs map[int]*checkFuncWithCount) { - h := &statshandler{} - te := newTest(t, tc, h, nil) - te.startServer(&testServer{}) - defer te.tearDown() - - var ( - reqs []*testpb.SimpleRequest - resps []*testpb.SimpleResponse - method string - err error - - req *testpb.SimpleRequest - resp *testpb.SimpleResponse - e error - ) - switch cc.callType { - case unaryRPC: - method = "/grpc.testing.TestService/UnaryCall" - req, resp, e = te.doUnaryCall(cc) - reqs = []*testpb.SimpleRequest{req} - resps = []*testpb.SimpleResponse{resp} - err = e - case clientStreamRPC: - method = "/grpc.testing.TestService/ClientStreamCall" - reqs, resp, e = te.doClientStreamCall(cc) - resps = []*testpb.SimpleResponse{resp} - err = e - case serverStreamRPC: - method = "/grpc.testing.TestService/ServerStreamCall" - req, resps, e = te.doServerStreamCall(cc) - reqs = []*testpb.SimpleRequest{req} - err = e - case fullDuplexStreamRPC: - method = "/grpc.testing.TestService/FullDuplexCall" - reqs, resps, err = te.doFullDuplexCallRoundtrip(cc) - } - if cc.success != (err == nil) { - t.Fatalf("cc.success: %v, got error: %v", cc.success, err) - } - te.cc.Close() - te.srv.GracefulStop() // Wait for the server to stop. - - lenRPCStats := 0 - for _, v := range checkFuncs { - lenRPCStats += v.c - } - for { - h.mu.Lock() - if len(h.gotRPC) >= lenRPCStats { - h.mu.Unlock() - break - } - h.mu.Unlock() - time.Sleep(10 * time.Millisecond) - } - - for { - h.mu.Lock() - if _, ok := h.gotConn[len(h.gotConn)-1].s.(*stats.ConnEnd); ok { - h.mu.Unlock() - break - } - h.mu.Unlock() - time.Sleep(10 * time.Millisecond) - } - - expect := &expectedData{ - serverAddr: te.srvAddr, - compression: tc.compress, - method: method, - requests: reqs, - responses: resps, - failfast: cc.failfast, - err: err, - } - - h.mu.Lock() - checkConnStats(t, h.gotConn) - h.mu.Unlock() - checkClientStats(t, h.gotRPC, expect, checkFuncs) -} - -func TestClientStatsUnaryRPC(t *testing.T) { - testClientStats(t, &testConfig{compress: ""}, &rpcConfig{success: true, failfast: false, callType: unaryRPC}, map[int]*checkFuncWithCount{ - begin: {checkBegin, 1}, - outHeader: {checkOutHeader, 1}, - outPayload: {checkOutPayload, 1}, - inHeader: {checkInHeader, 1}, - inPayload: {checkInPayload, 1}, - inTrailer: {checkInTrailer, 1}, - end: {checkEnd, 1}, - }) -} - -func TestClientStatsUnaryRPCError(t *testing.T) { - testClientStats(t, &testConfig{compress: ""}, &rpcConfig{success: false, failfast: false, callType: unaryRPC}, map[int]*checkFuncWithCount{ - begin: {checkBegin, 1}, - outHeader: {checkOutHeader, 1}, - outPayload: {checkOutPayload, 1}, - inHeader: {checkInHeader, 1}, - inTrailer: {checkInTrailer, 1}, - end: {checkEnd, 1}, - }) -} - -func TestClientStatsClientStreamRPC(t *testing.T) { - count := 5 - testClientStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: true, failfast: false, callType: clientStreamRPC}, map[int]*checkFuncWithCount{ - begin: {checkBegin, 1}, - outHeader: {checkOutHeader, 1}, - inHeader: {checkInHeader, 1}, - outPayload: {checkOutPayload, count}, - inTrailer: {checkInTrailer, 1}, - inPayload: {checkInPayload, 1}, - end: {checkEnd, 1}, - }) -} - -func TestClientStatsClientStreamRPCError(t *testing.T) { - count := 1 - testClientStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: false, failfast: false, callType: clientStreamRPC}, map[int]*checkFuncWithCount{ - begin: {checkBegin, 1}, - outHeader: {checkOutHeader, 1}, - inHeader: {checkInHeader, 1}, - outPayload: {checkOutPayload, 1}, - inTrailer: {checkInTrailer, 1}, - end: {checkEnd, 1}, - }) -} - -func TestClientStatsServerStreamRPC(t *testing.T) { - count := 5 - testClientStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: true, failfast: false, callType: serverStreamRPC}, map[int]*checkFuncWithCount{ - begin: {checkBegin, 1}, - outHeader: {checkOutHeader, 1}, - outPayload: {checkOutPayload, 1}, - inHeader: {checkInHeader, 1}, - inPayload: {checkInPayload, count}, - inTrailer: {checkInTrailer, 1}, - end: {checkEnd, 1}, - }) -} - -func TestClientStatsServerStreamRPCError(t *testing.T) { - count := 5 - testClientStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: false, failfast: false, callType: serverStreamRPC}, map[int]*checkFuncWithCount{ - begin: {checkBegin, 1}, - outHeader: {checkOutHeader, 1}, - outPayload: {checkOutPayload, 1}, - inHeader: {checkInHeader, 1}, - inTrailer: {checkInTrailer, 1}, - end: {checkEnd, 1}, - }) -} - -func TestClientStatsFullDuplexRPC(t *testing.T) { - count := 5 - testClientStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: true, failfast: false, callType: fullDuplexStreamRPC}, map[int]*checkFuncWithCount{ - begin: {checkBegin, 1}, - outHeader: {checkOutHeader, 1}, - outPayload: {checkOutPayload, count}, - inHeader: {checkInHeader, 1}, - inPayload: {checkInPayload, count}, - inTrailer: {checkInTrailer, 1}, - end: {checkEnd, 1}, - }) -} - -func TestClientStatsFullDuplexRPCError(t *testing.T) { - count := 5 - testClientStats(t, &testConfig{compress: "gzip"}, &rpcConfig{count: count, success: false, failfast: false, callType: fullDuplexStreamRPC}, map[int]*checkFuncWithCount{ - begin: {checkBegin, 1}, - outHeader: {checkOutHeader, 1}, - outPayload: {checkOutPayload, 1}, - inHeader: {checkInHeader, 1}, - inTrailer: {checkInTrailer, 1}, - end: {checkEnd, 1}, - }) -} - -func TestTags(t *testing.T) { - b := []byte{5, 2, 4, 3, 1} - ctx := stats.SetTags(context.Background(), b) - if tg := stats.OutgoingTags(ctx); !reflect.DeepEqual(tg, b) { - t.Errorf("OutgoingTags(%v) = %v; want %v", ctx, tg, b) - } - if tg := stats.Tags(ctx); tg != nil { - t.Errorf("Tags(%v) = %v; want nil", ctx, tg) - } - - ctx = stats.SetIncomingTags(context.Background(), b) - if tg := stats.Tags(ctx); !reflect.DeepEqual(tg, b) { - t.Errorf("Tags(%v) = %v; want %v", ctx, tg, b) - } - if tg := stats.OutgoingTags(ctx); tg != nil { - t.Errorf("OutgoingTags(%v) = %v; want nil", ctx, tg) - } -} - -func TestTrace(t *testing.T) { - b := []byte{5, 2, 4, 3, 1} - ctx := stats.SetTrace(context.Background(), b) - if tr := stats.OutgoingTrace(ctx); !reflect.DeepEqual(tr, b) { - t.Errorf("OutgoingTrace(%v) = %v; want %v", ctx, tr, b) - } - if tr := stats.Trace(ctx); tr != nil { - t.Errorf("Trace(%v) = %v; want nil", ctx, tr) - } - - ctx = stats.SetIncomingTrace(context.Background(), b) - if tr := stats.Trace(ctx); !reflect.DeepEqual(tr, b) { - t.Errorf("Trace(%v) = %v; want %v", ctx, tr, b) - } - if tr := stats.OutgoingTrace(ctx); tr != nil { - t.Errorf("OutgoingTrace(%v) = %v; want nil", ctx, tr) - } -} diff --git a/vendor/google.golang.org/grpc/status/go17_test.go b/vendor/google.golang.org/grpc/status/go17_test.go deleted file mode 100644 index 2dc5add9..00000000 --- a/vendor/google.golang.org/grpc/status/go17_test.go +++ /dev/null @@ -1,44 +0,0 @@ -// +build go1.7 - -/* - * - * Copyright 2018 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package status - -import ( - "context" - "testing" - - "google.golang.org/grpc/codes" -) - -func TestFromStdContextError(t *testing.T) { - testCases := []struct { - in error - want *Status - }{ - {in: context.DeadlineExceeded, want: New(codes.DeadlineExceeded, context.DeadlineExceeded.Error())}, - {in: context.Canceled, want: New(codes.Canceled, context.Canceled.Error())}, - } - for _, tc := range testCases { - got := FromContextError(tc.in) - if got.Code() != tc.want.Code() || got.Message() != tc.want.Message() { - t.Errorf("FromContextError(%v) = %v; want %v", tc.in, got, tc.want) - } - } -} diff --git a/vendor/google.golang.org/grpc/status/status_test.go b/vendor/google.golang.org/grpc/status/status_test.go deleted file mode 100644 index 1eb13209..00000000 --- a/vendor/google.golang.org/grpc/status/status_test.go +++ /dev/null @@ -1,348 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package status - -import ( - "errors" - "fmt" - "reflect" - "testing" - - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" - apb "github.com/golang/protobuf/ptypes/any" - dpb "github.com/golang/protobuf/ptypes/duration" - "golang.org/x/net/context" - cpb "google.golang.org/genproto/googleapis/rpc/code" - epb "google.golang.org/genproto/googleapis/rpc/errdetails" - spb "google.golang.org/genproto/googleapis/rpc/status" - "google.golang.org/grpc/codes" -) - -func TestErrorsWithSameParameters(t *testing.T) { - const description = "some description" - e1 := Errorf(codes.AlreadyExists, description) - e2 := Errorf(codes.AlreadyExists, description) - if e1 == e2 || !reflect.DeepEqual(e1, e2) { - t.Fatalf("Errors should be equivalent but unique - e1: %v, %v e2: %p, %v", e1.(*statusError), e1, e2.(*statusError), e2) - } -} - -func TestFromToProto(t *testing.T) { - s := &spb.Status{ - Code: int32(codes.Internal), - Message: "test test test", - Details: []*apb.Any{{TypeUrl: "foo", Value: []byte{3, 2, 1}}}, - } - - err := FromProto(s) - if got := err.Proto(); !proto.Equal(s, got) { - t.Fatalf("Expected errors to be identical - s: %v got: %v", s, got) - } -} - -func TestFromNilProto(t *testing.T) { - tests := []*Status{nil, FromProto(nil)} - for _, s := range tests { - if c := s.Code(); c != codes.OK { - t.Errorf("s: %v - Expected s.Code() = OK; got %v", s, c) - } - if m := s.Message(); m != "" { - t.Errorf("s: %v - Expected s.Message() = \"\"; got %q", s, m) - } - if p := s.Proto(); p != nil { - t.Errorf("s: %v - Expected s.Proto() = nil; got %q", s, p) - } - if e := s.Err(); e != nil { - t.Errorf("s: %v - Expected s.Err() = nil; got %v", s, e) - } - } -} - -func TestError(t *testing.T) { - err := Error(codes.Internal, "test description") - if got, want := err.Error(), "rpc error: code = Internal desc = test description"; got != want { - t.Fatalf("err.Error() = %q; want %q", got, want) - } - s, _ := FromError(err) - if got, want := s.Code(), codes.Internal; got != want { - t.Fatalf("err.Code() = %s; want %s", got, want) - } - if got, want := s.Message(), "test description"; got != want { - t.Fatalf("err.Message() = %s; want %s", got, want) - } -} - -func TestErrorOK(t *testing.T) { - err := Error(codes.OK, "foo") - if err != nil { - t.Fatalf("Error(codes.OK, _) = %p; want nil", err.(*statusError)) - } -} - -func TestErrorProtoOK(t *testing.T) { - s := &spb.Status{Code: int32(codes.OK)} - if got := ErrorProto(s); got != nil { - t.Fatalf("ErrorProto(%v) = %v; want nil", s, got) - } -} - -func TestFromError(t *testing.T) { - code, message := codes.Internal, "test description" - err := Error(code, message) - s, ok := FromError(err) - if !ok || s.Code() != code || s.Message() != message || s.Err() == nil { - t.Fatalf("FromError(%v) = %v, %v; want , true", err, s, ok, code, message) - } -} - -func TestFromErrorOK(t *testing.T) { - code, message := codes.OK, "" - s, ok := FromError(nil) - if !ok || s.Code() != code || s.Message() != message || s.Err() != nil { - t.Fatalf("FromError(nil) = %v, %v; want , true", s, ok, code, message) - } -} - -type customError struct { - Code codes.Code - Message string - Details []*apb.Any -} - -func (c customError) Error() string { - return fmt.Sprintf("rpc error: code = %s desc = %s", c.Code, c.Message) -} - -func (c customError) GRPCStatus() *Status { - return &Status{ - s: &spb.Status{ - Code: int32(c.Code), - Message: c.Message, - Details: c.Details, - }, - } -} - -func TestFromErrorImplementsInterface(t *testing.T) { - code, message := codes.Internal, "test description" - details := []*apb.Any{{ - TypeUrl: "testUrl", - Value: []byte("testValue"), - }} - err := customError{ - Code: code, - Message: message, - Details: details, - } - s, ok := FromError(err) - if !ok || s.Code() != code || s.Message() != message || s.Err() == nil { - t.Fatalf("FromError(%v) = %v, %v; want , true", err, s, ok, code, message) - } - pd := s.Proto().GetDetails() - if len(pd) != 1 || !reflect.DeepEqual(pd[0], details[0]) { - t.Fatalf("s.Proto.GetDetails() = %v; want ", pd, details) - } -} - -func TestFromErrorUnknownError(t *testing.T) { - code, message := codes.Unknown, "unknown error" - err := errors.New("unknown error") - s, ok := FromError(err) - if ok || s.Code() != code || s.Message() != message { - t.Fatalf("FromError(%v) = %v, %v; want , false", err, s, ok, code, message) - } -} - -func TestConvertKnownError(t *testing.T) { - code, message := codes.Internal, "test description" - err := Error(code, message) - s := Convert(err) - if s.Code() != code || s.Message() != message { - t.Fatalf("Convert(%v) = %v; want ", err, s, code, message) - } -} - -func TestConvertUnknownError(t *testing.T) { - code, message := codes.Unknown, "unknown error" - err := errors.New("unknown error") - s := Convert(err) - if s.Code() != code || s.Message() != message { - t.Fatalf("Convert(%v) = %v; want ", err, s, code, message) - } -} - -func TestStatus_ErrorDetails(t *testing.T) { - tests := []struct { - code codes.Code - details []proto.Message - }{ - { - code: codes.NotFound, - details: nil, - }, - { - code: codes.NotFound, - details: []proto.Message{ - &epb.ResourceInfo{ - ResourceType: "book", - ResourceName: "projects/1234/books/5678", - Owner: "User", - }, - }, - }, - { - code: codes.Internal, - details: []proto.Message{ - &epb.DebugInfo{ - StackEntries: []string{ - "first stack", - "second stack", - }, - }, - }, - }, - { - code: codes.Unavailable, - details: []proto.Message{ - &epb.RetryInfo{ - RetryDelay: &dpb.Duration{Seconds: 60}, - }, - &epb.ResourceInfo{ - ResourceType: "book", - ResourceName: "projects/1234/books/5678", - Owner: "User", - }, - }, - }, - } - - for _, tc := range tests { - s, err := New(tc.code, "").WithDetails(tc.details...) - if err != nil { - t.Fatalf("(%v).WithDetails(%+v) failed: %v", str(s), tc.details, err) - } - details := s.Details() - for i := range details { - if !proto.Equal(details[i].(proto.Message), tc.details[i]) { - t.Fatalf("(%v).Details()[%d] = %+v, want %+v", str(s), i, details[i], tc.details[i]) - } - } - } -} - -func TestStatus_WithDetails_Fail(t *testing.T) { - tests := []*Status{ - nil, - FromProto(nil), - New(codes.OK, ""), - } - for _, s := range tests { - if s, err := s.WithDetails(); err == nil || s != nil { - t.Fatalf("(%v).WithDetails(%+v) = %v, %v; want nil, non-nil", str(s), []proto.Message{}, s, err) - } - } -} - -func TestStatus_ErrorDetails_Fail(t *testing.T) { - tests := []struct { - s *Status - i []interface{} - }{ - { - nil, - nil, - }, - { - FromProto(nil), - nil, - }, - { - New(codes.OK, ""), - []interface{}{}, - }, - { - FromProto(&spb.Status{ - Code: int32(cpb.Code_CANCELLED), - Details: []*apb.Any{ - { - TypeUrl: "", - Value: []byte{}, - }, - mustMarshalAny(&epb.ResourceInfo{ - ResourceType: "book", - ResourceName: "projects/1234/books/5678", - Owner: "User", - }), - }, - }), - []interface{}{ - errors.New(`message type url "" is invalid`), - &epb.ResourceInfo{ - ResourceType: "book", - ResourceName: "projects/1234/books/5678", - Owner: "User", - }, - }, - }, - } - for _, tc := range tests { - got := tc.s.Details() - if !reflect.DeepEqual(got, tc.i) { - t.Errorf("(%v).Details() = %+v, want %+v", str(tc.s), got, tc.i) - } - } -} - -func str(s *Status) string { - if s == nil { - return "nil" - } - if s.s == nil { - return "" - } - return fmt.Sprintf("", codes.Code(s.s.GetCode()), s.s.GetMessage(), s.s.GetDetails()) -} - -// mustMarshalAny converts a protobuf message to an any. -func mustMarshalAny(msg proto.Message) *apb.Any { - any, err := ptypes.MarshalAny(msg) - if err != nil { - panic(fmt.Sprintf("ptypes.MarshalAny(%+v) failed: %v", msg, err)) - } - return any -} - -func TestFromContextError(t *testing.T) { - testCases := []struct { - in error - want *Status - }{ - {in: nil, want: New(codes.OK, "")}, - {in: context.DeadlineExceeded, want: New(codes.DeadlineExceeded, context.DeadlineExceeded.Error())}, - {in: context.Canceled, want: New(codes.Canceled, context.Canceled.Error())}, - {in: errors.New("other"), want: New(codes.Unknown, "other")}, - } - for _, tc := range testCases { - got := FromContextError(tc.in) - if got.Code() != tc.want.Code() || got.Message() != tc.want.Message() { - t.Errorf("FromContextError(%v) = %v; want %v", tc.in, got, tc.want) - } - } -} diff --git a/vendor/google.golang.org/grpc/vet.sh b/vendor/google.golang.org/grpc/vet.sh deleted file mode 100755 index 44a310e5..00000000 --- a/vendor/google.golang.org/grpc/vet.sh +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/bash - -if [[ `uname -a` = *"Darwin"* ]]; then - echo "It seems you are running on Mac. This script does not work on Mac. See https://github.com/grpc/grpc-go/issues/2047" - exit 1 -fi - -set -ex # Exit on error; debugging enabled. -set -o pipefail # Fail a pipe if any sub-command fails. - -die() { - echo "$@" >&2 - exit 1 -} - -PATH="$GOPATH/bin:$GOROOT/bin:$PATH" - -if [ "$1" = "-install" ]; then - go get -d \ - google.golang.org/grpc/... - go get -u \ - github.com/golang/lint/golint \ - golang.org/x/tools/cmd/goimports \ - honnef.co/go/tools/cmd/staticcheck \ - github.com/client9/misspell/cmd/misspell \ - github.com/golang/protobuf/protoc-gen-go - if [[ -z "$VET_SKIP_PROTO" ]]; then - if [[ "$TRAVIS" = "true" ]]; then - PROTOBUF_VERSION=3.3.0 - PROTOC_FILENAME=protoc-${PROTOBUF_VERSION}-linux-x86_64.zip - pushd /home/travis - wget https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/${PROTOC_FILENAME} - unzip ${PROTOC_FILENAME} - bin/protoc --version - popd - elif ! which protoc > /dev/null; then - die "Please install protoc into your path" - fi - fi - exit 0 -elif [[ "$#" -ne 0 ]]; then - die "Unknown argument(s): $*" -fi - -# TODO: Remove this check and the mangling below once "context" is imported -# directly. -if git status --porcelain | read; then - die "Uncommitted or untracked files found; commit changes first" -fi - -git ls-files "*.go" | xargs grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)\|DO NOT EDIT" 2>&1 | tee /dev/stderr | (! read) -git ls-files "*.go" | xargs grep -l '"unsafe"' 2>&1 | (! grep -v '_test.go') | tee /dev/stderr | (! read) -git ls-files "*.go" | xargs grep -l '"math/rand"' 2>&1 | (! grep -v '^examples\|^stress\|grpcrand') | tee /dev/stderr | (! read) -gofmt -s -d -l . 2>&1 | tee /dev/stderr | (! read) -goimports -l . 2>&1 | tee /dev/stderr | (! read) -golint ./... 2>&1 | (grep -vE "(_mock|\.pb)\.go:" || true) | tee /dev/stderr | (! read) - -# Undo any edits made by this script. -cleanup() { - git reset --hard HEAD -} -trap cleanup EXIT - -# Rewrite golang.org/x/net/context -> context imports (see grpc/grpc-go#1484). -# TODO: Remove this mangling once "context" is imported directly (grpc/grpc-go#711). -git ls-files "*.go" | xargs sed -i 's:"golang.org/x/net/context":"context":' -set +o pipefail -# TODO: Stop filtering pb.go files once golang/protobuf#214 is fixed. -go tool vet -all . 2>&1 | grep -vE '(clientconn|transport\/transport_test).go:.*cancel (function|var)' | grep -vF '.pb.go:' | tee /dev/stderr | (! read) -set -o pipefail -git reset --hard HEAD - -if [[ -z "$VET_SKIP_PROTO" ]]; then - PATH="/home/travis/bin:$PATH" make proto && \ - git status --porcelain 2>&1 | (! read) || \ - (git status; git --no-pager diff; exit 1) -fi - -# TODO(menghanl): fix errors in transport_test. -staticcheck -ignore ' -google.golang.org/grpc/internal/transport/transport_test.go:SA2002 -google.golang.org/grpc/benchmark/benchmain/main.go:SA1019 -google.golang.org/grpc/stats/stats_test.go:SA1019 -google.golang.org/grpc/test/end2end_test.go:SA1019 -google.golang.org/grpc/balancer_test.go:SA1019 -google.golang.org/grpc/balancer.go:SA1019 -google.golang.org/grpc/clientconn_test.go:SA1019 -' ./... -misspell -error . diff --git a/vendor/gopkg.in/inf.v0/benchmark_test.go b/vendor/gopkg.in/inf.v0/benchmark_test.go deleted file mode 100644 index 27071da0..00000000 --- a/vendor/gopkg.in/inf.v0/benchmark_test.go +++ /dev/null @@ -1,210 +0,0 @@ -package inf - -import ( - "fmt" - "math/big" - "math/rand" - "sync" - "testing" -) - -const maxcap = 1024 * 1024 -const bits = 256 -const maxscale = 32 - -var once sync.Once - -var decInput [][2]Dec -var intInput [][2]big.Int - -var initBench = func() { - decInput = make([][2]Dec, maxcap) - intInput = make([][2]big.Int, maxcap) - max := new(big.Int).Lsh(big.NewInt(1), bits) - r := rand.New(rand.NewSource(0)) - for i := 0; i < cap(decInput); i++ { - decInput[i][0].SetUnscaledBig(new(big.Int).Rand(r, max)). - SetScale(Scale(r.Int31n(int32(2*maxscale-1)) - int32(maxscale))) - decInput[i][1].SetUnscaledBig(new(big.Int).Rand(r, max)). - SetScale(Scale(r.Int31n(int32(2*maxscale-1)) - int32(maxscale))) - } - for i := 0; i < cap(intInput); i++ { - intInput[i][0].Rand(r, max) - intInput[i][1].Rand(r, max) - } -} - -func doBenchmarkDec1(b *testing.B, f func(z *Dec)) { - once.Do(initBench) - b.ResetTimer() - b.StartTimer() - for i := 0; i < b.N; i++ { - f(&decInput[i%maxcap][0]) - } -} - -func doBenchmarkDec2(b *testing.B, f func(x, y *Dec)) { - once.Do(initBench) - b.ResetTimer() - b.StartTimer() - for i := 0; i < b.N; i++ { - f(&decInput[i%maxcap][0], &decInput[i%maxcap][1]) - } -} - -func doBenchmarkInt1(b *testing.B, f func(z *big.Int)) { - once.Do(initBench) - b.ResetTimer() - b.StartTimer() - for i := 0; i < b.N; i++ { - f(&intInput[i%maxcap][0]) - } -} - -func doBenchmarkInt2(b *testing.B, f func(x, y *big.Int)) { - once.Do(initBench) - b.ResetTimer() - b.StartTimer() - for i := 0; i < b.N; i++ { - f(&intInput[i%maxcap][0], &intInput[i%maxcap][1]) - } -} - -func Benchmark_Dec_String(b *testing.B) { - doBenchmarkDec1(b, func(x *Dec) { - x.String() - }) -} - -func Benchmark_Dec_StringScan(b *testing.B) { - doBenchmarkDec1(b, func(x *Dec) { - s := x.String() - d := new(Dec) - fmt.Sscan(s, d) - }) -} - -func Benchmark_Dec_GobEncode(b *testing.B) { - doBenchmarkDec1(b, func(x *Dec) { - x.GobEncode() - }) -} - -func Benchmark_Dec_GobEnDecode(b *testing.B) { - doBenchmarkDec1(b, func(x *Dec) { - g, _ := x.GobEncode() - new(Dec).GobDecode(g) - }) -} - -func Benchmark_Dec_Add(b *testing.B) { - doBenchmarkDec2(b, func(x, y *Dec) { - ys := y.Scale() - y.SetScale(x.Scale()) - _ = new(Dec).Add(x, y) - y.SetScale(ys) - }) -} - -func Benchmark_Dec_AddMixed(b *testing.B) { - doBenchmarkDec2(b, func(x, y *Dec) { - _ = new(Dec).Add(x, y) - }) -} - -func Benchmark_Dec_Sub(b *testing.B) { - doBenchmarkDec2(b, func(x, y *Dec) { - ys := y.Scale() - y.SetScale(x.Scale()) - _ = new(Dec).Sub(x, y) - y.SetScale(ys) - }) -} - -func Benchmark_Dec_SubMixed(b *testing.B) { - doBenchmarkDec2(b, func(x, y *Dec) { - _ = new(Dec).Sub(x, y) - }) -} - -func Benchmark_Dec_Mul(b *testing.B) { - doBenchmarkDec2(b, func(x, y *Dec) { - _ = new(Dec).Mul(x, y) - }) -} - -func Benchmark_Dec_Mul_QuoExact(b *testing.B) { - doBenchmarkDec2(b, func(x, y *Dec) { - v := new(Dec).Mul(x, y) - _ = new(Dec).QuoExact(v, y) - }) -} - -func Benchmark_Dec_QuoRound_Fixed_Down(b *testing.B) { - doBenchmarkDec2(b, func(x, y *Dec) { - _ = new(Dec).QuoRound(x, y, 0, RoundDown) - }) -} - -func Benchmark_Dec_QuoRound_Fixed_HalfUp(b *testing.B) { - doBenchmarkDec2(b, func(x, y *Dec) { - _ = new(Dec).QuoRound(x, y, 0, RoundHalfUp) - }) -} - -func Benchmark_Int_String(b *testing.B) { - doBenchmarkInt1(b, func(x *big.Int) { - x.String() - }) -} - -func Benchmark_Int_StringScan(b *testing.B) { - doBenchmarkInt1(b, func(x *big.Int) { - s := x.String() - d := new(big.Int) - fmt.Sscan(s, d) - }) -} - -func Benchmark_Int_GobEncode(b *testing.B) { - doBenchmarkInt1(b, func(x *big.Int) { - x.GobEncode() - }) -} - -func Benchmark_Int_GobEnDecode(b *testing.B) { - doBenchmarkInt1(b, func(x *big.Int) { - g, _ := x.GobEncode() - new(big.Int).GobDecode(g) - }) -} - -func Benchmark_Int_Add(b *testing.B) { - doBenchmarkInt2(b, func(x, y *big.Int) { - _ = new(big.Int).Add(x, y) - }) -} - -func Benchmark_Int_Sub(b *testing.B) { - doBenchmarkInt2(b, func(x, y *big.Int) { - _ = new(big.Int).Sub(x, y) - }) -} - -func Benchmark_Int_Mul(b *testing.B) { - doBenchmarkInt2(b, func(x, y *big.Int) { - _ = new(big.Int).Mul(x, y) - }) -} - -func Benchmark_Int_Quo(b *testing.B) { - doBenchmarkInt2(b, func(x, y *big.Int) { - _ = new(big.Int).Quo(x, y) - }) -} - -func Benchmark_Int_QuoRem(b *testing.B) { - doBenchmarkInt2(b, func(x, y *big.Int) { - _, _ = new(big.Int).QuoRem(x, y, new(big.Int)) - }) -} diff --git a/vendor/gopkg.in/inf.v0/dec_go1_2_test.go b/vendor/gopkg.in/inf.v0/dec_go1_2_test.go deleted file mode 100644 index 5df0f7b5..00000000 --- a/vendor/gopkg.in/inf.v0/dec_go1_2_test.go +++ /dev/null @@ -1,33 +0,0 @@ -// +build go1.2 - -package inf - -import ( - "encoding" - "encoding/json" - "testing" -) - -var _ encoding.TextMarshaler = new(Dec) -var _ encoding.TextUnmarshaler = new(Dec) - -type Obj struct { - Val *Dec -} - -func TestDecJsonMarshalUnmarshal(t *testing.T) { - o := Obj{Val: NewDec(123, 2)} - js, err := json.Marshal(o) - if err != nil { - t.Fatalf("json.Marshal(%v): got %v, want ok", o, err) - } - o2 := &Obj{} - err = json.Unmarshal(js, o2) - if err != nil { - t.Fatalf("json.Unmarshal(%#q): got %v, want ok", js, err) - } - if o.Val.Scale() != o2.Val.Scale() || - o.Val.UnscaledBig().Cmp(o2.Val.UnscaledBig()) != 0 { - t.Fatalf("json.Unmarshal(json.Marshal(%v)): want %v, got %v", o, o, o2) - } -} diff --git a/vendor/gopkg.in/inf.v0/dec_internal_test.go b/vendor/gopkg.in/inf.v0/dec_internal_test.go deleted file mode 100644 index d4fbe3e5..00000000 --- a/vendor/gopkg.in/inf.v0/dec_internal_test.go +++ /dev/null @@ -1,40 +0,0 @@ -package inf - -import ( - "math/big" - "testing" -) - -var decQuoRemZZZ = []struct { - z, x, y *Dec - r *big.Rat - srA, srB int -}{ - // basic examples - {NewDec(1, 0), NewDec(2, 0), NewDec(2, 0), big.NewRat(0, 1), 0, 1}, - {NewDec(15, 1), NewDec(3, 0), NewDec(2, 0), big.NewRat(0, 1), 0, 1}, - {NewDec(1, 1), NewDec(1, 0), NewDec(10, 0), big.NewRat(0, 1), 0, 1}, - {NewDec(0, 0), NewDec(2, 0), NewDec(3, 0), big.NewRat(2, 3), 1, 1}, - {NewDec(0, 0), NewDec(2, 0), NewDec(6, 0), big.NewRat(1, 3), 1, 1}, - {NewDec(1, 1), NewDec(2, 0), NewDec(12, 0), big.NewRat(2, 3), 1, 1}, - - // examples from the Go Language Specification - {NewDec(1, 0), NewDec(5, 0), NewDec(3, 0), big.NewRat(2, 3), 1, 1}, - {NewDec(-1, 0), NewDec(-5, 0), NewDec(3, 0), big.NewRat(-2, 3), -1, 1}, - {NewDec(-1, 0), NewDec(5, 0), NewDec(-3, 0), big.NewRat(-2, 3), 1, -1}, - {NewDec(1, 0), NewDec(-5, 0), NewDec(-3, 0), big.NewRat(2, 3), -1, -1}, -} - -func TestDecQuoRem(t *testing.T) { - for i, a := range decQuoRemZZZ { - z, rA, rB := new(Dec), new(big.Int), new(big.Int) - s := scaleQuoExact{}.Scale(a.x, a.y) - z.quoRem(a.x, a.y, s, true, rA, rB) - if a.z.Cmp(z) != 0 || a.r.Cmp(new(big.Rat).SetFrac(rA, rB)) != 0 { - t.Errorf("#%d QuoRemZZZ got %v, %v, %v; expected %v, %v", i, z, rA, rB, a.z, a.r) - } - if a.srA != rA.Sign() || a.srB != rB.Sign() { - t.Errorf("#%d QuoRemZZZ wrong signs, got %v, %v; expected %v, %v", i, rA.Sign(), rB.Sign(), a.srA, a.srB) - } - } -} diff --git a/vendor/gopkg.in/inf.v0/dec_test.go b/vendor/gopkg.in/inf.v0/dec_test.go deleted file mode 100644 index e4b09b3f..00000000 --- a/vendor/gopkg.in/inf.v0/dec_test.go +++ /dev/null @@ -1,379 +0,0 @@ -package inf_test - -import ( - "bytes" - "encoding/gob" - "fmt" - "math/big" - "strings" - "testing" - - "gopkg.in/inf.v0" -) - -type decFunZZ func(z, x, y *inf.Dec) *inf.Dec -type decArgZZ struct { - z, x, y *inf.Dec -} - -var decSumZZ = []decArgZZ{ - {inf.NewDec(0, 0), inf.NewDec(0, 0), inf.NewDec(0, 0)}, - {inf.NewDec(1, 0), inf.NewDec(1, 0), inf.NewDec(0, 0)}, - {inf.NewDec(1111111110, 0), inf.NewDec(123456789, 0), inf.NewDec(987654321, 0)}, - {inf.NewDec(-1, 0), inf.NewDec(-1, 0), inf.NewDec(0, 0)}, - {inf.NewDec(864197532, 0), inf.NewDec(-123456789, 0), inf.NewDec(987654321, 0)}, - {inf.NewDec(-1111111110, 0), inf.NewDec(-123456789, 0), inf.NewDec(-987654321, 0)}, - {inf.NewDec(12, 2), inf.NewDec(1, 1), inf.NewDec(2, 2)}, -} - -var decProdZZ = []decArgZZ{ - {inf.NewDec(0, 0), inf.NewDec(0, 0), inf.NewDec(0, 0)}, - {inf.NewDec(0, 0), inf.NewDec(1, 0), inf.NewDec(0, 0)}, - {inf.NewDec(1, 0), inf.NewDec(1, 0), inf.NewDec(1, 0)}, - {inf.NewDec(-991*991, 0), inf.NewDec(991, 0), inf.NewDec(-991, 0)}, - {inf.NewDec(2, 3), inf.NewDec(1, 1), inf.NewDec(2, 2)}, - {inf.NewDec(2, -3), inf.NewDec(1, -1), inf.NewDec(2, -2)}, - {inf.NewDec(2, 3), inf.NewDec(1, 1), inf.NewDec(2, 2)}, -} - -func TestDecSignZ(t *testing.T) { - var zero inf.Dec - for _, a := range decSumZZ { - s := a.z.Sign() - e := a.z.Cmp(&zero) - if s != e { - t.Errorf("got %d; want %d for z = %v", s, e, a.z) - } - } -} - -func TestDecAbsZ(t *testing.T) { - var zero inf.Dec - for _, a := range decSumZZ { - var z inf.Dec - z.Abs(a.z) - var e inf.Dec - e.Set(a.z) - if e.Cmp(&zero) < 0 { - e.Sub(&zero, &e) - } - if z.Cmp(&e) != 0 { - t.Errorf("got z = %v; want %v", z, e) - } - } -} - -func testDecFunZZ(t *testing.T, msg string, f decFunZZ, a decArgZZ) { - var z inf.Dec - f(&z, a.x, a.y) - if (&z).Cmp(a.z) != 0 { - t.Errorf("%s%+v\n\tgot z = %v; want %v", msg, a, &z, a.z) - } -} - -func TestDecSumZZ(t *testing.T) { - AddZZ := func(z, x, y *inf.Dec) *inf.Dec { return z.Add(x, y) } - SubZZ := func(z, x, y *inf.Dec) *inf.Dec { return z.Sub(x, y) } - for _, a := range decSumZZ { - arg := a - testDecFunZZ(t, "AddZZ", AddZZ, arg) - - arg = decArgZZ{a.z, a.y, a.x} - testDecFunZZ(t, "AddZZ symmetric", AddZZ, arg) - - arg = decArgZZ{a.x, a.z, a.y} - testDecFunZZ(t, "SubZZ", SubZZ, arg) - - arg = decArgZZ{a.y, a.z, a.x} - testDecFunZZ(t, "SubZZ symmetric", SubZZ, arg) - } -} - -func TestDecProdZZ(t *testing.T) { - MulZZ := func(z, x, y *inf.Dec) *inf.Dec { return z.Mul(x, y) } - for _, a := range decProdZZ { - arg := a - testDecFunZZ(t, "MulZZ", MulZZ, arg) - - arg = decArgZZ{a.z, a.y, a.x} - testDecFunZZ(t, "MulZZ symmetric", MulZZ, arg) - } -} - -var decUnscaledTests = []struct { - d *inf.Dec - u int64 // ignored when ok == false - ok bool -}{ - {new(inf.Dec), 0, true}, - {inf.NewDec(-1<<63, 0), -1 << 63, true}, - {inf.NewDec(-(-1<<63 + 1), 0), -(-1<<63 + 1), true}, - {new(inf.Dec).Neg(inf.NewDec(-1<<63, 0)), 0, false}, - {new(inf.Dec).Sub(inf.NewDec(-1<<63, 0), inf.NewDec(1, 0)), 0, false}, - {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), 0, false}, -} - -func TestDecUnscaled(t *testing.T) { - for i, tt := range decUnscaledTests { - u, ok := tt.d.Unscaled() - if ok != tt.ok { - t.Errorf("#%d Unscaled: got %v, expected %v", i, ok, tt.ok) - } else if ok && u != tt.u { - t.Errorf("#%d Unscaled: got %v, expected %v", i, u, tt.u) - } - } -} - -var decRoundTests = [...]struct { - in *inf.Dec - s inf.Scale - r inf.Rounder - exp *inf.Dec -}{ - {inf.NewDec(123424999999999993, 15), 2, inf.RoundHalfUp, inf.NewDec(12342, 2)}, - {inf.NewDec(123425000000000001, 15), 2, inf.RoundHalfUp, inf.NewDec(12343, 2)}, - {inf.NewDec(123424999999999993, 15), 15, inf.RoundHalfUp, inf.NewDec(123424999999999993, 15)}, - {inf.NewDec(123424999999999993, 15), 16, inf.RoundHalfUp, inf.NewDec(1234249999999999930, 16)}, - {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), -1, inf.RoundHalfUp, inf.NewDec(1844674407370955162, -1)}, - {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), -2, inf.RoundHalfUp, inf.NewDec(184467440737095516, -2)}, - {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), -3, inf.RoundHalfUp, inf.NewDec(18446744073709552, -3)}, - {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), -4, inf.RoundHalfUp, inf.NewDec(1844674407370955, -4)}, - {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), -5, inf.RoundHalfUp, inf.NewDec(184467440737096, -5)}, - {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), -6, inf.RoundHalfUp, inf.NewDec(18446744073710, -6)}, -} - -func TestDecRound(t *testing.T) { - for i, tt := range decRoundTests { - z := new(inf.Dec).Round(tt.in, tt.s, tt.r) - if tt.exp.Cmp(z) != 0 { - t.Errorf("#%d Round got %v; expected %v", i, z, tt.exp) - } - } -} - -var decStringTests = []struct { - in string - out string - val int64 - scale inf.Scale // skip SetString if negative - ok bool - scanOk bool -}{ - {in: "", ok: false, scanOk: false}, - {in: "a", ok: false, scanOk: false}, - {in: "z", ok: false, scanOk: false}, - {in: "+", ok: false, scanOk: false}, - {in: "-", ok: false, scanOk: false}, - {in: "g", ok: false, scanOk: false}, - {in: ".", ok: false, scanOk: false}, - {in: ".-0", ok: false, scanOk: false}, - {in: ".+0", ok: false, scanOk: false}, - // Scannable but not SetStringable - {"0b", "ignored", 0, 0, false, true}, - {"0x", "ignored", 0, 0, false, true}, - {"0xg", "ignored", 0, 0, false, true}, - {"0.0g", "ignored", 0, 1, false, true}, - // examples from godoc for Dec - {"0", "0", 0, 0, true, true}, - {"0.00", "0.00", 0, 2, true, true}, - {"ignored", "0", 0, -2, true, false}, - {"1", "1", 1, 0, true, true}, - {"1.00", "1.00", 100, 2, true, true}, - {"10", "10", 10, 0, true, true}, - {"ignored", "10", 1, -1, true, false}, - // other tests - {"+0", "0", 0, 0, true, true}, - {"-0", "0", 0, 0, true, true}, - {"0.0", "0.0", 0, 1, true, true}, - {"0.1", "0.1", 1, 1, true, true}, - {"0.", "0", 0, 0, true, true}, - {"-10", "-10", -1, -1, true, true}, - {"-1", "-1", -1, 0, true, true}, - {"-0.1", "-0.1", -1, 1, true, true}, - {"-0.01", "-0.01", -1, 2, true, true}, - {"+0.", "0", 0, 0, true, true}, - {"-0.", "0", 0, 0, true, true}, - {".0", "0.0", 0, 1, true, true}, - {"+.0", "0.0", 0, 1, true, true}, - {"-.0", "0.0", 0, 1, true, true}, - {"0.0000000000", "0.0000000000", 0, 10, true, true}, - {"0.0000000001", "0.0000000001", 1, 10, true, true}, - {"-0.0000000000", "0.0000000000", 0, 10, true, true}, - {"-0.0000000001", "-0.0000000001", -1, 10, true, true}, - {"-10", "-10", -10, 0, true, true}, - {"+10", "10", 10, 0, true, true}, - {"00", "0", 0, 0, true, true}, - {"023", "23", 23, 0, true, true}, // decimal, not octal - {"-02.3", "-2.3", -23, 1, true, true}, // decimal, not octal -} - -func TestDecGetString(t *testing.T) { - z := new(inf.Dec) - for i, test := range decStringTests { - if !test.ok { - continue - } - z.SetUnscaled(test.val) - z.SetScale(test.scale) - - s := z.String() - if s != test.out { - t.Errorf("#%da got %s; want %s", i, s, test.out) - } - - s = fmt.Sprintf("%d", z) - if s != test.out { - t.Errorf("#%db got %s; want %s", i, s, test.out) - } - } -} - -func TestDecSetString(t *testing.T) { - tmp := new(inf.Dec) - for i, test := range decStringTests { - if test.scale < 0 { - // SetString only supports scale >= 0 - continue - } - // initialize to a non-zero value so that issues with parsing - // 0 are detected - tmp.Set(inf.NewDec(1234567890, 123)) - n1, ok1 := new(inf.Dec).SetString(test.in) - n2, ok2 := tmp.SetString(test.in) - expected := inf.NewDec(test.val, test.scale) - if ok1 != test.ok || ok2 != test.ok { - t.Errorf("#%d (input '%s') ok incorrect (should be %t)", i, test.in, test.ok) - continue - } - if !ok1 { - if n1 != nil { - t.Errorf("#%d (input '%s') n1 != nil", i, test.in) - } - continue - } - if !ok2 { - if n2 != nil { - t.Errorf("#%d (input '%s') n2 != nil", i, test.in) - } - continue - } - - if n1.Cmp(expected) != 0 { - t.Errorf("#%d (input '%s') got: %s want: %d", i, test.in, n1, test.val) - } - if n2.Cmp(expected) != 0 { - t.Errorf("#%d (input '%s') got: %s want: %d", i, test.in, n2, test.val) - } - } -} - -func TestDecScan(t *testing.T) { - tmp := new(inf.Dec) - for i, test := range decStringTests { - if test.scale < 0 { - // SetString only supports scale >= 0 - continue - } - // initialize to a non-zero value so that issues with parsing - // 0 are detected - tmp.Set(inf.NewDec(1234567890, 123)) - n1, n2 := new(inf.Dec), tmp - nn1, err1 := fmt.Sscan(test.in, n1) - nn2, err2 := fmt.Sscan(test.in, n2) - if !test.scanOk { - if err1 == nil || err2 == nil { - t.Errorf("#%d (input '%s') ok incorrect, should be %t", i, test.in, test.scanOk) - } - continue - } - expected := inf.NewDec(test.val, test.scale) - if nn1 != 1 || err1 != nil || nn2 != 1 || err2 != nil { - t.Errorf("#%d (input '%s') error %d %v, %d %v", i, test.in, nn1, err1, nn2, err2) - continue - } - if n1.Cmp(expected) != 0 { - t.Errorf("#%d (input '%s') got: %s want: %d", i, test.in, n1, test.val) - } - if n2.Cmp(expected) != 0 { - t.Errorf("#%d (input '%s') got: %s want: %d", i, test.in, n2, test.val) - } - } -} - -var decScanNextTests = []struct { - in string - ok bool - next rune -}{ - {"", false, 0}, - {"a", false, 'a'}, - {"z", false, 'z'}, - {"+", false, 0}, - {"-", false, 0}, - {"g", false, 'g'}, - {".", false, 0}, - {".-0", false, '-'}, - {".+0", false, '+'}, - {"0b", true, 'b'}, - {"0x", true, 'x'}, - {"0xg", true, 'x'}, - {"0.0g", true, 'g'}, -} - -func TestDecScanNext(t *testing.T) { - for i, test := range decScanNextTests { - rdr := strings.NewReader(test.in) - n1 := new(inf.Dec) - nn1, _ := fmt.Fscan(rdr, n1) - if (test.ok && nn1 == 0) || (!test.ok && nn1 > 0) { - t.Errorf("#%d (input '%s') ok incorrect should be %t", i, test.in, test.ok) - continue - } - r := rune(0) - nn2, err := fmt.Fscanf(rdr, "%c", &r) - if test.next != r { - t.Errorf("#%d (input '%s') next incorrect, got %c should be %c, %d, %v", i, test.in, r, test.next, nn2, err) - } - } -} - -var decGobEncodingTests = []string{ - "0", - "1", - "2", - "10", - "42", - "1234567890", - "298472983472983471903246121093472394872319615612417471234712061", -} - -func TestDecGobEncoding(t *testing.T) { - var medium bytes.Buffer - enc := gob.NewEncoder(&medium) - dec := gob.NewDecoder(&medium) - for i, test := range decGobEncodingTests { - for j := 0; j < 2; j++ { - for k := inf.Scale(-5); k <= 5; k++ { - medium.Reset() // empty buffer for each test case (in case of failures) - stest := test - if j != 0 { - // negative numbers - stest = "-" + test - } - var tx inf.Dec - tx.SetString(stest) - tx.SetScale(k) // test with positive, negative, and zero scale - if err := enc.Encode(&tx); err != nil { - t.Errorf("#%d%c: encoding failed: %s", i, 'a'+j, err) - } - var rx inf.Dec - if err := dec.Decode(&rx); err != nil { - t.Errorf("#%d%c: decoding failed: %s", i, 'a'+j, err) - } - if rx.Cmp(&tx) != 0 { - t.Errorf("#%d%c: transmission failed: got %s want %s", i, 'a'+j, &rx, &tx) - } - } - } - } -} diff --git a/vendor/gopkg.in/inf.v0/example_test.go b/vendor/gopkg.in/inf.v0/example_test.go deleted file mode 100644 index fa1e54d1..00000000 --- a/vendor/gopkg.in/inf.v0/example_test.go +++ /dev/null @@ -1,62 +0,0 @@ -package inf_test - -import ( - "fmt" - "log" -) - -import "gopkg.in/inf.v0" - -func ExampleDec_SetString() { - d := new(inf.Dec) - d.SetString("012345.67890") // decimal; leading 0 ignored; trailing 0 kept - fmt.Println(d) - // Output: 12345.67890 -} - -func ExampleDec_Scan() { - // The Scan function is rarely used directly; - // the fmt package recognizes it as an implementation of fmt.Scanner. - d := new(inf.Dec) - _, err := fmt.Sscan("184467440.73709551617", d) - if err != nil { - log.Println("error scanning value:", err) - } else { - fmt.Println(d) - } - // Output: 184467440.73709551617 -} - -func ExampleDec_QuoRound_scale2RoundDown() { - // 10 / 3 is an infinite decimal; it has no exact Dec representation - x, y := inf.NewDec(10, 0), inf.NewDec(3, 0) - // use 2 digits beyond the decimal point, round towards 0 - z := new(inf.Dec).QuoRound(x, y, 2, inf.RoundDown) - fmt.Println(z) - // Output: 3.33 -} - -func ExampleDec_QuoRound_scale2RoundCeil() { - // -42 / 400 is an finite decimal with 3 digits beyond the decimal point - x, y := inf.NewDec(-42, 0), inf.NewDec(400, 0) - // use 2 digits beyond decimal point, round towards positive infinity - z := new(inf.Dec).QuoRound(x, y, 2, inf.RoundCeil) - fmt.Println(z) - // Output: -0.10 -} - -func ExampleDec_QuoExact_ok() { - // 1 / 25 is a finite decimal; it has exact Dec representation - x, y := inf.NewDec(1, 0), inf.NewDec(25, 0) - z := new(inf.Dec).QuoExact(x, y) - fmt.Println(z) - // Output: 0.04 -} - -func ExampleDec_QuoExact_fail() { - // 1 / 3 is an infinite decimal; it has no exact Dec representation - x, y := inf.NewDec(1, 0), inf.NewDec(3, 0) - z := new(inf.Dec).QuoExact(x, y) - fmt.Println(z) - // Output: -} diff --git a/vendor/gopkg.in/inf.v0/rounder_example_test.go b/vendor/gopkg.in/inf.v0/rounder_example_test.go deleted file mode 100644 index 4bf36af9..00000000 --- a/vendor/gopkg.in/inf.v0/rounder_example_test.go +++ /dev/null @@ -1,73 +0,0 @@ -package inf_test - -import ( - "fmt" - "os" - "text/tabwriter" - - "gopkg.in/inf.v0" -) - -// This example displays the results of Dec.Round with each of the Rounders. -// -func ExampleRounder() { - var vals = []struct { - x string - s inf.Scale - }{ - {"-0.18", 1}, {"-0.15", 1}, {"-0.12", 1}, {"-0.10", 1}, - {"-0.08", 1}, {"-0.05", 1}, {"-0.02", 1}, {"0.00", 1}, - {"0.02", 1}, {"0.05", 1}, {"0.08", 1}, {"0.10", 1}, - {"0.12", 1}, {"0.15", 1}, {"0.18", 1}, - } - - var rounders = []struct { - name string - rounder inf.Rounder - }{ - {"RoundDown", inf.RoundDown}, {"RoundUp", inf.RoundUp}, - {"RoundCeil", inf.RoundCeil}, {"RoundFloor", inf.RoundFloor}, - {"RoundHalfDown", inf.RoundHalfDown}, {"RoundHalfUp", inf.RoundHalfUp}, - {"RoundHalfEven", inf.RoundHalfEven}, {"RoundExact", inf.RoundExact}, - } - - fmt.Println("The results of new(inf.Dec).Round(x, s, inf.RoundXXX):") - fmt.Println() - w := tabwriter.NewWriter(os.Stdout, 0, 0, 1, ' ', tabwriter.AlignRight) - fmt.Fprint(w, "x\ts\t|\t") - for _, r := range rounders { - fmt.Fprintf(w, "%s\t", r.name[5:]) - } - fmt.Fprintln(w) - for _, v := range vals { - fmt.Fprintf(w, "%s\t%d\t|\t", v.x, v.s) - for _, r := range rounders { - x, _ := new(inf.Dec).SetString(v.x) - z := new(inf.Dec).Round(x, v.s, r.rounder) - fmt.Fprintf(w, "%d\t", z) - } - fmt.Fprintln(w) - } - w.Flush() - - // Output: - // The results of new(inf.Dec).Round(x, s, inf.RoundXXX): - // - // x s | Down Up Ceil Floor HalfDown HalfUp HalfEven Exact - // -0.18 1 | -0.1 -0.2 -0.1 -0.2 -0.2 -0.2 -0.2 - // -0.15 1 | -0.1 -0.2 -0.1 -0.2 -0.1 -0.2 -0.2 - // -0.12 1 | -0.1 -0.2 -0.1 -0.2 -0.1 -0.1 -0.1 - // -0.10 1 | -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 - // -0.08 1 | 0.0 -0.1 0.0 -0.1 -0.1 -0.1 -0.1 - // -0.05 1 | 0.0 -0.1 0.0 -0.1 0.0 -0.1 0.0 - // -0.02 1 | 0.0 -0.1 0.0 -0.1 0.0 0.0 0.0 - // 0.00 1 | 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 - // 0.02 1 | 0.0 0.1 0.1 0.0 0.0 0.0 0.0 - // 0.05 1 | 0.0 0.1 0.1 0.0 0.0 0.1 0.0 - // 0.08 1 | 0.0 0.1 0.1 0.0 0.1 0.1 0.1 - // 0.10 1 | 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 - // 0.12 1 | 0.1 0.2 0.2 0.1 0.1 0.1 0.1 - // 0.15 1 | 0.1 0.2 0.2 0.1 0.1 0.2 0.2 - // 0.18 1 | 0.1 0.2 0.2 0.1 0.2 0.2 0.2 - -} diff --git a/vendor/gopkg.in/inf.v0/rounder_test.go b/vendor/gopkg.in/inf.v0/rounder_test.go deleted file mode 100644 index d7e14c58..00000000 --- a/vendor/gopkg.in/inf.v0/rounder_test.go +++ /dev/null @@ -1,109 +0,0 @@ -package inf_test - -import ( - "math/big" - "testing" - - "gopkg.in/inf.v0" -) - -var decRounderInputs = [...]struct { - quo *inf.Dec - rA, rB *big.Int -}{ - // examples from go language spec - {inf.NewDec(1, 0), big.NewInt(2), big.NewInt(3)}, // 5 / 3 - {inf.NewDec(-1, 0), big.NewInt(-2), big.NewInt(3)}, // -5 / 3 - {inf.NewDec(-1, 0), big.NewInt(2), big.NewInt(-3)}, // 5 / -3 - {inf.NewDec(1, 0), big.NewInt(-2), big.NewInt(-3)}, // -5 / -3 - // examples from godoc - {inf.NewDec(-1, 1), big.NewInt(-8), big.NewInt(10)}, - {inf.NewDec(-1, 1), big.NewInt(-5), big.NewInt(10)}, - {inf.NewDec(-1, 1), big.NewInt(-2), big.NewInt(10)}, - {inf.NewDec(0, 1), big.NewInt(-8), big.NewInt(10)}, - {inf.NewDec(0, 1), big.NewInt(-5), big.NewInt(10)}, - {inf.NewDec(0, 1), big.NewInt(-2), big.NewInt(10)}, - {inf.NewDec(0, 1), big.NewInt(0), big.NewInt(1)}, - {inf.NewDec(0, 1), big.NewInt(2), big.NewInt(10)}, - {inf.NewDec(0, 1), big.NewInt(5), big.NewInt(10)}, - {inf.NewDec(0, 1), big.NewInt(8), big.NewInt(10)}, - {inf.NewDec(1, 1), big.NewInt(2), big.NewInt(10)}, - {inf.NewDec(1, 1), big.NewInt(5), big.NewInt(10)}, - {inf.NewDec(1, 1), big.NewInt(8), big.NewInt(10)}, -} - -var decRounderResults = [...]struct { - rounder inf.Rounder - results [len(decRounderInputs)]*inf.Dec -}{ - {inf.RoundExact, [...]*inf.Dec{nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, - inf.NewDec(0, 1), nil, nil, nil, nil, nil, nil}}, - {inf.RoundDown, [...]*inf.Dec{ - inf.NewDec(1, 0), inf.NewDec(-1, 0), inf.NewDec(-1, 0), inf.NewDec(1, 0), - inf.NewDec(-1, 1), inf.NewDec(-1, 1), inf.NewDec(-1, 1), - inf.NewDec(0, 1), inf.NewDec(0, 1), inf.NewDec(0, 1), - inf.NewDec(0, 1), - inf.NewDec(0, 1), inf.NewDec(0, 1), inf.NewDec(0, 1), - inf.NewDec(1, 1), inf.NewDec(1, 1), inf.NewDec(1, 1)}}, - {inf.RoundUp, [...]*inf.Dec{ - inf.NewDec(2, 0), inf.NewDec(-2, 0), inf.NewDec(-2, 0), inf.NewDec(2, 0), - inf.NewDec(-2, 1), inf.NewDec(-2, 1), inf.NewDec(-2, 1), - inf.NewDec(-1, 1), inf.NewDec(-1, 1), inf.NewDec(-1, 1), - inf.NewDec(0, 1), - inf.NewDec(1, 1), inf.NewDec(1, 1), inf.NewDec(1, 1), - inf.NewDec(2, 1), inf.NewDec(2, 1), inf.NewDec(2, 1)}}, - {inf.RoundHalfDown, [...]*inf.Dec{ - inf.NewDec(2, 0), inf.NewDec(-2, 0), inf.NewDec(-2, 0), inf.NewDec(2, 0), - inf.NewDec(-2, 1), inf.NewDec(-1, 1), inf.NewDec(-1, 1), - inf.NewDec(-1, 1), inf.NewDec(0, 1), inf.NewDec(0, 1), - inf.NewDec(0, 1), - inf.NewDec(0, 1), inf.NewDec(0, 1), inf.NewDec(1, 1), - inf.NewDec(1, 1), inf.NewDec(1, 1), inf.NewDec(2, 1)}}, - {inf.RoundHalfUp, [...]*inf.Dec{ - inf.NewDec(2, 0), inf.NewDec(-2, 0), inf.NewDec(-2, 0), inf.NewDec(2, 0), - inf.NewDec(-2, 1), inf.NewDec(-2, 1), inf.NewDec(-1, 1), - inf.NewDec(-1, 1), inf.NewDec(-1, 1), inf.NewDec(0, 1), - inf.NewDec(0, 1), - inf.NewDec(0, 1), inf.NewDec(1, 1), inf.NewDec(1, 1), - inf.NewDec(1, 1), inf.NewDec(2, 1), inf.NewDec(2, 1)}}, - {inf.RoundHalfEven, [...]*inf.Dec{ - inf.NewDec(2, 0), inf.NewDec(-2, 0), inf.NewDec(-2, 0), inf.NewDec(2, 0), - inf.NewDec(-2, 1), inf.NewDec(-2, 1), inf.NewDec(-1, 1), - inf.NewDec(-1, 1), inf.NewDec(0, 1), inf.NewDec(0, 1), - inf.NewDec(0, 1), - inf.NewDec(0, 1), inf.NewDec(0, 1), inf.NewDec(1, 1), - inf.NewDec(1, 1), inf.NewDec(2, 1), inf.NewDec(2, 1)}}, - {inf.RoundFloor, [...]*inf.Dec{ - inf.NewDec(1, 0), inf.NewDec(-2, 0), inf.NewDec(-2, 0), inf.NewDec(1, 0), - inf.NewDec(-2, 1), inf.NewDec(-2, 1), inf.NewDec(-2, 1), - inf.NewDec(-1, 1), inf.NewDec(-1, 1), inf.NewDec(-1, 1), - inf.NewDec(0, 1), - inf.NewDec(0, 1), inf.NewDec(0, 1), inf.NewDec(0, 1), - inf.NewDec(1, 1), inf.NewDec(1, 1), inf.NewDec(1, 1)}}, - {inf.RoundCeil, [...]*inf.Dec{ - inf.NewDec(2, 0), inf.NewDec(-1, 0), inf.NewDec(-1, 0), inf.NewDec(2, 0), - inf.NewDec(-1, 1), inf.NewDec(-1, 1), inf.NewDec(-1, 1), - inf.NewDec(0, 1), inf.NewDec(0, 1), inf.NewDec(0, 1), - inf.NewDec(0, 1), - inf.NewDec(1, 1), inf.NewDec(1, 1), inf.NewDec(1, 1), - inf.NewDec(2, 1), inf.NewDec(2, 1), inf.NewDec(2, 1)}}, -} - -func TestDecRounders(t *testing.T) { - for i, a := range decRounderResults { - for j, input := range decRounderInputs { - q := new(inf.Dec).Set(input.quo) - rA, rB := new(big.Int).Set(input.rA), new(big.Int).Set(input.rB) - res := a.rounder.Round(new(inf.Dec), q, rA, rB) - if a.results[j] == nil && res == nil { - continue - } - if (a.results[j] == nil && res != nil) || - (a.results[j] != nil && res == nil) || - a.results[j].Cmp(res) != 0 { - t.Errorf("#%d,%d Rounder got %v; expected %v", i, j, res, a.results[j]) - } - } - } -} diff --git a/vendor/gopkg.in/yaml.v2/.travis.yml b/vendor/gopkg.in/yaml.v2/.travis.yml deleted file mode 100644 index 9f556934..00000000 --- a/vendor/gopkg.in/yaml.v2/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: go - -go: - - 1.4 - - 1.5 - - 1.6 - - 1.7 - - 1.8 - - 1.9 - - tip - -go_import_path: gopkg.in/yaml.v2 diff --git a/vendor/gopkg.in/yaml.v2/README.md b/vendor/gopkg.in/yaml.v2/README.md deleted file mode 100644 index b50c6e87..00000000 --- a/vendor/gopkg.in/yaml.v2/README.md +++ /dev/null @@ -1,133 +0,0 @@ -# YAML support for the Go language - -Introduction ------------- - -The yaml package enables Go programs to comfortably encode and decode YAML -values. It was developed within [Canonical](https://www.canonical.com) as -part of the [juju](https://juju.ubuntu.com) project, and is based on a -pure Go port of the well-known [libyaml](http://pyyaml.org/wiki/LibYAML) -C library to parse and generate YAML data quickly and reliably. - -Compatibility -------------- - -The yaml package supports most of YAML 1.1 and 1.2, including support for -anchors, tags, map merging, etc. Multi-document unmarshalling is not yet -implemented, and base-60 floats from YAML 1.1 are purposefully not -supported since they're a poor design and are gone in YAML 1.2. - -Installation and usage ----------------------- - -The import path for the package is *gopkg.in/yaml.v2*. - -To install it, run: - - go get gopkg.in/yaml.v2 - -API documentation ------------------ - -If opened in a browser, the import path itself leads to the API documentation: - - * [https://gopkg.in/yaml.v2](https://gopkg.in/yaml.v2) - -API stability -------------- - -The package API for yaml v2 will remain stable as described in [gopkg.in](https://gopkg.in). - - -License -------- - -The yaml package is licensed under the Apache License 2.0. Please see the LICENSE file for details. - - -Example -------- - -```Go -package main - -import ( - "fmt" - "log" - - "gopkg.in/yaml.v2" -) - -var data = ` -a: Easy! -b: - c: 2 - d: [3, 4] -` - -// Note: struct fields must be public in order for unmarshal to -// correctly populate the data. -type T struct { - A string - B struct { - RenamedC int `yaml:"c"` - D []int `yaml:",flow"` - } -} - -func main() { - t := T{} - - err := yaml.Unmarshal([]byte(data), &t) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- t:\n%v\n\n", t) - - d, err := yaml.Marshal(&t) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- t dump:\n%s\n\n", string(d)) - - m := make(map[interface{}]interface{}) - - err = yaml.Unmarshal([]byte(data), &m) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- m:\n%v\n\n", m) - - d, err = yaml.Marshal(&m) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- m dump:\n%s\n\n", string(d)) -} -``` - -This example will generate the following output: - -``` ---- t: -{Easy! {2 [3 4]}} - ---- t dump: -a: Easy! -b: - c: 2 - d: [3, 4] - - ---- m: -map[a:Easy! b:map[c:2 d:[3 4]]] - ---- m dump: -a: Easy! -b: - c: 2 - d: - - 3 - - 4 -``` - diff --git a/vendor/gopkg.in/yaml.v2/decode_test.go b/vendor/gopkg.in/yaml.v2/decode_test.go deleted file mode 100644 index 9269f12b..00000000 --- a/vendor/gopkg.in/yaml.v2/decode_test.go +++ /dev/null @@ -1,1326 +0,0 @@ -package yaml_test - -import ( - "errors" - "io" - "math" - "reflect" - "strings" - "time" - - . "gopkg.in/check.v1" - "gopkg.in/yaml.v2" -) - -var unmarshalIntTest = 123 - -var unmarshalTests = []struct { - data string - value interface{} -}{ - { - "", - (*struct{})(nil), - }, - { - "{}", &struct{}{}, - }, { - "v: hi", - map[string]string{"v": "hi"}, - }, { - "v: hi", map[string]interface{}{"v": "hi"}, - }, { - "v: true", - map[string]string{"v": "true"}, - }, { - "v: true", - map[string]interface{}{"v": true}, - }, { - "v: 10", - map[string]interface{}{"v": 10}, - }, { - "v: 0b10", - map[string]interface{}{"v": 2}, - }, { - "v: 0xA", - map[string]interface{}{"v": 10}, - }, { - "v: 4294967296", - map[string]int64{"v": 4294967296}, - }, { - "v: 0.1", - map[string]interface{}{"v": 0.1}, - }, { - "v: .1", - map[string]interface{}{"v": 0.1}, - }, { - "v: .Inf", - map[string]interface{}{"v": math.Inf(+1)}, - }, { - "v: -.Inf", - map[string]interface{}{"v": math.Inf(-1)}, - }, { - "v: -10", - map[string]interface{}{"v": -10}, - }, { - "v: -.1", - map[string]interface{}{"v": -0.1}, - }, - - // Simple values. - { - "123", - &unmarshalIntTest, - }, - - // Floats from spec - { - "canonical: 6.8523e+5", - map[string]interface{}{"canonical": 6.8523e+5}, - }, { - "expo: 685.230_15e+03", - map[string]interface{}{"expo": 685.23015e+03}, - }, { - "fixed: 685_230.15", - map[string]interface{}{"fixed": 685230.15}, - }, { - "neginf: -.inf", - map[string]interface{}{"neginf": math.Inf(-1)}, - }, { - "fixed: 685_230.15", - map[string]float64{"fixed": 685230.15}, - }, - //{"sexa: 190:20:30.15", map[string]interface{}{"sexa": 0}}, // Unsupported - //{"notanum: .NaN", map[string]interface{}{"notanum": math.NaN()}}, // Equality of NaN fails. - - // Bools from spec - { - "canonical: y", - map[string]interface{}{"canonical": true}, - }, { - "answer: NO", - map[string]interface{}{"answer": false}, - }, { - "logical: True", - map[string]interface{}{"logical": true}, - }, { - "option: on", - map[string]interface{}{"option": true}, - }, { - "option: on", - map[string]bool{"option": true}, - }, - // Ints from spec - { - "canonical: 685230", - map[string]interface{}{"canonical": 685230}, - }, { - "decimal: +685_230", - map[string]interface{}{"decimal": 685230}, - }, { - "octal: 02472256", - map[string]interface{}{"octal": 685230}, - }, { - "hexa: 0x_0A_74_AE", - map[string]interface{}{"hexa": 685230}, - }, { - "bin: 0b1010_0111_0100_1010_1110", - map[string]interface{}{"bin": 685230}, - }, { - "bin: -0b101010", - map[string]interface{}{"bin": -42}, - }, { - "bin: -0b1000000000000000000000000000000000000000000000000000000000000000", - map[string]interface{}{"bin": -9223372036854775808}, - }, { - "decimal: +685_230", - map[string]int{"decimal": 685230}, - }, - - //{"sexa: 190:20:30", map[string]interface{}{"sexa": 0}}, // Unsupported - - // Nulls from spec - { - "empty:", - map[string]interface{}{"empty": nil}, - }, { - "canonical: ~", - map[string]interface{}{"canonical": nil}, - }, { - "english: null", - map[string]interface{}{"english": nil}, - }, { - "~: null key", - map[interface{}]string{nil: "null key"}, - }, { - "empty:", - map[string]*bool{"empty": nil}, - }, - - // Flow sequence - { - "seq: [A,B]", - map[string]interface{}{"seq": []interface{}{"A", "B"}}, - }, { - "seq: [A,B,C,]", - map[string][]string{"seq": []string{"A", "B", "C"}}, - }, { - "seq: [A,1,C]", - map[string][]string{"seq": []string{"A", "1", "C"}}, - }, { - "seq: [A,1,C]", - map[string][]int{"seq": []int{1}}, - }, { - "seq: [A,1,C]", - map[string]interface{}{"seq": []interface{}{"A", 1, "C"}}, - }, - // Block sequence - { - "seq:\n - A\n - B", - map[string]interface{}{"seq": []interface{}{"A", "B"}}, - }, { - "seq:\n - A\n - B\n - C", - map[string][]string{"seq": []string{"A", "B", "C"}}, - }, { - "seq:\n - A\n - 1\n - C", - map[string][]string{"seq": []string{"A", "1", "C"}}, - }, { - "seq:\n - A\n - 1\n - C", - map[string][]int{"seq": []int{1}}, - }, { - "seq:\n - A\n - 1\n - C", - map[string]interface{}{"seq": []interface{}{"A", 1, "C"}}, - }, - - // Literal block scalar - { - "scalar: | # Comment\n\n literal\n\n \ttext\n\n", - map[string]string{"scalar": "\nliteral\n\n\ttext\n"}, - }, - - // Folded block scalar - { - "scalar: > # Comment\n\n folded\n line\n \n next\n line\n * one\n * two\n\n last\n line\n\n", - map[string]string{"scalar": "\nfolded line\nnext line\n * one\n * two\n\nlast line\n"}, - }, - - // Map inside interface with no type hints. - { - "a: {b: c}", - map[interface{}]interface{}{"a": map[interface{}]interface{}{"b": "c"}}, - }, - - // Structs and type conversions. - { - "hello: world", - &struct{ Hello string }{"world"}, - }, { - "a: {b: c}", - &struct{ A struct{ B string } }{struct{ B string }{"c"}}, - }, { - "a: {b: c}", - &struct{ A *struct{ B string } }{&struct{ B string }{"c"}}, - }, { - "a: {b: c}", - &struct{ A map[string]string }{map[string]string{"b": "c"}}, - }, { - "a: {b: c}", - &struct{ A *map[string]string }{&map[string]string{"b": "c"}}, - }, { - "a:", - &struct{ A map[string]string }{}, - }, { - "a: 1", - &struct{ A int }{1}, - }, { - "a: 1", - &struct{ A float64 }{1}, - }, { - "a: 1.0", - &struct{ A int }{1}, - }, { - "a: 1.0", - &struct{ A uint }{1}, - }, { - "a: [1, 2]", - &struct{ A []int }{[]int{1, 2}}, - }, { - "a: [1, 2]", - &struct{ A [2]int }{[2]int{1, 2}}, - }, { - "a: 1", - &struct{ B int }{0}, - }, { - "a: 1", - &struct { - B int "a" - }{1}, - }, { - "a: y", - &struct{ A bool }{true}, - }, - - // Some cross type conversions - { - "v: 42", - map[string]uint{"v": 42}, - }, { - "v: -42", - map[string]uint{}, - }, { - "v: 4294967296", - map[string]uint64{"v": 4294967296}, - }, { - "v: -4294967296", - map[string]uint64{}, - }, - - // int - { - "int_max: 2147483647", - map[string]int{"int_max": math.MaxInt32}, - }, - { - "int_min: -2147483648", - map[string]int{"int_min": math.MinInt32}, - }, - { - "int_overflow: 9223372036854775808", // math.MaxInt64 + 1 - map[string]int{}, - }, - - // int64 - { - "int64_max: 9223372036854775807", - map[string]int64{"int64_max": math.MaxInt64}, - }, - { - "int64_max_base2: 0b111111111111111111111111111111111111111111111111111111111111111", - map[string]int64{"int64_max_base2": math.MaxInt64}, - }, - { - "int64_min: -9223372036854775808", - map[string]int64{"int64_min": math.MinInt64}, - }, - { - "int64_neg_base2: -0b111111111111111111111111111111111111111111111111111111111111111", - map[string]int64{"int64_neg_base2": -math.MaxInt64}, - }, - { - "int64_overflow: 9223372036854775808", // math.MaxInt64 + 1 - map[string]int64{}, - }, - - // uint - { - "uint_min: 0", - map[string]uint{"uint_min": 0}, - }, - { - "uint_max: 4294967295", - map[string]uint{"uint_max": math.MaxUint32}, - }, - { - "uint_underflow: -1", - map[string]uint{}, - }, - - // uint64 - { - "uint64_min: 0", - map[string]uint{"uint64_min": 0}, - }, - { - "uint64_max: 18446744073709551615", - map[string]uint64{"uint64_max": math.MaxUint64}, - }, - { - "uint64_max_base2: 0b1111111111111111111111111111111111111111111111111111111111111111", - map[string]uint64{"uint64_max_base2": math.MaxUint64}, - }, - { - "uint64_maxint64: 9223372036854775807", - map[string]uint64{"uint64_maxint64": math.MaxInt64}, - }, - { - "uint64_underflow: -1", - map[string]uint64{}, - }, - - // float32 - { - "float32_max: 3.40282346638528859811704183484516925440e+38", - map[string]float32{"float32_max": math.MaxFloat32}, - }, - { - "float32_nonzero: 1.401298464324817070923729583289916131280e-45", - map[string]float32{"float32_nonzero": math.SmallestNonzeroFloat32}, - }, - { - "float32_maxuint64: 18446744073709551615", - map[string]float32{"float32_maxuint64": float32(math.MaxUint64)}, - }, - { - "float32_maxuint64+1: 18446744073709551616", - map[string]float32{"float32_maxuint64+1": float32(math.MaxUint64 + 1)}, - }, - - // float64 - { - "float64_max: 1.797693134862315708145274237317043567981e+308", - map[string]float64{"float64_max": math.MaxFloat64}, - }, - { - "float64_nonzero: 4.940656458412465441765687928682213723651e-324", - map[string]float64{"float64_nonzero": math.SmallestNonzeroFloat64}, - }, - { - "float64_maxuint64: 18446744073709551615", - map[string]float64{"float64_maxuint64": float64(math.MaxUint64)}, - }, - { - "float64_maxuint64+1: 18446744073709551616", - map[string]float64{"float64_maxuint64+1": float64(math.MaxUint64 + 1)}, - }, - - // Overflow cases. - { - "v: 4294967297", - map[string]int32{}, - }, { - "v: 128", - map[string]int8{}, - }, - - // Quoted values. - { - "'1': '\"2\"'", - map[interface{}]interface{}{"1": "\"2\""}, - }, { - "v:\n- A\n- 'B\n\n C'\n", - map[string][]string{"v": []string{"A", "B\nC"}}, - }, - - // Explicit tags. - { - "v: !!float '1.1'", - map[string]interface{}{"v": 1.1}, - }, { - "v: !!float 0", - map[string]interface{}{"v": float64(0)}, - }, { - "v: !!float -1", - map[string]interface{}{"v": float64(-1)}, - }, { - "v: !!null ''", - map[string]interface{}{"v": nil}, - }, { - "%TAG !y! tag:yaml.org,2002:\n---\nv: !y!int '1'", - map[string]interface{}{"v": 1}, - }, - - // Non-specific tag (Issue #75) - { - "v: ! test", - map[string]interface{}{"v": "test"}, - }, - - // Anchors and aliases. - { - "a: &x 1\nb: &y 2\nc: *x\nd: *y\n", - &struct{ A, B, C, D int }{1, 2, 1, 2}, - }, { - "a: &a {c: 1}\nb: *a", - &struct { - A, B struct { - C int - } - }{struct{ C int }{1}, struct{ C int }{1}}, - }, { - "a: &a [1, 2]\nb: *a", - &struct{ B []int }{[]int{1, 2}}, - }, - - // Bug #1133337 - { - "foo: ''", - map[string]*string{"foo": new(string)}, - }, { - "foo: null", - map[string]*string{"foo": nil}, - }, { - "foo: null", - map[string]string{"foo": ""}, - }, { - "foo: null", - map[string]interface{}{"foo": nil}, - }, - - // Support for ~ - { - "foo: ~", - map[string]*string{"foo": nil}, - }, { - "foo: ~", - map[string]string{"foo": ""}, - }, { - "foo: ~", - map[string]interface{}{"foo": nil}, - }, - - // Ignored field - { - "a: 1\nb: 2\n", - &struct { - A int - B int "-" - }{1, 0}, - }, - - // Bug #1191981 - { - "" + - "%YAML 1.1\n" + - "--- !!str\n" + - `"Generic line break (no glyph)\n\` + "\n" + - ` Generic line break (glyphed)\n\` + "\n" + - ` Line separator\u2028\` + "\n" + - ` Paragraph separator\u2029"` + "\n", - "" + - "Generic line break (no glyph)\n" + - "Generic line break (glyphed)\n" + - "Line separator\u2028Paragraph separator\u2029", - }, - - // Struct inlining - { - "a: 1\nb: 2\nc: 3\n", - &struct { - A int - C inlineB `yaml:",inline"` - }{1, inlineB{2, inlineC{3}}}, - }, - - // Map inlining - { - "a: 1\nb: 2\nc: 3\n", - &struct { - A int - C map[string]int `yaml:",inline"` - }{1, map[string]int{"b": 2, "c": 3}}, - }, - - // bug 1243827 - { - "a: -b_c", - map[string]interface{}{"a": "-b_c"}, - }, - { - "a: +b_c", - map[string]interface{}{"a": "+b_c"}, - }, - { - "a: 50cent_of_dollar", - map[string]interface{}{"a": "50cent_of_dollar"}, - }, - - // issue #295 (allow scalars with colons in flow mappings and sequences) - { - "a: {b: https://github.com/go-yaml/yaml}", - map[string]interface{}{"a": map[interface{}]interface{}{ - "b": "https://github.com/go-yaml/yaml", - }}, - }, - { - "a: [https://github.com/go-yaml/yaml]", - map[string]interface{}{"a": []interface{}{"https://github.com/go-yaml/yaml"}}, - }, - - // Duration - { - "a: 3s", - map[string]time.Duration{"a": 3 * time.Second}, - }, - - // Issue #24. - { - "a: ", - map[string]string{"a": ""}, - }, - - // Base 60 floats are obsolete and unsupported. - { - "a: 1:1\n", - map[string]string{"a": "1:1"}, - }, - - // Binary data. - { - "a: !!binary gIGC\n", - map[string]string{"a": "\x80\x81\x82"}, - }, { - "a: !!binary |\n " + strings.Repeat("kJCQ", 17) + "kJ\n CQ\n", - map[string]string{"a": strings.Repeat("\x90", 54)}, - }, { - "a: !!binary |\n " + strings.Repeat("A", 70) + "\n ==\n", - map[string]string{"a": strings.Repeat("\x00", 52)}, - }, - - // Ordered maps. - { - "{b: 2, a: 1, d: 4, c: 3, sub: {e: 5}}", - &yaml.MapSlice{{"b", 2}, {"a", 1}, {"d", 4}, {"c", 3}, {"sub", yaml.MapSlice{{"e", 5}}}}, - }, - - // Issue #39. - { - "a:\n b:\n c: d\n", - map[string]struct{ B interface{} }{"a": {map[interface{}]interface{}{"c": "d"}}}, - }, - - // Custom map type. - { - "a: {b: c}", - M{"a": M{"b": "c"}}, - }, - - // Support encoding.TextUnmarshaler. - { - "a: 1.2.3.4\n", - map[string]textUnmarshaler{"a": textUnmarshaler{S: "1.2.3.4"}}, - }, - { - "a: 2015-02-24T18:19:39Z\n", - map[string]textUnmarshaler{"a": textUnmarshaler{"2015-02-24T18:19:39Z"}}, - }, - - // Timestamps - { - // Date only. - "a: 2015-01-01\n", - map[string]time.Time{"a": time.Date(2015, 1, 1, 0, 0, 0, 0, time.UTC)}, - }, - { - // RFC3339 - "a: 2015-02-24T18:19:39.12Z\n", - map[string]time.Time{"a": time.Date(2015, 2, 24, 18, 19, 39, .12e9, time.UTC)}, - }, - { - // RFC3339 with short dates. - "a: 2015-2-3T3:4:5Z", - map[string]time.Time{"a": time.Date(2015, 2, 3, 3, 4, 5, 0, time.UTC)}, - }, - { - // ISO8601 lower case t - "a: 2015-02-24t18:19:39Z\n", - map[string]time.Time{"a": time.Date(2015, 2, 24, 18, 19, 39, 0, time.UTC)}, - }, - { - // space separate, no time zone - "a: 2015-02-24 18:19:39\n", - map[string]time.Time{"a": time.Date(2015, 2, 24, 18, 19, 39, 0, time.UTC)}, - }, - // Some cases not currently handled. Uncomment these when - // the code is fixed. - // { - // // space separated with time zone - // "a: 2001-12-14 21:59:43.10 -5", - // map[string]interface{}{"a": time.Date(2001, 12, 14, 21, 59, 43, .1e9, time.UTC)}, - // }, - // { - // // arbitrary whitespace between fields - // "a: 2001-12-14 \t\t \t21:59:43.10 \t Z", - // map[string]interface{}{"a": time.Date(2001, 12, 14, 21, 59, 43, .1e9, time.UTC)}, - // }, - { - // explicit string tag - "a: !!str 2015-01-01", - map[string]interface{}{"a": "2015-01-01"}, - }, - { - // explicit timestamp tag on quoted string - "a: !!timestamp \"2015-01-01\"", - map[string]time.Time{"a": time.Date(2015, 1, 1, 0, 0, 0, 0, time.UTC)}, - }, - { - // explicit timestamp tag on unquoted string - "a: !!timestamp 2015-01-01", - map[string]time.Time{"a": time.Date(2015, 1, 1, 0, 0, 0, 0, time.UTC)}, - }, - { - // quoted string that's a valid timestamp - "a: \"2015-01-01\"", - map[string]interface{}{"a": "2015-01-01"}, - }, - { - // explicit timestamp tag into interface. - "a: !!timestamp \"2015-01-01\"", - map[string]interface{}{"a": "2015-01-01"}, - }, - { - // implicit timestamp tag into interface. - "a: 2015-01-01", - map[string]interface{}{"a": "2015-01-01"}, - }, - - // Encode empty lists as zero-length slices. - { - "a: []", - &struct{ A []int }{[]int{}}, - }, - - // UTF-16-LE - { - "\xff\xfe\xf1\x00o\x00\xf1\x00o\x00:\x00 \x00v\x00e\x00r\x00y\x00 \x00y\x00e\x00s\x00\n\x00", - M{"ñoño": "very yes"}, - }, - // UTF-16-LE with surrogate. - { - "\xff\xfe\xf1\x00o\x00\xf1\x00o\x00:\x00 \x00v\x00e\x00r\x00y\x00 \x00y\x00e\x00s\x00 \x00=\xd8\xd4\xdf\n\x00", - M{"ñoño": "very yes 🟔"}, - }, - - // UTF-16-BE - { - "\xfe\xff\x00\xf1\x00o\x00\xf1\x00o\x00:\x00 \x00v\x00e\x00r\x00y\x00 \x00y\x00e\x00s\x00\n", - M{"ñoño": "very yes"}, - }, - // UTF-16-BE with surrogate. - { - "\xfe\xff\x00\xf1\x00o\x00\xf1\x00o\x00:\x00 \x00v\x00e\x00r\x00y\x00 \x00y\x00e\x00s\x00 \xd8=\xdf\xd4\x00\n", - M{"ñoño": "very yes 🟔"}, - }, - - // YAML Float regex shouldn't match this - { - "a: 123456e1\n", - M{"a": "123456e1"}, - }, { - "a: 123456E1\n", - M{"a": "123456E1"}, - }, - // yaml-test-suite 3GZX: Spec Example 7.1. Alias Nodes - { - "First occurrence: &anchor Foo\nSecond occurrence: *anchor\nOverride anchor: &anchor Bar\nReuse anchor: *anchor\n", - map[interface{}]interface{}{ - "Reuse anchor": "Bar", - "First occurrence": "Foo", - "Second occurrence": "Foo", - "Override anchor": "Bar", - }, - }, - // Single document with garbage following it. - { - "---\nhello\n...\n}not yaml", - "hello", - }, -} - -type M map[interface{}]interface{} - -type inlineB struct { - B int - inlineC `yaml:",inline"` -} - -type inlineC struct { - C int -} - -func (s *S) TestUnmarshal(c *C) { - for i, item := range unmarshalTests { - c.Logf("test %d: %q", i, item.data) - t := reflect.ValueOf(item.value).Type() - value := reflect.New(t) - err := yaml.Unmarshal([]byte(item.data), value.Interface()) - if _, ok := err.(*yaml.TypeError); !ok { - c.Assert(err, IsNil) - } - c.Assert(value.Elem().Interface(), DeepEquals, item.value, Commentf("error: %v", err)) - } -} - -// TODO(v3): This test should also work when unmarshaling onto an interface{}. -func (s *S) TestUnmarshalFullTimestamp(c *C) { - // Full timestamp in same format as encoded. This is confirmed to be - // properly decoded by Python as a timestamp as well. - var str = "2015-02-24T18:19:39.123456789-03:00" - var t time.Time - err := yaml.Unmarshal([]byte(str), &t) - c.Assert(err, IsNil) - c.Assert(t, Equals, time.Date(2015, 2, 24, 18, 19, 39, 123456789, t.Location())) - c.Assert(t.In(time.UTC), Equals, time.Date(2015, 2, 24, 21, 19, 39, 123456789, time.UTC)) -} - -func (s *S) TestDecoderSingleDocument(c *C) { - // Test that Decoder.Decode works as expected on - // all the unmarshal tests. - for i, item := range unmarshalTests { - c.Logf("test %d: %q", i, item.data) - if item.data == "" { - // Behaviour differs when there's no YAML. - continue - } - t := reflect.ValueOf(item.value).Type() - value := reflect.New(t) - err := yaml.NewDecoder(strings.NewReader(item.data)).Decode(value.Interface()) - if _, ok := err.(*yaml.TypeError); !ok { - c.Assert(err, IsNil) - } - c.Assert(value.Elem().Interface(), DeepEquals, item.value) - } -} - -var decoderTests = []struct { - data string - values []interface{} -}{{ - "", - nil, -}, { - "a: b", - []interface{}{ - map[interface{}]interface{}{"a": "b"}, - }, -}, { - "---\na: b\n...\n", - []interface{}{ - map[interface{}]interface{}{"a": "b"}, - }, -}, { - "---\n'hello'\n...\n---\ngoodbye\n...\n", - []interface{}{ - "hello", - "goodbye", - }, -}} - -func (s *S) TestDecoder(c *C) { - for i, item := range decoderTests { - c.Logf("test %d: %q", i, item.data) - var values []interface{} - dec := yaml.NewDecoder(strings.NewReader(item.data)) - for { - var value interface{} - err := dec.Decode(&value) - if err == io.EOF { - break - } - c.Assert(err, IsNil) - values = append(values, value) - } - c.Assert(values, DeepEquals, item.values) - } -} - -type errReader struct{} - -func (errReader) Read([]byte) (int, error) { - return 0, errors.New("some read error") -} - -func (s *S) TestDecoderReadError(c *C) { - err := yaml.NewDecoder(errReader{}).Decode(&struct{}{}) - c.Assert(err, ErrorMatches, `yaml: input error: some read error`) -} - -func (s *S) TestUnmarshalNaN(c *C) { - value := map[string]interface{}{} - err := yaml.Unmarshal([]byte("notanum: .NaN"), &value) - c.Assert(err, IsNil) - c.Assert(math.IsNaN(value["notanum"].(float64)), Equals, true) -} - -var unmarshalErrorTests = []struct { - data, error string -}{ - {"v: !!float 'error'", "yaml: cannot decode !!str `error` as a !!float"}, - {"v: [A,", "yaml: line 1: did not find expected node content"}, - {"v:\n- [A,", "yaml: line 2: did not find expected node content"}, - {"a:\n- b: *,", "yaml: line 2: did not find expected alphabetic or numeric character"}, - {"a: *b\n", "yaml: unknown anchor 'b' referenced"}, - {"a: &a\n b: *a\n", "yaml: anchor 'a' value contains itself"}, - {"value: -", "yaml: block sequence entries are not allowed in this context"}, - {"a: !!binary ==", "yaml: !!binary value contains invalid base64 data"}, - {"{[.]}", `yaml: invalid map key: \[\]interface \{\}\{"\."\}`}, - {"{{.}}", `yaml: invalid map key: map\[interface\ \{\}\]interface \{\}\{".":interface \{\}\(nil\)\}`}, - {"b: *a\na: &a {c: 1}", `yaml: unknown anchor 'a' referenced`}, - {"%TAG !%79! tag:yaml.org,2002:\n---\nv: !%79!int '1'", "yaml: did not find expected whitespace"}, -} - -func (s *S) TestUnmarshalErrors(c *C) { - for i, item := range unmarshalErrorTests { - c.Logf("test %d: %q", i, item.data) - var value interface{} - err := yaml.Unmarshal([]byte(item.data), &value) - c.Assert(err, ErrorMatches, item.error, Commentf("Partial unmarshal: %#v", value)) - } -} - -func (s *S) TestDecoderErrors(c *C) { - for _, item := range unmarshalErrorTests { - var value interface{} - err := yaml.NewDecoder(strings.NewReader(item.data)).Decode(&value) - c.Assert(err, ErrorMatches, item.error, Commentf("Partial unmarshal: %#v", value)) - } -} - -var unmarshalerTests = []struct { - data, tag string - value interface{} -}{ - {"_: {hi: there}", "!!map", map[interface{}]interface{}{"hi": "there"}}, - {"_: [1,A]", "!!seq", []interface{}{1, "A"}}, - {"_: 10", "!!int", 10}, - {"_: null", "!!null", nil}, - {`_: BAR!`, "!!str", "BAR!"}, - {`_: "BAR!"`, "!!str", "BAR!"}, - {"_: !!foo 'BAR!'", "!!foo", "BAR!"}, - {`_: ""`, "!!str", ""}, -} - -var unmarshalerResult = map[int]error{} - -type unmarshalerType struct { - value interface{} -} - -func (o *unmarshalerType) UnmarshalYAML(unmarshal func(v interface{}) error) error { - if err := unmarshal(&o.value); err != nil { - return err - } - if i, ok := o.value.(int); ok { - if result, ok := unmarshalerResult[i]; ok { - return result - } - } - return nil -} - -type unmarshalerPointer struct { - Field *unmarshalerType "_" -} - -type unmarshalerValue struct { - Field unmarshalerType "_" -} - -func (s *S) TestUnmarshalerPointerField(c *C) { - for _, item := range unmarshalerTests { - obj := &unmarshalerPointer{} - err := yaml.Unmarshal([]byte(item.data), obj) - c.Assert(err, IsNil) - if item.value == nil { - c.Assert(obj.Field, IsNil) - } else { - c.Assert(obj.Field, NotNil, Commentf("Pointer not initialized (%#v)", item.value)) - c.Assert(obj.Field.value, DeepEquals, item.value) - } - } -} - -func (s *S) TestUnmarshalerValueField(c *C) { - for _, item := range unmarshalerTests { - obj := &unmarshalerValue{} - err := yaml.Unmarshal([]byte(item.data), obj) - c.Assert(err, IsNil) - c.Assert(obj.Field, NotNil, Commentf("Pointer not initialized (%#v)", item.value)) - c.Assert(obj.Field.value, DeepEquals, item.value) - } -} - -func (s *S) TestUnmarshalerWholeDocument(c *C) { - obj := &unmarshalerType{} - err := yaml.Unmarshal([]byte(unmarshalerTests[0].data), obj) - c.Assert(err, IsNil) - value, ok := obj.value.(map[interface{}]interface{}) - c.Assert(ok, Equals, true, Commentf("value: %#v", obj.value)) - c.Assert(value["_"], DeepEquals, unmarshalerTests[0].value) -} - -func (s *S) TestUnmarshalerTypeError(c *C) { - unmarshalerResult[2] = &yaml.TypeError{[]string{"foo"}} - unmarshalerResult[4] = &yaml.TypeError{[]string{"bar"}} - defer func() { - delete(unmarshalerResult, 2) - delete(unmarshalerResult, 4) - }() - - type T struct { - Before int - After int - M map[string]*unmarshalerType - } - var v T - data := `{before: A, m: {abc: 1, def: 2, ghi: 3, jkl: 4}, after: B}` - err := yaml.Unmarshal([]byte(data), &v) - c.Assert(err, ErrorMatches, ""+ - "yaml: unmarshal errors:\n"+ - " line 1: cannot unmarshal !!str `A` into int\n"+ - " foo\n"+ - " bar\n"+ - " line 1: cannot unmarshal !!str `B` into int") - c.Assert(v.M["abc"], NotNil) - c.Assert(v.M["def"], IsNil) - c.Assert(v.M["ghi"], NotNil) - c.Assert(v.M["jkl"], IsNil) - - c.Assert(v.M["abc"].value, Equals, 1) - c.Assert(v.M["ghi"].value, Equals, 3) -} - -type proxyTypeError struct{} - -func (v *proxyTypeError) UnmarshalYAML(unmarshal func(interface{}) error) error { - var s string - var a int32 - var b int64 - if err := unmarshal(&s); err != nil { - panic(err) - } - if s == "a" { - if err := unmarshal(&b); err == nil { - panic("should have failed") - } - return unmarshal(&a) - } - if err := unmarshal(&a); err == nil { - panic("should have failed") - } - return unmarshal(&b) -} - -func (s *S) TestUnmarshalerTypeErrorProxying(c *C) { - type T struct { - Before int - After int - M map[string]*proxyTypeError - } - var v T - data := `{before: A, m: {abc: a, def: b}, after: B}` - err := yaml.Unmarshal([]byte(data), &v) - c.Assert(err, ErrorMatches, ""+ - "yaml: unmarshal errors:\n"+ - " line 1: cannot unmarshal !!str `A` into int\n"+ - " line 1: cannot unmarshal !!str `a` into int32\n"+ - " line 1: cannot unmarshal !!str `b` into int64\n"+ - " line 1: cannot unmarshal !!str `B` into int") -} - -type failingUnmarshaler struct{} - -var failingErr = errors.New("failingErr") - -func (ft *failingUnmarshaler) UnmarshalYAML(unmarshal func(interface{}) error) error { - return failingErr -} - -func (s *S) TestUnmarshalerError(c *C) { - err := yaml.Unmarshal([]byte("a: b"), &failingUnmarshaler{}) - c.Assert(err, Equals, failingErr) -} - -type sliceUnmarshaler []int - -func (su *sliceUnmarshaler) UnmarshalYAML(unmarshal func(interface{}) error) error { - var slice []int - err := unmarshal(&slice) - if err == nil { - *su = slice - return nil - } - - var intVal int - err = unmarshal(&intVal) - if err == nil { - *su = []int{intVal} - return nil - } - - return err -} - -func (s *S) TestUnmarshalerRetry(c *C) { - var su sliceUnmarshaler - err := yaml.Unmarshal([]byte("[1, 2, 3]"), &su) - c.Assert(err, IsNil) - c.Assert(su, DeepEquals, sliceUnmarshaler([]int{1, 2, 3})) - - err = yaml.Unmarshal([]byte("1"), &su) - c.Assert(err, IsNil) - c.Assert(su, DeepEquals, sliceUnmarshaler([]int{1})) -} - -// From http://yaml.org/type/merge.html -var mergeTests = ` -anchors: - list: - - &CENTER { "x": 1, "y": 2 } - - &LEFT { "x": 0, "y": 2 } - - &BIG { "r": 10 } - - &SMALL { "r": 1 } - -# All the following maps are equal: - -plain: - # Explicit keys - "x": 1 - "y": 2 - "r": 10 - label: center/big - -mergeOne: - # Merge one map - << : *CENTER - "r": 10 - label: center/big - -mergeMultiple: - # Merge multiple maps - << : [ *CENTER, *BIG ] - label: center/big - -override: - # Override - << : [ *BIG, *LEFT, *SMALL ] - "x": 1 - label: center/big - -shortTag: - # Explicit short merge tag - !!merge "<<" : [ *CENTER, *BIG ] - label: center/big - -longTag: - # Explicit merge long tag - ! "<<" : [ *CENTER, *BIG ] - label: center/big - -inlineMap: - # Inlined map - << : {"x": 1, "y": 2, "r": 10} - label: center/big - -inlineSequenceMap: - # Inlined map in sequence - << : [ *CENTER, {"r": 10} ] - label: center/big -` - -func (s *S) TestMerge(c *C) { - var want = map[interface{}]interface{}{ - "x": 1, - "y": 2, - "r": 10, - "label": "center/big", - } - - var m map[interface{}]interface{} - err := yaml.Unmarshal([]byte(mergeTests), &m) - c.Assert(err, IsNil) - for name, test := range m { - if name == "anchors" { - continue - } - c.Assert(test, DeepEquals, want, Commentf("test %q failed", name)) - } -} - -func (s *S) TestMergeStruct(c *C) { - type Data struct { - X, Y, R int - Label string - } - want := Data{1, 2, 10, "center/big"} - - var m map[string]Data - err := yaml.Unmarshal([]byte(mergeTests), &m) - c.Assert(err, IsNil) - for name, test := range m { - if name == "anchors" { - continue - } - c.Assert(test, Equals, want, Commentf("test %q failed", name)) - } -} - -var unmarshalNullTests = []func() interface{}{ - func() interface{} { var v interface{}; v = "v"; return &v }, - func() interface{} { var s = "s"; return &s }, - func() interface{} { var s = "s"; sptr := &s; return &sptr }, - func() interface{} { var i = 1; return &i }, - func() interface{} { var i = 1; iptr := &i; return &iptr }, - func() interface{} { m := map[string]int{"s": 1}; return &m }, - func() interface{} { m := map[string]int{"s": 1}; return m }, -} - -func (s *S) TestUnmarshalNull(c *C) { - for _, test := range unmarshalNullTests { - item := test() - zero := reflect.Zero(reflect.TypeOf(item).Elem()).Interface() - err := yaml.Unmarshal([]byte("null"), item) - c.Assert(err, IsNil) - if reflect.TypeOf(item).Kind() == reflect.Map { - c.Assert(reflect.ValueOf(item).Interface(), DeepEquals, reflect.MakeMap(reflect.TypeOf(item)).Interface()) - } else { - c.Assert(reflect.ValueOf(item).Elem().Interface(), DeepEquals, zero) - } - } -} - -func (s *S) TestUnmarshalSliceOnPreset(c *C) { - // Issue #48. - v := struct{ A []int }{[]int{1}} - yaml.Unmarshal([]byte("a: [2]"), &v) - c.Assert(v.A, DeepEquals, []int{2}) -} - -var unmarshalStrictTests = []struct { - data string - value interface{} - error string -}{{ - data: "a: 1\nc: 2\n", - value: struct{ A, B int }{A: 1}, - error: `yaml: unmarshal errors:\n line 2: field c not found in type struct { A int; B int }`, -}, { - data: "a: 1\nb: 2\na: 3\n", - value: struct{ A, B int }{A: 3, B: 2}, - error: `yaml: unmarshal errors:\n line 3: field a already set in type struct { A int; B int }`, -}, { - data: "c: 3\na: 1\nb: 2\nc: 4\n", - value: struct { - A int - inlineB `yaml:",inline"` - }{ - A: 1, - inlineB: inlineB{ - B: 2, - inlineC: inlineC{ - C: 4, - }, - }, - }, - error: `yaml: unmarshal errors:\n line 4: field c already set in type struct { A int; yaml_test.inlineB "yaml:\\",inline\\"" }`, -}, { - data: "c: 0\na: 1\nb: 2\nc: 1\n", - value: struct { - A int - inlineB `yaml:",inline"` - }{ - A: 1, - inlineB: inlineB{ - B: 2, - inlineC: inlineC{ - C: 1, - }, - }, - }, - error: `yaml: unmarshal errors:\n line 4: field c already set in type struct { A int; yaml_test.inlineB "yaml:\\",inline\\"" }`, -}, { - data: "c: 1\na: 1\nb: 2\nc: 3\n", - value: struct { - A int - M map[string]interface{} `yaml:",inline"` - }{ - A: 1, - M: map[string]interface{}{ - "b": 2, - "c": 3, - }, - }, - error: `yaml: unmarshal errors:\n line 4: key "c" already set in map`, -}, { - data: "a: 1\n9: 2\nnull: 3\n9: 4", - value: map[interface{}]interface{}{ - "a": 1, - nil: 3, - 9: 4, - }, - error: `yaml: unmarshal errors:\n line 4: key 9 already set in map`, -}} - -func (s *S) TestUnmarshalStrict(c *C) { - for i, item := range unmarshalStrictTests { - c.Logf("test %d: %q", i, item.data) - // First test that normal Unmarshal unmarshals to the expected value. - t := reflect.ValueOf(item.value).Type() - value := reflect.New(t) - err := yaml.Unmarshal([]byte(item.data), value.Interface()) - c.Assert(err, Equals, nil) - c.Assert(value.Elem().Interface(), DeepEquals, item.value) - - // Then test that UnmarshalStrict fails on the same thing. - t = reflect.ValueOf(item.value).Type() - value = reflect.New(t) - err = yaml.UnmarshalStrict([]byte(item.data), value.Interface()) - c.Assert(err, ErrorMatches, item.error) - } -} - -type textUnmarshaler struct { - S string -} - -func (t *textUnmarshaler) UnmarshalText(s []byte) error { - t.S = string(s) - return nil -} - -func (s *S) TestFuzzCrashers(c *C) { - cases := []string{ - // runtime error: index out of range - "\"\\0\\\r\n", - - // should not happen - " 0: [\n] 0", - "? ? \"\n\" 0", - " - {\n000}0", - "0:\n 0: [0\n] 0", - " - \"\n000\"0", - " - \"\n000\"\"", - "0:\n - {\n000}0", - "0:\n - \"\n000\"0", - "0:\n - \"\n000\"\"", - - // runtime error: index out of range - " \ufeff\n", - "? \ufeff\n", - "? \ufeff:\n", - "0: \ufeff\n", - "? \ufeff: \ufeff\n", - } - for _, data := range cases { - var v interface{} - _ = yaml.Unmarshal([]byte(data), &v) - } -} - -//var data []byte -//func init() { -// var err error -// data, err = ioutil.ReadFile("/tmp/file.yaml") -// if err != nil { -// panic(err) -// } -//} -// -//func (s *S) BenchmarkUnmarshal(c *C) { -// var err error -// for i := 0; i < c.N; i++ { -// var v map[string]interface{} -// err = yaml.Unmarshal(data, &v) -// } -// if err != nil { -// panic(err) -// } -//} -// -//func (s *S) BenchmarkMarshal(c *C) { -// var v map[string]interface{} -// yaml.Unmarshal(data, &v) -// c.ResetTimer() -// for i := 0; i < c.N; i++ { -// yaml.Marshal(&v) -// } -//} diff --git a/vendor/gopkg.in/yaml.v2/encode_test.go b/vendor/gopkg.in/yaml.v2/encode_test.go deleted file mode 100644 index f0911a76..00000000 --- a/vendor/gopkg.in/yaml.v2/encode_test.go +++ /dev/null @@ -1,595 +0,0 @@ -package yaml_test - -import ( - "bytes" - "fmt" - "math" - "strconv" - "strings" - "time" - - "net" - "os" - - . "gopkg.in/check.v1" - "gopkg.in/yaml.v2" -) - -var marshalIntTest = 123 - -var marshalTests = []struct { - value interface{} - data string -}{ - { - nil, - "null\n", - }, { - (*marshalerType)(nil), - "null\n", - }, { - &struct{}{}, - "{}\n", - }, { - map[string]string{"v": "hi"}, - "v: hi\n", - }, { - map[string]interface{}{"v": "hi"}, - "v: hi\n", - }, { - map[string]string{"v": "true"}, - "v: \"true\"\n", - }, { - map[string]string{"v": "false"}, - "v: \"false\"\n", - }, { - map[string]interface{}{"v": true}, - "v: true\n", - }, { - map[string]interface{}{"v": false}, - "v: false\n", - }, { - map[string]interface{}{"v": 10}, - "v: 10\n", - }, { - map[string]interface{}{"v": -10}, - "v: -10\n", - }, { - map[string]uint{"v": 42}, - "v: 42\n", - }, { - map[string]interface{}{"v": int64(4294967296)}, - "v: 4294967296\n", - }, { - map[string]int64{"v": int64(4294967296)}, - "v: 4294967296\n", - }, { - map[string]uint64{"v": 4294967296}, - "v: 4294967296\n", - }, { - map[string]interface{}{"v": "10"}, - "v: \"10\"\n", - }, { - map[string]interface{}{"v": 0.1}, - "v: 0.1\n", - }, { - map[string]interface{}{"v": float64(0.1)}, - "v: 0.1\n", - }, { - map[string]interface{}{"v": float32(0.99)}, - "v: 0.99\n", - }, { - map[string]interface{}{"v": -0.1}, - "v: -0.1\n", - }, { - map[string]interface{}{"v": math.Inf(+1)}, - "v: .inf\n", - }, { - map[string]interface{}{"v": math.Inf(-1)}, - "v: -.inf\n", - }, { - map[string]interface{}{"v": math.NaN()}, - "v: .nan\n", - }, { - map[string]interface{}{"v": nil}, - "v: null\n", - }, { - map[string]interface{}{"v": ""}, - "v: \"\"\n", - }, { - map[string][]string{"v": []string{"A", "B"}}, - "v:\n- A\n- B\n", - }, { - map[string][]string{"v": []string{"A", "B\nC"}}, - "v:\n- A\n- |-\n B\n C\n", - }, { - map[string][]interface{}{"v": []interface{}{"A", 1, map[string][]int{"B": []int{2, 3}}}}, - "v:\n- A\n- 1\n- B:\n - 2\n - 3\n", - }, { - map[string]interface{}{"a": map[interface{}]interface{}{"b": "c"}}, - "a:\n b: c\n", - }, { - map[string]interface{}{"a": "-"}, - "a: '-'\n", - }, - - // Simple values. - { - &marshalIntTest, - "123\n", - }, - - // Structures - { - &struct{ Hello string }{"world"}, - "hello: world\n", - }, { - &struct { - A struct { - B string - } - }{struct{ B string }{"c"}}, - "a:\n b: c\n", - }, { - &struct { - A *struct { - B string - } - }{&struct{ B string }{"c"}}, - "a:\n b: c\n", - }, { - &struct { - A *struct { - B string - } - }{}, - "a: null\n", - }, { - &struct{ A int }{1}, - "a: 1\n", - }, { - &struct{ A []int }{[]int{1, 2}}, - "a:\n- 1\n- 2\n", - }, { - &struct{ A [2]int }{[2]int{1, 2}}, - "a:\n- 1\n- 2\n", - }, { - &struct { - B int "a" - }{1}, - "a: 1\n", - }, { - &struct{ A bool }{true}, - "a: true\n", - }, - - // Conditional flag - { - &struct { - A int "a,omitempty" - B int "b,omitempty" - }{1, 0}, - "a: 1\n", - }, { - &struct { - A int "a,omitempty" - B int "b,omitempty" - }{0, 0}, - "{}\n", - }, { - &struct { - A *struct{ X, y int } "a,omitempty,flow" - }{&struct{ X, y int }{1, 2}}, - "a: {x: 1}\n", - }, { - &struct { - A *struct{ X, y int } "a,omitempty,flow" - }{nil}, - "{}\n", - }, { - &struct { - A *struct{ X, y int } "a,omitempty,flow" - }{&struct{ X, y int }{}}, - "a: {x: 0}\n", - }, { - &struct { - A struct{ X, y int } "a,omitempty,flow" - }{struct{ X, y int }{1, 2}}, - "a: {x: 1}\n", - }, { - &struct { - A struct{ X, y int } "a,omitempty,flow" - }{struct{ X, y int }{0, 1}}, - "{}\n", - }, { - &struct { - A float64 "a,omitempty" - B float64 "b,omitempty" - }{1, 0}, - "a: 1\n", - }, - { - &struct { - T1 time.Time "t1,omitempty" - T2 time.Time "t2,omitempty" - T3 *time.Time "t3,omitempty" - T4 *time.Time "t4,omitempty" - }{ - T2: time.Date(2018, 1, 9, 10, 40, 47, 0, time.UTC), - T4: newTime(time.Date(2098, 1, 9, 10, 40, 47, 0, time.UTC)), - }, - "t2: 2018-01-09T10:40:47Z\nt4: 2098-01-09T10:40:47Z\n", - }, - // Nil interface that implements Marshaler. - { - map[string]yaml.Marshaler{ - "a": nil, - }, - "a: null\n", - }, - - // Flow flag - { - &struct { - A []int "a,flow" - }{[]int{1, 2}}, - "a: [1, 2]\n", - }, { - &struct { - A map[string]string "a,flow" - }{map[string]string{"b": "c", "d": "e"}}, - "a: {b: c, d: e}\n", - }, { - &struct { - A struct { - B, D string - } "a,flow" - }{struct{ B, D string }{"c", "e"}}, - "a: {b: c, d: e}\n", - }, - - // Unexported field - { - &struct { - u int - A int - }{0, 1}, - "a: 1\n", - }, - - // Ignored field - { - &struct { - A int - B int "-" - }{1, 2}, - "a: 1\n", - }, - - // Struct inlining - { - &struct { - A int - C inlineB `yaml:",inline"` - }{1, inlineB{2, inlineC{3}}}, - "a: 1\nb: 2\nc: 3\n", - }, - - // Map inlining - { - &struct { - A int - C map[string]int `yaml:",inline"` - }{1, map[string]int{"b": 2, "c": 3}}, - "a: 1\nb: 2\nc: 3\n", - }, - - // Duration - { - map[string]time.Duration{"a": 3 * time.Second}, - "a: 3s\n", - }, - - // Issue #24: bug in map merging logic. - { - map[string]string{"a": ""}, - "a: \n", - }, - - // Issue #34: marshal unsupported base 60 floats quoted for compatibility - // with old YAML 1.1 parsers. - { - map[string]string{"a": "1:1"}, - "a: \"1:1\"\n", - }, - - // Binary data. - { - map[string]string{"a": "\x00"}, - "a: \"\\0\"\n", - }, { - map[string]string{"a": "\x80\x81\x82"}, - "a: !!binary gIGC\n", - }, { - map[string]string{"a": strings.Repeat("\x90", 54)}, - "a: !!binary |\n " + strings.Repeat("kJCQ", 17) + "kJ\n CQ\n", - }, - - // Ordered maps. - { - &yaml.MapSlice{{"b", 2}, {"a", 1}, {"d", 4}, {"c", 3}, {"sub", yaml.MapSlice{{"e", 5}}}}, - "b: 2\na: 1\nd: 4\nc: 3\nsub:\n e: 5\n", - }, - - // Encode unicode as utf-8 rather than in escaped form. - { - map[string]string{"a": "你好"}, - "a: 你好\n", - }, - - // Support encoding.TextMarshaler. - { - map[string]net.IP{"a": net.IPv4(1, 2, 3, 4)}, - "a: 1.2.3.4\n", - }, - // time.Time gets a timestamp tag. - { - map[string]time.Time{"a": time.Date(2015, 2, 24, 18, 19, 39, 0, time.UTC)}, - "a: 2015-02-24T18:19:39Z\n", - }, - { - map[string]*time.Time{"a": newTime(time.Date(2015, 2, 24, 18, 19, 39, 0, time.UTC))}, - "a: 2015-02-24T18:19:39Z\n", - }, - { - // This is confirmed to be properly decoded in Python (libyaml) without a timestamp tag. - map[string]time.Time{"a": time.Date(2015, 2, 24, 18, 19, 39, 123456789, time.FixedZone("FOO", -3*60*60))}, - "a: 2015-02-24T18:19:39.123456789-03:00\n", - }, - // Ensure timestamp-like strings are quoted. - { - map[string]string{"a": "2015-02-24T18:19:39Z"}, - "a: \"2015-02-24T18:19:39Z\"\n", - }, - - // Ensure strings containing ": " are quoted (reported as PR #43, but not reproducible). - { - map[string]string{"a": "b: c"}, - "a: 'b: c'\n", - }, - - // Containing hash mark ('#') in string should be quoted - { - map[string]string{"a": "Hello #comment"}, - "a: 'Hello #comment'\n", - }, - { - map[string]string{"a": "你好 #comment"}, - "a: '你好 #comment'\n", - }, -} - -func (s *S) TestMarshal(c *C) { - defer os.Setenv("TZ", os.Getenv("TZ")) - os.Setenv("TZ", "UTC") - for i, item := range marshalTests { - c.Logf("test %d: %q", i, item.data) - data, err := yaml.Marshal(item.value) - c.Assert(err, IsNil) - c.Assert(string(data), Equals, item.data) - } -} - -func (s *S) TestEncoderSingleDocument(c *C) { - for i, item := range marshalTests { - c.Logf("test %d. %q", i, item.data) - var buf bytes.Buffer - enc := yaml.NewEncoder(&buf) - err := enc.Encode(item.value) - c.Assert(err, Equals, nil) - err = enc.Close() - c.Assert(err, Equals, nil) - c.Assert(buf.String(), Equals, item.data) - } -} - -func (s *S) TestEncoderMultipleDocuments(c *C) { - var buf bytes.Buffer - enc := yaml.NewEncoder(&buf) - err := enc.Encode(map[string]string{"a": "b"}) - c.Assert(err, Equals, nil) - err = enc.Encode(map[string]string{"c": "d"}) - c.Assert(err, Equals, nil) - err = enc.Close() - c.Assert(err, Equals, nil) - c.Assert(buf.String(), Equals, "a: b\n---\nc: d\n") -} - -func (s *S) TestEncoderWriteError(c *C) { - enc := yaml.NewEncoder(errorWriter{}) - err := enc.Encode(map[string]string{"a": "b"}) - c.Assert(err, ErrorMatches, `yaml: write error: some write error`) // Data not flushed yet -} - -type errorWriter struct{} - -func (errorWriter) Write([]byte) (int, error) { - return 0, fmt.Errorf("some write error") -} - -var marshalErrorTests = []struct { - value interface{} - error string - panic string -}{{ - value: &struct { - B int - inlineB ",inline" - }{1, inlineB{2, inlineC{3}}}, - panic: `Duplicated key 'b' in struct struct \{ B int; .*`, -}, { - value: &struct { - A int - B map[string]int ",inline" - }{1, map[string]int{"a": 2}}, - panic: `Can't have key "a" in inlined map; conflicts with struct field`, -}} - -func (s *S) TestMarshalErrors(c *C) { - for _, item := range marshalErrorTests { - if item.panic != "" { - c.Assert(func() { yaml.Marshal(item.value) }, PanicMatches, item.panic) - } else { - _, err := yaml.Marshal(item.value) - c.Assert(err, ErrorMatches, item.error) - } - } -} - -func (s *S) TestMarshalTypeCache(c *C) { - var data []byte - var err error - func() { - type T struct{ A int } - data, err = yaml.Marshal(&T{}) - c.Assert(err, IsNil) - }() - func() { - type T struct{ B int } - data, err = yaml.Marshal(&T{}) - c.Assert(err, IsNil) - }() - c.Assert(string(data), Equals, "b: 0\n") -} - -var marshalerTests = []struct { - data string - value interface{} -}{ - {"_:\n hi: there\n", map[interface{}]interface{}{"hi": "there"}}, - {"_:\n- 1\n- A\n", []interface{}{1, "A"}}, - {"_: 10\n", 10}, - {"_: null\n", nil}, - {"_: BAR!\n", "BAR!"}, -} - -type marshalerType struct { - value interface{} -} - -func (o marshalerType) MarshalText() ([]byte, error) { - panic("MarshalText called on type with MarshalYAML") -} - -func (o marshalerType) MarshalYAML() (interface{}, error) { - return o.value, nil -} - -type marshalerValue struct { - Field marshalerType "_" -} - -func (s *S) TestMarshaler(c *C) { - for _, item := range marshalerTests { - obj := &marshalerValue{} - obj.Field.value = item.value - data, err := yaml.Marshal(obj) - c.Assert(err, IsNil) - c.Assert(string(data), Equals, string(item.data)) - } -} - -func (s *S) TestMarshalerWholeDocument(c *C) { - obj := &marshalerType{} - obj.value = map[string]string{"hello": "world!"} - data, err := yaml.Marshal(obj) - c.Assert(err, IsNil) - c.Assert(string(data), Equals, "hello: world!\n") -} - -type failingMarshaler struct{} - -func (ft *failingMarshaler) MarshalYAML() (interface{}, error) { - return nil, failingErr -} - -func (s *S) TestMarshalerError(c *C) { - _, err := yaml.Marshal(&failingMarshaler{}) - c.Assert(err, Equals, failingErr) -} - -func (s *S) TestSortedOutput(c *C) { - order := []interface{}{ - false, - true, - 1, - uint(1), - 1.0, - 1.1, - 1.2, - 2, - uint(2), - 2.0, - 2.1, - "", - ".1", - ".2", - ".a", - "1", - "2", - "a!10", - "a/0001", - "a/002", - "a/3", - "a/10", - "a/11", - "a/0012", - "a/100", - "a~10", - "ab/1", - "b/1", - "b/01", - "b/2", - "b/02", - "b/3", - "b/03", - "b1", - "b01", - "b3", - "c2.10", - "c10.2", - "d1", - "d7", - "d7abc", - "d12", - "d12a", - } - m := make(map[interface{}]int) - for _, k := range order { - m[k] = 1 - } - data, err := yaml.Marshal(m) - c.Assert(err, IsNil) - out := "\n" + string(data) - last := 0 - for i, k := range order { - repr := fmt.Sprint(k) - if s, ok := k.(string); ok { - if _, err = strconv.ParseFloat(repr, 32); s == "" || err == nil { - repr = `"` + repr + `"` - } - } - index := strings.Index(out, "\n"+repr+":") - if index == -1 { - c.Fatalf("%#v is not in the output: %#v", k, out) - } - if index < last { - c.Fatalf("%#v was generated before %#v: %q", k, order[i-1], out) - } - last = index - } -} - -func newTime(t time.Time) *time.Time { - return &t -} diff --git a/vendor/gopkg.in/yaml.v2/example_embedded_test.go b/vendor/gopkg.in/yaml.v2/example_embedded_test.go deleted file mode 100644 index 171c0931..00000000 --- a/vendor/gopkg.in/yaml.v2/example_embedded_test.go +++ /dev/null @@ -1,41 +0,0 @@ -package yaml_test - -import ( - "fmt" - "log" - - "gopkg.in/yaml.v2" -) - -// An example showing how to unmarshal embedded -// structs from YAML. - -type StructA struct { - A string `yaml:"a"` -} - -type StructB struct { - // Embedded structs are not treated as embedded in YAML by default. To do that, - // add the ",inline" annotation below - StructA `yaml:",inline"` - B string `yaml:"b"` -} - -var data = ` -a: a string from struct A -b: a string from struct B -` - -func ExampleUnmarshal_embedded() { - var b StructB - - err := yaml.Unmarshal([]byte(data), &b) - if err != nil { - log.Fatalf("cannot unmarshal data: %v", err) - } - fmt.Println(b.A) - fmt.Println(b.B) - // Output: - // a string from struct A - // a string from struct B -} diff --git a/vendor/gopkg.in/yaml.v2/go.mod b/vendor/gopkg.in/yaml.v2/go.mod deleted file mode 100644 index 1934e876..00000000 --- a/vendor/gopkg.in/yaml.v2/go.mod +++ /dev/null @@ -1,5 +0,0 @@ -module "gopkg.in/yaml.v2" - -require ( - "gopkg.in/check.v1" v0.0.0-20161208181325-20d25e280405 -) diff --git a/vendor/gopkg.in/yaml.v2/suite_test.go b/vendor/gopkg.in/yaml.v2/suite_test.go deleted file mode 100644 index c5cf1ed4..00000000 --- a/vendor/gopkg.in/yaml.v2/suite_test.go +++ /dev/null @@ -1,12 +0,0 @@ -package yaml_test - -import ( - . "gopkg.in/check.v1" - "testing" -) - -func Test(t *testing.T) { TestingT(t) } - -type S struct{} - -var _ = Suite(&S{}) diff --git a/vendor/k8s.io/api/CONTRIBUTING.md b/vendor/k8s.io/api/CONTRIBUTING.md deleted file mode 100644 index 094efca3..00000000 --- a/vendor/k8s.io/api/CONTRIBUTING.md +++ /dev/null @@ -1,7 +0,0 @@ -# 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. - -This repository is published from [kubernetes/kubernetes/staging/src/k8s.io/api](https://git.k8s.io/kubernetes/staging/src/k8s.io/api) by the [kubernetes publishing-bot](https://git.k8s.io/publishing-bot). - -Please see [Staging Directory and Publishing](https://git.k8s.io/community/contributors/devel/staging.md) for more information diff --git a/vendor/k8s.io/api/OWNERS b/vendor/k8s.io/api/OWNERS deleted file mode 100644 index b2c57000..00000000 --- a/vendor/k8s.io/api/OWNERS +++ /dev/null @@ -1,50 +0,0 @@ -approvers: -- erictune -- lavalamp -- smarterclayton -- thockin -- liggitt -# - bgrant0607 # manual escalations only -reviewers: -- brendandburns -- caesarxuchao -- davidopp -- dchen1107 -- deads2k -- derekwaynecarr -- dims -- eparis -- erictune -- errordeveloper -- feiskyer -- gmarek -- janetkuo -- jbeda -- jsafrane -- jszczepkowski -- justinsb -- krousey -- lavalamp -- liggitt -- luxas -- madhusudancs -- mikedanese -- mwielgus -- ncdc -- nikhiljindal -- piosz -- pmorie -- pwittrock -- roberthbailey -- rootfs -- saad-ali -- smarterclayton -- soltysh -- sttts -- tallclair -- thockin -- vishh -- wojtek-t -- yifan-gu -- yujuhong -- zmerlynn diff --git a/vendor/k8s.io/api/README.md b/vendor/k8s.io/api/README.md deleted file mode 100644 index 967543a4..00000000 --- a/vendor/k8s.io/api/README.md +++ /dev/null @@ -1 +0,0 @@ -This repo is still in the experimental stage. Shortly it will contain the schema of the API that are served by the Kubernetes apiserver. diff --git a/vendor/k8s.io/api/SECURITY_CONTACTS b/vendor/k8s.io/api/SECURITY_CONTACTS deleted file mode 100644 index 0648a8eb..00000000 --- a/vendor/k8s.io/api/SECURITY_CONTACTS +++ /dev/null @@ -1,17 +0,0 @@ -# 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/vendor/k8s.io/api/admission/v1beta1/generated.proto b/vendor/k8s.io/api/admission/v1beta1/generated.proto deleted file mode 100644 index aa2a4dd4..00000000 --- a/vendor/k8s.io/api/admission/v1beta1/generated.proto +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.admission.v1beta1; - -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"; - -// AdmissionRequest describes the admission.Attributes for the admission request. -message AdmissionRequest { - // 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. - optional string uid = 1; - - // Kind is the type of object being manipulated. For example: Pod - optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind kind = 2; - - // Resource is the name of the resource being requested. This is not the kind. For example: pods - optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionResource resource = 3; - - // SubResource is the name of the subresource being requested. This is a different resource, scoped to the parent - // resource, but it may have a different kind. For instance, /pods has the resource "pods" and the kind "Pod", while - // /pods/foo/status has the resource "pods", the sub resource "status", and the kind "Pod" (because status operates on - // pods). The binding resource for a pod though may be /pods/foo/binding, which has resource "pods", subresource - // "binding", and kind "Binding". - // +optional - optional string subResource = 4; - - // Name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and - // rely on the server to generate the name. If that is the case, this method will return the empty string. - // +optional - optional string name = 5; - - // Namespace is the namespace associated with the request (if any). - // +optional - optional string namespace = 6; - - // Operation is the operation being performed - optional string operation = 7; - - // UserInfo is information about the requesting user - optional k8s.io.api.authentication.v1.UserInfo userInfo = 8; - - // Object is the object from the incoming request prior to default values being applied - // +optional - optional k8s.io.apimachinery.pkg.runtime.RawExtension object = 9; - - // OldObject is the existing object. Only populated for UPDATE requests. - // +optional - optional k8s.io.apimachinery.pkg.runtime.RawExtension oldObject = 10; -} - -// AdmissionResponse describes an admission response. -message AdmissionResponse { - // UID is an identifier for the individual request/response. - // This should be copied over from the corresponding AdmissionRequest. - optional string uid = 1; - - // Allowed indicates whether or not the admission request was permitted. - optional bool allowed = 2; - - // Result contains extra details into why an admission request was denied. - // This field IS NOT consulted in any way if "Allowed" is "true". - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Status status = 3; - - // The patch body. Currently we only support "JSONPatch" which implements RFC 6902. - // +optional - optional bytes patch = 4; - - // The type of Patch. Currently we only allow "JSONPatch". - // +optional - optional string patchType = 5; -} - -// AdmissionReview describes an admission review request/response. -message AdmissionReview { - // Request describes the attributes for the admission request. - // +optional - optional AdmissionRequest request = 1; - - // Response describes the attributes for the admission response. - // +optional - optional AdmissionResponse response = 2; -} - diff --git a/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto b/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto deleted file mode 100644 index 4f0e400e..00000000 --- a/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto +++ /dev/null @@ -1,108 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; - -// Initializer describes the name and the failure policy of an initializer, and -// what resources it applies to. -message Initializer { - // 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 - optional string name = 1; - - // Rules describes what resources/subresources the initializer cares about. - // The initializer cares about an operation if it matches _any_ Rule. - // Rule.Resources must not include subresources. - repeated Rule rules = 2; -} - -// InitializerConfiguration describes the configuration of initializers. -message InitializerConfiguration { - // Standard object 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; - - // Initializers is a list of resources and their default initializers - // Order-sensitive. - // When merging multiple InitializerConfigurations, we sort the initializers - // from different InitializerConfigurations by the name of the - // InitializerConfigurations; the order of the initializers from the same - // InitializerConfiguration is preserved. - // +patchMergeKey=name - // +patchStrategy=merge - // +optional - repeated Initializer initializers = 2; -} - -// InitializerConfigurationList is a list of InitializerConfiguration. -message InitializerConfigurationList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of InitializerConfiguration. - repeated InitializerConfiguration items = 2; -} - -// Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended -// to make sure that all the tuple expansions are valid. -message Rule { - // APIGroups is the API groups the resources belong to. '*' is all groups. - // If '*' is present, the length of the slice must be one. - // Required. - repeated string apiGroups = 1; - - // APIVersions is the API versions the resources belong to. '*' is all versions. - // If '*' is present, the length of the slice must be one. - // Required. - repeated string apiVersions = 2; - - // Resources is a list of resources this rule applies to. - // - // For example: - // 'pods' means pods. - // 'pods/log' means the log subresource of pods. - // '*' means all resources, but not subresources. - // 'pods/*' means all subresources of pods. - // '*/scale' means all scale subresources. - // '*/*' means all resources and their subresources. - // - // If wildcard is present, the validation rule will ensure resources do not - // overlap with each other. - // - // Depending on the enclosing object, subresources might not be allowed. - // Required. - repeated string resources = 3; -} - diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto b/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto deleted file mode 100644 index 118be06f..00000000 --- a/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto +++ /dev/null @@ -1,263 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; - -// MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. -message MutatingWebhookConfiguration { - // Standard object 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; - - // Webhooks is a list of webhooks and the affected resources and operations. - // +optional - // +patchMergeKey=name - // +patchStrategy=merge - repeated Webhook Webhooks = 2; -} - -// MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration. -message MutatingWebhookConfigurationList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of MutatingWebhookConfiguration. - repeated MutatingWebhookConfiguration items = 2; -} - -// Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended -// to make sure that all the tuple expansions are valid. -message Rule { - // APIGroups is the API groups the resources belong to. '*' is all groups. - // If '*' is present, the length of the slice must be one. - // Required. - repeated string apiGroups = 1; - - // APIVersions is the API versions the resources belong to. '*' is all versions. - // If '*' is present, the length of the slice must be one. - // Required. - repeated string apiVersions = 2; - - // Resources is a list of resources this rule applies to. - // - // For example: - // 'pods' means pods. - // 'pods/log' means the log subresource of pods. - // '*' means all resources, but not subresources. - // 'pods/*' means all subresources of pods. - // '*/scale' means all scale subresources. - // '*/*' means all resources and their subresources. - // - // If wildcard is present, the validation rule will ensure resources do not - // overlap with each other. - // - // Depending on the enclosing object, subresources might not be allowed. - // Required. - repeated string resources = 3; -} - -// RuleWithOperations is a tuple of Operations and Resources. It is recommended to make -// sure that all the tuple expansions are valid. -message RuleWithOperations { - // Operations is the operations the admission hook cares about - CREATE, UPDATE, or * - // for all operations. - // If '*' is present, the length of the slice must be one. - // Required. - repeated string operations = 1; - - // Rule is embedded, it describes other criteria of the rule, like - // APIGroups, APIVersions, Resources, etc. - optional Rule rule = 2; -} - -// ServiceReference holds a reference to Service.legacy.k8s.io -message ServiceReference { - // `namespace` is the namespace of the service. - // Required - optional string namespace = 1; - - // `name` is the name of the service. - // Required - optional string name = 2; - - // `path` is an optional URL path which will be sent in any request to - // this service. - // +optional - optional string path = 3; -} - -// ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. -message ValidatingWebhookConfiguration { - // Standard object 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; - - // Webhooks is a list of webhooks and the affected resources and operations. - // +optional - // +patchMergeKey=name - // +patchStrategy=merge - repeated Webhook Webhooks = 2; -} - -// ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration. -message ValidatingWebhookConfigurationList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of ValidatingWebhookConfiguration. - repeated ValidatingWebhookConfiguration items = 2; -} - -// Webhook describes an admission webhook and the resources and operations it applies to. -message Webhook { - // 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. - optional string name = 1; - - // ClientConfig defines how to communicate with the hook. - // Required - optional WebhookClientConfig clientConfig = 2; - - // 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 - - // allowed values are Ignore or Fail. Defaults to Ignore. - // +optional - optional string failurePolicy = 4; - - // 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. - // - // For 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": { - // "matchExpressions": [ - // { - // "key": "runlevel", - // "operator": "NotIn", - // "values": [ - // "0", - // "1" - // ] - // } - // ] - // } - // - // If 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": { - // "matchExpressions": [ - // { - // "key": "environment", - // "operator": "In", - // "values": [ - // "prod", - // "staging" - // ] - // } - // ] - // } - // - // See - // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - // for more examples of label selectors. - // - // Default to the empty LabelSelector, which matches everything. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 5; -} - -// WebhookClientConfig contains the information to make a TLS -// connection with the webhook -message WebhookClientConfig { - // `url` gives the location of the webhook, in standard URL form - // (`[scheme://]host:port/path`). Exactly one of `url` or `service` - // must be specified. - // - // The `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. - // - // Please 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. - // - // The scheme must be "https"; the URL must begin with "https://". - // - // A 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. - // - // Attempting to use a user or basic auth e.g. "user:password@" is not - // allowed. Fragments ("#...") and query parameters ("?...") are not - // allowed, either. - // - // +optional - optional string url = 3; - - // `service` is a reference to the service for this webhook. Either - // `service` or `url` must be specified. - // - // If the webhook is running within the cluster, then you should use `service`. - // - // Port 443 will be used if it is open, otherwise it is an error. - // - // +optional - optional ServiceReference service = 1; - - // `caBundle` is a PEM encoded CA bundle which will be used to validate - // the webhook's server certificate. - // Required. - optional bytes caBundle = 2; -} - diff --git a/vendor/k8s.io/api/apps/OWNERS b/vendor/k8s.io/api/apps/OWNERS deleted file mode 100755 index 2f260571..00000000 --- a/vendor/k8s.io/api/apps/OWNERS +++ /dev/null @@ -1,19 +0,0 @@ -reviewers: -- thockin -- lavalamp -- smarterclayton -- deads2k -- caesarxuchao -- pmorie -- sttts -- saad-ali -- ncdc -- tallclair -- dims -- errordeveloper -- mml -- m1093782566 -- mbohlool -- david-mcmahon -- kevin-wangzefeng -- jianhuiz diff --git a/vendor/k8s.io/api/apps/v1/generated.proto b/vendor/k8s.io/api/apps/v1/generated.proto deleted file mode 100644 index 38d7c08c..00000000 --- a/vendor/k8s.io/api/apps/v1/generated.proto +++ /dev/null @@ -1,701 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "v1"; - -// 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. -message ControllerRevision { - // 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; - - // Data is the serialized representation of the state. - optional k8s.io.apimachinery.pkg.runtime.RawExtension data = 2; - - // Revision indicates the revision of the state represented by Data. - optional int64 revision = 3; -} - -// ControllerRevisionList is a resource containing a list of ControllerRevision objects. -message ControllerRevisionList { - // 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 ControllerRevisions - repeated ControllerRevision items = 2; -} - -// DaemonSet represents the configuration of a daemon set. -message DaemonSet { - // 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 desired behavior of this daemon set. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional DaemonSetSpec spec = 2; - - // The current status of this daemon set. 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 - // +optional - optional DaemonSetStatus status = 3; -} - -// DaemonSetCondition describes the state of a DaemonSet at a certain point. -message DaemonSetCondition { - // Type of DaemonSet condition. - optional string type = 1; - - // Status of the condition, one of True, False, Unknown. - optional string status = 2; - - // Last time the condition transitioned from one status to another. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // The reason for the condition's last transition. - // +optional - optional string reason = 4; - - // A human readable message indicating details about the transition. - // +optional - optional string message = 5; -} - -// DaemonSetList is a collection of daemon sets. -message DaemonSetList { - // 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; - - // A list of daemon sets. - repeated DaemonSet items = 2; -} - -// DaemonSetSpec is the specification of a daemon set. -message DaemonSetSpec { - // A label query over pods that are managed by the daemon set. - // Must match in order to be controlled. - // It must match the pod template's labels. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1; - - // An object that describes the pod that will be created. - // The DaemonSet will create exactly one copy of this pod on every node - // that matches the template's node selector (or on every node if no node - // selector is specified). - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template - optional k8s.io.api.core.v1.PodTemplateSpec template = 2; - - // An update strategy to replace existing DaemonSet pods with new pods. - // +optional - optional DaemonSetUpdateStrategy updateStrategy = 3; - - // The minimum number of seconds for which a newly created DaemonSet 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). - // +optional - optional int32 minReadySeconds = 4; - - // The number of old history to retain to allow rollback. - // This is a pointer to distinguish between explicit zero and not specified. - // Defaults to 10. - // +optional - optional int32 revisionHistoryLimit = 6; -} - -// DaemonSetStatus represents the current status of a daemon set. -message DaemonSetStatus { - // The number of nodes that are running at least 1 - // daemon pod and are supposed to run the daemon pod. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - optional int32 currentNumberScheduled = 1; - - // The number of nodes that are running the daemon pod, but are - // not supposed to run the daemon pod. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - optional int32 numberMisscheduled = 2; - - // The total number of nodes that should be running the daemon - // pod (including nodes correctly running the daemon pod). - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - optional int32 desiredNumberScheduled = 3; - - // The number of nodes that should be running the daemon pod and have one - // or more of the daemon pod running and ready. - optional int32 numberReady = 4; - - // The most recent generation observed by the daemon set controller. - // +optional - optional int64 observedGeneration = 5; - - // The total number of nodes that are running updated daemon pod - // +optional - optional int32 updatedNumberScheduled = 6; - - // The number of nodes that should be running the - // daemon pod and have one or more of the daemon pod running and - // available (ready for at least spec.minReadySeconds) - // +optional - optional int32 numberAvailable = 7; - - // The number of nodes that should be running the - // daemon pod and have none of the daemon pod running and available - // (ready for at least spec.minReadySeconds) - // +optional - optional int32 numberUnavailable = 8; - - // Count of hash collisions for the DaemonSet. The DaemonSet controller - // uses this field as a collision avoidance mechanism when it needs to - // create the name for the newest ControllerRevision. - // +optional - optional int32 collisionCount = 9; - - // Represents the latest available observations of a DaemonSet's current state. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - repeated DaemonSetCondition conditions = 10; -} - -// DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet. -message DaemonSetUpdateStrategy { - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate. - // +optional - optional string type = 1; - - // Rolling update config params. Present only if type = "RollingUpdate". - // --- - // TODO: Update this to follow our convention for oneOf, whatever we decide it - // to be. Same as Deployment `strategy.rollingUpdate`. - // See https://github.com/kubernetes/kubernetes/issues/35345 - // +optional - optional RollingUpdateDaemonSet rollingUpdate = 2; -} - -// Deployment enables declarative updates for Pods and ReplicaSets. -message Deployment { - // Standard object metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Specification of the desired behavior of the Deployment. - // +optional - optional DeploymentSpec spec = 2; - - // Most recently observed status of the Deployment. - // +optional - optional DeploymentStatus status = 3; -} - -// DeploymentCondition describes the state of a deployment at a certain point. -message DeploymentCondition { - // Type of deployment condition. - optional string type = 1; - - // Status of the condition, one of True, False, Unknown. - optional string status = 2; - - // The last time this condition was updated. - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6; - - // Last time the condition transitioned from one status to another. - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 7; - - // The reason for the condition's last transition. - optional string reason = 4; - - // A human readable message indicating details about the transition. - optional string message = 5; -} - -// DeploymentList is a list of Deployments. -message DeploymentList { - // Standard list metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is the list of Deployments. - repeated Deployment items = 2; -} - -// DeploymentSpec is the specification of the desired behavior of the Deployment. -message DeploymentSpec { - // Number of desired pods. This is a pointer to distinguish between explicit - // zero and not specified. Defaults to 1. - // +optional - optional int32 replicas = 1; - - // Label selector for pods. Existing ReplicaSets whose pods are - // selected by this will be the ones affected by this deployment. - // It must match the pod template's labels. - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; - - // Template describes the pods that will be created. - optional k8s.io.api.core.v1.PodTemplateSpec template = 3; - - // The deployment strategy to use to replace existing pods with new ones. - // +optional - optional DeploymentStrategy strategy = 4; - - // 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) - // +optional - optional int32 minReadySeconds = 5; - - // The number of old ReplicaSets to retain to allow rollback. - // This is a pointer to distinguish between explicit zero and not specified. - // Defaults to 10. - // +optional - optional int32 revisionHistoryLimit = 6; - - // Indicates that the deployment is paused. - // +optional - optional bool paused = 7; - - // 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. Defaults to 600s. - optional int32 progressDeadlineSeconds = 9; -} - -// DeploymentStatus is the most recently observed status of the Deployment. -message DeploymentStatus { - // The generation observed by the deployment controller. - // +optional - optional int64 observedGeneration = 1; - - // Total number of non-terminated pods targeted by this deployment (their labels match the selector). - // +optional - optional int32 replicas = 2; - - // Total number of non-terminated pods targeted by this deployment that have the desired template spec. - // +optional - optional int32 updatedReplicas = 3; - - // Total number of ready pods targeted by this deployment. - // +optional - optional int32 readyReplicas = 7; - - // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. - // +optional - optional int32 availableReplicas = 4; - - // Total number of unavailable pods targeted by this deployment. This is the total number of - // pods that are still required for the deployment to have 100% available capacity. They may - // either be pods that are running but not yet available or pods that still have not been created. - // +optional - optional int32 unavailableReplicas = 5; - - // Represents the latest available observations of a deployment's current state. - // +patchMergeKey=type - // +patchStrategy=merge - repeated DeploymentCondition conditions = 6; - - // 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. - // +optional - optional int32 collisionCount = 8; -} - -// DeploymentStrategy describes how to replace existing pods with new ones. -message DeploymentStrategy { - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - // +optional - optional string type = 1; - - // Rolling update config params. Present only if DeploymentStrategyType = - // RollingUpdate. - // --- - // TODO: Update this to follow our convention for oneOf, whatever we decide it - // to be. - // +optional - optional RollingUpdateDeployment rollingUpdate = 2; -} - -// ReplicaSet ensures that a specified number of pod replicas are running at any given time. -message ReplicaSet { - // If the Labels of a ReplicaSet are empty, they are defaulted to - // be the same as the Pod(s) that the ReplicaSet manages. - // 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 specification of the desired behavior of the ReplicaSet. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional ReplicaSetSpec spec = 2; - - // Status is the most recently observed status of the ReplicaSet. - // 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 - // +optional - optional ReplicaSetStatus status = 3; -} - -// ReplicaSetCondition describes the state of a replica set at a certain point. -message ReplicaSetCondition { - // Type of replica set condition. - optional string type = 1; - - // Status of the condition, one of True, False, Unknown. - optional string status = 2; - - // The last time the condition transitioned from one status to another. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // The reason for the condition's last transition. - // +optional - optional string reason = 4; - - // A human readable message indicating details about the transition. - // +optional - optional string message = 5; -} - -// ReplicaSetList is a collection of ReplicaSets. -message ReplicaSetList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of ReplicaSets. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - repeated ReplicaSet items = 2; -} - -// ReplicaSetSpec is the specification of a ReplicaSet. -message ReplicaSetSpec { - // 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 - // +optional - optional int32 replicas = 1; - - // 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) - // +optional - optional int32 minReadySeconds = 4; - - // Selector is a label query over pods that should match the replica count. - // Label keys and values that must match in order to be controlled by this replica set. - // It must match the pod template's labels. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; - - // Template is the object that describes the pod that will be created if - // insufficient replicas are detected. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template - // +optional - optional k8s.io.api.core.v1.PodTemplateSpec template = 3; -} - -// ReplicaSetStatus represents the current status of a ReplicaSet. -message ReplicaSetStatus { - // Replicas is the most recently oberved number of replicas. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller - optional int32 replicas = 1; - - // The number of pods that have labels matching the labels of the pod template of the replicaset. - // +optional - optional int32 fullyLabeledReplicas = 2; - - // The number of ready replicas for this replica set. - // +optional - optional int32 readyReplicas = 4; - - // The number of available replicas (ready for at least minReadySeconds) for this replica set. - // +optional - optional int32 availableReplicas = 5; - - // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. - // +optional - optional int64 observedGeneration = 3; - - // Represents the latest available observations of a replica set's current state. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - repeated ReplicaSetCondition conditions = 6; -} - -// Spec to control the desired behavior of daemon set rolling update. -message RollingUpdateDaemonSet { - // The maximum number of DaemonSet pods that can be unavailable during the - // update. Value can be an absolute number (ex: 5) or a percentage of total - // number of DaemonSet pods at the start of the update (ex: 10%). Absolute - // number is calculated from percentage by rounding up. - // This cannot be 0. - // Default value is 1. - // Example: when this is set to 30%, at most 30% of the total number of nodes - // that should be running the daemon pod (i.e. status.desiredNumberScheduled) - // can have their pods stopped for an update at any given - // time. The update starts by stopping at most 30% of those DaemonSet pods - // and then brings up new DaemonSet pods in their place. Once the new pods - // are available, it then proceeds onto other DaemonSet pods, thus ensuring - // that at least 70% of original number of DaemonSet pods are available at - // all times during the update. - // +optional - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1; -} - -// Spec to control the desired behavior of rolling update. -message RollingUpdateDeployment { - // 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. - // +optional - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1; - - // 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. - // +optional - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2; -} - -// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. -message RollingUpdateStatefulSetStrategy { - // Partition indicates the ordinal at which the StatefulSet should be - // partitioned. - // Default value is 0. - // +optional - optional int32 partition = 1; -} - -// StatefulSet represents a set of pods with consistent identities. -// Identities are defined as: -// - Network: A single stable DNS and hostname. -// - Storage: As many VolumeClaims as requested. -// The StatefulSet guarantees that a given network identity will always -// map to the same storage identity. -message StatefulSet { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Spec defines the desired identities of pods in this set. - // +optional - optional StatefulSetSpec spec = 2; - - // Status is the current status of Pods in this StatefulSet. This data - // may be out of date by some window of time. - // +optional - optional StatefulSetStatus status = 3; -} - -// StatefulSetCondition describes the state of a statefulset at a certain point. -message StatefulSetCondition { - // Type of statefulset condition. - optional string type = 1; - - // Status of the condition, one of True, False, Unknown. - optional string status = 2; - - // Last time the condition transitioned from one status to another. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // The reason for the condition's last transition. - // +optional - optional string reason = 4; - - // A human readable message indicating details about the transition. - // +optional - optional string message = 5; -} - -// StatefulSetList is a collection of StatefulSets. -message StatefulSetList { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - repeated StatefulSet items = 2; -} - -// A StatefulSetSpec is the specification of a StatefulSet. -message StatefulSetSpec { - // 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. - // TODO: Consider a rename of this field. - // +optional - optional int32 replicas = 1; - - // selector is a label query over pods that should match the replica count. - // It must match the pod template's labels. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; - - // 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. - optional k8s.io.api.core.v1.PodTemplateSpec template = 3; - - // 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. - // TODO: Define the behavior if a claim already exists with the same name. - // +optional - repeated k8s.io.api.core.v1.PersistentVolumeClaim volumeClaimTemplates = 4; - - // 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. - optional string serviceName = 5; - - // 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. - // +optional - optional string podManagementPolicy = 6; - - // updateStrategy indicates the StatefulSetUpdateStrategy that will be - // employed to update Pods in the StatefulSet when a revision is made to - // Template. - optional StatefulSetUpdateStrategy updateStrategy = 7; - - // 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. - optional int32 revisionHistoryLimit = 8; -} - -// StatefulSetStatus represents the current state of a StatefulSet. -message StatefulSetStatus { - // 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. - // +optional - optional int64 observedGeneration = 1; - - // replicas is the number of Pods created by the StatefulSet controller. - optional int32 replicas = 2; - - // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition. - optional int32 readyReplicas = 3; - - // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version - // indicated by currentRevision. - optional int32 currentReplicas = 4; - - // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version - // indicated by updateRevision. - optional int32 updatedReplicas = 5; - - // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the - // sequence [0,currentReplicas). - optional string currentRevision = 6; - - // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence - // [replicas-updatedReplicas,replicas) - optional string updateRevision = 7; - - // 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. - // +optional - optional int32 collisionCount = 9; - - // Represents the latest available observations of a statefulset's current state. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - repeated StatefulSetCondition conditions = 10; -} - -// 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. -message StatefulSetUpdateStrategy { - // Type indicates the type of the StatefulSetUpdateStrategy. - // Default is RollingUpdate. - // +optional - optional string type = 1; - - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - // +optional - optional RollingUpdateStatefulSetStrategy rollingUpdate = 2; -} - diff --git a/vendor/k8s.io/api/apps/v1beta1/generated.proto b/vendor/k8s.io/api/apps/v1beta1/generated.proto deleted file mode 100644 index ba6134d5..00000000 --- a/vendor/k8s.io/api/apps/v1beta1/generated.proto +++ /dev/null @@ -1,484 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "v1beta1"; - -// 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. -message ControllerRevision { - // 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; - - // Data is the serialized representation of the state. - optional k8s.io.apimachinery.pkg.runtime.RawExtension data = 2; - - // Revision indicates the revision of the state represented by Data. - optional int64 revision = 3; -} - -// ControllerRevisionList is a resource containing a list of ControllerRevision objects. -message ControllerRevisionList { - // 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 ControllerRevisions - repeated ControllerRevision items = 2; -} - -// DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for -// more information. -// Deployment enables declarative updates for Pods and ReplicaSets. -message Deployment { - // Standard object metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Specification of the desired behavior of the Deployment. - // +optional - optional DeploymentSpec spec = 2; - - // Most recently observed status of the Deployment. - // +optional - optional DeploymentStatus status = 3; -} - -// DeploymentCondition describes the state of a deployment at a certain point. -message DeploymentCondition { - // Type of deployment condition. - optional string type = 1; - - // Status of the condition, one of True, False, Unknown. - optional string status = 2; - - // The last time this condition was updated. - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6; - - // Last time the condition transitioned from one status to another. - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 7; - - // The reason for the condition's last transition. - optional string reason = 4; - - // A human readable message indicating details about the transition. - optional string message = 5; -} - -// DeploymentList is a list of Deployments. -message DeploymentList { - // Standard list metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is the list of Deployments. - repeated Deployment items = 2; -} - -// DEPRECATED. -// DeploymentRollback stores the information required to rollback a deployment. -message DeploymentRollback { - // Required: This must match the Name of a deployment. - optional string name = 1; - - // The annotations to be updated to a deployment - // +optional - map updatedAnnotations = 2; - - // The config of this deployment rollback. - optional RollbackConfig rollbackTo = 3; -} - -// DeploymentSpec is the specification of the desired behavior of the Deployment. -message DeploymentSpec { - // Number of desired pods. This is a pointer to distinguish between explicit - // zero and not specified. Defaults to 1. - // +optional - optional int32 replicas = 1; - - // Label selector for pods. Existing ReplicaSets whose pods are - // selected by this will be the ones affected by this deployment. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; - - // Template describes the pods that will be created. - optional k8s.io.api.core.v1.PodTemplateSpec template = 3; - - // The deployment strategy to use to replace existing pods with new ones. - // +optional - optional DeploymentStrategy strategy = 4; - - // 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) - // +optional - optional int32 minReadySeconds = 5; - - // 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. - // +optional - optional int32 revisionHistoryLimit = 6; - - // Indicates that the deployment is paused. - // +optional - optional bool paused = 7; - - // DEPRECATED. - // The config this deployment is rolling back to. Will be cleared after rollback is done. - // +optional - optional RollbackConfig rollbackTo = 8; - - // 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. Defaults to 600s. - // +optional - optional int32 progressDeadlineSeconds = 9; -} - -// DeploymentStatus is the most recently observed status of the Deployment. -message DeploymentStatus { - // The generation observed by the deployment controller. - // +optional - optional int64 observedGeneration = 1; - - // Total number of non-terminated pods targeted by this deployment (their labels match the selector). - // +optional - optional int32 replicas = 2; - - // Total number of non-terminated pods targeted by this deployment that have the desired template spec. - // +optional - optional int32 updatedReplicas = 3; - - // Total number of ready pods targeted by this deployment. - // +optional - optional int32 readyReplicas = 7; - - // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. - // +optional - optional int32 availableReplicas = 4; - - // Total number of unavailable pods targeted by this deployment. This is the total number of - // pods that are still required for the deployment to have 100% available capacity. They may - // either be pods that are running but not yet available or pods that still have not been created. - // +optional - optional int32 unavailableReplicas = 5; - - // Represents the latest available observations of a deployment's current state. - // +patchMergeKey=type - // +patchStrategy=merge - repeated DeploymentCondition conditions = 6; - - // 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. - // +optional - optional int32 collisionCount = 8; -} - -// DeploymentStrategy describes how to replace existing pods with new ones. -message DeploymentStrategy { - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - // +optional - optional string type = 1; - - // Rolling update config params. Present only if DeploymentStrategyType = - // RollingUpdate. - // --- - // TODO: Update this to follow our convention for oneOf, whatever we decide it - // to be. - // +optional - optional RollingUpdateDeployment rollingUpdate = 2; -} - -// DEPRECATED. -message RollbackConfig { - // The revision to rollback to. If set to 0, rollback to the last revision. - // +optional - optional int64 revision = 1; -} - -// Spec to control the desired behavior of rolling update. -message RollingUpdateDeployment { - // 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. - // +optional - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1; - - // 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. - // +optional - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2; -} - -// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. -message RollingUpdateStatefulSetStrategy { - // Partition indicates the ordinal at which the StatefulSet should be - // partitioned. - optional int32 partition = 1; -} - -// Scale represents a scaling request for a resource. -message Scale { - // Standard object 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; - - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - // +optional - optional ScaleSpec spec = 2; - - // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only. - // +optional - optional ScaleStatus status = 3; -} - -// ScaleSpec describes the attributes of a scale subresource -message ScaleSpec { - // desired number of instances for the scaled object. - // +optional - optional int32 replicas = 1; -} - -// ScaleStatus represents the current status of a scale subresource. -message ScaleStatus { - // actual number of observed instances of the scaled object. - optional int32 replicas = 1; - - // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors - // +optional - map selector = 2; - - // 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 - // +optional - optional string targetSelector = 3; -} - -// DEPRECATED - This group version of StatefulSet is deprecated by apps/v1beta2/StatefulSet. See the release notes for -// more information. -// StatefulSet represents a set of pods with consistent identities. -// Identities are defined as: -// - Network: A single stable DNS and hostname. -// - Storage: As many VolumeClaims as requested. -// The StatefulSet guarantees that a given network identity will always -// map to the same storage identity. -message StatefulSet { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Spec defines the desired identities of pods in this set. - // +optional - optional StatefulSetSpec spec = 2; - - // Status is the current status of Pods in this StatefulSet. This data - // may be out of date by some window of time. - // +optional - optional StatefulSetStatus status = 3; -} - -// StatefulSetCondition describes the state of a statefulset at a certain point. -message StatefulSetCondition { - // Type of statefulset condition. - optional string type = 1; - - // Status of the condition, one of True, False, Unknown. - optional string status = 2; - - // Last time the condition transitioned from one status to another. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // The reason for the condition's last transition. - // +optional - optional string reason = 4; - - // A human readable message indicating details about the transition. - // +optional - optional string message = 5; -} - -// StatefulSetList is a collection of StatefulSets. -message StatefulSetList { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - repeated StatefulSet items = 2; -} - -// A StatefulSetSpec is the specification of a StatefulSet. -message StatefulSetSpec { - // 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. - // TODO: Consider a rename of this field. - // +optional - optional int32 replicas = 1; - - // 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 - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; - - // 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. - optional k8s.io.api.core.v1.PodTemplateSpec template = 3; - - // 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. - // TODO: Define the behavior if a claim already exists with the same name. - // +optional - repeated k8s.io.api.core.v1.PersistentVolumeClaim volumeClaimTemplates = 4; - - // 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. - optional string serviceName = 5; - - // 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. - // +optional - optional string podManagementPolicy = 6; - - // updateStrategy indicates the StatefulSetUpdateStrategy that will be - // employed to update Pods in the StatefulSet when a revision is made to - // Template. - optional StatefulSetUpdateStrategy updateStrategy = 7; - - // 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. - optional int32 revisionHistoryLimit = 8; -} - -// StatefulSetStatus represents the current state of a StatefulSet. -message StatefulSetStatus { - // 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. - // +optional - optional int64 observedGeneration = 1; - - // replicas is the number of Pods created by the StatefulSet controller. - optional int32 replicas = 2; - - // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition. - optional int32 readyReplicas = 3; - - // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version - // indicated by currentRevision. - optional int32 currentReplicas = 4; - - // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version - // indicated by updateRevision. - optional int32 updatedReplicas = 5; - - // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the - // sequence [0,currentReplicas). - optional string currentRevision = 6; - - // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence - // [replicas-updatedReplicas,replicas) - optional string updateRevision = 7; - - // 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. - // +optional - optional int32 collisionCount = 9; - - // Represents the latest available observations of a statefulset's current state. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - repeated StatefulSetCondition conditions = 10; -} - -// 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. -message StatefulSetUpdateStrategy { - // Type indicates the type of the StatefulSetUpdateStrategy. - optional string type = 1; - - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - optional RollingUpdateStatefulSetStrategy rollingUpdate = 2; -} - diff --git a/vendor/k8s.io/api/apps/v1beta2/generated.proto b/vendor/k8s.io/api/apps/v1beta2/generated.proto deleted file mode 100644 index 7327c336..00000000 --- a/vendor/k8s.io/api/apps/v1beta2/generated.proto +++ /dev/null @@ -1,752 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "v1beta2"; - -// 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. -message ControllerRevision { - // 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; - - // Data is the serialized representation of the state. - optional k8s.io.apimachinery.pkg.runtime.RawExtension data = 2; - - // Revision indicates the revision of the state represented by Data. - optional int64 revision = 3; -} - -// ControllerRevisionList is a resource containing a list of ControllerRevision objects. -message ControllerRevisionList { - // 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 ControllerRevisions - repeated ControllerRevision items = 2; -} - -// DEPRECATED - This group version of DaemonSet is deprecated by apps/v1/DaemonSet. See the release notes for -// more information. -// DaemonSet represents the configuration of a daemon set. -message DaemonSet { - // 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 desired behavior of this daemon set. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional DaemonSetSpec spec = 2; - - // The current status of this daemon set. 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 - // +optional - optional DaemonSetStatus status = 3; -} - -// DaemonSetCondition describes the state of a DaemonSet at a certain point. -message DaemonSetCondition { - // Type of DaemonSet condition. - optional string type = 1; - - // Status of the condition, one of True, False, Unknown. - optional string status = 2; - - // Last time the condition transitioned from one status to another. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // The reason for the condition's last transition. - // +optional - optional string reason = 4; - - // A human readable message indicating details about the transition. - // +optional - optional string message = 5; -} - -// DaemonSetList is a collection of daemon sets. -message DaemonSetList { - // 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; - - // A list of daemon sets. - repeated DaemonSet items = 2; -} - -// DaemonSetSpec is the specification of a daemon set. -message DaemonSetSpec { - // A label query over pods that are managed by the daemon set. - // Must match in order to be controlled. - // It must match the pod template's labels. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1; - - // An object that describes the pod that will be created. - // The DaemonSet will create exactly one copy of this pod on every node - // that matches the template's node selector (or on every node if no node - // selector is specified). - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template - optional k8s.io.api.core.v1.PodTemplateSpec template = 2; - - // An update strategy to replace existing DaemonSet pods with new pods. - // +optional - optional DaemonSetUpdateStrategy updateStrategy = 3; - - // The minimum number of seconds for which a newly created DaemonSet 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). - // +optional - optional int32 minReadySeconds = 4; - - // The number of old history to retain to allow rollback. - // This is a pointer to distinguish between explicit zero and not specified. - // Defaults to 10. - // +optional - optional int32 revisionHistoryLimit = 6; -} - -// DaemonSetStatus represents the current status of a daemon set. -message DaemonSetStatus { - // The number of nodes that are running at least 1 - // daemon pod and are supposed to run the daemon pod. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - optional int32 currentNumberScheduled = 1; - - // The number of nodes that are running the daemon pod, but are - // not supposed to run the daemon pod. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - optional int32 numberMisscheduled = 2; - - // The total number of nodes that should be running the daemon - // pod (including nodes correctly running the daemon pod). - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - optional int32 desiredNumberScheduled = 3; - - // The number of nodes that should be running the daemon pod and have one - // or more of the daemon pod running and ready. - optional int32 numberReady = 4; - - // The most recent generation observed by the daemon set controller. - // +optional - optional int64 observedGeneration = 5; - - // The total number of nodes that are running updated daemon pod - // +optional - optional int32 updatedNumberScheduled = 6; - - // The number of nodes that should be running the - // daemon pod and have one or more of the daemon pod running and - // available (ready for at least spec.minReadySeconds) - // +optional - optional int32 numberAvailable = 7; - - // The number of nodes that should be running the - // daemon pod and have none of the daemon pod running and available - // (ready for at least spec.minReadySeconds) - // +optional - optional int32 numberUnavailable = 8; - - // Count of hash collisions for the DaemonSet. The DaemonSet controller - // uses this field as a collision avoidance mechanism when it needs to - // create the name for the newest ControllerRevision. - // +optional - optional int32 collisionCount = 9; - - // Represents the latest available observations of a DaemonSet's current state. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - repeated DaemonSetCondition conditions = 10; -} - -// DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet. -message DaemonSetUpdateStrategy { - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate. - // +optional - optional string type = 1; - - // Rolling update config params. Present only if type = "RollingUpdate". - // --- - // TODO: Update this to follow our convention for oneOf, whatever we decide it - // to be. Same as Deployment `strategy.rollingUpdate`. - // See https://github.com/kubernetes/kubernetes/issues/35345 - // +optional - optional RollingUpdateDaemonSet rollingUpdate = 2; -} - -// DEPRECATED - This group version of Deployment is deprecated by apps/v1/Deployment. See the release notes for -// more information. -// Deployment enables declarative updates for Pods and ReplicaSets. -message Deployment { - // Standard object metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Specification of the desired behavior of the Deployment. - // +optional - optional DeploymentSpec spec = 2; - - // Most recently observed status of the Deployment. - // +optional - optional DeploymentStatus status = 3; -} - -// DeploymentCondition describes the state of a deployment at a certain point. -message DeploymentCondition { - // Type of deployment condition. - optional string type = 1; - - // Status of the condition, one of True, False, Unknown. - optional string status = 2; - - // The last time this condition was updated. - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6; - - // Last time the condition transitioned from one status to another. - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 7; - - // The reason for the condition's last transition. - optional string reason = 4; - - // A human readable message indicating details about the transition. - optional string message = 5; -} - -// DeploymentList is a list of Deployments. -message DeploymentList { - // Standard list metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is the list of Deployments. - repeated Deployment items = 2; -} - -// DeploymentSpec is the specification of the desired behavior of the Deployment. -message DeploymentSpec { - // Number of desired pods. This is a pointer to distinguish between explicit - // zero and not specified. Defaults to 1. - // +optional - optional int32 replicas = 1; - - // Label selector for pods. Existing ReplicaSets whose pods are - // selected by this will be the ones affected by this deployment. - // It must match the pod template's labels. - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; - - // Template describes the pods that will be created. - optional k8s.io.api.core.v1.PodTemplateSpec template = 3; - - // The deployment strategy to use to replace existing pods with new ones. - // +optional - optional DeploymentStrategy strategy = 4; - - // 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) - // +optional - optional int32 minReadySeconds = 5; - - // The number of old ReplicaSets to retain to allow rollback. - // This is a pointer to distinguish between explicit zero and not specified. - // Defaults to 10. - // +optional - optional int32 revisionHistoryLimit = 6; - - // Indicates that the deployment is paused. - // +optional - optional bool paused = 7; - - // 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. Defaults to 600s. - optional int32 progressDeadlineSeconds = 9; -} - -// DeploymentStatus is the most recently observed status of the Deployment. -message DeploymentStatus { - // The generation observed by the deployment controller. - // +optional - optional int64 observedGeneration = 1; - - // Total number of non-terminated pods targeted by this deployment (their labels match the selector). - // +optional - optional int32 replicas = 2; - - // Total number of non-terminated pods targeted by this deployment that have the desired template spec. - // +optional - optional int32 updatedReplicas = 3; - - // Total number of ready pods targeted by this deployment. - // +optional - optional int32 readyReplicas = 7; - - // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. - // +optional - optional int32 availableReplicas = 4; - - // Total number of unavailable pods targeted by this deployment. This is the total number of - // pods that are still required for the deployment to have 100% available capacity. They may - // either be pods that are running but not yet available or pods that still have not been created. - // +optional - optional int32 unavailableReplicas = 5; - - // Represents the latest available observations of a deployment's current state. - // +patchMergeKey=type - // +patchStrategy=merge - repeated DeploymentCondition conditions = 6; - - // 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. - // +optional - optional int32 collisionCount = 8; -} - -// DeploymentStrategy describes how to replace existing pods with new ones. -message DeploymentStrategy { - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - // +optional - optional string type = 1; - - // Rolling update config params. Present only if DeploymentStrategyType = - // RollingUpdate. - // --- - // TODO: Update this to follow our convention for oneOf, whatever we decide it - // to be. - // +optional - optional RollingUpdateDeployment rollingUpdate = 2; -} - -// DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1/ReplicaSet. See the release notes for -// more information. -// ReplicaSet ensures that a specified number of pod replicas are running at any given time. -message ReplicaSet { - // If the Labels of a ReplicaSet are empty, they are defaulted to - // be the same as the Pod(s) that the ReplicaSet manages. - // 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 specification of the desired behavior of the ReplicaSet. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional ReplicaSetSpec spec = 2; - - // Status is the most recently observed status of the ReplicaSet. - // 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 - // +optional - optional ReplicaSetStatus status = 3; -} - -// ReplicaSetCondition describes the state of a replica set at a certain point. -message ReplicaSetCondition { - // Type of replica set condition. - optional string type = 1; - - // Status of the condition, one of True, False, Unknown. - optional string status = 2; - - // The last time the condition transitioned from one status to another. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // The reason for the condition's last transition. - // +optional - optional string reason = 4; - - // A human readable message indicating details about the transition. - // +optional - optional string message = 5; -} - -// ReplicaSetList is a collection of ReplicaSets. -message ReplicaSetList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of ReplicaSets. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - repeated ReplicaSet items = 2; -} - -// ReplicaSetSpec is the specification of a ReplicaSet. -message ReplicaSetSpec { - // 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 - // +optional - optional int32 replicas = 1; - - // 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) - // +optional - optional int32 minReadySeconds = 4; - - // Selector is a label query over pods that should match the replica count. - // Label keys and values that must match in order to be controlled by this replica set. - // It must match the pod template's labels. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; - - // Template is the object that describes the pod that will be created if - // insufficient replicas are detected. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template - // +optional - optional k8s.io.api.core.v1.PodTemplateSpec template = 3; -} - -// ReplicaSetStatus represents the current status of a ReplicaSet. -message ReplicaSetStatus { - // Replicas is the most recently oberved number of replicas. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller - optional int32 replicas = 1; - - // The number of pods that have labels matching the labels of the pod template of the replicaset. - // +optional - optional int32 fullyLabeledReplicas = 2; - - // The number of ready replicas for this replica set. - // +optional - optional int32 readyReplicas = 4; - - // The number of available replicas (ready for at least minReadySeconds) for this replica set. - // +optional - optional int32 availableReplicas = 5; - - // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. - // +optional - optional int64 observedGeneration = 3; - - // Represents the latest available observations of a replica set's current state. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - repeated ReplicaSetCondition conditions = 6; -} - -// Spec to control the desired behavior of daemon set rolling update. -message RollingUpdateDaemonSet { - // The maximum number of DaemonSet pods that can be unavailable during the - // update. Value can be an absolute number (ex: 5) or a percentage of total - // number of DaemonSet pods at the start of the update (ex: 10%). Absolute - // number is calculated from percentage by rounding up. - // This cannot be 0. - // Default value is 1. - // Example: when this is set to 30%, at most 30% of the total number of nodes - // that should be running the daemon pod (i.e. status.desiredNumberScheduled) - // can have their pods stopped for an update at any given - // time. The update starts by stopping at most 30% of those DaemonSet pods - // and then brings up new DaemonSet pods in their place. Once the new pods - // are available, it then proceeds onto other DaemonSet pods, thus ensuring - // that at least 70% of original number of DaemonSet pods are available at - // all times during the update. - // +optional - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1; -} - -// Spec to control the desired behavior of rolling update. -message RollingUpdateDeployment { - // 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. - // +optional - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1; - - // 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. - // +optional - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2; -} - -// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. -message RollingUpdateStatefulSetStrategy { - // Partition indicates the ordinal at which the StatefulSet should be - // partitioned. - // Default value is 0. - // +optional - optional int32 partition = 1; -} - -// Scale represents a scaling request for a resource. -message Scale { - // Standard object 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; - - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - // +optional - optional ScaleSpec spec = 2; - - // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only. - // +optional - optional ScaleStatus status = 3; -} - -// ScaleSpec describes the attributes of a scale subresource -message ScaleSpec { - // desired number of instances for the scaled object. - // +optional - optional int32 replicas = 1; -} - -// ScaleStatus represents the current status of a scale subresource. -message ScaleStatus { - // actual number of observed instances of the scaled object. - optional int32 replicas = 1; - - // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors - // +optional - map selector = 2; - - // 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 - // +optional - optional string targetSelector = 3; -} - -// DEPRECATED - This group version of StatefulSet is deprecated by apps/v1/StatefulSet. See the release notes for -// more information. -// StatefulSet represents a set of pods with consistent identities. -// Identities are defined as: -// - Network: A single stable DNS and hostname. -// - Storage: As many VolumeClaims as requested. -// The StatefulSet guarantees that a given network identity will always -// map to the same storage identity. -message StatefulSet { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Spec defines the desired identities of pods in this set. - // +optional - optional StatefulSetSpec spec = 2; - - // Status is the current status of Pods in this StatefulSet. This data - // may be out of date by some window of time. - // +optional - optional StatefulSetStatus status = 3; -} - -// StatefulSetCondition describes the state of a statefulset at a certain point. -message StatefulSetCondition { - // Type of statefulset condition. - optional string type = 1; - - // Status of the condition, one of True, False, Unknown. - optional string status = 2; - - // Last time the condition transitioned from one status to another. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // The reason for the condition's last transition. - // +optional - optional string reason = 4; - - // A human readable message indicating details about the transition. - // +optional - optional string message = 5; -} - -// StatefulSetList is a collection of StatefulSets. -message StatefulSetList { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - repeated StatefulSet items = 2; -} - -// A StatefulSetSpec is the specification of a StatefulSet. -message StatefulSetSpec { - // 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. - // TODO: Consider a rename of this field. - // +optional - optional int32 replicas = 1; - - // selector is a label query over pods that should match the replica count. - // It must match the pod template's labels. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; - - // 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. - optional k8s.io.api.core.v1.PodTemplateSpec template = 3; - - // 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. - // TODO: Define the behavior if a claim already exists with the same name. - // +optional - repeated k8s.io.api.core.v1.PersistentVolumeClaim volumeClaimTemplates = 4; - - // 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. - optional string serviceName = 5; - - // 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. - // +optional - optional string podManagementPolicy = 6; - - // updateStrategy indicates the StatefulSetUpdateStrategy that will be - // employed to update Pods in the StatefulSet when a revision is made to - // Template. - optional StatefulSetUpdateStrategy updateStrategy = 7; - - // 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. - optional int32 revisionHistoryLimit = 8; -} - -// StatefulSetStatus represents the current state of a StatefulSet. -message StatefulSetStatus { - // 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. - // +optional - optional int64 observedGeneration = 1; - - // replicas is the number of Pods created by the StatefulSet controller. - optional int32 replicas = 2; - - // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition. - optional int32 readyReplicas = 3; - - // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version - // indicated by currentRevision. - optional int32 currentReplicas = 4; - - // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version - // indicated by updateRevision. - optional int32 updatedReplicas = 5; - - // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the - // sequence [0,currentReplicas). - optional string currentRevision = 6; - - // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence - // [replicas-updatedReplicas,replicas) - optional string updateRevision = 7; - - // 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. - // +optional - optional int32 collisionCount = 9; - - // Represents the latest available observations of a statefulset's current state. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - repeated StatefulSetCondition conditions = 10; -} - -// 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. -message StatefulSetUpdateStrategy { - // Type indicates the type of the StatefulSetUpdateStrategy. - // Default is RollingUpdate. - // +optional - optional string type = 1; - - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - // +optional - optional RollingUpdateStatefulSetStrategy rollingUpdate = 2; -} - diff --git a/vendor/k8s.io/api/authentication/OWNERS b/vendor/k8s.io/api/authentication/OWNERS deleted file mode 100755 index 2bdfd0ce..00000000 --- a/vendor/k8s.io/api/authentication/OWNERS +++ /dev/null @@ -1,9 +0,0 @@ -reviewers: -- liggitt -- lavalamp -- wojtek-t -- deads2k -- sttts -- mbohlool -- jianhuiz -- enj diff --git a/vendor/k8s.io/api/authentication/v1/generated.proto b/vendor/k8s.io/api/authentication/v1/generated.proto deleted file mode 100644 index d20887f8..00000000 --- a/vendor/k8s.io/api/authentication/v1/generated.proto +++ /dev/null @@ -1,160 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; - -// BoundObjectReference is a reference to an object that a token is bound to. -message BoundObjectReference { - // Kind of the referent. Valid kinds are 'Pod' and 'Secret'. - // +optional - optional string kind = 1; - - // API version of the referent. - // +optional - optional string aPIVersion = 2; - - // Name of the referent. - // +optional - optional string name = 3; - - // UID of the referent. - // +optional - optional string uID = 4; -} - -// ExtraValue masks the value so protobuf can generate -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -message ExtraValue { - // items, if empty, will result in an empty slice - - repeated string items = 1; -} - -// TokenRequest requests a token for a given service account. -message TokenRequest { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - optional TokenRequestSpec spec = 2; - - // +optional - optional TokenRequestStatus status = 3; -} - -// TokenRequestSpec contains client provided parameters of a token request. -message TokenRequestSpec { - // Audiences are the intendend audiences of the token. A recipient of a - // token must identitfy themself with an identifier in the list of - // audiences of the token, and otherwise should reject the token. A - // token issued for multiple audiences may be used to authenticate - // against any of the audiences listed but implies a high degree of - // trust between the target audiences. - repeated string audiences = 1; - - // ExpirationSeconds is the requested duration of validity of the request. The - // token issuer may return a token with a different validity duration so a - // client needs to check the 'expiration' field in a response. - // +optional - optional int64 expirationSeconds = 4; - - // BoundObjectRef is a reference to an object that the token will be bound to. - // The token will only be valid for as long as the bound objet exists. - // +optional - optional BoundObjectReference boundObjectRef = 3; -} - -// TokenRequestStatus is the result of a token request. -message TokenRequestStatus { - // Token is the opaque bearer token. - optional string token = 1; - - // ExpirationTimestamp is the time of expiration of the returned token. - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time expirationTimestamp = 2; -} - -// 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. -message TokenReview { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Spec holds information about the request being evaluated - optional TokenReviewSpec spec = 2; - - // Status is filled in by the server and indicates whether the request can be authenticated. - // +optional - optional TokenReviewStatus status = 3; -} - -// TokenReviewSpec is a description of the token authentication request. -message TokenReviewSpec { - // Token is the opaque bearer token. - // +optional - optional string token = 1; -} - -// TokenReviewStatus is the result of the token authentication request. -message TokenReviewStatus { - // Authenticated indicates that the token was associated with a known user. - // +optional - optional bool authenticated = 1; - - // User is the UserInfo associated with the provided token. - // +optional - optional UserInfo user = 2; - - // Error indicates that the token couldn't be checked - // +optional - optional string error = 3; -} - -// UserInfo holds the information about the user needed to implement the -// user.Info interface. -message UserInfo { - // The name that uniquely identifies this user among all active users. - // +optional - optional string username = 1; - - // A unique value that identifies this user across time. If this user is - // deleted and another user by the same name is added, they will have - // different UIDs. - // +optional - optional string uid = 2; - - // The names of groups this user is a part of. - // +optional - repeated string groups = 3; - - // Any additional information provided by the authenticator. - // +optional - map extra = 4; -} - diff --git a/vendor/k8s.io/api/authentication/v1beta1/generated.proto b/vendor/k8s.io/api/authentication/v1beta1/generated.proto deleted file mode 100644 index 4fb6448f..00000000 --- a/vendor/k8s.io/api/authentication/v1beta1/generated.proto +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; - -// ExtraValue masks the value so protobuf can generate -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -message ExtraValue { - // items, if empty, will result in an empty slice - - repeated string items = 1; -} - -// 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. -message TokenReview { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Spec holds information about the request being evaluated - optional TokenReviewSpec spec = 2; - - // Status is filled in by the server and indicates whether the request can be authenticated. - // +optional - optional TokenReviewStatus status = 3; -} - -// TokenReviewSpec is a description of the token authentication request. -message TokenReviewSpec { - // Token is the opaque bearer token. - // +optional - optional string token = 1; -} - -// TokenReviewStatus is the result of the token authentication request. -message TokenReviewStatus { - // Authenticated indicates that the token was associated with a known user. - // +optional - optional bool authenticated = 1; - - // User is the UserInfo associated with the provided token. - // +optional - optional UserInfo user = 2; - - // Error indicates that the token couldn't be checked - // +optional - optional string error = 3; -} - -// UserInfo holds the information about the user needed to implement the -// user.Info interface. -message UserInfo { - // The name that uniquely identifies this user among all active users. - // +optional - optional string username = 1; - - // A unique value that identifies this user across time. If this user is - // deleted and another user by the same name is added, they will have - // different UIDs. - // +optional - optional string uid = 2; - - // The names of groups this user is a part of. - // +optional - repeated string groups = 3; - - // Any additional information provided by the authenticator. - // +optional - map extra = 4; -} - diff --git a/vendor/k8s.io/api/authorization/OWNERS b/vendor/k8s.io/api/authorization/OWNERS deleted file mode 100755 index c1613fc2..00000000 --- a/vendor/k8s.io/api/authorization/OWNERS +++ /dev/null @@ -1,17 +0,0 @@ -reviewers: -- thockin -- lavalamp -- smarterclayton -- wojtek-t -- deads2k -- liggitt -- nikhiljindal -- erictune -- sttts -- ncdc -- dims -- mml -- mbohlool -- david-mcmahon -- jianhuiz -- enj diff --git a/vendor/k8s.io/api/authorization/v1/generated.proto b/vendor/k8s.io/api/authorization/v1/generated.proto deleted file mode 100644 index d87b03db..00000000 --- a/vendor/k8s.io/api/authorization/v1/generated.proto +++ /dev/null @@ -1,273 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; - -// ExtraValue masks the value so protobuf can generate -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -message ExtraValue { - // items, if empty, will result in an empty slice - - repeated string items = 1; -} - -// 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. -message LocalSubjectAccessReview { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // 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. - optional SubjectAccessReviewSpec spec = 2; - - // Status is filled in by the server and indicates whether the request is allowed or not - // +optional - optional SubjectAccessReviewStatus status = 3; -} - -// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface -message NonResourceAttributes { - // Path is the URL path of the request - // +optional - optional string path = 1; - - // Verb is the standard HTTP verb - // +optional - optional string verb = 2; -} - -// NonResourceRule holds information that describes a rule for the non-resource -message NonResourceRule { - // Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all. - repeated string verbs = 1; - - // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, - // final step in the path. "*" means all. - // +optional - repeated string nonResourceURLs = 2; -} - -// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface -message ResourceAttributes { - // 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 - // +optional - optional string namespace = 1; - - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - // +optional - optional string verb = 2; - - // Group is the API Group of the Resource. "*" means all. - // +optional - optional string group = 3; - - // Version is the API Version of the Resource. "*" means all. - // +optional - optional string version = 4; - - // Resource is one of the existing resource types. "*" means all. - // +optional - optional string resource = 5; - - // Subresource is one of the existing resource types. "" means none. - // +optional - optional string subresource = 6; - - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - // +optional - optional string name = 7; -} - -// ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, -// may contain duplicates, and possibly be incomplete. -message ResourceRule { - // Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all. - repeated string verbs = 1; - - // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of - // the enumerated resources in any API group will be allowed. "*" means all. - // +optional - repeated string apiGroups = 2; - - // Resources is a list of resources this rule applies to. "*" means all in the specified apiGroups. - // "*/foo" represents the subresource 'foo' for all resources in the specified apiGroups. - // +optional - repeated string resources = 3; - - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all. - // +optional - repeated string resourceNames = 4; -} - -// 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 -message SelfSubjectAccessReview { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Spec holds information about the request being evaluated. user and groups must be empty - optional SelfSubjectAccessReviewSpec spec = 2; - - // Status is filled in by the server and indicates whether the request is allowed or not - // +optional - optional SubjectAccessReviewStatus status = 3; -} - -// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes -// and NonResourceAuthorizationAttributes must be set -message SelfSubjectAccessReviewSpec { - // ResourceAuthorizationAttributes describes information for a resource access request - // +optional - optional ResourceAttributes resourceAttributes = 1; - - // NonResourceAttributes describes information for a non-resource access request - // +optional - optional NonResourceAttributes nonResourceAttributes = 2; -} - -// SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. -// The returned list of actions may be incomplete depending on the server's authorization mode, -// and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, -// or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to -// drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. -// SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server. -message SelfSubjectRulesReview { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Spec holds information about the request being evaluated. - optional SelfSubjectRulesReviewSpec spec = 2; - - // Status is filled in by the server and indicates the set of actions a user can perform. - // +optional - optional SubjectRulesReviewStatus status = 3; -} - -message SelfSubjectRulesReviewSpec { - // Namespace to evaluate rules for. Required. - optional string namespace = 1; -} - -// SubjectAccessReview checks whether or not a user or group can perform an action. -message SubjectAccessReview { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Spec holds information about the request being evaluated - optional SubjectAccessReviewSpec spec = 2; - - // Status is filled in by the server and indicates whether the request is allowed or not - // +optional - optional SubjectAccessReviewStatus status = 3; -} - -// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes -// and NonResourceAuthorizationAttributes must be set -message SubjectAccessReviewSpec { - // ResourceAuthorizationAttributes describes information for a resource access request - // +optional - optional ResourceAttributes resourceAttributes = 1; - - // NonResourceAttributes describes information for a non-resource access request - // +optional - optional NonResourceAttributes nonResourceAttributes = 2; - - // 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 - // +optional - optional string user = 3; - - // Groups is the groups you're testing for. - // +optional - repeated string groups = 4; - - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer - // it needs a reflection here. - // +optional - map extra = 5; - - // UID information about the requesting user. - // +optional - optional string uid = 6; -} - -// SubjectAccessReviewStatus -message SubjectAccessReviewStatus { - // Allowed is required. True if the action would be allowed, false otherwise. - optional bool allowed = 1; - - // Denied is optional. True if the action would be denied, otherwise - // false. If both allowed is false and denied is false, then the - // authorizer has no opinion on whether to authorize the action. Denied - // may not be true if Allowed is true. - // +optional - optional bool denied = 4; - - // Reason is optional. It indicates why a request was allowed or denied. - // +optional - optional string reason = 2; - - // 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. - // +optional - optional string evaluationError = 3; -} - -// SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on -// the set of authorizers the server is configured with and any errors experienced during evaluation. -// Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, -// even if that list is incomplete. -message SubjectRulesReviewStatus { - // ResourceRules is the list of actions the subject is allowed to perform on resources. - // The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - repeated ResourceRule resourceRules = 1; - - // NonResourceRules is the list of actions the subject is allowed to perform on non-resources. - // The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - repeated NonResourceRule nonResourceRules = 2; - - // Incomplete is true when the rules returned by this call are incomplete. This is most commonly - // encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation. - optional bool incomplete = 3; - - // EvaluationError can appear in combination with Rules. It indicates an error occurred during - // rule evaluation, such as an authorizer that doesn't support rule evaluation, and that - // ResourceRules and/or NonResourceRules may be incomplete. - // +optional - optional string evaluationError = 4; -} - diff --git a/vendor/k8s.io/api/authorization/v1beta1/generated.proto b/vendor/k8s.io/api/authorization/v1beta1/generated.proto deleted file mode 100644 index 98656fba..00000000 --- a/vendor/k8s.io/api/authorization/v1beta1/generated.proto +++ /dev/null @@ -1,273 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; - -// ExtraValue masks the value so protobuf can generate -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -message ExtraValue { - // items, if empty, will result in an empty slice - - repeated string items = 1; -} - -// 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. -message LocalSubjectAccessReview { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // 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. - optional SubjectAccessReviewSpec spec = 2; - - // Status is filled in by the server and indicates whether the request is allowed or not - // +optional - optional SubjectAccessReviewStatus status = 3; -} - -// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface -message NonResourceAttributes { - // Path is the URL path of the request - // +optional - optional string path = 1; - - // Verb is the standard HTTP verb - // +optional - optional string verb = 2; -} - -// NonResourceRule holds information that describes a rule for the non-resource -message NonResourceRule { - // Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all. - repeated string verbs = 1; - - // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, - // final step in the path. "*" means all. - // +optional - repeated string nonResourceURLs = 2; -} - -// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface -message ResourceAttributes { - // 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 - // +optional - optional string namespace = 1; - - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - // +optional - optional string verb = 2; - - // Group is the API Group of the Resource. "*" means all. - // +optional - optional string group = 3; - - // Version is the API Version of the Resource. "*" means all. - // +optional - optional string version = 4; - - // Resource is one of the existing resource types. "*" means all. - // +optional - optional string resource = 5; - - // Subresource is one of the existing resource types. "" means none. - // +optional - optional string subresource = 6; - - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - // +optional - optional string name = 7; -} - -// ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, -// may contain duplicates, and possibly be incomplete. -message ResourceRule { - // Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all. - repeated string verbs = 1; - - // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of - // the enumerated resources in any API group will be allowed. "*" means all. - // +optional - repeated string apiGroups = 2; - - // Resources is a list of resources this rule applies to. "*" means all in the specified apiGroups. - // "*/foo" represents the subresource 'foo' for all resources in the specified apiGroups. - // +optional - repeated string resources = 3; - - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all. - // +optional - repeated string resourceNames = 4; -} - -// 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 -message SelfSubjectAccessReview { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Spec holds information about the request being evaluated. user and groups must be empty - optional SelfSubjectAccessReviewSpec spec = 2; - - // Status is filled in by the server and indicates whether the request is allowed or not - // +optional - optional SubjectAccessReviewStatus status = 3; -} - -// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes -// and NonResourceAuthorizationAttributes must be set -message SelfSubjectAccessReviewSpec { - // ResourceAuthorizationAttributes describes information for a resource access request - // +optional - optional ResourceAttributes resourceAttributes = 1; - - // NonResourceAttributes describes information for a non-resource access request - // +optional - optional NonResourceAttributes nonResourceAttributes = 2; -} - -// SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. -// The returned list of actions may be incomplete depending on the server's authorization mode, -// and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, -// or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to -// drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. -// SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server. -message SelfSubjectRulesReview { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Spec holds information about the request being evaluated. - optional SelfSubjectRulesReviewSpec spec = 2; - - // Status is filled in by the server and indicates the set of actions a user can perform. - // +optional - optional SubjectRulesReviewStatus status = 3; -} - -message SelfSubjectRulesReviewSpec { - // Namespace to evaluate rules for. Required. - optional string namespace = 1; -} - -// SubjectAccessReview checks whether or not a user or group can perform an action. -message SubjectAccessReview { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Spec holds information about the request being evaluated - optional SubjectAccessReviewSpec spec = 2; - - // Status is filled in by the server and indicates whether the request is allowed or not - // +optional - optional SubjectAccessReviewStatus status = 3; -} - -// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes -// and NonResourceAuthorizationAttributes must be set -message SubjectAccessReviewSpec { - // ResourceAuthorizationAttributes describes information for a resource access request - // +optional - optional ResourceAttributes resourceAttributes = 1; - - // NonResourceAttributes describes information for a non-resource access request - // +optional - optional NonResourceAttributes nonResourceAttributes = 2; - - // 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 - // +optional - optional string user = 3; - - // Groups is the groups you're testing for. - // +optional - repeated string group = 4; - - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer - // it needs a reflection here. - // +optional - map extra = 5; - - // UID information about the requesting user. - // +optional - optional string uid = 6; -} - -// SubjectAccessReviewStatus -message SubjectAccessReviewStatus { - // Allowed is required. True if the action would be allowed, false otherwise. - optional bool allowed = 1; - - // Denied is optional. True if the action would be denied, otherwise - // false. If both allowed is false and denied is false, then the - // authorizer has no opinion on whether to authorize the action. Denied - // may not be true if Allowed is true. - // +optional - optional bool denied = 4; - - // Reason is optional. It indicates why a request was allowed or denied. - // +optional - optional string reason = 2; - - // 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. - // +optional - optional string evaluationError = 3; -} - -// SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on -// the set of authorizers the server is configured with and any errors experienced during evaluation. -// Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, -// even if that list is incomplete. -message SubjectRulesReviewStatus { - // ResourceRules is the list of actions the subject is allowed to perform on resources. - // The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - repeated ResourceRule resourceRules = 1; - - // NonResourceRules is the list of actions the subject is allowed to perform on non-resources. - // The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - repeated NonResourceRule nonResourceRules = 2; - - // Incomplete is true when the rules returned by this call are incomplete. This is most commonly - // encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation. - optional bool incomplete = 3; - - // EvaluationError can appear in combination with Rules. It indicates an error occurred during - // rule evaluation, such as an authorizer that doesn't support rule evaluation, and that - // ResourceRules and/or NonResourceRules may be incomplete. - // +optional - optional string evaluationError = 4; -} - diff --git a/vendor/k8s.io/api/autoscaling/OWNERS b/vendor/k8s.io/api/autoscaling/OWNERS deleted file mode 100755 index 4a495ec2..00000000 --- a/vendor/k8s.io/api/autoscaling/OWNERS +++ /dev/null @@ -1,19 +0,0 @@ -reviewers: -- thockin -- lavalamp -- smarterclayton -- wojtek-t -- deads2k -- caesarxuchao -- erictune -- sttts -- ncdc -- piosz -- dims -- errordeveloper -- madhusudancs -- mml -- mbohlool -- david-mcmahon -- jianhuiz -- directxman12 diff --git a/vendor/k8s.io/api/autoscaling/v1/generated.proto b/vendor/k8s.io/api/autoscaling/v1/generated.proto deleted file mode 100644 index 2ff7f9e2..00000000 --- a/vendor/k8s.io/api/autoscaling/v1/generated.proto +++ /dev/null @@ -1,382 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.autoscaling.v1; - -import "k8s.io/api/core/v1/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"; -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"; - -// CrossVersionObjectReference contains enough information to let you identify the referred resource. -message CrossVersionObjectReference { - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - optional string kind = 1; - - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - optional string name = 2; - - // API version of the referent - // +optional - 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 - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - // +optional - optional HorizontalPodAutoscalerSpec spec = 2; - - // current information about the autoscaler. - // +optional - optional HorizontalPodAutoscalerStatus status = 3; -} - -// HorizontalPodAutoscalerCondition describes the state of -// a HorizontalPodAutoscaler at a certain point. -message HorizontalPodAutoscalerCondition { - // type describes the current condition - optional string type = 1; - - // status is the status of the condition (True, False, Unknown) - optional string status = 2; - - // lastTransitionTime is the last time the condition transitioned from - // one status to another - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // reason is the reason for the condition's last transition. - // +optional - optional string reason = 4; - - // message is a human-readable explanation containing details about - // the transition - // +optional - optional string message = 5; -} - -// list of horizontal pod autoscaler objects. -message HorizontalPodAutoscalerList { - // Standard list metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // list of horizontal pod autoscaler objects. - repeated HorizontalPodAutoscaler items = 2; -} - -// specification of a horizontal pod autoscaler. -message HorizontalPodAutoscalerSpec { - // reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption - // and will set the desired number of pods by using its Scale subresource. - optional CrossVersionObjectReference scaleTargetRef = 1; - - // lower limit for the number of pods that can be set by the autoscaler, default 1. - // +optional - optional int32 minReplicas = 2; - - // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas. - optional int32 maxReplicas = 3; - - // target average CPU utilization (represented as a percentage of requested CPU) over all the pods; - // if not specified the default autoscaling policy will be used. - // +optional - optional int32 targetCPUUtilizationPercentage = 4; -} - -// current status of a horizontal pod autoscaler -message HorizontalPodAutoscalerStatus { - // most recent generation observed by this autoscaler. - // +optional - optional int64 observedGeneration = 1; - - // last time the HorizontalPodAutoscaler scaled the number of pods; - // used by the autoscaler to control how often the number of pods is changed. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2; - - // current number of replicas of pods managed by this autoscaler. - optional int32 currentReplicas = 3; - - // desired number of replicas of pods managed by this autoscaler. - optional int32 desiredReplicas = 4; - - // current average CPU utilization over all pods, represented as a percentage of requested CPU, - // e.g. 70 means that an average pod is using now 70% of its requested CPU. - // +optional - optional int32 currentCPUUtilizationPercentage = 5; -} - -// MetricSpec specifies how to scale based on a single metric -// (only `type` and one other matching field should be set at once). -message MetricSpec { - // type is the type of metric source. It should be one of "Object", - // "Pods" or "Resource", each mapping to a matching field in the object. - optional string type = 1; - - // object refers to a metric describing a single kubernetes object - // (for example, hits-per-second on an Ingress object). - // +optional - optional ObjectMetricSource object = 2; - - // 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. - // +optional - optional PodsMetricSource pods = 3; - - // 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. - // +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. -message MetricStatus { - // type is the type of metric source. It will be one of "Object", - // "Pods" or "Resource", each corresponds to a matching field in the object. - optional string type = 1; - - // object refers to a metric describing a single kubernetes object - // (for example, hits-per-second on an Ingress object). - // +optional - optional ObjectMetricStatus object = 2; - - // 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. - // +optional - optional PodsMetricStatus pods = 3; - - // 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. - // +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 -// kubernetes object (for example, hits-per-second on an Ingress object). -message ObjectMetricSource { - // target is the described Kubernetes object. - optional CrossVersionObjectReference target = 1; - - // metricName is the name of the metric in question. - optional string metricName = 2; - - // targetValue is the target value of the metric (as a quantity). - optional k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3; -} - -// ObjectMetricStatus indicates the current value of a metric describing a -// kubernetes object (for example, hits-per-second on an Ingress object). -message ObjectMetricStatus { - // target is the described Kubernetes object. - optional CrossVersionObjectReference target = 1; - - // metricName is the name of the metric in question. - optional string metricName = 2; - - // currentValue is the current value of the metric (as a quantity). - optional k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3; -} - -// PodsMetricSource indicates how to scale on 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. -message PodsMetricSource { - // metricName is the name of the metric in question - optional string metricName = 1; - - // targetAverageValue is the target value of the average of the - // metric across all relevant pods (as a quantity) - optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2; -} - -// PodsMetricStatus indicates the current value of a metric describing each pod in -// the current scale target (for example, transactions-processed-per-second). -message PodsMetricStatus { - // metricName is the name of the metric in question - optional string metricName = 1; - - // currentAverageValue is the current value of the average of the - // metric across all relevant pods (as a quantity) - optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2; -} - -// ResourceMetricSource indicates how to scale on a resource metric known to -// Kubernetes, as specified in requests and limits, describing each pod in the -// current scale target (e.g. CPU or memory). The values will be averaged -// together before being compared to the target. 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. Only one "target" type -// should be set. -message ResourceMetricSource { - // name is the name of the resource in question. - optional string name = 1; - - // targetAverageUtilization is the target value of the average of the - // resource metric across all relevant pods, represented as a percentage of - // the requested value of the resource for the pods. - // +optional - optional int32 targetAverageUtilization = 2; - - // targetAverageValue is the target value of the average of the - // resource metric across all relevant pods, as a raw value (instead of as - // a percentage of the request), similar to the "pods" metric source type. - // +optional - optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3; -} - -// ResourceMetricStatus indicates the current value of a resource metric known to -// Kubernetes, as specified in requests and limits, 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. -message ResourceMetricStatus { - // name is the name of the resource in question. - optional string name = 1; - - // currentAverageUtilization is the current value of the average of the - // resource metric across all relevant pods, represented as a percentage of - // the requested value of the resource for the pods. It will only be - // present if `targetAverageValue` was set in the corresponding metric - // specification. - // +optional - optional int32 currentAverageUtilization = 2; - - // currentAverageValue is the current value of the average of the - // resource metric across all relevant pods, as a raw value (instead of as - // a percentage of the request), similar to the "pods" metric source type. - // It will always be set, regardless of the corresponding metric specification. - optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3; -} - -// Scale represents a scaling request for a resource. -message Scale { - // Standard object 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; - - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - // +optional - optional ScaleSpec spec = 2; - - // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only. - // +optional - optional ScaleStatus status = 3; -} - -// ScaleSpec describes the attributes of a scale subresource. -message ScaleSpec { - // desired number of instances for the scaled object. - // +optional - optional int32 replicas = 1; -} - -// ScaleStatus represents the current status of a scale subresource. -message ScaleStatus { - // actual number of observed instances of the scaled object. - optional int32 replicas = 1; - - // label query over pods that should match the replicas count. This is same - // as the label selector but in the string format to avoid introspection - // by clients. The string will be in the same format as the query-param syntax. - // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors - // +optional - optional string selector = 2; -} - diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto b/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto deleted file mode 100644 index 0cd10143..00000000 --- a/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto +++ /dev/null @@ -1,363 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.autoscaling.v2beta1; - -import "k8s.io/api/core/v1/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"; -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"; - -// CrossVersionObjectReference contains enough information to let you identify the referred resource. -message CrossVersionObjectReference { - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - optional string kind = 1; - - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - optional string name = 2; - - // API version of the referent - // +optional - 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. -message HorizontalPodAutoscaler { - // metadata is the standard object 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 is the specification for the behaviour of the autoscaler. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - // +optional - optional HorizontalPodAutoscalerSpec spec = 2; - - // status is the current information about the autoscaler. - // +optional - optional HorizontalPodAutoscalerStatus status = 3; -} - -// HorizontalPodAutoscalerCondition describes the state of -// a HorizontalPodAutoscaler at a certain point. -message HorizontalPodAutoscalerCondition { - // type describes the current condition - optional string type = 1; - - // status is the status of the condition (True, False, Unknown) - optional string status = 2; - - // lastTransitionTime is the last time the condition transitioned from - // one status to another - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // reason is the reason for the condition's last transition. - // +optional - optional string reason = 4; - - // message is a human-readable explanation containing details about - // the transition - // +optional - optional string message = 5; -} - -// HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects. -message HorizontalPodAutoscalerList { - // metadata is the standard list metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is the list of horizontal pod autoscaler objects. - repeated HorizontalPodAutoscaler items = 2; -} - -// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. -message HorizontalPodAutoscalerSpec { - // scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics - // should be collected, as well as to actually change the replica count. - optional CrossVersionObjectReference scaleTargetRef = 1; - - // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. - // It defaults to 1 pod. - // +optional - optional int32 minReplicas = 2; - - // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. - // It cannot be less that minReplicas. - optional int32 maxReplicas = 3; - - // metrics contains the specifications for which to use to calculate the - // desired replica count (the maximum replica count across all metrics will - // be used). The desired replica count is calculated multiplying the - // ratio between the target value and the current value by the current - // number of pods. Ergo, metrics used must decrease as the pod count is - // increased, and vice-versa. See the individual metric source types for - // more information about how each type of metric must respond. - // +optional - repeated MetricSpec metrics = 4; -} - -// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. -message HorizontalPodAutoscalerStatus { - // observedGeneration is the most recent generation observed by this autoscaler. - // +optional - optional int64 observedGeneration = 1; - - // lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, - // used by the autoscaler to control how often the number of pods is changed. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2; - - // currentReplicas is current number of replicas of pods managed by this autoscaler, - // as last seen by the autoscaler. - optional int32 currentReplicas = 3; - - // desiredReplicas is the desired number of replicas of pods managed by this autoscaler, - // as last calculated by the autoscaler. - optional int32 desiredReplicas = 4; - - // currentMetrics is the last read state of the metrics used by this autoscaler. - repeated MetricStatus currentMetrics = 5; - - // conditions is the set of conditions required for this autoscaler to scale its target, - // and indicates whether or not those conditions are met. - repeated HorizontalPodAutoscalerCondition conditions = 6; -} - -// MetricSpec specifies how to scale based on a single metric -// (only `type` and one other matching field should be set at once). -message MetricSpec { - // type is the type of metric source. It should be one of "Object", - // "Pods" or "Resource", each mapping to a matching field in the object. - optional string type = 1; - - // object refers to a metric describing a single kubernetes object - // (for example, hits-per-second on an Ingress object). - // +optional - optional ObjectMetricSource object = 2; - - // 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. - // +optional - optional PodsMetricSource pods = 3; - - // 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. - // +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. -message MetricStatus { - // type is the type of metric source. It will be one of "Object", - // "Pods" or "Resource", each corresponds to a matching field in the object. - optional string type = 1; - - // object refers to a metric describing a single kubernetes object - // (for example, hits-per-second on an Ingress object). - // +optional - optional ObjectMetricStatus object = 2; - - // 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. - // +optional - optional PodsMetricStatus pods = 3; - - // 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. - // +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 -// kubernetes object (for example, hits-per-second on an Ingress object). -message ObjectMetricSource { - // target is the described Kubernetes object. - optional CrossVersionObjectReference target = 1; - - // metricName is the name of the metric in question. - optional string metricName = 2; - - // targetValue is the target value of the metric (as a quantity). - optional k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3; -} - -// ObjectMetricStatus indicates the current value of a metric describing a -// kubernetes object (for example, hits-per-second on an Ingress object). -message ObjectMetricStatus { - // target is the described Kubernetes object. - optional CrossVersionObjectReference target = 1; - - // metricName is the name of the metric in question. - optional string metricName = 2; - - // currentValue is the current value of the metric (as a quantity). - optional k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3; -} - -// PodsMetricSource indicates how to scale on 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. -message PodsMetricSource { - // metricName is the name of the metric in question - optional string metricName = 1; - - // targetAverageValue is the target value of the average of the - // metric across all relevant pods (as a quantity) - optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2; -} - -// PodsMetricStatus indicates the current value of a metric describing each pod in -// the current scale target (for example, transactions-processed-per-second). -message PodsMetricStatus { - // metricName is the name of the metric in question - optional string metricName = 1; - - // currentAverageValue is the current value of the average of the - // metric across all relevant pods (as a quantity) - optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2; -} - -// ResourceMetricSource indicates how to scale on a resource metric known to -// Kubernetes, as specified in requests and limits, describing each pod in the -// current scale target (e.g. CPU or memory). The values will be averaged -// together before being compared to the target. 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. Only one "target" type -// should be set. -message ResourceMetricSource { - // name is the name of the resource in question. - optional string name = 1; - - // targetAverageUtilization is the target value of the average of the - // resource metric across all relevant pods, represented as a percentage of - // the requested value of the resource for the pods. - // +optional - optional int32 targetAverageUtilization = 2; - - // targetAverageValue is the target value of the average of the - // resource metric across all relevant pods, as a raw value (instead of as - // a percentage of the request), similar to the "pods" metric source type. - // +optional - optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3; -} - -// ResourceMetricStatus indicates the current value of a resource metric known to -// Kubernetes, as specified in requests and limits, 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. -message ResourceMetricStatus { - // name is the name of the resource in question. - optional string name = 1; - - // currentAverageUtilization is the current value of the average of the - // resource metric across all relevant pods, represented as a percentage of - // the requested value of the resource for the pods. It will only be - // present if `targetAverageValue` was set in the corresponding metric - // specification. - // +optional - optional int32 currentAverageUtilization = 2; - - // currentAverageValue is the current value of the average of the - // resource metric across all relevant pods, as a raw value (instead of as - // a percentage of the request), similar to the "pods" metric source type. - // It will always be set, regardless of the corresponding metric specification. - optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3; -} - diff --git a/vendor/k8s.io/api/batch/OWNERS b/vendor/k8s.io/api/batch/OWNERS deleted file mode 100755 index 38935ff1..00000000 --- a/vendor/k8s.io/api/batch/OWNERS +++ /dev/null @@ -1,18 +0,0 @@ -reviewers: -- thockin -- lavalamp -- smarterclayton -- wojtek-t -- deads2k -- caesarxuchao -- erictune -- sttts -- saad-ali -- ncdc -- soltysh -- dims -- errordeveloper -- mml -- mbohlool -- david-mcmahon -- jianhuiz diff --git a/vendor/k8s.io/api/batch/v1/generated.proto b/vendor/k8s.io/api/batch/v1/generated.proto deleted file mode 100644 index c4797a16..00000000 --- a/vendor/k8s.io/api/batch/v1/generated.proto +++ /dev/null @@ -1,173 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.batch.v1; - -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"; - -// Job represents the configuration of a single job. -message Job { - // 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; - - // Specification of the desired behavior of a job. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional JobSpec spec = 2; - - // Current status of a job. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional JobStatus status = 3; -} - -// JobCondition describes current state of a job. -message JobCondition { - // Type of job condition, Complete or Failed. - optional string type = 1; - - // Status of the condition, one of True, False, Unknown. - optional string status = 2; - - // Last time the condition was checked. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastProbeTime = 3; - - // Last time the condition transit from one status to another. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4; - - // (brief) reason for the condition's last transition. - // +optional - optional string reason = 5; - - // Human readable message indicating details about last transition. - // +optional - optional string message = 6; -} - -// JobList is a collection of jobs. -message JobList { - // 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 Jobs. - repeated Job items = 2; -} - -// JobSpec describes how the job execution will look like. -message JobSpec { - // Specifies the maximum desired number of pods the job should - // run at any given time. The actual number of pods running in steady state will - // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), - // i.e. when the work left to do is less than max parallelism. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ - // +optional - optional int32 parallelism = 1; - - // Specifies the desired number of successfully finished pods the - // job should be run with. Setting to nil means that the success of any - // pod signals the success of all pods, and allows parallelism to have any positive - // value. Setting to 1 means that parallelism is limited to 1 and the success of that - // pod signals the success of the job. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ - // +optional - optional int32 completions = 2; - - // Specifies the duration in seconds relative to the startTime that the job may be active - // before the system tries to terminate it; value must be positive integer - // +optional - optional int64 activeDeadlineSeconds = 3; - - // Specifies the number of retries before marking this job failed. - // Defaults to 6 - // +optional - optional int32 backoffLimit = 7; - - // A label query over pods that should match the pod count. - // Normally, the system sets this field for you. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4; - - // manualSelector controls generation of pod labels and pod selectors. - // Leave `manualSelector` unset unless you are certain what you are doing. - // When false or unset, the system pick labels unique to this job - // and appends those labels to the pod template. When true, - // the user is responsible for picking unique labels and specifying - // the selector. Failure to pick a unique label may cause this - // and other jobs to not function correctly. However, You may see - // `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` - // API. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector - // +optional - optional bool manualSelector = 5; - - // Describes the pod that will be created when executing a job. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ - optional k8s.io.api.core.v1.PodTemplateSpec template = 6; -} - -// JobStatus represents the current state of a Job. -message JobStatus { - // The latest available observations of an object's current state. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - repeated JobCondition conditions = 1; - - // Represents time when the job was acknowledged by the job controller. - // It is not guaranteed to be set in happens-before order across separate operations. - // It is represented in RFC3339 form and is in UTC. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startTime = 2; - - // Represents time when the job was completed. It is not guaranteed to - // be set in happens-before order across separate operations. - // It is represented in RFC3339 form and is in UTC. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time completionTime = 3; - - // The number of actively running pods. - // +optional - optional int32 active = 4; - - // The number of pods which reached phase Succeeded. - // +optional - optional int32 succeeded = 5; - - // The number of pods which reached phase Failed. - // +optional - optional int32 failed = 6; -} - diff --git a/vendor/k8s.io/api/batch/v1beta1/generated.proto b/vendor/k8s.io/api/batch/v1beta1/generated.proto deleted file mode 100644 index f19af65e..00000000 --- a/vendor/k8s.io/api/batch/v1beta1/generated.proto +++ /dev/null @@ -1,138 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.batch.v1beta1; - -import "k8s.io/api/batch/v1/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 = "v1beta1"; - -// CronJob represents the configuration of a single cron job. -message CronJob { - // 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; - - // Specification of the desired behavior of a cron job, including the schedule. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional CronJobSpec spec = 2; - - // Current status of a cron job. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional CronJobStatus status = 3; -} - -// CronJobList is a collection of cron jobs. -message CronJobList { - // 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 CronJobs. - repeated CronJob items = 2; -} - -// CronJobSpec describes how the job execution will look like and when it will actually run. -message CronJobSpec { - // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. - optional string schedule = 1; - - // Optional deadline in seconds for starting the job if it misses scheduled - // time for any reason. Missed jobs executions will be counted as failed ones. - // +optional - optional int64 startingDeadlineSeconds = 2; - - // Specifies how to treat concurrent executions of a Job. - // Valid values are: - // - "Allow" (default): allows CronJobs to run concurrently; - // - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - // - "Replace": cancels currently running job and replaces it with a new one - // +optional - optional string concurrencyPolicy = 3; - - // This flag tells the controller to suspend subsequent executions, it does - // not apply to already started executions. Defaults to false. - // +optional - optional bool suspend = 4; - - // Specifies the job that will be created when executing a CronJob. - optional JobTemplateSpec jobTemplate = 5; - - // The number of successful finished jobs to retain. - // This is a pointer to distinguish between explicit zero and not specified. - // Defaults to 3. - // +optional - optional int32 successfulJobsHistoryLimit = 6; - - // The number of failed finished jobs to retain. - // This is a pointer to distinguish between explicit zero and not specified. - // Defaults to 1. - // +optional - optional int32 failedJobsHistoryLimit = 7; -} - -// CronJobStatus represents the current state of a cron job. -message CronJobStatus { - // A list of pointers to currently running jobs. - // +optional - repeated k8s.io.api.core.v1.ObjectReference active = 1; - - // Information when was the last time the job was successfully scheduled. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScheduleTime = 4; -} - -// JobTemplate describes a template for creating copies of a predefined pod. -message JobTemplate { - // 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; - - // Defines jobs that will be created from this template. - // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional JobTemplateSpec template = 2; -} - -// JobTemplateSpec describes the data a Job should have when created from a template -message JobTemplateSpec { - // Standard object's metadata of the jobs created from this template. - // 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 desired behavior of the job. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional k8s.io.api.batch.v1.JobSpec spec = 2; -} - diff --git a/vendor/k8s.io/api/batch/v2alpha1/generated.proto b/vendor/k8s.io/api/batch/v2alpha1/generated.proto deleted file mode 100644 index 1fe17ff2..00000000 --- a/vendor/k8s.io/api/batch/v2alpha1/generated.proto +++ /dev/null @@ -1,136 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.batch.v2alpha1; - -import "k8s.io/api/batch/v1/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 = "v2alpha1"; - -// CronJob represents the configuration of a single cron job. -message CronJob { - // 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; - - // Specification of the desired behavior of a cron job, including the schedule. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional CronJobSpec spec = 2; - - // Current status of a cron job. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional CronJobStatus status = 3; -} - -// CronJobList is a collection of cron jobs. -message CronJobList { - // 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 CronJobs. - repeated CronJob items = 2; -} - -// CronJobSpec describes how the job execution will look like and when it will actually run. -message CronJobSpec { - // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. - optional string schedule = 1; - - // Optional deadline in seconds for starting the job if it misses scheduled - // time for any reason. Missed jobs executions will be counted as failed ones. - // +optional - optional int64 startingDeadlineSeconds = 2; - - // Specifies how to treat concurrent executions of a Job. - // Valid values are: - // - "Allow" (default): allows CronJobs to run concurrently; - // - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - // - "Replace": cancels currently running job and replaces it with a new one - // +optional - optional string concurrencyPolicy = 3; - - // This flag tells the controller to suspend subsequent executions, it does - // not apply to already started executions. Defaults to false. - // +optional - optional bool suspend = 4; - - // Specifies the job that will be created when executing a CronJob. - optional JobTemplateSpec jobTemplate = 5; - - // The number of successful finished jobs to retain. - // This is a pointer to distinguish between explicit zero and not specified. - // +optional - optional int32 successfulJobsHistoryLimit = 6; - - // The number of failed finished jobs to retain. - // This is a pointer to distinguish between explicit zero and not specified. - // +optional - optional int32 failedJobsHistoryLimit = 7; -} - -// CronJobStatus represents the current state of a cron job. -message CronJobStatus { - // A list of pointers to currently running jobs. - // +optional - repeated k8s.io.api.core.v1.ObjectReference active = 1; - - // Information when was the last time the job was successfully scheduled. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScheduleTime = 4; -} - -// JobTemplate describes a template for creating copies of a predefined pod. -message JobTemplate { - // 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; - - // Defines jobs that will be created from this template. - // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional JobTemplateSpec template = 2; -} - -// JobTemplateSpec describes the data a Job should have when created from a template -message JobTemplateSpec { - // Standard object's metadata of the jobs created from this template. - // 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 desired behavior of the job. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional k8s.io.api.batch.v1.JobSpec spec = 2; -} - diff --git a/vendor/k8s.io/api/certificates/OWNERS b/vendor/k8s.io/api/certificates/OWNERS deleted file mode 100755 index 1d1ab36e..00000000 --- a/vendor/k8s.io/api/certificates/OWNERS +++ /dev/null @@ -1,14 +0,0 @@ -reviewers: -- thockin -- lavalamp -- smarterclayton -- deads2k -- caesarxuchao -- liggitt -- sttts -- dims -- errordeveloper -- mbohlool -- david-mcmahon -- jianhuiz -- enj diff --git a/vendor/k8s.io/api/certificates/v1beta1/generated.proto b/vendor/k8s.io/api/certificates/v1beta1/generated.proto deleted file mode 100644 index 1d79767e..00000000 --- a/vendor/k8s.io/api/certificates/v1beta1/generated.proto +++ /dev/null @@ -1,122 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; - -// Describes a certificate signing request -message CertificateSigningRequest { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // The certificate request itself and any additional information. - // +optional - optional CertificateSigningRequestSpec spec = 2; - - // Derived information about the request. - // +optional - optional CertificateSigningRequestStatus status = 3; -} - -message CertificateSigningRequestCondition { - // request approval state, currently Approved or Denied. - optional string type = 1; - - // brief reason for the request state - // +optional - optional string reason = 2; - - // human readable message with details about the request state - // +optional - optional string message = 3; - - // timestamp for the last update to this condition - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 4; -} - -message CertificateSigningRequestList { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - repeated CertificateSigningRequest items = 2; -} - -// This information is immutable after the request is created. Only the Request -// and Usages fields can be set on creation, other fields are derived by -// Kubernetes and cannot be modified by users. -message CertificateSigningRequestSpec { - // Base64-encoded PKCS#10 CSR data - optional bytes request = 1; - - // allowedUsages specifies a set of usage contexts the key will be - // valid for. - // See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 - // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 - repeated string usages = 5; - - // Information about the requesting user. - // See user.Info interface for details. - // +optional - optional string username = 2; - - // UID information about the requesting user. - // See user.Info interface for details. - // +optional - optional string uid = 3; - - // Group information about the requesting user. - // See user.Info interface for details. - // +optional - repeated string groups = 4; - - // Extra information about the requesting user. - // See user.Info interface for details. - // +optional - map extra = 6; -} - -message CertificateSigningRequestStatus { - // Conditions applied to the request, such as approval or denial. - // +optional - repeated CertificateSigningRequestCondition conditions = 1; - - // If request was approved, the controller will place the issued certificate here. - // +optional - optional bytes certificate = 2; -} - -// ExtraValue masks the value so protobuf can generate -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -message ExtraValue { - // items, if empty, will result in an empty slice - - repeated string items = 1; -} - diff --git a/vendor/k8s.io/api/code-of-conduct.md b/vendor/k8s.io/api/code-of-conduct.md deleted file mode 100644 index 0d15c00c..00000000 --- a/vendor/k8s.io/api/code-of-conduct.md +++ /dev/null @@ -1,3 +0,0 @@ -# Kubernetes Community Code of Conduct - -Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) diff --git a/vendor/k8s.io/api/core/v1/generated.proto b/vendor/k8s.io/api/core/v1/generated.proto deleted file mode 100644 index f0029a8d..00000000 --- a/vendor/k8s.io/api/core/v1/generated.proto +++ /dev/null @@ -1,4711 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; -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"; - -// Represents a Persistent Disk resource in AWS. -// -// An 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. -message AWSElasticBlockStoreVolumeSource { - // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). - // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - optional string volumeID = 1; - - // 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 - // TODO: how do we prevent errors in the filesystem from compromising the machine - // +optional - optional string fsType = 2; - - // 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). - // +optional - optional int32 partition = 3; - - // 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 - // +optional - optional bool readOnly = 4; -} - -// Affinity is a group of affinity scheduling rules. -message Affinity { - // Describes node affinity scheduling rules for the pod. - // +optional - optional NodeAffinity nodeAffinity = 1; - - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - // +optional - optional PodAffinity podAffinity = 2; - - // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). - // +optional - optional PodAntiAffinity podAntiAffinity = 3; -} - -// AttachedVolume describes a volume attached to a node -message AttachedVolume { - // Name of the attached volume - optional string name = 1; - - // DevicePath represents the device path where the volume should be available - optional string devicePath = 2; -} - -// AvoidPods describes pods that should avoid this node. This is the value for a -// Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and -// will eventually become a field of NodeStatus. -message AvoidPods { - // Bounded-sized list of signatures of pods that should avoid this node, sorted - // in timestamp order from oldest to newest. Size of the slice is unspecified. - // +optional - repeated PreferAvoidPodsEntry preferAvoidPods = 1; -} - -// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. -message AzureDiskVolumeSource { - // The Name of the data disk in the blob storage - optional string diskName = 1; - - // The URI the data disk in the blob storage - optional string diskURI = 2; - - // Host Caching mode: None, Read Only, Read Write. - // +optional - optional string cachingMode = 3; - - // 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. - // +optional - optional string fsType = 4; - - // Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - optional bool readOnly = 5; - - // 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 - optional string kind = 6; -} - -// AzureFile represents an Azure File Service mount on the host and bind mount to the pod. -message AzureFilePersistentVolumeSource { - // the name of secret that contains Azure Storage Account Name and Key - optional string secretName = 1; - - // Share Name - optional string shareName = 2; - - // Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - optional bool readOnly = 3; - - // the namespace of the secret that contains Azure Storage Account Name and Key - // default is the same as the Pod - // +optional - optional string secretNamespace = 4; -} - -// AzureFile represents an Azure File Service mount on the host and bind mount to the pod. -message AzureFileVolumeSource { - // the name of secret that contains Azure Storage Account Name and Key - optional string secretName = 1; - - // Share Name - optional string shareName = 2; - - // Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - optional bool readOnly = 3; -} - -// 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. -message Binding { - // 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 target object that you want to bind to the standard object. - optional ObjectReference target = 2; -} - -// 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. - optional string driver = 1; - - // VolumeHandle is the unique volume name returned by the CSI volume - // plugin’s CreateVolume to refer to the volume on all subsequent calls. - // Required. - optional string volumeHandle = 2; - - // Optional: The value to pass to ControllerPublishVolumeRequest. - // Defaults to false (read/write). - // +optional - optional bool readOnly = 3; - - // Filesystem type to mount. - // Must be a filesystem type supported by the host operating system. - // 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. -message Capabilities { - // Added capabilities - // +optional - repeated string add = 1; - - // Removed capabilities - // +optional - repeated string drop = 2; -} - -// Represents a Ceph Filesystem mount that lasts the lifetime of a pod -// Cephfs volumes do not support ownership management or SELinux relabeling. -message CephFSPersistentVolumeSource { - // Required: Monitors is a collection of Ceph monitors - // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - repeated string monitors = 1; - - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - // +optional - optional string path = 2; - - // 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 - // +optional - optional string user = 3; - - // 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 - // +optional - optional string secretFile = 4; - - // 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 - // +optional - optional SecretReference secretRef = 5; - - // 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 - // +optional - optional bool readOnly = 6; -} - -// Represents a Ceph Filesystem mount that lasts the lifetime of a pod -// Cephfs volumes do not support ownership management or SELinux relabeling. -message CephFSVolumeSource { - // Required: Monitors is a collection of Ceph monitors - // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - repeated string monitors = 1; - - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - // +optional - optional string path = 2; - - // 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 - // +optional - optional string user = 3; - - // 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 - // +optional - optional string secretFile = 4; - - // 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 - // +optional - optional LocalObjectReference secretRef = 5; - - // 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 - // +optional - 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. -// Cinder volumes support ownership management and SELinux relabeling. -message CinderVolumeSource { - // 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 LocalObjectReference secretRef = 4; -} - -// ClientIPConfig represents the configurations of Client IP based session affinity. -message ClientIPConfig { - // timeoutSeconds specifies the seconds of ClientIP type session sticky time. - // The value must be >0 && <=86400(for 1 day) if ServiceAffinity == "ClientIP". - // Default value is 10800(for 3 hours). - // +optional - optional int32 timeoutSeconds = 1; -} - -// Information about the condition of a component. -message ComponentCondition { - // Type of condition for a component. - // Valid value: "Healthy" - optional string type = 1; - - // Status of the condition for a component. - // Valid values for "Healthy": "True", "False", or "Unknown". - optional string status = 2; - - // Message about the condition for a component. - // For example, information about a health check. - // +optional - optional string message = 3; - - // Condition error code for a component. - // For example, a health check error code. - // +optional - optional string error = 4; -} - -// ComponentStatus (and ComponentStatusList) holds the cluster validation info. -message ComponentStatus { - // 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; - - // List of component conditions observed - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - repeated ComponentCondition conditions = 2; -} - -// Status of all the conditions for the component as a list of ComponentStatus objects. -message ComponentStatusList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of ComponentStatus objects. - repeated ComponentStatus items = 2; -} - -// ConfigMap holds configuration data for pods to consume. -message ConfigMap { - // 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; - - // Data contains the configuration data. - // Each key must consist of alphanumeric characters, '-', '_' or '.'. - // Values with non-UTF-8 byte sequences must use the BinaryData field. - // The keys stored in Data must not overlap with the keys in - // the BinaryData field, this is enforced during validation process. - // +optional - map data = 2; - - // BinaryData contains the binary data. - // Each key must consist of alphanumeric characters, '-', '_' or '.'. - // BinaryData can contain byte sequences that are not in the UTF-8 range. - // The keys stored in BinaryData must not overlap with the ones in - // the Data field, this is enforced during validation process. - // Using this field will require 1.10+ apiserver and - // kubelet. - // +optional - map binaryData = 3; -} - -// ConfigMapEnvSource selects a ConfigMap to populate the environment -// variables with. -// -// The contents of the target ConfigMap's Data field will represent the -// key-value pairs as environment variables. -message ConfigMapEnvSource { - // The ConfigMap to select from. - optional LocalObjectReference localObjectReference = 1; - - // Specify whether the ConfigMap must be defined - // +optional - optional bool optional = 2; -} - -// Selects a key from a ConfigMap. -message ConfigMapKeySelector { - // The ConfigMap to select from. - optional LocalObjectReference localObjectReference = 1; - - // The key to select. - optional string key = 2; - - // Specify whether the ConfigMap or it's key must be defined - // +optional - optional bool optional = 3; -} - -// ConfigMapList is a resource containing a list of ConfigMap objects. -message ConfigMapList { - // 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 ConfigMaps. - 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 -// 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. -message ConfigMapProjection { - optional LocalObjectReference localObjectReference = 1; - - // 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 '..'. - // +optional - repeated KeyToPath items = 2; - - // Specify whether the ConfigMap or it's keys must be defined - // +optional - optional bool optional = 4; -} - -// Adapts a ConfigMap into a volume. -// -// The 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. -message ConfigMapVolumeSource { - optional LocalObjectReference localObjectReference = 1; - - // 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 '..'. - // +optional - repeated KeyToPath items = 2; - - // 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. - // +optional - optional int32 defaultMode = 3; - - // Specify whether the ConfigMap or it's keys must be defined - // +optional - optional bool optional = 4; -} - -// A single application container that you want to run within a pod. -message Container { - // Name of the container specified as a DNS_LABEL. - // Each container in a pod must have a unique name (DNS_LABEL). - // Cannot be updated. - optional string name = 1; - - // Docker image name. - // More info: https://kubernetes.io/docs/concepts/containers/images - // This field is optional to allow higher level config management to default or override - // container images in workload controllers like Deployments and StatefulSets. - // +optional - optional string image = 2; - - // 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 - // +optional - repeated string command = 3; - - // 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 - // +optional - repeated string args = 4; - - // 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. - // +optional - optional string workingDir = 5; - - // 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. - // +optional - // +patchMergeKey=containerPort - // +patchStrategy=merge - repeated ContainerPort ports = 6; - - // 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. - // +optional - repeated EnvFromSource envFrom = 19; - - // List of environment variables to set in the container. - // Cannot be updated. - // +optional - // +patchMergeKey=name - // +patchStrategy=merge - repeated EnvVar env = 7; - - // Compute Resources required by this container. - // Cannot be updated. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - // +optional - optional ResourceRequirements resources = 8; - - // Pod volumes to mount into the container's filesystem. - // Cannot be updated. - // +optional - // +patchMergeKey=mountPath - // +patchStrategy=merge - repeated VolumeMount volumeMounts = 9; - - // volumeDevices is the list of block devices to be used by the container. - // This is an alpha feature and may change in the future. - // +patchMergeKey=devicePath - // +patchStrategy=merge - // +optional - repeated VolumeDevice volumeDevices = 21; - - // 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 - // +optional - optional Probe livenessProbe = 10; - - // 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 - // +optional - optional Probe readinessProbe = 11; - - // Actions that the management system should take in response to container lifecycle events. - // Cannot be updated. - // +optional - optional Lifecycle lifecycle = 12; - - // 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. - // +optional - optional string terminationMessagePath = 13; - - // 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. - // +optional - optional string terminationMessagePolicy = 20; - - // 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 - // +optional - optional string imagePullPolicy = 14; - - // Security options the pod should run with. - // More info: https://kubernetes.io/docs/concepts/policy/security-context/ - // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - // +optional - optional SecurityContext securityContext = 15; - - // 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. - // +optional - optional bool stdin = 16; - - // 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 - // +optional - optional bool stdinOnce = 17; - - // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. - // Default is false. - // +optional - optional bool tty = 18; -} - -// Describe a container image -message ContainerImage { - // Names by which this image is known. - // e.g. ["k8s.gcr.io/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"] - repeated string names = 1; - - // The size of the image in bytes. - // +optional - optional int64 sizeBytes = 2; -} - -// ContainerPort represents a network port in a single container. -message ContainerPort { - // 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. - // +optional - optional string name = 1; - - // Number of port to expose on the host. - // If specified, this must be a valid port number, 0 < x < 65536. - // If HostNetwork is specified, this must match ContainerPort. - // Most containers do not need this. - // +optional - optional int32 hostPort = 2; - - // Number of port to expose on the pod's IP address. - // This must be a valid port number, 0 < x < 65536. - optional int32 containerPort = 3; - - // Protocol for port. Must be UDP or TCP. - // Defaults to "TCP". - // +optional - optional string protocol = 4; - - // What host IP to bind the external port to. - // +optional - optional string hostIP = 5; -} - -// 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. -message ContainerState { - // Details about a waiting container - // +optional - optional ContainerStateWaiting waiting = 1; - - // Details about a running container - // +optional - optional ContainerStateRunning running = 2; - - // Details about a terminated container - // +optional - optional ContainerStateTerminated terminated = 3; -} - -// ContainerStateRunning is a running state of a container. -message ContainerStateRunning { - // Time at which the container was last (re-)started - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 1; -} - -// ContainerStateTerminated is a terminated state of a container. -message ContainerStateTerminated { - // Exit status from the last termination of the container - optional int32 exitCode = 1; - - // Signal from the last termination of the container - // +optional - optional int32 signal = 2; - - // (brief) reason from the last termination of the container - // +optional - optional string reason = 3; - - // Message regarding the last termination of the container - // +optional - optional string message = 4; - - // Time at which previous execution of the container started - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 5; - - // Time at which the container last terminated - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time finishedAt = 6; - - // Container's ID in the format 'docker://' - // +optional - optional string containerID = 7; -} - -// ContainerStateWaiting is a waiting state of a container. -message ContainerStateWaiting { - // (brief) reason the container is not yet running. - // +optional - optional string reason = 1; - - // Message regarding why the container is not yet running. - // +optional - optional string message = 2; -} - -// ContainerStatus contains details for the current status of this container. -message ContainerStatus { - // This must be a DNS_LABEL. Each container in a pod must have a unique name. - // Cannot be updated. - optional string name = 1; - - // Details about the container's current condition. - // +optional - optional ContainerState state = 2; - - // Details about the container's last termination condition. - // +optional - optional ContainerState lastState = 3; - - // Specifies whether the container has passed its readiness probe. - optional bool ready = 4; - - // 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. - optional int32 restartCount = 5; - - // The image the container is running. - // More info: https://kubernetes.io/docs/concepts/containers/images - // TODO(dchen1107): Which image the container is running with? - optional string image = 6; - - // ImageID of the container's image. - optional string imageID = 7; - - // Container's ID in the format 'docker://'. - // +optional - optional string containerID = 8; -} - -// DaemonEndpoint contains information about a single Daemon endpoint. -message DaemonEndpoint { - // Port number of the given endpoint. - optional int32 Port = 1; -} - -// Represents downward API info for projecting into a projected volume. -// Note that this is identical to a downwardAPI volume source without the default -// mode. -message DownwardAPIProjection { - // Items is a list of DownwardAPIVolume file - // +optional - repeated DownwardAPIVolumeFile items = 1; -} - -// DownwardAPIVolumeFile represents information to create the file containing the pod field -message DownwardAPIVolumeFile { - // 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 '..' - optional string path = 1; - - // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. - // +optional - optional ObjectFieldSelector fieldRef = 2; - - // Selects a resource of the container: only resources limits and requests - // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - // +optional - optional ResourceFieldSelector resourceFieldRef = 3; - - // 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. - // +optional - optional int32 mode = 4; -} - -// DownwardAPIVolumeSource represents a volume containing downward API info. -// Downward API volumes support ownership management and SELinux relabeling. -message DownwardAPIVolumeSource { - // Items is a list of downward API volume file - // +optional - repeated DownwardAPIVolumeFile items = 1; - - // 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. - // +optional - optional int32 defaultMode = 2; -} - -// Represents an empty directory for a pod. -// Empty directory volumes support ownership management and SELinux relabeling. -message EmptyDirVolumeSource { - // 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 - // +optional - optional string medium = 1; - - // 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 - // +optional - optional k8s.io.apimachinery.pkg.api.resource.Quantity sizeLimit = 2; -} - -// EndpointAddress is a tuple that describes single IP address. -message EndpointAddress { - // 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. - // TODO: This should allow hostname or IP, See #4447. - optional string ip = 1; - - // The Hostname of this endpoint - // +optional - optional string hostname = 3; - - // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node. - // +optional - optional string nodeName = 4; - - // Reference to object providing the endpoint. - // +optional - optional ObjectReference targetRef = 2; -} - -// EndpointPort is a tuple that describes a single port. -message EndpointPort { - // The name of this port (corresponds to ServicePort.Name). - // Must be a DNS_LABEL. - // Optional only if one port is defined. - // +optional - optional string name = 1; - - // The port number of the endpoint. - optional int32 port = 2; - - // The IP protocol for this port. - // Must be UDP or TCP. - // Default is TCP. - // +optional - optional string protocol = 3; -} - -// 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: -// { -// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], -// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] -// } -// The resulting set of endpoints can be viewed as: -// a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], -// b: [ 10.10.1.1:309, 10.10.2.2:309 ] -message EndpointSubset { - // 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. - // +optional - repeated EndpointAddress addresses = 1; - - // 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. - // +optional - repeated EndpointAddress notReadyAddresses = 2; - - // Port numbers available on the related IP addresses. - // +optional - repeated EndpointPort ports = 3; -} - -// Endpoints is a collection of endpoints that implement the actual service. Example: -// Name: "mysvc", -// Subsets: [ -// { -// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], -// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] -// }, -// { -// Addresses: [{"ip": "10.10.3.3"}], -// Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}] -// }, -// ] -message Endpoints { - // 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 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. - // +optional - repeated EndpointSubset subsets = 2; -} - -// EndpointsList is a list of endpoints. -message EndpointsList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of endpoints. - repeated Endpoints items = 2; -} - -// EnvFromSource represents the source of a set of ConfigMaps -message EnvFromSource { - // An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. - // +optional - optional string prefix = 1; - - // The ConfigMap to select from - // +optional - optional ConfigMapEnvSource configMapRef = 2; - - // The Secret to select from - // +optional - optional SecretEnvSource secretRef = 3; -} - -// EnvVar represents an environment variable present in a Container. -message EnvVar { - // Name of the environment variable. Must be a C_IDENTIFIER. - optional string name = 1; - - // 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 "". - // +optional - optional string value = 2; - - // Source for the environment variable's value. Cannot be used if value is not empty. - // +optional - optional EnvVarSource valueFrom = 3; -} - -// EnvVarSource represents a source for the value of an EnvVar. -message EnvVarSource { - // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, - // spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP. - // +optional - optional ObjectFieldSelector fieldRef = 1; - - // 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. - // +optional - optional ResourceFieldSelector resourceFieldRef = 2; - - // Selects a key of a ConfigMap. - // +optional - optional ConfigMapKeySelector configMapKeyRef = 3; - - // Selects a key of a secret in the pod's namespace - // +optional - optional SecretKeySelector secretKeyRef = 4; -} - -// Event is a report of an event somewhere in the cluster. -message Event { - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // The object that this event is about. - optional ObjectReference involvedObject = 2; - - // This should be a short, machine understandable string that gives the reason - // for the transition into the object's current status. - // TODO: provide exact specification for format. - // +optional - optional string reason = 3; - - // A human-readable description of the status of this operation. - // TODO: decide on maximum length. - // +optional - optional string message = 4; - - // The component reporting this event. Should be a short machine understandable string. - // +optional - optional EventSource source = 5; - - // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.) - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time firstTimestamp = 6; - - // The time at which the most recent occurrence of this event was recorded. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTimestamp = 7; - - // The number of times this event has occurred. - // +optional - optional int32 count = 8; - - // Type of this event (Normal, Warning), new types could be added in the future - // +optional - optional string type = 9; - - // Time when this Event was first observed. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime eventTime = 10; - - // Data about the Event series this event represents or nil if it's a singleton Event. - // +optional - optional EventSeries series = 11; - - // What action was taken/failed regarding to the Regarding object. - // +optional - optional string action = 12; - - // Optional secondary object for more complex actions. - // +optional - optional ObjectReference related = 13; - - // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. - // +optional - optional string reportingComponent = 14; - - // ID of the controller instance, e.g. `kubelet-xyzf`. - // +optional - optional string reportingInstance = 15; -} - -// EventList is a list of events. -message EventList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of events - repeated Event items = 2; -} - -// EventSeries contain information on series of events, i.e. thing that was/is happening -// continuously for some time. -message EventSeries { - // Number of occurrences in this series up to the last heartbeat time - optional int32 count = 1; - - // Time of the last occurrence observed - optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastObservedTime = 2; - - // State of this Series: Ongoing or Finished - optional string state = 3; -} - -// EventSource contains information for an event. -message EventSource { - // Component from which the event is generated. - // +optional - optional string component = 1; - - // Node name on which the event is generated. - // +optional - optional string host = 2; -} - -// ExecAction describes a "run in container" action. -message ExecAction { - // 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. - // +optional - repeated string command = 1; -} - -// 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. -message FCVolumeSource { - // Optional: FC target worldwide names (WWNs) - // +optional - repeated string targetWWNs = 1; - - // Optional: FC target lun number - // +optional - optional int32 lun = 2; - - // 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. - // TODO: how do we prevent errors in the filesystem from compromising the machine - // +optional - optional string fsType = 3; - - // Optional: Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - optional bool readOnly = 4; - - // Optional: FC volume world wide identifiers (wwids) - // Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - // +optional - repeated string wwids = 5; -} - -// FlexPersistentVolumeSource represents a generic persistent volume resource that is -// provisioned/attached using an exec based plugin. -message FlexPersistentVolumeSource { - // Driver is the name of the driver to use for this volume. - optional string driver = 1; - - // 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. - // +optional - optional string fsType = 2; - - // 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. - // +optional - optional SecretReference secretRef = 3; - - // Optional: Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - optional bool readOnly = 4; - - // Optional: Extra command options if any. - // +optional - map options = 5; -} - -// FlexVolume represents a generic volume resource that is -// provisioned/attached using an exec based plugin. -message FlexVolumeSource { - // Driver is the name of the driver to use for this volume. - optional string driver = 1; - - // 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. - // +optional - optional string fsType = 2; - - // 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. - // +optional - optional LocalObjectReference secretRef = 3; - - // Optional: Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - optional bool readOnly = 4; - - // Optional: Extra command options if any. - // +optional - map options = 5; -} - -// 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. -message FlockerVolumeSource { - // Name of the dataset stored as metadata -> name on the dataset for Flocker - // should be considered as deprecated - // +optional - optional string datasetName = 1; - - // UUID of the dataset. This is unique identifier of a Flocker dataset - // +optional - optional string datasetUUID = 2; -} - -// Represents a Persistent Disk resource in Google Compute Engine. -// -// A 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. -message GCEPersistentDiskVolumeSource { - // 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 - optional string pdName = 1; - - // 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 - // TODO: how do we prevent errors in the filesystem from compromising the machine - // +optional - optional string fsType = 2; - - // 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 - // +optional - optional int32 partition = 3; - - // ReadOnly here will force the ReadOnly setting in VolumeMounts. - // Defaults to false. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - // +optional - optional bool readOnly = 4; -} - -// 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; - - // Commit hash for the specified revision. - // +optional - optional string revision = 2; - - // 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. - // +optional - optional string directory = 3; -} - -// Represents a Glusterfs mount that lasts the lifetime of a pod. -// Glusterfs volumes do not support ownership management or SELinux relabeling. -message GlusterfsVolumeSource { - // EndpointsName is the endpoint name that details Glusterfs topology. - // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - optional string endpoints = 1; - - // Path is the Glusterfs volume path. - // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - optional string path = 2; - - // 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 - // +optional - optional bool readOnly = 3; -} - -// HTTPGetAction describes an action based on HTTP Get requests. -message HTTPGetAction { - // Path to access on the HTTP server. - // +optional - optional string path = 1; - - // 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. - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2; - - // Host name to connect to, defaults to the pod IP. You probably want to set - // "Host" in httpHeaders instead. - // +optional - optional string host = 3; - - // Scheme to use for connecting to the host. - // Defaults to HTTP. - // +optional - optional string scheme = 4; - - // Custom headers to set in the request. HTTP allows repeated headers. - // +optional - repeated HTTPHeader httpHeaders = 5; -} - -// HTTPHeader describes a custom header to be used in HTTP probes -message HTTPHeader { - // The header field name - optional string name = 1; - - // The header field value - optional string value = 2; -} - -// Handler defines a specific action that should be taken -// TODO: pass structured data to these actions, and document that data here. -message Handler { - // One and only one of the following should be specified. - // Exec specifies the action to take. - // +optional - optional ExecAction exec = 1; - - // HTTPGet specifies the http request to perform. - // +optional - optional HTTPGetAction httpGet = 2; - - // TCPSocket specifies an action involving a TCP port. - // TCP hooks not yet supported - // TODO: implement a realistic TCP lifecycle hook - // +optional - optional TCPSocketAction tcpSocket = 3; -} - -// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the -// pod's hosts file. -message HostAlias { - // IP address of the host file entry. - optional string ip = 1; - - // Hostnames for the above IP address. - repeated string hostnames = 2; -} - -// Represents a host path mapped into a pod. -// Host path volumes do not support ownership management or SELinux relabeling. -message HostPathVolumeSource { - // 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 - optional string path = 1; - - // Type for HostPath Volume - // Defaults to "" - // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - // +optional - optional string type = 2; -} - -// ISCSIPersistentVolumeSource represents an ISCSI disk. -// ISCSI volumes can only be mounted as read/write once. -// ISCSI volumes support ownership management and SELinux relabeling. -message ISCSIPersistentVolumeSource { - // 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). - optional string targetPortal = 1; - - // Target iSCSI Qualified Name. - optional string iqn = 2; - - // iSCSI Target Lun number. - optional int32 lun = 3; - - // iSCSI Interface Name that uses an iSCSI transport. - // Defaults to 'default' (tcp). - // +optional - optional string iscsiInterface = 4; - - // 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 - // TODO: how do we prevent errors in the filesystem from compromising the machine - // +optional - optional string fsType = 5; - - // ReadOnly here will force the ReadOnly setting in VolumeMounts. - // Defaults to false. - // +optional - optional bool readOnly = 6; - - // 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). - // +optional - repeated string portals = 7; - - // whether support iSCSI Discovery CHAP authentication - // +optional - optional bool chapAuthDiscovery = 8; - - // whether support iSCSI Session CHAP authentication - // +optional - optional bool chapAuthSession = 11; - - // CHAP Secret for iSCSI target and initiator authentication - // +optional - optional SecretReference secretRef = 10; - - // Custom iSCSI Initiator Name. - // If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface - // : will be created for the connection. - // +optional - optional string initiatorName = 12; -} - -// Represents an ISCSI disk. -// ISCSI volumes can only be mounted as read/write once. -// ISCSI volumes support ownership management and SELinux relabeling. -message ISCSIVolumeSource { - // 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). - optional string targetPortal = 1; - - // Target iSCSI Qualified Name. - optional string iqn = 2; - - // iSCSI Target Lun number. - optional int32 lun = 3; - - // iSCSI Interface Name that uses an iSCSI transport. - // Defaults to 'default' (tcp). - // +optional - optional string iscsiInterface = 4; - - // 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 - // TODO: how do we prevent errors in the filesystem from compromising the machine - // +optional - optional string fsType = 5; - - // ReadOnly here will force the ReadOnly setting in VolumeMounts. - // Defaults to false. - // +optional - optional bool readOnly = 6; - - // 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). - // +optional - repeated string portals = 7; - - // whether support iSCSI Discovery CHAP authentication - // +optional - optional bool chapAuthDiscovery = 8; - - // whether support iSCSI Session CHAP authentication - // +optional - optional bool chapAuthSession = 11; - - // CHAP Secret for iSCSI target and initiator authentication - // +optional - optional LocalObjectReference secretRef = 10; - - // Custom iSCSI Initiator Name. - // If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface - // : will be created for the connection. - // +optional - optional string initiatorName = 12; -} - -// Maps a string key to a path within a volume. -message KeyToPath { - // The key to project. - optional string key = 1; - - // 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 '..'. - optional string path = 2; - - // 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. - // +optional - optional int32 mode = 3; -} - -// 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. -message Lifecycle { - // 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 - // +optional - optional Handler postStart = 1; - - // 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 - // +optional - optional Handler preStop = 2; -} - -// LimitRange sets resource usage limits for each kind of resource in a Namespace. -message LimitRange { - // 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 limits enforced. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional LimitRangeSpec spec = 2; -} - -// LimitRangeItem defines a min/max usage limit for any resource that matches on kind. -message LimitRangeItem { - // Type of resource that this limit applies to. - // +optional - optional string type = 1; - - // Max usage constraints on this kind by resource name. - // +optional - map max = 2; - - // Min usage constraints on this kind by resource name. - // +optional - map min = 3; - - // Default resource requirement limit value by resource name if resource limit is omitted. - // +optional - map default = 4; - - // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted. - // +optional - map defaultRequest = 5; - - // 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. - // +optional - map maxLimitRequestRatio = 6; -} - -// LimitRangeList is a list of LimitRange items. -message LimitRangeList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is a list of LimitRange objects. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - repeated LimitRange items = 2; -} - -// LimitRangeSpec defines a min/max usage limit for resources that match on kind. -message LimitRangeSpec { - // Limits is the list of LimitRangeItem objects that are enforced. - repeated LimitRangeItem limits = 1; -} - -// List holds a list of objects, which may not be known by the server. -message List { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of objects - repeated k8s.io.apimachinery.pkg.runtime.RawExtension items = 2; -} - -// LoadBalancerIngress represents the status of a load-balancer ingress point: -// traffic intended for the service should be sent to an ingress point. -message LoadBalancerIngress { - // IP is set for load-balancer ingress points that are IP based - // (typically GCE or OpenStack load-balancers) - // +optional - optional string ip = 1; - - // Hostname is set for load-balancer ingress points that are DNS based - // (typically AWS load-balancers) - // +optional - optional string hostname = 2; -} - -// LoadBalancerStatus represents the status of a load-balancer. -message LoadBalancerStatus { - // Ingress is a list containing ingress points for the load-balancer. - // Traffic intended for the service should be sent to these ingress points. - // +optional - repeated LoadBalancerIngress ingress = 1; -} - -// LocalObjectReference contains enough information to let you locate the -// referenced object inside the same namespace. -message LocalObjectReference { - // Name of the referent. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - // TODO: Add other useful fields. apiVersion, kind, uid? - // +optional - optional string name = 1; -} - -// Local represents directly-attached storage with node affinity (Beta feature) -message LocalVolumeSource { - // 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; -} - -// Represents an NFS mount that lasts the lifetime of a pod. -// NFS volumes do not support ownership management or SELinux relabeling. -message NFSVolumeSource { - // Server is the hostname or IP address of the NFS server. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - optional string server = 1; - - // Path that is exported by the NFS server. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - optional string path = 2; - - // 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 - // +optional - optional bool readOnly = 3; -} - -// Namespace provides a scope for Names. -// Use of multiple namespaces is optional. -message Namespace { - // 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 behavior of the Namespace. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional NamespaceSpec spec = 2; - - // Status describes the current status of a Namespace. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional NamespaceStatus status = 3; -} - -// NamespaceList is a list of Namespaces. -message NamespaceList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is the list of Namespace objects in the list. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - repeated Namespace items = 2; -} - -// NamespaceSpec describes the attributes on a Namespace. -message NamespaceSpec { - // Finalizers is an opaque list of values that must be empty to permanently remove object from storage. - // More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ - // +optional - repeated string finalizers = 1; -} - -// NamespaceStatus is information about the current status of a Namespace. -message NamespaceStatus { - // Phase is the current lifecycle phase of the namespace. - // More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ - // +optional - optional string phase = 1; -} - -// Node is a worker node in Kubernetes. -// Each node will have a unique identifier in the cache (i.e. in etcd). -message Node { - // 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 behavior of a node. - // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional NodeSpec spec = 2; - - // 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 - // +optional - optional NodeStatus status = 3; -} - -// NodeAddress contains information for the node's address. -message NodeAddress { - // Node address type, one of Hostname, ExternalIP or InternalIP. - optional string type = 1; - - // The node address. - optional string address = 2; -} - -// Node affinity is a group of node affinity scheduling rules. -message NodeAffinity { - // 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. - // +optional - optional NodeSelector requiredDuringSchedulingIgnoredDuringExecution = 1; - - // 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. - // +optional - repeated PreferredSchedulingTerm preferredDuringSchedulingIgnoredDuringExecution = 2; -} - -// NodeCondition contains condition information for a node. -message NodeCondition { - // Type of node condition. - optional string type = 1; - - // Status of the condition, one of True, False, Unknown. - optional string status = 2; - - // Last time we got an update on a given condition. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastHeartbeatTime = 3; - - // Last time the condition transit from one status to another. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4; - - // (brief) reason for the condition's last transition. - // +optional - optional string reason = 5; - - // Human readable message indicating details about last transition. - // +optional - optional string message = 6; -} - -// NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. -message NodeConfigSource { - // 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. -message NodeDaemonEndpoints { - // Endpoint on which Kubelet is listening. - // +optional - optional DaemonEndpoint kubeletEndpoint = 1; -} - -// NodeList is the whole list of all Nodes which have been registered with master. -message NodeList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of nodes - repeated Node items = 2; -} - -// NodeProxyOptions is the query options to a Node's proxy call. -message NodeProxyOptions { - // Path is the URL path to use for the current proxy request to node. - // +optional - optional string path = 1; -} - -// NodeResources is an object for conveying resource information about a node. -// see http://releases.k8s.io/HEAD/docs/design/resources.md for more details. -message NodeResources { - // Capacity represents the available resources of a node - map capacity = 1; -} - -// 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. -message NodeSelector { - // Required. A list of node selector terms. The terms are ORed. - repeated NodeSelectorTerm nodeSelectorTerms = 1; -} - -// A node selector requirement is a selector that contains values, a key, and an operator -// that relates the key and values. -message NodeSelectorRequirement { - // The label key that the selector applies to. - optional string key = 1; - - // Represents a key's relationship to a set of values. - // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - 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. 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. - // +optional - repeated string values = 3; -} - -// 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 { - // 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. -message NodeSpec { - // PodCIDR represents the pod IP range assigned to the node. - // +optional - optional string podCIDR = 1; - - // ID of the node assigned by the cloud provider in the format: :// - // +optional - optional string providerID = 3; - - // Unschedulable controls node schedulability of new pods. By default, node is schedulable. - // More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration - // +optional - optional bool unschedulable = 4; - - // If specified, the node's taints. - // +optional - repeated Taint taints = 5; - - // If specified, the source to get node configuration from - // 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. -message NodeStatus { - // Capacity represents the total resources of a node. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - // +optional - map capacity = 1; - - // Allocatable represents the resources of a node that are available for scheduling. - // Defaults to Capacity. - // +optional - map allocatable = 2; - - // 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. - // +optional - optional string phase = 3; - - // Conditions is an array of current observed node conditions. - // More info: https://kubernetes.io/docs/concepts/nodes/node/#condition - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - repeated NodeCondition conditions = 4; - - // List of addresses reachable to the node. - // Queried from cloud provider, if available. - // More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - repeated NodeAddress addresses = 5; - - // Endpoints of daemons running on the Node. - // +optional - optional NodeDaemonEndpoints daemonEndpoints = 6; - - // Set of ids/uuids to uniquely identify the node. - // More info: https://kubernetes.io/docs/concepts/nodes/node/#info - // +optional - optional NodeSystemInfo nodeInfo = 7; - - // List of container images on this node - // +optional - repeated ContainerImage images = 8; - - // List of attachable volumes in use (mounted) by the node. - // +optional - repeated string volumesInUse = 9; - - // 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. -message NodeSystemInfo { - // 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 - optional string machineID = 1; - - // 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 - optional string systemUUID = 2; - - // Boot ID reported by the node. - optional string bootID = 3; - - // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64). - optional string kernelVersion = 4; - - // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). - optional string osImage = 5; - - // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0). - optional string containerRuntimeVersion = 6; - - // Kubelet Version reported by the node. - optional string kubeletVersion = 7; - - // KubeProxy Version reported by the node. - optional string kubeProxyVersion = 8; - - // The Operating System reported by the node - optional string operatingSystem = 9; - - // The Architecture reported by the node - optional string architecture = 10; -} - -// ObjectFieldSelector selects an APIVersioned field of an object. -message ObjectFieldSelector { - // Version of the schema the FieldPath is written in terms of, defaults to "v1". - // +optional - optional string apiVersion = 1; - - // Path of the field to select in the specified API version. - optional string fieldPath = 2; -} - -// 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 { - // Kind of the referent. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional string kind = 1; - - // Namespace of the referent. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - // +optional - optional string namespace = 2; - - // Name of the referent. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - // +optional - optional string name = 3; - - // UID of the referent. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - // +optional - optional string uid = 4; - - // API version of the referent. - // +optional - optional string apiVersion = 5; - - // 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 - // +optional - optional string resourceVersion = 6; - - // 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. - // TODO: this design is not final and this field is subject to change in the future. - // +optional - optional string fieldPath = 7; -} - -// 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 -message PersistentVolume { - // 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 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 - // +optional - optional PersistentVolumeSpec spec = 2; - - // 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 - // +optional - optional PersistentVolumeStatus status = 3; -} - -// PersistentVolumeClaim is a user's request for and claim to a persistent volume -message PersistentVolumeClaim { - // 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 desired characteristics of a volume requested by a pod author. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - // +optional - optional PersistentVolumeClaimSpec spec = 2; - - // Status represents the current information/status of a persistent volume claim. - // Read-only. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - // +optional - optional PersistentVolumeClaimStatus status = 3; -} - -// PersistentVolumeClaimCondition contails details about state of pvc -message PersistentVolumeClaimCondition { - optional string type = 1; - - optional string status = 2; - - // Last time we probed the condition. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastProbeTime = 3; - - // Last time the condition transitioned from one status to another. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4; - - // Unique, this should be a short, machine understandable string that gives the reason - // for condition's last transition. If it reports "ResizeStarted" that means the underlying - // persistent volume is being resized. - // +optional - optional string reason = 5; - - // Human-readable message indicating details about last transition. - // +optional - optional string message = 6; -} - -// PersistentVolumeClaimList is a list of PersistentVolumeClaim items. -message PersistentVolumeClaimList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // A list of persistent volume claims. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - repeated PersistentVolumeClaim items = 2; -} - -// PersistentVolumeClaimSpec describes the common attributes of storage devices -// and allows a Source for provider-specific attributes -message PersistentVolumeClaimSpec { - // AccessModes contains the desired access modes the volume should have. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - // +optional - repeated string accessModes = 1; - - // A label query over volumes to consider for binding. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4; - - // Resources represents the minimum resources the volume should have. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - // +optional - optional ResourceRequirements resources = 2; - - // VolumeName is the binding reference to the PersistentVolume backing this claim. - // +optional - optional string volumeName = 3; - - // Name of the StorageClass required by the claim. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - // +optional - optional string storageClassName = 5; - - // volumeMode defines what type of volume is required by the claim. - // Value of Filesystem is implied when not included in claim spec. - // This is an alpha feature and may change in the future. - // +optional - optional string volumeMode = 6; -} - -// PersistentVolumeClaimStatus is the current status of a persistent volume claim. -message PersistentVolumeClaimStatus { - // Phase represents the current phase of PersistentVolumeClaim. - // +optional - optional string phase = 1; - - // 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 - // +optional - repeated string accessModes = 2; - - // Represents the actual resources of the underlying volume. - // +optional - map capacity = 3; - - // Current Condition of persistent volume claim. If underlying persistent volume is being - // resized then the Condition will be set to 'ResizeStarted'. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - repeated PersistentVolumeClaimCondition conditions = 4; -} - -// 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). -message PersistentVolumeClaimVolumeSource { - // 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 - optional string claimName = 1; - - // Will force the ReadOnly setting in VolumeMounts. - // Default false. - // +optional - optional bool readOnly = 2; -} - -// PersistentVolumeList is a list of PersistentVolume items. -message PersistentVolumeList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of persistent volumes. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes - repeated PersistentVolume items = 2; -} - -// PersistentVolumeSource is similar to VolumeSource but meant for the -// administrator who creates PVs. Exactly one of its members must be set. -message PersistentVolumeSource { - // 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 - // +optional - optional GCEPersistentDiskVolumeSource gcePersistentDisk = 1; - - // 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 - // +optional - optional AWSElasticBlockStoreVolumeSource awsElasticBlockStore = 2; - - // 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 - // +optional - optional HostPathVolumeSource hostPath = 3; - - // 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 - // +optional - optional GlusterfsVolumeSource glusterfs = 4; - - // NFS represents an NFS mount on the host. Provisioned by an admin. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - // +optional - optional NFSVolumeSource nfs = 5; - - // 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 - // +optional - optional RBDPersistentVolumeSource rbd = 6; - - // 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. - // +optional - optional ISCSIPersistentVolumeSource iscsi = 7; - - // 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 CinderPersistentVolumeSource cinder = 8; - - // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime - // +optional - optional CephFSPersistentVolumeSource cephfs = 9; - - // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. - // +optional - optional FCVolumeSource fc = 10; - - // 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 - // +optional - optional FlockerVolumeSource flocker = 11; - - // FlexVolume represents a generic volume resource that is - // provisioned/attached using an exec based plugin. - // +optional - optional FlexPersistentVolumeSource flexVolume = 12; - - // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - // +optional - optional AzureFilePersistentVolumeSource azureFile = 13; - - // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - // +optional - optional VsphereVirtualDiskVolumeSource vsphereVolume = 14; - - // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime - // +optional - optional QuobyteVolumeSource quobyte = 15; - - // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - // +optional - optional AzureDiskVolumeSource azureDisk = 16; - - // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - optional PhotonPersistentDiskVolumeSource photonPersistentDisk = 17; - - // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine - // +optional - optional PortworxVolumeSource portworxVolume = 18; - - // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - // +optional - optional ScaleIOPersistentVolumeSource scaleIO = 19; - - // Local represents directly-attached storage with node affinity - // +optional - optional LocalVolumeSource local = 20; - - // 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 - // +optional - optional StorageOSPersistentVolumeSource storageos = 21; - - // CSI represents storage that handled by an external CSI driver (Beta feature). - // +optional - optional CSIPersistentVolumeSource csi = 22; -} - -// PersistentVolumeSpec is the specification of a persistent volume. -message PersistentVolumeSpec { - // A description of the persistent volume's resources and capacity. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - // +optional - map capacity = 1; - - // The actual volume backing the persistent volume. - optional PersistentVolumeSource persistentVolumeSource = 2; - - // AccessModes contains all ways the volume can be mounted. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes - // +optional - repeated string accessModes = 3; - - // 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 - // +optional - optional ObjectReference claimRef = 4; - - // 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 - // +optional - optional string persistentVolumeReclaimPolicy = 5; - - // Name of StorageClass to which this persistent volume belongs. Empty value - // means that this volume does not belong to any StorageClass. - // +optional - optional string storageClassName = 6; - - // 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 - // +optional - repeated string mountOptions = 7; - - // 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. - // +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. -message PersistentVolumeStatus { - // 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 - // +optional - optional string phase = 1; - - // A human-readable message indicating details about why the volume is in this state. - // +optional - optional string message = 2; - - // Reason is a brief CamelCase string that describes any failure and is meant - // for machine parsing and tidy display in the CLI. - // +optional - optional string reason = 3; -} - -// Represents a Photon Controller persistent disk resource. -message PhotonPersistentDiskVolumeSource { - // ID that identifies Photon Controller persistent disk - optional string pdID = 1; - - // 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. - optional string fsType = 2; -} - -// Pod is a collection of containers that can run on a host. This resource is created -// by clients and scheduled onto hosts. -message Pod { - // 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; - - // Specification of the desired behavior of the pod. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional PodSpec spec = 2; - - // 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 - // +optional - optional PodStatus status = 3; -} - -// Pod affinity is a group of inter pod affinity scheduling rules. -message PodAffinity { - // 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. - // +optional - repeated PodAffinityTerm requiredDuringSchedulingIgnoredDuringExecution = 1; - - // 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. - // +optional - repeated WeightedPodAffinityTerm preferredDuringSchedulingIgnoredDuringExecution = 2; -} - -// 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 matches that of any node on which -// a pod of the set of pods is running -message PodAffinityTerm { - // A label query over a set of resources, in this case pods. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 1; - - // namespaces specifies which namespaces the labelSelector applies to (matches against); - // null or empty list means "this pod's namespace" - // +optional - repeated string namespaces = 2; - - // 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. - // Empty topologyKey is not allowed. - optional string topologyKey = 3; -} - -// Pod anti affinity is a group of inter pod anti affinity scheduling rules. -message PodAntiAffinity { - // 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. - // +optional - repeated PodAffinityTerm requiredDuringSchedulingIgnoredDuringExecution = 1; - - // 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. - // +optional - repeated WeightedPodAffinityTerm preferredDuringSchedulingIgnoredDuringExecution = 2; -} - -// PodAttachOptions is the query options to a Pod's remote attach call. -// --- -// TODO: merge w/ PodExecOptions below for stdin, stdout, etc -// and also when we cut V2, we should export a "StreamOptions" or somesuch that contains Stdin, Stdout, Stder and TTY -message PodAttachOptions { - // Stdin if true, redirects the standard input stream of the pod for this call. - // Defaults to false. - // +optional - optional bool stdin = 1; - - // Stdout if true indicates that stdout is to be redirected for the attach call. - // Defaults to true. - // +optional - optional bool stdout = 2; - - // Stderr if true indicates that stderr is to be redirected for the attach call. - // Defaults to true. - // +optional - optional bool stderr = 3; - - // TTY if true indicates that a tty will be allocated for the attach call. - // This is passed through the container runtime so the tty - // is allocated on the worker node by the container runtime. - // Defaults to false. - // +optional - optional bool tty = 4; - - // The container in which to execute the command. - // Defaults to only container if there is only one container in the pod. - // +optional - optional string container = 5; -} - -// PodCondition contains details for the current condition of this pod. -message PodCondition { - // Type is the type of the condition. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - optional string type = 1; - - // 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 - optional string status = 2; - - // Last time we probed the condition. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastProbeTime = 3; - - // Last time the condition transitioned from one status to another. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4; - - // Unique, one-word, CamelCase reason for the condition's last transition. - // +optional - optional string reason = 5; - - // Human-readable message indicating details about last transition. - // +optional - optional string message = 6; -} - -// PodDNSConfig defines the DNS parameters of a pod in addition to -// those generated from DNSPolicy. -message PodDNSConfig { - // A list of DNS name server IP addresses. - // This will be appended to the base nameservers generated from DNSPolicy. - // Duplicated nameservers will be removed. - // +optional - repeated string nameservers = 1; - - // A list of DNS search domains for host-name lookup. - // This will be appended to the base search paths generated from DNSPolicy. - // Duplicated search paths will be removed. - // +optional - repeated string searches = 2; - - // A list of DNS resolver options. - // This will be merged with the base options generated from DNSPolicy. - // Duplicated entries will be removed. Resolution options given in Options - // will override those that appear in the base DNSPolicy. - // +optional - repeated PodDNSConfigOption options = 3; -} - -// PodDNSConfigOption defines DNS resolver options of a pod. -message PodDNSConfigOption { - // Required. - optional string name = 1; - - // +optional - optional string value = 2; -} - -// PodExecOptions is the query options to a Pod's remote exec call. -// --- -// TODO: This is largely identical to PodAttachOptions above, make sure they stay in sync and see about merging -// and also when we cut V2, we should export a "StreamOptions" or somesuch that contains Stdin, Stdout, Stder and TTY -message PodExecOptions { - // Redirect the standard input stream of the pod for this call. - // Defaults to false. - // +optional - optional bool stdin = 1; - - // Redirect the standard output stream of the pod for this call. - // Defaults to true. - // +optional - optional bool stdout = 2; - - // Redirect the standard error stream of the pod for this call. - // Defaults to true. - // +optional - optional bool stderr = 3; - - // TTY if true indicates that a tty will be allocated for the exec call. - // Defaults to false. - // +optional - optional bool tty = 4; - - // Container in which to execute the command. - // Defaults to only container if there is only one container in the pod. - // +optional - optional string container = 5; - - // Command is the remote command to execute. argv array. Not executed within a shell. - repeated string command = 6; -} - -// PodList is a list of Pods. -message PodList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of pods. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md - repeated Pod items = 2; -} - -// PodLogOptions is the query options for a Pod's logs REST call. -message PodLogOptions { - // The container for which to stream logs. Defaults to only container if there is one container in the pod. - // +optional - optional string container = 1; - - // Follow the log stream of the pod. Defaults to false. - // +optional - optional bool follow = 2; - - // Return previous terminated container logs. Defaults to false. - // +optional - optional bool previous = 3; - - // A relative time in seconds before the current time from which to show logs. If this value - // precedes the time a pod was started, only logs since the pod start will be returned. - // If this value is in the future, no logs will be returned. - // Only one of sinceSeconds or sinceTime may be specified. - // +optional - optional int64 sinceSeconds = 4; - - // An RFC3339 timestamp from which to show logs. If this value - // precedes the time a pod was started, only logs since the pod start will be returned. - // If this value is in the future, no logs will be returned. - // Only one of sinceSeconds or sinceTime may be specified. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time sinceTime = 5; - - // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line - // of log output. Defaults to false. - // +optional - optional bool timestamps = 6; - - // If set, the number of lines from the end of the logs to show. If not specified, - // logs are shown from the creation of the container or sinceSeconds or sinceTime - // +optional - optional int64 tailLines = 7; - - // If set, the number of bytes to read from the server before terminating the - // log output. This may not display a complete final line of logging, and may return - // slightly more or slightly less than the specified limit. - // +optional - optional int64 limitBytes = 8; -} - -// PodPortForwardOptions is the query options to a Pod's port forward call -// when using WebSockets. -// The `port` query parameter must specify the port or -// ports (comma separated) to forward over. -// Port forwarding over SPDY does not use these options. It requires the port -// to be passed in the `port` header as part of request. -message PodPortForwardOptions { - // List of ports to forward - // Required when using WebSockets - // +optional - repeated int32 ports = 1; -} - -// PodProxyOptions is the query options to a Pod's proxy call. -message PodProxyOptions { - // Path is the URL path to use for the current proxy request to pod. - // +optional - 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. -message PodSecurityContext { - // 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. - // +optional - optional SELinuxOptions seLinuxOptions = 1; - - // 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. - // +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. - // 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. - // +optional - optional bool runAsNonRoot = 3; - - // 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. - // +optional - repeated int64 supplementalGroups = 4; - - // 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: - // - // 1. 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---- - // - // 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. -// Exactly one field should be set. -message PodSignature { - // Reference to controller whose pods should avoid this node. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.OwnerReference podController = 1; -} - -// PodSpec is a description of a pod. -message PodSpec { - // List of volumes that can be mounted by containers belonging to the pod. - // More info: https://kubernetes.io/docs/concepts/storage/volumes - // +optional - // +patchMergeKey=name - // +patchStrategy=merge,retainKeys - repeated Volume volumes = 1; - - // 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/ - // +patchMergeKey=name - // +patchStrategy=merge - repeated Container initContainers = 20; - - // 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. - // +patchMergeKey=name - // +patchStrategy=merge - repeated Container containers = 2; - - // 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 - // +optional - optional string restartPolicy = 3; - - // 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. - // +optional - optional int64 terminationGracePeriodSeconds = 4; - - // 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. - // +optional - optional int64 activeDeadlineSeconds = 5; - - // 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'. - // +optional - optional string dnsPolicy = 6; - - // 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/ - // +optional - map nodeSelector = 7; - - // 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/ - // +optional - optional string serviceAccountName = 8; - - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. - // Deprecated: Use serviceAccountName instead. - // +k8s:conversion-gen=false - // +optional - optional string serviceAccount = 9; - - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - // +optional - optional bool automountServiceAccountToken = 21; - - // 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. - // +optional - optional string nodeName = 10; - - // 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. - // +k8s:conversion-gen=false - // +optional - optional bool hostNetwork = 11; - - // Use the host's pid namespace. - // Optional: Default to false. - // +k8s:conversion-gen=false - // +optional - optional bool hostPID = 12; - - // Use the host's ipc namespace. - // Optional: Default to false. - // +k8s:conversion-gen=false - // +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 alpha-level and is honored only by servers that enable 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 - optional PodSecurityContext securityContext = 14; - - // 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 - // +optional - // +patchMergeKey=name - // +patchStrategy=merge - repeated LocalObjectReference imagePullSecrets = 15; - - // Specifies the hostname of the Pod - // If not specified, the pod's hostname will be set to a system-defined value. - // +optional - optional string hostname = 16; - - // If specified, the fully qualified Pod hostname will be "...svc.". - // If not specified, the pod will not have a domainname at all. - // +optional - optional string subdomain = 17; - - // If specified, the pod's scheduling constraints - // +optional - optional Affinity affinity = 18; - - // If specified, the pod will be dispatched by specified scheduler. - // If not specified, the pod will be dispatched by default scheduler. - // +optional - optional string schedulerName = 19; - - // If specified, the pod's tolerations. - // +optional - repeated Toleration tolerations = 22; - - // 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. - // +optional - // +patchMergeKey=ip - // +patchStrategy=merge - repeated HostAlias hostAliases = 23; - - // 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. - // +optional - optional string priorityClassName = 24; - - // 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. - // +optional - optional int32 priority = 25; - - // Specifies the DNS parameters of a pod. - // Parameters specified here will be merged to the generated DNS - // configuration based on DNSPolicy. - // +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; -} - -// 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. -message PodStatus { - // 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; - - // Current service state of pod. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - repeated PodCondition conditions = 2; - - // A human readable message indicating details about why the pod is in this condition. - // +optional - optional string message = 3; - - // A brief CamelCase message indicating details about why the pod is in this state. - // e.g. 'Evicted' - // +optional - optional string reason = 4; - - // nominatedNodeName is set only when this pod preempts other pods on the node, but it cannot be - // scheduled right away as preemption victims receive their graceful termination periods. - // This field does not guarantee that the pod will be scheduled on this node. Scheduler may decide - // to place the pod elsewhere if other nodes become available sooner. Scheduler may also decide to - // give the resources on this node to a higher priority pod that is created after preemption. - // As a result, this field may be different than PodSpec.nodeName when the pod is - // scheduled. - // +optional - optional string nominatedNodeName = 11; - - // IP address of the host to which the pod is assigned. Empty if not yet scheduled. - // +optional - optional string hostIP = 5; - - // IP address allocated to the pod. Routable at least within the cluster. - // Empty if not yet allocated. - // +optional - optional string podIP = 6; - - // 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. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startTime = 7; - - // 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 - repeated ContainerStatus initContainerStatuses = 10; - - // 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 - // +optional - repeated ContainerStatus containerStatuses = 8; - - // The Quality of Service (QOS) classification assigned to the pod based on resource requirements - // See PodQOSClass type for available QOS classes - // More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md - // +optional - optional string qosClass = 9; -} - -// PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded -message PodStatusResult { - // 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; - - // 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 - // +optional - optional PodStatus status = 2; -} - -// PodTemplate describes a template for creating copies of a predefined pod. -message PodTemplate { - // 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; - - // 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 - // +optional - optional PodTemplateSpec template = 2; -} - -// PodTemplateList is a list of PodTemplates. -message PodTemplateList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of pod templates - repeated PodTemplate items = 2; -} - -// PodTemplateSpec describes the data a pod should have when created from a template -message PodTemplateSpec { - // 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; - - // Specification of the desired behavior of the pod. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional PodSpec spec = 2; -} - -// PortworxVolumeSource represents a Portworx volume resource. -message PortworxVolumeSource { - // VolumeID uniquely identifies a Portworx volume - optional string volumeID = 1; - - // 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. - optional string fsType = 2; - - // Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - optional bool readOnly = 3; -} - -// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. -// +k8s:openapi-gen=false -message Preconditions { - // Specifies the target UID. - // +optional - optional string uid = 1; -} - -// Describes a class of pods that should avoid this node. -message PreferAvoidPodsEntry { - // The class of pods. - optional PodSignature podSignature = 1; - - // Time at which this entry was added to the list. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time evictionTime = 2; - - // (brief) reason why this entry was added to the list. - // +optional - optional string reason = 3; - - // Human readable message indicating why this entry was added to the list. - // +optional - optional string message = 4; -} - -// 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). -message PreferredSchedulingTerm { - // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - optional int32 weight = 1; - - // A node selector term, associated with the corresponding weight. - optional NodeSelectorTerm preference = 2; -} - -// Probe describes a health check to be performed against a container to determine whether it is -// alive or ready to receive traffic. -message Probe { - // The action taken to determine the health of a container - optional Handler handler = 1; - - // 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 - // +optional - optional int32 initialDelaySeconds = 2; - - // 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 - // +optional - optional int32 timeoutSeconds = 3; - - // How often (in seconds) to perform the probe. - // Default to 10 seconds. Minimum value is 1. - // +optional - optional int32 periodSeconds = 4; - - // 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. - // +optional - optional int32 successThreshold = 5; - - // Minimum consecutive failures for the probe to be considered failed after having succeeded. - // Defaults to 3. Minimum value is 1. - // +optional - optional int32 failureThreshold = 6; -} - -// Represents a projected volume source -message ProjectedVolumeSource { - // list of volume projections - repeated VolumeProjection sources = 1; - - // 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. - // +optional - optional int32 defaultMode = 2; -} - -// Represents a Quobyte mount that lasts the lifetime of a pod. -// Quobyte volumes do not support ownership management or SELinux relabeling. -message QuobyteVolumeSource { - // 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 - optional string registry = 1; - - // Volume is a string that references an already created Quobyte volume by name. - optional string volume = 2; - - // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. - // Defaults to false. - // +optional - optional bool readOnly = 3; - - // User to map volume access to - // Defaults to serivceaccount user - // +optional - optional string user = 4; - - // Group to map volume access to - // Default is no group - // +optional - optional string group = 5; -} - -// Represents a Rados Block Device mount that lasts the lifetime of a pod. -// RBD volumes support ownership management and SELinux relabeling. -message RBDPersistentVolumeSource { - // A collection of Ceph monitors. - // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - repeated string monitors = 1; - - // The rados image name. - // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - optional string image = 2; - - // 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 - // TODO: how do we prevent errors in the filesystem from compromising the machine - // +optional - optional string fsType = 3; - - // The rados pool name. - // Default is rbd. - // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - // +optional - optional string pool = 4; - - // The rados user name. - // Default is admin. - // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - // +optional - optional string user = 5; - - // 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 - // +optional - optional string keyring = 6; - - // 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 - // +optional - optional SecretReference secretRef = 7; - - // 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 - // +optional - optional bool readOnly = 8; -} - -// Represents a Rados Block Device mount that lasts the lifetime of a pod. -// RBD volumes support ownership management and SELinux relabeling. -message RBDVolumeSource { - // A collection of Ceph monitors. - // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - repeated string monitors = 1; - - // The rados image name. - // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - optional string image = 2; - - // 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 - // TODO: how do we prevent errors in the filesystem from compromising the machine - // +optional - optional string fsType = 3; - - // The rados pool name. - // Default is rbd. - // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - // +optional - optional string pool = 4; - - // The rados user name. - // Default is admin. - // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - // +optional - optional string user = 5; - - // 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 - // +optional - optional string keyring = 6; - - // 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 - // +optional - optional LocalObjectReference secretRef = 7; - - // 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 - // +optional - optional bool readOnly = 8; -} - -// RangeAllocation is not a public type. -message RangeAllocation { - // 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; - - // Range is string that identifies the range represented by 'data'. - optional string range = 2; - - // Data is a bit array containing all allocated addresses in the previous segment. - optional bytes data = 3; -} - -// ReplicationController represents the configuration of a replication controller. -message ReplicationController { - // 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 - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // 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 - // +optional - optional ReplicationControllerSpec spec = 2; - - // 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 - // +optional - optional ReplicationControllerStatus status = 3; -} - -// ReplicationControllerCondition describes the state of a replication controller at a certain point. -message ReplicationControllerCondition { - // Type of replication controller condition. - optional string type = 1; - - // Status of the condition, one of True, False, Unknown. - optional string status = 2; - - // The last time the condition transitioned from one status to another. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // The reason for the condition's last transition. - // +optional - optional string reason = 4; - - // A human readable message indicating details about the transition. - // +optional - optional string message = 5; -} - -// ReplicationControllerList is a collection of replication controllers. -message ReplicationControllerList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of replication controllers. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - repeated ReplicationController items = 2; -} - -// ReplicationControllerSpec is the specification of a replication controller. -message ReplicationControllerSpec { - // 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 - // +optional - optional int32 replicas = 1; - - // 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) - // +optional - optional int32 minReadySeconds = 4; - - // 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 - // +optional - map selector = 2; - - // 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 - // +optional - optional PodTemplateSpec template = 3; -} - -// ReplicationControllerStatus represents the current status of a replication -// controller. -message ReplicationControllerStatus { - // Replicas is the most recently oberved number of replicas. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller - optional int32 replicas = 1; - - // The number of pods that have labels matching the labels of the pod template of the replication controller. - // +optional - optional int32 fullyLabeledReplicas = 2; - - // The number of ready replicas for this replication controller. - // +optional - optional int32 readyReplicas = 4; - - // The number of available replicas (ready for at least minReadySeconds) for this replication controller. - // +optional - optional int32 availableReplicas = 5; - - // ObservedGeneration reflects the generation of the most recently observed replication controller. - // +optional - optional int64 observedGeneration = 3; - - // Represents the latest available observations of a replication controller's current state. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - repeated ReplicationControllerCondition conditions = 6; -} - -// ResourceFieldSelector represents container resources (cpu, memory) and their output format -message ResourceFieldSelector { - // Container name: required for volumes, optional for env vars - // +optional - optional string containerName = 1; - - // Required: resource to select - optional string resource = 2; - - // Specifies the output format of the exposed resources, defaults to "1" - // +optional - optional k8s.io.apimachinery.pkg.api.resource.Quantity divisor = 3; -} - -// ResourceQuota sets aggregate quota restrictions enforced per namespace -message ResourceQuota { - // 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 desired quota. - // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional ResourceQuotaSpec spec = 2; - - // Status defines the actual enforced quota and its current usage. - // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional ResourceQuotaStatus status = 3; -} - -// ResourceQuotaList is a list of ResourceQuota items. -message ResourceQuotaList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is a list of ResourceQuota objects. - // More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ - repeated ResourceQuota items = 2; -} - -// ResourceQuotaSpec defines the desired hard limits to enforce for Quota. -message ResourceQuotaSpec { - // 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; - - // A collection of filters that must match each object tracked by a quota. - // 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. -message ResourceQuotaStatus { - // Hard is the set of enforced hard limits for each named resource. - // More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ - // +optional - map hard = 1; - - // Used is the current observed total usage of the resource in the namespace. - // +optional - map used = 2; -} - -// ResourceRequirements describes the compute resource requirements. -message ResourceRequirements { - // Limits describes the maximum amount of compute resources allowed. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - // +optional - map limits = 1; - - // 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/ - // +optional - map requests = 2; -} - -// SELinuxOptions are the labels to be applied to the container -message SELinuxOptions { - // User is a SELinux user label that applies to the container. - // +optional - optional string user = 1; - - // Role is a SELinux role label that applies to the container. - // +optional - optional string role = 2; - - // Type is a SELinux type label that applies to the container. - // +optional - optional string type = 3; - - // Level is SELinux level label that applies to the container. - // +optional - optional string level = 4; -} - -// ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume -message ScaleIOPersistentVolumeSource { - // The host address of the ScaleIO API Gateway. - optional string gateway = 1; - - // The name of the storage system as configured in ScaleIO. - optional string system = 2; - - // SecretRef references to the secret for ScaleIO user and other - // sensitive information. If this is not provided, Login operation will fail. - optional SecretReference secretRef = 3; - - // Flag to enable/disable SSL communication with Gateway, default false - // +optional - optional bool sslEnabled = 4; - - // The name of the ScaleIO Protection Domain for the configured storage. - // +optional - optional string protectionDomain = 5; - - // The ScaleIO Storage Pool associated with the protection domain. - // +optional - optional string storagePool = 6; - - // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. - // Default is ThinProvisioned. - // +optional - optional string storageMode = 7; - - // The name of a volume already created in the ScaleIO system - // that is associated with this volume source. - optional string volumeName = 8; - - // Filesystem type to mount. - // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs", "ntfs". - // Default is "xfs" - // +optional - optional string fsType = 9; - - // Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - optional bool readOnly = 10; -} - -// ScaleIOVolumeSource represents a persistent ScaleIO volume -message ScaleIOVolumeSource { - // The host address of the ScaleIO API Gateway. - optional string gateway = 1; - - // The name of the storage system as configured in ScaleIO. - optional string system = 2; - - // SecretRef references to the secret for ScaleIO user and other - // sensitive information. If this is not provided, Login operation will fail. - optional LocalObjectReference secretRef = 3; - - // Flag to enable/disable SSL communication with Gateway, default false - // +optional - optional bool sslEnabled = 4; - - // The name of the ScaleIO Protection Domain for the configured storage. - // +optional - optional string protectionDomain = 5; - - // The ScaleIO Storage Pool associated with the protection domain. - // +optional - optional string storagePool = 6; - - // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. - // Default is ThinProvisioned. - // +optional - optional string storageMode = 7; - - // The name of a volume already created in the ScaleIO system - // that is associated with this volume source. - optional string volumeName = 8; - - // Filesystem type to mount. - // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs", "ntfs". - // Default is "xfs". - // +optional - optional string fsType = 9; - - // Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - 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 { - // 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; - - // 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 - // +optional - map data = 2; - - // 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. - // +k8s:conversion-gen=false - // +optional - map stringData = 4; - - // Used to facilitate programmatic handling of secret data. - // +optional - optional string type = 3; -} - -// SecretEnvSource selects a Secret to populate the environment -// variables with. -// -// The contents of the target Secret's Data field will represent the -// key-value pairs as environment variables. -message SecretEnvSource { - // The Secret to select from. - optional LocalObjectReference localObjectReference = 1; - - // Specify whether the Secret must be defined - // +optional - optional bool optional = 2; -} - -// SecretKeySelector selects a key of a Secret. -message SecretKeySelector { - // The name of the secret in the pod's namespace to select from. - optional LocalObjectReference localObjectReference = 1; - - // The key of the secret to select from. Must be a valid secret key. - optional string key = 2; - - // Specify whether the Secret or it's key must be defined - // +optional - optional bool optional = 3; -} - -// SecretList is a list of Secret. -message SecretList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is a list of secret objects. - // More info: https://kubernetes.io/docs/concepts/configuration/secret - repeated Secret items = 2; -} - -// Adapts a secret into a projected volume. -// -// The 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. -message SecretProjection { - optional LocalObjectReference localObjectReference = 1; - - // 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 '..'. - // +optional - repeated KeyToPath items = 2; - - // Specify whether the Secret or its key must be defined - // +optional - optional bool optional = 4; -} - -// SecretReference represents a Secret Reference. It has enough information to retrieve secret -// in any namespace -message SecretReference { - // Name is unique within a namespace to reference a secret resource. - // +optional - optional string name = 1; - - // Namespace defines the space within which the secret name must be unique. - // +optional - optional string namespace = 2; -} - -// Adapts a Secret into a volume. -// -// The 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. -message SecretVolumeSource { - // Name of the secret in the pod's namespace to use. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - // +optional - optional string secretName = 1; - - // 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 '..'. - // +optional - repeated KeyToPath items = 2; - - // 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. - // +optional - optional int32 defaultMode = 3; - - // Specify whether the Secret or it's keys must be defined - // +optional - optional bool optional = 4; -} - -// 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. -message SecurityContext { - // The capabilities to add/drop when running containers. - // Defaults to the default set of capabilities granted by the container runtime. - // +optional - optional Capabilities capabilities = 1; - - // Run container in privileged mode. - // Processes in privileged containers are essentially equivalent to root on the host. - // Defaults to false. - // +optional - optional bool privileged = 2; - - // 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. - // +optional - optional SELinuxOptions seLinuxOptions = 3; - - // 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. - // +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. - // 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. - // +optional - optional bool runAsNonRoot = 5; - - // Whether this container has a read-only root filesystem. - // Default is false. - // +optional - optional bool readOnlyRootFilesystem = 6; - - // 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 - // +optional - optional bool allowPrivilegeEscalation = 7; -} - -// SerializedReference is a reference to serialized object. -message SerializedReference { - // The reference to an object in the system. - // +optional - optional ObjectReference reference = 1; -} - -// 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. -message Service { - // 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 behavior of a service. - // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional ServiceSpec spec = 2; - - // 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 - // +optional - optional ServiceStatus status = 3; -} - -// 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 -message ServiceAccount { - // 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; - - // 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 - // +optional - // +patchMergeKey=name - // +patchStrategy=merge - repeated ObjectReference secrets = 2; - - // 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 - // +optional - repeated LocalObjectReference imagePullSecrets = 3; - - // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. - // Can be overridden at the pod level. - // +optional - optional bool automountServiceAccountToken = 4; -} - -// ServiceAccountList is a list of ServiceAccount objects -message ServiceAccountList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of ServiceAccounts. - // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ - 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. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of services - repeated Service items = 2; -} - -// ServicePort contains information on service's port. -message ServicePort { - // 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. - // +optional - optional string name = 1; - - // The IP protocol for this port. Supports "TCP" and "UDP". - // Default is TCP. - // +optional - optional string protocol = 2; - - // The port that will be exposed by this service. - optional int32 port = 3; - - // 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 - // +optional - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString targetPort = 4; - - // 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 - // +optional - optional int32 nodePort = 5; -} - -// ServiceProxyOptions is the query options to a Service's proxy call. -message ServiceProxyOptions { - // Path is the part of URLs that include service endpoints, suffixes, - // and parameters to use for the current proxy request to service. - // For example, the whole request URL is - // http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. - // Path is _search?q=user:kimchy. - // +optional - optional string path = 1; -} - -// ServiceSpec describes the attributes that a user creates on a service. -message ServiceSpec { - // 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 - // +patchMergeKey=port - // +patchStrategy=merge - repeated ServicePort ports = 1; - - // 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/ - // +optional - map selector = 2; - - // 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 - // +optional - optional string clusterIP = 3; - - // 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 - // +optional - optional string type = 4; - - // 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. - // +optional - repeated string externalIPs = 5; - - // 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 - // +optional - optional string sessionAffinity = 7; - - // 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. - // +optional - optional string loadBalancerIP = 8; - - // 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/ - // +optional - repeated string loadBalancerSourceRanges = 9; - - // 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. - // +optional - optional string externalName = 10; - - // 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. - // +optional - optional string externalTrafficPolicy = 11; - - // 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. - // +optional - optional int32 healthCheckNodePort = 12; - - // 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. - // +optional - optional bool publishNotReadyAddresses = 13; - - // sessionAffinityConfig contains the configurations of session affinity. - // +optional - optional SessionAffinityConfig sessionAffinityConfig = 14; -} - -// ServiceStatus represents the current status of a service. -message ServiceStatus { - // LoadBalancer contains the current status of the load-balancer, - // if one is present. - // +optional - optional LoadBalancerStatus loadBalancer = 1; -} - -// SessionAffinityConfig represents the configurations of session affinity. -message SessionAffinityConfig { - // clientIP contains the configurations of Client IP based session affinity. - // +optional - optional ClientIPConfig clientIP = 1; -} - -// Represents a StorageOS persistent volume resource. -message StorageOSPersistentVolumeSource { - // VolumeName is the human-readable name of the StorageOS volume. Volume - // names are only unique within a namespace. - optional string volumeName = 1; - - // 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. - // +optional - optional string volumeNamespace = 2; - - // 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. - // +optional - optional string fsType = 3; - - // Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - optional bool readOnly = 4; - - // SecretRef specifies the secret to use for obtaining the StorageOS API - // credentials. If not specified, default values will be attempted. - // +optional - optional ObjectReference secretRef = 5; -} - -// Represents a StorageOS persistent volume resource. -message StorageOSVolumeSource { - // VolumeName is the human-readable name of the StorageOS volume. Volume - // names are only unique within a namespace. - optional string volumeName = 1; - - // 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. - // +optional - optional string volumeNamespace = 2; - - // 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. - // +optional - optional string fsType = 3; - - // Defaults to false (read/write). ReadOnly here will force - // the ReadOnly setting in VolumeMounts. - // +optional - optional bool readOnly = 4; - - // SecretRef specifies the secret to use for obtaining the StorageOS API - // credentials. If not specified, default values will be attempted. - // +optional - optional LocalObjectReference secretRef = 5; -} - -// Sysctl defines a kernel parameter to be set -message Sysctl { - // Name of a property to set - optional string name = 1; - - // Value of a property to set - optional string value = 2; -} - -// TCPSocketAction describes an action based on opening a socket -message TCPSocketAction { - // 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. - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 1; - - // Optional: Host name to connect to, defaults to the pod IP. - // +optional - optional string host = 2; -} - -// The node this Taint is attached to has the "effect" on -// any pod that does not tolerate the Taint. -message Taint { - // Required. The taint key to be applied to a node. - optional string key = 1; - - // Required. The taint value corresponding to the taint key. - // +optional - optional string value = 2; - - // Required. The effect of the taint on pods - // that do not tolerate the taint. - // Valid effects are NoSchedule, PreferNoSchedule and NoExecute. - optional string effect = 3; - - // TimeAdded represents the time at which the taint was added. - // It is only written for NoExecute taints. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time timeAdded = 4; -} - -// The pod this Toleration is attached to tolerates any taint that matches -// the triple using the matching operator . -message Toleration { - // 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. - // +optional - optional string key = 1; - - // 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. - // +optional - optional string operator = 2; - - // Value is the taint value the toleration matches to. - // If the operator is Exists, the value should be empty, otherwise just a regular string. - // +optional - optional string value = 3; - - // Effect indicates the taint effect to match. Empty means match all taint effects. - // When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - // +optional - optional string effect = 4; - - // 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. - // +optional - 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. - // Must be a DNS_LABEL and unique within the pod. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - optional string name = 1; - - // VolumeSource represents the location and type of the mounted volume. - // If not specified, the Volume is implied to be an EmptyDir. - // This implied behavior is deprecated and will be removed in a future version. - optional VolumeSource volumeSource = 2; -} - -// volumeDevice describes a mapping of a raw block device within a container. -message VolumeDevice { - // name must match the name of a persistentVolumeClaim in the pod - optional string name = 1; - - // devicePath is the path inside of the container that the device will be mapped to. - optional string devicePath = 2; -} - -// VolumeMount describes a mounting of a Volume within a container. -message VolumeMount { - // This must match the Name of a Volume. - optional string name = 1; - - // Mounted read-only if true, read-write otherwise (false or unspecified). - // Defaults to false. - // +optional - optional bool readOnly = 2; - - // Path within the container at which the volume should be mounted. Must - // not contain ':'. - optional string mountPath = 3; - - // Path within the volume from which the container's volume should be mounted. - // Defaults to "" (volume's root). - // +optional - optional string subPath = 4; - - // 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. - // +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. -// Only one of its members may be specified. -message VolumeSource { - // 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 - // --- - // TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not - // mount host directories as read/write. - // +optional - optional HostPathVolumeSource hostPath = 1; - - // EmptyDir represents a temporary directory that shares a pod's lifetime. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - // +optional - optional EmptyDirVolumeSource emptyDir = 2; - - // 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 - // +optional - optional GCEPersistentDiskVolumeSource gcePersistentDisk = 3; - - // 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 - // +optional - 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; - - // Secret represents a secret that should populate this volume. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - // +optional - optional SecretVolumeSource secret = 6; - - // NFS represents an NFS mount on the host that shares a pod's lifetime - // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - // +optional - optional NFSVolumeSource nfs = 7; - - // 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 - // +optional - optional ISCSIVolumeSource iscsi = 8; - - // 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 - // +optional - optional GlusterfsVolumeSource glusterfs = 9; - - // PersistentVolumeClaimVolumeSource represents a reference to a - // PersistentVolumeClaim in the same namespace. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - // +optional - optional PersistentVolumeClaimVolumeSource persistentVolumeClaim = 10; - - // 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 - // +optional - optional RBDVolumeSource rbd = 11; - - // FlexVolume represents a generic volume resource that is - // provisioned/attached using an exec based plugin. - // +optional - optional FlexVolumeSource flexVolume = 12; - - // 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 = 13; - - // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime - // +optional - optional CephFSVolumeSource cephfs = 14; - - // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running - // +optional - optional FlockerVolumeSource flocker = 15; - - // DownwardAPI represents downward API about the pod that should populate this volume - // +optional - optional DownwardAPIVolumeSource downwardAPI = 16; - - // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. - // +optional - optional FCVolumeSource fc = 17; - - // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - // +optional - optional AzureFileVolumeSource azureFile = 18; - - // ConfigMap represents a configMap that should populate this volume - // +optional - optional ConfigMapVolumeSource configMap = 19; - - // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - // +optional - optional VsphereVirtualDiskVolumeSource vsphereVolume = 20; - - // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime - // +optional - optional QuobyteVolumeSource quobyte = 21; - - // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - // +optional - optional AzureDiskVolumeSource azureDisk = 22; - - // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - optional PhotonPersistentDiskVolumeSource photonPersistentDisk = 23; - - // Items for all in one resources secrets, configmaps, and downward API - optional ProjectedVolumeSource projected = 26; - - // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine - // +optional - optional PortworxVolumeSource portworxVolume = 24; - - // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - // +optional - optional ScaleIOVolumeSource scaleIO = 25; - - // StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. - // +optional - optional StorageOSVolumeSource storageos = 27; -} - -// Represents a vSphere volume resource. -message VsphereVirtualDiskVolumeSource { - // Path that identifies vSphere volume vmdk - optional string volumePath = 1; - - // 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. - // +optional - optional string fsType = 2; - - // Storage Policy Based Management (SPBM) profile name. - // +optional - optional string storagePolicyName = 3; - - // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. - // +optional - optional string storagePolicyID = 4; -} - -// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) -message WeightedPodAffinityTerm { - // weight associated with matching the corresponding podAffinityTerm, - // in the range 1-100. - optional int32 weight = 1; - - // Required. A pod affinity term, associated with the corresponding weight. - optional PodAffinityTerm podAffinityTerm = 2; -} - diff --git a/vendor/k8s.io/api/core/v1/taint_test.go b/vendor/k8s.io/api/core/v1/taint_test.go deleted file mode 100644 index 22c7f9c4..00000000 --- a/vendor/k8s.io/api/core/v1/taint_test.go +++ /dev/null @@ -1,122 +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 v1 - -import ( - "testing" -) - -func TestTaintToString(t *testing.T) { - testCases := []struct { - taint *Taint - expectedString string - }{ - { - taint: &Taint{ - Key: "foo", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - expectedString: "foo=bar:NoSchedule", - }, - { - taint: &Taint{ - Key: "foo", - Effect: TaintEffectNoSchedule, - }, - expectedString: "foo:NoSchedule", - }, - } - - for i, tc := range testCases { - if tc.expectedString != tc.taint.ToString() { - t.Errorf("[%v] expected taint %v converted to %s, got %s", i, tc.taint, tc.expectedString, tc.taint.ToString()) - } - } -} - -func TestMatchTaint(t *testing.T) { - testCases := []struct { - description string - taint *Taint - taintToMatch Taint - expectMatch bool - }{ - { - description: "two taints with the same key,value,effect should match", - taint: &Taint{ - Key: "foo", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - taintToMatch: Taint{ - Key: "foo", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - expectMatch: true, - }, - { - description: "two taints with the same key,effect but different value should match", - taint: &Taint{ - Key: "foo", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - taintToMatch: Taint{ - Key: "foo", - Value: "different-value", - Effect: TaintEffectNoSchedule, - }, - expectMatch: true, - }, - { - description: "two taints with the different key cannot match", - taint: &Taint{ - Key: "foo", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - taintToMatch: Taint{ - Key: "different-key", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - expectMatch: false, - }, - { - description: "two taints with the different effect cannot match", - taint: &Taint{ - Key: "foo", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - taintToMatch: Taint{ - Key: "foo", - Value: "bar", - Effect: TaintEffectPreferNoSchedule, - }, - expectMatch: false, - }, - } - - for _, tc := range testCases { - if tc.expectMatch != tc.taint.MatchTaint(&tc.taintToMatch) { - t.Errorf("[%s] expect taint %s match taint %s", tc.description, tc.taint.ToString(), tc.taintToMatch.ToString()) - } - } -} diff --git a/vendor/k8s.io/api/core/v1/toleration_test.go b/vendor/k8s.io/api/core/v1/toleration_test.go deleted file mode 100644 index 3dd48f08..00000000 --- a/vendor/k8s.io/api/core/v1/toleration_test.go +++ /dev/null @@ -1,123 +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 v1 - -import ( - "testing" -) - -func TestTolerationToleratesTaint(t *testing.T) { - - testCases := []struct { - description string - toleration Toleration - taint Taint - expectTolerated bool - }{ - { - description: "toleration and taint have the same key and effect, and operator is Exists, and taint has no value, expect tolerated", - toleration: Toleration{ - Key: "foo", - Operator: TolerationOpExists, - Effect: TaintEffectNoSchedule, - }, - taint: Taint{ - Key: "foo", - Effect: TaintEffectNoSchedule, - }, - expectTolerated: true, - }, - { - description: "toleration and taint have the same key and effect, and operator is Exists, and taint has some value, expect tolerated", - toleration: Toleration{ - Key: "foo", - Operator: TolerationOpExists, - Effect: TaintEffectNoSchedule, - }, - taint: Taint{ - Key: "foo", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - expectTolerated: true, - }, - { - description: "toleration and taint have the same effect, toleration has empty key and operator is Exists, means match all taints, expect tolerated", - toleration: Toleration{ - Key: "", - Operator: TolerationOpExists, - Effect: TaintEffectNoSchedule, - }, - taint: Taint{ - Key: "foo", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - expectTolerated: true, - }, - { - description: "toleration and taint have the same key, effect and value, and operator is Equal, expect tolerated", - toleration: Toleration{ - Key: "foo", - Operator: TolerationOpEqual, - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - taint: Taint{ - Key: "foo", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - expectTolerated: true, - }, - { - description: "toleration and taint have the same key and effect, but different values, and operator is Equal, expect not tolerated", - toleration: Toleration{ - Key: "foo", - Operator: TolerationOpEqual, - Value: "value1", - Effect: TaintEffectNoSchedule, - }, - taint: Taint{ - Key: "foo", - Value: "value2", - Effect: TaintEffectNoSchedule, - }, - expectTolerated: false, - }, - { - description: "toleration and taint have the same key and value, but different effects, and operator is Equal, expect not tolerated", - toleration: Toleration{ - Key: "foo", - Operator: TolerationOpEqual, - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - taint: Taint{ - Key: "foo", - Value: "bar", - Effect: TaintEffectNoExecute, - }, - expectTolerated: false, - }, - } - for _, tc := range testCases { - if tolerated := tc.toleration.ToleratesTaint(&tc.taint); tc.expectTolerated != tolerated { - t.Errorf("[%s] expect %v, got %v: toleration %+v, taint %s", tc.description, tc.expectTolerated, tolerated, tc.toleration, tc.taint.ToString()) - } - } -} diff --git a/vendor/k8s.io/api/events/OWNERS b/vendor/k8s.io/api/events/OWNERS deleted file mode 100644 index d9ecd885..00000000 --- a/vendor/k8s.io/api/events/OWNERS +++ /dev/null @@ -1,8 +0,0 @@ -reviewers: -- gmarek -- deads2k -- sttts -approvers: -- gmarek -- deads2k -- sttts diff --git a/vendor/k8s.io/api/events/v1beta1/generated.proto b/vendor/k8s.io/api/events/v1beta1/generated.proto deleted file mode 100644 index 60ee899b..00000000 --- a/vendor/k8s.io/api/events/v1beta1/generated.proto +++ /dev/null @@ -1,122 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.events.v1beta1; - -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"; - -// Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. -message Event { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Required. Time when this Event was first observed. - optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime eventTime = 2; - - // Data about the Event series this event represents or nil if it's a singleton Event. - // +optional - optional EventSeries series = 3; - - // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. - // +optional - optional string reportingController = 4; - - // ID of the controller instance, e.g. `kubelet-xyzf`. - // +optional - optional string reportingInstance = 5; - - // What action was taken/failed regarding to the regarding object. - // +optional - optional string action = 6; - - // Why the action was taken. - optional string reason = 7; - - // The object this Event is about. In most cases it's an Object reporting controller implements. - // E.g. ReplicaSetController implements ReplicaSets and this event is emitted because - // it acts on some changes in a ReplicaSet object. - // +optional - optional k8s.io.api.core.v1.ObjectReference regarding = 8; - - // Optional secondary object for more complex actions. E.g. when regarding object triggers - // a creation or deletion of related object. - // +optional - optional k8s.io.api.core.v1.ObjectReference related = 9; - - // Optional. A human-readable description of the status of this operation. - // Maximal length of the note is 1kB, but libraries should be prepared to - // handle values up to 64kB. - // +optional - optional string note = 10; - - // Type of this event (Normal, Warning), new types could be added in the - // future. - // +optional - optional string type = 11; - - // Deprecated field assuring backward compatibility with core.v1 Event type - // +optional - optional k8s.io.api.core.v1.EventSource deprecatedSource = 12; - - // Deprecated field assuring backward compatibility with core.v1 Event type - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time deprecatedFirstTimestamp = 13; - - // Deprecated field assuring backward compatibility with core.v1 Event type - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time deprecatedLastTimestamp = 14; - - // Deprecated field assuring backward compatibility with core.v1 Event type - // +optional - optional int32 deprecatedCount = 15; -} - -// EventList is a list of Event objects. -message EventList { - // 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 Event items = 2; -} - -// EventSeries contain information on series of events, i.e. thing that was/is happening -// continuously for some time. -message EventSeries { - // Number of occurrences in this series up to the last heartbeat time - optional int32 count = 1; - - // Time when last Event from the series was seen before last heartbeat. - optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastObservedTime = 2; - - // Information whether this series is ongoing or finished. - optional string state = 3; -} - diff --git a/vendor/k8s.io/api/extensions/OWNERS b/vendor/k8s.io/api/extensions/OWNERS deleted file mode 100755 index cfac4711..00000000 --- a/vendor/k8s.io/api/extensions/OWNERS +++ /dev/null @@ -1,38 +0,0 @@ -reviewers: -- thockin -- lavalamp -- smarterclayton -- wojtek-t -- deads2k -- brendandburns -- derekwaynecarr -- caesarxuchao -- mikedanese -- liggitt -- nikhiljindal -- erictune -- pmorie -- sttts -- saad-ali -- janetkuo -- justinsb -- ncdc -- tallclair -- mwielgus -- soltysh -- piosz -- dims -- errordeveloper -- madhusudancs -- rootfs -- jszczepkowski -- mml -- resouer -- mbohlool -- david-mcmahon -- therc -- pweil- -- tmrts -- mqliang -- lukaszo -- jianhuiz diff --git a/vendor/k8s.io/api/extensions/v1beta1/generated.proto b/vendor/k8s.io/api/extensions/v1beta1/generated.proto deleted file mode 100644 index 07a1d4ee..00000000 --- a/vendor/k8s.io/api/extensions/v1beta1/generated.proto +++ /dev/null @@ -1,1161 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; -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"; - -// 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. - 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. -// Deprecated: use AllowedHostPath from policy API Group instead. -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; -} - -message CustomMetricCurrentStatus { - // Custom Metric name. - optional string name = 1; - - // Custom Metric value (average). - optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 2; -} - -message CustomMetricCurrentStatusList { - repeated CustomMetricCurrentStatus items = 1; -} - -// Alpha-level support for Custom Metrics in HPA (as annotations). -message CustomMetricTarget { - // Custom Metric name. - optional string name = 1; - - // Custom Metric value (average). - optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 2; -} - -message CustomMetricTargetList { - repeated CustomMetricTarget items = 1; -} - -// DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for -// more information. -// DaemonSet represents the configuration of a daemon set. -message DaemonSet { - // 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 desired behavior of this daemon set. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional DaemonSetSpec spec = 2; - - // The current status of this daemon set. 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 - // +optional - optional DaemonSetStatus status = 3; -} - -// DaemonSetCondition describes the state of a DaemonSet at a certain point. -message DaemonSetCondition { - // Type of DaemonSet condition. - optional string type = 1; - - // Status of the condition, one of True, False, Unknown. - optional string status = 2; - - // Last time the condition transitioned from one status to another. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // The reason for the condition's last transition. - // +optional - optional string reason = 4; - - // A human readable message indicating details about the transition. - // +optional - optional string message = 5; -} - -// DaemonSetList is a collection of daemon sets. -message DaemonSetList { - // 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; - - // A list of daemon sets. - repeated DaemonSet items = 2; -} - -// DaemonSetSpec is the specification of a daemon set. -message DaemonSetSpec { - // A label query over pods that are managed by the daemon set. - // Must match in order to be controlled. - // If empty, defaulted to labels on Pod template. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1; - - // An object that describes the pod that will be created. - // The DaemonSet will create exactly one copy of this pod on every node - // that matches the template's node selector (or on every node if no node - // selector is specified). - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template - optional k8s.io.api.core.v1.PodTemplateSpec template = 2; - - // An update strategy to replace existing DaemonSet pods with new pods. - // +optional - optional DaemonSetUpdateStrategy updateStrategy = 3; - - // The minimum number of seconds for which a newly created DaemonSet 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). - // +optional - optional int32 minReadySeconds = 4; - - // DEPRECATED. - // A sequence number representing a specific generation of the template. - // Populated by the system. It can be set only during the creation. - // +optional - optional int64 templateGeneration = 5; - - // The number of old history to retain to allow rollback. - // This is a pointer to distinguish between explicit zero and not specified. - // Defaults to 10. - // +optional - optional int32 revisionHistoryLimit = 6; -} - -// DaemonSetStatus represents the current status of a daemon set. -message DaemonSetStatus { - // The number of nodes that are running at least 1 - // daemon pod and are supposed to run the daemon pod. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - optional int32 currentNumberScheduled = 1; - - // The number of nodes that are running the daemon pod, but are - // not supposed to run the daemon pod. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - optional int32 numberMisscheduled = 2; - - // The total number of nodes that should be running the daemon - // pod (including nodes correctly running the daemon pod). - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - optional int32 desiredNumberScheduled = 3; - - // The number of nodes that should be running the daemon pod and have one - // or more of the daemon pod running and ready. - optional int32 numberReady = 4; - - // The most recent generation observed by the daemon set controller. - // +optional - optional int64 observedGeneration = 5; - - // The total number of nodes that are running updated daemon pod - // +optional - optional int32 updatedNumberScheduled = 6; - - // The number of nodes that should be running the - // daemon pod and have one or more of the daemon pod running and - // available (ready for at least spec.minReadySeconds) - // +optional - optional int32 numberAvailable = 7; - - // The number of nodes that should be running the - // daemon pod and have none of the daemon pod running and available - // (ready for at least spec.minReadySeconds) - // +optional - optional int32 numberUnavailable = 8; - - // Count of hash collisions for the DaemonSet. The DaemonSet controller - // uses this field as a collision avoidance mechanism when it needs to - // create the name for the newest ControllerRevision. - // +optional - optional int32 collisionCount = 9; - - // Represents the latest available observations of a DaemonSet's current state. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - repeated DaemonSetCondition conditions = 10; -} - -message DaemonSetUpdateStrategy { - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". - // Default is OnDelete. - // +optional - optional string type = 1; - - // Rolling update config params. Present only if type = "RollingUpdate". - // --- - // TODO: Update this to follow our convention for oneOf, whatever we decide it - // to be. Same as Deployment `strategy.rollingUpdate`. - // See https://github.com/kubernetes/kubernetes/issues/35345 - // +optional - optional RollingUpdateDaemonSet rollingUpdate = 2; -} - -// DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for -// more information. -// Deployment enables declarative updates for Pods and ReplicaSets. -message Deployment { - // Standard object metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Specification of the desired behavior of the Deployment. - // +optional - optional DeploymentSpec spec = 2; - - // Most recently observed status of the Deployment. - // +optional - optional DeploymentStatus status = 3; -} - -// DeploymentCondition describes the state of a deployment at a certain point. -message DeploymentCondition { - // Type of deployment condition. - optional string type = 1; - - // Status of the condition, one of True, False, Unknown. - optional string status = 2; - - // The last time this condition was updated. - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6; - - // Last time the condition transitioned from one status to another. - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 7; - - // The reason for the condition's last transition. - optional string reason = 4; - - // A human readable message indicating details about the transition. - optional string message = 5; -} - -// DeploymentList is a list of Deployments. -message DeploymentList { - // Standard list metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is the list of Deployments. - repeated Deployment items = 2; -} - -// DEPRECATED. -// DeploymentRollback stores the information required to rollback a deployment. -message DeploymentRollback { - // Required: This must match the Name of a deployment. - optional string name = 1; - - // The annotations to be updated to a deployment - // +optional - map updatedAnnotations = 2; - - // The config of this deployment rollback. - optional RollbackConfig rollbackTo = 3; -} - -// DeploymentSpec is the specification of the desired behavior of the Deployment. -message DeploymentSpec { - // Number of desired pods. This is a pointer to distinguish between explicit - // zero and not specified. Defaults to 1. - // +optional - optional int32 replicas = 1; - - // Label selector for pods. Existing ReplicaSets whose pods are - // selected by this will be the ones affected by this deployment. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; - - // Template describes the pods that will be created. - optional k8s.io.api.core.v1.PodTemplateSpec template = 3; - - // The deployment strategy to use to replace existing pods with new ones. - // +optional - // +patchStrategy=retainKeys - optional DeploymentStrategy strategy = 4; - - // 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) - // +optional - optional int32 minReadySeconds = 5; - - // The number of old ReplicaSets to retain to allow rollback. - // This is a pointer to distinguish between explicit zero and not specified. - // +optional - optional int32 revisionHistoryLimit = 6; - - // Indicates that the deployment is paused and will not be processed by the - // deployment controller. - // +optional - optional bool paused = 7; - - // DEPRECATED. - // The config this deployment is rolling back to. Will be cleared after rollback is done. - // +optional - optional RollbackConfig rollbackTo = 8; - - // 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". - // +optional - optional int32 progressDeadlineSeconds = 9; -} - -// DeploymentStatus is the most recently observed status of the Deployment. -message DeploymentStatus { - // The generation observed by the deployment controller. - // +optional - optional int64 observedGeneration = 1; - - // Total number of non-terminated pods targeted by this deployment (their labels match the selector). - // +optional - optional int32 replicas = 2; - - // Total number of non-terminated pods targeted by this deployment that have the desired template spec. - // +optional - optional int32 updatedReplicas = 3; - - // Total number of ready pods targeted by this deployment. - // +optional - optional int32 readyReplicas = 7; - - // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. - // +optional - optional int32 availableReplicas = 4; - - // Total number of unavailable pods targeted by this deployment. This is the total number of - // pods that are still required for the deployment to have 100% available capacity. They may - // either be pods that are running but not yet available or pods that still have not been created. - // +optional - optional int32 unavailableReplicas = 5; - - // Represents the latest available observations of a deployment's current state. - // +patchMergeKey=type - // +patchStrategy=merge - repeated DeploymentCondition conditions = 6; - - // 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. - // +optional - optional int32 collisionCount = 8; -} - -// DeploymentStrategy describes how to replace existing pods with new ones. -message DeploymentStrategy { - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - // +optional - optional string type = 1; - - // Rolling update config params. Present only if DeploymentStrategyType = - // RollingUpdate. - // --- - // TODO: Update this to follow our convention for oneOf, whatever we decide it - // to be. - // +optional - optional RollingUpdateDeployment rollingUpdate = 2; -} - -// 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. - // +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; -} - -// HTTPIngressPath associates a path regex with a backend. Incoming urls matching -// the path are forwarded to the backend. -message HTTPIngressPath { - // Path is an extended POSIX regex as defined by IEEE Std 1003.1, - // (i.e this follows the egrep/unix syntax, not the perl syntax) - // matched against the path of an incoming request. Currently it can - // contain characters disallowed from the conventional "path" - // part of a URL as defined by RFC 3986. Paths must begin with - // a '/'. If unspecified, the path defaults to a catch all sending - // traffic to the backend. - // +optional - optional string path = 1; - - // Backend defines the referenced service endpoint to which the traffic - // will be forwarded to. - optional IngressBackend backend = 2; -} - -// HTTPIngressRuleValue is a list of http selectors pointing to backends. -// In the example: http:///? -> backend where -// where parts of the url correspond to RFC 3986, this resource will be used -// to match against everything after the last '/' and before the first '?' -// or '#'. -message HTTPIngressRuleValue { - // A collection of paths that map requests to backends. - repeated HTTPIngressPath paths = 1; -} - -// 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; - - // max is the end of the range, inclusive. - optional int32 max = 2; -} - -// 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. - optional int64 min = 1; - - // max is the end of the range, inclusive. - optional int64 max = 2; -} - -// DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock. -// 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. -message IPBlock { - // CIDR is a string representing the IP Block - // Valid examples are "192.168.1.1/24" - optional string cidr = 1; - - // Except is a slice of CIDRs that should not be included within an IP Block - // Valid examples are "192.168.1.1/24" - // Except values will be rejected if they are outside the CIDR range - // +optional - repeated string except = 2; -} - -// Ingress is a collection of rules that allow inbound connections to reach the -// endpoints defined by a backend. An Ingress can be configured to give services -// externally-reachable urls, load balance traffic, terminate SSL, offer name -// based virtual hosting etc. -message Ingress { - // 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 is the desired state of the Ingress. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional IngressSpec spec = 2; - - // Status is the current state of the Ingress. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional IngressStatus status = 3; -} - -// IngressBackend describes all endpoints for a given service and port. -message IngressBackend { - // Specifies the name of the referenced service. - optional string serviceName = 1; - - // Specifies the port of the referenced service. - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString servicePort = 2; -} - -// IngressList is a collection of Ingress. -message IngressList { - // 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.ListMeta metadata = 1; - - // Items is the list of Ingress. - repeated Ingress items = 2; -} - -// IngressRule represents the rules mapping the paths under a specified host to -// the related backend services. Incoming requests are first evaluated for a host -// match, then routed to the backend associated with the matching IngressRuleValue. -message IngressRule { - // Host is the fully qualified domain name of a network host, as defined - // by RFC 3986. Note the following deviations from the "host" part of the - // URI as defined in the RFC: - // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the - // IP in the Spec of the parent Ingress. - // 2. The `:` delimiter is not respected because ports are not allowed. - // Currently the port of an Ingress is implicitly :80 for http and - // :443 for https. - // Both these may change in the future. - // Incoming requests are matched against the host before the IngressRuleValue. - // If the host is unspecified, the Ingress routes all traffic based on the - // specified IngressRuleValue. - // +optional - optional string host = 1; - - // IngressRuleValue represents a rule to route requests for this IngressRule. - // If unspecified, the rule defaults to a http catch-all. Whether that sends - // just traffic matching the host to the default backend or all traffic to the - // default backend, is left to the controller fulfilling the Ingress. Http is - // currently the only supported IngressRuleValue. - // +optional - optional IngressRuleValue ingressRuleValue = 2; -} - -// IngressRuleValue represents a rule to apply against incoming requests. If the -// rule is satisfied, the request is routed to the specified backend. Currently -// mixing different types of rules in a single Ingress is disallowed, so exactly -// one of the following must be set. -message IngressRuleValue { - // +optional - optional HTTPIngressRuleValue http = 1; -} - -// IngressSpec describes the Ingress the user wishes to exist. -message IngressSpec { - // A default backend capable of servicing requests that don't match any - // rule. At least one of 'backend' or 'rules' must be specified. This field - // is optional to allow the loadbalancer controller or defaulting logic to - // specify a global default. - // +optional - optional IngressBackend backend = 1; - - // TLS configuration. Currently the Ingress only supports a single TLS - // port, 443. If multiple members of this list specify different hosts, they - // will be multiplexed on the same port according to the hostname specified - // through the SNI TLS extension, if the ingress controller fulfilling the - // ingress supports SNI. - // +optional - repeated IngressTLS tls = 2; - - // A list of host rules used to configure the Ingress. If unspecified, or - // no rule matches, all traffic is sent to the default backend. - // +optional - repeated IngressRule rules = 3; -} - -// IngressStatus describe the current state of the Ingress. -message IngressStatus { - // LoadBalancer contains the current status of the load-balancer. - // +optional - optional k8s.io.api.core.v1.LoadBalancerStatus loadBalancer = 1; -} - -// IngressTLS describes the transport layer security associated with an Ingress. -message IngressTLS { - // Hosts are a list of hosts included in the TLS certificate. The values in - // this list must match the name/s used in the tlsSecret. Defaults to the - // wildcard host setting for the loadbalancer controller fulfilling this - // Ingress, if left unspecified. - // +optional - repeated string hosts = 1; - - // SecretName is the name of the secret used to terminate SSL traffic on 443. - // Field is left optional to allow SSL routing based on SNI hostname alone. - // If the SNI host in a listener conflicts with the "Host" header field used - // by an IngressRule, the SNI host is used for termination and value of the - // Host header is used for routing. - // +optional - optional string secretName = 2; -} - -// DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy. -// NetworkPolicy describes what network traffic is allowed for a set of Pods -message NetworkPolicy { - // 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; - - // Specification of the desired behavior for this NetworkPolicy. - // +optional - optional NetworkPolicySpec spec = 2; -} - -// DEPRECATED 1.9 - This group version of NetworkPolicyEgressRule is deprecated by networking/v1/NetworkPolicyEgressRule. -// NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods -// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. -// This type is beta-level in 1.8 -message NetworkPolicyEgressRule { - // List of destination ports for outgoing traffic. - // Each item in this list is combined using a logical OR. If this field is - // empty or missing, this rule matches all ports (traffic not restricted by port). - // If this field is present and contains at least one item, then this rule allows - // traffic only if the traffic matches at least one port in the list. - // +optional - repeated NetworkPolicyPort ports = 1; - - // List of destinations for outgoing traffic of pods selected for this rule. - // Items in this list are combined using a logical OR operation. If this field is - // empty or missing, this rule matches all destinations (traffic not restricted by - // destination). If this field is present and contains at least one item, this rule - // allows traffic only if the traffic matches at least one item in the to list. - // +optional - repeated NetworkPolicyPeer to = 2; -} - -// DEPRECATED 1.9 - This group version of NetworkPolicyIngressRule is deprecated by networking/v1/NetworkPolicyIngressRule. -// This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from. -message NetworkPolicyIngressRule { - // List of ports which should be made accessible on the pods selected for this rule. - // Each item in this list is combined using a logical OR. - // If this field is empty or missing, this rule matches all ports (traffic not restricted by port). - // If this field is present and contains at least one item, then this rule allows traffic - // only if the traffic matches at least one port in the list. - // +optional - repeated NetworkPolicyPort ports = 1; - - // List of sources which should be able to access the pods selected for this rule. - // Items in this list are combined using a logical OR operation. - // If this field is empty or missing, this rule matches all sources (traffic not restricted by source). - // If this field is present and contains at least on item, this rule allows traffic only if the - // traffic matches at least one item in the from list. - // +optional - repeated NetworkPolicyPeer from = 2; -} - -// DEPRECATED 1.9 - This group version of NetworkPolicyList is deprecated by networking/v1/NetworkPolicyList. -// Network Policy List is a list of NetworkPolicy objects. -message NetworkPolicyList { - // 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 NetworkPolicy items = 2; -} - -// DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer. -message NetworkPolicyPeer { - // 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 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. If this field is set then - // neither of the other fields can be. - // +optional - optional IPBlock ipBlock = 3; -} - -// DEPRECATED 1.9 - This group version of NetworkPolicyPort is deprecated by networking/v1/NetworkPolicyPort. -message NetworkPolicyPort { - // Optional. The protocol (TCP or UDP) which traffic must match. - // If not specified, this field defaults to TCP. - // +optional - optional string protocol = 1; - - // If specified, the port on the given protocol. This can - // either be a numerical or named port on a pod. If this field is not provided, - // this matches all port names and numbers. - // If present, only traffic on the specified protocol AND port - // will be matched. - // +optional - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2; -} - -// DEPRECATED 1.9 - This group version of NetworkPolicySpec is deprecated by networking/v1/NetworkPolicySpec. -message NetworkPolicySpec { - // Selects the pods to which this NetworkPolicy object applies. The array of ingress rules - // is applied to any pods selected by this field. Multiple network policies can select the - // same set of pods. In this case, the ingress rules for each are combined additively. - // This field is NOT optional and follows standard label selector semantics. - // An empty podSelector matches all pods in this namespace. - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1; - - // List of ingress rules to be applied to the selected pods. - // Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod - // OR if the traffic source is the pod's local node, - // OR if the traffic matches at least one ingress rule across all of the NetworkPolicy - // objects whose podSelector matches the pod. - // If this field is empty then this NetworkPolicy does not allow any traffic - // (and serves solely to ensure that the pods it selects are isolated by default). - // +optional - repeated NetworkPolicyIngressRule ingress = 2; - - // List of egress rules to be applied to the selected pods. Outgoing traffic is - // allowed if there are no NetworkPolicies selecting the pod (and cluster policy - // otherwise allows the traffic), OR if the traffic matches at least one egress rule - // across all of the NetworkPolicy objects whose podSelector matches the pod. If - // this field is empty then this NetworkPolicy limits all outgoing traffic (and serves - // solely to ensure that the pods it selects are isolated by default). - // This field is beta-level in 1.8 - // +optional - repeated NetworkPolicyEgressRule egress = 3; - - // List of rule types that the NetworkPolicy relates to. - // Valid options are Ingress, Egress, or Ingress,Egress. - // If this field is not specified, it will default based on the existence of Ingress or Egress rules; - // policies that contain an Egress section are assumed to affect Egress, and all policies - // (whether or not they contain an Ingress section) are assumed to affect Ingress. - // If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. - // Likewise, if you want to write a policy that specifies that no egress is allowed, - // you must specify a policyTypes value that include "Egress" (since such a policy would not include - // an Egress section and would otherwise default to just [ "Ingress" ]). - // This field is beta-level in 1.8 - // +optional - repeated string policyTypes = 4; -} - -// 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 - // +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. -// 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. - repeated PodSecurityPolicy items = 2; -} - -// 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 - // 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; -} - -// DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1beta2/ReplicaSet. See the release notes for -// more information. -// ReplicaSet ensures that a specified number of pod replicas are running at any given time. -message ReplicaSet { - // If the Labels of a ReplicaSet are empty, they are defaulted to - // be the same as the Pod(s) that the ReplicaSet manages. - // 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 specification of the desired behavior of the ReplicaSet. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional ReplicaSetSpec spec = 2; - - // Status is the most recently observed status of the ReplicaSet. - // 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 - // +optional - optional ReplicaSetStatus status = 3; -} - -// ReplicaSetCondition describes the state of a replica set at a certain point. -message ReplicaSetCondition { - // Type of replica set condition. - optional string type = 1; - - // Status of the condition, one of True, False, Unknown. - optional string status = 2; - - // The last time the condition transitioned from one status to another. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // The reason for the condition's last transition. - // +optional - optional string reason = 4; - - // A human readable message indicating details about the transition. - // +optional - optional string message = 5; -} - -// ReplicaSetList is a collection of ReplicaSets. -message ReplicaSetList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of ReplicaSets. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - repeated ReplicaSet items = 2; -} - -// ReplicaSetSpec is the specification of a ReplicaSet. -message ReplicaSetSpec { - // 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 - // +optional - optional int32 replicas = 1; - - // 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) - // +optional - optional int32 minReadySeconds = 4; - - // Selector is a label query over pods that should match the replica count. - // If the 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 replica set. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; - - // Template is the object that describes the pod that will be created if - // insufficient replicas are detected. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template - // +optional - optional k8s.io.api.core.v1.PodTemplateSpec template = 3; -} - -// ReplicaSetStatus represents the current status of a ReplicaSet. -message ReplicaSetStatus { - // Replicas is the most recently oberved number of replicas. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller - optional int32 replicas = 1; - - // The number of pods that have labels matching the labels of the pod template of the replicaset. - // +optional - optional int32 fullyLabeledReplicas = 2; - - // The number of ready replicas for this replica set. - // +optional - optional int32 readyReplicas = 4; - - // The number of available replicas (ready for at least minReadySeconds) for this replica set. - // +optional - optional int32 availableReplicas = 5; - - // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. - // +optional - optional int64 observedGeneration = 3; - - // Represents the latest available observations of a replica set's current state. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - repeated ReplicaSetCondition conditions = 6; -} - -// Dummy definition -message ReplicationControllerDummy { -} - -// DEPRECATED. -message RollbackConfig { - // The revision to rollback to. If set to 0, rollback to the last revision. - // +optional - optional int64 revision = 1; -} - -// Spec to control the desired behavior of daemon set rolling update. -message RollingUpdateDaemonSet { - // The maximum number of DaemonSet pods that can be unavailable during the - // update. Value can be an absolute number (ex: 5) or a percentage of total - // number of DaemonSet pods at the start of the update (ex: 10%). Absolute - // number is calculated from percentage by rounding up. - // This cannot be 0. - // Default value is 1. - // Example: when this is set to 30%, at most 30% of the total number of nodes - // that should be running the daemon pod (i.e. status.desiredNumberScheduled) - // can have their pods stopped for an update at any given - // time. The update starts by stopping at most 30% of those DaemonSet pods - // and then brings up new DaemonSet pods in their place. Once the new pods - // are available, it then proceeds onto other DaemonSet pods, thus ensuring - // that at least 70% of original number of DaemonSet pods are available at - // all times during the update. - // +optional - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1; -} - -// Spec to control the desired behavior of rolling update. -message RollingUpdateDeployment { - // 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. - // By default, a fixed value of 1 is used. - // 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. - // +optional - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1; - - // 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. - // By default, a value of 1 is used. - // 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. - // +optional - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2; -} - -// 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. - 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. -// Deprecated: use SELinuxStrategyOptions from policy API Group instead. -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; -} - -// represents a scaling request for a resource. -message Scale { - // Standard object 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; - - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - // +optional - optional ScaleSpec spec = 2; - - // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only. - // +optional - optional ScaleStatus status = 3; -} - -// describes the attributes of a scale subresource -message ScaleSpec { - // desired number of instances for the scaled object. - // +optional - optional int32 replicas = 1; -} - -// represents the current status of a scale subresource. -message ScaleStatus { - // actual number of observed instances of the scaled object. - optional int32 replicas = 1; - - // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors - // +optional - map selector = 2; - - // 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 - // +optional - optional string targetSelector = 3; -} - -// 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. - // +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/vendor/k8s.io/api/networking/OWNERS b/vendor/k8s.io/api/networking/OWNERS deleted file mode 100755 index 0e696c0f..00000000 --- a/vendor/k8s.io/api/networking/OWNERS +++ /dev/null @@ -1,5 +0,0 @@ -reviewers: -- caseydavenport -- cmluciano -- danwinship -- thockin diff --git a/vendor/k8s.io/api/networking/v1/generated.proto b/vendor/k8s.io/api/networking/v1/generated.proto deleted file mode 100644 index f52343cf..00000000 --- a/vendor/k8s.io/api/networking/v1/generated.proto +++ /dev/null @@ -1,197 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "v1"; - -// 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. -message IPBlock { - // CIDR is a string representing the IP Block - // Valid examples are "192.168.1.1/24" - optional string cidr = 1; - - // Except is a slice of CIDRs that should not be included within an IP Block - // Valid examples are "192.168.1.1/24" - // Except values will be rejected if they are outside the CIDR range - // +optional - repeated string except = 2; -} - -// NetworkPolicy describes what network traffic is allowed for a set of Pods -message NetworkPolicy { - // 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; - - // Specification of the desired behavior for this NetworkPolicy. - // +optional - optional NetworkPolicySpec spec = 2; -} - -// NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods -// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. -// This type is beta-level in 1.8 -message NetworkPolicyEgressRule { - // List of destination ports for outgoing traffic. - // Each item in this list is combined using a logical OR. If this field is - // empty or missing, this rule matches all ports (traffic not restricted by port). - // If this field is present and contains at least one item, then this rule allows - // traffic only if the traffic matches at least one port in the list. - // +optional - repeated NetworkPolicyPort ports = 1; - - // List of destinations for outgoing traffic of pods selected for this rule. - // Items in this list are combined using a logical OR operation. If this field is - // empty or missing, this rule matches all destinations (traffic not restricted by - // destination). If this field is present and contains at least one item, this rule - // allows traffic only if the traffic matches at least one item in the to list. - // +optional - repeated NetworkPolicyPeer to = 2; -} - -// NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods -// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from. -message NetworkPolicyIngressRule { - // List of ports which should be made accessible on the pods selected for this - // rule. Each item in this list is combined using a logical OR. If this field is - // empty or missing, this rule matches all ports (traffic not restricted by port). - // If this field is present and contains at least one item, then this rule allows - // traffic only if the traffic matches at least one port in the list. - // +optional - repeated NetworkPolicyPort ports = 1; - - // List of sources which should be able to access the pods selected for this rule. - // Items in this list are combined using a logical OR operation. If this field is - // empty or missing, this rule matches all sources (traffic not restricted by - // source). If this field is present and contains at least on item, this rule - // allows traffic only if the traffic matches at least one item in the from list. - // +optional - repeated NetworkPolicyPeer from = 2; -} - -// NetworkPolicyList is a list of NetworkPolicy objects. -message NetworkPolicyList { - // 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 NetworkPolicy items = 2; -} - -// 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. 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 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. If this field is set then - // neither of the other fields can be. - // +optional - optional IPBlock ipBlock = 3; -} - -// NetworkPolicyPort describes a port to allow traffic on -message NetworkPolicyPort { - // The protocol (TCP or UDP) which traffic must match. If not specified, this - // field defaults to TCP. - // +optional - optional string protocol = 1; - - // The port on the given protocol. This can either be a numerical or named port on - // a pod. If this field is not provided, this matches all port names and numbers. - // +optional - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2; -} - -// NetworkPolicySpec provides the specification of a NetworkPolicy -message NetworkPolicySpec { - // Selects the pods to which this NetworkPolicy object applies. The array of - // ingress rules is applied to any pods selected by this field. Multiple network - // policies can select the same set of pods. In this case, the ingress rules for - // each are combined additively. This field is NOT optional and follows standard - // label selector semantics. An empty podSelector matches all pods in this - // namespace. - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1; - - // List of ingress rules to be applied to the selected pods. Traffic is allowed to - // a pod if there are no NetworkPolicies selecting the pod - // (and cluster policy otherwise allows the traffic), OR if the traffic source is - // the pod's local node, OR if the traffic matches at least one ingress rule - // across all of the NetworkPolicy objects whose podSelector matches the pod. If - // this field is empty then this NetworkPolicy does not allow any traffic (and serves - // solely to ensure that the pods it selects are isolated by default) - // +optional - repeated NetworkPolicyIngressRule ingress = 2; - - // List of egress rules to be applied to the selected pods. Outgoing traffic is - // allowed if there are no NetworkPolicies selecting the pod (and cluster policy - // otherwise allows the traffic), OR if the traffic matches at least one egress rule - // across all of the NetworkPolicy objects whose podSelector matches the pod. If - // this field is empty then this NetworkPolicy limits all outgoing traffic (and serves - // solely to ensure that the pods it selects are isolated by default). - // This field is beta-level in 1.8 - // +optional - repeated NetworkPolicyEgressRule egress = 3; - - // List of rule types that the NetworkPolicy relates to. - // Valid options are Ingress, Egress, or Ingress,Egress. - // If this field is not specified, it will default based on the existence of Ingress or Egress rules; - // policies that contain an Egress section are assumed to affect Egress, and all policies - // (whether or not they contain an Ingress section) are assumed to affect Ingress. - // If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. - // Likewise, if you want to write a policy that specifies that no egress is allowed, - // you must specify a policyTypes value that include "Egress" (since such a policy would not include - // an Egress section and would otherwise default to just [ "Ingress" ]). - // This field is beta-level in 1.8 - // +optional - repeated string policyTypes = 4; -} - diff --git a/vendor/k8s.io/api/policy/OWNERS b/vendor/k8s.io/api/policy/OWNERS deleted file mode 100755 index a245fde3..00000000 --- a/vendor/k8s.io/api/policy/OWNERS +++ /dev/null @@ -1,8 +0,0 @@ -approvers: -- sig-apps-api-approvers -reviewers: -- sig-apps-reviewers -- pweil- -- liggitt -- tallclair -- php-coder diff --git a/vendor/k8s.io/api/policy/v1beta1/generated.proto b/vendor/k8s.io/api/policy/v1beta1/generated.proto deleted file mode 100644 index 1a14d946..00000000 --- a/vendor/k8s.io/api/policy/v1beta1/generated.proto +++ /dev/null @@ -1,334 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.policy.v1beta1; - -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"; - -// 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. -message Eviction { - // ObjectMeta describes the pod that is being evicted. - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // DeleteOptions may be provided - 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; - - // Specification of the desired behavior of the PodDisruptionBudget. - optional PodDisruptionBudgetSpec spec = 2; - - // Most recently observed status of the PodDisruptionBudget. - optional PodDisruptionBudgetStatus status = 3; -} - -// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. -message PodDisruptionBudgetList { - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - repeated PodDisruptionBudget items = 2; -} - -// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. -message PodDisruptionBudgetSpec { - // An eviction is allowed if at least "minAvailable" pods selected by - // "selector" will still be available after the eviction, i.e. even in the - // absence of the evicted pod. So for example you can prevent all voluntary - // evictions by specifying "100%". - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString minAvailable = 1; - - // Label query over pods whose evictions are managed by the disruption - // budget. - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; - - // An eviction is allowed if at most "maxUnavailable" pods selected by - // "selector" are unavailable after the eviction, i.e. even in absence of - // the evicted pod. For example, one can prevent all voluntary evictions - // by specifying 0. This is a mutually exclusive setting with "minAvailable". - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 3; -} - -// PodDisruptionBudgetStatus represents information about the status of a -// PodDisruptionBudget. Status may trail the actual state of a system. -message PodDisruptionBudgetStatus { - // Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other - // status informatio is valid only if observedGeneration equals to PDB's object generation. - // +optional - optional int64 observedGeneration = 1; - - // DisruptedPods contains information about pods whose eviction was - // processed by the API server eviction subresource handler but has not - // yet been observed by the PodDisruptionBudget controller. - // A pod will be in this map from the time when the API server processed the - // eviction request to the time when the pod is seen by PDB controller - // as having been marked for deletion (or after a timeout). The key in the map is the name of the pod - // and the value is the time when the API server processed the eviction request. If - // the deletion didn't occur and a pod is still there it will be removed from - // 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. - map disruptedPods = 2; - - // Number of pod disruptions that are currently allowed. - optional int32 disruptionsAllowed = 3; - - // current number of healthy pods - optional int32 currentHealthy = 4; - - // minimum desired number of healthy pods - optional int32 desiredHealthy = 5; - - // total number of pods counted by this disruption budget - 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/vendor/k8s.io/api/rbac/OWNERS b/vendor/k8s.io/api/rbac/OWNERS deleted file mode 100755 index 1aefde04..00000000 --- a/vendor/k8s.io/api/rbac/OWNERS +++ /dev/null @@ -1,17 +0,0 @@ -reviewers: -- thockin -- lavalamp -- smarterclayton -- deads2k -- sttts -- ncdc -- dims -- krousey -- mml -- mbohlool -- david-mcmahon -- ericchiang -- lixiaobing10051267 -- jianhuiz -- liggitt -- enj diff --git a/vendor/k8s.io/api/rbac/v1/generated.proto b/vendor/k8s.io/api/rbac/v1/generated.proto deleted file mode 100644 index 78aca15b..00000000 --- a/vendor/k8s.io/api/rbac/v1/generated.proto +++ /dev/null @@ -1,199 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; - -// AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole -message AggregationRule { - // 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 - // +optional - repeated k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector clusterRoleSelectors = 1; -} - -// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. -message ClusterRole { - // Standard object's metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Rules holds all the PolicyRules for this ClusterRole - repeated PolicyRule rules = 2; - - // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. - // If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be - // stomped by the controller. - // +optional - optional AggregationRule aggregationRule = 3; -} - -// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, -// and adds who information via Subject. -message ClusterRoleBinding { - // Standard object's metadata. - // +optional - 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. - // If the RoleRef cannot be resolved, the Authorizer must return an error. - optional RoleRef roleRef = 3; -} - -// ClusterRoleBindingList is a collection of ClusterRoleBindings -message ClusterRoleBindingList { - // Standard object's metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is a list of ClusterRoleBindings - repeated ClusterRoleBinding items = 2; -} - -// ClusterRoleList is a collection of ClusterRoles -message ClusterRoleList { - // Standard object's metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is a list of ClusterRoles - repeated ClusterRole items = 2; -} - -// PolicyRule holds information that describes a policy rule, but does not contain information -// about who the rule applies to or which namespace the rule applies to. -message PolicyRule { - // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. - repeated string verbs = 1; - - // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of - // the enumerated resources in any API group will be allowed. - // +optional - repeated string apiGroups = 2; - - // Resources is a list of resources this rule applies to. ResourceAll represents all resources. - // +optional - repeated string resources = 3; - - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - // +optional - repeated string resourceNames = 4; - - // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path - // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. - // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. - // +optional - repeated string nonResourceURLs = 5; -} - -// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. -message Role { - // Standard object's metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Rules holds all the PolicyRules for this Role - repeated PolicyRule rules = 2; -} - -// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. -// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given -// namespace only have effect in that namespace. -message RoleBinding { - // Standard object's metadata. - // +optional - 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. - // If the RoleRef cannot be resolved, the Authorizer must return an error. - optional RoleRef roleRef = 3; -} - -// RoleBindingList is a collection of RoleBindings -message RoleBindingList { - // Standard object's metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is a list of RoleBindings - repeated RoleBinding items = 2; -} - -// RoleList is a collection of Roles -message RoleList { - // Standard object's metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is a list of Roles - repeated Role items = 2; -} - -// RoleRef contains information that points to the role being used -message RoleRef { - // APIGroup is the group for the resource being referenced - optional string apiGroup = 1; - - // Kind is the type of resource being referenced - optional string kind = 2; - - // Name is the name of resource being referenced - optional string name = 3; -} - -// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, -// or a value for non-objects such as user and group names. -message Subject { - // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". - // If the Authorizer does not recognized the kind value, the Authorizer should report an error. - optional string kind = 1; - - // APIGroup holds the API group of the referenced subject. - // Defaults to "" for ServiceAccount subjects. - // Defaults to "rbac.authorization.k8s.io" for User and Group subjects. - // +optional - optional string apiGroup = 2; - - // Name of the object being referenced. - optional string name = 3; - - // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty - // the Authorizer should report an error. - // +optional - optional string namespace = 4; -} - diff --git a/vendor/k8s.io/api/rbac/v1alpha1/generated.proto b/vendor/k8s.io/api/rbac/v1alpha1/generated.proto deleted file mode 100644 index d7b29486..00000000 --- a/vendor/k8s.io/api/rbac/v1alpha1/generated.proto +++ /dev/null @@ -1,200 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; - -// AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole -message AggregationRule { - // 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 - // +optional - repeated k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector clusterRoleSelectors = 1; -} - -// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. -message ClusterRole { - // Standard object's metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Rules holds all the PolicyRules for this ClusterRole - repeated PolicyRule rules = 2; - - // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. - // If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be - // stomped by the controller. - // +optional - optional AggregationRule aggregationRule = 3; -} - -// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, -// and adds who information via Subject. -message ClusterRoleBinding { - // Standard object's metadata. - // +optional - 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. - // If the RoleRef cannot be resolved, the Authorizer must return an error. - optional RoleRef roleRef = 3; -} - -// ClusterRoleBindingList is a collection of ClusterRoleBindings -message ClusterRoleBindingList { - // Standard object's metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is a list of ClusterRoleBindings - repeated ClusterRoleBinding items = 2; -} - -// ClusterRoleList is a collection of ClusterRoles -message ClusterRoleList { - // Standard object's metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is a list of ClusterRoles - repeated ClusterRole items = 2; -} - -// PolicyRule holds information that describes a policy rule, but does not contain information -// about who the rule applies to or which namespace the rule applies to. -message PolicyRule { - // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. - repeated string verbs = 1; - - // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of - // the enumerated resources in any API group will be allowed. - // +optional - repeated string apiGroups = 3; - - // Resources is a list of resources this rule applies to. ResourceAll represents all resources. - // +optional - repeated string resources = 4; - - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - // +optional - repeated string resourceNames = 5; - - // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path - // This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. - // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. - // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. - // +optional - repeated string nonResourceURLs = 6; -} - -// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. -message Role { - // Standard object's metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Rules holds all the PolicyRules for this Role - repeated PolicyRule rules = 2; -} - -// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. -// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given -// namespace only have effect in that namespace. -message RoleBinding { - // Standard object's metadata. - // +optional - 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. - // If the RoleRef cannot be resolved, the Authorizer must return an error. - optional RoleRef roleRef = 3; -} - -// RoleBindingList is a collection of RoleBindings -message RoleBindingList { - // Standard object's metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is a list of RoleBindings - repeated RoleBinding items = 2; -} - -// RoleList is a collection of Roles -message RoleList { - // Standard object's metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is a list of Roles - repeated Role items = 2; -} - -// RoleRef contains information that points to the role being used -message RoleRef { - // APIGroup is the group for the resource being referenced - optional string apiGroup = 1; - - // Kind is the type of resource being referenced - optional string kind = 2; - - // Name is the name of resource being referenced - optional string name = 3; -} - -// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, -// or a value for non-objects such as user and group names. -message Subject { - // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". - // If the Authorizer does not recognized the kind value, the Authorizer should report an error. - optional string kind = 1; - - // APIVersion holds the API group and version of the referenced subject. - // Defaults to "v1" for ServiceAccount subjects. - // Defaults to "rbac.authorization.k8s.io/v1alpha1" for User and Group subjects. - // +k8s:conversion-gen=false - // +optional - optional string apiVersion = 2; - - // Name of the object being referenced. - optional string name = 3; - - // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty - // the Authorizer should report an error. - // +optional - optional string namespace = 4; -} - diff --git a/vendor/k8s.io/api/rbac/v1beta1/generated.proto b/vendor/k8s.io/api/rbac/v1beta1/generated.proto deleted file mode 100644 index 494aff8b..00000000 --- a/vendor/k8s.io/api/rbac/v1beta1/generated.proto +++ /dev/null @@ -1,200 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; - -// AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole -message AggregationRule { - // 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 - // +optional - repeated k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector clusterRoleSelectors = 1; -} - -// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. -message ClusterRole { - // Standard object's metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Rules holds all the PolicyRules for this ClusterRole - repeated PolicyRule rules = 2; - - // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. - // If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be - // stomped by the controller. - // +optional - optional AggregationRule aggregationRule = 3; -} - -// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, -// and adds who information via Subject. -message ClusterRoleBinding { - // Standard object's metadata. - // +optional - 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. - // If the RoleRef cannot be resolved, the Authorizer must return an error. - optional RoleRef roleRef = 3; -} - -// ClusterRoleBindingList is a collection of ClusterRoleBindings -message ClusterRoleBindingList { - // Standard object's metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is a list of ClusterRoleBindings - repeated ClusterRoleBinding items = 2; -} - -// ClusterRoleList is a collection of ClusterRoles -message ClusterRoleList { - // Standard object's metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is a list of ClusterRoles - repeated ClusterRole items = 2; -} - -// PolicyRule holds information that describes a policy rule, but does not contain information -// about who the rule applies to or which namespace the rule applies to. -message PolicyRule { - // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. - repeated string verbs = 1; - - // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of - // the enumerated resources in any API group will be allowed. - // +optional - repeated string apiGroups = 2; - - // Resources is a list of resources this rule applies to. '*' represents all resources in the specified apiGroups. - // '*/foo' represents the subresource 'foo' for all resources in the specified apiGroups. - // +optional - repeated string resources = 3; - - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - // +optional - repeated string resourceNames = 4; - - // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path - // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. - // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. - // +optional - repeated string nonResourceURLs = 5; -} - -// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. -message Role { - // Standard object's metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Rules holds all the PolicyRules for this Role - repeated PolicyRule rules = 2; -} - -// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. -// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given -// namespace only have effect in that namespace. -message RoleBinding { - // Standard object's metadata. - // +optional - 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. - // If the RoleRef cannot be resolved, the Authorizer must return an error. - optional RoleRef roleRef = 3; -} - -// RoleBindingList is a collection of RoleBindings -message RoleBindingList { - // Standard object's metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is a list of RoleBindings - repeated RoleBinding items = 2; -} - -// RoleList is a collection of Roles -message RoleList { - // Standard object's metadata. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is a list of Roles - repeated Role items = 2; -} - -// RoleRef contains information that points to the role being used -message RoleRef { - // APIGroup is the group for the resource being referenced - optional string apiGroup = 1; - - // Kind is the type of resource being referenced - optional string kind = 2; - - // Name is the name of resource being referenced - optional string name = 3; -} - -// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, -// or a value for non-objects such as user and group names. -message Subject { - // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". - // If the Authorizer does not recognized the kind value, the Authorizer should report an error. - optional string kind = 1; - - // APIGroup holds the API group of the referenced subject. - // Defaults to "" for ServiceAccount subjects. - // Defaults to "rbac.authorization.k8s.io" for User and Group subjects. - // +optional - optional string apiGroup = 2; - - // Name of the object being referenced. - optional string name = 3; - - // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty - // the Authorizer should report an error. - // +optional - optional string namespace = 4; -} - diff --git a/vendor/k8s.io/api/roundtrip_test.go b/vendor/k8s.io/api/roundtrip_test.go deleted file mode 100644 index 0c79c3eb..00000000 --- a/vendor/k8s.io/api/roundtrip_test.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -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/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto b/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto deleted file mode 100644 index 7dc5cc84..00000000 --- a/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto +++ /dev/null @@ -1,68 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; - -// 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/vendor/k8s.io/api/scheduling/v1beta1/generated.proto b/vendor/k8s.io/api/scheduling/v1beta1/generated.proto deleted file mode 100644 index fe7f21de..00000000 --- a/vendor/k8s.io/api/scheduling/v1beta1/generated.proto +++ /dev/null @@ -1,68 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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"; -import "k8s.io/apimachinery/pkg/util/intstr/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/vendor/k8s.io/api/settings/v1alpha1/generated.proto b/vendor/k8s.io/api/settings/v1alpha1/generated.proto deleted file mode 100644 index 887d2fa1..00000000 --- a/vendor/k8s.io/api/settings/v1alpha1/generated.proto +++ /dev/null @@ -1,76 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.settings.v1alpha1; - -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"; - -// PodPreset is a policy resource that defines additional runtime -// requirements for a Pod. -message PodPreset { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // +optional - optional PodPresetSpec spec = 2; -} - -// PodPresetList is a list of PodPreset objects. -message PodPresetList { - // 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 PodPreset items = 2; -} - -// PodPresetSpec is a description of a pod preset. -message PodPresetSpec { - // Selector is a label query over a set of resources, in this case pods. - // Required. - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1; - - // Env defines the collection of EnvVar to inject into containers. - // +optional - repeated k8s.io.api.core.v1.EnvVar env = 2; - - // EnvFrom defines the collection of EnvFromSource to inject into containers. - // +optional - repeated k8s.io.api.core.v1.EnvFromSource envFrom = 3; - - // Volumes defines the collection of Volume to inject into the pod. - // +optional - repeated k8s.io.api.core.v1.Volume volumes = 4; - - // VolumeMounts defines the collection of VolumeMount to inject into containers. - // +optional - repeated k8s.io.api.core.v1.VolumeMount volumeMounts = 5; -} - diff --git a/vendor/k8s.io/api/storage/OWNERS b/vendor/k8s.io/api/storage/OWNERS deleted file mode 100755 index d59ed6e1..00000000 --- a/vendor/k8s.io/api/storage/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -reviewers: -- deads2k -- mbohlool diff --git a/vendor/k8s.io/api/storage/v1/generated.proto b/vendor/k8s.io/api/storage/v1/generated.proto deleted file mode 100644 index cff64221..00000000 --- a/vendor/k8s.io/api/storage/v1/generated.proto +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.storage.v1; - -import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/api/storage/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 = "v1"; - -// StorageClass describes the parameters for a class of storage for -// which PersistentVolumes can be dynamically provisioned. -// -// StorageClasses are non-namespaced; the name of the storage class -// according to etcd is in ObjectMeta.Name. -message StorageClass { - // 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; - - // Provisioner indicates the type of the provisioner. - optional string provisioner = 2; - - // Parameters holds the parameters for the provisioner that should - // create volumes of this storage class. - // +optional - map parameters = 3; - - // Dynamically provisioned PersistentVolumes of this storage class are - // created with this reclaimPolicy. Defaults to Delete. - // +optional - optional string reclaimPolicy = 4; - - // 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. - // +optional - repeated string mountOptions = 5; - - // AllowVolumeExpansion shows whether the storage class allow volume expand - // +optional - optional bool allowVolumeExpansion = 6; - - // 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. - // +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. -message StorageClassList { - // 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 StorageClasses - repeated StorageClass items = 2; -} - diff --git a/vendor/k8s.io/api/storage/v1alpha1/generated.proto b/vendor/k8s.io/api/storage/v1alpha1/generated.proto deleted file mode 100644 index 2f792a06..00000000 --- a/vendor/k8s.io/api/storage/v1alpha1/generated.proto +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; - -// VolumeAttachment captures the intent to attach or detach the specified volume -// to/from the specified node. -// -// VolumeAttachment objects are non-namespaced. -message VolumeAttachment { - // Standard object 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; - - // Specification of the desired attach/detach volume behavior. - // Populated by the Kubernetes system. - optional VolumeAttachmentSpec spec = 2; - - // Status of the VolumeAttachment request. - // Populated by the entity completing the attach or detach - // operation, i.e. the external-attacher. - // +optional - optional VolumeAttachmentStatus status = 3; -} - -// VolumeAttachmentList is a collection of VolumeAttachment objects. -message VolumeAttachmentList { - // 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 VolumeAttachments - repeated VolumeAttachment items = 2; -} - -// VolumeAttachmentSource represents a volume that should be attached. -// Right now only PersistenVolumes can be attached via external attacher, -// in future we may allow also inline volumes in pods. -// Exactly one member can be set. -message VolumeAttachmentSource { - // Name of the persistent volume to attach. - // +optional - optional string persistentVolumeName = 1; -} - -// VolumeAttachmentSpec is the specification of a VolumeAttachment request. -message VolumeAttachmentSpec { - // Attacher indicates the name of the volume driver that MUST handle this - // request. This is the name returned by GetPluginName(). - optional string attacher = 1; - - // Source represents the volume that should be attached. - optional VolumeAttachmentSource source = 2; - - // The node that the volume should be attached to. - optional string nodeName = 3; -} - -// VolumeAttachmentStatus is the status of a VolumeAttachment request. -message VolumeAttachmentStatus { - // Indicates the volume is successfully attached. - // This field must only be set by the entity completing the attach - // operation, i.e. the external-attacher. - optional bool attached = 1; - - // Upon successful attach, this field is populated with any - // information returned by the attach operation that must be passed - // into subsequent WaitForAttach or Mount calls. - // This field must only be set by the entity completing the attach - // operation, i.e. the external-attacher. - // +optional - map attachmentMetadata = 2; - - // The last error encountered during attach operation, if any. - // This field must only be set by the entity completing the attach - // operation, i.e. the external-attacher. - // +optional - optional VolumeError attachError = 3; - - // The last error encountered during detach operation, if any. - // This field must only be set by the entity completing the detach - // operation, i.e. the external-attacher. - // +optional - optional VolumeError detachError = 4; -} - -// VolumeError captures an error encountered during a volume operation. -message VolumeError { - // Time the error was encountered. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time time = 1; - - // String detailing the error encountered during Attach or Detach operation. - // This string maybe logged, so it should not contain sensitive - // information. - // +optional - optional string message = 2; -} - diff --git a/vendor/k8s.io/api/storage/v1beta1/generated.proto b/vendor/k8s.io/api/storage/v1beta1/generated.proto deleted file mode 100644 index 32032b1a..00000000 --- a/vendor/k8s.io/api/storage/v1beta1/generated.proto +++ /dev/null @@ -1,190 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; - -// StorageClass describes the parameters for a class of storage for -// which PersistentVolumes can be dynamically provisioned. -// -// StorageClasses are non-namespaced; the name of the storage class -// according to etcd is in ObjectMeta.Name. -message StorageClass { - // 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; - - // Provisioner indicates the type of the provisioner. - optional string provisioner = 2; - - // Parameters holds the parameters for the provisioner that should - // create volumes of this storage class. - // +optional - map parameters = 3; - - // Dynamically provisioned PersistentVolumes of this storage class are - // created with this reclaimPolicy. Defaults to Delete. - // +optional - optional string reclaimPolicy = 4; - - // 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. - // +optional - repeated string mountOptions = 5; - - // AllowVolumeExpansion shows whether the storage class allow volume expand - // +optional - optional bool allowVolumeExpansion = 6; - - // 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. - // +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. -message StorageClassList { - // 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 StorageClasses - repeated StorageClass items = 2; -} - -// VolumeAttachment captures the intent to attach or detach the specified volume -// to/from the specified node. -// -// VolumeAttachment objects are non-namespaced. -message VolumeAttachment { - // Standard object 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; - - // Specification of the desired attach/detach volume behavior. - // Populated by the Kubernetes system. - optional VolumeAttachmentSpec spec = 2; - - // Status of the VolumeAttachment request. - // Populated by the entity completing the attach or detach - // operation, i.e. the external-attacher. - // +optional - optional VolumeAttachmentStatus status = 3; -} - -// VolumeAttachmentList is a collection of VolumeAttachment objects. -message VolumeAttachmentList { - // 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 VolumeAttachments - repeated VolumeAttachment items = 2; -} - -// VolumeAttachmentSource represents a volume that should be attached. -// Right now only PersistenVolumes can be attached via external attacher, -// in future we may allow also inline volumes in pods. -// Exactly one member can be set. -message VolumeAttachmentSource { - // Name of the persistent volume to attach. - // +optional - optional string persistentVolumeName = 1; -} - -// VolumeAttachmentSpec is the specification of a VolumeAttachment request. -message VolumeAttachmentSpec { - // Attacher indicates the name of the volume driver that MUST handle this - // request. This is the name returned by GetPluginName(). - optional string attacher = 1; - - // Source represents the volume that should be attached. - optional VolumeAttachmentSource source = 2; - - // The node that the volume should be attached to. - optional string nodeName = 3; -} - -// VolumeAttachmentStatus is the status of a VolumeAttachment request. -message VolumeAttachmentStatus { - // Indicates the volume is successfully attached. - // This field must only be set by the entity completing the attach - // operation, i.e. the external-attacher. - optional bool attached = 1; - - // Upon successful attach, this field is populated with any - // information returned by the attach operation that must be passed - // into subsequent WaitForAttach or Mount calls. - // This field must only be set by the entity completing the attach - // operation, i.e. the external-attacher. - // +optional - map attachmentMetadata = 2; - - // The last error encountered during attach operation, if any. - // This field must only be set by the entity completing the attach - // operation, i.e. the external-attacher. - // +optional - optional VolumeError attachError = 3; - - // The last error encountered during detach operation, if any. - // This field must only be set by the entity completing the detach - // operation, i.e. the external-attacher. - // +optional - optional VolumeError detachError = 4; -} - -// VolumeError captures an error encountered during a volume operation. -message VolumeError { - // Time the error was encountered. - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time time = 1; - - // String detailing the error encountered during Attach or Detach operation. - // This string maybe logged, so it should not contain sensitive - // information. - // +optional - optional string message = 2; -} - diff --git a/vendor/k8s.io/apiextensions-apiserver/CONTRIBUTING.md b/vendor/k8s.io/apiextensions-apiserver/CONTRIBUTING.md deleted file mode 100644 index d8ad4d2d..00000000 --- a/vendor/k8s.io/apiextensions-apiserver/CONTRIBUTING.md +++ /dev/null @@ -1,7 +0,0 @@ -# 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. - -This repository is published from [kubernetes/kubernetes/staging/src/k8s.io/apiextensions-apiserver](https://git.k8s.io/kubernetes/staging/src/k8s.io/apiextensions-apiserver) by the [kubernetes publishing-bot](https://git.k8s.io/publishing-bot). - -Please see [Staging Directory and Publishing](https://git.k8s.io/community/contributors/devel/staging.md) for more information diff --git a/vendor/k8s.io/apiextensions-apiserver/OWNERS b/vendor/k8s.io/apiextensions-apiserver/OWNERS deleted file mode 100644 index d9cb557f..00000000 --- a/vendor/k8s.io/apiextensions-apiserver/OWNERS +++ /dev/null @@ -1,9 +0,0 @@ -reviewers: -- deads2k -- sttts -- enisoc -- mbohlool -approvers: -- deads2k -- lavalamp -- sttts diff --git a/vendor/k8s.io/apiextensions-apiserver/README.md b/vendor/k8s.io/apiextensions-apiserver/README.md deleted file mode 100644 index be75b9ba..00000000 --- a/vendor/k8s.io/apiextensions-apiserver/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# apiextensions-apiserver - -Implements: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/thirdpartyresources.md - -It provides an API for registering `CustomResourceDefinitions`. - -## Purpose - -This API server provides the implementation for `CustomResourceDefinitions` which is included as -delegate server inside of `kube-apiserver`. - - -## Compatibility - -HEAD of this repo will match HEAD of k8s.io/apiserver, k8s.io/apimachinery, and k8s.io/client-go. - -## Where does it come from? - -`apiextensions-apiserver` is synced from https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiextensions-apiserver. -Code changes are made in that location, merged into `k8s.io/kubernetes` and later synced here. diff --git a/vendor/k8s.io/apiextensions-apiserver/SECURITY_CONTACTS b/vendor/k8s.io/apiextensions-apiserver/SECURITY_CONTACTS deleted file mode 100644 index 0648a8eb..00000000 --- a/vendor/k8s.io/apiextensions-apiserver/SECURITY_CONTACTS +++ /dev/null @@ -1,17 +0,0 @@ -# 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/vendor/k8s.io/apiextensions-apiserver/code-of-conduct.md b/vendor/k8s.io/apiextensions-apiserver/code-of-conduct.md deleted file mode 100644 index 0d15c00c..00000000 --- a/vendor/k8s.io/apiextensions-apiserver/code-of-conduct.md +++ /dev/null @@ -1,3 +0,0 @@ -# Kubernetes Community Code of Conduct - -Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/features/OWNERS b/vendor/k8s.io/apiextensions-apiserver/pkg/features/OWNERS deleted file mode 100644 index fe7b0144..00000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/features/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -approvers: -- feature-approvers diff --git a/vendor/k8s.io/apimachinery/CONTRIBUTING.md b/vendor/k8s.io/apimachinery/CONTRIBUTING.md deleted file mode 100644 index 6a50b562..00000000 --- a/vendor/k8s.io/apimachinery/CONTRIBUTING.md +++ /dev/null @@ -1,7 +0,0 @@ -# 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. - -This repository is published from [kubernetes/kubernetes/staging/src/k8s.io/apimachinery](https://git.k8s.io/kubernetes/staging/src/k8s.io/apimachinery) by the [kubernetes publishing-bot](https://git.k8s.io/publishing-bot). - -Please see [Staging Directory and Publishing](https://git.k8s.io/community/contributors/devel/staging.md) for more information diff --git a/vendor/k8s.io/apimachinery/OWNERS b/vendor/k8s.io/apimachinery/OWNERS deleted file mode 100644 index 7069eeb0..00000000 --- a/vendor/k8s.io/apimachinery/OWNERS +++ /dev/null @@ -1,21 +0,0 @@ -approvers: -- lavalamp -- smarterclayton -- deads2k -- sttts -- liggitt -- caesarxuchao -reviewers: -- thockin -- lavalamp -- smarterclayton -- wojtek-t -- deads2k -- derekwaynecarr -- caesarxuchao -- mikedanese -- liggitt -- gmarek -- sttts -- ncdc -- tallclair diff --git a/vendor/k8s.io/apimachinery/README.md b/vendor/k8s.io/apimachinery/README.md deleted file mode 100644 index 258250ce..00000000 --- a/vendor/k8s.io/apimachinery/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# apimachinery - -Scheme, typing, encoding, decoding, and conversion packages for Kubernetes and Kubernetes-like API objects. - - -## Purpose - -This library is a shared dependency for servers and clients to work with Kubernetes API infrastructure without direct -type dependencies. Its first consumers are `k8s.io/kubernetes`, `k8s.io/client-go`, and `k8s.io/apiserver`. - - -## Compatibility - -There are *NO compatibility guarantees* for this repository. It is in direct support of Kubernetes, so branches -will track Kubernetes and be compatible with that repo. As we more cleanly separate the layers, we will review the -compatibility guarantee. - - -## Where does it come from? - -`apimachinery` is synced from https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery. -Code changes are made in that location, merged into `k8s.io/kubernetes` and later synced here. - - -## Things you should *NOT* do - - 1. Add API types to this repo. This is for the machinery, not for the types. - 2. Directly modify any files under `pkg` in this repo. Those are driven from `k8s.io/kubernetes/staging/src/k8s.io/apimachinery`. - 3. Expect compatibility. This repo is direct support of Kubernetes and the API isn't yet stable enough for API guarantees. diff --git a/vendor/k8s.io/apimachinery/SECURITY_CONTACTS b/vendor/k8s.io/apimachinery/SECURITY_CONTACTS deleted file mode 100644 index 0648a8eb..00000000 --- a/vendor/k8s.io/apimachinery/SECURITY_CONTACTS +++ /dev/null @@ -1,17 +0,0 @@ -# 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/vendor/k8s.io/apimachinery/code-of-conduct.md b/vendor/k8s.io/apimachinery/code-of-conduct.md deleted file mode 100644 index 0d15c00c..00000000 --- a/vendor/k8s.io/apimachinery/code-of-conduct.md +++ /dev/null @@ -1,3 +0,0 @@ -# Kubernetes Community Code of Conduct - -Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) diff --git a/vendor/k8s.io/apimachinery/pkg/OWNERS b/vendor/k8s.io/apimachinery/pkg/OWNERS deleted file mode 100644 index 63bb7814..00000000 --- a/vendor/k8s.io/apimachinery/pkg/OWNERS +++ /dev/null @@ -1,6 +0,0 @@ -approvers: -- caesarxuchao -- deads2k -- lavalamp -- smarterclayton -- liggitt diff --git a/vendor/k8s.io/apimachinery/pkg/api/errors/OWNERS b/vendor/k8s.io/apimachinery/pkg/api/errors/OWNERS deleted file mode 100755 index dc6a4c72..00000000 --- a/vendor/k8s.io/apimachinery/pkg/api/errors/OWNERS +++ /dev/null @@ -1,24 +0,0 @@ -reviewers: -- thockin -- lavalamp -- smarterclayton -- wojtek-t -- deads2k -- brendandburns -- derekwaynecarr -- caesarxuchao -- mikedanese -- liggitt -- nikhiljindal -- gmarek -- erictune -- saad-ali -- janetkuo -- tallclair -- eparis -- dims -- hongchaodeng -- krousey -- cjcullen -- david-mcmahon -- goltermann diff --git a/vendor/k8s.io/apimachinery/pkg/api/errors/errors_test.go b/vendor/k8s.io/apimachinery/pkg/api/errors/errors_test.go deleted file mode 100644 index 303a9d3f..00000000 --- a/vendor/k8s.io/apimachinery/pkg/api/errors/errors_test.go +++ /dev/null @@ -1,222 +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 errors - -import ( - "errors" - "fmt" - "reflect" - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/validation/field" -) - -func resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: "", Resource: resource} -} -func kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: "", Kind: kind} -} - -func TestErrorNew(t *testing.T) { - err := NewAlreadyExists(resource("tests"), "1") - if !IsAlreadyExists(err) { - t.Errorf("expected to be %s", metav1.StatusReasonAlreadyExists) - } - if IsConflict(err) { - t.Errorf("expected to not be %s", metav1.StatusReasonConflict) - } - if IsNotFound(err) { - t.Errorf(fmt.Sprintf("expected to not be %s", metav1.StatusReasonNotFound)) - } - if IsInvalid(err) { - t.Errorf("expected to not be %s", metav1.StatusReasonInvalid) - } - if IsBadRequest(err) { - t.Errorf("expected to not be %s", metav1.StatusReasonBadRequest) - } - if IsForbidden(err) { - t.Errorf("expected to not be %s", metav1.StatusReasonForbidden) - } - if IsServerTimeout(err) { - t.Errorf("expected to not be %s", metav1.StatusReasonServerTimeout) - } - if IsMethodNotSupported(err) { - t.Errorf("expected to not be %s", metav1.StatusReasonMethodNotAllowed) - } - - if !IsConflict(NewConflict(resource("tests"), "2", errors.New("message"))) { - t.Errorf("expected to be conflict") - } - if !IsNotFound(NewNotFound(resource("tests"), "3")) { - t.Errorf("expected to be %s", metav1.StatusReasonNotFound) - } - if !IsInvalid(NewInvalid(kind("Test"), "2", nil)) { - t.Errorf("expected to be %s", metav1.StatusReasonInvalid) - } - if !IsBadRequest(NewBadRequest("reason")) { - t.Errorf("expected to be %s", metav1.StatusReasonBadRequest) - } - if !IsForbidden(NewForbidden(resource("tests"), "2", errors.New("reason"))) { - t.Errorf("expected to be %s", metav1.StatusReasonForbidden) - } - if !IsUnauthorized(NewUnauthorized("reason")) { - t.Errorf("expected to be %s", metav1.StatusReasonUnauthorized) - } - if !IsServerTimeout(NewServerTimeout(resource("tests"), "reason", 0)) { - t.Errorf("expected to be %s", metav1.StatusReasonServerTimeout) - } - if !IsMethodNotSupported(NewMethodNotSupported(resource("foos"), "delete")) { - t.Errorf("expected to be %s", metav1.StatusReasonMethodNotAllowed) - } - - if time, ok := SuggestsClientDelay(NewServerTimeout(resource("tests"), "doing something", 10)); time != 10 || !ok { - t.Errorf("unexpected %d", time) - } - if time, ok := SuggestsClientDelay(NewServerTimeout(resource("tests"), "doing something", 0)); time != 0 || !ok { - t.Errorf("unexpected %d", time) - } - if time, ok := SuggestsClientDelay(NewTimeoutError("test reason", 10)); time != 10 || !ok { - t.Errorf("unexpected %d", time) - } - if time, ok := SuggestsClientDelay(NewTooManyRequests("doing something", 10)); time != 10 || !ok { - t.Errorf("unexpected %d", time) - } - if time, ok := SuggestsClientDelay(NewTooManyRequests("doing something", 1)); time != 1 || !ok { - t.Errorf("unexpected %d", time) - } - if time, ok := SuggestsClientDelay(NewGenericServerResponse(429, "get", resource("tests"), "test", "doing something", 10, true)); time != 10 || !ok { - t.Errorf("unexpected %d", time) - } - if time, ok := SuggestsClientDelay(NewGenericServerResponse(500, "get", resource("tests"), "test", "doing something", 10, true)); time != 10 || !ok { - t.Errorf("unexpected %d", time) - } - if time, ok := SuggestsClientDelay(NewGenericServerResponse(429, "get", resource("tests"), "test", "doing something", 0, true)); time != 0 || ok { - t.Errorf("unexpected %d", time) - } -} - -func TestNewInvalid(t *testing.T) { - testCases := []struct { - Err *field.Error - Details *metav1.StatusDetails - }{ - { - field.Duplicate(field.NewPath("field[0].name"), "bar"), - &metav1.StatusDetails{ - Kind: "Kind", - Name: "name", - Causes: []metav1.StatusCause{{ - Type: metav1.CauseTypeFieldValueDuplicate, - Field: "field[0].name", - }}, - }, - }, - { - field.Invalid(field.NewPath("field[0].name"), "bar", "detail"), - &metav1.StatusDetails{ - Kind: "Kind", - Name: "name", - Causes: []metav1.StatusCause{{ - Type: metav1.CauseTypeFieldValueInvalid, - Field: "field[0].name", - }}, - }, - }, - { - field.NotFound(field.NewPath("field[0].name"), "bar"), - &metav1.StatusDetails{ - Kind: "Kind", - Name: "name", - Causes: []metav1.StatusCause{{ - Type: metav1.CauseTypeFieldValueNotFound, - Field: "field[0].name", - }}, - }, - }, - { - field.NotSupported(field.NewPath("field[0].name"), "bar", nil), - &metav1.StatusDetails{ - Kind: "Kind", - Name: "name", - Causes: []metav1.StatusCause{{ - Type: metav1.CauseTypeFieldValueNotSupported, - Field: "field[0].name", - }}, - }, - }, - { - field.Required(field.NewPath("field[0].name"), ""), - &metav1.StatusDetails{ - Kind: "Kind", - Name: "name", - Causes: []metav1.StatusCause{{ - Type: metav1.CauseTypeFieldValueRequired, - Field: "field[0].name", - }}, - }, - }, - } - for i, testCase := range testCases { - vErr, expected := testCase.Err, testCase.Details - expected.Causes[0].Message = vErr.ErrorBody() - err := NewInvalid(kind("Kind"), "name", field.ErrorList{vErr}) - status := err.ErrStatus - if status.Code != 422 || status.Reason != metav1.StatusReasonInvalid { - t.Errorf("%d: unexpected status: %#v", i, status) - } - if !reflect.DeepEqual(expected, status.Details) { - t.Errorf("%d: expected %#v, got %#v", i, expected, status.Details) - } - } -} - -func TestReasonForError(t *testing.T) { - if e, a := metav1.StatusReasonUnknown, ReasonForError(nil); e != a { - t.Errorf("unexpected reason type: %#v", a) - } -} - -type TestType struct{} - -func (obj *TestType) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } -func (obj *TestType) DeepCopyObject() runtime.Object { - if obj == nil { - return nil - } - clone := *obj - return &clone -} - -func TestFromObject(t *testing.T) { - table := []struct { - obj runtime.Object - message string - }{ - {&metav1.Status{Message: "foobar"}, "foobar"}, - {&TestType{}, "unexpected object: &{}"}, - } - - for _, item := range table { - if e, a := item.message, FromObject(item.obj).Error(); e != a { - t.Errorf("Expected %v, got %v", e, a) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS b/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS deleted file mode 100755 index 5f729ffe..00000000 --- a/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS +++ /dev/null @@ -1,25 +0,0 @@ -reviewers: -- thockin -- smarterclayton -- wojtek-t -- deads2k -- brendandburns -- derekwaynecarr -- caesarxuchao -- mikedanese -- liggitt -- nikhiljindal -- gmarek -- janetkuo -- ncdc -- eparis -- dims -- krousey -- markturansky -- fabioy -- resouer -- david-mcmahon -- mfojtik -- jianhuiz -- feihujiang -- ghodss diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/meta_test.go b/vendor/k8s.io/apimachinery/pkg/api/meta/meta_test.go deleted file mode 100644 index 4680bae9..00000000 --- a/vendor/k8s.io/apimachinery/pkg/api/meta/meta_test.go +++ /dev/null @@ -1,51 +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 meta - -import ( - "math/rand" - "reflect" - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - metav1beta1 "k8s.io/apimachinery/pkg/apis/meta/v1beta1" - "k8s.io/apimachinery/pkg/util/diff" - - fuzz "github.com/google/gofuzz" -) - -func TestAsPartialObjectMetadata(t *testing.T) { - f := fuzz.New().NilChance(.5).NumElements(0, 1).RandSource(rand.NewSource(1)) - - for i := 0; i < 100; i++ { - m := &metav1.ObjectMeta{} - f.Fuzz(m) - partial := AsPartialObjectMetadata(m) - if !reflect.DeepEqual(&partial.ObjectMeta, m) { - t.Fatalf("incomplete partial object metadata: %s", diff.ObjectReflectDiff(&partial.ObjectMeta, m)) - } - } - - for i := 0; i < 100; i++ { - m := &metav1beta1.PartialObjectMetadata{} - f.Fuzz(&m.ObjectMeta) - partial := AsPartialObjectMetadata(m) - if !reflect.DeepEqual(&partial.ObjectMeta, &m.ObjectMeta) { - t.Fatalf("incomplete partial object metadata: %s", diff.ObjectReflectDiff(&partial.ObjectMeta, &m.ObjectMeta)) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/multirestmapper_test.go b/vendor/k8s.io/apimachinery/pkg/api/meta/multirestmapper_test.go deleted file mode 100644 index b71ca468..00000000 --- a/vendor/k8s.io/apimachinery/pkg/api/meta/multirestmapper_test.go +++ /dev/null @@ -1,391 +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 meta - -import ( - "errors" - "reflect" - "testing" - - "k8s.io/apimachinery/pkg/runtime/schema" -) - -func TestMultiRESTMapperResourceFor(t *testing.T) { - tcs := []struct { - name string - - mapper MultiRESTMapper - input schema.GroupVersionResource - result schema.GroupVersionResource - err error - }{ - { - name: "empty", - mapper: MultiRESTMapper{}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: schema.GroupVersionResource{}, - err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, - }, - { - name: "ignore not found", - mapper: MultiRESTMapper{fixedRESTMapper{err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "IGNORE_THIS"}}}}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: schema.GroupVersionResource{}, - err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, - }, - { - name: "accept first failure", - mapper: MultiRESTMapper{fixedRESTMapper{err: errors.New("fail on this")}, fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{{Resource: "unused"}}}}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: schema.GroupVersionResource{}, - err: errors.New("fail on this"), - }, - } - - for _, tc := range tcs { - actualResult, actualErr := tc.mapper.ResourceFor(tc.input) - if e, a := tc.result, actualResult; e != a { - t.Errorf("%s: expected %v, got %v", tc.name, e, a) - } - switch { - case tc.err == nil && actualErr == nil: - case tc.err == nil: - t.Errorf("%s: unexpected error: %v", tc.name, actualErr) - case actualErr == nil: - t.Errorf("%s: expected error: %v got nil", tc.name, tc.err) - case tc.err.Error() != actualErr.Error(): - t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) - } - } -} - -func TestMultiRESTMapperResourcesFor(t *testing.T) { - tcs := []struct { - name string - - mapper MultiRESTMapper - input schema.GroupVersionResource - result []schema.GroupVersionResource - err error - }{ - { - name: "empty", - mapper: MultiRESTMapper{}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: nil, - err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, - }, - { - name: "ignore not found", - mapper: MultiRESTMapper{fixedRESTMapper{err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "IGNORE_THIS"}}}}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: nil, - err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, - }, - { - name: "accept first failure", - mapper: MultiRESTMapper{fixedRESTMapper{err: errors.New("fail on this")}, fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{{Resource: "unused"}}}}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: nil, - err: errors.New("fail on this"), - }, - { - name: "union and dedup", - mapper: MultiRESTMapper{ - fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{{Resource: "dupe"}, {Resource: "first"}}}, - fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{{Resource: "dupe"}, {Resource: "second"}}}, - }, - input: schema.GroupVersionResource{Resource: "foo"}, - result: []schema.GroupVersionResource{{Resource: "dupe"}, {Resource: "first"}, {Resource: "second"}}, - }, - { - name: "skip not and continue", - mapper: MultiRESTMapper{ - fixedRESTMapper{err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "IGNORE_THIS"}}}, - fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{{Resource: "first"}, {Resource: "second"}}}, - }, - input: schema.GroupVersionResource{Resource: "foo"}, - result: []schema.GroupVersionResource{{Resource: "first"}, {Resource: "second"}}, - }, - } - - for _, tc := range tcs { - actualResult, actualErr := tc.mapper.ResourcesFor(tc.input) - if e, a := tc.result, actualResult; !reflect.DeepEqual(e, a) { - t.Errorf("%s: expected %v, got %v", tc.name, e, a) - } - switch { - case tc.err == nil && actualErr == nil: - case tc.err == nil: - t.Errorf("%s: unexpected error: %v", tc.name, actualErr) - case actualErr == nil: - t.Errorf("%s: expected error: %v got nil", tc.name, tc.err) - case tc.err.Error() != actualErr.Error(): - t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) - } - } -} - -func TestMultiRESTMapperKindsFor(t *testing.T) { - tcs := []struct { - name string - - mapper MultiRESTMapper - input schema.GroupVersionResource - result []schema.GroupVersionKind - err error - }{ - { - name: "empty", - mapper: MultiRESTMapper{}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: nil, - err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, - }, - { - name: "ignore not found", - mapper: MultiRESTMapper{fixedRESTMapper{err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "IGNORE_THIS"}}}}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: nil, - err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, - }, - { - name: "accept first failure", - mapper: MultiRESTMapper{fixedRESTMapper{err: errors.New("fail on this")}, fixedRESTMapper{kindsFor: []schema.GroupVersionKind{{Kind: "unused"}}}}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: nil, - err: errors.New("fail on this"), - }, - { - name: "union and dedup", - mapper: MultiRESTMapper{ - fixedRESTMapper{kindsFor: []schema.GroupVersionKind{{Kind: "dupe"}, {Kind: "first"}}}, - fixedRESTMapper{kindsFor: []schema.GroupVersionKind{{Kind: "dupe"}, {Kind: "second"}}}, - }, - input: schema.GroupVersionResource{Resource: "foo"}, - result: []schema.GroupVersionKind{{Kind: "dupe"}, {Kind: "first"}, {Kind: "second"}}, - }, - { - name: "skip not and continue", - mapper: MultiRESTMapper{ - fixedRESTMapper{err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "IGNORE_THIS"}}}, - fixedRESTMapper{kindsFor: []schema.GroupVersionKind{{Kind: "first"}, {Kind: "second"}}}, - }, - input: schema.GroupVersionResource{Resource: "foo"}, - result: []schema.GroupVersionKind{{Kind: "first"}, {Kind: "second"}}, - }, - } - - for _, tc := range tcs { - actualResult, actualErr := tc.mapper.KindsFor(tc.input) - if e, a := tc.result, actualResult; !reflect.DeepEqual(e, a) { - t.Errorf("%s: expected %v, got %v", tc.name, e, a) - } - switch { - case tc.err == nil && actualErr == nil: - case tc.err == nil: - t.Errorf("%s: unexpected error: %v", tc.name, actualErr) - case actualErr == nil: - t.Errorf("%s: expected error: %v got nil", tc.name, tc.err) - case tc.err.Error() != actualErr.Error(): - t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) - } - } -} - -func TestMultiRESTMapperKindFor(t *testing.T) { - tcs := []struct { - name string - - mapper MultiRESTMapper - input schema.GroupVersionResource - result schema.GroupVersionKind - err error - }{ - { - name: "empty", - mapper: MultiRESTMapper{}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: schema.GroupVersionKind{}, - err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, - }, - { - name: "ignore not found", - mapper: MultiRESTMapper{fixedRESTMapper{err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "IGNORE_THIS"}}}}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: schema.GroupVersionKind{}, - err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, - }, - { - name: "accept first failure", - mapper: MultiRESTMapper{fixedRESTMapper{err: errors.New("fail on this")}, fixedRESTMapper{kindsFor: []schema.GroupVersionKind{{Kind: "unused"}}}}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: schema.GroupVersionKind{}, - err: errors.New("fail on this"), - }, - } - - for _, tc := range tcs { - actualResult, actualErr := tc.mapper.KindFor(tc.input) - if e, a := tc.result, actualResult; e != a { - t.Errorf("%s: expected %v, got %v", tc.name, e, a) - } - switch { - case tc.err == nil && actualErr == nil: - case tc.err == nil: - t.Errorf("%s: unexpected error: %v", tc.name, actualErr) - case actualErr == nil: - t.Errorf("%s: expected error: %v got nil", tc.name, tc.err) - case tc.err.Error() != actualErr.Error(): - t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) - } - } -} - -func TestMultiRESTMapperRESTMappings(t *testing.T) { - mapping1, mapping2 := &RESTMapping{}, &RESTMapping{} - tcs := []struct { - name string - - mapper MultiRESTMapper - groupKind schema.GroupKind - versions []string - result []*RESTMapping - err error - }{ - { - name: "empty with no versions", - mapper: MultiRESTMapper{}, - groupKind: schema.GroupKind{Kind: "Foo"}, - result: nil, - err: &NoKindMatchError{GroupKind: schema.GroupKind{Kind: "Foo"}}, - }, - { - name: "empty with one version", - mapper: MultiRESTMapper{}, - groupKind: schema.GroupKind{Kind: "Foo"}, - versions: []string{"v1beta"}, - result: nil, - err: &NoKindMatchError{GroupKind: schema.GroupKind{Kind: "Foo"}, SearchedVersions: []string{"v1beta"}}, - }, - { - name: "empty with multi(two) vesions", - mapper: MultiRESTMapper{}, - groupKind: schema.GroupKind{Kind: "Foo"}, - versions: []string{"v1beta", "v2"}, - result: nil, - err: &NoKindMatchError{GroupKind: schema.GroupKind{Kind: "Foo"}, SearchedVersions: []string{"v1beta", "v2"}}, - }, - { - name: "ignore not found with kind not exist", - mapper: MultiRESTMapper{fixedRESTMapper{err: &NoKindMatchError{GroupKind: schema.GroupKind{Kind: "IGNORE_THIS"}}}}, - groupKind: schema.GroupKind{Kind: "Foo"}, - versions: nil, - result: nil, - err: &NoKindMatchError{GroupKind: schema.GroupKind{Kind: "Foo"}}, - }, - { - name: "ignore not found with version not exist", - mapper: MultiRESTMapper{fixedRESTMapper{err: &NoKindMatchError{GroupKind: schema.GroupKind{Kind: "Foo"}, SearchedVersions: []string{"v1"}}}}, - groupKind: schema.GroupKind{Kind: "Foo"}, - versions: []string{"v1beta"}, - result: nil, - err: &NoKindMatchError{GroupKind: schema.GroupKind{Kind: "Foo"}, SearchedVersions: []string{"v1beta"}}, - }, - { - name: "ignore not found with multi versions not exist", - mapper: MultiRESTMapper{fixedRESTMapper{err: &NoKindMatchError{GroupKind: schema.GroupKind{Kind: "Foo"}, SearchedVersions: []string{"v1"}}}}, - groupKind: schema.GroupKind{Kind: "Foo"}, - versions: []string{"v1beta", "v2"}, - result: nil, - err: &NoKindMatchError{GroupKind: schema.GroupKind{Kind: "Foo"}, SearchedVersions: []string{"v1beta", "v2"}}, - }, - { - name: "accept first failure", - mapper: MultiRESTMapper{fixedRESTMapper{err: errors.New("fail on this")}, fixedRESTMapper{mappings: []*RESTMapping{mapping1}}}, - groupKind: schema.GroupKind{Kind: "Foo"}, - versions: []string{"v1beta"}, - result: nil, - err: errors.New("fail on this"), - }, - { - name: "return both", - mapper: MultiRESTMapper{fixedRESTMapper{mappings: []*RESTMapping{mapping1}}, fixedRESTMapper{mappings: []*RESTMapping{mapping2}}}, - groupKind: schema.GroupKind{Kind: "Foo"}, - versions: []string{"v1beta"}, - result: []*RESTMapping{mapping1, mapping2}, - }, - } - - for _, tc := range tcs { - actualResult, actualErr := tc.mapper.RESTMappings(tc.groupKind, tc.versions...) - if e, a := tc.result, actualResult; !reflect.DeepEqual(e, a) { - t.Errorf("%s: expected %v, got %v", tc.name, e, a) - } - switch { - case tc.err == nil && actualErr == nil: - case tc.err == nil: - t.Errorf("%s: unexpected error: %v", tc.name, actualErr) - case actualErr == nil: - t.Errorf("%s: expected error: %v got nil", tc.name, tc.err) - case tc.err.Error() != actualErr.Error(): - t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) - } - } -} - -type fixedRESTMapper struct { - resourcesFor []schema.GroupVersionResource - kindsFor []schema.GroupVersionKind - resourceFor schema.GroupVersionResource - kindFor schema.GroupVersionKind - mappings []*RESTMapping - - err error -} - -func (m fixedRESTMapper) ResourceSingularizer(resource string) (singular string, err error) { - return "", m.err -} - -func (m fixedRESTMapper) ResourcesFor(resource schema.GroupVersionResource) ([]schema.GroupVersionResource, error) { - return m.resourcesFor, m.err -} - -func (m fixedRESTMapper) KindsFor(resource schema.GroupVersionResource) (gvk []schema.GroupVersionKind, err error) { - return m.kindsFor, m.err -} - -func (m fixedRESTMapper) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) { - return m.resourceFor, m.err -} - -func (m fixedRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) { - return m.kindFor, m.err -} - -func (m fixedRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (mapping *RESTMapping, err error) { - return nil, m.err -} - -func (m fixedRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) (mappings []*RESTMapping, err error) { - return m.mappings, m.err -} - -func (m fixedRESTMapper) ResourceIsValid(resource schema.GroupVersionResource) bool { - return false -} diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/priority_test.go b/vendor/k8s.io/apimachinery/pkg/api/meta/priority_test.go deleted file mode 100644 index fff1afd1..00000000 --- a/vendor/k8s.io/apimachinery/pkg/api/meta/priority_test.go +++ /dev/null @@ -1,409 +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 ( - "errors" - "reflect" - "strings" - "testing" - - "k8s.io/apimachinery/pkg/runtime/schema" -) - -func TestPriorityRESTMapperResourceForErrorHandling(t *testing.T) { - tcs := []struct { - name string - - delegate RESTMapper - resourcePatterns []schema.GroupVersionResource - 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"}}}, - result: schema.GroupVersionResource{Resource: "single-hit"}, - }, - { - name: "ambiguous match", - delegate: fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{ - {Group: "one", Version: "a", Resource: "first"}, - {Group: "two", Version: "b", Resource: "second"}, - }}, - err: "matches multiple resources", - }, - { - name: "group selection", - delegate: fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{ - {Group: "one", Version: "a", Resource: "first"}, - {Group: "two", Version: "b", Resource: "second"}, - }}, - resourcePatterns: []schema.GroupVersionResource{ - {Group: "one", Version: AnyVersion, Resource: AnyResource}, - }, - result: schema.GroupVersionResource{Group: "one", Version: "a", Resource: "first"}, - }, - { - name: "empty match continues", - delegate: fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{ - {Group: "one", Version: "a", Resource: "first"}, - {Group: "two", Version: "b", Resource: "second"}, - }}, - resourcePatterns: []schema.GroupVersionResource{ - {Group: "fail", Version: AnyVersion, Resource: AnyResource}, - {Group: "one", Version: AnyVersion, Resource: AnyResource}, - }, - result: schema.GroupVersionResource{Group: "one", Version: "a", Resource: "first"}, - }, - { - name: "group followed by version selection", - delegate: fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{ - {Group: "one", Version: "a", Resource: "first"}, - {Group: "two", Version: "b", Resource: "second"}, - {Group: "one", Version: "c", Resource: "third"}, - }}, - resourcePatterns: []schema.GroupVersionResource{ - {Group: "one", Version: AnyVersion, Resource: AnyResource}, - {Group: AnyGroup, Version: "a", Resource: AnyResource}, - }, - result: schema.GroupVersionResource{Group: "one", Version: "a", Resource: "first"}, - }, - { - name: "resource selection", - delegate: fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{ - {Group: "one", Version: "a", Resource: "first"}, - {Group: "one", Version: "a", Resource: "second"}, - }}, - resourcePatterns: []schema.GroupVersionResource{ - {Group: AnyGroup, Version: AnyVersion, Resource: "second"}, - }, - result: schema.GroupVersionResource{Group: "one", Version: "a", Resource: "second"}, - }, - } - - for _, tc := range tcs { - mapper := PriorityRESTMapper{Delegate: tc.delegate, ResourcePriority: tc.resourcePatterns} - - actualResult, actualErr := mapper.ResourceFor(schema.GroupVersionResource{}) - if e, a := tc.result, actualResult; e != a { - t.Errorf("%s: expected %v, got %v", tc.name, e, a) - } - 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 - } - if !strings.Contains(actualErr.Error(), tc.err) { - t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) - } - } -} - -func TestPriorityRESTMapperKindForErrorHandling(t *testing.T) { - tcs := []struct { - name string - - delegate RESTMapper - kindPatterns []schema.GroupVersionKind - 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"}}}, - result: schema.GroupVersionKind{Kind: "single-hit"}, - }, - { - name: "ambiguous match", - delegate: fixedRESTMapper{kindsFor: []schema.GroupVersionKind{ - {Group: "one", Version: "a", Kind: "first"}, - {Group: "two", Version: "b", Kind: "second"}, - }}, - err: "matches multiple kinds", - }, - { - name: "group selection", - delegate: fixedRESTMapper{kindsFor: []schema.GroupVersionKind{ - {Group: "one", Version: "a", Kind: "first"}, - {Group: "two", Version: "b", Kind: "second"}, - }}, - kindPatterns: []schema.GroupVersionKind{ - {Group: "one", Version: AnyVersion, Kind: AnyKind}, - }, - result: schema.GroupVersionKind{Group: "one", Version: "a", Kind: "first"}, - }, - { - name: "empty match continues", - delegate: fixedRESTMapper{kindsFor: []schema.GroupVersionKind{ - {Group: "one", Version: "a", Kind: "first"}, - {Group: "two", Version: "b", Kind: "second"}, - }}, - kindPatterns: []schema.GroupVersionKind{ - {Group: "fail", Version: AnyVersion, Kind: AnyKind}, - {Group: "one", Version: AnyVersion, Kind: AnyKind}, - }, - result: schema.GroupVersionKind{Group: "one", Version: "a", Kind: "first"}, - }, - { - name: "group followed by version selection", - delegate: fixedRESTMapper{kindsFor: []schema.GroupVersionKind{ - {Group: "one", Version: "a", Kind: "first"}, - {Group: "two", Version: "b", Kind: "second"}, - {Group: "one", Version: "c", Kind: "third"}, - }}, - kindPatterns: []schema.GroupVersionKind{ - {Group: "one", Version: AnyVersion, Kind: AnyKind}, - {Group: AnyGroup, Version: "a", Kind: AnyKind}, - }, - result: schema.GroupVersionKind{Group: "one", Version: "a", Kind: "first"}, - }, - { - name: "kind selection", - delegate: fixedRESTMapper{kindsFor: []schema.GroupVersionKind{ - {Group: "one", Version: "a", Kind: "first"}, - {Group: "one", Version: "a", Kind: "second"}, - }}, - kindPatterns: []schema.GroupVersionKind{ - {Group: AnyGroup, Version: AnyVersion, Kind: "second"}, - }, - result: schema.GroupVersionKind{Group: "one", Version: "a", Kind: "second"}, - }, - } - - for _, tc := range tcs { - mapper := PriorityRESTMapper{Delegate: tc.delegate, KindPriority: tc.kindPatterns} - - actualResult, actualErr := mapper.KindFor(schema.GroupVersionResource{}) - if e, a := tc.result, actualResult; e != a { - t.Errorf("%s: expected %v, got %v", tc.name, e, a) - } - 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 - } - if !strings.Contains(actualErr.Error(), tc.err) { - t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) - } - } -} - -func TestPriorityRESTMapperRESTMapping(t *testing.T) { - mapping1 := &RESTMapping{ - GroupVersionKind: schema.GroupVersionKind{Kind: "Foo", Version: "v1alpha1"}, - } - mapping2 := &RESTMapping{ - GroupVersionKind: schema.GroupVersionKind{Kind: "Foo", Version: "v1"}, - } - mapping3 := &RESTMapping{ - GroupVersionKind: schema.GroupVersionKind{Group: "other", Kind: "Foo", Version: "v1"}, - } - allMappers := MultiRESTMapper{ - fixedRESTMapper{mappings: []*RESTMapping{mapping1}}, - fixedRESTMapper{mappings: []*RESTMapping{mapping2}}, - fixedRESTMapper{mappings: []*RESTMapping{mapping3}}, - } - tcs := []struct { - name string - - mapper PriorityRESTMapper - input schema.GroupKind - result *RESTMapping - err error - }{ - { - name: "empty", - mapper: PriorityRESTMapper{Delegate: MultiRESTMapper{}}, - input: schema.GroupKind{Kind: "Foo"}, - err: &NoKindMatchError{GroupKind: schema.GroupKind{Kind: "Foo"}}, - }, - { - name: "ignore not found", - mapper: PriorityRESTMapper{Delegate: MultiRESTMapper{fixedRESTMapper{err: &NoKindMatchError{GroupKind: schema.GroupKind{Kind: "IGNORE_THIS"}}}}}, - input: schema.GroupKind{Kind: "Foo"}, - err: &NoKindMatchError{GroupKind: schema.GroupKind{Kind: "Foo"}}, - }, - { - name: "accept first failure", - mapper: PriorityRESTMapper{Delegate: MultiRESTMapper{fixedRESTMapper{err: errors.New("fail on this")}, fixedRESTMapper{mappings: []*RESTMapping{mapping1}}}}, - 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{ - Delegate: allMappers, - }, - input: schema.GroupKind{Kind: "Foo"}, - err: &AmbiguousKindError{ - PartialKind: schema.GroupVersionKind{Kind: "Foo"}, - MatchingKinds: []schema.GroupVersionKind{ - {Kind: "Foo", Version: "v1alpha1"}, - {Kind: "Foo", Version: "v1"}, - {Group: "other", Kind: "Foo", Version: "v1"}, - }, - }, - }, - { - name: "accept only item", - mapper: PriorityRESTMapper{ - Delegate: fixedRESTMapper{mappings: []*RESTMapping{mapping1}}, - }, - input: schema.GroupKind{Kind: "Foo"}, - result: mapping1, - }, - { - name: "return single priority", - mapper: PriorityRESTMapper{ - Delegate: allMappers, - KindPriority: []schema.GroupVersionKind{{Version: "v1", Kind: AnyKind}, {Version: "v1alpha1", Kind: AnyKind}}, - }, - input: schema.GroupKind{Kind: "Foo"}, - result: mapping2, - }, - { - name: "return out of group match", - mapper: PriorityRESTMapper{ - Delegate: allMappers, - KindPriority: []schema.GroupVersionKind{{Group: AnyGroup, Version: "v1", Kind: AnyKind}, {Group: "other", Version: AnyVersion, Kind: AnyKind}}, - }, - input: schema.GroupKind{Kind: "Foo"}, - result: mapping3, - }, - } - - for _, tc := range tcs { - actualResult, actualErr := tc.mapper.RESTMapping(tc.input) - if e, a := tc.result, actualResult; !reflect.DeepEqual(e, a) { - t.Errorf("%s: expected %v, got %v", tc.name, e, a) - } - switch { - case tc.err == nil && actualErr == nil: - case tc.err == nil: - t.Errorf("%s: unexpected error: %v", tc.name, actualErr) - case actualErr == nil: - t.Errorf("%s: expected error: %v got nil", tc.name, tc.err) - case tc.err.Error() != actualErr.Error(): - t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) - } - } -} - -func TestPriorityRESTMapperRESTMappingHonorsUserVersion(t *testing.T) { - mappingV2alpha1 := &RESTMapping{ - GroupVersionKind: schema.GroupVersionKind{Group: "Bar", Kind: "Foo", Version: "v2alpha1"}, - } - mappingV1 := &RESTMapping{ - GroupVersionKind: schema.GroupVersionKind{Group: "Bar", Kind: "Foo", Version: "v1"}, - } - - allMappers := MultiRESTMapper{ - fixedRESTMapper{mappings: []*RESTMapping{mappingV2alpha1}}, - fixedRESTMapper{mappings: []*RESTMapping{mappingV1}}, - } - - mapper := PriorityRESTMapper{ - Delegate: allMappers, - KindPriority: []schema.GroupVersionKind{{Group: "Bar", Version: "v2alpha1", Kind: AnyKind}, {Group: "Bar", Version: AnyVersion, Kind: AnyKind}}, - } - - outMapping1, err := mapper.RESTMapping(schema.GroupKind{Group: "Bar", Kind: "Foo"}, "v1") - if err != nil { - t.Errorf("unexpected error: %v", err) - } - - if outMapping1 != mappingV1 { - t.Errorf("asked for version %v, expected mapping for %v, got mapping for %v", "v1", mappingV1.GroupVersionKind, outMapping1.GroupVersionKind) - } - - outMapping2, err := mapper.RESTMapping(schema.GroupKind{Group: "Bar", Kind: "Foo"}, "v2alpha1") - if err != nil { - t.Errorf("unexpected error: %v", err) - } - - if outMapping2 != mappingV2alpha1 { - t.Errorf("asked for version %v, expected mapping for %v, got mapping for %v", "v2alpha1", mappingV2alpha1.GroupVersionKind, outMapping2.GroupVersionKind) - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/restmapper_test.go b/vendor/k8s.io/apimachinery/pkg/api/meta/restmapper_test.go deleted file mode 100644 index 853404ad..00000000 --- a/vendor/k8s.io/apimachinery/pkg/api/meta/restmapper_test.go +++ /dev/null @@ -1,724 +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 meta - -import ( - "reflect" - "strings" - "testing" - - "k8s.io/apimachinery/pkg/runtime/schema" -) - -func TestRESTMapperVersionAndKindForResource(t *testing.T) { - testGroup := "test.group" - testVersion := "test" - testGroupVersion := schema.GroupVersion{Group: testGroup, Version: testVersion} - - testCases := []struct { - Resource schema.GroupVersionResource - GroupVersionToRegister schema.GroupVersion - ExpectedGVK schema.GroupVersionKind - Err bool - }{ - {Resource: schema.GroupVersionResource{Resource: "internalobjec"}, Err: true}, - {Resource: schema.GroupVersionResource{Resource: "internalObjec"}, Err: true}, - - {Resource: schema.GroupVersionResource{Resource: "internalobject"}, ExpectedGVK: testGroupVersion.WithKind("InternalObject")}, - {Resource: schema.GroupVersionResource{Resource: "internalobjects"}, ExpectedGVK: testGroupVersion.WithKind("InternalObject")}, - } - for i, testCase := range testCases { - mapper := NewDefaultRESTMapper([]schema.GroupVersion{testGroupVersion}) - if len(testCase.ExpectedGVK.Kind) != 0 { - mapper.Add(testCase.ExpectedGVK, RESTScopeNamespace) - } - actualGVK, err := mapper.KindFor(testCase.Resource) - - hasErr := err != nil - if hasErr != testCase.Err { - t.Errorf("%d: unexpected error behavior %t: %v", i, testCase.Err, err) - continue - } - if err != nil { - continue - } - - if actualGVK != testCase.ExpectedGVK { - t.Errorf("%d: unexpected version and kind: e=%s a=%s", i, testCase.ExpectedGVK, actualGVK) - } - } -} - -func TestRESTMapperGroupForResource(t *testing.T) { - testCases := []struct { - Resource schema.GroupVersionResource - GroupVersionKind schema.GroupVersionKind - Err bool - }{ - {Resource: schema.GroupVersionResource{Resource: "myObject"}, GroupVersionKind: schema.GroupVersionKind{Group: "testapi", Version: "test", Kind: "MyObject"}}, - {Resource: schema.GroupVersionResource{Resource: "myobject"}, GroupVersionKind: schema.GroupVersionKind{Group: "testapi2", Version: "test", Kind: "MyObject"}}, - {Resource: schema.GroupVersionResource{Resource: "myObje"}, Err: true, GroupVersionKind: schema.GroupVersionKind{Group: "testapi", Version: "test", Kind: "MyObject"}}, - {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()}) - mapper.Add(testCase.GroupVersionKind, RESTScopeNamespace) - - actualGVK, err := mapper.KindFor(testCase.Resource) - if testCase.Err { - if err == nil { - t.Errorf("%d: expected error", i) - } - } else if err != nil { - t.Errorf("%d: unexpected error: %v", i, err) - } else if actualGVK != testCase.GroupVersionKind { - t.Errorf("%d: expected group %q, got %q", i, testCase.GroupVersionKind, actualGVK) - } - } -} - -func TestRESTMapperKindsFor(t *testing.T) { - testCases := []struct { - Name string - PreferredOrder []schema.GroupVersion - KindsToRegister []schema.GroupVersionKind - PartialResourceToRequest schema.GroupVersionResource - - ExpectedKinds []schema.GroupVersionKind - ExpectedKindErr string - }{ - { - // exact matches are preferred - Name: "groups, with group exact", - PreferredOrder: []schema.GroupVersion{ - {Group: "first-group-1", Version: "first-version"}, - {Group: "first-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group-1", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - }, - PartialResourceToRequest: schema.GroupVersionResource{Group: "first-group", Resource: "my-kind"}, - - ExpectedKinds: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - }, - }, - - { - // group prefixes work - Name: "groups, with group prefix", - PreferredOrder: []schema.GroupVersion{ - {Group: "second-group", Version: "first-version"}, - {Group: "first-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - {Group: "second-group", Version: "first-version", Kind: "my-kind"}, - }, - PartialResourceToRequest: schema.GroupVersionResource{Group: "first", Resource: "my-kind"}, - - ExpectedKinds: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - }, - }, - - { - // group prefixes can be ambiguous - Name: "groups, with ambiguous group prefix", - PreferredOrder: []schema.GroupVersion{ - {Group: "first-group-1", Version: "first-version"}, - {Group: "first-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group-1", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - }, - PartialResourceToRequest: schema.GroupVersionResource{Group: "first", Resource: "my-kind"}, - - ExpectedKinds: []schema.GroupVersionKind{ - {Group: "first-group-1", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - }, - ExpectedKindErr: " matches multiple kinds ", - }, - - { - Name: "ambiguous groups, with preference order", - PreferredOrder: []schema.GroupVersion{ - {Group: "second-group", Version: "first-version"}, - {Group: "first-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "your-kind"}, - {Group: "second-group", Version: "first-version", Kind: "my-kind"}, - {Group: "second-group", Version: "first-version", Kind: "your-kind"}, - }, - PartialResourceToRequest: schema.GroupVersionResource{Resource: "my-kinds"}, - - ExpectedKinds: []schema.GroupVersionKind{ - {Group: "second-group", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - }, - ExpectedKindErr: " matches multiple kinds ", - }, - - { - Name: "ambiguous groups, with explicit group match", - PreferredOrder: []schema.GroupVersion{ - {Group: "second-group", Version: "first-version"}, - {Group: "first-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "your-kind"}, - {Group: "second-group", Version: "first-version", Kind: "my-kind"}, - {Group: "second-group", Version: "first-version", Kind: "your-kind"}, - }, - PartialResourceToRequest: schema.GroupVersionResource{Group: "first-group", Resource: "my-kinds"}, - - ExpectedKinds: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - }, - }, - - { - Name: "ambiguous groups, with ambiguous version match", - PreferredOrder: []schema.GroupVersion{ - {Group: "first-group", Version: "first-version"}, - {Group: "second-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "your-kind"}, - {Group: "second-group", Version: "first-version", Kind: "my-kind"}, - {Group: "second-group", Version: "first-version", Kind: "your-kind"}, - }, - PartialResourceToRequest: schema.GroupVersionResource{Version: "first-version", Resource: "my-kinds"}, - - ExpectedKinds: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - {Group: "second-group", Version: "first-version", Kind: "my-kind"}, - }, - ExpectedKindErr: " matches multiple kinds ", - }, - } - for _, testCase := range testCases { - tcName := testCase.Name - mapper := NewDefaultRESTMapper(testCase.PreferredOrder) - for _, kind := range testCase.KindsToRegister { - mapper.Add(kind, RESTScopeNamespace) - } - - actualKinds, err := mapper.KindsFor(testCase.PartialResourceToRequest) - if err != nil { - t.Errorf("%s: unexpected error: %v", tcName, err) - continue - } - if !reflect.DeepEqual(testCase.ExpectedKinds, actualKinds) { - t.Errorf("%s: expected %v, got %v", tcName, testCase.ExpectedKinds, actualKinds) - } - - singleKind, err := mapper.KindFor(testCase.PartialResourceToRequest) - if err == nil && len(testCase.ExpectedKindErr) != 0 { - t.Errorf("%s: expected error: %v", tcName, testCase.ExpectedKindErr) - continue - } - if err != nil { - if len(testCase.ExpectedKindErr) == 0 { - t.Errorf("%s: unexpected error: %v", tcName, err) - continue - } else { - if !strings.Contains(err.Error(), testCase.ExpectedKindErr) { - t.Errorf("%s: expected %v, got %v", tcName, testCase.ExpectedKindErr, err) - continue - } - } - - } else { - if testCase.ExpectedKinds[0] != singleKind { - t.Errorf("%s: expected %v, got %v", tcName, testCase.ExpectedKinds[0], singleKind) - } - - } - } -} - -func TestRESTMapperResourcesFor(t *testing.T) { - testCases := []struct { - Name string - PreferredOrder []schema.GroupVersion - KindsToRegister []schema.GroupVersionKind - PluralPartialResourceToRequest schema.GroupVersionResource - SingularPartialResourceToRequest schema.GroupVersionResource - - ExpectedResources []schema.GroupVersionResource - ExpectedResourceErr string - }{ - { - // exact matches are preferred - Name: "groups, with group exact", - PreferredOrder: []schema.GroupVersion{ - {Group: "first-group-1", Version: "first-version"}, - {Group: "first-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group-1", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - }, - PluralPartialResourceToRequest: schema.GroupVersionResource{Group: "first-group", Resource: "my-kinds"}, - SingularPartialResourceToRequest: schema.GroupVersionResource{Group: "first-group", Resource: "my-kind"}, - - ExpectedResources: []schema.GroupVersionResource{ - {Group: "first-group", Version: "first-version", Resource: "my-kinds"}, - }, - }, - - { - // group prefixes work - Name: "groups, with group prefix", - PreferredOrder: []schema.GroupVersion{ - {Group: "second-group", Version: "first-version"}, - {Group: "first-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - {Group: "second-group", Version: "first-version", Kind: "my-kind"}, - }, - PluralPartialResourceToRequest: schema.GroupVersionResource{Group: "first", Resource: "my-kinds"}, - SingularPartialResourceToRequest: schema.GroupVersionResource{Group: "first", Resource: "my-kind"}, - - ExpectedResources: []schema.GroupVersionResource{ - {Group: "first-group", Version: "first-version", Resource: "my-kinds"}, - }, - }, - - { - // group prefixes can be ambiguous - Name: "groups, with ambiguous group prefix", - PreferredOrder: []schema.GroupVersion{ - {Group: "first-group-1", Version: "first-version"}, - {Group: "first-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group-1", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - }, - PluralPartialResourceToRequest: schema.GroupVersionResource{Group: "first", Resource: "my-kinds"}, - SingularPartialResourceToRequest: schema.GroupVersionResource{Group: "first", Resource: "my-kind"}, - - ExpectedResources: []schema.GroupVersionResource{ - {Group: "first-group-1", Version: "first-version", Resource: "my-kinds"}, - {Group: "first-group", Version: "first-version", Resource: "my-kinds"}, - }, - ExpectedResourceErr: " matches multiple resources ", - }, - - { - Name: "ambiguous groups, with preference order", - PreferredOrder: []schema.GroupVersion{ - {Group: "second-group", Version: "first-version"}, - {Group: "first-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "your-kind"}, - {Group: "second-group", Version: "first-version", Kind: "my-kind"}, - {Group: "second-group", Version: "first-version", Kind: "your-kind"}, - }, - PluralPartialResourceToRequest: schema.GroupVersionResource{Resource: "my-kinds"}, - SingularPartialResourceToRequest: schema.GroupVersionResource{Resource: "my-kind"}, - - ExpectedResources: []schema.GroupVersionResource{ - {Group: "second-group", Version: "first-version", Resource: "my-kinds"}, - {Group: "first-group", Version: "first-version", Resource: "my-kinds"}, - }, - ExpectedResourceErr: " matches multiple resources ", - }, - - { - Name: "ambiguous groups, with explicit group match", - PreferredOrder: []schema.GroupVersion{ - {Group: "second-group", Version: "first-version"}, - {Group: "first-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "your-kind"}, - {Group: "second-group", Version: "first-version", Kind: "my-kind"}, - {Group: "second-group", Version: "first-version", Kind: "your-kind"}, - }, - PluralPartialResourceToRequest: schema.GroupVersionResource{Group: "first-group", Resource: "my-kinds"}, - SingularPartialResourceToRequest: schema.GroupVersionResource{Group: "first-group", Resource: "my-kind"}, - - ExpectedResources: []schema.GroupVersionResource{ - {Group: "first-group", Version: "first-version", Resource: "my-kinds"}, - }, - }, - - { - Name: "ambiguous groups, with ambiguous version match", - PreferredOrder: []schema.GroupVersion{ - {Group: "first-group", Version: "first-version"}, - {Group: "second-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "your-kind"}, - {Group: "second-group", Version: "first-version", Kind: "my-kind"}, - {Group: "second-group", Version: "first-version", Kind: "your-kind"}, - }, - PluralPartialResourceToRequest: schema.GroupVersionResource{Version: "first-version", Resource: "my-kinds"}, - SingularPartialResourceToRequest: schema.GroupVersionResource{Version: "first-version", Resource: "my-kind"}, - - ExpectedResources: []schema.GroupVersionResource{ - {Group: "first-group", Version: "first-version", Resource: "my-kinds"}, - {Group: "second-group", Version: "first-version", Resource: "my-kinds"}, - }, - ExpectedResourceErr: " matches multiple resources ", - }, - } - for _, testCase := range testCases { - tcName := testCase.Name - - for _, partialResource := range []schema.GroupVersionResource{testCase.PluralPartialResourceToRequest, testCase.SingularPartialResourceToRequest} { - mapper := NewDefaultRESTMapper(testCase.PreferredOrder) - for _, kind := range testCase.KindsToRegister { - mapper.Add(kind, RESTScopeNamespace) - } - - actualResources, err := mapper.ResourcesFor(partialResource) - if err != nil { - t.Errorf("%s: unexpected error: %v", tcName, err) - continue - } - if !reflect.DeepEqual(testCase.ExpectedResources, actualResources) { - t.Errorf("%s: expected %v, got %v", tcName, testCase.ExpectedResources, actualResources) - } - - singleResource, err := mapper.ResourceFor(partialResource) - if err == nil && len(testCase.ExpectedResourceErr) != 0 { - t.Errorf("%s: expected error: %v", tcName, testCase.ExpectedResourceErr) - continue - } - if err != nil { - if len(testCase.ExpectedResourceErr) == 0 { - t.Errorf("%s: unexpected error: %v", tcName, err) - continue - } else { - if !strings.Contains(err.Error(), testCase.ExpectedResourceErr) { - t.Errorf("%s: expected %v, got %v", tcName, testCase.ExpectedResourceErr, err) - continue - } - } - - } else { - if testCase.ExpectedResources[0] != singleResource { - t.Errorf("%s: expected %v, got %v", tcName, testCase.ExpectedResources[0], singleResource) - } - - } - } - } -} - -func TestKindToResource(t *testing.T) { - testCases := []struct { - Kind string - Plural, Singular string - }{ - {Kind: "Pod", Plural: "pods", Singular: "pod"}, - - {Kind: "ReplicationController", Plural: "replicationcontrollers", Singular: "replicationcontroller"}, - - // Add "ies" when ending with "y" - {Kind: "ImageRepository", Plural: "imagerepositories", Singular: "imagerepository"}, - // Add "es" when ending with "s" - {Kind: "miss", Plural: "misses", Singular: "miss"}, - // Add "s" otherwise - {Kind: "lowercase", Plural: "lowercases", Singular: "lowercase"}, - } - for i, testCase := range testCases { - version := schema.GroupVersion{} - - plural, singular := UnsafeGuessKindToResource(version.WithKind(testCase.Kind)) - if singular != version.WithResource(testCase.Singular) || plural != version.WithResource(testCase.Plural) { - t.Errorf("%d: unexpected plural and singular: %v %v", i, plural, singular) - } - } -} - -func TestRESTMapperResourceSingularizer(t *testing.T) { - testGroupVersion := schema.GroupVersion{Group: "tgroup", Version: "test"} - - testCases := []struct { - Kind string - Plural string - Singular string - }{ - {Kind: "Pod", Plural: "pods", Singular: "pod"}, - {Kind: "ReplicationController", Plural: "replicationcontrollers", Singular: "replicationcontroller"}, - {Kind: "ImageRepository", Plural: "imagerepositories", Singular: "imagerepository"}, - {Kind: "Status", Plural: "statuses", Singular: "status"}, - - {Kind: "lowercase", Plural: "lowercases", Singular: "lowercase"}, - // TODO this test is broken. This updates to reflect actual behavior. Kinds are expected to be singular - // old (incorrect), comment: Don't add extra s if the original object is already plural - {Kind: "lowercases", Plural: "lowercaseses", Singular: "lowercases"}, - } - for i, testCase := range testCases { - mapper := NewDefaultRESTMapper([]schema.GroupVersion{testGroupVersion}) - // create singular/plural mapping - mapper.Add(testGroupVersion.WithKind(testCase.Kind), RESTScopeNamespace) - - singular, err := mapper.ResourceSingularizer(testCase.Plural) - if err != nil { - t.Errorf("%d: unexpected error: %v", i, err) - } - if singular != testCase.Singular { - t.Errorf("%d: mismatched singular: got %v, expected %v", i, singular, testCase.Singular) - } - } -} - -func TestRESTMapperRESTMapping(t *testing.T) { - testGroup := "tgroup" - testGroupVersion := schema.GroupVersion{Group: testGroup, Version: "test"} - internalGroupVersion := schema.GroupVersion{Group: testGroup, Version: "test"} - - testCases := []struct { - Kind string - APIGroupVersions []schema.GroupVersion - DefaultVersions []schema.GroupVersion - - Resource schema.GroupVersionResource - ExpectedGroupVersion *schema.GroupVersion - Err bool - }{ - {Kind: "Unknown", Err: true}, - {Kind: "InternalObject", Err: true}, - - {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "Unknown", Err: true}, - - {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: testGroupVersion.WithResource("internalobjects")}, - - {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: 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) - mapper.Add(internalGroupVersion.WithKind("InternalObject"), RESTScopeNamespace) - - preferredVersions := []string{} - for _, gv := range testCase.APIGroupVersions { - preferredVersions = append(preferredVersions, gv.Version) - } - gk := schema.GroupKind{Group: testGroup, Kind: testCase.Kind} - - mapping, err := mapper.RESTMapping(gk, preferredVersions...) - hasErr := err != nil - if hasErr != testCase.Err { - t.Errorf("%d: unexpected error behavior %t: %v", i, testCase.Err, err) - } - if hasErr { - continue - } - if mapping.Resource != testCase.Resource { - t.Errorf("%d: unexpected resource: %#v", i, mapping) - } - - groupVersion := testCase.ExpectedGroupVersion - if groupVersion == nil { - groupVersion = &testCase.APIGroupVersions[0] - } - if mapping.GroupVersionKind.GroupVersion() != *groupVersion { - t.Errorf("%d: unexpected version: %#v", i, mapping) - } - - } -} - -func TestRESTMapperRESTMappingSelectsVersion(t *testing.T) { - expectedGroupVersion1 := schema.GroupVersion{Group: "tgroup", Version: "test1"} - expectedGroupVersion2 := schema.GroupVersion{Group: "tgroup", Version: "test2"} - expectedGroupVersion3 := schema.GroupVersion{Group: "tgroup", Version: "test3"} - internalObjectGK := schema.GroupKind{Group: "tgroup", Kind: "InternalObject"} - otherObjectGK := schema.GroupKind{Group: "tgroup", Kind: "OtherObject"} - - mapper := NewDefaultRESTMapper([]schema.GroupVersion{expectedGroupVersion1, expectedGroupVersion2}) - mapper.Add(expectedGroupVersion1.WithKind("InternalObject"), RESTScopeNamespace) - mapper.Add(expectedGroupVersion2.WithKind("OtherObject"), RESTScopeNamespace) - - // pick default matching object kind based on search order - mapping, err := mapper.RESTMapping(otherObjectGK) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if mapping.Resource != expectedGroupVersion2.WithResource("otherobjects") || mapping.GroupVersionKind.GroupVersion() != expectedGroupVersion2 { - t.Errorf("unexpected mapping: %#v", mapping) - } - - mapping, err = mapper.RESTMapping(internalObjectGK) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if mapping.Resource != expectedGroupVersion1.WithResource("internalobjects") || mapping.GroupVersionKind.GroupVersion() != expectedGroupVersion1 { - t.Errorf("unexpected mapping: %#v", mapping) - } - - // mismatch of version - mapping, err = mapper.RESTMapping(internalObjectGK, expectedGroupVersion2.Version) - if err == nil { - t.Errorf("unexpected non-error") - } - mapping, err = mapper.RESTMapping(otherObjectGK, expectedGroupVersion1.Version) - if err == nil { - t.Errorf("unexpected non-error") - } - - // not in the search versions - mapping, err = mapper.RESTMapping(otherObjectGK, expectedGroupVersion3.Version) - if err == nil { - t.Errorf("unexpected non-error") - } - - // explicit search order - mapping, err = mapper.RESTMapping(otherObjectGK, expectedGroupVersion3.Version, expectedGroupVersion1.Version) - if err == nil { - t.Errorf("unexpected non-error") - } - - mapping, err = mapper.RESTMapping(otherObjectGK, expectedGroupVersion3.Version, expectedGroupVersion2.Version) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if mapping.Resource != expectedGroupVersion2.WithResource("otherobjects") || mapping.GroupVersionKind.GroupVersion() != expectedGroupVersion2 { - t.Errorf("unexpected mapping: %#v", mapping) - } -} - -func TestRESTMapperRESTMappings(t *testing.T) { - testGroup := "tgroup" - testGroupVersion := schema.GroupVersion{Group: testGroup, Version: "v1"} - - testCases := []struct { - Kind string - APIGroupVersions []schema.GroupVersion - DefaultVersions []schema.GroupVersion - AddGroupVersionKind []schema.GroupVersionKind - - ExpectedRESTMappings []*RESTMapping - Err bool - }{ - {Kind: "Unknown", Err: true}, - {Kind: "InternalObject", Err: true}, - - {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "Unknown", Err: true}, - - // ask for specific version - not available - thus error - {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "v2"}}, Err: true}, - - // ask for specific version - available - check ExpectedRESTMappings - { - DefaultVersions: []schema.GroupVersion{testGroupVersion}, - Kind: "InternalObject", - APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "v2"}}, - AddGroupVersionKind: []schema.GroupVersionKind{schema.GroupVersion{Group: testGroup, Version: "v2"}.WithKind("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 - { - DefaultVersions: []schema.GroupVersion{testGroupVersion}, - 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: 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: 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) - for _, gvk := range testCase.AddGroupVersionKind { - mapper.Add(gvk, RESTScopeNamespace) - } - - preferredVersions := []string{} - for _, gv := range testCase.APIGroupVersions { - preferredVersions = append(preferredVersions, gv.Version) - } - gk := schema.GroupKind{Group: testGroup, Kind: testCase.Kind} - - mappings, err := mapper.RESTMappings(gk, preferredVersions...) - hasErr := err != nil - if hasErr != testCase.Err { - t.Errorf("%d: unexpected error behavior %t: %v", i, testCase.Err, err) - } - if hasErr { - continue - } - if len(mappings) != len(testCase.ExpectedRESTMappings) { - t.Errorf("%d: unexpected number = %d of rest mappings was returned, expected = %d", i, len(mappings), len(testCase.ExpectedRESTMappings)) - } - for j, mapping := range mappings { - exp := testCase.ExpectedRESTMappings[j] - if mapping.Resource != exp.Resource { - t.Errorf("%d - %d: unexpected resource: %#v", i, j, mapping) - } - if mapping.GroupVersionKind != exp.GroupVersionKind { - t.Errorf("%d - %d: unexpected GroupVersionKind: %#v", i, j, mapping) - } - } - } -} - -func TestRESTMapperReportsErrorOnBadVersion(t *testing.T) { - expectedGroupVersion1 := schema.GroupVersion{Group: "tgroup", Version: "test1"} - expectedGroupVersion2 := schema.GroupVersion{Group: "tgroup", Version: "test2"} - internalObjectGK := schema.GroupKind{Group: "tgroup", Kind: "InternalObject"} - - mapper := NewDefaultRESTMapper([]schema.GroupVersion{expectedGroupVersion1, expectedGroupVersion2}) - mapper.Add(expectedGroupVersion1.WithKind("InternalObject"), RESTScopeNamespace) - _, err := mapper.RESTMapping(internalObjectGK, "test3") - if err == nil { - t.Errorf("unexpected non-error") - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS b/vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS deleted file mode 100755 index c430067f..00000000 --- a/vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS +++ /dev/null @@ -1,16 +0,0 @@ -reviewers: -- thockin -- lavalamp -- smarterclayton -- wojtek-t -- derekwaynecarr -- mikedanese -- saad-ali -- janetkuo -- tallclair -- eparis -- jbeda -- xiang90 -- mbohlool -- david-mcmahon -- goltermann diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/amount_test.go b/vendor/k8s.io/apimachinery/pkg/api/resource/amount_test.go deleted file mode 100644 index dd070bad..00000000 --- a/vendor/k8s.io/apimachinery/pkg/api/resource/amount_test.go +++ /dev/null @@ -1,133 +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 resource - -import ( - "testing" -) - -func TestInt64AmountAsInt64(t *testing.T) { - for _, test := range []struct { - value int64 - scale Scale - result int64 - ok bool - }{ - {100, 0, 100, true}, - {100, 1, 1000, true}, - {100, -5, 0, false}, - {100, 100, 0, false}, - } { - r, ok := int64Amount{value: test.value, scale: test.scale}.AsInt64() - if r != test.result { - t.Errorf("%v: unexpected result: %d", test, r) - } - if ok != test.ok { - t.Errorf("%v: unexpected ok: %t", test, ok) - } - } -} - -func TestInt64AmountAdd(t *testing.T) { - for _, test := range []struct { - a, b, c int64Amount - ok bool - }{ - {int64Amount{value: 100, scale: 1}, int64Amount{value: 10, scale: 2}, int64Amount{value: 200, scale: 1}, true}, - {int64Amount{value: 100, scale: 1}, int64Amount{value: 1, scale: 2}, int64Amount{value: 110, scale: 1}, true}, - {int64Amount{value: 100, scale: 1}, int64Amount{value: 1, scale: 100}, int64Amount{value: 1, scale: 100}, false}, - {int64Amount{value: -5, scale: 2}, int64Amount{value: 50, scale: 1}, int64Amount{value: 0, scale: 1}, true}, - {int64Amount{value: -5, scale: 2}, int64Amount{value: 5, scale: 2}, int64Amount{value: 0, scale: 2}, true}, - - {int64Amount{value: mostPositive, scale: -1}, int64Amount{value: 1, scale: -1}, int64Amount{value: 0, scale: -1}, false}, - {int64Amount{value: mostPositive, scale: -1}, int64Amount{value: 0, scale: -1}, int64Amount{value: mostPositive, scale: -1}, true}, - {int64Amount{value: mostPositive / 10, scale: 1}, int64Amount{value: 10, scale: 0}, int64Amount{value: mostPositive, scale: -1}, false}, - } { - c := test.a - ok := c.Add(test.b) - if ok != test.ok { - t.Errorf("%v: unexpected ok: %t", test, ok) - } - if ok { - if c != test.c { - t.Errorf("%v: unexpected result: %d", test, c) - } - } else { - if c != test.a { - t.Errorf("%v: overflow addition mutated source: %d", test, c) - } - } - - // addition is commutative - c = test.b - if ok := c.Add(test.a); ok != test.ok { - t.Errorf("%v: unexpected ok: %t", test, ok) - } - if ok { - if c != test.c { - t.Errorf("%v: unexpected result: %d", test, c) - } - } else { - if c != test.b { - t.Errorf("%v: overflow addition mutated source: %d", test, c) - } - } - } -} -func TestInt64AsCanonicalString(t *testing.T) { - for _, test := range []struct { - value int64 - scale Scale - result string - exponent int32 - }{ - {100, 0, "100", 0}, - {100, 1, "1", 3}, - {100, -1, "10", 0}, - {10800, -10, "1080", -9}, - } { - r, exp := int64Amount{value: test.value, scale: test.scale}.AsCanonicalBytes(nil) - if string(r) != test.result { - t.Errorf("%v: unexpected result: %s", test, r) - } - if exp != test.exponent { - t.Errorf("%v: unexpected exponent: %d", test, exp) - } - } -} - -func TestAmountSign(t *testing.T) { - table := []struct { - i int64Amount - expect int - }{ - {int64Amount{value: -50, scale: 1}, -1}, - {int64Amount{value: 0, scale: 1}, 0}, - {int64Amount{value: 300, scale: 1}, 1}, - {int64Amount{value: -50, scale: -8}, -1}, - {int64Amount{value: 50, scale: -8}, 1}, - {int64Amount{value: 0, scale: -8}, 0}, - {int64Amount{value: -50, scale: 0}, -1}, - {int64Amount{value: 50, scale: 0}, 1}, - {int64Amount{value: 0, scale: 0}, 0}, - } - for _, testCase := range table { - if result := testCase.i.Sign(); result != testCase.expect { - t.Errorf("i: %v, Expected: %v, Actual: %v", testCase.i, testCase.expect, result) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto deleted file mode 100644 index 31a46a6d..00000000 --- a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto +++ /dev/null @@ -1,95 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.apimachinery.pkg.api.resource; - -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "resource"; - -// Quantity is a fixed-point representation of a number. -// It provides convenient marshaling/unmarshaling in JSON and YAML, -// in addition to String() and Int64() accessors. -// -// The serialization format is: -// -// ::= -// (Note that may be empty, from the "" case in .) -// ::= 0 | 1 | ... | 9 -// ::= | -// ::= | . | . | . -// ::= "+" | "-" -// ::= | -// ::= | | -// ::= Ki | Mi | Gi | Ti | Pi | Ei -// (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html) -// ::= m | "" | k | M | G | T | P | E -// (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.) -// ::= "e" | "E" -// -// No matter which of the three exponent forms is used, no quantity may represent -// a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal -// places. Numbers larger or more precise will be capped or rounded up. -// (E.g.: 0.1m will rounded up to 1m.) -// This may be extended in the future if we require larger or smaller quantities. -// -// When a Quantity is parsed from a string, it will remember the type of suffix -// it had, and will use the same type again when it is serialized. -// -// Before serializing, Quantity will be put in "canonical form". -// This means that Exponent/suffix will be adjusted up or down (with a -// corresponding increase or decrease in Mantissa) such that: -// a. No precision is lost -// b. No fractional digits will be emitted -// c. The exponent (or suffix) is as large as possible. -// The sign will be omitted unless the number is negative. -// -// Examples: -// 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. -// -// Non-canonical values will still parse as long as they are well formed, -// but will be re-emitted in their canonical form. (So always use canonical -// form, or don't diff.) -// -// This format is intended to make it difficult to use these numbers without -// writing some sort of special handling code in the hopes that that will -// cause implementors to also use a fixed point implementation. -// -// +protobuf=true -// +protobuf.embed=string -// +protobuf.options.marshal=false -// +protobuf.options.(gogoproto.goproto_stringer)=false -// +k8s:deepcopy-gen=true -// +k8s:openapi-gen=true -message Quantity { - optional string string = 1; -} - diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/math_test.go b/vendor/k8s.io/apimachinery/pkg/api/resource/math_test.go deleted file mode 100644 index 070a0c23..00000000 --- a/vendor/k8s.io/apimachinery/pkg/api/resource/math_test.go +++ /dev/null @@ -1,211 +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 resource - -import ( - "testing" -) - -func TestDetectOverflowAdd(t *testing.T) { - for _, test := range []struct { - a, b int64 - c int64 - ok bool - }{ - {0, 0, 0, true}, - {-1, 1, 0, true}, - {0, 1, 1, true}, - {2, 2, 4, true}, - {2, -2, 0, true}, - {-2, -2, -4, true}, - - {mostNegative, -1, 0, false}, - {mostNegative, 1, mostNegative + 1, true}, - {mostPositive, -1, mostPositive - 1, true}, - {mostPositive, 1, 0, false}, - - {mostNegative, mostPositive, -1, true}, - {mostPositive, mostNegative, -1, true}, - {mostPositive, mostPositive, 0, false}, - {mostNegative, mostNegative, 0, false}, - - {-mostPositive, mostNegative, 0, false}, - {mostNegative, -mostPositive, 0, false}, - {-mostPositive, -mostPositive, 0, false}, - } { - c, ok := int64Add(test.a, test.b) - if c != test.c { - t.Errorf("%v: unexpected result: %d", test, c) - } - if ok != test.ok { - t.Errorf("%v: unexpected overflow: %t", test, ok) - } - // addition is commutative - d, ok2 := int64Add(test.b, test.a) - if c != d || ok != ok2 { - t.Errorf("%v: not commutative: %d %t", test, d, ok2) - } - } -} - -func TestDetectOverflowMultiply(t *testing.T) { - for _, test := range []struct { - a, b int64 - c int64 - ok bool - }{ - {0, 0, 0, true}, - {-1, 1, -1, true}, - {-1, -1, 1, true}, - {1, 1, 1, true}, - {0, 1, 0, true}, - {1, 0, 0, true}, - {2, 2, 4, true}, - {2, -2, -4, true}, - {-2, -2, 4, true}, - - {mostNegative, -1, 0, false}, - {mostNegative, 1, mostNegative, true}, - {mostPositive, -1, -mostPositive, true}, - {mostPositive, 1, mostPositive, true}, - - {mostNegative, mostPositive, 0, false}, - {mostPositive, mostNegative, 0, false}, - {mostPositive, mostPositive, 1, false}, - {mostNegative, mostNegative, 0, false}, - - {-mostPositive, mostNegative, 0, false}, - {mostNegative, -mostPositive, 0, false}, - {-mostPositive, -mostPositive, 1, false}, - } { - c, ok := int64Multiply(test.a, test.b) - if c != test.c { - t.Errorf("%v: unexpected result: %d", test, c) - } - if ok != test.ok { - t.Errorf("%v: unexpected overflow: %t", test, ok) - } - // multiplication is commutative - d, ok2 := int64Multiply(test.b, test.a) - if c != d || ok != ok2 { - t.Errorf("%v: not commutative: %d %t", test, d, ok2) - } - } -} - -func TestDetectOverflowScale(t *testing.T) { - for _, a := range []int64{0, -1, 1, 10, -10, mostPositive, mostNegative, -mostPositive} { - for _, b := range []int64{1, 2, 10, 100, 1000, mostPositive} { - expect, expectOk := int64Multiply(a, b) - - c, ok := int64MultiplyScale(a, b) - if c != expect { - t.Errorf("%d*%d: unexpected result: %d", a, b, c) - } - if ok != expectOk { - t.Errorf("%d*%d: unexpected overflow: %t", a, b, ok) - } - } - for _, test := range []struct { - base int64 - fn func(a int64) (int64, bool) - }{ - {10, int64MultiplyScale10}, - {100, int64MultiplyScale100}, - {1000, int64MultiplyScale1000}, - } { - expect, expectOk := int64Multiply(a, test.base) - c, ok := test.fn(a) - if c != expect { - t.Errorf("%d*%d: unexpected result: %d", a, test.base, c) - } - if ok != expectOk { - t.Errorf("%d*%d: unexpected overflow: %t", a, test.base, ok) - } - } - } -} - -func TestRemoveInt64Factors(t *testing.T) { - for _, test := range []struct { - value int64 - max int64 - result int64 - scale int32 - }{ - {100, 10, 1, 2}, - {100, 10, 1, 2}, - {100, 100, 1, 1}, - {1, 10, 1, 0}, - } { - r, s := removeInt64Factors(test.value, test.max) - if r != test.result { - t.Errorf("%v: unexpected result: %d", test, r) - } - if s != test.scale { - t.Errorf("%v: unexpected scale: %d", test, s) - } - } -} - -func TestNegativeScaleInt64(t *testing.T) { - for _, test := range []struct { - base int64 - scale Scale - result int64 - exact bool - }{ - {1234567, 0, 1234567, true}, - {1234567, 1, 123457, false}, - {1234567, 2, 12346, false}, - {1234567, 3, 1235, false}, - {1234567, 4, 124, false}, - - {-1234567, 0, -1234567, true}, - {-1234567, 1, -123457, false}, - {-1234567, 2, -12346, false}, - {-1234567, 3, -1235, false}, - {-1234567, 4, -124, false}, - - {1000, 0, 1000, true}, - {1000, 1, 100, true}, - {1000, 2, 10, true}, - {1000, 3, 1, true}, - {1000, 4, 1, false}, - - {-1000, 0, -1000, true}, - {-1000, 1, -100, true}, - {-1000, 2, -10, true}, - {-1000, 3, -1, true}, - {-1000, 4, -1, false}, - - {0, 0, 0, true}, - {0, 1, 0, true}, - {0, 2, 0, true}, - - // negative scale is undefined behavior - {1000, -1, 1000, true}, - } { - result, exact := negativeScaleInt64(test.base, test.scale) - if result != test.result { - t.Errorf("%v: unexpected result: %d", test, result) - } - if exact != test.exact { - t.Errorf("%v: unexpected exact: %t", test, exact) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_example_test.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_example_test.go deleted file mode 100644 index 56a7dbe0..00000000 --- a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_example_test.go +++ /dev/null @@ -1,59 +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 resource_test - -import ( - "fmt" - - "k8s.io/apimachinery/pkg/api/resource" -) - -func ExampleFormat() { - memorySize := resource.NewQuantity(5*1024*1024*1024, resource.BinarySI) - fmt.Printf("memorySize = %v\n", memorySize) - - diskSize := resource.NewQuantity(5*1000*1000*1000, resource.DecimalSI) - fmt.Printf("diskSize = %v\n", diskSize) - - cores := resource.NewMilliQuantity(5300, resource.DecimalSI) - fmt.Printf("cores = %v\n", cores) - - // Output: - // memorySize = 5Gi - // diskSize = 5G - // cores = 5300m -} - -func ExampleMustParse() { - memorySize := resource.MustParse("5Gi") - fmt.Printf("memorySize = %v (%v)\n", memorySize.Value(), memorySize.Format) - - diskSize := resource.MustParse("5G") - fmt.Printf("diskSize = %v (%v)\n", diskSize.Value(), diskSize.Format) - - cores := resource.MustParse("5300m") - fmt.Printf("milliCores = %v (%v)\n", cores.MilliValue(), cores.Format) - - cores2 := resource.MustParse("5.4") - fmt.Printf("milliCores = %v (%v)\n", cores2.MilliValue(), cores2.Format) - - // Output: - // memorySize = 5368709120 (BinarySI) - // diskSize = 5000000000 (DecimalSI) - // milliCores = 5300 (DecimalSI) - // milliCores = 5400 (DecimalSI) -} diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto_test.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto_test.go deleted file mode 100644 index 574a3cf5..00000000 --- a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto_test.go +++ /dev/null @@ -1,103 +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 resource - -import ( - "testing" - - inf "gopkg.in/inf.v0" -) - -func TestQuantityProtoMarshal(t *testing.T) { - // Test when d is nil - table := []struct { - quantity string - expect Quantity - }{ - {"0", Quantity{i: int64Amount{value: 0, scale: 0}, s: "0", Format: DecimalSI}}, - {"100m", Quantity{i: int64Amount{value: 100, scale: -3}, s: "100m", Format: DecimalSI}}, - {"50m", Quantity{i: int64Amount{value: 50, scale: -3}, s: "50m", Format: DecimalSI}}, - {"10000T", Quantity{i: int64Amount{value: 10000, scale: 12}, s: "10000T", Format: DecimalSI}}, - } - for _, testCase := range table { - q := MustParse(testCase.quantity) - // Won't currently get an error as MarshalTo can't return one - result, _ := q.Marshal() - q.MarshalTo(result) - if q.Cmp(testCase.expect) != 0 { - t.Errorf("Expected: %v, Actual: %v", testCase.expect, q) - } - } - // Test when i is {0,0} - table2 := []struct { - dec *inf.Dec - expect Quantity - }{ - {dec(0, 0).Dec, Quantity{i: int64Amount{value: 0, scale: 0}, d: infDecAmount{dec(0, 0).Dec}, s: "0", Format: DecimalSI}}, - {dec(10, 0).Dec, Quantity{i: int64Amount{value: 0, scale: 0}, d: infDecAmount{dec(10, 0).Dec}, s: "10", Format: DecimalSI}}, - {dec(-10, 0).Dec, Quantity{i: int64Amount{value: 0, scale: 0}, d: infDecAmount{dec(-10, 0).Dec}, s: "-10", Format: DecimalSI}}, - } - for _, testCase := range table2 { - q := Quantity{d: infDecAmount{testCase.dec}, Format: DecimalSI} - // Won't currently get an error as MarshalTo can't return one - result, _ := q.Marshal() - q.Unmarshal(result) - if q.Cmp(testCase.expect) != 0 { - t.Errorf("Expected: %v, Actual: %v", testCase.expect, q) - } - } -} - -func TestQuantityProtoUnmarshal(t *testing.T) { - // Test when d is nil - table := []struct { - input Quantity - expect string - }{ - {Quantity{i: int64Amount{value: 0, scale: 0}, s: "0", Format: DecimalSI}, "0"}, - {Quantity{i: int64Amount{value: 100, scale: -3}, s: "100m", Format: DecimalSI}, "100m"}, - {Quantity{i: int64Amount{value: 50, scale: -3}, s: "50m", Format: DecimalSI}, "50m"}, - {Quantity{i: int64Amount{value: 10000, scale: 12}, s: "10000T", Format: DecimalSI}, "10000T"}, - } - for _, testCase := range table { - var inputQ Quantity - expectQ := MustParse(testCase.expect) - inputByteArray, _ := testCase.input.Marshal() - inputQ.Unmarshal(inputByteArray) - if inputQ.Cmp(expectQ) != 0 { - t.Errorf("Expected: %v, Actual: %v", inputQ, expectQ) - } - } - // Test when i is {0,0} - table2 := []struct { - input Quantity - expect *inf.Dec - }{ - {Quantity{i: int64Amount{value: 0, scale: 0}, d: infDecAmount{dec(0, 0).Dec}, s: "0", Format: DecimalSI}, dec(0, 0).Dec}, - {Quantity{i: int64Amount{value: 0, scale: 0}, d: infDecAmount{dec(10, 0).Dec}, s: "10", Format: DecimalSI}, dec(10, 0).Dec}, - {Quantity{i: int64Amount{value: 0, scale: 0}, d: infDecAmount{dec(-10, 0).Dec}, s: "-10", Format: DecimalSI}, dec(-10, 0).Dec}, - } - for _, testCase := range table2 { - var inputQ Quantity - expectQ := Quantity{d: infDecAmount{testCase.expect}, Format: DecimalSI} - inputByteArray, _ := testCase.input.Marshal() - inputQ.Unmarshal(inputByteArray) - if inputQ.Cmp(expectQ) != 0 { - t.Errorf("Expected: %v, Actual: %v", inputQ, expectQ) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_test.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_test.go deleted file mode 100644 index 915b2444..00000000 --- a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_test.go +++ /dev/null @@ -1,1352 +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 resource - -import ( - "encoding/json" - "math/rand" - "strings" - "testing" - "unicode" - - fuzz "github.com/google/gofuzz" - - inf "gopkg.in/inf.v0" -) - -func amount(i int64, exponent int) infDecAmount { - // See the below test-- scale is the negative of an exponent. - return infDecAmount{inf.NewDec(i, inf.Scale(-exponent))} -} - -func dec(i int64, exponent int) infDecAmount { - // See the below test-- scale is the negative of an exponent. - return infDecAmount{inf.NewDec(i, inf.Scale(-exponent))} -} - -func decQuantity(i int64, exponent int, format Format) Quantity { - return Quantity{d: dec(i, exponent), Format: format} -} - -func intQuantity(i int64, exponent Scale, format Format) Quantity { - return Quantity{i: int64Amount{value: i, scale: exponent}, Format: format} -} - -func TestDec(t *testing.T) { - table := []struct { - got infDecAmount - expect string - }{ - {dec(1, 0), "1"}, - {dec(1, 1), "10"}, - {dec(5, 2), "500"}, - {dec(8, 3), "8000"}, - {dec(2, 0), "2"}, - {dec(1, -1), "0.1"}, - {dec(3, -2), "0.03"}, - {dec(4, -3), "0.004"}, - } - - for _, item := range table { - if e, a := item.expect, item.got.Dec.String(); e != a { - t.Errorf("expected %v, got %v", e, a) - } - } -} - -// TestQuantityParseZero ensures that when a 0 quantity is passed, its string value is 0 -func TestQuantityParseZero(t *testing.T) { - zero := MustParse("0") - if expected, actual := "0", zero.String(); expected != actual { - t.Errorf("Expected %v, actual %v", expected, actual) - } -} - -// TestQuantityParseNonNumericPanic ensures that when a non-numeric string is parsed -// it panics -func TestQuantityParseNonNumericPanic(t *testing.T) { - defer func() { - if r := recover(); r == nil { - t.Errorf("MustParse did not panic") - } - }() - _ = MustParse("Non-Numeric") -} - -// TestQuantityAddZeroPreservesSuffix verifies that a suffix is preserved -// independent of the order of operations when adding a zero and non-zero val -func TestQuantityAddZeroPreservesSuffix(t *testing.T) { - testValues := []string{"100m", "1Gi"} - zero := MustParse("0") - for _, testValue := range testValues { - value := MustParse(testValue) - v1 := *value.Copy() - // ensure non-zero + zero = non-zero (suffix preserved) - v1.Add(zero) - // ensure zero + non-zero = non-zero (suffix preserved) - v2 := *zero.Copy() - v2.Add(value) - - if v1.String() != testValue { - t.Errorf("Expected %v, actual %v", testValue, v1.String()) - continue - } - if v2.String() != testValue { - t.Errorf("Expected %v, actual %v", testValue, v2.String()) - } - } -} - -// TestQuantitySubZeroPreservesSuffix verifies that a suffix is preserved -// independent of the order of operations when subtracting a zero and non-zero val -func TestQuantitySubZeroPreservesSuffix(t *testing.T) { - testValues := []string{"100m", "1Gi"} - zero := MustParse("0") - for _, testValue := range testValues { - value := MustParse(testValue) - v1 := *value.Copy() - // ensure non-zero - zero = non-zero (suffix preserved) - v1.Sub(zero) - // ensure we preserved the input value - if v1.String() != testValue { - t.Errorf("Expected %v, actual %v", testValue, v1.String()) - } - - // ensure zero - non-zero = -non-zero (suffix preserved) - v2 := *zero.Copy() - v2.Sub(value) - negVal := *value.Copy() - negVal.Neg() - if v2.String() != negVal.String() { - t.Errorf("Expected %v, actual %v", negVal.String(), v2.String()) - } - } -} - -// TestQuantityCanocicalizeZero verifies that you get 0 as canonical value if internal value is 0, and not 0 -func TestQuantityCanocicalizeZero(t *testing.T) { - val := MustParse("1000m") - val.i.Sub(int64Amount{value: 1}) - zero := Quantity{i: val.i, Format: DecimalSI} - if expected, actual := "0", zero.String(); expected != actual { - t.Errorf("Expected %v, actual %v", expected, actual) - } -} - -func TestQuantityCmp(t *testing.T) { - // Test when d is nil - table := []struct { - x string - y string - expect int - }{ - {"0", "0", 0}, - {"100m", "50m", 1}, - {"50m", "100m", -1}, - {"10000T", "100Gi", 1}, - } - for _, testCase := range table { - q1 := MustParse(testCase.x) - q2 := MustParse(testCase.y) - if result := q1.Cmp(q2); result != testCase.expect { - t.Errorf("X: %v, Y: %v, Expected: %v, Actual: %v", testCase.x, testCase.y, testCase.expect, result) - } - } - // Test when i is {0,0} - table2 := []struct { - x *inf.Dec - y *inf.Dec - expect int - }{ - {dec(0, 0).Dec, dec(0, 0).Dec, 0}, - {nil, dec(0, 0).Dec, 0}, - {dec(0, 0).Dec, nil, 0}, - {nil, nil, 0}, - {nil, dec(10, 0).Dec, -1}, - {nil, dec(-10, 0).Dec, 1}, - {dec(10, 0).Dec, nil, 1}, - {dec(-10, 0).Dec, nil, -1}, - } - for _, testCase := range table2 { - q1 := Quantity{d: infDecAmount{testCase.x}, Format: DecimalSI} - q2 := Quantity{d: infDecAmount{testCase.y}, Format: DecimalSI} - if result := q1.Cmp(q2); result != testCase.expect { - t.Errorf("X: %v, Y: %v, Expected: %v, Actual: %v", testCase.x, testCase.y, testCase.expect, result) - } - } -} - -func TestParseQuantityString(t *testing.T) { - table := []struct { - input string - positive bool - value string - num, denom, suffix string - }{ - {"0.025Ti", true, "0.025", "0", "025", "Ti"}, - {"1.025Ti", true, "1.025", "1", "025", "Ti"}, - {"-1.025Ti", false, "-1.025", "1", "025", "Ti"}, - {".", true, ".", "0", "", ""}, - {"-.", false, "-.", "0", "", ""}, - {"1E-3", true, "1", "1", "", "E-3"}, - } - for _, test := range table { - positive, value, num, denom, suffix, err := parseQuantityString(test.input) - if err != nil { - t.Errorf("%s: error: %v", test.input, err) - continue - } - if positive != test.positive || value != test.value || num != test.num || denom != test.denom || suffix != test.suffix { - t.Errorf("%s: unmatched: %t %q %q %q %q", test.input, positive, value, num, denom, suffix) - } - } -} - -func TestQuantityParse(t *testing.T) { - if _, err := ParseQuantity(""); err == nil { - t.Errorf("expected empty string to return error") - } - - table := []struct { - input string - expect Quantity - }{ - {"0", decQuantity(0, 0, DecimalSI)}, - {"0n", decQuantity(0, 0, DecimalSI)}, - {"0u", decQuantity(0, 0, DecimalSI)}, - {"0m", decQuantity(0, 0, DecimalSI)}, - {"0Ki", decQuantity(0, 0, BinarySI)}, - {"0k", decQuantity(0, 0, DecimalSI)}, - {"0Mi", decQuantity(0, 0, BinarySI)}, - {"0M", decQuantity(0, 0, DecimalSI)}, - {"0Gi", decQuantity(0, 0, BinarySI)}, - {"0G", decQuantity(0, 0, DecimalSI)}, - {"0Ti", decQuantity(0, 0, BinarySI)}, - {"0T", decQuantity(0, 0, DecimalSI)}, - - // Quantity less numbers are allowed - {"1", decQuantity(1, 0, DecimalSI)}, - - // Binary suffixes - {"1Ki", decQuantity(1024, 0, BinarySI)}, - {"8Ki", decQuantity(8*1024, 0, BinarySI)}, - {"7Mi", decQuantity(7*1024*1024, 0, BinarySI)}, - {"6Gi", decQuantity(6*1024*1024*1024, 0, BinarySI)}, - {"5Ti", decQuantity(5*1024*1024*1024*1024, 0, BinarySI)}, - {"4Pi", decQuantity(4*1024*1024*1024*1024*1024, 0, BinarySI)}, - {"3Ei", decQuantity(3*1024*1024*1024*1024*1024*1024, 0, BinarySI)}, - - {"10Ti", decQuantity(10*1024*1024*1024*1024, 0, BinarySI)}, - {"100Ti", decQuantity(100*1024*1024*1024*1024, 0, BinarySI)}, - - // Decimal suffixes - {"5n", decQuantity(5, -9, DecimalSI)}, - {"4u", decQuantity(4, -6, DecimalSI)}, - {"3m", decQuantity(3, -3, DecimalSI)}, - {"9", decQuantity(9, 0, DecimalSI)}, - {"8k", decQuantity(8, 3, DecimalSI)}, - {"50k", decQuantity(5, 4, DecimalSI)}, - {"7M", decQuantity(7, 6, DecimalSI)}, - {"6G", decQuantity(6, 9, DecimalSI)}, - {"5T", decQuantity(5, 12, DecimalSI)}, - {"40T", decQuantity(4, 13, DecimalSI)}, - {"300T", decQuantity(3, 14, DecimalSI)}, - {"2P", decQuantity(2, 15, DecimalSI)}, - {"1E", decQuantity(1, 18, DecimalSI)}, - - // Decimal exponents - {"1E-3", decQuantity(1, -3, DecimalExponent)}, - {"1e3", decQuantity(1, 3, DecimalExponent)}, - {"1E6", decQuantity(1, 6, DecimalExponent)}, - {"1e9", decQuantity(1, 9, DecimalExponent)}, - {"1E12", decQuantity(1, 12, DecimalExponent)}, - {"1e15", decQuantity(1, 15, DecimalExponent)}, - {"1E18", decQuantity(1, 18, DecimalExponent)}, - - // Nonstandard but still parsable - {"1e14", decQuantity(1, 14, DecimalExponent)}, - {"1e13", decQuantity(1, 13, DecimalExponent)}, - {"1e3", decQuantity(1, 3, DecimalExponent)}, - {"100.035k", decQuantity(100035, 0, DecimalSI)}, - - // Things that look like floating point - {"0.001", decQuantity(1, -3, DecimalSI)}, - {"0.0005k", decQuantity(5, -1, DecimalSI)}, - {"0.005", decQuantity(5, -3, DecimalSI)}, - {"0.05", decQuantity(5, -2, DecimalSI)}, - {"0.5", decQuantity(5, -1, DecimalSI)}, - {"0.00050k", decQuantity(5, -1, DecimalSI)}, - {"0.00500", decQuantity(5, -3, DecimalSI)}, - {"0.05000", decQuantity(5, -2, DecimalSI)}, - {"0.50000", decQuantity(5, -1, DecimalSI)}, - {"0.5e0", decQuantity(5, -1, DecimalExponent)}, - {"0.5e-1", decQuantity(5, -2, DecimalExponent)}, - {"0.5e-2", decQuantity(5, -3, DecimalExponent)}, - {"0.5e0", decQuantity(5, -1, DecimalExponent)}, - {"10.035M", decQuantity(10035, 3, DecimalSI)}, - - {"1.2e3", decQuantity(12, 2, DecimalExponent)}, - {"1.3E+6", decQuantity(13, 5, DecimalExponent)}, - {"1.40e9", decQuantity(14, 8, DecimalExponent)}, - {"1.53E12", decQuantity(153, 10, DecimalExponent)}, - {"1.6e15", decQuantity(16, 14, DecimalExponent)}, - {"1.7E18", decQuantity(17, 17, DecimalExponent)}, - - {"9.01", decQuantity(901, -2, DecimalSI)}, - {"8.1k", decQuantity(81, 2, DecimalSI)}, - {"7.123456M", decQuantity(7123456, 0, DecimalSI)}, - {"6.987654321G", decQuantity(6987654321, 0, DecimalSI)}, - {"5.444T", decQuantity(5444, 9, DecimalSI)}, - {"40.1T", decQuantity(401, 11, DecimalSI)}, - {"300.2T", decQuantity(3002, 11, DecimalSI)}, - {"2.5P", decQuantity(25, 14, DecimalSI)}, - {"1.01E", decQuantity(101, 16, DecimalSI)}, - - // Things that saturate/round - {"3.001n", decQuantity(4, -9, DecimalSI)}, - {"1.1E-9", decQuantity(2, -9, DecimalExponent)}, - {"0.0000000001", decQuantity(1, -9, DecimalSI)}, - {"0.0000000005", decQuantity(1, -9, DecimalSI)}, - {"0.00000000050", decQuantity(1, -9, DecimalSI)}, - {"0.5e-9", decQuantity(1, -9, DecimalExponent)}, - {"0.9n", decQuantity(1, -9, DecimalSI)}, - {"0.00000012345", decQuantity(124, -9, DecimalSI)}, - {"0.00000012354", decQuantity(124, -9, DecimalSI)}, - {"9Ei", Quantity{d: maxAllowed, Format: BinarySI}}, - {"9223372036854775807Ki", Quantity{d: maxAllowed, Format: BinarySI}}, - {"12E", decQuantity(12, 18, DecimalSI)}, - - // We'll accept fractional binary stuff, too. - {"100.035Ki", decQuantity(10243584, -2, BinarySI)}, - {"0.5Mi", decQuantity(.5*1024*1024, 0, BinarySI)}, - {"0.05Gi", decQuantity(536870912, -1, BinarySI)}, - {"0.025Ti", decQuantity(274877906944, -1, BinarySI)}, - - // Things written by trolls - {"0.000000000001Ki", decQuantity(2, -9, DecimalSI)}, // rounds up, changes format - {".001", decQuantity(1, -3, DecimalSI)}, - {".0001k", decQuantity(100, -3, DecimalSI)}, - {"1.", decQuantity(1, 0, DecimalSI)}, - {"1.G", decQuantity(1, 9, DecimalSI)}, - } - - for _, asDec := range []bool{false, true} { - for _, item := range table { - got, err := ParseQuantity(item.input) - if err != nil { - t.Errorf("%v: unexpected error: %v", item.input, err) - continue - } - if asDec { - got.AsDec() - } - - if e, a := item.expect, got; e.Cmp(a) != 0 { - t.Errorf("%v: expected %v, got %v", item.input, e.String(), a.String()) - } - if e, a := item.expect.Format, got.Format; e != a { - t.Errorf("%v: expected %#v, got %#v", item.input, e, a) - } - - if asDec { - if i, ok := got.AsInt64(); i != 0 || ok { - t.Errorf("%v: expected inf.Dec to return false for AsInt64: %d", item.input, i) - } - continue - } - i, ok := item.expect.AsInt64() - if !ok { - continue - } - j, ok := got.AsInt64() - if !ok { - if got.d.Dec == nil && got.i.scale >= 0 { - t.Errorf("%v: is an int64Amount, but can't return AsInt64: %v", item.input, got) - } - continue - } - if i != j { - t.Errorf("%v: expected equivalent representation as int64: %d %d", item.input, i, j) - } - } - - for _, item := range table { - got, err := ParseQuantity(item.input) - if err != nil { - t.Errorf("%v: unexpected error: %v", item.input, err) - continue - } - - if asDec { - got.AsDec() - } - - // verify that we can decompose the input and get the same result by building up from the base. - positive, _, num, denom, suffix, err := parseQuantityString(item.input) - if err != nil { - t.Errorf("%v: unexpected error: %v", item.input, err) - continue - } - if got.Sign() >= 0 && !positive || got.Sign() < 0 && positive { - t.Errorf("%v: positive was incorrect: %t", item.input, positive) - continue - } - var value string - if !positive { - value = "-" - } - value += num - if len(denom) > 0 { - value += "." + denom - } - value += suffix - if len(value) == 0 { - t.Errorf("%v: did not parse correctly, %q %q %q", item.input, num, denom, suffix) - } - expected, err := ParseQuantity(value) - if err != nil { - t.Errorf("%v: unexpected error for %s: %v", item.input, value, err) - continue - } - if expected.Cmp(got) != 0 { - t.Errorf("%v: not the same as %s", item.input, value) - continue - } - } - - // Try the negative version of everything - desired := &inf.Dec{} - expect := Quantity{d: infDecAmount{Dec: desired}} - for _, item := range table { - got, err := ParseQuantity("-" + strings.TrimLeftFunc(item.input, unicode.IsSpace)) - if err != nil { - t.Errorf("-%v: unexpected error: %v", item.input, err) - continue - } - if asDec { - got.AsDec() - } - - expected := item.expect - desired.Neg(expected.AsDec()) - - if e, a := expect, got; e.Cmp(a) != 0 { - t.Errorf("%v: expected %s, got %s", item.input, e.String(), a.String()) - } - if e, a := expected.Format, got.Format; e != a { - t.Errorf("%v: expected %#v, got %#v", item.input, e, a) - } - } - - // Try everything with an explicit + - for _, item := range table { - got, err := ParseQuantity("+" + strings.TrimLeftFunc(item.input, unicode.IsSpace)) - if err != nil { - t.Errorf("-%v: unexpected error: %v", item.input, err) - continue - } - if asDec { - got.AsDec() - } - - if e, a := item.expect, got; e.Cmp(a) != 0 { - t.Errorf("%v(%t): expected %s, got %s", item.input, asDec, e.String(), a.String()) - } - if e, a := item.expect.Format, got.Format; e != a { - t.Errorf("%v: expected %#v, got %#v", item.input, e, a) - } - } - } - - invalid := []string{ - "1.1.M", - "1+1.0M", - "0.1mi", - "0.1am", - "aoeu", - ".5i", - "1i", - "-3.01i", - "-3.01e-", - - // trailing whitespace is forbidden - " 1", - "1 ", - } - for _, item := range invalid { - _, err := ParseQuantity(item) - if err == nil { - t.Errorf("%v parsed unexpectedly", item) - } - } -} - -func TestQuantityRoundUp(t *testing.T) { - table := []struct { - in string - scale Scale - expect Quantity - ok bool - }{ - {"9.01", -3, decQuantity(901, -2, DecimalSI), true}, - {"9.01", -2, decQuantity(901, -2, DecimalSI), true}, - {"9.01", -1, decQuantity(91, -1, DecimalSI), false}, - {"9.01", 0, decQuantity(10, 0, DecimalSI), false}, - {"9.01", 1, decQuantity(10, 0, DecimalSI), false}, - {"9.01", 2, decQuantity(100, 0, DecimalSI), false}, - - {"-9.01", -3, decQuantity(-901, -2, DecimalSI), true}, - {"-9.01", -2, decQuantity(-901, -2, DecimalSI), true}, - {"-9.01", -1, decQuantity(-91, -1, DecimalSI), false}, - {"-9.01", 0, decQuantity(-10, 0, DecimalSI), false}, - {"-9.01", 1, decQuantity(-10, 0, DecimalSI), false}, - {"-9.01", 2, decQuantity(-100, 0, DecimalSI), false}, - } - - for _, asDec := range []bool{false, true} { - for _, item := range table { - got, err := ParseQuantity(item.in) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - expect := *item.expect.Copy() - if asDec { - got.AsDec() - } - if ok := got.RoundUp(item.scale); ok != item.ok { - t.Errorf("%s(%d,%t): unexpected ok: %t", item.in, item.scale, asDec, ok) - } - if got.Cmp(expect) != 0 { - t.Errorf("%s(%d,%t): unexpected round: %s vs %s", item.in, item.scale, asDec, got.String(), expect.String()) - } - } - } -} - -func TestQuantityCmpInt64AndDec(t *testing.T) { - table := []struct { - a, b Quantity - cmp int - }{ - {intQuantity(901, -2, DecimalSI), intQuantity(901, -2, DecimalSI), 0}, - {intQuantity(90, -1, DecimalSI), intQuantity(901, -2, DecimalSI), -1}, - {intQuantity(901, -2, DecimalSI), intQuantity(900, -2, DecimalSI), 1}, - {intQuantity(0, 0, DecimalSI), intQuantity(0, 0, DecimalSI), 0}, - {intQuantity(0, 1, DecimalSI), intQuantity(0, -1, DecimalSI), 0}, - {intQuantity(0, -1, DecimalSI), intQuantity(0, 1, DecimalSI), 0}, - {intQuantity(800, -3, DecimalSI), intQuantity(1, 0, DecimalSI), -1}, - {intQuantity(800, -3, DecimalSI), intQuantity(79, -2, DecimalSI), 1}, - - {intQuantity(mostPositive, 0, DecimalSI), intQuantity(1, -1, DecimalSI), 1}, - {intQuantity(mostPositive, 1, DecimalSI), intQuantity(1, 0, DecimalSI), 1}, - {intQuantity(mostPositive, 1, DecimalSI), intQuantity(1, 1, DecimalSI), 1}, - {intQuantity(mostPositive, 1, DecimalSI), intQuantity(0, 1, DecimalSI), 1}, - {intQuantity(mostPositive, -16, DecimalSI), intQuantity(1, 3, DecimalSI), -1}, - - {intQuantity(mostNegative, 0, DecimalSI), intQuantity(0, 0, DecimalSI), -1}, - {intQuantity(mostNegative, -18, DecimalSI), intQuantity(-1, 0, DecimalSI), -1}, - {intQuantity(mostNegative, -19, DecimalSI), intQuantity(-1, 0, DecimalSI), 1}, - - {intQuantity(1*1000000*1000000*1000000, -17, DecimalSI), intQuantity(1, 1, DecimalSI), 0}, - {intQuantity(1*1000000*1000000*1000000, -17, DecimalSI), intQuantity(-10, 0, DecimalSI), 1}, - {intQuantity(-1*1000000*1000000*1000000, -17, DecimalSI), intQuantity(-10, 0, DecimalSI), 0}, - {intQuantity(1*1000000*1000000*1000000, -17, DecimalSI), intQuantity(1, 0, DecimalSI), 1}, - - {intQuantity(1*1000000*1000000*1000000+1, -17, DecimalSI), intQuantity(1, 1, DecimalSI), 1}, - {intQuantity(1*1000000*1000000*1000000-1, -17, DecimalSI), intQuantity(1, 1, DecimalSI), -1}, - } - - for _, item := range table { - if cmp := item.a.Cmp(item.b); cmp != item.cmp { - t.Errorf("%#v: unexpected Cmp: %d", item, cmp) - } - if cmp := item.b.Cmp(item.a); cmp != -item.cmp { - t.Errorf("%#v: unexpected inverted Cmp: %d", item, cmp) - } - } - - for _, item := range table { - a, b := *item.a.Copy(), *item.b.Copy() - a.AsDec() - if cmp := a.Cmp(b); cmp != item.cmp { - t.Errorf("%#v: unexpected Cmp: %d", item, cmp) - } - if cmp := b.Cmp(a); cmp != -item.cmp { - t.Errorf("%#v: unexpected inverted Cmp: %d", item, cmp) - } - } - - for _, item := range table { - a, b := *item.a.Copy(), *item.b.Copy() - b.AsDec() - if cmp := a.Cmp(b); cmp != item.cmp { - t.Errorf("%#v: unexpected Cmp: %d", item, cmp) - } - if cmp := b.Cmp(a); cmp != -item.cmp { - t.Errorf("%#v: unexpected inverted Cmp: %d", item, cmp) - } - } - - for _, item := range table { - a, b := *item.a.Copy(), *item.b.Copy() - a.AsDec() - b.AsDec() - if cmp := a.Cmp(b); cmp != item.cmp { - t.Errorf("%#v: unexpected Cmp: %d", item, cmp) - } - if cmp := b.Cmp(a); cmp != -item.cmp { - t.Errorf("%#v: unexpected inverted Cmp: %d", item, cmp) - } - } -} - -func TestQuantityNeg(t *testing.T) { - table := []struct { - a Quantity - out string - }{ - {intQuantity(901, -2, DecimalSI), "-9010m"}, - {decQuantity(901, -2, DecimalSI), "-9010m"}, - } - - for i, item := range table { - out := *item.a.Copy() - out.Neg() - if out.Cmp(item.a) == 0 { - t.Errorf("%d: negating an item should not mutate the source: %s", i, out.String()) - } - if out.String() != item.out { - t.Errorf("%d: negating did not equal exact value: %s", i, out.String()) - } - } -} - -func TestQuantityString(t *testing.T) { - table := []struct { - in Quantity - expect string - alternate string - }{ - {decQuantity(1024*1024*1024, 0, BinarySI), "1Gi", "1024Mi"}, - {decQuantity(300*1024*1024, 0, BinarySI), "300Mi", "307200Ki"}, - {decQuantity(6*1024, 0, BinarySI), "6Ki", ""}, - {decQuantity(1001*1024*1024*1024, 0, BinarySI), "1001Gi", "1025024Mi"}, - {decQuantity(1024*1024*1024*1024, 0, BinarySI), "1Ti", "1024Gi"}, - {decQuantity(5, 0, BinarySI), "5", "5000m"}, - {decQuantity(500, -3, BinarySI), "500m", "0.5"}, - {decQuantity(1, 9, DecimalSI), "1G", "1000M"}, - {decQuantity(1000, 6, DecimalSI), "1G", "0.001T"}, - {decQuantity(1000000, 3, DecimalSI), "1G", ""}, - {decQuantity(1000000000, 0, DecimalSI), "1G", ""}, - {decQuantity(1, -3, DecimalSI), "1m", "1000u"}, - {decQuantity(80, -3, DecimalSI), "80m", ""}, - {decQuantity(1080, -3, DecimalSI), "1080m", "1.08"}, - {decQuantity(108, -2, DecimalSI), "1080m", "1080000000n"}, - {decQuantity(10800, -4, DecimalSI), "1080m", ""}, - {decQuantity(300, 6, DecimalSI), "300M", ""}, - {decQuantity(1, 12, DecimalSI), "1T", ""}, - {decQuantity(1234567, 6, DecimalSI), "1234567M", ""}, - {decQuantity(1234567, -3, BinarySI), "1234567m", ""}, - {decQuantity(3, 3, DecimalSI), "3k", ""}, - {decQuantity(1025, 0, BinarySI), "1025", ""}, - {decQuantity(0, 0, DecimalSI), "0", ""}, - {decQuantity(0, 0, BinarySI), "0", ""}, - {decQuantity(1, 9, DecimalExponent), "1e9", ".001e12"}, - {decQuantity(1, -3, DecimalExponent), "1e-3", "0.001e0"}, - {decQuantity(1, -9, DecimalExponent), "1e-9", "1000e-12"}, - {decQuantity(80, -3, DecimalExponent), "80e-3", ""}, - {decQuantity(300, 6, DecimalExponent), "300e6", ""}, - {decQuantity(1, 12, DecimalExponent), "1e12", ""}, - {decQuantity(1, 3, DecimalExponent), "1e3", ""}, - {decQuantity(3, 3, DecimalExponent), "3e3", ""}, - {decQuantity(3, 3, DecimalSI), "3k", ""}, - {decQuantity(0, 0, DecimalExponent), "0", "00"}, - {decQuantity(1, -9, DecimalSI), "1n", ""}, - {decQuantity(80, -9, DecimalSI), "80n", ""}, - {decQuantity(1080, -9, DecimalSI), "1080n", ""}, - {decQuantity(108, -8, DecimalSI), "1080n", ""}, - {decQuantity(10800, -10, DecimalSI), "1080n", ""}, - {decQuantity(1, -6, DecimalSI), "1u", ""}, - {decQuantity(80, -6, DecimalSI), "80u", ""}, - {decQuantity(1080, -6, DecimalSI), "1080u", ""}, - } - for _, item := range table { - got := item.in.String() - if e, a := item.expect, got; e != a { - t.Errorf("%#v: expected %v, got %v", item.in, e, a) - } - q, err := ParseQuantity(item.expect) - if err != nil { - t.Errorf("%#v: unexpected error: %v", item.expect, err) - } - if len(q.s) == 0 || q.s != item.expect { - t.Errorf("%#v: did not copy canonical string on parse: %s", item.expect, q.s) - } - if len(item.alternate) == 0 { - continue - } - q, err = ParseQuantity(item.alternate) - if err != nil { - t.Errorf("%#v: unexpected error: %v", item.expect, err) - continue - } - if len(q.s) != 0 { - t.Errorf("%#v: unexpected nested string: %v", item.expect, q.s) - } - if q.String() != item.expect { - t.Errorf("%#v: unexpected alternate canonical: %v", item.expect, q.String()) - } - if len(q.s) == 0 || q.s != item.expect { - t.Errorf("%#v: did not set canonical string on ToString: %s", item.expect, q.s) - } - } - desired := &inf.Dec{} // Avoid modifying the values in the table. - for _, item := range table { - if item.in.Cmp(Quantity{}) == 0 { - // Don't expect it to print "-0" ever - continue - } - q := item.in - q.d = infDecAmount{desired.Neg(q.AsDec())} - if e, a := "-"+item.expect, q.String(); e != a { - t.Errorf("%#v: expected %v, got %v", item.in, e, a) - } - } -} - -func TestQuantityParseEmit(t *testing.T) { - table := []struct { - in string - expect string - }{ - {"1Ki", "1Ki"}, - {"1Mi", "1Mi"}, - {"1Gi", "1Gi"}, - {"1024Mi", "1Gi"}, - {"1000M", "1G"}, - {".001Ki", "1024m"}, - {".000001Ki", "1024u"}, - {".000000001Ki", "1024n"}, - {".000000000001Ki", "2n"}, - } - - for _, item := range table { - q, err := ParseQuantity(item.in) - if err != nil { - t.Errorf("Couldn't parse %v", item.in) - continue - } - if e, a := item.expect, q.String(); e != a { - t.Errorf("%#v: expected %v, got %v", item.in, e, a) - } - } - for _, item := range table { - q, err := ParseQuantity("-" + item.in) - if err != nil { - t.Errorf("Couldn't parse %v", item.in) - continue - } - if q.Cmp(Quantity{}) == 0 { - continue - } - if e, a := "-"+item.expect, q.String(); e != a { - t.Errorf("%#v: expected %v, got %v (%#v)", item.in, e, a, q.i) - } - } -} - -var fuzzer = fuzz.New().Funcs( - func(q *Quantity, c fuzz.Continue) { - q.i = Zero - if c.RandBool() { - q.Format = BinarySI - if c.RandBool() { - dec := &inf.Dec{} - q.d = infDecAmount{Dec: dec} - dec.SetScale(0) - dec.SetUnscaled(c.Int63()) - return - } - // Be sure to test cases like 1Mi - dec := &inf.Dec{} - q.d = infDecAmount{Dec: dec} - dec.SetScale(0) - dec.SetUnscaled(c.Int63n(1024) << uint(10*c.Intn(5))) - return - } - if c.RandBool() { - q.Format = DecimalSI - } else { - q.Format = DecimalExponent - } - if c.RandBool() { - dec := &inf.Dec{} - q.d = infDecAmount{Dec: dec} - dec.SetScale(inf.Scale(c.Intn(4))) - dec.SetUnscaled(c.Int63()) - return - } - // Be sure to test cases like 1M - dec := &inf.Dec{} - q.d = infDecAmount{Dec: dec} - dec.SetScale(inf.Scale(3 - c.Intn(15))) - dec.SetUnscaled(c.Int63n(1000)) - }, -) - -func TestQuantityDeepCopy(t *testing.T) { - // Test when d is nil - slice := []string{"0", "100m", "50m", "10000T"} - for _, testCase := range slice { - q := MustParse(testCase) - if result := q.DeepCopy(); result != q { - t.Errorf("Expected: %v, Actual: %v", q, result) - } - } - table := []*inf.Dec{ - dec(0, 0).Dec, - dec(10, 0).Dec, - dec(-10, 0).Dec, - } - // Test when i is {0,0} - for _, testCase := range table { - q := Quantity{d: infDecAmount{testCase}, Format: DecimalSI} - result := q.DeepCopy() - if q.d.Cmp(result.AsDec()) != 0 { - t.Errorf("Expected: %v, Actual: %v", q.String(), result.String()) - } - result = Quantity{d: infDecAmount{dec(2, 0).Dec}, Format: DecimalSI} - if q.d.Cmp(result.AsDec()) == 0 { - t.Errorf("Modifying result has affected q") - } - } -} - -func TestJSON(t *testing.T) { - for i := 0; i < 500; i++ { - q := &Quantity{} - fuzzer.Fuzz(q) - b, err := json.Marshal(q) - if err != nil { - t.Errorf("error encoding %v: %v", q, err) - continue - } - q2 := &Quantity{} - err = json.Unmarshal(b, q2) - if err != nil { - t.Logf("%d: %s", i, string(b)) - t.Errorf("%v: error decoding %v: %v", q, string(b), err) - } - if q2.Cmp(*q) != 0 { - t.Errorf("Expected equal: %v, %v (json was '%v')", q, q2, string(b)) - } - } -} - -func TestJSONWhitespace(t *testing.T) { - q := Quantity{} - testCases := []struct { - in string - expect string - }{ - {`" 1"`, "1"}, - {`"1 "`, "1"}, - {`1`, "1"}, - {` 1`, "1"}, - {`1 `, "1"}, - {`10`, "10"}, - {`-1`, "-1"}, - {` -1`, "-1"}, - } - for _, test := range testCases { - if err := json.Unmarshal([]byte(test.in), &q); err != nil { - t.Errorf("%q: %v", test.in, err) - } - if q.String() != test.expect { - t.Errorf("unexpected string: %q", q.String()) - } - } -} - -func TestMilliNewSet(t *testing.T) { - table := []struct { - value int64 - format Format - expect string - exact bool - }{ - {1, DecimalSI, "1m", true}, - {1000, DecimalSI, "1", true}, - {1234000, DecimalSI, "1234", true}, - {1024, BinarySI, "1024m", false}, // Format changes - {1000000, "invalidFormatDefaultsToExponent", "1e3", true}, - {1024 * 1024, BinarySI, "1048576m", false}, // Format changes - } - - for _, item := range table { - q := NewMilliQuantity(item.value, item.format) - if e, a := item.expect, q.String(); e != a { - t.Errorf("Expected %v, got %v; %#v", e, a, q) - } - if !item.exact { - continue - } - q2, err := ParseQuantity(q.String()) - if err != nil { - t.Errorf("Round trip failed on %v", q) - } - if e, a := item.value, q2.MilliValue(); e != a { - t.Errorf("Expected %v, got %v", e, a) - } - } - - for _, item := range table { - q := NewQuantity(0, item.format) - q.SetMilli(item.value) - if e, a := item.expect, q.String(); e != a { - t.Errorf("Set: Expected %v, got %v; %#v", e, a, q) - } - } -} - -func TestNewSet(t *testing.T) { - table := []struct { - value int64 - format Format - expect string - }{ - {1, DecimalSI, "1"}, - {1000, DecimalSI, "1k"}, - {1234000, DecimalSI, "1234k"}, - {1024, BinarySI, "1Ki"}, - {1000000, "invalidFormatDefaultsToExponent", "1e6"}, - {1024 * 1024, BinarySI, "1Mi"}, - } - - for _, asDec := range []bool{false, true} { - for _, item := range table { - q := NewQuantity(item.value, item.format) - if asDec { - q.ToDec() - } - if e, a := item.expect, q.String(); e != a { - t.Errorf("Expected %v, got %v; %#v", e, a, q) - } - q2, err := ParseQuantity(q.String()) - if err != nil { - t.Errorf("Round trip failed on %v", q) - } - if e, a := item.value, q2.Value(); e != a { - t.Errorf("Expected %v, got %v", e, a) - } - } - - for _, item := range table { - q := NewQuantity(0, item.format) - q.Set(item.value) - if asDec { - q.ToDec() - } - if e, a := item.expect, q.String(); e != a { - t.Errorf("Set: Expected %v, got %v; %#v", e, a, q) - } - } - } -} - -func TestNewScaledSet(t *testing.T) { - table := []struct { - value int64 - scale Scale - expect string - }{ - {1, Nano, "1n"}, - {1000, Nano, "1u"}, - {1, Micro, "1u"}, - {1000, Micro, "1m"}, - {1, Milli, "1m"}, - {1000, Milli, "1"}, - {1, 0, "1"}, - {0, Nano, "0"}, - {0, Micro, "0"}, - {0, Milli, "0"}, - {0, 0, "0"}, - } - - for _, item := range table { - q := NewScaledQuantity(item.value, item.scale) - if e, a := item.expect, q.String(); e != a { - t.Errorf("Expected %v, got %v; %#v", e, a, q) - } - q2, err := ParseQuantity(q.String()) - if err != nil { - t.Errorf("Round trip failed on %v", q) - } - if e, a := item.value, q2.ScaledValue(item.scale); e != a { - t.Errorf("Expected %v, got %v", e, a) - } - q3 := NewQuantity(0, DecimalSI) - q3.SetScaled(item.value, item.scale) - if q.Cmp(*q3) != 0 { - t.Errorf("Expected %v and %v to be equal", q, q3) - } - } -} - -func TestScaledValue(t *testing.T) { - table := []struct { - fromScale Scale - toScale Scale - expected int64 - }{ - {Nano, Nano, 1}, - {Nano, Micro, 1}, - {Nano, Milli, 1}, - {Nano, 0, 1}, - {Micro, Nano, 1000}, - {Micro, Micro, 1}, - {Micro, Milli, 1}, - {Micro, 0, 1}, - {Milli, Nano, 1000 * 1000}, - {Milli, Micro, 1000}, - {Milli, Milli, 1}, - {Milli, 0, 1}, - {0, Nano, 1000 * 1000 * 1000}, - {0, Micro, 1000 * 1000}, - {0, Milli, 1000}, - {0, 0, 1}, - } - - for _, item := range table { - q := NewScaledQuantity(1, item.fromScale) - if e, a := item.expected, q.ScaledValue(item.toScale); e != a { - t.Errorf("%v to %v: Expected %v, got %v", item.fromScale, item.toScale, e, a) - } - } -} - -func TestUninitializedNoCrash(t *testing.T) { - var q Quantity - - q.Value() - q.MilliValue() - q.Copy() - _ = q.String() - q.MarshalJSON() -} - -func TestCopy(t *testing.T) { - q := NewQuantity(5, DecimalSI) - c := q.Copy() - c.Set(6) - if q.Value() == 6 { - t.Errorf("Copy didn't") - } -} - -func TestSub(t *testing.T) { - tests := []struct { - a Quantity - b Quantity - expected Quantity - }{ - {decQuantity(10, 0, DecimalSI), decQuantity(1, 1, DecimalSI), decQuantity(0, 0, DecimalSI)}, - {decQuantity(10, 0, DecimalSI), decQuantity(1, 0, BinarySI), decQuantity(9, 0, DecimalSI)}, - {decQuantity(10, 0, BinarySI), decQuantity(1, 0, DecimalSI), decQuantity(9, 0, BinarySI)}, - {Quantity{Format: DecimalSI}, decQuantity(50, 0, DecimalSI), decQuantity(-50, 0, DecimalSI)}, - {decQuantity(50, 0, DecimalSI), Quantity{Format: DecimalSI}, decQuantity(50, 0, DecimalSI)}, - {Quantity{Format: DecimalSI}, Quantity{Format: DecimalSI}, decQuantity(0, 0, DecimalSI)}, - } - - for i, test := range tests { - test.a.Sub(test.b) - if test.a.Cmp(test.expected) != 0 { - t.Errorf("[%d] Expected %q, got %q", i, test.expected.String(), test.a.String()) - } - } -} - -func TestNeg(t *testing.T) { - tests := []struct { - a Quantity - b Quantity - expected Quantity - }{ - {a: intQuantity(0, 0, DecimalSI), expected: intQuantity(0, 0, DecimalSI)}, - {a: Quantity{}, expected: Quantity{}}, - {a: intQuantity(10, 0, BinarySI), expected: intQuantity(-10, 0, BinarySI)}, - {a: intQuantity(-10, 0, BinarySI), expected: intQuantity(10, 0, BinarySI)}, - {a: decQuantity(0, 0, DecimalSI), expected: intQuantity(0, 0, DecimalSI)}, - {a: decQuantity(10, 0, BinarySI), expected: intQuantity(-10, 0, BinarySI)}, - {a: decQuantity(-10, 0, BinarySI), expected: intQuantity(10, 0, BinarySI)}, - } - - for i, test := range tests { - a := test.a.Copy() - a.Neg() - // ensure value is same - if a.Cmp(test.expected) != 0 { - t.Errorf("[%d] Expected %q, got %q", i, test.expected.String(), a.String()) - } - } -} - -func TestAdd(t *testing.T) { - tests := []struct { - a Quantity - b Quantity - expected Quantity - }{ - {decQuantity(10, 0, DecimalSI), decQuantity(1, 1, DecimalSI), decQuantity(20, 0, DecimalSI)}, - {decQuantity(10, 0, DecimalSI), decQuantity(1, 0, BinarySI), decQuantity(11, 0, DecimalSI)}, - {decQuantity(10, 0, BinarySI), decQuantity(1, 0, DecimalSI), decQuantity(11, 0, BinarySI)}, - {Quantity{Format: DecimalSI}, decQuantity(50, 0, DecimalSI), decQuantity(50, 0, DecimalSI)}, - {decQuantity(50, 0, DecimalSI), Quantity{Format: DecimalSI}, decQuantity(50, 0, DecimalSI)}, - {Quantity{Format: DecimalSI}, Quantity{Format: DecimalSI}, decQuantity(0, 0, DecimalSI)}, - } - - for i, test := range tests { - test.a.Add(test.b) - if test.a.Cmp(test.expected) != 0 { - t.Errorf("[%d] Expected %q, got %q", i, test.expected.String(), test.a.String()) - } - } -} - -func TestAddSubRoundTrip(t *testing.T) { - for k := -10; k <= 10; k++ { - q := Quantity{Format: DecimalSI} - var order []int64 - for i := 0; i < 100; i++ { - j := rand.Int63() - order = append(order, j) - q.Add(*NewScaledQuantity(j, Scale(k))) - } - for _, j := range order { - q.Sub(*NewScaledQuantity(j, Scale(k))) - } - if !q.IsZero() { - t.Errorf("addition and subtraction did not cancel: %s", &q) - } - } -} - -func TestAddSubRoundTripAcrossScales(t *testing.T) { - q := Quantity{Format: DecimalSI} - var order []int64 - for i := 0; i < 100; i++ { - j := rand.Int63() - order = append(order, j) - q.Add(*NewScaledQuantity(j, Scale(j%20-10))) - } - for _, j := range order { - q.Sub(*NewScaledQuantity(j, Scale(j%20-10))) - } - if !q.IsZero() { - t.Errorf("addition and subtraction did not cancel: %s", &q) - } -} - -func TestNegateRoundTrip(t *testing.T) { - for _, asDec := range []bool{false, true} { - for k := -10; k <= 10; k++ { - for i := 0; i < 100; i++ { - j := rand.Int63() - q := *NewScaledQuantity(j, Scale(k)) - if asDec { - q.AsDec() - } - - b := q.Copy() - b.Neg() - b.Neg() - if b.Cmp(q) != 0 { - t.Errorf("double negation did not cancel: %s", &q) - } - } - } - } -} -func benchmarkQuantities() []Quantity { - return []Quantity{ - intQuantity(1024*1024*1024, 0, BinarySI), - intQuantity(1024*1024*1024*1024, 0, BinarySI), - intQuantity(1000000, 3, DecimalSI), - intQuantity(1000000000, 0, DecimalSI), - intQuantity(1, -3, DecimalSI), - intQuantity(80, -3, DecimalSI), - intQuantity(1080, -3, DecimalSI), - intQuantity(0, 0, BinarySI), - intQuantity(1, 9, DecimalExponent), - intQuantity(1, -9, DecimalSI), - intQuantity(1000000, 10, DecimalSI), - } -} - -func BenchmarkQuantityString(b *testing.B) { - values := benchmarkQuantities() - b.ResetTimer() - var s string - for i := 0; i < b.N; i++ { - q := values[i%len(values)] - q.s = "" - s = q.String() - } - b.StopTimer() - if len(s) == 0 { - b.Fatal(s) - } -} - -func BenchmarkQuantityStringPrecalc(b *testing.B) { - values := benchmarkQuantities() - for i := range values { - _ = values[i].String() - } - b.ResetTimer() - var s string - for i := 0; i < b.N; i++ { - q := values[i%len(values)] - s = q.String() - } - b.StopTimer() - if len(s) == 0 { - b.Fatal(s) - } -} - -func BenchmarkQuantityStringBinarySI(b *testing.B) { - values := benchmarkQuantities() - for i := range values { - values[i].Format = BinarySI - } - b.ResetTimer() - var s string - for i := 0; i < b.N; i++ { - q := values[i%len(values)] - q.s = "" - s = q.String() - } - b.StopTimer() - if len(s) == 0 { - b.Fatal(s) - } -} - -func BenchmarkQuantityMarshalJSON(b *testing.B) { - values := benchmarkQuantities() - b.ResetTimer() - for i := 0; i < b.N; i++ { - q := values[i%len(values)] - q.s = "" - if _, err := q.MarshalJSON(); err != nil { - b.Fatal(err) - } - } - b.StopTimer() -} - -func BenchmarkQuantityUnmarshalJSON(b *testing.B) { - values := benchmarkQuantities() - var json [][]byte - for _, v := range values { - data, _ := v.MarshalJSON() - json = append(json, data) - } - - b.ResetTimer() - for i := 0; i < b.N; i++ { - var q Quantity - if err := q.UnmarshalJSON(json[i%len(values)]); err != nil { - b.Fatal(err) - } - } - b.StopTimer() -} - -func BenchmarkParseQuantity(b *testing.B) { - values := benchmarkQuantities() - var strings []string - for _, v := range values { - strings = append(strings, v.String()) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - if _, err := ParseQuantity(strings[i%len(values)]); err != nil { - b.Fatal(err) - } - } - b.StopTimer() -} - -func BenchmarkCanonicalize(b *testing.B) { - values := benchmarkQuantities() - b.ResetTimer() - buffer := make([]byte, 0, 100) - for i := 0; i < b.N; i++ { - s, _ := values[i%len(values)].CanonicalizeBytes(buffer) - if len(s) == 0 { - b.Fatal(s) - } - } - b.StopTimer() -} - -func BenchmarkQuantityRoundUp(b *testing.B) { - values := benchmarkQuantities() - b.ResetTimer() - for i := 0; i < b.N; i++ { - q := values[i%len(values)] - copied := q - copied.RoundUp(-3) - } - b.StopTimer() -} - -func BenchmarkQuantityCopy(b *testing.B) { - values := benchmarkQuantities() - b.ResetTimer() - for i := 0; i < b.N; i++ { - values[i%len(values)].Copy() - } - b.StopTimer() -} - -func BenchmarkQuantityAdd(b *testing.B) { - values := benchmarkQuantities() - base := &Quantity{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - q := values[i%len(values)] - base.d.Dec = nil - base.i = int64Amount{value: 100} - base.Add(q) - } - b.StopTimer() -} - -func BenchmarkQuantityCmp(b *testing.B) { - values := benchmarkQuantities() - b.ResetTimer() - for i := 0; i < b.N; i++ { - q := values[i%len(values)] - if q.Cmp(q) != 0 { - b.Fatal(q) - } - } - b.StopTimer() -} diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/scale_int_test.go b/vendor/k8s.io/apimachinery/pkg/api/resource/scale_int_test.go deleted file mode 100644 index b150fa51..00000000 --- a/vendor/k8s.io/apimachinery/pkg/api/resource/scale_int_test.go +++ /dev/null @@ -1,85 +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 resource - -import ( - "math" - "math/big" - "testing" -) - -func TestScaledValueInternal(t *testing.T) { - tests := []struct { - unscaled *big.Int - scale int - newScale int - - want int64 - }{ - // remain scale - {big.NewInt(1000), 0, 0, 1000}, - - // scale down - {big.NewInt(1000), 0, -3, 1}, - {big.NewInt(1000), 3, 0, 1}, - {big.NewInt(0), 3, 0, 0}, - - // always round up - {big.NewInt(999), 3, 0, 1}, - {big.NewInt(500), 3, 0, 1}, - {big.NewInt(499), 3, 0, 1}, - {big.NewInt(1), 3, 0, 1}, - // large scaled value does not lose precision - {big.NewInt(0).Sub(maxInt64, bigOne), 1, 0, (math.MaxInt64-1)/10 + 1}, - // large intermediate result. - {big.NewInt(1).Exp(big.NewInt(10), big.NewInt(100), nil), 100, 0, 1}, - - // scale up - {big.NewInt(0), 0, 3, 0}, - {big.NewInt(1), 0, 3, 1000}, - {big.NewInt(1), -3, 0, 1000}, - {big.NewInt(1000), -3, 2, 100000000}, - {big.NewInt(0).Div(big.NewInt(math.MaxInt64), bigThousand), 0, 3, - (math.MaxInt64 / 1000) * 1000}, - } - - for i, tt := range tests { - old := (&big.Int{}).Set(tt.unscaled) - got := scaledValue(tt.unscaled, tt.scale, tt.newScale) - if got != tt.want { - t.Errorf("#%d: got = %v, want %v", i, got, tt.want) - } - if tt.unscaled.Cmp(old) != 0 { - t.Errorf("#%d: unscaled = %v, want %v", i, tt.unscaled, old) - } - } -} - -func BenchmarkScaledValueSmall(b *testing.B) { - s := big.NewInt(1000) - for i := 0; i < b.N; i++ { - scaledValue(s, 3, 0) - } -} - -func BenchmarkScaledValueLarge(b *testing.B) { - s := big.NewInt(math.MaxInt64) - s.Mul(s, big.NewInt(1000)) - for i := 0; i < b.N; i++ { - scaledValue(s, 10, 0) - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/register_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/register_test.go deleted file mode 100644 index 8116f807..00000000 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/register_test.go +++ /dev/null @@ -1,89 +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 internalversion - -import ( - "net/url" - "reflect" - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/diff" -) - -func TestListOptions(t *testing.T) { - // verify round trip conversion - ten := int64(10) - in := &metav1.ListOptions{ - LabelSelector: "a=1", - FieldSelector: "b=1", - ResourceVersion: "10", - TimeoutSeconds: &ten, - Watch: true, - } - out := &ListOptions{} - if err := scheme.Convert(in, out, nil); err != nil { - t.Fatal(err) - } - actual := &metav1.ListOptions{} - if err := scheme.Convert(out, actual, nil); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(in, actual) { - t.Errorf("unexpected: %s", diff.ObjectReflectDiff(in, actual)) - } - - // verify failing conversion - for i, failingObject := range []*metav1.ListOptions{ - {LabelSelector: "a!!!"}, - {FieldSelector: "a!!!"}, - } { - out = &ListOptions{} - if err := scheme.Convert(failingObject, out, nil); err == nil { - t.Errorf("%d: unexpected conversion: %#v", i, out) - } - } - - // verify kind registration - if gvks, unversioned, err := scheme.ObjectKinds(in); err != nil || unversioned || gvks[0] != metav1.SchemeGroupVersion.WithKind("ListOptions") { - t.Errorf("unexpected: %v %v %v", gvks[0], unversioned, err) - } - if gvks, unversioned, err := scheme.ObjectKinds(out); err != nil || unversioned || gvks[0] != SchemeGroupVersion.WithKind("ListOptions") { - t.Errorf("unexpected: %v %v %v", gvks[0], unversioned, err) - } - - actual = &metav1.ListOptions{} - if err := ParameterCodec.DecodeParameters(url.Values{"watch": []string{"1"}}, metav1.SchemeGroupVersion, actual); err != nil { - t.Fatal(err) - } - if !actual.Watch { - t.Errorf("unexpected watch decode: %#v", actual) - } - - // check ParameterCodec - query, err := ParameterCodec.EncodeParameters(in, metav1.SchemeGroupVersion) - if err != nil { - t.Fatal(err) - } - actual = &metav1.ListOptions{} - if err := ParameterCodec.DecodeParameters(query, metav1.SchemeGroupVersion, actual); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(in, actual) { - t.Errorf("unexpected: %s", diff.ObjectReflectDiff(in, actual)) - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS deleted file mode 100755 index cdb125a0..00000000 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS +++ /dev/null @@ -1,31 +0,0 @@ -reviewers: -- thockin -- smarterclayton -- wojtek-t -- deads2k -- brendandburns -- caesarxuchao -- liggitt -- nikhiljindal -- gmarek -- erictune -- davidopp -- sttts -- quinton-hoole -- luxas -- janetkuo -- justinsb -- ncdc -- soltysh -- dims -- madhusudancs -- hongchaodeng -- krousey -- mml -- mbohlool -- david-mcmahon -- therc -- mqliang -- kevin-wangzefeng -- jianhuiz -- feihujiang diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/controller_ref_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/controller_ref_test.go deleted file mode 100644 index add764a3..00000000 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/controller_ref_test.go +++ /dev/null @@ -1,133 +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 v1 - -import ( - "testing" - - "k8s.io/apimachinery/pkg/runtime/schema" -) - -type metaObj struct { - ObjectMeta - TypeMeta -} - -func TestNewControllerRef(t *testing.T) { - gvk := schema.GroupVersionKind{ - Group: "group", - Version: "v1", - Kind: "Kind", - } - obj1 := &metaObj{ - ObjectMeta: ObjectMeta{ - Name: "name", - UID: "uid1", - }, - } - controllerRef := NewControllerRef(obj1, gvk) - if controllerRef.UID != obj1.UID { - t.Errorf("Incorrect UID: %s", controllerRef.UID) - } - if controllerRef.Controller == nil || *controllerRef.Controller != true { - t.Error("Controller must be set to true") - } - if controllerRef.BlockOwnerDeletion == nil || *controllerRef.BlockOwnerDeletion != true { - t.Error("BlockOwnerDeletion must be set to true") - } - if controllerRef.APIVersion == "" || - controllerRef.Kind == "" || - controllerRef.Name == "" { - t.Errorf("All controllerRef fields must be set: %v", controllerRef) - } -} - -func TestGetControllerOf(t *testing.T) { - gvk := schema.GroupVersionKind{ - Group: "group", - Version: "v1", - Kind: "Kind", - } - obj1 := &metaObj{ - ObjectMeta: ObjectMeta{ - UID: "uid1", - Name: "name1", - }, - } - controllerRef := NewControllerRef(obj1, gvk) - var falseRef = false - obj2 := &metaObj{ - ObjectMeta: ObjectMeta{ - UID: "uid2", - Name: "name1", - OwnerReferences: []OwnerReference{ - { - Name: "owner1", - Controller: &falseRef, - }, - *controllerRef, - { - Name: "owner2", - Controller: &falseRef, - }, - }, - }, - } - - if GetControllerOf(obj1) != nil { - t.Error("GetControllerOf must return null") - } - c := GetControllerOf(obj2) - if c.Name != controllerRef.Name || c.UID != controllerRef.UID { - t.Errorf("Incorrect result of GetControllerOf: %v", c) - } -} - -func TestIsControlledBy(t *testing.T) { - gvk := schema.GroupVersionKind{ - Group: "group", - Version: "v1", - Kind: "Kind", - } - obj1 := &metaObj{ - ObjectMeta: ObjectMeta{ - UID: "uid1", - }, - } - obj2 := &metaObj{ - ObjectMeta: ObjectMeta{ - UID: "uid2", - OwnerReferences: []OwnerReference{ - *NewControllerRef(obj1, gvk), - }, - }, - } - obj3 := &metaObj{ - ObjectMeta: ObjectMeta{ - UID: "uid3", - OwnerReferences: []OwnerReference{ - *NewControllerRef(obj2, gvk), - }, - }, - } - if !IsControlledBy(obj2, obj1) || !IsControlledBy(obj3, obj2) { - t.Error("Incorrect IsControlledBy result: false") - } - if IsControlledBy(obj3, obj1) { - t.Error("Incorrect IsControlledBy result: true") - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion_test.go deleted file mode 100644 index 4ff57fd8..00000000 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion_test.go +++ /dev/null @@ -1,84 +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 v1_test - -import ( - "testing" - - apiequality "k8s.io/apimachinery/pkg/api/equality" - "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func TestMapToLabelSelectorRoundTrip(t *testing.T) { - // We should be able to round-trip a map-only selector through LabelSelector. - inputs := []map[string]string{ - nil, - {}, - {"one": "foo"}, - {"one": "foo", "two": "bar"}, - } - 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) - 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) - continue - } - if !apiequality.Semantic.DeepEqual(in, out) { - t.Errorf("map-selector conversion round-trip failed: got %v; want %v", out, in) - } - } -} - -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/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration_test.go deleted file mode 100644 index 7230cb28..00000000 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration_test.go +++ /dev/null @@ -1,153 +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 ( - "encoding/json" - "testing" - "time" - - "github.com/ghodss/yaml" -) - -type DurationHolder struct { - D Duration `json:"d"` -} - -func TestDurationMarshalYAML(t *testing.T) { - cases := []struct { - input Duration - result string - }{ - {Duration{5 * time.Second}, "d: 5s\n"}, - {Duration{2 * time.Minute}, "d: 2m0s\n"}, - {Duration{time.Hour + 3*time.Millisecond}, "d: 1h0m0.003s\n"}, - } - - for _, c := range cases { - input := DurationHolder{c.input} - result, err := yaml.Marshal(&input) - if err != nil { - t.Errorf("Failed to marshal input: %q: %v", input, err) - } - if string(result) != c.result { - t.Errorf("Failed to marshal input: %q: expected %q, got %q", input, c.result, string(result)) - } - } -} - -func TestDurationUnmarshalYAML(t *testing.T) { - cases := []struct { - input string - result Duration - }{ - {"d: 0s\n", Duration{}}, - {"d: 5s\n", Duration{5 * time.Second}}, - {"d: 2m0s\n", Duration{2 * time.Minute}}, - {"d: 1h0m0.003s\n", Duration{time.Hour + 3*time.Millisecond}}, - - // Units with zero values can optionally be dropped - {"d: 2m\n", Duration{2 * time.Minute}}, - {"d: 1h0.003s\n", Duration{time.Hour + 3*time.Millisecond}}, - } - - for _, c := range cases { - var result DurationHolder - if err := yaml.Unmarshal([]byte(c.input), &result); err != nil { - t.Errorf("Failed to unmarshal input %q: %v", c.input, err) - } - if result.D != c.result { - t.Errorf("Failed to unmarshal input %q: expected %q, got %q", c.input, c.result, result) - } - } -} - -func TestDurationMarshalJSON(t *testing.T) { - cases := []struct { - input Duration - result string - }{ - {Duration{5 * time.Second}, `{"d":"5s"}`}, - {Duration{2 * time.Minute}, `{"d":"2m0s"}`}, - {Duration{time.Hour + 3*time.Millisecond}, `{"d":"1h0m0.003s"}`}, - } - - for _, c := range cases { - input := DurationHolder{c.input} - result, err := json.Marshal(&input) - if err != nil { - t.Errorf("Failed to marshal input: %q: %v", input, err) - } - if string(result) != c.result { - t.Errorf("Failed to marshal input: %q: expected %q, got %q", input, c.result, string(result)) - } - } -} - -func TestDurationUnmarshalJSON(t *testing.T) { - cases := []struct { - input string - result Duration - }{ - {`{"d":"0s"}`, Duration{}}, - {`{"d":"5s"}`, Duration{5 * time.Second}}, - {`{"d":"2m0s"}`, Duration{2 * time.Minute}}, - {`{"d":"1h0m0.003s"}`, Duration{time.Hour + 3*time.Millisecond}}, - - // Units with zero values can optionally be dropped - {`{"d":"2m"}`, Duration{2 * time.Minute}}, - {`{"d":"1h0.003s"}`, Duration{time.Hour + 3*time.Millisecond}}, - } - - for _, c := range cases { - var result DurationHolder - if err := json.Unmarshal([]byte(c.input), &result); err != nil { - t.Errorf("Failed to unmarshal input %q: %v", c.input, err) - } - if result.D != c.result { - t.Errorf("Failed to unmarshal input %q: expected %q, got %q", c.input, c.result, result) - } - } -} - -func TestDurationMarshalJSONUnmarshalYAML(t *testing.T) { - cases := []struct { - input Duration - }{ - {Duration{}}, - {Duration{5 * time.Second}}, - {Duration{2 * time.Minute}}, - {Duration{time.Hour + 3*time.Millisecond}}, - } - - for i, c := range cases { - input := DurationHolder{c.input} - jsonMarshalled, err := json.Marshal(&input) - if err != nil { - t.Errorf("%d-1: Failed to marshal input: '%v': %v", i, input, err) - } - - var result DurationHolder - if err := yaml.Unmarshal(jsonMarshalled, &result); err != nil { - t.Errorf("%d-2: Failed to unmarshal '%+v': %v", i, string(jsonMarshalled), err) - } - - if input.D != result.D { - t.Errorf("%d-4: Failed to marshal input '%#v': got %#v", i, input, result) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto deleted file mode 100644 index 4baf44f3..00000000 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto +++ /dev/null @@ -1,839 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; - -// APIGroup contains the name, the supported versions, and the preferred version -// of a group. -message APIGroup { - // name is the name of the group. - optional string name = 1; - - // versions are the versions supported in this group. - repeated GroupVersionForDiscovery versions = 2; - - // preferredVersion is the version preferred by the API server, which - // probably is the storage version. - // +optional - optional GroupVersionForDiscovery preferredVersion = 3; - - // 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. - // +optional - repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 4; -} - -// APIGroupList is a list of APIGroup, to allow clients to discover the API at -// /apis. -message APIGroupList { - // groups is a list of APIGroup. - repeated APIGroup groups = 1; -} - -// APIResource specifies the name of a resource and whether it is namespaced. -message APIResource { - // name is the plural name of the resource. - optional string name = 1; - - // 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. - optional string singularName = 6; - - // namespaced indicates if a resource is namespaced or not. - optional bool namespaced = 2; - - // group is the preferred group of the resource. Empty implies the group of the containing resource list. - // For subresources, this may have a different value, for example: Scale". - optional string group = 8; - - // version is the preferred version of the resource. Empty implies the version of the containing resource list - // For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)". - optional string version = 9; - - // kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo') - optional string kind = 3; - - // verbs is a list of supported kube verbs (this includes get, list, watch, create, - // update, patch, delete, deletecollection, and proxy) - optional Verbs verbs = 4; - - // shortNames is a list of suggested short names of the resource. - repeated string shortNames = 5; - - // categories is a list of the grouped resources this resource belongs to (e.g. 'all') - repeated string categories = 7; -} - -// 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. -message APIResourceList { - // groupVersion is the group and version this APIResourceList is for. - optional string groupVersion = 1; - - // resources contains the name of the resources and if they are namespaced. - repeated APIResource resources = 2; -} - -// 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. -// -// +protobuf.options.(gogoproto.goproto_stringer)=false -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -message APIVersions { - // versions are the api versions that are available. - repeated string versions = 1; - - // 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. - repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 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. - // 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; -} - -// Duration is a wrapper around time.Duration which supports correct -// marshaling to YAML and JSON. In particular, it marshals into strings, which -// can be used as map keys in json. -message Duration { - optional int64 duration = 1; -} - -// ExportOptions is the query options to the standard REST get call. -message ExportOptions { - // Should this value be exported. Export strips fields that a user can not specify. - optional bool export = 1; - - // Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. - optional bool exact = 2; -} - -// GetOptions is the standard query options to the standard REST get call. -message GetOptions { - // When specified: - // - 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 string resourceVersion = 1; - - // If true, partially initialized resources are included in the response. - // +optional - optional bool includeUninitialized = 2; -} - -// GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying -// concepts during lookup stages without having partially valid types -// -// +protobuf.options.(gogoproto.goproto_stringer)=false -message GroupKind { - optional string group = 1; - - optional string kind = 2; -} - -// 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 -// -// +protobuf.options.(gogoproto.goproto_stringer)=false -message GroupResource { - optional string group = 1; - - optional string resource = 2; -} - -// GroupVersion contains the "group" and the "version", which uniquely identifies the API. -// -// +protobuf.options.(gogoproto.goproto_stringer)=false -message GroupVersion { - optional string group = 1; - - optional string version = 2; -} - -// GroupVersion contains the "group/version" and "version" string of a version. -// It is made a struct to keep extensibility. -message GroupVersionForDiscovery { - // groupVersion specifies the API group and version in the form "group/version" - optional string groupVersion = 1; - - // version specifies the version in the form of "version". This is to save - // the clients the trouble of splitting the GroupVersion. - optional string version = 2; -} - -// GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion -// to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling -// -// +protobuf.options.(gogoproto.goproto_stringer)=false -message GroupVersionKind { - optional string group = 1; - - optional string version = 2; - - optional string kind = 3; -} - -// GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion -// to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling -// -// +protobuf.options.(gogoproto.goproto_stringer)=false -message GroupVersionResource { - optional string group = 1; - - optional string version = 2; - - optional string resource = 3; -} - -// Initializer is information about an initializer that has not yet completed. -message Initializer { - // name of the process that is responsible for initializing this object. - optional string name = 1; -} - -// Initializers tracks the progress of initialization. -message Initializers { - // 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. - // +patchMergeKey=name - // +patchStrategy=merge - repeated Initializer pending = 1; - - // 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. - optional Status result = 2; -} - -// 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. -message LabelSelector { - // 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. - // +optional - map matchLabels = 1; - - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - // +optional - repeated LabelSelectorRequirement matchExpressions = 2; -} - -// A label selector requirement is a selector that contains values, a key, and an operator that -// relates the key and values. -message LabelSelectorRequirement { - // key is the label key that the selector applies to. - // +patchMergeKey=key - // +patchStrategy=merge - optional string key = 1; - - // operator represents a key's relationship to a set of values. - // Valid operators are In, NotIn, Exists and DoesNotExist. - optional string operator = 2; - - // 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. - // +optional - repeated string values = 3; -} - -// List holds a list of objects, which may not be known by the server. -message List { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional ListMeta metadata = 1; - - // List of objects - repeated k8s.io.apimachinery.pkg.runtime.RawExtension items = 2; -} - -// ListMeta describes metadata that synthetic resources must have, including lists and -// various status objects. A resource may have only one of {ObjectMeta, ListMeta}. -message ListMeta { - // selfLink is a URL representing this object. - // Populated by the system. - // Read-only. - // +optional - optional string selfLink = 1; - - // 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 - // +optional - optional string resourceVersion = 2; - - // continue may be set if the user set a limit on the number of items returned, and indicates that - // the server has more data available. The value is opaque and may be used to issue another request - // to the endpoint that served this list to retrieve the next set of available objects. Continuing a - // list may not be possible if the server configuration has changed or more than a few minutes have - // passed. The resourceVersion field returned when using this continue value will be identical to - // the value in the first response. - optional string continue = 3; -} - -// ListOptions is the query options to a standard REST list call. -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. - // This limits the duration of the call, regardless of any activity or inactivity. - // +optional - optional int64 timeoutSeconds = 5; - - // limit is a maximum number of responses to return for a list call. If more items exist, the - // server will set the `continue` field on the list metadata to a value that can be used with the - // same initial query to retrieve the next set of results. Setting a limit may return fewer than - // the requested amount of items (up to zero items) in the event all requested objects are - // filtered out and clients should only use the presence of the continue field to determine whether - // more results are available. Servers may choose not to support the limit argument and will return - // all of the available results. If limit is specified and the continue field is empty, clients may - // assume that no more results are available. This field is not supported if watch is true. - // - // The server guarantees that the objects returned when using continue will be identical to issuing - // a single list call without a limit - that is, no objects created, modified, or deleted after the - // first request is issued will be included in any subsequent continued requests. This is sometimes - // referred to as a consistent snapshot, and ensures that a client that is using limit to receive - // smaller chunks of a very large result can ensure they see all possible objects. If objects are - // updated during a chunked list the version of the object that was present at the time the first list - // result was calculated is returned. - optional int64 limit = 7; - - // The continue option should be set when retrieving more results from the server. Since this value - // is server defined, clients may only use the continue value from a previous query result with - // identical query parameters (except for the value of continue) and the server may reject a continue - // value it does not recognize. If the specified continue value is no longer valid whether due to - // expiration (generally five to fifteen minutes) or a configuration change on the server the server - // will respond with a 410 ResourceExpired error indicating the client must restart their list without - // the continue field. This field is not supported when watch is true. Clients may start a watch from - // the last resourceVersion value returned by the server and not miss any modifications. - optional string continue = 8; -} - -// MicroTime is version of Time with microsecond level precision. -// -// +protobuf.options.marshal=false -// +protobuf.as=Timestamp -// +protobuf.options.(gogoproto.goproto_stringer)=false -message MicroTime { - // 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. - optional 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. This field may be limited in precision depending on context. - optional int32 nanos = 2; -} - -// ObjectMeta is metadata that all persisted resources must have, which includes all objects -// users must create. -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: http://kubernetes.io/docs/user-guide/identifiers#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: http://kubernetes.io/docs/user-guide/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: http://kubernetes.io/docs/user-guide/identifiers#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 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 the - // finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. - // Once the deletionTimestamp is 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 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: http://kubernetes.io/docs/user-guide/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: http://kubernetes.io/docs/user-guide/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 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 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; -} - -// 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. -message OwnerReference { - // API version of the referent. - optional string apiVersion = 5; - - // Kind of the referent. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - optional string kind = 1; - - // Name of the referent. - // More info: http://kubernetes.io/docs/user-guide/identifiers#names - optional string name = 3; - - // UID of the referent. - // More info: http://kubernetes.io/docs/user-guide/identifiers#uids - optional string uid = 4; - - // If true, this reference points to the managing controller. - // +optional - optional bool controller = 6; - - // 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. - // +optional - optional bool blockOwnerDeletion = 7; -} - -// Patch is provided to give a concrete name and type to the Kubernetes PATCH request body. -message Patch { -} - -// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. -message Preconditions { - // Specifies the target UID. - // +optional - optional string uid = 1; -} - -// RootPaths lists the paths available at root. -// For example: "/healthz", "/apis". -message RootPaths { - // paths are the paths available at root. - repeated string paths = 1; -} - -// ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match. -message ServerAddressByClientCIDR { - // The CIDR with which clients can match their IP to figure out the server address that they should use. - optional string clientCIDR = 1; - - // Address of this server, suitable for a client that matches the above CIDR. - // This can be a hostname, hostname:port, IP or IP:port. - optional string serverAddress = 2; -} - -// Status is a return value for calls that don't return other objects. -message Status { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - // +optional - optional ListMeta metadata = 1; - - // Status of the operation. - // One of: "Success" or "Failure". - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - // +optional - optional string status = 2; - - // A human-readable description of the status of this operation. - // +optional - optional string message = 3; - - // 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. - // +optional - optional string reason = 4; - - // 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. - // +optional - optional StatusDetails details = 5; - - // Suggested HTTP return code for this status, 0 if not set. - // +optional - optional int32 code = 6; -} - -// StatusCause provides more information about an api.Status failure, including -// cases when multiple errors are encountered. -message StatusCause { - // A machine-readable description of the cause of the error. If this value is - // empty there is no information available. - // +optional - optional string reason = 1; - - // A human-readable description of the cause of the error. This field may be - // presented as-is to a reader. - // +optional - optional string message = 2; - - // 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. - // - // Examples: - // "name" - the field "name" on the current resource - // "items[0].name" - the field "name" on the first array entry in "items" - // +optional - optional string field = 3; -} - -// 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. -message StatusDetails { - // The name attribute of the resource associated with the status StatusReason - // (when there is a single name which can be described). - // +optional - optional string name = 1; - - // The group attribute of the resource associated with the status StatusReason. - // +optional - optional string group = 2; - - // 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 - // +optional - optional string kind = 3; - - // UID of the resource. - // (when there is a single resource which can be described). - // More info: http://kubernetes.io/docs/user-guide/identifiers#uids - // +optional - optional string uid = 6; - - // The Causes array includes more details associated with the StatusReason - // failure. Not all StatusReasons may provide detailed causes. - // +optional - repeated StatusCause causes = 4; - - // 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. - // +optional - optional int32 retryAfterSeconds = 5; -} - -// Time is a wrapper around time.Time which supports correct -// marshaling to YAML and JSON. Wrappers are provided for many -// of the factory methods that the time package offers. -// -// +protobuf.options.marshal=false -// +protobuf.as=Timestamp -// +protobuf.options.(gogoproto.goproto_stringer)=false -message Time { - // 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. - optional 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. This field may be limited in precision depending on context. - optional int32 nanos = 2; -} - -// Timestamp is a struct that is equivalent to Time, but intended for -// protobuf marshalling/unmarshalling. It is generated into a serialization -// that matches Time. Do not use in Go structs. -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. - optional 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. This field may be limited in precision depending on context. - optional int32 nanos = 2; -} - -// TypeMeta describes an individual object in an API response or request -// with strings representing the type of the object and its API schema version. -// Structures that are versioned or persisted should inline TypeMeta. -// -// +k8s:deepcopy-gen=false -message TypeMeta { - // 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 - // +optional - optional string kind = 1; - - // 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 - // +optional - optional string apiVersion = 2; -} - -// Verbs masks the value so protobuf can generate -// -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -message Verbs { - // items, if empty, will result in an empty slice - - repeated string items = 1; -} - -// Event represents a single event to a watched resource. -// -// +protobuf=true -// +k8s:deepcopy-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -message WatchEvent { - optional string type = 1; - - // Object is: - // * If Type is Added or Modified: the new state of the object. - // * If Type is Deleted: the state of the object immediately before deletion. - // * If Type is Error: *Status is recommended; other types may make sense - // depending on context. - optional k8s.io.apimachinery.pkg.runtime.RawExtension object = 2; -} - diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version_test.go deleted file mode 100644 index ab62ff42..00000000 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version_test.go +++ /dev/null @@ -1,79 +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 v1 - -import ( - "encoding/json" - "reflect" - "testing" - - k8s_json "k8s.io/apimachinery/pkg/runtime/serializer/json" -) - -type GroupVersionHolder struct { - GV GroupVersion `json:"val"` -} - -func TestGroupVersionUnmarshalJSON(t *testing.T) { - cases := []struct { - input []byte - expect GroupVersion - }{ - {[]byte(`{"val": "v1"}`), GroupVersion{"", "v1"}}, - {[]byte(`{"val": "extensions/v1beta1"}`), GroupVersion{"extensions", "v1beta1"}}, - } - - for _, c := range cases { - var result GroupVersionHolder - // test golang lib's JSON codec - if err := json.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 - iter := k8s_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) { - t.Errorf("json-iterator codec failed to unmarshal input '%s': expected %+v, got %+v", c.input, c.expect, result.GV) - } - } -} - -func TestGroupVersionMarshalJSON(t *testing.T) { - cases := []struct { - input GroupVersion - expect []byte - }{ - {GroupVersion{"", "v1"}, []byte(`{"val":"v1"}`)}, - {GroupVersion{"extensions", "v1beta1"}, []byte(`{"val":"extensions/v1beta1"}`)}, - } - - for _, c := range cases { - input := GroupVersionHolder{c.input} - result, err := json.Marshal(&input) - if err != nil { - t.Errorf("Failed to marshal input '%v': %v", input, err) - } - if !reflect.DeepEqual(result, c.expect) { - t.Errorf("Failed to marshal input '%+v': expected: %s, got: %s", input, c.expect, result) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers_test.go deleted file mode 100644 index fba6b158..00000000 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers_test.go +++ /dev/null @@ -1,154 +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 v1 - -import ( - "reflect" - "strings" - "testing" - - "k8s.io/apimachinery/pkg/labels" -) - -func TestLabelSelectorAsSelector(t *testing.T) { - matchLabels := map[string]string{"foo": "bar"} - matchExpressions := []LabelSelectorRequirement{{ - Key: "baz", - Operator: LabelSelectorOpIn, - Values: []string{"qux", "norf"}, - }} - mustParse := func(s string) labels.Selector { - out, e := labels.Parse(s) - if e != nil { - panic(e) - } - return out - } - tc := []struct { - in *LabelSelector - out labels.Selector - expectErr bool - }{ - {in: nil, out: labels.Nothing()}, - {in: &LabelSelector{}, out: labels.Everything()}, - { - in: &LabelSelector{MatchLabels: matchLabels}, - out: mustParse("foo=bar"), - }, - { - in: &LabelSelector{MatchExpressions: matchExpressions}, - out: mustParse("baz in (norf,qux)"), - }, - { - in: &LabelSelector{MatchLabels: matchLabels, MatchExpressions: matchExpressions}, - out: mustParse("baz in (norf,qux),foo=bar"), - }, - { - in: &LabelSelector{ - MatchExpressions: []LabelSelectorRequirement{{ - Key: "baz", - Operator: LabelSelectorOpExists, - Values: []string{"qux", "norf"}, - }}, - }, - expectErr: true, - }, - } - - for i, tc := range tc { - out, err := LabelSelectorAsSelector(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) - } - } -} - -func TestLabelSelectorAsMap(t *testing.T) { - matchLabels := map[string]string{"foo": "bar"} - matchExpressions := func(operator LabelSelectorOperator, values []string) []LabelSelectorRequirement { - return []LabelSelectorRequirement{{ - Key: "baz", - Operator: operator, - Values: values, - }} - } - - tests := []struct { - in *LabelSelector - out map[string]string - errString string - }{ - {in: nil, out: nil}, - { - in: &LabelSelector{MatchLabels: matchLabels}, - out: map[string]string{"foo": "bar"}, - }, - { - in: &LabelSelector{MatchLabels: matchLabels, MatchExpressions: matchExpressions(LabelSelectorOpIn, []string{"norf"})}, - out: map[string]string{"foo": "bar", "baz": "norf"}, - }, - { - in: &LabelSelector{MatchExpressions: matchExpressions(LabelSelectorOpIn, []string{"norf"})}, - out: map[string]string{"baz": "norf"}, - }, - { - in: &LabelSelector{MatchLabels: matchLabels, MatchExpressions: matchExpressions(LabelSelectorOpIn, []string{"norf", "qux"})}, - out: map[string]string{"foo": "bar"}, - errString: "without a single value cannot be converted", - }, - { - in: &LabelSelector{MatchExpressions: matchExpressions(LabelSelectorOpNotIn, []string{"norf", "qux"})}, - out: map[string]string{}, - errString: "cannot be converted", - }, - { - in: &LabelSelector{MatchLabels: matchLabels, MatchExpressions: matchExpressions(LabelSelectorOpExists, []string{})}, - out: map[string]string{"foo": "bar"}, - errString: "cannot be converted", - }, - { - in: &LabelSelector{MatchExpressions: matchExpressions(LabelSelectorOpDoesNotExist, []string{})}, - out: map[string]string{}, - errString: "cannot be converted", - }, - } - - for i, tc := range tests { - out, err := LabelSelectorAsMap(tc.in) - if err == nil && len(tc.errString) > 0 { - t.Errorf("[%v]expected error but got none.", i) - continue - } - if err != nil && len(tc.errString) == 0 { - t.Errorf("[%v]did not expect error but got: %v", i, err) - continue - } - if err != nil && len(tc.errString) > 0 && !strings.Contains(err.Error(), tc.errString) { - t.Errorf("[%v]expected error with %q but got: %v", i, tc.errString, err) - continue - } - if !reflect.DeepEqual(out, tc.out) { - t.Errorf("[%v]expected:\n\t%+v\nbut got:\n\t%+v", i, tc.out, out) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels_test.go deleted file mode 100644 index 918b1a29..00000000 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels_test.go +++ /dev/null @@ -1,123 +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 v1 - -import ( - "reflect" - "testing" -) - -func TestCloneSelectorAndAddLabel(t *testing.T) { - labels := map[string]string{ - "foo1": "bar1", - "foo2": "bar2", - "foo3": "bar3", - } - matchExpressions := []LabelSelectorRequirement{ - {Key: "foo", Operator: LabelSelectorOpIn, Values: []string{"foo"}}, - } - - cases := []struct { - labels map[string]string - labelKey string - labelValue string - want map[string]string - }{ - { - labels: labels, - want: labels, - }, - { - labels: labels, - labelKey: "foo4", - labelValue: "89", - want: map[string]string{ - "foo1": "bar1", - "foo2": "bar2", - "foo3": "bar3", - "foo4": "89", - }, - }, - { - labels: nil, - labelKey: "foo4", - labelValue: "12", - want: map[string]string{ - "foo4": "12", - }, - }, - } - - for _, tc := range cases { - ls_in := LabelSelector{MatchLabels: tc.labels, MatchExpressions: matchExpressions} - ls_out := LabelSelector{MatchLabels: tc.want, MatchExpressions: matchExpressions} - - got := CloneSelectorAndAddLabel(&ls_in, tc.labelKey, tc.labelValue) - if !reflect.DeepEqual(got, &ls_out) { - t.Errorf("got %v, want %v", got, tc.want) - } - } -} - -func TestAddLabelToSelector(t *testing.T) { - labels := map[string]string{ - "foo1": "bar1", - "foo2": "bar2", - "foo3": "bar3", - } - - cases := []struct { - labels map[string]string - labelKey string - labelValue string - want map[string]string - }{ - { - labels: labels, - want: labels, - }, - { - labels: labels, - labelKey: "foo4", - labelValue: "89", - want: map[string]string{ - "foo1": "bar1", - "foo2": "bar2", - "foo3": "bar3", - "foo4": "89", - }, - }, - { - labels: nil, - labelKey: "foo4", - labelValue: "12", - want: map[string]string{ - "foo4": "12", - }, - }, - } - - for _, tc := range cases { - ls_in := LabelSelector{MatchLabels: tc.labels} - ls_out := LabelSelector{MatchLabels: tc.want} - - got := AddLabelToSelector(&ls_in, tc.labelKey, tc.labelValue) - if !reflect.DeepEqual(got, &ls_out) { - t.Errorf("got %v, want %v", got, tc.want) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_test.go deleted file mode 100644 index 339610ae..00000000 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_test.go +++ /dev/null @@ -1,139 +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 v1 - -import ( - "encoding/json" - "reflect" - "testing" - "time" - - "github.com/ghodss/yaml" -) - -type MicroTimeHolder struct { - T MicroTime `json:"t"` -} - -func TestMicroTimeMarshalYAML(t *testing.T) { - cases := []struct { - input MicroTime - result string - }{ - {MicroTime{}, "t: null\n"}, - {DateMicro(1998, time.May, 5, 1, 5, 5, 50, time.FixedZone("test", -4*60*60)), "t: 1998-05-05T05:05:05.000000Z\n"}, - {DateMicro(1998, time.May, 5, 5, 5, 5, 0, time.UTC), "t: 1998-05-05T05:05:05.000000Z\n"}, - } - - for _, c := range cases { - input := MicroTimeHolder{c.input} - result, err := yaml.Marshal(&input) - if err != nil { - t.Errorf("Failed to marshal input: '%v': %v", input, err) - } - if string(result) != c.result { - t.Errorf("Failed to marshal input: '%v': expected %+v, got %q", input, c.result, string(result)) - } - } -} - -func TestMicroTimeUnmarshalYAML(t *testing.T) { - cases := []struct { - input string - result MicroTime - }{ - {"t: null\n", MicroTime{}}, - {"t: 1998-05-05T05:05:05.000000Z\n", MicroTime{Date(1998, time.May, 5, 5, 5, 5, 0, time.UTC).Local()}}, - } - - for _, c := range cases { - var result MicroTimeHolder - if err := yaml.Unmarshal([]byte(c.input), &result); err != nil { - t.Errorf("Failed to unmarshal input '%v': %v", c.input, err) - } - if result.T != c.result { - t.Errorf("Failed to unmarshal input '%v': expected %+v, got %+v", c.input, c.result, result) - } - } -} - -func TestMicroTimeMarshalJSON(t *testing.T) { - cases := []struct { - input MicroTime - result string - }{ - {MicroTime{}, "{\"t\":null}"}, - {DateMicro(1998, time.May, 5, 5, 5, 5, 50, time.UTC), "{\"t\":\"1998-05-05T05:05:05.000000Z\"}"}, - {DateMicro(1998, time.May, 5, 5, 5, 5, 0, time.UTC), "{\"t\":\"1998-05-05T05:05:05.000000Z\"}"}, - } - - for _, c := range cases { - input := MicroTimeHolder{c.input} - result, err := json.Marshal(&input) - if err != nil { - t.Errorf("Failed to marshal input: '%v': %v", input, err) - } - if string(result) != c.result { - t.Errorf("Failed to marshal input: '%v': expected %+v, got %q", input, c.result, string(result)) - } - } -} - -func TestMicroTimeUnmarshalJSON(t *testing.T) { - cases := []struct { - input string - result MicroTime - }{ - {"{\"t\":null}", MicroTime{}}, - {"{\"t\":\"1998-05-05T05:05:05.000000Z\"}", MicroTime{Date(1998, time.May, 5, 5, 5, 5, 0, time.UTC).Local()}}, - } - - for _, c := range cases { - var result MicroTimeHolder - if err := json.Unmarshal([]byte(c.input), &result); err != nil { - t.Errorf("Failed to unmarshal input '%v': %v", c.input, err) - } - if result.T != c.result { - t.Errorf("Failed to unmarshal input '%v': expected %+v, got %+v", c.input, c.result, result) - } - } -} - -func TestMicroTimeProto(t *testing.T) { - cases := []struct { - input MicroTime - }{ - {MicroTime{}}, - {DateMicro(1998, time.May, 5, 1, 5, 5, 50, time.Local)}, - {DateMicro(1998, time.May, 5, 5, 5, 5, 0, time.Local)}, - } - - for _, c := range cases { - input := c.input - data, err := input.Marshal() - if err != nil { - t.Fatalf("Failed to marshal input: '%v': %v", input, err) - } - time := MicroTime{} - if err := time.Unmarshal(data); err != nil { - t.Fatalf("Failed to unmarshal output: '%v': %v", input, err) - } - if !reflect.DeepEqual(input, time) { - t.Errorf("Marshal->Unmarshal is not idempotent: '%v' vs '%v'", input, time) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_test.go deleted file mode 100644 index 9923958e..00000000 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_test.go +++ /dev/null @@ -1,197 +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 ( - "encoding/json" - "reflect" - "testing" - "time" - - "github.com/ghodss/yaml" -) - -type TimeHolder struct { - T Time `json:"t"` -} - -func TestTimeMarshalYAML(t *testing.T) { - cases := []struct { - input Time - result string - }{ - {Time{}, "t: null\n"}, - {Date(1998, time.May, 5, 1, 5, 5, 50, time.FixedZone("test", -4*60*60)), "t: 1998-05-05T05:05:05Z\n"}, - {Date(1998, time.May, 5, 5, 5, 5, 0, time.UTC), "t: 1998-05-05T05:05:05Z\n"}, - } - - for _, c := range cases { - input := TimeHolder{c.input} - result, err := yaml.Marshal(&input) - if err != nil { - t.Errorf("Failed to marshal input: '%v': %v", input, err) - } - if string(result) != c.result { - t.Errorf("Failed to marshal input: '%v': expected %+v, got %q", input, c.result, string(result)) - } - } -} - -func TestTimeUnmarshalYAML(t *testing.T) { - cases := []struct { - input string - result Time - }{ - {"t: null\n", Time{}}, - {"t: 1998-05-05T05:05:05Z\n", Time{Date(1998, time.May, 5, 5, 5, 5, 0, time.UTC).Local()}}, - } - - for _, c := range cases { - var result TimeHolder - if err := yaml.Unmarshal([]byte(c.input), &result); err != nil { - t.Errorf("Failed to unmarshal input '%v': %v", c.input, err) - } - if result.T != c.result { - t.Errorf("Failed to unmarshal input '%v': expected %+v, got %+v", c.input, c.result, result) - } - } -} - -func TestTimeMarshalJSON(t *testing.T) { - cases := []struct { - input Time - result string - }{ - {Time{}, "{\"t\":null}"}, - {Date(1998, time.May, 5, 5, 5, 5, 50, time.UTC), "{\"t\":\"1998-05-05T05:05:05Z\"}"}, - {Date(1998, time.May, 5, 5, 5, 5, 0, time.UTC), "{\"t\":\"1998-05-05T05:05:05Z\"}"}, - } - - for _, c := range cases { - input := TimeHolder{c.input} - result, err := json.Marshal(&input) - if err != nil { - t.Errorf("Failed to marshal input: '%v': %v", input, err) - } - if string(result) != c.result { - t.Errorf("Failed to marshal input: '%v': expected %+v, got %q", input, c.result, string(result)) - } - } -} - -func TestTimeUnmarshalJSON(t *testing.T) { - cases := []struct { - input string - result Time - }{ - {"{\"t\":null}", Time{}}, - {"{\"t\":\"1998-05-05T05:05:05Z\"}", Time{Date(1998, time.May, 5, 5, 5, 5, 0, time.UTC).Local()}}, - } - - for _, c := range cases { - var result TimeHolder - if err := json.Unmarshal([]byte(c.input), &result); err != nil { - t.Errorf("Failed to unmarshal input '%v': %v", c.input, err) - } - if result.T != c.result { - t.Errorf("Failed to unmarshal input '%v': expected %+v, got %+v", c.input, c.result, result) - } - } -} - -func TestTimeMarshalJSONUnmarshalYAML(t *testing.T) { - cases := []struct { - input Time - }{ - {Time{}}, - {Date(1998, time.May, 5, 5, 5, 5, 50, time.Local).Rfc3339Copy()}, - {Date(1998, time.May, 5, 5, 5, 5, 0, time.Local).Rfc3339Copy()}, - } - - for i, c := range cases { - input := TimeHolder{c.input} - jsonMarshalled, err := json.Marshal(&input) - if err != nil { - t.Errorf("%d-1: Failed to marshal input: '%v': %v", i, input, err) - } - - var result TimeHolder - err = yaml.Unmarshal(jsonMarshalled, &result) - if err != nil { - t.Errorf("%d-2: Failed to unmarshal '%+v': %v", i, string(jsonMarshalled), err) - } - - iN, iO := input.T.Zone() - oN, oO := result.T.Zone() - if iN != oN || iO != oO { - t.Errorf("%d-3: Time zones differ before and after serialization %s:%d %s:%d", i, iN, iO, oN, oO) - } - - if input.T.UnixNano() != result.T.UnixNano() { - t.Errorf("%d-4: Failed to marshal input '%#v': got %#v", i, input, result) - } - } -} - -func TestTimeProto(t *testing.T) { - cases := []struct { - input Time - }{ - {Time{}}, - {Date(1998, time.May, 5, 1, 5, 5, 0, time.Local)}, - {Date(1998, time.May, 5, 5, 5, 5, 0, time.Local)}, - } - - for _, c := range cases { - input := c.input - data, err := input.Marshal() - if err != nil { - t.Fatalf("Failed to marshal input: '%v': %v", input, err) - } - time := Time{} - if err := time.Unmarshal(data); err != nil { - t.Fatalf("Failed to unmarshal output: '%v': %v", input, err) - } - if !reflect.DeepEqual(input, time) { - t.Errorf("Marshal->Unmarshal is not idempotent: '%v' vs '%v'", input, time) - } - } -} - -func TestTimeEqual(t *testing.T) { - t1 := NewTime(time.Now()) - cases := []struct { - name string - x *Time - y *Time - result bool - }{ - {"nil =? nil", nil, nil, true}, - {"!nil =? !nil", &t1, &t1, true}, - {"nil =? !nil", nil, &t1, false}, - {"!nil =? nil", &t1, nil, false}, - } - - for _, c := range cases { - t.Run(c.name, func(t *testing.T) { - result := c.x.Equal(c.y) - if result != c.result { - t.Errorf("Failed equality test for '%v', '%v': expected %+v, got %+v", c.x, c.y, c.result, result) - } - }) - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_test.go deleted file mode 100644 index ed5f20c4..00000000 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_test.go +++ /dev/null @@ -1,135 +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 v1 - -import ( - "encoding/json" - "reflect" - "testing" - - k8s_json "k8s.io/apimachinery/pkg/runtime/serializer/json" -) - -func TestVerbsUgorjiMarshalJSON(t *testing.T) { - cases := []struct { - input APIResource - result string - }{ - {APIResource{}, `{"name":"","singularName":"","namespaced":false,"kind":"","verbs":null}`}, - {APIResource{Verbs: Verbs([]string{})}, `{"name":"","singularName":"","namespaced":false,"kind":"","verbs":[]}`}, - {APIResource{Verbs: Verbs([]string{"delete"})}, `{"name":"","singularName":"","namespaced":false,"kind":"","verbs":["delete"]}`}, - } - - for i, c := range cases { - result, err := json.Marshal(&c.input) - if err != nil { - t.Errorf("[%d] Failed to marshal input: '%v': %v", i, c.input, err) - } - if string(result) != c.result { - t.Errorf("[%d] Failed to marshal input: '%v': expected '%v', got '%v'", i, c.input, c.result, string(result)) - } - } -} - -func TestVerbsUJsonIterUnmarshalJSON(t *testing.T) { - cases := []struct { - input string - result APIResource - }{ - {`{}`, APIResource{}}, - {`{"verbs":null}`, APIResource{}}, - {`{"verbs":[]}`, APIResource{Verbs: Verbs([]string{})}}, - {`{"verbs":["delete"]}`, APIResource{Verbs: Verbs([]string{"delete"})}}, - } - - iter := k8s_json.CaseSensitiveJsonIterator() - for i, c := range cases { - var result APIResource - 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) { - t.Errorf("[%d] Failed to unmarshal input '%v': expected %+v, got %+v", i, c.input, c.result, result) - } - } -} - -// TestUgorjiMarshalJSONWithOmit tests that we don't have regressions regarding nil and empty slices with "omit" -func TestUgorjiMarshalJSONWithOmit(t *testing.T) { - cases := []struct { - input LabelSelector - result string - }{ - {LabelSelector{}, `{}`}, - {LabelSelector{MatchExpressions: []LabelSelectorRequirement{}}, `{}`}, - {LabelSelector{MatchExpressions: []LabelSelectorRequirement{{}}}, `{"matchExpressions":[{"key":"","operator":""}]}`}, - } - - for i, c := range cases { - result, err := json.Marshal(&c.input) - if err != nil { - t.Errorf("[%d] Failed to marshal input: '%v': %v", i, c.input, err) - } - if string(result) != c.result { - t.Errorf("[%d] Failed to marshal input: '%v': expected '%v', got '%v'", i, c.input, c.result, string(result)) - } - } -} - -func TestVerbsUnmarshalJSON(t *testing.T) { - cases := []struct { - input string - result APIResource - }{ - {`{}`, APIResource{}}, - {`{"verbs":null}`, APIResource{}}, - {`{"verbs":[]}`, APIResource{Verbs: Verbs([]string{})}}, - {`{"verbs":["delete"]}`, APIResource{Verbs: Verbs([]string{"delete"})}}, - } - - for i, c := range cases { - var result APIResource - if err := json.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) { - t.Errorf("[%d] Failed to unmarshal input '%v': expected %+v, got %+v", i, c.input, c.result, result) - } - } -} - -func TestVerbsProto(t *testing.T) { - cases := []APIResource{ - {}, - {Verbs: Verbs([]string{})}, - {Verbs: Verbs([]string{"delete"})}, - } - - for _, input := range cases { - data, err := input.Marshal() - if err != nil { - t.Fatalf("Failed to marshal input: '%v': %v", input, err) - } - resource := APIResource{} - if err := resource.Unmarshal(data); err != nil { - t.Fatalf("Failed to unmarshal output: '%v': %v", input, err) - } - if !reflect.DeepEqual(input, resource) { - t.Errorf("Marshal->Unmarshal is not idempotent: '%v' vs '%v'", input, resource) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers_test.go deleted file mode 100644 index d9799621..00000000 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers_test.go +++ /dev/null @@ -1,136 +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 unstructured - -import ( - "io/ioutil" - "sync" - "testing" - - "github.com/stretchr/testify/assert" -) - -// TestCodecOfUnstructuredList tests that there are no data races in Encode(). -// i.e. that it does not mutate the object being encoded. -func TestCodecOfUnstructuredList(t *testing.T) { - var wg sync.WaitGroup - concurrency := 10 - list := UnstructuredList{ - Object: map[string]interface{}{}, - } - wg.Add(concurrency) - for i := 0; i < concurrency; i++ { - go func() { - defer wg.Done() - assert.NoError(t, UnstructuredJSONScheme.Encode(&list, ioutil.Discard)) - }() - } - wg.Wait() -} - -func TestRemoveNestedField(t *testing.T) { - obj := map[string]interface{}{ - "x": map[string]interface{}{ - "y": 1, - "a": "foo", - }, - } - RemoveNestedField(obj, "x", "a") - assert.Len(t, obj["x"], 1) - RemoveNestedField(obj, "x", "y") - assert.Empty(t, obj["x"]) - RemoveNestedField(obj, "x") - assert.Empty(t, obj) - 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/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_list_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_list_test.go deleted file mode 100644 index 04ada449..00000000 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_list_test.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 unstructured - -import ( - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestUnstructuredList(t *testing.T) { - list := &UnstructuredList{ - Object: map[string]interface{}{"kind": "List", "apiVersion": "v1"}, - Items: []Unstructured{ - {Object: map[string]interface{}{"kind": "Pod", "apiVersion": "v1", "metadata": map[string]interface{}{"name": "test"}}}, - }, - } - content := list.UnstructuredContent() - items := content["items"].([]interface{}) - require.Len(t, items, 1) - val, found, err := NestedFieldCopy(items[0].(map[string]interface{}), "metadata", "name") - require.True(t, found) - require.NoError(t, err) - assert.Equal(t, "test", val) -} - -func TestNilDeletionTimestamp(t *testing.T) { - var u Unstructured - del := u.GetDeletionTimestamp() - if del != nil { - t.Errorf("unexpected non-nil deletion timestamp: %v", del) - } - u.SetDeletionTimestamp(u.GetDeletionTimestamp()) - del = u.GetDeletionTimestamp() - if del != nil { - t.Errorf("unexpected non-nil deletion timestamp: %v", del) - } - _, ok := u.Object["metadata"] - assert.False(t, ok) - - now := metav1.Now() - u.SetDeletionTimestamp(&now) - assert.Equal(t, now.Unix(), u.GetDeletionTimestamp().Unix()) - u.SetDeletionTimestamp(nil) - metadata := u.Object["metadata"].(map[string]interface{}) - _, ok = metadata["deletionTimestamp"] - assert.False(t, ok) -} - -func TestEmptyCreationTimestampIsOmitted(t *testing.T) { - var u Unstructured - now := metav1.Now() - - // set an initial creationTimestamp and ensure the field exists - u.SetCreationTimestamp(now) - metadata := u.Object["metadata"].(map[string]interface{}) - creationTimestamp, exists := metadata["creationTimestamp"] - if !exists { - t.Fatalf("unexpected missing creationTimestamp") - } - - // set an empty timestamp and ensure the field no longer exists - u.SetCreationTimestamp(metav1.Time{}) - metadata = u.Object["metadata"].(map[string]interface{}) - creationTimestamp, exists = metadata["creationTimestamp"] - if exists { - t.Errorf("unexpected creation timestamp field: %q", creationTimestamp) - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto deleted file mode 100644 index 472902ad..00000000 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.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"; - -// 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. -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -message PartialObjectMetadata { - // 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; -} - -// PartialObjectMetadataList contains a list of objects containing only their metadata -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -message PartialObjectMetadataList { - // items contains each of the included items. - repeated PartialObjectMetadata items = 1; -} - -// TableOptions are used when a Table is requested by the caller. -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -message TableOptions { - // includeObject decides whether to include each object along with its columnar information. - // Specifying "None" will return no object, specifying "Object" will return the full object contents, and - // specifying "Metadata" (the default) will return the object's metadata in the PartialObjectMetadata kind - // in version v1beta1 of the meta.k8s.io API group. - optional string includeObject = 1; -} - diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/converter_test.go b/vendor/k8s.io/apimachinery/pkg/conversion/converter_test.go deleted file mode 100644 index 5373c809..00000000 --- a/vendor/k8s.io/apimachinery/pkg/conversion/converter_test.go +++ /dev/null @@ -1,826 +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 conversion - -import ( - "fmt" - "reflect" - "strconv" - "strings" - "testing" - - "github.com/google/gofuzz" - flag "github.com/spf13/pflag" - - "k8s.io/apimachinery/pkg/util/diff" -) - -var fuzzIters = flag.Int("fuzz-iters", 50, "How many fuzzing iterations to do.") - -// Test a weird version/kind embedding format. -type MyWeirdCustomEmbeddedVersionKindField struct { - ID string `json:"ID,omitempty"` - APIVersion string `json:"myVersionKey,omitempty"` - ObjectKind string `json:"myKindKey,omitempty"` - Z string `json:"Z,omitempty"` - Y uint64 `json:"Y,omitempty"` -} - -type TestType1 struct { - MyWeirdCustomEmbeddedVersionKindField `json:",inline"` - A string `json:"A,omitempty"` - B int `json:"B,omitempty"` - C int8 `json:"C,omitempty"` - D int16 `json:"D,omitempty"` - E int32 `json:"E,omitempty"` - F int64 `json:"F,omitempty"` - G uint `json:"G,omitempty"` - H uint8 `json:"H,omitempty"` - I uint16 `json:"I,omitempty"` - J uint32 `json:"J,omitempty"` - K uint64 `json:"K,omitempty"` - L bool `json:"L,omitempty"` - M map[string]int `json:"M,omitempty"` - N map[string]TestType2 `json:"N,omitempty"` - O *TestType2 `json:"O,omitempty"` - P []TestType2 `json:"Q,omitempty"` -} - -type TestType2 struct { - A string `json:"A,omitempty"` - B int `json:"B,omitempty"` -} - -type ExternalTestType2 struct { - A string `json:"A,omitempty"` - B int `json:"B,omitempty"` -} -type ExternalTestType1 struct { - MyWeirdCustomEmbeddedVersionKindField `json:",inline"` - A string `json:"A,omitempty"` - B int `json:"B,omitempty"` - C int8 `json:"C,omitempty"` - D int16 `json:"D,omitempty"` - E int32 `json:"E,omitempty"` - F int64 `json:"F,omitempty"` - G uint `json:"G,omitempty"` - H uint8 `json:"H,omitempty"` - I uint16 `json:"I,omitempty"` - J uint32 `json:"J,omitempty"` - K uint64 `json:"K,omitempty"` - L bool `json:"L,omitempty"` - M map[string]int `json:"M,omitempty"` - N map[string]ExternalTestType2 `json:"N,omitempty"` - O *ExternalTestType2 `json:"O,omitempty"` - P []ExternalTestType2 `json:"Q,omitempty"` -} - -func testLogger(t *testing.T) DebugLogger { - // We don't set logger to eliminate rubbish logs in tests. - // If you want to switch it, simply switch it to: "return t" - return nil -} - -func TestConverter_byteSlice(t *testing.T) { - c := NewConverter(DefaultNameFunc) - src := []byte{1, 2, 3} - dest := []byte{} - err := c.Convert(&src, &dest, 0, nil) - if err != nil { - t.Fatalf("expected no error") - } - if e, a := src, dest; !reflect.DeepEqual(e, a) { - t.Errorf("expected %#v, got %#v", e, a) - } -} - -func TestConverter_MismatchedTypes(t *testing.T) { - c := NewConverter(DefaultNameFunc) - - err := c.RegisterConversionFunc( - func(in *[]string, out *int, s Scope) error { - if str, err := strconv.Atoi((*in)[0]); err != nil { - return err - } else { - *out = str - return nil - } - }, - ) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - - src := []string{"5"} - var dest *int - err = c.Convert(&src, &dest, 0, nil) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if e, a := 5, *dest; e != a { - t.Errorf("expected %#v, got %#v", e, a) - } -} - -func TestConverter_DefaultConvert(t *testing.T) { - type A struct { - Foo string - Baz int - } - type B struct { - Bar string - Baz int - } - c := NewConverter(DefaultNameFunc) - c.Debug = testLogger(t) - c.nameFunc = func(t reflect.Type) string { return "MyType" } - - // Ensure conversion funcs can call DefaultConvert to get default behavior, - // then fixup remaining fields manually - err := c.RegisterConversionFunc(func(in *A, out *B, s Scope) error { - if err := s.DefaultConvert(in, out, IgnoreMissingFields); err != nil { - return err - } - out.Bar = in.Foo - return nil - }) - if err != nil { - t.Fatalf("unexpected error %v", err) - } - - x := A{"hello, intrepid test reader!", 3} - y := B{} - - err = c.Convert(&x, &y, 0, nil) - if err != nil { - t.Fatalf("unexpected error %v", err) - } - if e, a := x.Foo, y.Bar; e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := x.Baz, y.Baz; e != a { - t.Errorf("expected %v, got %v", e, a) - } -} - -func TestConverter_DeepCopy(t *testing.T) { - type A struct { - Foo *string - Bar []string - Baz interface{} - Qux map[string]string - } - c := NewConverter(DefaultNameFunc) - c.Debug = testLogger(t) - - foo, baz := "foo", "baz" - x := A{ - Foo: &foo, - Bar: []string{"bar"}, - Baz: &baz, - Qux: map[string]string{"qux": "qux"}, - } - y := A{} - - if err := c.Convert(&x, &y, 0, nil); err != nil { - t.Fatalf("unexpected error %v", err) - } - *x.Foo = "foo2" - x.Bar[0] = "bar2" - *x.Baz.(*string) = "baz2" - x.Qux["qux"] = "qux2" - if e, a := *x.Foo, *y.Foo; e == a { - t.Errorf("expected difference between %v and %v", e, a) - } - if e, a := x.Bar, y.Bar; reflect.DeepEqual(e, a) { - t.Errorf("expected difference between %v and %v", e, a) - } - if e, a := *x.Baz.(*string), *y.Baz.(*string); e == a { - t.Errorf("expected difference between %v and %v", e, a) - } - if e, a := x.Qux, y.Qux; reflect.DeepEqual(e, a) { - t.Errorf("expected difference between %v and %v", e, a) - } -} - -func TestConverter_CallsRegisteredFunctions(t *testing.T) { - type A struct { - Foo string - Baz int - } - type B struct { - Bar string - Baz int - } - type C struct{} - c := NewConverter(DefaultNameFunc) - c.Debug = testLogger(t) - err := c.RegisterConversionFunc(func(in *A, out *B, s Scope) error { - out.Bar = in.Foo - return s.Convert(&in.Baz, &out.Baz, 0) - }) - if err != nil { - t.Fatalf("unexpected error %v", err) - } - err = c.RegisterConversionFunc(func(in *B, out *A, s Scope) error { - out.Foo = in.Bar - return s.Convert(&in.Baz, &out.Baz, 0) - }) - if err != nil { - t.Fatalf("unexpected error %v", err) - } - - x := A{"hello, intrepid test reader!", 3} - y := B{} - - err = c.Convert(&x, &y, 0, nil) - if err != nil { - t.Fatalf("unexpected error %v", err) - } - if e, a := x.Foo, y.Bar; e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := x.Baz, y.Baz; e != a { - t.Errorf("expected %v, got %v", e, a) - } - - z := B{"all your test are belong to us", 42} - w := A{} - - err = c.Convert(&z, &w, 0, nil) - if err != nil { - t.Fatalf("unexpected error %v", err) - } - if e, a := z.Bar, w.Foo; e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := z.Baz, w.Baz; e != a { - t.Errorf("expected %v, got %v", e, a) - } - - err = c.RegisterConversionFunc(func(in *A, out *C, s Scope) error { - return fmt.Errorf("C can't store an A, silly") - }) - if err != nil { - t.Fatalf("unexpected error %v", err) - } - err = c.Convert(&A{}, &C{}, 0, nil) - if err == nil { - t.Errorf("unexpected non-error") - } -} - -func TestConverter_IgnoredConversion(t *testing.T) { - type A struct{} - type B struct{} - - count := 0 - c := NewConverter(DefaultNameFunc) - if err := c.RegisterConversionFunc(func(in *A, out *B, s Scope) error { - count++ - return nil - }); err != nil { - t.Fatalf("unexpected error %v", err) - } - if err := c.RegisterIgnoredConversion(&A{}, &B{}); err != nil { - t.Fatal(err) - } - a := A{} - b := B{} - if err := c.Convert(&a, &b, 0, nil); err != nil { - t.Errorf("%v", err) - } - if count != 0 { - t.Errorf("unexpected number of conversion invocations") - } -} - -func TestConverter_IgnoredConversionNested(t *testing.T) { - type C string - type A struct { - C C - } - type B struct { - C C - } - - c := NewConverter(DefaultNameFunc) - typed := C("") - if err := c.RegisterIgnoredConversion(&typed, &typed); err != nil { - t.Fatal(err) - } - a := A{C: C("test")} - b := B{C: C("other")} - if err := c.Convert(&a, &b, AllowDifferentFieldTypeNames, nil); err != nil { - t.Errorf("%v", err) - } - if b.C != C("other") { - t.Errorf("expected no conversion of field C: %#v", b) - } -} - -func TestConverter_GeneratedConversionOverriden(t *testing.T) { - type A struct{} - type B struct{} - c := NewConverter(DefaultNameFunc) - if err := c.RegisterConversionFunc(func(in *A, out *B, s Scope) error { - return nil - }); err != nil { - t.Fatalf("unexpected error %v", err) - } - if err := c.RegisterGeneratedConversionFunc(func(in *A, out *B, s Scope) error { - return fmt.Errorf("generated function should be overridden") - }); err != nil { - t.Fatalf("unexpected error %v", err) - } - - a := A{} - b := B{} - if err := c.Convert(&a, &b, 0, nil); err != nil { - t.Errorf("%v", err) - } -} - -func TestConverter_WithConversionOverriden(t *testing.T) { - type A struct{} - type B struct{} - c := NewConverter(DefaultNameFunc) - if err := c.RegisterConversionFunc(func(in *A, out *B, s Scope) error { - return fmt.Errorf("conversion function should be overridden") - }); err != nil { - t.Fatalf("unexpected error %v", err) - } - if err := c.RegisterGeneratedConversionFunc(func(in *A, out *B, s Scope) error { - return fmt.Errorf("generated function should be overridden") - }); err != nil { - t.Fatalf("unexpected error %v", err) - } - - ext := NewConversionFuncs() - ext.Add(func(in *A, out *B, s Scope) error { - return nil - }) - newc := c.WithConversions(ext) - - a := A{} - b := B{} - if err := c.Convert(&a, &b, 0, nil); err == nil || err.Error() != "conversion function should be overridden" { - t.Errorf("unexpected error: %v", err) - } - if err := newc.Convert(&a, &b, 0, nil); err != nil { - t.Errorf("%v", err) - } -} - -func TestConverter_MapsStringArrays(t *testing.T) { - type A struct { - Foo string - Baz int - Other string - } - c := NewConverter(DefaultNameFunc) - c.Debug = testLogger(t) - if err := c.RegisterConversionFunc(func(input *[]string, out *string, s Scope) error { - if len(*input) == 0 { - *out = "" - } - *out = (*input)[0] - return nil - }); err != nil { - t.Fatalf("unexpected error %v", err) - } - - x := map[string][]string{ - "Foo": {"bar"}, - "Baz": {"1"}, - "Other": {"", "test"}, - "other": {"wrong"}, - } - y := A{"test", 2, "something"} - - if err := c.Convert(&x, &y, AllowDifferentFieldTypeNames, nil); err == nil { - t.Error("unexpected non-error") - } - - if err := c.RegisterConversionFunc(func(input *[]string, out *int, s Scope) error { - if len(*input) == 0 { - *out = 0 - } - str := (*input)[0] - i, err := strconv.Atoi(str) - if err != nil { - return err - } - *out = i - return nil - }); err != nil { - t.Fatalf("unexpected error %v", err) - } - - if err := c.Convert(&x, &y, AllowDifferentFieldTypeNames, nil); err != nil { - t.Fatalf("unexpected error %v", err) - } - if !reflect.DeepEqual(y, A{"bar", 1, ""}) { - t.Errorf("unexpected result: %#v", y) - } -} - -func TestConverter_MapsStringArraysWithMappingKey(t *testing.T) { - type A struct { - Foo string `json:"test"` - Baz int - Other string - } - c := NewConverter(DefaultNameFunc) - c.Debug = testLogger(t) - if err := c.RegisterConversionFunc(func(input *[]string, out *string, s Scope) error { - if len(*input) == 0 { - *out = "" - } - *out = (*input)[0] - return nil - }); err != nil { - t.Fatalf("unexpected error %v", err) - } - - x := map[string][]string{ - "Foo": {"bar"}, - "test": {"baz"}, - } - y := A{"", 0, ""} - - if err := c.Convert(&x, &y, AllowDifferentFieldTypeNames|IgnoreMissingFields, &Meta{}); err != nil { - t.Fatalf("unexpected error %v", err) - } - if !reflect.DeepEqual(y, A{"bar", 0, ""}) { - t.Errorf("unexpected result: %#v", y) - } - - mapping := func(key string, sourceTag, destTag reflect.StructTag) (source string, dest string) { - if s := destTag.Get("json"); len(s) > 0 { - return strings.SplitN(s, ",", 2)[0], key - } - return key, key - } - - if err := c.Convert(&x, &y, AllowDifferentFieldTypeNames|IgnoreMissingFields, &Meta{KeyNameMapping: mapping}); err != nil { - t.Fatalf("unexpected error %v", err) - } - if !reflect.DeepEqual(y, A{"baz", 0, ""}) { - t.Errorf("unexpected result: %#v", y) - } -} - -func TestConverter_fuzz(t *testing.T) { - // Use the same types from the scheme test. - table := []struct { - from, to, check interface{} - }{ - {&TestType1{}, &ExternalTestType1{}, &TestType1{}}, - {&ExternalTestType1{}, &TestType1{}, &ExternalTestType1{}}, - } - - f := fuzz.New().NilChance(.5).NumElements(0, 100) - c := NewConverter(DefaultNameFunc) - c.nameFunc = func(t reflect.Type) string { - // Hide the fact that we don't have separate packages for these things. - return map[reflect.Type]string{ - reflect.TypeOf(TestType1{}): "TestType1", - reflect.TypeOf(ExternalTestType1{}): "TestType1", - reflect.TypeOf(TestType2{}): "TestType2", - reflect.TypeOf(ExternalTestType2{}): "TestType2", - }[t] - } - c.Debug = testLogger(t) - - for i, item := range table { - for j := 0; j < *fuzzIters; j++ { - f.Fuzz(item.from) - err := c.Convert(item.from, item.to, 0, nil) - if err != nil { - t.Errorf("(%v, %v): unexpected error: %v", i, j, err) - continue - } - err = c.Convert(item.to, item.check, 0, nil) - if err != nil { - t.Errorf("(%v, %v): unexpected error: %v", i, j, err) - continue - } - if e, a := item.from, item.check; !reflect.DeepEqual(e, a) { - t.Errorf("(%v, %v): unexpected diff: %v", i, j, diff.ObjectDiff(e, a)) - } - } - } -} - -func TestConverter_MapElemAddr(t *testing.T) { - type Foo struct { - A map[int]int - } - type Bar struct { - A map[string]string - } - c := NewConverter(DefaultNameFunc) - c.Debug = testLogger(t) - err := c.RegisterConversionFunc( - func(in *int, out *string, s Scope) error { - *out = fmt.Sprintf("%v", *in) - return nil - }, - ) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - err = c.RegisterConversionFunc( - func(in *string, out *int, s Scope) error { - if str, err := strconv.Atoi(*in); err != nil { - return err - } else { - *out = str - return nil - } - }, - ) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - f := fuzz.New().NilChance(0).NumElements(3, 3) - first := Foo{} - second := Bar{} - f.Fuzz(&first) - err = c.Convert(&first, &second, AllowDifferentFieldTypeNames, nil) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - third := Foo{} - err = c.Convert(&second, &third, AllowDifferentFieldTypeNames, nil) - if e, a := first, third; !reflect.DeepEqual(e, a) { - t.Errorf("Unexpected diff: %v", diff.ObjectDiff(e, a)) - } -} - -func TestConverter_tags(t *testing.T) { - type Foo struct { - A string `test:"foo"` - } - type Bar struct { - A string `test:"bar"` - } - c := NewConverter(DefaultNameFunc) - c.Debug = testLogger(t) - err := c.RegisterConversionFunc( - func(in *string, out *string, s Scope) error { - if e, a := "foo", s.SrcTag().Get("test"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := "bar", s.DestTag().Get("test"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - return nil - }, - ) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - err = c.Convert(&Foo{}, &Bar{}, AllowDifferentFieldTypeNames, nil) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } -} - -func TestConverter_meta(t *testing.T) { - type Foo struct{ A string } - type Bar struct{ A string } - c := NewConverter(DefaultNameFunc) - c.Debug = testLogger(t) - checks := 0 - err := c.RegisterConversionFunc( - func(in *Foo, out *Bar, s Scope) error { - if s.Meta() == nil { - t.Errorf("Meta did not get passed!") - } - checks++ - s.Convert(&in.A, &out.A, 0) - return nil - }, - ) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - err = c.RegisterConversionFunc( - func(in *string, out *string, s Scope) error { - if s.Meta() == nil { - t.Errorf("Meta did not get passed a second time!") - } - checks++ - return nil - }, - ) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - err = c.Convert(&Foo{}, &Bar{}, 0, &Meta{}) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - if checks != 2 { - t.Errorf("Registered functions did not get called.") - } -} - -func TestConverter_flags(t *testing.T) { - type Foo struct{ A string } - type Bar struct{ A string } - table := []struct { - from, to interface{} - flags FieldMatchingFlags - shouldSucceed bool - }{ - // Check that DestFromSource allows extra fields only in source. - { - from: &struct{ A string }{}, - to: &struct{ A, B string }{}, - flags: DestFromSource, - shouldSucceed: false, - }, { - from: &struct{ A, B string }{}, - to: &struct{ A string }{}, - flags: DestFromSource, - shouldSucceed: true, - }, - - // Check that SourceToDest allows for extra fields only in dest. - { - from: &struct{ A string }{}, - to: &struct{ A, B string }{}, - flags: SourceToDest, - shouldSucceed: true, - }, { - from: &struct{ A, B string }{}, - to: &struct{ A string }{}, - flags: SourceToDest, - shouldSucceed: false, - }, - - // Check that IgnoreMissingFields makes the above failure cases pass. - { - from: &struct{ A string }{}, - to: &struct{ A, B string }{}, - flags: DestFromSource | IgnoreMissingFields, - shouldSucceed: true, - }, { - from: &struct{ A, B string }{}, - to: &struct{ A string }{}, - flags: SourceToDest | IgnoreMissingFields, - shouldSucceed: true, - }, - - // Check that the field type name must match unless - // AllowDifferentFieldTypeNames is specified. - { - from: &struct{ A, B Foo }{}, - to: &struct{ A Bar }{}, - flags: DestFromSource, - shouldSucceed: false, - }, { - from: &struct{ A Foo }{}, - to: &struct{ A, B Bar }{}, - flags: SourceToDest, - shouldSucceed: false, - }, { - from: &struct{ A, B Foo }{}, - to: &struct{ A Bar }{}, - flags: DestFromSource | AllowDifferentFieldTypeNames, - shouldSucceed: true, - }, { - from: &struct{ A Foo }{}, - to: &struct{ A, B Bar }{}, - flags: SourceToDest | AllowDifferentFieldTypeNames, - shouldSucceed: true, - }, - } - f := fuzz.New().NilChance(.5).NumElements(0, 100) - c := NewConverter(DefaultNameFunc) - c.Debug = testLogger(t) - - for i, item := range table { - for j := 0; j < *fuzzIters; j++ { - f.Fuzz(item.from) - err := c.Convert(item.from, item.to, item.flags, nil) - if item.shouldSucceed && err != nil { - t.Errorf("(%v, %v): unexpected error: %v", i, j, err) - continue - } - if !item.shouldSucceed && err == nil { - t.Errorf("(%v, %v): unexpected non-error", i, j) - continue - } - } - } -} - -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/vendor/k8s.io/apimachinery/pkg/conversion/helper_test.go b/vendor/k8s.io/apimachinery/pkg/conversion/helper_test.go deleted file mode 100644 index 8c61a30a..00000000 --- a/vendor/k8s.io/apimachinery/pkg/conversion/helper_test.go +++ /dev/null @@ -1,38 +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 conversion - -import "testing" - -func TestInvalidPtrValueKind(t *testing.T) { - var simple interface{} - switch obj := simple.(type) { - default: - _, err := EnforcePtr(obj) - if err == nil { - t.Errorf("Expected error on invalid kind") - } - } -} - -func TestEnforceNilPtr(t *testing.T) { - var nilPtr *struct{} - _, err := EnforcePtr(nilPtr) - if err == nil { - t.Errorf("Expected error on nil pointer") - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert_test.go b/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert_test.go deleted file mode 100644 index 1eed5e1f..00000000 --- a/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert_test.go +++ /dev/null @@ -1,219 +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 queryparams_test - -import ( - "net/url" - "reflect" - "testing" - "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/conversion/queryparams" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -type namedString string -type namedBool bool - -type bar struct { - Float1 float32 `json:"float1"` - Float2 float64 `json:"float2"` - Int1 int64 `json:"int1,omitempty"` - Int2 int32 `json:"int2,omitempty"` - Int3 int16 `json:"int3,omitempty"` - Str1 string `json:"str1,omitempty"` - Ignored int - Ignored2 string -} - -func (obj *bar) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } - -type foo struct { - Str string `json:"str"` - Integer int `json:"integer,omitempty"` - Slice []string `json:"slice,omitempty"` - Boolean bool `json:"boolean,omitempty"` - NamedStr namedString `json:"namedStr,omitempty"` - NamedBool namedBool `json:"namedBool,omitempty"` - Foobar bar `json:"foobar,omitempty"` - Testmap map[string]string `json:"testmap,omitempty"` -} - -func (obj *foo) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } - -type baz struct { - Ptr *int `json:"ptr"` - Bptr *bool `json:"bptr,omitempty"` -} - -func (obj *baz) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } - -// childStructs tests some of the types we serialize to query params for log API calls -// notably, the nested time struct -type childStructs struct { - Container string `json:"container,omitempty"` - 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"` -} - -func (obj *childStructs) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } - -func validateResult(t *testing.T, input interface{}, actual, expected url.Values) { - local := url.Values{} - for k, v := range expected { - local[k] = v - } - for k, v := range actual { - if ev, ok := local[k]; !ok || !reflect.DeepEqual(ev, v) { - if !ok { - t.Errorf("%#v: actual value key %s not found in expected map", input, k) - } else { - t.Errorf("%#v: values don't match: actual: %#v, expected: %#v", input, v, ev) - } - } - delete(local, k) - } - if len(local) > 0 { - t.Errorf("%#v: expected map has keys that were not found in actual map: %#v", input, local) - } -} - -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 { - input interface{} - expected url.Values - }{ - { - input: &foo{ - Str: "hello", - }, - expected: url.Values{"str": {"hello"}}, - }, - { - input: &foo{ - Str: "test string", - Slice: []string{"one", "two", "three"}, - Integer: 234, - Boolean: true, - }, - expected: url.Values{"str": {"test string"}, "slice": {"one", "two", "three"}, "integer": {"234"}, "boolean": {"true"}}, - }, - { - input: &foo{ - Str: "named types", - NamedStr: "value1", - NamedBool: true, - }, - expected: url.Values{"str": {"named types"}, "namedStr": {"value1"}, "namedBool": {"true"}}, - }, - { - input: &foo{ - Str: "don't ignore embedded struct", - Foobar: bar{ - Float1: 5.0, - }, - }, - expected: url.Values{"str": {"don't ignore embedded struct"}, "float1": {"5"}, "float2": {"0"}}, - }, - { - // Ignore untagged fields - input: &bar{ - Float1: 23.5, - Float2: 100.7, - Int1: 1, - Int2: 2, - Int3: 3, - Ignored: 1, - Ignored2: "ignored", - }, - expected: url.Values{"float1": {"23.5"}, "float2": {"100.7"}, "int1": {"1"}, "int2": {"2"}, "int3": {"3"}}, - }, - { - // include fields that are not tagged omitempty - input: &foo{ - NamedStr: "named str", - }, - expected: url.Values{"str": {""}, "namedStr": {"named str"}}, - }, - { - input: &baz{ - Ptr: intp(5), - Bptr: boolp(true), - }, - expected: url.Values{"ptr": {"5"}, "bptr": {"true"}}, - }, - { - input: &baz{ - Bptr: boolp(true), - }, - expected: url.Values{"ptr": {""}, "bptr": {"true"}}, - }, - { - input: &baz{ - Ptr: intp(5), - }, - expected: url.Values{"ptr": {"5"}}, - }, - { - input: &childStructs{ - Container: "mycontainer", - 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, - }, - expected: url.Values{"container": {"mycontainer"}, "follow": {"true"}, "previous": {"true"}, "sinceSeconds": {"123"}, "sinceTime": {"2000-01-01T12:34:56Z"}, "emptyTime": {""}, "nonPointerTime": {"2000-01-01T12:34:56Z"}}, - }, - { - input: &childStructs{ - Container: "mycontainer", - 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"}, "tailLines": {"0"}, "emptyTime": {""}, "nonPointerTime": {"2000-01-01T12:34:56Z"}}, - }, - } - - for _, test := range tests { - result, err := queryparams.Convert(test.input) - if err != nil { - t.Errorf("Unexpected error while converting %#v: %v", test.input, err) - } - validateResult(t, test.input, result, test.expected) - } -} - -func intp(n int) *int { return &n } - -func boolp(b bool) *bool { return &b } diff --git a/vendor/k8s.io/apimachinery/pkg/fields/fields_test.go b/vendor/k8s.io/apimachinery/pkg/fields/fields_test.go deleted file mode 100644 index 6965be68..00000000 --- a/vendor/k8s.io/apimachinery/pkg/fields/fields_test.go +++ /dev/null @@ -1,57 +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 fields - -import ( - "testing" -) - -func matches(t *testing.T, ls Set, want string) { - if ls.String() != want { - t.Errorf("Expected '%s', but got '%s'", want, ls.String()) - } -} - -func TestSetString(t *testing.T) { - matches(t, Set{"x": "y"}, "x=y") - matches(t, Set{"foo": "bar"}, "foo=bar") - matches(t, Set{"foo": "bar", "baz": "qup"}, "baz=qup,foo=bar") -} - -func TestFieldHas(t *testing.T) { - fieldHasTests := []struct { - Ls Fields - Key string - Has bool - }{ - {Set{"x": "y"}, "x", true}, - {Set{"x": ""}, "x", true}, - {Set{"x": "y"}, "foo", false}, - } - for _, lh := range fieldHasTests { - if has := lh.Ls.Has(lh.Key); has != lh.Has { - t.Errorf("%#v.Has(%#v) => %v, expected %v", lh.Ls, lh.Key, has, lh.Has) - } - } -} - -func TestFieldGet(t *testing.T) { - ls := Set{"x": "y"} - if ls.Get("x") != "y" { - t.Errorf("Set.Get is broken") - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/fields/selector_test.go b/vendor/k8s.io/apimachinery/pkg/fields/selector_test.go deleted file mode 100644 index 0aa66935..00000000 --- a/vendor/k8s.io/apimachinery/pkg/fields/selector_test.go +++ /dev/null @@ -1,397 +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 fields - -import ( - "reflect" - "testing" -) - -func TestSplitTerms(t *testing.T) { - testcases := map[string][]string{ - // Simple selectors - `a`: {`a`}, - `a=avalue`: {`a=avalue`}, - `a=avalue,b=bvalue`: {`a=avalue`, `b=bvalue`}, - `a=avalue,b==bvalue,c!=cvalue`: {`a=avalue`, `b==bvalue`, `c!=cvalue`}, - - // Empty terms - ``: nil, - `a=a,`: {`a=a`, ``}, - `,a=a`: {``, `a=a`}, - - // Escaped values - `k=\,,k2=v2`: {`k=\,`, `k2=v2`}, // escaped comma in value - `k=\\,k2=v2`: {`k=\\`, `k2=v2`}, // escaped backslash, unescaped comma - `k=\\\,,k2=v2`: {`k=\\\,`, `k2=v2`}, // escaped backslash and comma - `k=\a\b\`: {`k=\a\b\`}, // non-escape sequences - `k=\`: {`k=\`}, // orphan backslash - - // Multi-byte - `함=수,목=록`: {`함=수`, `목=록`}, - } - - for selector, expectedTerms := range testcases { - if terms := splitTerms(selector); !reflect.DeepEqual(terms, expectedTerms) { - t.Errorf("splitSelectors(`%s`): Expected\n%#v\ngot\n%#v", selector, expectedTerms, terms) - } - } -} - -func TestSplitTerm(t *testing.T) { - testcases := map[string]struct { - lhs string - op string - rhs string - ok bool - }{ - // Simple terms - `a=value`: {lhs: `a`, op: `=`, rhs: `value`, ok: true}, - `b==value`: {lhs: `b`, op: `==`, rhs: `value`, ok: true}, - `c!=value`: {lhs: `c`, op: `!=`, rhs: `value`, ok: true}, - - // Empty or invalid terms - ``: {lhs: ``, op: ``, rhs: ``, ok: false}, - `a`: {lhs: ``, op: ``, rhs: ``, ok: false}, - - // Escaped values - `k=\,`: {lhs: `k`, op: `=`, rhs: `\,`, ok: true}, - `k=\=`: {lhs: `k`, op: `=`, rhs: `\=`, ok: true}, - `k=\\\a\b\=\,\`: {lhs: `k`, op: `=`, rhs: `\\\a\b\=\,\`, ok: true}, - - // Multi-byte - `함=수`: {lhs: `함`, op: `=`, rhs: `수`, ok: true}, - } - - for term, expected := range testcases { - lhs, op, rhs, ok := splitTerm(term) - if lhs != expected.lhs || op != expected.op || rhs != expected.rhs || ok != expected.ok { - t.Errorf( - "splitTerm(`%s`): Expected\n%s,%s,%s,%v\nGot\n%s,%s,%s,%v", - term, - expected.lhs, expected.op, expected.rhs, expected.ok, - lhs, op, rhs, ok, - ) - } - } -} - -func TestEscapeValue(t *testing.T) { - // map values to their normalized escaped values - testcases := map[string]string{ - ``: ``, - `a`: `a`, - `=`: `\=`, - `,`: `\,`, - `\`: `\\`, - `\=\,\`: `\\\=\\\,\\`, - } - - for unescapedValue, escapedValue := range testcases { - actualEscaped := EscapeValue(unescapedValue) - if actualEscaped != escapedValue { - t.Errorf("EscapeValue(%s): expected %s, got %s", unescapedValue, escapedValue, actualEscaped) - } - - actualUnescaped, err := UnescapeValue(escapedValue) - if err != nil { - t.Errorf("UnescapeValue(%s): unexpected error %v", escapedValue, err) - } - if actualUnescaped != unescapedValue { - t.Errorf("UnescapeValue(%s): expected %s, got %s", escapedValue, unescapedValue, actualUnescaped) - } - } - - // test invalid escape sequences - invalidTestcases := []string{ - `\`, // orphan slash is invalid - `\\\`, // orphan slash is invalid - `\a`, // unrecognized escape sequence is invalid - } - for _, invalidValue := range invalidTestcases { - _, err := UnescapeValue(invalidValue) - if _, ok := err.(InvalidEscapeSequence); !ok || err == nil { - t.Errorf("UnescapeValue(%s): expected invalid escape sequence error, got %#v", invalidValue, err) - } - } -} - -func TestSelectorParse(t *testing.T) { - testGoodStrings := []string{ - "x=a,y=b,z=c", - "", - "x!=a,y=b", - `x=a||y\=b`, - `x=a\=\=b`, - } - testBadStrings := []string{ - "x=a||y=b", - "x==a==b", - "x=a,b", - "x in (a)", - "x in (a,b,c)", - "x", - } - for _, test := range testGoodStrings { - lq, err := ParseSelector(test) - if err != nil { - t.Errorf("%v: error %v (%#v)\n", test, err, err) - } - if test != lq.String() { - t.Errorf("%v restring gave: %v\n", test, lq.String()) - } - } - for _, test := range testBadStrings { - _, err := ParseSelector(test) - if err == nil { - t.Errorf("%v: did not get expected error\n", test) - } - } -} - -func TestDeterministicParse(t *testing.T) { - s1, err := ParseSelector("x=a,a=x") - s2, err2 := ParseSelector("a=x,x=a") - if err != nil || err2 != nil { - t.Errorf("Unexpected parse error") - } - if s1.String() != s2.String() { - t.Errorf("Non-deterministic parse") - } -} - -func expectMatch(t *testing.T, selector string, ls Set) { - lq, err := ParseSelector(selector) - if err != nil { - t.Errorf("Unable to parse %v as a selector\n", selector) - return - } - if !lq.Matches(ls) { - t.Errorf("Wanted %s to match '%s', but it did not.\n", selector, ls) - } -} - -func expectNoMatch(t *testing.T, selector string, ls Set) { - lq, err := ParseSelector(selector) - if err != nil { - t.Errorf("Unable to parse %v as a selector\n", selector) - return - } - if lq.Matches(ls) { - t.Errorf("Wanted '%s' to not match '%s', but it did.", selector, ls) - } -} - -func TestEverything(t *testing.T) { - if !Everything().Matches(Set{"x": "y"}) { - t.Errorf("Nil selector didn't match") - } - if !Everything().Empty() { - t.Errorf("Everything was not empty") - } -} - -func TestSelectorMatches(t *testing.T) { - expectMatch(t, "", Set{"x": "y"}) - expectMatch(t, "x=y", Set{"x": "y"}) - expectMatch(t, "x=y,z=w", Set{"x": "y", "z": "w"}) - expectMatch(t, "x!=y,z!=w", Set{"x": "z", "z": "a"}) - expectMatch(t, "notin=in", Set{"notin": "in"}) // in and notin in exactMatch - expectNoMatch(t, "x=y", Set{"x": "z"}) - expectNoMatch(t, "x=y,z=w", Set{"x": "w", "z": "w"}) - expectNoMatch(t, "x!=y,z!=w", Set{"x": "z", "z": "w"}) - - fieldset := Set{ - "foo": "bar", - "baz": "blah", - "complex": `=value\,\`, - } - expectMatch(t, "foo=bar", fieldset) - expectMatch(t, "baz=blah", fieldset) - expectMatch(t, "foo=bar,baz=blah", fieldset) - expectMatch(t, `foo=bar,baz=blah,complex=\=value\\\,\\`, fieldset) - expectNoMatch(t, "foo=blah", fieldset) - expectNoMatch(t, "baz=bar", fieldset) - expectNoMatch(t, "foo=bar,foobar=bar,baz=blah", fieldset) -} - -func TestOneTermEqualSelector(t *testing.T) { - if !OneTermEqualSelector("x", "y").Matches(Set{"x": "y"}) { - t.Errorf("No match when match expected.") - } - if OneTermEqualSelector("x", "y").Matches(Set{"x": "z"}) { - t.Errorf("Match when none expected.") - } -} - -func expectMatchDirect(t *testing.T, selector, ls Set) { - if !SelectorFromSet(selector).Matches(ls) { - t.Errorf("Wanted %s to match '%s', but it did not.\n", selector, ls) - } -} - -func expectNoMatchDirect(t *testing.T, selector, ls Set) { - if SelectorFromSet(selector).Matches(ls) { - t.Errorf("Wanted '%s' to not match '%s', but it did.", selector, ls) - } -} - -func TestSetMatches(t *testing.T) { - labelset := Set{ - "foo": "bar", - "baz": "blah", - } - expectMatchDirect(t, Set{}, labelset) - expectMatchDirect(t, Set{"foo": "bar"}, labelset) - expectMatchDirect(t, Set{"baz": "blah"}, labelset) - expectMatchDirect(t, Set{"foo": "bar", "baz": "blah"}, labelset) - expectNoMatchDirect(t, Set{"foo": "=blah"}, labelset) - expectNoMatchDirect(t, Set{"baz": "=bar"}, labelset) - expectNoMatchDirect(t, Set{"foo": "=bar", "foobar": "bar", "baz": "blah"}, labelset) -} - -func TestNilMapIsValid(t *testing.T) { - selector := Set(nil).AsSelector() - if selector == nil { - t.Errorf("Selector for nil set should be Everything") - } - if !selector.Empty() { - t.Errorf("Selector for nil set should be Empty") - } -} - -func TestSetIsEmpty(t *testing.T) { - if !(Set{}).AsSelector().Empty() { - t.Errorf("Empty set should be empty") - } - if !(andTerm(nil)).Empty() { - t.Errorf("Nil andTerm should be empty") - } - if (&hasTerm{}).Empty() { - t.Errorf("hasTerm should not be empty") - } - if (¬HasTerm{}).Empty() { - t.Errorf("notHasTerm should not be empty") - } - if !(andTerm{andTerm{}}).Empty() { - t.Errorf("Nested andTerm should be empty") - } - if (andTerm{&hasTerm{"a", "b"}}).Empty() { - t.Errorf("Nested andTerm should not be empty") - } -} - -func TestRequiresExactMatch(t *testing.T) { - testCases := map[string]struct { - S Selector - Label string - Value string - Found bool - }{ - "empty set": {Set{}.AsSelector(), "test", "", false}, - "empty hasTerm": {&hasTerm{}, "test", "", false}, - "skipped hasTerm": {&hasTerm{"a", "b"}, "test", "", false}, - "valid hasTerm": {&hasTerm{"test", "b"}, "test", "b", true}, - "valid hasTerm no value": {&hasTerm{"test", ""}, "test", "", true}, - "valid notHasTerm": {¬HasTerm{"test", "b"}, "test", "", false}, - "valid notHasTerm no value": {¬HasTerm{"test", ""}, "test", "", false}, - "nil andTerm": {andTerm(nil), "test", "", false}, - "empty andTerm": {andTerm{}, "test", "", false}, - "nested andTerm": {andTerm{andTerm{}}, "test", "", false}, - "nested andTerm matches": {andTerm{&hasTerm{"test", "b"}}, "test", "b", true}, - "andTerm with non-match": {andTerm{&hasTerm{}, &hasTerm{"test", "b"}}, "test", "b", true}, - } - for k, v := range testCases { - value, found := v.S.RequiresExactMatch(v.Label) - if value != v.Value { - t.Errorf("%s: expected value %s, got %s", k, v.Value, value) - } - if found != v.Found { - t.Errorf("%s: expected found %t, got %t", k, v.Found, found) - } - } -} - -func TestTransform(t *testing.T) { - testCases := []struct { - name string - selector string - transform func(field, value string) (string, string, error) - result string - isEmpty bool - }{ - { - name: "empty selector", - selector: "", - transform: func(field, value string) (string, string, error) { return field, value, nil }, - result: "", - isEmpty: true, - }, - { - name: "no-op transform", - selector: "a=b,c=d", - transform: func(field, value string) (string, string, error) { return field, value, nil }, - result: "a=b,c=d", - isEmpty: false, - }, - { - name: "transform one field", - selector: "a=b,c=d", - transform: func(field, value string) (string, string, error) { - if field == "a" { - return "e", "f", nil - } - return field, value, nil - }, - result: "e=f,c=d", - isEmpty: false, - }, - { - name: "remove field to make empty", - selector: "a=b", - transform: func(field, value string) (string, string, error) { return "", "", nil }, - result: "", - isEmpty: true, - }, - { - name: "remove only one field", - selector: "a=b,c=d,e=f", - transform: func(field, value string) (string, string, error) { - if field == "c" { - return "", "", nil - } - return field, value, nil - }, - result: "a=b,e=f", - isEmpty: false, - }, - } - - for i, tc := range testCases { - result, err := ParseAndTransformSelector(tc.selector, tc.transform) - if err != nil { - t.Errorf("[%d] unexpected error during Transform: %v", i, err) - } - if result.Empty() != tc.isEmpty { - t.Errorf("[%d] expected empty: %t, got: %t", i, tc.isEmpty, result.Empty()) - } - if result.String() != tc.result { - t.Errorf("[%d] unexpected result: %s", i, result.String()) - } - } - -} diff --git a/vendor/k8s.io/apimachinery/pkg/labels/labels_test.go b/vendor/k8s.io/apimachinery/pkg/labels/labels_test.go deleted file mode 100644 index 2d4d761b..00000000 --- a/vendor/k8s.io/apimachinery/pkg/labels/labels_test.go +++ /dev/null @@ -1,231 +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 labels - -import ( - "testing" -) - -func matches(t *testing.T, ls Set, want string) { - if ls.String() != want { - t.Errorf("Expected '%s', but got '%s'", want, ls.String()) - } -} - -func TestSetString(t *testing.T) { - matches(t, Set{"x": "y"}, "x=y") - matches(t, Set{"foo": "bar"}, "foo=bar") - matches(t, Set{"foo": "bar", "baz": "qup"}, "baz=qup,foo=bar") - - // TODO: Make our label representation robust enough to handle labels - // with ",=!" characters in their names. -} - -func TestLabelHas(t *testing.T) { - labelHasTests := []struct { - Ls Labels - Key string - Has bool - }{ - {Set{"x": "y"}, "x", true}, - {Set{"x": ""}, "x", true}, - {Set{"x": "y"}, "foo", false}, - } - for _, lh := range labelHasTests { - if has := lh.Ls.Has(lh.Key); has != lh.Has { - t.Errorf("%#v.Has(%#v) => %v, expected %v", lh.Ls, lh.Key, has, lh.Has) - } - } -} - -func TestLabelGet(t *testing.T) { - ls := Set{"x": "y"} - if ls.Get("x") != "y" { - t.Errorf("Set.Get is broken") - } -} - -func TestLabelConflict(t *testing.T) { - tests := []struct { - labels1 map[string]string - labels2 map[string]string - conflict bool - }{ - { - labels1: map[string]string{}, - labels2: map[string]string{}, - conflict: false, - }, - { - labels1: map[string]string{"env": "test"}, - labels2: map[string]string{"infra": "true"}, - conflict: false, - }, - { - labels1: map[string]string{"env": "test"}, - labels2: map[string]string{"infra": "true", "env": "test"}, - conflict: false, - }, - { - labels1: map[string]string{"env": "test"}, - labels2: map[string]string{"env": "dev"}, - conflict: true, - }, - { - labels1: map[string]string{"env": "test", "infra": "false"}, - labels2: map[string]string{"infra": "true", "color": "blue"}, - conflict: true, - }, - } - for _, test := range tests { - conflict := Conflicts(Set(test.labels1), Set(test.labels2)) - if conflict != test.conflict { - t.Errorf("expected: %v but got: %v", test.conflict, conflict) - } - } -} - -func TestLabelMerge(t *testing.T) { - tests := []struct { - labels1 map[string]string - labels2 map[string]string - mergedLabels map[string]string - }{ - { - labels1: map[string]string{}, - labels2: map[string]string{}, - mergedLabels: map[string]string{}, - }, - { - labels1: map[string]string{"infra": "true"}, - labels2: map[string]string{}, - mergedLabels: map[string]string{"infra": "true"}, - }, - { - labels1: map[string]string{"infra": "true"}, - labels2: map[string]string{"env": "test", "color": "blue"}, - mergedLabels: map[string]string{"infra": "true", "env": "test", "color": "blue"}, - }, - } - for _, test := range tests { - mergedLabels := Merge(Set(test.labels1), Set(test.labels2)) - if !Equals(mergedLabels, test.mergedLabels) { - t.Errorf("expected: %v but got: %v", test.mergedLabels, mergedLabels) - } - } -} - -func TestLabelSelectorParse(t *testing.T) { - tests := []struct { - selector string - labels map[string]string - valid bool - }{ - { - selector: "", - labels: map[string]string{}, - valid: true, - }, - { - selector: "x=a", - labels: map[string]string{"x": "a"}, - valid: true, - }, - { - selector: "x=a,y=b,z=c", - labels: map[string]string{"x": "a", "y": "b", "z": "c"}, - valid: true, - }, - { - selector: " x = a , y = b , z = c ", - labels: map[string]string{"x": "a", "y": "b", "z": "c"}, - valid: true, - }, - { - selector: "color=green,env=test,service=front", - labels: map[string]string{"color": "green", "env": "test", "service": "front"}, - valid: true, - }, - { - selector: "color=green, env=test, service=front", - labels: map[string]string{"color": "green", "env": "test", "service": "front"}, - valid: true, - }, - { - selector: ",", - labels: map[string]string{}, - valid: false, - }, - { - selector: "x", - labels: map[string]string{}, - valid: false, - }, - { - selector: "x,y", - labels: map[string]string{}, - valid: false, - }, - { - selector: "x=$y", - labels: map[string]string{}, - valid: false, - }, - { - selector: "x!=y", - labels: map[string]string{}, - valid: false, - }, - { - selector: "x==y", - labels: map[string]string{}, - valid: false, - }, - { - selector: "x=a||y=b", - labels: map[string]string{}, - valid: false, - }, - { - selector: "x in (y)", - labels: map[string]string{}, - valid: false, - }, - { - selector: "x notin (y)", - labels: map[string]string{}, - valid: false, - }, - { - selector: "x y", - labels: map[string]string{}, - valid: false, - }, - } - for _, test := range tests { - labels, err := ConvertSelectorToLabelsMap(test.selector) - if test.valid && err != nil { - t.Errorf("selector: %s, expected no error but got: %s", test.selector, err) - } else if !test.valid && err == nil { - t.Errorf("selector: %s, expected an error", test.selector) - } - - if !Equals(Set(labels), test.labels) { - t.Errorf("expected: %s but got: %s", test.labels, labels) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/labels/selector_test.go b/vendor/k8s.io/apimachinery/pkg/labels/selector_test.go deleted file mode 100644 index 995317bd..00000000 --- a/vendor/k8s.io/apimachinery/pkg/labels/selector_test.go +++ /dev/null @@ -1,575 +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 labels - -import ( - "reflect" - "strings" - "testing" - - "k8s.io/apimachinery/pkg/selection" - "k8s.io/apimachinery/pkg/util/sets" -) - -func TestSelectorParse(t *testing.T) { - testGoodStrings := []string{ - "x=a,y=b,z=c", - "", - "x!=a,y=b", - "x=", - "x= ", - "x=,z= ", - "x= ,z= ", - "!x", - "x>1", - "x>1,z<5", - } - testBadStrings := []string{ - "x=a||y=b", - "x==a==b", - "!x=a", - "x1", Set{"x": "2"}) - expectMatch(t, "x<1", Set{"x": "0"}) - expectNoMatch(t, "x=z", Set{}) - expectNoMatch(t, "x=y", Set{"x": "z"}) - expectNoMatch(t, "x=y,z=w", Set{"x": "w", "z": "w"}) - expectNoMatch(t, "x!=y,z!=w", Set{"x": "z", "z": "w"}) - expectNoMatch(t, "x", Set{"y": "z"}) - expectNoMatch(t, "!x", Set{"x": "z"}) - expectNoMatch(t, "x>1", Set{"x": "0"}) - expectNoMatch(t, "x<1", Set{"x": "2"}) - - labelset := Set{ - "foo": "bar", - "baz": "blah", - } - expectMatch(t, "foo=bar", labelset) - expectMatch(t, "baz=blah", labelset) - expectMatch(t, "foo=bar,baz=blah", labelset) - expectNoMatch(t, "foo=blah", labelset) - expectNoMatch(t, "baz=bar", labelset) - expectNoMatch(t, "foo=bar,foobar=bar,baz=blah", labelset) -} - -func expectMatchDirect(t *testing.T, selector, ls Set) { - if !SelectorFromSet(selector).Matches(ls) { - t.Errorf("Wanted %s to match '%s', but it did not.\n", selector, ls) - } -} - -func expectNoMatchDirect(t *testing.T, selector, ls Set) { - if SelectorFromSet(selector).Matches(ls) { - t.Errorf("Wanted '%s' to not match '%s', but it did.", selector, ls) - } -} - -func TestSetMatches(t *testing.T) { - labelset := Set{ - "foo": "bar", - "baz": "blah", - } - expectMatchDirect(t, Set{}, labelset) - expectMatchDirect(t, Set{"foo": "bar"}, labelset) - expectMatchDirect(t, Set{"baz": "blah"}, labelset) - expectMatchDirect(t, Set{"foo": "bar", "baz": "blah"}, labelset) - - //TODO: bad values not handled for the moment in SelectorFromSet - //expectNoMatchDirect(t, Set{"foo": "=blah"}, labelset) - //expectNoMatchDirect(t, Set{"baz": "=bar"}, labelset) - //expectNoMatchDirect(t, Set{"foo": "=bar", "foobar": "bar", "baz": "blah"}, labelset) -} - -func TestNilMapIsValid(t *testing.T) { - selector := Set(nil).AsSelector() - if selector == nil { - t.Errorf("Selector for nil set should be Everything") - } - if !selector.Empty() { - t.Errorf("Selector for nil set should be Empty") - } -} - -func TestSetIsEmpty(t *testing.T) { - if !(Set{}).AsSelector().Empty() { - t.Errorf("Empty set should be empty") - } - if !(NewSelector()).Empty() { - t.Errorf("Nil Selector should be empty") - } -} - -func TestLexer(t *testing.T) { - testcases := []struct { - s string - t Token - }{ - {"", EndOfStringToken}, - {",", CommaToken}, - {"notin", NotInToken}, - {"in", InToken}, - {"=", EqualsToken}, - {"==", DoubleEqualsToken}, - {">", GreaterThanToken}, - {"<", LessThanToken}, - //Note that Lex returns the longest valid token found - {"!", DoesNotExistToken}, - {"!=", NotEqualsToken}, - {"(", OpenParToken}, - {")", ClosedParToken}, - //Non-"special" characters are considered part of an identifier - {"~", IdentifierToken}, - {"||", IdentifierToken}, - } - for _, v := range testcases { - l := &Lexer{s: v.s, pos: 0} - token, lit := l.Lex() - if token != v.t { - t.Errorf("Got %d it should be %d for '%s'", token, v.t, v.s) - } - if v.t != ErrorToken && lit != v.s { - t.Errorf("Got '%s' it should be '%s'", lit, v.s) - } - } -} - -func min(l, r int) (m int) { - m = r - if l < r { - m = l - } - return m -} - -func TestLexerSequence(t *testing.T) { - testcases := []struct { - s string - t []Token - }{ - {"key in ( value )", []Token{IdentifierToken, InToken, OpenParToken, IdentifierToken, ClosedParToken}}, - {"key notin ( value )", []Token{IdentifierToken, NotInToken, OpenParToken, IdentifierToken, ClosedParToken}}, - {"key in ( value1, value2 )", []Token{IdentifierToken, InToken, OpenParToken, IdentifierToken, CommaToken, IdentifierToken, ClosedParToken}}, - {"key", []Token{IdentifierToken}}, - {"!key", []Token{DoesNotExistToken, IdentifierToken}}, - {"()", []Token{OpenParToken, ClosedParToken}}, - {"x in (),y", []Token{IdentifierToken, InToken, OpenParToken, ClosedParToken, CommaToken, IdentifierToken}}, - {"== != (), = notin", []Token{DoubleEqualsToken, NotEqualsToken, OpenParToken, ClosedParToken, CommaToken, EqualsToken, NotInToken}}, - {"key>2", []Token{IdentifierToken, GreaterThanToken, IdentifierToken}}, - {"key<1", []Token{IdentifierToken, LessThanToken, IdentifierToken}}, - } - for _, v := range testcases { - var literals []string - var tokens []Token - l := &Lexer{s: v.s, pos: 0} - for { - token, lit := l.Lex() - if token == EndOfStringToken { - break - } - tokens = append(tokens, token) - literals = append(literals, lit) - } - if len(tokens) != len(v.t) { - t.Errorf("Bad number of tokens for '%s %d, %d", v.s, len(tokens), len(v.t)) - } - for i := 0; i < min(len(tokens), len(v.t)); i++ { - if tokens[i] != v.t[i] { - t.Errorf("Test '%s': Mismatching in token type found '%v' it should be '%v'", v.s, tokens[i], v.t[i]) - } - } - } -} -func TestParserLookahead(t *testing.T) { - testcases := []struct { - s string - t []Token - }{ - {"key in ( value )", []Token{IdentifierToken, InToken, OpenParToken, IdentifierToken, ClosedParToken, EndOfStringToken}}, - {"key notin ( value )", []Token{IdentifierToken, NotInToken, OpenParToken, IdentifierToken, ClosedParToken, EndOfStringToken}}, - {"key in ( value1, value2 )", []Token{IdentifierToken, InToken, OpenParToken, IdentifierToken, CommaToken, IdentifierToken, ClosedParToken, EndOfStringToken}}, - {"key", []Token{IdentifierToken, EndOfStringToken}}, - {"!key", []Token{DoesNotExistToken, IdentifierToken, EndOfStringToken}}, - {"()", []Token{OpenParToken, ClosedParToken, EndOfStringToken}}, - {"", []Token{EndOfStringToken}}, - {"x in (),y", []Token{IdentifierToken, InToken, OpenParToken, ClosedParToken, CommaToken, IdentifierToken, EndOfStringToken}}, - {"== != (), = notin", []Token{DoubleEqualsToken, NotEqualsToken, OpenParToken, ClosedParToken, CommaToken, EqualsToken, NotInToken, EndOfStringToken}}, - {"key>2", []Token{IdentifierToken, GreaterThanToken, IdentifierToken, EndOfStringToken}}, - {"key<1", []Token{IdentifierToken, LessThanToken, IdentifierToken, EndOfStringToken}}, - } - for _, v := range testcases { - p := &Parser{l: &Lexer{s: v.s, pos: 0}, position: 0} - p.scan() - if len(p.scannedItems) != len(v.t) { - t.Errorf("Expected %d items found %d", len(v.t), len(p.scannedItems)) - } - for { - token, lit := p.lookahead(KeyAndOperator) - - token2, lit2 := p.consume(KeyAndOperator) - if token == EndOfStringToken { - break - } - if token != token2 || lit != lit2 { - t.Errorf("Bad values") - } - } - } -} - -func TestRequirementConstructor(t *testing.T) { - requirementConstructorTests := []struct { - Key string - Op selection.Operator - Vals sets.String - Success bool - }{ - {"x", selection.In, nil, false}, - {"x", selection.NotIn, sets.NewString(), false}, - {"x", selection.In, sets.NewString("foo"), true}, - {"x", selection.NotIn, sets.NewString("foo"), true}, - {"x", selection.Exists, nil, true}, - {"x", selection.DoesNotExist, nil, true}, - {"1foo", selection.In, sets.NewString("bar"), true}, - {"1234", selection.In, sets.NewString("bar"), true}, - {"y", selection.GreaterThan, sets.NewString("1"), true}, - {"z", selection.LessThan, sets.NewString("6"), true}, - {"foo", selection.GreaterThan, sets.NewString("bar"), false}, - {"barz", selection.LessThan, sets.NewString("blah"), false}, - {strings.Repeat("a", 254), selection.Exists, nil, false}, //breaks DNS rule that len(key) <= 253 - } - for _, rc := range requirementConstructorTests { - if _, err := NewRequirement(rc.Key, rc.Op, rc.Vals.List()); err == nil && !rc.Success { - t.Errorf("expected error with key:%#v op:%v vals:%v, got no error", rc.Key, rc.Op, rc.Vals) - } else if err != nil && rc.Success { - t.Errorf("expected no error with key:%#v op:%v vals:%v, got:%v", rc.Key, rc.Op, rc.Vals, err) - } - } -} - -func TestToString(t *testing.T) { - var req Requirement - toStringTests := []struct { - In *internalSelector - Out string - Valid bool - }{ - - {&internalSelector{ - getRequirement("x", selection.In, sets.NewString("abc", "def"), t), - getRequirement("y", selection.NotIn, sets.NewString("jkl"), t), - getRequirement("z", selection.Exists, nil, t)}, - "x in (abc,def),y notin (jkl),z", true}, - {&internalSelector{ - getRequirement("x", selection.NotIn, sets.NewString("abc", "def"), t), - getRequirement("y", selection.NotEquals, sets.NewString("jkl"), t), - getRequirement("z", selection.DoesNotExist, nil, t)}, - "x notin (abc,def),y!=jkl,!z", true}, - {&internalSelector{ - getRequirement("x", selection.In, sets.NewString("abc", "def"), t), - req}, // adding empty req for the trailing ',' - "x in (abc,def),", false}, - {&internalSelector{ - getRequirement("x", selection.NotIn, sets.NewString("abc"), t), - getRequirement("y", selection.In, sets.NewString("jkl", "mno"), t), - getRequirement("z", selection.NotIn, sets.NewString(""), t)}, - "x notin (abc),y in (jkl,mno),z notin ()", true}, - {&internalSelector{ - getRequirement("x", selection.Equals, sets.NewString("abc"), t), - getRequirement("y", selection.DoubleEquals, sets.NewString("jkl"), t), - getRequirement("z", selection.NotEquals, sets.NewString("a"), t), - getRequirement("z", selection.Exists, nil, t)}, - "x=abc,y==jkl,z!=a,z", true}, - {&internalSelector{ - getRequirement("x", selection.GreaterThan, sets.NewString("2"), t), - getRequirement("y", selection.LessThan, sets.NewString("8"), t), - getRequirement("z", selection.Exists, nil, t)}, - "x>2,y<8,z", true}, - } - for _, ts := range toStringTests { - if out := ts.In.String(); out == "" && ts.Valid { - t.Errorf("%#v.String() => '%v' expected no error", ts.In, out) - } else if out != ts.Out { - t.Errorf("%#v.String() => '%v' want '%v'", ts.In, out, ts.Out) - } - } -} - -func TestRequirementSelectorMatching(t *testing.T) { - var req Requirement - labelSelectorMatchingTests := []struct { - Set Set - Sel Selector - Match bool - }{ - {Set{"x": "foo", "y": "baz"}, &internalSelector{ - req, - }, false}, - {Set{"x": "foo", "y": "baz"}, &internalSelector{ - getRequirement("x", selection.In, sets.NewString("foo"), t), - getRequirement("y", selection.NotIn, sets.NewString("alpha"), t), - }, true}, - {Set{"x": "foo", "y": "baz"}, &internalSelector{ - getRequirement("x", selection.In, sets.NewString("foo"), t), - getRequirement("y", selection.In, sets.NewString("alpha"), t), - }, false}, - {Set{"y": ""}, &internalSelector{ - getRequirement("x", selection.NotIn, sets.NewString(""), t), - getRequirement("y", selection.Exists, nil, t), - }, true}, - {Set{"y": ""}, &internalSelector{ - getRequirement("x", selection.DoesNotExist, nil, t), - getRequirement("y", selection.Exists, nil, t), - }, true}, - {Set{"y": ""}, &internalSelector{ - getRequirement("x", selection.NotIn, sets.NewString(""), t), - getRequirement("y", selection.DoesNotExist, nil, t), - }, false}, - {Set{"y": "baz"}, &internalSelector{ - getRequirement("x", selection.In, sets.NewString(""), t), - }, false}, - {Set{"z": "2"}, &internalSelector{ - getRequirement("z", selection.GreaterThan, sets.NewString("1"), t), - }, true}, - {Set{"z": "v2"}, &internalSelector{ - getRequirement("z", selection.GreaterThan, sets.NewString("1"), t), - }, false}, - } - for _, lsm := range labelSelectorMatchingTests { - if match := lsm.Sel.Matches(lsm.Set); match != lsm.Match { - t.Errorf("%+v.Matches(%#v) => %v, want %v", lsm.Sel, lsm.Set, match, lsm.Match) - } - } -} - -func TestSetSelectorParser(t *testing.T) { - setSelectorParserTests := []struct { - In string - Out Selector - Match bool - Valid bool - }{ - {"", NewSelector(), true, true}, - {"\rx", internalSelector{ - getRequirement("x", selection.Exists, nil, t), - }, true, true}, - {"this-is-a-dns.domain.com/key-with-dash", internalSelector{ - getRequirement("this-is-a-dns.domain.com/key-with-dash", selection.Exists, nil, t), - }, true, true}, - {"this-is-another-dns.domain.com/key-with-dash in (so,what)", internalSelector{ - getRequirement("this-is-another-dns.domain.com/key-with-dash", selection.In, sets.NewString("so", "what"), t), - }, true, true}, - {"0.1.2.domain/99 notin (10.10.100.1, tick.tack.clock)", internalSelector{ - getRequirement("0.1.2.domain/99", selection.NotIn, sets.NewString("10.10.100.1", "tick.tack.clock"), t), - }, true, true}, - {"foo in (abc)", internalSelector{ - getRequirement("foo", selection.In, sets.NewString("abc"), t), - }, true, true}, - {"x notin\n (abc)", internalSelector{ - getRequirement("x", selection.NotIn, sets.NewString("abc"), t), - }, true, true}, - {"x notin \t (abc,def)", internalSelector{ - getRequirement("x", selection.NotIn, sets.NewString("abc", "def"), t), - }, true, true}, - {"x in (abc,def)", internalSelector{ - getRequirement("x", selection.In, sets.NewString("abc", "def"), t), - }, true, true}, - {"x in (abc,)", internalSelector{ - getRequirement("x", selection.In, sets.NewString("abc", ""), t), - }, true, true}, - {"x in ()", internalSelector{ - getRequirement("x", selection.In, sets.NewString(""), t), - }, true, true}, - {"x notin (abc,,def),bar,z in (),w", internalSelector{ - getRequirement("bar", selection.Exists, nil, t), - getRequirement("w", selection.Exists, nil, t), - getRequirement("x", selection.NotIn, sets.NewString("abc", "", "def"), t), - getRequirement("z", selection.In, sets.NewString(""), t), - }, true, true}, - {"x,y in (a)", internalSelector{ - getRequirement("y", selection.In, sets.NewString("a"), t), - getRequirement("x", selection.Exists, nil, t), - }, false, true}, - {"x=a", internalSelector{ - getRequirement("x", selection.Equals, sets.NewString("a"), t), - }, true, true}, - {"x>1", internalSelector{ - getRequirement("x", selection.GreaterThan, sets.NewString("1"), t), - }, true, true}, - {"x<7", internalSelector{ - getRequirement("x", selection.LessThan, sets.NewString("7"), t), - }, true, true}, - {"x=a,y!=b", internalSelector{ - getRequirement("x", selection.Equals, sets.NewString("a"), t), - getRequirement("y", selection.NotEquals, sets.NewString("b"), t), - }, true, true}, - {"x=a,y!=b,z in (h,i,j)", internalSelector{ - getRequirement("x", selection.Equals, sets.NewString("a"), t), - getRequirement("y", selection.NotEquals, sets.NewString("b"), t), - getRequirement("z", selection.In, sets.NewString("h", "i", "j"), t), - }, true, true}, - {"x=a||y=b", internalSelector{}, false, false}, - {"x,,y", nil, true, false}, - {",x,y", nil, true, false}, - {"x nott in (y)", nil, true, false}, - {"x notin ( )", internalSelector{ - getRequirement("x", selection.NotIn, sets.NewString(""), t), - }, true, true}, - {"x notin (, a)", internalSelector{ - getRequirement("x", selection.NotIn, sets.NewString("", "a"), t), - }, true, true}, - {"a in (xyz),", nil, true, false}, - {"a in (xyz)b notin ()", nil, true, false}, - {"a ", internalSelector{ - getRequirement("a", selection.Exists, nil, t), - }, true, true}, - {"a in (x,y,notin, z,in)", internalSelector{ - getRequirement("a", selection.In, sets.NewString("in", "notin", "x", "y", "z"), t), - }, true, true}, // operator 'in' inside list of identifiers - {"a in (xyz abc)", nil, false, false}, // no comma - {"a notin(", nil, true, false}, // bad formed - {"a (", nil, false, false}, // cpar - {"(", nil, false, false}, // opar - } - - for _, ssp := range setSelectorParserTests { - if sel, err := Parse(ssp.In); err != nil && ssp.Valid { - t.Errorf("Parse(%s) => %v expected no error", ssp.In, err) - } else if err == nil && !ssp.Valid { - t.Errorf("Parse(%s) => %+v expected error", ssp.In, sel) - } else if ssp.Match && !reflect.DeepEqual(sel, ssp.Out) { - t.Errorf("Parse(%s) => parse output '%#v' doesn't match '%#v' expected match", ssp.In, sel, ssp.Out) - } - } -} - -func getRequirement(key string, op selection.Operator, vals sets.String, t *testing.T) Requirement { - req, err := NewRequirement(key, op, vals.List()) - if err != nil { - t.Errorf("NewRequirement(%v, %v, %v) resulted in error:%v", key, op, vals, err) - return Requirement{} - } - return *req -} - -func TestAdd(t *testing.T) { - testCases := []struct { - name string - sel Selector - key string - operator selection.Operator - values []string - refSelector Selector - }{ - { - "keyInOperator", - internalSelector{}, - "key", - selection.In, - []string{"value"}, - internalSelector{Requirement{"key", selection.In, []string{"value"}}}, - }, - { - "keyEqualsOperator", - internalSelector{Requirement{"key", selection.In, []string{"value"}}}, - "key2", - selection.Equals, - []string{"value2"}, - internalSelector{ - Requirement{"key", selection.In, []string{"value"}}, - Requirement{"key2", selection.Equals, []string{"value2"}}, - }, - }, - } - for _, ts := range testCases { - req, err := NewRequirement(ts.key, ts.operator, ts.values) - if err != nil { - t.Errorf("%s - Unable to create labels.Requirement", ts.name) - } - ts.sel = ts.sel.Add(*req) - if !reflect.DeepEqual(ts.sel, ts.refSelector) { - t.Errorf("%s - Expected %v found %v", ts.name, ts.refSelector, ts.sel) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/conversion_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/conversion_test.go deleted file mode 100644 index 33670415..00000000 --- a/vendor/k8s.io/apimachinery/pkg/runtime/conversion_test.go +++ /dev/null @@ -1,115 +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 runtime_test - -import ( - "reflect" - "testing" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - runtimetesting "k8s.io/apimachinery/pkg/runtime/testing" -) - -func TestStringMapConversion(t *testing.T) { - internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Group: "test.group", Version: "external"} - - scheme := runtime.NewScheme() - scheme.Log(t) - scheme.AddKnownTypeWithName(internalGV.WithKind("Complex"), &runtimetesting.InternalComplex{}) - scheme.AddKnownTypeWithName(externalGV.WithKind("Complex"), &runtimetesting.ExternalComplex{}) - - testCases := map[string]struct { - input map[string][]string - errFn func(error) bool - expected runtime.Object - }{ - "ignores omitempty": { - input: map[string][]string{ - "String": {"not_used"}, - "string": {"value"}, - "int": {"1"}, - "Integer64": {"2"}, - }, - expected: &runtimetesting.ExternalComplex{String: "value", Integer: 1}, - }, - "returns error on bad int": { - input: map[string][]string{ - "int": {"a"}, - }, - errFn: func(err error) bool { return err != nil }, - expected: &runtimetesting.ExternalComplex{}, - }, - "parses int64": { - input: map[string][]string{ - "Int64": {"-1"}, - }, - expected: &runtimetesting.ExternalComplex{Int64: -1}, - }, - "returns error on bad int64": { - input: map[string][]string{ - "Int64": {"a"}, - }, - errFn: func(err error) bool { return err != nil }, - expected: &runtimetesting.ExternalComplex{}, - }, - "parses boolean true": { - input: map[string][]string{ - "bool": {"true"}, - }, - expected: &runtimetesting.ExternalComplex{Bool: true}, - }, - "parses boolean any value": { - input: map[string][]string{ - "bool": {"foo"}, - }, - expected: &runtimetesting.ExternalComplex{Bool: true}, - }, - "parses boolean false": { - input: map[string][]string{ - "bool": {"false"}, - }, - expected: &runtimetesting.ExternalComplex{Bool: false}, - }, - "parses boolean empty value": { - input: map[string][]string{ - "bool": {""}, - }, - expected: &runtimetesting.ExternalComplex{Bool: true}, - }, - "parses boolean no value": { - input: map[string][]string{ - "bool": {}, - }, - expected: &runtimetesting.ExternalComplex{Bool: false}, - }, - } - - for k, tc := range testCases { - out := &runtimetesting.ExternalComplex{} - if err := scheme.Convert(&tc.input, out, nil); (tc.errFn == nil && err != nil) || (tc.errFn != nil && !tc.errFn(err)) { - t.Errorf("%s: unexpected error: %v", k, err) - continue - } else if err != nil { - continue - } - if !reflect.DeepEqual(out, tc.expected) { - t.Errorf("%s: unexpected output: %#v", k, out) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/converter_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/converter_test.go deleted file mode 100644 index 7820b8ce..00000000 --- a/vendor/k8s.io/apimachinery/pkg/runtime/converter_test.go +++ /dev/null @@ -1,597 +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. -*/ - -// These tests are in a separate package to break cyclic dependency in tests. -// Unstructured type depends on unstructured converter package but we want to test how the converter handles -// the Unstructured type so we need to import both. - -package runtime_test - -import ( - encodingjson "encoding/json" - "fmt" - "reflect" - "strconv" - "testing" - "time" - - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/conversion" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/diff" - "k8s.io/apimachinery/pkg/util/json" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -var simpleEquality = conversion.EqualitiesOrDie( - func(a, b time.Time) bool { - return a.UTC() == b.UTC() - }, -) - -// Definte a number of test types. -type A struct { - A int `json:"aa,omitempty"` - B string `json:"ab,omitempty"` - C bool `json:"ac,omitempty"` -} - -type B struct { - A A `json:"ba"` - B string `json:"bb"` - C map[string]string `json:"bc"` - D []string `json:"bd"` -} - -type C struct { - A []A `json:"ca"` - B `json:",inline"` - C string `json:"cc"` - D *int64 `json:"cd"` - E map[string]int `json:"ce"` - F []bool `json:"cf"` - G []int `json:"cg"` - H float32 `json:"ch"` - I []interface{} `json:"ci"` -} - -type D struct { - A []interface{} `json:"da"` -} - -type E struct { - A interface{} `json:"ea"` -} - -type F struct { - A string `json:"fa"` - B map[string]string `json:"fb"` - C []A `json:"fc"` - D int `json:"fd"` - E float32 `json:"fe"` - F []string `json:"ff"` - G []int `json:"fg"` - H []bool `json:"fh"` - I []float32 `json:"fi"` -} - -type G struct { - CustomValue1 CustomValue `json:"customValue1"` - CustomValue2 *CustomValue `json:"customValue2"` - CustomPointer1 CustomPointer `json:"customPointer1"` - CustomPointer2 *CustomPointer `json:"customPointer2"` -} - -type CustomValue struct { - data []byte -} - -// MarshalJSON has a value receiver on this type. -func (c CustomValue) MarshalJSON() ([]byte, error) { - return c.data, nil -} - -type CustomPointer struct { - data []byte -} - -// MarshalJSON has a pointer receiver on this type. -func (c *CustomPointer) MarshalJSON() ([]byte, error) { - return c.data, nil -} - -func doRoundTrip(t *testing.T, item interface{}) { - data, err := json.Marshal(item) - if err != nil { - t.Errorf("Error when marshaling object: %v", err) - return - } - - unstr := make(map[string]interface{}) - err = json.Unmarshal(data, &unstr) - if err != nil { - t.Errorf("Error when unmarshaling to unstructured: %v", err) - return - } - - data, err = json.Marshal(unstr) - if err != nil { - t.Errorf("Error when marshaling unstructured: %v", err) - return - } - unmarshalledObj := reflect.New(reflect.TypeOf(item).Elem()).Interface() - err = json.Unmarshal(data, unmarshalledObj) - if err != nil { - t.Errorf("Error when unmarshaling to object: %v", err) - return - } - if !reflect.DeepEqual(item, unmarshalledObj) { - t.Errorf("Object changed during JSON operations, diff: %v", diff.ObjectReflectDiff(item, unmarshalledObj)) - return - } - - // TODO: should be using mismatch detection but fails due to another error - newUnstr, err := runtime.DefaultUnstructuredConverter.ToUnstructured(item) - if err != nil { - t.Errorf("ToUnstructured failed: %v", err) - return - } - - newObj := reflect.New(reflect.TypeOf(item).Elem()).Interface() - err = runtime.NewTestUnstructuredConverter(simpleEquality).FromUnstructured(newUnstr, newObj) - if err != nil { - t.Errorf("FromUnstructured failed: %v", err) - return - } - - if !reflect.DeepEqual(item, newObj) { - t.Errorf("Object changed, diff: %v", diff.ObjectReflectDiff(item, newObj)) - } -} - -func TestRoundTrip(t *testing.T) { - intVal := int64(42) - testCases := []struct { - obj interface{} - }{ - { - obj: &unstructured.UnstructuredList{ - Object: map[string]interface{}{ - "kind": "List", - }, - // Not testing a list with nil Items because items is a non-optional field and hence - // is always marshaled into an empty array which is not equal to nil when unmarshalled and will fail. - // That is expected. - Items: []unstructured.Unstructured{}, - }, - }, - { - obj: &unstructured.UnstructuredList{ - Object: map[string]interface{}{ - "kind": "List", - }, - Items: []unstructured.Unstructured{ - { - Object: map[string]interface{}{ - "kind": "Pod", - }, - }, - }, - }, - }, - { - obj: &unstructured.Unstructured{ - Object: map[string]interface{}{ - "kind": "Pod", - }, - }, - }, - { - obj: &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "v1", - "kind": "Foo", - "metadata": map[string]interface{}{ - "name": "foo1", - }, - }, - }, - }, - { - // This (among others) tests nil map, slice and pointer. - obj: &C{ - C: "ccc", - }, - }, - { - // This (among others) tests empty map and slice. - obj: &C{ - A: []A{}, - C: "ccc", - E: map[string]int{}, - I: []interface{}{}, - }, - }, - { - obj: &C{ - A: []A{ - { - A: 1, - B: "11", - C: true, - }, - { - A: 2, - B: "22", - C: false, - }, - }, - B: B{ - A: A{ - A: 3, - B: "33", - }, - B: "bbb", - C: map[string]string{ - "k1": "v1", - "k2": "v2", - }, - D: []string{"s1", "s2"}, - }, - C: "ccc", - D: &intVal, - E: map[string]int{ - "k1": 1, - "k2": 2, - }, - F: []bool{true, false, false}, - G: []int{1, 2, 5}, - H: 3.3, - I: []interface{}{nil, nil, nil}, - }, - }, - { - // Test slice of interface{} with empty slices. - obj: &D{ - A: []interface{}{[]interface{}{}, []interface{}{}}, - }, - }, - { - // Test slice of interface{} with different values. - obj: &D{ - A: []interface{}{3.0, "3.0", nil}, - }, - }, - } - - for i := range testCases { - t.Run(fmt.Sprintf("%d", i), func(t *testing.T) { - doRoundTrip(t, testCases[i].obj) - }) - } -} - -// Verifies that: -// 1) serialized json -> object -// 2) serialized json -> map[string]interface{} -> object -// produces the same object. -func doUnrecognized(t *testing.T, jsonData string, item interface{}, expectedErr error) { - unmarshalledObj := reflect.New(reflect.TypeOf(item).Elem()).Interface() - err := json.Unmarshal([]byte(jsonData), unmarshalledObj) - if (err != nil) != (expectedErr != nil) { - t.Errorf("Unexpected error when unmarshaling to object: %v, expected: %v", err, expectedErr) - return - } - - unstr := make(map[string]interface{}) - err = json.Unmarshal([]byte(jsonData), &unstr) - if err != nil { - t.Errorf("Error when unmarshaling to unstructured: %v", err) - return - } - newObj := reflect.New(reflect.TypeOf(item).Elem()).Interface() - err = runtime.NewTestUnstructuredConverter(simpleEquality).FromUnstructured(unstr, newObj) - if (err != nil) != (expectedErr != nil) { - t.Errorf("Unexpected error in FromUnstructured: %v, expected: %v", err, expectedErr) - } - - if expectedErr == nil && !reflect.DeepEqual(unmarshalledObj, newObj) { - t.Errorf("Object changed, diff: %v", diff.ObjectReflectDiff(unmarshalledObj, newObj)) - } -} - -func TestUnrecognized(t *testing.T) { - testCases := []struct { - data string - obj interface{} - err error - }{ - { - data: "{\"da\":[3.0,\"3.0\",null]}", - obj: &D{}, - }, - { - data: "{\"ea\":[3.0,\"3.0\",null]}", - obj: &E{}, - }, - { - data: "{\"ea\":[null,null,null]}", - obj: &E{}, - }, - { - data: "{\"ea\":[[],[null]]}", - obj: &E{}, - }, - { - data: "{\"ea\":{\"a\":[],\"b\":null}}", - obj: &E{}, - }, - { - data: "{\"fa\":\"fa\",\"fb\":{\"a\":\"a\"}}", - obj: &F{}, - }, - { - data: "{\"fa\":\"fa\",\"fb\":{\"a\":null}}", - obj: &F{}, - }, - { - data: "{\"fc\":[null]}", - obj: &F{}, - }, - { - data: "{\"fc\":[{\"aa\":123,\"ab\":\"bbb\"}]}", - obj: &F{}, - }, - { - // Only unknown fields - data: "{\"fx\":[{\"aa\":123,\"ab\":\"bbb\"}],\"fz\":123}", - obj: &F{}, - }, - { - data: "{\"fc\":[{\"aa\":\"aaa\",\"ab\":\"bbb\"}]}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal string into Go value of type int"), - }, - { - data: "{\"fd\":123,\"fe\":3.5}", - obj: &F{}, - }, - { - data: "{\"ff\":[\"abc\"],\"fg\":[123],\"fh\":[true,false]}", - obj: &F{}, - }, - { - // Invalid string data - data: "{\"fa\":123}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal number into Go value of type string"), - }, - { - // Invalid string data - data: "{\"fa\":13.5}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal number into Go value of type string"), - }, - { - // Invalid string data - data: "{\"fa\":true}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal bool into Go value of type string"), - }, - { - // Invalid []string data - data: "{\"ff\":123}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal number into Go value of type []string"), - }, - { - // Invalid []string data - data: "{\"ff\":3.5}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal number into Go value of type []string"), - }, - { - // Invalid []string data - data: "{\"ff\":[123,345]}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal number into Go value of type string"), - }, - { - // Invalid []int data - data: "{\"fg\":123}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal number into Go value of type []int"), - }, - { - // Invalid []int data - data: "{\"fg\":\"abc\"}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal string into Go value of type []int"), - }, - { - // Invalid []int data - data: "{\"fg\":[\"abc\"]}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal string into Go value of type int"), - }, - { - // Invalid []int data - data: "{\"fg\":[3.5]}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal number 3.5 into Go value of type int"), - }, - { - // Invalid []int data - data: "{\"fg\":[true,false]}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal number 3.5 into Go value of type int"), - }, - { - // Invalid []bool data - data: "{\"fh\":123}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal number into Go value of type []bool"), - }, - { - // Invalid []bool data - data: "{\"fh\":\"abc\"}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal string into Go value of type []bool"), - }, - { - // Invalid []bool data - data: "{\"fh\":[\"abc\"]}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal string into Go value of type bool"), - }, - { - // Invalid []bool data - data: "{\"fh\":[3.5]}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal number into Go value of type bool"), - }, - { - // Invalid []bool data - data: "{\"fh\":[123]}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal number into Go value of type bool"), - }, - { - // Invalid []float data - data: "{\"fi\":123}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal number into Go value of type []float32"), - }, - { - // Invalid []float data - data: "{\"fi\":\"abc\"}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal string into Go value of type []float32"), - }, - { - // Invalid []float data - data: "{\"fi\":[\"abc\"]}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal string into Go value of type float32"), - }, - { - // Invalid []float data - data: "{\"fi\":[true]}", - obj: &F{}, - err: fmt.Errorf("json: cannot unmarshal bool into Go value of type float32"), - }, - } - - for _, tc := range testCases { - t.Run(tc.data, func(t *testing.T) { - doUnrecognized(t, tc.data, tc.obj, tc.err) - }) - } -} - -func TestDeepCopyJSON(t *testing.T) { - src := map[string]interface{}{ - "a": nil, - "b": int64(123), - "c": map[string]interface{}{ - "a": "b", - }, - "d": []interface{}{ - int64(1), int64(2), - }, - "e": "estr", - "f": true, - "g": encodingjson.Number("123"), - } - deepCopy := runtime.DeepCopyJSON(src) - assert.Equal(t, src, deepCopy) -} - -func TestFloatIntConversion(t *testing.T) { - unstr := map[string]interface{}{"fd": float64(3)} - - var obj F - if err := runtime.NewTestUnstructuredConverter(simpleEquality).FromUnstructured(unstr, &obj); err != nil { - t.Errorf("Unexpected error in FromUnstructured: %v", err) - } - - data, err := json.Marshal(unstr) - if err != nil { - t.Fatalf("Error when marshaling unstructured: %v", err) - } - var unmarshalled F - if err := json.Unmarshal(data, &unmarshalled); err != nil { - t.Fatalf("Error when unmarshaling to object: %v", err) - } - - if !reflect.DeepEqual(obj, unmarshalled) { - t.Errorf("Incorrect conversion, diff: %v", diff.ObjectReflectDiff(obj, unmarshalled)) - } -} - -func TestCustomToUnstructured(t *testing.T) { - testcases := []struct { - Data string - Expected interface{} - }{ - {Data: `null`, Expected: nil}, - {Data: `true`, Expected: true}, - {Data: `false`, Expected: false}, - {Data: `[]`, Expected: []interface{}{}}, - {Data: `[1]`, Expected: []interface{}{int64(1)}}, - {Data: `{}`, Expected: map[string]interface{}{}}, - {Data: `{"a":1}`, Expected: map[string]interface{}{"a": int64(1)}}, - {Data: `0`, Expected: int64(0)}, - {Data: `0.0`, Expected: float64(0)}, - } - - for _, tc := range testcases { - tc := tc - t.Run(tc.Data, func(t *testing.T) { - t.Parallel() - result, err := runtime.NewTestUnstructuredConverter(simpleEquality).ToUnstructured(&G{ - CustomValue1: CustomValue{data: []byte(tc.Data)}, - CustomValue2: &CustomValue{data: []byte(tc.Data)}, - CustomPointer1: CustomPointer{data: []byte(tc.Data)}, - CustomPointer2: &CustomPointer{data: []byte(tc.Data)}, - }) - require.NoError(t, err) - for field, fieldResult := range result { - assert.Equal(t, tc.Expected, fieldResult, field) - } - }) - } -} - -func TestCustomToUnstructuredTopLevel(t *testing.T) { - // Only objects are supported at the top level - topLevelCases := []interface{}{ - &CustomValue{data: []byte(`{"a":1}`)}, - &CustomPointer{data: []byte(`{"a":1}`)}, - } - expected := map[string]interface{}{"a": int64(1)} - for i, obj := range topLevelCases { - obj := obj - t.Run(strconv.Itoa(i), func(t *testing.T) { - t.Parallel() - result, err := runtime.NewTestUnstructuredConverter(simpleEquality).ToUnstructured(obj) - require.NoError(t, err) - assert.Equal(t, expected, result) - }) - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/embedded_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/embedded_test.go deleted file mode 100644 index 606e0e96..00000000 --- a/vendor/k8s.io/apimachinery/pkg/runtime/embedded_test.go +++ /dev/null @@ -1,256 +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 runtime_test - -import ( - "encoding/json" - "reflect" - "testing" - - "k8s.io/apimachinery/pkg/api/meta" - "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" -) - -func TestDecodeEmptyRawExtensionAsObject(t *testing.T) { - internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Group: "test.group", Version: "v1test"} - externalGVK := externalGV.WithKind("ObjectTest") - - s := runtime.NewScheme() - s.AddKnownTypes(internalGV, &runtimetesting.ObjectTest{}) - s.AddKnownTypeWithName(externalGVK, &runtimetesting.ObjectTestExternal{}) - - codec := serializer.NewCodecFactory(s).LegacyCodec(externalGV) - - obj, gvk, err := codec.Decode([]byte(`{"kind":"`+externalGVK.Kind+`","apiVersion":"`+externalGV.String()+`","items":[{}]}`), nil, nil) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - test := obj.(*runtimetesting.ObjectTest) - if unk, ok := test.Items[0].(*runtime.Unknown); !ok || unk.Kind != "" || unk.APIVersion != "" || string(unk.Raw) != "{}" || unk.ContentType != runtime.ContentTypeJSON { - t.Fatalf("unexpected object: %#v", test.Items[0]) - } - if *gvk != externalGVK { - t.Fatalf("unexpected kind: %#v", gvk) - } - - obj, gvk, err = codec.Decode([]byte(`{"kind":"`+externalGVK.Kind+`","apiVersion":"`+externalGV.String()+`","items":[{"kind":"Other","apiVersion":"v1"}]}`), nil, nil) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - test = obj.(*runtimetesting.ObjectTest) - if unk, ok := test.Items[0].(*runtime.Unknown); !ok || unk.Kind != "" || unk.APIVersion != "" || string(unk.Raw) != `{"kind":"Other","apiVersion":"v1"}` || unk.ContentType != runtime.ContentTypeJSON { - t.Fatalf("unexpected object: %#v", test.Items[0]) - } - if *gvk != externalGVK { - t.Fatalf("unexpected kind: %#v", gvk) - } -} - -func TestArrayOfRuntimeObject(t *testing.T) { - internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Group: "test.group", Version: "v1test"} - - s := runtime.NewScheme() - s.AddKnownTypes(internalGV, &runtimetesting.EmbeddedTest{}) - s.AddKnownTypeWithName(externalGV.WithKind("EmbeddedTest"), &runtimetesting.EmbeddedTestExternal{}) - s.AddKnownTypes(internalGV, &runtimetesting.ObjectTest{}) - s.AddKnownTypeWithName(externalGV.WithKind("ObjectTest"), &runtimetesting.ObjectTestExternal{}) - - codec := serializer.NewCodecFactory(s).LegacyCodec(externalGV) - - innerItems := []runtime.Object{ - &runtimetesting.EmbeddedTest{ID: "baz"}, - } - items := []runtime.Object{ - &runtimetesting.EmbeddedTest{ID: "foo"}, - &runtimetesting.EmbeddedTest{ID: "bar"}, - // TODO: until YAML is removed, this JSON must be in ascending key order to ensure consistent roundtrip serialization - &runtime.Unknown{ - Raw: []byte(`{"apiVersion":"unknown.group/unknown","foo":"bar","kind":"OtherTest"}`), - ContentType: runtime.ContentTypeJSON, - }, - &runtimetesting.ObjectTest{ - Items: runtime.NewEncodableList(codec, innerItems), - }, - } - internal := &runtimetesting.ObjectTest{ - Items: runtime.NewEncodableList(codec, items), - } - wire, err := runtime.Encode(codec, internal) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - t.Logf("Wire format is:\n%s\n", string(wire)) - - obj := &runtimetesting.ObjectTestExternal{} - if err := json.Unmarshal(wire, obj); err != nil { - t.Fatalf("unexpected error: %v", err) - } - t.Logf("exact wire is: %s", string(obj.Items[0].Raw)) - - items[3] = &runtimetesting.ObjectTest{Items: innerItems} - internal.Items = items - - decoded, err := runtime.Decode(codec, wire) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - list, err := meta.ExtractList(decoded) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if errs := runtime.DecodeList(list, codec); len(errs) > 0 { - t.Fatalf("unexpected error: %v", errs) - } - - list2, err := meta.ExtractList(list[3]) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if errs := runtime.DecodeList(list2, codec); len(errs) > 0 { - t.Fatalf("unexpected error: %v", errs) - } - if err := meta.SetList(list[3], list2); err != nil { - t.Fatalf("unexpected error: %v", err) - } - - // we want DecodeList to set type meta if possible, even on runtime.Unknown objects - internal.Items[2].(*runtime.Unknown).TypeMeta = runtime.TypeMeta{Kind: "OtherTest", APIVersion: "unknown.group/unknown"} - if e, a := internal.Items, list; !reflect.DeepEqual(e, a) { - t.Errorf("mismatched decoded: %s", diff.ObjectGoPrintSideBySide(e, a)) - } -} - -func TestNestedObject(t *testing.T) { - internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Group: "test.group", Version: "v1test"} - embeddedTestExternalGVK := externalGV.WithKind("EmbeddedTest") - - s := runtime.NewScheme() - s.AddKnownTypes(internalGV, &runtimetesting.EmbeddedTest{}) - s.AddKnownTypeWithName(embeddedTestExternalGVK, &runtimetesting.EmbeddedTestExternal{}) - - codec := serializer.NewCodecFactory(s).LegacyCodec(externalGV) - - inner := &runtimetesting.EmbeddedTest{ - ID: "inner", - } - outer := &runtimetesting.EmbeddedTest{ - ID: "outer", - Object: runtime.NewEncodable(codec, inner), - } - - wire, err := runtime.Encode(codec, outer) - if err != nil { - t.Fatalf("Unexpected encode error '%v'", err) - } - - t.Logf("Wire format is:\n%v\n", string(wire)) - - decoded, err := runtime.Decode(codec, wire) - if err != nil { - t.Fatalf("Unexpected decode error %v", err) - } - - // for later tests - outer.Object = inner - - if e, a := outer, decoded; reflect.DeepEqual(e, a) { - t.Errorf("Expected unequal %#v %#v", e, a) - } - - obj, err := runtime.Decode(codec, decoded.(*runtimetesting.EmbeddedTest).Object.(*runtime.Unknown).Raw) - if err != nil { - t.Fatal(err) - } - decoded.(*runtimetesting.EmbeddedTest).Object = obj - if e, a := outer, decoded; !reflect.DeepEqual(e, a) { - t.Errorf("Expected equal %#v %#v", e, a) - } - - // test JSON decoding of the external object, which should preserve - // raw bytes - var externalViaJSON runtimetesting.EmbeddedTestExternal - err = json.Unmarshal(wire, &externalViaJSON) - if err != nil { - t.Fatalf("Unexpected decode error %v", err) - } - if externalViaJSON.Kind == "" || externalViaJSON.APIVersion == "" || externalViaJSON.ID != "outer" { - t.Errorf("Expected objects to have type info set, got %#v", externalViaJSON) - } - if len(externalViaJSON.EmptyObject.Raw) > 0 { - t.Errorf("Expected deserialization of empty nested objects into empty bytes, got %#v", externalViaJSON) - } - - // test JSON decoding, too, since Decode uses yaml unmarshalling. - // Generic Unmarshalling of JSON cannot load the nested objects because there is - // no default schema set. Consumers wishing to get direct JSON decoding must use - // the external representation - var decodedViaJSON runtimetesting.EmbeddedTest - err = json.Unmarshal(wire, &decodedViaJSON) - if err == nil { - t.Fatal("Expeceted decode error") - } - if _, ok := err.(*json.UnmarshalTypeError); !ok { - t.Fatalf("Unexpected decode error: %v", err) - } - if a := decodedViaJSON; a.Object != nil || a.EmptyObject != nil { - t.Errorf("Expected embedded objects to be nil: %#v", a) - } -} - -// TestDeepCopyOfRuntimeObject checks to make sure that runtime.Objects's can be passed through DeepCopy with fidelity -func TestDeepCopyOfRuntimeObject(t *testing.T) { - internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Group: "test.group", Version: "v1test"} - embeddedTestExternalGVK := externalGV.WithKind("EmbeddedTest") - - s := runtime.NewScheme() - s.AddKnownTypes(internalGV, &runtimetesting.EmbeddedTest{}) - s.AddKnownTypeWithName(embeddedTestExternalGVK, &runtimetesting.EmbeddedTestExternal{}) - - original := &runtimetesting.EmbeddedTest{ - ID: "outer", - Object: &runtimetesting.EmbeddedTest{ - ID: "inner", - }, - } - - codec := serializer.NewCodecFactory(s).LegacyCodec(externalGV) - - originalData, err := runtime.Encode(codec, original) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - t.Logf("originalRole = %v\n", string(originalData)) - - copyOfOriginal := original.DeepCopy() - copiedData, err := runtime.Encode(codec, copyOfOriginal) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - t.Logf("copyOfRole = %v\n", string(copiedData)) - - if !reflect.DeepEqual(original, copyOfOriginal) { - t.Errorf("expected \n%v\n, got \n%v", string(originalData), string(copiedData)) - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/extension_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/extension_test.go deleted file mode 100644 index 5f9154ea..00000000 --- a/vendor/k8s.io/apimachinery/pkg/runtime/extension_test.go +++ /dev/null @@ -1,113 +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 runtime_test - -import ( - "bytes" - "encoding/json" - "reflect" - "testing" - - "k8s.io/apimachinery/pkg/runtime" -) - -func TestEmbeddedRawExtensionMarshal(t *testing.T) { - type test struct { - Ext runtime.RawExtension - } - - extension := test{Ext: runtime.RawExtension{Raw: []byte(`{"foo":"bar"}`)}} - data, err := json.Marshal(extension) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if string(data) != `{"Ext":{"foo":"bar"}}` { - t.Errorf("unexpected data: %s", string(data)) - } -} -func TestEmbeddedRawExtensionUnmarshal(t *testing.T) { - type test struct { - Ext runtime.RawExtension - } - - testCases := map[string]struct { - orig test - }{ - "non-empty object": { - orig: test{Ext: runtime.RawExtension{Raw: []byte(`{"foo":"bar"}`)}}, - }, - "empty object": { - orig: test{Ext: runtime.RawExtension{}}, - }, - } - - for k, tc := range testCases { - new := test{} - data, _ := json.Marshal(tc.orig) - if err := json.Unmarshal(data, &new); err != nil { - t.Errorf("%s: umarshal error: %v", k, err) - } - if !reflect.DeepEqual(tc.orig, new) { - t.Errorf("%s: unmarshaled struct differs from original: %v %v", k, tc.orig, new) - } - } -} - -func TestEmbeddedRawExtensionRoundTrip(t *testing.T) { - type test struct { - Ext runtime.RawExtension - } - - testCases := map[string]struct { - orig test - }{ - "non-empty object": { - orig: test{Ext: runtime.RawExtension{Raw: []byte(`{"foo":"bar"}`)}}, - }, - "empty object": { - orig: test{Ext: runtime.RawExtension{}}, - }, - } - - for k, tc := range testCases { - new1 := test{} - new2 := test{} - data, err := json.Marshal(tc.orig) - if err != nil { - t.Errorf("1st marshal error: %v", err) - } - if err = json.Unmarshal(data, &new1); err != nil { - t.Errorf("1st unmarshal error: %v", err) - } - newData, err := json.Marshal(new1) - if err != nil { - t.Errorf("2st marshal error: %v", err) - } - if err = json.Unmarshal(newData, &new2); err != nil { - t.Errorf("2nd unmarshal error: %v", err) - } - if !bytes.Equal(data, newData) { - t.Errorf("%s: re-marshaled data differs from original: %v %v", k, data, newData) - } - if !reflect.DeepEqual(tc.orig, new1) { - t.Errorf("%s: unmarshaled struct differs from original: %v %v", k, tc.orig, new1) - } - if !reflect.DeepEqual(new1, new2) { - t.Errorf("%s: re-unmarshaled struct differs from original: %v %v", k, new1, new2) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto b/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto deleted file mode 100644 index 2ff38391..00000000 --- a/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto +++ /dev/null @@ -1,129 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.apimachinery.pkg.runtime; - -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "runtime"; - -// RawExtension is used to hold extensions in external versions. -// -// To use this, make a field which has RawExtension as its type in your external, versioned -// struct, and Object in your internal struct. You also need to register your -// various plugin types. -// -// // Internal package: -// type MyAPIObject struct { -// runtime.TypeMeta `json:",inline"` -// MyPlugin runtime.Object `json:"myPlugin"` -// } -// type PluginA struct { -// AOption string `json:"aOption"` -// } -// -// // External package: -// type MyAPIObject struct { -// runtime.TypeMeta `json:",inline"` -// MyPlugin runtime.RawExtension `json:"myPlugin"` -// } -// type PluginA struct { -// AOption string `json:"aOption"` -// } -// -// // On the wire, the JSON will look something like this: -// { -// "kind":"MyAPIObject", -// "apiVersion":"v1", -// "myPlugin": { -// "kind":"PluginA", -// "aOption":"foo", -// }, -// } -// -// So what happens? Decode first uses json or yaml to unmarshal the serialized data into -// your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. -// The next step is to copy (using pkg/conversion) into the internal struct. The runtime -// package's DefaultScheme has conversion functions installed which will unpack the -// JSON stored in RawExtension, turning it into the correct object type, and storing it -// in the Object. (TODO: In the case where the object is of an unknown type, a -// runtime.Unknown object will be created and stored.) -// -// +k8s:deepcopy-gen=true -// +protobuf=true -// +k8s:openapi-gen=true -message RawExtension { - // Raw is the underlying serialization of this object. - // - // TODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data. - optional bytes raw = 1; -} - -// TypeMeta is shared by all top level objects. The proper way to use it is to inline it in your type, -// like this: -// type MyAwesomeAPIObject struct { -// runtime.TypeMeta `json:",inline"` -// ... // other fields -// } -// func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind -// -// TypeMeta is provided here for convenience. You may use it directly from this package or define -// your own with the same fields. -// -// +k8s:deepcopy-gen=false -// +protobuf=true -// +k8s:openapi-gen=true -message TypeMeta { - // +optional - optional string apiVersion = 1; - - // +optional - optional string kind = 2; -} - -// Unknown allows api objects with unknown types to be passed-through. This can be used -// to deal with the API objects from a plug-in. Unknown objects still have functioning -// TypeMeta features-- kind, version, etc. -// TODO: Make this object have easy access to field based accessors and settors for -// metadata and field mutatation. -// -// +k8s:deepcopy-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +protobuf=true -// +k8s:openapi-gen=true -message Unknown { - optional TypeMeta typeMeta = 1; - - // Raw will hold the complete serialized object which couldn't be matched - // with a registered type. Most likely, nothing should be done with this - // except for passing it through the system. - optional bytes raw = 2; - - // ContentEncoding is encoding used to encode 'Raw' data. - // Unspecified means no encoding. - optional string contentEncoding = 3; - - // ContentType is serialization method used to serialize 'Raw'. - // Unspecified means ContentTypeJSON. - optional string contentType = 4; -} - diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/local_scheme_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/local_scheme_test.go deleted file mode 100644 index 45a0dde5..00000000 --- a/vendor/k8s.io/apimachinery/pkg/runtime/local_scheme_test.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -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/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version_test.go deleted file mode 100644 index 3934bc45..00000000 --- a/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version_test.go +++ /dev/null @@ -1,180 +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 schema - -import ( - "testing" -) - -func TestGroupVersionParse(t *testing.T) { - tests := []struct { - input string - out GroupVersion - err func(error) bool - }{ - {input: "v1", out: GroupVersion{Version: "v1"}}, - {input: "v2", out: GroupVersion{Version: "v2"}}, - {input: "/v1", out: GroupVersion{Version: "v1"}}, - {input: "v1/", out: GroupVersion{Group: "v1"}}, - {input: "/v1/", err: func(err error) bool { return err.Error() == "unexpected GroupVersion string: /v1/" }}, - {input: "v1/a", out: GroupVersion{Group: "v1", Version: "a"}}, - } - for i, test := range tests { - out, err := ParseGroupVersion(test.input) - if test.err == nil && err != nil || err == nil && test.err != nil { - t.Errorf("%d: unexpected error: %v", i, err) - continue - } - if test.err != nil && !test.err(err) { - t.Errorf("%d: unexpected error: %v", i, err) - continue - } - if out != test.out { - t.Errorf("%d: unexpected output: %#v", i, out) - } - } -} - -func TestGroupResourceParse(t *testing.T) { - tests := []struct { - input string - out GroupResource - }{ - {input: "v1", out: GroupResource{Resource: "v1"}}, - {input: ".v1", out: GroupResource{Group: "v1"}}, - {input: "v1.", out: GroupResource{Resource: "v1"}}, - {input: "v1.a", out: GroupResource{Group: "a", Resource: "v1"}}, - {input: "b.v1.a", out: GroupResource{Group: "v1.a", Resource: "b"}}, - } - for i, test := range tests { - out := ParseGroupResource(test.input) - if out != test.out { - t.Errorf("%d: unexpected output: %#v", i, out) - } - } -} - -func TestParseResourceArg(t *testing.T) { - tests := []struct { - input string - gvr *GroupVersionResource - gr GroupResource - }{ - {input: "v1", gr: GroupResource{Resource: "v1"}}, - {input: ".v1", gr: GroupResource{Group: "v1"}}, - {input: "v1.", gr: GroupResource{Resource: "v1"}}, - {input: "v1.a", gr: GroupResource{Group: "a", Resource: "v1"}}, - {input: "b.v1.a", gvr: &GroupVersionResource{Group: "a", Version: "v1", Resource: "b"}, gr: GroupResource{Group: "v1.a", Resource: "b"}}, - } - for i, test := range tests { - gvr, gr := ParseResourceArg(test.input) - if (gvr != nil && test.gvr == nil) || (gvr == nil && test.gvr != nil) || (test.gvr != nil && *gvr != *test.gvr) { - t.Errorf("%d: unexpected output: %#v", i, gvr) - } - if gr != test.gr { - t.Errorf("%d: unexpected output: %#v", i, gr) - } - } -} - -func TestKindForGroupVersionKinds(t *testing.T) { - gvks := GroupVersions{ - GroupVersion{Group: "batch", Version: "v1"}, - GroupVersion{Group: "batch", Version: "v2alpha1"}, - GroupVersion{Group: "policy", Version: "v1beta1"}, - } - cases := []struct { - input []GroupVersionKind - target GroupVersionKind - ok bool - }{ - { - input: []GroupVersionKind{{Group: "batch", Version: "v2alpha1", Kind: "ScheduledJob"}}, - target: GroupVersionKind{Group: "batch", Version: "v2alpha1", Kind: "ScheduledJob"}, - ok: true, - }, - { - input: []GroupVersionKind{{Group: "batch", Version: "v3alpha1", Kind: "CronJob"}}, - target: GroupVersionKind{Group: "batch", Version: "v1", Kind: "CronJob"}, - ok: true, - }, - { - input: []GroupVersionKind{{Group: "policy", Version: "v1beta1", Kind: "PodDisruptionBudget"}}, - target: GroupVersionKind{Group: "policy", Version: "v1beta1", Kind: "PodDisruptionBudget"}, - ok: true, - }, - { - input: []GroupVersionKind{{Group: "apps", Version: "v1alpha1", Kind: "StatefulSet"}}, - target: GroupVersionKind{}, - ok: false, - }, - } - - for i, c := range cases { - target, ok := gvks.KindForGroupVersionKinds(c.input) - if c.target != target { - t.Errorf("%d: unexpected target: %v, expected %v", i, target, c.target) - } - if c.ok != ok { - t.Errorf("%d: unexpected ok: %v, expected %v", i, ok, c.ok) - } - } -} - -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/vendor/k8s.io/apimachinery/pkg/runtime/scheme_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/scheme_test.go deleted file mode 100644 index 0b76b5d7..00000000 --- a/vendor/k8s.io/apimachinery/pkg/runtime/scheme_test.go +++ /dev/null @@ -1,1035 +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 runtime_test - -import ( - "fmt" - "reflect" - "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" -) - -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(internalGVK, &runtimetesting.InternalSimple{}) - scheme.AddKnownTypeWithName(externalGVK, &runtimetesting.ExternalSimple{}) - - // If set, would clear TypeMeta during conversion. - //scheme.AddIgnoredConversionType(&TypeMeta{}, &TypeMeta{}) - - // test that scheme is an ObjectTyper - var _ runtime.ObjectTyper = scheme - - internalToExternalCalls := 0 - externalToInternalCalls := 0 - - // Register functions to verify that scope.Meta() gets set correctly. - err := scheme.AddConversionFuncs( - func(in *runtimetesting.InternalSimple, out *runtimetesting.ExternalSimple, scope conversion.Scope) error { - 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 { - 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 - }, - ) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - - t.Run("Encode, Decode, DecodeInto, and DecodeToVersion", func(t *testing.T) { - simple := &runtimetesting.InternalSimple{ - TestString: "foo", - } - - codecs := serializer.NewCodecFactory(scheme) - codec := codecs.LegacyCodec(externalGV) - info, _ := runtime.SerializerInfoForMediaType(codecs.SupportedMediaTypes(), runtime.ContentTypeJSON) - jsonserializer := info.Serializer - - 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) - } - - 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", - } - - 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", - } - - 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", - } - - 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) { - scheme := runtime.NewScheme() - codecs := serializer.NewCodecFactory(scheme) - info, _ := runtime.SerializerInfoForMediaType(codecs.SupportedMediaTypes(), runtime.ContentTypeJSON) - jsonserializer := info.Serializer - - badJSONMissingKind := []byte(`{ }`) - if _, err := runtime.Decode(jsonserializer, badJSONMissingKind); err == nil { - t.Errorf("Did not reject despite lack of kind field: %s", badJSONMissingKind) - } - badJSONUnknownType := []byte(`{"kind": "bar"}`) - if _, err1 := runtime.Decode(jsonserializer, badJSONUnknownType); err1 == nil { - t.Errorf("Did not reject despite use of unknown type: %s", badJSONUnknownType) - } - /*badJSONKindMismatch := []byte(`{"kind": "Pod"}`) - if err2 := DecodeInto(badJSONKindMismatch, &Node{}); err2 == nil { - t.Errorf("Kind is set but doesn't match the object type: %s", badJSONKindMismatch) - }*/ -} - -func TestExternalToInternalMapping(t *testing.T) { - internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Group: "test.group", Version: "testExternal"} - - scheme := runtime.NewScheme() - scheme.AddKnownTypeWithName(internalGV.WithKind("OptionalExtensionType"), &runtimetesting.InternalOptionalExtensionType{}) - scheme.AddKnownTypeWithName(externalGV.WithKind("OptionalExtensionType"), &runtimetesting.ExternalOptionalExtensionType{}) - - codec := serializer.NewCodecFactory(scheme).LegacyCodec(externalGV) - - table := []struct { - obj runtime.Object - encoded string - }{ - { - &runtimetesting.InternalOptionalExtensionType{Extension: nil}, - `{"kind":"OptionalExtensionType","apiVersion":"` + externalGV.String() + `"}`, - }, - } - - for i, item := range table { - gotDecoded, err := runtime.Decode(codec, []byte(item.encoded)) - if err != nil { - t.Errorf("unexpected error '%v' (%v)", err, item.encoded) - } else if e, a := item.obj, gotDecoded; !reflect.DeepEqual(e, a) { - t.Errorf("%d: unexpected objects:\n%s", i, diff.ObjectGoPrintSideBySide(e, a)) - } - } -} - -func TestExtensionMapping(t *testing.T) { - internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Group: "test.group", Version: "testExternal"} - - scheme := runtime.NewScheme() - scheme.AddKnownTypeWithName(internalGV.WithKind("ExtensionType"), &runtimetesting.InternalExtensionType{}) - scheme.AddKnownTypeWithName(internalGV.WithKind("OptionalExtensionType"), &runtimetesting.InternalOptionalExtensionType{}) - scheme.AddKnownTypeWithName(externalGV.WithKind("ExtensionType"), &runtimetesting.ExternalExtensionType{}) - scheme.AddKnownTypeWithName(externalGV.WithKind("OptionalExtensionType"), &runtimetesting.ExternalOptionalExtensionType{}) - - // register external first when the object is the same in both schemes, so ObjectVersionAndKind reports the - // external version. - scheme.AddKnownTypeWithName(externalGV.WithKind("A"), &runtimetesting.ExtensionA{}) - scheme.AddKnownTypeWithName(externalGV.WithKind("B"), &runtimetesting.ExtensionB{}) - scheme.AddKnownTypeWithName(internalGV.WithKind("A"), &runtimetesting.ExtensionA{}) - scheme.AddKnownTypeWithName(internalGV.WithKind("B"), &runtimetesting.ExtensionB{}) - - codec := serializer.NewCodecFactory(scheme).LegacyCodec(externalGV) - - table := []struct { - obj runtime.Object - expected runtime.Object - encoded string - }{ - { - &runtimetesting.InternalExtensionType{ - Extension: runtime.NewEncodable(codec, &runtimetesting.ExtensionA{TestString: "foo"}), - }, - &runtimetesting.InternalExtensionType{ - Extension: &runtime.Unknown{ - Raw: []byte(`{"apiVersion":"test.group/testExternal","kind":"A","testString":"foo"}`), - ContentType: runtime.ContentTypeJSON, - }, - }, - // apiVersion is set in the serialized object for easier consumption by clients - `{"apiVersion":"` + externalGV.String() + `","kind":"ExtensionType","extension":{"apiVersion":"test.group/testExternal","kind":"A","testString":"foo"}} -`, - }, { - &runtimetesting.InternalExtensionType{Extension: runtime.NewEncodable(codec, &runtimetesting.ExtensionB{TestString: "bar"})}, - &runtimetesting.InternalExtensionType{ - Extension: &runtime.Unknown{ - Raw: []byte(`{"apiVersion":"test.group/testExternal","kind":"B","testString":"bar"}`), - ContentType: runtime.ContentTypeJSON, - }, - }, - // apiVersion is set in the serialized object for easier consumption by clients - `{"apiVersion":"` + externalGV.String() + `","kind":"ExtensionType","extension":{"apiVersion":"test.group/testExternal","kind":"B","testString":"bar"}} -`, - }, { - &runtimetesting.InternalExtensionType{Extension: nil}, - &runtimetesting.InternalExtensionType{ - Extension: nil, - }, - `{"apiVersion":"` + externalGV.String() + `","kind":"ExtensionType","extension":null} -`, - }, - } - - for i, item := range table { - gotEncoded, err := runtime.Encode(codec, item.obj) - if err != nil { - t.Errorf("unexpected error '%v' (%#v)", err, item.obj) - } else if e, a := item.encoded, string(gotEncoded); e != a { - t.Errorf("expected\n%#v\ngot\n%#v\n", e, a) - } - - gotDecoded, err := runtime.Decode(codec, []byte(item.encoded)) - if err != nil { - t.Errorf("unexpected error '%v' (%v)", err, item.encoded) - } else if e, a := item.expected, gotDecoded; !reflect.DeepEqual(e, a) { - t.Errorf("%d: unexpected objects:\n%s", i, diff.ObjectGoPrintSideBySide(e, a)) - } - } -} - -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(internalGVK, &runtimetesting.InternalSimple{}) - scheme.AddKnownTypeWithName(externalGVK, &runtimetesting.ExternalSimple{}) - - codec := serializer.NewCodecFactory(scheme).LegacyCodec(externalGV) - - test := &runtimetesting.InternalSimple{ - TestString: "I'm the same", - } - obj := runtime.Object(test) - data, err := runtime.Encode(codec, obj) - obj2, gvk, err2 := codec.Decode(data, nil, nil) - if err != nil || err2 != nil { - t.Fatalf("Failure: '%v' '%v'", err, err2) - } - if _, ok := obj2.(*runtimetesting.InternalSimple); !ok { - t.Fatalf("Got wrong type") - } - if !reflect.DeepEqual(obj2, test) { - t.Errorf("Expected:\n %#v,\n Got:\n %#v", test, obj2) - } - 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(internalGVK, &runtimetesting.InternalSimple{}) - scheme.AddKnownTypeWithName(externalGVK, &runtimetesting.ExternalSimple{}) - scheme.AddKnownTypeWithName(otherGV.WithKind("Simple"), &runtimetesting.ExternalSimple{}) - - codec := serializer.NewCodecFactory(scheme).LegacyCodec(externalGV) - - if unv, ok := scheme.IsUnversioned(&runtimetesting.InternalSimple{}); !unv || !ok { - t.Fatalf("type not unversioned and in scheme: %t %t", unv, ok) - } - - kinds, _, err := scheme.ObjectKinds(&runtimetesting.InternalSimple{}) - if err != nil { - t.Fatal(err) - } - kind := kinds[0] - if kind != externalGV.WithKind("InternalSimple") { - t.Fatalf("unexpected: %#v", kind) - } - - test := &runtimetesting.InternalSimple{ - TestString: "I'm the same", - } - obj := runtime.Object(test) - data, err := runtime.Encode(codec, obj) - if err != nil { - t.Fatal(err) - } - obj2, gvk, err := codec.Decode(data, nil, nil) - if err != nil { - t.Fatal(err) - } - if _, ok := obj2.(*runtimetesting.InternalSimple); !ok { - t.Fatalf("Got wrong type") - } - if !reflect.DeepEqual(obj2, test) { - 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 *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 - codec = serializer.NewCodecFactory(scheme).LegacyCodec(otherGV) - data, err = runtime.Encode(codec, obj) - if err != nil { - t.Fatal(err) - } - if string(data) != `{"apiVersion":"test.group/testExternal","kind":"InternalSimple","testString":"I'm the same"}`+"\n" { - t.Errorf("unexpected data: %s", data) - } -} - -// 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: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Version: "v1"} - alternateExternalGV := schema.GroupVersion{Group: "custom", Version: "v1"} - alternateInternalGV := schema.GroupVersion{Group: "custom", Version: runtime.APIVersionInternal} - differentExternalGV := schema.GroupVersion{Group: "other", Version: "v2"} - - s := runtime.NewScheme() - // Ordinarily, we wouldn't add TestType2, but because this is a test and - // both types are from the same package, we need to get it into the system - // so that converter will match it with ExternalType2. - s.AddKnownTypes(internalGV, &runtimetesting.TestType1{}, &runtimetesting.TestType2{}, &runtimetesting.ExternalInternalSame{}) - s.AddKnownTypes(externalGV, &runtimetesting.ExternalInternalSame{}) - s.AddKnownTypeWithName(externalGV.WithKind("TestType1"), &runtimetesting.ExternalTestType1{}) - s.AddKnownTypeWithName(externalGV.WithKind("TestType2"), &runtimetesting.ExternalTestType2{}) - s.AddKnownTypeWithName(internalGV.WithKind("TestType3"), &runtimetesting.TestType1{}) - s.AddKnownTypeWithName(externalGV.WithKind("TestType3"), &runtimetesting.ExternalTestType1{}) - s.AddKnownTypeWithName(externalGV.WithKind("TestType4"), &runtimetesting.ExternalTestType1{}) - s.AddKnownTypeWithName(alternateInternalGV.WithKind("TestType3"), &runtimetesting.TestType1{}) - s.AddKnownTypeWithName(alternateExternalGV.WithKind("TestType3"), &runtimetesting.ExternalTestType1{}) - s.AddKnownTypeWithName(alternateExternalGV.WithKind("TestType5"), &runtimetesting.ExternalTestType1{}) - s.AddKnownTypeWithName(differentExternalGV.WithKind("TestType1"), &runtimetesting.ExternalTestType1{}) - s.AddUnversionedTypes(externalGV, &runtimetesting.UnversionedType{}) - - s.AddConversionFuncs(func(in *runtimetesting.TestType1, out *runtimetesting.ExternalTestType1, s conversion.Scope) { - out.A = in.A - }) - return s -} - -func TestKnownTypes(t *testing.T) { - s := GetTestScheme() - if len(s.KnownTypes(schema.GroupVersion{Group: "group", Version: "v2"})) != 0 { - t.Errorf("should have no known types for v2") - } - - types := s.KnownTypes(schema.GroupVersion{Version: "v1"}) - for _, s := range []string{"TestType1", "TestType2", "TestType3", "ExternalInternalSame"} { - if _, ok := types[s]; !ok { - t.Errorf("missing type %q", s) - } - } -} - -func TestAddKnownTypesIdemPotent(t *testing.T) { - s := runtime.NewScheme() - - gv := schema.GroupVersion{Group: "foo", Version: "v1"} - s.AddKnownTypes(gv, &runtimetesting.InternalSimple{}) - s.AddKnownTypes(gv, &runtimetesting.InternalSimple{}) - if len(s.KnownTypes(gv)) != 1 { - t.Errorf("expected only one %v type after double registration", gv) - } - if len(s.AllKnownTypes()) != 1 { - t.Errorf("expected only one type after double registration") - } - - s.AddKnownTypeWithName(gv.WithKind("InternalSimple"), &runtimetesting.InternalSimple{}) - s.AddKnownTypeWithName(gv.WithKind("InternalSimple"), &runtimetesting.InternalSimple{}) - if len(s.KnownTypes(gv)) != 1 { - t.Errorf("expected only one %v type after double registration with custom name", gv) - } - if len(s.AllKnownTypes()) != 1 { - t.Errorf("expected only one type after double registration with custom name") - } - - s.AddUnversionedTypes(gv, &runtimetesting.InternalSimple{}) - s.AddUnversionedTypes(gv, &runtimetesting.InternalSimple{}) - if len(s.KnownTypes(gv)) != 1 { - t.Errorf("expected only one %v type after double registration with custom name", gv) - } - if len(s.AllKnownTypes()) != 1 { - t.Errorf("expected only one type after double registration with custom name") - } - - kinds, _, err := s.ObjectKinds(&runtimetesting.InternalSimple{}) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if len(kinds) != 1 { - t.Errorf("expected only one kind for InternalSimple after double registration") - } -} - -// redefine InternalSimple with the same name, but obviously as a different type than in runtimetesting -type InternalSimple struct { - runtime.TypeMeta `json:",inline"` - TestString string `json:"testString"` -} - -func (s *InternalSimple) DeepCopyObject() runtime.Object { return nil } - -func TestConflictingAddKnownTypes(t *testing.T) { - s := runtime.NewScheme() - gv := schema.GroupVersion{Group: "foo", Version: "v1"} - - panicked := make(chan bool) - go func() { - defer func() { - if recover() != nil { - panicked <- true - } - }() - s.AddKnownTypeWithName(gv.WithKind("InternalSimple"), &runtimetesting.InternalSimple{}) - s.AddKnownTypeWithName(gv.WithKind("InternalSimple"), &runtimetesting.ExternalSimple{}) - panicked <- false - }() - if !<-panicked { - t.Errorf("Expected AddKnownTypesWithName to panic with conflicting type registrations") - } - - go func() { - defer func() { - if recover() != nil { - panicked <- true - } - }() - - s.AddUnversionedTypes(gv, &runtimetesting.InternalSimple{}) - s.AddUnversionedTypes(gv, &InternalSimple{}) - panicked <- false - }() - if !<-panicked { - t.Errorf("Expected AddUnversionedTypes to panic with conflicting type registrations") - } -} - -func TestConvertToVersionBasic(t *testing.T) { - s := GetTestScheme() - tt := &runtimetesting.TestType1{A: "I'm not a pointer object"} - other, err := s.ConvertToVersion(tt, schema.GroupVersion{Version: "v1"}) - if err != nil { - t.Fatalf("Failure: %v", err) - } - converted, ok := other.(*runtimetesting.ExternalTestType1) - if !ok { - t.Fatalf("Got wrong type: %T", other) - } - if tt.A != converted.A { - t.Fatalf("Failed to convert object correctly: %#v", converted) - } -} - -type testGroupVersioner struct { - target schema.GroupVersionKind - ok bool -} - -func (m testGroupVersioner) KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (schema.GroupVersionKind, bool) { - return m.target, m.ok -} - -func TestConvertToVersion(t *testing.T) { - testCases := []struct { - scheme *runtime.Scheme - in runtime.Object - gv runtime.GroupVersioner - same bool - out runtime.Object - errFn func(error) bool - }{ - // errors if the type is not registered in the scheme - { - scheme: GetTestScheme(), - in: &runtimetesting.UnknownType{}, - errFn: func(err error) bool { return err != nil && runtime.IsNotRegisteredError(err) }, - }, - // errors if the group versioner returns no target - { - scheme: GetTestScheme(), - in: &runtimetesting.ExternalTestType1{A: "test"}, - gv: testGroupVersioner{}, - errFn: func(err error) bool { - return err != nil && strings.Contains(err.Error(), "is not suitable for converting") - }, - }, - // converts to internal - { - scheme: GetTestScheme(), - in: &runtimetesting.ExternalTestType1{A: "test"}, - gv: schema.GroupVersion{Version: runtime.APIVersionInternal}, - out: &runtimetesting.TestType1{A: "test"}, - }, - // converts from unstructured to internal - { - scheme: GetTestScheme(), - in: &runtimetesting.Unstructured{Object: map[string]interface{}{ - "apiVersion": "custom/v1", - "kind": "TestType3", - "A": "test", - }}, - gv: schema.GroupVersion{Version: runtime.APIVersionInternal}, - out: &runtimetesting.TestType1{A: "test"}, - }, - // converts from unstructured to external - { - scheme: GetTestScheme(), - in: &runtimetesting.Unstructured{Object: map[string]interface{}{ - "apiVersion": "custom/v1", - "kind": "TestType3", - "A": "test", - }}, - gv: schema.GroupVersion{Group: "custom", Version: "v1"}, - out: &runtimetesting.ExternalTestType1{MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "custom/v1", ObjectKind: "TestType3"}, A: "test"}, - }, - // prefers the best match - { - scheme: GetTestScheme(), - in: &runtimetesting.ExternalTestType1{A: "test"}, - gv: schema.GroupVersions{{Version: runtime.APIVersionInternal}, {Version: "v1"}}, - out: &runtimetesting.ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, - A: "test", - }, - }, - // unversioned type returned as-is - { - scheme: GetTestScheme(), - in: &runtimetesting.UnversionedType{A: "test"}, - gv: schema.GroupVersions{{Version: "v1"}}, - same: true, - out: &runtimetesting.UnversionedType{ - MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "UnversionedType"}, - A: "test", - }, - }, - // unversioned type returned when not included in the target types - { - scheme: GetTestScheme(), - in: &runtimetesting.UnversionedType{A: "test"}, - gv: schema.GroupVersions{{Group: "other", Version: "v2"}}, - same: true, - out: &runtimetesting.UnversionedType{ - MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "UnversionedType"}, - A: "test", - }, - }, - // detected as already being in the target version - { - scheme: GetTestScheme(), - in: &runtimetesting.ExternalTestType1{A: "test"}, - gv: schema.GroupVersions{{Version: "v1"}}, - same: true, - out: &runtimetesting.ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, - A: "test", - }, - }, - // detected as already being in the first target version - { - scheme: GetTestScheme(), - in: &runtimetesting.ExternalTestType1{A: "test"}, - gv: schema.GroupVersions{{Version: "v1"}, {Version: runtime.APIVersionInternal}}, - same: true, - out: &runtimetesting.ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, - A: "test", - }, - }, - // detected as already being in the first target version - { - scheme: GetTestScheme(), - in: &runtimetesting.ExternalTestType1{A: "test"}, - gv: schema.GroupVersions{{Version: "v1"}, {Version: runtime.APIVersionInternal}}, - same: true, - out: &runtimetesting.ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, - A: "test", - }, - }, - // the external type is registered in multiple groups, versions, and kinds, and can be targeted to all of them (1/3): different kind - { - scheme: GetTestScheme(), - in: &runtimetesting.ExternalTestType1{A: "test"}, - gv: testGroupVersioner{ok: true, target: schema.GroupVersionKind{Kind: "TestType3", Version: "v1"}}, - same: true, - out: &runtimetesting.ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType3"}, - A: "test", - }, - }, - // the external type is registered in multiple groups, versions, and kinds, and can be targeted to all of them (2/3): different gv - { - scheme: GetTestScheme(), - in: &runtimetesting.ExternalTestType1{A: "test"}, - gv: testGroupVersioner{ok: true, target: schema.GroupVersionKind{Kind: "TestType3", Group: "custom", Version: "v1"}}, - same: true, - out: &runtimetesting.ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "custom/v1", ObjectKind: "TestType3"}, - A: "test", - }, - }, - // the external type is registered in multiple groups, versions, and kinds, and can be targeted to all of them (3/3): different gvk - { - scheme: GetTestScheme(), - in: &runtimetesting.ExternalTestType1{A: "test"}, - gv: testGroupVersioner{ok: true, target: schema.GroupVersionKind{Group: "custom", Version: "v1", Kind: "TestType5"}}, - same: true, - out: &runtimetesting.ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "custom/v1", ObjectKind: "TestType5"}, - A: "test", - }, - }, - // multi group versioner recognizes multiple groups and forces the output to a particular version, copies because version differs - { - scheme: GetTestScheme(), - in: &runtimetesting.ExternalTestType1{A: "test"}, - gv: runtime.NewMultiGroupVersioner(schema.GroupVersion{Group: "other", Version: "v2"}, schema.GroupKind{Group: "custom", Kind: "TestType3"}, schema.GroupKind{Kind: "TestType1"}), - out: &runtimetesting.ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "other/v2", ObjectKind: "TestType1"}, - A: "test", - }, - }, - // multi group versioner recognizes multiple groups and forces the output to a particular version, copies because version differs - { - scheme: GetTestScheme(), - in: &runtimetesting.ExternalTestType1{A: "test"}, - gv: runtime.NewMultiGroupVersioner(schema.GroupVersion{Group: "other", Version: "v2"}, schema.GroupKind{Kind: "TestType1"}, schema.GroupKind{Group: "custom", Kind: "TestType3"}), - out: &runtimetesting.ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "other/v2", ObjectKind: "TestType1"}, - A: "test", - }, - }, - // multi group versioner is unable to find a match when kind AND group don't match (there is no TestType1 kind in group "other", and no kind "TestType5" in the default group) - { - scheme: GetTestScheme(), - in: &runtimetesting.TestType1{A: "test"}, - gv: runtime.NewMultiGroupVersioner(schema.GroupVersion{Group: "custom", Version: "v1"}, schema.GroupKind{Group: "other"}, schema.GroupKind{Kind: "TestType5"}), - errFn: func(err error) bool { - return err != nil && strings.Contains(err.Error(), "is not suitable for converting") - }, - }, - // multi group versioner recognizes multiple groups and forces the output to a particular version, performs no copy - { - scheme: GetTestScheme(), - in: &runtimetesting.ExternalTestType1{A: "test"}, - gv: runtime.NewMultiGroupVersioner(schema.GroupVersion{Group: "", Version: "v1"}, schema.GroupKind{Group: "custom", Kind: "TestType3"}, schema.GroupKind{Kind: "TestType1"}), - same: true, - out: &runtimetesting.ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, - A: "test", - }, - }, - // multi group versioner recognizes multiple groups and forces the output to a particular version, performs no copy - { - scheme: GetTestScheme(), - in: &runtimetesting.ExternalTestType1{A: "test"}, - gv: runtime.NewMultiGroupVersioner(schema.GroupVersion{Group: "", Version: "v1"}, schema.GroupKind{Kind: "TestType1"}, schema.GroupKind{Group: "custom", Kind: "TestType3"}), - same: true, - out: &runtimetesting.ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, - A: "test", - }, - }, - // group versioner can choose a particular target kind for a given input when kind is the same across group versions - { - scheme: GetTestScheme(), - in: &runtimetesting.TestType1{A: "test"}, - gv: testGroupVersioner{ok: true, target: schema.GroupVersionKind{Version: "v1", Kind: "TestType3"}}, - out: &runtimetesting.ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType3"}, - A: "test", - }, - }, - // group versioner can choose a different kind - { - scheme: GetTestScheme(), - in: &runtimetesting.TestType1{A: "test"}, - gv: testGroupVersioner{ok: true, target: schema.GroupVersionKind{Kind: "TestType5", Group: "custom", Version: "v1"}}, - out: &runtimetesting.ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "custom/v1", ObjectKind: "TestType5"}, - A: "test", - }, - }, - } - for i, test := range testCases { - t.Run(fmt.Sprintf("%d", i), func(t *testing.T) { - original := test.in.DeepCopyObject() - out, err := test.scheme.ConvertToVersion(test.in, test.gv) - switch { - case test.errFn != nil: - if !test.errFn(err) { - t.Fatalf("unexpected error: %v", err) - } - return - case err != nil: - t.Fatalf("unexpected error: %v", err) - } - if out == test.in { - t.Fatalf("ConvertToVersion should always copy out: %#v", out) - } - - if test.same { - if !reflect.DeepEqual(original, test.in) { - t.Fatalf("unexpected mutation of input: %s", diff.ObjectReflectDiff(original, test.in)) - } - if !reflect.DeepEqual(out, test.out) { - t.Fatalf("unexpected out: %s", diff.ObjectReflectDiff(out, test.out)) - } - unsafe, err := test.scheme.UnsafeConvertToVersion(test.in, test.gv) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if !reflect.DeepEqual(unsafe, test.out) { - t.Fatalf("unexpected unsafe: %s", diff.ObjectReflectDiff(unsafe, test.out)) - } - if unsafe != test.in { - t.Fatalf("UnsafeConvertToVersion should return same object: %#v", unsafe) - } - return - } - if !reflect.DeepEqual(out, test.out) { - t.Fatalf("unexpected out: %s", diff.ObjectReflectDiff(out, test.out)) - } - }) - } -} - -func TestConvert(t *testing.T) { - testCases := []struct { - scheme *runtime.Scheme - in runtime.Object - into runtime.Object - gv runtime.GroupVersioner - out runtime.Object - errFn func(error) bool - }{ - // converts from internal to unstructured, given a target version - { - scheme: GetTestScheme(), - in: &runtimetesting.TestType1{A: "test"}, - into: &runtimetesting.Unstructured{}, - out: &runtimetesting.Unstructured{Object: map[string]interface{}{ - "myVersionKey": "custom/v1", - "myKindKey": "TestType3", - "A": "test", - }}, - gv: schema.GroupVersion{Group: "custom", Version: "v1"}, - }, - } - for i, test := range testCases { - t.Run(fmt.Sprintf("%d", i), func(t *testing.T) { - err := test.scheme.Convert(test.in, test.into, test.gv) - switch { - case test.errFn != nil: - if !test.errFn(err) { - t.Fatalf("unexpected error: %v", err) - } - return - case err != nil: - t.Fatalf("unexpected error: %v", err) - return - } - - if !reflect.DeepEqual(test.into, test.out) { - t.Fatalf("unexpected out: %s", diff.ObjectReflectDiff(test.into, test.out)) - } - }) - } -} - -func TestMetaValues(t *testing.T) { - internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Group: "test.group", Version: "externalVersion"} - - s := runtime.NewScheme() - s.AddKnownTypeWithName(internalGV.WithKind("Simple"), &runtimetesting.InternalSimple{}) - s.AddKnownTypeWithName(externalGV.WithKind("Simple"), &runtimetesting.ExternalSimple{}) - - internalToExternalCalls := 0 - externalToInternalCalls := 0 - - // Register functions to verify that scope.Meta() gets set correctly. - err := s.AddConversionFuncs( - func(in *runtimetesting.InternalSimple, out *runtimetesting.ExternalSimple, scope conversion.Scope) error { - t.Logf("internal -> external") - scope.Convert(&in.TestString, &out.TestString, 0) - internalToExternalCalls++ - return nil - }, - func(in *runtimetesting.ExternalSimple, out *runtimetesting.InternalSimple, scope conversion.Scope) error { - t.Logf("external -> internal") - scope.Convert(&in.TestString, &out.TestString, 0) - externalToInternalCalls++ - return nil - }, - ) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - simple := &runtimetesting.InternalSimple{ - TestString: "foo", - } - - s.Log(t) - - out, err := s.ConvertToVersion(simple, externalGV) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - - internal, err := s.ConvertToVersion(out, internalGV) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - - if e, a := simple, internal; !reflect.DeepEqual(e, a) { - t.Errorf("Expected:\n %#v,\n Got:\n %#v", e, a) - } - - if e, a := 1, internalToExternalCalls; e != a { - t.Errorf("Expected %v, got %v", e, a) - } - if e, a := 1, externalToInternalCalls; e != a { - t.Errorf("Expected %v, got %v", e, a) - } -} - -func TestMetaValuesUnregisteredConvert(t *testing.T) { - type InternalSimple struct { - Version string `json:"apiVersion,omitempty"` - Kind string `json:"kind,omitempty"` - TestString string `json:"testString"` - } - type ExternalSimple struct { - Version string `json:"apiVersion,omitempty"` - Kind string `json:"kind,omitempty"` - TestString string `json:"testString"` - } - s := runtime.NewScheme() - // We deliberately don't register the types. - - internalToExternalCalls := 0 - - // Register functions to verify that scope.Meta() gets set correctly. - err := s.AddConversionFuncs( - func(in *InternalSimple, out *ExternalSimple, scope conversion.Scope) error { - scope.Convert(&in.TestString, &out.TestString, 0) - internalToExternalCalls++ - return nil - }, - ) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - - simple := &InternalSimple{TestString: "foo"} - external := &ExternalSimple{} - err = s.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) - } - - // Verify that our conversion handler got called. - if e, a := 1, internalToExternalCalls; e != a { - t.Errorf("Expected %v, got %v", e, a) - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_test.go deleted file mode 100644 index d27da113..00000000 --- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_test.go +++ /dev/null @@ -1,339 +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 serializer - -import ( - "encoding/json" - "fmt" - "log" - "os" - "reflect" - "strings" - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/conversion" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - serializertesting "k8s.io/apimachinery/pkg/runtime/serializer/testing" - "k8s.io/apimachinery/pkg/util/diff" - - "github.com/ghodss/yaml" - "github.com/google/gofuzz" - flag "github.com/spf13/pflag" -) - -var fuzzIters = flag.Int("fuzz-iters", 50, "How many fuzzing iterations to do.") - -type testMetaFactory struct{} - -func (testMetaFactory) Interpret(data []byte) (*schema.GroupVersionKind, error) { - findKind := struct { - APIVersion string `json:"myVersionKey,omitempty"` - ObjectKind string `json:"myKindKey,omitempty"` - }{} - // yaml is a superset of json, so we use it to decode here. That way, - // we understand both. - if err := yaml.Unmarshal(data, &findKind); err != nil { - return nil, fmt.Errorf("couldn't get version/kind: %v", err) - } - gv, err := schema.ParseGroupVersion(findKind.APIVersion) - if err != nil { - return nil, err - } - return &schema.GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: findKind.ObjectKind}, nil -} - -// TestObjectFuzzer can randomly populate all the above objects. -var TestObjectFuzzer = fuzz.New().NilChance(.5).NumElements(1, 100).Funcs( - func(j *serializertesting.MyWeirdCustomEmbeddedVersionKindField, c fuzz.Continue) { - c.FuzzNoCustom(j) - j.APIVersion = "" - j.ObjectKind = "" - }, -) - -// Returns a new Scheme set up with the test objects. -func GetTestScheme() (*runtime.Scheme, runtime.Codec) { - internalGV := schema.GroupVersion{Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Version: "v1"} - externalGV2 := schema.GroupVersion{Version: "v2"} - - s := runtime.NewScheme() - // Ordinarily, we wouldn't add TestType2, but because this is a test and - // both types are from the same package, we need to get it into the system - // so that converter will match it with ExternalType2. - s.AddKnownTypes(internalGV, &serializertesting.TestType1{}, &serializertesting.TestType2{}, &serializertesting.ExternalInternalSame{}) - s.AddKnownTypes(externalGV, &serializertesting.ExternalInternalSame{}) - s.AddKnownTypeWithName(externalGV.WithKind("TestType1"), &serializertesting.ExternalTestType1{}) - s.AddKnownTypeWithName(externalGV.WithKind("TestType2"), &serializertesting.ExternalTestType2{}) - s.AddKnownTypeWithName(internalGV.WithKind("TestType3"), &serializertesting.TestType1{}) - s.AddKnownTypeWithName(externalGV.WithKind("TestType3"), &serializertesting.ExternalTestType1{}) - s.AddKnownTypeWithName(externalGV2.WithKind("TestType1"), &serializertesting.ExternalTestType1{}) - - s.AddUnversionedTypes(externalGV, &metav1.Status{}) - - cf := newCodecFactory(s, newSerializersForScheme(s, testMetaFactory{})) - codec := cf.LegacyCodec(schema.GroupVersion{Version: "v1"}) - return s, codec -} - -var semantic = conversion.EqualitiesOrDie( - func(a, b serializertesting.MyWeirdCustomEmbeddedVersionKindField) bool { - a.APIVersion, a.ObjectKind = "", "" - b.APIVersion, b.ObjectKind = "", "" - return a == b - }, -) - -func runTest(t *testing.T, source interface{}) { - name := reflect.TypeOf(source).Elem().Name() - TestObjectFuzzer.Fuzz(source) - - _, codec := GetTestScheme() - data, err := runtime.Encode(codec, source.(runtime.Object)) - if err != nil { - t.Errorf("%v: %v (%#v)", name, err, source) - return - } - obj2, err := runtime.Decode(codec, data) - if err != nil { - t.Errorf("%v: %v (%v)", name, err, string(data)) - return - } - if !semantic.DeepEqual(source, obj2) { - t.Errorf("1: %v: diff: %v", name, diff.ObjectGoPrintSideBySide(source, obj2)) - return - } - obj3 := reflect.New(reflect.TypeOf(source).Elem()).Interface() - if err := runtime.DecodeInto(codec, data, obj3.(runtime.Object)); err != nil { - t.Errorf("2: %v: %v", name, err) - return - } - if !semantic.DeepEqual(source, obj3) { - t.Errorf("3: %v: diff: %v", name, diff.ObjectDiff(source, obj3)) - return - } -} - -func TestTypes(t *testing.T) { - table := []interface{}{ - &serializertesting.TestType1{}, - &serializertesting.ExternalInternalSame{}, - } - for _, item := range table { - // Try a few times, since runTest uses random values. - for i := 0; i < *fuzzIters; i++ { - runTest(t, item) - } - } -} - -func TestVersionedEncoding(t *testing.T) { - s, _ := GetTestScheme() - cf := newCodecFactory(s, newSerializersForScheme(s, testMetaFactory{})) - info, _ := runtime.SerializerInfoForMediaType(cf.SupportedMediaTypes(), runtime.ContentTypeJSON) - encoder := info.Serializer - - codec := cf.CodecForVersions(encoder, nil, schema.GroupVersion{Version: "v2"}, nil) - out, err := runtime.Encode(codec, &serializertesting.TestType1{}) - if err != nil { - t.Fatal(err) - } - if string(out) != `{"myVersionKey":"v2","myKindKey":"TestType1"}`+"\n" { - t.Fatal(string(out)) - } - - codec = cf.CodecForVersions(encoder, nil, schema.GroupVersion{Version: "v3"}, nil) - _, err = runtime.Encode(codec, &serializertesting.TestType1{}) - if err == nil { - t.Fatal(err) - } - - // unversioned encode with no versions is written directly to wire - codec = cf.CodecForVersions(encoder, nil, runtime.InternalGroupVersioner, nil) - out, err = runtime.Encode(codec, &serializertesting.TestType1{}) - if err != nil { - t.Fatal(err) - } - if string(out) != `{}`+"\n" { - t.Fatal(string(out)) - } -} - -func TestMultipleNames(t *testing.T) { - _, codec := GetTestScheme() - - obj, _, err := codec.Decode([]byte(`{"myKindKey":"TestType3","myVersionKey":"v1","A":"value"}`), nil, nil) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - internal := obj.(*serializertesting.TestType1) - if internal.A != "value" { - t.Fatalf("unexpected decoded object: %#v", internal) - } - - out, err := runtime.Encode(codec, internal) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if !strings.Contains(string(out), `"myKindKey":"TestType1"`) { - t.Errorf("unexpected encoded output: %s", string(out)) - } -} - -func TestConvertTypesWhenDefaultNamesMatch(t *testing.T) { - internalGV := schema.GroupVersion{Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Version: "v1"} - - s := runtime.NewScheme() - // create two names internally, with TestType1 being preferred - s.AddKnownTypeWithName(internalGV.WithKind("TestType1"), &serializertesting.TestType1{}) - s.AddKnownTypeWithName(internalGV.WithKind("OtherType1"), &serializertesting.TestType1{}) - // create two names externally, with TestType1 being preferred - s.AddKnownTypeWithName(externalGV.WithKind("TestType1"), &serializertesting.ExternalTestType1{}) - s.AddKnownTypeWithName(externalGV.WithKind("OtherType1"), &serializertesting.ExternalTestType1{}) - - ext := &serializertesting.ExternalTestType1{} - ext.APIVersion = "v1" - ext.ObjectKind = "OtherType1" - ext.A = "test" - data, err := json.Marshal(ext) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - expect := &serializertesting.TestType1{A: "test"} - - codec := newCodecFactory(s, newSerializersForScheme(s, testMetaFactory{})).LegacyCodec(schema.GroupVersion{Version: "v1"}) - - obj, err := runtime.Decode(codec, data) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if !semantic.DeepEqual(expect, obj) { - t.Errorf("unexpected object: %#v", obj) - } - - into := &serializertesting.TestType1{} - if err := runtime.DecodeInto(codec, data, into); err != nil { - t.Fatalf("unexpected error: %v", err) - } - if !semantic.DeepEqual(expect, into) { - t.Errorf("unexpected object: %#v", obj) - } -} - -func TestEncode_Ptr(t *testing.T) { - _, codec := GetTestScheme() - tt := &serializertesting.TestType1{A: "I am a pointer object"} - data, err := runtime.Encode(codec, tt) - obj2, err2 := runtime.Decode(codec, data) - if err != nil || err2 != nil { - t.Fatalf("Failure: '%v' '%v'\n%s", err, err2, data) - } - if _, ok := obj2.(*serializertesting.TestType1); !ok { - t.Fatalf("Got wrong type") - } - if !semantic.DeepEqual(obj2, tt) { - t.Errorf("Expected:\n %#v,\n Got:\n %#v", tt, obj2) - } -} - -func TestBadJSONRejection(t *testing.T) { - log.SetOutput(os.Stderr) - _, codec := GetTestScheme() - badJSONs := [][]byte{ - []byte(`{"myVersionKey":"v1"}`), // Missing kind - []byte(`{"myVersionKey":"v1","myKindKey":"bar"}`), // Unknown kind - []byte(`{"myVersionKey":"bar","myKindKey":"TestType1"}`), // Unknown version - []byte(`{"myKindKey":"TestType1"}`), // Missing version - } - for _, b := range badJSONs { - if _, err := runtime.Decode(codec, b); err == nil { - t.Errorf("Did not reject bad json: %s", string(b)) - } - } - badJSONKindMismatch := []byte(`{"myVersionKey":"v1","myKindKey":"ExternalInternalSame"}`) - if err := runtime.DecodeInto(codec, badJSONKindMismatch, &serializertesting.TestType1{}); err == nil { - t.Errorf("Kind is set but doesn't match the object type: %s", badJSONKindMismatch) - } - if err := runtime.DecodeInto(codec, []byte(``), &serializertesting.TestType1{}); err != nil { - t.Errorf("Should allow empty decode: %v", err) - } - if _, _, err := codec.Decode([]byte(``), &schema.GroupVersionKind{Kind: "ExternalInternalSame"}, nil); err == nil { - t.Errorf("Did not give error for empty data with only kind default") - } - if _, _, err := codec.Decode([]byte(`{"myVersionKey":"v1"}`), &schema.GroupVersionKind{Kind: "ExternalInternalSame"}, nil); err != nil { - t.Errorf("Gave error for version and kind default") - } - if _, _, err := codec.Decode([]byte(`{"myKindKey":"ExternalInternalSame"}`), &schema.GroupVersionKind{Version: "v1"}, nil); err != nil { - t.Errorf("Gave error for version and kind default") - } - if _, _, err := codec.Decode([]byte(``), &schema.GroupVersionKind{Kind: "ExternalInternalSame", Version: "v1"}, nil); err != nil { - t.Errorf("Gave error for version and kind defaulted: %v", err) - } - if _, err := runtime.Decode(codec, []byte(``)); err == nil { - t.Errorf("Did not give error for empty data") - } -} - -// Returns a new Scheme set up with the test objects needed by TestDirectCodec. -func GetDirectCodecTestScheme() *runtime.Scheme { - internalGV := schema.GroupVersion{Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Version: "v1"} - - s := runtime.NewScheme() - // Ordinarily, we wouldn't add TestType2, but because this is a test and - // both types are from the same package, we need to get it into the system - // so that converter will match it with ExternalType2. - s.AddKnownTypes(internalGV, &serializertesting.TestType1{}) - s.AddKnownTypes(externalGV, &serializertesting.ExternalTestType1{}) - - s.AddUnversionedTypes(externalGV, &metav1.Status{}) - return s -} - -func TestDirectCodec(t *testing.T) { - s := GetDirectCodecTestScheme() - cf := newCodecFactory(s, newSerializersForScheme(s, testMetaFactory{})) - info, _ := runtime.SerializerInfoForMediaType(cf.SupportedMediaTypes(), runtime.ContentTypeJSON) - serializer := info.Serializer - df := DirectCodecFactory{cf} - ignoredGV, err := schema.ParseGroupVersion("ignored group/ignored version") - if err != nil { - t.Fatal(err) - } - directEncoder := df.EncoderForVersion(serializer, ignoredGV) - directDecoder := df.DecoderToVersion(serializer, ignoredGV) - out, err := runtime.Encode(directEncoder, &serializertesting.ExternalTestType1{}) - if err != nil { - t.Fatal(err) - } - if string(out) != `{"myVersionKey":"v1","myKindKey":"ExternalTestType1"}`+"\n" { - t.Fatal(string(out)) - } - a, _, err := directDecoder.Decode(out, nil, nil) - e := &serializertesting.ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: serializertesting.MyWeirdCustomEmbeddedVersionKindField{ - APIVersion: "v1", - ObjectKind: "ExternalTestType1", - }, - } - if !semantic.DeepEqual(e, a) { - t.Fatalf("expect %v, got %v", e, a) - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json_test.go deleted file mode 100644 index b3d629a0..00000000 --- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json_test.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 json_test - -import ( - "fmt" - "reflect" - "strings" - "testing" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/runtime/serializer/json" - "k8s.io/apimachinery/pkg/util/diff" -) - -type testDecodable struct { - Other string - Value int `json:"value"` - Spec DecodableSpec `json:"spec"` - 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 } -func (d *testDecodable) SetGroupVersionKind(gvk schema.GroupVersionKind) { d.gvk = gvk } -func (d *testDecodable) GroupVersionKind() schema.GroupVersionKind { return d.gvk } -func (d *testDecodable) DeepCopyObject() runtime.Object { - panic("testDecodable does not support DeepCopy") -} - -func TestDecode(t *testing.T) { - testCases := []struct { - creater runtime.ObjectCreater - typer runtime.ObjectTyper - yaml bool - pretty bool - - data []byte - defaultGVK *schema.GroupVersionKind - into runtime.Object - - errFn func(error) bool - expectedObject runtime.Object - expectedGVK *schema.GroupVersionKind - }{ - { - data: []byte("{}"), - - expectedGVK: &schema.GroupVersionKind{}, - errFn: func(err error) bool { return strings.Contains(err.Error(), "Object 'Kind' is missing in") }, - }, - { - data: []byte("{}"), - defaultGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - creater: &mockCreater{err: fmt.Errorf("fake error")}, - - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - errFn: func(err error) bool { return err.Error() == "fake error" }, - }, - { - data: []byte("{}"), - defaultGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - creater: &mockCreater{obj: &testDecodable{}}, - expectedObject: &testDecodable{}, - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - }, - - // version without group is not defaulted - { - data: []byte(`{"apiVersion":"blah"}`), - defaultGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - creater: &mockCreater{obj: &testDecodable{}}, - expectedObject: &testDecodable{}, - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "", Version: "blah"}, - }, - // group without version is defaulted - { - data: []byte(`{"apiVersion":"other/"}`), - defaultGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - creater: &mockCreater{obj: &testDecodable{}}, - expectedObject: &testDecodable{}, - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - }, - // group version, kind is defaulted - { - data: []byte(`{"apiVersion":"other1/blah1"}`), - defaultGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - creater: &mockCreater{obj: &testDecodable{}}, - expectedObject: &testDecodable{}, - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other1", Version: "blah1"}, - }, - // gvk all provided then not defaulted at all - { - data: []byte(`{"kind":"Test","apiVersion":"other/blah"}`), - defaultGVK: &schema.GroupVersionKind{Kind: "Test1", Group: "other1", Version: "blah1"}, - creater: &mockCreater{obj: &testDecodable{}}, - expectedObject: &testDecodable{}, - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - }, - //gvk defaulting if kind not provided in data and defaultGVK use into's kind - { - data: []byte(`{"apiVersion":"b1/c1"}`), - into: &testDecodable{gvk: schema.GroupVersionKind{Kind: "a3", Group: "b1", Version: "c1"}}, - typer: &mockTyper{gvk: &schema.GroupVersionKind{Kind: "a3", Group: "b1", Version: "c1"}}, - defaultGVK: nil, - creater: &mockCreater{obj: &testDecodable{}}, - expectedObject: &testDecodable{gvk: schema.GroupVersionKind{Kind: "a3", Group: "b1", Version: "c1"}}, - expectedGVK: &schema.GroupVersionKind{Kind: "a3", Group: "b1", Version: "c1"}, - }, - - // accept runtime.Unknown as into and bypass creator - { - data: []byte(`{}`), - into: &runtime.Unknown{}, - - expectedGVK: &schema.GroupVersionKind{}, - expectedObject: &runtime.Unknown{ - Raw: []byte(`{}`), - ContentType: runtime.ContentTypeJSON, - }, - }, - { - data: []byte(`{"test":"object"}`), - into: &runtime.Unknown{}, - - expectedGVK: &schema.GroupVersionKind{}, - expectedObject: &runtime.Unknown{ - Raw: []byte(`{"test":"object"}`), - ContentType: runtime.ContentTypeJSON, - }, - }, - { - data: []byte(`{"test":"object"}`), - into: &runtime.Unknown{}, - defaultGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - expectedObject: &runtime.Unknown{ - TypeMeta: runtime.TypeMeta{APIVersion: "other/blah", Kind: "Test"}, - Raw: []byte(`{"test":"object"}`), - ContentType: runtime.ContentTypeJSON, - }, - }, - - // unregistered objects can be decoded into directly - { - 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"})}, - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - expectedObject: &testDecodable{ - Other: "test", - Value: 1, - }, - }, - // registered types get defaulted by the into object kind - { - data: []byte(`{"value":1,"Other":"test"}`), - into: &testDecodable{}, - typer: &mockTyper{gvk: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}}, - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - expectedObject: &testDecodable{ - Other: "test", - Value: 1, - }, - }, - // registered types get defaulted by the into object kind even without version, but return an error - { - data: []byte(`{"value":1,"Other":"test"}`), - into: &testDecodable{}, - typer: &mockTyper{gvk: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: ""}}, - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: ""}, - errFn: func(err error) bool { return strings.Contains(err.Error(), "Object 'apiVersion' is missing in") }, - expectedObject: &testDecodable{ - Other: "test", - Value: 1, - }, - }, - - // runtime.VersionedObjects are decoded - { - data: []byte(`{"value":1,"Other":"test"}`), - into: &runtime.VersionedObjects{Objects: []runtime.Object{}}, - creater: &mockCreater{obj: &testDecodable{}}, - typer: &mockTyper{gvk: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}}, - defaultGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - expectedObject: &runtime.VersionedObjects{ - Objects: []runtime.Object{ - &testDecodable{ - Other: "test", - Value: 1, - }, - }, - }, - }, - // runtime.VersionedObjects with an object are decoded into - { - data: []byte(`{"Other":"test"}`), - into: &runtime.VersionedObjects{Objects: []runtime.Object{&testDecodable{Value: 2}}}, - typer: &mockTyper{gvk: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}}, - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - expectedObject: &runtime.VersionedObjects{ - Objects: []runtime.Object{ - &testDecodable{ - Other: "test", - Value: 2, - }, - }, - }, - }, - // 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(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(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 { - var s runtime.Serializer - if test.yaml { - s = json.NewYAMLSerializer(json.DefaultMetaFactory, test.creater, test.typer) - } else { - s = json.NewSerializer(json.DefaultMetaFactory, test.creater, test.typer, test.pretty) - } - obj, gvk, err := s.Decode([]byte(test.data), test.defaultGVK, test.into) - - if !reflect.DeepEqual(test.expectedGVK, gvk) { - t.Errorf("%d: unexpected GVK: %v", i, gvk) - } - - switch { - case err == nil && test.errFn != nil: - t.Errorf("%d: failed: %v", i, err) - continue - case err != nil && test.errFn == nil: - t.Errorf("%d: failed: %v", i, err) - continue - case err != nil: - if !test.errFn(err) { - t.Errorf("%d: failed: %v", i, err) - } - if obj != nil { - t.Errorf("%d: should have returned nil object", i) - } - continue - } - - if test.into != nil && test.into != obj { - t.Errorf("%d: expected into to be returned: %v", i, obj) - continue - } - - if !reflect.DeepEqual(test.expectedObject, obj) { - t.Errorf("%d: unexpected object:\n%s", i, diff.ObjectGoPrintSideBySide(test.expectedObject, obj)) - } - } -} - -type mockCreater struct { - apiVersion string - kind string - err error - obj runtime.Object -} - -func (c *mockCreater) New(kind schema.GroupVersionKind) (runtime.Object, error) { - c.apiVersion, c.kind = kind.GroupVersion().String(), kind.Kind - return c.obj, c.err -} - -type mockTyper struct { - gvk *schema.GroupVersionKind - err error -} - -func (t *mockTyper) ObjectKinds(obj runtime.Object) ([]schema.GroupVersionKind, bool, error) { - if t.gvk == nil { - return nil, false, t.err - } - return []schema.GroupVersionKind{*t.gvk}, false, t.err -} - -func (t *mockTyper) Recognizes(_ schema.GroupVersionKind) bool { - return false -} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/meta_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/meta_test.go deleted file mode 100644 index f4e34a22..00000000 --- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/meta_test.go +++ /dev/null @@ -1,45 +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 json - -import "testing" - -func TestSimpleMetaFactoryInterpret(t *testing.T) { - factory := SimpleMetaFactory{} - gvk, err := factory.Interpret([]byte(`{"apiVersion":"1","kind":"object"}`)) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if gvk.Version != "1" || gvk.Kind != "object" { - t.Errorf("unexpected interpret: %#v", gvk) - } - - // no kind or version - gvk, err = factory.Interpret([]byte(`{}`)) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if gvk.Version != "" || gvk.Kind != "" { - t.Errorf("unexpected interpret: %#v", gvk) - } - - // unparsable - gvk, err = factory.Interpret([]byte(`{`)) - if err == nil { - t.Errorf("unexpected non-error") - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/sparse_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/sparse_test.go deleted file mode 100644 index 3bc9d13b..00000000 --- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/sparse_test.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -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/vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming_test.go deleted file mode 100644 index 9cae6a32..00000000 --- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming_test.go +++ /dev/null @@ -1,84 +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 streaming - -import ( - "bytes" - "io" - "io/ioutil" - "testing" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/framer" -) - -type fakeDecoder struct { - got []byte - obj runtime.Object - err error -} - -func (d *fakeDecoder) Decode(data []byte, gvk *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { - d.got = data - return d.obj, nil, d.err -} - -func TestEmptyDecoder(t *testing.T) { - buf := bytes.NewBuffer([]byte{}) - d := &fakeDecoder{} - _, _, err := NewDecoder(ioutil.NopCloser(buf), d).Decode(nil, nil) - if err != io.EOF { - t.Fatal(err) - } -} - -func TestDecoder(t *testing.T) { - frames := [][]byte{ - make([]byte, 1025), - make([]byte, 1024*5), - make([]byte, 1024*1024*5), - make([]byte, 1025), - } - pr, pw := io.Pipe() - fw := framer.NewLengthDelimitedFrameWriter(pw) - go func() { - for i := range frames { - fw.Write(frames[i]) - } - pw.Close() - }() - - r := framer.NewLengthDelimitedFrameReader(pr) - d := &fakeDecoder{} - dec := NewDecoder(r, d) - if _, _, err := dec.Decode(nil, nil); err != nil || !bytes.Equal(d.got, frames[0]) { - t.Fatalf("unexpected %v %v", err, len(d.got)) - } - if _, _, err := dec.Decode(nil, nil); err != nil || !bytes.Equal(d.got, frames[1]) { - t.Fatalf("unexpected %v %v", err, len(d.got)) - } - if _, _, err := dec.Decode(nil, nil); err != ErrObjectTooLarge || !bytes.Equal(d.got, frames[1]) { - t.Fatalf("unexpected %v %v", err, len(d.got)) - } - if _, _, err := dec.Decode(nil, nil); err != nil || !bytes.Equal(d.got, frames[3]) { - t.Fatalf("unexpected %v %v", err, len(d.got)) - } - if _, _, err := dec.Decode(nil, nil); err != io.EOF { - t.Fatalf("unexpected %v %v", err, len(d.got)) - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning_test.go deleted file mode 100644 index f79b2a7c..00000000 --- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning_test.go +++ /dev/null @@ -1,381 +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 versioning - -import ( - "fmt" - "io" - "io/ioutil" - "reflect" - "testing" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/diff" -) - -type testDecodable struct { - Other string - Value int `json:"value"` - gvk schema.GroupVersionKind -} - -func (d *testDecodable) GetObjectKind() schema.ObjectKind { return d } -func (d *testDecodable) SetGroupVersionKind(gvk schema.GroupVersionKind) { d.gvk = gvk } -func (d *testDecodable) GroupVersionKind() schema.GroupVersionKind { return d.gvk } -func (d *testDecodable) DeepCopyObject() runtime.Object { - // no real deepcopy because these tests check for pointer equality - return d -} - -type testNestedDecodable struct { - Other string - Value int `json:"value"` - - gvk schema.GroupVersionKind - nestedCalled bool - nestedErr error -} - -func (d *testNestedDecodable) GetObjectKind() schema.ObjectKind { return d } -func (d *testNestedDecodable) SetGroupVersionKind(gvk schema.GroupVersionKind) { d.gvk = gvk } -func (d *testNestedDecodable) GroupVersionKind() schema.GroupVersionKind { return d.gvk } -func (d *testNestedDecodable) DeepCopyObject() runtime.Object { - // no real deepcopy because these tests check for pointer equality - return d -} - -func (d *testNestedDecodable) EncodeNestedObjects(e runtime.Encoder) error { - d.nestedCalled = true - return d.nestedErr -} - -func (d *testNestedDecodable) DecodeNestedObjects(_ runtime.Decoder) error { - d.nestedCalled = true - return d.nestedErr -} - -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) - if _, _, err := codec.Decode([]byte(`{}`), nil, n); err != n.nestedErr { - t.Errorf("unexpected error: %v", err) - } - if !n.nestedCalled { - t.Errorf("did not invoke nested decoder") - } -} - -func TestNestedEncode(t *testing.T) { - n := &testNestedDecodable{nestedErr: fmt.Errorf("unable to decode")} - n2 := &testNestedDecodable{nestedErr: fmt.Errorf("unable to decode 2")} - encoder := &mockSerializer{obj: n} - codec := NewCodec( - encoder, nil, - &checkConvertor{obj: n2, groupVersion: schema.GroupVersion{Group: "other"}}, - nil, - &mockTyper{gvks: []schema.GroupVersionKind{{Kind: "test"}}}, - nil, - schema.GroupVersion{Group: "other"}, nil, - ) - if err := codec.Encode(n, ioutil.Discard); err != n2.nestedErr { - t.Errorf("unexpected error: %v", err) - } - if n.nestedCalled || !n2.nestedCalled { - t.Errorf("did not invoke correct nested decoder") - } -} - -func TestDecode(t *testing.T) { - gvk1 := &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"} - decodable1 := &testDecodable{} - decodable2 := &testDecodable{} - decodable3 := &testDecodable{} - versionedDecodable1 := &runtime.VersionedObjects{Objects: []runtime.Object{decodable1}} - - testCases := []struct { - serializer runtime.Serializer - convertor runtime.ObjectConvertor - creater runtime.ObjectCreater - typer runtime.ObjectTyper - defaulter runtime.ObjectDefaulter - yaml bool - pretty bool - - encodes, decodes runtime.GroupVersioner - - defaultGVK *schema.GroupVersionKind - into runtime.Object - - errFn func(error) bool - expectedObject runtime.Object - sameObject runtime.Object - expectedGVK *schema.GroupVersionKind - }{ - { - serializer: &mockSerializer{actual: gvk1}, - convertor: &checkConvertor{groupVersion: schema.GroupVersion{Group: "other", Version: runtime.APIVersionInternal}}, - expectedGVK: gvk1, - 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: runtime.APIVersionInternal}}, - expectedGVK: gvk1, - sameObject: decodable2, - 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: runtime.APIVersionInternal}}, - expectedGVK: gvk1, - sameObject: decodable2, - decodes: schema.GroupVersion{Group: "force", Version: runtime.APIVersionInternal}, - }, - // uses direct conversion for into when objects differ - { - into: decodable3, - serializer: &mockSerializer{actual: gvk1, obj: decodable1}, - convertor: &checkConvertor{in: decodable1, obj: decodable3, directConvert: true}, - expectedGVK: gvk1, - sameObject: decodable3, - }, - { - into: versionedDecodable1, - serializer: &mockSerializer{actual: gvk1, obj: decodable3}, - convertor: &checkConvertor{in: decodable3, obj: decodable1, directConvert: true}, - expectedGVK: gvk1, - sameObject: versionedDecodable1, - }, - // returns directly when serializer returns into - { - into: decodable3, - serializer: &mockSerializer{actual: gvk1, obj: decodable3}, - expectedGVK: gvk1, - sameObject: decodable3, - }, - // returns directly when serializer returns into - { - into: versionedDecodable1, - serializer: &mockSerializer{actual: gvk1, obj: decodable1}, - expectedGVK: gvk1, - sameObject: versionedDecodable1, - }, - - // runtime.VersionedObjects are decoded - { - into: &runtime.VersionedObjects{Objects: []runtime.Object{}}, - - serializer: &mockSerializer{actual: gvk1, obj: decodable1}, - 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: runtime.APIVersionInternal}, - }, - - // decode into the same version as the serialized object - { - decodes: schema.GroupVersions{gvk1.GroupVersion()}, - - serializer: &mockSerializer{actual: gvk1, obj: decodable1}, - convertor: &checkConvertor{in: decodable1, obj: decodable1, groupVersion: schema.GroupVersions{{Group: "other", Version: "blah"}}}, - expectedGVK: gvk1, - expectedObject: decodable1, - }, - { - into: &runtime.VersionedObjects{Objects: []runtime.Object{}}, - decodes: schema.GroupVersions{gvk1.GroupVersion()}, - - serializer: &mockSerializer{actual: gvk1, obj: decodable1}, - convertor: &checkConvertor{in: decodable1, obj: decodable1, groupVersion: schema.GroupVersions{{Group: "other", Version: "blah"}}}, - expectedGVK: gvk1, - expectedObject: &runtime.VersionedObjects{Objects: []runtime.Object{decodable1}}, - }, - - // codec with non matching version skips conversion altogether - { - decodes: schema.GroupVersions{{Group: "something", Version: "else"}}, - - serializer: &mockSerializer{actual: gvk1, obj: decodable1}, - convertor: &checkConvertor{in: decodable1, obj: decodable1, groupVersion: schema.GroupVersions{{Group: "something", Version: "else"}}}, - expectedGVK: gvk1, - expectedObject: decodable1, - }, - { - into: &runtime.VersionedObjects{Objects: []runtime.Object{}}, - decodes: schema.GroupVersions{{Group: "something", Version: "else"}}, - - serializer: &mockSerializer{actual: gvk1, obj: decodable1}, - convertor: &checkConvertor{in: decodable1, obj: decodable1, groupVersion: schema.GroupVersions{{Group: "something", Version: "else"}}}, - expectedGVK: gvk1, - expectedObject: &runtime.VersionedObjects{Objects: []runtime.Object{decodable1}}, - }, - } - - 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) - obj, gvk, err := s.Decode([]byte(`{}`), test.defaultGVK, test.into) - - if !reflect.DeepEqual(test.expectedGVK, gvk) { - t.Errorf("%d: unexpected GVK: %v", i, gvk) - } - - switch { - case err == nil && test.errFn != nil: - t.Errorf("%d: failed: %v", i, err) - continue - case err != nil && test.errFn == nil: - t.Errorf("%d: failed: %v", i, err) - continue - case err != nil: - if !test.errFn(err) { - t.Errorf("%d: failed: %v", i, err) - } - if obj != nil { - t.Errorf("%d: should have returned nil object", i) - } - continue - } - - if test.into != nil && test.into != obj { - t.Errorf("%d: expected into to be returned: %v", i, obj) - continue - } - - switch { - case test.expectedObject != nil: - if !reflect.DeepEqual(test.expectedObject, obj) { - t.Errorf("%d: unexpected object:\n%s", i, diff.ObjectGoPrintSideBySide(test.expectedObject, obj)) - } - case test.sameObject != nil: - if test.sameObject != obj { - t.Errorf("%d: unexpected object:\n%s", i, diff.ObjectGoPrintSideBySide(test.sameObject, obj)) - } - case obj != nil: - t.Errorf("%d: unexpected object: %#v", i, obj) - } - } -} - -type checkConvertor struct { - err error - in, obj runtime.Object - groupVersion runtime.GroupVersioner - directConvert bool -} - -func (c *checkConvertor) Convert(in, out, context interface{}) error { - if !c.directConvert { - return fmt.Errorf("unexpected call to Convert") - } - if c.in != nil && c.in != in { - return fmt.Errorf("unexpected in: %s", in) - } - if c.obj != nil && c.obj != out { - return fmt.Errorf("unexpected out: %s", out) - } - return c.err -} -func (c *checkConvertor) ConvertToVersion(in runtime.Object, outVersion runtime.GroupVersioner) (out runtime.Object, err error) { - if c.directConvert { - return nil, fmt.Errorf("unexpected call to ConvertToVersion") - } - if c.in != nil && c.in != in { - return nil, fmt.Errorf("unexpected in: %s", in) - } - if !reflect.DeepEqual(c.groupVersion, outVersion) { - return nil, fmt.Errorf("unexpected outversion: %s (%s)", outVersion, c.groupVersion) - } - return c.obj, c.err -} -func (c *checkConvertor) ConvertFieldLabel(version, kind, label, value string) (string, string, error) { - return "", "", fmt.Errorf("unexpected call to ConvertFieldLabel") -} - -type mockSerializer struct { - err error - obj runtime.Object - encodingObjGVK schema.GroupVersionKind - - defaults, actual *schema.GroupVersionKind - into runtime.Object -} - -func (s *mockSerializer) Decode(data []byte, defaults *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { - s.defaults = defaults - s.into = into - return s.obj, s.actual, s.err -} - -func (s *mockSerializer) Encode(obj runtime.Object, w io.Writer) error { - s.obj = obj - s.encodingObjGVK = obj.GetObjectKind().GroupVersionKind() - return s.err -} - -type mockCreater struct { - err error - obj runtime.Object -} - -func (c *mockCreater) New(kind schema.GroupVersionKind) (runtime.Object, error) { - return c.obj, c.err -} - -type mockTyper struct { - gvks []schema.GroupVersionKind - unversioned bool - err error -} - -func (t *mockTyper) ObjectKinds(obj runtime.Object) ([]schema.GroupVersionKind, bool, error) { - return t.gvks, t.unversioned, t.err -} - -func (t *mockTyper) Recognizes(_ schema.GroupVersionKind) bool { - return true -} - -func TestDirectCodecEncode(t *testing.T) { - serializer := mockSerializer{} - typer := mockTyper{ - gvks: []schema.GroupVersionKind{ - { - Group: "wrong_group", - Kind: "some_kind", - }, - { - Group: "expected_group", - Kind: "some_kind", - }, - }, - } - - c := DirectEncoder{ - Version: schema.GroupVersion{Group: "expected_group"}, - Encoder: &serializer, - ObjectTyper: &typer, - } - c.Encode(&testDecodable{}, ioutil.Discard) - if e, a := "expected_group", serializer.encodingObjGVK.Group; e != a { - t.Errorf("expected group to be %v, got %v", e, a) - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/swagger_doc_generator_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/swagger_doc_generator_test.go deleted file mode 100644 index a6f338d3..00000000 --- a/vendor/k8s.io/apimachinery/pkg/runtime/swagger_doc_generator_test.go +++ /dev/null @@ -1,43 +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 runtime - -import ( - "testing" -) - -func TestFmtRawDoc(t *testing.T) { - tests := []struct { - t, expected string - }{ - {"aaa\n --- asd\n TODO: tooooodo\n toooodoooooo\n", "aaa"}, - {"aaa\nasd\n TODO: tooooodo\nbbbb\n --- toooodoooooo\n", "aaa asd bbbb"}, - {" TODO: tooooodo\n", ""}, - {"Par1\n\nPar2\n\n", "Par1\\n\\nPar2"}, - {"", ""}, - {" ", ""}, - {" \n", ""}, - {" \n\n ", ""}, - {"Example:\n\tl1\n\t\tl2\n", "Example:\\n\\tl1\\n\\t\\tl2"}, - } - - for _, test := range tests { - if o := fmtRawDoc(test.t); o != test.expected { - t.Fatalf("Expected: %q, got %q", test.expected, o) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/cache/cache_test.go b/vendor/k8s.io/apimachinery/pkg/util/cache/cache_test.go deleted file mode 100644 index 42a58a93..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/cache/cache_test.go +++ /dev/null @@ -1,90 +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 cache - -import ( - "testing" -) - -const ( - maxTestCacheSize int = shardsCount * 2 -) - -func ExpectEntry(t *testing.T, cache Cache, index uint64, expectedValue interface{}) bool { - elem, found := cache.Get(index) - if !found { - t.Errorf("Expected to find entry with key %d", index) - return false - } else if elem != expectedValue { - t.Errorf("Expected to find %v, got %v", expectedValue, elem) - return false - } - return true -} - -func TestBasic(t *testing.T) { - cache := NewCache(maxTestCacheSize) - cache.Add(1, "xxx") - ExpectEntry(t, cache, 1, "xxx") -} - -func TestOverflow(t *testing.T) { - cache := NewCache(maxTestCacheSize) - for i := 0; i < maxTestCacheSize+1; i++ { - cache.Add(uint64(i), "xxx") - } - foundIndexes := make([]uint64, 0) - for i := 0; i < maxTestCacheSize+1; i++ { - _, found := cache.Get(uint64(i)) - if found { - foundIndexes = append(foundIndexes, uint64(i)) - } - } - if len(foundIndexes) != maxTestCacheSize { - t.Errorf("Expect to find %d elements, got %d %v", maxTestCacheSize, len(foundIndexes), foundIndexes) - } -} - -func TestOverwrite(t *testing.T) { - cache := NewCache(maxTestCacheSize) - cache.Add(1, "xxx") - ExpectEntry(t, cache, 1, "xxx") - cache.Add(1, "yyy") - ExpectEntry(t, cache, 1, "yyy") -} - -// TestEvict this test will fail sporatically depending on what add() -// selects for the randomKey to be evicted. Ensure that randomKey -// is never the key we most recently added. Since the chance of failure -// on each evict is 50%, if we do it 7 times, it should catch the problem -// if it exists >99% of the time. -func TestEvict(t *testing.T) { - cache := NewCache(shardsCount) - var found bool - for retry := 0; retry < 7; retry++ { - cache.Add(uint64(shardsCount), "xxx") - found = ExpectEntry(t, cache, uint64(shardsCount), "xxx") - if !found { - break - } - cache.Add(0, "xxx") - found = ExpectEntry(t, cache, 0, "xxx") - if !found { - break - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/cache/lruexpirecache_test.go b/vendor/k8s.io/apimachinery/pkg/util/cache/lruexpirecache_test.go deleted file mode 100644 index bd44f60d..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/cache/lruexpirecache_test.go +++ /dev/null @@ -1,68 +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 cache - -import ( - "testing" - "time" - - "k8s.io/apimachinery/pkg/util/clock" - - "github.com/golang/groupcache/lru" -) - -func expectEntry(t *testing.T, c *LRUExpireCache, key lru.Key, value interface{}) { - result, ok := c.Get(key) - if !ok || result != value { - t.Errorf("Expected cache[%v]: %v, got %v", key, value, result) - } -} - -func expectNotEntry(t *testing.T, c *LRUExpireCache, key lru.Key) { - if result, ok := c.Get(key); ok { - t.Errorf("Expected cache[%v] to be empty, got %v", key, result) - } -} - -func TestSimpleGet(t *testing.T) { - c := NewLRUExpireCache(10) - c.Add("long-lived", "12345", 10*time.Hour) - expectEntry(t, c, "long-lived", "12345") -} - -func TestExpiredGet(t *testing.T) { - fakeClock := clock.NewFakeClock(time.Now()) - c := NewLRUExpireCacheWithClock(10, fakeClock) - c.Add("short-lived", "12345", 1*time.Millisecond) - // ensure the entry expired - fakeClock.Step(2 * time.Millisecond) - expectNotEntry(t, c, "short-lived") -} - -func TestLRUOverflow(t *testing.T) { - c := NewLRUExpireCache(4) - c.Add("elem1", "1", 10*time.Hour) - c.Add("elem2", "2", 10*time.Hour) - c.Add("elem3", "3", 10*time.Hour) - c.Add("elem4", "4", 10*time.Hour) - c.Add("elem5", "5", 10*time.Hour) - expectNotEntry(t, c, "elem1") - expectEntry(t, c, "elem2", "2") - expectEntry(t, c, "elem3", "3") - expectEntry(t, c, "elem4", "4") - expectEntry(t, c, "elem5", "5") -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/clock/clock_test.go b/vendor/k8s.io/apimachinery/pkg/util/clock/clock_test.go deleted file mode 100644 index c7b371fc..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/clock/clock_test.go +++ /dev/null @@ -1,196 +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 clock - -import ( - "testing" - "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) - tc.Step(time.Second) - now := tc.Now() - if now.Sub(startTime) != time.Second { - t.Errorf("input: %s now=%s gap=%s expected=%s", startTime, now, now.Sub(startTime), time.Second) - } - - tt := tc.Now() - tc.SetTime(tt.Add(time.Hour)) - if tc.Now().Sub(tt) != time.Hour { - t.Errorf("input: %s now=%s gap=%s expected=%s", tt, tc.Now(), tc.Now().Sub(tt), time.Hour) - } -} - -func TestFakeClockSleep(t *testing.T) { - startTime := time.Now() - tc := NewFakeClock(startTime) - tc.Sleep(time.Duration(1) * time.Hour) - now := tc.Now() - if now.Sub(startTime) != time.Hour { - t.Errorf("Fake sleep failed, expected time to advance by one hour, instead, its %v", now.Sub(startTime)) - } -} - -func TestFakeAfter(t *testing.T) { - tc := NewFakeClock(time.Now()) - if tc.HasWaiters() { - t.Errorf("unexpected waiter?") - } - oneSec := tc.After(time.Second) - if !tc.HasWaiters() { - t.Errorf("unexpected lack of waiter?") - } - - oneOhOneSec := tc.After(time.Second + time.Millisecond) - twoSec := tc.After(2 * time.Second) - select { - case <-oneSec: - t.Errorf("unexpected channel read") - case <-oneOhOneSec: - t.Errorf("unexpected channel read") - case <-twoSec: - t.Errorf("unexpected channel read") - default: - } - - tc.Step(999 * time.Millisecond) - select { - case <-oneSec: - t.Errorf("unexpected channel read") - case <-oneOhOneSec: - t.Errorf("unexpected channel read") - case <-twoSec: - t.Errorf("unexpected channel read") - default: - } - - tc.Step(time.Millisecond) - select { - case <-oneSec: - // Expected! - case <-oneOhOneSec: - t.Errorf("unexpected channel read") - case <-twoSec: - t.Errorf("unexpected channel read") - default: - t.Errorf("unexpected non-channel read") - } - tc.Step(time.Millisecond) - select { - case <-oneSec: - // should not double-trigger! - t.Errorf("unexpected channel read") - case <-oneOhOneSec: - // Expected! - case <-twoSec: - t.Errorf("unexpected channel read") - default: - t.Errorf("unexpected non-channel read") - } -} - -func TestFakeTick(t *testing.T) { - tc := NewFakeClock(time.Now()) - if tc.HasWaiters() { - t.Errorf("unexpected waiter?") - } - oneSec := tc.NewTicker(time.Second).C() - if !tc.HasWaiters() { - t.Errorf("unexpected lack of waiter?") - } - - oneOhOneSec := tc.NewTicker(time.Second + time.Millisecond).C() - twoSec := tc.NewTicker(2 * time.Second).C() - select { - case <-oneSec: - t.Errorf("unexpected channel read") - case <-oneOhOneSec: - t.Errorf("unexpected channel read") - case <-twoSec: - t.Errorf("unexpected channel read") - default: - } - - tc.Step(999 * time.Millisecond) // t=.999 - select { - case <-oneSec: - t.Errorf("unexpected channel read") - case <-oneOhOneSec: - t.Errorf("unexpected channel read") - case <-twoSec: - t.Errorf("unexpected channel read") - default: - } - - tc.Step(time.Millisecond) // t=1.000 - select { - case <-oneSec: - // Expected! - case <-oneOhOneSec: - t.Errorf("unexpected channel read") - case <-twoSec: - t.Errorf("unexpected channel read") - default: - t.Errorf("unexpected non-channel read") - } - tc.Step(time.Millisecond) // t=1.001 - select { - case <-oneSec: - // should not double-trigger! - t.Errorf("unexpected channel read") - case <-oneOhOneSec: - // Expected! - case <-twoSec: - t.Errorf("unexpected channel read") - default: - t.Errorf("unexpected non-channel read") - } - - tc.Step(time.Second) // t=2.001 - tc.Step(time.Second) // t=3.001 - tc.Step(time.Second) // t=4.001 - tc.Step(time.Second) // t=5.001 - - // The one second ticker should not accumulate ticks - accumulatedTicks := 0 - drained := false - for !drained { - select { - case <-oneSec: - accumulatedTicks++ - default: - drained = true - } - } - if accumulatedTicks != 1 { - t.Errorf("unexpected number of accumulated ticks: %d", accumulatedTicks) - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/diff/diff_test.go b/vendor/k8s.io/apimachinery/pkg/util/diff/diff_test.go deleted file mode 100644 index d26dba81..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/diff/diff_test.go +++ /dev/null @@ -1,143 +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 diff - -import ( - "testing" -) - -func TestObjectReflectDiff(t *testing.T) { - type struct1 struct{ A []int } - - testCases := map[string]struct { - a, b interface{} - out string - }{ - "map": { - a: map[string]int{}, - b: map[string]int{}, - }, - "detect nil map": { - a: map[string]int(nil), - b: map[string]int{}, - out: ` -object: - a: map[string]int(nil) - b: map[string]int{}`, - }, - "detect map changes": { - a: map[string]int{"test": 1, "other": 2}, - b: map[string]int{"test": 2, "third": 3}, - out: ` -object[other]: - a: 2 - b: -object[test]: - a: 1 - b: 2 -object[third]: - a: - b: 3`, - }, - "nil slice": {a: struct1{A: nil}, b: struct1{A: nil}}, - "empty slice": {a: struct1{A: []int{}}, b: struct1{A: []int{}}}, - "detect slice changes 1": {a: struct1{A: []int{1}}, b: struct1{A: []int{2}}, out: ` -object.A[0]: - a: 1 - b: 2`, - }, - "detect slice changes 2": {a: struct1{A: []int{}}, b: struct1{A: []int{2}}, out: ` -object.A[0]: - a: - b: 2`, - }, - "detect slice changes 3": {a: struct1{A: []int{1}}, b: struct1{A: []int{}}, out: ` -object.A[0]: - a: 1 - b: `, - }, - "detect nil vs empty slices": {a: struct1{A: nil}, b: struct1{A: []int{}}, out: ` -object.A: - a: []int(nil) - b: []int{}`, - }, - } - for name, test := range testCases { - expect := test.out - if len(expect) == 0 { - expect = "" - } - if actual := ObjectReflectDiff(test.a, test.b); actual != expect { - t.Errorf("%s: unexpected output: %s", name, actual) - } - } -} - -func TestStringDiff(t *testing.T) { - diff := StringDiff("aaabb", "aaacc") - expect := "aaa\n\nA: bb\n\nB: cc\n\n" - if diff != expect { - 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/vendor/k8s.io/apimachinery/pkg/util/errors/errors_test.go b/vendor/k8s.io/apimachinery/pkg/util/errors/errors_test.go deleted file mode 100644 index 0ad3967d..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/errors/errors_test.go +++ /dev/null @@ -1,368 +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 errors - -import ( - "fmt" - "reflect" - "sort" - "testing" -) - -func TestEmptyAggregate(t *testing.T) { - var slice []error - var agg Aggregate - var err error - - agg = NewAggregate(slice) - if agg != nil { - t.Errorf("expected nil, got %#v", agg) - } - err = NewAggregate(slice) - if err != nil { - t.Errorf("expected nil, got %#v", err) - } - - // This is not normally possible, but pedantry demands I test it. - agg = aggregate(slice) // empty aggregate - if s := agg.Error(); s != "" { - t.Errorf("expected empty string, got %q", s) - } - if s := agg.Errors(); len(s) != 0 { - t.Errorf("expected empty slice, got %#v", s) - } - err = agg.(error) - if s := err.Error(); s != "" { - t.Errorf("expected empty string, got %q", s) - } -} - -func TestAggregateWithNil(t *testing.T) { - var slice []error - slice = []error{nil} - var agg Aggregate - var err error - - agg = NewAggregate(slice) - if agg != nil { - t.Errorf("expected nil, got %#v", agg) - } - err = NewAggregate(slice) - if err != nil { - t.Errorf("expected nil, got %#v", err) - } - - // Append a non-nil error - slice = append(slice, fmt.Errorf("err")) - agg = NewAggregate(slice) - if agg == nil { - t.Errorf("expected non-nil") - } - if s := agg.Error(); s != "err" { - t.Errorf("expected 'err', got %q", s) - } - if s := agg.Errors(); len(s) != 1 { - t.Errorf("expected one-element slice, got %#v", s) - } - if s := agg.Errors()[0].Error(); s != "err" { - t.Errorf("expected 'err', got %q", s) - } - - err = agg.(error) - if err == nil { - t.Errorf("expected non-nil") - } - if s := err.Error(); s != "err" { - t.Errorf("expected 'err', got %q", s) - } -} - -func TestSingularAggregate(t *testing.T) { - var slice []error = []error{fmt.Errorf("err")} - var agg Aggregate - var err error - - agg = NewAggregate(slice) - if agg == nil { - t.Errorf("expected non-nil") - } - if s := agg.Error(); s != "err" { - t.Errorf("expected 'err', got %q", s) - } - if s := agg.Errors(); len(s) != 1 { - t.Errorf("expected one-element slice, got %#v", s) - } - if s := agg.Errors()[0].Error(); s != "err" { - t.Errorf("expected 'err', got %q", s) - } - - err = agg.(error) - if err == nil { - t.Errorf("expected non-nil") - } - if s := err.Error(); s != "err" { - t.Errorf("expected 'err', got %q", s) - } -} - -func TestPluralAggregate(t *testing.T) { - var slice []error = []error{fmt.Errorf("abc"), fmt.Errorf("123")} - var agg Aggregate - var err error - - agg = NewAggregate(slice) - if agg == nil { - t.Errorf("expected non-nil") - } - if s := agg.Error(); s != "[abc, 123]" { - t.Errorf("expected '[abc, 123]', got %q", s) - } - if s := agg.Errors(); len(s) != 2 { - t.Errorf("expected two-elements slice, got %#v", s) - } - if s := agg.Errors()[0].Error(); s != "abc" { - t.Errorf("expected '[abc, 123]', got %q", s) - } - - err = agg.(error) - if err == nil { - t.Errorf("expected non-nil") - } - if s := err.Error(); s != "[abc, 123]" { - t.Errorf("expected '[abc, 123]', got %q", s) - } -} - -func TestFilterOut(t *testing.T) { - testCases := []struct { - err error - filter []Matcher - expected error - }{ - { - nil, - []Matcher{}, - nil, - }, - { - aggregate{}, - []Matcher{}, - nil, - }, - { - aggregate{fmt.Errorf("abc")}, - []Matcher{}, - aggregate{fmt.Errorf("abc")}, - }, - { - aggregate{fmt.Errorf("abc")}, - []Matcher{func(err error) bool { return false }}, - aggregate{fmt.Errorf("abc")}, - }, - { - aggregate{fmt.Errorf("abc")}, - []Matcher{func(err error) bool { return true }}, - nil, - }, - { - aggregate{fmt.Errorf("abc")}, - []Matcher{func(err error) bool { return false }, func(err error) bool { return false }}, - aggregate{fmt.Errorf("abc")}, - }, - { - aggregate{fmt.Errorf("abc")}, - []Matcher{func(err error) bool { return false }, func(err error) bool { return true }}, - nil, - }, - { - aggregate{fmt.Errorf("abc"), fmt.Errorf("def"), fmt.Errorf("ghi")}, - []Matcher{func(err error) bool { return err.Error() == "def" }}, - aggregate{fmt.Errorf("abc"), fmt.Errorf("ghi")}, - }, - { - aggregate{aggregate{fmt.Errorf("abc")}}, - []Matcher{}, - aggregate{aggregate{fmt.Errorf("abc")}}, - }, - { - aggregate{aggregate{fmt.Errorf("abc"), aggregate{fmt.Errorf("def")}}}, - []Matcher{}, - aggregate{aggregate{fmt.Errorf("abc"), aggregate{fmt.Errorf("def")}}}, - }, - { - aggregate{aggregate{fmt.Errorf("abc"), aggregate{fmt.Errorf("def")}}}, - []Matcher{func(err error) bool { return err.Error() == "def" }}, - aggregate{aggregate{fmt.Errorf("abc")}}, - }, - } - for i, testCase := range testCases { - err := FilterOut(testCase.err, testCase.filter...) - if !reflect.DeepEqual(testCase.expected, err) { - t.Errorf("%d: expected %v, got %v", i, testCase.expected, err) - } - } -} - -func TestFlatten(t *testing.T) { - testCases := []struct { - agg Aggregate - expected Aggregate - }{ - { - nil, - nil, - }, - { - aggregate{}, - nil, - }, - { - aggregate{fmt.Errorf("abc")}, - aggregate{fmt.Errorf("abc")}, - }, - { - aggregate{fmt.Errorf("abc"), fmt.Errorf("def"), fmt.Errorf("ghi")}, - aggregate{fmt.Errorf("abc"), fmt.Errorf("def"), fmt.Errorf("ghi")}, - }, - { - aggregate{aggregate{fmt.Errorf("abc")}}, - aggregate{fmt.Errorf("abc")}, - }, - { - aggregate{aggregate{aggregate{fmt.Errorf("abc")}}}, - aggregate{fmt.Errorf("abc")}, - }, - { - aggregate{aggregate{fmt.Errorf("abc"), aggregate{fmt.Errorf("def")}}}, - aggregate{fmt.Errorf("abc"), fmt.Errorf("def")}, - }, - { - aggregate{aggregate{aggregate{fmt.Errorf("abc")}, fmt.Errorf("def"), aggregate{fmt.Errorf("ghi")}}}, - aggregate{fmt.Errorf("abc"), fmt.Errorf("def"), fmt.Errorf("ghi")}, - }, - } - for i, testCase := range testCases { - agg := Flatten(testCase.agg) - if !reflect.DeepEqual(testCase.expected, agg) { - t.Errorf("%d: expected %v, got %v", i, testCase.expected, agg) - } - } -} - -func TestCreateAggregateFromMessageCountMap(t *testing.T) { - testCases := []struct { - name string - mcm MessageCountMap - expected Aggregate - }{ - { - "input has single instance of one message", - MessageCountMap{"abc": 1}, - aggregate{fmt.Errorf("abc")}, - }, - { - "input has multiple messages", - MessageCountMap{"abc": 2, "ghi": 1}, - aggregate{fmt.Errorf("abc (repeated 2 times)"), fmt.Errorf("ghi")}, - }, - { - "input has multiple messages", - MessageCountMap{"ghi": 1, "abc": 2}, - aggregate{fmt.Errorf("abc (repeated 2 times)"), fmt.Errorf("ghi")}, - }, - } - - var expected, agg []error - for _, testCase := range testCases { - t.Run(testCase.name, func(t *testing.T) { - if testCase.expected != nil { - expected = testCase.expected.Errors() - sort.Slice(expected, func(i, j int) bool { return expected[i].Error() < expected[j].Error() }) - } - if testCase.mcm != nil { - agg = CreateAggregateFromMessageCountMap(testCase.mcm).Errors() - sort.Slice(agg, func(i, j int) bool { return agg[i].Error() < agg[j].Error() }) - } - if !reflect.DeepEqual(expected, agg) { - t.Errorf("expected %v, got %v", expected, agg) - } - }) - } -} - -func TestAggregateGoroutines(t *testing.T) { - testCases := []struct { - errs []error - expected map[string]bool // can't compare directly to Aggregate due to non-deterministic ordering - }{ - { - []error{}, - nil, - }, - { - []error{nil}, - nil, - }, - { - []error{nil, nil}, - nil, - }, - { - []error{fmt.Errorf("1")}, - map[string]bool{"1": true}, - }, - { - []error{fmt.Errorf("1"), nil}, - map[string]bool{"1": true}, - }, - { - []error{fmt.Errorf("1"), fmt.Errorf("267")}, - map[string]bool{"1": true, "267": true}, - }, - { - []error{fmt.Errorf("1"), nil, fmt.Errorf("1234")}, - map[string]bool{"1": true, "1234": true}, - }, - { - []error{nil, fmt.Errorf("1"), nil, fmt.Errorf("1234"), fmt.Errorf("22")}, - map[string]bool{"1": true, "1234": true, "22": true}, - }, - } - for i, testCase := range testCases { - funcs := make([]func() error, len(testCase.errs)) - for i := range testCase.errs { - err := testCase.errs[i] - funcs[i] = func() error { return err } - } - agg := AggregateGoroutines(funcs...) - if agg == nil { - if len(testCase.expected) > 0 { - t.Errorf("%d: expected %v, got nil", i, testCase.expected) - } - continue - } - if len(agg.Errors()) != len(testCase.expected) { - t.Errorf("%d: expected %d errors in aggregate, got %v", i, len(testCase.expected), agg) - continue - } - for _, err := range agg.Errors() { - if !testCase.expected[err.Error()] { - t.Errorf("%d: expected %v, got aggregate containing %v", i, testCase.expected, err) - } - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/framer/framer_test.go b/vendor/k8s.io/apimachinery/pkg/util/framer/framer_test.go deleted file mode 100644 index b7ed00f5..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/framer/framer_test.go +++ /dev/null @@ -1,176 +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 framer - -import ( - "bytes" - "io" - "io/ioutil" - "testing" -) - -func TestRead(t *testing.T) { - data := []byte{ - 0x00, 0x00, 0x00, 0x04, - 0x01, 0x02, 0x03, 0x04, - 0x00, 0x00, 0x00, 0x03, - 0x05, 0x06, 0x07, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, - 0x08, - } - b := bytes.NewBuffer(data) - r := NewLengthDelimitedFrameReader(ioutil.NopCloser(b)) - buf := make([]byte, 1) - if n, err := r.Read(buf); err != io.ErrShortBuffer && n != 1 && bytes.Equal(buf, []byte{0x01}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - if n, err := r.Read(buf); err != io.ErrShortBuffer && n != 1 && bytes.Equal(buf, []byte{0x02}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - // read the remaining frame - buf = make([]byte, 2) - if n, err := r.Read(buf); err != nil && n != 2 && bytes.Equal(buf, []byte{0x03, 0x04}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - // read with buffer equal to frame - buf = make([]byte, 3) - if n, err := r.Read(buf); err != nil && n != 3 && bytes.Equal(buf, []byte{0x05, 0x06, 0x07}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - // read empty frame - buf = make([]byte, 3) - if n, err := r.Read(buf); err != nil && n != 0 && bytes.Equal(buf, []byte{}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - // read with larger buffer than frame - buf = make([]byte, 3) - if n, err := r.Read(buf); err != nil && n != 1 && bytes.Equal(buf, []byte{0x08}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - // read EOF - if n, err := r.Read(buf); err != io.EOF && n != 0 { - t.Fatalf("unexpected: %v %d", err, n) - } -} - -func TestReadLarge(t *testing.T) { - data := []byte{ - 0x00, 0x00, 0x00, 0x04, - 0x01, 0x02, 0x03, 0x04, - 0x00, 0x00, 0x00, 0x03, - 0x05, 0x06, 0x07, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, - 0x08, - } - b := bytes.NewBuffer(data) - r := NewLengthDelimitedFrameReader(ioutil.NopCloser(b)) - buf := make([]byte, 40) - if n, err := r.Read(buf); err != nil && n != 4 && bytes.Equal(buf, []byte{0x01, 0x02, 0x03, 0x04}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - if n, err := r.Read(buf); err != nil && n != 3 && bytes.Equal(buf, []byte{0x05, 0x06, 0x7}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - if n, err := r.Read(buf); err != nil && n != 0 && bytes.Equal(buf, []byte{}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - if n, err := r.Read(buf); err != nil && n != 1 && bytes.Equal(buf, []byte{0x08}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - // read EOF - if n, err := r.Read(buf); err != io.EOF && n != 0 { - t.Fatalf("unexpected: %v %d", err, n) - } -} -func TestReadInvalidFrame(t *testing.T) { - data := []byte{ - 0x00, 0x00, 0x00, 0x04, - 0x01, 0x02, - } - b := bytes.NewBuffer(data) - r := NewLengthDelimitedFrameReader(ioutil.NopCloser(b)) - buf := make([]byte, 1) - if n, err := r.Read(buf); err != io.ErrShortBuffer && n != 1 && bytes.Equal(buf, []byte{0x01}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - // read the remaining frame - buf = make([]byte, 3) - if n, err := r.Read(buf); err != io.ErrUnexpectedEOF && n != 1 && bytes.Equal(buf, []byte{0x02}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - // read EOF - if n, err := r.Read(buf); err != io.EOF && n != 0 { - t.Fatalf("unexpected: %v %d", err, n) - } -} - -func TestJSONFrameReader(t *testing.T) { - b := bytes.NewBufferString("{\"test\":true}\n1\n[\"a\"]") - r := NewJSONFramedReader(ioutil.NopCloser(b)) - buf := make([]byte, 20) - if n, err := r.Read(buf); err != nil || n != 13 || string(buf[:n]) != `{"test":true}` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - if n, err := r.Read(buf); err != nil || n != 1 || string(buf[:n]) != `1` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - if n, err := r.Read(buf); err != nil || n != 5 || string(buf[:n]) != `["a"]` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - if n, err := r.Read(buf); err != io.EOF || n != 0 { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } -} - -func TestJSONFrameReaderShortBuffer(t *testing.T) { - b := bytes.NewBufferString("{\"test\":true}\n1\n[\"a\"]") - r := NewJSONFramedReader(ioutil.NopCloser(b)) - buf := make([]byte, 3) - - if n, err := r.Read(buf); err != io.ErrShortBuffer || n != 3 || string(buf[:n]) != `{"t` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - if n, err := r.Read(buf); err != io.ErrShortBuffer || n != 3 || string(buf[:n]) != `est` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - if n, err := r.Read(buf); err != io.ErrShortBuffer || n != 3 || string(buf[:n]) != `":t` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - if n, err := r.Read(buf); err != io.ErrShortBuffer || n != 3 || string(buf[:n]) != `rue` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - if n, err := r.Read(buf); err != nil || n != 1 || string(buf[:n]) != `}` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - - if n, err := r.Read(buf); err != nil || n != 1 || string(buf[:n]) != `1` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - - if n, err := r.Read(buf); err != io.ErrShortBuffer || n != 3 || string(buf[:n]) != `["a` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - if n, err := r.Read(buf); err != nil || n != 2 || string(buf[:n]) != `"]` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - - if n, err := r.Read(buf); err != io.EOF || n != 0 { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto deleted file mode 100644 index 1c3ec732..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT 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.apimachinery.pkg.util.intstr; - -// Package-wide variables from generator "generated". -option go_package = "intstr"; - -// IntOrString is a type that can hold an int32 or a string. When used in -// JSON or YAML marshalling and unmarshalling, it produces or consumes the -// inner type. This allows you to have, for example, a JSON field that can -// accept a name or number. -// TODO: Rename to Int32OrString -// -// +protobuf=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -// +k8s:openapi-gen=true -message IntOrString { - optional int64 type = 1; - - optional int32 intVal = 2; - - optional string strVal = 3; -} - diff --git a/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go b/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go deleted file mode 100644 index 4faba46f..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go +++ /dev/null @@ -1,176 +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 intstr - -import ( - "encoding/json" - "reflect" - "testing" - - "github.com/ghodss/yaml" -) - -func TestFromInt(t *testing.T) { - i := FromInt(93) - if i.Type != Int || i.IntVal != 93 { - t.Errorf("Expected IntVal=93, got %+v", i) - } -} - -func TestFromString(t *testing.T) { - i := FromString("76") - if i.Type != String || i.StrVal != "76" { - t.Errorf("Expected StrVal=\"76\", got %+v", i) - } -} - -type IntOrStringHolder struct { - IOrS IntOrString `json:"val"` -} - -func TestIntOrStringUnmarshalJSON(t *testing.T) { - cases := []struct { - input string - result IntOrString - }{ - {"{\"val\": 123}", FromInt(123)}, - {"{\"val\": \"123\"}", FromString("123")}, - } - - for _, c := range cases { - var result IntOrStringHolder - if err := json.Unmarshal([]byte(c.input), &result); err != nil { - t.Errorf("Failed to unmarshal input '%v': %v", c.input, err) - } - if result.IOrS != c.result { - t.Errorf("Failed to unmarshal input '%v': expected %+v, got %+v", c.input, c.result, result) - } - } -} - -func TestIntOrStringMarshalJSON(t *testing.T) { - cases := []struct { - input IntOrString - result string - }{ - {FromInt(123), "{\"val\":123}"}, - {FromString("123"), "{\"val\":\"123\"}"}, - } - - for _, c := range cases { - input := IntOrStringHolder{c.input} - result, err := json.Marshal(&input) - if err != nil { - t.Errorf("Failed to marshal input '%v': %v", input, err) - } - if string(result) != c.result { - t.Errorf("Failed to marshal input '%v': expected: %+v, got %q", input, c.result, string(result)) - } - } -} - -func TestIntOrStringMarshalJSONUnmarshalYAML(t *testing.T) { - cases := []struct { - input IntOrString - }{ - {FromInt(123)}, - {FromString("123")}, - } - - for _, c := range cases { - input := IntOrStringHolder{c.input} - jsonMarshalled, err := json.Marshal(&input) - if err != nil { - t.Errorf("1: Failed to marshal input: '%v': %v", input, err) - } - - var result IntOrStringHolder - err = yaml.Unmarshal(jsonMarshalled, &result) - if err != nil { - t.Errorf("2: Failed to unmarshal '%+v': %v", string(jsonMarshalled), err) - } - - if !reflect.DeepEqual(input, result) { - t.Errorf("3: Failed to marshal input '%+v': got %+v", input, result) - } - } -} - -func TestGetValueFromIntOrPercent(t *testing.T) { - tests := []struct { - input IntOrString - total int - roundUp bool - expectErr bool - expectVal int - }{ - { - input: FromInt(123), - expectErr: false, - expectVal: 123, - }, - { - input: FromString("90%"), - total: 100, - roundUp: true, - expectErr: false, - expectVal: 90, - }, - { - input: FromString("90%"), - total: 95, - roundUp: true, - expectErr: false, - expectVal: 86, - }, - { - input: FromString("90%"), - total: 95, - roundUp: false, - expectErr: false, - expectVal: 85, - }, - { - input: FromString("%"), - expectErr: true, - }, - { - input: FromString("90#"), - expectErr: true, - }, - { - input: FromString("#%"), - expectErr: true, - }, - } - - for i, test := range tests { - t.Logf("test case %d", i) - value, err := GetValueFromIntOrPercent(&test.input, test.total, test.roundUp) - if test.expectErr && err == nil { - t.Errorf("expected error, but got none") - continue - } - if !test.expectErr && err != nil { - t.Errorf("unexpected err: %v", err) - continue - } - if test.expectVal != value { - t.Errorf("expected %v, but got %v", test.expectVal, value) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/json/json_test.go b/vendor/k8s.io/apimachinery/pkg/util/json/json_test.go deleted file mode 100644 index cd0c18bb..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/json/json_test.go +++ /dev/null @@ -1,319 +0,0 @@ -// +build go1.8 - -/* -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 json - -import ( - "fmt" - "math" - "reflect" - "strconv" - "strings" - "testing" -) - -func TestEvaluateTypes(t *testing.T) { - testCases := []struct { - In string - Data interface{} - Out string - Err bool - }{ - // Invalid syntaxes - { - In: `x`, - Err: true, - }, - { - In: ``, - Err: true, - }, - - // Null - { - In: `null`, - Data: nil, - Out: `null`, - }, - // Booleans - { - In: `true`, - Data: true, - Out: `true`, - }, - { - In: `false`, - Data: false, - Out: `false`, - }, - - // Integers - { - In: `0`, - Data: int64(0), - Out: `0`, - }, - { - In: `-0`, - Data: int64(-0), - Out: `0`, - }, - { - In: `1`, - Data: int64(1), - Out: `1`, - }, - { - In: `2147483647`, - Data: int64(math.MaxInt32), - Out: `2147483647`, - }, - { - In: `-2147483648`, - Data: int64(math.MinInt32), - Out: `-2147483648`, - }, - { - In: `9223372036854775807`, - Data: int64(math.MaxInt64), - Out: `9223372036854775807`, - }, - { - In: `-9223372036854775808`, - Data: int64(math.MinInt64), - Out: `-9223372036854775808`, - }, - - // Int overflow - { - In: `9223372036854775808`, // MaxInt64 + 1 - Data: float64(9223372036854775808), - Out: `9223372036854776000`, - }, - { - In: `-9223372036854775809`, // MinInt64 - 1 - Data: float64(math.MinInt64), - Out: `-9223372036854776000`, - }, - - // Floats - { - In: `0.0`, - Data: float64(0), - Out: `0`, - }, - { - In: `-0.0`, - Data: float64(-0.0), - Out: `-0`, - }, - { - In: `0.5`, - Data: float64(0.5), - Out: `0.5`, - }, - { - In: `1e3`, - Data: float64(1e3), - Out: `1000`, - }, - { - In: `1.5`, - Data: float64(1.5), - Out: `1.5`, - }, - { - In: `-0.3`, - Data: float64(-.3), - Out: `-0.3`, - }, - { - // Largest representable float32 - In: `3.40282346638528859811704183484516925440e+38`, - Data: float64(math.MaxFloat32), - Out: strconv.FormatFloat(math.MaxFloat32, 'g', -1, 64), - }, - { - // Smallest float32 without losing precision - In: `1.175494351e-38`, - Data: float64(1.175494351e-38), - Out: `1.175494351e-38`, - }, - { - // float32 closest to zero - In: `1.401298464324817070923729583289916131280e-45`, - Data: float64(math.SmallestNonzeroFloat32), - Out: strconv.FormatFloat(math.SmallestNonzeroFloat32, 'g', -1, 64), - }, - { - // Largest representable float64 - In: `1.797693134862315708145274237317043567981e+308`, - Data: float64(math.MaxFloat64), - Out: strconv.FormatFloat(math.MaxFloat64, 'g', -1, 64), - }, - { - // Closest to zero without losing precision - In: `2.2250738585072014e-308`, - Data: float64(2.2250738585072014e-308), - Out: `2.2250738585072014e-308`, - }, - - { - // float64 closest to zero - In: `4.940656458412465441765687928682213723651e-324`, - Data: float64(math.SmallestNonzeroFloat64), - Out: strconv.FormatFloat(math.SmallestNonzeroFloat64, 'g', -1, 64), - }, - - { - // math.MaxFloat64 + 2 overflow - In: `1.7976931348623159e+308`, - Err: true, - }, - - // Strings - { - In: `""`, - Data: string(""), - Out: `""`, - }, - { - In: `"0"`, - Data: string("0"), - Out: `"0"`, - }, - { - In: `"A"`, - Data: string("A"), - Out: `"A"`, - }, - { - In: `"Iñtërnâtiônàlizætiøn"`, - Data: string("Iñtërnâtiônàlizætiøn"), - Out: `"Iñtërnâtiônàlizætiøn"`, - }, - - // Arrays - { - In: `[]`, - Data: []interface{}{}, - Out: `[]`, - }, - { - In: `[` + strings.Join([]string{ - `null`, - `true`, - `false`, - `0`, - `9223372036854775807`, - `0.0`, - `0.5`, - `1.0`, - `1.797693134862315708145274237317043567981e+308`, - `"0"`, - `"A"`, - `"Iñtërnâtiônàlizætiøn"`, - `[null,true,1,1.0,1.5]`, - `{"boolkey":true,"floatkey":1.0,"intkey":1,"nullkey":null}`, - }, ",") + `]`, - Data: []interface{}{ - nil, - true, - false, - int64(0), - int64(math.MaxInt64), - float64(0.0), - float64(0.5), - float64(1.0), - float64(math.MaxFloat64), - string("0"), - string("A"), - string("Iñtërnâtiônàlizætiøn"), - []interface{}{nil, true, int64(1), float64(1.0), float64(1.5)}, - map[string]interface{}{"nullkey": nil, "boolkey": true, "intkey": int64(1), "floatkey": float64(1.0)}, - }, - Out: `[` + strings.Join([]string{ - `null`, - `true`, - `false`, - `0`, - `9223372036854775807`, - `0`, - `0.5`, - `1`, - strconv.FormatFloat(math.MaxFloat64, 'g', -1, 64), - `"0"`, - `"A"`, - `"Iñtërnâtiônàlizætiøn"`, - `[null,true,1,1,1.5]`, - `{"boolkey":true,"floatkey":1,"intkey":1,"nullkey":null}`, // gets alphabetized by Marshal - }, ",") + `]`, - }, - - // Maps - { - In: `{}`, - Data: map[string]interface{}{}, - Out: `{}`, - }, - { - In: `{"boolkey":true,"floatkey":1.0,"intkey":1,"nullkey":null}`, - Data: map[string]interface{}{"nullkey": nil, "boolkey": true, "intkey": int64(1), "floatkey": float64(1.0)}, - Out: `{"boolkey":true,"floatkey":1,"intkey":1,"nullkey":null}`, // gets alphabetized by Marshal - }, - } - - for _, tc := range testCases { - inputJSON := fmt.Sprintf(`{"data":%s}`, tc.In) - expectedJSON := fmt.Sprintf(`{"data":%s}`, tc.Out) - m := map[string]interface{}{} - err := Unmarshal([]byte(inputJSON), &m) - if tc.Err && err != nil { - // Expected error - continue - } - if err != nil { - t.Errorf("%s: error decoding: %v", tc.In, err) - continue - } - if tc.Err { - t.Errorf("%s: expected error, got none", tc.In) - continue - } - data, ok := m["data"] - if !ok { - t.Errorf("%s: decoded object missing data key: %#v", tc.In, m) - continue - } - if !reflect.DeepEqual(tc.Data, data) { - t.Errorf("%s: expected\n\t%#v (%v), got\n\t%#v (%v)", tc.In, tc.Data, reflect.TypeOf(tc.Data), data, reflect.TypeOf(data)) - continue - } - - outputJSON, err := Marshal(m) - if err != nil { - t.Errorf("%s: error encoding: %v", tc.In, err) - continue - } - - if expectedJSON != string(outputJSON) { - t.Errorf("%s: expected\n\t%s, got\n\t%s", tc.In, expectedJSON, string(outputJSON)) - continue - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/mergepatch/OWNERS b/vendor/k8s.io/apimachinery/pkg/util/mergepatch/OWNERS deleted file mode 100644 index 8e8d9fce..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/mergepatch/OWNERS +++ /dev/null @@ -1,5 +0,0 @@ -approvers: -- pwittrock -reviewers: -- mengqiy -- apelisse diff --git a/vendor/k8s.io/apimachinery/pkg/util/mergepatch/util_test.go b/vendor/k8s.io/apimachinery/pkg/util/mergepatch/util_test.go deleted file mode 100644 index 1b37e3ef..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/mergepatch/util_test.go +++ /dev/null @@ -1,138 +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 mergepatch - -import ( - "fmt" - "testing" -) - -func TestHasConflicts(t *testing.T) { - testCases := []struct { - A interface{} - B interface{} - Ret bool - }{ - {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: float64(1.0), Ret: true}, - {A: "hello", B: false, Ret: true}, - {A: 1, B: 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{}{}, B: []interface{}{}, Ret: false}, - {A: []interface{}{1}, B: []interface{}{1}, Ret: false}, - {A: map[string]interface{}{}, B: []interface{}{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{}{"a": []interface{}{1}}, - B: map[string]interface{}{"a": []interface{}{1}}, - Ret: false, - }, - { - A: map[string]interface{}{"a": []interface{}{1}}, - B: map[string]interface{}{"a": []interface{}{}}, - Ret: true, - }, - { - A: map[string]interface{}{"a": []interface{}{1}}, - B: map[string]interface{}{"a": 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}, - Ret: true, - }, - { - A: map[string]interface{}{"a": 1, "b": 2}, - B: map[string]interface{}{"a": 1, "b": 2}, - Ret: false, - }, - { - A: map[string]interface{}{"a": 1, "b": 2}, - B: map[string]interface{}{"a": 1, "b": 0, "c": 3}, - Ret: true, - }, - { - A: map[string]interface{}{"a": 1, "b": 2}, - B: map[string]interface{}{"a": 1, "b": 2, "c": 3}, - Ret: false, - }, - { - A: map[string]interface{}{"a": []interface{}{1, 2}}, - B: map[string]interface{}{"a": []interface{}{1, 0}}, - Ret: true, - }, - { - A: map[string]interface{}{"a": []interface{}{1, 2}}, - B: map[string]interface{}{"a": []interface{}{1, 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: "true", B: true, Ret: true}, - {A: "null", B: nil, Ret: true}, - } - - for _, testCase := range testCases { - testStr := fmt.Sprintf("A = %#v, B = %#v", testCase.A, testCase.B) - // Run each test case multiple times if it passes because HasConflicts() - // uses map iteration, which returns keys in nondeterministic order. - for try := 0; try < 10; try++ { - out, err := HasConflicts(testCase.A, testCase.B) - if err != nil { - t.Errorf("%v: unexpected error: %v", testStr, err) - break - } - if out != testCase.Ret { - t.Errorf("%v: expected %t got %t", testStr, testCase.Ret, out) - break - } - out, err = HasConflicts(testCase.B, testCase.A) - if err != nil { - t.Errorf("%v: unexpected error: %v", testStr, err) - break - } - if out != testCase.Ret { - t.Errorf("%v: expected reversed %t got %t", testStr, testCase.Ret, out) - break - } - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/http_test.go b/vendor/k8s.io/apimachinery/pkg/util/net/http_test.go deleted file mode 100644 index 98bd6497..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/net/http_test.go +++ /dev/null @@ -1,282 +0,0 @@ -// +build go1.8 - -/* -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 net - -import ( - "crypto/tls" - "fmt" - "net" - "net/http" - "net/url" - "os" - "reflect" - "testing" -) - -func TestGetClientIP(t *testing.T) { - ipString := "10.0.0.1" - ip := net.ParseIP(ipString) - invalidIPString := "invalidIPString" - testCases := []struct { - Request http.Request - ExpectedIP net.IP - }{ - { - Request: http.Request{}, - }, - { - Request: http.Request{ - Header: map[string][]string{ - "X-Real-Ip": {ipString}, - }, - }, - ExpectedIP: ip, - }, - { - Request: http.Request{ - Header: map[string][]string{ - "X-Real-Ip": {invalidIPString}, - }, - }, - }, - { - Request: http.Request{ - Header: map[string][]string{ - "X-Forwarded-For": {ipString}, - }, - }, - ExpectedIP: ip, - }, - { - Request: http.Request{ - Header: map[string][]string{ - "X-Forwarded-For": {invalidIPString}, - }, - }, - }, - { - Request: http.Request{ - Header: map[string][]string{ - "X-Forwarded-For": {invalidIPString + "," + ipString}, - }, - }, - ExpectedIP: ip, - }, - { - Request: http.Request{ - // RemoteAddr is in the form host:port - RemoteAddr: ipString + ":1234", - }, - ExpectedIP: ip, - }, - { - Request: http.Request{ - RemoteAddr: invalidIPString, - }, - }, - { - Request: http.Request{ - Header: map[string][]string{ - "X-Forwarded-For": {invalidIPString}, - }, - // RemoteAddr is in the form host:port - RemoteAddr: ipString, - }, - ExpectedIP: ip, - }, - } - - for i, test := range testCases { - if a, e := GetClientIP(&test.Request), test.ExpectedIP; reflect.DeepEqual(e, a) != true { - t.Fatalf("test case %d failed. expected: %v, actual: %v", i, e, a) - } - } -} - -func TestAppendForwardedForHeader(t *testing.T) { - testCases := []struct { - addr, forwarded, expected string - }{ - {"1.2.3.4:8000", "", "1.2.3.4"}, - {"1.2.3.4:8000", "8.8.8.8", "8.8.8.8, 1.2.3.4"}, - {"1.2.3.4:8000", "8.8.8.8, 1.2.3.4", "8.8.8.8, 1.2.3.4, 1.2.3.4"}, - {"1.2.3.4:8000", "foo,bar", "foo,bar, 1.2.3.4"}, - } - for i, test := range testCases { - req := &http.Request{ - RemoteAddr: test.addr, - Header: make(http.Header), - } - if test.forwarded != "" { - req.Header.Set("X-Forwarded-For", test.forwarded) - } - - AppendForwardedForHeader(req) - actual := req.Header.Get("X-Forwarded-For") - if actual != test.expected { - t.Errorf("[%d] Expected %q, Got %q", i, test.expected, actual) - } - } -} - -func TestProxierWithNoProxyCIDR(t *testing.T) { - testCases := []struct { - name string - noProxy string - url string - - expectedDelegated bool - }{ - { - name: "no env", - url: "https://192.168.143.1/api", - expectedDelegated: true, - }, - { - name: "no cidr", - noProxy: "192.168.63.1", - url: "https://192.168.143.1/api", - expectedDelegated: true, - }, - { - name: "hostname", - noProxy: "192.168.63.0/24,192.168.143.0/24", - url: "https://my-hostname/api", - expectedDelegated: true, - }, - { - name: "match second cidr", - noProxy: "192.168.63.0/24,192.168.143.0/24", - url: "https://192.168.143.1/api", - expectedDelegated: false, - }, - { - name: "match second cidr with host:port", - noProxy: "192.168.63.0/24,192.168.143.0/24", - url: "https://192.168.143.1:8443/api", - expectedDelegated: false, - }, - { - name: "IPv6 cidr", - noProxy: "2001:db8::/48", - url: "https://[2001:db8::1]/api", - expectedDelegated: false, - }, - { - name: "IPv6+port cidr", - noProxy: "2001:db8::/48", - url: "https://[2001:db8::1]:8443/api", - expectedDelegated: false, - }, - { - name: "IPv6, not matching cidr", - noProxy: "2001:db8::/48", - url: "https://[2001:db8:1::1]/api", - expectedDelegated: true, - }, - { - name: "IPv6+port, not matching cidr", - noProxy: "2001:db8::/48", - url: "https://[2001:db8:1::1]:8443/api", - expectedDelegated: true, - }, - } - - for _, test := range testCases { - os.Setenv("NO_PROXY", test.noProxy) - actualDelegated := false - proxyFunc := NewProxierWithNoProxyCIDR(func(req *http.Request) (*url.URL, error) { - actualDelegated = true - return nil, nil - }) - - req, err := http.NewRequest("GET", test.url, nil) - if err != nil { - t.Errorf("%s: unexpected err: %v", test.name, err) - continue - } - if _, err := proxyFunc(req); err != nil { - t.Errorf("%s: unexpected err: %v", test.name, err) - continue - } - - if test.expectedDelegated != actualDelegated { - t.Errorf("%s: expected %v, got %v", test.name, test.expectedDelegated, actualDelegated) - continue - } - } -} - -type fakeTLSClientConfigHolder struct { - called bool -} - -func (f *fakeTLSClientConfigHolder) TLSClientConfig() *tls.Config { - f.called = true - return nil -} -func (f *fakeTLSClientConfigHolder) RoundTrip(*http.Request) (*http.Response, error) { - return nil, nil -} - -func TestTLSClientConfigHolder(t *testing.T) { - rt := &fakeTLSClientConfigHolder{} - TLSClientConfig(rt) - - if !rt.called { - t.Errorf("didn't find tls config") - } -} - -func TestJoinPreservingTrailingSlash(t *testing.T) { - tests := []struct { - a string - b string - want string - }{ - // All empty - {"", "", ""}, - - // Empty a - {"", "/", "/"}, - {"", "foo", "foo"}, - {"", "/foo", "/foo"}, - {"", "/foo/", "/foo/"}, - - // Empty b - {"/", "", "/"}, - {"foo", "", "foo"}, - {"/foo", "", "/foo"}, - {"/foo/", "", "/foo/"}, - - // Both populated - {"/", "/", "/"}, - {"foo", "foo", "foo/foo"}, - {"/foo", "/foo", "/foo/foo"}, - {"/foo/", "/foo/", "/foo/foo/"}, - } - for _, tt := range tests { - name := fmt.Sprintf("%q+%q=%q", tt.a, tt.b, tt.want) - t.Run(name, func(t *testing.T) { - if got := JoinPreservingTrailingSlash(tt.a, tt.b); got != tt.want { - t.Errorf("JoinPreservingTrailingSlash() = %v, want %v", got, tt.want) - } - }) - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/interface_test.go b/vendor/k8s.io/apimachinery/pkg/util/net/interface_test.go deleted file mode 100644 index 4799d43a..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/net/interface_test.go +++ /dev/null @@ -1,725 +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 net - -import ( - "fmt" - "io/ioutil" - "net" - "os" - "strings" - "testing" -) - -const gatewayfirst = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT -eth3 00000000 0100FE0A 0003 0 0 1024 00000000 0 0 0 -eth3 0000FE0A 00000000 0001 0 0 0 0080FFFF 0 0 0 -docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 -virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 -` -const gatewaylast = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT -docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 -virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 -eth3 0000FE0A 00000000 0001 0 0 0 0080FFFF 0 0 0 -eth3 00000000 0100FE0A 0003 0 0 1024 00000000 0 0 0 -` -const gatewaymiddle = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT -eth3 0000FE0A 00000000 0001 0 0 0 0080FFFF 0 0 0 -docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 -eth3 00000000 0100FE0A 0003 0 0 1024 00000000 0 0 0 -virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 -` -const noInternetConnection = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT -docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 -virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 -` -const nothing = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT -` -const badDestination = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT -eth3 00000000 0100FE0A 0003 0 0 1024 00000000 0 0 0 -eth3 0000FE0AA1 00000000 0001 0 0 0 0080FFFF 0 0 0 -docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 -virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 -` -const badGateway = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT -eth3 00000000 0100FE0AA1 0003 0 0 1024 00000000 0 0 0 -eth3 0000FE0A 00000000 0001 0 0 0 0080FFFF 0 0 0 -docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 -virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 -` -const route_Invalidhex = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT -eth3 00000000 0100FE0AA 0003 0 0 1024 00000000 0 0 0 -eth3 0000FE0A 00000000 0001 0 0 0 0080FFFF 0 0 0 -docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 -virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 -` - -const v6gatewayfirst = `00000000000000000000000000000000 00 00000000000000000000000000000000 00 20010001000000000000000000000001 00000064 00000000 00000000 00000003 eth3 -20010002000000000000000000000000 40 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001 eth3 -00000000000000000000000000000000 60 00000000000000000000000000000000 00 00000000000000000000000000000000 00000400 00000000 00000000 00200200 lo -` -const v6gatewaylast = `20010002000000000000000000000000 40 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001 eth3 -00000000000000000000000000000000 60 00000000000000000000000000000000 00 00000000000000000000000000000000 00000400 00000000 00000000 00200200 lo -00000000000000000000000000000000 00 00000000000000000000000000000000 00 20010001000000000000000000000001 00000064 00000000 00000000 00000003 eth3 -` -const v6gatewaymiddle = `20010002000000000000000000000000 40 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001 eth3 -00000000000000000000000000000000 00 00000000000000000000000000000000 00 20010001000000000000000000000001 00000064 00000000 00000000 00000003 eth3 -00000000000000000000000000000000 60 00000000000000000000000000000000 00 00000000000000000000000000000000 00000400 00000000 00000000 00200200 lo -` -const v6noDefaultRoutes = `00000000000000000000000000000000 60 00000000000000000000000000000000 00 00000000000000000000000000000000 00000400 00000000 00000000 00200200 lo -20010001000000000000000000000000 40 00000000000000000000000000000000 00 00000000000000000000000000000000 00000400 00000000 00000000 00000001 docker0 -20010002000000000000000000000000 40 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001 eth3 -fe800000000000000000000000000000 40 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001 eth3 -` -const v6nothing = `` -const v6badDestination = `2001000200000000 7a 00000000000000000000000000000000 00 00000000000000000000000000000000 00000400 00000000 00000000 00200200 lo -` -const v6badGateway = `00000000000000000000000000000000 00 00000000000000000000000000000000 00 200100010000000000000000000000000012 00000064 00000000 00000000 00000003 eth3 -` -const v6route_Invalidhex = `000000000000000000000000000000000 00 00000000000000000000000000000000 00 fe80000000000000021fcafffea0ec00 00000064 00000000 00000000 00000003 enp1s0f0 - -` - -const ( - flagUp = net.FlagUp | net.FlagBroadcast | net.FlagMulticast - flagDown = net.FlagBroadcast | net.FlagMulticast - flagLoopback = net.FlagUp | net.FlagLoopback - flagP2P = net.FlagUp | net.FlagPointToPoint -) - -func makeIntf(index int, name string, flags net.Flags) net.Interface { - mac := net.HardwareAddr{0, 0x32, 0x7d, 0x69, 0xf7, byte(0x30 + index)} - return net.Interface{ - Index: index, - MTU: 1500, - Name: name, - HardwareAddr: mac, - Flags: flags} -} - -var ( - downIntf = makeIntf(1, "eth3", flagDown) - loopbackIntf = makeIntf(1, "lo", flagLoopback) - p2pIntf = makeIntf(1, "lo", flagP2P) - upIntf = makeIntf(1, "eth3", flagUp) -) - -var ( - ipv4Route = Route{Interface: "eth3", Destination: net.ParseIP("0.0.0.0"), Gateway: net.ParseIP("10.254.0.1"), Family: familyIPv4} - ipv6Route = Route{Interface: "eth3", Destination: net.ParseIP("::"), Gateway: net.ParseIP("2001:1::1"), Family: familyIPv6} -) - -var ( - noRoutes = []Route{} - routeV4 = []Route{ipv4Route} - routeV6 = []Route{ipv6Route} - bothRoutes = []Route{ipv4Route, ipv6Route} -) - -func TestGetIPv4Routes(t *testing.T) { - testCases := []struct { - tcase string - route string - count int - expected *Route - errStrFrag string - }{ - {"gatewayfirst", gatewayfirst, 1, &ipv4Route, ""}, - {"gatewaymiddle", gatewaymiddle, 1, &ipv4Route, ""}, - {"gatewaylast", gatewaylast, 1, &ipv4Route, ""}, - {"no routes", nothing, 0, nil, ""}, - {"badDestination", badDestination, 0, nil, "invalid IPv4"}, - {"badGateway", badGateway, 0, nil, "invalid IPv4"}, - {"route_Invalidhex", route_Invalidhex, 0, nil, "odd length hex string"}, - {"no default routes", noInternetConnection, 0, nil, ""}, - } - for _, tc := range testCases { - r := strings.NewReader(tc.route) - routes, err := getIPv4DefaultRoutes(r) - if err != nil { - if !strings.Contains(err.Error(), tc.errStrFrag) { - t.Errorf("case[%s]: Error string %q does not contain %q", tc.tcase, err, tc.errStrFrag) - } - } else if tc.errStrFrag != "" { - t.Errorf("case[%s]: Error %q expected, but not seen", tc.tcase, tc.errStrFrag) - } else { - if tc.count != len(routes) { - t.Errorf("case[%s]: expected %d routes, have %v", tc.tcase, tc.count, routes) - } else if tc.count == 1 { - if !tc.expected.Gateway.Equal(routes[0].Gateway) { - t.Errorf("case[%s]: expected %v, got %v .err : %v", tc.tcase, tc.expected, routes, err) - } - if !routes[0].Destination.Equal(net.IPv4zero) { - t.Errorf("case[%s}: destination is not for default route (not zero)", tc.tcase) - } - - } - } - } -} - -func TestGetIPv6Routes(t *testing.T) { - testCases := []struct { - tcase string - route string - count int - expected *Route - errStrFrag string - }{ - {"v6 gatewayfirst", v6gatewayfirst, 1, &ipv6Route, ""}, - {"v6 gatewaymiddle", v6gatewaymiddle, 1, &ipv6Route, ""}, - {"v6 gatewaylast", v6gatewaylast, 1, &ipv6Route, ""}, - {"v6 no routes", v6nothing, 0, nil, ""}, - {"v6 badDestination", v6badDestination, 0, nil, "invalid IPv6"}, - {"v6 badGateway", v6badGateway, 0, nil, "invalid IPv6"}, - {"v6 route_Invalidhex", v6route_Invalidhex, 0, nil, "odd length hex string"}, - {"v6 no default routes", v6noDefaultRoutes, 0, nil, ""}, - } - for _, tc := range testCases { - r := strings.NewReader(tc.route) - routes, err := getIPv6DefaultRoutes(r) - if err != nil { - if !strings.Contains(err.Error(), tc.errStrFrag) { - t.Errorf("case[%s]: Error string %q does not contain %q", tc.tcase, err, tc.errStrFrag) - } - } else if tc.errStrFrag != "" { - t.Errorf("case[%s]: Error %q expected, but not seen", tc.tcase, tc.errStrFrag) - } else { - if tc.count != len(routes) { - t.Errorf("case[%s]: expected %d routes, have %v", tc.tcase, tc.count, routes) - } else if tc.count == 1 { - if !tc.expected.Gateway.Equal(routes[0].Gateway) { - t.Errorf("case[%s]: expected %v, got %v .err : %v", tc.tcase, tc.expected, routes, err) - } - if !routes[0].Destination.Equal(net.IPv6zero) { - t.Errorf("case[%s}: destination is not for default route (not zero)", tc.tcase) - } - } - } - } -} - -func TestParseIP(t *testing.T) { - testCases := []struct { - tcase string - ip string - family AddressFamily - success bool - expected net.IP - }{ - {"empty", "", familyIPv4, false, nil}, - {"too short", "AA", familyIPv4, false, nil}, - {"too long", "0011223344", familyIPv4, false, nil}, - {"invalid", "invalid!", familyIPv4, false, nil}, - {"zero", "00000000", familyIPv4, true, net.IP{0, 0, 0, 0}}, - {"ffff", "FFFFFFFF", familyIPv4, true, net.IP{0xff, 0xff, 0xff, 0xff}}, - {"valid v4", "12345678", familyIPv4, true, net.IP{120, 86, 52, 18}}, - {"valid v6", "fe800000000000000000000000000000", familyIPv6, true, net.IP{0xfe, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, - {"v6 too short", "fe80000000000000021fcafffea0ec0", familyIPv6, false, nil}, - {"v6 too long", "fe80000000000000021fcafffea0ec002", familyIPv6, false, nil}, - } - for _, tc := range testCases { - ip, err := parseIP(tc.ip, tc.family) - if !ip.Equal(tc.expected) { - t.Errorf("case[%v]: expected %q, got %q . err : %v", tc.tcase, tc.expected, ip, err) - } - } -} - -func TestIsInterfaceUp(t *testing.T) { - testCases := []struct { - tcase string - intf *net.Interface - expected bool - }{ - {"up", &net.Interface{Index: 0, MTU: 0, Name: "eth3", HardwareAddr: nil, Flags: net.FlagUp}, true}, - {"down", &net.Interface{Index: 0, MTU: 0, Name: "eth3", HardwareAddr: nil, Flags: 0}, false}, - {"no interface", nil, false}, - } - for _, tc := range testCases { - it := isInterfaceUp(tc.intf) - if it != tc.expected { - t.Errorf("case[%v]: expected %v, got %v .", tc.tcase, tc.expected, it) - } - } -} - -type addrStruct struct{ val string } - -func (a addrStruct) Network() string { - return a.val -} -func (a addrStruct) String() string { - return a.val -} - -func TestFinalIP(t *testing.T) { - testCases := []struct { - tcase string - addr []net.Addr - family AddressFamily - expected net.IP - }{ - {"no ipv4", []net.Addr{addrStruct{val: "2001::5/64"}}, familyIPv4, nil}, - {"no ipv6", []net.Addr{addrStruct{val: "10.128.0.4/32"}}, familyIPv6, nil}, - {"invalidV4CIDR", []net.Addr{addrStruct{val: "10.20.30.40.50/24"}}, familyIPv4, nil}, - {"invalidV6CIDR", []net.Addr{addrStruct{val: "fe80::2f7:67fff:fe6e:2956/64"}}, familyIPv6, nil}, - {"loopback", []net.Addr{addrStruct{val: "127.0.0.1/24"}}, familyIPv4, nil}, - {"loopbackv6", []net.Addr{addrStruct{val: "::1/128"}}, familyIPv6, nil}, - {"link local v4", []net.Addr{addrStruct{val: "169.254.1.10/16"}}, familyIPv4, nil}, - {"link local v6", []net.Addr{addrStruct{val: "fe80::2f7:6fff:fe6e:2956/64"}}, familyIPv6, nil}, - {"ip4", []net.Addr{addrStruct{val: "10.254.12.132/17"}}, familyIPv4, net.ParseIP("10.254.12.132")}, - {"ip6", []net.Addr{addrStruct{val: "2001::5/64"}}, familyIPv6, net.ParseIP("2001::5")}, - - {"no addresses", []net.Addr{}, familyIPv4, nil}, - } - for _, tc := range testCases { - ip, err := getMatchingGlobalIP(tc.addr, tc.family) - if !ip.Equal(tc.expected) { - t.Errorf("case[%v]: expected %v, got %v .err : %v", tc.tcase, tc.expected, ip, err) - } - } -} - -func TestAddrs(t *testing.T) { - var nw networkInterfacer = validNetworkInterface{} - intf := net.Interface{Index: 0, MTU: 0, Name: "eth3", HardwareAddr: nil, Flags: 0} - addrs, err := nw.Addrs(&intf) - if err != nil { - t.Errorf("expected no error got : %v", err) - } - if len(addrs) != 2 { - t.Errorf("expected addrs: 2 got null") - } -} - -// Has a valid IPv4 address (IPv6 is LLA) -type validNetworkInterface struct { -} - -func (_ validNetworkInterface) InterfaceByName(intfName string) (*net.Interface, error) { - return &upIntf, nil -} -func (_ validNetworkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) { - var ifat []net.Addr - ifat = []net.Addr{ - addrStruct{val: "fe80::2f7:6fff:fe6e:2956/64"}, addrStruct{val: "10.254.71.145/17"}} - return ifat, nil -} -func (_ validNetworkInterface) Interfaces() ([]net.Interface, error) { - return []net.Interface{upIntf}, nil -} - -// Both IPv4 and IPv6 addresses (expecting IPv4 to be used) -type v4v6NetworkInterface struct { -} - -func (_ v4v6NetworkInterface) InterfaceByName(intfName string) (*net.Interface, error) { - return &upIntf, nil -} -func (_ v4v6NetworkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) { - var ifat []net.Addr - ifat = []net.Addr{ - addrStruct{val: "2001::10/64"}, addrStruct{val: "10.254.71.145/17"}} - return ifat, nil -} -func (_ v4v6NetworkInterface) Interfaces() ([]net.Interface, error) { - return []net.Interface{upIntf}, nil -} - -// Interface with only IPv6 address -type ipv6NetworkInterface struct { -} - -func (_ ipv6NetworkInterface) InterfaceByName(intfName string) (*net.Interface, error) { - return &upIntf, nil -} -func (_ ipv6NetworkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) { - var ifat []net.Addr - ifat = []net.Addr{addrStruct{val: "2001::200/64"}} - return ifat, nil -} - -func (_ ipv6NetworkInterface) Interfaces() ([]net.Interface, error) { - return []net.Interface{upIntf}, nil -} - -// Only with link local addresses -type networkInterfaceWithOnlyLinkLocals struct { -} - -func (_ networkInterfaceWithOnlyLinkLocals) InterfaceByName(intfName string) (*net.Interface, error) { - return &upIntf, nil -} -func (_ networkInterfaceWithOnlyLinkLocals) Addrs(intf *net.Interface) ([]net.Addr, error) { - var ifat []net.Addr - ifat = []net.Addr{addrStruct{val: "169.254.162.166/16"}, addrStruct{val: "fe80::200/10"}} - return ifat, nil -} -func (_ networkInterfaceWithOnlyLinkLocals) Interfaces() ([]net.Interface, error) { - return []net.Interface{upIntf}, nil -} - -// Unable to get interface(s) -type failGettingNetworkInterface struct { -} - -func (_ failGettingNetworkInterface) InterfaceByName(intfName string) (*net.Interface, error) { - return nil, fmt.Errorf("unable get Interface") -} -func (_ failGettingNetworkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) { - return nil, nil -} -func (_ failGettingNetworkInterface) Interfaces() ([]net.Interface, error) { - return nil, fmt.Errorf("mock failed getting all interfaces") -} - -// No interfaces -type noNetworkInterface struct { -} - -func (_ noNetworkInterface) InterfaceByName(intfName string) (*net.Interface, error) { - return nil, fmt.Errorf("no such network interface") -} -func (_ noNetworkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) { - return nil, nil -} -func (_ noNetworkInterface) Interfaces() ([]net.Interface, error) { - return []net.Interface{}, nil -} - -// Interface is down -type downNetworkInterface struct { -} - -func (_ downNetworkInterface) InterfaceByName(intfName string) (*net.Interface, error) { - return &downIntf, nil -} -func (_ downNetworkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) { - var ifat []net.Addr - ifat = []net.Addr{ - addrStruct{val: "fe80::2f7:6fff:fe6e:2956/64"}, addrStruct{val: "10.254.71.145/17"}} - return ifat, nil -} -func (_ downNetworkInterface) Interfaces() ([]net.Interface, error) { - return []net.Interface{downIntf}, nil -} - -// Loopback interface -type loopbackNetworkInterface struct { -} - -func (_ loopbackNetworkInterface) InterfaceByName(intfName string) (*net.Interface, error) { - return &loopbackIntf, nil -} -func (_ loopbackNetworkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) { - var ifat []net.Addr - ifat = []net.Addr{ - addrStruct{val: "::1/128"}, addrStruct{val: "127.0.0.1/8"}} - return ifat, nil -} -func (_ loopbackNetworkInterface) Interfaces() ([]net.Interface, error) { - return []net.Interface{loopbackIntf}, nil -} - -// Point to point interface -type p2pNetworkInterface struct { -} - -func (_ p2pNetworkInterface) InterfaceByName(intfName string) (*net.Interface, error) { - return &p2pIntf, nil -} -func (_ p2pNetworkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) { - var ifat []net.Addr - ifat = []net.Addr{ - addrStruct{val: "::1/128"}, addrStruct{val: "127.0.0.1/8"}} - return ifat, nil -} -func (_ p2pNetworkInterface) Interfaces() ([]net.Interface, error) { - return []net.Interface{p2pIntf}, nil -} - -// Unable to get IP addresses for interface -type networkInterfaceFailGetAddrs struct { -} - -func (_ networkInterfaceFailGetAddrs) InterfaceByName(intfName string) (*net.Interface, error) { - return &upIntf, nil -} -func (_ networkInterfaceFailGetAddrs) Addrs(intf *net.Interface) ([]net.Addr, error) { - return nil, fmt.Errorf("unable to get Addrs") -} -func (_ networkInterfaceFailGetAddrs) Interfaces() ([]net.Interface, error) { - return []net.Interface{upIntf}, nil -} - -// No addresses for interface -type networkInterfaceWithNoAddrs struct { -} - -func (_ networkInterfaceWithNoAddrs) InterfaceByName(intfName string) (*net.Interface, error) { - return &upIntf, nil -} -func (_ networkInterfaceWithNoAddrs) Addrs(intf *net.Interface) ([]net.Addr, error) { - ifat := []net.Addr{} - return ifat, nil -} -func (_ networkInterfaceWithNoAddrs) Interfaces() ([]net.Interface, error) { - return []net.Interface{upIntf}, nil -} - -// Invalid addresses for interface -type networkInterfaceWithInvalidAddr struct { -} - -func (_ networkInterfaceWithInvalidAddr) InterfaceByName(intfName string) (*net.Interface, error) { - return &upIntf, nil -} -func (_ networkInterfaceWithInvalidAddr) Addrs(intf *net.Interface) ([]net.Addr, error) { - var ifat []net.Addr - ifat = []net.Addr{addrStruct{val: "10.20.30.40.50/24"}} - return ifat, nil -} -func (_ networkInterfaceWithInvalidAddr) Interfaces() ([]net.Interface, error) { - return []net.Interface{upIntf}, nil -} - -func TestGetIPFromInterface(t *testing.T) { - testCases := []struct { - tcase string - nwname string - family AddressFamily - nw networkInterfacer - expected net.IP - errStrFrag string - }{ - {"ipv4", "eth3", familyIPv4, validNetworkInterface{}, net.ParseIP("10.254.71.145"), ""}, - {"ipv6", "eth3", familyIPv6, ipv6NetworkInterface{}, net.ParseIP("2001::200"), ""}, - {"no ipv4", "eth3", familyIPv4, ipv6NetworkInterface{}, nil, ""}, - {"no ipv6", "eth3", familyIPv6, validNetworkInterface{}, nil, ""}, - {"I/F down", "eth3", familyIPv4, downNetworkInterface{}, nil, ""}, - {"I/F get fail", "eth3", familyIPv4, noNetworkInterface{}, nil, "no such network interface"}, - {"fail get addr", "eth3", familyIPv4, networkInterfaceFailGetAddrs{}, nil, "unable to get Addrs"}, - {"bad addr", "eth3", familyIPv4, networkInterfaceWithInvalidAddr{}, nil, "invalid CIDR"}, - } - for _, tc := range testCases { - ip, err := getIPFromInterface(tc.nwname, tc.family, tc.nw) - if err != nil { - if !strings.Contains(err.Error(), tc.errStrFrag) { - t.Errorf("case[%s]: Error string %q does not contain %q", tc.tcase, err, tc.errStrFrag) - } - } else if tc.errStrFrag != "" { - t.Errorf("case[%s]: Error %q expected, but not seen", tc.tcase, tc.errStrFrag) - } else if !ip.Equal(tc.expected) { - t.Errorf("case[%v]: expected %v, got %+v .err : %v", tc.tcase, tc.expected, ip, err) - } - } -} - -func TestChooseHostInterfaceFromRoute(t *testing.T) { - testCases := []struct { - tcase string - routes []Route - nw networkInterfacer - expected net.IP - }{ - {"ipv4", routeV4, validNetworkInterface{}, net.ParseIP("10.254.71.145")}, - {"ipv6", routeV6, ipv6NetworkInterface{}, net.ParseIP("2001::200")}, - {"prefer ipv4", bothRoutes, v4v6NetworkInterface{}, net.ParseIP("10.254.71.145")}, - {"all LLA", routeV4, networkInterfaceWithOnlyLinkLocals{}, nil}, - {"no routes", noRoutes, validNetworkInterface{}, nil}, - {"fail get IP", routeV4, networkInterfaceFailGetAddrs{}, nil}, - } - for _, tc := range testCases { - ip, err := chooseHostInterfaceFromRoute(tc.routes, tc.nw) - if !ip.Equal(tc.expected) { - t.Errorf("case[%v]: expected %v, got %+v .err : %v", tc.tcase, tc.expected, ip, err) - } - } -} - -func TestMemberOf(t *testing.T) { - testCases := []struct { - tcase string - ip net.IP - family AddressFamily - expected bool - }{ - {"ipv4 is 4", net.ParseIP("10.20.30.40"), familyIPv4, true}, - {"ipv4 is 6", net.ParseIP("10.10.10.10"), familyIPv6, false}, - {"ipv6 is 4", net.ParseIP("2001::100"), familyIPv4, false}, - {"ipv6 is 6", net.ParseIP("2001::100"), familyIPv6, true}, - } - for _, tc := range testCases { - if memberOf(tc.ip, tc.family) != tc.expected { - t.Errorf("case[%s]: expected %+v", tc.tcase, tc.expected) - } - } -} - -func TestGetIPFromHostInterfaces(t *testing.T) { - testCases := []struct { - tcase string - nw networkInterfacer - expected net.IP - errStrFrag string - }{ - {"fail get I/Fs", failGettingNetworkInterface{}, nil, "failed getting all interfaces"}, - {"no interfaces", noNetworkInterface{}, nil, "no interfaces"}, - {"I/F not up", downNetworkInterface{}, nil, "no acceptable"}, - {"loopback only", loopbackNetworkInterface{}, nil, "no acceptable"}, - {"P2P I/F only", p2pNetworkInterface{}, nil, "no acceptable"}, - {"fail get addrs", networkInterfaceFailGetAddrs{}, nil, "unable to get Addrs"}, - {"no addresses", networkInterfaceWithNoAddrs{}, nil, "no acceptable"}, - {"invalid addr", networkInterfaceWithInvalidAddr{}, nil, "invalid CIDR"}, - {"no matches", networkInterfaceWithOnlyLinkLocals{}, nil, "no acceptable"}, - {"ipv4", validNetworkInterface{}, net.ParseIP("10.254.71.145"), ""}, - {"ipv6", ipv6NetworkInterface{}, net.ParseIP("2001::200"), ""}, - } - - for _, tc := range testCases { - ip, err := chooseIPFromHostInterfaces(tc.nw) - if !ip.Equal(tc.expected) { - t.Errorf("case[%s]: expected %+v, got %+v with err : %v", tc.tcase, tc.expected, ip, err) - } - if err != nil && !strings.Contains(err.Error(), tc.errStrFrag) { - t.Errorf("case[%s]: unable to find %q in error string %q", tc.tcase, tc.errStrFrag, err.Error()) - } - } -} - -func makeRouteFile(content string, t *testing.T) (*os.File, error) { - routeFile, err := ioutil.TempFile("", "route") - if err != nil { - return nil, err - } - - if _, err := routeFile.Write([]byte(content)); err != nil { - return routeFile, err - } - err = routeFile.Close() - return routeFile, err -} - -func TestFailGettingIPv4Routes(t *testing.T) { - defer func() { v4File.name = ipv4RouteFile }() - - // Try failure to open file (should not occur, as caller ensures we have IPv4 route file, but being thorough) - v4File.name = "no-such-file" - errStrFrag := "no such file" - _, err := v4File.extract() - if err == nil { - 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()) - } -} - -func TestFailGettingIPv6Routes(t *testing.T) { - defer func() { v6File.name = ipv6RouteFile }() - - // Try failure to open file (this would be ignored by caller) - v6File.name = "no-such-file" - errStrFrag := "no such file" - _, err := v6File.extract() - if err == nil { - 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()) - } -} - -func TestGetAllDefaultRoutesFailNoV4RouteFile(t *testing.T) { - defer func() { v4File.name = ipv4RouteFile }() - - // Should not occur, as caller ensures we have IPv4 route file, but being thorough - v4File.name = "no-such-file" - errStrFrag := "no such file" - _, err := getAllDefaultRoutes() - if err == nil { - 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()) - } -} - -func TestGetAllDefaultRoutes(t *testing.T) { - testCases := []struct { - tcase string - v4Info string - v6Info string - count int - expected []Route - errStrFrag string - }{ - {"no routes", noInternetConnection, v6noDefaultRoutes, 0, nil, "No default routes"}, - {"only v4 route", gatewayfirst, v6noDefaultRoutes, 1, routeV4, ""}, - {"only v6 route", noInternetConnection, v6gatewayfirst, 1, routeV6, ""}, - {"v4 and v6 routes", gatewayfirst, v6gatewayfirst, 2, bothRoutes, ""}, - } - defer func() { - v4File.name = ipv4RouteFile - v6File.name = ipv6RouteFile - }() - - for _, tc := range testCases { - routeFile, err := makeRouteFile(tc.v4Info, t) - if routeFile != nil { - defer os.Remove(routeFile.Name()) - } - if err != nil { - t.Errorf("case[%s]: test setup failure for IPv4 route file: %v", tc.tcase, err) - } - v4File.name = routeFile.Name() - v6routeFile, err := makeRouteFile(tc.v6Info, t) - if v6routeFile != nil { - defer os.Remove(v6routeFile.Name()) - } - if err != nil { - t.Errorf("case[%s]: test setup failure for IPv6 route file: %v", tc.tcase, err) - } - v6File.name = v6routeFile.Name() - - routes, err := getAllDefaultRoutes() - if err != nil { - if !strings.Contains(err.Error(), tc.errStrFrag) { - t.Errorf("case[%s]: Error string %q does not contain %q", tc.tcase, err, tc.errStrFrag) - } - } else if tc.errStrFrag != "" { - t.Errorf("case[%s]: Error %q expected, but not seen", tc.tcase, tc.errStrFrag) - } else { - if tc.count != len(routes) { - t.Errorf("case[%s]: expected %d routes, have %v", tc.tcase, tc.count, routes) - } - for i, expected := range tc.expected { - if !expected.Gateway.Equal(routes[i].Gateway) { - t.Errorf("case[%s]: at %d expected %v, got %v .err : %v", tc.tcase, i, tc.expected, routes, err) - } - zeroIP := net.IPv4zero - if expected.Family == familyIPv6 { - zeroIP = net.IPv6zero - } - if !routes[i].Destination.Equal(zeroIP) { - t.Errorf("case[%s}: at %d destination is not for default route (not %v)", tc.tcase, i, zeroIP) - } - } - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/port_range_test.go b/vendor/k8s.io/apimachinery/pkg/util/net/port_range_test.go deleted file mode 100644 index b4cbe824..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/net/port_range_test.go +++ /dev/null @@ -1,77 +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 net - -import ( - "testing" - - flag "github.com/spf13/pflag" -) - -func TestPortRange(t *testing.T) { - testCases := []struct { - input string - success bool - expected string - included int - excluded int - }{ - {"100-200", true, "100-200", 200, 201}, - {" 100-200 ", true, "100-200", 200, 201}, - {"0-0", true, "0-0", 0, 1}, - {"", true, "", -1, 0}, - {"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 { - tc := &testCases[i] - pr := &PortRange{} - var f flag.Value = pr - err := f.Set(tc.input) - if err != nil && tc.success == true { - t.Errorf("expected success, got %q", err) - continue - } else if err == nil && tc.success == false { - t.Errorf("expected failure %#v", testCases[i]) - continue - } else if tc.success { - if f.String() != tc.expected { - t.Errorf("expected %q, got %q", tc.expected, f.String()) - } - if tc.included >= 0 && !pr.Contains(tc.included) { - t.Errorf("expected %q to include %d", f.String(), tc.included) - } - if tc.excluded >= 0 && pr.Contains(tc.excluded) { - t.Errorf("expected %q to exclude %d", f.String(), tc.excluded) - } - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/port_split_test.go b/vendor/k8s.io/apimachinery/pkg/util/net/port_split_test.go deleted file mode 100644 index e801bdbe..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/net/port_split_test.go +++ /dev/null @@ -1,121 +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 net - -import ( - "testing" -) - -func TestSplitSchemeNamePort(t *testing.T) { - table := []struct { - in string - name, port, scheme string - valid bool - normalized bool - }{ - { - in: "aoeu:asdf", - name: "aoeu", - port: "asdf", - valid: true, - normalized: true, - }, { - in: "http:aoeu:asdf", - scheme: "http", - name: "aoeu", - port: "asdf", - valid: true, - normalized: true, - }, { - in: "https:aoeu:", - scheme: "https", - name: "aoeu", - port: "", - valid: true, - normalized: false, - }, { - in: "https:aoeu:asdf", - scheme: "https", - name: "aoeu", - port: "asdf", - valid: true, - normalized: true, - }, { - in: "aoeu:", - name: "aoeu", - valid: true, - normalized: false, - }, { - in: "aoeu", - name: "aoeu", - valid: true, - normalized: true, - }, { - in: ":asdf", - valid: false, - }, { - in: "aoeu:asdf:htns", - valid: false, - }, { - in: "http::asdf", - valid: false, - }, { - in: "http::", - valid: false, - }, { - in: "", - valid: false, - }, - } - - for _, item := range table { - scheme, name, port, valid := SplitSchemeNamePort(item.in) - if e, a := item.scheme, scheme; e != a { - t.Errorf("%q: Wanted %q, got %q", item.in, e, a) - } - if e, a := item.name, name; e != a { - t.Errorf("%q: Wanted %q, got %q", item.in, e, a) - } - if e, a := item.port, port; e != a { - t.Errorf("%q: Wanted %q, got %q", item.in, e, a) - } - if e, a := item.valid, valid; e != a { - t.Errorf("%q: Wanted %t, got %t", item.in, e, a) - } - - // Make sure valid items round trip through JoinSchemeNamePort - if item.valid { - out := JoinSchemeNamePort(scheme, name, port) - if item.normalized && out != item.in { - t.Errorf("%q: Wanted %s, got %s", item.in, item.in, out) - } - scheme, name, port, valid := SplitSchemeNamePort(out) - if e, a := item.scheme, scheme; e != a { - t.Errorf("%q: Wanted %q, got %q", item.in, e, a) - } - if e, a := item.name, name; e != a { - t.Errorf("%q: Wanted %q, got %q", item.in, e, a) - } - if e, a := item.port, port; e != a { - t.Errorf("%q: Wanted %q, got %q", item.in, e, a) - } - if e, a := item.valid, valid; e != a { - t.Errorf("%q: Wanted %t, got %t", item.in, e, a) - } - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/util_test.go b/vendor/k8s.io/apimachinery/pkg/util/net/util_test.go deleted file mode 100644 index bcbef753..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/net/util_test.go +++ /dev/null @@ -1,68 +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 net - -import ( - "net" - "testing" -) - -func getIPNet(cidr string) *net.IPNet { - _, ipnet, _ := net.ParseCIDR(cidr) - return ipnet -} - -func TestIPNetEqual(t *testing.T) { - testCases := []struct { - ipnet1 *net.IPNet - ipnet2 *net.IPNet - expect bool - }{ - //null case - { - getIPNet("10.0.0.1/24"), - getIPNet(""), - false, - }, - { - getIPNet("10.0.0.0/24"), - getIPNet("10.0.0.0/24"), - true, - }, - { - getIPNet("10.0.0.0/24"), - getIPNet("10.0.0.1/24"), - true, - }, - { - getIPNet("10.0.0.0/25"), - getIPNet("10.0.0.0/24"), - false, - }, - { - getIPNet("10.0.1.0/24"), - getIPNet("10.0.0.0/24"), - false, - }, - } - - for _, tc := range testCases { - if tc.expect != IPNetEqual(tc.ipnet1, tc.ipnet2) { - t.Errorf("Expect equality of %s and %s be to %v", tc.ipnet1.String(), tc.ipnet2.String(), tc.expect) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime_test.go b/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime_test.go deleted file mode 100644 index 9dff17ea..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime_test.go +++ /dev/null @@ -1,71 +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 runtime - -import ( - "fmt" - "testing" -) - -func TestHandleCrash(t *testing.T) { - defer func() { - if x := recover(); x == nil { - t.Errorf("Expected a panic to recover from") - } - }() - defer HandleCrash() - panic("Test Panic") -} - -func TestCustomHandleCrash(t *testing.T) { - old := PanicHandlers - defer func() { PanicHandlers = old }() - var result interface{} - PanicHandlers = []func(interface{}){ - func(r interface{}) { - result = r - }, - } - func() { - defer func() { - if x := recover(); x == nil { - t.Errorf("Expected a panic to recover from") - } - }() - defer HandleCrash() - panic("test") - }() - if result != "test" { - t.Errorf("did not receive custom handler") - } -} - -func TestCustomHandleError(t *testing.T) { - old := ErrorHandlers - defer func() { ErrorHandlers = old }() - var result error - ErrorHandlers = []func(error){ - func(err error) { - result = err - }, - } - err := fmt.Errorf("test") - HandleError(err) - if result != err { - t.Errorf("did not receive custom handler") - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/set_test.go b/vendor/k8s.io/apimachinery/pkg/util/sets/set_test.go deleted file mode 100644 index df722ec2..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/sets/set_test.go +++ /dev/null @@ -1,270 +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 sets - -import ( - "reflect" - "testing" -) - -func TestStringSet(t *testing.T) { - s := String{} - s2 := String{} - if len(s) != 0 { - t.Errorf("Expected len=0: %d", len(s)) - } - s.Insert("a", "b") - if len(s) != 2 { - t.Errorf("Expected len=2: %d", len(s)) - } - s.Insert("c") - if s.Has("d") { - t.Errorf("Unexpected contents: %#v", s) - } - if !s.Has("a") { - t.Errorf("Missing contents: %#v", s) - } - s.Delete("a") - if s.Has("a") { - t.Errorf("Unexpected contents: %#v", s) - } - s.Insert("a") - if s.HasAll("a", "b", "d") { - t.Errorf("Unexpected contents: %#v", s) - } - if !s.HasAll("a", "b") { - t.Errorf("Missing contents: %#v", s) - } - s2.Insert("a", "b", "d") - if s.IsSuperset(s2) { - t.Errorf("Unexpected contents: %#v", s) - } - s2.Delete("d") - if !s.IsSuperset(s2) { - t.Errorf("Missing contents: %#v", s) - } -} - -func TestStringSetDeleteMultiples(t *testing.T) { - s := String{} - s.Insert("a", "b", "c") - if len(s) != 3 { - t.Errorf("Expected len=3: %d", len(s)) - } - - s.Delete("a", "c") - if len(s) != 1 { - t.Errorf("Expected len=1: %d", len(s)) - } - if s.Has("a") { - t.Errorf("Unexpected contents: %#v", s) - } - if s.Has("c") { - t.Errorf("Unexpected contents: %#v", s) - } - if !s.Has("b") { - t.Errorf("Missing contents: %#v", s) - } - -} - -func TestNewStringSet(t *testing.T) { - s := NewString("a", "b", "c") - if len(s) != 3 { - t.Errorf("Expected len=3: %d", len(s)) - } - if !s.Has("a") || !s.Has("b") || !s.Has("c") { - t.Errorf("Unexpected contents: %#v", s) - } -} - -func TestStringSetList(t *testing.T) { - s := NewString("z", "y", "x", "a") - if !reflect.DeepEqual(s.List(), []string{"a", "x", "y", "z"}) { - t.Errorf("List gave unexpected result: %#v", s.List()) - } -} - -func TestStringSetDifference(t *testing.T) { - a := NewString("1", "2", "3") - b := NewString("1", "2", "4", "5") - c := a.Difference(b) - d := b.Difference(a) - if len(c) != 1 { - t.Errorf("Expected len=1: %d", len(c)) - } - if !c.Has("3") { - t.Errorf("Unexpected contents: %#v", c.List()) - } - if len(d) != 2 { - t.Errorf("Expected len=2: %d", len(d)) - } - if !d.Has("4") || !d.Has("5") { - t.Errorf("Unexpected contents: %#v", d.List()) - } -} - -func TestStringSetHasAny(t *testing.T) { - a := NewString("1", "2", "3") - - if !a.HasAny("1", "4") { - t.Errorf("expected true, got false") - } - - if a.HasAny("0", "4") { - t.Errorf("expected false, got true") - } -} - -func TestStringSetEquals(t *testing.T) { - // Simple case (order doesn't matter) - a := NewString("1", "2") - b := NewString("2", "1") - if !a.Equal(b) { - t.Errorf("Expected to be equal: %v vs %v", a, b) - } - - // It is a set; duplicates are ignored - b = NewString("2", "2", "1") - if !a.Equal(b) { - t.Errorf("Expected to be equal: %v vs %v", a, b) - } - - // Edge cases around empty sets / empty strings - a = NewString() - b = NewString() - if !a.Equal(b) { - t.Errorf("Expected to be equal: %v vs %v", a, b) - } - - b = NewString("1", "2", "3") - if a.Equal(b) { - t.Errorf("Expected to be not-equal: %v vs %v", a, b) - } - - b = NewString("1", "2", "") - if a.Equal(b) { - t.Errorf("Expected to be not-equal: %v vs %v", a, b) - } - - // Check for equality after mutation - a = NewString() - a.Insert("1") - if a.Equal(b) { - t.Errorf("Expected to be not-equal: %v vs %v", a, b) - } - - a.Insert("2") - if a.Equal(b) { - t.Errorf("Expected to be not-equal: %v vs %v", a, b) - } - - a.Insert("") - if !a.Equal(b) { - t.Errorf("Expected to be equal: %v vs %v", a, b) - } - - a.Delete("") - if a.Equal(b) { - t.Errorf("Expected to be not-equal: %v vs %v", a, b) - } -} - -func TestStringUnion(t *testing.T) { - tests := []struct { - s1 String - s2 String - expected String - }{ - { - NewString("1", "2", "3", "4"), - NewString("3", "4", "5", "6"), - NewString("1", "2", "3", "4", "5", "6"), - }, - { - NewString("1", "2", "3", "4"), - NewString(), - NewString("1", "2", "3", "4"), - }, - { - NewString(), - NewString("1", "2", "3", "4"), - NewString("1", "2", "3", "4"), - }, - { - NewString(), - NewString(), - NewString(), - }, - } - - for _, test := range tests { - union := test.s1.Union(test.s2) - if union.Len() != test.expected.Len() { - t.Errorf("Expected union.Len()=%d but got %d", test.expected.Len(), union.Len()) - } - - if !union.Equal(test.expected) { - t.Errorf("Expected union.Equal(expected) but not true. union:%v expected:%v", union.List(), test.expected.List()) - } - } -} - -func TestStringIntersection(t *testing.T) { - tests := []struct { - s1 String - s2 String - expected String - }{ - { - NewString("1", "2", "3", "4"), - NewString("3", "4", "5", "6"), - NewString("3", "4"), - }, - { - NewString("1", "2", "3", "4"), - NewString("1", "2", "3", "4"), - NewString("1", "2", "3", "4"), - }, - { - NewString("1", "2", "3", "4"), - NewString(), - NewString(), - }, - { - NewString(), - NewString("1", "2", "3", "4"), - NewString(), - }, - { - NewString(), - NewString(), - NewString(), - }, - } - - for _, test := range tests { - intersection := test.s1.Intersection(test.s2) - if intersection.Len() != test.expected.Len() { - t.Errorf("Expected intersection.Len()=%d but got %d", test.expected.Len(), intersection.Len()) - } - - if !intersection.Equal(test.expected) { - t.Errorf("Expected intersection.Equal(expected) but not true. intersection:%v expected:%v", intersection.List(), test.expected.List()) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/OWNERS b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/OWNERS deleted file mode 100644 index 8e8d9fce..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/OWNERS +++ /dev/null @@ -1,5 +0,0 @@ -approvers: -- pwittrock -reviewers: -- mengqiy -- apelisse diff --git a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch_test.go b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch_test.go deleted file mode 100644 index 4721803c..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch_test.go +++ /dev/null @@ -1,6763 +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 strategicpatch - -import ( - "fmt" - "path/filepath" - "reflect" - "strings" - "testing" - - "github.com/davecgh/go-spew/spew" - "github.com/ghodss/yaml" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/json" - "k8s.io/apimachinery/pkg/util/mergepatch" - "k8s.io/apimachinery/pkg/util/sets" - sptest "k8s.io/apimachinery/pkg/util/strategicpatch/testing" -) - -var ( - fakeMergeItemSchema = sptest.Fake{Path: filepath.Join("testdata", "swagger-merge-item.json")} - fakePrecisionItemSchema = sptest.Fake{Path: filepath.Join("testdata", "swagger-precision-item.json")} -) - -type SortMergeListTestCases struct { - TestCases []SortMergeListTestCase -} - -type SortMergeListTestCase struct { - Description string - Original map[string]interface{} - Sorted map[string]interface{} -} - -type StrategicMergePatchTestCases struct { - TestCases []StrategicMergePatchTestCase -} - -type StrategicMergePatchTestCase struct { - Description string - StrategicMergePatchTestCaseData -} - -type StrategicMergePatchRawTestCase struct { - Description string - StrategicMergePatchRawTestCaseData -} - -type StrategicMergePatchTestCaseData struct { - // Original is the original object (last-applied config in annotation) - Original map[string]interface{} - // Modified is the modified object (new config we want) - Modified map[string]interface{} - // Current is the current object (live config in the server) - Current map[string]interface{} - // TwoWay is the expected two-way merge patch diff between original and modified - TwoWay map[string]interface{} - // ThreeWay is the expected three-way merge patch - ThreeWay map[string]interface{} - // Result is the expected object after applying the three-way patch on current object. - Result map[string]interface{} - // TwoWayResult is the expected object after applying the two-way patch on current object. - // If nil, Modified is used. - TwoWayResult map[string]interface{} -} - -// The meaning of each field is the same as StrategicMergePatchTestCaseData's. -// The difference is that all the fields in StrategicMergePatchRawTestCaseData are json-encoded data. -type StrategicMergePatchRawTestCaseData struct { - Original []byte - Modified []byte - Current []byte - TwoWay []byte - ThreeWay []byte - Result []byte - TwoWayResult []byte - ExpectedError string -} - -type MergeItem struct { - Name string `json:"name,omitempty"` - Value string `json:"value,omitempty"` - Other string `json:"other,omitempty"` - MergingList []MergeItem `json:"mergingList,omitempty" patchStrategy:"merge" patchMergeKey:"name"` - NonMergingList []MergeItem `json:"nonMergingList,omitempty"` - MergingIntList []int `json:"mergingIntList,omitempty" patchStrategy:"merge"` - NonMergingIntList []int `json:"nonMergingIntList,omitempty"` - MergeItemPtr *MergeItem `json:"mergeItemPtr,omitempty" patchStrategy:"merge" patchMergeKey:"name"` - SimpleMap map[string]string `json:"simpleMap,omitempty"` - ReplacingItem runtime.RawExtension `json:"replacingItem,omitempty" patchStrategy:"replace"` - RetainKeysMap RetainKeysMergeItem `json:"retainKeysMap,omitempty" patchStrategy:"retainKeys"` - RetainKeysMergingList []MergeItem `json:"retainKeysMergingList,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name"` -} - -type RetainKeysMergeItem struct { - Name string `json:"name,omitempty"` - Value string `json:"value,omitempty"` - Other string `json:"other,omitempty"` - SimpleMap map[string]string `json:"simpleMap,omitempty"` - MergingIntList []int `json:"mergingIntList,omitempty" patchStrategy:"merge"` - MergingList []MergeItem `json:"mergingList,omitempty" patchStrategy:"merge" patchMergeKey:"name"` - NonMergingList []MergeItem `json:"nonMergingList,omitempty"` -} - -var ( - mergeItem MergeItem - mergeItemStructSchema = PatchMetaFromStruct{T: GetTagStructTypeOrDie(mergeItem)} -) - -// These are test cases for SortMergeList, used to assert that it (recursively) -// sorts both merging and non merging lists correctly. -var sortMergeListTestCaseData = []byte(` -testCases: - - description: sort one list of maps - original: - mergingList: - - name: 1 - - name: 3 - - name: 2 - sorted: - mergingList: - - name: 1 - - name: 2 - - name: 3 - - description: sort lists of maps but not nested lists of maps - original: - mergingList: - - name: 2 - nonMergingList: - - name: 1 - - name: 3 - - name: 2 - - name: 1 - nonMergingList: - - name: 2 - - name: 1 - sorted: - mergingList: - - name: 1 - nonMergingList: - - name: 2 - - name: 1 - - name: 2 - nonMergingList: - - name: 1 - - name: 3 - - name: 2 - - description: sort lists of maps and nested lists of maps - original: - mergingList: - - name: 2 - mergingList: - - name: 1 - - name: 3 - - name: 2 - - name: 1 - mergingList: - - name: 2 - - name: 1 - sorted: - mergingList: - - name: 1 - mergingList: - - name: 1 - - name: 2 - - name: 2 - mergingList: - - name: 1 - - name: 2 - - name: 3 - - description: merging list should NOT sort when nested in non merging list - original: - nonMergingList: - - name: 2 - mergingList: - - name: 1 - - name: 3 - - name: 2 - - name: 1 - mergingList: - - name: 2 - - name: 1 - sorted: - nonMergingList: - - name: 2 - mergingList: - - name: 1 - - name: 3 - - name: 2 - - name: 1 - mergingList: - - name: 2 - - name: 1 - - description: sort very nested list of maps - fieldTypes: - original: - mergingList: - - mergingList: - - mergingList: - - name: 2 - - name: 1 - sorted: - mergingList: - - mergingList: - - mergingList: - - name: 1 - - name: 2 - - description: sort nested lists of ints - original: - mergingList: - - name: 2 - mergingIntList: - - 1 - - 3 - - 2 - - name: 1 - mergingIntList: - - 2 - - 1 - sorted: - mergingList: - - name: 1 - mergingIntList: - - 1 - - 2 - - name: 2 - mergingIntList: - - 1 - - 2 - - 3 - - description: sort nested pointers of ints - original: - mergeItemPtr: - - name: 2 - mergingIntList: - - 1 - - 3 - - 2 - - name: 1 - mergingIntList: - - 2 - - 1 - sorted: - mergeItemPtr: - - name: 1 - mergingIntList: - - 1 - - 2 - - name: 2 - mergingIntList: - - 1 - - 2 - - 3 - - description: sort merging list by pointer - original: - mergeItemPtr: - - name: 1 - - name: 3 - - name: 2 - sorted: - mergeItemPtr: - - name: 1 - - name: 2 - - name: 3 -`) - -func TestSortMergeLists(t *testing.T) { - mergeItemOpenapiSchema := PatchMetaFromOpenAPI{ - Schema: sptest.GetSchemaOrDie(fakeMergeItemSchema, "mergeItem"), - } - schemas := []LookupPatchMeta{ - mergeItemStructSchema, - mergeItemOpenapiSchema, - } - - tc := SortMergeListTestCases{} - err := yaml.Unmarshal(sortMergeListTestCaseData, &tc) - if err != nil { - t.Errorf("can't unmarshal test cases: %s\n", err) - return - } - - for _, schema := range schemas { - for _, c := range tc.TestCases { - temp := testObjectToJSONOrFail(t, c.Original) - got := sortJsonOrFail(t, temp, c.Description, schema) - expected := testObjectToJSONOrFail(t, c.Sorted) - if !reflect.DeepEqual(got, expected) { - t.Errorf("using %s error in test case: %s\ncannot sort object:\n%s\nexpected:\n%s\ngot:\n%s\n", - getSchemaType(schema), c.Description, mergepatch.ToYAMLOrError(c.Original), mergepatch.ToYAMLOrError(c.Sorted), jsonToYAMLOrError(got)) - } - } - } -} - -// These are test cases for StrategicMergePatch that cannot be generated using -// CreateTwoWayMergePatch because it may be one of the following cases: -// - not use the replace directive. -// - generate duplicate integers for a merging list patch. -// - generate empty merging lists. -// - use patch format from an old client. -var customStrategicMergePatchTestCaseData = []byte(` -testCases: - - description: unique scalars when merging lists - original: - mergingIntList: - - 1 - - 2 - twoWay: - mergingIntList: - - 2 - - 3 - modified: - mergingIntList: - - 1 - - 2 - - 3 - - description: delete map from nested map - original: - simpleMap: - key1: 1 - key2: 1 - twoWay: - simpleMap: - $patch: delete - modified: - simpleMap: - {} - - description: delete all items from merging list - original: - mergingList: - - name: 1 - - name: 2 - twoWay: - mergingList: - - $patch: replace - modified: - mergingList: [] - - description: merge empty merging lists - original: - mergingList: [] - twoWay: - mergingList: [] - modified: - mergingList: [] - - description: delete all keys from map - original: - name: 1 - value: 1 - twoWay: - $patch: replace - modified: {} - - description: add key and delete all keys from map - original: - name: 1 - value: 1 - twoWay: - other: a - $patch: replace - modified: - other: a - - description: delete all duplicate entries in a merging list - original: - mergingList: - - name: 1 - - name: 1 - - name: 2 - value: a - - name: 3 - - name: 3 - twoWay: - mergingList: - - name: 1 - $patch: delete - - name: 3 - $patch: delete - modified: - mergingList: - - name: 2 - value: a - - description: retainKeys map can add a field when no retainKeys directive present - original: - retainKeysMap: - name: foo - twoWay: - retainKeysMap: - value: bar - modified: - retainKeysMap: - name: foo - value: bar - - description: retainKeys map can change a field when no retainKeys directive present - original: - retainKeysMap: - name: foo - value: a - twoWay: - retainKeysMap: - value: b - modified: - retainKeysMap: - name: foo - value: b - - description: retainKeys map can delete a field when no retainKeys directive present - original: - retainKeysMap: - name: foo - value: a - twoWay: - retainKeysMap: - value: null - modified: - retainKeysMap: - name: foo - - description: retainKeys map merge an empty map - original: - retainKeysMap: - name: foo - value: a - twoWay: - retainKeysMap: {} - modified: - retainKeysMap: - name: foo - value: a - - description: retainKeys list can add a field when no retainKeys directive present - original: - retainKeysMergingList: - - name: bar - - name: foo - twoWay: - retainKeysMergingList: - - name: foo - value: a - modified: - retainKeysMergingList: - - name: bar - - name: foo - value: a - - description: retainKeys list can change a field when no retainKeys directive present - original: - retainKeysMergingList: - - name: bar - - name: foo - value: a - twoWay: - retainKeysMergingList: - - name: foo - value: b - modified: - retainKeysMergingList: - - name: bar - - name: foo - value: b - - description: retainKeys list can delete a field when no retainKeys directive present - original: - retainKeysMergingList: - - name: bar - - name: foo - value: a - twoWay: - retainKeysMergingList: - - name: foo - value: null - modified: - retainKeysMergingList: - - name: bar - - name: foo - - description: preserve the order from the patch in a merging list - original: - mergingList: - - name: 1 - - name: 2 - value: b - - name: 3 - twoWay: - mergingList: - - name: 3 - value: c - - name: 1 - value: a - - name: 2 - other: x - modified: - mergingList: - - name: 3 - value: c - - name: 1 - value: a - - name: 2 - value: b - other: x - - description: preserve the order from the patch in a merging list 2 - original: - mergingList: - - name: 1 - - name: 2 - value: b - - name: 3 - twoWay: - mergingList: - - name: 3 - value: c - - name: 1 - value: a - modified: - mergingList: - - name: 2 - value: b - - name: 3 - value: c - - name: 1 - value: a - - description: preserve the order from the patch in a merging int list - original: - mergingIntList: - - 1 - - 2 - - 3 - twoWay: - mergingIntList: - - 3 - - 1 - - 2 - modified: - mergingIntList: - - 3 - - 1 - - 2 - - description: preserve the order from the patch in a merging int list - original: - mergingIntList: - - 1 - - 2 - - 3 - twoWay: - mergingIntList: - - 3 - - 1 - modified: - mergingIntList: - - 2 - - 3 - - 1 -`) - -var customStrategicMergePatchRawTestCases = []StrategicMergePatchRawTestCase{ - { - Description: "$setElementOrder contains item that is not present in the list to be merged", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 3 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 3 - - name: 2 - - name: 1 -mergingList: - - name: 3 - value: 3 - - name: 1 - value: 1 -`), - Modified: []byte(` -mergingList: - - name: 3 - value: 3 - - name: 1 - value: 1 -`), - }, - }, - { - Description: "$setElementOrder contains item that is not present in the int list to be merged", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingIntList: - - 1 - - 3 -`), - TwoWay: []byte(` -$setElementOrder/mergingIntList: - - 3 - - 2 - - 1 -`), - Modified: []byte(` -mergingIntList: - - 3 - - 1 -`), - }, - }, - { - Description: "should check if order in $setElementOrder and patch list match", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 3 - - name: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 - - name: 3 -mergingList: - - name: 3 - value: 3 - - name: 1 - value: 1 -`), - ExpectedError: "doesn't match", - }, - }, - { - Description: "$setElementOrder contains item that is not present in the int list to be merged", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingIntList: - - 1 - - 3 - - 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingIntList: - - 1 - - 2 - - 3 -mergingIntList: - - 3 - - 1 -`), - ExpectedError: "doesn't match", - }, - }, - { - Description: "missing merge key should error out", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - value: a -`), - TwoWay: []byte(` -mergingList: - - value: b -`), - ExpectedError: "does not contain declared merge key", - }, - }, -} - -func TestCustomStrategicMergePatch(t *testing.T) { - mergeItemOpenapiSchema := PatchMetaFromOpenAPI{ - Schema: sptest.GetSchemaOrDie(fakeMergeItemSchema, "mergeItem"), - } - schemas := []LookupPatchMeta{ - mergeItemStructSchema, - mergeItemOpenapiSchema, - } - - tc := StrategicMergePatchTestCases{} - err := yaml.Unmarshal(customStrategicMergePatchTestCaseData, &tc) - if err != nil { - t.Errorf("can't unmarshal test cases: %v\n", err) - return - } - - for _, schema := range schemas { - for _, c := range tc.TestCases { - original, expectedTwoWayPatch, _, expectedResult := twoWayTestCaseToJSONOrFail(t, c, schema) - testPatchApplication(t, original, expectedTwoWayPatch, expectedResult, c.Description, "", schema) - } - - for _, c := range customStrategicMergePatchRawTestCases { - original, expectedTwoWayPatch, _, expectedResult := twoWayRawTestCaseToJSONOrFail(t, c) - testPatchApplication(t, original, expectedTwoWayPatch, expectedResult, c.Description, c.ExpectedError, schema) - } - } -} - -// These are test cases for StrategicMergePatch, to assert that applying a patch -// yields the correct outcome. They are also test cases for CreateTwoWayMergePatch -// and CreateThreeWayMergePatch, to assert that they both generate the correct patch -// for the given set of input documents. -// -var createStrategicMergePatchTestCaseData = []byte(` -testCases: - - description: nil original - twoWay: - name: 1 - value: 1 - modified: - name: 1 - value: 1 - current: - name: 1 - other: a - threeWay: - value: 1 - result: - name: 1 - value: 1 - other: a - - description: nil patch - original: - name: 1 - twoWay: - {} - modified: - name: 1 - current: - name: 1 - threeWay: - {} - result: - name: 1 - - description: add field to map - original: - name: 1 - twoWay: - value: 1 - modified: - name: 1 - value: 1 - current: - name: 1 - other: a - threeWay: - value: 1 - result: - name: 1 - value: 1 - other: a - - description: add field to map with conflict - original: - name: 1 - twoWay: - value: 1 - modified: - name: 1 - value: 1 - current: - name: a - other: a - threeWay: - name: 1 - value: 1 - result: - name: 1 - value: 1 - other: a - - description: add field and delete field from map - original: - name: 1 - twoWay: - name: null - value: 1 - modified: - value: 1 - current: - name: 1 - other: a - threeWay: - name: null - value: 1 - result: - value: 1 - other: a - - description: add field and delete field from map with conflict - original: - name: 1 - twoWay: - name: null - value: 1 - modified: - value: 1 - current: - name: a - other: a - threeWay: - name: null - value: 1 - result: - value: 1 - other: a - - description: delete field from nested map - original: - simpleMap: - key1: 1 - key2: 1 - twoWay: - simpleMap: - key2: null - modified: - simpleMap: - key1: 1 - current: - simpleMap: - key1: 1 - key2: 1 - other: a - threeWay: - simpleMap: - key2: null - result: - simpleMap: - key1: 1 - other: a - - description: delete field from nested map with conflict - original: - simpleMap: - key1: 1 - key2: 1 - twoWay: - simpleMap: - key2: null - modified: - simpleMap: - key1: 1 - current: - simpleMap: - key1: a - key2: 1 - other: a - threeWay: - simpleMap: - key1: 1 - key2: null - result: - simpleMap: - key1: 1 - other: a - - description: delete all fields from map - original: - name: 1 - value: 1 - twoWay: - name: null - value: null - modified: {} - current: - name: 1 - value: 1 - other: a - threeWay: - name: null - value: null - result: - other: a - - description: delete all fields from map with conflict - original: - name: 1 - value: 1 - twoWay: - name: null - value: null - modified: {} - current: - name: 1 - value: a - other: a - threeWay: - name: null - value: null - result: - other: a - - description: add field and delete all fields from map - original: - name: 1 - value: 1 - twoWay: - name: null - value: null - other: a - modified: - other: a - current: - name: 1 - value: 1 - other: a - threeWay: - name: null - value: null - result: - other: a - - description: add field and delete all fields from map with conflict - original: - name: 1 - value: 1 - twoWay: - name: null - value: null - other: a - modified: - other: a - current: - name: 1 - value: 1 - other: b - threeWay: - name: null - value: null - other: a - result: - other: a - - description: replace list of scalars - original: - nonMergingIntList: - - 1 - - 2 - twoWay: - nonMergingIntList: - - 2 - - 3 - modified: - nonMergingIntList: - - 2 - - 3 - current: - nonMergingIntList: - - 1 - - 2 - threeWay: - nonMergingIntList: - - 2 - - 3 - result: - nonMergingIntList: - - 2 - - 3 - - description: replace list of scalars with conflict - original: - nonMergingIntList: - - 1 - - 2 - twoWay: - nonMergingIntList: - - 2 - - 3 - modified: - nonMergingIntList: - - 2 - - 3 - current: - nonMergingIntList: - - 1 - - 4 - threeWay: - nonMergingIntList: - - 2 - - 3 - result: - nonMergingIntList: - - 2 - - 3 - - description: delete all maps from merging list - original: - mergingList: - - name: 1 - - name: 2 - twoWay: - mergingList: - - name: 1 - $patch: delete - - name: 2 - $patch: delete - modified: - mergingList: [] - current: - mergingList: - - name: 1 - - name: 2 - threeWay: - mergingList: - - name: 1 - $patch: delete - - name: 2 - $patch: delete - result: - mergingList: [] - - description: delete all maps from merging list with conflict - original: - mergingList: - - name: 1 - - name: 2 - twoWay: - mergingList: - - name: 1 - $patch: delete - - name: 2 - $patch: delete - modified: - mergingList: [] - current: - mergingList: - - name: 1 - other: a - - name: 2 - other: b - threeWay: - mergingList: - - name: 1 - $patch: delete - - name: 2 - $patch: delete - result: - mergingList: [] - - description: delete all maps from empty merging list - original: - mergingList: - - name: 1 - - name: 2 - twoWay: - mergingList: - - name: 1 - $patch: delete - - name: 2 - $patch: delete - modified: - mergingList: [] - current: - mergingList: [] - threeWay: - mergingList: - - name: 1 - $patch: delete - - name: 2 - $patch: delete - result: - mergingList: [] - - description: merge empty merging lists - original: - mergingList: [] - twoWay: - {} - modified: - mergingList: [] - current: - mergingList: [] - threeWay: - {} - result: - mergingList: [] - - description: defined null values should propagate overwrite current fields (with conflict) - original: - name: 2 - twoWay: - name: 1 - value: 1 - other: null - twoWayResult: - name: 1 - value: 1 - modified: - name: 1 - value: 1 - other: null - current: - name: a - other: a - threeWay: - name: 1 - value: 1 - other: null - result: - name: 1 - value: 1 - - description: defined null values should propagate removing original fields - original: - name: original-name - value: original-value - current: - name: original-name - value: original-value - other: current-other - modified: - name: modified-name - value: null - twoWay: - name: modified-name - value: null - twoWayResult: - name: modified-name - threeWay: - name: modified-name - value: null - result: - name: modified-name - other: current-other - - description: nil patch with retainKeys map - original: - name: a - retainKeysMap: - name: foo - current: - name: a - value: b - retainKeysMap: - name: foo - modified: - name: a - retainKeysMap: - name: foo - twoWay: {} - threeWay: {} - result: - name: a - value: b - retainKeysMap: - name: foo - - description: retainKeys map with no change should not be present - original: - name: a - retainKeysMap: - name: foo - current: - name: a - other: c - retainKeysMap: - name: foo - modified: - name: a - value: b - retainKeysMap: - name: foo - twoWay: - value: b - threeWay: - value: b - result: - name: a - value: b - other: c - retainKeysMap: - name: foo -`) - -var strategicMergePatchRawTestCases = []StrategicMergePatchRawTestCase{ - { - Description: "delete items in lists of scalars", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingIntList: - - 1 - - 2 - - 3 -`), - TwoWay: []byte(` -$setElementOrder/mergingIntList: - - 1 - - 2 -$deleteFromPrimitiveList/mergingIntList: - - 3 -`), - Modified: []byte(` -mergingIntList: - - 1 - - 2 -`), - Current: []byte(` -mergingIntList: - - 1 - - 2 - - 3 - - 4 -`), - ThreeWay: []byte(` -$setElementOrder/mergingIntList: - - 1 - - 2 -$deleteFromPrimitiveList/mergingIntList: - - 3 -`), - Result: []byte(` -mergingIntList: - - 1 - - 2 - - 4 -`), - }, - }, - { - Description: "delete all duplicate items in lists of scalars", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingIntList: - - 1 - - 2 - - 3 - - 3 -`), - TwoWay: []byte(` -$setElementOrder/mergingIntList: - - 1 - - 2 -$deleteFromPrimitiveList/mergingIntList: - - 3 -`), - Modified: []byte(` -mergingIntList: - - 1 - - 2 -`), - Current: []byte(` -mergingIntList: - - 1 - - 2 - - 3 - - 3 - - 4 -`), - ThreeWay: []byte(` -$setElementOrder/mergingIntList: - - 1 - - 2 -$deleteFromPrimitiveList/mergingIntList: - - 3 -`), - Result: []byte(` -mergingIntList: - - 1 - - 2 - - 4 -`), - }, - }, - { - Description: "add and delete items in lists of scalars", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingIntList: - - 1 - - 2 - - 3 -`), - TwoWay: []byte(` -$setElementOrder/mergingIntList: - - 1 - - 2 - - 4 -$deleteFromPrimitiveList/mergingIntList: - - 3 -mergingIntList: - - 4 -`), - Modified: []byte(` -mergingIntList: - - 1 - - 2 - - 4 -`), - Current: []byte(` -mergingIntList: - - 1 - - 2 - - 3 - - 4 -`), - ThreeWay: []byte(` -$setElementOrder/mergingIntList: - - 1 - - 2 - - 4 -$deleteFromPrimitiveList/mergingIntList: - - 3 -`), - Result: []byte(` -mergingIntList: - - 1 - - 2 - - 4 -`), - }, - }, - { - Description: "merge lists of maps", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 2 - value: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 4 - - name: 1 - - name: 2 - - name: 3 -mergingList: - - name: 4 - value: 4 - - name: 3 - value: 3 -`), - Modified: []byte(` -mergingList: - - name: 4 - value: 4 - - name: 1 - - name: 2 - value: 2 - - name: 3 - value: 3 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - - name: 2 - value: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 4 - - name: 1 - - name: 2 - - name: 3 -mergingList: - - name: 4 - value: 4 - - name: 3 - value: 3 -`), - Result: []byte(` -mergingList: - - name: 4 - value: 4 - - name: 1 - other: a - - name: 2 - value: 2 - other: b - - name: 3 - value: 3 -`), - }, - }, - { - Description: "merge lists of maps with conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 2 - value: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 - - name: 3 -mergingList: - - name: 3 - value: 3 -`), - Modified: []byte(` -mergingList: - - name: 1 - - name: 2 - value: 2 - - name: 3 - value: 3 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - - name: 2 - value: 3 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 - - name: 3 -mergingList: - - name: 2 - value: 2 - - name: 3 - value: 3 -`), - Result: []byte(` -mergingList: - - name: 1 - other: a - - name: 2 - value: 2 - other: b - - name: 3 - value: 3 -`), - }, - }, - { - Description: "add field to map in merging list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 2 - value: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - value: 1 -`), - Modified: []byte(` -mergingList: - - name: 1 - value: 1 - - name: 2 - value: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - - name: 2 - value: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - value: 1 -`), - Result: []byte(` -mergingList: - - name: 1 - value: 1 - other: a - - name: 2 - value: 2 - other: b -`), - }, - }, - { - Description: "add field to map in merging list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 2 - value: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - value: 1 -`), - Modified: []byte(` -mergingList: - - name: 1 - value: 1 - - name: 2 - value: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - - name: 2 - value: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - value: 1 -`), - Result: []byte(` -mergingList: - - name: 1 - value: 1 - other: a - - name: 2 - value: 2 - other: b -`), - }, - }, - { - Description: "add field to map in merging list with conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 2 - value: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - value: 1 -`), - Modified: []byte(` -mergingList: - - name: 1 - value: 1 - - name: 2 - value: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - - name: 3 - value: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - value: 1 - - name: 2 - value: 2 -`), - Result: []byte(` -mergingList: - - name: 1 - value: 1 - other: a - - name: 2 - value: 2 - - name: 3 - value: 2 - other: b -`), - }, - }, - { - Description: "add duplicate field to map in merging list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 2 - value: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - value: 1 -`), - Modified: []byte(` -mergingList: - - name: 1 - value: 1 - - name: 2 - value: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - value: 1 - other: a - - name: 2 - value: 2 - other: b -`), - ThreeWay: []byte(`{}`), - Result: []byte(` -mergingList: - - name: 1 - value: 1 - other: a - - name: 2 - value: 2 - other: b -`), - }, - }, - { - Description: "add an item that already exists in current object in merging list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - value: a - - name: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 - - name: 3 -mergingList: - - name: 3 -`), - Modified: []byte(` -mergingList: - - name: 1 - value: a - - name: 2 - - name: 3 -`), - Current: []byte(` -mergingList: - - name: 1 - value: a - other: x - - name: 2 - - name: 3 -`), - ThreeWay: []byte(`{}`), - Result: []byte(` -mergingList: - - name: 1 - value: a - other: x - - name: 2 - - name: 3 -`), - }, - }, - { - Description: "add duplicate field to map in merging list with conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 2 - value: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - value: 1 -`), - Modified: []byte(` -mergingList: - - name: 1 - value: 1 - - name: 2 - value: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - value: 1 - other: a - - name: 2 - value: 3 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 2 - value: 2 -`), - Result: []byte(` -mergingList: - - name: 1 - value: 1 - other: a - - name: 2 - value: 2 - other: b -`), - }, - }, - { - Description: "replace map field value in merging list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - value: 1 - - name: 2 - value: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - value: a -`), - Modified: []byte(` -mergingList: - - name: 1 - value: a - - name: 2 - value: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - value: 1 - other: a - - name: 2 - value: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - value: a -`), - Result: []byte(` -mergingList: - - name: 1 - value: a - other: a - - name: 2 - value: 2 - other: b -`), - }, - }, - { - Description: "replace map field value in merging list with conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - value: 1 - - name: 2 - value: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - value: a -`), - Modified: []byte(` -mergingList: - - name: 1 - value: a - - name: 2 - value: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - value: 3 - other: a - - name: 2 - value: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - value: a -`), - Result: []byte(` -mergingList: - - name: 1 - value: a - other: a - - name: 2 - value: 2 - other: b -`), - }, - }, - { - Description: "delete map from merging list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 2 -mergingList: - - name: 1 - $patch: delete -`), - Modified: []byte(` -mergingList: - - name: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - - name: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 2 -mergingList: - - name: 1 - $patch: delete -`), - Result: []byte(` -mergingList: - - name: 2 - other: b -`), - }, - }, - { - Description: "delete map from merging list with conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 2 -mergingList: - - name: 1 - $patch: delete -`), - Modified: []byte(` -mergingList: - - name: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - - name: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 2 -mergingList: - - name: 1 - $patch: delete -`), - Result: []byte(` -mergingList: - - name: 2 - other: b -`), - }, - }, - { - Description: "delete missing map from merging list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 2 -mergingList: - - name: 1 - $patch: delete -`), - Modified: []byte(` -mergingList: - - name: 2 -`), - Current: []byte(` -mergingList: - - name: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 2 -mergingList: - - name: 1 - $patch: delete -`), - Result: []byte(` -mergingList: - - name: 2 - other: b -`), - }, - }, - { - Description: "delete missing map from merging list with conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 2 -mergingList: - - name: 1 - $patch: delete -`), - Modified: []byte(` -mergingList: - - name: 2 -`), - Current: []byte(` -mergingList: - - name: 3 - other: a -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 2 -mergingList: - - name: 2 - - name: 1 - $patch: delete -`), - Result: []byte(` -mergingList: - - name: 2 - - name: 3 - other: a -`), - }, - }, - { - Description: "add map and delete map from merging list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 2 - - name: 3 -mergingList: - - name: 3 - - name: 1 - $patch: delete -`), - Modified: []byte(` -mergingList: - - name: 2 - - name: 3 -`), - Current: []byte(` -mergingList: - - name: 1 - - name: 2 - other: b - - name: 4 - other: c -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 2 - - name: 3 -mergingList: - - name: 3 - - name: 1 - $patch: delete -`), - Result: []byte(` -mergingList: - - name: 2 - other: b - - name: 4 - other: c - - name: 3 -`), - }, - }, - { - Description: "add map and delete map from merging list with conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 2 - - name: 3 -mergingList: - - name: 3 - - name: 1 - $patch: delete -`), - Modified: []byte(` -mergingList: - - name: 2 - - name: 3 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - - name: 4 - other: c -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 2 - - name: 3 -mergingList: - - name: 2 - - name: 3 - - name: 1 - $patch: delete -`), - Result: []byte(` -mergingList: - - name: 4 - other: c - - name: 2 - - name: 3 -`), - }, - }, - { - Description: "delete field from map in merging list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - value: 1 - - name: 2 - value: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - value: null -`), - Modified: []byte(` -mergingList: - - name: 1 - - name: 2 - value: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - value: 1 - other: a - - name: 2 - value: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - value: null -`), - Result: []byte(` -mergingList: - - name: 1 - other: a - - name: 2 - value: 2 - other: b -`), - }, - }, - { - Description: "delete field from map in merging list with conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - value: 1 - - name: 2 - value: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - value: null -`), - Modified: []byte(` -mergingList: - - name: 1 - - name: 2 - value: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - value: a - other: a - - name: 2 - value: 2 -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - value: null -`), - Result: []byte(` -mergingList: - - name: 1 - other: a - - name: 2 - value: 2 -`), - }, - }, - { - Description: "delete missing field from map in merging list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - value: 1 - - name: 2 - value: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - value: null -`), - Modified: []byte(` -mergingList: - - name: 1 - - name: 2 - value: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - - name: 2 - value: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - value: null -`), - Result: []byte(` -mergingList: - - name: 1 - other: a - - name: 2 - value: 2 - other: b -`), - }, - }, - { - Description: "delete missing field from map in merging list with conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - value: 1 - - name: 2 - value: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - value: null -`), - Modified: []byte(` -mergingList: - - name: 1 - - name: 2 - value: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - - name: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - value: null - - name: 2 - value: 2 -`), - Result: []byte(` -mergingList: - - name: 1 - other: a - - name: 2 - value: 2 - other: b -`), - }, - }, - { - Description: "replace non merging list nested in merging list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - nonMergingList: - - name: 1 - - name: 2 - value: 2 - - name: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - nonMergingList: - - name: 1 - value: 1 -`), - Modified: []byte(` -mergingList: - - name: 1 - nonMergingList: - - name: 1 - value: 1 - - name: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - nonMergingList: - - name: 1 - - name: 2 - value: 2 - - name: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - nonMergingList: - - name: 1 - value: 1 -`), - Result: []byte(` -mergingList: - - name: 1 - other: a - nonMergingList: - - name: 1 - value: 1 - - name: 2 - other: b -`), - }, - }, - { - Description: "replace non merging list nested in merging list with value conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - nonMergingList: - - name: 1 - - name: 2 - value: 2 - - name: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - nonMergingList: - - name: 1 - value: 1 -`), - Modified: []byte(` -mergingList: - - name: 1 - nonMergingList: - - name: 1 - value: 1 - - name: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - nonMergingList: - - name: 1 - value: c - - name: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - nonMergingList: - - name: 1 - value: 1 -`), - Result: []byte(` -mergingList: - - name: 1 - other: a - nonMergingList: - - name: 1 - value: 1 - - name: 2 - other: b -`), - }, - }, - { - Description: "replace non merging list nested in merging list with deletion conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - nonMergingList: - - name: 1 - - name: 2 - value: 2 - - name: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - nonMergingList: - - name: 1 - value: 1 -`), - Modified: []byte(` -mergingList: - - name: 1 - nonMergingList: - - name: 1 - value: 1 - - name: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - nonMergingList: - - name: 2 - value: 2 - - name: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 1 - nonMergingList: - - name: 1 - value: 1 -`), - Result: []byte(` -mergingList: - - name: 1 - other: a - nonMergingList: - - name: 1 - value: 1 - - name: 2 - other: b -`), - }, - }, - { - Description: "add field to map in merging list nested in merging list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - mergingList: - - name: 1 - - name: 2 - value: 2 - - name: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - $setElementOrder/mergingList: - - name: 1 - - name: 2 - name: 1 - mergingList: - - name: 1 - value: 1 -`), - Modified: []byte(` -mergingList: - - name: 1 - mergingList: - - name: 1 - value: 1 - - name: 2 - value: 2 - - name: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - mergingList: - - name: 1 - - name: 2 - value: 2 - - name: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - $setElementOrder/mergingList: - - name: 1 - - name: 2 - name: 1 - mergingList: - - name: 1 - value: 1 -`), - Result: []byte(` -mergingList: - - name: 1 - other: a - mergingList: - - name: 1 - value: 1 - - name: 2 - value: 2 - - name: 2 - other: b -`), - }, - }, - { - Description: "add field to map in merging list nested in merging list with value conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - mergingList: - - name: 1 - - name: 2 - value: 2 - - name: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - $setElementOrder/mergingList: - - name: 1 - - name: 2 - name: 1 - mergingList: - - name: 1 - value: 1 -`), - Modified: []byte(` -mergingList: - - name: 1 - mergingList: - - name: 1 - value: 1 - - name: 2 - value: 2 - - name: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - mergingList: - - name: 1 - value: a - other: c - - name: 2 - value: b - other: d - - name: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - $setElementOrder/mergingList: - - name: 1 - - name: 2 - name: 1 - mergingList: - - name: 1 - value: 1 - - name: 2 - value: 2 -`), - Result: []byte(` -mergingList: - - name: 1 - other: a - mergingList: - - name: 1 - value: 1 - other: c - - name: 2 - value: 2 - other: d - - name: 2 - other: b -`), - }, - }, - { - Description: "add field to map in merging list nested in merging list with deletion conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - mergingList: - - name: 1 - - name: 2 - value: 2 - - name: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - $setElementOrder/mergingList: - - name: 1 - - name: 2 - name: 1 - mergingList: - - name: 1 - value: 1 -`), - Modified: []byte(` -mergingList: - - name: 1 - mergingList: - - name: 1 - value: 1 - - name: 2 - value: 2 - - name: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - mergingList: - - name: 2 - value: 2 - other: d - - name: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - $setElementOrder/mergingList: - - name: 1 - - name: 2 - name: 1 - mergingList: - - name: 1 - value: 1 -`), - Result: []byte(` -mergingList: - - name: 1 - other: a - mergingList: - - name: 1 - value: 1 - - name: 2 - value: 2 - other: d - - name: 2 - other: b -`), - }, - }, - - { - Description: "add field to map in merging list nested in merging list with deletion conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - mergingList: - - name: 1 - - name: 2 - value: 2 - - name: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - $setElementOrder/mergingList: - - name: 2 - - name: 1 - name: 1 - mergingList: - - name: 1 - value: 1 -`), - Modified: []byte(` -mergingList: - - name: 1 - mergingList: - - name: 2 - value: 2 - - name: 1 - value: 1 - - name: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - mergingList: - - name: 2 - value: 2 - other: d - - name: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - $setElementOrder/mergingList: - - name: 2 - - name: 1 - name: 1 - mergingList: - - name: 1 - value: 1 -`), - Result: []byte(` -mergingList: - - name: 1 - other: a - mergingList: - - name: 2 - value: 2 - other: d - - name: 1 - value: 1 - - name: 2 - other: b -`), - }, - }, - { - Description: "add map to merging list by pointer", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergeItemPtr: - - name: 1 -`), - TwoWay: []byte(` -$setElementOrder/mergeItemPtr: - - name: 1 - - name: 2 -mergeItemPtr: - - name: 2 -`), - Modified: []byte(` -mergeItemPtr: - - name: 1 - - name: 2 -`), - Current: []byte(` -mergeItemPtr: - - name: 1 - other: a - - name: 3 -`), - ThreeWay: []byte(` -$setElementOrder/mergeItemPtr: - - name: 1 - - name: 2 -mergeItemPtr: - - name: 2 -`), - Result: []byte(` -mergeItemPtr: - - name: 1 - other: a - - name: 2 - - name: 3 -`), - }, - }, - { - Description: "add map to merging list by pointer with conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergeItemPtr: - - name: 1 -`), - TwoWay: []byte(` -$setElementOrder/mergeItemPtr: - - name: 1 - - name: 2 -mergeItemPtr: - - name: 2 -`), - Modified: []byte(` -mergeItemPtr: - - name: 1 - - name: 2 -`), - Current: []byte(` -mergeItemPtr: - - name: 3 -`), - ThreeWay: []byte(` -$setElementOrder/mergeItemPtr: - - name: 1 - - name: 2 -mergeItemPtr: - - name: 1 - - name: 2 -`), - Result: []byte(` -mergeItemPtr: - - name: 1 - - name: 2 - - name: 3 -`), - }, - }, - { - Description: "add field to map in merging list by pointer", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergeItemPtr: - - name: 1 - mergeItemPtr: - - name: 1 - - name: 2 - value: 2 - - name: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergeItemPtr: - - name: 1 - - name: 2 -mergeItemPtr: - - $setElementOrder/mergeItemPtr: - - name: 1 - - name: 2 - name: 1 - mergeItemPtr: - - name: 1 - value: 1 -`), - Modified: []byte(` -mergeItemPtr: - - name: 1 - mergeItemPtr: - - name: 1 - value: 1 - - name: 2 - value: 2 - - name: 2 -`), - Current: []byte(` -mergeItemPtr: - - name: 1 - other: a - mergeItemPtr: - - name: 1 - other: a - - name: 2 - value: 2 - other: b - - name: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergeItemPtr: - - name: 1 - - name: 2 -mergeItemPtr: - - $setElementOrder/mergeItemPtr: - - name: 1 - - name: 2 - name: 1 - mergeItemPtr: - - name: 1 - value: 1 -`), - Result: []byte(` -mergeItemPtr: - - name: 1 - other: a - mergeItemPtr: - - name: 1 - value: 1 - other: a - - name: 2 - value: 2 - other: b - - name: 2 - other: b -`), - }, - }, - { - Description: "add field to map in merging list by pointer with conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergeItemPtr: - - name: 1 - mergeItemPtr: - - name: 1 - - name: 2 - value: 2 - - name: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergeItemPtr: - - name: 1 - - name: 2 -mergeItemPtr: - - $setElementOrder/mergeItemPtr: - - name: 1 - - name: 2 - name: 1 - mergeItemPtr: - - name: 1 - value: 1 -`), - Modified: []byte(` -mergeItemPtr: - - name: 1 - mergeItemPtr: - - name: 1 - value: 1 - - name: 2 - value: 2 - - name: 2 -`), - Current: []byte(` -mergeItemPtr: - - name: 1 - other: a - mergeItemPtr: - - name: 1 - value: a - - name: 2 - value: 2 - other: b - - name: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergeItemPtr: - - name: 1 - - name: 2 -mergeItemPtr: - - $setElementOrder/mergeItemPtr: - - name: 1 - - name: 2 - name: 1 - mergeItemPtr: - - name: 1 - value: 1 -`), - Result: []byte(` -mergeItemPtr: - - name: 1 - other: a - mergeItemPtr: - - name: 1 - value: 1 - - name: 2 - value: 2 - other: b - - name: 2 - other: b -`), - }, - }, - { - Description: "merge lists of scalars", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingIntList: -- 1 -- 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingIntList: -- 1 -- 2 -- 3 -mergingIntList: -- 3 -`), - Modified: []byte(` -mergingIntList: -- 1 -- 2 -- 3 -`), - Current: []byte(` -mergingIntList: -- 1 -- 2 -- 4 -`), - ThreeWay: []byte(` -$setElementOrder/mergingIntList: -- 1 -- 2 -- 3 -mergingIntList: -- 3 -`), - Result: []byte(` -mergingIntList: -- 1 -- 2 -- 3 -- 4 -`), - }, - }, - { - Description: "add duplicate field to map in merging int list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingIntList: - - 1 - - 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingIntList: - - 1 - - 2 - - 3 -mergingIntList: - - 3 -`), - Modified: []byte(` -mergingIntList: - - 1 - - 2 - - 3 -`), - Current: []byte(` -mergingIntList: - - 1 - - 2 - - 3 -`), - ThreeWay: []byte(`{}`), - Result: []byte(` -mergingIntList: - - 1 - - 2 - - 3 -`), - }, - }, - // test case for setElementOrder - { - Description: "add an item in a list of primitives and preserve order", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingIntList: -- 1 -- 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingIntList: -- 3 -- 1 -- 2 -mergingIntList: -- 3 -`), - Modified: []byte(` -mergingIntList: -- 3 -- 1 -- 2 -`), - Current: []byte(` -mergingIntList: -- 1 -- 4 -- 2 -`), - ThreeWay: []byte(` -$setElementOrder/mergingIntList: -- 3 -- 1 -- 2 -mergingIntList: -- 3 -`), - Result: []byte(` -mergingIntList: -- 3 -- 1 -- 4 -- 2 -`), - }, - }, - { - Description: "delete an item in a list of primitives and preserve order", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingIntList: -- 1 -- 2 -- 3 -`), - TwoWay: []byte(` -$setElementOrder/mergingIntList: -- 2 -- 1 -$deleteFromPrimitiveList/mergingIntList: -- 3 -`), - Modified: []byte(` -mergingIntList: -- 2 -- 1 -`), - Current: []byte(` -mergingIntList: -- 1 -- 2 -- 3 -`), - ThreeWay: []byte(` -$setElementOrder/mergingIntList: -- 2 -- 1 -$deleteFromPrimitiveList/mergingIntList: -- 3 -`), - Result: []byte(` -mergingIntList: -- 2 -- 1 -`), - }, - }, - { - Description: "add an item in a list and preserve order", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 2 - value: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 3 - - name: 1 - - name: 2 -mergingList: - - name: 3 - value: 3 -`), - Modified: []byte(` -mergingList: - - name: 3 - value: 3 - - name: 1 - - name: 2 - value: 2 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - - name: 2 - value: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 3 - - name: 1 - - name: 2 -mergingList: - - name: 3 - value: 3 -`), - Result: []byte(` -mergingList: - - name: 3 - value: 3 - - name: 1 - other: a - - name: 2 - value: 2 - other: b -`), - }, - }, - { - Description: "add multiple items in a list and preserve order", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 2 - value: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 4 - - name: 2 - - name: 3 -mergingList: - - name: 4 - value: 4 - - name: 3 - value: 3 -`), - Modified: []byte(` -mergingList: - - name: 1 - - name: 4 - value: 4 - - name: 2 - value: 2 - - name: 3 - value: 3 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - - name: 2 - value: 2 - other: b -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 4 - - name: 2 - - name: 3 -mergingList: - - name: 4 - value: 4 - - name: 3 - value: 3 -`), - Result: []byte(` -mergingList: - - name: 1 - other: a - - name: 4 - value: 4 - - name: 2 - value: 2 - other: b - - name: 3 - value: 3 -`), - }, - }, - { - Description: "delete an item in a list and preserve order", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 3 - value: 3 - - name: 2 - value: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 2 - - name: 1 -mergingList: - - name: 3 - $patch: delete -`), - Modified: []byte(` -mergingList: - - name: 2 - value: 2 - - name: 1 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - - name: 2 - value: 2 - other: b - - name: 3 - value: 3 -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 2 - - name: 1 -mergingList: - - name: 3 - $patch: delete -`), - Result: []byte(` -mergingList: - - name: 2 - value: 2 - other: b - - name: 1 - other: a -`), - }, - }, - { - Description: "change an item in a list and preserve order", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 3 - value: 3 - - name: 2 - value: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 2 - - name: 3 - - name: 1 -mergingList: - - name: 3 - value: x -`), - Modified: []byte(` -mergingList: - - name: 2 - value: 2 - - name: 3 - value: x - - name: 1 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - - name: 2 - value: 2 - other: b - - name: 3 - value: 3 -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 2 - - name: 3 - - name: 1 -mergingList: - - name: 3 - value: x -`), - Result: []byte(` -mergingList: - - name: 2 - value: 2 - other: b - - name: 3 - value: x - - name: 1 - other: a -`), - }, - }, - { - Description: "add and delete an item in a list and preserve order", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 3 - value: 3 - - name: 2 - value: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 4 - - name: 2 - - name: 1 -mergingList: - - name: 4 - value: 4 - - name: 3 - $patch: delete -`), - Modified: []byte(` -mergingList: - - name: 4 - value: 4 - - name: 2 - value: 2 - - name: 1 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - - name: 2 - value: 2 - other: b - - name: 3 - value: 3 -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 4 - - name: 2 - - name: 1 -mergingList: - - name: 4 - value: 4 - - name: 3 - $patch: delete -`), - Result: []byte(` -mergingList: - - name: 4 - value: 4 - - name: 2 - value: 2 - other: b - - name: 1 - other: a -`), - }, - }, - { - Description: "set elements order in a list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 3 - value: 3 - - name: 4 - value: 4 - - name: 2 - value: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 4 - - name: 2 - - name: 3 - - name: 1 -`), - Modified: []byte(` -mergingList: - - name: 4 - value: 4 - - name: 2 - value: 2 - - name: 3 - value: 3 - - name: 1 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - - name: 3 - value: 3 - - name: 4 - value: 4 - - name: 2 - value: 2 -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 4 - - name: 2 - - name: 3 - - name: 1 -`), - Result: []byte(` -mergingList: - - name: 4 - value: 4 - - name: 2 - value: 2 - - name: 3 - value: 3 - - name: 1 - other: a -`), - }, - }, - { - Description: "set elements order in a list with server-only items", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 3 - value: 3 - - name: 4 - value: 4 - - name: 2 - value: 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 4 - - name: 2 - - name: 3 - - name: 1 -`), - Modified: []byte(` -mergingList: - - name: 4 - value: 4 - - name: 2 - value: 2 - - name: 3 - value: 3 - - name: 1 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - - name: 3 - value: 3 - - name: 4 - value: 4 - - name: 2 - value: 2 - - name: 9 -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 4 - - name: 2 - - name: 3 - - name: 1 -`), - Result: []byte(` -mergingList: - - name: 4 - value: 4 - - name: 2 - value: 2 - - name: 3 - value: 3 - - name: 1 - other: a - - name: 9 -`), - }, - }, - { - Description: "set elements order in a list with server-only items 2", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 2 - value: 2 - - name: 3 - value: 3 - - name: 4 - value: 4 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 2 - - name: 1 - - name: 4 - - name: 3 -`), - Modified: []byte(` -mergingList: - - name: 2 - value: 2 - - name: 1 - - name: 4 - value: 4 - - name: 3 - value: 3 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - - name: 2 - value: 2 - - name: 9 - - name: 3 - value: 3 - - name: 4 - value: 4 -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 2 - - name: 1 - - name: 4 - - name: 3 -`), - Result: []byte(` -mergingList: - - name: 2 - value: 2 - - name: 1 - other: a - - name: 9 - - name: 4 - value: 4 - - name: 3 - value: 3 -`), - }, - }, - { - Description: "set elements order in a list with server-only items 3", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: - - name: 1 - - name: 2 - value: 2 - - name: 3 - value: 3 - - name: 4 - value: 4 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 2 - - name: 1 - - name: 4 - - name: 3 -`), - Modified: []byte(` -mergingList: - - name: 2 - value: 2 - - name: 1 - - name: 4 - value: 4 - - name: 3 - value: 3 -`), - Current: []byte(` -mergingList: - - name: 1 - other: a - - name: 2 - value: 2 - - name: 7 - - name: 9 - - name: 8 - - name: 3 - value: 3 - - name: 4 - value: 4 -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 2 - - name: 1 - - name: 4 - - name: 3 -`), - Result: []byte(` -mergingList: - - name: 2 - value: 2 - - name: 1 - other: a - - name: 7 - - name: 9 - - name: 8 - - name: 4 - value: 4 - - name: 3 - value: 3 -`), - }, - }, - { - Description: "add an item in a int list and preserve order", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingIntList: - - 1 - - 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingIntList: - - 3 - - 1 - - 2 -mergingIntList: - - 3 -`), - Modified: []byte(` -mergingIntList: - - 3 - - 1 - - 2 -`), - Current: []byte(` -mergingIntList: - - 1 - - 2 -`), - ThreeWay: []byte(` -$setElementOrder/mergingIntList: - - 3 - - 1 - - 2 -mergingIntList: - - 3 -`), - Result: []byte(` -mergingIntList: - - 3 - - 1 - - 2 -`), - }, - }, - { - Description: "add multiple items in a int list and preserve order", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingIntList: - - 1 - - 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingIntList: - - 1 - - 4 - - 2 - - 3 -mergingIntList: - - 4 - - 3 -`), - Modified: []byte(` -mergingIntList: - - 1 - - 4 - - 2 - - 3 -`), - Current: []byte(` -mergingIntList: - - 1 - - 2 -`), - ThreeWay: []byte(` -$setElementOrder/mergingIntList: - - 1 - - 4 - - 2 - - 3 -mergingIntList: - - 4 - - 3 -`), - Result: []byte(` -mergingIntList: - - 1 - - 4 - - 2 - - 3 -`), - }, - }, - { - Description: "delete an item in a int list and preserve order", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingIntList: - - 1 - - 3 - - 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingIntList: - - 2 - - 1 -$deleteFromPrimitiveList/mergingIntList: - - 3 -`), - Modified: []byte(` -mergingIntList: - - 2 - - 1 -`), - Current: []byte(` -mergingIntList: - - 1 - - 2 - - 3 -`), - ThreeWay: []byte(` -$setElementOrder/mergingIntList: - - 2 - - 1 -$deleteFromPrimitiveList/mergingIntList: - - 3 -`), - Result: []byte(` -mergingIntList: - - 2 - - 1 -`), - }, - }, - { - Description: "add and delete an item in a int list and preserve order", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingIntList: - - 1 - - 3 - - 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingIntList: - - 4 - - 2 - - 1 -mergingIntList: - - 4 -$deleteFromPrimitiveList/mergingIntList: - - 3 -`), - Modified: []byte(` -mergingIntList: - - 4 - - 2 - - 1 -`), - Current: []byte(` -mergingIntList: - - 1 - - 2 - - 3 -`), - ThreeWay: []byte(` -$setElementOrder/mergingIntList: - - 4 - - 2 - - 1 -mergingIntList: - - 4 -$deleteFromPrimitiveList/mergingIntList: - - 3 -`), - Result: []byte(` -mergingIntList: - - 4 - - 2 - - 1 -`), - }, - }, - { - Description: "set elements order in a int list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingIntList: - - 1 - - 3 - - 4 - - 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingIntList: - - 4 - - 2 - - 3 - - 1 -`), - Modified: []byte(` -mergingIntList: - - 4 - - 2 - - 3 - - 1 -`), - Current: []byte(` -mergingIntList: - - 1 - - 3 - - 4 - - 2 -`), - ThreeWay: []byte(` -$setElementOrder/mergingIntList: - - 4 - - 2 - - 3 - - 1 -`), - Result: []byte(` -mergingIntList: - - 4 - - 2 - - 3 - - 1 -`), - }, - }, - { - Description: "set elements order in a int list with server-only items", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingIntList: - - 1 - - 3 - - 4 - - 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingIntList: - - 4 - - 2 - - 3 - - 1 -`), - Modified: []byte(` -mergingIntList: - - 4 - - 2 - - 3 - - 1 -`), - Current: []byte(` -mergingIntList: - - 1 - - 3 - - 4 - - 2 - - 9 -`), - ThreeWay: []byte(` -$setElementOrder/mergingIntList: - - 4 - - 2 - - 3 - - 1 -`), - Result: []byte(` -mergingIntList: - - 4 - - 2 - - 3 - - 1 - - 9 -`), - }, - }, - { - Description: "set elements order in a int list with server-only items 2", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingIntList: - - 1 - - 2 - - 3 - - 4 -`), - TwoWay: []byte(` -$setElementOrder/mergingIntList: - - 2 - - 1 - - 4 - - 3 -`), - Modified: []byte(` -mergingIntList: - - 2 - - 1 - - 4 - - 3 -`), - Current: []byte(` -mergingIntList: - - 1 - - 2 - - 9 - - 3 - - 4 -`), - ThreeWay: []byte(` -$setElementOrder/mergingIntList: - - 2 - - 1 - - 4 - - 3 -`), - Result: []byte(` -mergingIntList: - - 2 - - 1 - - 9 - - 4 - - 3 -`), - }, - }, - { - Description: "set elements order in a int list with server-only items 3", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingIntList: - - 1 - - 2 - - 3 - - 4 -`), - TwoWay: []byte(` -$setElementOrder/mergingIntList: - - 2 - - 1 - - 4 - - 3 -`), - Modified: []byte(` -mergingIntList: - - 2 - - 1 - - 4 - - 3 -`), - Current: []byte(` -mergingIntList: - - 1 - - 2 - - 7 - - 9 - - 8 - - 3 - - 4 -`), - ThreeWay: []byte(` -$setElementOrder/mergingIntList: - - 2 - - 1 - - 4 - - 3 -`), - Result: []byte(` -mergingIntList: - - 2 - - 1 - - 7 - - 9 - - 8 - - 4 - - 3 -`), - }, - }, - { - // This test case is used just to demonstrate the behavior when dealing with a list with duplicate - Description: "behavior of set element order for a merging list with duplicate", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: -- name: 1 -- name: 2 - value: dup1 -- name: 3 -- name: 2 - value: dup2 -- name: 4 -`), - Current: []byte(` -mergingList: -- name: 1 -- name: 2 - value: dup1 -- name: 3 -- name: 2 - value: dup2 -- name: 4 -`), - Modified: []byte(` -mergingList: -- name: 2 - value: dup1 -- name: 1 -- name: 4 -- name: 3 -- name: 2 - value: dup2 -`), - TwoWay: []byte(` -$setElementOrder/mergingList: -- name: 2 -- name: 1 -- name: 4 -- name: 3 -- name: 2 -`), - TwoWayResult: []byte(` -mergingList: -- name: 2 - value: dup1 -- name: 2 - value: dup2 -- name: 1 -- name: 4 -- name: 3 -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: -- name: 2 -- name: 1 -- name: 4 -- name: 3 -- name: 2 -`), - Result: []byte(` -mergingList: -- name: 2 - value: dup1 -- name: 2 - value: dup2 -- name: 1 -- name: 4 -- name: 3 -`), - }, - }, - { - // This test case is used just to demonstrate the behavior when dealing with a list with duplicate - Description: "behavior of set element order for a merging int list with duplicate", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingIntList: -- 1 -- 2 -- 3 -- 2 -- 4 -`), - Current: []byte(` -mergingIntList: -- 1 -- 2 -- 3 -- 2 -- 4 -`), - Modified: []byte(` -mergingIntList: -- 2 -- 1 -- 4 -- 3 -- 2 -`), - TwoWay: []byte(` -$setElementOrder/mergingIntList: -- 2 -- 1 -- 4 -- 3 -- 2 -`), - TwoWayResult: []byte(` -mergingIntList: -- 2 -- 2 -- 1 -- 4 -- 3 -`), - ThreeWay: []byte(` -$setElementOrder/mergingIntList: -- 2 -- 1 -- 4 -- 3 -- 2 -`), - Result: []byte(` -mergingIntList: -- 2 -- 2 -- 1 -- 4 -- 3 -`), - }, - }, - { - Description: "retainKeys map should clear defaulted field", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(`{}`), - Current: []byte(` -retainKeysMap: - value: foo -`), - Modified: []byte(` -retainKeysMap: - other: bar -`), - TwoWay: []byte(` -retainKeysMap: - other: bar -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - other - other: bar -`), - Result: []byte(` -retainKeysMap: - other: bar -`), - }, - }, - { - Description: "retainKeys map should clear defaulted field with conflict (discriminated union)", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(`{}`), - Current: []byte(` -retainKeysMap: - name: type1 - value: foo -`), - Modified: []byte(` -retainKeysMap: - name: type2 - other: bar -`), - TwoWay: []byte(` -retainKeysMap: - name: type2 - other: bar -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - other - name: type2 - other: bar -`), - Result: []byte(` -retainKeysMap: - name: type2 - other: bar -`), - }, - }, - { - Description: "retainKeys map adds a field", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo -`), - Current: []byte(` -retainKeysMap: - name: foo -`), - Modified: []byte(` -retainKeysMap: - name: foo - value: bar -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - value - value: bar -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - value - value: bar -`), - Result: []byte(` -retainKeysMap: - name: foo - value: bar -`), - }, - }, - { - Description: "retainKeys map adds a field and clear a field", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo -`), - Current: []byte(` -retainKeysMap: - name: foo - other: a -`), - Modified: []byte(` -retainKeysMap: - name: foo - value: bar -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - value - value: bar -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - value - value: bar -`), - Result: []byte(` -retainKeysMap: - name: foo - value: bar -`), - }, - }, - { - Description: "retainKeys map deletes a field", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - value: bar -`), - Current: []byte(` -retainKeysMap: - name: foo - value: bar -`), - Modified: []byte(` -retainKeysMap: - name: foo -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - name - value: null -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - name - value: null -`), - Result: []byte(` -retainKeysMap: - name: foo -`), - }, - }, - { - Description: "retainKeys map deletes a field and clears a field", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - value: bar -`), - Current: []byte(` -retainKeysMap: - name: foo - value: bar - other: a -`), - Modified: []byte(` -retainKeysMap: - name: foo -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - name - value: null -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - name - value: null -`), - Result: []byte(` -retainKeysMap: - name: foo -`), - }, - }, - { - Description: "retainKeys map clears a field", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - value: bar -`), - Current: []byte(` -retainKeysMap: - name: foo - value: bar - other: a -`), - Modified: []byte(` -retainKeysMap: - name: foo - value: bar -`), - TwoWay: []byte(`{}`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - value -`), - Result: []byte(` -retainKeysMap: - name: foo - value: bar -`), - }, - }, - { - Description: "retainKeys map nested map with no change", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - simpleMap: - key1: a -`), - Current: []byte(` -retainKeysMap: - name: foo - simpleMap: - key1: a -`), - Modified: []byte(` -retainKeysMap: - name: foo - value: bar - simpleMap: - key1: a -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - simpleMap - - value - value: bar -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - simpleMap - - value - value: bar -`), - Result: []byte(` -retainKeysMap: - name: foo - value: bar - simpleMap: - key1: a -`), - }, - }, - { - Description: "retainKeys map adds a field in a nested map", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - value: bar - simpleMap: - key1: a -`), - Current: []byte(` -retainKeysMap: - name: foo - value: bar - simpleMap: - key1: a - key3: c -`), - Modified: []byte(` -retainKeysMap: - name: foo - value: bar - simpleMap: - key1: a - key2: b -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - simpleMap - - value - simpleMap: - key2: b -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - simpleMap - - value - simpleMap: - key2: b -`), - Result: []byte(` -retainKeysMap: - name: foo - value: bar - simpleMap: - key1: a - key2: b - key3: c -`), - }, - }, - { - Description: "retainKeys map deletes a field in a nested map", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - value: bar - simpleMap: - key1: a - key2: b -`), - Current: []byte(` -retainKeysMap: - name: foo - value: bar - simpleMap: - key1: a - key2: b - key3: c -`), - Modified: []byte(` -retainKeysMap: - name: foo - value: bar - simpleMap: - key1: a -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - simpleMap - - value - simpleMap: - key2: null -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - simpleMap - - value - simpleMap: - key2: null -`), - Result: []byte(` -retainKeysMap: - name: foo - value: bar - simpleMap: - key1: a - key3: c -`), - }, - }, - { - Description: "retainKeys map changes a field in a nested map", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - value: bar - simpleMap: - key1: a - key2: b -`), - Current: []byte(` -retainKeysMap: - name: foo - value: bar - simpleMap: - key1: a - key2: b - key3: c -`), - Modified: []byte(` -retainKeysMap: - name: foo - value: bar - simpleMap: - key1: x - key2: b -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - simpleMap - - value - simpleMap: - key1: x -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - simpleMap - - value - simpleMap: - key1: x -`), - Result: []byte(` -retainKeysMap: - name: foo - value: bar - simpleMap: - key1: x - key2: b - key3: c -`), - }, - }, - { - Description: "retainKeys map changes a field in a nested map with conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - value: bar - simpleMap: - key1: old - key2: b -`), - Current: []byte(` -retainKeysMap: - name: foo - value: bar - simpleMap: - key1: new - key2: b - key3: c -`), - Modified: []byte(` -retainKeysMap: - name: foo - value: bar - simpleMap: - key1: modified - key2: b -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - simpleMap - - value - simpleMap: - key1: modified -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - simpleMap - - value - simpleMap: - key1: modified -`), - Result: []byte(` -retainKeysMap: - name: foo - value: bar - simpleMap: - key1: modified - key2: b - key3: c -`), - }, - }, - { - Description: "retainKeys map replaces non-merging list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - value: bar - nonMergingList: - - name: a - - name: b -`), - Current: []byte(` -retainKeysMap: - name: foo - value: bar - nonMergingList: - - name: a - - name: b -`), - Modified: []byte(` -retainKeysMap: - name: foo - value: bar - nonMergingList: - - name: a - - name: c - - name: b -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - nonMergingList - - value - nonMergingList: - - name: a - - name: c - - name: b -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - nonMergingList - - value - nonMergingList: - - name: a - - name: c - - name: b -`), - Result: []byte(` -retainKeysMap: - name: foo - value: bar - nonMergingList: - - name: a - - name: c - - name: b -`), - }, - }, - { - Description: "retainKeys map nested non-merging list with no change", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - nonMergingList: - - name: a - - name: b -`), - Current: []byte(` -retainKeysMap: - name: foo - nonMergingList: - - name: a - - name: b -`), - Modified: []byte(` -retainKeysMap: - name: foo - value: bar - nonMergingList: - - name: a - - name: b -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - nonMergingList - - value - value: bar -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - nonMergingList - - value - value: bar -`), - Result: []byte(` -retainKeysMap: - name: foo - value: bar - nonMergingList: - - name: a - - name: b -`), - }, - }, - { - Description: "retainKeys map nested non-merging list with no change with conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - nonMergingList: - - name: a - - name: b -`), - Current: []byte(` -retainKeysMap: - name: foo - nonMergingList: - - name: a - - name: b - - name: c -`), - Modified: []byte(` -retainKeysMap: - name: foo - value: bar - nonMergingList: - - name: a - - name: b -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - nonMergingList - - value - value: bar -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - nonMergingList - - value - value: bar - nonMergingList: - - name: a - - name: b -`), - Result: []byte(` -retainKeysMap: - name: foo - value: bar - nonMergingList: - - name: a - - name: b -`), - }, - }, - { - Description: "retainKeys map deletes nested non-merging list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - nonMergingList: - - name: a - - name: b -`), - Current: []byte(` -retainKeysMap: - name: foo - nonMergingList: - - name: a - - name: b -`), - Modified: []byte(` -retainKeysMap: - name: foo - value: bar -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - value - value: bar - nonMergingList: null -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - value - value: bar - nonMergingList: null -`), - Result: []byte(` -retainKeysMap: - name: foo - value: bar -`), - }, - }, - { - Description: "retainKeys map delete nested non-merging list with conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - nonMergingList: - - name: a - - name: b -`), - Current: []byte(` -retainKeysMap: - name: foo - nonMergingList: - - name: a - - name: b - - name: c -`), - Modified: []byte(` -retainKeysMap: - name: foo - value: bar -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - value - value: bar - nonMergingList: null -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - value - value: bar - nonMergingList: null -`), - Result: []byte(` -retainKeysMap: - name: foo - value: bar -`), - }, - }, - { - Description: "retainKeys map nested merging int list with no change", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - mergingIntList: - - 1 - - 2 -`), - Current: []byte(` -retainKeysMap: - name: foo - mergingIntList: - - 1 - - 2 - - 3 -`), - Modified: []byte(` -retainKeysMap: - name: foo - value: bar - mergingIntList: - - 1 - - 2 -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - mergingIntList - - name - - value - value: bar -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - mergingIntList - - name - - value - $setElementOrder/mergingIntList: - - 1 - - 2 - value: bar -`), - Result: []byte(` -retainKeysMap: - name: foo - value: bar - mergingIntList: - - 1 - - 2 - - 3 -`), - }, - }, - { - Description: "retainKeys map adds an item in nested merging int list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - mergingIntList: - - 1 - - 2 -`), - Current: []byte(` -retainKeysMap: - name: foo - mergingIntList: - - 1 - - 2 - - 3 -`), - Modified: []byte(` -retainKeysMap: - name: foo - mergingIntList: - - 1 - - 2 - - 4 -`), - TwoWay: []byte(` -retainKeysMap: - $setElementOrder/mergingIntList: - - 1 - - 2 - - 4 - $retainKeys: - - mergingIntList - - name - mergingIntList: - - 4 -`), - ThreeWay: []byte(` -retainKeysMap: - $setElementOrder/mergingIntList: - - 1 - - 2 - - 4 - $retainKeys: - - mergingIntList - - name - mergingIntList: - - 4 -`), - Result: []byte(` -retainKeysMap: - name: foo - mergingIntList: - - 1 - - 2 - - 4 - - 3 -`), - }, - }, - { - Description: "retainKeys map deletes an item in nested merging int list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - mergingIntList: - - 1 - - 2 - - 3 -`), - Current: []byte(` -retainKeysMap: - name: foo - mergingIntList: - - 1 - - 2 - - 3 - - 4 -`), - Modified: []byte(` -retainKeysMap: - name: foo - mergingIntList: - - 1 - - 3 -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - mergingIntList - - name - $deleteFromPrimitiveList/mergingIntList: - - 2 - $setElementOrder/mergingIntList: - - 1 - - 3 -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - mergingIntList - - name - $deleteFromPrimitiveList/mergingIntList: - - 2 - $setElementOrder/mergingIntList: - - 1 - - 3 -`), - Result: []byte(` -retainKeysMap: - name: foo - mergingIntList: - - 1 - - 3 - - 4 -`), - }, - }, - { - Description: "retainKeys map adds an item and deletes an item in nested merging int list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - mergingIntList: - - 1 - - 2 - - 3 -`), - Current: []byte(` -retainKeysMap: - name: foo - mergingIntList: - - 1 - - 2 - - 3 - - 4 -`), - Modified: []byte(` -retainKeysMap: - name: foo - mergingIntList: - - 1 - - 3 - - 5 -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - mergingIntList - - name - mergingIntList: - - 5 - $deleteFromPrimitiveList/mergingIntList: - - 2 - $setElementOrder/mergingIntList: - - 1 - - 3 - - 5 -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - mergingIntList - - name - mergingIntList: - - 5 - $deleteFromPrimitiveList/mergingIntList: - - 2 - $setElementOrder/mergingIntList: - - 1 - - 3 - - 5 -`), - Result: []byte(` -retainKeysMap: - name: foo - mergingIntList: - - 1 - - 3 - - 5 - - 4 -`), - }, - }, - { - Description: "retainKeys map deletes nested merging int list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - mergingIntList: - - 1 - - 2 - - 3 -`), - Current: []byte(` -retainKeysMap: - name: foo - mergingIntList: - - 1 - - 2 - - 3 -`), - Modified: []byte(` -retainKeysMap: - name: foo -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - name - mergingIntList: null -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - name - mergingIntList: null -`), - Result: []byte(` -retainKeysMap: - name: foo -`), - }, - }, - { - Description: "retainKeys map nested merging list with no change", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - mergingList: - - name: a - - name: b -`), - Current: []byte(` -retainKeysMap: - name: foo - mergingList: - - name: a - - name: b - - name: c -`), - Modified: []byte(` -retainKeysMap: - name: foo - value: bar - mergingList: - - name: a - - name: b -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - mergingList - - name - - value - value: bar -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - mergingList - - name - - value - $setElementOrder/mergingList: - - name: a - - name: b - value: bar -`), - Result: []byte(` -retainKeysMap: - name: foo - value: bar - mergingList: - - name: a - - name: b - - name: c -`), - }, - }, - { - Description: "retainKeys map adds an item in nested merging list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - mergingList: - - name: a - - name: b -`), - Current: []byte(` -retainKeysMap: - name: foo - mergingList: - - name: a - - name: b - - name: x -`), - Modified: []byte(` -retainKeysMap: - name: foo - mergingList: - - name: a - - name: b - - name: c -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - mergingList - - name - $setElementOrder/mergingList: - - name: a - - name: b - - name: c - mergingList: - - name: c -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - mergingList - - name - $setElementOrder/mergingList: - - name: a - - name: b - - name: c - mergingList: - - name: c -`), - Result: []byte(` -retainKeysMap: - name: foo - mergingList: - - name: a - - name: b - - name: c - - name: x -`), - }, - }, - { - Description: "retainKeys map changes an item in nested merging list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - mergingList: - - name: a - - name: b - value: foo -`), - Current: []byte(` -retainKeysMap: - name: foo - mergingList: - - name: a - - name: b - value: foo - - name: x -`), - Modified: []byte(` -retainKeysMap: - name: foo - mergingList: - - name: a - - name: b - value: bar -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - mergingList - - name - $setElementOrder/mergingList: - - name: a - - name: b - mergingList: - - name: b - value: bar -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - mergingList - - name - $setElementOrder/mergingList: - - name: a - - name: b - mergingList: - - name: b - value: bar -`), - Result: []byte(` -retainKeysMap: - name: foo - mergingList: - - name: a - - name: b - value: bar - - name: x -`), - }, - }, - { - Description: "retainKeys map deletes nested merging list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - mergingList: - - name: a - - name: b -`), - Current: []byte(` -retainKeysMap: - name: foo - mergingList: - - name: a - - name: b -`), - Modified: []byte(` -retainKeysMap: - name: foo - value: bar -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - value - value: bar - mergingList: null -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - name - - value - value: bar - mergingList: null -`), - Result: []byte(` -retainKeysMap: - name: foo - value: bar -`), - }, - }, - { - Description: "retainKeys map deletes an item in nested merging list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMap: - name: foo - mergingList: - - name: a - - name: b -`), - Current: []byte(` -retainKeysMap: - name: foo - mergingList: - - name: a - - name: b - - name: x -`), - Modified: []byte(` -retainKeysMap: - name: foo - mergingList: - - name: a -`), - TwoWay: []byte(` -retainKeysMap: - $retainKeys: - - mergingList - - name - $setElementOrder/mergingList: - - name: a - mergingList: - - name: b - $patch: delete -`), - ThreeWay: []byte(` -retainKeysMap: - $retainKeys: - - mergingList - - name - $setElementOrder/mergingList: - - name: a - mergingList: - - name: b - $patch: delete -`), - Result: []byte(` -retainKeysMap: - name: foo - mergingList: - - name: a - - name: x -`), - }, - }, - { - Description: "retainKeys list of maps clears a field", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: a -`), - Current: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: a - other: x -`), - Modified: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: a -`), - TwoWay: []byte(`{}`), - ThreeWay: []byte(` -$setElementOrder/retainKeysMergingList: - - name: bar - - name: foo -retainKeysMergingList: -- $retainKeys: - - name - - value - name: foo -`), - Result: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: a -`), - }, - }, - { - Description: "retainKeys list of maps clears a field with conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: old -`), - Current: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: new - other: x -`), - Modified: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: modified -`), - TwoWay: []byte(` -$setElementOrder/retainKeysMergingList: - - name: bar - - name: foo -retainKeysMergingList: -- $retainKeys: - - name - - value - name: foo - value: modified -`), - ThreeWay: []byte(` -$setElementOrder/retainKeysMergingList: - - name: bar - - name: foo -retainKeysMergingList: -- $retainKeys: - - name - - value - name: foo - value: modified -`), - Result: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: modified -`), - }, - }, - { - Description: "retainKeys list of maps changes a field and clear a field", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: old -`), - Current: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: old - other: x -`), - Modified: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: new -`), - TwoWay: []byte(` -$setElementOrder/retainKeysMergingList: - - name: bar - - name: foo -retainKeysMergingList: -- $retainKeys: - - name - - value - name: foo - value: new -`), - ThreeWay: []byte(` -$setElementOrder/retainKeysMergingList: - - name: bar - - name: foo -retainKeysMergingList: -- $retainKeys: - - name - - value - name: foo - value: new -`), - Result: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: new -`), - }, - }, - { - Description: "retainKeys list of maps changes a field and clear a field with conflict", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: old -`), - Current: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: modified - other: x -`), - Modified: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: new -`), - TwoWay: []byte(` -$setElementOrder/retainKeysMergingList: - - name: bar - - name: foo -retainKeysMergingList: -- $retainKeys: - - name - - value - name: foo - value: new -`), - ThreeWay: []byte(` -$setElementOrder/retainKeysMergingList: - - name: bar - - name: foo -retainKeysMergingList: -- $retainKeys: - - name - - value - name: foo - value: new -`), - Result: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: new -`), - }, - }, - { - Description: "retainKeys list of maps adds a field", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMergingList: -- name: bar -- name: foo -`), - Current: []byte(` -retainKeysMergingList: -- name: bar -- name: foo -`), - Modified: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: a -`), - TwoWay: []byte(` -$setElementOrder/retainKeysMergingList: - - name: bar - - name: foo -retainKeysMergingList: -- $retainKeys: - - name - - value - name: foo - value: a -`), - ThreeWay: []byte(` -$setElementOrder/retainKeysMergingList: - - name: bar - - name: foo -retainKeysMergingList: -- $retainKeys: - - name - - value - name: foo - value: a -`), - Result: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: a -`), - }, - }, - { - Description: "retainKeys list of maps adds a field and clear a field", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMergingList: -- name: bar -- name: foo -`), - Current: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - other: x -`), - Modified: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: a -`), - TwoWay: []byte(` -$setElementOrder/retainKeysMergingList: - - name: bar - - name: foo -retainKeysMergingList: -- $retainKeys: - - name - - value - name: foo - value: a -`), - ThreeWay: []byte(` -$setElementOrder/retainKeysMergingList: - - name: bar - - name: foo -retainKeysMergingList: -- $retainKeys: - - name - - value - name: foo - value: a -`), - Result: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: a -`), - }, - }, - { - Description: "retainKeys list of maps deletes a field", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: a -`), - Current: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: a -`), - Modified: []byte(` -retainKeysMergingList: -- name: bar -- name: foo -`), - TwoWay: []byte(` -$setElementOrder/retainKeysMergingList: - - name: bar - - name: foo -retainKeysMergingList: -- $retainKeys: - - name - name: foo - value: null -`), - ThreeWay: []byte(` -$setElementOrder/retainKeysMergingList: - - name: bar - - name: foo -retainKeysMergingList: -- $retainKeys: - - name - name: foo - value: null -`), - Result: []byte(` -retainKeysMergingList: -- name: bar -- name: foo -`), - }, - }, - { - Description: "retainKeys list of maps deletes a field and clear a field", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: a -`), - Current: []byte(` -retainKeysMergingList: -- name: bar -- name: foo - value: a - other: x -`), - Modified: []byte(` -retainKeysMergingList: -- name: bar -- name: foo -`), - TwoWay: []byte(` -$setElementOrder/retainKeysMergingList: - - name: bar - - name: foo -retainKeysMergingList: -- $retainKeys: - - name - name: foo - value: null -`), - ThreeWay: []byte(` -$setElementOrder/retainKeysMergingList: - - name: bar - - name: foo -retainKeysMergingList: -- $retainKeys: - - name - name: foo - value: null -`), - Result: []byte(` -retainKeysMergingList: -- name: bar -- name: foo -`), - }, - }, - { - Description: "delete and reorder in one list, reorder in another", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -mergingList: -- name: a - value: a -- name: b - value: b -mergeItemPtr: -- name: c - value: c -- name: d - value: d -`), - Current: []byte(` -mergingList: -- name: a - value: a -- name: b - value: b -mergeItemPtr: -- name: c - value: c -- name: d - value: d -`), - Modified: []byte(` -mergingList: -- name: b - value: b -mergeItemPtr: -- name: d - value: d -- name: c - value: c -`), - TwoWay: []byte(` -$setElementOrder/mergingList: -- name: b -$setElementOrder/mergeItemPtr: -- name: d -- name: c -mergingList: -- $patch: delete - name: a -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: -- name: b -$setElementOrder/mergeItemPtr: -- name: d -- name: c -mergingList: -- $patch: delete - name: a -`), - Result: []byte(` -mergingList: -- name: b - value: b -mergeItemPtr: -- name: d - value: d -- name: c - value: c -`), - }, - }, -} - -func TestStrategicMergePatch(t *testing.T) { - testStrategicMergePatchWithCustomArgumentsUsingStruct(t, "bad struct", - "{}", "{}", []byte(""), mergepatch.ErrBadArgKind(struct{}{}, []byte{})) - - mergeItemOpenapiSchema := PatchMetaFromOpenAPI{ - Schema: sptest.GetSchemaOrDie(fakeMergeItemSchema, "mergeItem"), - } - schemas := []LookupPatchMeta{ - mergeItemStructSchema, - mergeItemOpenapiSchema, - } - - tc := StrategicMergePatchTestCases{} - err := yaml.Unmarshal(createStrategicMergePatchTestCaseData, &tc) - if err != nil { - t.Errorf("can't unmarshal test cases: %s\n", err) - return - } - - for _, schema := range schemas { - testStrategicMergePatchWithCustomArguments(t, "bad original", - "", "{}", schema, mergepatch.ErrBadJSONDoc) - testStrategicMergePatchWithCustomArguments(t, "bad patch", - "{}", "", schema, mergepatch.ErrBadJSONDoc) - testStrategicMergePatchWithCustomArguments(t, "nil struct", - "{}", "{}", nil, mergepatch.ErrBadArgKind(struct{}{}, nil)) - - for _, c := range tc.TestCases { - testTwoWayPatch(t, c, schema) - testThreeWayPatch(t, c, schema) - } - - // run multiple times to exercise different map traversal orders - for i := 0; i < 10; i++ { - for _, c := range strategicMergePatchRawTestCases { - testTwoWayPatchForRawTestCase(t, c, schema) - testThreeWayPatchForRawTestCase(t, c, schema) - } - } - } -} - -func testStrategicMergePatchWithCustomArgumentsUsingStruct(t *testing.T, description, original, patch string, dataStruct interface{}, expected error) { - schema, actual := NewPatchMetaFromStruct(dataStruct) - // If actual is not nil, check error. If errors match, return. - if actual != nil { - checkErrorsEqual(t, description, expected, actual, schema) - return - } - testStrategicMergePatchWithCustomArguments(t, description, original, patch, schema, expected) -} - -func testStrategicMergePatchWithCustomArguments(t *testing.T, description, original, patch string, schema LookupPatchMeta, expected error) { - _, actual := StrategicMergePatch([]byte(original), []byte(patch), schema) - checkErrorsEqual(t, description, expected, actual, schema) -} - -func checkErrorsEqual(t *testing.T, description string, expected, actual error, schema LookupPatchMeta) { - if actual != expected { - if actual == nil { - t.Errorf("using %s expected error: %s\ndid not occur in test case: %s", getSchemaType(schema), expected, description) - return - } - - if expected == nil || actual.Error() != expected.Error() { - t.Errorf("using %s unexpected error: %s\noccurred in test case: %s", getSchemaType(schema), actual, description) - return - } - } -} - -func testTwoWayPatch(t *testing.T, c StrategicMergePatchTestCase, schema LookupPatchMeta) { - original, expectedPatch, modified, expectedResult := twoWayTestCaseToJSONOrFail(t, c, schema) - - actualPatch, err := CreateTwoWayMergePatchUsingLookupPatchMeta(original, modified, schema) - if err != nil { - t.Errorf("using %s error: %s\nin test case: %s\ncannot create two way patch: %s:\n%s\n", - getSchemaType(schema), err, c.Description, original, mergepatch.ToYAMLOrError(c.StrategicMergePatchTestCaseData)) - return - } - - testPatchCreation(t, expectedPatch, actualPatch, c.Description) - testPatchApplication(t, original, actualPatch, expectedResult, c.Description, "", schema) -} - -func testTwoWayPatchForRawTestCase(t *testing.T, c StrategicMergePatchRawTestCase, schema LookupPatchMeta) { - original, expectedPatch, modified, expectedResult := twoWayRawTestCaseToJSONOrFail(t, c) - - actualPatch, err := CreateTwoWayMergePatchUsingLookupPatchMeta(original, modified, schema) - if err != nil { - t.Errorf("error: %s\nin test case: %s\ncannot create two way patch:\noriginal:%s\ntwoWay:%s\nmodified:%s\ncurrent:%s\nthreeWay:%s\nresult:%s\n", - err, c.Description, c.Original, c.TwoWay, c.Modified, c.Current, c.ThreeWay, c.Result) - return - } - - testPatchCreation(t, expectedPatch, actualPatch, c.Description) - testPatchApplication(t, original, actualPatch, expectedResult, c.Description, c.ExpectedError, schema) -} - -func twoWayTestCaseToJSONOrFail(t *testing.T, c StrategicMergePatchTestCase, schema LookupPatchMeta) ([]byte, []byte, []byte, []byte) { - expectedResult := c.TwoWayResult - if expectedResult == nil { - expectedResult = c.Modified - } - return sortJsonOrFail(t, testObjectToJSONOrFail(t, c.Original), c.Description, schema), - sortJsonOrFail(t, testObjectToJSONOrFail(t, c.TwoWay), c.Description, schema), - sortJsonOrFail(t, testObjectToJSONOrFail(t, c.Modified), c.Description, schema), - sortJsonOrFail(t, testObjectToJSONOrFail(t, expectedResult), c.Description, schema) -} - -func twoWayRawTestCaseToJSONOrFail(t *testing.T, c StrategicMergePatchRawTestCase) ([]byte, []byte, []byte, []byte) { - expectedResult := c.TwoWayResult - if expectedResult == nil { - expectedResult = c.Modified - } - return yamlToJSONOrError(t, c.Original), - yamlToJSONOrError(t, c.TwoWay), - yamlToJSONOrError(t, c.Modified), - yamlToJSONOrError(t, expectedResult) -} - -func testThreeWayPatch(t *testing.T, c StrategicMergePatchTestCase, schema LookupPatchMeta) { - original, modified, current, expected, result := threeWayTestCaseToJSONOrFail(t, c, schema) - actual, err := CreateThreeWayMergePatch(original, modified, current, schema, false) - if err != nil { - if !mergepatch.IsConflict(err) { - t.Errorf("using %s error: %s\nin test case: %s\ncannot create three way patch:\n%s\n", - getSchemaType(schema), err, c.Description, mergepatch.ToYAMLOrError(c.StrategicMergePatchTestCaseData)) - return - } - - if !strings.Contains(c.Description, "conflict") { - t.Errorf("using %s unexpected conflict: %s\nin test case: %s\ncannot create three way patch:\n%s\n", - getSchemaType(schema), err, c.Description, mergepatch.ToYAMLOrError(c.StrategicMergePatchTestCaseData)) - return - } - - if len(c.Result) > 0 { - actual, err := CreateThreeWayMergePatch(original, modified, current, schema, true) - if err != nil { - t.Errorf("using %s error: %s\nin test case: %s\ncannot force three way patch application:\n%s\n", - getSchemaType(schema), err, c.Description, mergepatch.ToYAMLOrError(c.StrategicMergePatchTestCaseData)) - return - } - - testPatchCreation(t, expected, actual, c.Description) - testPatchApplication(t, current, actual, result, c.Description, "", schema) - } - - return - } - - if strings.Contains(c.Description, "conflict") || len(c.Result) < 1 { - t.Errorf("using %s error in test case: %s\nexpected conflict did not occur:\n%s\n", - getSchemaType(schema), c.Description, mergepatch.ToYAMLOrError(c.StrategicMergePatchTestCaseData)) - return - } - - testPatchCreation(t, expected, actual, c.Description) - testPatchApplication(t, current, actual, result, c.Description, "", schema) -} - -func testThreeWayPatchForRawTestCase(t *testing.T, c StrategicMergePatchRawTestCase, schema LookupPatchMeta) { - original, modified, current, expected, result := threeWayRawTestCaseToJSONOrFail(t, c) - actual, err := CreateThreeWayMergePatch(original, modified, current, schema, false) - if err != nil { - if !mergepatch.IsConflict(err) { - t.Errorf("using %s error: %s\nin test case: %s\ncannot create three way patch:\noriginal:%s\ntwoWay:%s\nmodified:%s\ncurrent:%s\nthreeWay:%s\nresult:%s\n", - getSchemaType(schema), err, c.Description, c.Original, c.TwoWay, c.Modified, c.Current, c.ThreeWay, c.Result) - return - } - - if !strings.Contains(c.Description, "conflict") { - t.Errorf("using %s unexpected conflict: %s\nin test case: %s\ncannot create three way patch:\noriginal:%s\ntwoWay:%s\nmodified:%s\ncurrent:%s\nthreeWay:%s\nresult:%s\n", - getSchemaType(schema), err, c.Description, c.Original, c.TwoWay, c.Modified, c.Current, c.ThreeWay, c.Result) - return - } - - if len(c.Result) > 0 { - actual, err := CreateThreeWayMergePatch(original, modified, current, schema, true) - if err != nil { - t.Errorf("using %s error: %s\nin test case: %s\ncannot force three way patch application:\noriginal:%s\ntwoWay:%s\nmodified:%s\ncurrent:%s\nthreeWay:%s\nresult:%s\n", - getSchemaType(schema), err, c.Description, c.Original, c.TwoWay, c.Modified, c.Current, c.ThreeWay, c.Result) - return - } - - testPatchCreation(t, expected, actual, c.Description) - testPatchApplication(t, current, actual, result, c.Description, c.ExpectedError, schema) - } - - return - } - - if strings.Contains(c.Description, "conflict") || len(c.Result) < 1 { - t.Errorf("using %s error: %s\nin test case: %s\nexpected conflict did not occur:\noriginal:%s\ntwoWay:%s\nmodified:%s\ncurrent:%s\nthreeWay:%s\nresult:%s\n", - getSchemaType(schema), err, c.Description, c.Original, c.TwoWay, c.Modified, c.Current, c.ThreeWay, c.Result) - return - } - - testPatchCreation(t, expected, actual, c.Description) - testPatchApplication(t, current, actual, result, c.Description, c.ExpectedError, schema) -} - -func threeWayTestCaseToJSONOrFail(t *testing.T, c StrategicMergePatchTestCase, schema LookupPatchMeta) ([]byte, []byte, []byte, []byte, []byte) { - return sortJsonOrFail(t, testObjectToJSONOrFail(t, c.Original), c.Description, schema), - sortJsonOrFail(t, testObjectToJSONOrFail(t, c.Modified), c.Description, schema), - sortJsonOrFail(t, testObjectToJSONOrFail(t, c.Current), c.Description, schema), - sortJsonOrFail(t, testObjectToJSONOrFail(t, c.ThreeWay), c.Description, schema), - sortJsonOrFail(t, testObjectToJSONOrFail(t, c.Result), c.Description, schema) -} - -func threeWayRawTestCaseToJSONOrFail(t *testing.T, c StrategicMergePatchRawTestCase) ([]byte, []byte, []byte, []byte, []byte) { - return yamlToJSONOrError(t, c.Original), - yamlToJSONOrError(t, c.Modified), - yamlToJSONOrError(t, c.Current), - yamlToJSONOrError(t, c.ThreeWay), - yamlToJSONOrError(t, c.Result) -} - -func testPatchCreation(t *testing.T, expected, actual []byte, description string) { - if !reflect.DeepEqual(actual, expected) { - t.Errorf("error in test case: %s\nexpected patch:\n%s\ngot:\n%s\n", - description, jsonToYAMLOrError(expected), jsonToYAMLOrError(actual)) - return - } -} - -func testPatchApplication(t *testing.T, original, patch, expected []byte, description, expectedError string, schema LookupPatchMeta) { - result, err := StrategicMergePatchUsingLookupPatchMeta(original, patch, schema) - if len(expectedError) != 0 { - if err != nil && strings.Contains(err.Error(), expectedError) { - return - } - t.Errorf("using %s expected error should contain:\n%s\nin test case: %s\nbut got:\n%s\n", getSchemaType(schema), expectedError, description, err) - } - if err != nil { - t.Errorf("using %s error: %s\nin test case: %s\ncannot apply patch:\n%s\nto original:\n%s\n", - getSchemaType(schema), err, description, jsonToYAMLOrError(patch), jsonToYAMLOrError(original)) - return - } - - if !reflect.DeepEqual(result, expected) { - format := "using error in test case: %s\npatch application failed:\noriginal:\n%s\npatch:\n%s\nexpected:\n%s\ngot:\n%s\n" - t.Errorf(format, description, - jsonToYAMLOrError(original), jsonToYAMLOrError(patch), - jsonToYAMLOrError(expected), jsonToYAMLOrError(result)) - return - } -} - -func testObjectToJSONOrFail(t *testing.T, o map[string]interface{}) []byte { - if o == nil { - return nil - } - - j, err := toJSON(o) - if err != nil { - t.Error(err) - } - return j -} - -func sortJsonOrFail(t *testing.T, j []byte, description string, schema LookupPatchMeta) []byte { - if j == nil { - return nil - } - r, err := sortMergeListsByName(j, schema) - if err != nil { - t.Errorf("using %s error: %s\n in test case: %s\ncannot sort object:\n%s\n", getSchemaType(schema), err, description, j) - return nil - } - - return r -} - -func getSchemaType(schema LookupPatchMeta) string { - return reflect.TypeOf(schema).String() -} - -func jsonToYAMLOrError(j []byte) string { - y, err := jsonToYAML(j) - if err != nil { - return err.Error() - } - - return string(y) -} - -func toJSON(v interface{}) ([]byte, error) { - j, err := json.Marshal(v) - if err != nil { - return nil, fmt.Errorf("json marshal failed: %v\n%v\n", err, spew.Sdump(v)) - } - - return j, nil -} - -func jsonToYAML(j []byte) ([]byte, error) { - y, err := yaml.JSONToYAML(j) - if err != nil { - return nil, fmt.Errorf("json to yaml failed: %v\n%v\n", err, j) - } - - return y, nil -} - -func yamlToJSON(y []byte) ([]byte, error) { - j, err := yaml.YAMLToJSON(y) - if err != nil { - return nil, fmt.Errorf("yaml to json failed: %v\n%v\n", err, y) - } - - return j, nil -} - -func yamlToJSONOrError(t *testing.T, y []byte) []byte { - j, err := yamlToJSON(y) - if err != nil { - t.Errorf("%v", err) - } - - return j -} - -type PrecisionItem struct { - Name string `json:"name,omitempty"` - Int32 int32 `json:"int32,omitempty"` - Int64 int64 `json:"int64,omitempty"` - Float32 float32 `json:"float32,omitempty"` - Float64 float64 `json:"float64,omitempty"` -} - -var ( - precisionItem PrecisionItem - precisionItemStructSchema = PatchMetaFromStruct{T: GetTagStructTypeOrDie(precisionItem)} -) - -func TestNumberConversion(t *testing.T) { - testcases := map[string]struct { - Old string - New string - ExpectedPatch string - ExpectedResult string - }{ - "empty": { - Old: `{}`, - New: `{}`, - ExpectedPatch: `{}`, - ExpectedResult: `{}`, - }, - "int32 medium": { - Old: `{"int32":1000000}`, - New: `{"int32":1000000,"name":"newname"}`, - ExpectedPatch: `{"name":"newname"}`, - ExpectedResult: `{"int32":1000000,"name":"newname"}`, - }, - "int32 max": { - Old: `{"int32":2147483647}`, - New: `{"int32":2147483647,"name":"newname"}`, - ExpectedPatch: `{"name":"newname"}`, - ExpectedResult: `{"int32":2147483647,"name":"newname"}`, - }, - "int64 medium": { - Old: `{"int64":1000000}`, - New: `{"int64":1000000,"name":"newname"}`, - ExpectedPatch: `{"name":"newname"}`, - ExpectedResult: `{"int64":1000000,"name":"newname"}`, - }, - "int64 max": { - Old: `{"int64":9223372036854775807}`, - New: `{"int64":9223372036854775807,"name":"newname"}`, - ExpectedPatch: `{"name":"newname"}`, - ExpectedResult: `{"int64":9223372036854775807,"name":"newname"}`, - }, - "float32 max": { - Old: `{"float32":3.4028234663852886e+38}`, - New: `{"float32":3.4028234663852886e+38,"name":"newname"}`, - ExpectedPatch: `{"name":"newname"}`, - ExpectedResult: `{"float32":3.4028234663852886e+38,"name":"newname"}`, - }, - "float64 max": { - Old: `{"float64":1.7976931348623157e+308}`, - New: `{"float64":1.7976931348623157e+308,"name":"newname"}`, - ExpectedPatch: `{"name":"newname"}`, - ExpectedResult: `{"float64":1.7976931348623157e+308,"name":"newname"}`, - }, - } - - precisionItemOpenapiSchema := PatchMetaFromOpenAPI{ - Schema: sptest.GetSchemaOrDie(fakePrecisionItemSchema, "precisionItem"), - } - precisionItemSchemas := []LookupPatchMeta{ - precisionItemStructSchema, - precisionItemOpenapiSchema, - } - - for _, schema := range precisionItemSchemas { - for k, tc := range testcases { - patch, err := CreateTwoWayMergePatchUsingLookupPatchMeta([]byte(tc.Old), []byte(tc.New), schema) - if err != nil { - t.Errorf("using %s in testcase %s: unexpected error %v", getSchemaType(schema), k, err) - continue - } - if tc.ExpectedPatch != string(patch) { - t.Errorf("using %s in testcase %s: expected %s, got %s", getSchemaType(schema), k, tc.ExpectedPatch, string(patch)) - continue - } - - result, err := StrategicMergePatchUsingLookupPatchMeta([]byte(tc.Old), patch, schema) - if err != nil { - t.Errorf("using %s in testcase %s: unexpected error %v", getSchemaType(schema), k, err) - continue - } - if tc.ExpectedResult != string(result) { - t.Errorf("using %s in testcase %s: expected %s, got %s", getSchemaType(schema), k, tc.ExpectedResult, string(result)) - continue - } - } - } -} - -var replaceRawExtensionPatchTestCases = []StrategicMergePatchRawTestCase{ - { - Description: "replace RawExtension field, rest unchanched", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -name: my-object -value: some-value -other: current-other -replacingItem: - Some: Generic - Yaml: Inside - The: RawExtension - Field: Period -`), - Current: []byte(` -name: my-object -value: some-value -other: current-other -mergingList: - - name: 1 - - name: 2 - - name: 3 -replacingItem: - Some: Generic - Yaml: Inside - The: RawExtension - Field: Period -`), - Modified: []byte(` -name: my-object -value: some-value -other: current-other -mergingList: - - name: 1 - - name: 2 - - name: 3 -replacingItem: - Newly: Modified - Yaml: Inside - The: RawExtension -`), - TwoWay: []byte(` -mergingList: - - name: 1 - - name: 2 - - name: 3 -replacingItem: - Newly: Modified - Yaml: Inside - The: RawExtension -`), - TwoWayResult: []byte(` -name: my-object -value: some-value -other: current-other -mergingList: - - name: 1 - - name: 2 - - name: 3 -replacingItem: - Newly: Modified - Yaml: Inside - The: RawExtension -`), - ThreeWay: []byte(` -replacingItem: - Newly: Modified - Yaml: Inside - The: RawExtension -`), - Result: []byte(` -name: my-object -value: some-value -other: current-other -mergingList: - - name: 1 - - name: 2 - - name: 3 -replacingItem: - Newly: Modified - Yaml: Inside - The: RawExtension -`), - }, - }, - { - Description: "replace RawExtension field and merge list", - StrategicMergePatchRawTestCaseData: StrategicMergePatchRawTestCaseData{ - Original: []byte(` -name: my-object -value: some-value -other: current-other -mergingList: - - name: 1 -replacingItem: - Some: Generic - Yaml: Inside - The: RawExtension - Field: Period -`), - Current: []byte(` -name: my-object -value: some-value -other: current-other -mergingList: - - name: 1 - - name: 3 -replacingItem: - Some: Generic - Yaml: Inside - The: RawExtension - Field: Period -`), - Modified: []byte(` -name: my-object -value: some-value -other: current-other -mergingList: - - name: 1 - - name: 2 -replacingItem: - Newly: Modified - Yaml: Inside - The: RawExtension -`), - TwoWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 2 -replacingItem: - Newly: Modified - Yaml: Inside - The: RawExtension -`), - TwoWayResult: []byte(` -name: my-object -value: some-value -other: current-other -mergingList: - - name: 1 - - name: 2 -replacingItem: - Newly: Modified - Yaml: Inside - The: RawExtension -`), - ThreeWay: []byte(` -$setElementOrder/mergingList: - - name: 1 - - name: 2 -mergingList: - - name: 2 -replacingItem: - Newly: Modified - Yaml: Inside - The: RawExtension -`), - Result: []byte(` -name: my-object -value: some-value -other: current-other -mergingList: - - name: 1 - - name: 2 - - name: 3 -replacingItem: - Newly: Modified - Yaml: Inside - The: RawExtension -`), - }, - }, -} - -func TestReplaceWithRawExtension(t *testing.T) { - mergeItemOpenapiSchema := PatchMetaFromOpenAPI{ - Schema: sptest.GetSchemaOrDie(fakeMergeItemSchema, "mergeItem"), - } - schemas := []LookupPatchMeta{ - mergeItemStructSchema, - mergeItemOpenapiSchema, - } - - for _, schema := range schemas { - for _, c := range replaceRawExtensionPatchTestCases { - testTwoWayPatchForRawTestCase(t, c, schema) - testThreeWayPatchForRawTestCase(t, c, schema) - } - } -} - -func TestUnknownField(t *testing.T) { - testcases := map[string]struct { - Original string - Current string - Modified string - - ExpectedTwoWay string - ExpectedTwoWayErr string - ExpectedTwoWayResult string - ExpectedThreeWay string - ExpectedThreeWayErr string - ExpectedThreeWayResult string - }{ - // cases we can successfully strategically merge - "no diff": { - Original: `{"array":[1,2,3],"complex":{"nested":true},"name":"foo","scalar":true}`, - Current: `{"array":[1,2,3],"complex":{"nested":true},"name":"foo","scalar":true}`, - Modified: `{"array":[1,2,3],"complex":{"nested":true},"name":"foo","scalar":true}`, - - ExpectedTwoWay: `{}`, - ExpectedTwoWayResult: `{"array":[1,2,3],"complex":{"nested":true},"name":"foo","scalar":true}`, - ExpectedThreeWay: `{}`, - ExpectedThreeWayResult: `{"array":[1,2,3],"complex":{"nested":true},"name":"foo","scalar":true}`, - }, - "added only": { - Original: `{"name":"foo"}`, - Current: `{"name":"foo"}`, - Modified: `{"name":"foo","scalar":true,"complex":{"nested":true},"array":[1,2,3]}`, - - ExpectedTwoWay: `{"array":[1,2,3],"complex":{"nested":true},"scalar":true}`, - ExpectedTwoWayResult: `{"array":[1,2,3],"complex":{"nested":true},"name":"foo","scalar":true}`, - ExpectedThreeWay: `{"array":[1,2,3],"complex":{"nested":true},"scalar":true}`, - ExpectedThreeWayResult: `{"array":[1,2,3],"complex":{"nested":true},"name":"foo","scalar":true}`, - }, - "removed only": { - Original: `{"name":"foo","scalar":true,"complex":{"nested":true}}`, - Current: `{"name":"foo","scalar":true,"complex":{"nested":true},"array":[1,2,3]}`, - Modified: `{"name":"foo"}`, - - ExpectedTwoWay: `{"complex":null,"scalar":null}`, - ExpectedTwoWayResult: `{"name":"foo"}`, - ExpectedThreeWay: `{"complex":null,"scalar":null}`, - ExpectedThreeWayResult: `{"array":[1,2,3],"name":"foo"}`, - }, - - // cases we cannot successfully strategically merge (expect errors) - "diff": { - Original: `{"array":[1,2,3],"complex":{"nested":true},"name":"foo","scalar":true}`, - Current: `{"array":[1,2,3],"complex":{"nested":true},"name":"foo","scalar":true}`, - Modified: `{"array":[1,2,3],"complex":{"nested":false},"name":"foo","scalar":true}`, - - ExpectedTwoWayErr: `unable to find api field`, - ExpectedThreeWayErr: `unable to find api field`, - }, - } - - mergeItemOpenapiSchema := PatchMetaFromOpenAPI{ - Schema: sptest.GetSchemaOrDie(fakeMergeItemSchema, "mergeItem"), - } - schemas := []LookupPatchMeta{ - mergeItemStructSchema, - mergeItemOpenapiSchema, - } - - for _, k := range sets.StringKeySet(testcases).List() { - tc := testcases[k] - for _, schema := range schemas { - func() { - twoWay, err := CreateTwoWayMergePatchUsingLookupPatchMeta([]byte(tc.Original), []byte(tc.Modified), schema) - if err != nil { - if len(tc.ExpectedTwoWayErr) == 0 { - t.Errorf("using %s in testcase %s: error making two-way patch: %v", getSchemaType(schema), k, err) - } - if !strings.Contains(err.Error(), tc.ExpectedTwoWayErr) { - t.Errorf("using %s in testcase %s: expected error making two-way patch to contain '%s', got %s", getSchemaType(schema), k, tc.ExpectedTwoWayErr, err) - } - return - } - - if string(twoWay) != tc.ExpectedTwoWay { - t.Errorf("using %s in testcase %s: expected two-way patch:\n\t%s\ngot\n\t%s", getSchemaType(schema), k, string(tc.ExpectedTwoWay), string(twoWay)) - return - } - - twoWayResult, err := StrategicMergePatchUsingLookupPatchMeta([]byte(tc.Original), twoWay, schema) - if err != nil { - t.Errorf("using %s in testcase %s: error applying two-way patch: %v", getSchemaType(schema), k, err) - return - } - if string(twoWayResult) != tc.ExpectedTwoWayResult { - t.Errorf("using %s in testcase %s: expected two-way result:\n\t%s\ngot\n\t%s", getSchemaType(schema), k, string(tc.ExpectedTwoWayResult), string(twoWayResult)) - return - } - }() - - func() { - threeWay, err := CreateThreeWayMergePatch([]byte(tc.Original), []byte(tc.Modified), []byte(tc.Current), schema, false) - if err != nil { - if len(tc.ExpectedThreeWayErr) == 0 { - t.Errorf("using %s in testcase %s: error making three-way patch: %v", getSchemaType(schema), k, err) - } else if !strings.Contains(err.Error(), tc.ExpectedThreeWayErr) { - t.Errorf("using %s in testcase %s: expected error making three-way patch to contain '%s', got %s", getSchemaType(schema), k, tc.ExpectedThreeWayErr, err) - } - return - } - - if string(threeWay) != tc.ExpectedThreeWay { - t.Errorf("using %s in testcase %s: expected three-way patch:\n\t%s\ngot\n\t%s", getSchemaType(schema), k, string(tc.ExpectedThreeWay), string(threeWay)) - return - } - - threeWayResult, err := StrategicMergePatch([]byte(tc.Current), threeWay, schema) - if err != nil { - t.Errorf("using %s in testcase %s: error applying three-way patch: %v", getSchemaType(schema), k, err) - return - } else if string(threeWayResult) != tc.ExpectedThreeWayResult { - t.Errorf("using %s in testcase %s: expected three-way result:\n\t%s\ngot\n\t%s", getSchemaType(schema), k, string(tc.ExpectedThreeWayResult), string(threeWayResult)) - return - } - }() - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors_test.go b/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors_test.go deleted file mode 100644 index fe747319..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors_test.go +++ /dev/null @@ -1,175 +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 field - -import ( - "fmt" - "strings" - "testing" -) - -func TestMakeFuncs(t *testing.T) { - testCases := []struct { - fn func() *Error - expected ErrorType - }{ - { - func() *Error { return Invalid(NewPath("f"), "v", "d") }, - ErrorTypeInvalid, - }, - { - func() *Error { return NotSupported(NewPath("f"), "v", nil) }, - ErrorTypeNotSupported, - }, - { - func() *Error { return Duplicate(NewPath("f"), "v") }, - ErrorTypeDuplicate, - }, - { - func() *Error { return NotFound(NewPath("f"), "v") }, - ErrorTypeNotFound, - }, - { - func() *Error { return Required(NewPath("f"), "d") }, - ErrorTypeRequired, - }, - { - func() *Error { return InternalError(NewPath("f"), fmt.Errorf("e")) }, - ErrorTypeInternal, - }, - } - - for _, testCase := range testCases { - err := testCase.fn() - if err.Type != testCase.expected { - t.Errorf("expected Type %q, got %q", testCase.expected, err.Type) - } - } -} - -func TestErrorUsefulMessage(t *testing.T) { - { - s := Invalid(nil, nil, "").Error() - t.Logf("message: %v", s) - if !strings.Contains(s, "null") { - t.Errorf("error message did not contain 'null': %s", s) - } - } - - s := Invalid(NewPath("foo"), "bar", "deet").Error() - t.Logf("message: %v", s) - for _, part := range []string{"foo", "bar", "deet", ErrorTypeInvalid.String()} { - if !strings.Contains(s, part) { - t.Errorf("error message did not contain expected part '%v'", part) - } - } - - type complicated struct { - Baz int - Qux string - Inner interface{} - KV map[string]int - } - s = Invalid( - NewPath("foo"), - &complicated{ - Baz: 1, - Qux: "aoeu", - Inner: &complicated{Qux: "asdf"}, - KV: map[string]int{"Billy": 2}, - }, - "detail", - ).Error() - t.Logf("message: %v", s) - for _, part := range []string{ - "foo", ErrorTypeInvalid.String(), - "Baz", "Qux", "Inner", "KV", "detail", - "1", "aoeu", "Billy", "2", - // "asdf", TODO: re-enable once we have a better nested printer - } { - if !strings.Contains(s, part) { - t.Errorf("error message did not contain expected part '%v'", part) - } - } -} - -func TestToAggregate(t *testing.T) { - testCases := struct { - ErrList []ErrorList - NumExpectedErrs []int - }{ - []ErrorList{ - nil, - {}, - {Invalid(NewPath("f"), "v", "d")}, - {Invalid(NewPath("f"), "v", "d"), Invalid(NewPath("f"), "v", "d")}, - {Invalid(NewPath("f"), "v", "d"), InternalError(NewPath(""), fmt.Errorf("e"))}, - }, - []int{ - 0, - 0, - 1, - 1, - 2, - }, - } - - if len(testCases.ErrList) != len(testCases.NumExpectedErrs) { - t.Errorf("Mismatch: length of NumExpectedErrs does not match length of ErrList") - } - for i, tc := range testCases.ErrList { - agg := tc.ToAggregate() - numErrs := 0 - - if agg != nil { - numErrs = len(agg.Errors()) - } - if numErrs != testCases.NumExpectedErrs[i] { - t.Errorf("[%d] Expected %d, got %d", i, testCases.NumExpectedErrs[i], numErrs) - } - - if len(tc) == 0 { - if agg != nil { - t.Errorf("[%d] Expected nil, got %#v", i, agg) - } - } else if agg == nil { - t.Errorf("[%d] Expected non-nil", i) - } - } -} - -func TestErrListFilter(t *testing.T) { - list := ErrorList{ - Invalid(NewPath("test.field"), "", ""), - Invalid(NewPath("field.test"), "", ""), - Duplicate(NewPath("test"), "value"), - } - if len(list.Filter(NewErrorTypeMatcher(ErrorTypeDuplicate))) != 2 { - t.Errorf("should not filter") - } - if len(list.Filter(NewErrorTypeMatcher(ErrorTypeInvalid))) != 1 { - t.Errorf("should filter") - } -} - -func TestNotSupported(t *testing.T) { - notSupported := NotSupported(NewPath("f"), "v", []string{"a", "b", "c"}) - expected := `Unsupported value: "v": supported values: "a", "b", "c"` - if notSupported.ErrorBody() != expected { - t.Errorf("Expected: %s\n, but got: %s\n", expected, notSupported.ErrorBody()) - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/field/path_test.go b/vendor/k8s.io/apimachinery/pkg/util/validation/field/path_test.go deleted file mode 100644 index d2f568c3..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/validation/field/path_test.go +++ /dev/null @@ -1,123 +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 field - -import "testing" - -func TestPath(t *testing.T) { - testCases := []struct { - op func(*Path) *Path - expected string - }{ - { - func(p *Path) *Path { return p }, - "root", - }, - { - func(p *Path) *Path { return p.Child("first") }, - "root.first", - }, - { - func(p *Path) *Path { return p.Child("second") }, - "root.first.second", - }, - { - func(p *Path) *Path { return p.Index(0) }, - "root.first.second[0]", - }, - { - func(p *Path) *Path { return p.Child("third") }, - "root.first.second[0].third", - }, - { - func(p *Path) *Path { return p.Index(93) }, - "root.first.second[0].third[93]", - }, - { - func(p *Path) *Path { return p.parent }, - "root.first.second[0].third", - }, - { - func(p *Path) *Path { return p.parent }, - "root.first.second[0]", - }, - { - func(p *Path) *Path { return p.Key("key") }, - "root.first.second[0][key]", - }, - } - - root := NewPath("root") - p := root - for i, tc := range testCases { - p = tc.op(p) - if p.String() != tc.expected { - t.Errorf("[%d] Expected %q, got %q", i, tc.expected, p.String()) - } - if p.Root() != root { - t.Errorf("[%d] Wrong root: %#v", i, p.Root()) - } - } -} - -func TestPathMultiArg(t *testing.T) { - testCases := []struct { - op func(*Path) *Path - expected string - }{ - { - func(p *Path) *Path { return p }, - "root.first", - }, - { - func(p *Path) *Path { return p.Child("second", "third") }, - "root.first.second.third", - }, - { - func(p *Path) *Path { return p.Index(0) }, - "root.first.second.third[0]", - }, - { - func(p *Path) *Path { return p.parent }, - "root.first.second.third", - }, - { - func(p *Path) *Path { return p.parent }, - "root.first.second", - }, - { - func(p *Path) *Path { return p.parent }, - "root.first", - }, - { - func(p *Path) *Path { return p.parent }, - "root", - }, - } - - root := NewPath("root", "first") - p := root - for i, tc := range testCases { - p = tc.op(p) - if p.String() != tc.expected { - t.Errorf("[%d] Expected %q, got %q", i, tc.expected, p.String()) - } - if p.Root() != root.Root() { - t.Errorf("[%d] Wrong root: %#v", i, p.Root()) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/validation_test.go b/vendor/k8s.io/apimachinery/pkg/util/validation/validation_test.go deleted file mode 100644 index 4c628bbc..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/validation/validation_test.go +++ /dev/null @@ -1,513 +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 validation - -import ( - "strings" - "testing" - - "k8s.io/apimachinery/pkg/util/validation/field" -) - -func TestIsDNS1123Label(t *testing.T) { - goodValues := []string{ - "a", "ab", "abc", "a1", "a-1", "a--1--2--b", - "0", "01", "012", "1a", "1-a", "1--a--b--2", - strings.Repeat("a", 63), - } - for _, val := range goodValues { - if msgs := IsDNS1123Label(val); len(msgs) != 0 { - t.Errorf("expected true for '%s': %v", val, msgs) - } - } - - badValues := []string{ - "", "A", "ABC", "aBc", "A1", "A-1", "1-A", - "-", "a-", "-a", "1-", "-1", - "_", "a_", "_a", "a_b", "1_", "_1", "1_2", - ".", "a.", ".a", "a.b", "1.", ".1", "1.2", - " ", "a ", " a", "a b", "1 ", " 1", "1 2", - strings.Repeat("a", 64), - } - for _, val := range badValues { - if msgs := IsDNS1123Label(val); len(msgs) == 0 { - t.Errorf("expected false for '%s'", val) - } - } -} - -func TestIsDNS1123Subdomain(t *testing.T) { - goodValues := []string{ - "a", "ab", "abc", "a1", "a-1", "a--1--2--b", - "0", "01", "012", "1a", "1-a", "1--a--b--2", - "a.a", "ab.a", "abc.a", "a1.a", "a-1.a", "a--1--2--b.a", - "a.1", "ab.1", "abc.1", "a1.1", "a-1.1", "a--1--2--b.1", - "0.a", "01.a", "012.a", "1a.a", "1-a.a", "1--a--b--2", - "0.1", "01.1", "012.1", "1a.1", "1-a.1", "1--a--b--2.1", - "a.b.c.d.e", "aa.bb.cc.dd.ee", "1.2.3.4.5", "11.22.33.44.55", - strings.Repeat("a", 253), - } - for _, val := range goodValues { - if msgs := IsDNS1123Subdomain(val); len(msgs) != 0 { - t.Errorf("expected true for '%s': %v", val, msgs) - } - } - - badValues := []string{ - "", "A", "ABC", "aBc", "A1", "A-1", "1-A", - "-", "a-", "-a", "1-", "-1", - "_", "a_", "_a", "a_b", "1_", "_1", "1_2", - ".", "a.", ".a", "a..b", "1.", ".1", "1..2", - " ", "a ", " a", "a b", "1 ", " 1", "1 2", - "A.a", "aB.a", "ab.A", "A1.a", "a1.A", - "A.1", "aB.1", "A1.1", "1A.1", - "0.A", "01.A", "012.A", "1A.a", "1a.A", - "A.B.C.D.E", "AA.BB.CC.DD.EE", "a.B.c.d.e", "aa.bB.cc.dd.ee", - "a@b", "a,b", "a_b", "a;b", - "a:b", "a%b", "a?b", "a$b", - strings.Repeat("a", 254), - } - for _, val := range badValues { - if msgs := IsDNS1123Subdomain(val); len(msgs) == 0 { - t.Errorf("expected false for '%s'", val) - } - } -} - -func TestIsDNS1035Label(t *testing.T) { - goodValues := []string{ - "a", "ab", "abc", "a1", "a-1", "a--1--2--b", - strings.Repeat("a", 63), - } - for _, val := range goodValues { - if msgs := IsDNS1035Label(val); len(msgs) != 0 { - t.Errorf("expected true for '%s': %v", val, msgs) - } - } - - badValues := []string{ - "0", "01", "012", "1a", "1-a", "1--a--b--2", - "", "A", "ABC", "aBc", "A1", "A-1", "1-A", - "-", "a-", "-a", "1-", "-1", - "_", "a_", "_a", "a_b", "1_", "_1", "1_2", - ".", "a.", ".a", "a.b", "1.", ".1", "1.2", - " ", "a ", " a", "a b", "1 ", " 1", "1 2", - strings.Repeat("a", 64), - } - for _, val := range badValues { - if msgs := IsDNS1035Label(val); len(msgs) == 0 { - t.Errorf("expected false for '%s'", val) - } - } -} - -func TestIsCIdentifier(t *testing.T) { - goodValues := []string{ - "a", "ab", "abc", "a1", "_a", "a_", "a_b", "a_1", "a__1__2__b", "__abc_123", - "A", "AB", "AbC", "A1", "_A", "A_", "A_B", "A_1", "A__1__2__B", "__123_ABC", - } - for _, val := range goodValues { - if msgs := IsCIdentifier(val); len(msgs) != 0 { - t.Errorf("expected true for '%s': %v", val, msgs) - } - } - - badValues := []string{ - "", "1", "123", "1a", - "-", "a-", "-a", "1-", "-1", "1_", "1_2", - ".", "a.", ".a", "a.b", "1.", ".1", "1.2", - " ", "a ", " a", "a b", "1 ", " 1", "1 2", - "#a#", - } - for _, val := range badValues { - if msgs := IsCIdentifier(val); len(msgs) == 0 { - t.Errorf("expected false for '%s'", val) - } - } -} - -func TestIsValidPortNum(t *testing.T) { - goodValues := []int{1, 2, 1000, 16384, 32768, 65535} - for _, val := range goodValues { - if msgs := IsValidPortNum(val); len(msgs) != 0 { - t.Errorf("expected true for %d, got %v", val, msgs) - } - } - - badValues := []int{0, -1, 65536, 100000} - for _, val := range badValues { - if msgs := IsValidPortNum(val); len(msgs) == 0 { - t.Errorf("expected false for %d", val) - } - } -} - -func TestIsInRange(t *testing.T) { - goodValues := []struct { - value int - min int - max int - }{{1, 0, 10}, {5, 5, 20}, {25, 10, 25}} - for _, val := range goodValues { - if msgs := IsInRange(val.value, val.min, val.max); len(msgs) > 0 { - t.Errorf("expected no errors for %#v, but got %v", val, msgs) - } - } - - badValues := []struct { - value int - min int - max int - }{{1, 2, 10}, {5, -4, 2}, {25, 100, 120}} - for _, val := range badValues { - if msgs := IsInRange(val.value, val.min, val.max); len(msgs) == 0 { - t.Errorf("expected errors for %#v", val) - } - } -} - -func createGroupIDs(ids ...int64) []int64 { - var output []int64 - for _, id := range ids { - output = append(output, int64(id)) - } - return output -} - -func createUserIDs(ids ...int64) []int64 { - var output []int64 - for _, id := range ids { - output = append(output, int64(id)) - } - return output -} - -func TestIsValidGroupID(t *testing.T) { - goodValues := createGroupIDs(0, 1, 1000, 65535, 2147483647) - for _, val := range goodValues { - if msgs := IsValidGroupID(val); len(msgs) != 0 { - t.Errorf("expected true for '%d': %v", val, msgs) - } - } - - badValues := createGroupIDs(-1, -1003, 2147483648, 4147483647) - for _, val := range badValues { - if msgs := IsValidGroupID(val); len(msgs) == 0 { - t.Errorf("expected false for '%d'", val) - } - } -} - -func TestIsValidUserID(t *testing.T) { - goodValues := createUserIDs(0, 1, 1000, 65535, 2147483647) - for _, val := range goodValues { - if msgs := IsValidUserID(val); len(msgs) != 0 { - t.Errorf("expected true for '%d': %v", val, msgs) - } - } - - badValues := createUserIDs(-1, -1003, 2147483648, 4147483647) - for _, val := range badValues { - if msgs := IsValidUserID(val); len(msgs) == 0 { - t.Errorf("expected false for '%d'", val) - } - } -} - -func TestIsValidPortName(t *testing.T) { - goodValues := []string{"telnet", "re-mail-ck", "pop3", "a", "a-1", "1-a", "a-1-b-2-c", "1-a-2-b-3"} - for _, val := range goodValues { - if msgs := IsValidPortName(val); len(msgs) != 0 { - t.Errorf("expected true for %q: %v", val, msgs) - } - } - - badValues := []string{"longerthan15characters", "", strings.Repeat("a", 16), "12345", "1-2-3-4", "-begin", "end-", "two--hyphens", "whois++"} - for _, val := range badValues { - if msgs := IsValidPortName(val); len(msgs) == 0 { - t.Errorf("expected false for %q", val) - } - } -} - -func TestIsQualifiedName(t *testing.T) { - successCases := []string{ - "simple", - "now-with-dashes", - "1-starts-with-num", - "1234", - "simple/simple", - "now-with-dashes/simple", - "now-with-dashes/now-with-dashes", - "now.with.dots/simple", - "now-with.dashes-and.dots/simple", - "1-num.2-num/3-num", - "1234/5678", - "1.2.3.4/5678", - "Uppercase_Is_OK_123", - "example.com/Uppercase_Is_OK_123", - "requests.storage-foo", - strings.Repeat("a", 63), - strings.Repeat("a", 253) + "/" + strings.Repeat("b", 63), - } - for i := range successCases { - if errs := IsQualifiedName(successCases[i]); len(errs) != 0 { - t.Errorf("case[%d]: %q: expected success: %v", i, successCases[i], errs) - } - } - - errorCases := []string{ - "nospecialchars%^=@", - "cantendwithadash-", - "-cantstartwithadash-", - "only/one/slash", - "Example.com/abc", - "example_com/abc", - "example.com/", - "/simple", - strings.Repeat("a", 64), - strings.Repeat("a", 254) + "/abc", - } - for i := range errorCases { - if errs := IsQualifiedName(errorCases[i]); len(errs) == 0 { - t.Errorf("case[%d]: %q: expected failure", i, errorCases[i]) - } - } -} - -func TestIsValidLabelValue(t *testing.T) { - successCases := []string{ - "simple", - "now-with-dashes", - "1-starts-with-num", - "end-with-num-1", - "1234", // only num - strings.Repeat("a", 63), // to the limit - "", // empty value - } - for i := range successCases { - if errs := IsValidLabelValue(successCases[i]); len(errs) != 0 { - t.Errorf("case %s expected success: %v", successCases[i], errs) - } - } - - errorCases := []string{ - "nospecialchars%^=@", - "Tama-nui-te-rā.is.Māori.sun", - "\\backslashes\\are\\bad", - "-starts-with-dash", - "ends-with-dash-", - ".starts.with.dot", - "ends.with.dot.", - strings.Repeat("a", 64), // over the limit - } - for i := range errorCases { - if errs := IsValidLabelValue(errorCases[i]); len(errs) == 0 { - t.Errorf("case[%d] expected failure", i) - } - } -} - -func TestIsValidIP(t *testing.T) { - goodValues := []string{ - "::1", - "2a00:79e0:2:0:f1c3:e797:93c1:df80", - "::", - "2001:4860:4860::8888", - "::fff:1.1.1.1", - "1.1.1.1", - "1.1.1.01", - "255.0.0.1", - "1.0.0.0", - "0.0.0.0", - } - for _, val := range goodValues { - if msgs := IsValidIP(val); len(msgs) != 0 { - t.Errorf("expected true for %q: %v", val, msgs) - } - } - - badValues := []string{ - "[2001:db8:0:1]:80", - "myhost.mydomain", - "-1.0.0.0", - "[2001:db8:0:1]", - "a", - } - for _, val := range badValues { - if msgs := IsValidIP(val); len(msgs) == 0 { - t.Errorf("expected false for %q", val) - } - } -} - -func TestIsHTTPHeaderName(t *testing.T) { - goodValues := []string{ - // Common ones - "Accept-Encoding", "Host", "If-Modified-Since", "X-Forwarded-For", - // Weirdo, but still conforming names - "a", "ab", "abc", "a1", "-a", "a-", "a-b", "a-1", "a--1--2--b", "--abc-123", - "A", "AB", "AbC", "A1", "-A", "A-", "A-B", "A-1", "A--1--2--B", "--123-ABC", - } - for _, val := range goodValues { - if msgs := IsHTTPHeaderName(val); len(msgs) != 0 { - t.Errorf("expected true for '%s': %v", val, msgs) - } - } - - badValues := []string{ - "Host:", "X-Forwarded-For:", "X-@Home", - "", "_", "a_", "_a", "1_", "1_2", ".", "a.", ".a", "a.b", "1.", ".1", "1.2", - " ", "a ", " a", "a b", "1 ", " 1", "1 2", "#a#", "^", ",", ";", "=", "<", - "?", "@", "{", - } - for _, val := range badValues { - if msgs := IsHTTPHeaderName(val); len(msgs) == 0 { - t.Errorf("expected false for '%s'", val) - } - } -} - -func TestIsValidPercent(t *testing.T) { - goodValues := []string{ - "0%", - "00000%", - "1%", - "01%", - "99%", - "100%", - "101%", - } - for _, val := range goodValues { - if msgs := IsValidPercent(val); len(msgs) != 0 { - t.Errorf("expected true for %q: %v", val, msgs) - } - } - - badValues := []string{ - "", - "0", - "100", - "0.0%", - "99.9%", - "hundred", - " 1%", - "1% ", - "-0%", - "-1%", - "+1%", - } - for _, val := range badValues { - if msgs := IsValidPercent(val); len(msgs) == 0 { - t.Errorf("expected false for %q", val) - } - } -} - -func TestIsConfigMapKey(t *testing.T) { - successCases := []string{ - "a", - "good", - "good-good", - "still.good", - "this.is.also.good", - ".so.is.this", - "THIS_IS_GOOD", - "so_is_this_17", - } - - for i := range successCases { - if errs := IsConfigMapKey(successCases[i]); len(errs) != 0 { - t.Errorf("[%d] expected success: %v", i, errs) - } - } - - failureCases := []string{ - ".", - "..", - "..bad", - "b*d", - "bad!&bad", - } - - for i := range failureCases { - if errs := IsConfigMapKey(failureCases[i]); len(errs) == 0 { - t.Errorf("[%d] expected failure", i) - } - } -} - -func TestIsWildcardDNS1123Subdomain(t *testing.T) { - goodValues := []string{ - "*.example.com", - "*.bar.com", - "*.foo.bar.com", - } - for _, val := range goodValues { - if errs := IsWildcardDNS1123Subdomain(val); len(errs) != 0 { - t.Errorf("expected no errors for %q: %v", val, errs) - } - } - - badValues := []string{ - "*.*.bar.com", - "*.foo.*.com", - "*bar.com", - "f*.bar.com", - "*", - } - for _, val := range badValues { - if errs := IsWildcardDNS1123Subdomain(val); len(errs) == 0 { - t.Errorf("expected errors for %q", val) - } - } -} - -func TestIsFullyQualifiedName(t *testing.T) { - tests := []struct { - name string - targetName string - err string - }{ - { - name: "name needs to be fully qualified, i.e., contains at least 2 dots", - targetName: "k8s.io", - err: "should be a domain with at least three segments separated by dots", - }, - { - name: "name cannot be empty", - targetName: "", - err: "Required value", - }, - { - name: "name must conform to RFC 1123", - targetName: "A.B.C", - err: "a DNS-1123 subdomain must consist of lower case alphanumeric characters", - }, - } - for _, tc := range tests { - err := IsFullyQualifiedName(field.NewPath(""), tc.targetName).ToAggregate() - switch { - case tc.err == "" && err != nil: - t.Errorf("%q: unexpected error: %v", tc.name, err) - case tc.err != "" && err == nil: - t.Errorf("%q: unexpected no error, expected %s", tc.name, tc.err) - case tc.err != "" && err != nil && !strings.Contains(err.Error(), tc.err): - t.Errorf("%q: expected %s, got %v", tc.name, tc.err, err) - } - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/wait/wait_test.go b/vendor/k8s.io/apimachinery/pkg/util/wait/wait_test.go deleted file mode 100644 index 2dfd2877..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/wait/wait_test.go +++ /dev/null @@ -1,501 +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 wait - -import ( - "errors" - "fmt" - "sync" - "sync/atomic" - "testing" - "time" - - "k8s.io/apimachinery/pkg/util/runtime" -) - -func TestUntil(t *testing.T) { - ch := make(chan struct{}) - close(ch) - Until(func() { - t.Fatal("should not have been invoked") - }, 0, ch) - - ch = make(chan struct{}) - called := make(chan struct{}) - go func() { - Until(func() { - called <- struct{}{} - }, 0, ch) - close(called) - }() - <-called - close(ch) - <-called -} - -func TestNonSlidingUntil(t *testing.T) { - ch := make(chan struct{}) - close(ch) - NonSlidingUntil(func() { - t.Fatal("should not have been invoked") - }, 0, ch) - - ch = make(chan struct{}) - called := make(chan struct{}) - go func() { - NonSlidingUntil(func() { - called <- struct{}{} - }, 0, ch) - close(called) - }() - <-called - close(ch) - <-called -} - -func TestUntilReturnsImmediately(t *testing.T) { - now := time.Now() - ch := make(chan struct{}) - Until(func() { - close(ch) - }, 30*time.Second, ch) - if now.Add(25 * time.Second).Before(time.Now()) { - t.Errorf("Until did not return immediately when the stop chan was closed inside the func") - } -} - -func TestJitterUntil(t *testing.T) { - ch := make(chan struct{}) - // if a channel is closed JitterUntil never calls function f - // and returns immediately - close(ch) - JitterUntil(func() { - t.Fatal("should not have been invoked") - }, 0, 1.0, true, ch) - - ch = make(chan struct{}) - called := make(chan struct{}) - go func() { - JitterUntil(func() { - called <- struct{}{} - }, 0, 1.0, true, ch) - close(called) - }() - <-called - close(ch) - <-called -} - -func TestJitterUntilReturnsImmediately(t *testing.T) { - now := time.Now() - ch := make(chan struct{}) - JitterUntil(func() { - close(ch) - }, 30*time.Second, 1.0, true, ch) - if now.Add(25 * time.Second).Before(time.Now()) { - t.Errorf("JitterUntil did not return immediately when the stop chan was closed inside the func") - } -} - -func TestJitterUntilRecoversPanic(t *testing.T) { - // Save and restore crash handlers - originalReallyCrash := runtime.ReallyCrash - originalHandlers := runtime.PanicHandlers - defer func() { - runtime.ReallyCrash = originalReallyCrash - runtime.PanicHandlers = originalHandlers - }() - - called := 0 - handled := 0 - - // Hook up a custom crash handler to ensure it is called when a jitter function panics - runtime.ReallyCrash = false - runtime.PanicHandlers = []func(interface{}){ - func(p interface{}) { - handled++ - }, - } - - ch := make(chan struct{}) - JitterUntil(func() { - called++ - if called > 2 { - close(ch) - return - } - panic("TestJitterUntilRecoversPanic") - }, time.Millisecond, 1.0, true, ch) - - if called != 3 { - t.Errorf("Expected panic recovers") - } -} - -func TestJitterUntilNegativeFactor(t *testing.T) { - now := time.Now() - ch := make(chan struct{}) - called := make(chan struct{}) - received := make(chan struct{}) - go func() { - JitterUntil(func() { - called <- struct{}{} - <-received - }, time.Second, -30.0, true, ch) - }() - // first loop - <-called - received <- struct{}{} - // second loop - <-called - close(ch) - received <- struct{}{} - - // it should take at most 2 seconds + some overhead, not 3 - if now.Add(3 * time.Second).Before(time.Now()) { - t.Errorf("JitterUntil did not returned after predefined period with negative jitter factor when the stop chan was closed inside the func") - } - -} - -func TestExponentialBackoff(t *testing.T) { - opts := Backoff{Factor: 1.0, Steps: 3} - - // waits up to steps - i := 0 - err := ExponentialBackoff(opts, func() (bool, error) { - i++ - return false, nil - }) - if err != ErrWaitTimeout || i != opts.Steps { - t.Errorf("unexpected error: %v", err) - } - - // returns immediately - i = 0 - err = ExponentialBackoff(opts, func() (bool, error) { - i++ - return true, nil - }) - if err != nil || i != 1 { - t.Errorf("unexpected error: %v", err) - } - - // returns immediately on error - testErr := fmt.Errorf("some other error") - err = ExponentialBackoff(opts, func() (bool, error) { - return false, testErr - }) - if err != testErr { - t.Errorf("unexpected error: %v", err) - } - - // invoked multiple times - i = 1 - err = ExponentialBackoff(opts, func() (bool, error) { - if i < opts.Steps { - i++ - return false, nil - } - return true, nil - }) - if err != nil || i != opts.Steps { - t.Errorf("unexpected error: %v", err) - } -} - -func TestPoller(t *testing.T) { - done := make(chan struct{}) - defer close(done) - w := poller(time.Millisecond, 2*time.Millisecond) - ch := w(done) - count := 0 -DRAIN: - for { - select { - case _, open := <-ch: - if !open { - break DRAIN - } - count++ - case <-time.After(ForeverTestTimeout): - t.Errorf("unexpected timeout after poll") - } - } - if count > 3 { - t.Errorf("expected up to three values, got %d", count) - } -} - -type fakePoller struct { - max int - used int32 // accessed with atomics - wg sync.WaitGroup -} - -func fakeTicker(max int, used *int32, doneFunc func()) WaitFunc { - return func(done <-chan struct{}) <-chan struct{} { - ch := make(chan struct{}) - go func() { - defer doneFunc() - defer close(ch) - for i := 0; i < max; i++ { - select { - case ch <- struct{}{}: - case <-done: - return - } - if used != nil { - atomic.AddInt32(used, 1) - } - } - }() - return ch - } -} - -func (fp *fakePoller) GetWaitFunc() WaitFunc { - fp.wg.Add(1) - return fakeTicker(fp.max, &fp.used, fp.wg.Done) -} - -func TestPoll(t *testing.T) { - invocations := 0 - f := ConditionFunc(func() (bool, error) { - invocations++ - return true, nil - }) - fp := fakePoller{max: 1} - if err := pollInternal(fp.GetWaitFunc(), f); err != nil { - t.Fatalf("unexpected error %v", err) - } - fp.wg.Wait() - if invocations != 1 { - t.Errorf("Expected exactly one invocation, got %d", invocations) - } - used := atomic.LoadInt32(&fp.used) - if used != 1 { - t.Errorf("Expected exactly one tick, got %d", used) - } -} - -func TestPollError(t *testing.T) { - expectedError := errors.New("Expected error") - f := ConditionFunc(func() (bool, error) { - return false, expectedError - }) - fp := fakePoller{max: 1} - if err := pollInternal(fp.GetWaitFunc(), f); err == nil || err != expectedError { - t.Fatalf("Expected error %v, got none %v", expectedError, err) - } - fp.wg.Wait() - used := atomic.LoadInt32(&fp.used) - if used != 1 { - t.Errorf("Expected exactly one tick, got %d", used) - } -} - -func TestPollImmediate(t *testing.T) { - invocations := 0 - f := ConditionFunc(func() (bool, error) { - invocations++ - return true, nil - }) - fp := fakePoller{max: 0} - if err := pollImmediateInternal(fp.GetWaitFunc(), f); err != nil { - t.Fatalf("unexpected error %v", err) - } - // We don't need to wait for fp.wg, as pollImmediate shouldn't call WaitFunc at all. - if invocations != 1 { - t.Errorf("Expected exactly one invocation, got %d", invocations) - } - used := atomic.LoadInt32(&fp.used) - if used != 0 { - t.Errorf("Expected exactly zero ticks, got %d", used) - } -} - -func TestPollImmediateError(t *testing.T) { - expectedError := errors.New("Expected error") - f := ConditionFunc(func() (bool, error) { - return false, expectedError - }) - fp := fakePoller{max: 0} - if err := pollImmediateInternal(fp.GetWaitFunc(), f); err == nil || err != expectedError { - t.Fatalf("Expected error %v, got none %v", expectedError, err) - } - // We don't need to wait for fp.wg, as pollImmediate shouldn't call WaitFunc at all. - used := atomic.LoadInt32(&fp.used) - if used != 0 { - t.Errorf("Expected exactly zero ticks, got %d", used) - } -} - -func TestPollForever(t *testing.T) { - ch := make(chan struct{}) - done := make(chan struct{}, 1) - complete := make(chan struct{}) - go func() { - f := ConditionFunc(func() (bool, error) { - ch <- struct{}{} - select { - case <-done: - return true, nil - default: - } - return false, nil - }) - - if err := PollInfinite(time.Microsecond, f); err != nil { - t.Fatalf("unexpected error %v", err) - } - - close(ch) - complete <- struct{}{} - }() - - // ensure the condition is opened - <-ch - - // ensure channel sends events - for i := 0; i < 10; i++ { - select { - case _, open := <-ch: - if !open { - t.Fatalf("did not expect channel to be closed") - } - case <-time.After(ForeverTestTimeout): - t.Fatalf("channel did not return at least once within the poll interval") - } - } - - // at most one poll notification should be sent once we return from the condition - done <- struct{}{} - go func() { - for i := 0; i < 2; i++ { - _, open := <-ch - if !open { - return - } - } - t.Fatalf("expected closed channel after two iterations") - }() - <-complete -} - -func TestWaitFor(t *testing.T) { - var invocations int - testCases := map[string]struct { - F ConditionFunc - Ticks int - Invoked int - Err bool - }{ - "invoked once": { - ConditionFunc(func() (bool, error) { - invocations++ - return true, nil - }), - 2, - 1, - false, - }, - "invoked and returns a timeout": { - ConditionFunc(func() (bool, error) { - invocations++ - return false, nil - }), - 2, - 3, // the contract of WaitFor() says the func is called once more at the end of the wait - true, - }, - "returns immediately on error": { - ConditionFunc(func() (bool, error) { - invocations++ - return false, errors.New("test") - }), - 2, - 1, - true, - }, - } - for k, c := range testCases { - invocations = 0 - ticker := fakeTicker(c.Ticks, nil, func() {}) - err := func() error { - done := make(chan struct{}) - defer close(done) - return WaitFor(ticker, c.F, done) - }() - switch { - case c.Err && err == nil: - t.Errorf("%s: Expected error, got nil", k) - continue - case !c.Err && err != nil: - t.Errorf("%s: Expected no error, got: %#v", k, err) - continue - } - if invocations != c.Invoked { - t.Errorf("%s: Expected %d invocations, got %d", k, c.Invoked, invocations) - } - } -} - -func TestWaitForWithDelay(t *testing.T) { - done := make(chan struct{}) - defer close(done) - WaitFor(poller(time.Millisecond, ForeverTestTimeout), func() (bool, error) { - time.Sleep(10 * time.Millisecond) - return true, nil - }, done) - // If polling goroutine doesn't see the done signal it will leak timers. - select { - case done <- struct{}{}: - case <-time.After(ForeverTestTimeout): - t.Errorf("expected an ack of the done signal.") - } -} - -func TestPollUntil(t *testing.T) { - stopCh := make(chan struct{}) - called := make(chan bool) - pollDone := make(chan struct{}) - - go func() { - PollUntil(time.Microsecond, ConditionFunc(func() (bool, error) { - called <- true - return false, nil - }), stopCh) - - close(pollDone) - }() - - // make sure we're called once - <-called - // this should trigger a "done" - close(stopCh) - - go func() { - // release the condition func if needed - for { - <-called - } - }() - - // make sure we finished the poll - <-pollDone -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/yaml/decoder_test.go b/vendor/k8s.io/apimachinery/pkg/util/yaml/decoder_test.go deleted file mode 100644 index 03e502ec..00000000 --- a/vendor/k8s.io/apimachinery/pkg/util/yaml/decoder_test.go +++ /dev/null @@ -1,405 +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 yaml - -import ( - "bufio" - "bytes" - "encoding/json" - "fmt" - "io" - "io/ioutil" - "math/rand" - "reflect" - "strings" - "testing" -) - -func TestYAMLDecoderReadBytesLength(t *testing.T) { - d := `--- -stuff: 1 - test-foo: 1 -` - testCases := []struct { - bufLen int - expectLen int - expectErr error - }{ - {len(d), len(d), nil}, - {len(d) + 10, len(d), nil}, - {len(d) - 10, len(d) - 10, io.ErrShortBuffer}, - } - - for i, testCase := range testCases { - r := NewDocumentDecoder(ioutil.NopCloser(bytes.NewReader([]byte(d)))) - b := make([]byte, testCase.bufLen) - n, err := r.Read(b) - if err != testCase.expectErr || n != testCase.expectLen { - t.Fatalf("%d: unexpected body: %d / %v", i, n, err) - } - } -} - -func TestYAMLDecoderCallsAfterErrShortBufferRestOfFrame(t *testing.T) { - d := `--- -stuff: 1 - test-foo: 1` - r := NewDocumentDecoder(ioutil.NopCloser(bytes.NewReader([]byte(d)))) - b := make([]byte, 12) - n, err := r.Read(b) - if err != io.ErrShortBuffer || n != 12 { - t.Fatalf("expected ErrShortBuffer: %d / %v", n, err) - } - expected := "---\nstuff: 1" - if string(b) != expected { - t.Fatalf("expected bytes read to be: %s got: %s", expected, string(b)) - } - b = make([]byte, 13) - n, err = r.Read(b) - if err != nil || n != 13 { - t.Fatalf("expected nil: %d / %v", n, err) - } - expected = "\n\ttest-foo: 1" - if string(b) != expected { - t.Fatalf("expected bytes read to be: '%s' got: '%s'", expected, string(b)) - } - b = make([]byte, 15) - n, err = r.Read(b) - if err != io.EOF || n != 0 { - t.Fatalf("expected EOF: %d / %v", n, err) - } -} - -func TestSplitYAMLDocument(t *testing.T) { - testCases := []struct { - input string - atEOF bool - expect string - adv int - }{ - {"foo", true, "foo", 3}, - {"fo", false, "", 0}, - - {"---", true, "---", 3}, - {"---\n", true, "---\n", 4}, - {"---\n", false, "", 0}, - - {"\n---\n", false, "", 5}, - {"\n---\n", true, "", 5}, - - {"abc\n---\ndef", true, "abc", 8}, - {"def", true, "def", 3}, - {"", true, "", 0}, - } - for i, testCase := range testCases { - adv, token, err := splitYAMLDocument([]byte(testCase.input), testCase.atEOF) - if err != nil { - t.Errorf("%d: unexpected error: %v", i, err) - continue - } - if adv != testCase.adv { - t.Errorf("%d: advance did not match: %d %d", i, testCase.adv, adv) - } - if testCase.expect != string(token) { - t.Errorf("%d: token did not match: %q %q", i, testCase.expect, string(token)) - } - } -} - -func TestGuessJSON(t *testing.T) { - if r, _, isJSON := GuessJSONStream(bytes.NewReader([]byte(" \n{}")), 100); !isJSON { - t.Fatalf("expected stream to be JSON") - } else { - b := make([]byte, 30) - n, err := r.Read(b) - if err != nil || n != 4 { - t.Fatalf("unexpected body: %d / %v", n, err) - } - if string(b[:n]) != " \n{}" { - t.Fatalf("unexpected body: %q", string(b[:n])) - } - } -} - -func TestScanYAML(t *testing.T) { - s := bufio.NewScanner(bytes.NewReader([]byte(`--- -stuff: 1 - ---- - `))) - s.Split(splitYAMLDocument) - if !s.Scan() { - t.Fatalf("should have been able to scan") - } - t.Logf("scan: %s", s.Text()) - if !s.Scan() { - t.Fatalf("should have been able to scan") - } - t.Logf("scan: %s", s.Text()) - if s.Scan() { - t.Fatalf("scan should have been done") - } - if s.Err() != nil { - t.Fatalf("err should have been nil: %v", s.Err()) - } -} - -func TestDecodeYAML(t *testing.T) { - s := NewYAMLToJSONDecoder(bytes.NewReader([]byte(`--- -stuff: 1 - ---- - `))) - obj := generic{} - if err := s.Decode(&obj); err != nil { - t.Fatalf("unexpected error: %v", err) - } - if fmt.Sprintf("%#v", obj) != `yaml.generic{"stuff":1}` { - t.Errorf("unexpected object: %#v", obj) - } - obj = generic{} - if err := s.Decode(&obj); err != nil { - t.Fatalf("unexpected error: %v", err) - } - if len(obj) != 0 { - t.Fatalf("unexpected object: %#v", obj) - } - obj = generic{} - if err := s.Decode(&obj); err != io.EOF { - t.Fatalf("unexpected error: %v", err) - } -} - -func TestDecodeBrokenYAML(t *testing.T) { - s := NewYAMLOrJSONDecoder(bytes.NewReader([]byte(`--- -stuff: 1 - test-foo: 1 - ---- - `)), 100) - obj := generic{} - err := s.Decode(&obj) - if err == nil { - t.Fatal("expected error with yaml: violate, got no error") - } - fmt.Printf("err: %s\n", err.Error()) - if !strings.Contains(err.Error(), "yaml: line 2:") { - t.Fatalf("expected %q to have 'yaml: line 2:' found a tab character", err.Error()) - } -} - -func TestDecodeBrokenJSON(t *testing.T) { - s := NewYAMLOrJSONDecoder(bytes.NewReader([]byte(`{ - "foo": { - "stuff": 1 - "otherStuff": 2 - } -} - `)), 100) - obj := generic{} - err := s.Decode(&obj) - if err == nil { - t.Fatal("expected error with json: prefix, got no error") - } - if !strings.HasPrefix(err.Error(), "json: line 3:") { - t.Fatalf("expected %q to have 'json: line 3:' prefix", err.Error()) - } -} - -type generic map[string]interface{} - -func TestYAMLOrJSONDecoder(t *testing.T) { - testCases := []struct { - input string - buffer int - isJSON bool - err bool - out []generic - }{ - {` {"1":2}{"3":4}`, 2, true, false, []generic{ - {"1": 2}, - {"3": 4}, - }}, - {" \n{}", 3, true, false, []generic{ - {}, - }}, - {" \na: b", 2, false, false, []generic{ - {"a": "b"}, - }}, - {" \n{\"a\": \"b\"}", 2, false, true, []generic{ - {"a": "b"}, - }}, - {" \n{\"a\": \"b\"}", 3, true, false, []generic{ - {"a": "b"}, - }}, - {` {"a":"b"}`, 100, true, false, []generic{ - {"a": "b"}, - }}, - {"", 1, false, false, []generic{}}, - {"foo: bar\n---\nbaz: biz", 100, false, false, []generic{ - {"foo": "bar"}, - {"baz": "biz"}, - }}, - {"foo: bar\n---\n", 100, false, false, []generic{ - {"foo": "bar"}, - }}, - {"foo: bar\n---", 100, false, false, []generic{ - {"foo": "bar"}, - }}, - {"foo: bar\n--", 100, false, true, []generic{ - {"foo": "bar"}, - }}, - {"foo: bar\n-", 100, false, true, []generic{ - {"foo": "bar"}, - }}, - {"foo: bar\n", 100, false, false, []generic{ - {"foo": "bar"}, - }}, - } - for i, testCase := range testCases { - decoder := NewYAMLOrJSONDecoder(bytes.NewReader([]byte(testCase.input)), testCase.buffer) - objs := []generic{} - - var err error - for { - out := make(generic) - err = decoder.Decode(&out) - if err != nil { - break - } - objs = append(objs, out) - } - if err != io.EOF { - switch { - case testCase.err && err == nil: - t.Errorf("%d: unexpected non-error", i) - continue - case !testCase.err && err != nil: - t.Errorf("%d: unexpected error: %v", i, err) - continue - case err != nil: - continue - } - } - switch decoder.decoder.(type) { - case *YAMLToJSONDecoder: - if testCase.isJSON { - t.Errorf("%d: expected JSON decoder, got YAML", i) - } - case *json.Decoder: - if !testCase.isJSON { - t.Errorf("%d: expected YAML decoder, got JSON", i) - } - } - if fmt.Sprintf("%#v", testCase.out) != fmt.Sprintf("%#v", objs) { - t.Errorf("%d: objects were not equal: \n%#v\n%#v", i, testCase.out, objs) - } - } -} - -func TestReadSingleLongLine(t *testing.T) { - testReadLines(t, []int{128 * 1024}) -} - -func TestReadRandomLineLengths(t *testing.T) { - minLength := 100 - maxLength := 96 * 1024 - maxLines := 100 - - lineLengths := make([]int, maxLines) - for i := 0; i < maxLines; i++ { - lineLengths[i] = rand.Intn(maxLength-minLength) + minLength - } - - testReadLines(t, lineLengths) -} - -func testReadLines(t *testing.T, lineLengths []int) { - var ( - lines [][]byte - inputStream []byte - ) - for _, lineLength := range lineLengths { - inputLine := make([]byte, lineLength+1) - for i := 0; i < lineLength; i++ { - char := rand.Intn('z'-'A') + 'A' - inputLine[i] = byte(char) - } - inputLine[len(inputLine)-1] = '\n' - lines = append(lines, inputLine) - } - for _, line := range lines { - inputStream = append(inputStream, line...) - } - - // init Reader - reader := bufio.NewReader(bytes.NewReader(inputStream)) - lineReader := &LineReader{reader: reader} - - // read lines - var readLines [][]byte - for range lines { - bytes, err := lineReader.Read() - if err != nil && err != io.EOF { - t.Fatalf("failed to read lines: %v", err) - } - readLines = append(readLines, bytes) - } - - // validate - for i := range lines { - if len(lines[i]) != len(readLines[i]) { - t.Fatalf("expected line length: %d, but got %d", len(lines[i]), len(readLines[i])) - } - if !reflect.DeepEqual(lines[i], readLines[i]) { - t.Fatalf("expected line: %v, but got %v", lines[i], readLines[i]) - } - } -} - -func TestTypedJSONOrYamlErrors(t *testing.T) { - s := NewYAMLOrJSONDecoder(bytes.NewReader([]byte(`{ - "foo": { - "stuff": 1 - "otherStuff": 2 - } -} - `)), 100) - obj := generic{} - err := s.Decode(&obj) - if err == nil { - t.Fatal("expected error with json: prefix, got no error") - } - if _, ok := err.(JSONSyntaxError); !ok { - t.Fatalf("expected %q to be of type JSONSyntaxError", err.Error()) - } - - s = NewYAMLOrJSONDecoder(bytes.NewReader([]byte(`--- -stuff: 1 - test-foo: 1 - ---- - `)), 100) - obj = generic{} - err = s.Decode(&obj) - if err == nil { - t.Fatal("expected error with yaml: prefix, got no error") - } - if _, ok := err.(YAMLSyntaxError); !ok { - t.Fatalf("expected %q to be of type YAMLSyntaxError", err.Error()) - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/version/helpers_test.go b/vendor/k8s.io/apimachinery/pkg/version/helpers_test.go deleted file mode 100644 index 863a5369..00000000 --- a/vendor/k8s.io/apimachinery/pkg/version/helpers_test.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -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/vendor/k8s.io/apimachinery/pkg/watch/filter_test.go b/vendor/k8s.io/apimachinery/pkg/watch/filter_test.go deleted file mode 100644 index 4b5ae898..00000000 --- a/vendor/k8s.io/apimachinery/pkg/watch/filter_test.go +++ /dev/null @@ -1,84 +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 watch_test - -import ( - "reflect" - "testing" - - . "k8s.io/apimachinery/pkg/watch" -) - -func TestFilter(t *testing.T) { - table := []Event{ - {Type: Added, Object: testType("foo")}, - {Type: Added, Object: testType("bar")}, - {Type: Added, Object: testType("baz")}, - {Type: Added, Object: testType("qux")}, - {Type: Added, Object: testType("zoo")}, - } - - source := NewFake() - filtered := Filter(source, func(e Event) (Event, bool) { - return e, e.Object.(testType)[0] != 'b' - }) - - go func() { - for _, item := range table { - source.Action(item.Type, item.Object) - } - source.Stop() - }() - - var got []string - for { - event, ok := <-filtered.ResultChan() - if !ok { - break - } - got = append(got, string(event.Object.(testType))) - } - - if e, a := []string{"foo", "qux", "zoo"}, got; !reflect.DeepEqual(e, a) { - t.Errorf("got %v, wanted %v", e, a) - } -} - -func TestFilterStop(t *testing.T) { - source := NewFake() - filtered := Filter(source, func(e Event) (Event, bool) { - return e, e.Object.(testType)[0] != 'b' - }) - - go func() { - source.Add(testType("foo")) - filtered.Stop() - }() - - var got []string - for { - event, ok := <-filtered.ResultChan() - if !ok { - break - } - got = append(got, string(event.Object.(testType))) - } - - if e, a := []string{"foo"}, got; !reflect.DeepEqual(e, a) { - t.Errorf("got %v, wanted %v", e, a) - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/watch/mux_test.go b/vendor/k8s.io/apimachinery/pkg/watch/mux_test.go deleted file mode 100644 index 7029cf1f..00000000 --- a/vendor/k8s.io/apimachinery/pkg/watch/mux_test.go +++ /dev/null @@ -1,176 +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 watch_test - -import ( - "reflect" - "sync" - "testing" - "time" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/wait" - . "k8s.io/apimachinery/pkg/watch" -) - -type myType struct { - ID string - Value string -} - -func (obj *myType) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } -func (obj *myType) DeepCopyObject() runtime.Object { - if obj == nil { - return nil - } - clone := *obj - return &clone -} - -func TestBroadcaster(t *testing.T) { - table := []Event{ - {Type: Added, Object: &myType{"foo", "hello world 1"}}, - {Type: Added, Object: &myType{"bar", "hello world 2"}}, - {Type: Modified, Object: &myType{"foo", "goodbye world 3"}}, - {Type: Deleted, Object: &myType{"bar", "hello world 4"}}, - } - - // The broadcaster we're testing - m := NewBroadcaster(0, WaitIfChannelFull) - - // Add a bunch of watchers - const testWatchers = 2 - wg := sync.WaitGroup{} - wg.Add(testWatchers) - for i := 0; i < testWatchers; i++ { - // Verify that each watcher gets the events in the correct order - go func(watcher int, w Interface) { - tableLine := 0 - for { - event, ok := <-w.ResultChan() - if !ok { - break - } - if e, a := table[tableLine], event; !reflect.DeepEqual(e, a) { - t.Errorf("Watcher %v, line %v: Expected (%v, %#v), got (%v, %#v)", - watcher, tableLine, e.Type, e.Object, a.Type, a.Object) - } else { - t.Logf("Got (%v, %#v)", event.Type, event.Object) - } - tableLine++ - } - wg.Done() - }(i, m.Watch()) - } - - for i, item := range table { - t.Logf("Sending %v", i) - m.Action(item.Type, item.Object) - } - - m.Shutdown() - - wg.Wait() -} - -func TestBroadcasterWatcherClose(t *testing.T) { - m := NewBroadcaster(0, WaitIfChannelFull) - w := m.Watch() - w2 := m.Watch() - w.Stop() - m.Shutdown() - if _, open := <-w.ResultChan(); open { - t.Errorf("Stop didn't work?") - } - if _, open := <-w2.ResultChan(); open { - t.Errorf("Shutdown didn't work?") - } - // Extra stops don't hurt things - w.Stop() - w2.Stop() -} - -func TestBroadcasterWatcherStopDeadlock(t *testing.T) { - done := make(chan bool) - m := NewBroadcaster(0, WaitIfChannelFull) - go func(w0, w1 Interface) { - // We know Broadcaster is in the distribute loop once one watcher receives - // an event. Stop the other watcher while distribute is trying to - // send to it. - select { - case <-w0.ResultChan(): - w1.Stop() - case <-w1.ResultChan(): - w0.Stop() - } - close(done) - }(m.Watch(), m.Watch()) - m.Action(Added, &myType{}) - select { - case <-time.After(wait.ForeverTestTimeout): - t.Error("timeout: deadlocked") - case <-done: - } - m.Shutdown() -} - -func TestBroadcasterDropIfChannelFull(t *testing.T) { - m := NewBroadcaster(1, DropIfChannelFull) - - event1 := Event{Type: Added, Object: &myType{"foo", "hello world 1"}} - event2 := Event{Type: Added, Object: &myType{"bar", "hello world 2"}} - - // Add a couple watchers - watches := make([]Interface, 2) - for i := range watches { - watches[i] = m.Watch() - } - - // Send a couple events before closing the broadcast channel. - t.Log("Sending event 1") - m.Action(event1.Type, event1.Object) - t.Log("Sending event 2") - m.Action(event2.Type, event2.Object) - m.Shutdown() - - // Pull events from the queue. - wg := sync.WaitGroup{} - wg.Add(len(watches)) - for i := range watches { - // Verify that each watcher only gets the first event because its watch - // queue of length one was full from the first one. - go func(watcher int, w Interface) { - defer wg.Done() - e1, ok := <-w.ResultChan() - if !ok { - t.Errorf("Watcher %v failed to retrieve first event.", watcher) - } - if e, a := event1, e1; !reflect.DeepEqual(e, a) { - t.Errorf("Watcher %v: Expected (%v, %#v), got (%v, %#v)", - watcher, e.Type, e.Object, a.Type, a.Object) - } - t.Logf("Got (%v, %#v)", e1.Type, e1.Object) - e2, ok := <-w.ResultChan() - if ok { - t.Errorf("Watcher %v received second event (%v, %#v) even though it shouldn't have.", - watcher, e2.Type, e2.Object) - } - }(i, watches[i]) - } - wg.Wait() -} diff --git a/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher_test.go b/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher_test.go deleted file mode 100644 index 1e302911..00000000 --- a/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher_test.go +++ /dev/null @@ -1,68 +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 watch_test - -import ( - "io" - "reflect" - "testing" - - "k8s.io/apimachinery/pkg/runtime" - . "k8s.io/apimachinery/pkg/watch" -) - -type fakeDecoder struct { - items chan Event -} - -func (f fakeDecoder) Decode() (action EventType, object runtime.Object, err error) { - item, open := <-f.items - if !open { - return action, nil, io.EOF - } - return item.Type, item.Object, nil -} - -func (f fakeDecoder) Close() { - close(f.items) -} - -func TestStreamWatcher(t *testing.T) { - table := []Event{ - {Type: Added, Object: testType("foo")}, - } - - fd := fakeDecoder{make(chan Event, 5)} - sw := NewStreamWatcher(fd) - - for _, item := range table { - fd.items <- item - got, open := <-sw.ResultChan() - if !open { - t.Errorf("unexpected early close") - } - if e, a := item, got; !reflect.DeepEqual(e, a) { - t.Errorf("expected %v, got %v", e, a) - } - } - - sw.Stop() - _, open := <-sw.ResultChan() - if open { - t.Errorf("Unexpected failure to close") - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/watch/until_test.go b/vendor/k8s.io/apimachinery/pkg/watch/until_test.go deleted file mode 100644 index e872c368..00000000 --- a/vendor/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/vendor/k8s.io/apimachinery/pkg/watch/watch_test.go b/vendor/k8s.io/apimachinery/pkg/watch/watch_test.go deleted file mode 100644 index bdf7fedd..00000000 --- a/vendor/k8s.io/apimachinery/pkg/watch/watch_test.go +++ /dev/null @@ -1,137 +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 watch_test - -import ( - "testing" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - . "k8s.io/apimachinery/pkg/watch" -) - -type testType string - -func (obj testType) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } -func (obj testType) DeepCopyObject() runtime.Object { return obj } - -func TestFake(t *testing.T) { - f := NewFake() - - table := []struct { - t EventType - s testType - }{ - {Added, testType("foo")}, - {Modified, testType("qux")}, - {Modified, testType("bar")}, - {Deleted, testType("bar")}, - {Error, testType("error: blah")}, - } - - // Prove that f implements Interface by phrasing this as a function. - consumer := func(w Interface) { - for _, expect := range table { - got, ok := <-w.ResultChan() - if !ok { - t.Fatalf("closed early") - } - if e, a := expect.t, got.Type; e != a { - t.Fatalf("Expected %v, got %v", e, a) - } - if a, ok := got.Object.(testType); !ok || a != expect.s { - t.Fatalf("Expected %v, got %v", expect.s, a) - } - } - _, stillOpen := <-w.ResultChan() - if stillOpen { - t.Fatal("Never stopped") - } - } - - sender := func() { - f.Add(testType("foo")) - f.Action(Modified, testType("qux")) - f.Modify(testType("bar")) - f.Delete(testType("bar")) - f.Error(testType("error: blah")) - f.Stop() - } - - go sender() - consumer(f) -} - -func TestRaceFreeFake(t *testing.T) { - f := NewRaceFreeFake() - - table := []struct { - t EventType - s testType - }{ - {Added, testType("foo")}, - {Modified, testType("qux")}, - {Modified, testType("bar")}, - {Deleted, testType("bar")}, - {Error, testType("error: blah")}, - } - - // Prove that f implements Interface by phrasing this as a function. - consumer := func(w Interface) { - for _, expect := range table { - got, ok := <-w.ResultChan() - if !ok { - t.Fatalf("closed early") - } - if e, a := expect.t, got.Type; e != a { - t.Fatalf("Expected %v, got %v", e, a) - } - if a, ok := got.Object.(testType); !ok || a != expect.s { - t.Fatalf("Expected %v, got %v", expect.s, a) - } - } - _, stillOpen := <-w.ResultChan() - if stillOpen { - t.Fatal("Never stopped") - } - } - - sender := func() { - f.Add(testType("foo")) - f.Action(Modified, testType("qux")) - f.Modify(testType("bar")) - f.Delete(testType("bar")) - f.Error(testType("error: blah")) - f.Stop() - } - - go sender() - consumer(f) -} - -func TestEmpty(t *testing.T) { - w := NewEmptyWatch() - _, ok := <-w.ResultChan() - if ok { - t.Errorf("unexpected result channel result") - } - w.Stop() - _, ok = <-w.ResultChan() - if ok { - t.Errorf("unexpected result channel result") - } -} diff --git a/vendor/k8s.io/apimachinery/third_party/forked/golang/json/OWNERS b/vendor/k8s.io/apimachinery/third_party/forked/golang/json/OWNERS deleted file mode 100644 index 8e8d9fce..00000000 --- a/vendor/k8s.io/apimachinery/third_party/forked/golang/json/OWNERS +++ /dev/null @@ -1,5 +0,0 @@ -approvers: -- pwittrock -reviewers: -- mengqiy -- apelisse diff --git a/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields_test.go b/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields_test.go deleted file mode 100644 index 33b78bc4..00000000 --- a/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package json - -import ( - "reflect" - "testing" -) - -func TestLookupPtrToStruct(t *testing.T) { - type Elem struct { - Key string - Value string - } - type Outer struct { - Inner []Elem `json:"inner" patchStrategy:"merge" patchMergeKey:"key"` - } - outer := &Outer{} - elemType, patchStrategies, patchMergeKey, err := LookupPatchMetadataForStruct(reflect.TypeOf(outer), "inner") - if err != nil { - t.Fatal(err) - } - if elemType != reflect.TypeOf([]Elem{}) { - t.Errorf("elemType = %v, want: %v", elemType, reflect.TypeOf([]Elem{})) - } - if !reflect.DeepEqual(patchStrategies, []string{"merge"}) { - t.Errorf("patchStrategies = %v, want: %v", patchStrategies, []string{"merge"}) - } - if patchMergeKey != "key" { - t.Errorf("patchMergeKey = %v, want: %v", patchMergeKey, "key") - } -} diff --git a/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal_test.go b/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal_test.go deleted file mode 100644 index 4a062993..00000000 --- a/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal_test.go +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package reflect - -import ( - "testing" -) - -func TestEqualities(t *testing.T) { - e := Equalities{} - type Bar struct { - X int - } - type Baz struct { - Y Bar - } - err := e.AddFuncs( - func(a, b int) bool { - return a+1 == b - }, - func(a, b Bar) bool { - return a.X*10 == b.X - }, - ) - if err != nil { - t.Fatalf("Unexpected: %v", err) - } - - type Foo struct { - X int - } - - table := []struct { - a, b interface{} - equal bool - }{ - {1, 2, true}, - {2, 1, false}, - {"foo", "fo", false}, - {"foo", "foo", true}, - {"foo", "foobar", false}, - {Foo{1}, Foo{2}, true}, - {Foo{2}, Foo{1}, false}, - {Bar{1}, Bar{10}, true}, - {&Bar{1}, &Bar{10}, true}, - {Baz{Bar{1}}, Baz{Bar{10}}, true}, - {[...]string{}, [...]string{"1", "2", "3"}, false}, - {[...]string{"1"}, [...]string{"1", "2", "3"}, false}, - {[...]string{"1", "2", "3"}, [...]string{}, false}, - {[...]string{"1", "2", "3"}, [...]string{"1", "2", "3"}, true}, - {map[string]int{"foo": 1}, map[string]int{}, false}, - {map[string]int{"foo": 1}, map[string]int{"foo": 2}, true}, - {map[string]int{"foo": 2}, map[string]int{"foo": 1}, false}, - {map[string]int{"foo": 1}, map[string]int{"foo": 2, "bar": 6}, false}, - {map[string]int{"foo": 1, "bar": 6}, map[string]int{"foo": 2}, false}, - {map[string]int{}, map[string]int(nil), true}, - {[]string(nil), []string(nil), true}, - {[]string{}, []string(nil), true}, - {[]string(nil), []string{}, true}, - {[]string{"1"}, []string(nil), false}, - {[]string{}, []string{"1", "2", "3"}, false}, - {[]string{"1"}, []string{"1", "2", "3"}, false}, - {[]string{"1", "2", "3"}, []string{}, false}, - } - - for _, item := range table { - if e, a := item.equal, e.DeepEqual(item.a, item.b); e != a { - t.Errorf("Expected (%+v == %+v) == %v, but got %v", item.a, item.b, e, a) - } - } -} - -func TestDerivates(t *testing.T) { - e := Equalities{} - type Bar struct { - X int - } - type Baz struct { - Y Bar - } - err := e.AddFuncs( - func(a, b int) bool { - return a+1 == b - }, - func(a, b Bar) bool { - return a.X*10 == b.X - }, - ) - if err != nil { - t.Fatalf("Unexpected: %v", err) - } - - type Foo struct { - X int - } - - table := []struct { - a, b interface{} - equal bool - }{ - {1, 2, true}, - {2, 1, false}, - {"foo", "fo", false}, - {"foo", "foo", true}, - {"foo", "foobar", false}, - {Foo{1}, Foo{2}, true}, - {Foo{2}, Foo{1}, false}, - {Bar{1}, Bar{10}, true}, - {&Bar{1}, &Bar{10}, true}, - {Baz{Bar{1}}, Baz{Bar{10}}, true}, - {[...]string{}, [...]string{"1", "2", "3"}, false}, - {[...]string{"1"}, [...]string{"1", "2", "3"}, false}, - {[...]string{"1", "2", "3"}, [...]string{}, false}, - {[...]string{"1", "2", "3"}, [...]string{"1", "2", "3"}, true}, - {map[string]int{"foo": 1}, map[string]int{}, false}, - {map[string]int{"foo": 1}, map[string]int{"foo": 2}, true}, - {map[string]int{"foo": 2}, map[string]int{"foo": 1}, false}, - {map[string]int{"foo": 1}, map[string]int{"foo": 2, "bar": 6}, true}, - {map[string]int{"foo": 1, "bar": 6}, map[string]int{"foo": 2}, false}, - {map[string]int{}, map[string]int(nil), true}, - {[]string(nil), []string(nil), true}, - {[]string{}, []string(nil), true}, - {[]string(nil), []string{}, true}, - {[]string{"1"}, []string(nil), false}, - {[]string{}, []string{"1", "2", "3"}, true}, - {[]string{"1"}, []string{"1", "2", "3"}, true}, - {[]string{"1", "2", "3"}, []string{}, false}, - } - - for _, item := range table { - if e, a := item.equal, e.DeepDerivative(item.a, item.b); e != a { - t.Errorf("Expected (%+v ~ %+v) == %v, but got %v", item.a, item.b, e, a) - } - } -} diff --git a/vendor/k8s.io/apiserver/.import-restrictions b/vendor/k8s.io/apiserver/.import-restrictions deleted file mode 100644 index c80e742d..00000000 --- a/vendor/k8s.io/apiserver/.import-restrictions +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Rules": [ - { - "SelectorRegexp": "k8s[.]io/kubernetes", - "ForbiddenPrefixes": [ - "" - ] - } - ] -} diff --git a/vendor/k8s.io/apiserver/CONTRIBUTING.md b/vendor/k8s.io/apiserver/CONTRIBUTING.md deleted file mode 100644 index 94a28899..00000000 --- a/vendor/k8s.io/apiserver/CONTRIBUTING.md +++ /dev/null @@ -1,7 +0,0 @@ -# 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. - -This repository is published from [kubernetes/kubernetes/staging/src/k8s.io/apiserver](https://git.k8s.io/kubernetes/staging/src/k8s.io/apiserver) by the [kubernetes publishing-bot](https://git.k8s.io/publishing-bot). - -Please see [Staging Directory and Publishing](https://git.k8s.io/community/contributors/devel/staging.md) for more information diff --git a/vendor/k8s.io/apiserver/OWNERS b/vendor/k8s.io/apiserver/OWNERS deleted file mode 100644 index a77fd665..00000000 --- a/vendor/k8s.io/apiserver/OWNERS +++ /dev/null @@ -1,19 +0,0 @@ -approvers: -- lavalamp -- smarterclayton -- deads2k -- sttts -- liggitt -reviewers: -- lavalamp -- smarterclayton -- wojtek-t -- deads2k -- caesarxuchao -- liggitt -- sttts -- ncdc -- tallclair -- enj -- hzxuzhonghu -- CaoShuFeng diff --git a/vendor/k8s.io/apiserver/README.md b/vendor/k8s.io/apiserver/README.md deleted file mode 100644 index 90160ce9..00000000 --- a/vendor/k8s.io/apiserver/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# apiserver - -Generic library for building a Kubernetes aggregated API server. - - -## Purpose - -This library contains code to create Kubernetes aggregation server complete with delegated authentication and authorization, -`kubectl` compatible discovery information, optional admission chain, and versioned types. It's first consumers are -`k8s.io/kubernetes`, `k8s.io/kube-aggregator`, and `github.com/kubernetes-incubator/service-catalog`. - - -## Compatibility - -There are *NO compatibility guarantees* for this repository, yet. It is in direct support of Kubernetes, so branches -will track Kubernetes and be compatible with that repo. As we more cleanly separate the layers, we will review the -compatibility guarantee. We have a goal to make this easier to use in the future. - - -## Where does it come from? - -`apiserver` is synced from https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiserver. -Code changes are made in that location, merged into `k8s.io/kubernetes` and later synced here. - - -## Things you should *NOT* do - - 1. Directly modify any files under `pkg` in this repo. Those are driven from `k8s.io/kubernetes/staging/src/k8s.io/apiserver`. - 2. Expect compatibility. This repo is changing quickly in direct support of - Kubernetes and the API isn't yet stable enough for API guarantees. diff --git a/vendor/k8s.io/apiserver/SECURITY_CONTACTS b/vendor/k8s.io/apiserver/SECURITY_CONTACTS deleted file mode 100644 index 0648a8eb..00000000 --- a/vendor/k8s.io/apiserver/SECURITY_CONTACTS +++ /dev/null @@ -1,17 +0,0 @@ -# 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/vendor/k8s.io/apiserver/code-of-conduct.md b/vendor/k8s.io/apiserver/code-of-conduct.md deleted file mode 100644 index 0d15c00c..00000000 --- a/vendor/k8s.io/apiserver/code-of-conduct.md +++ /dev/null @@ -1,3 +0,0 @@ -# Kubernetes Community Code of Conduct - -Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) diff --git a/vendor/k8s.io/apiserver/pkg/features/OWNERS b/vendor/k8s.io/apiserver/pkg/features/OWNERS deleted file mode 100644 index fe7b0144..00000000 --- a/vendor/k8s.io/apiserver/pkg/features/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -approvers: -- feature-approvers diff --git a/vendor/k8s.io/apiserver/pkg/util/feature/feature_gate_test.go b/vendor/k8s.io/apiserver/pkg/util/feature/feature_gate_test.go deleted file mode 100644 index f26f3cb8..00000000 --- a/vendor/k8s.io/apiserver/pkg/util/feature/feature_gate_test.go +++ /dev/null @@ -1,320 +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 feature - -import ( - "fmt" - "strings" - "testing" - - "github.com/spf13/pflag" -) - -func TestFeatureGateFlag(t *testing.T) { - // gates for testing - const testAlphaGate Feature = "TestAlpha" - const testBetaGate Feature = "TestBeta" - - tests := []struct { - arg string - expect map[Feature]bool - parseError string - }{ - { - arg: "", - expect: map[Feature]bool{ - allAlphaGate: false, - testAlphaGate: false, - testBetaGate: false, - }, - }, - { - arg: "fooBarBaz=maybeidk", - expect: map[Feature]bool{ - allAlphaGate: false, - testAlphaGate: false, - testBetaGate: false, - }, - parseError: "unrecognized key: fooBarBaz", - }, - { - arg: "AllAlpha=false", - expect: map[Feature]bool{ - allAlphaGate: false, - testAlphaGate: false, - testBetaGate: false, - }, - }, - { - arg: "AllAlpha=true", - expect: map[Feature]bool{ - allAlphaGate: true, - testAlphaGate: true, - testBetaGate: false, - }, - }, - { - arg: "AllAlpha=banana", - expect: map[Feature]bool{ - allAlphaGate: false, - testAlphaGate: false, - testBetaGate: false, - }, - parseError: "invalid value of AllAlpha", - }, - { - arg: "AllAlpha=false,TestAlpha=true", - expect: map[Feature]bool{ - allAlphaGate: false, - testAlphaGate: true, - testBetaGate: false, - }, - }, - { - arg: "TestAlpha=true,AllAlpha=false", - expect: map[Feature]bool{ - allAlphaGate: false, - testAlphaGate: true, - testBetaGate: false, - }, - }, - { - arg: "AllAlpha=true,TestAlpha=false", - expect: map[Feature]bool{ - allAlphaGate: true, - testAlphaGate: false, - testBetaGate: false, - }, - }, - { - arg: "TestAlpha=false,AllAlpha=true", - expect: map[Feature]bool{ - allAlphaGate: true, - testAlphaGate: false, - testBetaGate: false, - }, - }, - { - arg: "TestBeta=true,AllAlpha=false", - expect: map[Feature]bool{ - allAlphaGate: false, - testAlphaGate: false, - testBetaGate: true, - }, - }, - } - for i, test := range tests { - fs := pflag.NewFlagSet("testfeaturegateflag", pflag.ContinueOnError) - f := NewFeatureGate() - f.Add(map[Feature]FeatureSpec{ - testAlphaGate: {Default: false, PreRelease: Alpha}, - testBetaGate: {Default: false, PreRelease: Beta}, - }) - f.AddFlag(fs) - - err := fs.Parse([]string{fmt.Sprintf("--%s=%s", flagName, test.arg)}) - if test.parseError != "" { - if !strings.Contains(err.Error(), test.parseError) { - t.Errorf("%d: Parse() Expected %v, Got %v", i, test.parseError, err) - } - } else if err != nil { - t.Errorf("%d: Parse() Expected nil, Got %v", i, err) - } - for k, v := range test.expect { - if actual := f.enabled.Load().(map[Feature]bool)[k]; actual != v { - t.Errorf("%d: expected %s=%v, Got %v", i, k, v, actual) - } - } - } -} - -func TestFeatureGateOverride(t *testing.T) { - const testAlphaGate Feature = "TestAlpha" - const testBetaGate Feature = "TestBeta" - - // Don't parse the flag, assert defaults are used. - var f FeatureGate = NewFeatureGate() - f.Add(map[Feature]FeatureSpec{ - testAlphaGate: {Default: false, PreRelease: Alpha}, - testBetaGate: {Default: false, PreRelease: Beta}, - }) - - f.Set("TestAlpha=true,TestBeta=true") - if f.Enabled(testAlphaGate) != true { - t.Errorf("Expected true") - } - if f.Enabled(testBetaGate) != true { - t.Errorf("Expected true") - } - - f.Set("TestAlpha=false") - if f.Enabled(testAlphaGate) != false { - t.Errorf("Expected false") - } - if f.Enabled(testBetaGate) != true { - t.Errorf("Expected true") - } -} - -func TestFeatureGateFlagDefaults(t *testing.T) { - // gates for testing - const testAlphaGate Feature = "TestAlpha" - const testBetaGate Feature = "TestBeta" - - // Don't parse the flag, assert defaults are used. - var f FeatureGate = NewFeatureGate() - f.Add(map[Feature]FeatureSpec{ - testAlphaGate: {Default: false, PreRelease: Alpha}, - testBetaGate: {Default: true, PreRelease: Beta}, - }) - - if f.Enabled(testAlphaGate) != false { - t.Errorf("Expected false") - } - if f.Enabled(testBetaGate) != true { - t.Errorf("Expected true") - } -} - -func TestFeatureGateSetFromMap(t *testing.T) { - // gates for testing - const testAlphaGate Feature = "TestAlpha" - const testBetaGate Feature = "TestBeta" - - tests := []struct { - name string - setmap map[string]bool - expect map[Feature]bool - setmapError string - }{ - { - name: "set TestAlpha and TestBeta true", - setmap: map[string]bool{ - "TestAlpha": true, - "TestBeta": true, - }, - expect: map[Feature]bool{ - testAlphaGate: true, - testBetaGate: true, - }, - }, - { - name: "set TestBeta true", - setmap: map[string]bool{ - "TestBeta": true, - }, - expect: map[Feature]bool{ - testAlphaGate: false, - testBetaGate: true, - }, - }, - { - name: "set TestAlpha false", - setmap: map[string]bool{ - "TestAlpha": false, - }, - expect: map[Feature]bool{ - testAlphaGate: false, - testBetaGate: false, - }, - }, - { - name: "set TestInvaild true", - setmap: map[string]bool{ - "TestInvaild": true, - }, - expect: map[Feature]bool{ - testAlphaGate: false, - testBetaGate: false, - }, - setmapError: "unrecognized key:", - }, - } - for i, test := range tests { - t.Run(fmt.Sprintf("SetFromMap %s", test.name), func(t *testing.T) { - f := NewFeatureGate() - f.Add(map[Feature]FeatureSpec{ - testAlphaGate: {Default: false, PreRelease: Alpha}, - testBetaGate: {Default: false, PreRelease: Beta}, - }) - err := f.SetFromMap(test.setmap) - if test.setmapError != "" { - if !strings.Contains(err.Error(), test.setmapError) { - t.Errorf("%d: SetFromMap(%#v) Expected err:%v, Got err:%v", i, test.setmap, test.setmapError, err) - } - } else if err != nil { - t.Errorf("%d: SetFromMap(%#v) Expected success, Got err:%v", i, test.setmap, err) - } - for k, v := range test.expect { - if actual := f.Enabled(k); actual != v { - t.Errorf("%d: SetFromMap(%#v) Expected %s=%v, Got %s=%v", i, test.setmap, k, v, k, actual) - } - } - }) - } -} - -func TestFeatureGateString(t *testing.T) { - // gates for testing - const testAlphaGate Feature = "TestAlpha" - const testBetaGate Feature = "TestBeta" - const testGAGate Feature = "TestGA" - - featuremap := map[Feature]FeatureSpec{ - testGAGate: {Default: true, PreRelease: GA}, - testAlphaGate: {Default: false, PreRelease: Alpha}, - testBetaGate: {Default: true, PreRelease: Beta}, - } - - tests := []struct { - setmap map[string]bool - expect string - }{ - { - setmap: map[string]bool{ - "TestAlpha": false, - }, - expect: "TestAlpha=false", - }, - { - setmap: map[string]bool{ - "TestAlpha": false, - "TestBeta": true, - }, - expect: "TestAlpha=false,TestBeta=true", - }, - { - setmap: map[string]bool{ - "TestGA": true, - "TestAlpha": false, - "TestBeta": true, - }, - expect: "TestAlpha=false,TestBeta=true,TestGA=true", - }, - } - for i, test := range tests { - t.Run(fmt.Sprintf("SetFromMap %s", test.expect), func(t *testing.T) { - f := NewFeatureGate() - f.Add(featuremap) - f.SetFromMap(test.setmap) - result := f.String() - if result != test.expect { - t.Errorf("%d: SetFromMap(%#v) Expected %s, Got %s", i, test.setmap, test.expect, result) - } - }) - } -} diff --git a/vendor/k8s.io/client-go/.travis.yml b/vendor/k8s.io/client-go/.travis.yml deleted file mode 100644 index 557658ed..00000000 --- a/vendor/k8s.io/client-go/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -go_import_path: k8s.io/client-go - -go: - - 1.8.1 - -script: go build ./... diff --git a/vendor/k8s.io/client-go/CHANGELOG.md b/vendor/k8s.io/client-go/CHANGELOG.md deleted file mode 100644 index 03061162..00000000 --- a/vendor/k8s.io/client-go/CHANGELOG.md +++ /dev/null @@ -1,420 +0,0 @@ -TODO: This document was manually maintained so might be incomplete. The -automation effort is tracked in -https://github.com/kubernetes/client-go/issues/234. - -Changes in `k8s.io/api` and `k8s.io/apimachinery` are mentioned here -because `k8s.io/client-go` depends on them. - -# 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:** - -* If you upgrade your client-go libs and use the `AppsV1() or Apps()` interface, please note that the default garbage collection behavior is changed. - - * [https://github.com/kubernetes/kubernetes/pull/55148](https://github.com/kubernetes/kubernetes/pull/55148) - -* Swagger 1.2 retriever `DiscoveryClient.SwaggerSchema` was removed from the discovery client - - * [https://github.com/kubernetes/kubernetes/pull/53441](https://github.com/kubernetes/kubernetes/pull/53441) - -* Informers got a NewFilteredSharedInformerFactory to e.g. filter by namespace - - * [https://github.com/kubernetes/kubernetes/pull/54660](https://github.com/kubernetes/kubernetes/pull/54660) - -* [k8s.io/api] The dynamic admission webhook is split into two kinds, mutating and validating. -The kinds have changed completely and old code must be ported to `admissionregistration.k8s.io/v1beta1` - -`MutatingWebhookConfiguration` and `ValidatingWebhookConfiguration` - - * [https://github.com/kubernetes/kubernetes/pull/55282](https://github.com/kubernetes/kubernetes/pull/55282) - -* [k8s.io/api] Renamed `core/v1.ScaleIOVolumeSource` to `ScaleIOPersistentVolumeSource` - - * [https://github.com/kubernetes/kubernetes/pull/54013](https://github.com/kubernetes/kubernetes/pull/54013) - -* [k8s.io/api] Renamed `core/v1.RBDVolumeSource` to `RBDPersistentVolumeSource` - - * [https://github.com/kubernetes/kubernetes/pull/54302](https://github.com/kubernetes/kubernetes/pull/54302) - -* [k8s.io/api] Removed `core/v1.CreatedByAnnotation` - - * [https://github.com/kubernetes/kubernetes/pull/54445](https://github.com/kubernetes/kubernetes/pull/54445) - -* [k8s.io/api] Renamed `core/v1.StorageMediumHugepages` to `StorageMediumHugePages` - - * [https://github.com/kubernetes/kubernetes/pull/54748](https://github.com/kubernetes/kubernetes/pull/54748) - -* [k8s.io/api] `core/v1.Taint.TimeAdded` became a pointer - - * [https://github.com/kubernetes/kubernetes/pull/43016](https://github.com/kubernetes/kubernetes/pull/43016) - -* [k8s.io/api] `core/v1.DefaultHardPodAffinitySymmetricWeight` type changed from int to int32 - - * [https://github.com/kubernetes/kubernetes/pull/53850](https://github.com/kubernetes/kubernetes/pull/53850) - -* [k8s.io/apimachinery] `ObjectCopier` interface was removed (requires switch to new generators with DeepCopy methods) - - * [https://github.com/kubernetes/kubernetes/pull/53525](https://github.com/kubernetes/kubernetes/pull/53525) - -**New Features:** - -* Certificate manager was moved from kubelet to `k8s.io/client-go/util/certificates` - - * [https://github.com/kubernetes/kubernetes/pull/49654](https://github.com/kubernetes/kubernetes/pull/49654) - -* [k8s.io/api] Workloads api types are promoted to `apps/v1` version - - * [https://github.com/kubernetes/kubernetes/pull/53679](https://github.com/kubernetes/kubernetes/pull/53679) - -* [k8s.io/api] Added `storage.k8s.io/v1alpha1` API group - - * [https://github.com/kubernetes/kubernetes/pull/54463](https://github.com/kubernetes/kubernetes/pull/54463) - -* [k8s.io/api] Added support for conditions in StatefulSet status - - * [https://github.com/kubernetes/kubernetes/pull/55268](https://github.com/kubernetes/kubernetes/pull/55268) - -* [k8s.io/api] Added support for conditions in DaemonSet status - - * [https://github.com/kubernetes/kubernetes/pull/55272](https://github.com/kubernetes/kubernetes/pull/55272) - -* [k8s.io/apimachinery] Added polymorphic scale client in `k8s.io/client-go/scale`, which supports scaling of resources in arbitrary API groups - - * [https://github.com/kubernetes/kubernetes/pull/53743](https://github.com/kubernetes/kubernetes/pull/53743) - -* [k8s.io/apimachinery] `meta.MetadataAccessor` got API chunking support - - * [https://github.com/kubernetes/kubernetes/pull/53768](https://github.com/kubernetes/kubernetes/pull/53768) - -* [k8s.io/apimachinery] `unstructured.Unstructured` got getters and setters - - * [https://github.com/kubernetes/kubernetes/pull/51940](https://github.com/kubernetes/kubernetes/pull/51940) - -**Bug fixes and Improvements:** - -* The body in glog output is not truncated with log level 10 - - * [https://github.com/kubernetes/kubernetes/pull/54801](https://github.com/kubernetes/kubernetes/pull/54801) - -* [k8s.io/api] Unset `creationTimestamp` field is output as null if encoded from an unstructured object - - * [https://github.com/kubernetes/kubernetes/pull/53464](https://github.com/kubernetes/kubernetes/pull/53464) - -* [k8s.io/apimachinery] Redirect behavior is restored for proxy subresources - - * [https://github.com/kubernetes/kubernetes/pull/52933](https://github.com/kubernetes/kubernetes/pull/52933) - -* [k8s.io/apimachinery] Random string generation functions are optimized - - * [https://github.com/kubernetes/kubernetes/pull/53720](https://github.com/kubernetes/kubernetes/pull/53720) - -# v5.0.1 - -Bug fix: picked up a security fix [kubernetes/kubernetes#53443](https://github.com/kubernetes/kubernetes/pull/53443) for `PodSecurityPolicy`. - -# v5.0.0 - -**New features:** - -* Added paging support - - * [https://github.com/kubernetes/kubernetes/pull/51876](https://github.com/kubernetes/kubernetes/pull/51876) - -* Added support for client-side spam filtering of events - - * [https://github.com/kubernetes/kubernetes/pull/47367](https://github.com/kubernetes/kubernetes/pull/47367) - -* Added support for http etag and caching - - * [https://github.com/kubernetes/kubernetes/pull/50404](https://github.com/kubernetes/kubernetes/pull/50404) - -* Added priority queue support to informer cache - - * [https://github.com/kubernetes/kubernetes/pull/49752](https://github.com/kubernetes/kubernetes/pull/49752) - -* Added openstack auth provider - - * [https://github.com/kubernetes/kubernetes/pull/39587](https://github.com/kubernetes/kubernetes/pull/39587) - -* Added metrics for checking reflector health - - * [https://github.com/kubernetes/kubernetes/pull/48224](https://github.com/kubernetes/kubernetes/pull/48224) - -* Client-go now includes the leaderelection package - - * [https://github.com/kubernetes/kubernetes/pull/39173](https://github.com/kubernetes/kubernetes/pull/39173) - -**API changes:** - -* Promoted Autoscaling v2alpha1 to v2beta1 - - * [https://github.com/kubernetes/kubernetes/pull/50708](https://github.com/kubernetes/kubernetes/pull/50708) - -* Promoted CronJobs to batch/v1beta1 - - * [https://github.com/kubernetes/kubernetes/pull/41901](https://github.com/kubernetes/kubernetes/pull/41901) - -* Promoted rbac.authorization.k8s.io/v1beta1 to rbac.authorization.k8s.io/v1 - - * [https://github.com/kubernetes/kubernetes/pull/49642](https://github.com/kubernetes/kubernetes/pull/49642) - -* Added a new API version apps/v1beta2 - - * [https://github.com/kubernetes/kubernetes/pull/48746](https://github.com/kubernetes/kubernetes/pull/48746) - -* Added a new API version scheduling/v1alpha1 - - * [https://github.com/kubernetes/kubernetes/pull/48377](https://github.com/kubernetes/kubernetes/pull/48377) - -**Breaking changes:** - -* Moved pkg/api and pkg/apis to [k8s.io/api](https://github.com/kubernetes/api). Other kubernetes repositories also import types from there, so they are composable with client-go. - -* Removed helper functions in pkg/api and pkg/apis. They are planned to be exported in other repos. The issue is tracked [here](https://github.com/kubernetes/kubernetes/issues/48209#issuecomment-314537745). During the transition, you'll have to copy the helper functions to your projects. - -* The discovery client now fetches the protobuf encoded OpenAPI schema and returns `openapi_v2.Document` - - * [https://github.com/kubernetes/kubernetes/pull/46803](https://github.com/kubernetes/kubernetes/pull/46803) - -* Enforced explicit references to API group client interfaces in clientsets to avoid ambiguity. - - * [https://github.com/kubernetes/kubernetes/pull/49370](https://github.com/kubernetes/kubernetes/pull/49370) - -* The generic RESTClient type (`k8s.io/client-go/rest`) no longer exposes `LabelSelectorParam` or `FieldSelectorParam` methods - use `VersionedParams` with `metav1.ListOptions` instead. The `UintParam` method has been removed. The `timeout` parameter will no longer cause an error when using `Param()`. - - * [https://github.com/kubernetes/kubernetes/pull/48991](https://github.com/kubernetes/kubernetes/pull/48991) - -# v4.0.0 - -No significant changes since v4.0.0-beta.0. - -# v4.0.0-beta.0 - -**New features:** - -* Added OpenAPISchema support in the discovery client - - * [https://github.com/kubernetes/kubernetes/pull/44531](https://github.com/kubernetes/kubernetes/pull/44531) - -* Added mutation cache filter: MutationCache is able to take the result of update operations and stores them in an LRU that can be used to provide a more current view of a requested object. - - * [https://github.com/kubernetes/kubernetes/pull/45838](https://github.com/kubernetes/kubernetes/pull/45838/commits/f88c7725b4f9446c652d160bdcfab7c6201bddea) - -* Moved the remotecommand package (used by `kubectl exec/attach`) to client-go - - * [https://github.com/kubernetes/kubernetes/pull/41331](https://github.com/kubernetes/kubernetes/pull/41331) - -* Added support for following redirects to the SpdyRoundTripper - - * [https://github.com/kubernetes/kubernetes/pull/44451](https://github.com/kubernetes/kubernetes/pull/44451) - -* Added Azure Active Directory plugin - - * [https://github.com/kubernetes/kubernetes/pull/43987](https://github.com/kubernetes/kubernetes/pull/43987) - -**Usability improvements:** - -* Added several new examples and reorganized client-go/examples - - * [Related PRs](https://github.com/kubernetes/kubernetes/commits/release-1.7/staging/src/k8s.io/client-go/examples) - -**API changes:** - -* Added networking.k8s.io/v1 API - - * [https://github.com/kubernetes/kubernetes/pull/39164](https://github.com/kubernetes/kubernetes/pull/39164) - -* ControllerRevision type added for StatefulSet and DaemonSet history. - - * [https://github.com/kubernetes/kubernetes/pull/45867](https://github.com/kubernetes/kubernetes/pull/45867) - -* Added support for initializers - - * [https://github.com/kubernetes/kubernetes/pull/38058](https://github.com/kubernetes/kubernetes/pull/38058) - -* Added admissionregistration.k8s.io/v1alpha1 API - - * [https://github.com/kubernetes/kubernetes/pull/46294](https://github.com/kubernetes/kubernetes/pull/46294) - -**Breaking changes:** - -* Moved client-go/util/clock to apimachinery/pkg/util/clock - - * [https://github.com/kubernetes/kubernetes/pull/45933](https://github.com/kubernetes/kubernetes/pull/45933/commits/8013212db54e95050c622675c6706cce5de42b45) - -* Some [API helpers](https://github.com/kubernetes/client-go/blob/release-3.0/pkg/api/helpers.go) were removed. - -* Dynamic client takes GetOptions as an input parameter - - * [https://github.com/kubernetes/kubernetes/pull/47251](https://github.com/kubernetes/kubernetes/pull/47251) - -**Bug fixes:** - -* PortForwarder: don't log an error if net.Listen fails. [https://github.com/kubernetes/kubernetes/pull/44636](https://github.com/kubernetes/kubernetes/pull/44636) - -* oidc auth plugin not to override the Auth header if it's already exits. [https://github.com/kubernetes/kubernetes/pull/45529](https://github.com/kubernetes/kubernetes/pull/45529) - -* The --namespace flag is now honored for in-cluster clients that have an empty configuration. [https://github.com/kubernetes/kubernetes/pull/46299](https://github.com/kubernetes/kubernetes/pull/46299) - -* GCP auth plugin no longer overwrites existing Authorization headers. [https://github.com/kubernetes/kubernetes/pull/45575](https://github.com/kubernetes/kubernetes/pull/45575) - -# v3.0.0 - -Bug fixes: -* Use OS-specific libs when computing client User-Agent in kubectl, etc. (https://github.com/kubernetes/kubernetes/pull/44423) -* kubectl commands run inside a pod using a kubeconfig file now use the namespace specified in the kubeconfig file, instead of using the pod namespace. If no kubeconfig file is used, or the kubeconfig does not specify a namespace, the pod namespace is still used as a fallback. (https://github.com/kubernetes/kubernetes/pull/44570) -* Restored the ability of kubectl running inside a pod to consume resource files specifying a different namespace than the one the pod is running in. (https://github.com/kubernetes/kubernetes/pull/44862) - -# v3.0.0-beta.0 - -* Added dependency on k8s.io/apimachinery. The impacts include changing import path of API objects like `ListOptions` from `k8s.io/client-go/pkg/api/v1` to `k8s.io/apimachinery/pkg/apis/meta/v1`. -* Added generated listers (listers/) and informers (informers/) -* Kubernetes API changes: - * Added client support for: - * authentication/v1 - * authorization/v1 - * autoscaling/v2alpha1 - * rbac/v1beta1 - * settings/v1alpha1 - * storage/v1 - * Changed client support for: - * certificates from v1alpha1 to v1beta1 - * policy from v1alpha1 to v1beta1 - * Deleted client support for: - * extensions/v1beta1#Job -* CHANGED: pass typed options to dynamic client (https://github.com/kubernetes/kubernetes/pull/41887) - -# v2.0.0 - -* Included bug fixes in k8s.io/kuberentes release-1.5 branch, up to commit - bde8578d9675129b7a2aa08f1b825ec6cc0f3420 - -# v2.0.0-alpha.1 - -* Removed top-level version folder (e.g., 1.4 and 1.5), switching to maintaining separate versions - in separate branches. -* Clientset supported multiple versions per API group -* Added ThirdPartyResources example -* Kubernetes API changes - * Apps API group graduated to v1beta1 - * Policy API group graduated to v1beta1 - * Added support for batch/v2alpha1/cronjob - * Renamed PetSet to StatefulSet - - -# v1.5.0 - -* Included the auth plugin (https://github.com/kubernetes/kubernetes/pull/33334) -* Added timeout field to RESTClient config (https://github.com/kubernetes/kubernetes/pull/33958) diff --git a/vendor/k8s.io/client-go/CONTRIBUTING.md b/vendor/k8s.io/client-go/CONTRIBUTING.md deleted file mode 100644 index b01f8abb..00000000 --- a/vendor/k8s.io/client-go/CONTRIBUTING.md +++ /dev/null @@ -1,7 +0,0 @@ -# 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. - -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). - -Please see [Staging Directory and Publishing](https://git.k8s.io/community/contributors/devel/staging.md) for more information diff --git a/vendor/k8s.io/client-go/INSTALL.md b/vendor/k8s.io/client-go/INSTALL.md deleted file mode 100644 index 42656284..00000000 --- a/vendor/k8s.io/client-go/INSTALL.md +++ /dev/null @@ -1,162 +0,0 @@ -# Installing client-go - -## For the casual user - -If you want to write a simple script, don't care about a reproducible client -library install, don't mind getting head (which may be less stable than a -particular release), then simply: - -```sh -$ go get k8s.io/client-go/... -``` - -This will install `k8s.io/client-go` in your `$GOPATH`. `k8s.io/client-go` -includes most of its own dependencies in its `k8s.io/client-go/vendor` path, -except for `k8s.io/apimachinery` and `glog`. `go get` will recursively download -these excluded repos to your `$GOPATH`, if they don't already exist. If -`k8s.io/apimachinery` preexisted in `$GOPATH`, you also need to: - -```sh -$ go get -u k8s.io/apimachinery/... -``` - -because the head of client-go is only guaranteed to work with the head of -apimachinery. - -We excluded `k8s.io/apimachinery` and `glog` from `k8s.io/client-go/vendor` to -prevent `go get` users from hitting issues like -[#19](https://github.com/kubernetes/client-go/issues/19) and -[#83](https://github.com/kubernetes/client-go/issues/83). If your project share -other dependencies with client-go, and you hit issues similar to #19 or #83, -then you'll need to look down at the next section. - -Note: the official go policy is that libraries should not vendor their -dependencies. This is unworkable for us, since our dependencies change and HEAD -on every dependency has not necessarily been tested with client-go. In fact, -HEAD from all dependencies may not even compile with client-go! - -## Dependency management for the serious (or reluctant) user - -Reasons why you might need to use a dependency management system: -* You use a dependency that client-go also uses, and don't want two copies of - the dependency compiled into your application. For some dependencies with - singletons or global inits (e.g. `glog`) this wouldn't even compile... -* You want to lock in a particular version (so you don't have to change your - code every time we change a public interface). -* You want your install to be reproducible. For example, for your CI system or - for new team members. - -There are three tools you could in theory use for this. Instructions -for each follows. - -### Godep - -[godep](https://github.com/tools/godep) is an older dependency management tool, which is -used by the main Kubernetes repo and `client-go` to manage dependencies. - -Before proceeding with the below instructions, you should ensure that your -$GOPATH is empty except for containing your own package and its dependencies, -and you have a copy of godep somewhere in your $PATH. - -To install `client-go` and place its dependencies in your `$GOPATH`: - -```sh -go get k8s.io/client-go/... -cd $GOPATH/src/k8s.io/client-go -git checkout v6.0.0 -# cd 1.5 # only necessary with 1.5 and 1.4 clients. -godep restore ./... -``` - -At this point, `client-go`'s dependencies have been placed in your $GOPATH, but -if you were to build, `client-go` would still see its own copy of its -dependencies in its `vendor` directory. You have two options at this point. - -If you would like to keep dependencies in your own project's vendor directory, -then you can continue like this: - -```sh -cd $GOPATH/src/ -godep save ./... -``` - -Alternatively, if you want to build using the dependencies in your `$GOPATH`, -then `rm -rf vendor/` to remove `client-go`'s copy of its dependencies. - -### Glide - -[Glide](https://github.com/Masterminds/glide) is another popular dependency -management tool for Go. Glide will manage your /vendor directory, but unlike -godep, will not use or modify your $GOPATH (there's no equivalent of -`godep restore` or `godep save`). - -Generally, it's best to avoid Glide's many subcommands, favoring modifying -Glide's manifest file (`glide.yaml`) directly, then running -`glide update --strip-vendor`. First create a `glide.yaml` file at the root of -your project: - -```yaml -package: ( your project's import path ) # e.g. github.com/foo/bar -import: -- package: k8s.io/client-go - version: v6.0.0 -``` - -Second, add a Go file that imports `client-go` somewhere in your project, -otherwise `client-go`'s dependencies will not be added to your project's -vendor/. Then run the following command in the same directory as `glide.yaml`: - -```sh -glide update --strip-vendor -``` - -This can also be abbreviated as: - -```sh -glide up -v -``` - -At this point, `k8s.io/client-go` should be added to your project's vendor/. -`client-go`'s dependencies should be flattened and be added to your project's -vendor/ as well. - -Glide will detect the versions of dependencies `client-go` specified in -`client-go`'s Godep.json file, and automatically set the versions of these -imports in your /vendor directory. It will also record the detected version of -all dependencies in the `glide.lock` file. - -Projects that require a different version of a dependency than `client-go` -requests can override the version manually in `glide.yaml`. For example: - -```yaml -package: ( your project's import path ) # e.g. github.com/foo/bar -import: -- package: k8s.io/client-go - version: v6.0.0 -# Use a newer version of go-spew even though client-go wants an old one. -- package: github.com/davecgh/go-spew - version: v1.1.0 -``` - -After modifying, run `glide up -v` again to re-populate your /vendor directory. - -Optionally, Glide users can also use [`glide-vc`](https://github.com/sgotti/glide-vc) -after running `glide up -v` to remove unused files from /vendor. - -### Dep (Not supported yet!) - -[dep](https://github.com/golang/dep) is an up-and-coming dependency management -tool, which has the goal of being accepted as part of the standard go toolchain. -However, client-go does **NOT** work well with `dep` yet. To support `dep`, we -need to fix at least two issues: -1. publish native `Gopkg.toml` in client-go and other k8s.io repos, like `k8s.io/apimachinery`; -2. find a way to express transitive constraints (see https://github.com/golang/dep/issues/1124). - -As a workaround, which may or may not be worthwhile, you can specify all -client-go dependencies manually as -[override](https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md#override) -in Gopkg.toml with the versions listed in [Godeps.json](./Godeps/Godeps.json), -and manually update them when you upgrade client-go version. - -We are actively working on the two issues blocking using `dep`. For the -meantime, we recommend using `glide` or `godeps`. diff --git a/vendor/k8s.io/client-go/OWNERS b/vendor/k8s.io/client-go/OWNERS deleted file mode 100644 index b3991682..00000000 --- a/vendor/k8s.io/client-go/OWNERS +++ /dev/null @@ -1,15 +0,0 @@ -approvers: -- caesarxuchao -- deads2k -- lavalamp -- liggitt -- smarterclayton -- sttts -reviewers: -- caesarxuchao -- deads2k -- lavalamp -- liggitt -- soltysh -- sttts -- yliaog diff --git a/vendor/k8s.io/client-go/README.md b/vendor/k8s.io/client-go/README.md deleted file mode 100644 index 4e5e4220..00000000 --- a/vendor/k8s.io/client-go/README.md +++ /dev/null @@ -1,192 +0,0 @@ -# client-go - -Go clients for talking to a [kubernetes](http://kubernetes.io/) cluster. - -We currently recommend using the v7.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. - -[![BuildStatus Widget]][BuildStatus Result] -[![GoReport Widget]][GoReport Status] -[![GoDocWidget]][GoDocReference] - -[BuildStatus Result]: https://travis-ci.org/kubernetes/client-go -[BuildStatus Widget]: https://travis-ci.org/kubernetes/client-go.svg?branch=master - -[GoReport Status]: https://goreportcard.com/report/github.com/kubernetes/client-go -[GoReport Widget]: https://goreportcard.com/badge/github.com/kubernetes/client-go - -[GoDocWidget]: https://godoc.org/k8s.io/client-go?status.svg -[GoDocReference]:https://godoc.org/k8s.io/client-go - -## Table of Contents - -- [What's included](#whats-included) -- [Versioning](#versioning) - - [Compatibility: your code <-> client-go](#compatibility-your-code---client-go) - - [Compatibility: client-go <-> Kubernetes clusters](#compatibility-client-go---kubernetes-clusters) - - [Compatibility matrix](#compatibility-matrix) - - [Why do the 1.4 and 1.5 branch contain top-level folder named after the version?](#why-do-the-14-and-15-branch-contain-top-level-folder-named-after-the-version) -- [Kubernetes tags](#kubernetes-tags) -- [How to get it](#how-to-get-it) -- [How to use it](#how-to-use-it) -- [Dependency management](#dependency-management) -- [Contributing code](#contributing-code) - -### What's included - -* The `kubernetes` package contains the clientset to access Kubernetes API. -* The `discovery` package is used to discover APIs supported by a Kubernetes API server. -* The `dynamic` package contains a dynamic client that can perform generic operations on arbitrary Kubernetes API objects. -* The `transport` package is used to set up auth and start a connection. -* The `tools/cache` package is useful for writing controllers. - -### Versioning - -`client-go` follows [semver](http://semver.org/). We will not make -backwards-incompatible changes without incrementing the major version number. A -change is backwards-incompatible either if it *i)* changes the public interfaces -of `client-go`, or *ii)* makes `client-go` incompatible with otherwise supported -versions of Kubernetes clusters. - -Changes that add features in a backwards-compatible way will result in bumping -the minor version (second digit) number. - -Bugfixes will result in the patch version (third digit) changing. PRs that are -cherry-picked into an older Kubernetes release branch will result in an update -to the corresponding branch in `client-go`, with a corresponding new tag -changing the patch version. - -A consequence of this is that `client-go` version numbers will be unrelated to -Kubernetes version numbers. - -#### Branches and tags. - -We will create a new branch and tag for each increment in the major version number or -minor version number. We will create only a new tag for each increment in the patch -version number. See [semver](http://semver.org/) for definitions of major, -minor, and patch. - -The master branch will track HEAD in the main Kubernetes repo and -accumulate changes. Consider HEAD to have the version `x.(y+1).0-alpha` or -`(x+1).0.0-alpha` (depending on whether it has accumulated a breaking change or -not), where `x` and `y` are the current major and minor versions. - -#### Compatibility: your code <-> client-go - -`client-go` follows [semver](http://semver.org/), so until the major version of -client-go gets increased, your code will compile and will continue to work with -explicitly supported versions of Kubernetes clusters. You must use a dependency -management system and pin a specific major version of `client-go` to get this -benefit, as HEAD follows the upstream Kubernetes repo. - -#### Compatibility: client-go <-> Kubernetes clusters - -Since Kubernetes is backwards compatible with clients, older `client-go` -versions will work with many different Kubernetes cluster versions. - -We will backport bugfixes--but not new features--into older versions of -`client-go`. - - -#### Compatibility matrix - -| | Kubernetes 1.4 | Kubernetes 1.5 | Kubernetes 1.6 | Kubernetes 1.7 | Kubernetes 1.8 | Kubernetes 1.9 | Kubernetes 1.10 | -|---------------------|----------------|----------------|----------------|----------------|----------------|----------------|-----------------| -| 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 7.0 | +- | +- | +- | +- | +- | +- | ✓ | -| client-go HEAD | +- | +- | +- | +- | +- | + | + | - -Key: - -* `✓` Exactly the same features / API objects in both client-go and the Kubernetes - version. -* `+` client-go has features or API objects that may not be present in the - Kubernetes cluster, either due to that client-go has additional new API, or - that the server has removed old API. However, everything they have in - common (i.e., most APIs) will work. Please note that alpha APIs may vanish or - change significantly in a single release. -* `-` The Kubernetes cluster has features the client-go library can't use, - either due to the server has additional new API, or that client-go has - removed old API. However, everything they share in common (i.e., most APIs) - will work. - -See the [CHANGELOG](./CHANGELOG.md) for a detailed description of changes -between client-go versions. - -| Branch | Canonical source code location | Maintenance status | -|----------------|--------------------------------------|-------------------------------| -| client-go 1.4 | Kubernetes main repo, 1.4 branch | = - | -| 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 6.0 | Kubernetes main repo, 1.9 branch | ✓ | -| client-go 7.0 | Kubernetes main repo, 1.10 branch | ✓ | -| client-go HEAD | Kubernetes main repo, master branch | ✓ | - -Key: - -* `✓` Changes in main Kubernetes repo are actively published to client-go by a bot -* `=` Maintenance is manual, only severe security bugs will be patched. -* `-` Deprecated; please upgrade. - -#### Deprecation policy - -We will maintain branches for at least six months after their first stable tag -is cut. (E.g., the clock for the release-2.0 branch started ticking when we -tagged v2.0.0, not when we made the first alpha.) This policy applies to -every version greater than or equal to 2.0. - -#### Why do the 1.4 and 1.5 branch contain top-level folder named after the version? - -For the initial release of client-go, we thought it would be easiest to keep -separate directories for each minor version. That soon proved to be a mistake. -We are keeping the top-level folders in the 1.4 and 1.5 branches so that -existing users won't be broken. - -### Kubernetes tags - -As of April 2018, client-go 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 -version tags to client-go, prefixed with "kubernetes-". For example, if you check -out the `kubernetes-v1.8.0` tag in client-go, the code you get is exactly the -same as if you check out the `v1.8.0` tag in kubernetes, and change directory to -`staging/src/k8s.io/client-go`. The purpose is to let users quickly find matching -commits among published repos, like -[sample-apiserver](https://github.com/kubernetes/sample-apiserver), -[apiextension-apiserver](https://github.com/kubernetes/apiextensions-apiserver), -etc. The Kubernetes version tag does NOT claim any backwards compatibility -guarantees for client-go. Please check the [semantic versions](#versioning) if -you care about backwards compatibility. - -### How to get it - -You can use `go get k8s.io/client-go/...` to get client-go, but **you will get -the unstable master branch** and `client-go`'s vendored dependencies will not be -added to your `$GOPATH`. So we think most users will want to use a dependency -management system. See [INSTALL.md](/INSTALL.md) for detailed instructions. - -### How to use it - -If your application runs in a Pod in the cluster, please refer to the -in-cluster [example](examples/in-cluster-client-configuration), otherwise please -refer to the out-of-cluster [example](examples/out-of-cluster-client-configuration). - -### Dependency management - -If your application depends on a package that client-go depends on, and you let the Go compiler find the dependency in `GOPATH`, you will end up with duplicated dependencies: one copy from the `GOPATH`, and one from the vendor folder of client-go. This will cause unexpected runtime error like flag redefinition, since the go compiler ends up importing both packages separately, even if they are exactly the same thing. If this happens, you can either -* run `godep restore` ([godep](https://github.com/tools/godep)) in the client-go/ folder, then remove the vendor folder of client-go. Then the packages in your GOPATH will be the only copy -* or run `godep save` in your application folder to flatten all dependencies. - -### Contributing code -Please send pull requests against the client packages in the Kubernetes main [repository](https://github.com/kubernetes/kubernetes). Changes in the staging area will be published to this repository every day. diff --git a/vendor/k8s.io/client-go/SECURITY_CONTACTS b/vendor/k8s.io/client-go/SECURITY_CONTACTS deleted file mode 100644 index 0648a8eb..00000000 --- a/vendor/k8s.io/client-go/SECURITY_CONTACTS +++ /dev/null @@ -1,17 +0,0 @@ -# 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/vendor/k8s.io/client-go/code-of-conduct.md b/vendor/k8s.io/client-go/code-of-conduct.md deleted file mode 100644 index 0d15c00c..00000000 --- a/vendor/k8s.io/client-go/code-of-conduct.md +++ /dev/null @@ -1,3 +0,0 @@ -# Kubernetes Community Code of Conduct - -Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) diff --git a/vendor/k8s.io/client-go/discovery/cached_discovery_test.go b/vendor/k8s.io/client-go/discovery/cached_discovery_test.go deleted file mode 100644 index 278931c2..00000000 --- a/vendor/k8s.io/client-go/discovery/cached_discovery_test.go +++ /dev/null @@ -1,169 +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 ( - "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/vendor/k8s.io/client-go/discovery/discovery_client_test.go b/vendor/k8s.io/client-go/discovery/discovery_client_test.go deleted file mode 100644 index 10e49432..00000000 --- a/vendor/k8s.io/client-go/discovery/discovery_client_test.go +++ /dev/null @@ -1,882 +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 discovery - -import ( - "encoding/json" - "fmt" - "mime" - "net/http" - "net/http/httptest" - "reflect" - "testing" - - "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" - restclient "k8s.io/client-go/rest" -) - -func TestGetServerVersion(t *testing.T) { - expect := version.Info{ - Major: "foo", - Minor: "bar", - GitCommit: "baz", - } - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - output, err := json.Marshal(expect) - if err != nil { - t.Errorf("unexpected encoding error: %v", err) - return - } - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusOK) - w.Write(output) - })) - defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) - - got, err := client.ServerVersion() - if err != nil { - t.Fatalf("unexpected encoding error: %v", err) - } - if e, a := expect, *got; !reflect.DeepEqual(e, a) { - t.Errorf("expected %v, got %v", e, a) - } -} - -func TestGetServerGroupsWithV1Server(t *testing.T) { - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - var obj interface{} - switch req.URL.Path { - case "/api": - obj = &metav1.APIVersions{ - Versions: []string{ - "v1", - }, - } - case "/apis": - obj = &metav1.APIGroupList{ - Groups: []metav1.APIGroup{ - { - Name: "extensions", - Versions: []metav1.GroupVersionForDiscovery{ - {GroupVersion: "extensions/v1beta1"}, - }, - }, - }, - } - default: - w.WriteHeader(http.StatusNotFound) - return - } - output, err := json.Marshal(obj) - if err != nil { - t.Fatalf("unexpected encoding error: %v", err) - return - } - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusOK) - w.Write(output) - })) - defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) - // ServerGroups should not return an error even if server returns error at /api and /apis - apiGroupList, err := client.ServerGroups() - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - groupVersions := metav1.ExtractGroupVersions(apiGroupList) - if !reflect.DeepEqual(groupVersions, []string{"v1", "extensions/v1beta1"}) { - t.Errorf("expected: %q, got: %q", []string{"v1", "extensions/v1beta1"}, groupVersions) - } -} - -func TestGetServerGroupsWithBrokenServer(t *testing.T) { - for _, statusCode := range []int{http.StatusNotFound, http.StatusForbidden} { - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - w.WriteHeader(statusCode) - })) - defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) - // ServerGroups should not return an error even if server returns Not Found or Forbidden error at all end points - apiGroupList, err := client.ServerGroups() - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - groupVersions := metav1.ExtractGroupVersions(apiGroupList) - if len(groupVersions) != 0 { - t.Errorf("expected empty list, got: %q", groupVersions) - } - } -} - -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{} - switch req.URL.Path { - case "/api": - obj = &metav1.APIVersions{ - Versions: []string{ - "v1", - }, - } - default: - w.WriteHeader(http.StatusNotFound) - return - } - output, err := json.Marshal(obj) - if err != nil { - t.Errorf("unexpected encoding error: %v", err) - return - } - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusOK) - w.Write(output) - })) - defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) - // ServerResources should not return an error even if server returns error at /api/v1. - serverResources, err := client.ServerResources() - if err != nil { - t.Errorf("unexpected error: %v", err) - } - gvs := groupVersions(serverResources) - if !sets.NewString(gvs...).Has("v1") { - t.Errorf("missing v1 in resource list: %v", serverResources) - } -} - -func TestGetServerResources(t *testing.T) { - stable := metav1.APIResourceList{ - GroupVersion: "v1", - APIResources: []metav1.APIResource{ - {Name: "pods", Namespaced: true, Kind: "Pod"}, - {Name: "services", Namespaced: true, Kind: "Service"}, - {Name: "namespaces", Namespaced: false, Kind: "Namespace"}, - }, - } - beta := metav1.APIResourceList{ - GroupVersion: "extensions/v1beta1", - APIResources: []metav1.APIResource{ - {Name: "deployments", Namespaced: true, Kind: "Deployment"}, - {Name: "ingresses", Namespaced: true, Kind: "Ingress"}, - {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 - request string - expectErr bool - }{ - { - resourcesList: &stable, - path: "/api/v1", - request: "v1", - expectErr: false, - }, - { - resourcesList: &beta, - path: "/apis/extensions/v1beta1", - request: "extensions/v1beta1", - expectErr: false, - }, - { - resourcesList: &stable, - path: "/api/v1", - request: "foobar", - expectErr: true, - }, - } - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - var list interface{} - switch req.URL.Path { - case "/api/v1": - list = &stable - case "/apis/extensions/v1beta1": - list = &beta - case "/apis/extensions/v1beta2": - list = &beta2 - case "/api": - list = &metav1.APIVersions{ - Versions: []string{ - "v1", - }, - } - case "/apis": - list = &metav1.APIGroupList{ - Groups: []metav1.APIGroup{ - { - Name: "extensions", - Versions: []metav1.GroupVersionForDiscovery{ - {GroupVersion: "extensions/v1beta1", Version: "v1beta1"}, - {GroupVersion: "extensions/v1beta2", Version: "v1beta2"}, - }, - }, - }, - } - default: - t.Logf("unexpected request: %s", req.URL.Path) - w.WriteHeader(http.StatusNotFound) - return - } - output, err := json.Marshal(list) - if err != nil { - t.Errorf("unexpected encoding error: %v", err) - return - } - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusOK) - w.Write(output) - })) - defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) - for _, test := range tests { - got, err := client.ServerResourcesForGroupVersion(test.request) - if test.expectErr { - if err == nil { - t.Error("unexpected non-error") - } - continue - } - if err != nil { - t.Errorf("unexpected error: %v", err) - continue - } - if !reflect.DeepEqual(got, test.resourcesList) { - t.Errorf("expected:\n%v\ngot:\n%v\n", test.resourcesList, got) - } - } - - serverResources, err := client.ServerResources() - if err != nil { - t.Errorf("unexpected error: %v", err) - } - 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)) - } -} - -var returnedOpenAPI = openapi_v2.Document{ - Definitions: &openapi_v2.Definitions{ - AdditionalProperties: []*openapi_v2.NamedSchema{ - { - Name: "fake.type.1", - Value: &openapi_v2.Schema{ - Properties: &openapi_v2.Properties{ - AdditionalProperties: []*openapi_v2.NamedSchema{ - { - Name: "count", - Value: &openapi_v2.Schema{ - Type: &openapi_v2.TypeItem{ - Value: []string{"integer"}, - }, - }, - }, - }, - }, - }, - }, - { - Name: "fake.type.2", - Value: &openapi_v2.Schema{ - Properties: &openapi_v2.Properties{ - AdditionalProperties: []*openapi_v2.NamedSchema{ - { - Name: "count", - Value: &openapi_v2.Schema{ - Type: &openapi_v2.TypeItem{ - Value: []string{"array"}, - }, - Items: &openapi_v2.ItemsItem{ - Schema: []*openapi_v2.Schema{ - { - Type: &openapi_v2.TypeItem{ - Value: []string{"string"}, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, -} - -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) - } - if req.Method != "GET" { - sErr = fmt.Errorf("Unexpected method %v", req.Method) - } - - 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 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 { - 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 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", - APIResources: []metav1.APIResource{ - {Name: "pods", Namespaced: true, Kind: "Pod"}, - {Name: "services", Namespaced: true, Kind: "Service"}, - {Name: "namespaces", Namespaced: false, Kind: "Namespace"}, - }, - } - tests := []struct { - resourcesList []*metav1.APIResourceList - response func(w http.ResponseWriter, req *http.Request) - expectErr func(err error) bool - }{ - { - resourcesList: []*metav1.APIResourceList{&stable}, - expectErr: IsGroupDiscoveryFailedError, - response: func(w http.ResponseWriter, req *http.Request) { - var list interface{} - switch req.URL.Path { - case "/apis/extensions/v1beta1": - w.WriteHeader(http.StatusInternalServerError) - return - case "/api/v1": - list = &stable - case "/api": - list = &metav1.APIVersions{ - Versions: []string{ - "v1", - }, - } - case "/apis": - list = &metav1.APIGroupList{ - Groups: []metav1.APIGroup{ - { - Versions: []metav1.GroupVersionForDiscovery{ - {GroupVersion: "extensions/v1beta1"}, - }, - }, - }, - } - default: - t.Logf("unexpected request: %s", req.URL.Path) - w.WriteHeader(http.StatusNotFound) - return - } - output, err := json.Marshal(list) - if err != nil { - t.Errorf("unexpected encoding error: %v", err) - return - } - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusOK) - w.Write(output) - }, - }, - { - resourcesList: nil, - expectErr: IsGroupDiscoveryFailedError, - response: func(w http.ResponseWriter, req *http.Request) { - var list interface{} - switch req.URL.Path { - case "/apis/extensions/v1beta1": - w.WriteHeader(http.StatusInternalServerError) - return - case "/api/v1": - w.WriteHeader(http.StatusInternalServerError) - case "/api": - list = &metav1.APIVersions{ - Versions: []string{ - "v1", - }, - } - case "/apis": - list = &metav1.APIGroupList{ - Groups: []metav1.APIGroup{ - { - Versions: []metav1.GroupVersionForDiscovery{ - {GroupVersion: "extensions/v1beta1"}, - }, - }, - }, - } - default: - t.Logf("unexpected request: %s", req.URL.Path) - w.WriteHeader(http.StatusNotFound) - return - } - output, err := json.Marshal(list) - if err != nil { - t.Errorf("unexpected encoding error: %v", err) - return - } - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusOK) - w.Write(output) - }, - }, - } - for _, test := range tests { - server := httptest.NewServer(http.HandlerFunc(test.response)) - defer server.Close() - - client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) - resources, err := client.ServerPreferredResources() - if test.expectErr != nil { - if err == nil { - t.Error("unexpected non-error") - } - - continue - } - if err != nil { - t.Errorf("unexpected error: %v", err) - continue - } - got, err := GroupVersionResources(resources) - if err != nil { - t.Errorf("unexpected error: %v", err) - continue - } - expected, _ := GroupVersionResources(test.resourcesList) - if !reflect.DeepEqual(got, expected) { - t.Errorf("expected:\n%v\ngot:\n%v\n", test.resourcesList, got) - } - server.Close() - } -} - -func TestServerPreferredResourcesRetries(t *testing.T) { - stable := metav1.APIResourceList{ - GroupVersion: "v1", - APIResources: []metav1.APIResource{ - {Name: "pods", Namespaced: true, Kind: "Pod"}, - }, - } - beta := metav1.APIResourceList{ - GroupVersion: "extensions/v1", - APIResources: []metav1.APIResource{ - {Name: "deployments", Namespaced: true, Kind: "Deployment"}, - }, - } - - response := func(numErrors int) http.HandlerFunc { - var i = 0 - return func(w http.ResponseWriter, req *http.Request) { - var list interface{} - switch req.URL.Path { - case "/apis/extensions/v1beta1": - if i < numErrors { - i++ - w.WriteHeader(http.StatusInternalServerError) - return - } - list = &beta - case "/api/v1": - list = &stable - case "/api": - list = &metav1.APIVersions{ - Versions: []string{ - "v1", - }, - } - case "/apis": - list = &metav1.APIGroupList{ - Groups: []metav1.APIGroup{ - { - Name: "extensions", - Versions: []metav1.GroupVersionForDiscovery{ - {GroupVersion: "extensions/v1beta1", Version: "v1beta1"}, - }, - PreferredVersion: metav1.GroupVersionForDiscovery{ - GroupVersion: "extensions/v1beta1", - Version: "v1beta1", - }, - }, - }, - } - default: - t.Logf("unexpected request: %s", req.URL.Path) - w.WriteHeader(http.StatusNotFound) - return - } - output, err := json.Marshal(list) - if err != nil { - t.Errorf("unexpected encoding error: %v", err) - return - } - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusOK) - w.Write(output) - } - } - tests := []struct { - responseErrors int - expectResources int - expectedError func(err error) bool - }{ - { - responseErrors: 1, - expectResources: 2, - expectedError: func(err error) bool { - return err == nil - }, - }, - { - responseErrors: 2, - expectResources: 1, - expectedError: IsGroupDiscoveryFailedError, - }, - } - - for i, tc := range tests { - server := httptest.NewServer(http.HandlerFunc(response(tc.responseErrors))) - defer server.Close() - - client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) - resources, err := client.ServerPreferredResources() - if !tc.expectedError(err) { - t.Errorf("case %d: unexpected error: %v", i, err) - } - got, err := GroupVersionResources(resources) - if err != nil { - t.Errorf("case %d: unexpected error: %v", i, err) - } - if len(got) != tc.expectResources { - t.Errorf("case %d: expect %d resources, got %#v", i, tc.expectResources, got) - } - server.Close() - } -} - -func TestServerPreferredNamespacedResources(t *testing.T) { - stable := metav1.APIResourceList{ - GroupVersion: "v1", - APIResources: []metav1.APIResource{ - {Name: "pods", Namespaced: true, Kind: "Pod"}, - {Name: "services", Namespaced: true, Kind: "Service"}, - {Name: "namespaces", Namespaced: false, Kind: "Namespace"}, - }, - } - batchv1 := metav1.APIResourceList{ - GroupVersion: "batch/v1", - APIResources: []metav1.APIResource{ - {Name: "jobs", Namespaced: true, Kind: "Job"}, - }, - } - batchv2alpha1 := metav1.APIResourceList{ - GroupVersion: "batch/v2alpha1", - APIResources: []metav1.APIResource{ - {Name: "jobs", Namespaced: true, Kind: "Job"}, - {Name: "cronjobs", Namespaced: true, Kind: "CronJob"}, - }, - } - batchv3alpha1 := metav1.APIResourceList{ - GroupVersion: "batch/v3alpha1", - APIResources: []metav1.APIResource{ - {Name: "jobs", Namespaced: true, Kind: "Job"}, - {Name: "cronjobs", Namespaced: true, Kind: "CronJob"}, - }, - } - tests := []struct { - response func(w http.ResponseWriter, req *http.Request) - expected map[schema.GroupVersionResource]struct{} - }{ - { - response: func(w http.ResponseWriter, req *http.Request) { - var list interface{} - switch req.URL.Path { - case "/api/v1": - list = &stable - case "/api": - list = &metav1.APIVersions{ - Versions: []string{ - "v1", - }, - } - default: - t.Logf("unexpected request: %s", req.URL.Path) - w.WriteHeader(http.StatusNotFound) - return - } - output, err := json.Marshal(list) - if err != nil { - t.Errorf("unexpected encoding error: %v", err) - return - } - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusOK) - w.Write(output) - }, - expected: map[schema.GroupVersionResource]struct{}{ - {Group: "", Version: "v1", Resource: "pods"}: {}, - {Group: "", Version: "v1", Resource: "services"}: {}, - }, - }, - { - response: func(w http.ResponseWriter, req *http.Request) { - var list interface{} - switch req.URL.Path { - case "/apis": - list = &metav1.APIGroupList{ - Groups: []metav1.APIGroup{ - { - Name: "batch", - Versions: []metav1.GroupVersionForDiscovery{ - {GroupVersion: "batch/v1", Version: "v1"}, - {GroupVersion: "batch/v2alpha1", Version: "v2alpha1"}, - {GroupVersion: "batch/v3alpha1", Version: "v3alpha1"}, - }, - PreferredVersion: metav1.GroupVersionForDiscovery{GroupVersion: "batch/v1", Version: "v1"}, - }, - }, - } - case "/apis/batch/v1": - list = &batchv1 - case "/apis/batch/v2alpha1": - list = &batchv2alpha1 - case "/apis/batch/v3alpha1": - list = &batchv3alpha1 - default: - t.Logf("unexpected request: %s", req.URL.Path) - w.WriteHeader(http.StatusNotFound) - return - } - output, err := json.Marshal(list) - if err != nil { - t.Errorf("unexpected encoding error: %v", err) - return - } - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusOK) - w.Write(output) - }, - expected: map[schema.GroupVersionResource]struct{}{ - {Group: "batch", Version: "v1", Resource: "jobs"}: {}, - {Group: "batch", Version: "v2alpha1", Resource: "cronjobs"}: {}, - }, - }, - { - response: func(w http.ResponseWriter, req *http.Request) { - var list interface{} - switch req.URL.Path { - case "/apis": - list = &metav1.APIGroupList{ - Groups: []metav1.APIGroup{ - { - Name: "batch", - Versions: []metav1.GroupVersionForDiscovery{ - {GroupVersion: "batch/v1", Version: "v1"}, - {GroupVersion: "batch/v2alpha1", Version: "v2alpha1"}, - {GroupVersion: "batch/v3alpha1", Version: "v3alpha1"}, - }, - PreferredVersion: metav1.GroupVersionForDiscovery{GroupVersion: "batch/v2alpha", Version: "v2alpha1"}, - }, - }, - } - case "/apis/batch/v1": - list = &batchv1 - case "/apis/batch/v2alpha1": - list = &batchv2alpha1 - case "/apis/batch/v3alpha1": - list = &batchv3alpha1 - default: - t.Logf("unexpected request: %s", req.URL.Path) - w.WriteHeader(http.StatusNotFound) - return - } - output, err := json.Marshal(list) - if err != nil { - t.Errorf("unexpected encoding error: %v", err) - return - } - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusOK) - w.Write(output) - }, - expected: map[schema.GroupVersionResource]struct{}{ - {Group: "batch", Version: "v2alpha1", Resource: "jobs"}: {}, - {Group: "batch", Version: "v2alpha1", Resource: "cronjobs"}: {}, - }, - }, - } - for i, test := range tests { - server := httptest.NewServer(http.HandlerFunc(test.response)) - defer server.Close() - - client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) - resources, err := client.ServerPreferredNamespacedResources() - if err != nil { - t.Errorf("[%d] unexpected error: %v", i, err) - continue - } - got, err := GroupVersionResources(resources) - if err != nil { - t.Errorf("[%d] unexpected error: %v", i, err) - continue - } - - if !reflect.DeepEqual(got, test.expected) { - t.Errorf("[%d] expected:\n%v\ngot:\n%v\n", i, test.expected, got) - } - server.Close() - } -} - -func groupVersions(resources []*metav1.APIResourceList) []string { - result := []string{} - for _, resourceList := range resources { - result = append(result, resourceList.GroupVersion) - } - return result -} diff --git a/vendor/k8s.io/client-go/discovery/fake/discovery_test.go b/vendor/k8s.io/client-go/discovery/fake/discovery_test.go deleted file mode 100644 index cfdcf1a2..00000000 --- a/vendor/k8s.io/client-go/discovery/fake/discovery_test.go +++ /dev/null @@ -1,46 +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_test - -import ( - "testing" - - "k8s.io/apimachinery/pkg/version" - fakediscovery "k8s.io/client-go/discovery/fake" - fakeclientset "k8s.io/client-go/kubernetes/fake" -) - -func TestFakingServerVersion(t *testing.T) { - client := fakeclientset.NewSimpleClientset() - fakeDiscovery, ok := client.Discovery().(*fakediscovery.FakeDiscovery) - if !ok { - t.Fatalf("couldn't convert Discovery() to *FakeDiscovery") - } - - testGitCommit := "v1.0.0" - fakeDiscovery.FakedServerVersion = &version.Info{ - GitCommit: testGitCommit, - } - - sv, err := client.Discovery().ServerVersion() - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if sv.GitCommit != testGitCommit { - t.Fatalf("unexpected faked discovery return value: %q", sv.GitCommit) - } -} diff --git a/vendor/k8s.io/client-go/discovery/helper_blackbox_test.go b/vendor/k8s.io/client-go/discovery/helper_blackbox_test.go deleted file mode 100644 index 9cd85cb1..00000000 --- a/vendor/k8s.io/client-go/discovery/helper_blackbox_test.go +++ /dev/null @@ -1,184 +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 discovery_test - -import ( - "bytes" - "encoding/json" - "errors" - "io" - "io/ioutil" - "net/http" - "strings" - "testing" - - "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/sets" - "k8s.io/client-go/discovery" - "k8s.io/client-go/kubernetes/scheme" - restclient "k8s.io/client-go/rest" - "k8s.io/client-go/rest/fake" -) - -func objBody(object interface{}) io.ReadCloser { - output, err := json.MarshalIndent(object, "", "") - if err != nil { - panic(err) - } - return ioutil.NopCloser(bytes.NewReader([]byte(output))) -} - -func TestServerSupportsVersion(t *testing.T) { - tests := []struct { - name string - requiredVersion schema.GroupVersion - serverVersions []string - expectErr func(err error) bool - sendErr error - statusCode int - }{ - { - name: "explicit version supported", - requiredVersion: schema.GroupVersion{Version: "v1"}, - serverVersions: []string{"/version1", v1.SchemeGroupVersion.String()}, - statusCode: http.StatusOK, - }, - { - name: "explicit version not supported on server", - requiredVersion: schema.GroupVersion{Version: "v1"}, - serverVersions: []string{"version1"}, - expectErr: func(err error) bool { return strings.Contains(err.Error(), `server does not support API version "v1"`) }, - statusCode: http.StatusOK, - }, - { - name: "connection refused error", - serverVersions: []string{"version1"}, - sendErr: errors.New("connection refused"), - expectErr: func(err error) bool { return strings.Contains(err.Error(), "connection refused") }, - statusCode: http.StatusOK, - }, - { - name: "discovery fails due to 404 Not Found errors and thus serverVersions is empty, use requested GroupVersion", - requiredVersion: schema.GroupVersion{Version: "version1"}, - statusCode: http.StatusNotFound, - }, - } - - for _, test := range tests { - fakeClient := &fake.RESTClient{ - NegotiatedSerializer: scheme.Codecs, - Resp: &http.Response{ - StatusCode: test.statusCode, - Body: objBody(&metav1.APIVersions{Versions: test.serverVersions}), - }, - Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) { - if test.sendErr != nil { - return nil, test.sendErr - } - header := http.Header{} - header.Set("Content-Type", runtime.ContentTypeJSON) - return &http.Response{StatusCode: test.statusCode, Header: header, Body: objBody(&metav1.APIVersions{Versions: test.serverVersions})}, nil - }), - } - c := discovery.NewDiscoveryClientForConfigOrDie(&restclient.Config{}) - c.RESTClient().(*restclient.RESTClient).Client = fakeClient.Client - err := discovery.ServerSupportsVersion(c, test.requiredVersion) - if err == nil && test.expectErr != nil { - t.Errorf("expected error, got nil for [%s].", test.name) - } - if err != nil { - if test.expectErr == nil || !test.expectErr(err) { - t.Errorf("unexpected error for [%s]: %v.", test.name, err) - } - continue - } - } -} - -func TestFilteredBy(t *testing.T) { - all := discovery.ResourcePredicateFunc(func(gv string, r *metav1.APIResource) bool { - return true - }) - none := discovery.ResourcePredicateFunc(func(gv string, r *metav1.APIResource) bool { - return false - }) - onlyV2 := discovery.ResourcePredicateFunc(func(gv string, r *metav1.APIResource) bool { - return strings.HasSuffix(gv, "/v2") || gv == "v2" - }) - onlyBar := discovery.ResourcePredicateFunc(func(gv string, r *metav1.APIResource) bool { - return r.Kind == "Bar" - }) - - foo := []*metav1.APIResourceList{ - { - GroupVersion: "foo/v1", - APIResources: []metav1.APIResource{ - {Name: "bar", Kind: "Bar"}, - {Name: "test", Kind: "Test"}, - }, - }, - { - GroupVersion: "foo/v2", - APIResources: []metav1.APIResource{ - {Name: "bar", Kind: "Bar"}, - {Name: "test", Kind: "Test"}, - }, - }, - { - GroupVersion: "foo/v3", - APIResources: []metav1.APIResource{}, - }, - } - - tests := []struct { - input []*metav1.APIResourceList - pred discovery.ResourcePredicate - expectedResources []string - }{ - {nil, all, []string{}}, - {[]*metav1.APIResourceList{ - {GroupVersion: "foo/v1"}, - }, all, []string{}}, - {foo, all, []string{"foo/v1.bar", "foo/v1.test", "foo/v2.bar", "foo/v2.test"}}, - {foo, onlyV2, []string{"foo/v2.bar", "foo/v2.test"}}, - {foo, onlyBar, []string{"foo/v1.bar", "foo/v2.bar"}}, - {foo, none, []string{}}, - } - for i, test := range tests { - filtered := discovery.FilteredBy(test.pred, test.input) - - if expected, got := sets.NewString(test.expectedResources...), sets.NewString(stringify(filtered)...); !expected.Equal(got) { - t.Errorf("[%d] unexpected group versions: expected=%v, got=%v", i, test.expectedResources, stringify(filtered)) - } - } -} - -func stringify(rls []*metav1.APIResourceList) []string { - result := []string{} - for _, rl := range rls { - for _, r := range rl.APIResources { - result = append(result, rl.GroupVersion+"."+r.Name) - } - if len(rl.APIResources) == 0 { - result = append(result, rl.GroupVersion) - } - } - return result -} diff --git a/vendor/k8s.io/client-go/discovery/round_tripper_test.go b/vendor/k8s.io/client-go/discovery/round_tripper_test.go deleted file mode 100644 index b15e2e77..00000000 --- a/vendor/k8s.io/client-go/discovery/round_tripper_test.go +++ /dev/null @@ -1,95 +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 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/vendor/k8s.io/client-go/pkg/version/.gitattributes b/vendor/k8s.io/client-go/pkg/version/.gitattributes deleted file mode 100644 index 7e349eff..00000000 --- a/vendor/k8s.io/client-go/pkg/version/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -base.go export-subst diff --git a/vendor/k8s.io/client-go/pkg/version/def.bzl b/vendor/k8s.io/client-go/pkg/version/def.bzl deleted file mode 100644 index 9c018a4e..00000000 --- a/vendor/k8s.io/client-go/pkg/version/def.bzl +++ /dev/null @@ -1,38 +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. - -# 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 - stamp_pkgs = [ - "k8s.io/kubernetes/pkg/version", - # In hack/lib/version.sh, this has a vendor/ prefix. That isn't needed here? - "k8s.io/client-go/pkg/version", - ] - # This should match the list of vars in kube::version::ldflags - # It should also match the list of vars set in hack/print-workspace-status.sh. - stamp_vars = [ - "buildDate", - "gitCommit", - "gitMajor", - "gitMinor", - "gitTreeState", - "gitVersion", - ] - # Generate the cross-product. - x_defs = {} - for pkg in stamp_pkgs: - for var in stamp_vars: - x_defs["%s.%s" % (pkg, var)] = "{%s}" % var - return x_defs diff --git a/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec_test.go b/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec_test.go deleted file mode 100644 index e3398e82..00000000 --- a/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec_test.go +++ /dev/null @@ -1,748 +0,0 @@ -/* -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 -MTI5LjEwNkAxNDIxMzU5MDU4MB4XDTE1MDExNTIyMDEzMVoXDTE2MDExNTIyMDEz -MlowGzEZMBcGA1UEAxMQb3BlbnNoaWZ0LWNsaWVudDCCASIwDQYJKoZIhvcNAQEB -BQADggEPADCCAQoCggEBAKtdhz0+uCLXw5cSYns9rU/XifFSpb/x24WDdrm72S/v -b9BPYsAStiP148buylr1SOuNi8sTAZmlVDDIpIVwMLff+o2rKYDicn9fjbrTxTOj -lI4pHJBH+JU3AJ0tbajupioh70jwFS0oYpwtneg2zcnE2Z4l6mhrj2okrc5Q1/X2 -I2HChtIU4JYTisObtin10QKJX01CLfYXJLa8upWzKZ4/GOcHG+eAV3jXWoXidtjb -1Usw70amoTZ6mIVCkiu1QwCoa8+ycojGfZhvqMsAp1536ZcCul+Na+AbCv4zKS7F -kQQaImVrXdUiFansIoofGlw/JNuoKK6ssVpS5Ic3pgcCAwEAAaM1MDMwDgYDVR0P -AQH/BAQDAgCgMBMGA1UdJQQMMAoGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwCwYJ -KoZIhvcNAQELA4IBAQCKLREH7bXtXtZ+8vI6cjD7W3QikiArGqbl36bAhhWsJLp/ -p/ndKz39iFNaiZ3GlwIURWOOKx3y3GA0x9m8FR+Llthf0EQ8sUjnwaknWs0Y6DQ3 -jjPFZOpV3KPCFrdMJ3++E3MgwFC/Ih/N2ebFX9EcV9Vcc6oVWMdwT0fsrhu683rq -6GSR/3iVX1G/pmOiuaR0fNUaCyCfYrnI4zHBDgSfnlm3vIvN2lrsR/DQBakNL8DJ -HBgKxMGeUPoneBv+c8DMXIL0EhaFXRlBv9QW45/GiAIOuyFJ0i6hCtGZpJjq4OpQ -BRjCI+izPzFTjsxD4aORE+WOkyWFCGPWKfNejfw0 ------END CERTIFICATE-----`) - keyData = []byte(`-----BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEAq12HPT64ItfDlxJiez2tT9eJ8VKlv/HbhYN2ubvZL+9v0E9i -wBK2I/Xjxu7KWvVI642LyxMBmaVUMMikhXAwt9/6jaspgOJyf1+NutPFM6OUjikc -kEf4lTcAnS1tqO6mKiHvSPAVLShinC2d6DbNycTZniXqaGuPaiStzlDX9fYjYcKG -0hTglhOKw5u2KfXRAolfTUIt9hcktry6lbMpnj8Y5wcb54BXeNdaheJ22NvVSzDv -RqahNnqYhUKSK7VDAKhrz7JyiMZ9mG+oywCnXnfplwK6X41r4BsK/jMpLsWRBBoi -ZWtd1SIVqewiih8aXD8k26gorqyxWlLkhzemBwIDAQABAoIBAD2XYRs3JrGHQUpU -FkdbVKZkvrSY0vAZOqBTLuH0zUv4UATb8487anGkWBjRDLQCgxH+jucPTrztekQK -aW94clo0S3aNtV4YhbSYIHWs1a0It0UdK6ID7CmdWkAj6s0T8W8lQT7C46mWYVLm -5mFnCTHi6aB42jZrqmEpC7sivWwuU0xqj3Ml8kkxQCGmyc9JjmCB4OrFFC8NNt6M -ObvQkUI6Z3nO4phTbpxkE1/9dT0MmPIF7GhHVzJMS+EyyRYUDllZ0wvVSOM3qZT0 -JMUaBerkNwm9foKJ1+dv2nMKZZbJajv7suUDCfU44mVeaEO+4kmTKSGCGjjTBGkr -7L1ySDECgYEA5ElIMhpdBzIivCuBIH8LlUeuzd93pqssO1G2Xg0jHtfM4tz7fyeI -cr90dc8gpli24dkSxzLeg3Tn3wIj/Bu64m2TpZPZEIlukYvgdgArmRIPQVxerYey -OkrfTNkxU1HXsYjLCdGcGXs5lmb+K/kuTcFxaMOs7jZi7La+jEONwf8CgYEAwCs/ -rUOOA0klDsWWisbivOiNPII79c9McZCNBqncCBfMUoiGe8uWDEO4TFHN60vFuVk9 -8PkwpCfvaBUX+ajvbafIfHxsnfk1M04WLGCeqQ/ym5Q4sQoQOcC1b1y9qc/xEWfg -nIUuia0ukYRpl7qQa3tNg+BNFyjypW8zukUAC/kCgYB1/Kojuxx5q5/oQVPrx73k -2bevD+B3c+DYh9MJqSCNwFtUpYIWpggPxoQan4LwdsmO0PKzocb/ilyNFj4i/vII -NToqSc/WjDFpaDIKyuu9oWfhECye45NqLWhb/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/vendor/k8s.io/client-go/rest/OWNERS b/vendor/k8s.io/client-go/rest/OWNERS deleted file mode 100755 index 8d97da00..00000000 --- a/vendor/k8s.io/client-go/rest/OWNERS +++ /dev/null @@ -1,24 +0,0 @@ -reviewers: -- thockin -- smarterclayton -- caesarxuchao -- wojtek-t -- deads2k -- brendandburns -- liggitt -- nikhiljindal -- gmarek -- erictune -- sttts -- luxas -- dims -- errordeveloper -- hongchaodeng -- krousey -- resouer -- cjcullen -- rmmh -- lixiaobing10051267 -- asalkeld -- juanvallejo -- lojies diff --git a/vendor/k8s.io/client-go/rest/client_test.go b/vendor/k8s.io/client-go/rest/client_test.go deleted file mode 100644 index 2eae9be2..00000000 --- a/vendor/k8s.io/client-go/rest/client_test.go +++ /dev/null @@ -1,343 +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 ( - "net/http" - "net/http/httptest" - "net/url" - "os" - "reflect" - "testing" - "time" - - "fmt" - - "k8s.io/api/core/v1" - v1beta1 "k8s.io/api/extensions/v1beta1" - "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/types" - "k8s.io/apimachinery/pkg/util/diff" - "k8s.io/client-go/kubernetes/scheme" - utiltesting "k8s.io/client-go/util/testing" -) - -type TestParam struct { - actualError error - expectingError bool - actualCreated bool - expCreated bool - expStatus *metav1.Status - testBody bool - testBodyErrorIsNotNil bool -} - -// TestSerializer makes sure that you're always able to decode metav1.Status -func TestSerializer(t *testing.T) { - gv := v1beta1.SchemeGroupVersion - contentConfig := ContentConfig{ - ContentType: "application/json", - GroupVersion: &gv, - NegotiatedSerializer: serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}, - } - - serializer, err := createSerializers(contentConfig) - if err != nil { - t.Fatal(err) - } - // bytes based on actual return from API server when encoding an "unversioned" object - obj, err := runtime.Decode(serializer.Decoder, []byte(`{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Success"}`)) - t.Log(obj) - if err != nil { - t.Fatal(err) - } -} - -func TestDoRequestSuccess(t *testing.T) { - testServer, fakeHandler, status := testServerEnv(t, 200) - defer testServer.Close() - - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - body, err := c.Get().Prefix("test").Do().Raw() - - testParam := TestParam{actualError: err, expectingError: false, expCreated: true, - expStatus: status, testBody: true, testBodyErrorIsNotNil: false} - validate(testParam, t, body, fakeHandler) -} - -func TestDoRequestFailed(t *testing.T) { - status := &metav1.Status{ - Code: http.StatusNotFound, - Status: metav1.StatusFailure, - Reason: metav1.StatusReasonNotFound, - Message: " \"\" not found", - Details: &metav1.StatusDetails{}, - } - expectedBody, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), status) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 404, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - err = c.Get().Do().Error() - if err == nil { - t.Errorf("unexpected non-error") - } - ss, ok := err.(errors.APIStatus) - if !ok { - t.Errorf("unexpected error type %v", err) - } - actual := ss.Status() - if !reflect.DeepEqual(status, &actual) { - t.Errorf("Unexpected mis-match: %s", diff.ObjectReflectDiff(status, &actual)) - } -} - -func TestDoRawRequestFailed(t *testing.T) { - status := &metav1.Status{ - Code: http.StatusNotFound, - Status: metav1.StatusFailure, - Reason: metav1.StatusReasonNotFound, - Message: "the server could not find the requested resource", - Details: &metav1.StatusDetails{ - Causes: []metav1.StatusCause{ - {Type: metav1.CauseTypeUnexpectedServerResponse, Message: "unknown"}, - }, - }, - } - expectedBody, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), status) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 404, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - body, err := c.Get().Do().Raw() - - if err == nil || body == nil { - t.Errorf("unexpected non-error: %#v", body) - } - ss, ok := err.(errors.APIStatus) - if !ok { - t.Errorf("unexpected error type %v", err) - } - actual := ss.Status() - if !reflect.DeepEqual(status, &actual) { - t.Errorf("Unexpected mis-match: %s", diff.ObjectReflectDiff(status, &actual)) - } -} - -func TestDoRequestCreated(t *testing.T) { - testServer, fakeHandler, status := testServerEnv(t, 201) - defer testServer.Close() - - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - created := false - body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() - - testParam := TestParam{actualError: err, expectingError: false, expCreated: true, - expStatus: status, testBody: false} - validate(testParam, t, body, fakeHandler) -} - -func TestDoRequestNotCreated(t *testing.T) { - testServer, fakeHandler, expectedStatus := testServerEnv(t, 202) - defer testServer.Close() - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - created := false - body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() - testParam := TestParam{actualError: err, expectingError: false, expCreated: false, - expStatus: expectedStatus, testBody: false} - validate(testParam, t, body, fakeHandler) -} - -func TestDoRequestAcceptedNoContentReturned(t *testing.T) { - testServer, fakeHandler, _ := testServerEnv(t, 204) - defer testServer.Close() - - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - created := false - body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() - testParam := TestParam{actualError: err, expectingError: false, expCreated: false, - testBody: false} - validate(testParam, t, body, fakeHandler) -} - -func TestBadRequest(t *testing.T) { - testServer, fakeHandler, _ := testServerEnv(t, 400) - defer testServer.Close() - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - created := false - body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() - testParam := TestParam{actualError: err, expectingError: true, expCreated: false, - testBody: true} - validate(testParam, t, body, fakeHandler) -} - -func validate(testParam TestParam, t *testing.T, body []byte, fakeHandler *utiltesting.FakeHandler) { - switch { - case testParam.expectingError && testParam.actualError == nil: - t.Errorf("Expected error") - case !testParam.expectingError && testParam.actualError != nil: - t.Error(testParam.actualError) - } - if !testParam.expCreated { - if testParam.actualCreated { - t.Errorf("Expected object not to be created") - } - } - statusOut, err := runtime.Decode(scheme.Codecs.UniversalDeserializer(), body) - if testParam.testBody { - if testParam.testBodyErrorIsNotNil && err == nil { - t.Errorf("Expected Error") - } - if !testParam.testBodyErrorIsNotNil && err != nil { - t.Errorf("Unexpected Error: %v", err) - } - } - - if testParam.expStatus != nil { - if !reflect.DeepEqual(testParam.expStatus, statusOut) { - t.Errorf("Unexpected mis-match. Expected %#v. Saw %#v", testParam.expStatus, statusOut) - } - } - fakeHandler.ValidateRequest(t, "/"+v1.SchemeGroupVersion.String()+"/test", "GET", nil) - -} - -func TestHttpMethods(t *testing.T) { - testServer, _, _ := testServerEnv(t, 200) - defer testServer.Close() - c, _ := restClient(testServer) - - request := c.Post() - if request == nil { - t.Errorf("Post : Object returned should not be nil") - } - - request = c.Get() - if request == nil { - t.Errorf("Get: Object returned should not be nil") - } - - request = c.Put() - if request == nil { - t.Errorf("Put : Object returned should not be nil") - } - - request = c.Delete() - if request == nil { - t.Errorf("Delete : Object returned should not be nil") - } - - request = c.Patch(types.JSONPatchType) - if request == nil { - t.Errorf("Patch : Object returned should not be nil") - } -} - -func TestCreateBackoffManager(t *testing.T) { - - theUrl, _ := url.Parse("http://localhost") - - // 1 second base backoff + duration of 2 seconds -> exponential backoff for requests. - os.Setenv(envBackoffBase, "1") - os.Setenv(envBackoffDuration, "2") - backoff := readExpBackoffConfig() - backoff.UpdateBackoff(theUrl, nil, 500) - backoff.UpdateBackoff(theUrl, nil, 500) - if backoff.CalculateBackoff(theUrl)/time.Second != 2 { - t.Errorf("Backoff env not working.") - } - - // 0 duration -> no backoff. - os.Setenv(envBackoffBase, "1") - os.Setenv(envBackoffDuration, "0") - backoff.UpdateBackoff(theUrl, nil, 500) - backoff.UpdateBackoff(theUrl, nil, 500) - backoff = readExpBackoffConfig() - if backoff.CalculateBackoff(theUrl)/time.Second != 0 { - t.Errorf("Zero backoff duration, but backoff still occurring.") - } - - // No env -> No backoff. - os.Setenv(envBackoffBase, "") - os.Setenv(envBackoffDuration, "") - backoff = readExpBackoffConfig() - backoff.UpdateBackoff(theUrl, nil, 500) - backoff.UpdateBackoff(theUrl, nil, 500) - if backoff.CalculateBackoff(theUrl)/time.Second != 0 { - t.Errorf("Backoff should have been 0.") - } - -} - -func testServerEnv(t *testing.T, statusCode int) (*httptest.Server, *utiltesting.FakeHandler, *metav1.Status) { - status := &metav1.Status{TypeMeta: metav1.TypeMeta{APIVersion: "v1", Kind: "Status"}, Status: fmt.Sprintf("%s", metav1.StatusSuccess)} - expectedBody, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), status) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: statusCode, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - return testServer, &fakeHandler, status -} - -func restClient(testServer *httptest.Server) (*RESTClient, error) { - c, err := RESTClientFor(&Config{ - Host: testServer.URL, - ContentConfig: ContentConfig{ - GroupVersion: &v1.SchemeGroupVersion, - NegotiatedSerializer: serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}, - }, - Username: "user", - Password: "pass", - }) - return c, err -} diff --git a/vendor/k8s.io/client-go/rest/config_test.go b/vendor/k8s.io/client-go/rest/config_test.go deleted file mode 100644 index 34786428..00000000 --- a/vendor/k8s.io/client-go/rest/config_test.go +++ /dev/null @@ -1,375 +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 rest - -import ( - "context" - "errors" - "io" - "net" - "net/http" - "path/filepath" - "reflect" - "strings" - "testing" - - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/diff" - "k8s.io/client-go/kubernetes/scheme" - clientcmdapi "k8s.io/client-go/tools/clientcmd/api" - "k8s.io/client-go/util/flowcontrol" - - fuzz "github.com/google/gofuzz" - "github.com/stretchr/testify/assert" -) - -func TestIsConfigTransportTLS(t *testing.T) { - testCases := []struct { - Config *Config - TransportTLS bool - }{ - { - Config: &Config{}, - TransportTLS: false, - }, - { - Config: &Config{ - Host: "https://localhost", - }, - TransportTLS: true, - }, - { - Config: &Config{ - Host: "localhost", - TLSClientConfig: TLSClientConfig{ - CertFile: "foo", - }, - }, - TransportTLS: true, - }, - { - Config: &Config{ - Host: "///:://localhost", - TLSClientConfig: TLSClientConfig{ - CertFile: "foo", - }, - }, - TransportTLS: false, - }, - { - Config: &Config{ - Host: "1.2.3.4:567", - TLSClientConfig: TLSClientConfig{ - Insecure: true, - }, - }, - TransportTLS: true, - }, - } - for _, testCase := range testCases { - if err := SetKubernetesDefaults(testCase.Config); err != nil { - t.Errorf("setting defaults failed for %#v: %v", testCase.Config, err) - continue - } - useTLS := IsConfigTransportTLS(*testCase.Config) - if testCase.TransportTLS != useTLS { - t.Errorf("expected %v for %#v", testCase.TransportTLS, testCase.Config) - } - } -} - -func TestSetKubernetesDefaultsUserAgent(t *testing.T) { - config := &Config{} - if err := SetKubernetesDefaults(config); err != nil { - t.Errorf("unexpected error: %v", err) - } - if !strings.Contains(config.UserAgent, "kubernetes/") { - t.Errorf("no user agent set: %#v", config) - } -} - -func TestAdjustVersion(t *testing.T) { - assert := assert.New(t) - assert.Equal("1.2.3", adjustVersion("1.2.3-alpha4")) - assert.Equal("1.2.3", adjustVersion("1.2.3-alpha")) - assert.Equal("1.2.3", adjustVersion("1.2.3")) - assert.Equal("unknown", adjustVersion("")) -} - -func TestAdjustCommit(t *testing.T) { - assert := assert.New(t) - assert.Equal("1234567", adjustCommit("1234567890")) - assert.Equal("123456", adjustCommit("123456")) - assert.Equal("unknown", adjustCommit("")) -} - -func TestAdjustCommand(t *testing.T) { - assert := assert.New(t) - assert.Equal("beans", adjustCommand(filepath.Join("home", "bob", "Downloads", "beans"))) - assert.Equal("beans", adjustCommand(filepath.Join(".", "beans"))) - assert.Equal("beans", adjustCommand("beans")) - assert.Equal("unknown", adjustCommand("")) -} - -func TestBuildUserAgent(t *testing.T) { - assert.New(t).Equal( - "lynx/nicest (beos/itanium) kubernetes/baaaaaaaaad", - buildUserAgent( - "lynx", "nicest", - "beos", "itanium", "baaaaaaaaad")) -} - -// This function untestable since it doesn't accept arguments. -func TestDefaultKubernetesUserAgent(t *testing.T) { - assert.New(t).Contains(DefaultKubernetesUserAgent(), "kubernetes") -} - -func TestRESTClientRequires(t *testing.T) { - if _, err := RESTClientFor(&Config{Host: "127.0.0.1", ContentConfig: ContentConfig{NegotiatedSerializer: scheme.Codecs}}); err == nil { - t.Errorf("unexpected non-error") - } - if _, err := RESTClientFor(&Config{Host: "127.0.0.1", ContentConfig: ContentConfig{GroupVersion: &v1.SchemeGroupVersion}}); err == nil { - t.Errorf("unexpected non-error") - } - if _, err := RESTClientFor(&Config{Host: "127.0.0.1", ContentConfig: ContentConfig{GroupVersion: &v1.SchemeGroupVersion, NegotiatedSerializer: scheme.Codecs}}); err != nil { - t.Errorf("unexpected error: %v", err) - } -} - -type fakeLimiter struct { - FakeSaturation float64 - FakeQPS float32 -} - -func (t *fakeLimiter) TryAccept() bool { - return true -} - -func (t *fakeLimiter) Saturation() float64 { - return t.FakeSaturation -} - -func (t *fakeLimiter) QPS() float32 { - return t.FakeQPS -} - -func (t *fakeLimiter) Stop() {} - -func (t *fakeLimiter) Accept() {} - -type fakeCodec struct{} - -func (c *fakeCodec) Decode([]byte, *schema.GroupVersionKind, runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { - return nil, nil, nil -} - -func (c *fakeCodec) Encode(obj runtime.Object, stream io.Writer) error { - return nil -} - -type fakeRoundTripper struct{} - -func (r *fakeRoundTripper) RoundTrip(*http.Request) (*http.Response, error) { - return nil, nil -} - -var fakeWrapperFunc = func(http.RoundTripper) http.RoundTripper { - return &fakeRoundTripper{} -} - -type fakeNegotiatedSerializer struct{} - -func (n *fakeNegotiatedSerializer) SupportedMediaTypes() []runtime.SerializerInfo { - return nil -} - -func (n *fakeNegotiatedSerializer) EncoderForVersion(serializer runtime.Encoder, gv runtime.GroupVersioner) runtime.Encoder { - return &fakeCodec{} -} - -func (n *fakeNegotiatedSerializer) DecoderToVersion(serializer runtime.Decoder, gv runtime.GroupVersioner) runtime.Decoder { - return &fakeCodec{} -} - -var fakeDialFunc = func(ctx context.Context, network, addr string) (net.Conn, error) { - return nil, fakeDialerError -} -var fakeDialerError = errors.New("fakedialer") - -type fakeAuthProviderConfigPersister struct{} - -func (fakeAuthProviderConfigPersister) Persist(map[string]string) error { - return fakeAuthProviderConfigPersisterError -} - -var fakeAuthProviderConfigPersisterError = errors.New("fakeAuthProviderConfigPersisterError") - -func TestAnonymousConfig(t *testing.T) { - f := fuzz.New().NilChance(0.0).NumElements(1, 1) - f.Funcs( - func(r *runtime.Codec, f fuzz.Continue) { - codec := &fakeCodec{} - f.Fuzz(codec) - *r = codec - }, - func(r *http.RoundTripper, f fuzz.Continue) { - roundTripper := &fakeRoundTripper{} - f.Fuzz(roundTripper) - *r = roundTripper - }, - func(fn *func(http.RoundTripper) http.RoundTripper, f fuzz.Continue) { - *fn = fakeWrapperFunc - }, - func(r *runtime.NegotiatedSerializer, f fuzz.Continue) { - serializer := &fakeNegotiatedSerializer{} - f.Fuzz(serializer) - *r = serializer - }, - func(r *flowcontrol.RateLimiter, f fuzz.Continue) { - limiter := &fakeLimiter{} - f.Fuzz(limiter) - *r = limiter - }, - // Authentication does not require fuzzer - func(r *AuthProviderConfigPersister, f fuzz.Continue) {}, - func(r *clientcmdapi.AuthProviderConfig, f fuzz.Continue) { - r.Config = map[string]string{} - }, - // Dial does not require fuzzer - func(r *func(ctx context.Context, network, addr string) (net.Conn, error), f fuzz.Continue) {}, - ) - for i := 0; i < 20; i++ { - original := &Config{} - f.Fuzz(original) - actual := AnonymousClientConfig(original) - expected := *original - - // this is the list of known security related fields, add to this list if a new field - // is added to Config, update AnonymousClientConfig to preserve the field otherwise. - expected.Impersonate = ImpersonationConfig{} - expected.BearerToken = "" - expected.Username = "" - expected.Password = "" - expected.AuthProvider = nil - expected.AuthConfigPersister = nil - expected.ExecProvider = nil - expected.TLSClientConfig.CertData = nil - expected.TLSClientConfig.CertFile = "" - expected.TLSClientConfig.KeyData = nil - expected.TLSClientConfig.KeyFile = "" - - // The DeepEqual cannot handle the func comparison, so we just verify if the - // function return the expected object. - if actual.WrapTransport == nil || !reflect.DeepEqual(expected.WrapTransport(nil), &fakeRoundTripper{}) { - t.Fatalf("AnonymousClientConfig dropped the WrapTransport field") - } else { - actual.WrapTransport = nil - expected.WrapTransport = nil - } - if actual.Dial != nil { - _, actualError := actual.Dial(context.Background(), "", "") - _, expectedError := expected.Dial(context.Background(), "", "") - if !reflect.DeepEqual(expectedError, actualError) { - t.Fatalf("CopyConfig dropped the Dial field") - } - } else { - actual.Dial = nil - expected.Dial = nil - } - - if !reflect.DeepEqual(*actual, expected) { - t.Fatalf("AnonymousClientConfig dropped unexpected fields, identify whether they are security related or not: %s", diff.ObjectGoPrintDiff(expected, actual)) - } - } -} - -func TestCopyConfig(t *testing.T) { - f := fuzz.New().NilChance(0.0).NumElements(1, 1) - f.Funcs( - func(r *runtime.Codec, f fuzz.Continue) { - codec := &fakeCodec{} - f.Fuzz(codec) - *r = codec - }, - func(r *http.RoundTripper, f fuzz.Continue) { - roundTripper := &fakeRoundTripper{} - f.Fuzz(roundTripper) - *r = roundTripper - }, - func(fn *func(http.RoundTripper) http.RoundTripper, f fuzz.Continue) { - *fn = fakeWrapperFunc - }, - func(r *runtime.NegotiatedSerializer, f fuzz.Continue) { - serializer := &fakeNegotiatedSerializer{} - f.Fuzz(serializer) - *r = serializer - }, - func(r *flowcontrol.RateLimiter, f fuzz.Continue) { - limiter := &fakeLimiter{} - f.Fuzz(limiter) - *r = limiter - }, - func(r *AuthProviderConfigPersister, f fuzz.Continue) { - *r = fakeAuthProviderConfigPersister{} - }, - func(r *func(ctx context.Context, network, addr string) (net.Conn, error), f fuzz.Continue) { - *r = fakeDialFunc - }, - ) - for i := 0; i < 20; i++ { - original := &Config{} - f.Fuzz(original) - actual := CopyConfig(original) - expected := *original - - // this is the list of known risky fields, add to this list if a new field - // is added to Config, update CopyConfig to preserve the field otherwise. - - // The DeepEqual cannot handle the func comparison, so we just verify if the - // function return the expected object. - if actual.WrapTransport == nil || !reflect.DeepEqual(expected.WrapTransport(nil), &fakeRoundTripper{}) { - t.Fatalf("CopyConfig dropped the WrapTransport field") - } else { - actual.WrapTransport = nil - expected.WrapTransport = nil - } - if actual.Dial != nil { - _, actualError := actual.Dial(context.Background(), "", "") - _, expectedError := expected.Dial(context.Background(), "", "") - if !reflect.DeepEqual(expectedError, actualError) { - t.Fatalf("CopyConfig dropped the Dial field") - } - } - actual.Dial = nil - expected.Dial = nil - if actual.AuthConfigPersister != nil { - actualError := actual.AuthConfigPersister.Persist(nil) - expectedError := expected.AuthConfigPersister.Persist(nil) - if !reflect.DeepEqual(expectedError, actualError) { - t.Fatalf("CopyConfig dropped the Dial field") - } - } - actual.AuthConfigPersister = nil - expected.AuthConfigPersister = nil - - if !reflect.DeepEqual(*actual, expected) { - t.Fatalf("CopyConfig dropped unexpected fields, identify whether they are security related or not: %s", diff.ObjectReflectDiff(expected, *actual)) - } - } -} diff --git a/vendor/k8s.io/client-go/rest/plugin_test.go b/vendor/k8s.io/client-go/rest/plugin_test.go deleted file mode 100644 index 070e5379..00000000 --- a/vendor/k8s.io/client-go/rest/plugin_test.go +++ /dev/null @@ -1,311 +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 rest - -import ( - "fmt" - "net/http" - "reflect" - "strconv" - "testing" - - clientcmdapi "k8s.io/client-go/tools/clientcmd/api" -) - -func TestAuthPluginWrapTransport(t *testing.T) { - if err := RegisterAuthProviderPlugin("pluginA", pluginAProvider); err != nil { - t.Errorf("Unexpected error: failed to register pluginA: %v", err) - } - if err := RegisterAuthProviderPlugin("pluginB", pluginBProvider); err != nil { - t.Errorf("Unexpected error: failed to register pluginB: %v", err) - } - if err := RegisterAuthProviderPlugin("pluginFail", pluginFailProvider); err != nil { - t.Errorf("Unexpected error: failed to register pluginFail: %v", err) - } - testCases := []struct { - useWrapTransport bool - plugin string - expectErr bool - expectPluginA bool - expectPluginB bool - }{ - {false, "", false, false, false}, - {false, "pluginA", false, true, false}, - {false, "pluginB", false, false, true}, - {false, "pluginFail", true, false, false}, - {false, "pluginUnknown", true, false, false}, - } - for i, tc := range testCases { - c := Config{} - if tc.useWrapTransport { - // Specify an existing WrapTransport in the config to make sure that - // plugins play nicely. - c.WrapTransport = func(rt http.RoundTripper) http.RoundTripper { - return &wrapTransport{rt} - } - } - if len(tc.plugin) != 0 { - c.AuthProvider = &clientcmdapi.AuthProviderConfig{Name: tc.plugin} - } - tConfig, err := c.TransportConfig() - if err != nil { - // Unknown/bad plugins are expected to fail here. - if !tc.expectErr { - t.Errorf("%d. Did not expect errors loading Auth Plugin: %q. Got: %v", i, tc.plugin, err) - } - continue - } - var fullyWrappedTransport http.RoundTripper - fullyWrappedTransport = &emptyTransport{} - if tConfig.WrapTransport != nil { - fullyWrappedTransport = tConfig.WrapTransport(&emptyTransport{}) - } - res, err := fullyWrappedTransport.RoundTrip(&http.Request{}) - if err != nil { - t.Errorf("%d. Unexpected error in RoundTrip: %v", i, err) - continue - } - hasWrapTransport := res.Header.Get("wrapTransport") == "Y" - hasPluginA := res.Header.Get("pluginA") == "Y" - hasPluginB := res.Header.Get("pluginB") == "Y" - if hasWrapTransport != tc.useWrapTransport { - t.Errorf("%d. Expected Existing config.WrapTransport: %t; Got: %t", i, tc.useWrapTransport, hasWrapTransport) - } - if hasPluginA != tc.expectPluginA { - t.Errorf("%d. Expected Plugin A: %t; Got: %t", i, tc.expectPluginA, hasPluginA) - } - if hasPluginB != tc.expectPluginB { - t.Errorf("%d. Expected Plugin B: %t; Got: %t", i, tc.expectPluginB, hasPluginB) - } - } -} - -func TestAuthPluginPersist(t *testing.T) { - // register pluginA by a different name so we don't collide across tests. - if err := RegisterAuthProviderPlugin("pluginA2", pluginAProvider); err != nil { - t.Errorf("Unexpected error: failed to register pluginA: %v", err) - } - if err := RegisterAuthProviderPlugin("pluginPersist", pluginPersistProvider); err != nil { - t.Errorf("Unexpected error: failed to register pluginPersist: %v", err) - } - fooBarConfig := map[string]string{"foo": "bar"} - testCases := []struct { - plugin string - startingConfig map[string]string - expectedConfigAfterLogin map[string]string - expectedConfigAfterRoundTrip map[string]string - }{ - // non-persisting plugins should work fine without modifying config. - {"pluginA2", map[string]string{}, map[string]string{}, map[string]string{}}, - {"pluginA2", fooBarConfig, fooBarConfig, fooBarConfig}, - // plugins that persist config should be able to persist when they want. - { - "pluginPersist", - map[string]string{}, - map[string]string{ - "login": "Y", - }, - map[string]string{ - "login": "Y", - "roundTrips": "1", - }, - }, - { - "pluginPersist", - map[string]string{ - "login": "Y", - "roundTrips": "123", - }, - map[string]string{ - "login": "Y", - "roundTrips": "123", - }, - map[string]string{ - "login": "Y", - "roundTrips": "124", - }, - }, - } - for i, tc := range testCases { - cfg := &clientcmdapi.AuthProviderConfig{ - Name: tc.plugin, - Config: tc.startingConfig, - } - persister := &inMemoryPersister{make(map[string]string)} - persister.Persist(tc.startingConfig) - plugin, err := GetAuthProvider("127.0.0.1", cfg, persister) - if err != nil { - t.Errorf("%d. Unexpected error: failed to get plugin %q: %v", i, tc.plugin, err) - } - if err := plugin.Login(); err != nil { - t.Errorf("%d. Unexpected error calling Login() w/ plugin %q: %v", i, tc.plugin, err) - } - // Make sure the plugin persisted what we expect after Login(). - if !reflect.DeepEqual(persister.savedConfig, tc.expectedConfigAfterLogin) { - t.Errorf("%d. Unexpected persisted config after calling %s.Login(): \nGot:\n%v\nExpected:\n%v", - i, tc.plugin, persister.savedConfig, tc.expectedConfigAfterLogin) - } - if _, err := plugin.WrapTransport(&emptyTransport{}).RoundTrip(&http.Request{}); err != nil { - t.Errorf("%d. Unexpected error round-tripping w/ plugin %q: %v", i, tc.plugin, err) - } - // Make sure the plugin persisted what we expect after RoundTrip(). - if !reflect.DeepEqual(persister.savedConfig, tc.expectedConfigAfterRoundTrip) { - t.Errorf("%d. Unexpected persisted config after calling %s.WrapTransport.RoundTrip(): \nGot:\n%v\nExpected:\n%v", - i, tc.plugin, persister.savedConfig, tc.expectedConfigAfterLogin) - } - } - -} - -// emptyTransport provides an empty http.Response with an initialized header -// to allow wrapping RoundTrippers to set header values. -type emptyTransport struct{} - -func (*emptyTransport) RoundTrip(req *http.Request) (*http.Response, error) { - res := &http.Response{ - Header: make(map[string][]string), - } - return res, nil -} - -// wrapTransport sets "wrapTransport" = "Y" on the response. -type wrapTransport struct { - rt http.RoundTripper -} - -func (w *wrapTransport) RoundTrip(req *http.Request) (*http.Response, error) { - res, err := w.rt.RoundTrip(req) - if err != nil { - return nil, err - } - res.Header.Add("wrapTransport", "Y") - return res, nil -} - -// wrapTransportA sets "pluginA" = "Y" on the response. -type wrapTransportA struct { - rt http.RoundTripper -} - -func (w *wrapTransportA) RoundTrip(req *http.Request) (*http.Response, error) { - res, err := w.rt.RoundTrip(req) - if err != nil { - return nil, err - } - res.Header.Add("pluginA", "Y") - return res, nil -} - -type pluginA struct{} - -func (*pluginA) WrapTransport(rt http.RoundTripper) http.RoundTripper { - return &wrapTransportA{rt} -} - -func (*pluginA) Login() error { return nil } - -func pluginAProvider(string, map[string]string, AuthProviderConfigPersister) (AuthProvider, error) { - return &pluginA{}, nil -} - -// wrapTransportB sets "pluginB" = "Y" on the response. -type wrapTransportB struct { - rt http.RoundTripper -} - -func (w *wrapTransportB) RoundTrip(req *http.Request) (*http.Response, error) { - res, err := w.rt.RoundTrip(req) - if err != nil { - return nil, err - } - res.Header.Add("pluginB", "Y") - return res, nil -} - -type pluginB struct{} - -func (*pluginB) WrapTransport(rt http.RoundTripper) http.RoundTripper { - return &wrapTransportB{rt} -} - -func (*pluginB) Login() error { return nil } - -func pluginBProvider(string, map[string]string, AuthProviderConfigPersister) (AuthProvider, error) { - return &pluginB{}, nil -} - -// pluginFailProvider simulates a registered AuthPlugin that fails to load. -func pluginFailProvider(string, map[string]string, AuthProviderConfigPersister) (AuthProvider, error) { - return nil, fmt.Errorf("Failed to load AuthProvider") -} - -type inMemoryPersister struct { - savedConfig map[string]string -} - -func (i *inMemoryPersister) Persist(config map[string]string) error { - i.savedConfig = make(map[string]string) - for k, v := range config { - i.savedConfig[k] = v - } - return nil -} - -// wrapTransportPersist increments the "roundTrips" entry from the config when -// roundTrip is called. -type wrapTransportPersist struct { - rt http.RoundTripper - config map[string]string - persister AuthProviderConfigPersister -} - -func (w *wrapTransportPersist) RoundTrip(req *http.Request) (*http.Response, error) { - roundTrips := 0 - if rtVal, ok := w.config["roundTrips"]; ok { - var err error - roundTrips, err = strconv.Atoi(rtVal) - if err != nil { - return nil, err - } - } - roundTrips++ - w.config["roundTrips"] = fmt.Sprintf("%d", roundTrips) - if err := w.persister.Persist(w.config); err != nil { - return nil, err - } - return w.rt.RoundTrip(req) -} - -type pluginPersist struct { - config map[string]string - persister AuthProviderConfigPersister -} - -func (p *pluginPersist) WrapTransport(rt http.RoundTripper) http.RoundTripper { - return &wrapTransportPersist{rt, p.config, p.persister} -} - -// Login sets the config entry "login" to "Y". -func (p *pluginPersist) Login() error { - p.config["login"] = "Y" - p.persister.Persist(p.config) - return nil -} - -func pluginPersistProvider(_ string, config map[string]string, persister AuthProviderConfigPersister) (AuthProvider, error) { - return &pluginPersist{config, persister}, nil -} diff --git a/vendor/k8s.io/client-go/rest/request_test.go b/vendor/k8s.io/client-go/rest/request_test.go deleted file mode 100755 index f75ee86c..00000000 --- a/vendor/k8s.io/client-go/rest/request_test.go +++ /dev/null @@ -1,1789 +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 ( - "bytes" - "context" - "errors" - "flag" - "fmt" - "io" - "io/ioutil" - "net" - "net/http" - "net/http/httptest" - "net/url" - "os" - "reflect" - "strings" - "syscall" - "testing" - "time" - - "github.com/golang/glog" - - "k8s.io/api/core/v1" - apiequality "k8s.io/apimachinery/pkg/api/equality" - 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/schema" - "k8s.io/apimachinery/pkg/runtime/serializer" - "k8s.io/apimachinery/pkg/runtime/serializer/streaming" - "k8s.io/apimachinery/pkg/util/clock" - "k8s.io/apimachinery/pkg/util/diff" - "k8s.io/apimachinery/pkg/util/httpstream" - "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/kubernetes/scheme" - restclientwatch "k8s.io/client-go/rest/watch" - "k8s.io/client-go/util/flowcontrol" - utiltesting "k8s.io/client-go/util/testing" -) - -func TestNewRequestSetsAccept(t *testing.T) { - r := NewRequest(nil, "get", &url.URL{Path: "/path/"}, "", ContentConfig{}, Serializers{}, nil, nil, 0) - if r.headers.Get("Accept") != "" { - t.Errorf("unexpected headers: %#v", r.headers) - } - r = NewRequest(nil, "get", &url.URL{Path: "/path/"}, "", ContentConfig{ContentType: "application/other"}, Serializers{}, nil, nil, 0) - if r.headers.Get("Accept") != "application/other, */*" { - t.Errorf("unexpected headers: %#v", r.headers) - } -} - -type clientFunc func(req *http.Request) (*http.Response, error) - -func (f clientFunc) Do(req *http.Request) (*http.Response, error) { - return f(req) -} - -func TestRequestSetsHeaders(t *testing.T) { - server := clientFunc(func(req *http.Request) (*http.Response, error) { - if req.Header.Get("Accept") != "application/other, */*" { - t.Errorf("unexpected headers: %#v", req.Header) - } - return &http.Response{ - StatusCode: http.StatusForbidden, - Body: ioutil.NopCloser(bytes.NewReader([]byte{})), - }, nil - }) - config := defaultContentConfig() - config.ContentType = "application/other" - serializers := defaultSerializers(t) - r := NewRequest(server, "get", &url.URL{Path: "/path"}, "", config, serializers, nil, nil, 0) - - // Check if all "issue" methods are setting headers. - _ = r.Do() - _, _ = r.Watch() - _, _ = r.Stream() -} - -func TestRequestWithErrorWontChange(t *testing.T) { - gvCopy := v1.SchemeGroupVersion - original := Request{ - err: errors.New("test"), - content: ContentConfig{GroupVersion: &gvCopy}, - } - r := original - changed := r.Param("foo", "bar"). - AbsPath("/abs"). - Prefix("test"). - Suffix("testing"). - Namespace("new"). - Resource("foos"). - Name("bars"). - Body("foo"). - Timeout(time.Millisecond) - if changed != &r { - t.Errorf("returned request should point to the same object") - } - if !reflect.DeepEqual(changed, &original) { - t.Errorf("expected %#v, got %#v", &original, changed) - } -} - -func TestRequestPreservesBaseTrailingSlash(t *testing.T) { - r := &Request{baseURL: &url.URL{}, pathPrefix: "/path/"} - if s := r.URL().String(); s != "/path/" { - t.Errorf("trailing slash should be preserved: %s", s) - } -} - -func TestRequestAbsPathPreservesTrailingSlash(t *testing.T) { - r := (&Request{baseURL: &url.URL{}}).AbsPath("/foo/") - if s := r.URL().String(); s != "/foo/" { - t.Errorf("trailing slash should be preserved: %s", s) - } - - r = (&Request{baseURL: &url.URL{}}).AbsPath("/foo/") - if s := r.URL().String(); s != "/foo/" { - t.Errorf("trailing slash should be preserved: %s", s) - } -} - -func TestRequestAbsPathJoins(t *testing.T) { - r := (&Request{baseURL: &url.URL{}}).AbsPath("foo/bar", "baz") - if s := r.URL().String(); s != "foo/bar/baz" { - t.Errorf("trailing slash should be preserved: %s", s) - } -} - -func TestRequestSetsNamespace(t *testing.T) { - r := (&Request{ - baseURL: &url.URL{ - Path: "/", - }, - }).Namespace("foo") - if r.namespace == "" { - t.Errorf("namespace should be set: %#v", r) - } - - if s := r.URL().String(); s != "namespaces/foo" { - t.Errorf("namespace should be in path: %s", s) - } -} - -func TestRequestOrdersNamespaceInPath(t *testing.T) { - r := (&Request{ - baseURL: &url.URL{}, - pathPrefix: "/test/", - }).Name("bar").Resource("baz").Namespace("foo") - if s := r.URL().String(); s != "/test/namespaces/foo/baz/bar" { - t.Errorf("namespace should be in order in path: %s", s) - } -} - -func TestRequestOrdersSubResource(t *testing.T) { - r := (&Request{ - baseURL: &url.URL{}, - pathPrefix: "/test/", - }).Name("bar").Resource("baz").Namespace("foo").Suffix("test").SubResource("a", "b") - if s := r.URL().String(); s != "/test/namespaces/foo/baz/bar/a/b/test" { - t.Errorf("namespace should be in order in path: %s", s) - } -} - -func TestRequestSetTwiceError(t *testing.T) { - if (&Request{}).Name("bar").Name("baz").err == nil { - t.Errorf("setting name twice should result in error") - } - if (&Request{}).Namespace("bar").Namespace("baz").err == nil { - t.Errorf("setting namespace twice should result in error") - } - if (&Request{}).Resource("bar").Resource("baz").err == nil { - t.Errorf("setting resource twice should result in error") - } - if (&Request{}).SubResource("bar").SubResource("baz").err == nil { - t.Errorf("setting subresource twice should result in error") - } -} - -func TestInvalidSegments(t *testing.T) { - invalidSegments := []string{".", "..", "test/segment", "test%2bsegment"} - setters := map[string]func(string, *Request){ - "namespace": func(s string, r *Request) { r.Namespace(s) }, - "resource": func(s string, r *Request) { r.Resource(s) }, - "name": func(s string, r *Request) { r.Name(s) }, - "subresource": func(s string, r *Request) { r.SubResource(s) }, - } - for _, invalidSegment := range invalidSegments { - for setterName, setter := range setters { - r := &Request{} - setter(invalidSegment, r) - if r.err == nil { - t.Errorf("%s: %s: expected error, got none", setterName, invalidSegment) - } - } - } -} - -func TestRequestParam(t *testing.T) { - r := (&Request{}).Param("foo", "a") - if !reflect.DeepEqual(r.params, url.Values{"foo": []string{"a"}}) { - t.Errorf("should have set a param: %#v", r) - } - - r.Param("bar", "1") - r.Param("bar", "2") - if !reflect.DeepEqual(r.params, url.Values{"foo": []string{"a"}, "bar": []string{"1", "2"}}) { - t.Errorf("should have set a param: %#v", r) - } -} - -func TestRequestVersionedParams(t *testing.T) { - r := (&Request{content: ContentConfig{GroupVersion: &v1.SchemeGroupVersion}}).Param("foo", "a") - if !reflect.DeepEqual(r.params, url.Values{"foo": []string{"a"}}) { - t.Errorf("should have set a param: %#v", r) - } - r.VersionedParams(&v1.PodLogOptions{Follow: true, Container: "bar"}, scheme.ParameterCodec) - - if !reflect.DeepEqual(r.params, url.Values{ - "foo": []string{"a"}, - "container": []string{"bar"}, - "follow": []string{"true"}, - }) { - t.Errorf("should have set a param: %#v", r) - } -} - -func TestRequestVersionedParamsFromListOptions(t *testing.T) { - r := &Request{content: ContentConfig{GroupVersion: &v1.SchemeGroupVersion}} - r.VersionedParams(&metav1.ListOptions{ResourceVersion: "1"}, scheme.ParameterCodec) - if !reflect.DeepEqual(r.params, url.Values{ - "resourceVersion": []string{"1"}, - }) { - t.Errorf("should have set a param: %#v", r) - } - - var timeout int64 = 10 - r.VersionedParams(&metav1.ListOptions{ResourceVersion: "2", TimeoutSeconds: &timeout}, scheme.ParameterCodec) - if !reflect.DeepEqual(r.params, url.Values{ - "resourceVersion": []string{"1", "2"}, - "timeoutSeconds": []string{"10"}, - }) { - t.Errorf("should have set a param: %#v %v", r.params, r.err) - } -} - -func TestRequestURI(t *testing.T) { - r := (&Request{}).Param("foo", "a") - r.Prefix("other") - r.RequestURI("/test?foo=b&a=b&c=1&c=2") - if r.pathPrefix != "/test" { - t.Errorf("path is wrong: %#v", r) - } - if !reflect.DeepEqual(r.params, url.Values{"a": []string{"b"}, "foo": []string{"b"}, "c": []string{"1", "2"}}) { - t.Errorf("should have set a param: %#v", r) - } -} - -type NotAnAPIObject struct{} - -func (obj NotAnAPIObject) GroupVersionKind() *schema.GroupVersionKind { return nil } -func (obj NotAnAPIObject) SetGroupVersionKind(gvk *schema.GroupVersionKind) {} - -func defaultContentConfig() ContentConfig { - gvCopy := v1.SchemeGroupVersion - return ContentConfig{ - ContentType: "application/json", - GroupVersion: &gvCopy, - NegotiatedSerializer: serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}, - } -} - -func defaultSerializers(t *testing.T) Serializers { - config := defaultContentConfig() - serializers, err := createSerializers(config) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - return *serializers -} - -func TestRequestBody(t *testing.T) { - // test unknown type - r := (&Request{}).Body([]string{"test"}) - if r.err == nil || r.body != nil { - t.Errorf("should have set err and left body nil: %#v", r) - } - - // test error set when failing to read file - f, err := ioutil.TempFile("", "test") - if err != nil { - t.Fatalf("unable to create temp file") - } - defer f.Close() - os.Remove(f.Name()) - r = (&Request{}).Body(f.Name()) - if r.err == nil || r.body != nil { - t.Errorf("should have set err and left body nil: %#v", r) - } - - // test unencodable api object - r = (&Request{content: defaultContentConfig()}).Body(&NotAnAPIObject{}) - if r.err == nil || r.body != nil { - t.Errorf("should have set err and left body nil: %#v", r) - } -} - -func TestResultIntoWithErrReturnsErr(t *testing.T) { - res := Result{err: errors.New("test")} - if err := res.Into(&v1.Pod{}); err != res.err { - t.Errorf("should have returned exact error from result") - } -} - -func TestResultIntoWithNoBodyReturnsErr(t *testing.T) { - res := Result{ - body: []byte{}, - decoder: scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), - } - if err := res.Into(&v1.Pod{}); err == nil || !strings.Contains(err.Error(), "0-length") { - t.Errorf("should have complained about 0 length body") - } -} - -func TestURLTemplate(t *testing.T) { - uri, _ := url.Parse("http://localhost") - r := NewRequest(nil, "POST", uri, "", ContentConfig{GroupVersion: &schema.GroupVersion{Group: "test"}}, Serializers{}, nil, nil, 0) - r.Prefix("pre1").Resource("r1").Namespace("ns").Name("nm").Param("p0", "v0") - full := r.URL() - if full.String() != "http://localhost/pre1/namespaces/ns/r1/nm?p0=v0" { - t.Errorf("unexpected initial URL: %s", full) - } - actualURL := r.finalURLTemplate() - actual := actualURL.String() - expected := "http://localhost/pre1/namespaces/%7Bnamespace%7D/r1/%7Bname%7D?p0=%7Bvalue%7D" - if actual != expected { - t.Errorf("unexpected URL template: %s %s", actual, expected) - } - if r.URL().String() != full.String() { - t.Errorf("creating URL template changed request: %s -> %s", full.String(), r.URL().String()) - } -} - -func TestTransformResponse(t *testing.T) { - invalid := []byte("aaaaa") - uri, _ := url.Parse("http://localhost") - testCases := []struct { - Response *http.Response - Data []byte - Created bool - Error bool - ErrFn func(err error) bool - }{ - {Response: &http.Response{StatusCode: 200}, Data: []byte{}}, - {Response: &http.Response{StatusCode: 201}, Data: []byte{}, Created: true}, - {Response: &http.Response{StatusCode: 199}, Error: true}, - {Response: &http.Response{StatusCode: 500}, Error: true}, - {Response: &http.Response{StatusCode: 422}, Error: true}, - {Response: &http.Response{StatusCode: 409}, Error: true}, - {Response: &http.Response{StatusCode: 404}, Error: true}, - {Response: &http.Response{StatusCode: 401}, Error: true}, - { - Response: &http.Response{ - StatusCode: 401, - Header: http.Header{"Content-Type": []string{"application/json"}}, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Error: true, - ErrFn: func(err error) bool { - return err.Error() != "aaaaa" && apierrors.IsUnauthorized(err) - }, - }, - { - Response: &http.Response{ - StatusCode: 401, - Header: http.Header{"Content-Type": []string{"text/any"}}, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Error: true, - ErrFn: func(err error) bool { - return strings.Contains(err.Error(), "server has asked for the client to provide") && apierrors.IsUnauthorized(err) - }, - }, - {Response: &http.Response{StatusCode: 403}, Error: true}, - {Response: &http.Response{StatusCode: 200, Body: ioutil.NopCloser(bytes.NewReader(invalid))}, Data: invalid}, - {Response: &http.Response{StatusCode: 200, Body: ioutil.NopCloser(bytes.NewReader(invalid))}, Data: invalid}, - } - for i, test := range testCases { - r := NewRequest(nil, "", uri, "", defaultContentConfig(), defaultSerializers(t), nil, nil, 0) - if test.Response.Body == nil { - test.Response.Body = ioutil.NopCloser(bytes.NewReader([]byte{})) - } - result := r.transformResponse(test.Response, &http.Request{}) - response, created, err := result.body, result.statusCode == http.StatusCreated, result.err - hasErr := err != nil - if hasErr != test.Error { - t.Errorf("%d: unexpected error: %t %v", i, test.Error, err) - } else if hasErr && test.Response.StatusCode > 399 { - status, ok := err.(apierrors.APIStatus) - if !ok { - t.Errorf("%d: response should have been transformable into APIStatus: %v", i, err) - continue - } - if int(status.Status().Code) != test.Response.StatusCode { - t.Errorf("%d: status code did not match response: %#v", i, status.Status()) - } - } - if test.ErrFn != nil && !test.ErrFn(err) { - t.Errorf("%d: error function did not match: %v", i, err) - } - if !(test.Data == nil && response == nil) && !apiequality.Semantic.DeepDerivative(test.Data, response) { - t.Errorf("%d: unexpected response: %#v %#v", i, test.Data, response) - } - if test.Created != created { - t.Errorf("%d: expected created %t, got %t", i, test.Created, created) - } - } -} - -type renegotiator struct { - called bool - contentType string - params map[string]string - decoder runtime.Decoder - err error -} - -func (r *renegotiator) invoke(contentType string, params map[string]string) (runtime.Decoder, error) { - r.called = true - r.contentType = contentType - r.params = params - return r.decoder, r.err -} - -func TestTransformResponseNegotiate(t *testing.T) { - invalid := []byte("aaaaa") - uri, _ := url.Parse("http://localhost") - testCases := []struct { - Response *http.Response - Data []byte - Created bool - Error bool - ErrFn func(err error) bool - - ContentType string - Called bool - ExpectContentType string - Decoder runtime.Decoder - NegotiateErr error - }{ - { - ContentType: "application/json", - Response: &http.Response{ - StatusCode: 401, - Header: http.Header{"Content-Type": []string{"application/json"}}, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Error: true, - ErrFn: func(err error) bool { - return err.Error() != "aaaaa" && apierrors.IsUnauthorized(err) - }, - }, - { - ContentType: "application/json", - Response: &http.Response{ - StatusCode: 401, - Header: http.Header{"Content-Type": []string{"application/protobuf"}}, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Decoder: scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), - - Called: true, - ExpectContentType: "application/protobuf", - - Error: true, - ErrFn: func(err error) bool { - return err.Error() != "aaaaa" && apierrors.IsUnauthorized(err) - }, - }, - { - ContentType: "application/json", - Response: &http.Response{ - StatusCode: 500, - Header: http.Header{"Content-Type": []string{"application/,others"}}, - }, - Decoder: scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), - - Error: true, - ErrFn: func(err error) bool { - return err.Error() == "Internal error occurred: mime: expected token after slash" && err.(apierrors.APIStatus).Status().Code == 500 - }, - }, - { - // no negotiation when no content type specified - Response: &http.Response{ - StatusCode: 200, - Header: http.Header{"Content-Type": []string{"text/any"}}, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Decoder: scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), - }, - { - // no negotiation when no response content type specified - ContentType: "text/any", - Response: &http.Response{ - StatusCode: 200, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Decoder: scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), - }, - { - // unrecognized content type is not handled - ContentType: "application/json", - Response: &http.Response{ - StatusCode: 404, - Header: http.Header{"Content-Type": []string{"application/unrecognized"}}, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Decoder: scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), - - NegotiateErr: fmt.Errorf("aaaa"), - Called: true, - ExpectContentType: "application/unrecognized", - - Error: true, - ErrFn: func(err error) bool { - return err.Error() != "aaaaa" && apierrors.IsNotFound(err) - }, - }, - } - for i, test := range testCases { - serializers := defaultSerializers(t) - negotiator := &renegotiator{ - decoder: test.Decoder, - err: test.NegotiateErr, - } - serializers.RenegotiatedDecoder = negotiator.invoke - contentConfig := defaultContentConfig() - contentConfig.ContentType = test.ContentType - r := NewRequest(nil, "", uri, "", contentConfig, serializers, nil, nil, 0) - if test.Response.Body == nil { - test.Response.Body = ioutil.NopCloser(bytes.NewReader([]byte{})) - } - result := r.transformResponse(test.Response, &http.Request{}) - _, err := result.body, result.err - hasErr := err != nil - if hasErr != test.Error { - t.Errorf("%d: unexpected error: %t %v", i, test.Error, err) - continue - } else if hasErr && test.Response.StatusCode > 399 { - status, ok := err.(apierrors.APIStatus) - if !ok { - t.Errorf("%d: response should have been transformable into APIStatus: %v", i, err) - continue - } - if int(status.Status().Code) != test.Response.StatusCode { - t.Errorf("%d: status code did not match response: %#v", i, status.Status()) - } - } - if test.ErrFn != nil && !test.ErrFn(err) { - t.Errorf("%d: error function did not match: %v", i, err) - } - if negotiator.called != test.Called { - t.Errorf("%d: negotiator called %t != %t", i, negotiator.called, test.Called) - } - if !test.Called { - continue - } - if negotiator.contentType != test.ExpectContentType { - t.Errorf("%d: unexpected content type: %s", i, negotiator.contentType) - } - } -} - -func TestTransformUnstructuredError(t *testing.T) { - testCases := []struct { - Req *http.Request - Res *http.Response - - Resource string - Name string - - ErrFn func(error) bool - Transformed error - }{ - { - Resource: "foo", - Name: "bar", - Req: &http.Request{ - Method: "POST", - }, - Res: &http.Response{ - StatusCode: http.StatusConflict, - Body: ioutil.NopCloser(bytes.NewReader(nil)), - }, - ErrFn: apierrors.IsAlreadyExists, - }, - { - Resource: "foo", - Name: "bar", - Req: &http.Request{ - Method: "PUT", - }, - Res: &http.Response{ - StatusCode: http.StatusConflict, - Body: ioutil.NopCloser(bytes.NewReader(nil)), - }, - ErrFn: apierrors.IsConflict, - }, - { - Resource: "foo", - Name: "bar", - Req: &http.Request{}, - Res: &http.Response{ - StatusCode: http.StatusNotFound, - Body: ioutil.NopCloser(bytes.NewReader(nil)), - }, - ErrFn: apierrors.IsNotFound, - }, - { - Req: &http.Request{}, - Res: &http.Response{ - StatusCode: http.StatusBadRequest, - Body: ioutil.NopCloser(bytes.NewReader(nil)), - }, - ErrFn: apierrors.IsBadRequest, - }, - { - // status in response overrides transformed result - Req: &http.Request{}, - Res: &http.Response{StatusCode: http.StatusBadRequest, Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"kind":"Status","apiVersion":"v1","status":"Failure","code":404}`)))}, - ErrFn: apierrors.IsBadRequest, - Transformed: &apierrors.StatusError{ - ErrStatus: metav1.Status{Status: metav1.StatusFailure, Code: http.StatusNotFound}, - }, - }, - { - // successful status is ignored - Req: &http.Request{}, - Res: &http.Response{StatusCode: http.StatusBadRequest, Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"kind":"Status","apiVersion":"v1","status":"Success","code":404}`)))}, - ErrFn: apierrors.IsBadRequest, - }, - { - // empty object does not change result - Req: &http.Request{}, - Res: &http.Response{StatusCode: http.StatusBadRequest, Body: ioutil.NopCloser(bytes.NewReader([]byte(`{}`)))}, - ErrFn: apierrors.IsBadRequest, - }, - { - // we default apiVersion for backwards compatibility with old clients - // TODO: potentially remove in 1.7 - Req: &http.Request{}, - Res: &http.Response{StatusCode: http.StatusBadRequest, Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"kind":"Status","status":"Failure","code":404}`)))}, - ErrFn: apierrors.IsBadRequest, - Transformed: &apierrors.StatusError{ - ErrStatus: metav1.Status{Status: metav1.StatusFailure, Code: http.StatusNotFound}, - }, - }, - { - // we do not default kind - Req: &http.Request{}, - Res: &http.Response{StatusCode: http.StatusBadRequest, Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"status":"Failure","code":404}`)))}, - ErrFn: apierrors.IsBadRequest, - }, - } - - for i, testCase := range testCases { - r := &Request{ - content: defaultContentConfig(), - serializers: defaultSerializers(t), - resourceName: testCase.Name, - resource: testCase.Resource, - } - result := r.transformResponse(testCase.Res, testCase.Req) - err := result.err - if !testCase.ErrFn(err) { - t.Errorf("unexpected error: %v", err) - continue - } - if !apierrors.IsUnexpectedServerError(err) { - t.Errorf("%d: unexpected error type: %v", i, err) - } - if len(testCase.Name) != 0 && !strings.Contains(err.Error(), testCase.Name) { - t.Errorf("unexpected error string: %s", err) - } - if len(testCase.Resource) != 0 && !strings.Contains(err.Error(), testCase.Resource) { - t.Errorf("unexpected error string: %s", err) - } - - // verify Error() properly transforms the error - transformed := result.Error() - expect := testCase.Transformed - if expect == nil { - expect = err - } - if !reflect.DeepEqual(expect, transformed) { - t.Errorf("%d: unexpected Error(): %s", i, diff.ObjectReflectDiff(expect, transformed)) - } - - // verify result.Get properly transforms the error - if _, err := result.Get(); !reflect.DeepEqual(expect, err) { - t.Errorf("%d: unexpected error on Get(): %s", i, diff.ObjectReflectDiff(expect, err)) - } - - // verify result.Into properly handles the error - if err := result.Into(&v1.Pod{}); !reflect.DeepEqual(expect, err) { - t.Errorf("%d: unexpected error on Into(): %s", i, diff.ObjectReflectDiff(expect, err)) - } - - // verify result.Raw leaves the error in the untransformed state - if _, err := result.Raw(); !reflect.DeepEqual(result.err, err) { - t.Errorf("%d: unexpected error on Raw(): %s", i, diff.ObjectReflectDiff(expect, err)) - } - } -} - -func TestRequestWatch(t *testing.T) { - testCases := []struct { - Request *Request - Err bool - ErrFn func(error) bool - Empty bool - }{ - { - Request: &Request{err: errors.New("bail")}, - Err: true, - }, - { - Request: &Request{baseURL: &url.URL{}, pathPrefix: "%"}, - Err: true, - }, - { - Request: &Request{ - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, errors.New("err") - }), - baseURL: &url.URL{}, - }, - Err: true, - }, - { - Request: &Request{ - content: defaultContentConfig(), - serializers: defaultSerializers(t), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return &http.Response{ - StatusCode: http.StatusForbidden, - Body: ioutil.NopCloser(bytes.NewReader([]byte{})), - }, nil - }), - baseURL: &url.URL{}, - }, - Err: true, - ErrFn: func(err error) bool { - return apierrors.IsForbidden(err) - }, - }, - { - Request: &Request{ - content: defaultContentConfig(), - serializers: defaultSerializers(t), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return &http.Response{ - StatusCode: http.StatusUnauthorized, - Body: ioutil.NopCloser(bytes.NewReader([]byte{})), - }, nil - }), - baseURL: &url.URL{}, - }, - Err: true, - ErrFn: func(err error) bool { - return apierrors.IsUnauthorized(err) - }, - }, - { - Request: &Request{ - content: defaultContentConfig(), - serializers: defaultSerializers(t), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return &http.Response{ - StatusCode: http.StatusUnauthorized, - Body: ioutil.NopCloser(bytes.NewReader([]byte(runtime.EncodeOrDie(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), &metav1.Status{ - Status: metav1.StatusFailure, - Reason: metav1.StatusReasonUnauthorized, - })))), - }, nil - }), - baseURL: &url.URL{}, - }, - Err: true, - ErrFn: func(err error) bool { - return apierrors.IsUnauthorized(err) - }, - }, - { - Request: &Request{ - serializers: defaultSerializers(t), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, io.EOF - }), - baseURL: &url.URL{}, - }, - Empty: true, - }, - { - Request: &Request{ - serializers: defaultSerializers(t), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, &url.Error{Err: io.EOF} - }), - baseURL: &url.URL{}, - }, - Empty: true, - }, - { - Request: &Request{ - serializers: defaultSerializers(t), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, errors.New("http: can't write HTTP request on broken connection") - }), - baseURL: &url.URL{}, - }, - Empty: true, - }, - { - Request: &Request{ - serializers: defaultSerializers(t), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, errors.New("foo: connection reset by peer") - }), - baseURL: &url.URL{}, - }, - Empty: true, - }, - } - for i, testCase := range testCases { - t.Logf("testcase %v", testCase.Request) - testCase.Request.backoffMgr = &NoBackoff{} - watch, err := testCase.Request.Watch() - hasErr := err != nil - if hasErr != testCase.Err { - t.Errorf("%d: expected %t, got %t: %v", i, testCase.Err, hasErr, err) - continue - } - if testCase.ErrFn != nil && !testCase.ErrFn(err) { - t.Errorf("%d: error not valid: %v", i, err) - } - if hasErr && watch != nil { - t.Errorf("%d: watch should be nil when error is returned", i) - continue - } - if testCase.Empty { - _, ok := <-watch.ResultChan() - if ok { - t.Errorf("%d: expected the watch to be empty: %#v", i, watch) - } - } - } -} - -func TestRequestStream(t *testing.T) { - testCases := []struct { - Request *Request - Err bool - ErrFn func(error) bool - }{ - { - Request: &Request{err: errors.New("bail")}, - Err: true, - }, - { - Request: &Request{baseURL: &url.URL{}, pathPrefix: "%"}, - Err: true, - }, - { - Request: &Request{ - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, errors.New("err") - }), - baseURL: &url.URL{}, - }, - Err: true, - }, - { - Request: &Request{ - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return &http.Response{ - StatusCode: http.StatusUnauthorized, - Body: ioutil.NopCloser(bytes.NewReader([]byte(runtime.EncodeOrDie(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), &metav1.Status{ - Status: metav1.StatusFailure, - Reason: metav1.StatusReasonUnauthorized, - })))), - }, nil - }), - content: defaultContentConfig(), - serializers: defaultSerializers(t), - baseURL: &url.URL{}, - }, - Err: true, - }, - { - Request: &Request{ - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return &http.Response{ - StatusCode: http.StatusBadRequest, - Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"a container name must be specified for pod kube-dns-v20-mz5cv, choose one of: [kubedns dnsmasq healthz]","reason":"BadRequest","code":400}`))), - }, nil - }), - content: defaultContentConfig(), - serializers: defaultSerializers(t), - baseURL: &url.URL{}, - }, - Err: true, - ErrFn: func(err error) bool { - if err.Error() == "a container name must be specified for pod kube-dns-v20-mz5cv, choose one of: [kubedns dnsmasq healthz]" { - return true - } - return false - }, - }, - } - for i, testCase := range testCases { - testCase.Request.backoffMgr = &NoBackoff{} - body, err := testCase.Request.Stream() - hasErr := err != nil - if hasErr != testCase.Err { - t.Errorf("%d: expected %t, got %t: %v", i, testCase.Err, hasErr, err) - } - if hasErr && body != nil { - t.Errorf("%d: body should be nil when error is returned", i) - } - - if hasErr { - if testCase.ErrFn != nil && !testCase.ErrFn(err) { - t.Errorf("unexpected error: %v", err) - } - } - } -} - -type fakeUpgradeConnection struct{} - -func (c *fakeUpgradeConnection) CreateStream(headers http.Header) (httpstream.Stream, error) { - return nil, nil -} -func (c *fakeUpgradeConnection) Close() error { - return nil -} -func (c *fakeUpgradeConnection) CloseChan() <-chan bool { - return make(chan bool) -} -func (c *fakeUpgradeConnection) SetIdleTimeout(timeout time.Duration) { -} - -type fakeUpgradeRoundTripper struct { - req *http.Request - conn httpstream.Connection -} - -func (f *fakeUpgradeRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { - f.req = req - b := []byte{} - body := ioutil.NopCloser(bytes.NewReader(b)) - resp := &http.Response{ - StatusCode: 101, - Body: body, - } - return resp, nil -} - -func (f *fakeUpgradeRoundTripper) NewConnection(resp *http.Response) (httpstream.Connection, error) { - return f.conn, nil -} - -func TestRequestDo(t *testing.T) { - testCases := []struct { - Request *Request - Err bool - }{ - { - Request: &Request{err: errors.New("bail")}, - Err: true, - }, - { - Request: &Request{baseURL: &url.URL{}, pathPrefix: "%"}, - Err: true, - }, - { - Request: &Request{ - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, errors.New("err") - }), - baseURL: &url.URL{}, - }, - Err: true, - }, - } - for i, testCase := range testCases { - testCase.Request.backoffMgr = &NoBackoff{} - body, err := testCase.Request.Do().Raw() - hasErr := err != nil - if hasErr != testCase.Err { - t.Errorf("%d: expected %t, got %t: %v", i, testCase.Err, hasErr, err) - } - if hasErr && body != nil { - t.Errorf("%d: body should be nil when error is returned", i) - } - } -} - -func TestDoRequestNewWay(t *testing.T) { - reqBody := "request body" - expectedObj := &v1.Service{Spec: v1.ServiceSpec{Ports: []v1.ServicePort{{ - Protocol: "TCP", - Port: 12345, - TargetPort: intstr.FromInt(12345), - }}}} - expectedBody, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), expectedObj) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 200, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - c := testRESTClient(t, testServer) - obj, err := c.Verb("POST"). - Prefix("foo", "bar"). - Suffix("baz"). - Timeout(time.Second). - Body([]byte(reqBody)). - Do().Get() - if err != nil { - t.Errorf("Unexpected error: %v %#v", err, err) - return - } - if obj == nil { - t.Error("nil obj") - } else if !apiequality.Semantic.DeepDerivative(expectedObj, obj) { - t.Errorf("Expected: %#v, got %#v", expectedObj, obj) - } - requestURL := defaultResourcePathWithPrefix("foo/bar", "", "", "baz") - requestURL += "?timeout=1s" - fakeHandler.ValidateRequest(t, requestURL, "POST", &reqBody) -} - -// This test assumes that the client implementation backs off exponentially, for an individual request. -func TestBackoffLifecycle(t *testing.T) { - count := 0 - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - count++ - t.Logf("Attempt %d", count) - if count == 5 || count == 9 { - w.WriteHeader(http.StatusOK) - return - } else { - w.WriteHeader(http.StatusGatewayTimeout) - return - } - })) - defer testServer.Close() - c := testRESTClient(t, testServer) - - // Test backoff recovery and increase. This correlates to the constants - // which are used in the server implementation returning StatusOK above. - seconds := []int{0, 1, 2, 4, 8, 0, 1, 2, 4, 0} - request := c.Verb("POST").Prefix("backofftest").Suffix("abc") - clock := clock.FakeClock{} - request.backoffMgr = &URLBackoff{ - // Use a fake backoff here to avoid flakes and speed the test up. - Backoff: flowcontrol.NewFakeBackOff( - time.Duration(1)*time.Second, - time.Duration(200)*time.Second, - &clock, - )} - - for _, sec := range seconds { - thisBackoff := request.backoffMgr.CalculateBackoff(request.URL()) - t.Logf("Current backoff %v", thisBackoff) - if thisBackoff != time.Duration(sec)*time.Second { - t.Errorf("Backoff is %v instead of %v", thisBackoff, sec) - } - now := clock.Now() - request.DoRaw() - elapsed := clock.Since(now) - if clock.Since(now) != thisBackoff { - t.Errorf("CalculatedBackoff not honored by clock: Expected time of %v, but got %v ", thisBackoff, elapsed) - } - } -} - -type testBackoffManager struct { - sleeps []time.Duration -} - -func (b *testBackoffManager) UpdateBackoff(actualUrl *url.URL, err error, responseCode int) { -} - -func (b *testBackoffManager) CalculateBackoff(actualUrl *url.URL) time.Duration { - return time.Duration(0) -} - -func (b *testBackoffManager) Sleep(d time.Duration) { - b.sleeps = append(b.sleeps, d) -} - -func TestCheckRetryClosesBody(t *testing.T) { - count := 0 - ch := make(chan struct{}) - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - count++ - t.Logf("attempt %d", count) - if count >= 5 { - w.WriteHeader(http.StatusOK) - close(ch) - return - } - w.Header().Set("Retry-After", "1") - http.Error(w, "Too many requests, please try again later.", http.StatusTooManyRequests) - })) - defer testServer.Close() - - backoffMgr := &testBackoffManager{} - expectedSleeps := []time.Duration{0, time.Second, 0, time.Second, 0, time.Second, 0, time.Second, 0} - - c := testRESTClient(t, testServer) - c.createBackoffMgr = func() BackoffManager { return backoffMgr } - _, err := c.Verb("POST"). - Prefix("foo", "bar"). - Suffix("baz"). - Timeout(time.Second). - Body([]byte(strings.Repeat("abcd", 1000))). - DoRaw() - if err != nil { - t.Fatalf("Unexpected error: %v %#v", err, err) - } - <-ch - if count != 5 { - t.Errorf("unexpected retries: %d", count) - } - if !reflect.DeepEqual(backoffMgr.sleeps, expectedSleeps) { - t.Errorf("unexpected sleeps, expected: %v, got: %v", expectedSleeps, backoffMgr.sleeps) - } -} - -func TestConnectionResetByPeerIsRetried(t *testing.T) { - count := 0 - backoff := &testBackoffManager{} - req := &Request{ - verb: "GET", - client: clientFunc(func(req *http.Request) (*http.Response, error) { - count++ - if count >= 3 { - return &http.Response{ - StatusCode: 200, - Body: ioutil.NopCloser(bytes.NewReader([]byte{})), - }, nil - } - return nil, &net.OpError{Err: syscall.ECONNRESET} - }), - backoffMgr: backoff, - } - // We expect two retries of "connection reset by peer" and the success. - _, err := req.Do().Raw() - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - // We have a sleep before each retry (including the initial one) and for - // every "retry-after" call - thus 5 together. - if len(backoff.sleeps) != 5 { - t.Errorf("Expected 5 retries, got: %d", len(backoff.sleeps)) - } -} - -func TestCheckRetryHandles429And5xx(t *testing.T) { - count := 0 - ch := make(chan struct{}) - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - data, err := ioutil.ReadAll(req.Body) - if err != nil { - t.Fatalf("unable to read request body: %v", err) - } - if !bytes.Equal(data, []byte(strings.Repeat("abcd", 1000))) { - t.Fatalf("retry did not send a complete body: %s", data) - } - t.Logf("attempt %d", count) - if count >= 4 { - w.WriteHeader(http.StatusOK) - close(ch) - return - } - w.Header().Set("Retry-After", "0") - w.WriteHeader([]int{http.StatusTooManyRequests, 500, 501, 504}[count]) - count++ - })) - defer testServer.Close() - - c := testRESTClient(t, testServer) - _, err := c.Verb("POST"). - Prefix("foo", "bar"). - Suffix("baz"). - Timeout(time.Second). - Body([]byte(strings.Repeat("abcd", 1000))). - DoRaw() - if err != nil { - t.Fatalf("Unexpected error: %v %#v", err, err) - } - <-ch - if count != 4 { - t.Errorf("unexpected retries: %d", count) - } -} - -func BenchmarkCheckRetryClosesBody(b *testing.B) { - count := 0 - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - count++ - if count%3 == 0 { - w.WriteHeader(http.StatusOK) - return - } - w.Header().Set("Retry-After", "0") - w.WriteHeader(http.StatusTooManyRequests) - })) - defer testServer.Close() - - c := testRESTClient(b, testServer) - r := c.Verb("POST"). - Prefix("foo", "bar"). - Suffix("baz"). - Timeout(time.Second). - Body([]byte(strings.Repeat("abcd", 1000))) - - for i := 0; i < b.N; i++ { - if _, err := r.DoRaw(); err != nil { - b.Fatalf("Unexpected error: %v %#v", err, err) - } - } -} - -func TestDoRequestNewWayReader(t *testing.T) { - reqObj := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} - reqBodyExpected, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), reqObj) - expectedObj := &v1.Service{Spec: v1.ServiceSpec{Ports: []v1.ServicePort{{ - Protocol: "TCP", - Port: 12345, - TargetPort: intstr.FromInt(12345), - }}}} - expectedBody, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), expectedObj) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 200, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - c := testRESTClient(t, testServer) - obj, err := c.Verb("POST"). - Resource("bar"). - Name("baz"). - Prefix("foo"). - Timeout(time.Second). - Body(bytes.NewBuffer(reqBodyExpected)). - Do().Get() - if err != nil { - t.Errorf("Unexpected error: %v %#v", err, err) - return - } - if obj == nil { - t.Error("nil obj") - } else if !apiequality.Semantic.DeepDerivative(expectedObj, obj) { - t.Errorf("Expected: %#v, got %#v", expectedObj, obj) - } - tmpStr := string(reqBodyExpected) - requestURL := defaultResourcePathWithPrefix("foo", "bar", "", "baz") - requestURL += "?timeout=1s" - fakeHandler.ValidateRequest(t, requestURL, "POST", &tmpStr) -} - -func TestDoRequestNewWayObj(t *testing.T) { - reqObj := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} - reqBodyExpected, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), reqObj) - expectedObj := &v1.Service{Spec: v1.ServiceSpec{Ports: []v1.ServicePort{{ - Protocol: "TCP", - Port: 12345, - TargetPort: intstr.FromInt(12345), - }}}} - expectedBody, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), expectedObj) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 200, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - c := testRESTClient(t, testServer) - obj, err := c.Verb("POST"). - Suffix("baz"). - Name("bar"). - Resource("foo"). - Timeout(time.Second). - Body(reqObj). - Do().Get() - if err != nil { - t.Errorf("Unexpected error: %v %#v", err, err) - return - } - if obj == nil { - t.Error("nil obj") - } else if !apiequality.Semantic.DeepDerivative(expectedObj, obj) { - t.Errorf("Expected: %#v, got %#v", expectedObj, obj) - } - tmpStr := string(reqBodyExpected) - requestURL := defaultResourcePathWithPrefix("", "foo", "", "bar/baz") - requestURL += "?timeout=1s" - fakeHandler.ValidateRequest(t, requestURL, "POST", &tmpStr) -} - -func TestDoRequestNewWayFile(t *testing.T) { - reqObj := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} - reqBodyExpected, err := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), reqObj) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - - file, err := ioutil.TempFile("", "foo") - if err != nil { - t.Errorf("unexpected error: %v", err) - } - defer file.Close() - defer os.Remove(file.Name()) - - _, err = file.Write(reqBodyExpected) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - - expectedObj := &v1.Service{Spec: v1.ServiceSpec{Ports: []v1.ServicePort{{ - Protocol: "TCP", - Port: 12345, - TargetPort: intstr.FromInt(12345), - }}}} - expectedBody, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), expectedObj) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 200, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - c := testRESTClient(t, testServer) - wasCreated := true - obj, err := c.Verb("POST"). - Prefix("foo/bar", "baz"). - Timeout(time.Second). - Body(file.Name()). - Do().WasCreated(&wasCreated).Get() - if err != nil { - t.Errorf("Unexpected error: %v %#v", err, err) - return - } - if obj == nil { - t.Error("nil obj") - } else if !apiequality.Semantic.DeepDerivative(expectedObj, obj) { - t.Errorf("Expected: %#v, got %#v", expectedObj, obj) - } - if wasCreated { - t.Errorf("expected object was created") - } - tmpStr := string(reqBodyExpected) - requestURL := defaultResourcePathWithPrefix("foo/bar/baz", "", "", "") - requestURL += "?timeout=1s" - fakeHandler.ValidateRequest(t, requestURL, "POST", &tmpStr) -} - -func TestWasCreated(t *testing.T) { - reqObj := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} - reqBodyExpected, err := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), reqObj) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - - expectedObj := &v1.Service{Spec: v1.ServiceSpec{Ports: []v1.ServicePort{{ - Protocol: "TCP", - Port: 12345, - TargetPort: intstr.FromInt(12345), - }}}} - expectedBody, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), expectedObj) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 201, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - c := testRESTClient(t, testServer) - wasCreated := false - obj, err := c.Verb("PUT"). - Prefix("foo/bar", "baz"). - Timeout(time.Second). - Body(reqBodyExpected). - Do().WasCreated(&wasCreated).Get() - if err != nil { - t.Errorf("Unexpected error: %v %#v", err, err) - return - } - if obj == nil { - t.Error("nil obj") - } else if !apiequality.Semantic.DeepDerivative(expectedObj, obj) { - t.Errorf("Expected: %#v, got %#v", expectedObj, obj) - } - if !wasCreated { - t.Errorf("Expected object was created") - } - - tmpStr := string(reqBodyExpected) - requestURL := defaultResourcePathWithPrefix("foo/bar/baz", "", "", "") - requestURL += "?timeout=1s" - fakeHandler.ValidateRequest(t, requestURL, "PUT", &tmpStr) -} - -func TestVerbs(t *testing.T) { - c := testRESTClient(t, nil) - if r := c.Post(); r.verb != "POST" { - t.Errorf("Post verb is wrong") - } - if r := c.Put(); r.verb != "PUT" { - t.Errorf("Put verb is wrong") - } - if r := c.Get(); r.verb != "GET" { - t.Errorf("Get verb is wrong") - } - if r := c.Delete(); r.verb != "DELETE" { - t.Errorf("Delete verb is wrong") - } -} - -func TestAbsPath(t *testing.T) { - for i, tc := range []struct { - configPrefix string - resourcePrefix string - absPath string - wantsAbsPath string - }{ - {"/", "", "", "/"}, - {"", "", "/", "/"}, - {"", "", "/api", "/api"}, - {"", "", "/api/", "/api/"}, - {"", "", "/apis", "/apis"}, - {"", "/foo", "/bar/foo", "/bar/foo"}, - {"", "/api/foo/123", "/bar/foo", "/bar/foo"}, - {"/p1", "", "", "/p1"}, - {"/p1", "", "/", "/p1/"}, - {"/p1", "", "/api", "/p1/api"}, - {"/p1", "", "/apis", "/p1/apis"}, - {"/p1", "/r1", "/apis", "/p1/apis"}, - {"/p1", "/api/r1", "/apis", "/p1/apis"}, - {"/p1/api/p2", "", "", "/p1/api/p2"}, - {"/p1/api/p2", "", "/", "/p1/api/p2/"}, - {"/p1/api/p2", "", "/api", "/p1/api/p2/api"}, - {"/p1/api/p2", "", "/api/", "/p1/api/p2/api/"}, - {"/p1/api/p2", "/r1", "/api/", "/p1/api/p2/api/"}, - {"/p1/api/p2", "/api/r1", "/api/", "/p1/api/p2/api/"}, - } { - u, _ := url.Parse("http://localhost:123" + tc.configPrefix) - r := NewRequest(nil, "POST", u, "", ContentConfig{GroupVersion: &schema.GroupVersion{Group: "test"}}, Serializers{}, nil, nil, 0).Prefix(tc.resourcePrefix).AbsPath(tc.absPath) - if r.pathPrefix != tc.wantsAbsPath { - t.Errorf("test case %d failed, unexpected path: %q, expected %q", i, r.pathPrefix, tc.wantsAbsPath) - } - } -} - -func TestUnacceptableParamNames(t *testing.T) { - table := []struct { - name string - testVal string - expectSuccess bool - }{ - // timeout is no longer "protected" - {"timeout", "42", true}, - } - - for _, item := range table { - c := testRESTClient(t, nil) - r := c.Get().setParam(item.name, item.testVal) - if e, a := item.expectSuccess, r.err == nil; e != a { - t.Errorf("expected %v, got %v (%v)", e, a, r.err) - } - } -} - -func TestBody(t *testing.T) { - const data = "test payload" - - obj := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} - bodyExpected, _ := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), obj) - - f, err := ioutil.TempFile("", "test_body") - if err != nil { - t.Fatalf("TempFile error: %v", err) - } - if _, err := f.WriteString(data); err != nil { - t.Fatalf("TempFile.WriteString error: %v", err) - } - f.Close() - defer os.Remove(f.Name()) - - var nilObject *metav1.DeleteOptions - typedObject := interface{}(nilObject) - c := testRESTClient(t, nil) - tests := []struct { - input interface{} - expected string - headers map[string]string - }{ - {[]byte(data), data, nil}, - {f.Name(), data, nil}, - {strings.NewReader(data), data, nil}, - {obj, string(bodyExpected), map[string]string{"Content-Type": "application/json"}}, - {typedObject, "", nil}, - } - for i, tt := range tests { - r := c.Post().Body(tt.input) - if r.err != nil { - t.Errorf("%d: r.Body(%#v) error: %v", i, tt, r.err) - continue - } - if tt.headers != nil { - for k, v := range tt.headers { - if r.headers.Get(k) != v { - t.Errorf("%d: r.headers[%q] = %q; want %q", i, k, v, v) - } - } - } - - if r.body == nil { - if len(tt.expected) != 0 { - t.Errorf("%d: r.body = %q; want %q", i, r.body, tt.expected) - } - continue - } - buf := make([]byte, len(tt.expected)) - if _, err := r.body.Read(buf); err != nil { - t.Errorf("%d: r.body.Read error: %v", i, err) - continue - } - body := string(buf) - if body != tt.expected { - t.Errorf("%d: r.body = %q; want %q", i, body, tt.expected) - } - } -} - -func TestWatch(t *testing.T) { - var table = []struct { - t watch.EventType - obj runtime.Object - }{ - {watch.Added, &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "first"}}}, - {watch.Modified, &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "second"}}}, - {watch.Deleted, &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "last"}}}, - } - - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - flusher, ok := w.(http.Flusher) - if !ok { - panic("need flusher!") - } - - w.Header().Set("Transfer-Encoding", "chunked") - w.WriteHeader(http.StatusOK) - flusher.Flush() - - encoder := restclientwatch.NewEncoder(streaming.NewEncoder(w, scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion)), scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion)) - for _, item := range table { - if err := encoder.Encode(&watch.Event{Type: item.t, Object: item.obj}); err != nil { - panic(err) - } - flusher.Flush() - } - })) - defer testServer.Close() - - s := testRESTClient(t, testServer) - watching, err := s.Get().Prefix("path/to/watch/thing").Watch() - if err != nil { - t.Fatalf("Unexpected error") - } - - for _, item := range table { - got, ok := <-watching.ResultChan() - if !ok { - t.Fatalf("Unexpected early close") - } - if e, a := item.t, got.Type; e != a { - t.Errorf("Expected %v, got %v", e, a) - } - if e, a := item.obj, got.Object; !apiequality.Semantic.DeepDerivative(e, a) { - t.Errorf("Expected %v, got %v", e, a) - } - } - - _, ok := <-watching.ResultChan() - if ok { - t.Fatal("Unexpected non-close") - } -} - -func TestStream(t *testing.T) { - expectedBody := "expected body" - - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - flusher, ok := w.(http.Flusher) - if !ok { - panic("need flusher!") - } - w.Header().Set("Transfer-Encoding", "chunked") - w.WriteHeader(http.StatusOK) - w.Write([]byte(expectedBody)) - flusher.Flush() - })) - defer testServer.Close() - - s := testRESTClient(t, testServer) - readCloser, err := s.Get().Prefix("path/to/stream/thing").Stream() - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - defer readCloser.Close() - buf := new(bytes.Buffer) - buf.ReadFrom(readCloser) - resultBody := buf.String() - - if expectedBody != resultBody { - t.Errorf("Expected %s, got %s", expectedBody, resultBody) - } -} - -func testRESTClient(t testing.TB, srv *httptest.Server) *RESTClient { - baseURL, _ := url.Parse("http://localhost") - if srv != nil { - var err error - baseURL, err = url.Parse(srv.URL) - if err != nil { - t.Fatalf("failed to parse test URL: %v", err) - } - } - versionedAPIPath := defaultResourcePathWithPrefix("", "", "", "") - client, err := NewRESTClient(baseURL, versionedAPIPath, defaultContentConfig(), 0, 0, nil, nil) - if err != nil { - t.Fatalf("failed to create a client: %v", err) - } - return client -} - -func TestDoContext(t *testing.T) { - receivedCh := make(chan struct{}) - block := make(chan struct{}) - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - close(receivedCh) - <-block - w.WriteHeader(http.StatusOK) - })) - defer testServer.Close() - defer close(block) - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - go func() { - <-receivedCh - cancel() - }() - - c := testRESTClient(t, testServer) - _, err := c.Verb("GET"). - Context(ctx). - Prefix("foo"). - DoRaw() - if err == nil { - t.Fatal("Expected context cancellation error") - } -} - -func buildString(length int) string { - s := make([]byte, length) - for i := range s { - s[i] = 'a' - } - return string(s) -} - -func TestTruncateBody(t *testing.T) { - tests := []struct { - body string - want string - level string - }{ - // Anything below 8 is completely truncated - { - body: "Completely truncated below 8", - want: " [truncated 28 chars]", - level: "0", - }, - // Small strings are not truncated by high levels - { - body: "Small body never gets truncated", - want: "Small body never gets truncated", - level: "10", - }, - { - body: "Small body never gets truncated", - want: "Small body never gets truncated", - level: "8", - }, - // Strings are truncated to 1024 if level is less than 9. - { - body: buildString(2000), - level: "8", - want: fmt.Sprintf("%s [truncated 976 chars]", buildString(1024)), - }, - // Strings are truncated to 10240 if level is 9. - { - body: buildString(20000), - level: "9", - want: fmt.Sprintf("%s [truncated 9760 chars]", buildString(10240)), - }, - // Strings are not truncated if level is 10 or higher - { - body: buildString(20000), - level: "10", - want: buildString(20000), - }, - // Strings are not truncated if level is 10 or higher - { - body: buildString(20000), - level: "11", - want: buildString(20000), - }, - } - - l := flag.Lookup("v").Value.(flag.Getter).Get().(glog.Level) - for _, test := range tests { - flag.Set("v", test.level) - got := truncateBody(test.body) - if got != test.want { - t.Errorf("truncateBody(%v) = %v, want %v", test.body, got, test.want) - } - } - flag.Set("v", l.String()) -} - -func defaultResourcePathWithPrefix(prefix, resource, namespace, name string) string { - var path string - path = "/api/" + v1.SchemeGroupVersion.Version - - if prefix != "" { - path = path + "/" + prefix - } - if namespace != "" { - path = path + "/namespaces/" + namespace - } - // Resource names are lower case. - resource = strings.ToLower(resource) - if resource != "" { - path = path + "/" + resource - } - if name != "" { - path = path + "/" + name - } - return path -} diff --git a/vendor/k8s.io/client-go/rest/url_utils_test.go b/vendor/k8s.io/client-go/rest/url_utils_test.go deleted file mode 100644 index 6321678a..00000000 --- a/vendor/k8s.io/client-go/rest/url_utils_test.go +++ /dev/null @@ -1,61 +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 rest - -import ( - "path" - "testing" - - "k8s.io/api/core/v1" -) - -func TestValidatesHostParameter(t *testing.T) { - testCases := []struct { - Host string - APIPath string - - URL string - Err bool - }{ - {"127.0.0.1", "", "http://127.0.0.1/" + v1.SchemeGroupVersion.Version, false}, - {"127.0.0.1:8080", "", "http://127.0.0.1:8080/" + v1.SchemeGroupVersion.Version, false}, - {"foo.bar.com", "", "http://foo.bar.com/" + v1.SchemeGroupVersion.Version, false}, - {"http://host/prefix", "", "http://host/prefix/" + v1.SchemeGroupVersion.Version, false}, - {"http://host", "", "http://host/" + v1.SchemeGroupVersion.Version, false}, - {"http://host", "/", "http://host/" + v1.SchemeGroupVersion.Version, false}, - {"http://host", "/other", "http://host/other/" + v1.SchemeGroupVersion.Version, false}, - {"host/server", "", "", true}, - } - for i, testCase := range testCases { - u, versionedAPIPath, err := DefaultServerURL(testCase.Host, testCase.APIPath, v1.SchemeGroupVersion, false) - switch { - case err == nil && testCase.Err: - t.Errorf("expected error but was nil") - continue - case err != nil && !testCase.Err: - t.Errorf("unexpected error %v", err) - continue - case err != nil: - continue - } - u.Path = path.Join(u.Path, versionedAPIPath) - if e, a := testCase.URL, u.String(); e != a { - t.Errorf("%d: expected host %s, got %s", i, e, a) - continue - } - } -} diff --git a/vendor/k8s.io/client-go/rest/urlbackoff_test.go b/vendor/k8s.io/client-go/rest/urlbackoff_test.go deleted file mode 100644 index c5f43923..00000000 --- a/vendor/k8s.io/client-go/rest/urlbackoff_test.go +++ /dev/null @@ -1,79 +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 ( - "net/url" - "testing" - "time" - - "k8s.io/client-go/util/flowcontrol" -) - -func parse(raw string) *url.URL { - theUrl, _ := url.Parse(raw) - return theUrl -} - -func TestURLBackoffFunctionalityCollisions(t *testing.T) { - myBackoff := &URLBackoff{ - Backoff: flowcontrol.NewBackOff(1*time.Second, 60*time.Second), - } - - // Add some noise and make sure backoff for a clean URL is zero. - myBackoff.UpdateBackoff(parse("http://100.200.300.400:8080"), nil, 500) - - myBackoff.UpdateBackoff(parse("http://1.2.3.4:8080"), nil, 500) - - if myBackoff.CalculateBackoff(parse("http://1.2.3.4:100")) > 0 { - t.Errorf("URLs are colliding in the backoff map!") - } -} - -// TestURLBackoffFunctionality generally tests the URLBackoff wrapper. We avoid duplicating tests from backoff and request. -func TestURLBackoffFunctionality(t *testing.T) { - myBackoff := &URLBackoff{ - Backoff: flowcontrol.NewBackOff(1*time.Second, 60*time.Second), - } - - // Now test that backoff increases, then recovers. - // 200 and 300 should both result in clearing the backoff. - // all others like 429 should result in increased backoff. - seconds := []int{0, - 1, 2, 4, 8, 0, - 1, 2} - returnCodes := []int{ - 429, 500, 501, 502, 300, - 500, 501, 502, - } - - if len(seconds) != len(returnCodes) { - t.Fatalf("responseCode to backoff arrays should be the same length... sanity check failed.") - } - - for i, sec := range seconds { - backoffSec := myBackoff.CalculateBackoff(parse("http://1.2.3.4:100")) - if backoffSec < time.Duration(sec)*time.Second || backoffSec > time.Duration(sec+5)*time.Second { - t.Errorf("Backoff out of range %v: %v %v", i, sec, backoffSec) - } - myBackoff.UpdateBackoff(parse("http://1.2.3.4:100/responseCodeForFuncTest"), nil, returnCodes[i]) - } - - if myBackoff.CalculateBackoff(parse("http://1.2.3.4:100")) == 0 { - t.Errorf("The final return code %v should have resulted in a backoff ! ", returnCodes[7]) - } -} diff --git a/vendor/k8s.io/client-go/rest/watch/decoder_test.go b/vendor/k8s.io/client-go/rest/watch/decoder_test.go deleted file mode 100644 index 2d29d437..00000000 --- a/vendor/k8s.io/client-go/rest/watch/decoder_test.go +++ /dev/null @@ -1,123 +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 versioned_test - -import ( - "encoding/json" - "io" - "testing" - "time" - - "k8s.io/api/core/v1" - apiequality "k8s.io/apimachinery/pkg/api/equality" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" - runtimejson "k8s.io/apimachinery/pkg/runtime/serializer/json" - "k8s.io/apimachinery/pkg/runtime/serializer/streaming" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/kubernetes/scheme" - restclientwatch "k8s.io/client-go/rest/watch" -) - -// getDecoder mimics how k8s.io/client-go/rest.createSerializers creates a decoder -func getDecoder() runtime.Decoder { - jsonSerializer := runtimejson.NewSerializer(runtimejson.DefaultMetaFactory, scheme.Scheme, scheme.Scheme, false) - directCodecFactory := serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} - return directCodecFactory.DecoderToVersion(jsonSerializer, v1.SchemeGroupVersion) -} - -func TestDecoder(t *testing.T) { - table := []watch.EventType{watch.Added, watch.Deleted, watch.Modified, watch.Error} - - for _, eventType := range table { - out, in := io.Pipe() - - decoder := restclientwatch.NewDecoder(streaming.NewDecoder(out, getDecoder()), getDecoder()) - - expect := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} - encoder := json.NewEncoder(in) - go func() { - data, err := runtime.Encode(scheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), expect) - if err != nil { - t.Fatalf("Unexpected error %v", err) - } - event := metav1.WatchEvent{ - Type: string(eventType), - Object: runtime.RawExtension{Raw: json.RawMessage(data)}, - } - if err := encoder.Encode(&event); err != nil { - t.Errorf("Unexpected error %v", err) - } - in.Close() - }() - - done := make(chan struct{}) - go func() { - action, got, err := decoder.Decode() - if err != nil { - t.Fatalf("Unexpected error %v", err) - } - if e, a := eventType, action; e != a { - t.Errorf("Expected %v, got %v", e, a) - } - if e, a := expect, got; !apiequality.Semantic.DeepDerivative(e, a) { - t.Errorf("Expected %v, got %v", e, a) - } - t.Logf("Exited read") - close(done) - }() - <-done - - done = make(chan struct{}) - go func() { - _, _, err := decoder.Decode() - if err == nil { - t.Errorf("Unexpected nil error") - } - close(done) - }() - <-done - - decoder.Close() - } -} - -func TestDecoder_SourceClose(t *testing.T) { - out, in := io.Pipe() - decoder := restclientwatch.NewDecoder(streaming.NewDecoder(out, getDecoder()), getDecoder()) - - done := make(chan struct{}) - - go func() { - _, _, err := decoder.Decode() - if err == nil { - t.Errorf("Unexpected nil error") - } - close(done) - }() - - in.Close() - - select { - case <-done: - break - case <-time.After(wait.ForeverTestTimeout): - t.Error("Timeout") - } -} diff --git a/vendor/k8s.io/client-go/rest/watch/encoder_test.go b/vendor/k8s.io/client-go/rest/watch/encoder_test.go deleted file mode 100644 index 1388d1cc..00000000 --- a/vendor/k8s.io/client-go/rest/watch/encoder_test.go +++ /dev/null @@ -1,84 +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 versioned_test - -import ( - "bytes" - "io/ioutil" - "testing" - - "k8s.io/api/core/v1" - apiequality "k8s.io/apimachinery/pkg/api/equality" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" - runtimejson "k8s.io/apimachinery/pkg/runtime/serializer/json" - "k8s.io/apimachinery/pkg/runtime/serializer/streaming" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/kubernetes/scheme" - restclientwatch "k8s.io/client-go/rest/watch" -) - -// getEncoder mimics how k8s.io/client-go/rest.createSerializers creates a encoder -func getEncoder() runtime.Encoder { - jsonSerializer := runtimejson.NewSerializer(runtimejson.DefaultMetaFactory, scheme.Scheme, scheme.Scheme, false) - directCodecFactory := serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} - return directCodecFactory.EncoderForVersion(jsonSerializer, v1.SchemeGroupVersion) -} - -func TestEncodeDecodeRoundTrip(t *testing.T) { - testCases := []struct { - Type watch.EventType - Object runtime.Object - }{ - { - watch.Added, - &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, - }, - { - watch.Modified, - &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, - }, - { - watch.Deleted, - &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, - }, - } - for i, testCase := range testCases { - buf := &bytes.Buffer{} - - encoder := restclientwatch.NewEncoder(streaming.NewEncoder(buf, getEncoder()), getEncoder()) - if err := encoder.Encode(&watch.Event{Type: testCase.Type, Object: testCase.Object}); err != nil { - t.Errorf("%d: unexpected error: %v", i, err) - continue - } - - rc := ioutil.NopCloser(buf) - decoder := restclientwatch.NewDecoder(streaming.NewDecoder(rc, getDecoder()), getDecoder()) - event, obj, err := decoder.Decode() - if err != nil { - t.Errorf("%d: unexpected error: %v", i, err) - continue - } - if !apiequality.Semantic.DeepDerivative(testCase.Object, obj) { - t.Errorf("%d: expected %#v, got %#v", i, testCase.Object, obj) - } - if event != testCase.Type { - t.Errorf("%d: unexpected type: %#v", i, event) - } - } -} diff --git a/vendor/k8s.io/client-go/testing/fixture_test.go b/vendor/k8s.io/client-go/testing/fixture_test.go deleted file mode 100644 index 405fe1a7..00000000 --- a/vendor/k8s.io/client-go/testing/fixture_test.go +++ /dev/null @@ -1,235 +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 testing - -import ( - "fmt" - "math/rand" - "strconv" - "sync" - "testing" - - "github.com/stretchr/testify/assert" - - "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - runtime "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - "k8s.io/apimachinery/pkg/watch" -) - -func getArbitraryResource(s schema.GroupVersionResource, name, namespace string) *unstructured.Unstructured { - return &unstructured.Unstructured{ - Object: map[string]interface{}{ - "kind": s.Resource, - "apiVersion": s.Version, - "metadata": map[string]interface{}{ - "name": name, - "namespace": namespace, - "generateName": "test_generateName", - "uid": "test_uid", - "resourceVersion": "test_resourceVersion", - "selfLink": "test_selfLink", - }, - "data": strconv.Itoa(rand.Int()), - }, - } -} - -func TestWatchCallNonNamespace(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.Fatalf("test resource watch failed in %s: %v ", ns, err) - } - go func() { - err := o.Create(testResource, testObj, ns) - if err != nil { - t.Errorf("test resource creation failed: %v", err) - } - }() - out := <-watch.ResultChan() - assert.Equal(t, testObj, out.Object, "watched object mismatch") -} - -func TestWatchCallAllNamespace(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()) - 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") - }() - out := <-w.ResultChan() - outAll := <-wAll.ResultChan() - assert.Equal(t, watch.Added, out.Type, "watch event mismatch") - assert.Equal(t, watch.Added, outAll.Type, "watch event mismatch") - assert.Equal(t, testObj, out.Object, "watched created object mismatch") - assert.Equal(t, testObj, outAll.Object, "watched created object mismatch") - go func() { - err := o.Update(testResource, testObj, ns) - assert.NoError(t, err, "test resource updating failed") - }() - out = <-w.ResultChan() - outAll = <-wAll.ResultChan() - assert.Equal(t, watch.Modified, out.Type, "watch event mismatch") - assert.Equal(t, watch.Modified, outAll.Type, "watch event mismatch") - assert.Equal(t, testObj, out.Object, "watched updated object mismatch") - assert.Equal(t, testObj, outAll.Object, "watched updated object mismatch") - go func() { - err := o.Delete(testResource, "test_namespace", "test_name") - assert.NoError(t, err, "test resource deletion failed") - }() - out = <-w.ResultChan() - outAll = <-wAll.ResultChan() - assert.Equal(t, watch.Deleted, out.Type, "watch event mismatch") - assert.Equal(t, watch.Deleted, outAll.Type, "watch event mismatch") - assert.Equal(t, testObj, out.Object, "watched deleted object mismatch") - assert.Equal(t, testObj, outAll.Object, "watched deleted object mismatch") -} - -func TestWatchCallMultipleInvocation(t *testing.T) { - cases := []struct { - name string - op watch.EventType - }{ - { - "foo", - watch.Added, - }, - { - "bar", - watch.Added, - }, - { - "bar", - watch.Modified, - }, - { - "foo", - watch.Deleted, - }, - { - "bar", - watch.Deleted, - }, - } - - scheme := runtime.NewScheme() - codecs := serializer.NewCodecFactory(scheme) - testResource := schema.GroupVersionResource{Group: "", Version: "test_version", Resource: "test_kind"} - - o := NewObjectTracker(scheme, codecs.UniversalDecoder()) - watchNamespaces := []string{ - "", - "", - "test_namespace", - "test_namespace", - } - var wg sync.WaitGroup - wg.Add(len(watchNamespaces)) - 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 { - fmt.Printf("%#v %#v\n", c, i) - event := <-w.ResultChan() - accessor, err := meta.Accessor(event.Object) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - assert.Equal(t, c.op, event.Type, "watch event mismatched") - assert.Equal(t, c.name, accessor.GetName(), "watched object mismatch") - } - wg.Done() - }() - } - for _, c := range cases { - switch c.op { - case watch.Added: - obj := getArbitraryResource(testResource, c.name, "test_namespace") - o.Create(testResource, obj, "test_namespace") - case watch.Modified: - obj := getArbitraryResource(testResource, c.name, "test_namespace") - o.Update(testResource, obj, "test_namespace") - case watch.Deleted: - o.Delete(testResource, "test_namespace", c.name) - } - } - 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/vendor/k8s.io/client-go/tools/auth/clientauth_test.go b/vendor/k8s.io/client-go/tools/auth/clientauth_test.go deleted file mode 100644 index 11f7369d..00000000 --- a/vendor/k8s.io/client-go/tools/auth/clientauth_test.go +++ /dev/null @@ -1,69 +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 auth_test - -import ( - "io/ioutil" - "os" - "reflect" - "testing" - - clientauth "k8s.io/client-go/tools/auth" -) - -func TestLoadFromFile(t *testing.T) { - loadAuthInfoTests := []struct { - authData string - authInfo *clientauth.Info - expectErr bool - }{ - { - `{"user": "user", "password": "pass"}`, - &clientauth.Info{User: "user", Password: "pass"}, - false, - }, - { - "", nil, true, - }, - } - for _, loadAuthInfoTest := range loadAuthInfoTests { - tt := loadAuthInfoTest - aifile, err := ioutil.TempFile("", "testAuthInfo") - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - if tt.authData != "missing" { - defer os.Remove(aifile.Name()) - defer aifile.Close() - _, err = aifile.WriteString(tt.authData) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - } else { - aifile.Close() - os.Remove(aifile.Name()) - } - authInfo, err := clientauth.LoadFromFile(aifile.Name()) - gotErr := err != nil - if gotErr != tt.expectErr { - t.Errorf("expected errorness: %v, actual errorness: %v", tt.expectErr, gotErr) - } - if !reflect.DeepEqual(authInfo, tt.authInfo) { - t.Errorf("Expected %v, got %v", tt.authInfo, authInfo) - } - } -} diff --git a/vendor/k8s.io/client-go/tools/cache/OWNERS b/vendor/k8s.io/client-go/tools/cache/OWNERS deleted file mode 100755 index 727377f9..00000000 --- a/vendor/k8s.io/client-go/tools/cache/OWNERS +++ /dev/null @@ -1,50 +0,0 @@ -approvers: -- thockin -- lavalamp -- smarterclayton -- wojtek-t -- deads2k -- caesarxuchao -- liggitt -- ncdc -reviewers: -- thockin -- lavalamp -- smarterclayton -- wojtek-t -- deads2k -- brendandburns -- derekwaynecarr -- caesarxuchao -- mikedanese -- liggitt -- nikhiljindal -- erictune -- davidopp -- pmorie -- kargakis -- janetkuo -- justinsb -- eparis -- soltysh -- jsafrane -- dims -- madhusudancs -- hongchaodeng -- krousey -- markturansky -- fgrzadkowski -- xiang90 -- mml -- ingvagabund -- resouer -- jessfraz -- david-mcmahon -- mfojtik -- '249043822' -- lixiaobing10051267 -- ddysher -- mqliang -- feihujiang -- sdminonne -- ncdc diff --git a/vendor/k8s.io/client-go/tools/cache/controller_test.go b/vendor/k8s.io/client-go/tools/cache/controller_test.go deleted file mode 100644 index 64aca8d7..00000000 --- a/vendor/k8s.io/client-go/tools/cache/controller_test.go +++ /dev/null @@ -1,405 +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 cache - -import ( - "fmt" - "math/rand" - "sync" - "testing" - "time" - - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apimachinery/pkg/watch" - fcache "k8s.io/client-go/tools/cache/testing" - - "github.com/google/gofuzz" -) - -func Example() { - // source simulates an apiserver object endpoint. - source := fcache.NewFakeControllerSource() - - // This will hold the downstream state, as we know it. - downstream := NewStore(DeletionHandlingMetaNamespaceKeyFunc) - - // This will hold incoming changes. Note how we pass downstream in as a - // KeyLister, that way resync operations will result in the correct set - // of update/delete deltas. - fifo := NewDeltaFIFO(MetaNamespaceKeyFunc, downstream) - - // Let's do threadsafe output to get predictable test results. - deletionCounter := make(chan string, 1000) - - cfg := &Config{ - Queue: fifo, - ListerWatcher: source, - ObjectType: &v1.Pod{}, - FullResyncPeriod: time.Millisecond * 100, - RetryOnError: false, - - // Let's implement a simple controller that just deletes - // everything that comes in. - Process: func(obj interface{}) error { - // Obj is from the Pop method of the Queue we make above. - newest := obj.(Deltas).Newest() - - if newest.Type != Deleted { - // Update our downstream store. - err := downstream.Add(newest.Object) - if err != nil { - return err - } - - // Delete this object. - source.Delete(newest.Object.(runtime.Object)) - } else { - // Update our downstream store. - err := downstream.Delete(newest.Object) - if err != nil { - return err - } - - // fifo's KeyOf is easiest, because it handles - // DeletedFinalStateUnknown markers. - key, err := fifo.KeyOf(newest.Object) - if err != nil { - return err - } - - // Report this deletion. - deletionCounter <- key - } - return nil - }, - } - - // Create the controller and run it until we close stop. - stop := make(chan struct{}) - defer close(stop) - go New(cfg).Run(stop) - - // Let's add a few objects to the source. - testIDs := []string{"a-hello", "b-controller", "c-framework"} - for _, name := range testIDs { - // Note that these pods are not valid-- the fake source doesn't - // call validation or anything. - source.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: name}}) - } - - // Let's wait for the controller to process the things we just added. - outputSet := sets.String{} - for i := 0; i < len(testIDs); i++ { - outputSet.Insert(<-deletionCounter) - } - - for _, key := range outputSet.List() { - fmt.Println(key) - } - // Output: - // a-hello - // b-controller - // c-framework -} - -func ExampleNewInformer() { - // source simulates an apiserver object endpoint. - source := fcache.NewFakeControllerSource() - - // Let's do threadsafe output to get predictable test results. - deletionCounter := make(chan string, 1000) - - // Make a controller that immediately deletes anything added to it, and - // logs anything deleted. - _, controller := NewInformer( - source, - &v1.Pod{}, - time.Millisecond*100, - ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { - source.Delete(obj.(runtime.Object)) - }, - DeleteFunc: func(obj interface{}) { - key, err := DeletionHandlingMetaNamespaceKeyFunc(obj) - if err != nil { - key = "oops something went wrong with the key" - } - - // Report this deletion. - deletionCounter <- key - }, - }, - ) - - // Run the controller and run it until we close stop. - stop := make(chan struct{}) - defer close(stop) - go controller.Run(stop) - - // Let's add a few objects to the source. - testIDs := []string{"a-hello", "b-controller", "c-framework"} - for _, name := range testIDs { - // Note that these pods are not valid-- the fake source doesn't - // call validation or anything. - source.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: name}}) - } - - // Let's wait for the controller to process the things we just added. - outputSet := sets.String{} - for i := 0; i < len(testIDs); i++ { - outputSet.Insert(<-deletionCounter) - } - - for _, key := range outputSet.List() { - fmt.Println(key) - } - // Output: - // a-hello - // b-controller - // c-framework -} - -func TestHammerController(t *testing.T) { - // This test executes a bunch of requests through the fake source and - // controller framework to make sure there's no locking/threading - // errors. If an error happens, it should hang forever or trigger the - // race detector. - - // source simulates an apiserver object endpoint. - source := fcache.NewFakeControllerSource() - - // Let's do threadsafe output to get predictable test results. - outputSetLock := sync.Mutex{} - // map of key to operations done on the key - outputSet := map[string][]string{} - - recordFunc := func(eventType string, obj interface{}) { - key, err := DeletionHandlingMetaNamespaceKeyFunc(obj) - if err != nil { - t.Errorf("something wrong with key: %v", err) - key = "oops something went wrong with the key" - } - - // Record some output when items are deleted. - outputSetLock.Lock() - defer outputSetLock.Unlock() - outputSet[key] = append(outputSet[key], eventType) - } - - // Make a controller which just logs all the changes it gets. - _, controller := NewInformer( - source, - &v1.Pod{}, - time.Millisecond*100, - ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { recordFunc("add", obj) }, - UpdateFunc: func(oldObj, newObj interface{}) { recordFunc("update", newObj) }, - DeleteFunc: func(obj interface{}) { recordFunc("delete", obj) }, - }, - ) - - if controller.HasSynced() { - t.Errorf("Expected HasSynced() to return false before we started the controller") - } - - // Run the controller and run it until we close stop. - stop := make(chan struct{}) - go controller.Run(stop) - - // Let's wait for the controller to do its initial sync - wait.Poll(100*time.Millisecond, wait.ForeverTestTimeout, func() (bool, error) { - return controller.HasSynced(), nil - }) - if !controller.HasSynced() { - t.Errorf("Expected HasSynced() to return true after the initial sync") - } - - wg := sync.WaitGroup{} - const threads = 3 - wg.Add(threads) - for i := 0; i < threads; i++ { - go func() { - defer wg.Done() - // Let's add a few objects to the source. - currentNames := sets.String{} - rs := rand.NewSource(rand.Int63()) - f := fuzz.New().NilChance(.5).NumElements(0, 2).RandSource(rs) - r := rand.New(rs) // Mustn't use r and f concurrently! - for i := 0; i < 100; i++ { - var name string - var isNew bool - if currentNames.Len() == 0 || r.Intn(3) == 1 { - f.Fuzz(&name) - isNew = true - } else { - l := currentNames.List() - name = l[r.Intn(len(l))] - } - - pod := &v1.Pod{} - f.Fuzz(pod) - pod.ObjectMeta.Name = name - pod.ObjectMeta.Namespace = "default" - // Add, update, or delete randomly. - // Note that these pods are not valid-- the fake source doesn't - // call validation or perform any other checking. - if isNew { - currentNames.Insert(name) - source.Add(pod) - continue - } - switch r.Intn(2) { - case 0: - currentNames.Insert(name) - source.Modify(pod) - case 1: - currentNames.Delete(name) - source.Delete(pod) - } - } - }() - } - wg.Wait() - - // Let's wait for the controller to finish processing the things we just added. - // TODO: look in the queue to see how many items need to be processed. - time.Sleep(100 * time.Millisecond) - close(stop) - - // TODO: Verify that no goroutines were leaked here and that everything shut - // down cleanly. - - outputSetLock.Lock() - t.Logf("got: %#v", outputSet) -} - -func TestUpdate(t *testing.T) { - // This test is going to exercise the various paths that result in a - // call to update. - - // source simulates an apiserver object endpoint. - source := fcache.NewFakeControllerSource() - - const ( - FROM = "from" - TO = "to" - ) - - // These are the transitions we expect to see; because this is - // asynchronous, there are a lot of valid possibilities. - type pair struct{ from, to string } - allowedTransitions := map[pair]bool{ - {FROM, TO}: true, - - // Because a resync can happen when we've already observed one - // of the above but before the item is deleted. - {TO, TO}: true, - // Because a resync could happen before we observe an update. - {FROM, FROM}: true, - } - - pod := func(name, check string, final bool) *v1.Pod { - p := &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Labels: map[string]string{"check": check}, - }, - } - if final { - p.Labels["final"] = "true" - } - return p - } - deletePod := func(p *v1.Pod) bool { - return p.Labels["final"] == "true" - } - - tests := []func(string){ - func(name string) { - name = "a-" + name - source.Add(pod(name, FROM, false)) - source.Modify(pod(name, TO, true)) - }, - } - - const threads = 3 - - var testDoneWG sync.WaitGroup - testDoneWG.Add(threads * len(tests)) - - // Make a controller that deletes things once it observes an update. - // It calls Done() on the wait group on deletions so we can tell when - // everything we've added has been deleted. - watchCh := make(chan struct{}) - _, controller := NewInformer( - &testLW{ - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - watch, err := source.Watch(options) - close(watchCh) - return watch, err - }, - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - return source.List(options) - }, - }, - &v1.Pod{}, - 0, - ResourceEventHandlerFuncs{ - UpdateFunc: func(oldObj, newObj interface{}) { - o, n := oldObj.(*v1.Pod), newObj.(*v1.Pod) - from, to := o.Labels["check"], n.Labels["check"] - if !allowedTransitions[pair{from, to}] { - t.Errorf("observed transition %q -> %q for %v", from, to, n.Name) - } - if deletePod(n) { - source.Delete(n) - } - }, - DeleteFunc: func(obj interface{}) { - testDoneWG.Done() - }, - }, - ) - - // Run the controller and run it until we close stop. - // Once Run() is called, calls to testDoneWG.Done() might start, so - // all testDoneWG.Add() calls must happen before this point - stop := make(chan struct{}) - go controller.Run(stop) - <-watchCh - - // run every test a few times, in parallel - var wg sync.WaitGroup - wg.Add(threads * len(tests)) - for i := 0; i < threads; i++ { - for j, f := range tests { - go func(name string, f func(string)) { - defer wg.Done() - f(name) - }(fmt.Sprintf("%v-%v", i, j), f) - } - } - wg.Wait() - - // Let's wait for the controller to process the things we just added. - testDoneWG.Wait() - close(stop) -} diff --git a/vendor/k8s.io/client-go/tools/cache/delta_fifo_test.go b/vendor/k8s.io/client-go/tools/cache/delta_fifo_test.go deleted file mode 100644 index 9f8e5758..00000000 --- a/vendor/k8s.io/client-go/tools/cache/delta_fifo_test.go +++ /dev/null @@ -1,492 +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 cache - -import ( - "fmt" - "reflect" - "testing" - "time" -) - -// helper function to reduce stuttering -func testPop(f *DeltaFIFO) testFifoObject { - return Pop(f).(Deltas).Newest().Object.(testFifoObject) -} - -// keyLookupFunc adapts a raw function to be a KeyLookup. -type keyLookupFunc func() []testFifoObject - -// ListKeys just calls kl. -func (kl keyLookupFunc) ListKeys() []string { - result := []string{} - for _, fifoObj := range kl() { - result = append(result, fifoObj.name) - } - return result -} - -// GetByKey returns the key if it exists in the list returned by kl. -func (kl keyLookupFunc) GetByKey(key string) (interface{}, bool, error) { - for _, v := range kl() { - if v.name == key { - return v, true, nil - } - } - return nil, false, nil -} - -func TestDeltaFIFO_basic(t *testing.T) { - f := NewDeltaFIFO(testFifoObjectKeyFunc, nil) - const amount = 500 - go func() { - for i := 0; i < amount; i++ { - f.Add(mkFifoObj(string([]rune{'a', rune(i)}), i+1)) - } - }() - go func() { - for u := uint64(0); u < amount; u++ { - f.Add(mkFifoObj(string([]rune{'b', rune(u)}), u+1)) - } - }() - - lastInt := int(0) - lastUint := uint64(0) - for i := 0; i < amount*2; i++ { - switch obj := testPop(f).val.(type) { - case int: - if obj <= lastInt { - t.Errorf("got %v (int) out of order, last was %v", obj, lastInt) - } - lastInt = obj - case uint64: - if obj <= lastUint { - t.Errorf("got %v (uint) out of order, last was %v", obj, lastUint) - } else { - lastUint = obj - } - default: - t.Fatalf("unexpected type %#v", obj) - } - } -} - -func TestDeltaFIFO_requeueOnPop(t *testing.T) { - f := NewDeltaFIFO(testFifoObjectKeyFunc, nil) - - f.Add(mkFifoObj("foo", 10)) - _, err := f.Pop(func(obj interface{}) error { - if obj.(Deltas)[0].Object.(testFifoObject).name != "foo" { - t.Fatalf("unexpected object: %#v", obj) - } - return ErrRequeue{Err: nil} - }) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if _, ok, err := f.GetByKey("foo"); !ok || err != nil { - t.Fatalf("object should have been requeued: %t %v", ok, err) - } - - _, err = f.Pop(func(obj interface{}) error { - if obj.(Deltas)[0].Object.(testFifoObject).name != "foo" { - t.Fatalf("unexpected object: %#v", obj) - } - return ErrRequeue{Err: fmt.Errorf("test error")} - }) - if err == nil || err.Error() != "test error" { - t.Fatalf("unexpected error: %v", err) - } - if _, ok, err := f.GetByKey("foo"); !ok || err != nil { - t.Fatalf("object should have been requeued: %t %v", ok, err) - } - - _, err = f.Pop(func(obj interface{}) error { - if obj.(Deltas)[0].Object.(testFifoObject).name != "foo" { - t.Fatalf("unexpected object: %#v", obj) - } - return nil - }) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if _, ok, err := f.GetByKey("foo"); ok || err != nil { - t.Fatalf("object should have been removed: %t %v", ok, err) - } -} - -func TestDeltaFIFO_addUpdate(t *testing.T) { - f := NewDeltaFIFO(testFifoObjectKeyFunc, nil) - f.Add(mkFifoObj("foo", 10)) - f.Update(mkFifoObj("foo", 12)) - f.Delete(mkFifoObj("foo", 15)) - - if e, a := []interface{}{mkFifoObj("foo", 15)}, f.List(); !reflect.DeepEqual(e, a) { - t.Errorf("Expected %+v, got %+v", e, a) - } - if e, a := []string{"foo"}, f.ListKeys(); !reflect.DeepEqual(e, a) { - t.Errorf("Expected %+v, got %+v", e, a) - } - - got := make(chan testFifoObject, 2) - go func() { - for { - obj := testPop(f) - t.Logf("got a thing %#v", obj) - t.Logf("D len: %v", len(f.queue)) - got <- obj - } - }() - - first := <-got - if e, a := 15, first.val; e != a { - t.Errorf("Didn't get updated value (%v), got %v", e, a) - } - select { - case unexpected := <-got: - t.Errorf("Got second value %v", unexpected.val) - case <-time.After(50 * time.Millisecond): - } - _, exists, _ := f.Get(mkFifoObj("foo", "")) - if exists { - t.Errorf("item did not get removed") - } -} - -func TestDeltaFIFO_enqueueingNoLister(t *testing.T) { - f := NewDeltaFIFO(testFifoObjectKeyFunc, nil) - f.Add(mkFifoObj("foo", 10)) - f.Update(mkFifoObj("bar", 15)) - f.Add(mkFifoObj("qux", 17)) - f.Delete(mkFifoObj("qux", 18)) - - // This delete does not enqueue anything because baz doesn't exist. - f.Delete(mkFifoObj("baz", 20)) - - expectList := []int{10, 15, 18} - for _, expect := range expectList { - if e, a := expect, testPop(f).val; e != a { - t.Errorf("Didn't get updated value (%v), got %v", e, a) - } - } - if e, a := 0, len(f.items); e != a { - t.Errorf("queue unexpectedly not empty: %v != %v\n%#v", e, a, f.items) - } -} - -func TestDeltaFIFO_enqueueingWithLister(t *testing.T) { - f := NewDeltaFIFO( - testFifoObjectKeyFunc, - keyLookupFunc(func() []testFifoObject { - return []testFifoObject{mkFifoObj("foo", 5), mkFifoObj("bar", 6), mkFifoObj("baz", 7)} - }), - ) - f.Add(mkFifoObj("foo", 10)) - f.Update(mkFifoObj("bar", 15)) - - // This delete does enqueue the deletion, because "baz" is in the key lister. - f.Delete(mkFifoObj("baz", 20)) - - expectList := []int{10, 15, 20} - for _, expect := range expectList { - if e, a := expect, testPop(f).val; e != a { - t.Errorf("Didn't get updated value (%v), got %v", e, a) - } - } - if e, a := 0, len(f.items); e != a { - t.Errorf("queue unexpectedly not empty: %v != %v", e, a) - } -} - -func TestDeltaFIFO_addReplace(t *testing.T) { - f := NewDeltaFIFO(testFifoObjectKeyFunc, nil) - f.Add(mkFifoObj("foo", 10)) - f.Replace([]interface{}{mkFifoObj("foo", 15)}, "0") - got := make(chan testFifoObject, 2) - go func() { - for { - got <- testPop(f) - } - }() - - first := <-got - if e, a := 15, first.val; e != a { - t.Errorf("Didn't get updated value (%v), got %v", e, a) - } - select { - case unexpected := <-got: - t.Errorf("Got second value %v", unexpected.val) - case <-time.After(50 * time.Millisecond): - } - _, exists, _ := f.Get(mkFifoObj("foo", "")) - if exists { - t.Errorf("item did not get removed") - } -} - -func TestDeltaFIFO_ResyncNonExisting(t *testing.T) { - f := NewDeltaFIFO( - testFifoObjectKeyFunc, - keyLookupFunc(func() []testFifoObject { - return []testFifoObject{mkFifoObj("foo", 5)} - }), - ) - f.Delete(mkFifoObj("foo", 10)) - f.Resync() - - deltas := f.items["foo"] - if len(deltas) != 1 { - t.Fatalf("unexpected deltas length: %v", deltas) - } - if deltas[0].Type != Deleted { - t.Errorf("unexpected delta: %v", deltas[0]) - } -} - -func TestDeltaFIFO_DeleteExistingNonPropagated(t *testing.T) { - f := NewDeltaFIFO( - testFifoObjectKeyFunc, - keyLookupFunc(func() []testFifoObject { - return []testFifoObject{} - }), - ) - f.Add(mkFifoObj("foo", 5)) - f.Delete(mkFifoObj("foo", 6)) - - deltas := f.items["foo"] - if len(deltas) != 2 { - t.Fatalf("unexpected deltas length: %v", deltas) - } - if deltas[len(deltas)-1].Type != Deleted { - t.Errorf("unexpected delta: %v", deltas[len(deltas)-1]) - } -} - -func TestDeltaFIFO_ReplaceMakesDeletions(t *testing.T) { - f := NewDeltaFIFO( - testFifoObjectKeyFunc, - keyLookupFunc(func() []testFifoObject { - return []testFifoObject{mkFifoObj("foo", 5), mkFifoObj("bar", 6), mkFifoObj("baz", 7)} - }), - ) - f.Delete(mkFifoObj("baz", 10)) - f.Replace([]interface{}{mkFifoObj("foo", 5)}, "0") - - expectedList := []Deltas{ - {{Deleted, mkFifoObj("baz", 10)}}, - {{Sync, mkFifoObj("foo", 5)}}, - // Since "bar" didn't have a delete event and wasn't in the Replace list - // it should get a tombstone key with the right Obj. - {{Deleted, DeletedFinalStateUnknown{Key: "bar", Obj: mkFifoObj("bar", 6)}}}, - } - - for _, expected := range expectedList { - cur := Pop(f).(Deltas) - if e, a := expected, cur; !reflect.DeepEqual(e, a) { - t.Errorf("Expected %#v, got %#v", e, a) - } - } -} - -func TestDeltaFIFO_UpdateResyncRace(t *testing.T) { - f := NewDeltaFIFO( - testFifoObjectKeyFunc, - keyLookupFunc(func() []testFifoObject { - return []testFifoObject{mkFifoObj("foo", 5)} - }), - ) - f.Update(mkFifoObj("foo", 6)) - f.Resync() - - expectedList := []Deltas{ - {{Updated, mkFifoObj("foo", 6)}}, - } - - for _, expected := range expectedList { - cur := Pop(f).(Deltas) - if e, a := expected, cur; !reflect.DeepEqual(e, a) { - t.Errorf("Expected %#v, got %#v", e, a) - } - } -} - -func TestDeltaFIFO_HasSyncedCorrectOnDeletion(t *testing.T) { - f := NewDeltaFIFO( - testFifoObjectKeyFunc, - keyLookupFunc(func() []testFifoObject { - return []testFifoObject{mkFifoObj("foo", 5), mkFifoObj("bar", 6), mkFifoObj("baz", 7)} - }), - ) - f.Replace([]interface{}{mkFifoObj("foo", 5)}, "0") - - expectedList := []Deltas{ - {{Sync, mkFifoObj("foo", 5)}}, - // Since "bar" didn't have a delete event and wasn't in the Replace list - // it should get a tombstone key with the right Obj. - {{Deleted, DeletedFinalStateUnknown{Key: "bar", Obj: mkFifoObj("bar", 6)}}}, - } - - for _, expected := range expectedList { - if f.HasSynced() { - t.Errorf("Expected HasSynced to be false") - } - cur := Pop(f).(Deltas) - if e, a := expected, cur; !reflect.DeepEqual(e, a) { - t.Errorf("Expected %#v, got %#v", e, a) - } - } - if f.HasSynced() { - t.Errorf("Expected HasSynced to be true") - } -} - -func TestDeltaFIFO_detectLineJumpers(t *testing.T) { - f := NewDeltaFIFO(testFifoObjectKeyFunc, nil) - - f.Add(mkFifoObj("foo", 10)) - f.Add(mkFifoObj("bar", 1)) - f.Add(mkFifoObj("foo", 11)) - f.Add(mkFifoObj("foo", 13)) - f.Add(mkFifoObj("zab", 30)) - - if e, a := 13, testPop(f).val; a != e { - t.Fatalf("expected %d, got %d", e, a) - } - - f.Add(mkFifoObj("foo", 14)) // ensure foo doesn't jump back in line - - if e, a := 1, testPop(f).val; a != e { - t.Fatalf("expected %d, got %d", e, a) - } - - if e, a := 30, testPop(f).val; a != e { - t.Fatalf("expected %d, got %d", e, a) - } - - if e, a := 14, testPop(f).val; a != e { - t.Fatalf("expected %d, got %d", e, a) - } -} - -func TestDeltaFIFO_addIfNotPresent(t *testing.T) { - f := NewDeltaFIFO(testFifoObjectKeyFunc, nil) - - f.Add(mkFifoObj("b", 3)) - b3 := Pop(f) - f.Add(mkFifoObj("c", 4)) - c4 := Pop(f) - if e, a := 0, len(f.items); e != a { - t.Fatalf("Expected %v, got %v items in queue", e, a) - } - - f.Add(mkFifoObj("a", 1)) - f.Add(mkFifoObj("b", 2)) - f.AddIfNotPresent(b3) - f.AddIfNotPresent(c4) - - if e, a := 3, len(f.items); a != e { - t.Fatalf("expected queue length %d, got %d", e, a) - } - - expectedValues := []int{1, 2, 4} - for _, expected := range expectedValues { - if actual := testPop(f).val; actual != expected { - t.Fatalf("expected value %d, got %d", expected, actual) - } - } -} - -func TestDeltaFIFO_KeyOf(t *testing.T) { - f := DeltaFIFO{keyFunc: testFifoObjectKeyFunc} - - table := []struct { - obj interface{} - key string - }{ - {obj: testFifoObject{name: "A"}, key: "A"}, - {obj: DeletedFinalStateUnknown{Key: "B", Obj: nil}, key: "B"}, - {obj: Deltas{{Object: testFifoObject{name: "C"}}}, key: "C"}, - {obj: Deltas{{Object: DeletedFinalStateUnknown{Key: "D", Obj: nil}}}, key: "D"}, - } - - for _, item := range table { - got, err := f.KeyOf(item.obj) - if err != nil { - t.Errorf("Unexpected error for %q: %v", item.obj, err) - continue - } - if e, a := item.key, got; e != a { - t.Errorf("Expected %v, got %v", e, a) - } - } -} - -func TestDeltaFIFO_HasSynced(t *testing.T) { - tests := []struct { - actions []func(f *DeltaFIFO) - expectedSynced bool - }{ - { - actions: []func(f *DeltaFIFO){}, - expectedSynced: false, - }, - { - actions: []func(f *DeltaFIFO){ - func(f *DeltaFIFO) { f.Add(mkFifoObj("a", 1)) }, - }, - expectedSynced: true, - }, - { - actions: []func(f *DeltaFIFO){ - func(f *DeltaFIFO) { f.Replace([]interface{}{}, "0") }, - }, - expectedSynced: true, - }, - { - actions: []func(f *DeltaFIFO){ - func(f *DeltaFIFO) { f.Replace([]interface{}{mkFifoObj("a", 1), mkFifoObj("b", 2)}, "0") }, - }, - expectedSynced: false, - }, - { - actions: []func(f *DeltaFIFO){ - func(f *DeltaFIFO) { f.Replace([]interface{}{mkFifoObj("a", 1), mkFifoObj("b", 2)}, "0") }, - func(f *DeltaFIFO) { Pop(f) }, - }, - expectedSynced: false, - }, - { - actions: []func(f *DeltaFIFO){ - func(f *DeltaFIFO) { f.Replace([]interface{}{mkFifoObj("a", 1), mkFifoObj("b", 2)}, "0") }, - func(f *DeltaFIFO) { Pop(f) }, - func(f *DeltaFIFO) { Pop(f) }, - }, - expectedSynced: true, - }, - } - - for i, test := range tests { - f := NewDeltaFIFO(testFifoObjectKeyFunc, nil) - - for _, action := range test.actions { - action(f) - } - if e, a := test.expectedSynced, f.HasSynced(); a != e { - t.Errorf("test case %v failed, expected: %v , got %v", i, e, a) - } - } -} diff --git a/vendor/k8s.io/client-go/tools/cache/expiration_cache_test.go b/vendor/k8s.io/client-go/tools/cache/expiration_cache_test.go deleted file mode 100644 index fac621cb..00000000 --- a/vendor/k8s.io/client-go/tools/cache/expiration_cache_test.go +++ /dev/null @@ -1,189 +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 cache - -import ( - "reflect" - "testing" - "time" - - "k8s.io/apimachinery/pkg/util/clock" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/wait" -) - -func TestTTLExpirationBasic(t *testing.T) { - testObj := testStoreObject{id: "foo", val: "bar"} - deleteChan := make(chan string, 1) - ttlStore := NewFakeExpirationStore( - testStoreKeyFunc, deleteChan, - &FakeExpirationPolicy{ - NeverExpire: sets.NewString(), - RetrieveKeyFunc: func(obj interface{}) (string, error) { - return obj.(*timestampedEntry).obj.(testStoreObject).id, nil - }, - }, - clock.RealClock{}, - ) - err := ttlStore.Add(testObj) - if err != nil { - t.Errorf("Unable to add obj %#v", testObj) - } - item, exists, err := ttlStore.Get(testObj) - if err != nil { - t.Errorf("Failed to get from store, %v", err) - } - if exists || item != nil { - t.Errorf("Got unexpected item %#v", item) - } - key, _ := testStoreKeyFunc(testObj) - select { - case delKey := <-deleteChan: - if delKey != key { - t.Errorf("Unexpected delete for key %s", key) - } - case <-time.After(wait.ForeverTestTimeout): - t.Errorf("Unexpected timeout waiting on delete") - } - close(deleteChan) -} - -func TestReAddExpiredItem(t *testing.T) { - deleteChan := make(chan string, 1) - exp := &FakeExpirationPolicy{ - NeverExpire: sets.NewString(), - RetrieveKeyFunc: func(obj interface{}) (string, error) { - return obj.(*timestampedEntry).obj.(testStoreObject).id, nil - }, - } - ttlStore := NewFakeExpirationStore( - testStoreKeyFunc, deleteChan, exp, clock.RealClock{}) - testKey := "foo" - testObj := testStoreObject{id: testKey, val: "bar"} - err := ttlStore.Add(testObj) - if err != nil { - t.Errorf("Unable to add obj %#v", testObj) - } - - // This get will expire the item. - item, exists, err := ttlStore.Get(testObj) - if err != nil { - t.Errorf("Failed to get from store, %v", err) - } - if exists || item != nil { - t.Errorf("Got unexpected item %#v", item) - } - - key, _ := testStoreKeyFunc(testObj) - differentValue := "different_bar" - err = ttlStore.Add( - testStoreObject{id: testKey, val: differentValue}) - if err != nil { - t.Errorf("Failed to add second value") - } - - select { - case delKey := <-deleteChan: - if delKey != key { - t.Errorf("Unexpected delete for key %s", key) - } - case <-time.After(wait.ForeverTestTimeout): - t.Errorf("Unexpected timeout waiting on delete") - } - exp.NeverExpire = sets.NewString(testKey) - item, exists, err = ttlStore.GetByKey(testKey) - if err != nil { - t.Errorf("Failed to get from store, %v", err) - } - if !exists || item == nil || item.(testStoreObject).val != differentValue { - t.Errorf("Got unexpected item %#v", item) - } - close(deleteChan) -} - -func TestTTLList(t *testing.T) { - testObjs := []testStoreObject{ - {id: "foo", val: "bar"}, - {id: "foo1", val: "bar1"}, - {id: "foo2", val: "bar2"}, - } - expireKeys := sets.NewString(testObjs[0].id, testObjs[2].id) - deleteChan := make(chan string, len(testObjs)) - defer close(deleteChan) - - ttlStore := NewFakeExpirationStore( - testStoreKeyFunc, deleteChan, - &FakeExpirationPolicy{ - NeverExpire: sets.NewString(testObjs[1].id), - RetrieveKeyFunc: func(obj interface{}) (string, error) { - return obj.(*timestampedEntry).obj.(testStoreObject).id, nil - }, - }, - clock.RealClock{}, - ) - for _, obj := range testObjs { - err := ttlStore.Add(obj) - if err != nil { - t.Errorf("Unable to add obj %#v", obj) - } - } - listObjs := ttlStore.List() - if len(listObjs) != 1 || !reflect.DeepEqual(listObjs[0], testObjs[1]) { - t.Errorf("List returned unexpected results %#v", listObjs) - } - - // Make sure all our deletes come through in an acceptable rate (1/100ms) - for expireKeys.Len() != 0 { - select { - case delKey := <-deleteChan: - if !expireKeys.Has(delKey) { - t.Errorf("Unexpected delete for key %s", delKey) - } - expireKeys.Delete(delKey) - case <-time.After(wait.ForeverTestTimeout): - t.Errorf("Unexpected timeout waiting on delete") - return - } - } -} - -func TestTTLPolicy(t *testing.T) { - fakeTime := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC) - ttl := 30 * time.Second - exactlyOnTTL := fakeTime.Add(-ttl) - expiredTime := fakeTime.Add(-(ttl + 1)) - - policy := TTLPolicy{ttl, clock.NewFakeClock(fakeTime)} - fakeTimestampedEntry := ×tampedEntry{obj: struct{}{}, timestamp: exactlyOnTTL} - if policy.IsExpired(fakeTimestampedEntry) { - t.Errorf("TTL cache should not expire entries exactly on ttl") - } - fakeTimestampedEntry.timestamp = fakeTime - if policy.IsExpired(fakeTimestampedEntry) { - t.Errorf("TTL Cache should not expire entries before ttl") - } - fakeTimestampedEntry.timestamp = expiredTime - if !policy.IsExpired(fakeTimestampedEntry) { - t.Errorf("TTL Cache should expire entries older than ttl") - } - for _, ttl = range []time.Duration{0, -1} { - policy.Ttl = ttl - if policy.IsExpired(fakeTimestampedEntry) { - t.Errorf("TTL policy should only expire entries when initialized with a ttl > 0") - } - } -} diff --git a/vendor/k8s.io/client-go/tools/cache/fifo_test.go b/vendor/k8s.io/client-go/tools/cache/fifo_test.go deleted file mode 100644 index afd311d7..00000000 --- a/vendor/k8s.io/client-go/tools/cache/fifo_test.go +++ /dev/null @@ -1,280 +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 cache - -import ( - "fmt" - "reflect" - "testing" - "time" -) - -func testFifoObjectKeyFunc(obj interface{}) (string, error) { - return obj.(testFifoObject).name, nil -} - -type testFifoObject struct { - name string - val interface{} -} - -func mkFifoObj(name string, val interface{}) testFifoObject { - return testFifoObject{name: name, val: val} -} - -func TestFIFO_basic(t *testing.T) { - f := NewFIFO(testFifoObjectKeyFunc) - const amount = 500 - go func() { - for i := 0; i < amount; i++ { - f.Add(mkFifoObj(string([]rune{'a', rune(i)}), i+1)) - } - }() - go func() { - for u := uint64(0); u < amount; u++ { - f.Add(mkFifoObj(string([]rune{'b', rune(u)}), u+1)) - } - }() - - lastInt := int(0) - lastUint := uint64(0) - for i := 0; i < amount*2; i++ { - switch obj := Pop(f).(testFifoObject).val.(type) { - case int: - if obj <= lastInt { - t.Errorf("got %v (int) out of order, last was %v", obj, lastInt) - } - lastInt = obj - case uint64: - if obj <= lastUint { - t.Errorf("got %v (uint) out of order, last was %v", obj, lastUint) - } else { - lastUint = obj - } - default: - t.Fatalf("unexpected type %#v", obj) - } - } -} - -func TestFIFO_requeueOnPop(t *testing.T) { - f := NewFIFO(testFifoObjectKeyFunc) - - f.Add(mkFifoObj("foo", 10)) - _, err := f.Pop(func(obj interface{}) error { - if obj.(testFifoObject).name != "foo" { - t.Fatalf("unexpected object: %#v", obj) - } - return ErrRequeue{Err: nil} - }) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if _, ok, err := f.GetByKey("foo"); !ok || err != nil { - t.Fatalf("object should have been requeued: %t %v", ok, err) - } - - _, err = f.Pop(func(obj interface{}) error { - if obj.(testFifoObject).name != "foo" { - t.Fatalf("unexpected object: %#v", obj) - } - return ErrRequeue{Err: fmt.Errorf("test error")} - }) - if err == nil || err.Error() != "test error" { - t.Fatalf("unexpected error: %v", err) - } - if _, ok, err := f.GetByKey("foo"); !ok || err != nil { - t.Fatalf("object should have been requeued: %t %v", ok, err) - } - - _, err = f.Pop(func(obj interface{}) error { - if obj.(testFifoObject).name != "foo" { - t.Fatalf("unexpected object: %#v", obj) - } - return nil - }) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if _, ok, err := f.GetByKey("foo"); ok || err != nil { - t.Fatalf("object should have been removed: %t %v", ok, err) - } -} - -func TestFIFO_addUpdate(t *testing.T) { - f := NewFIFO(testFifoObjectKeyFunc) - f.Add(mkFifoObj("foo", 10)) - f.Update(mkFifoObj("foo", 15)) - - if e, a := []interface{}{mkFifoObj("foo", 15)}, f.List(); !reflect.DeepEqual(e, a) { - t.Errorf("Expected %+v, got %+v", e, a) - } - if e, a := []string{"foo"}, f.ListKeys(); !reflect.DeepEqual(e, a) { - t.Errorf("Expected %+v, got %+v", e, a) - } - - got := make(chan testFifoObject, 2) - go func() { - for { - got <- Pop(f).(testFifoObject) - } - }() - - first := <-got - if e, a := 15, first.val; e != a { - t.Errorf("Didn't get updated value (%v), got %v", e, a) - } - select { - case unexpected := <-got: - t.Errorf("Got second value %v", unexpected.val) - case <-time.After(50 * time.Millisecond): - } - _, exists, _ := f.Get(mkFifoObj("foo", "")) - if exists { - t.Errorf("item did not get removed") - } -} - -func TestFIFO_addReplace(t *testing.T) { - f := NewFIFO(testFifoObjectKeyFunc) - f.Add(mkFifoObj("foo", 10)) - f.Replace([]interface{}{mkFifoObj("foo", 15)}, "15") - got := make(chan testFifoObject, 2) - go func() { - for { - got <- Pop(f).(testFifoObject) - } - }() - - first := <-got - if e, a := 15, first.val; e != a { - t.Errorf("Didn't get updated value (%v), got %v", e, a) - } - select { - case unexpected := <-got: - t.Errorf("Got second value %v", unexpected.val) - case <-time.After(50 * time.Millisecond): - } - _, exists, _ := f.Get(mkFifoObj("foo", "")) - if exists { - t.Errorf("item did not get removed") - } -} - -func TestFIFO_detectLineJumpers(t *testing.T) { - f := NewFIFO(testFifoObjectKeyFunc) - - f.Add(mkFifoObj("foo", 10)) - f.Add(mkFifoObj("bar", 1)) - f.Add(mkFifoObj("foo", 11)) - f.Add(mkFifoObj("foo", 13)) - f.Add(mkFifoObj("zab", 30)) - - if e, a := 13, Pop(f).(testFifoObject).val; a != e { - t.Fatalf("expected %d, got %d", e, a) - } - - f.Add(mkFifoObj("foo", 14)) // ensure foo doesn't jump back in line - - if e, a := 1, Pop(f).(testFifoObject).val; a != e { - t.Fatalf("expected %d, got %d", e, a) - } - - if e, a := 30, Pop(f).(testFifoObject).val; a != e { - t.Fatalf("expected %d, got %d", e, a) - } - - if e, a := 14, Pop(f).(testFifoObject).val; a != e { - t.Fatalf("expected %d, got %d", e, a) - } -} - -func TestFIFO_addIfNotPresent(t *testing.T) { - f := NewFIFO(testFifoObjectKeyFunc) - - f.Add(mkFifoObj("a", 1)) - f.Add(mkFifoObj("b", 2)) - f.AddIfNotPresent(mkFifoObj("b", 3)) - f.AddIfNotPresent(mkFifoObj("c", 4)) - - if e, a := 3, len(f.items); a != e { - t.Fatalf("expected queue length %d, got %d", e, a) - } - - expectedValues := []int{1, 2, 4} - for _, expected := range expectedValues { - if actual := Pop(f).(testFifoObject).val; actual != expected { - t.Fatalf("expected value %d, got %d", expected, actual) - } - } -} - -func TestFIFO_HasSynced(t *testing.T) { - tests := []struct { - actions []func(f *FIFO) - expectedSynced bool - }{ - { - actions: []func(f *FIFO){}, - expectedSynced: false, - }, - { - actions: []func(f *FIFO){ - func(f *FIFO) { f.Add(mkFifoObj("a", 1)) }, - }, - expectedSynced: true, - }, - { - actions: []func(f *FIFO){ - func(f *FIFO) { f.Replace([]interface{}{}, "0") }, - }, - expectedSynced: true, - }, - { - actions: []func(f *FIFO){ - func(f *FIFO) { f.Replace([]interface{}{mkFifoObj("a", 1), mkFifoObj("b", 2)}, "0") }, - }, - expectedSynced: false, - }, - { - actions: []func(f *FIFO){ - func(f *FIFO) { f.Replace([]interface{}{mkFifoObj("a", 1), mkFifoObj("b", 2)}, "0") }, - func(f *FIFO) { Pop(f) }, - }, - expectedSynced: false, - }, - { - actions: []func(f *FIFO){ - func(f *FIFO) { f.Replace([]interface{}{mkFifoObj("a", 1), mkFifoObj("b", 2)}, "0") }, - func(f *FIFO) { Pop(f) }, - func(f *FIFO) { Pop(f) }, - }, - expectedSynced: true, - }, - } - - for i, test := range tests { - f := NewFIFO(testFifoObjectKeyFunc) - - for _, action := range test.actions { - action(f) - } - if e, a := test.expectedSynced, f.HasSynced(); a != e { - t.Errorf("test case %v failed, expected: %v , got %v", i, e, a) - } - } -} diff --git a/vendor/k8s.io/client-go/tools/cache/heap_test.go b/vendor/k8s.io/client-go/tools/cache/heap_test.go deleted file mode 100644 index c2e47698..00000000 --- a/vendor/k8s.io/client-go/tools/cache/heap_test.go +++ /dev/null @@ -1,382 +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 cache - -import ( - "sync" - "testing" - "time" -) - -func testHeapObjectKeyFunc(obj interface{}) (string, error) { - return obj.(testHeapObject).name, nil -} - -type testHeapObject struct { - name string - val interface{} -} - -func mkHeapObj(name string, val interface{}) testHeapObject { - return testHeapObject{name: name, val: val} -} - -func compareInts(val1 interface{}, val2 interface{}) bool { - first := val1.(testHeapObject).val.(int) - second := val2.(testHeapObject).val.(int) - return first < second -} - -// TestHeapBasic tests Heap invariant and synchronization. -func TestHeapBasic(t *testing.T) { - h := NewHeap(testHeapObjectKeyFunc, compareInts) - var wg sync.WaitGroup - wg.Add(2) - const amount = 500 - var i, u int - // Insert items in the heap in opposite orders in two go routines. - go func() { - for i = amount; i > 0; i-- { - h.Add(mkHeapObj(string([]rune{'a', rune(i)}), i)) - } - wg.Done() - }() - go func() { - for u = 0; u < amount; u++ { - h.Add(mkHeapObj(string([]rune{'b', rune(u)}), u+1)) - } - wg.Done() - }() - // Wait for the two go routines to finish. - wg.Wait() - // Make sure that the numbers are popped in ascending order. - prevNum := 0 - for i := 0; i < amount*2; i++ { - obj, err := h.Pop() - num := obj.(testHeapObject).val.(int) - // All the items must be sorted. - if err != nil || prevNum > num { - t.Errorf("got %v out of order, last was %v", obj, prevNum) - } - prevNum = num - } -} - -// Tests Heap.Add and ensures that heap invariant is preserved after adding items. -func TestHeap_Add(t *testing.T) { - h := NewHeap(testHeapObjectKeyFunc, compareInts) - h.Add(mkHeapObj("foo", 10)) - h.Add(mkHeapObj("bar", 1)) - h.Add(mkHeapObj("baz", 11)) - h.Add(mkHeapObj("zab", 30)) - h.Add(mkHeapObj("foo", 13)) // This updates "foo". - - item, err := h.Pop() - if e, a := 1, item.(testHeapObject).val; err != nil || a != e { - t.Fatalf("expected %d, got %d", e, a) - } - item, err = h.Pop() - if e, a := 11, item.(testHeapObject).val; err != nil || a != e { - t.Fatalf("expected %d, got %d", e, a) - } - h.Delete(mkHeapObj("baz", 11)) // Nothing is deleted. - h.Add(mkHeapObj("foo", 14)) // foo is updated. - item, err = h.Pop() - if e, a := 14, item.(testHeapObject).val; err != nil || a != e { - t.Fatalf("expected %d, got %d", e, a) - } - item, err = h.Pop() - if e, a := 30, item.(testHeapObject).val; err != nil || a != e { - t.Fatalf("expected %d, got %d", e, a) - } -} - -// TestHeap_BulkAdd tests Heap.BulkAdd functionality and ensures that all the -// items given to BulkAdd are added to the queue before Pop reads them. -func TestHeap_BulkAdd(t *testing.T) { - h := NewHeap(testHeapObjectKeyFunc, compareInts) - const amount = 500 - // Insert items in the heap in opposite orders in a go routine. - go func() { - l := []interface{}{} - for i := amount; i > 0; i-- { - l = append(l, mkHeapObj(string([]rune{'a', rune(i)}), i)) - } - h.BulkAdd(l) - }() - prevNum := -1 - for i := 0; i < amount; i++ { - obj, err := h.Pop() - num := obj.(testHeapObject).val.(int) - // All the items must be sorted. - if err != nil || prevNum >= num { - t.Errorf("got %v out of order, last was %v", obj, prevNum) - } - prevNum = num - } -} - -// TestHeapEmptyPop tests that pop returns properly after heap is closed. -func TestHeapEmptyPop(t *testing.T) { - h := NewHeap(testHeapObjectKeyFunc, compareInts) - go func() { - time.Sleep(1 * time.Second) - h.Close() - }() - _, err := h.Pop() - if err == nil || err.Error() != closedMsg { - t.Errorf("pop should have returned heap closed error: %v", err) - } -} - -// TestHeap_AddIfNotPresent tests Heap.AddIfNotPresent and ensures that heap -// invariant is preserved after adding items. -func TestHeap_AddIfNotPresent(t *testing.T) { - h := NewHeap(testHeapObjectKeyFunc, compareInts) - h.AddIfNotPresent(mkHeapObj("foo", 10)) - h.AddIfNotPresent(mkHeapObj("bar", 1)) - h.AddIfNotPresent(mkHeapObj("baz", 11)) - h.AddIfNotPresent(mkHeapObj("zab", 30)) - h.AddIfNotPresent(mkHeapObj("foo", 13)) // This is not added. - - if len := len(h.data.items); len != 4 { - t.Errorf("unexpected number of items: %d", len) - } - if val := h.data.items["foo"].obj.(testHeapObject).val; val != 10 { - t.Errorf("unexpected value: %d", val) - } - item, err := h.Pop() - if e, a := 1, item.(testHeapObject).val; err != nil || a != e { - t.Fatalf("expected %d, got %d", e, a) - } - item, err = h.Pop() - if e, a := 10, item.(testHeapObject).val; err != nil || a != e { - t.Fatalf("expected %d, got %d", e, a) - } - // bar is already popped. Let's add another one. - h.AddIfNotPresent(mkHeapObj("bar", 14)) - item, err = h.Pop() - if e, a := 11, item.(testHeapObject).val; err != nil || a != e { - t.Fatalf("expected %d, got %d", e, a) - } - item, err = h.Pop() - if e, a := 14, item.(testHeapObject).val; err != nil || a != e { - t.Fatalf("expected %d, got %d", e, a) - } -} - -// TestHeap_Delete tests Heap.Delete and ensures that heap invariant is -// preserved after deleting items. -func TestHeap_Delete(t *testing.T) { - h := NewHeap(testHeapObjectKeyFunc, compareInts) - h.Add(mkHeapObj("foo", 10)) - h.Add(mkHeapObj("bar", 1)) - h.Add(mkHeapObj("bal", 31)) - h.Add(mkHeapObj("baz", 11)) - - // Delete head. Delete should work with "key" and doesn't care about the value. - if err := h.Delete(mkHeapObj("bar", 200)); err != nil { - t.Fatalf("Failed to delete head.") - } - item, err := h.Pop() - if e, a := 10, item.(testHeapObject).val; err != nil || a != e { - t.Fatalf("expected %d, got %d", e, a) - } - h.Add(mkHeapObj("zab", 30)) - h.Add(mkHeapObj("faz", 30)) - len := h.data.Len() - // Delete non-existing item. - if err = h.Delete(mkHeapObj("non-existent", 10)); err == nil || len != h.data.Len() { - t.Fatalf("Didn't expect any item removal") - } - // Delete tail. - if err = h.Delete(mkHeapObj("bal", 31)); err != nil { - t.Fatalf("Failed to delete tail.") - } - // Delete one of the items with value 30. - if err = h.Delete(mkHeapObj("zab", 30)); err != nil { - t.Fatalf("Failed to delete item.") - } - item, err = h.Pop() - if e, a := 11, item.(testHeapObject).val; err != nil || a != e { - t.Fatalf("expected %d, got %d", e, a) - } - item, err = h.Pop() - if e, a := 30, item.(testHeapObject).val; err != nil || a != e { - t.Fatalf("expected %d, got %d", e, a) - } - if h.data.Len() != 0 { - t.Fatalf("expected an empty heap.") - } -} - -// TestHeap_Update tests Heap.Update and ensures that heap invariant is -// preserved after adding items. -func TestHeap_Update(t *testing.T) { - h := NewHeap(testHeapObjectKeyFunc, compareInts) - h.Add(mkHeapObj("foo", 10)) - h.Add(mkHeapObj("bar", 1)) - h.Add(mkHeapObj("bal", 31)) - h.Add(mkHeapObj("baz", 11)) - - // Update an item to a value that should push it to the head. - h.Update(mkHeapObj("baz", 0)) - if h.data.queue[0] != "baz" || h.data.items["baz"].index != 0 { - t.Fatalf("expected baz to be at the head") - } - item, err := h.Pop() - if e, a := 0, item.(testHeapObject).val; err != nil || a != e { - t.Fatalf("expected %d, got %d", e, a) - } - // Update bar to push it farther back in the queue. - h.Update(mkHeapObj("bar", 100)) - if h.data.queue[0] != "foo" || h.data.items["foo"].index != 0 { - t.Fatalf("expected foo to be at the head") - } -} - -// TestHeap_Get tests Heap.Get. -func TestHeap_Get(t *testing.T) { - h := NewHeap(testHeapObjectKeyFunc, compareInts) - h.Add(mkHeapObj("foo", 10)) - h.Add(mkHeapObj("bar", 1)) - h.Add(mkHeapObj("bal", 31)) - h.Add(mkHeapObj("baz", 11)) - - // Get works with the key. - obj, exists, err := h.Get(mkHeapObj("baz", 0)) - if err != nil || exists == false || obj.(testHeapObject).val != 11 { - t.Fatalf("unexpected error in getting element") - } - // Get non-existing object. - _, exists, err = h.Get(mkHeapObj("non-existing", 0)) - if err != nil || exists == true { - t.Fatalf("didn't expect to get any object") - } -} - -// TestHeap_GetByKey tests Heap.GetByKey and is very similar to TestHeap_Get. -func TestHeap_GetByKey(t *testing.T) { - h := NewHeap(testHeapObjectKeyFunc, compareInts) - h.Add(mkHeapObj("foo", 10)) - h.Add(mkHeapObj("bar", 1)) - h.Add(mkHeapObj("bal", 31)) - h.Add(mkHeapObj("baz", 11)) - - obj, exists, err := h.GetByKey("baz") - if err != nil || exists == false || obj.(testHeapObject).val != 11 { - t.Fatalf("unexpected error in getting element") - } - // Get non-existing object. - _, exists, err = h.GetByKey("non-existing") - if err != nil || exists == true { - t.Fatalf("didn't expect to get any object") - } -} - -// TestHeap_Close tests Heap.Close and Heap.IsClosed functions. -func TestHeap_Close(t *testing.T) { - h := NewHeap(testHeapObjectKeyFunc, compareInts) - h.Add(mkHeapObj("foo", 10)) - h.Add(mkHeapObj("bar", 1)) - - if h.IsClosed() { - t.Fatalf("didn't expect heap to be closed") - } - h.Close() - if !h.IsClosed() { - t.Fatalf("expect heap to be closed") - } -} - -// TestHeap_List tests Heap.List function. -func TestHeap_List(t *testing.T) { - h := NewHeap(testHeapObjectKeyFunc, compareInts) - list := h.List() - if len(list) != 0 { - t.Errorf("expected an empty list") - } - - items := map[string]int{ - "foo": 10, - "bar": 1, - "bal": 30, - "baz": 11, - "faz": 30, - } - for k, v := range items { - h.Add(mkHeapObj(k, v)) - } - list = h.List() - if len(list) != len(items) { - t.Errorf("expected %d items, got %d", len(items), len(list)) - } - for _, obj := range list { - heapObj := obj.(testHeapObject) - v, ok := items[heapObj.name] - if !ok || v != heapObj.val { - t.Errorf("unexpected item in the list: %v", heapObj) - } - } -} - -// TestHeap_ListKeys tests Heap.ListKeys function. Scenario is the same as -// TestHeap_list. -func TestHeap_ListKeys(t *testing.T) { - h := NewHeap(testHeapObjectKeyFunc, compareInts) - list := h.ListKeys() - if len(list) != 0 { - t.Errorf("expected an empty list") - } - - items := map[string]int{ - "foo": 10, - "bar": 1, - "bal": 30, - "baz": 11, - "faz": 30, - } - for k, v := range items { - h.Add(mkHeapObj(k, v)) - } - list = h.ListKeys() - if len(list) != len(items) { - t.Errorf("expected %d items, got %d", len(items), len(list)) - } - for _, key := range list { - _, ok := items[key] - if !ok { - t.Errorf("unexpected item in the list: %v", key) - } - } -} - -// TestHeapAddAfterClose tests that heap returns an error if anything is added -// after it is closed. -func TestHeapAddAfterClose(t *testing.T) { - h := NewHeap(testHeapObjectKeyFunc, compareInts) - h.Close() - if err := h.Add(mkHeapObj("test", 1)); err == nil || err.Error() != closedMsg { - t.Errorf("expected heap closed error") - } - if err := h.AddIfNotPresent(mkHeapObj("test", 1)); err == nil || err.Error() != closedMsg { - t.Errorf("expected heap closed error") - } - if err := h.BulkAdd([]interface{}{mkHeapObj("test", 1)}); err == nil || err.Error() != closedMsg { - t.Errorf("expected heap closed error") - } -} diff --git a/vendor/k8s.io/client-go/tools/cache/index_test.go b/vendor/k8s.io/client-go/tools/cache/index_test.go deleted file mode 100644 index ecc104c0..00000000 --- a/vendor/k8s.io/client-go/tools/cache/index_test.go +++ /dev/null @@ -1,163 +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 cache - -import ( - "strings" - "testing" - - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func testIndexFunc(obj interface{}) ([]string, error) { - pod := obj.(*v1.Pod) - return []string{pod.Labels["foo"]}, nil -} - -func TestGetIndexFuncValues(t *testing.T) { - index := NewIndexer(MetaNamespaceKeyFunc, Indexers{"testmodes": testIndexFunc}) - - pod1 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "one", Labels: map[string]string{"foo": "bar"}}} - pod2 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "two", Labels: map[string]string{"foo": "bar"}}} - pod3 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "tre", Labels: map[string]string{"foo": "biz"}}} - - index.Add(pod1) - index.Add(pod2) - index.Add(pod3) - - keys := index.ListIndexFuncValues("testmodes") - if len(keys) != 2 { - t.Errorf("Expected 2 keys but got %v", len(keys)) - } - - for _, key := range keys { - if key != "bar" && key != "biz" { - t.Errorf("Expected only 'bar' or 'biz' but got %s", key) - } - } -} - -func testUsersIndexFunc(obj interface{}) ([]string, error) { - pod := obj.(*v1.Pod) - usersString := pod.Annotations["users"] - - return strings.Split(usersString, ","), nil -} - -func TestMultiIndexKeys(t *testing.T) { - index := NewIndexer(MetaNamespaceKeyFunc, Indexers{"byUser": testUsersIndexFunc}) - - pod1 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "one", Annotations: map[string]string{"users": "ernie,bert"}}} - pod2 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "two", Annotations: map[string]string{"users": "bert,oscar"}}} - pod3 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "tre", Annotations: map[string]string{"users": "ernie,elmo"}}} - - index.Add(pod1) - index.Add(pod2) - index.Add(pod3) - - erniePods, err := index.ByIndex("byUser", "ernie") - if err != nil { - t.Errorf("unexpected error: %v", err) - } - if len(erniePods) != 2 { - t.Errorf("Expected 2 pods but got %v", len(erniePods)) - } - for _, erniePod := range erniePods { - if erniePod.(*v1.Pod).Name != "one" && erniePod.(*v1.Pod).Name != "tre" { - t.Errorf("Expected only 'one' or 'tre' but got %s", erniePod.(*v1.Pod).Name) - } - } - - bertPods, err := index.ByIndex("byUser", "bert") - if err != nil { - t.Errorf("unexpected error: %v", err) - } - if len(bertPods) != 2 { - t.Errorf("Expected 2 pods but got %v", len(bertPods)) - } - for _, bertPod := range bertPods { - if bertPod.(*v1.Pod).Name != "one" && bertPod.(*v1.Pod).Name != "two" { - t.Errorf("Expected only 'one' or 'two' but got %s", bertPod.(*v1.Pod).Name) - } - } - - oscarPods, err := index.ByIndex("byUser", "oscar") - if err != nil { - t.Errorf("unexpected error: %v", err) - } - if len(oscarPods) != 1 { - t.Errorf("Expected 1 pods but got %v", len(erniePods)) - } - for _, oscarPod := range oscarPods { - if oscarPod.(*v1.Pod).Name != "two" { - t.Errorf("Expected only 'two' but got %s", oscarPod.(*v1.Pod).Name) - } - } - - ernieAndBertKeys, err := index.Index("byUser", pod1) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - if len(ernieAndBertKeys) != 3 { - t.Errorf("Expected 3 pods but got %v", len(ernieAndBertKeys)) - } - for _, ernieAndBertKey := range ernieAndBertKeys { - if ernieAndBertKey.(*v1.Pod).Name != "one" && ernieAndBertKey.(*v1.Pod).Name != "two" && ernieAndBertKey.(*v1.Pod).Name != "tre" { - t.Errorf("Expected only 'one', 'two' or 'tre' but got %s", ernieAndBertKey.(*v1.Pod).Name) - } - } - - index.Delete(pod3) - erniePods, err = index.ByIndex("byUser", "ernie") - if err != nil { - t.Errorf("unexpected error: %v", err) - } - if len(erniePods) != 1 { - t.Errorf("Expected 1 pods but got %v", len(erniePods)) - } - for _, erniePod := range erniePods { - if erniePod.(*v1.Pod).Name != "one" { - t.Errorf("Expected only 'one' but got %s", erniePod.(*v1.Pod).Name) - } - } - - elmoPods, err := index.ByIndex("byUser", "elmo") - if err != nil { - t.Errorf("unexpected error: %v", err) - } - if len(elmoPods) != 0 { - t.Errorf("Expected 0 pods but got %v", len(elmoPods)) - } - - copyOfPod2 := pod2.DeepCopy() - copyOfPod2.Annotations["users"] = "oscar" - index.Update(copyOfPod2) - bertPods, err = index.ByIndex("byUser", "bert") - if err != nil { - t.Errorf("unexpected error: %v", err) - } - if len(bertPods) != 1 { - t.Errorf("Expected 1 pods but got %v", len(bertPods)) - } - for _, bertPod := range bertPods { - if bertPod.(*v1.Pod).Name != "one" { - t.Errorf("Expected only 'one' but got %s", bertPod.(*v1.Pod).Name) - } - } - -} diff --git a/vendor/k8s.io/client-go/tools/cache/mutation_detector_test.go b/vendor/k8s.io/client-go/tools/cache/mutation_detector_test.go deleted file mode 100644 index 41b6942f..00000000 --- a/vendor/k8s.io/client-go/tools/cache/mutation_detector_test.go +++ /dev/null @@ -1,81 +0,0 @@ -// +build !race - -/* -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 cache - -import ( - "testing" - "time" - - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" -) - -func TestMutationDetector(t *testing.T) { - fakeWatch := watch.NewFake() - lw := &testLW{ - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - return fakeWatch, nil - }, - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - return &v1.PodList{}, nil - }, - } - pod := &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "anything", - Labels: map[string]string{"check": "foo"}, - }, - } - stopCh := make(chan struct{}) - defer close(stopCh) - addReceived := make(chan bool) - mutationFound := make(chan bool) - - informer := NewSharedInformer(lw, &v1.Pod{}, 1*time.Second).(*sharedIndexInformer) - informer.cacheMutationDetector = &defaultCacheMutationDetector{ - name: "name", - period: 1 * time.Second, - failureFunc: func(message string) { - mutationFound <- true - }, - } - informer.AddEventHandler( - ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { - addReceived <- true - }, - }, - ) - go informer.Run(stopCh) - - fakeWatch.Add(pod) - - select { - case <-addReceived: - } - - pod.Labels["change"] = "true" - - select { - case <-mutationFound: - } - -} diff --git a/vendor/k8s.io/client-go/tools/cache/processor_listener_test.go b/vendor/k8s.io/client-go/tools/cache/processor_listener_test.go deleted file mode 100644 index 1da73420..00000000 --- a/vendor/k8s.io/client-go/tools/cache/processor_listener_test.go +++ /dev/null @@ -1,58 +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 cache - -import ( - "sync" - "testing" - "time" - - "k8s.io/apimachinery/pkg/util/wait" -) - -const ( - concurrencyLevel = 5 -) - -func BenchmarkListener(b *testing.B) { - var notification addNotification - - var swg sync.WaitGroup - swg.Add(b.N) - b.SetParallelism(concurrencyLevel) - // Preallocate enough space so that benchmark does not run out of it - pl := newProcessListener(&ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { - swg.Done() - }, - }, 0, 0, time.Now(), 1024*1024) - var wg wait.Group - defer wg.Wait() // Wait for .run and .pop to stop - defer close(pl.addCh) // Tell .run and .pop to stop - wg.Start(pl.run) - wg.Start(pl.pop) - - b.ReportAllocs() - b.ResetTimer() - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - pl.add(notification) - } - }) - swg.Wait() // Block until all notifications have been received - b.StopTimer() -} diff --git a/vendor/k8s.io/client-go/tools/cache/reflector_test.go b/vendor/k8s.io/client-go/tools/cache/reflector_test.go deleted file mode 100644 index bb06059f..00000000 --- a/vendor/k8s.io/client-go/tools/cache/reflector_test.go +++ /dev/null @@ -1,389 +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 cache - -import ( - "errors" - "fmt" - "math/rand" - "strconv" - "testing" - "time" - - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apimachinery/pkg/watch" -) - -var nevererrc chan error - -type testLW struct { - ListFunc func(options metav1.ListOptions) (runtime.Object, error) - WatchFunc func(options metav1.ListOptions) (watch.Interface, error) -} - -func (t *testLW) List(options metav1.ListOptions) (runtime.Object, error) { - return t.ListFunc(options) -} -func (t *testLW) Watch(options metav1.ListOptions) (watch.Interface, error) { - return t.WatchFunc(options) -} - -func TestCloseWatchChannelOnError(t *testing.T) { - r := NewReflector(&testLW{}, &v1.Pod{}, NewStore(MetaNamespaceKeyFunc), 0) - pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}} - fw := watch.NewFake() - r.listerWatcher = &testLW{ - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - return fw, nil - }, - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "1"}}, nil - }, - } - go r.ListAndWatch(wait.NeverStop) - fw.Error(pod) - select { - case _, ok := <-fw.ResultChan(): - if ok { - t.Errorf("Watch channel left open after cancellation") - } - case <-time.After(wait.ForeverTestTimeout): - t.Errorf("the cancellation is at least %s late", wait.ForeverTestTimeout.String()) - break - } -} - -func TestRunUntil(t *testing.T) { - stopCh := make(chan struct{}) - store := NewStore(MetaNamespaceKeyFunc) - r := NewReflector(&testLW{}, &v1.Pod{}, store, 0) - fw := watch.NewFake() - r.listerWatcher = &testLW{ - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - return fw, nil - }, - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "1"}}, nil - }, - } - go r.Run(stopCh) - // Synchronously add a dummy pod into the watch channel so we - // know the RunUntil go routine is in the watch handler. - fw.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}) - close(stopCh) - select { - case _, ok := <-fw.ResultChan(): - if ok { - t.Errorf("Watch channel left open after stopping the watch") - } - case <-time.After(wait.ForeverTestTimeout): - t.Errorf("the cancellation is at least %s late", wait.ForeverTestTimeout.String()) - break - } -} - -func TestReflectorResyncChan(t *testing.T) { - s := NewStore(MetaNamespaceKeyFunc) - g := NewReflector(&testLW{}, &v1.Pod{}, s, time.Millisecond) - a, _ := g.resyncChan() - b := time.After(wait.ForeverTestTimeout) - select { - case <-a: - t.Logf("got timeout as expected") - case <-b: - t.Errorf("resyncChan() is at least 99 milliseconds late??") - } -} - -func BenchmarkReflectorResyncChanMany(b *testing.B) { - s := NewStore(MetaNamespaceKeyFunc) - g := NewReflector(&testLW{}, &v1.Pod{}, s, 25*time.Millisecond) - // The improvement to this (calling the timer's Stop() method) makes - // this benchmark about 40% faster. - for i := 0; i < b.N; i++ { - g.resyncPeriod = time.Duration(rand.Float64() * float64(time.Millisecond) * 25) - _, stop := g.resyncChan() - stop() - } -} - -func TestReflectorWatchHandlerError(t *testing.T) { - s := NewStore(MetaNamespaceKeyFunc) - g := NewReflector(&testLW{}, &v1.Pod{}, s, 0) - fw := watch.NewFake() - go func() { - fw.Stop() - }() - var resumeRV string - err := g.watchHandler(fw, &resumeRV, nevererrc, wait.NeverStop) - if err == nil { - t.Errorf("unexpected non-error") - } -} - -func TestReflectorWatchHandler(t *testing.T) { - s := NewStore(MetaNamespaceKeyFunc) - g := NewReflector(&testLW{}, &v1.Pod{}, s, 0) - fw := watch.NewFake() - s.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) - s.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}) - go func() { - fw.Add(&v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "rejected"}}) - fw.Delete(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) - fw.Modify(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "55"}}) - fw.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "baz", ResourceVersion: "32"}}) - fw.Stop() - }() - var resumeRV string - err := g.watchHandler(fw, &resumeRV, nevererrc, wait.NeverStop) - if err != nil { - t.Errorf("unexpected error %v", err) - } - - mkPod := func(id string, rv string) *v1.Pod { - return &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: id, ResourceVersion: rv}} - } - - table := []struct { - Pod *v1.Pod - exists bool - }{ - {mkPod("foo", ""), false}, - {mkPod("rejected", ""), false}, - {mkPod("bar", "55"), true}, - {mkPod("baz", "32"), true}, - } - for _, item := range table { - obj, exists, _ := s.Get(item.Pod) - if e, a := item.exists, exists; e != a { - t.Errorf("%v: expected %v, got %v", item.Pod, e, a) - } - if !exists { - continue - } - if e, a := item.Pod.ResourceVersion, obj.(*v1.Pod).ResourceVersion; e != a { - t.Errorf("%v: expected %v, got %v", item.Pod, e, a) - } - } - - // RV should send the last version we see. - if e, a := "32", resumeRV; e != a { - t.Errorf("expected %v, got %v", e, a) - } - - // last sync resource version should be the last version synced with store - if e, a := "32", g.LastSyncResourceVersion(); e != a { - t.Errorf("expected %v, got %v", e, a) - } -} - -func TestReflectorStopWatch(t *testing.T) { - s := NewStore(MetaNamespaceKeyFunc) - g := NewReflector(&testLW{}, &v1.Pod{}, s, 0) - fw := watch.NewFake() - var resumeRV string - stopWatch := make(chan struct{}, 1) - stopWatch <- struct{}{} - err := g.watchHandler(fw, &resumeRV, nevererrc, stopWatch) - if err != errorStopRequested { - t.Errorf("expected stop error, got %q", err) - } -} - -func TestReflectorListAndWatch(t *testing.T) { - createdFakes := make(chan *watch.FakeWatcher) - - // The ListFunc says that it's at revision 1. Therefore, we expect our WatchFunc - // to get called at the beginning of the watch with 1, and again with 3 when we - // inject an error. - expectedRVs := []string{"1", "3"} - lw := &testLW{ - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - rv := options.ResourceVersion - fw := watch.NewFake() - if e, a := expectedRVs[0], rv; e != a { - t.Errorf("Expected rv %v, but got %v", e, a) - } - expectedRVs = expectedRVs[1:] - // channel is not buffered because the for loop below needs to block. But - // we don't want to block here, so report the new fake via a go routine. - go func() { createdFakes <- fw }() - return fw, nil - }, - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "1"}}, nil - }, - } - s := NewFIFO(MetaNamespaceKeyFunc) - r := NewReflector(lw, &v1.Pod{}, s, 0) - go r.ListAndWatch(wait.NeverStop) - - ids := []string{"foo", "bar", "baz", "qux", "zoo"} - var fw *watch.FakeWatcher - for i, id := range ids { - if fw == nil { - fw = <-createdFakes - } - sendingRV := strconv.FormatUint(uint64(i+2), 10) - fw.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: id, ResourceVersion: sendingRV}}) - if sendingRV == "3" { - // Inject a failure. - fw.Stop() - fw = nil - } - } - - // Verify we received the right ids with the right resource versions. - for i, id := range ids { - pod := Pop(s).(*v1.Pod) - if e, a := id, pod.Name; e != a { - t.Errorf("%v: Expected %v, got %v", i, e, a) - } - if e, a := strconv.FormatUint(uint64(i+2), 10), pod.ResourceVersion; e != a { - t.Errorf("%v: Expected %v, got %v", i, e, a) - } - } - - if len(expectedRVs) != 0 { - t.Error("called watchStarter an unexpected number of times") - } -} - -func TestReflectorListAndWatchWithErrors(t *testing.T) { - mkPod := func(id string, rv string) *v1.Pod { - return &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: id, ResourceVersion: rv}} - } - mkList := func(rv string, pods ...*v1.Pod) *v1.PodList { - list := &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: rv}} - for _, pod := range pods { - list.Items = append(list.Items, *pod) - } - return list - } - table := []struct { - list *v1.PodList - listErr error - events []watch.Event - watchErr error - }{ - { - list: mkList("1"), - events: []watch.Event{ - {Type: watch.Added, Object: mkPod("foo", "2")}, - {Type: watch.Added, Object: mkPod("bar", "3")}, - }, - }, { - list: mkList("3", mkPod("foo", "2"), mkPod("bar", "3")), - events: []watch.Event{ - {Type: watch.Deleted, Object: mkPod("foo", "4")}, - {Type: watch.Added, Object: mkPod("qux", "5")}, - }, - }, { - listErr: fmt.Errorf("a list error"), - }, { - list: mkList("5", mkPod("bar", "3"), mkPod("qux", "5")), - watchErr: fmt.Errorf("a watch error"), - }, { - list: mkList("5", mkPod("bar", "3"), mkPod("qux", "5")), - events: []watch.Event{ - {Type: watch.Added, Object: mkPod("baz", "6")}, - }, - }, { - list: mkList("6", mkPod("bar", "3"), mkPod("qux", "5"), mkPod("baz", "6")), - }, - } - - s := NewFIFO(MetaNamespaceKeyFunc) - for line, item := range table { - if item.list != nil { - // Test that the list is what currently exists in the store. - current := s.List() - checkMap := map[string]string{} - for _, item := range current { - pod := item.(*v1.Pod) - checkMap[pod.Name] = pod.ResourceVersion - } - for _, pod := range item.list.Items { - if e, a := pod.ResourceVersion, checkMap[pod.Name]; e != a { - t.Errorf("%v: expected %v, got %v for pod %v", line, e, a, pod.Name) - } - } - if e, a := len(item.list.Items), len(checkMap); e != a { - t.Errorf("%v: expected %v, got %v", line, e, a) - } - } - watchRet, watchErr := item.events, item.watchErr - lw := &testLW{ - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if watchErr != nil { - return nil, watchErr - } - watchErr = fmt.Errorf("second watch") - fw := watch.NewFake() - go func() { - for _, e := range watchRet { - fw.Action(e.Type, e.Object) - } - fw.Stop() - }() - return fw, nil - }, - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - return item.list, item.listErr - }, - } - r := NewReflector(lw, &v1.Pod{}, s, 0) - r.ListAndWatch(wait.NeverStop) - } -} - -func TestReflectorResync(t *testing.T) { - iteration := 0 - stopCh := make(chan struct{}) - rerr := errors.New("expected resync reached") - s := &FakeCustomStore{ - ResyncFunc: func() error { - iteration++ - if iteration == 2 { - return rerr - } - return nil - }, - } - - lw := &testLW{ - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - fw := watch.NewFake() - return fw, nil - }, - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "0"}}, nil - }, - } - resyncPeriod := 1 * time.Millisecond - r := NewReflector(lw, &v1.Pod{}, s, resyncPeriod) - if err := r.ListAndWatch(stopCh); err != nil { - // error from Resync is not propaged up to here. - t.Errorf("expected error %v", err) - } - if iteration != 2 { - t.Errorf("exactly 2 iterations were expected, got: %v", iteration) - } -} diff --git a/vendor/k8s.io/client-go/tools/cache/shared_informer_test.go b/vendor/k8s.io/client-go/tools/cache/shared_informer_test.go deleted file mode 100644 index 22e4a90d..00000000 --- a/vendor/k8s.io/client-go/tools/cache/shared_informer_test.go +++ /dev/null @@ -1,265 +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 cache - -import ( - "fmt" - "sync" - "testing" - "time" - - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/meta" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/clock" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/wait" - fcache "k8s.io/client-go/tools/cache/testing" -) - -type testListener struct { - lock sync.RWMutex - resyncPeriod time.Duration - expectedItemNames sets.String - receivedItemNames []string - name string -} - -func newTestListener(name string, resyncPeriod time.Duration, expected ...string) *testListener { - l := &testListener{ - resyncPeriod: resyncPeriod, - expectedItemNames: sets.NewString(expected...), - name: name, - } - return l -} - -func (l *testListener) OnAdd(obj interface{}) { - l.handle(obj) -} - -func (l *testListener) OnUpdate(old, new interface{}) { - l.handle(new) -} - -func (l *testListener) OnDelete(obj interface{}) { -} - -func (l *testListener) handle(obj interface{}) { - key, _ := MetaNamespaceKeyFunc(obj) - fmt.Printf("%s: handle: %v\n", l.name, key) - l.lock.Lock() - defer l.lock.Unlock() - - objectMeta, _ := meta.Accessor(obj) - l.receivedItemNames = append(l.receivedItemNames, objectMeta.GetName()) -} - -func (l *testListener) ok() bool { - fmt.Println("polling") - err := wait.PollImmediate(100*time.Millisecond, 2*time.Second, func() (bool, error) { - if l.satisfiedExpectations() { - return true, nil - } - return false, nil - }) - if err != nil { - return false - } - - // wait just a bit to allow any unexpected stragglers to come in - fmt.Println("sleeping") - time.Sleep(1 * time.Second) - fmt.Println("final check") - return l.satisfiedExpectations() -} - -func (l *testListener) satisfiedExpectations() bool { - l.lock.RLock() - defer l.lock.RUnlock() - - return len(l.receivedItemNames) == l.expectedItemNames.Len() && sets.NewString(l.receivedItemNames...).Equal(l.expectedItemNames) -} - -func TestListenerResyncPeriods(t *testing.T) { - // source simulates an apiserver object endpoint. - source := fcache.NewFakeControllerSource() - source.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "pod1"}}) - source.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "pod2"}}) - - // create the shared informer and resync every 1s - informer := NewSharedInformer(source, &v1.Pod{}, 1*time.Second).(*sharedIndexInformer) - - clock := clock.NewFakeClock(time.Now()) - informer.clock = clock - informer.processor.clock = clock - - // listener 1, never resync - listener1 := newTestListener("listener1", 0, "pod1", "pod2") - informer.AddEventHandlerWithResyncPeriod(listener1, listener1.resyncPeriod) - - // listener 2, resync every 2s - listener2 := newTestListener("listener2", 2*time.Second, "pod1", "pod2") - informer.AddEventHandlerWithResyncPeriod(listener2, listener2.resyncPeriod) - - // listener 3, resync every 3s - listener3 := newTestListener("listener3", 3*time.Second, "pod1", "pod2") - informer.AddEventHandlerWithResyncPeriod(listener3, listener3.resyncPeriod) - listeners := []*testListener{listener1, listener2, listener3} - - stop := make(chan struct{}) - defer close(stop) - - go informer.Run(stop) - - // ensure all listeners got the initial List - for _, listener := range listeners { - if !listener.ok() { - t.Errorf("%s: expected %v, got %v", listener.name, listener.expectedItemNames, listener.receivedItemNames) - } - } - - // reset - for _, listener := range listeners { - listener.receivedItemNames = []string{} - } - - // advance so listener2 gets a resync - clock.Step(2 * time.Second) - - // make sure listener2 got the resync - if !listener2.ok() { - t.Errorf("%s: expected %v, got %v", listener2.name, listener2.expectedItemNames, listener2.receivedItemNames) - } - - // wait a bit to give errant items a chance to go to 1 and 3 - time.Sleep(1 * time.Second) - - // make sure listeners 1 and 3 got nothing - if len(listener1.receivedItemNames) != 0 { - t.Errorf("listener1: should not have resynced (got %d)", len(listener1.receivedItemNames)) - } - if len(listener3.receivedItemNames) != 0 { - t.Errorf("listener3: should not have resynced (got %d)", len(listener3.receivedItemNames)) - } - - // reset - for _, listener := range listeners { - listener.receivedItemNames = []string{} - } - - // advance so listener3 gets a resync - clock.Step(1 * time.Second) - - // make sure listener3 got the resync - if !listener3.ok() { - t.Errorf("%s: expected %v, got %v", listener3.name, listener3.expectedItemNames, listener3.receivedItemNames) - } - - // wait a bit to give errant items a chance to go to 1 and 2 - time.Sleep(1 * time.Second) - - // make sure listeners 1 and 2 got nothing - if len(listener1.receivedItemNames) != 0 { - t.Errorf("listener1: should not have resynced (got %d)", len(listener1.receivedItemNames)) - } - if len(listener2.receivedItemNames) != 0 { - t.Errorf("listener2: should not have resynced (got %d)", len(listener2.receivedItemNames)) - } -} - -func TestResyncCheckPeriod(t *testing.T) { - // source simulates an apiserver object endpoint. - source := fcache.NewFakeControllerSource() - - // create the shared informer and resync every 12 hours - informer := NewSharedInformer(source, &v1.Pod{}, 12*time.Hour).(*sharedIndexInformer) - - clock := clock.NewFakeClock(time.Now()) - informer.clock = clock - informer.processor.clock = clock - - // listener 1, never resync - listener1 := newTestListener("listener1", 0) - informer.AddEventHandlerWithResyncPeriod(listener1, listener1.resyncPeriod) - if e, a := 12*time.Hour, informer.resyncCheckPeriod; e != a { - t.Errorf("expected %d, got %d", e, a) - } - if e, a := time.Duration(0), informer.processor.listeners[0].resyncPeriod; e != a { - t.Errorf("expected %d, got %d", e, a) - } - - // listener 2, resync every minute - listener2 := newTestListener("listener2", 1*time.Minute) - informer.AddEventHandlerWithResyncPeriod(listener2, listener2.resyncPeriod) - if e, a := 1*time.Minute, informer.resyncCheckPeriod; e != a { - t.Errorf("expected %d, got %d", e, a) - } - if e, a := time.Duration(0), informer.processor.listeners[0].resyncPeriod; e != a { - t.Errorf("expected %d, got %d", e, a) - } - if e, a := 1*time.Minute, informer.processor.listeners[1].resyncPeriod; e != a { - t.Errorf("expected %d, got %d", e, a) - } - - // listener 3, resync every 55 seconds - listener3 := newTestListener("listener3", 55*time.Second) - informer.AddEventHandlerWithResyncPeriod(listener3, listener3.resyncPeriod) - if e, a := 55*time.Second, informer.resyncCheckPeriod; e != a { - t.Errorf("expected %d, got %d", e, a) - } - if e, a := time.Duration(0), informer.processor.listeners[0].resyncPeriod; e != a { - t.Errorf("expected %d, got %d", e, a) - } - if e, a := 1*time.Minute, informer.processor.listeners[1].resyncPeriod; e != a { - t.Errorf("expected %d, got %d", e, a) - } - if e, a := 55*time.Second, informer.processor.listeners[2].resyncPeriod; e != a { - t.Errorf("expected %d, got %d", e, a) - } - - // listener 4, resync every 5 seconds - listener4 := newTestListener("listener4", 5*time.Second) - informer.AddEventHandlerWithResyncPeriod(listener4, listener4.resyncPeriod) - if e, a := 5*time.Second, informer.resyncCheckPeriod; e != a { - t.Errorf("expected %d, got %d", e, a) - } - if e, a := time.Duration(0), informer.processor.listeners[0].resyncPeriod; e != a { - t.Errorf("expected %d, got %d", e, a) - } - if e, a := 1*time.Minute, informer.processor.listeners[1].resyncPeriod; e != a { - t.Errorf("expected %d, got %d", e, a) - } - if e, a := 55*time.Second, informer.processor.listeners[2].resyncPeriod; e != a { - t.Errorf("expected %d, got %d", e, a) - } - if e, a := 5*time.Second, informer.processor.listeners[3].resyncPeriod; e != a { - t.Errorf("expected %d, got %d", e, a) - } -} - -// verify that https://github.com/kubernetes/kubernetes/issues/59822 is fixed -func TestSharedInformerInitializationRace(t *testing.T) { - source := fcache.NewFakeControllerSource() - informer := NewSharedInformer(source, &v1.Pod{}, 1*time.Second).(*sharedIndexInformer) - listener := newTestListener("raceListener", 0) - - stop := make(chan struct{}) - go informer.AddEventHandlerWithResyncPeriod(listener, listener.resyncPeriod) - go informer.Run(stop) - close(stop) -} diff --git a/vendor/k8s.io/client-go/tools/cache/store_test.go b/vendor/k8s.io/client-go/tools/cache/store_test.go deleted file mode 100644 index 52c9585a..00000000 --- a/vendor/k8s.io/client-go/tools/cache/store_test.go +++ /dev/null @@ -1,156 +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 cache - -import ( - "testing" - - "k8s.io/apimachinery/pkg/util/sets" -) - -// Test public interface -func doTestStore(t *testing.T, store Store) { - mkObj := func(id string, val string) testStoreObject { - return testStoreObject{id: id, val: val} - } - - store.Add(mkObj("foo", "bar")) - if item, ok, _ := store.Get(mkObj("foo", "")); !ok { - t.Errorf("didn't find inserted item") - } else { - if e, a := "bar", item.(testStoreObject).val; e != a { - t.Errorf("expected %v, got %v", e, a) - } - } - store.Update(mkObj("foo", "baz")) - if item, ok, _ := store.Get(mkObj("foo", "")); !ok { - t.Errorf("didn't find inserted item") - } else { - if e, a := "baz", item.(testStoreObject).val; e != a { - t.Errorf("expected %v, got %v", e, a) - } - } - store.Delete(mkObj("foo", "")) - if _, ok, _ := store.Get(mkObj("foo", "")); ok { - t.Errorf("found deleted item??") - } - - // Test List. - store.Add(mkObj("a", "b")) - store.Add(mkObj("c", "d")) - store.Add(mkObj("e", "e")) - { - found := sets.String{} - for _, item := range store.List() { - found.Insert(item.(testStoreObject).val) - } - if !found.HasAll("b", "d", "e") { - t.Errorf("missing items, found: %v", found) - } - if len(found) != 3 { - t.Errorf("extra items") - } - } - - // Test Replace. - store.Replace([]interface{}{ - mkObj("foo", "foo"), - mkObj("bar", "bar"), - }, "0") - - { - found := sets.String{} - for _, item := range store.List() { - found.Insert(item.(testStoreObject).val) - } - if !found.HasAll("foo", "bar") { - t.Errorf("missing items") - } - if len(found) != 2 { - t.Errorf("extra items") - } - } -} - -// Test public interface -func doTestIndex(t *testing.T, indexer Indexer) { - mkObj := func(id string, val string) testStoreObject { - return testStoreObject{id: id, val: val} - } - - // Test Index - expected := map[string]sets.String{} - expected["b"] = sets.NewString("a", "c") - expected["f"] = sets.NewString("e") - expected["h"] = sets.NewString("g") - indexer.Add(mkObj("a", "b")) - indexer.Add(mkObj("c", "b")) - indexer.Add(mkObj("e", "f")) - indexer.Add(mkObj("g", "h")) - { - for k, v := range expected { - found := sets.String{} - indexResults, err := indexer.Index("by_val", mkObj("", k)) - if err != nil { - t.Errorf("Unexpected error %v", err) - } - for _, item := range indexResults { - found.Insert(item.(testStoreObject).id) - } - items := v.List() - if !found.HasAll(items...) { - t.Errorf("missing items, index %s, expected %v but found %v", k, items, found.List()) - } - } - } -} - -func testStoreKeyFunc(obj interface{}) (string, error) { - return obj.(testStoreObject).id, nil -} - -func testStoreIndexFunc(obj interface{}) ([]string, error) { - return []string{obj.(testStoreObject).val}, nil -} - -func testStoreIndexers() Indexers { - indexers := Indexers{} - indexers["by_val"] = testStoreIndexFunc - return indexers -} - -type testStoreObject struct { - id string - val string -} - -func TestCache(t *testing.T) { - doTestStore(t, NewStore(testStoreKeyFunc)) -} - -func TestFIFOCache(t *testing.T) { - doTestStore(t, NewFIFO(testStoreKeyFunc)) -} - -func TestUndeltaStore(t *testing.T) { - nop := func([]interface{}) {} - doTestStore(t, NewUndeltaStore(nop, testStoreKeyFunc)) -} - -func TestIndex(t *testing.T) { - doTestIndex(t, NewIndexer(testStoreKeyFunc, testStoreIndexers())) -} diff --git a/vendor/k8s.io/client-go/tools/cache/undelta_store_test.go b/vendor/k8s.io/client-go/tools/cache/undelta_store_test.go deleted file mode 100644 index 6316442e..00000000 --- a/vendor/k8s.io/client-go/tools/cache/undelta_store_test.go +++ /dev/null @@ -1,131 +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 cache - -import ( - "reflect" - "testing" -) - -// store_test.go checks that UndeltaStore conforms to the Store interface -// behavior. This test just tests that it calls the push func in addition. - -type testUndeltaObject struct { - name string - val interface{} -} - -func testUndeltaKeyFunc(obj interface{}) (string, error) { - return obj.(testUndeltaObject).name, nil -} - -/* -var ( - o1 interface{} = t{1} - o2 interface{} = t{2} - l1 []interface{} = []interface{}{t{1}} -) -*/ - -func TestUpdateCallsPush(t *testing.T) { - mkObj := func(name string, val interface{}) testUndeltaObject { - return testUndeltaObject{name: name, val: val} - } - - var got []interface{} - var callcount int = 0 - push := func(m []interface{}) { - callcount++ - got = m - } - - u := NewUndeltaStore(push, testUndeltaKeyFunc) - - u.Add(mkObj("a", 2)) - u.Update(mkObj("a", 1)) - if callcount != 2 { - t.Errorf("Expected 2 calls, got %d", callcount) - } - - l := []interface{}{mkObj("a", 1)} - if !reflect.DeepEqual(l, got) { - t.Errorf("Expected %#v, Got %#v", l, got) - } -} - -func TestDeleteCallsPush(t *testing.T) { - mkObj := func(name string, val interface{}) testUndeltaObject { - return testUndeltaObject{name: name, val: val} - } - - var got []interface{} - var callcount int = 0 - push := func(m []interface{}) { - callcount++ - got = m - } - - u := NewUndeltaStore(push, testUndeltaKeyFunc) - - u.Add(mkObj("a", 2)) - u.Delete(mkObj("a", "")) - if callcount != 2 { - t.Errorf("Expected 2 calls, got %d", callcount) - } - expected := []interface{}{} - if !reflect.DeepEqual(expected, got) { - t.Errorf("Expected %#v, Got %#v", expected, got) - } -} - -func TestReadsDoNotCallPush(t *testing.T) { - push := func(m []interface{}) { - t.Errorf("Unexpected call to push!") - } - - u := NewUndeltaStore(push, testUndeltaKeyFunc) - - // These should not call push. - _ = u.List() - _, _, _ = u.Get(testUndeltaObject{"a", ""}) -} - -func TestReplaceCallsPush(t *testing.T) { - mkObj := func(name string, val interface{}) testUndeltaObject { - return testUndeltaObject{name: name, val: val} - } - - var got []interface{} - var callcount int = 0 - push := func(m []interface{}) { - callcount++ - got = m - } - - u := NewUndeltaStore(push, testUndeltaKeyFunc) - - m := []interface{}{mkObj("a", 1)} - - u.Replace(m, "0") - if callcount != 1 { - t.Errorf("Expected 1 calls, got %d", callcount) - } - expected := []interface{}{mkObj("a", 1)} - if !reflect.DeepEqual(expected, got) { - t.Errorf("Expected %#v, Got %#v", expected, got) - } -} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/helpers_test.go b/vendor/k8s.io/client-go/tools/clientcmd/api/helpers_test.go deleted file mode 100644 index 43020845..00000000 --- a/vendor/k8s.io/client-go/tools/clientcmd/api/helpers_test.go +++ /dev/null @@ -1,301 +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 api - -import ( - "fmt" - "io/ioutil" - "os" - "reflect" - "testing" - - "github.com/ghodss/yaml" -) - -func newMergedConfig(certFile, certContent, keyFile, keyContent, caFile, caContent string, t *testing.T) Config { - if err := ioutil.WriteFile(certFile, []byte(certContent), 0644); err != nil { - t.Errorf("unexpected error: %v", err) - } - if err := ioutil.WriteFile(keyFile, []byte(keyContent), 0600); err != nil { - t.Errorf("unexpected error: %v", err) - } - if err := ioutil.WriteFile(caFile, []byte(caContent), 0644); err != nil { - t.Errorf("unexpected error: %v", err) - } - - return Config{ - AuthInfos: map[string]*AuthInfo{ - "red-user": {Token: "red-token", ClientCertificateData: []byte(certContent), ClientKeyData: []byte(keyContent)}, - "blue-user": {Token: "blue-token", ClientCertificate: certFile, ClientKey: keyFile}}, - Clusters: map[string]*Cluster{ - "cow-cluster": {Server: "http://cow.org:8080", CertificateAuthorityData: []byte(caContent)}, - "chicken-cluster": {Server: "http://chicken.org:8080", CertificateAuthority: caFile}}, - Contexts: map[string]*Context{ - "federal-context": {AuthInfo: "red-user", Cluster: "cow-cluster"}, - "shaker-context": {AuthInfo: "blue-user", Cluster: "chicken-cluster"}}, - CurrentContext: "federal-context", - } -} - -func TestMinifySuccess(t *testing.T) { - certFile, _ := ioutil.TempFile("", "") - defer os.Remove(certFile.Name()) - keyFile, _ := ioutil.TempFile("", "") - defer os.Remove(keyFile.Name()) - caFile, _ := ioutil.TempFile("", "") - defer os.Remove(caFile.Name()) - - mutatingConfig := newMergedConfig(certFile.Name(), "cert", keyFile.Name(), "key", caFile.Name(), "ca", t) - - if err := MinifyConfig(&mutatingConfig); err != nil { - t.Errorf("unexpected error: %v", err) - } - - if len(mutatingConfig.Contexts) > 1 { - t.Errorf("unexpected contexts: %v", mutatingConfig.Contexts) - } - if _, exists := mutatingConfig.Contexts["federal-context"]; !exists { - t.Errorf("missing context") - } - - if len(mutatingConfig.Clusters) > 1 { - t.Errorf("unexpected clusters: %v", mutatingConfig.Clusters) - } - if _, exists := mutatingConfig.Clusters["cow-cluster"]; !exists { - t.Errorf("missing cluster") - } - - if len(mutatingConfig.AuthInfos) > 1 { - t.Errorf("unexpected users: %v", mutatingConfig.AuthInfos) - } - if _, exists := mutatingConfig.AuthInfos["red-user"]; !exists { - t.Errorf("missing user") - } -} - -func TestMinifyMissingContext(t *testing.T) { - certFile, _ := ioutil.TempFile("", "") - defer os.Remove(certFile.Name()) - keyFile, _ := ioutil.TempFile("", "") - defer os.Remove(keyFile.Name()) - caFile, _ := ioutil.TempFile("", "") - defer os.Remove(caFile.Name()) - - mutatingConfig := newMergedConfig(certFile.Name(), "cert", keyFile.Name(), "key", caFile.Name(), "ca", t) - mutatingConfig.CurrentContext = "missing" - - errMsg := "cannot locate context missing" - - if err := MinifyConfig(&mutatingConfig); err == nil || err.Error() != errMsg { - t.Errorf("expected %v, got %v", errMsg, err) - } -} - -func TestMinifyMissingCluster(t *testing.T) { - certFile, _ := ioutil.TempFile("", "") - defer os.Remove(certFile.Name()) - keyFile, _ := ioutil.TempFile("", "") - defer os.Remove(keyFile.Name()) - caFile, _ := ioutil.TempFile("", "") - defer os.Remove(caFile.Name()) - - mutatingConfig := newMergedConfig(certFile.Name(), "cert", keyFile.Name(), "key", caFile.Name(), "ca", t) - delete(mutatingConfig.Clusters, mutatingConfig.Contexts[mutatingConfig.CurrentContext].Cluster) - - errMsg := "cannot locate cluster cow-cluster" - - if err := MinifyConfig(&mutatingConfig); err == nil || err.Error() != errMsg { - t.Errorf("expected %v, got %v", errMsg, err) - } -} - -func TestMinifyMissingAuthInfo(t *testing.T) { - certFile, _ := ioutil.TempFile("", "") - defer os.Remove(certFile.Name()) - keyFile, _ := ioutil.TempFile("", "") - defer os.Remove(keyFile.Name()) - caFile, _ := ioutil.TempFile("", "") - defer os.Remove(caFile.Name()) - - mutatingConfig := newMergedConfig(certFile.Name(), "cert", keyFile.Name(), "key", caFile.Name(), "ca", t) - delete(mutatingConfig.AuthInfos, mutatingConfig.Contexts[mutatingConfig.CurrentContext].AuthInfo) - - errMsg := "cannot locate user red-user" - - if err := MinifyConfig(&mutatingConfig); err == nil || err.Error() != errMsg { - t.Errorf("expected %v, got %v", errMsg, err) - } -} - -func TestFlattenSuccess(t *testing.T) { - certFile, _ := ioutil.TempFile("", "") - defer os.Remove(certFile.Name()) - keyFile, _ := ioutil.TempFile("", "") - defer os.Remove(keyFile.Name()) - caFile, _ := ioutil.TempFile("", "") - defer os.Remove(caFile.Name()) - - certData := "cert" - keyData := "key" - caData := "ca" - - unchangingCluster := "cow-cluster" - unchangingAuthInfo := "red-user" - changingCluster := "chicken-cluster" - changingAuthInfo := "blue-user" - - startingConfig := newMergedConfig(certFile.Name(), certData, keyFile.Name(), keyData, caFile.Name(), caData, t) - mutatingConfig := startingConfig - - if err := FlattenConfig(&mutatingConfig); err != nil { - t.Errorf("unexpected error: %v", err) - } - - if len(mutatingConfig.Contexts) != 2 { - t.Errorf("unexpected contexts: %v", mutatingConfig.Contexts) - } - if !reflect.DeepEqual(startingConfig.Contexts, mutatingConfig.Contexts) { - t.Errorf("expected %v, got %v", startingConfig.Contexts, mutatingConfig.Contexts) - } - - 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 len(mutatingConfig.Clusters[changingCluster].CertificateAuthority) != 0 { - t.Errorf("unexpected caFile") - } - if string(mutatingConfig.Clusters[changingCluster].CertificateAuthorityData) != caData { - t.Errorf("expected %v, got %v", caData, string(mutatingConfig.Clusters[changingCluster].CertificateAuthorityData)) - } - - if len(mutatingConfig.AuthInfos) != 2 { - t.Errorf("unexpected users: %v", mutatingConfig.AuthInfos) - } - if !reflect.DeepEqual(startingConfig.AuthInfos[unchangingAuthInfo], mutatingConfig.AuthInfos[unchangingAuthInfo]) { - t.Errorf("expected %v, got %v", startingConfig.AuthInfos[unchangingAuthInfo], mutatingConfig.AuthInfos[unchangingAuthInfo]) - } - if len(mutatingConfig.AuthInfos[changingAuthInfo].ClientCertificate) != 0 { - t.Errorf("unexpected caFile") - } - if string(mutatingConfig.AuthInfos[changingAuthInfo].ClientCertificateData) != certData { - t.Errorf("expected %v, got %v", certData, string(mutatingConfig.AuthInfos[changingAuthInfo].ClientCertificateData)) - } - if len(mutatingConfig.AuthInfos[changingAuthInfo].ClientKey) != 0 { - t.Errorf("unexpected caFile") - } - if string(mutatingConfig.AuthInfos[changingAuthInfo].ClientKeyData) != keyData { - t.Errorf("expected %v, got %v", keyData, string(mutatingConfig.AuthInfos[changingAuthInfo].ClientKeyData)) - } - -} - -func Example_minifyAndShorten() { - certFile, _ := ioutil.TempFile("", "") - defer os.Remove(certFile.Name()) - keyFile, _ := ioutil.TempFile("", "") - defer os.Remove(keyFile.Name()) - caFile, _ := ioutil.TempFile("", "") - defer os.Remove(caFile.Name()) - - certData := "cert" - keyData := "key" - caData := "ca" - - config := newMergedConfig(certFile.Name(), certData, keyFile.Name(), keyData, caFile.Name(), caData, nil) - - MinifyConfig(&config) - ShortenConfig(&config) - - output, _ := yaml.Marshal(config) - fmt.Printf("%s", string(output)) - // Output: - // clusters: - // cow-cluster: - // LocationOfOrigin: "" - // certificate-authority-data: REDACTED - // server: http://cow.org:8080 - // contexts: - // federal-context: - // LocationOfOrigin: "" - // cluster: cow-cluster - // user: red-user - // current-context: federal-context - // preferences: {} - // users: - // red-user: - // LocationOfOrigin: "" - // client-certificate-data: REDACTED - // client-key-data: REDACTED - // token: red-token -} - -func TestShortenSuccess(t *testing.T) { - certFile, _ := ioutil.TempFile("", "") - defer os.Remove(certFile.Name()) - keyFile, _ := ioutil.TempFile("", "") - defer os.Remove(keyFile.Name()) - caFile, _ := ioutil.TempFile("", "") - defer os.Remove(caFile.Name()) - - certData := "cert" - keyData := "key" - caData := "ca" - - unchangingCluster := "chicken-cluster" - unchangingAuthInfo := "blue-user" - changingCluster := "cow-cluster" - changingAuthInfo := "red-user" - - startingConfig := newMergedConfig(certFile.Name(), certData, keyFile.Name(), keyData, caFile.Name(), caData, t) - mutatingConfig := startingConfig - - ShortenConfig(&mutatingConfig) - - if len(mutatingConfig.Contexts) != 2 { - t.Errorf("unexpected contexts: %v", mutatingConfig.Contexts) - } - if !reflect.DeepEqual(startingConfig.Contexts, mutatingConfig.Contexts) { - t.Errorf("expected %v, got %v", startingConfig.Contexts, mutatingConfig.Contexts) - } - - redacted := string(redactedBytes) - 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 len(mutatingConfig.AuthInfos) != 2 { - t.Errorf("unexpected users: %v", mutatingConfig.AuthInfos) - } - if !reflect.DeepEqual(startingConfig.AuthInfos[unchangingAuthInfo], mutatingConfig.AuthInfos[unchangingAuthInfo]) { - t.Errorf("expected %v, got %v", startingConfig.AuthInfos[unchangingAuthInfo], mutatingConfig.AuthInfos[unchangingAuthInfo]) - } - if string(mutatingConfig.AuthInfos[changingAuthInfo].ClientCertificateData) != redacted { - t.Errorf("expected %v, got %v", redacted, string(mutatingConfig.AuthInfos[changingAuthInfo].ClientCertificateData)) - } - if string(mutatingConfig.AuthInfos[changingAuthInfo].ClientKeyData) != redacted { - t.Errorf("expected %v, got %v", redacted, string(mutatingConfig.AuthInfos[changingAuthInfo].ClientKeyData)) - } -} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/types_test.go b/vendor/k8s.io/client-go/tools/clientcmd/api/types_test.go deleted file mode 100644 index bd348345..00000000 --- a/vendor/k8s.io/client-go/tools/clientcmd/api/types_test.go +++ /dev/null @@ -1,135 +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 api - -import ( - "fmt" - - "github.com/ghodss/yaml" -) - -func Example_emptyConfig() { - defaultConfig := NewConfig() - - output, err := yaml.Marshal(defaultConfig) - if err != nil { - fmt.Printf("Unexpected error: %v", err) - } - - fmt.Printf("%v", string(output)) - // Output: - // clusters: {} - // contexts: {} - // current-context: "" - // preferences: {} - // users: {} -} - -func Example_ofOptionsConfig() { - defaultConfig := NewConfig() - defaultConfig.Preferences.Colors = true - defaultConfig.Clusters["alfa"] = &Cluster{ - Server: "https://alfa.org:8080", - InsecureSkipTLSVerify: true, - CertificateAuthority: "path/to/my/cert-ca-filename", - } - defaultConfig.Clusters["bravo"] = &Cluster{ - Server: "https://bravo.org:8080", - InsecureSkipTLSVerify: false, - } - defaultConfig.AuthInfos["white-mage-via-cert"] = &AuthInfo{ - ClientCertificate: "path/to/my/client-cert-filename", - ClientKey: "path/to/my/client-key-filename", - } - defaultConfig.AuthInfos["red-mage-via-token"] = &AuthInfo{ - Token: "my-secret-token", - } - defaultConfig.AuthInfos["black-mage-via-auth-provider"] = &AuthInfo{ - AuthProvider: &AuthProviderConfig{ - Name: "gcp", - Config: map[string]string{ - "foo": "bar", - "token": "s3cr3t-t0k3n", - }, - }, - } - defaultConfig.Contexts["bravo-as-black-mage"] = &Context{ - Cluster: "bravo", - AuthInfo: "black-mage-via-auth-provider", - Namespace: "yankee", - } - defaultConfig.Contexts["alfa-as-black-mage"] = &Context{ - Cluster: "alfa", - AuthInfo: "black-mage-via-auth-provider", - Namespace: "zulu", - } - defaultConfig.Contexts["alfa-as-white-mage"] = &Context{ - Cluster: "alfa", - AuthInfo: "white-mage-via-cert", - } - defaultConfig.CurrentContext = "alfa-as-white-mage" - - output, err := yaml.Marshal(defaultConfig) - if err != nil { - fmt.Printf("Unexpected error: %v", err) - } - - fmt.Printf("%v", string(output)) - // Output: - // clusters: - // alfa: - // LocationOfOrigin: "" - // certificate-authority: path/to/my/cert-ca-filename - // insecure-skip-tls-verify: true - // server: https://alfa.org:8080 - // bravo: - // LocationOfOrigin: "" - // server: https://bravo.org:8080 - // contexts: - // alfa-as-black-mage: - // LocationOfOrigin: "" - // cluster: alfa - // namespace: zulu - // user: black-mage-via-auth-provider - // alfa-as-white-mage: - // LocationOfOrigin: "" - // cluster: alfa - // user: white-mage-via-cert - // bravo-as-black-mage: - // LocationOfOrigin: "" - // cluster: bravo - // namespace: yankee - // user: black-mage-via-auth-provider - // current-context: alfa-as-white-mage - // preferences: - // colors: true - // users: - // black-mage-via-auth-provider: - // LocationOfOrigin: "" - // auth-provider: - // config: - // foo: bar - // token: s3cr3t-t0k3n - // name: gcp - // red-mage-via-token: - // LocationOfOrigin: "" - // token: my-secret-token - // white-mage-via-cert: - // LocationOfOrigin: "" - // client-certificate: path/to/my/client-cert-filename - // client-key: path/to/my/client-key-filename -} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/client_config_test.go b/vendor/k8s.io/client-go/tools/clientcmd/client_config_test.go deleted file mode 100644 index 0a9288bc..00000000 --- a/vendor/k8s.io/client-go/tools/clientcmd/client_config_test.go +++ /dev/null @@ -1,528 +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 clientcmd - -import ( - "io/ioutil" - "os" - "reflect" - "strings" - "testing" - - "github.com/imdario/mergo" - restclient "k8s.io/client-go/rest" - clientcmdapi "k8s.io/client-go/tools/clientcmd/api" -) - -func TestOldMergoLib(t *testing.T) { - type T struct { - X string - } - 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") - } -} - -func createValidTestConfig() *clientcmdapi.Config { - const ( - server = "https://anything.com:8080" - token = "the-token" - ) - - config := clientcmdapi.NewConfig() - config.Clusters["clean"] = &clientcmdapi.Cluster{ - Server: server, - } - config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ - Token: token, - } - config.Contexts["clean"] = &clientcmdapi.Context{ - Cluster: "clean", - AuthInfo: "clean", - } - config.CurrentContext = "clean" - - return config -} - -func createCAValidTestConfig() *clientcmdapi.Config { - - config := createValidTestConfig() - config.Clusters["clean"].CertificateAuthorityData = []byte{0, 0} - return config -} - -func TestInsecureOverridesCA(t *testing.T) { - config := createCAValidTestConfig() - clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{ - ClusterInfo: clientcmdapi.Cluster{ - InsecureSkipTLSVerify: true, - }, - }, nil) - - actualCfg, err := clientBuilder.ClientConfig() - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - matchBoolArg(true, actualCfg.Insecure, t) - matchStringArg("", actualCfg.TLSClientConfig.CAFile, t) - matchByteArg(nil, actualCfg.TLSClientConfig.CAData, t) -} - -func TestMergeContext(t *testing.T) { - const namespace = "overridden-namespace" - - config := createValidTestConfig() - clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil) - - _, overridden, err := clientBuilder.Namespace() - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - if overridden { - t.Error("Expected namespace to not be overridden") - } - - clientBuilder = NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{ - Context: clientcmdapi.Context{ - Namespace: namespace, - }, - }, nil) - - actual, overridden, err := clientBuilder.Namespace() - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - if !overridden { - t.Error("Expected namespace to be overridden") - } - - matchStringArg(namespace, actual, t) -} - -func TestCertificateData(t *testing.T) { - caData := []byte("ca-data") - certData := []byte("cert-data") - keyData := []byte("key-data") - - config := clientcmdapi.NewConfig() - config.Clusters["clean"] = &clientcmdapi.Cluster{ - Server: "https://localhost:8443", - CertificateAuthorityData: caData, - } - config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ - ClientCertificateData: certData, - ClientKeyData: keyData, - } - config.Contexts["clean"] = &clientcmdapi.Context{ - Cluster: "clean", - AuthInfo: "clean", - } - config.CurrentContext = "clean" - - clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil) - - clientConfig, err := clientBuilder.ClientConfig() - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - - // Make sure cert data gets into config (will override file paths) - matchByteArg(caData, clientConfig.TLSClientConfig.CAData, t) - matchByteArg(certData, clientConfig.TLSClientConfig.CertData, t) - matchByteArg(keyData, clientConfig.TLSClientConfig.KeyData, t) -} - -func TestBasicAuthData(t *testing.T) { - username := "myuser" - password := "mypass" - - config := clientcmdapi.NewConfig() - config.Clusters["clean"] = &clientcmdapi.Cluster{ - Server: "https://localhost:8443", - } - config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ - Username: username, - Password: password, - } - config.Contexts["clean"] = &clientcmdapi.Context{ - Cluster: "clean", - AuthInfo: "clean", - } - config.CurrentContext = "clean" - - clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil) - - clientConfig, err := clientBuilder.ClientConfig() - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - - // Make sure basic auth data gets into config - matchStringArg(username, clientConfig.Username, t) - matchStringArg(password, clientConfig.Password, t) -} - -func TestBasicTokenFile(t *testing.T) { - token := "exampletoken" - f, err := ioutil.TempFile("", "tokenfile") - if err != nil { - t.Errorf("Unexpected error: %v", err) - return - } - defer os.Remove(f.Name()) - if err := ioutil.WriteFile(f.Name(), []byte(token), 0644); err != nil { - t.Errorf("Unexpected error: %v", err) - return - } - - config := clientcmdapi.NewConfig() - config.Clusters["clean"] = &clientcmdapi.Cluster{ - Server: "https://localhost:8443", - } - config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ - TokenFile: f.Name(), - } - config.Contexts["clean"] = &clientcmdapi.Context{ - Cluster: "clean", - AuthInfo: "clean", - } - config.CurrentContext = "clean" - - clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil) - - clientConfig, err := clientBuilder.ClientConfig() - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - - matchStringArg(token, clientConfig.BearerToken, t) -} - -func TestPrecedenceTokenFile(t *testing.T) { - token := "exampletoken" - f, err := ioutil.TempFile("", "tokenfile") - if err != nil { - t.Errorf("Unexpected error: %v", err) - return - } - defer os.Remove(f.Name()) - if err := ioutil.WriteFile(f.Name(), []byte(token), 0644); err != nil { - t.Errorf("Unexpected error: %v", err) - return - } - - config := clientcmdapi.NewConfig() - config.Clusters["clean"] = &clientcmdapi.Cluster{ - Server: "https://localhost:8443", - } - expectedToken := "expected" - config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ - Token: expectedToken, - TokenFile: f.Name(), - } - config.Contexts["clean"] = &clientcmdapi.Context{ - Cluster: "clean", - AuthInfo: "clean", - } - config.CurrentContext = "clean" - - clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil) - - clientConfig, err := clientBuilder.ClientConfig() - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - - matchStringArg(expectedToken, clientConfig.BearerToken, t) -} - -func TestCreateClean(t *testing.T) { - config := createValidTestConfig() - clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil) - - clientConfig, err := clientBuilder.ClientConfig() - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - matchStringArg(config.Clusters["clean"].Server, clientConfig.Host, t) - matchStringArg("", clientConfig.APIPath, t) - matchBoolArg(config.Clusters["clean"].InsecureSkipTLSVerify, clientConfig.Insecure, t) - matchStringArg(config.AuthInfos["clean"].Token, clientConfig.BearerToken, t) -} - -func TestCreateCleanWithPrefix(t *testing.T) { - tt := []struct { - server string - host string - }{ - {"https://anything.com:8080/foo/bar", "https://anything.com:8080/foo/bar"}, - {"http://anything.com:8080/foo/bar", "http://anything.com:8080/foo/bar"}, - {"http://anything.com:8080/foo/bar/", "http://anything.com:8080/foo/bar/"}, - {"http://anything.com:8080/", "http://anything.com:8080/"}, - {"http://anything.com:8080//", "http://anything.com:8080//"}, - {"anything.com:8080/foo/bar", "anything.com:8080/foo/bar"}, - {"anything.com:8080", "anything.com:8080"}, - {"anything.com", "anything.com"}, - {"anything", "anything"}, - } - - tt = append(tt, struct{ server, host string }{"", "http://localhost:8080"}) - - for _, tc := range tt { - config := createValidTestConfig() - - cleanConfig := config.Clusters["clean"] - cleanConfig.Server = tc.server - config.Clusters["clean"] = cleanConfig - - clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{ - ClusterDefaults: clientcmdapi.Cluster{Server: "http://localhost:8080"}, - }, nil) - - clientConfig, err := clientBuilder.ClientConfig() - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - - matchStringArg(tc.host, clientConfig.Host, t) - } -} - -func TestCreateCleanDefault(t *testing.T) { - config := createValidTestConfig() - clientBuilder := NewDefaultClientConfig(*config, &ConfigOverrides{}) - - clientConfig, err := clientBuilder.ClientConfig() - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - - matchStringArg(config.Clusters["clean"].Server, clientConfig.Host, t) - matchBoolArg(config.Clusters["clean"].InsecureSkipTLSVerify, clientConfig.Insecure, t) - matchStringArg(config.AuthInfos["clean"].Token, clientConfig.BearerToken, t) -} - -func TestCreateCleanDefaultCluster(t *testing.T) { - config := createValidTestConfig() - clientBuilder := NewDefaultClientConfig(*config, &ConfigOverrides{ - ClusterDefaults: clientcmdapi.Cluster{Server: "http://localhost:8080"}, - }) - - clientConfig, err := clientBuilder.ClientConfig() - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - - matchStringArg(config.Clusters["clean"].Server, clientConfig.Host, t) - matchBoolArg(config.Clusters["clean"].InsecureSkipTLSVerify, clientConfig.Insecure, t) - matchStringArg(config.AuthInfos["clean"].Token, clientConfig.BearerToken, t) -} - -func TestCreateMissingContextNoDefault(t *testing.T) { - const expectedErrorContains = "Context was not found for specified context" - config := createValidTestConfig() - clientBuilder := NewNonInteractiveClientConfig(*config, "not-present", &ConfigOverrides{}, nil) - - _, err := clientBuilder.ClientConfig() - if err == nil { - t.Fatalf("Unexpected error: %v", err) - } -} - -func TestCreateMissingContext(t *testing.T) { - const expectedErrorContains = "context was not found for specified context: not-present" - config := createValidTestConfig() - clientBuilder := NewNonInteractiveClientConfig(*config, "not-present", &ConfigOverrides{ - ClusterDefaults: clientcmdapi.Cluster{Server: "http://localhost:8080"}, - }, nil) - - _, err := clientBuilder.ClientConfig() - if err == nil { - t.Fatalf("Expected error: %v", expectedErrorContains) - } - if !strings.Contains(err.Error(), expectedErrorContains) { - t.Fatalf("Expected error: %v, but got %v", expectedErrorContains, err) - } -} - -func TestInClusterClientConfigPrecedence(t *testing.T) { - tt := []struct { - overrides *ConfigOverrides - }{ - { - overrides: &ConfigOverrides{ - ClusterInfo: clientcmdapi.Cluster{ - Server: "https://host-from-overrides.com", - }, - }, - }, - { - overrides: &ConfigOverrides{ - AuthInfo: clientcmdapi.AuthInfo{ - Token: "https://host-from-overrides.com", - }, - }, - }, - { - overrides: &ConfigOverrides{ - ClusterInfo: clientcmdapi.Cluster{ - CertificateAuthority: "/path/to/ca-from-overrides.crt", - }, - }, - }, - { - overrides: &ConfigOverrides{ - ClusterInfo: clientcmdapi.Cluster{ - Server: "https://host-from-overrides.com", - }, - AuthInfo: clientcmdapi.AuthInfo{ - Token: "https://host-from-overrides.com", - }, - }, - }, - { - overrides: &ConfigOverrides{ - ClusterInfo: clientcmdapi.Cluster{ - Server: "https://host-from-overrides.com", - CertificateAuthority: "/path/to/ca-from-overrides.crt", - }, - }, - }, - { - overrides: &ConfigOverrides{ - ClusterInfo: clientcmdapi.Cluster{ - CertificateAuthority: "/path/to/ca-from-overrides.crt", - }, - AuthInfo: clientcmdapi.AuthInfo{ - Token: "https://host-from-overrides.com", - }, - }, - }, - { - overrides: &ConfigOverrides{ - ClusterInfo: clientcmdapi.Cluster{ - Server: "https://host-from-overrides.com", - CertificateAuthority: "/path/to/ca-from-overrides.crt", - }, - AuthInfo: clientcmdapi.AuthInfo{ - Token: "https://host-from-overrides.com", - }, - }, - }, - { - overrides: &ConfigOverrides{}, - }, - } - - for _, tc := range tt { - expectedServer := "https://host-from-cluster.com" - expectedToken := "token-from-cluster" - expectedCAFile := "/path/to/ca-from-cluster.crt" - - icc := &inClusterClientConfig{ - inClusterConfigProvider: func() (*restclient.Config, error) { - return &restclient.Config{ - Host: expectedServer, - BearerToken: expectedToken, - TLSClientConfig: restclient.TLSClientConfig{ - CAFile: expectedCAFile, - }, - }, nil - }, - overrides: tc.overrides, - } - - clientConfig, err := icc.ClientConfig() - if err != nil { - t.Fatalf("Unxpected error: %v", err) - } - - if overridenServer := tc.overrides.ClusterInfo.Server; len(overridenServer) > 0 { - expectedServer = overridenServer - } - if overridenToken := tc.overrides.AuthInfo.Token; len(overridenToken) > 0 { - expectedToken = overridenToken - } - if overridenCAFile := tc.overrides.ClusterInfo.CertificateAuthority; len(overridenCAFile) > 0 { - expectedCAFile = overridenCAFile - } - - if clientConfig.Host != expectedServer { - t.Errorf("Expected server %v, got %v", expectedServer, clientConfig.Host) - } - if clientConfig.BearerToken != expectedToken { - t.Errorf("Expected token %v, got %v", expectedToken, clientConfig.BearerToken) - } - if clientConfig.TLSClientConfig.CAFile != expectedCAFile { - t.Errorf("Expected Certificate Authority %v, got %v", expectedCAFile, clientConfig.TLSClientConfig.CAFile) - } - } -} - -func matchBoolArg(expected, got bool, t *testing.T) { - if expected != got { - t.Errorf("Expected %v, got %v", expected, got) - } -} - -func matchStringArg(expected, got string, t *testing.T) { - if expected != got { - t.Errorf("Expected %q, got %q", expected, got) - } -} - -func matchByteArg(expected, got []byte, t *testing.T) { - if !reflect.DeepEqual(expected, got) { - t.Errorf("Expected %v, got %v", expected, got) - } -} - -func TestNamespaceOverride(t *testing.T) { - config := &DirectClientConfig{ - overrides: &ConfigOverrides{ - Context: clientcmdapi.Context{ - Namespace: "foo", - }, - }, - } - - ns, overridden, err := config.Namespace() - - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - if !overridden { - t.Errorf("Expected overridden = true") - } - - matchStringArg("foo", ns, t) -} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/loader_test.go b/vendor/k8s.io/client-go/tools/clientcmd/loader_test.go deleted file mode 100644 index 86eccac4..00000000 --- a/vendor/k8s.io/client-go/tools/clientcmd/loader_test.go +++ /dev/null @@ -1,789 +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 clientcmd - -import ( - "fmt" - "io/ioutil" - "os" - "path" - "path/filepath" - "reflect" - "strings" - "testing" - - "github.com/ghodss/yaml" - - "k8s.io/apimachinery/pkg/runtime" - clientcmdapi "k8s.io/client-go/tools/clientcmd/api" - clientcmdlatest "k8s.io/client-go/tools/clientcmd/api/latest" -) - -var ( - testConfigAlfa = clientcmdapi.Config{ - AuthInfos: map[string]*clientcmdapi.AuthInfo{ - "red-user": {Token: "red-token"}}, - Clusters: map[string]*clientcmdapi.Cluster{ - "cow-cluster": {Server: "http://cow.org:8080"}}, - Contexts: map[string]*clientcmdapi.Context{ - "federal-context": {AuthInfo: "red-user", Cluster: "cow-cluster", Namespace: "hammer-ns"}}, - } - testConfigBravo = clientcmdapi.Config{ - AuthInfos: map[string]*clientcmdapi.AuthInfo{ - "black-user": {Token: "black-token"}}, - Clusters: map[string]*clientcmdapi.Cluster{ - "pig-cluster": {Server: "http://pig.org:8080"}}, - Contexts: map[string]*clientcmdapi.Context{ - "queen-anne-context": {AuthInfo: "black-user", Cluster: "pig-cluster", Namespace: "saw-ns"}}, - } - testConfigCharlie = clientcmdapi.Config{ - AuthInfos: map[string]*clientcmdapi.AuthInfo{ - "green-user": {Token: "green-token"}}, - Clusters: map[string]*clientcmdapi.Cluster{ - "horse-cluster": {Server: "http://horse.org:8080"}}, - Contexts: map[string]*clientcmdapi.Context{ - "shaker-context": {AuthInfo: "green-user", Cluster: "horse-cluster", Namespace: "chisel-ns"}}, - } - testConfigDelta = clientcmdapi.Config{ - AuthInfos: map[string]*clientcmdapi.AuthInfo{ - "blue-user": {Token: "blue-token"}}, - Clusters: map[string]*clientcmdapi.Cluster{ - "chicken-cluster": {Server: "http://chicken.org:8080"}}, - Contexts: map[string]*clientcmdapi.Context{ - "gothic-context": {AuthInfo: "blue-user", Cluster: "chicken-cluster", Namespace: "plane-ns"}}, - } - - testConfigConflictAlfa = clientcmdapi.Config{ - AuthInfos: map[string]*clientcmdapi.AuthInfo{ - "red-user": {Token: "a-different-red-token"}, - "yellow-user": {Token: "yellow-token"}}, - Clusters: map[string]*clientcmdapi.Cluster{ - "cow-cluster": {Server: "http://a-different-cow.org:8080", InsecureSkipTLSVerify: true}, - "donkey-cluster": {Server: "http://donkey.org:8080", InsecureSkipTLSVerify: true}}, - CurrentContext: "federal-context", - } -) - -func TestNonExistentCommandLineFile(t *testing.T) { - loadingRules := ClientConfigLoadingRules{ - ExplicitPath: "bogus_file", - } - - _, err := loadingRules.Load() - if err == nil { - t.Fatalf("Expected error for missing command-line file, got none") - } - if !strings.Contains(err.Error(), "bogus_file") { - t.Fatalf("Expected error about 'bogus_file', got %s", err.Error()) - } -} - -func TestToleratingMissingFiles(t *testing.T) { - loadingRules := ClientConfigLoadingRules{ - Precedence: []string{"bogus1", "bogus2", "bogus3"}, - } - - _, err := loadingRules.Load() - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } -} - -func TestErrorReadingFile(t *testing.T) { - commandLineFile, _ := ioutil.TempFile("", "") - defer os.Remove(commandLineFile.Name()) - - if err := ioutil.WriteFile(commandLineFile.Name(), []byte("bogus value"), 0644); err != nil { - t.Fatalf("Error creating tempfile: %v", err) - } - - loadingRules := ClientConfigLoadingRules{ - ExplicitPath: commandLineFile.Name(), - } - - _, err := loadingRules.Load() - if err == nil { - t.Fatalf("Expected error for unloadable file, got none") - } - if !strings.Contains(err.Error(), commandLineFile.Name()) { - t.Fatalf("Expected error about '%s', got %s", commandLineFile.Name(), err.Error()) - } -} - -func TestErrorReadingNonFile(t *testing.T) { - tmpdir, err := ioutil.TempDir("", "") - if err != nil { - t.Fatalf("Couldn't create tmpdir") - } - defer os.RemoveAll(tmpdir) - - loadingRules := ClientConfigLoadingRules{ - ExplicitPath: tmpdir, - } - - _, err = loadingRules.Load() - if err == nil { - t.Fatalf("Expected error for non-file, got none") - } - if !strings.Contains(err.Error(), tmpdir) { - t.Fatalf("Expected error about '%s', got %s", tmpdir, err.Error()) - } -} - -func TestConflictingCurrentContext(t *testing.T) { - commandLineFile, _ := ioutil.TempFile("", "") - defer os.Remove(commandLineFile.Name()) - envVarFile, _ := ioutil.TempFile("", "") - defer os.Remove(envVarFile.Name()) - - mockCommandLineConfig := clientcmdapi.Config{ - CurrentContext: "any-context-value", - } - mockEnvVarConfig := clientcmdapi.Config{ - CurrentContext: "a-different-context", - } - - WriteToFile(mockCommandLineConfig, commandLineFile.Name()) - WriteToFile(mockEnvVarConfig, envVarFile.Name()) - - loadingRules := ClientConfigLoadingRules{ - ExplicitPath: commandLineFile.Name(), - Precedence: []string{envVarFile.Name()}, - } - - mergedConfig, err := loadingRules.Load() - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - if mergedConfig.CurrentContext != mockCommandLineConfig.CurrentContext { - t.Errorf("expected %v, got %v", mockCommandLineConfig.CurrentContext, mergedConfig.CurrentContext) - } -} - -func TestLoadingEmptyMaps(t *testing.T) { - configFile, _ := ioutil.TempFile("", "") - defer os.Remove(configFile.Name()) - - mockConfig := clientcmdapi.Config{ - CurrentContext: "any-context-value", - } - - WriteToFile(mockConfig, configFile.Name()) - - config, err := LoadFromFile(configFile.Name()) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - if config.Clusters == nil { - t.Error("expected config.Clusters to be non-nil") - } - if config.AuthInfos == nil { - t.Error("expected config.AuthInfos to be non-nil") - } - if config.Contexts == nil { - t.Error("expected config.Contexts to be non-nil") - } -} - -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"}, - "absolute-server-1": {CertificateAuthority: "/absolute/ca"}, - }, - } - pathResolutionConfig2 := clientcmdapi.Config{ - AuthInfos: map[string]*clientcmdapi.AuthInfo{ - "relative-user-2": {ClientCertificate: "relative/client/cert2", ClientKey: "../relative/client/key2"}, - "absolute-user-2": {ClientCertificate: "/absolute/client/cert2", ClientKey: "/absolute/client/key2"}, - }, - Clusters: map[string]*clientcmdapi.Cluster{ - "relative-server-2": {CertificateAuthority: "../relative/ca2"}, - "absolute-server-2": {CertificateAuthority: "/absolute/ca2"}, - }, - } - - configDir1, _ := ioutil.TempDir("", "") - defer os.RemoveAll(configDir1) - configFile1 := path.Join(configDir1, ".kubeconfig") - configDir1, _ = filepath.Abs(configDir1) - - configDir2, _ := ioutil.TempDir("", "") - defer os.RemoveAll(configDir2) - configDir2, _ = ioutil.TempDir(configDir2, "") - configFile2 := path.Join(configDir2, ".kubeconfig") - configDir2, _ = filepath.Abs(configDir2) - - WriteToFile(pathResolutionConfig1, configFile1) - WriteToFile(pathResolutionConfig2, configFile2) - - loadingRules := ClientConfigLoadingRules{ - Precedence: []string{configFile1, configFile2}, - } - - mergedConfig, err := loadingRules.Load() - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - foundClusterCount := 0 - for key, cluster := range mergedConfig.Clusters { - if key == "relative-server-1" { - foundClusterCount++ - matchStringArg(path.Join(configDir1, pathResolutionConfig1.Clusters["relative-server-1"].CertificateAuthority), cluster.CertificateAuthority, t) - } - if key == "relative-server-2" { - foundClusterCount++ - matchStringArg(path.Join(configDir2, pathResolutionConfig2.Clusters["relative-server-2"].CertificateAuthority), cluster.CertificateAuthority, t) - } - if key == "absolute-server-1" { - foundClusterCount++ - matchStringArg(pathResolutionConfig1.Clusters["absolute-server-1"].CertificateAuthority, cluster.CertificateAuthority, t) - } - if key == "absolute-server-2" { - foundClusterCount++ - matchStringArg(pathResolutionConfig2.Clusters["absolute-server-2"].CertificateAuthority, cluster.CertificateAuthority, t) - } - } - if foundClusterCount != 4 { - t.Errorf("Expected 4 clusters, found %v: %v", foundClusterCount, mergedConfig.Clusters) - } - - foundAuthInfoCount := 0 - for key, authInfo := range mergedConfig.AuthInfos { - if key == "relative-user-1" { - foundAuthInfoCount++ - matchStringArg(path.Join(configDir1, pathResolutionConfig1.AuthInfos["relative-user-1"].ClientCertificate), authInfo.ClientCertificate, t) - matchStringArg(path.Join(configDir1, pathResolutionConfig1.AuthInfos["relative-user-1"].ClientKey), authInfo.ClientKey, t) - } - if key == "relative-user-2" { - foundAuthInfoCount++ - matchStringArg(path.Join(configDir2, pathResolutionConfig2.AuthInfos["relative-user-2"].ClientCertificate), authInfo.ClientCertificate, t) - matchStringArg(path.Join(configDir2, pathResolutionConfig2.AuthInfos["relative-user-2"].ClientKey), authInfo.ClientKey, t) - } - if key == "absolute-user-1" { - foundAuthInfoCount++ - matchStringArg(pathResolutionConfig1.AuthInfos["absolute-user-1"].ClientCertificate, authInfo.ClientCertificate, t) - matchStringArg(pathResolutionConfig1.AuthInfos["absolute-user-1"].ClientKey, authInfo.ClientKey, t) - } - if key == "absolute-user-2" { - foundAuthInfoCount++ - 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 != 7 { - t.Errorf("Expected 7 users, found %v: %v", foundAuthInfoCount, mergedConfig.AuthInfos) - } - -} - -func TestMigratingFile(t *testing.T) { - sourceFile, _ := ioutil.TempFile("", "") - defer os.Remove(sourceFile.Name()) - destinationFile, _ := ioutil.TempFile("", "") - // delete the file so that we'll write to it - os.Remove(destinationFile.Name()) - - WriteToFile(testConfigAlfa, sourceFile.Name()) - - loadingRules := ClientConfigLoadingRules{ - MigrationRules: map[string]string{destinationFile.Name(): sourceFile.Name()}, - } - - if _, err := loadingRules.Load(); err != nil { - t.Errorf("unexpected error %v", err) - } - - // the load should have recreated this file - defer os.Remove(destinationFile.Name()) - - sourceContent, err := ioutil.ReadFile(sourceFile.Name()) - if err != nil { - t.Errorf("unexpected error %v", err) - } - destinationContent, err := ioutil.ReadFile(destinationFile.Name()) - if err != nil { - t.Errorf("unexpected error %v", err) - } - - if !reflect.DeepEqual(sourceContent, destinationContent) { - t.Errorf("source and destination do not match") - } -} - -func TestMigratingFileLeaveExistingFileAlone(t *testing.T) { - sourceFile, _ := ioutil.TempFile("", "") - defer os.Remove(sourceFile.Name()) - destinationFile, _ := ioutil.TempFile("", "") - defer os.Remove(destinationFile.Name()) - - WriteToFile(testConfigAlfa, sourceFile.Name()) - - loadingRules := ClientConfigLoadingRules{ - MigrationRules: map[string]string{destinationFile.Name(): sourceFile.Name()}, - } - - if _, err := loadingRules.Load(); err != nil { - t.Errorf("unexpected error %v", err) - } - - destinationContent, err := ioutil.ReadFile(destinationFile.Name()) - if err != nil { - t.Errorf("unexpected error %v", err) - } - - if len(destinationContent) > 0 { - t.Errorf("destination should not have been touched") - } -} - -func TestMigratingFileSourceMissingSkip(t *testing.T) { - sourceFilename := "some-missing-file" - destinationFile, _ := ioutil.TempFile("", "") - // delete the file so that we'll write to it - os.Remove(destinationFile.Name()) - - loadingRules := ClientConfigLoadingRules{ - MigrationRules: map[string]string{destinationFile.Name(): sourceFilename}, - } - - if _, err := loadingRules.Load(); err != nil { - t.Errorf("unexpected error %v", err) - } - - if _, err := os.Stat(destinationFile.Name()); !os.IsNotExist(err) { - t.Errorf("destination should not exist") - } -} - -func TestFileLocking(t *testing.T) { - f, _ := ioutil.TempFile("", "") - defer os.Remove(f.Name()) - - err := lockFile(f.Name()) - if err != nil { - t.Errorf("unexpected error while locking file: %v", err) - } - defer unlockFile(f.Name()) - - err = lockFile(f.Name()) - if err == nil { - t.Error("expected error while locking file.") - } -} - -func Example_noMergingOnExplicitPaths() { - commandLineFile, _ := ioutil.TempFile("", "") - defer os.Remove(commandLineFile.Name()) - envVarFile, _ := ioutil.TempFile("", "") - defer os.Remove(envVarFile.Name()) - - WriteToFile(testConfigAlfa, commandLineFile.Name()) - WriteToFile(testConfigConflictAlfa, envVarFile.Name()) - - loadingRules := ClientConfigLoadingRules{ - ExplicitPath: commandLineFile.Name(), - Precedence: []string{envVarFile.Name()}, - } - - mergedConfig, err := loadingRules.Load() - - json, err := runtime.Encode(clientcmdlatest.Codec, mergedConfig) - if err != nil { - fmt.Printf("Unexpected error: %v", err) - } - output, err := yaml.JSONToYAML(json) - if err != nil { - fmt.Printf("Unexpected error: %v", err) - } - - fmt.Printf("%v", string(output)) - // Output: - // apiVersion: v1 - // clusters: - // - cluster: - // server: http://cow.org:8080 - // name: cow-cluster - // contexts: - // - context: - // cluster: cow-cluster - // namespace: hammer-ns - // user: red-user - // name: federal-context - // current-context: "" - // kind: Config - // preferences: {} - // users: - // - name: red-user - // user: - // token: red-token -} - -func Example_mergingSomeWithConflict() { - commandLineFile, _ := ioutil.TempFile("", "") - defer os.Remove(commandLineFile.Name()) - envVarFile, _ := ioutil.TempFile("", "") - defer os.Remove(envVarFile.Name()) - - WriteToFile(testConfigAlfa, commandLineFile.Name()) - WriteToFile(testConfigConflictAlfa, envVarFile.Name()) - - loadingRules := ClientConfigLoadingRules{ - Precedence: []string{commandLineFile.Name(), envVarFile.Name()}, - } - - mergedConfig, err := loadingRules.Load() - - json, err := runtime.Encode(clientcmdlatest.Codec, mergedConfig) - if err != nil { - fmt.Printf("Unexpected error: %v", err) - } - output, err := yaml.JSONToYAML(json) - if err != nil { - fmt.Printf("Unexpected error: %v", err) - } - - fmt.Printf("%v", string(output)) - // Output: - // apiVersion: v1 - // clusters: - // - cluster: - // server: http://cow.org:8080 - // name: cow-cluster - // - cluster: - // insecure-skip-tls-verify: true - // server: http://donkey.org:8080 - // name: donkey-cluster - // contexts: - // - context: - // cluster: cow-cluster - // namespace: hammer-ns - // user: red-user - // name: federal-context - // current-context: federal-context - // kind: Config - // preferences: {} - // users: - // - name: red-user - // user: - // token: red-token - // - name: yellow-user - // user: - // token: yellow-token -} - -func Example_mergingEverythingNoConflicts() { - commandLineFile, _ := ioutil.TempFile("", "") - defer os.Remove(commandLineFile.Name()) - envVarFile, _ := ioutil.TempFile("", "") - defer os.Remove(envVarFile.Name()) - currentDirFile, _ := ioutil.TempFile("", "") - defer os.Remove(currentDirFile.Name()) - homeDirFile, _ := ioutil.TempFile("", "") - defer os.Remove(homeDirFile.Name()) - - WriteToFile(testConfigAlfa, commandLineFile.Name()) - WriteToFile(testConfigBravo, envVarFile.Name()) - WriteToFile(testConfigCharlie, currentDirFile.Name()) - WriteToFile(testConfigDelta, homeDirFile.Name()) - - loadingRules := ClientConfigLoadingRules{ - Precedence: []string{commandLineFile.Name(), envVarFile.Name(), currentDirFile.Name(), homeDirFile.Name()}, - } - - mergedConfig, err := loadingRules.Load() - - json, err := runtime.Encode(clientcmdlatest.Codec, mergedConfig) - if err != nil { - fmt.Printf("Unexpected error: %v", err) - } - output, err := yaml.JSONToYAML(json) - if err != nil { - fmt.Printf("Unexpected error: %v", err) - } - - fmt.Printf("%v", string(output)) - // Output: - // apiVersion: v1 - // clusters: - // - cluster: - // server: http://chicken.org:8080 - // name: chicken-cluster - // - cluster: - // server: http://cow.org:8080 - // name: cow-cluster - // - cluster: - // server: http://horse.org:8080 - // name: horse-cluster - // - cluster: - // server: http://pig.org:8080 - // name: pig-cluster - // contexts: - // - context: - // cluster: cow-cluster - // namespace: hammer-ns - // user: red-user - // name: federal-context - // - context: - // cluster: chicken-cluster - // namespace: plane-ns - // user: blue-user - // name: gothic-context - // - context: - // cluster: pig-cluster - // namespace: saw-ns - // user: black-user - // name: queen-anne-context - // - context: - // cluster: horse-cluster - // namespace: chisel-ns - // user: green-user - // name: shaker-context - // current-context: "" - // kind: Config - // preferences: {} - // users: - // - name: black-user - // user: - // token: black-token - // - name: blue-user - // user: - // token: blue-token - // - name: green-user - // user: - // token: green-token - // - name: red-user - // 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/vendor/k8s.io/client-go/tools/clientcmd/merged_client_builder_test.go b/vendor/k8s.io/client-go/tools/clientcmd/merged_client_builder_test.go deleted file mode 100644 index 8b038676..00000000 --- a/vendor/k8s.io/client-go/tools/clientcmd/merged_client_builder_test.go +++ /dev/null @@ -1,328 +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 clientcmd - -import ( - "fmt" - "testing" - - restclient "k8s.io/client-go/rest" - clientcmdapi "k8s.io/client-go/tools/clientcmd/api" -) - -type testLoader struct { - ClientConfigLoader - - called bool - config *clientcmdapi.Config - err error -} - -func (l *testLoader) Load() (*clientcmdapi.Config, error) { - l.called = true - return l.config, l.err -} - -type testClientConfig struct { - config *restclient.Config - namespace string - namespaceSpecified bool - err error -} - -func (c *testClientConfig) RawConfig() (clientcmdapi.Config, error) { - return clientcmdapi.Config{}, fmt.Errorf("unexpected call") -} -func (c *testClientConfig) ClientConfig() (*restclient.Config, error) { - return c.config, c.err -} -func (c *testClientConfig) Namespace() (string, bool, error) { - return c.namespace, c.namespaceSpecified, c.err -} -func (c *testClientConfig) ConfigAccess() ConfigAccess { - return nil -} - -type testICC struct { - testClientConfig - - possible bool - called bool -} - -func (icc *testICC) Possible() bool { - icc.called = true - return icc.possible -} - -func TestInClusterConfig(t *testing.T) { - default1 := &DirectClientConfig{ - config: *createValidTestConfig(), - contextName: "clean", - overrides: &ConfigOverrides{}, - } - invalidDefaultConfig := clientcmdapi.NewConfig() - invalidDefaultConfig.Clusters["clean"] = &clientcmdapi.Cluster{ - Server: "http://localhost:8080", - } - invalidDefaultConfig.Contexts["other"] = &clientcmdapi.Context{ - Cluster: "clean", - } - invalidDefaultConfig.CurrentContext = "clean" - - defaultInvalid := &DirectClientConfig{ - config: *invalidDefaultConfig, - overrides: &ConfigOverrides{}, - } - if _, err := defaultInvalid.ClientConfig(); err == nil || !IsConfigurationInvalid(err) { - t.Fatal(err) - } - config1, err := default1.ClientConfig() - if err != nil { - t.Fatal(err) - } - config2 := &restclient.Config{Host: "config2"} - err1 := fmt.Errorf("unique error") - - testCases := map[string]struct { - clientConfig *testClientConfig - icc *testICC - defaultConfig *DirectClientConfig - - checkedICC bool - result *restclient.Config - err error - }{ - "in-cluster checked on other error": { - clientConfig: &testClientConfig{err: ErrEmptyConfig}, - icc: &testICC{}, - - checkedICC: true, - result: nil, - err: ErrEmptyConfig, - }, - - "in-cluster not checked on non-empty error": { - clientConfig: &testClientConfig{err: ErrEmptyCluster}, - icc: &testICC{}, - - checkedICC: false, - result: nil, - err: ErrEmptyCluster, - }, - - "in-cluster checked when config is default": { - defaultConfig: default1, - clientConfig: &testClientConfig{config: config1}, - icc: &testICC{}, - - checkedICC: true, - result: config1, - err: nil, - }, - - "in-cluster not checked when default config is invalid": { - defaultConfig: defaultInvalid, - clientConfig: &testClientConfig{config: config1}, - icc: &testICC{}, - - checkedICC: false, - result: config1, - err: nil, - }, - - "in-cluster not checked when config is not equal to default": { - defaultConfig: default1, - clientConfig: &testClientConfig{config: config2}, - icc: &testICC{}, - - checkedICC: false, - result: config2, - err: nil, - }, - - "in-cluster checked when config is not equal to default and error is empty": { - clientConfig: &testClientConfig{config: config2, err: ErrEmptyConfig}, - icc: &testICC{}, - - checkedICC: true, - result: config2, - err: ErrEmptyConfig, - }, - - "in-cluster error returned when config is empty": { - clientConfig: &testClientConfig{err: ErrEmptyConfig}, - icc: &testICC{ - possible: true, - testClientConfig: testClientConfig{ - err: err1, - }, - }, - - checkedICC: true, - result: nil, - err: err1, - }, - - "in-cluster config returned when config is empty": { - clientConfig: &testClientConfig{err: ErrEmptyConfig}, - icc: &testICC{ - possible: true, - testClientConfig: testClientConfig{ - config: config2, - }, - }, - - checkedICC: true, - result: config2, - err: nil, - }, - - "in-cluster not checked when standard default is invalid": { - defaultConfig: &DefaultClientConfig, - clientConfig: &testClientConfig{config: config2}, - icc: &testICC{}, - - checkedICC: false, - result: config2, - err: nil, - }, - } - - for name, test := range testCases { - c := &DeferredLoadingClientConfig{icc: test.icc} - c.loader = &ClientConfigLoadingRules{DefaultClientConfig: test.defaultConfig} - c.clientConfig = test.clientConfig - - cfg, err := c.ClientConfig() - if test.icc.called != test.checkedICC { - t.Errorf("%s: unexpected in-cluster-config call %t", name, test.icc.called) - } - if err != test.err || cfg != test.result { - t.Errorf("%s: unexpected result: %v %#v", name, err, cfg) - } - } -} - -func TestInClusterConfigNamespace(t *testing.T) { - err1 := fmt.Errorf("unique error") - - testCases := map[string]struct { - clientConfig *testClientConfig - icc *testICC - - checkedICC bool - result string - ok bool - err error - }{ - "in-cluster checked on empty error": { - clientConfig: &testClientConfig{err: ErrEmptyConfig}, - icc: &testICC{}, - - checkedICC: true, - err: ErrEmptyConfig, - }, - - "in-cluster not checked on non-empty error": { - clientConfig: &testClientConfig{err: ErrEmptyCluster}, - icc: &testICC{}, - - err: ErrEmptyCluster, - }, - - "in-cluster checked when config is default": { - clientConfig: &testClientConfig{}, - icc: &testICC{}, - - checkedICC: true, - }, - - "in-cluster not checked when config is not equal to default": { - clientConfig: &testClientConfig{namespace: "test", namespaceSpecified: true}, - icc: &testICC{}, - - result: "test", - ok: true, - }, - - "in-cluster checked when namespace is not specified, but is defaulted": { - clientConfig: &testClientConfig{namespace: "test", namespaceSpecified: false}, - icc: &testICC{}, - - checkedICC: true, - result: "test", - ok: false, - }, - - "in-cluster error returned when config is empty": { - clientConfig: &testClientConfig{err: ErrEmptyConfig}, - icc: &testICC{ - possible: true, - testClientConfig: testClientConfig{ - err: err1, - }, - }, - - checkedICC: true, - err: err1, - }, - - "in-cluster config returned when config is empty": { - clientConfig: &testClientConfig{err: ErrEmptyConfig}, - icc: &testICC{ - possible: true, - testClientConfig: testClientConfig{ - namespace: "test", - namespaceSpecified: true, - }, - }, - - checkedICC: true, - result: "test", - ok: true, - }, - - "in-cluster config returned when config is empty and namespace is defaulted but not explicitly set": { - clientConfig: &testClientConfig{err: ErrEmptyConfig}, - icc: &testICC{ - possible: true, - testClientConfig: testClientConfig{ - namespace: "test", - namespaceSpecified: false, - }, - }, - - checkedICC: true, - result: "test", - ok: false, - }, - } - - for name, test := range testCases { - c := &DeferredLoadingClientConfig{icc: test.icc} - c.clientConfig = test.clientConfig - - ns, ok, err := c.Namespace() - if test.icc.called != test.checkedICC { - t.Errorf("%s: unexpected in-cluster-config call %t", name, test.icc.called) - } - if err != test.err || ns != test.result || ok != test.ok { - t.Errorf("%s: unexpected result: %v %s %t", name, err, ns, ok) - } - } -} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/overrides_test.go b/vendor/k8s.io/client-go/tools/clientcmd/overrides_test.go deleted file mode 100644 index 13a995cf..00000000 --- a/vendor/k8s.io/client-go/tools/clientcmd/overrides_test.go +++ /dev/null @@ -1,50 +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 clientcmd - -import ( - "testing" - - "github.com/spf13/pflag" -) - -func TestNamespacePrefixStrip(t *testing.T) { - testData := map[string]string{ - "namespaces/foo": "foo", - "NAMESPACES/foo": "foo", - "NameSpaces/foo": "foo", - "namespace/foo": "foo", - "NAMESPACE/foo": "foo", - "nameSpace/foo": "foo", - "ns/foo": "foo", - "NS/foo": "foo", - "namespaces/": "namespaces/", - "namespace/": "namespace/", - "ns/": "ns/", - } - - for before, after := range testData { - overrides := &ConfigOverrides{} - fs := &pflag.FlagSet{} - BindOverrideFlags(overrides, fs, RecommendedConfigOverrideFlags("")) - fs.Parse([]string{"--namespace", before}) - - if overrides.Context.Namespace != after { - t.Fatalf("Expected %s, got %s", after, overrides.Context.Namespace) - } - } -} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/validation_test.go b/vendor/k8s.io/client-go/tools/clientcmd/validation_test.go deleted file mode 100644 index 4742b1a1..00000000 --- a/vendor/k8s.io/client-go/tools/clientcmd/validation_test.go +++ /dev/null @@ -1,574 +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 clientcmd - -import ( - "io/ioutil" - "os" - "strings" - "testing" - - utilerrors "k8s.io/apimachinery/pkg/util/errors" - clientcmdapi "k8s.io/client-go/tools/clientcmd/api" -) - -func TestConfirmUsableBadInfoButOkConfig(t *testing.T) { - config := clientcmdapi.NewConfig() - config.Clusters["missing ca"] = &clientcmdapi.Cluster{ - Server: "anything", - CertificateAuthority: "missing", - } - config.AuthInfos["error"] = &clientcmdapi.AuthInfo{ - Username: "anything", - Token: "here", - } - config.Contexts["dirty"] = &clientcmdapi.Context{ - Cluster: "missing ca", - AuthInfo: "error", - } - config.Clusters["clean"] = &clientcmdapi.Cluster{ - Server: "anything", - } - config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ - Token: "here", - } - config.Contexts["clean"] = &clientcmdapi.Context{ - Cluster: "clean", - AuthInfo: "clean", - } - - badValidation := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"unable to read certificate-authority"}, - } - okTest := configValidationTest{ - config: config, - } - - okTest.testConfirmUsable("clean", t) - badValidation.testConfig(t) -} - -func TestConfirmUsableBadInfoConfig(t *testing.T) { - config := clientcmdapi.NewConfig() - config.Clusters["missing ca"] = &clientcmdapi.Cluster{ - Server: "anything", - CertificateAuthority: "missing", - } - config.AuthInfos["error"] = &clientcmdapi.AuthInfo{ - Username: "anything", - Token: "here", - } - config.Contexts["first"] = &clientcmdapi.Context{ - Cluster: "missing ca", - AuthInfo: "error", - } - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"unable to read certificate-authority"}, - } - - test.testConfirmUsable("first", t) -} - -func TestConfirmUsableEmptyConfig(t *testing.T) { - config := clientcmdapi.NewConfig() - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"invalid configuration: no configuration has been provided"}, - } - - test.testConfirmUsable("", t) -} - -func TestConfirmUsableMissingConfig(t *testing.T) { - config := clientcmdapi.NewConfig() - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"invalid configuration: no configuration has been provided"}, - } - - test.testConfirmUsable("not-here", t) -} - -func TestValidateEmptyConfig(t *testing.T) { - config := clientcmdapi.NewConfig() - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"invalid configuration: no configuration has been provided"}, - } - - test.testConfig(t) -} - -func TestValidateMissingCurrentContextConfig(t *testing.T) { - config := clientcmdapi.NewConfig() - config.CurrentContext = "anything" - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"context was not found for specified "}, - } - - test.testConfig(t) -} - -func TestIsContextNotFound(t *testing.T) { - config := clientcmdapi.NewConfig() - config.CurrentContext = "anything" - - err := Validate(*config) - if !IsContextNotFound(err) { - t.Errorf("Expected context not found, but got %v", err) - } - if !IsConfigurationInvalid(err) { - t.Errorf("Expected configuration invalid, but got %v", err) - } -} - -func TestIsEmptyConfig(t *testing.T) { - config := clientcmdapi.NewConfig() - - err := Validate(*config) - if !IsEmptyConfig(err) { - t.Errorf("Expected context not found, but got %v", err) - } - if !IsConfigurationInvalid(err) { - t.Errorf("Expected configuration invalid, but got %v", err) - } -} - -func TestIsConfigurationInvalid(t *testing.T) { - if newErrConfigurationInvalid([]error{}) != nil { - t.Errorf("unexpected error") - } - if newErrConfigurationInvalid([]error{ErrNoContext}) == ErrNoContext { - t.Errorf("unexpected error") - } - if newErrConfigurationInvalid([]error{ErrNoContext, ErrNoContext}) == nil { - t.Errorf("unexpected error") - } - if !IsConfigurationInvalid(newErrConfigurationInvalid([]error{ErrNoContext, ErrNoContext})) { - t.Errorf("unexpected error") - } -} - -func TestValidateMissingReferencesConfig(t *testing.T) { - config := clientcmdapi.NewConfig() - config.CurrentContext = "anything" - config.Contexts["anything"] = &clientcmdapi.Context{Cluster: "missing", AuthInfo: "missing"} - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"user \"missing\" was not found for context \"anything\"", "cluster \"missing\" was not found for context \"anything\""}, - } - - test.testContext("anything", t) - test.testConfig(t) -} - -func TestValidateEmptyContext(t *testing.T) { - config := clientcmdapi.NewConfig() - config.CurrentContext = "anything" - config.Contexts["anything"] = &clientcmdapi.Context{} - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"user was not specified for context \"anything\"", "cluster was not specified for context \"anything\""}, - } - - test.testContext("anything", t) - test.testConfig(t) -} - -func TestValidateEmptyContextName(t *testing.T) { - config := clientcmdapi.NewConfig() - config.CurrentContext = "anything" - config.Contexts[""] = &clientcmdapi.Context{Cluster: "missing", AuthInfo: "missing"} - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"empty context name", "is not allowed"}, - } - - test.testContext("", t) - test.testConfig(t) -} - -func TestValidateEmptyClusterInfo(t *testing.T) { - config := clientcmdapi.NewConfig() - config.Clusters["empty"] = clientcmdapi.NewCluster() - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"cluster has no server defined"}, - } - - test.testCluster("empty", t) - test.testConfig(t) -} - -func TestValidateClusterInfoErrEmptyCluster(t *testing.T) { - cluster := clientcmdapi.NewCluster() - errs := validateClusterInfo("", *cluster) - - if len(errs) != 1 { - t.Fatalf("unexpected errors: %v", errs) - } - if errs[0] != ErrEmptyCluster { - t.Errorf("unexpected error: %v", errs[0]) - } -} - -func TestValidateMissingCAFileClusterInfo(t *testing.T) { - config := clientcmdapi.NewConfig() - config.Clusters["missing ca"] = &clientcmdapi.Cluster{ - Server: "anything", - CertificateAuthority: "missing", - } - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"unable to read certificate-authority"}, - } - - test.testCluster("missing ca", t) - test.testConfig(t) -} - -func TestValidateCleanClusterInfo(t *testing.T) { - config := clientcmdapi.NewConfig() - config.Clusters["clean"] = &clientcmdapi.Cluster{ - Server: "anything", - } - test := configValidationTest{ - config: config, - } - - test.testCluster("clean", t) - test.testConfig(t) -} - -func TestValidateCleanWithCAClusterInfo(t *testing.T) { - tempFile, _ := ioutil.TempFile("", "") - defer os.Remove(tempFile.Name()) - - config := clientcmdapi.NewConfig() - config.Clusters["clean"] = &clientcmdapi.Cluster{ - Server: "anything", - CertificateAuthority: tempFile.Name(), - } - test := configValidationTest{ - config: config, - } - - test.testCluster("clean", t) - test.testConfig(t) -} - -func TestValidateEmptyAuthInfo(t *testing.T) { - config := clientcmdapi.NewConfig() - config.AuthInfos["error"] = &clientcmdapi.AuthInfo{} - test := configValidationTest{ - config: config, - } - - test.testAuthInfo("error", t) - test.testConfig(t) -} - -func TestValidateCertFilesNotFoundAuthInfo(t *testing.T) { - config := clientcmdapi.NewConfig() - config.AuthInfos["error"] = &clientcmdapi.AuthInfo{ - ClientCertificate: "missing", - ClientKey: "missing", - } - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"unable to read client-cert", "unable to read client-key"}, - } - - test.testAuthInfo("error", t) - test.testConfig(t) -} - -func TestValidateCertDataOverridesFiles(t *testing.T) { - tempFile, _ := ioutil.TempFile("", "") - defer os.Remove(tempFile.Name()) - - config := clientcmdapi.NewConfig() - config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ - ClientCertificate: tempFile.Name(), - ClientCertificateData: []byte("certdata"), - ClientKey: tempFile.Name(), - ClientKeyData: []byte("keydata"), - } - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"client-cert-data and client-cert are both specified", "client-key-data and client-key are both specified"}, - } - - test.testAuthInfo("clean", t) - test.testConfig(t) -} - -func TestValidateCleanCertFilesAuthInfo(t *testing.T) { - tempFile, _ := ioutil.TempFile("", "") - defer os.Remove(tempFile.Name()) - - config := clientcmdapi.NewConfig() - config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ - ClientCertificate: tempFile.Name(), - ClientKey: tempFile.Name(), - } - test := configValidationTest{ - config: config, - } - - test.testAuthInfo("clean", t) - test.testConfig(t) -} - -func TestValidateCleanTokenAuthInfo(t *testing.T) { - config := clientcmdapi.NewConfig() - config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ - Token: "any-value", - } - test := configValidationTest{ - config: config, - } - - test.testAuthInfo("clean", t) - test.testConfig(t) -} - -func TestValidateMultipleMethodsAuthInfo(t *testing.T) { - config := clientcmdapi.NewConfig() - config.AuthInfos["error"] = &clientcmdapi.AuthInfo{ - Token: "token", - Username: "username", - } - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"more than one authentication method", "token", "basicAuth"}, - } - - test.testAuthInfo("error", 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 -} - -func (c configValidationTest) testContext(contextName string, t *testing.T) { - errs := validateContext(contextName, *c.config.Contexts[contextName], *c.config) - - if len(c.expectedErrorSubstring) != 0 { - if len(errs) == 0 { - t.Errorf("Expected error containing: %v", c.expectedErrorSubstring) - } - for _, curr := range c.expectedErrorSubstring { - if len(errs) != 0 && !strings.Contains(utilerrors.NewAggregate(errs).Error(), curr) { - t.Errorf("Expected error containing: %v, but got %v", c.expectedErrorSubstring, utilerrors.NewAggregate(errs)) - } - } - - } else { - if len(errs) != 0 { - t.Errorf("Unexpected error: %v", utilerrors.NewAggregate(errs)) - } - } -} - -func (c configValidationTest) testConfirmUsable(contextName string, t *testing.T) { - err := ConfirmUsable(*c.config, contextName) - - if len(c.expectedErrorSubstring) != 0 { - if err == nil { - t.Errorf("Expected error containing: %v", c.expectedErrorSubstring) - } else { - for _, curr := range c.expectedErrorSubstring { - if err != nil && !strings.Contains(err.Error(), curr) { - t.Errorf("Expected error containing: %v, but got %v", c.expectedErrorSubstring, err) - } - } - } - } else { - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - } -} - -func (c configValidationTest) testConfig(t *testing.T) { - err := Validate(*c.config) - - if len(c.expectedErrorSubstring) != 0 { - if err == nil { - t.Errorf("Expected error containing: %v", c.expectedErrorSubstring) - } else { - for _, curr := range c.expectedErrorSubstring { - if err != nil && !strings.Contains(err.Error(), curr) { - t.Errorf("Expected error containing: %v, but got %v", c.expectedErrorSubstring, err) - } - } - if !IsConfigurationInvalid(err) { - t.Errorf("all errors should be configuration invalid: %v", err) - } - } - } else { - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - } -} - -func (c configValidationTest) testCluster(clusterName string, t *testing.T) { - errs := validateClusterInfo(clusterName, *c.config.Clusters[clusterName]) - - if len(c.expectedErrorSubstring) != 0 { - if len(errs) == 0 { - t.Errorf("Expected error containing: %v", c.expectedErrorSubstring) - } - for _, curr := range c.expectedErrorSubstring { - if len(errs) != 0 && !strings.Contains(utilerrors.NewAggregate(errs).Error(), curr) { - t.Errorf("Expected error containing: %v, but got %v", c.expectedErrorSubstring, utilerrors.NewAggregate(errs)) - } - } - - } else { - if len(errs) != 0 { - t.Errorf("Unexpected error: %v", utilerrors.NewAggregate(errs)) - } - } -} - -func (c configValidationTest) testAuthInfo(authInfoName string, t *testing.T) { - errs := validateAuthInfo(authInfoName, *c.config.AuthInfos[authInfoName]) - - if len(c.expectedErrorSubstring) != 0 { - if len(errs) == 0 { - t.Errorf("Expected error containing: %v", c.expectedErrorSubstring) - } - for _, curr := range c.expectedErrorSubstring { - if len(errs) != 0 && !strings.Contains(utilerrors.NewAggregate(errs).Error(), curr) { - t.Errorf("Expected error containing: %v, but got %v", c.expectedErrorSubstring, utilerrors.NewAggregate(errs)) - } - } - - } else { - if len(errs) != 0 { - t.Errorf("Unexpected error: %v", utilerrors.NewAggregate(errs)) - } - } -} diff --git a/vendor/k8s.io/client-go/tools/metrics/OWNERS b/vendor/k8s.io/client-go/tools/metrics/OWNERS deleted file mode 100755 index ff517980..00000000 --- a/vendor/k8s.io/client-go/tools/metrics/OWNERS +++ /dev/null @@ -1,7 +0,0 @@ -reviewers: -- wojtek-t -- eparis -- krousey -- jayunit100 -- fgrzadkowski -- tmrts diff --git a/vendor/k8s.io/client-go/tools/pager/pager_test.go b/vendor/k8s.io/client-go/tools/pager/pager_test.go deleted file mode 100644 index ae517cab..00000000 --- a/vendor/k8s.io/client-go/tools/pager/pager_test.go +++ /dev/null @@ -1,206 +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 pager - -import ( - "context" - "fmt" - "reflect" - "testing" - - "k8s.io/apimachinery/pkg/api/errors" - metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - metav1beta1 "k8s.io/apimachinery/pkg/apis/meta/v1beta1" - "k8s.io/apimachinery/pkg/runtime" -) - -func list(count int, rv string) *metainternalversion.List { - var list metainternalversion.List - for i := 0; i < count; i++ { - list.Items = append(list.Items, &metav1beta1.PartialObjectMetadata{ - ObjectMeta: metav1.ObjectMeta{ - Name: fmt.Sprintf("%d", i), - }, - }) - } - list.ResourceVersion = rv - return &list -} - -type testPager struct { - t *testing.T - rv string - index int - remaining int - last int - continuing bool - done bool - expectPage int64 -} - -func (p *testPager) reset() { - p.continuing = false - p.remaining += p.index - p.index = 0 - p.last = 0 - p.done = false -} - -func (p *testPager) PagedList(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) { - if p.done { - p.t.Errorf("did not expect additional call to paged list") - return nil, fmt.Errorf("unexpected list call") - } - expectedContinue := fmt.Sprintf("%s:%d", p.rv, p.last) - if options.Limit != p.expectPage || (p.continuing && options.Continue != expectedContinue) { - p.t.Errorf("invariant violated, expected limit %d and continue %s, got %#v", p.expectPage, expectedContinue, options) - return nil, fmt.Errorf("invariant violated") - } - var list metainternalversion.List - total := options.Limit - if total == 0 { - total = int64(p.remaining) - } - for i := int64(0); i < total; i++ { - if p.remaining <= 0 { - break - } - list.Items = append(list.Items, &metav1beta1.PartialObjectMetadata{ - ObjectMeta: metav1.ObjectMeta{ - Name: fmt.Sprintf("%d", p.index), - }, - }) - p.remaining-- - p.index++ - } - p.last = p.index - if p.remaining > 0 { - list.Continue = fmt.Sprintf("%s:%d", p.rv, p.last) - p.continuing = true - } else { - p.done = true - } - list.ResourceVersion = p.rv - return &list, nil -} - -func (p *testPager) ExpiresOnSecondPage(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) { - if p.continuing { - p.done = true - return nil, errors.NewResourceExpired("this list has expired") - } - return p.PagedList(ctx, options) -} - -func (p *testPager) ExpiresOnSecondPageThenFullList(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) { - if p.continuing { - p.reset() - p.expectPage = 0 - return nil, errors.NewResourceExpired("this list has expired") - } - return p.PagedList(ctx, options) -} - -func TestListPager_List(t *testing.T) { - type fields struct { - PageSize int64 - PageFn ListPageFunc - FullListIfExpired bool - } - type args struct { - ctx context.Context - options metav1.ListOptions - } - tests := []struct { - name string - fields fields - args args - want runtime.Object - wantErr bool - isExpired bool - }{ - { - name: "empty page", - fields: fields{PageSize: 10, PageFn: (&testPager{t: t, expectPage: 10, remaining: 0, rv: "rv:20"}).PagedList}, - args: args{}, - want: list(0, "rv:20"), - }, - { - name: "one page", - fields: fields{PageSize: 10, PageFn: (&testPager{t: t, expectPage: 10, remaining: 9, rv: "rv:20"}).PagedList}, - args: args{}, - want: list(9, "rv:20"), - }, - { - name: "one full page", - fields: fields{PageSize: 10, PageFn: (&testPager{t: t, expectPage: 10, remaining: 10, rv: "rv:20"}).PagedList}, - args: args{}, - want: list(10, "rv:20"), - }, - { - name: "two pages", - fields: fields{PageSize: 10, PageFn: (&testPager{t: t, expectPage: 10, remaining: 11, rv: "rv:20"}).PagedList}, - args: args{}, - want: list(11, "rv:20"), - }, - { - name: "three pages", - fields: fields{PageSize: 10, PageFn: (&testPager{t: t, expectPage: 10, remaining: 21, rv: "rv:20"}).PagedList}, - args: args{}, - want: list(21, "rv:20"), - }, - { - name: "expires on second page", - fields: fields{PageSize: 10, PageFn: (&testPager{t: t, expectPage: 10, remaining: 21, rv: "rv:20"}).ExpiresOnSecondPage}, - args: args{}, - wantErr: true, - isExpired: true, - }, - { - name: "expires on second page and then lists", - fields: fields{ - FullListIfExpired: true, - PageSize: 10, - PageFn: (&testPager{t: t, expectPage: 10, remaining: 21, rv: "rv:20"}).ExpiresOnSecondPageThenFullList, - }, - args: args{}, - want: list(21, "rv:20"), - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - p := &ListPager{ - PageSize: tt.fields.PageSize, - PageFn: tt.fields.PageFn, - FullListIfExpired: tt.fields.FullListIfExpired, - } - got, err := p.List(tt.args.ctx, tt.args.options) - if (err != nil) != tt.wantErr { - t.Errorf("ListPager.List() error = %v, wantErr %v", err, tt.wantErr) - return - } - if tt.isExpired != errors.IsResourceExpired(err) { - t.Errorf("ListPager.List() error = %v, isExpired %v", err, tt.isExpired) - return - } - if !reflect.DeepEqual(got, tt.want) { - t.Errorf("ListPager.List() = %v, want %v", got, tt.want) - } - }) - } -} diff --git a/vendor/k8s.io/client-go/tools/reference/ref_test.go b/vendor/k8s.io/client-go/tools/reference/ref_test.go deleted file mode 100644 index b0cf06a9..00000000 --- a/vendor/k8s.io/client-go/tools/reference/ref_test.go +++ /dev/null @@ -1,72 +0,0 @@ -/* -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/vendor/k8s.io/client-go/transport/OWNERS b/vendor/k8s.io/client-go/transport/OWNERS deleted file mode 100755 index bf0ba5b9..00000000 --- a/vendor/k8s.io/client-go/transport/OWNERS +++ /dev/null @@ -1,7 +0,0 @@ -reviewers: -- smarterclayton -- wojtek-t -- deads2k -- liggitt -- krousey -- caesarxuchao diff --git a/vendor/k8s.io/client-go/transport/cache_test.go b/vendor/k8s.io/client-go/transport/cache_test.go deleted file mode 100644 index 9b740cde..00000000 --- a/vendor/k8s.io/client-go/transport/cache_test.go +++ /dev/null @@ -1,157 +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 transport - -import ( - "context" - "crypto/tls" - "net" - "net/http" - "testing" -) - -func TestTLSConfigKey(t *testing.T) { - // Make sure config fields that don't affect the tls config don't affect the cache key - identicalConfigurations := map[string]*Config{ - "empty": {}, - "basic": {Username: "bob", Password: "password"}, - "bearer": {BearerToken: "token"}, - "user agent": {UserAgent: "useragent"}, - "transport": {Transport: http.DefaultTransport}, - "wrap transport": {WrapTransport: func(http.RoundTripper) http.RoundTripper { return nil }}, - } - for nameA, valueA := range identicalConfigurations { - for nameB, valueB := range identicalConfigurations { - keyA, err := tlsConfigKey(valueA) - if err != nil { - t.Errorf("Unexpected error for %q: %v", nameA, err) - continue - } - keyB, err := tlsConfigKey(valueB) - if err != nil { - t.Errorf("Unexpected error for %q: %v", nameB, err) - continue - } - 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 - } - } - } - - // 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}}}, - "cert 1, key 1": { - TLS: TLSConfig{ - CertData: []byte{1}, - KeyData: []byte{1}, - }, - }, - "cert 1, key 1, servername 1": { - TLS: TLSConfig{ - CertData: []byte{1}, - KeyData: []byte{1}, - ServerName: "1", - }, - }, - "cert 1, key 1, servername 2": { - TLS: TLSConfig{ - CertData: []byte{1}, - KeyData: []byte{1}, - ServerName: "2", - }, - }, - "cert 1, key 2": { - TLS: TLSConfig{ - CertData: []byte{1}, - KeyData: []byte{2}, - }, - }, - "cert 2, key 1": { - TLS: TLSConfig{ - CertData: []byte{2}, - KeyData: []byte{1}, - }, - }, - "cert 2, key 2": { - TLS: TLSConfig{ - CertData: []byte{2}, - KeyData: []byte{2}, - }, - }, - "cadata 1, cert 1, key 1": { - TLS: TLSConfig{ - CAData: []byte{1}, - CertData: []byte{1}, - 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 { - keyA, err := tlsConfigKey(valueA) - if err != nil { - t.Errorf("Unexpected error for %q: %v", nameA, err) - continue - } - keyB, err := tlsConfigKey(valueB) - if err != nil { - 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/vendor/k8s.io/client-go/transport/round_trippers_test.go b/vendor/k8s.io/client-go/transport/round_trippers_test.go deleted file mode 100644 index d5ffc6bd..00000000 --- a/vendor/k8s.io/client-go/transport/round_trippers_test.go +++ /dev/null @@ -1,218 +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 transport - -import ( - "net/http" - "reflect" - "strings" - "testing" -) - -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 TestBearerAuthRoundTripper(t *testing.T) { - rt := &testRoundTripper{} - req := &http.Request{} - NewBearerAuthRoundTripper("test", rt).RoundTrip(req) - if rt.Request == nil { - t.Fatalf("unexpected nil request: %v", rt) - } - if rt.Request == req { - t.Fatalf("round tripper should have copied request object: %#v", rt.Request) - } - if rt.Request.Header.Get("Authorization") != "Bearer test" { - t.Errorf("unexpected authorization header: %#v", rt.Request) - } -} - -func TestBasicAuthRoundTripper(t *testing.T) { - for n, tc := range map[string]struct { - user string - pass string - }{ - "basic": {user: "user", pass: "pass"}, - "no pass": {user: "user"}, - } { - rt := &testRoundTripper{} - req := &http.Request{} - NewBasicAuthRoundTripper(tc.user, tc.pass, rt).RoundTrip(req) - if rt.Request == nil { - t.Fatalf("%s: unexpected nil request: %v", n, rt) - } - if rt.Request == req { - t.Fatalf("%s: round tripper should have copied request object: %#v", n, rt.Request) - } - if user, pass, found := rt.Request.BasicAuth(); !found || user != tc.user || pass != tc.pass { - t.Errorf("%s: unexpected authorization header: %#v", n, rt.Request) - } - } -} - -func TestUserAgentRoundTripper(t *testing.T) { - rt := &testRoundTripper{} - req := &http.Request{ - Header: make(http.Header), - } - req.Header.Set("User-Agent", "other") - NewUserAgentRoundTripper("test", rt).RoundTrip(req) - if rt.Request == nil { - t.Fatalf("unexpected nil request: %v", rt) - } - if rt.Request != req { - t.Fatalf("round tripper should not have copied request object: %#v", rt.Request) - } - if rt.Request.Header.Get("User-Agent") != "other" { - t.Errorf("unexpected user agent header: %#v", rt.Request) - } - - req = &http.Request{} - NewUserAgentRoundTripper("test", rt).RoundTrip(req) - if rt.Request == nil { - t.Fatalf("unexpected nil request: %v", rt) - } - if rt.Request == req { - t.Fatalf("round tripper should have copied request object: %#v", rt.Request) - } - if rt.Request.Header.Get("User-Agent") != "test" { - t.Errorf("unexpected user agent header: %#v", rt.Request) - } -} - -func TestImpersonationRoundTripper(t *testing.T) { - tcs := []struct { - name string - impersonationConfig ImpersonationConfig - expected map[string][]string - }{ - { - name: "all", - impersonationConfig: ImpersonationConfig{ - UserName: "user", - Groups: []string{"one", "two"}, - Extra: map[string][]string{ - "first": {"A", "a"}, - "second": {"B", "b"}, - }, - }, - expected: map[string][]string{ - ImpersonateUserHeader: {"user"}, - ImpersonateGroupHeader: {"one", "two"}, - ImpersonateUserExtraHeaderPrefix + "First": {"A", "a"}, - ImpersonateUserExtraHeaderPrefix + "Second": {"B", "b"}, - }, - }, - } - - for _, tc := range tcs { - rt := &testRoundTripper{} - req := &http.Request{ - Header: make(http.Header), - } - NewImpersonatingRoundTripper(tc.impersonationConfig, rt).RoundTrip(req) - - for k, v := range rt.Request.Header { - expected, ok := tc.expected[k] - if !ok { - t.Errorf("%v missing %v=%v", tc.name, k, v) - continue - } - if !reflect.DeepEqual(expected, v) { - t.Errorf("%v expected %v: %v, got %v", tc.name, k, expected, v) - } - } - for k, v := range tc.expected { - expected, ok := rt.Request.Header[k] - if !ok { - t.Errorf("%v missing %v=%v", tc.name, k, v) - continue - } - if !reflect.DeepEqual(expected, v) { - t.Errorf("%v expected %v: %v, got %v", tc.name, k, expected, v) - } - } - } -} - -func TestAuthProxyRoundTripper(t *testing.T) { - for n, tc := range map[string]struct { - username string - groups []string - extra map[string][]string - }{ - "allfields": { - username: "user", - groups: []string{"groupA", "groupB"}, - extra: map[string][]string{ - "one": {"alpha", "bravo"}, - "two": {"charlie", "delta"}, - }, - }, - } { - rt := &testRoundTripper{} - req := &http.Request{} - NewAuthProxyRoundTripper(tc.username, tc.groups, tc.extra, rt).RoundTrip(req) - if rt.Request == nil { - t.Errorf("%s: unexpected nil request: %v", n, rt) - continue - } - if rt.Request == req { - t.Errorf("%s: round tripper should have copied request object: %#v", n, rt.Request) - continue - } - - actualUsernames, ok := rt.Request.Header["X-Remote-User"] - if !ok { - t.Errorf("%s missing value", n) - continue - } - if e, a := []string{tc.username}, actualUsernames; !reflect.DeepEqual(e, a) { - t.Errorf("%s expected %v, got %v", n, e, a) - continue - } - actualGroups, ok := rt.Request.Header["X-Remote-Group"] - if !ok { - t.Errorf("%s missing value", n) - continue - } - if e, a := tc.groups, actualGroups; !reflect.DeepEqual(e, a) { - t.Errorf("%s expected %v, got %v", n, e, a) - continue - } - - actualExtra := map[string][]string{} - for key, values := range rt.Request.Header { - if strings.HasPrefix(strings.ToLower(key), strings.ToLower("X-Remote-Extra-")) { - extraKey := strings.ToLower(key[len("X-Remote-Extra-"):]) - actualExtra[extraKey] = append(actualExtra[key], values...) - } - } - if e, a := tc.extra, actualExtra; !reflect.DeepEqual(e, a) { - t.Errorf("%s expected %v, got %v", n, e, a) - continue - } - } -} diff --git a/vendor/k8s.io/client-go/transport/transport_test.go b/vendor/k8s.io/client-go/transport/transport_test.go deleted file mode 100644 index 2e9896a0..00000000 --- a/vendor/k8s.io/client-go/transport/transport_test.go +++ /dev/null @@ -1,288 +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 transport - -import ( - "crypto/tls" - "errors" - "net/http" - "testing" -) - -const ( - rootCACert = `-----BEGIN CERTIFICATE----- -MIIC4DCCAcqgAwIBAgIBATALBgkqhkiG9w0BAQswIzEhMB8GA1UEAwwYMTAuMTMu -MTI5LjEwNkAxNDIxMzU5MDU4MB4XDTE1MDExNTIxNTczN1oXDTE2MDExNTIxNTcz -OFowIzEhMB8GA1UEAwwYMTAuMTMuMTI5LjEwNkAxNDIxMzU5MDU4MIIBIjANBgkq -hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAunDRXGwsiYWGFDlWH6kjGun+PshDGeZX -xtx9lUnL8pIRWH3wX6f13PO9sktaOWW0T0mlo6k2bMlSLlSZgG9H6og0W6gLS3vq -s4VavZ6DbXIwemZG2vbRwsvR+t4G6Nbwelm6F8RFnA1Fwt428pavmNQ/wgYzo+T1 -1eS+HiN4ACnSoDSx3QRWcgBkB1g6VReofVjx63i0J+w8Q/41L9GUuLqquFxu6ZnH -60vTB55lHgFiDLjA1FkEz2dGvGh/wtnFlRvjaPC54JH2K1mPYAUXTreoeJtLJKX0 -ycoiyB24+zGCniUmgIsmQWRPaOPircexCp1BOeze82BT1LCZNTVaxQIDAQABoyMw -ITAOBgNVHQ8BAf8EBAMCAKQwDwYDVR0TAQH/BAUwAwEB/zALBgkqhkiG9w0BAQsD -ggEBADMxsUuAFlsYDpF4fRCzXXwrhbtj4oQwcHpbu+rnOPHCZupiafzZpDu+rw4x -YGPnCb594bRTQn4pAu3Ac18NbLD5pV3uioAkv8oPkgr8aUhXqiv7KdDiaWm6sbAL -EHiXVBBAFvQws10HMqMoKtO8f1XDNAUkWduakR/U6yMgvOPwS7xl0eUTqyRB6zGb -K55q2dejiFWaFqB/y78txzvz6UlOZKE44g2JAVoJVM6kGaxh33q8/FmrL4kuN3ut -W+MmJCVDvd4eEqPwbp7146ZWTqpIJ8lvA6wuChtqV8lhAPka2hD/LMqY8iXNmfXD -uml0obOEy+ON91k+SWTJ3ggmF/U= ------END CERTIFICATE-----` - - certData = `-----BEGIN CERTIFICATE----- -MIIC6jCCAdSgAwIBAgIBCzALBgkqhkiG9w0BAQswIzEhMB8GA1UEAwwYMTAuMTMu -MTI5LjEwNkAxNDIxMzU5MDU4MB4XDTE1MDExNTIyMDEzMVoXDTE2MDExNTIyMDEz -MlowGzEZMBcGA1UEAxMQb3BlbnNoaWZ0LWNsaWVudDCCASIwDQYJKoZIhvcNAQEB -BQADggEPADCCAQoCggEBAKtdhz0+uCLXw5cSYns9rU/XifFSpb/x24WDdrm72S/v -b9BPYsAStiP148buylr1SOuNi8sTAZmlVDDIpIVwMLff+o2rKYDicn9fjbrTxTOj -lI4pHJBH+JU3AJ0tbajupioh70jwFS0oYpwtneg2zcnE2Z4l6mhrj2okrc5Q1/X2 -I2HChtIU4JYTisObtin10QKJX01CLfYXJLa8upWzKZ4/GOcHG+eAV3jXWoXidtjb -1Usw70amoTZ6mIVCkiu1QwCoa8+ycojGfZhvqMsAp1536ZcCul+Na+AbCv4zKS7F -kQQaImVrXdUiFansIoofGlw/JNuoKK6ssVpS5Ic3pgcCAwEAAaM1MDMwDgYDVR0P -AQH/BAQDAgCgMBMGA1UdJQQMMAoGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwCwYJ -KoZIhvcNAQELA4IBAQCKLREH7bXtXtZ+8vI6cjD7W3QikiArGqbl36bAhhWsJLp/ -p/ndKz39iFNaiZ3GlwIURWOOKx3y3GA0x9m8FR+Llthf0EQ8sUjnwaknWs0Y6DQ3 -jjPFZOpV3KPCFrdMJ3++E3MgwFC/Ih/N2ebFX9EcV9Vcc6oVWMdwT0fsrhu683rq -6GSR/3iVX1G/pmOiuaR0fNUaCyCfYrnI4zHBDgSfnlm3vIvN2lrsR/DQBakNL8DJ -HBgKxMGeUPoneBv+c8DMXIL0EhaFXRlBv9QW45/GiAIOuyFJ0i6hCtGZpJjq4OpQ -BRjCI+izPzFTjsxD4aORE+WOkyWFCGPWKfNejfw0 ------END CERTIFICATE-----` - - keyData = `-----BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEAq12HPT64ItfDlxJiez2tT9eJ8VKlv/HbhYN2ubvZL+9v0E9i -wBK2I/Xjxu7KWvVI642LyxMBmaVUMMikhXAwt9/6jaspgOJyf1+NutPFM6OUjikc -kEf4lTcAnS1tqO6mKiHvSPAVLShinC2d6DbNycTZniXqaGuPaiStzlDX9fYjYcKG -0hTglhOKw5u2KfXRAolfTUIt9hcktry6lbMpnj8Y5wcb54BXeNdaheJ22NvVSzDv -RqahNnqYhUKSK7VDAKhrz7JyiMZ9mG+oywCnXnfplwK6X41r4BsK/jMpLsWRBBoi -ZWtd1SIVqewiih8aXD8k26gorqyxWlLkhzemBwIDAQABAoIBAD2XYRs3JrGHQUpU -FkdbVKZkvrSY0vAZOqBTLuH0zUv4UATb8487anGkWBjRDLQCgxH+jucPTrztekQK -aW94clo0S3aNtV4YhbSYIHWs1a0It0UdK6ID7CmdWkAj6s0T8W8lQT7C46mWYVLm -5mFnCTHi6aB42jZrqmEpC7sivWwuU0xqj3Ml8kkxQCGmyc9JjmCB4OrFFC8NNt6M -ObvQkUI6Z3nO4phTbpxkE1/9dT0MmPIF7GhHVzJMS+EyyRYUDllZ0wvVSOM3qZT0 -JMUaBerkNwm9foKJ1+dv2nMKZZbJajv7suUDCfU44mVeaEO+4kmTKSGCGjjTBGkr -7L1ySDECgYEA5ElIMhpdBzIivCuBIH8LlUeuzd93pqssO1G2Xg0jHtfM4tz7fyeI -cr90dc8gpli24dkSxzLeg3Tn3wIj/Bu64m2TpZPZEIlukYvgdgArmRIPQVxerYey -OkrfTNkxU1HXsYjLCdGcGXs5lmb+K/kuTcFxaMOs7jZi7La+jEONwf8CgYEAwCs/ -rUOOA0klDsWWisbivOiNPII79c9McZCNBqncCBfMUoiGe8uWDEO4TFHN60vFuVk9 -8PkwpCfvaBUX+ajvbafIfHxsnfk1M04WLGCeqQ/ym5Q4sQoQOcC1b1y9qc/xEWfg -nIUuia0ukYRpl7qQa3tNg+BNFyjypW8zukUAC/kCgYB1/Kojuxx5q5/oQVPrx73k -2bevD+B3c+DYh9MJqSCNwFtUpYIWpggPxoQan4LwdsmO0PKzocb/ilyNFj4i/vII -NToqSc/WjDFpaDIKyuu9oWfhECye45NqLWhb/6VOuu4QA/Nsj7luMhIBehnEAHW+ -GkzTKM8oD1PxpEG3nPKXYQKBgQC6AuMPRt3XBl1NkCrpSBy/uObFlFaP2Enpf39S -3OZ0Gv0XQrnSaL1kP8TMcz68rMrGX8DaWYsgytstR4W+jyy7WvZwsUu+GjTJ5aMG -77uEcEBpIi9CBzivfn7hPccE8ZgqPf+n4i6q66yxBJflW5xhvafJqDtW2LcPNbW/ -bvzdmQKBgExALRUXpq+5dbmkdXBHtvXdRDZ6rVmrnjy4nI5bPw+1GqQqk6uAR6B/ -F6NmLCQOO4PDG/cuatNHIr2FrwTmGdEL6ObLUGWn9Oer9gJhHVqqsY5I4sEPo4XX -stR0Yiw0buV6DL/moUO0HIM9Bjh96HJp+LxiIS6UCdIhMPp5HoQa ------END RSA PRIVATE KEY-----` -) - -func TestNew(t *testing.T) { - testCases := map[string]struct { - Config *Config - Err bool - TLS bool - TLSCert bool - TLSErr bool - Default bool - }{ - "default transport": { - Default: true, - Config: &Config{}, - }, - - "server name": { - TLS: true, - Config: &Config{TLS: TLSConfig{ - ServerName: "foo", - }}, - }, - - "ca transport": { - TLS: true, - Config: &Config{ - TLS: TLSConfig{ - CAData: []byte(rootCACert), - }, - }, - }, - "bad ca file transport": { - Err: true, - Config: &Config{ - TLS: TLSConfig{ - CAFile: "invalid file", - }, - }, - }, - "ca data overriding bad ca file transport": { - TLS: true, - Config: &Config{ - TLS: TLSConfig{ - CAData: []byte(rootCACert), - CAFile: "invalid file", - }, - }, - }, - - "cert transport": { - TLS: true, - TLSCert: true, - Config: &Config{ - TLS: TLSConfig{ - CAData: []byte(rootCACert), - CertData: []byte(certData), - KeyData: []byte(keyData), - }, - }, - }, - "bad cert data transport": { - Err: true, - Config: &Config{ - TLS: TLSConfig{ - CAData: []byte(rootCACert), - CertData: []byte(certData), - KeyData: []byte("bad key data"), - }, - }, - }, - "bad file cert transport": { - Err: true, - Config: &Config{ - TLS: TLSConfig{ - CAData: []byte(rootCACert), - CertData: []byte(certData), - KeyFile: "invalid file", - }, - }, - }, - "key data overriding bad file cert transport": { - TLS: true, - TLSCert: true, - Config: &Config{ - TLS: TLSConfig{ - CAData: []byte(rootCACert), - CertData: []byte(certData), - KeyData: []byte(keyData), - KeyFile: "invalid file", - }, - }, - }, - "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 { - 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.Fatalf("got %#v, expected TLSClientConfig", transport) - case !testCase.TLS && transport.TLSClientConfig != nil: - 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/vendor/k8s.io/client-go/util/buffer/ring_growing_test.go b/vendor/k8s.io/client-go/util/buffer/ring_growing_test.go deleted file mode 100644 index 31a4c079..00000000 --- a/vendor/k8s.io/client-go/util/buffer/ring_growing_test.go +++ /dev/null @@ -1,50 +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 buffer - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestGrowth(t *testing.T) { - t.Parallel() - x := 10 - g := NewRingGrowing(1) - for i := 0; i < x; i++ { - assert.Equal(t, i, g.readable) - g.WriteOne(i) - } - read := 0 - for g.readable > 0 { - v, ok := g.ReadOne() - assert.True(t, ok) - assert.Equal(t, read, v) - read++ - } - 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, 16, g.n, "expected N to be 16: %d", g.n) -} - -func TestEmpty(t *testing.T) { - t.Parallel() - g := NewRingGrowing(1) - _, ok := g.ReadOne() - assert.False(t, ok) -} diff --git a/vendor/k8s.io/client-go/util/cert/csr_test.go b/vendor/k8s.io/client-go/util/cert/csr_test.go deleted file mode 100644 index ed28f021..00000000 --- a/vendor/k8s.io/client-go/util/cert/csr_test.go +++ /dev/null @@ -1,75 +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 cert - -import ( - "crypto/x509" - "crypto/x509/pkix" - "encoding/pem" - "io/ioutil" - "net" - "testing" -) - -func TestMakeCSR(t *testing.T) { - keyFile := "testdata/dontUseThisKey.pem" - subject := &pkix.Name{ - CommonName: "kube-worker", - } - dnsSANs := []string{"localhost"} - ipSANs := []net.IP{net.ParseIP("127.0.0.1")} - - keyData, err := ioutil.ReadFile(keyFile) - if err != nil { - t.Fatal(err) - } - key, err := ParsePrivateKeyPEM(keyData) - if err != nil { - t.Fatal(err) - } - csrPEM, err := MakeCSR(key, subject, dnsSANs, ipSANs) - if err != nil { - t.Error(err) - } - csrBlock, rest := pem.Decode(csrPEM) - if csrBlock == nil { - t.Error("Unable to decode MakeCSR result.") - } - if len(rest) != 0 { - t.Error("Found more than one PEM encoded block in the result.") - } - if csrBlock.Type != CertificateRequestBlockType { - t.Errorf("Found block type %q, wanted 'CERTIFICATE REQUEST'", csrBlock.Type) - } - csr, err := x509.ParseCertificateRequest(csrBlock.Bytes) - if err != nil { - t.Errorf("Found %v parsing MakeCSR result as a CertificateRequest.", err) - } - if csr.Subject.CommonName != subject.CommonName { - t.Errorf("Wanted %v, got %v", subject, csr.Subject) - } - if len(csr.DNSNames) != 1 { - t.Errorf("Wanted 1 DNS name in the result, got %d", len(csr.DNSNames)) - } else if csr.DNSNames[0] != dnsSANs[0] { - t.Errorf("Wanted %v, got %v", dnsSANs[0], csr.DNSNames[0]) - } - if len(csr.IPAddresses) != 1 { - t.Errorf("Wanted 1 IP address in the result, got %d", len(csr.IPAddresses)) - } else if csr.IPAddresses[0].String() != ipSANs[0].String() { - t.Errorf("Wanted %v, got %v", ipSANs[0], csr.IPAddresses[0]) - } -} diff --git a/vendor/k8s.io/client-go/util/cert/pem_test.go b/vendor/k8s.io/client-go/util/cert/pem_test.go deleted file mode 100644 index de3ce525..00000000 --- a/vendor/k8s.io/client-go/util/cert/pem_test.go +++ /dev/null @@ -1,197 +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 cert - -import ( - "io/ioutil" - "os" - "testing" -) - -const ( - // rsaPrivateKey is a RSA Private Key in PKCS#1 format - // openssl genrsa -out rsa2048.pem 2048 - rsaPrivateKey = `-----BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEA92mVjhBKOFsdxFzb/Pjq+7b5TJlODAdY5hK+WxLZTIrfhDPq -FWrGKdjSNiHbXrdEtwJh9V+RqPZVSN3aWy1224RgkyNdMJsXhJKuCC24ZKY8SXtW -xuTYmMRaMnCsv6QBGRTIbZ2EFbAObVM7lDyv1VqY3amZIWFQMlZ9CNpxDSPa5yi4 -3gopbXkne0oGNmey9X0qtpk7NMZIgAL6Zz4rZ30bcfC2ag6RLOFI2E/c4n8c38R8 -9MfXfLkj8/Cxo4JfI9NvRCpPOpFO8d/ZtWVUuIrBQN+Y7tkN2T60Qq/TkKXUrhDe -fwlTlktZVJ/GztLYU41b2GcWsh/XO+PH831rmwIDAQABAoIBAQCC9c6GDjVbM0/E -WurPMusfJjE7zII1d8YkspM0HfwLug6qKdikUYpnKC/NG4rEzfl/bbFwco/lgc6O -7W/hh2U8uQttlvCDA/Uk5YddKOZL0Hpk4vaB/SxxYK3luSKXpjY2knutGg2KdVCN -qdsFkkH4iyYTXuyBcMNEgedZQldI/kEujIH/L7FE+DF5TMzT4lHhozDoG+fy564q -qVGUZXJn0ubc3GaPn2QOLNNM44sfYA4UJCpKBXPu85bvNObjxVQO4WqwwxU1vRnL -UUsaGaelhSVJCo0dVPRvrfPPKZ09HTwpy40EkgQo6VriFc1EBoQDjENLbAJv9OfQ -aCc9wiZhAoGBAP/8oEy48Zbb0P8Vdy4djf5tfBW8yXFLWzXewJ4l3itKS1r42nbX -9q3cJsgRTQm8uRcMIpWxsc3n6zG+lREvTkoTB3ViI7+uQPiqA+BtWyNy7jzufFke -ONKZfg7QxxmYRWZBRnoNGNbMpNeERuLmhvQuom9D1WbhzAYJbfs/O4WTAoGBAPds -2FNDU0gaesFDdkIUGq1nIJqRQDW485LXZm4pFqBFxdOpbdWRuYT2XZjd3fD0XY98 -Nhkpb7NTMCuK3BdKcqIptt+cK+quQgYid0hhhgZbpCQ5AL6c6KgyjgpYlh2enzU9 -Zo3yg8ej1zbbA11sBlhX+5iO2P1u5DG+JHLwUUbZAoGAUwaU102EzfEtsA4+QW7E -hyjrfgFlNKHES4yb3K9bh57pIfBkqvcQwwMMcQdrfSUAw0DkVrjzel0mI1Q09QXq -1ould6UFAz55RC2gZEITtUOpkYmoOx9aPrQZ9qQwb1S77ZZuTVfCHqjxLhVxCFbM -npYhiQTvShciHTMhwMOZgpECgYAVV5EtVXBYltgh1YTc3EkUzgF087R7LdHsx6Gx -POATwRD4WfP8aQ58lpeqOPEM+LcdSlSMRRO6fyF3kAm+BJDwxfJdRWZQXumZB94M -I0VhRQRaj4Qt7PDwmTPBVrTUJzuKZxpyggm17b8Bn1Ch/VBqzGQKW8AB1E/grosM -UwhfuQKBgQC2JO/iqTQScHClf0qlItCJsBuVukFmSAVCkpOD8YdbdlPdOOwSk1wQ -C0eAlsC3BCMvkpidKQmra6IqIrvTGI6EFgkrb3aknWdup2w8j2udYCNqyE3W+fVe -p8FdYQ1FkACQ+daO5VlClL/9l0sGjKXlNKbpmJ2H4ngZmXj5uGmxuQ== ------END RSA PRIVATE KEY-----` - - // rsaPublicKey is a RSA Public Key in PEM encoded format - // openssl rsa -in rsa2048.pem -pubout -out rsa2048pub.pem - rsaPublicKey = `-----BEGIN PUBLIC KEY----- -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA92mVjhBKOFsdxFzb/Pjq -+7b5TJlODAdY5hK+WxLZTIrfhDPqFWrGKdjSNiHbXrdEtwJh9V+RqPZVSN3aWy12 -24RgkyNdMJsXhJKuCC24ZKY8SXtWxuTYmMRaMnCsv6QBGRTIbZ2EFbAObVM7lDyv -1VqY3amZIWFQMlZ9CNpxDSPa5yi43gopbXkne0oGNmey9X0qtpk7NMZIgAL6Zz4r -Z30bcfC2ag6RLOFI2E/c4n8c38R89MfXfLkj8/Cxo4JfI9NvRCpPOpFO8d/ZtWVU -uIrBQN+Y7tkN2T60Qq/TkKXUrhDefwlTlktZVJ/GztLYU41b2GcWsh/XO+PH831r -mwIDAQAB ------END PUBLIC KEY-----` - - // certificate is an x509 certificate in PEM encoded format - // openssl req -new -key rsa2048.pem -sha256 -nodes -x509 -days 1826 -out x509certificate.pem -subj "/C=US/CN=not-valid" - certificate = `-----BEGIN CERTIFICATE----- -MIIDFTCCAf2gAwIBAgIJAN8B8NOwtiUCMA0GCSqGSIb3DQEBCwUAMCExCzAJBgNV -BAYTAlVTMRIwEAYDVQQDDAlub3QtdmFsaWQwHhcNMTcwMzIyMDI1NjM2WhcNMjIw -MzIyMDI1NjM2WjAhMQswCQYDVQQGEwJVUzESMBAGA1UEAwwJbm90LXZhbGlkMIIB -IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA92mVjhBKOFsdxFzb/Pjq+7b5 -TJlODAdY5hK+WxLZTIrfhDPqFWrGKdjSNiHbXrdEtwJh9V+RqPZVSN3aWy1224Rg -kyNdMJsXhJKuCC24ZKY8SXtWxuTYmMRaMnCsv6QBGRTIbZ2EFbAObVM7lDyv1VqY -3amZIWFQMlZ9CNpxDSPa5yi43gopbXkne0oGNmey9X0qtpk7NMZIgAL6Zz4rZ30b -cfC2ag6RLOFI2E/c4n8c38R89MfXfLkj8/Cxo4JfI9NvRCpPOpFO8d/ZtWVUuIrB -QN+Y7tkN2T60Qq/TkKXUrhDefwlTlktZVJ/GztLYU41b2GcWsh/XO+PH831rmwID -AQABo1AwTjAdBgNVHQ4EFgQU1I5GfinLF7ta+dBJ6UWcrYaexLswHwYDVR0jBBgw -FoAU1I5GfinLF7ta+dBJ6UWcrYaexLswDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0B -AQsFAAOCAQEAUl0wUD4y41juHFOVMYiziPYr1ShSpQXdwp8FfaHrzI5hsr8UMe8D -dzb9QzZ4bx3yZhiG3ahrSBh956thMTHrKTEwAfJIEXI4cuSVWQAaOJ4Em5SDFxQe -d0E6Ui2nGh1SFGF7oyuEXyzqgRMWFNDFw9HLUNgXaO18Zfouw8+K0BgbfEWEcSi1 -JLQbyhCjz088gltrliQGPWDFAg9cHBKtJhuTzZkvuqK1CLEmBhtzP1zFiGBfOJc8 -v+aKjAwrPUNX11cXOCPxBv2qXMetxaovBem6AI2hvypCInXaVQfP+yOLubzlTDjS -Y708SlY38hmS1uTwDpyLOn8AKkZ8jtx75g== ------END CERTIFICATE-----` - - // ecdsaPrivateKeyWithParams is a ECDSA Private Key with included EC Parameters block - // openssl ecparam -name prime256v1 -genkey -out ecdsa256params.pem - ecdsaPrivateKeyWithParams = `-----BEGIN EC PARAMETERS----- -BggqhkjOPQMBBw== ------END EC PARAMETERS----- ------BEGIN EC PRIVATE KEY----- -MHcCAQEEIAwSOWQqlMTZNqNF7tgua812Jxib1DVOgb2pHHyIEyNNoAoGCCqGSM49 -AwEHoUQDQgAEyxYNrs6a6tsNCFNYn+l+JDUZ0PnUZbcsDgJn2O62D1se8M5iQ5rY -iIv6RpxE3VHvlHEIvYgCZkG0jHszTUopBg== ------END EC PRIVATE KEY-----` - - // ecdsaPrivateKey is a ECDSA Private Key in ASN.1 format - // openssl ecparam -name prime256v1 -genkey -noout -out ecdsa256.pem - ecdsaPrivateKey = `-----BEGIN EC PRIVATE KEY----- -MHcCAQEEIP6Qw6dHDiLsSnLXUhQVTPE0fTQQrj3XSbiQAZPXnk5+oAoGCCqGSM49 -AwEHoUQDQgAEZZzi1u5f2/AEGFI/HYUhU+u6cTK1q2bbtE7r1JMK+/sQA5sNAp+7 -Vdc3psr1OaNzyTyuhTECyRdFKXm63cMnGg== ------END EC PRIVATE KEY-----` - - // ecdsaPublicKey is a ECDSA Public Key in PEM encoded format - // openssl ec -in ecdsa256.pem -pubout -out ecdsa256pub.pem - ecdsaPublicKey = `-----BEGIN PUBLIC KEY----- -MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEZZzi1u5f2/AEGFI/HYUhU+u6cTK1 -q2bbtE7r1JMK+/sQA5sNAp+7Vdc3psr1OaNzyTyuhTECyRdFKXm63cMnGg== ------END PUBLIC KEY-----` -) - -func TestReadPrivateKey(t *testing.T) { - f, err := ioutil.TempFile("", "") - if err != nil { - t.Fatalf("error creating tmpfile: %v", err) - } - defer os.Remove(f.Name()) - - if _, err := PrivateKeyFromFile(f.Name()); err == nil { - t.Fatalf("Expected error reading key from empty file, got none") - } - - if err := ioutil.WriteFile(f.Name(), []byte(rsaPrivateKey), os.FileMode(0600)); err != nil { - t.Fatalf("error writing private key to tmpfile: %v", err) - } - if _, err := PrivateKeyFromFile(f.Name()); err != nil { - t.Fatalf("error reading private RSA key: %v", err) - } - - if err := ioutil.WriteFile(f.Name(), []byte(ecdsaPrivateKey), os.FileMode(0600)); err != nil { - t.Fatalf("error writing private key to tmpfile: %v", err) - } - if _, err := PrivateKeyFromFile(f.Name()); err != nil { - t.Fatalf("error reading private ECDSA key: %v", err) - } - - if err := ioutil.WriteFile(f.Name(), []byte(ecdsaPrivateKeyWithParams), os.FileMode(0600)); err != nil { - t.Fatalf("error writing private key to tmpfile: %v", err) - } - if _, err := PrivateKeyFromFile(f.Name()); err != nil { - t.Fatalf("error reading private ECDSA key with params: %v", err) - } -} - -func TestReadPublicKeys(t *testing.T) { - f, err := ioutil.TempFile("", "") - if err != nil { - t.Fatalf("error creating tmpfile: %v", err) - } - defer os.Remove(f.Name()) - - if _, err := PublicKeysFromFile(f.Name()); err == nil { - t.Fatalf("Expected error reading keys from empty file, got none") - } - - if err := ioutil.WriteFile(f.Name(), []byte(rsaPublicKey), os.FileMode(0600)); err != nil { - t.Fatalf("error writing public key to tmpfile: %v", err) - } - if keys, err := PublicKeysFromFile(f.Name()); err != nil { - t.Fatalf("error reading RSA public key: %v", err) - } else if len(keys) != 1 { - t.Fatalf("expected 1 key, got %d", len(keys)) - } - - if err := ioutil.WriteFile(f.Name(), []byte(ecdsaPublicKey), os.FileMode(0600)); err != nil { - t.Fatalf("error writing public key to tmpfile: %v", err) - } - if keys, err := PublicKeysFromFile(f.Name()); err != nil { - t.Fatalf("error reading ECDSA public key: %v", err) - } else if len(keys) != 1 { - t.Fatalf("expected 1 key, got %d", len(keys)) - } - - if err := ioutil.WriteFile(f.Name(), []byte(rsaPublicKey+"\n"+ecdsaPublicKey), os.FileMode(0600)); err != nil { - t.Fatalf("error writing public key to tmpfile: %v", err) - } - if keys, err := PublicKeysFromFile(f.Name()); err != nil { - t.Fatalf("error reading combined RSA/ECDSA public key file: %v", err) - } else if len(keys) != 2 { - t.Fatalf("expected 2 keys, got %d", len(keys)) - } - - if err := ioutil.WriteFile(f.Name(), []byte(certificate), os.FileMode(0600)); err != nil { - t.Fatalf("error writing certificate to tmpfile: %v", err) - } - if keys, err := PublicKeysFromFile(f.Name()); err != nil { - t.Fatalf("error reading public key from certificate file: %v", err) - } else if len(keys) != 1 { - t.Fatalf("expected 1 keys, got %d", len(keys)) - } - -} diff --git a/vendor/k8s.io/client-go/util/connrotation/connrotation_test.go b/vendor/k8s.io/client-go/util/connrotation/connrotation_test.go deleted file mode 100644 index a618f296..00000000 --- a/vendor/k8s.io/client-go/util/connrotation/connrotation_test.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -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/vendor/k8s.io/client-go/util/flowcontrol/backoff_test.go b/vendor/k8s.io/client-go/util/flowcontrol/backoff_test.go deleted file mode 100644 index 23a6cbfa..00000000 --- a/vendor/k8s.io/client-go/util/flowcontrol/backoff_test.go +++ /dev/null @@ -1,195 +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 flowcontrol - -import ( - "testing" - "time" - - "k8s.io/apimachinery/pkg/util/clock" -) - -func TestSlowBackoff(t *testing.T) { - id := "_idSlow" - tc := clock.NewFakeClock(time.Now()) - step := time.Second - maxDuration := 50 * step - - b := NewFakeBackOff(step, maxDuration, tc) - cases := []time.Duration{0, 1, 2, 4, 8, 16, 32, 50, 50, 50} - for ix, c := range cases { - tc.Step(step) - w := b.Get(id) - if w != c*step { - t.Errorf("input: '%d': expected %s, got %s", ix, c*step, w) - } - b.Next(id, tc.Now()) - } - - //Now confirm that the Reset cancels backoff. - b.Next(id, tc.Now()) - b.Reset(id) - if b.Get(id) != 0 { - t.Errorf("Reset didn't clear the backoff.") - } - -} - -func TestBackoffReset(t *testing.T) { - id := "_idReset" - tc := clock.NewFakeClock(time.Now()) - step := time.Second - maxDuration := step * 5 - b := NewFakeBackOff(step, maxDuration, tc) - startTime := tc.Now() - - // get to backoff = maxDuration - for i := 0; i <= int(maxDuration/step); i++ { - tc.Step(step) - b.Next(id, tc.Now()) - } - - // backoff should be capped at maxDuration - if !b.IsInBackOffSince(id, tc.Now()) { - t.Errorf("expected to be in Backoff got %s", b.Get(id)) - } - - lastUpdate := tc.Now() - tc.Step(2*maxDuration + step) // time += 11s, 11 > 2*maxDuration - if b.IsInBackOffSince(id, lastUpdate) { - t.Errorf("expected to not be in Backoff after reset (start=%s, now=%s, lastUpdate=%s), got %s", startTime, tc.Now(), lastUpdate, b.Get(id)) - } -} - -func TestBackoffHightWaterMark(t *testing.T) { - id := "_idHiWaterMark" - tc := clock.NewFakeClock(time.Now()) - step := time.Second - maxDuration := 5 * step - b := NewFakeBackOff(step, maxDuration, tc) - - // get to backoff = maxDuration - for i := 0; i <= int(maxDuration/step); i++ { - tc.Step(step) - b.Next(id, tc.Now()) - } - - // backoff high watermark expires after 2*maxDuration - tc.Step(maxDuration + step) - b.Next(id, tc.Now()) - - if b.Get(id) != maxDuration { - t.Errorf("expected Backoff to stay at high watermark %s got %s", maxDuration, b.Get(id)) - } -} - -func TestBackoffGC(t *testing.T) { - id := "_idGC" - tc := clock.NewFakeClock(time.Now()) - step := time.Second - maxDuration := 5 * step - - b := NewFakeBackOff(step, maxDuration, tc) - - for i := 0; i <= int(maxDuration/step); i++ { - tc.Step(step) - b.Next(id, tc.Now()) - } - lastUpdate := tc.Now() - tc.Step(maxDuration + step) - b.GC() - _, found := b.perItemBackoff[id] - if !found { - t.Errorf("expected GC to skip entry, elapsed time=%s maxDuration=%s", tc.Now().Sub(lastUpdate), maxDuration) - } - - tc.Step(maxDuration + step) - b.GC() - r, found := b.perItemBackoff[id] - if found { - t.Errorf("expected GC of entry after %s got entry %v", tc.Now().Sub(lastUpdate), r) - } -} - -func TestIsInBackOffSinceUpdate(t *testing.T) { - id := "_idIsInBackOffSinceUpdate" - tc := clock.NewFakeClock(time.Now()) - step := time.Second - maxDuration := 10 * step - b := NewFakeBackOff(step, maxDuration, tc) - startTime := tc.Now() - - cases := []struct { - tick time.Duration - inBackOff bool - value int - }{ - {tick: 0, inBackOff: false, value: 0}, - {tick: 1, inBackOff: false, value: 1}, - {tick: 2, inBackOff: true, value: 2}, - {tick: 3, inBackOff: false, value: 2}, - {tick: 4, inBackOff: true, value: 4}, - {tick: 5, inBackOff: true, value: 4}, - {tick: 6, inBackOff: true, value: 4}, - {tick: 7, inBackOff: false, value: 4}, - {tick: 8, inBackOff: true, value: 8}, - {tick: 9, inBackOff: true, value: 8}, - {tick: 10, inBackOff: true, value: 8}, - {tick: 11, inBackOff: true, value: 8}, - {tick: 12, inBackOff: true, value: 8}, - {tick: 13, inBackOff: true, value: 8}, - {tick: 14, inBackOff: true, value: 8}, - {tick: 15, inBackOff: false, value: 8}, - {tick: 16, inBackOff: true, value: 10}, - {tick: 17, inBackOff: true, value: 10}, - {tick: 18, inBackOff: true, value: 10}, - {tick: 19, inBackOff: true, value: 10}, - {tick: 20, inBackOff: true, value: 10}, - {tick: 21, inBackOff: true, value: 10}, - {tick: 22, inBackOff: true, value: 10}, - {tick: 23, inBackOff: true, value: 10}, - {tick: 24, inBackOff: true, value: 10}, - {tick: 25, inBackOff: false, value: 10}, - {tick: 26, inBackOff: true, value: 10}, - {tick: 27, inBackOff: true, value: 10}, - {tick: 28, inBackOff: true, value: 10}, - {tick: 29, inBackOff: true, value: 10}, - {tick: 30, inBackOff: true, value: 10}, - {tick: 31, inBackOff: true, value: 10}, - {tick: 32, inBackOff: true, value: 10}, - {tick: 33, inBackOff: true, value: 10}, - {tick: 34, inBackOff: true, value: 10}, - {tick: 35, inBackOff: false, value: 10}, - {tick: 56, inBackOff: false, value: 0}, - {tick: 57, inBackOff: false, value: 1}, - } - - for _, c := range cases { - tc.SetTime(startTime.Add(c.tick * step)) - if c.inBackOff != b.IsInBackOffSinceUpdate(id, tc.Now()) { - t.Errorf("expected IsInBackOffSinceUpdate %v got %v at tick %s", c.inBackOff, b.IsInBackOffSinceUpdate(id, tc.Now()), c.tick*step) - } - - if c.inBackOff && (time.Duration(c.value)*step != b.Get(id)) { - t.Errorf("expected backoff value=%s got %s at tick %s", time.Duration(c.value)*step, b.Get(id), c.tick*step) - } - - if !c.inBackOff { - b.Next(id, tc.Now()) - } - } -} diff --git a/vendor/k8s.io/client-go/util/flowcontrol/throttle_test.go b/vendor/k8s.io/client-go/util/flowcontrol/throttle_test.go deleted file mode 100644 index 99cf64d6..00000000 --- a/vendor/k8s.io/client-go/util/flowcontrol/throttle_test.go +++ /dev/null @@ -1,153 +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 flowcontrol - -import ( - "sync" - "testing" - "time" -) - -func TestMultithreadedThrottling(t *testing.T) { - // Bucket with 100QPS and no burst - r := NewTokenBucketRateLimiter(100, 1) - - // channel to collect 100 tokens - taken := make(chan bool, 100) - - // Set up goroutines to hammer the throttler - startCh := make(chan bool) - endCh := make(chan bool) - for i := 0; i < 10; i++ { - go func() { - // wait for the starting signal - <-startCh - for { - // get a token - r.Accept() - select { - // try to add it to the taken channel - case taken <- true: - continue - // if taken is full, notify and return - default: - endCh <- true - return - } - } - }() - } - - // record wall time - startTime := time.Now() - // take the initial capacity so all tokens are the result of refill - r.Accept() - // start the thundering herd - close(startCh) - // wait for the first signal that we collected 100 tokens - <-endCh - // record wall time - endTime := time.Now() - - // tolerate a 1% clock change because these things happen - if duration := endTime.Sub(startTime); duration < (time.Second * 99 / 100) { - // We shouldn't be able to get 100 tokens out of the bucket in less than 1 second of wall clock time, no matter what - t.Errorf("Expected it to take at least 1 second to get 100 tokens, took %v", duration) - } else { - t.Logf("Took %v to get 100 tokens", duration) - } -} - -func TestBasicThrottle(t *testing.T) { - r := NewTokenBucketRateLimiter(1, 3) - for i := 0; i < 3; i++ { - if !r.TryAccept() { - t.Error("unexpected false accept") - } - } - if r.TryAccept() { - t.Error("unexpected true accept") - } -} - -func TestIncrementThrottle(t *testing.T) { - r := NewTokenBucketRateLimiter(1, 1) - if !r.TryAccept() { - t.Error("unexpected false accept") - } - if r.TryAccept() { - t.Error("unexpected true accept") - } - - // Allow to refill - time.Sleep(2 * time.Second) - - if !r.TryAccept() { - t.Error("unexpected false accept") - } -} - -func TestThrottle(t *testing.T) { - r := NewTokenBucketRateLimiter(10, 5) - - // Should consume 5 tokens immediately, then - // the remaining 11 should take at least 1 second (0.1s each) - expectedFinish := time.Now().Add(time.Second * 1) - for i := 0; i < 16; i++ { - r.Accept() - } - if time.Now().Before(expectedFinish) { - t.Error("rate limit was not respected, finished too early") - } -} - -func TestAlwaysFake(t *testing.T) { - rl := NewFakeAlwaysRateLimiter() - if !rl.TryAccept() { - t.Error("TryAccept in AlwaysFake should return true.") - } - // If this will block the test will timeout - rl.Accept() -} - -func TestNeverFake(t *testing.T) { - rl := NewFakeNeverRateLimiter() - if rl.TryAccept() { - t.Error("TryAccept in NeverFake should return false.") - } - - finished := false - wg := sync.WaitGroup{} - wg.Add(1) - go func() { - rl.Accept() - finished = true - wg.Done() - }() - - // Wait some time to make sure it never finished. - time.Sleep(time.Second) - if finished { - t.Error("Accept should block forever in NeverFake.") - } - - rl.Stop() - wg.Wait() - if !finished { - t.Error("Stop should make Accept unblock in NeverFake.") - } -} diff --git a/vendor/k8s.io/client-go/util/integer/integer_test.go b/vendor/k8s.io/client-go/util/integer/integer_test.go deleted file mode 100644 index e9f58688..00000000 --- a/vendor/k8s.io/client-go/util/integer/integer_test.go +++ /dev/null @@ -1,244 +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 integer - -import "testing" - -func TestIntMax(t *testing.T) { - tests := []struct { - nums []int - expectedMax int - }{ - { - nums: []int{-1, 0}, - expectedMax: 0, - }, - { - nums: []int{-1, -2}, - expectedMax: -1, - }, - { - nums: []int{0, 1}, - expectedMax: 1, - }, - { - nums: []int{1, 2}, - expectedMax: 2, - }, - } - - for i, test := range tests { - t.Logf("executing scenario %d", i) - if max := IntMax(test.nums[0], test.nums[1]); max != test.expectedMax { - t.Errorf("expected %v, got %v", test.expectedMax, max) - } - } -} - -func TestIntMin(t *testing.T) { - tests := []struct { - nums []int - expectedMin int - }{ - { - nums: []int{-1, 0}, - expectedMin: -1, - }, - { - nums: []int{-1, -2}, - expectedMin: -2, - }, - { - nums: []int{0, 1}, - expectedMin: 0, - }, - { - nums: []int{1, 2}, - expectedMin: 1, - }, - } - - for i, test := range tests { - t.Logf("executing scenario %d", i) - if min := IntMin(test.nums[0], test.nums[1]); min != test.expectedMin { - t.Errorf("expected %v, got %v", test.expectedMin, min) - } - } -} - -func TestInt32Max(t *testing.T) { - tests := []struct { - nums []int32 - expectedMax int32 - }{ - { - nums: []int32{-1, 0}, - expectedMax: 0, - }, - { - nums: []int32{-1, -2}, - expectedMax: -1, - }, - { - nums: []int32{0, 1}, - expectedMax: 1, - }, - { - nums: []int32{1, 2}, - expectedMax: 2, - }, - } - - for i, test := range tests { - t.Logf("executing scenario %d", i) - if max := Int32Max(test.nums[0], test.nums[1]); max != test.expectedMax { - t.Errorf("expected %v, got %v", test.expectedMax, max) - } - } -} - -func TestInt32Min(t *testing.T) { - tests := []struct { - nums []int32 - expectedMin int32 - }{ - { - nums: []int32{-1, 0}, - expectedMin: -1, - }, - { - nums: []int32{-1, -2}, - expectedMin: -2, - }, - { - nums: []int32{0, 1}, - expectedMin: 0, - }, - { - nums: []int32{1, 2}, - expectedMin: 1, - }, - } - - for i, test := range tests { - t.Logf("executing scenario %d", i) - if min := Int32Min(test.nums[0], test.nums[1]); min != test.expectedMin { - t.Errorf("expected %v, got %v", test.expectedMin, min) - } - } -} - -func TestInt64Max(t *testing.T) { - tests := []struct { - nums []int64 - expectedMax int64 - }{ - { - nums: []int64{-1, 0}, - expectedMax: 0, - }, - { - nums: []int64{-1, -2}, - expectedMax: -1, - }, - { - nums: []int64{0, 1}, - expectedMax: 1, - }, - { - nums: []int64{1, 2}, - expectedMax: 2, - }, - } - - for i, test := range tests { - t.Logf("executing scenario %d", i) - if max := Int64Max(test.nums[0], test.nums[1]); max != test.expectedMax { - t.Errorf("expected %v, got %v", test.expectedMax, max) - } - } -} - -func TestInt64Min(t *testing.T) { - tests := []struct { - nums []int64 - expectedMin int64 - }{ - { - nums: []int64{-1, 0}, - expectedMin: -1, - }, - { - nums: []int64{-1, -2}, - expectedMin: -2, - }, - { - nums: []int64{0, 1}, - expectedMin: 0, - }, - { - nums: []int64{1, 2}, - expectedMin: 1, - }, - } - - for i, test := range tests { - t.Logf("executing scenario %d", i) - if min := Int64Min(test.nums[0], test.nums[1]); min != test.expectedMin { - t.Errorf("expected %v, got %v", test.expectedMin, min) - } - } -} - -func TestRoundToInt32(t *testing.T) { - tests := []struct { - num float64 - exp int32 - }{ - { - num: 5.5, - exp: 6, - }, - { - num: -3.7, - exp: -4, - }, - { - num: 3.49, - exp: 3, - }, - { - num: -7.9, - exp: -8, - }, - { - num: -4.499999, - exp: -4, - }, - { - num: 0, - exp: 0, - }, - } - - for i, test := range tests { - t.Logf("executing scenario %d", i) - if got := RoundToInt32(test.num); got != test.exp { - t.Errorf("expected %d, got %d", test.exp, got) - } - } -} diff --git a/vendor/k8s.io/client-go/util/retry/OWNERS b/vendor/k8s.io/client-go/util/retry/OWNERS deleted file mode 100755 index a4c1c2d4..00000000 --- a/vendor/k8s.io/client-go/util/retry/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -reviewers: -- caesarxuchao diff --git a/vendor/k8s.io/client-go/util/retry/util_test.go b/vendor/k8s.io/client-go/util/retry/util_test.go deleted file mode 100644 index dbb4374f..00000000 --- a/vendor/k8s.io/client-go/util/retry/util_test.go +++ /dev/null @@ -1,71 +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 retry - -import ( - "fmt" - "testing" - - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/wait" -) - -func TestRetryOnConflict(t *testing.T) { - opts := wait.Backoff{Factor: 1.0, Steps: 3} - conflictErr := errors.NewConflict(schema.GroupResource{Resource: "test"}, "other", nil) - - // never returns - err := RetryOnConflict(opts, func() error { - return conflictErr - }) - if err != conflictErr { - t.Errorf("unexpected error: %v", err) - } - - // returns immediately - i := 0 - err = RetryOnConflict(opts, func() error { - i++ - return nil - }) - if err != nil || i != 1 { - t.Errorf("unexpected error: %v", err) - } - - // returns immediately on error - testErr := fmt.Errorf("some other error") - err = RetryOnConflict(opts, func() error { - return testErr - }) - if err != testErr { - t.Errorf("unexpected error: %v", err) - } - - // keeps retrying - i = 0 - err = RetryOnConflict(opts, func() error { - if i < 2 { - i++ - return errors.NewConflict(schema.GroupResource{Resource: "test"}, "other", nil) - } - return nil - }) - if err != nil || i != 2 { - t.Errorf("unexpected error: %v", err) - } -} diff --git a/vendor/k8s.io/client-go/util/workqueue/default_rate_limiters_test.go b/vendor/k8s.io/client-go/util/workqueue/default_rate_limiters_test.go deleted file mode 100644 index 91d34a31..00000000 --- a/vendor/k8s.io/client-go/util/workqueue/default_rate_limiters_test.go +++ /dev/null @@ -1,184 +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 workqueue - -import ( - "testing" - "time" -) - -func TestItemExponentialFailureRateLimiter(t *testing.T) { - limiter := NewItemExponentialFailureRateLimiter(1*time.Millisecond, 1*time.Second) - - if e, a := 1*time.Millisecond, limiter.When("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 2*time.Millisecond, limiter.When("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 4*time.Millisecond, limiter.When("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 8*time.Millisecond, limiter.When("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 16*time.Millisecond, limiter.When("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 5, limiter.NumRequeues("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - - if e, a := 1*time.Millisecond, limiter.When("two"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 2*time.Millisecond, limiter.When("two"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 2, limiter.NumRequeues("two"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - - limiter.Forget("one") - if e, a := 0, limiter.NumRequeues("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 1*time.Millisecond, limiter.When("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - -} - -func TestItemExponentialFailureRateLimiterOverFlow(t *testing.T) { - limiter := NewItemExponentialFailureRateLimiter(1*time.Millisecond, 1000*time.Second) - for i := 0; i < 5; i++ { - limiter.When("one") - } - if e, a := 32*time.Millisecond, limiter.When("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - - for i := 0; i < 1000; i++ { - limiter.When("overflow1") - } - if e, a := 1000*time.Second, limiter.When("overflow1"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - - limiter = NewItemExponentialFailureRateLimiter(1*time.Minute, 1000*time.Hour) - for i := 0; i < 2; i++ { - limiter.When("two") - } - if e, a := 4*time.Minute, limiter.When("two"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - - for i := 0; i < 1000; i++ { - limiter.When("overflow2") - } - if e, a := 1000*time.Hour, limiter.When("overflow2"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - -} - -func TestItemFastSlowRateLimiter(t *testing.T) { - limiter := NewItemFastSlowRateLimiter(5*time.Millisecond, 10*time.Second, 3) - - if e, a := 5*time.Millisecond, limiter.When("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 5*time.Millisecond, limiter.When("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 5*time.Millisecond, limiter.When("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 10*time.Second, limiter.When("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 10*time.Second, limiter.When("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 5, limiter.NumRequeues("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - - if e, a := 5*time.Millisecond, limiter.When("two"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 5*time.Millisecond, limiter.When("two"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 2, limiter.NumRequeues("two"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - - limiter.Forget("one") - if e, a := 0, limiter.NumRequeues("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 5*time.Millisecond, limiter.When("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - -} - -func TestMaxOfRateLimiter(t *testing.T) { - limiter := NewMaxOfRateLimiter( - NewItemFastSlowRateLimiter(5*time.Millisecond, 3*time.Second, 3), - NewItemExponentialFailureRateLimiter(1*time.Millisecond, 1*time.Second), - ) - - if e, a := 5*time.Millisecond, limiter.When("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 5*time.Millisecond, limiter.When("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 5*time.Millisecond, limiter.When("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 3*time.Second, limiter.When("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 3*time.Second, limiter.When("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 5, limiter.NumRequeues("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - - if e, a := 5*time.Millisecond, limiter.When("two"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 5*time.Millisecond, limiter.When("two"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 2, limiter.NumRequeues("two"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - - limiter.Forget("one") - if e, a := 0, limiter.NumRequeues("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 5*time.Millisecond, limiter.When("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - -} diff --git a/vendor/k8s.io/client-go/util/workqueue/delaying_queue_test.go b/vendor/k8s.io/client-go/util/workqueue/delaying_queue_test.go deleted file mode 100644 index 3c8ebf13..00000000 --- a/vendor/k8s.io/client-go/util/workqueue/delaying_queue_test.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 workqueue - -import ( - "fmt" - "math/rand" - "reflect" - "testing" - "time" - - "k8s.io/apimachinery/pkg/util/clock" - "k8s.io/apimachinery/pkg/util/wait" -) - -func TestSimpleQueue(t *testing.T) { - fakeClock := clock.NewFakeClock(time.Now()) - q := newDelayingQueue(fakeClock, "") - - first := "foo" - - q.AddAfter(first, 50*time.Millisecond) - if err := waitForWaitingQueueToFill(q); err != nil { - t.Fatalf("unexpected err: %v", err) - } - - if q.Len() != 0 { - t.Errorf("should not have added") - } - - fakeClock.Step(60 * time.Millisecond) - - if err := waitForAdded(q, 1); err != nil { - t.Errorf("should have added") - } - item, _ := q.Get() - q.Done(item) - - // step past the next heartbeat - fakeClock.Step(10 * time.Second) - - err := wait.Poll(1*time.Millisecond, 30*time.Millisecond, func() (done bool, err error) { - if q.Len() > 0 { - return false, fmt.Errorf("added to queue") - } - - return false, nil - }) - if err != wait.ErrWaitTimeout { - t.Errorf("expected timeout, got: %v", err) - } - - if q.Len() != 0 { - t.Errorf("should not have added") - } -} - -func TestDeduping(t *testing.T) { - fakeClock := clock.NewFakeClock(time.Now()) - q := newDelayingQueue(fakeClock, "") - - first := "foo" - - q.AddAfter(first, 50*time.Millisecond) - if err := waitForWaitingQueueToFill(q); err != nil { - t.Fatalf("unexpected err: %v", err) - } - q.AddAfter(first, 70*time.Millisecond) - if err := waitForWaitingQueueToFill(q); err != nil { - t.Fatalf("unexpected err: %v", err) - } - if q.Len() != 0 { - t.Errorf("should not have added") - } - - // step past the first block, we should receive now - fakeClock.Step(60 * time.Millisecond) - if err := waitForAdded(q, 1); err != nil { - t.Errorf("should have added") - } - item, _ := q.Get() - q.Done(item) - - // step past the second add - fakeClock.Step(20 * time.Millisecond) - if q.Len() != 0 { - t.Errorf("should not have added") - } - - // test again, but this time the earlier should override - q.AddAfter(first, 50*time.Millisecond) - q.AddAfter(first, 30*time.Millisecond) - if err := waitForWaitingQueueToFill(q); err != nil { - t.Fatalf("unexpected err: %v", err) - } - if q.Len() != 0 { - t.Errorf("should not have added") - } - - fakeClock.Step(40 * time.Millisecond) - if err := waitForAdded(q, 1); err != nil { - t.Errorf("should have added") - } - item, _ = q.Get() - q.Done(item) - - // step past the second add - fakeClock.Step(20 * time.Millisecond) - if q.Len() != 0 { - t.Errorf("should not have added") - } - if q.Len() != 0 { - t.Errorf("should not have added") - } -} - -func TestAddTwoFireEarly(t *testing.T) { - fakeClock := clock.NewFakeClock(time.Now()) - q := newDelayingQueue(fakeClock, "") - - first := "foo" - second := "bar" - third := "baz" - - q.AddAfter(first, 1*time.Second) - q.AddAfter(second, 50*time.Millisecond) - if err := waitForWaitingQueueToFill(q); err != nil { - t.Fatalf("unexpected err: %v", err) - } - - if q.Len() != 0 { - t.Errorf("should not have added") - } - - fakeClock.Step(60 * time.Millisecond) - - if err := waitForAdded(q, 1); err != nil { - t.Fatalf("unexpected err: %v", err) - } - item, _ := q.Get() - if !reflect.DeepEqual(item, second) { - t.Errorf("expected %v, got %v", second, item) - } - - q.AddAfter(third, 2*time.Second) - - fakeClock.Step(1 * time.Second) - if err := waitForAdded(q, 1); err != nil { - t.Fatalf("unexpected err: %v", err) - } - item, _ = q.Get() - if !reflect.DeepEqual(item, first) { - t.Errorf("expected %v, got %v", first, item) - } - - fakeClock.Step(2 * time.Second) - if err := waitForAdded(q, 1); err != nil { - t.Fatalf("unexpected err: %v", err) - } - item, _ = q.Get() - if !reflect.DeepEqual(item, third) { - t.Errorf("expected %v, got %v", third, item) - } -} - -func TestCopyShifting(t *testing.T) { - fakeClock := clock.NewFakeClock(time.Now()) - q := newDelayingQueue(fakeClock, "") - - first := "foo" - second := "bar" - third := "baz" - - q.AddAfter(first, 1*time.Second) - q.AddAfter(second, 500*time.Millisecond) - q.AddAfter(third, 250*time.Millisecond) - if err := waitForWaitingQueueToFill(q); err != nil { - t.Fatalf("unexpected err: %v", err) - } - - if q.Len() != 0 { - t.Errorf("should not have added") - } - - fakeClock.Step(2 * time.Second) - - if err := waitForAdded(q, 3); err != nil { - t.Fatalf("unexpected err: %v", err) - } - actualFirst, _ := q.Get() - if !reflect.DeepEqual(actualFirst, third) { - t.Errorf("expected %v, got %v", third, actualFirst) - } - actualSecond, _ := q.Get() - if !reflect.DeepEqual(actualSecond, second) { - t.Errorf("expected %v, got %v", second, actualSecond) - } - actualThird, _ := q.Get() - if !reflect.DeepEqual(actualThird, first) { - t.Errorf("expected %v, got %v", first, actualThird) - } -} - -func BenchmarkDelayingQueue_AddAfter(b *testing.B) { - r := rand.New(rand.NewSource(time.Now().Unix())) - - fakeClock := clock.NewFakeClock(time.Now()) - q := newDelayingQueue(fakeClock, "") - - // Add items - for n := 0; n < b.N; n++ { - data := fmt.Sprintf("%d", n) - q.AddAfter(data, time.Duration(r.Int63n(int64(10*time.Minute)))) - } - - // Exercise item removal as well - fakeClock.Step(11 * time.Minute) - for n := 0; n < b.N; n++ { - _, _ = q.Get() - } -} - -func waitForAdded(q DelayingInterface, depth int) error { - return wait.Poll(1*time.Millisecond, 10*time.Second, func() (done bool, err error) { - if q.Len() == depth { - return true, nil - } - - return false, nil - }) -} - -func waitForWaitingQueueToFill(q DelayingInterface) error { - return wait.Poll(1*time.Millisecond, 10*time.Second, func() (done bool, err error) { - if len(q.(*delayingType).waitingForAddCh) == 0 { - return true, nil - } - - return false, nil - }) -} diff --git a/vendor/k8s.io/client-go/util/workqueue/queue_test.go b/vendor/k8s.io/client-go/util/workqueue/queue_test.go deleted file mode 100644 index 131f4a2a..00000000 --- a/vendor/k8s.io/client-go/util/workqueue/queue_test.go +++ /dev/null @@ -1,161 +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 workqueue_test - -import ( - "sync" - "testing" - "time" - - "k8s.io/client-go/util/workqueue" -) - -func TestBasic(t *testing.T) { - // If something is seriously wrong this test will never complete. - q := workqueue.New() - - // Start producers - const producers = 50 - producerWG := sync.WaitGroup{} - producerWG.Add(producers) - for i := 0; i < producers; i++ { - go func(i int) { - defer producerWG.Done() - for j := 0; j < 50; j++ { - q.Add(i) - time.Sleep(time.Millisecond) - } - }(i) - } - - // Start consumers - const consumers = 10 - consumerWG := sync.WaitGroup{} - consumerWG.Add(consumers) - for i := 0; i < consumers; i++ { - go func(i int) { - defer consumerWG.Done() - for { - item, quit := q.Get() - if item == "added after shutdown!" { - t.Errorf("Got an item added after shutdown.") - } - if quit { - return - } - t.Logf("Worker %v: begin processing %v", i, item) - time.Sleep(3 * time.Millisecond) - t.Logf("Worker %v: done processing %v", i, item) - q.Done(item) - } - }(i) - } - - producerWG.Wait() - q.ShutDown() - q.Add("added after shutdown!") - consumerWG.Wait() -} - -func TestAddWhileProcessing(t *testing.T) { - q := workqueue.New() - - // Start producers - const producers = 50 - producerWG := sync.WaitGroup{} - producerWG.Add(producers) - for i := 0; i < producers; i++ { - go func(i int) { - defer producerWG.Done() - q.Add(i) - }(i) - } - - // Start consumers - const consumers = 10 - consumerWG := sync.WaitGroup{} - consumerWG.Add(consumers) - for i := 0; i < consumers; i++ { - go func(i int) { - defer consumerWG.Done() - // Every worker will re-add every item up to two times. - // This tests the dirty-while-processing case. - counters := map[interface{}]int{} - for { - item, quit := q.Get() - if quit { - return - } - counters[item]++ - if counters[item] < 2 { - q.Add(item) - } - q.Done(item) - } - }(i) - } - - producerWG.Wait() - q.ShutDown() - consumerWG.Wait() -} - -func TestLen(t *testing.T) { - q := workqueue.New() - q.Add("foo") - if e, a := 1, q.Len(); e != a { - t.Errorf("Expected %v, got %v", e, a) - } - q.Add("bar") - if e, a := 2, q.Len(); e != a { - t.Errorf("Expected %v, got %v", e, a) - } - q.Add("foo") // should not increase the queue length. - if e, a := 2, q.Len(); e != a { - t.Errorf("Expected %v, got %v", e, a) - } -} - -func TestReinsert(t *testing.T) { - q := workqueue.New() - q.Add("foo") - - // Start processing - i, _ := q.Get() - if i != "foo" { - t.Errorf("Expected %v, got %v", "foo", i) - } - - // Add it back while processing - q.Add(i) - - // Finish it up - q.Done(i) - - // It should be back on the queue - i, _ = q.Get() - if i != "foo" { - t.Errorf("Expected %v, got %v", "foo", i) - } - - // Finish that one up - q.Done(i) - - if a := q.Len(); a != 0 { - t.Errorf("Expected queue to be empty. Has %v items", a) - } -} diff --git a/vendor/k8s.io/client-go/util/workqueue/rate_limitting_queue_test.go b/vendor/k8s.io/client-go/util/workqueue/rate_limitting_queue_test.go deleted file mode 100644 index 3fbe07d0..00000000 --- a/vendor/k8s.io/client-go/util/workqueue/rate_limitting_queue_test.go +++ /dev/null @@ -1,75 +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 workqueue - -import ( - "testing" - "time" - - "k8s.io/apimachinery/pkg/util/clock" -) - -func TestRateLimitingQueue(t *testing.T) { - limiter := NewItemExponentialFailureRateLimiter(1*time.Millisecond, 1*time.Second) - queue := NewRateLimitingQueue(limiter).(*rateLimitingType) - fakeClock := clock.NewFakeClock(time.Now()) - delayingQueue := &delayingType{ - Interface: New(), - clock: fakeClock, - heartbeat: fakeClock.NewTicker(maxWait), - stopCh: make(chan struct{}), - waitingForAddCh: make(chan *waitFor, 1000), - metrics: newRetryMetrics(""), - } - queue.DelayingInterface = delayingQueue - - queue.AddRateLimited("one") - waitEntry := <-delayingQueue.waitingForAddCh - if e, a := 1*time.Millisecond, waitEntry.readyAt.Sub(fakeClock.Now()); e != a { - t.Errorf("expected %v, got %v", e, a) - } - queue.AddRateLimited("one") - waitEntry = <-delayingQueue.waitingForAddCh - if e, a := 2*time.Millisecond, waitEntry.readyAt.Sub(fakeClock.Now()); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := 2, queue.NumRequeues("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - - queue.AddRateLimited("two") - waitEntry = <-delayingQueue.waitingForAddCh - if e, a := 1*time.Millisecond, waitEntry.readyAt.Sub(fakeClock.Now()); e != a { - t.Errorf("expected %v, got %v", e, a) - } - queue.AddRateLimited("two") - waitEntry = <-delayingQueue.waitingForAddCh - if e, a := 2*time.Millisecond, waitEntry.readyAt.Sub(fakeClock.Now()); e != a { - t.Errorf("expected %v, got %v", e, a) - } - - queue.Forget("one") - if e, a := 0, queue.NumRequeues("one"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - queue.AddRateLimited("one") - waitEntry = <-delayingQueue.waitingForAddCh - if e, a := 1*time.Millisecond, waitEntry.readyAt.Sub(fakeClock.Now()); e != a { - t.Errorf("expected %v, got %v", e, a) - } - -} diff --git a/vendor/k8s.io/code-generator/.github/PULL_REQUEST_TEMPLATE.md b/vendor/k8s.io/code-generator/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..e559c074 --- /dev/null +++ b/vendor/k8s.io/code-generator/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,2 @@ +Sorry, we do not accept changes directly against this repository. Please see +CONTRIBUTING.md for information on where and how to contribute instead. diff --git a/vendor/k8s.io/code-generator/Godeps/Godeps.json b/vendor/k8s.io/code-generator/Godeps/Godeps.json new file mode 100644 index 00000000..3f265cb6 --- /dev/null +++ b/vendor/k8s.io/code-generator/Godeps/Godeps.json @@ -0,0 +1,270 @@ +{ + "ImportPath": "k8s.io/code-generator", + "GoVersion": "go1.9", + "GodepVersion": "v80", + "Packages": [ + "./..." + ], + "Deps": [ + { + "ImportPath": "github.com/PuerkitoBio/purell", + "Rev": "8a290539e2e8629dbc4e6bad948158f790ec31f4" + }, + { + "ImportPath": "github.com/PuerkitoBio/urlesc", + "Rev": "5bd2802263f21d8788851d5305584c82a5c75d7e" + }, + { + "ImportPath": "github.com/emicklei/go-restful", + "Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46" + }, + { + "ImportPath": "github.com/emicklei/go-restful/log", + "Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46" + }, + { + "ImportPath": "github.com/go-openapi/jsonpointer", + "Rev": "46af16f9f7b149af66e5d1bd010e3574dc06de98" + }, + { + "ImportPath": "github.com/go-openapi/jsonreference", + "Rev": "13c6e3589ad90f49bd3e3bbe2c2cb3d7a4142272" + }, + { + "ImportPath": "github.com/go-openapi/spec", + "Rev": "1de3e0542de65ad8d75452a595886fdd0befb363" + }, + { + "ImportPath": "github.com/go-openapi/swag", + "Rev": "f3f9494671f93fcff853e3c6e9e948b3eb71e590" + }, + { + "ImportPath": "github.com/gogo/protobuf/gogoproto", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/plugin/compare", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/plugin/defaultcheck", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/plugin/description", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/plugin/embedcheck", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/plugin/enumstringer", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/plugin/equal", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/plugin/face", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/plugin/gostring", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/plugin/marshalto", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/plugin/oneofcheck", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/plugin/populate", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/plugin/size", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/plugin/stringer", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/plugin/testgen", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/plugin/union", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/plugin/unmarshal", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/proto", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/protoc-gen-gogo/descriptor", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/protoc-gen-gogo/generator", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/protoc-gen-gogo/grpc", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/protoc-gen-gogo/plugin", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/sortkeys", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/vanity", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/gogo/protobuf/vanity/command", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, + { + "ImportPath": "github.com/golang/glog", + "Rev": "44145f04b68cf362d9c4df2182967c2275eaefed" + }, + { + "ImportPath": "github.com/mailru/easyjson/buffer", + "Rev": "2f5df55504ebc322e4d52d34df6a1f5b503bf26d" + }, + { + "ImportPath": "github.com/mailru/easyjson/jlexer", + "Rev": "2f5df55504ebc322e4d52d34df6a1f5b503bf26d" + }, + { + "ImportPath": "github.com/mailru/easyjson/jwriter", + "Rev": "2f5df55504ebc322e4d52d34df6a1f5b503bf26d" + }, + { + "ImportPath": "github.com/spf13/pflag", + "Rev": "583c0c0531f06d5278b7d917446061adc344b5cd" + }, + { + "ImportPath": "golang.org/x/net/idna", + "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" + }, + { + "ImportPath": "golang.org/x/text/cases", + "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" + }, + { + "ImportPath": "golang.org/x/text/internal", + "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" + }, + { + "ImportPath": "golang.org/x/text/internal/tag", + "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" + }, + { + "ImportPath": "golang.org/x/text/language", + "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" + }, + { + "ImportPath": "golang.org/x/text/runes", + "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" + }, + { + "ImportPath": "golang.org/x/text/secure/bidirule", + "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" + }, + { + "ImportPath": "golang.org/x/text/secure/precis", + "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" + }, + { + "ImportPath": "golang.org/x/text/transform", + "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" + }, + { + "ImportPath": "golang.org/x/text/unicode/bidi", + "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" + }, + { + "ImportPath": "golang.org/x/text/unicode/norm", + "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" + }, + { + "ImportPath": "golang.org/x/text/width", + "Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01" + }, + { + "ImportPath": "golang.org/x/tools/go/ast/astutil", + "Rev": "2382e3994d48b1d22acc2c86bcad0a2aff028e32" + }, + { + "ImportPath": "golang.org/x/tools/imports", + "Rev": "2382e3994d48b1d22acc2c86bcad0a2aff028e32" + }, + { + "ImportPath": "gopkg.in/yaml.v2", + "Rev": "670d4cfef0544295bc27a114dbac37980d83185a" + }, + { + "ImportPath": "k8s.io/gengo/args", + "Rev": "01a732e01d00cb9a81bb0ca050d3e6d2b947927b" + }, + { + "ImportPath": "k8s.io/gengo/examples/deepcopy-gen/generators", + "Rev": "01a732e01d00cb9a81bb0ca050d3e6d2b947927b" + }, + { + "ImportPath": "k8s.io/gengo/examples/defaulter-gen/generators", + "Rev": "01a732e01d00cb9a81bb0ca050d3e6d2b947927b" + }, + { + "ImportPath": "k8s.io/gengo/examples/import-boss/generators", + "Rev": "01a732e01d00cb9a81bb0ca050d3e6d2b947927b" + }, + { + "ImportPath": "k8s.io/gengo/examples/set-gen/generators", + "Rev": "01a732e01d00cb9a81bb0ca050d3e6d2b947927b" + }, + { + "ImportPath": "k8s.io/gengo/examples/set-gen/sets", + "Rev": "01a732e01d00cb9a81bb0ca050d3e6d2b947927b" + }, + { + "ImportPath": "k8s.io/gengo/generator", + "Rev": "01a732e01d00cb9a81bb0ca050d3e6d2b947927b" + }, + { + "ImportPath": "k8s.io/gengo/namer", + "Rev": "01a732e01d00cb9a81bb0ca050d3e6d2b947927b" + }, + { + "ImportPath": "k8s.io/gengo/parser", + "Rev": "01a732e01d00cb9a81bb0ca050d3e6d2b947927b" + }, + { + "ImportPath": "k8s.io/gengo/types", + "Rev": "01a732e01d00cb9a81bb0ca050d3e6d2b947927b" + }, + { + "ImportPath": "k8s.io/kube-openapi/pkg/common", + "Rev": "91cfa479c814065e420cee7ed227db0f63a5854e" + }, + { + "ImportPath": "k8s.io/kube-openapi/pkg/generators", + "Rev": "91cfa479c814065e420cee7ed227db0f63a5854e" + } + ] +} diff --git a/vendor/k8s.io/code-generator/Godeps/OWNERS b/vendor/k8s.io/code-generator/Godeps/OWNERS new file mode 100644 index 00000000..3d49f306 --- /dev/null +++ b/vendor/k8s.io/code-generator/Godeps/OWNERS @@ -0,0 +1,2 @@ +approvers: +- dep-approvers diff --git a/vendor/k8s.io/code-generator/Godeps/Readme b/vendor/k8s.io/code-generator/Godeps/Readme new file mode 100644 index 00000000..4cdaa53d --- /dev/null +++ b/vendor/k8s.io/code-generator/Godeps/Readme @@ -0,0 +1,5 @@ +This directory tree is generated automatically by godep. + +Please do not edit. + +See https://github.com/tools/godep for more information. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/doc.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/doc.go similarity index 64% rename from vendor/k8s.io/kubernetes/pkg/kubelet/doc.go rename to vendor/k8s.io/code-generator/_examples/apiserver/apis/example/doc.go index ce5bb18b..b221d7eb 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/doc.go +++ b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors. +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. @@ -14,6 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package kubelet is the package that contains the libraries that drive the Kubelet binary. -// The kubelet is responsible for node level pod management. It runs on each worker in the cluster. -package kubelet // import "k8s.io/kubernetes/pkg/kubelet" +// +k8s:deepcopy-gen=package +// +groupName=example.apiserver.code-generator.k8s.io +package example // import "k8s.io/code-generator/_examples/apiserver/apis/example" diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/install/install.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/install/install.go new file mode 100644 index 00000000..d056c5b7 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/install/install.go @@ -0,0 +1,33 @@ +/* +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 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/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(scheme *runtime.Scheme) { + utilruntime.Must(example.AddToScheme(scheme)) + utilruntime.Must(v1.AddToScheme(scheme)) + utilruntime.Must(scheme.SetVersionPriority(v1.SchemeGroupVersion)) +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/register.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/register.go new file mode 100644 index 00000000..da397b52 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/register.go @@ -0,0 +1,45 @@ +/* +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 example + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +var SchemeGroupVersion = schema.GroupVersion{Group: "example.api.code-generator.k8s.io", Version: runtime.APIVersionInternal} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &TestType{}, + &TestTypeList{}, + ) + + scheme.AddKnownTypes(SchemeGroupVersion) + return nil +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/types.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/types.go new file mode 100644 index 00000000..b4fc9766 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/types.go @@ -0,0 +1,44 @@ +/* +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 example + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// TestType is a top-level type. A client is created for it. +type TestType struct { + metav1.TypeMeta + metav1.ObjectMeta + Status TestTypeStatus +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// TestTypeList is a top-level list type. The client methods for lists are automatically created. +// You are not supposed to create a separated client for this one. +type TestTypeList struct { + metav1.TypeMeta + metav1.ListMeta + + Items []TestType +} + +type TestTypeStatus struct { + Blah string +} diff --git a/vendor/k8s.io/client-go/plugin/pkg/client/auth/plugins.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/doc.go similarity index 67% rename from vendor/k8s.io/client-go/plugin/pkg/client/auth/plugins.go rename to vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/doc.go index 42085d7a..5b6bd5b3 100644 --- a/vendor/k8s.io/client-go/plugin/pkg/client/auth/plugins.go +++ b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/doc.go @@ -14,12 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -package auth - -import ( - // Initialize all known client auth plugins. - _ "k8s.io/client-go/plugin/pkg/client/auth/azure" - _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" - _ "k8s.io/client-go/plugin/pkg/client/auth/oidc" - _ "k8s.io/client-go/plugin/pkg/client/auth/openstack" -) +// +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/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/register.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/register.go new file mode 100644 index 00000000..c99619d7 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/register.go @@ -0,0 +1,59 @@ +/* +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 v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +var SchemeGroupVersion = schema.GroupVersion{Group: "example.apiserver.code-generator.k8s.io", Version: "v1"} + +var ( + // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. + // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. + 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) +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &TestType{}, + &TestTypeList{}, + ) + + scheme.AddKnownTypes(SchemeGroupVersion, + &metav1.Status{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/types.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/types.go new file mode 100644 index 00000000..5c2ebc4d --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/types.go @@ -0,0 +1,47 @@ +/* +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 v1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// TestType is a top-level type. A client is created for it. +type TestType struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + // +optional + Status TestTypeStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// TestTypeList is a top-level list type. The client methods for lists are automatically created. +// You are not supposed to create a separated client for this one. +type TestTypeList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + Items []TestType `json:"items"` +} + +type TestTypeStatus struct { + Blah string +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.conversion.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.conversion.go new file mode 100644 index 00000000..81103168 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.conversion.go @@ -0,0 +1,114 @@ +// +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" + + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + example "k8s.io/code-generator/_examples/apiserver/apis/example" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// 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 autoConvert_v1_TestType_To_example_TestType(in *TestType, out *example.TestType, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_TestTypeStatus_To_example_TestTypeStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_TestType_To_example_TestType is an autogenerated conversion function. +func Convert_v1_TestType_To_example_TestType(in *TestType, out *example.TestType, s conversion.Scope) error { + return autoConvert_v1_TestType_To_example_TestType(in, out, s) +} + +func autoConvert_example_TestType_To_v1_TestType(in *example.TestType, out *TestType, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_example_TestTypeStatus_To_v1_TestTypeStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_example_TestType_To_v1_TestType is an autogenerated conversion function. +func Convert_example_TestType_To_v1_TestType(in *example.TestType, out *TestType, s conversion.Scope) error { + return autoConvert_example_TestType_To_v1_TestType(in, out, s) +} + +func autoConvert_v1_TestTypeList_To_example_TestTypeList(in *TestTypeList, out *example.TestTypeList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]example.TestType)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_TestTypeList_To_example_TestTypeList is an autogenerated conversion function. +func Convert_v1_TestTypeList_To_example_TestTypeList(in *TestTypeList, out *example.TestTypeList, s conversion.Scope) error { + return autoConvert_v1_TestTypeList_To_example_TestTypeList(in, out, s) +} + +func autoConvert_example_TestTypeList_To_v1_TestTypeList(in *example.TestTypeList, out *TestTypeList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]TestType)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_example_TestTypeList_To_v1_TestTypeList is an autogenerated conversion function. +func Convert_example_TestTypeList_To_v1_TestTypeList(in *example.TestTypeList, out *TestTypeList, s conversion.Scope) error { + return autoConvert_example_TestTypeList_To_v1_TestTypeList(in, out, s) +} + +func autoConvert_v1_TestTypeStatus_To_example_TestTypeStatus(in *TestTypeStatus, out *example.TestTypeStatus, s conversion.Scope) error { + out.Blah = in.Blah + return nil +} + +// Convert_v1_TestTypeStatus_To_example_TestTypeStatus is an autogenerated conversion function. +func Convert_v1_TestTypeStatus_To_example_TestTypeStatus(in *TestTypeStatus, out *example.TestTypeStatus, s conversion.Scope) error { + return autoConvert_v1_TestTypeStatus_To_example_TestTypeStatus(in, out, s) +} + +func autoConvert_example_TestTypeStatus_To_v1_TestTypeStatus(in *example.TestTypeStatus, out *TestTypeStatus, s conversion.Scope) error { + out.Blah = in.Blah + return nil +} + +// Convert_example_TestTypeStatus_To_v1_TestTypeStatus is an autogenerated conversion function. +func Convert_example_TestTypeStatus_To_v1_TestTypeStatus(in *example.TestTypeStatus, out *TestTypeStatus, s conversion.Scope) error { + return autoConvert_example_TestTypeStatus_To_v1_TestTypeStatus(in, out, s) +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.deepcopy.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.deepcopy.go new file mode 100644 index 00000000..dae52ff1 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.deepcopy.go @@ -0,0 +1,101 @@ +// +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 ( + 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 *TestType) DeepCopyInto(out *TestType) { + *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 TestType. +func (in *TestType) DeepCopy() *TestType { + if in == nil { + return nil + } + out := new(TestType) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestType) 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 *TestTypeList) DeepCopyInto(out *TestTypeList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TestType, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTypeList. +func (in *TestTypeList) DeepCopy() *TestTypeList { + if in == nil { + return nil + } + out := new(TestTypeList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestTypeList) 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 *TestTypeStatus) DeepCopyInto(out *TestTypeStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTypeStatus. +func (in *TestTypeStatus) DeepCopy() *TestTypeStatus { + if in == nil { + return nil + } + out := new(TestTypeStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.defaults.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.defaults.go new file mode 100644 index 00000000..cce2e603 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/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/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/zz_generated.deepcopy.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/zz_generated.deepcopy.go new file mode 100644 index 00000000..980112fa --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example/zz_generated.deepcopy.go @@ -0,0 +1,101 @@ +// +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 example + +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 *TestType) DeepCopyInto(out *TestType) { + *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 TestType. +func (in *TestType) DeepCopy() *TestType { + if in == nil { + return nil + } + out := new(TestType) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestType) 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 *TestTypeList) DeepCopyInto(out *TestTypeList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TestType, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTypeList. +func (in *TestTypeList) DeepCopy() *TestTypeList { + if in == nil { + return nil + } + out := new(TestTypeList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestTypeList) 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 *TestTypeStatus) DeepCopyInto(out *TestTypeStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTypeStatus. +func (in *TestTypeStatus) DeepCopy() *TestTypeStatus { + if in == nil { + return nil + } + out := new(TestTypeStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/gengo/args/args_test.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/doc.go similarity index 61% rename from vendor/k8s.io/gengo/args/args_test.go rename to vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/doc.go index 3e85447f..38648037 100644 --- a/vendor/k8s.io/gengo/args/args_test.go +++ b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/doc.go @@ -14,22 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package args - -import ( - "testing" - - "k8s.io/gengo/types" -) - -func TestInputIncludes(t *testing.T) { - a := &GeneratorArgs{ - InputDirs: []string{"a/b/..."}, - } - if !a.InputIncludes(&types.Package{Path: "a/b/c"}) { - t.Errorf("Expected /... syntax to work") - } - if a.InputIncludes(&types.Package{Path: "a/c/b"}) { - t.Errorf("Expected correctness") - } -} +// +k8s:deepcopy-gen=package +// +groupName=example.test.apiserver.code-generator.k8s.io +// +groupGoName=SecondExample +package example2 // import "k8s.io/code-generator/_examples/apiserver/apis/example2" diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/install/install.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/install/install.go new file mode 100644 index 00000000..1e786f5c --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/install/install.go @@ -0,0 +1,33 @@ +/* +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 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/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(scheme *runtime.Scheme) { + utilruntime.Must(example2.AddToScheme(scheme)) + utilruntime.Must(v1.AddToScheme(scheme)) + utilruntime.Must(scheme.SetVersionPriority(v1.SchemeGroupVersion)) +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/register.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/register.go new file mode 100644 index 00000000..508565af --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/register.go @@ -0,0 +1,45 @@ +/* +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 example2 + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +var SchemeGroupVersion = schema.GroupVersion{Group: "example.test.apiserver.code-generator.k8s.io", Version: runtime.APIVersionInternal} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &TestType{}, + &TestTypeList{}, + ) + + scheme.AddKnownTypes(SchemeGroupVersion) + return nil +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/types.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/types.go new file mode 100644 index 00000000..10219129 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/types.go @@ -0,0 +1,44 @@ +/* +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 example2 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// TestType is a top-level type. A client is created for it. +type TestType struct { + metav1.TypeMeta + metav1.ObjectMeta + Status TestTypeStatus +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// TestTypeList is a top-level list type. The client methods for lists are automatically created. +// You are not supposed to create a separated client for this one. +type TestTypeList struct { + metav1.TypeMeta + metav1.ListMeta + + Items []TestType +} + +type TestTypeStatus struct { + Blah string +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/doc.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/doc.go new file mode 100644 index 00000000..36bd4549 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/doc.go @@ -0,0 +1,22 @@ +/* +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. +*/ + +// +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 +package v1 diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/register.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/register.go new file mode 100644 index 00000000..19dd0c35 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/register.go @@ -0,0 +1,59 @@ +/* +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 v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +var SchemeGroupVersion = schema.GroupVersion{Group: "example.test.apiserver.code-generator.k8s.io", Version: "v1"} + +var ( + // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. + // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. + 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) +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &TestType{}, + &TestTypeList{}, + ) + + scheme.AddKnownTypes(SchemeGroupVersion, + &metav1.Status{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/types.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/types.go new file mode 100644 index 00000000..5c2ebc4d --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/types.go @@ -0,0 +1,47 @@ +/* +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 v1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// TestType is a top-level type. A client is created for it. +type TestType struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + // +optional + Status TestTypeStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// TestTypeList is a top-level list type. The client methods for lists are automatically created. +// You are not supposed to create a separated client for this one. +type TestTypeList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + Items []TestType `json:"items"` +} + +type TestTypeStatus struct { + Blah string +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.conversion.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.conversion.go new file mode 100644 index 00000000..88bf603d --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.conversion.go @@ -0,0 +1,114 @@ +// +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" + + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + example2 "k8s.io/code-generator/_examples/apiserver/apis/example2" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// 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 autoConvert_v1_TestType_To_example2_TestType(in *TestType, out *example2.TestType, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_TestTypeStatus_To_example2_TestTypeStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_TestType_To_example2_TestType is an autogenerated conversion function. +func Convert_v1_TestType_To_example2_TestType(in *TestType, out *example2.TestType, s conversion.Scope) error { + return autoConvert_v1_TestType_To_example2_TestType(in, out, s) +} + +func autoConvert_example2_TestType_To_v1_TestType(in *example2.TestType, out *TestType, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_example2_TestTypeStatus_To_v1_TestTypeStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_example2_TestType_To_v1_TestType is an autogenerated conversion function. +func Convert_example2_TestType_To_v1_TestType(in *example2.TestType, out *TestType, s conversion.Scope) error { + return autoConvert_example2_TestType_To_v1_TestType(in, out, s) +} + +func autoConvert_v1_TestTypeList_To_example2_TestTypeList(in *TestTypeList, out *example2.TestTypeList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]example2.TestType)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_TestTypeList_To_example2_TestTypeList is an autogenerated conversion function. +func Convert_v1_TestTypeList_To_example2_TestTypeList(in *TestTypeList, out *example2.TestTypeList, s conversion.Scope) error { + return autoConvert_v1_TestTypeList_To_example2_TestTypeList(in, out, s) +} + +func autoConvert_example2_TestTypeList_To_v1_TestTypeList(in *example2.TestTypeList, out *TestTypeList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]TestType)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_example2_TestTypeList_To_v1_TestTypeList is an autogenerated conversion function. +func Convert_example2_TestTypeList_To_v1_TestTypeList(in *example2.TestTypeList, out *TestTypeList, s conversion.Scope) error { + return autoConvert_example2_TestTypeList_To_v1_TestTypeList(in, out, s) +} + +func autoConvert_v1_TestTypeStatus_To_example2_TestTypeStatus(in *TestTypeStatus, out *example2.TestTypeStatus, s conversion.Scope) error { + out.Blah = in.Blah + return nil +} + +// Convert_v1_TestTypeStatus_To_example2_TestTypeStatus is an autogenerated conversion function. +func Convert_v1_TestTypeStatus_To_example2_TestTypeStatus(in *TestTypeStatus, out *example2.TestTypeStatus, s conversion.Scope) error { + return autoConvert_v1_TestTypeStatus_To_example2_TestTypeStatus(in, out, s) +} + +func autoConvert_example2_TestTypeStatus_To_v1_TestTypeStatus(in *example2.TestTypeStatus, out *TestTypeStatus, s conversion.Scope) error { + out.Blah = in.Blah + return nil +} + +// Convert_example2_TestTypeStatus_To_v1_TestTypeStatus is an autogenerated conversion function. +func Convert_example2_TestTypeStatus_To_v1_TestTypeStatus(in *example2.TestTypeStatus, out *TestTypeStatus, s conversion.Scope) error { + return autoConvert_example2_TestTypeStatus_To_v1_TestTypeStatus(in, out, s) +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.deepcopy.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.deepcopy.go new file mode 100644 index 00000000..dae52ff1 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.deepcopy.go @@ -0,0 +1,101 @@ +// +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 ( + 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 *TestType) DeepCopyInto(out *TestType) { + *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 TestType. +func (in *TestType) DeepCopy() *TestType { + if in == nil { + return nil + } + out := new(TestType) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestType) 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 *TestTypeList) DeepCopyInto(out *TestTypeList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TestType, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTypeList. +func (in *TestTypeList) DeepCopy() *TestTypeList { + if in == nil { + return nil + } + out := new(TestTypeList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestTypeList) 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 *TestTypeStatus) DeepCopyInto(out *TestTypeStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTypeStatus. +func (in *TestTypeStatus) DeepCopy() *TestTypeStatus { + if in == nil { + return nil + } + out := new(TestTypeStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.defaults.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.defaults.go new file mode 100644 index 00000000..cce2e603 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/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/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/zz_generated.deepcopy.go b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/zz_generated.deepcopy.go new file mode 100644 index 00000000..f9b317e5 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/apis/example2/zz_generated.deepcopy.go @@ -0,0 +1,101 @@ +// +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 example2 + +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 *TestType) DeepCopyInto(out *TestType) { + *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 TestType. +func (in *TestType) DeepCopy() *TestType { + if in == nil { + return nil + } + out := new(TestType) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestType) 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 *TestTypeList) DeepCopyInto(out *TestTypeList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TestType, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTypeList. +func (in *TestTypeList) DeepCopy() *TestTypeList { + if in == nil { + return nil + } + out := new(TestTypeList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestTypeList) 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 *TestTypeStatus) DeepCopyInto(out *TestTypeStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTypeStatus. +func (in *TestTypeStatus) DeepCopy() *TestTypeStatus { + if in == nil { + return nil + } + out := new(TestTypeStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/clientset.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/clientset.go new file mode 100644 index 00000000..ff88d121 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/clientset.go @@ -0,0 +1,104 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 internalversion + +import ( + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" + exampleinternalversion "k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion" + secondexampleinternalversion "k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + Example() exampleinternalversion.ExampleInterface + SecondExample() secondexampleinternalversion.SecondExampleInterface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + example *exampleinternalversion.ExampleClient + secondExample *secondexampleinternalversion.SecondExampleClient +} + +// Example retrieves the ExampleClient +func (c *Clientset) Example() exampleinternalversion.ExampleInterface { + return c.example +} + +// SecondExample retrieves the SecondExampleClient +func (c *Clientset) SecondExample() secondexampleinternalversion.SecondExampleInterface { + return c.secondExample +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.example, err = exampleinternalversion.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.secondExample, err = secondexampleinternalversion.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.example = exampleinternalversion.NewForConfigOrDie(c) + cs.secondExample = secondexampleinternalversion.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.example = exampleinternalversion.New(c) + cs.secondExample = secondexampleinternalversion.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/doc.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/doc.go new file mode 100644 index 00000000..6c970b09 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/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 clientset. +package internalversion diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/clientset_generated.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/clientset_generated.go new file mode 100644 index 00000000..37f1b724 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/clientset_generated.go @@ -0,0 +1,84 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/discovery" + fakediscovery "k8s.io/client-go/discovery/fake" + "k8s.io/client-go/testing" + clientset "k8s.io/code-generator/_examples/apiserver/clientset/internalversion" + exampleinternalversion "k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion" + fakeexampleinternalversion "k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake" + secondexampleinternalversion "k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion" + fakesecondexampleinternalversion "k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + 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 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 Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +var _ clientset.Interface = &Clientset{} + +// Example retrieves the ExampleClient +func (c *Clientset) Example() exampleinternalversion.ExampleInterface { + return &fakeexampleinternalversion.FakeExample{Fake: &c.Fake} +} + +// SecondExample retrieves the SecondExampleClient +func (c *Clientset) SecondExample() secondexampleinternalversion.SecondExampleInterface { + return &fakesecondexampleinternalversion.FakeSecondExample{Fake: &c.Fake} +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/doc.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/doc.go new file mode 100644 index 00000000..9b99e716 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/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. + +// This package has the automatically generated fake clientset. +package fake diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/register.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/register.go new file mode 100644 index 00000000..58b47c9f --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/register.go @@ -0,0 +1,56 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + exampleinternalversion "k8s.io/code-generator/_examples/apiserver/apis/example" + secondexampleinternalversion "k8s.io/code-generator/_examples/apiserver/apis/example2" +) + +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) +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// 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) +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/scheme/doc.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/scheme/doc.go new file mode 100644 index 00000000..7dc37561 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/scheme/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 contains the scheme of the automatically generated clientset. +package scheme diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/scheme/register.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/scheme/register.go new file mode 100644 index 00000000..97b03068 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/scheme/register.go @@ -0,0 +1,43 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 scheme + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + example "k8s.io/code-generator/_examples/apiserver/apis/example/install" + secondexample "k8s.io/code-generator/_examples/apiserver/apis/example2/install" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + Install(Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(scheme *runtime.Scheme) { + example.Install(scheme) + secondexample.Install(scheme) +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/doc.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/doc.go new file mode 100644 index 00000000..86602442 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/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 internalversion diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/example_client.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/example_client.go new file mode 100644 index 00000000..61d99cad --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/example_client.go @@ -0,0 +1,96 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 internalversion + +import ( + rest "k8s.io/client-go/rest" + "k8s.io/code-generator/_examples/apiserver/clientset/internalversion/scheme" +) + +type ExampleInterface interface { + RESTClient() rest.Interface + TestTypesGetter +} + +// ExampleClient is used to interact with features provided by the example.apiserver.code-generator.k8s.io group. +type ExampleClient struct { + restClient rest.Interface +} + +func (c *ExampleClient) TestTypes(namespace string) TestTypeInterface { + return newTestTypes(c, namespace) +} + +// NewForConfig creates a new ExampleClient for the given config. +func NewForConfig(c *rest.Config) (*ExampleClient, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &ExampleClient{client}, nil +} + +// NewForConfigOrDie creates a new ExampleClient for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *ExampleClient { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new ExampleClient for the given RESTClient. +func New(c rest.Interface) *ExampleClient { + return &ExampleClient{c} +} + +func setConfigDefaults(config *rest.Config) error { + config.APIPath = "/apis" + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + 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 + + if config.QPS == 0 { + config.QPS = 5 + } + if config.Burst == 0 { + config.Burst = 10 + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *ExampleClient) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/doc.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/doc.go new file mode 100644 index 00000000..16f44399 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/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/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/fake_example_client.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/fake_example_client.go new file mode 100644 index 00000000..90564e44 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/fake_example_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 ( + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" + internalversion "k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion" +) + +type FakeExample struct { + *testing.Fake +} + +func (c *FakeExample) TestTypes(namespace string) internalversion.TestTypeInterface { + return &FakeTestTypes{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeExample) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/fake_testtype.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/fake_testtype.go new file mode 100644 index 00000000..7b247ca9 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/fake_testtype.go @@ -0,0 +1,140 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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" + example "k8s.io/code-generator/_examples/apiserver/apis/example" +) + +// FakeTestTypes implements TestTypeInterface +type FakeTestTypes struct { + Fake *FakeExample + ns string +} + +var testtypesResource = schema.GroupVersionResource{Group: "example.apiserver.code-generator.k8s.io", Version: "", Resource: "testtypes"} + +var testtypesKind = schema.GroupVersionKind{Group: "example.apiserver.code-generator.k8s.io", Version: "", 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.TestType, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(testtypesResource, c.ns, name), &example.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example.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.TestTypeList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(testtypesResource, testtypesKind, c.ns, opts), &example.TestTypeList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + 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) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested testTypes. +func (c *FakeTestTypes) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(testtypesResource, c.ns, opts)) + +} + +// 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.TestType) (result *example.TestType, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &example.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example.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.TestType) (result *example.TestType, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &example.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example.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.TestType) (*example.TestType, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &example.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example.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.TestType{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeTestTypes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(testtypesResource, c.ns, listOptions) + + _, err := c.Fake.Invokes(action, &example.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.TestType, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, data, subresources...), &example.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example.TestType), err +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/roundtrip_test.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/generated_expansion.go similarity index 68% rename from vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/roundtrip_test.go rename to vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/generated_expansion.go index 725aa316..50bdbd25 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/roundtrip_test.go +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/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,15 +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 ( - "testing" - - "k8s.io/apimachinery/pkg/api/testing/roundtrip" - "k8s.io/apimachinery/pkg/apis/meta/fuzzer" -) - -func TestRoundTrip(t *testing.T) { - roundtrip.RoundTripTestForScheme(t, scheme, fuzzer.Funcs) -} +type TestTypeExpansion interface{} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/testtype.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/testtype.go new file mode 100644 index 00000000..d19392e8 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/testtype.go @@ -0,0 +1,174 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 internalversion + +import ( + v1 "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" + example "k8s.io/code-generator/_examples/apiserver/apis/example" + scheme "k8s.io/code-generator/_examples/apiserver/clientset/internalversion/scheme" +) + +// TestTypesGetter has a method to return a TestTypeInterface. +// A group's client should implement this interface. +type TestTypesGetter interface { + TestTypes(namespace string) TestTypeInterface +} + +// TestTypeInterface has methods to work with TestType resources. +type TestTypeInterface interface { + Create(*example.TestType) (*example.TestType, error) + Update(*example.TestType) (*example.TestType, error) + UpdateStatus(*example.TestType) (*example.TestType, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*example.TestType, error) + List(opts v1.ListOptions) (*example.TestTypeList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *example.TestType, err error) + TestTypeExpansion +} + +// testTypes implements TestTypeInterface +type testTypes struct { + client rest.Interface + ns string +} + +// newTestTypes returns a TestTypes +func newTestTypes(c *ExampleClient, namespace string) *testTypes { + return &testTypes{ + client: c.RESTClient(), + ns: namespace, + } +} + +// 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 v1.GetOptions) (result *example.TestType, err error) { + result = &example.TestType{} + err = c.client.Get(). + Namespace(c.ns). + Resource("testtypes"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of TestTypes that match those selectors. +func (c *testTypes) List(opts v1.ListOptions) (result *example.TestTypeList, err error) { + result = &example.TestTypeList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested testTypes. +func (c *testTypes) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// 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 *testTypes) Create(testType *example.TestType) (result *example.TestType, err error) { + result = &example.TestType{} + err = c.client.Post(). + Namespace(c.ns). + Resource("testtypes"). + Body(testType). + Do(). + Into(result) + return +} + +// 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 *testTypes) Update(testType *example.TestType) (result *example.TestType, err error) { + result = &example.TestType{} + err = c.client.Put(). + Namespace(c.ns). + Resource("testtypes"). + Name(testType.Name). + Body(testType). + 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 *testTypes) UpdateStatus(testType *example.TestType) (result *example.TestType, err error) { + result = &example.TestType{} + err = c.client.Put(). + Namespace(c.ns). + Resource("testtypes"). + Name(testType.Name). + SubResource("status"). + Body(testType). + Do(). + Into(result) + return +} + +// Delete takes name of the testType and deletes it. Returns an error if one occurs. +func (c *testTypes) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("testtypes"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *testTypes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("testtypes"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched testType. +func (c *testTypes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *example.TestType, err error) { + result = &example.TestType{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("testtypes"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/doc.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/doc.go new file mode 100644 index 00000000..86602442 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/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 internalversion diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/example2_client.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/example2_client.go new file mode 100644 index 00000000..0fcc7baa --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/example2_client.go @@ -0,0 +1,96 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 internalversion + +import ( + rest "k8s.io/client-go/rest" + "k8s.io/code-generator/_examples/apiserver/clientset/internalversion/scheme" +) + +type SecondExampleInterface interface { + RESTClient() rest.Interface + TestTypesGetter +} + +// SecondExampleClient is used to interact with features provided by the example.test.apiserver.code-generator.k8s.io group. +type SecondExampleClient struct { + restClient rest.Interface +} + +func (c *SecondExampleClient) TestTypes(namespace string) TestTypeInterface { + return newTestTypes(c, namespace) +} + +// NewForConfig creates a new SecondExampleClient for the given config. +func NewForConfig(c *rest.Config) (*SecondExampleClient, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &SecondExampleClient{client}, nil +} + +// NewForConfigOrDie creates a new SecondExampleClient for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *SecondExampleClient { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new SecondExampleClient for the given RESTClient. +func New(c rest.Interface) *SecondExampleClient { + return &SecondExampleClient{c} +} + +func setConfigDefaults(config *rest.Config) error { + config.APIPath = "/apis" + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + 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 + + if config.QPS == 0 { + config.QPS = 5 + } + if config.Burst == 0 { + config.Burst = 10 + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *SecondExampleClient) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/doc.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/doc.go new file mode 100644 index 00000000..16f44399 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/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/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/fake_example2_client.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/fake_example2_client.go new file mode 100644 index 00000000..235305e9 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/fake_example2_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 ( + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" + internalversion "k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion" +) + +type FakeSecondExample struct { + *testing.Fake +} + +func (c *FakeSecondExample) TestTypes(namespace string) internalversion.TestTypeInterface { + return &FakeTestTypes{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeSecondExample) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/fake_testtype.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/fake_testtype.go new file mode 100644 index 00000000..2890ff19 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/fake_testtype.go @@ -0,0 +1,140 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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" + example2 "k8s.io/code-generator/_examples/apiserver/apis/example2" +) + +// FakeTestTypes implements TestTypeInterface +type FakeTestTypes struct { + Fake *FakeSecondExample + ns string +} + +var testtypesResource = schema.GroupVersionResource{Group: "example.test.apiserver.code-generator.k8s.io", Version: "", Resource: "testtypes"} + +var testtypesKind = schema.GroupVersionKind{Group: "example.test.apiserver.code-generator.k8s.io", Version: "", 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.TestType, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(testtypesResource, c.ns, name), &example2.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example2.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.TestTypeList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(testtypesResource, testtypesKind, c.ns, opts), &example2.TestTypeList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + 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) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested testTypes. +func (c *FakeTestTypes) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(testtypesResource, c.ns, opts)) + +} + +// 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.TestType) (result *example2.TestType, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &example2.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example2.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.TestType) (result *example2.TestType, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &example2.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example2.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.TestType) (*example2.TestType, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &example2.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example2.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.TestType{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeTestTypes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(testtypesResource, c.ns, listOptions) + + _, err := c.Fake.Invokes(action, &example2.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.TestType, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, data, subresources...), &example2.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example2.TestType), err +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/generated_expansion.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/generated_expansion.go new file mode 100644 index 00000000..50bdbd25 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/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 internalversion + +type TestTypeExpansion interface{} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/testtype.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/testtype.go new file mode 100644 index 00000000..1a2ca789 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/testtype.go @@ -0,0 +1,174 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 internalversion + +import ( + v1 "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" + example2 "k8s.io/code-generator/_examples/apiserver/apis/example2" + scheme "k8s.io/code-generator/_examples/apiserver/clientset/internalversion/scheme" +) + +// TestTypesGetter has a method to return a TestTypeInterface. +// A group's client should implement this interface. +type TestTypesGetter interface { + TestTypes(namespace string) TestTypeInterface +} + +// TestTypeInterface has methods to work with TestType resources. +type TestTypeInterface interface { + Create(*example2.TestType) (*example2.TestType, error) + Update(*example2.TestType) (*example2.TestType, error) + UpdateStatus(*example2.TestType) (*example2.TestType, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*example2.TestType, error) + List(opts v1.ListOptions) (*example2.TestTypeList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *example2.TestType, err error) + TestTypeExpansion +} + +// testTypes implements TestTypeInterface +type testTypes struct { + client rest.Interface + ns string +} + +// newTestTypes returns a TestTypes +func newTestTypes(c *SecondExampleClient, namespace string) *testTypes { + return &testTypes{ + client: c.RESTClient(), + ns: namespace, + } +} + +// 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 v1.GetOptions) (result *example2.TestType, err error) { + result = &example2.TestType{} + err = c.client.Get(). + Namespace(c.ns). + Resource("testtypes"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of TestTypes that match those selectors. +func (c *testTypes) List(opts v1.ListOptions) (result *example2.TestTypeList, err error) { + result = &example2.TestTypeList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested testTypes. +func (c *testTypes) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// 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 *testTypes) Create(testType *example2.TestType) (result *example2.TestType, err error) { + result = &example2.TestType{} + err = c.client.Post(). + Namespace(c.ns). + Resource("testtypes"). + Body(testType). + Do(). + Into(result) + return +} + +// 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 *testTypes) Update(testType *example2.TestType) (result *example2.TestType, err error) { + result = &example2.TestType{} + err = c.client.Put(). + Namespace(c.ns). + Resource("testtypes"). + Name(testType.Name). + Body(testType). + 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 *testTypes) UpdateStatus(testType *example2.TestType) (result *example2.TestType, err error) { + result = &example2.TestType{} + err = c.client.Put(). + Namespace(c.ns). + Resource("testtypes"). + Name(testType.Name). + SubResource("status"). + Body(testType). + Do(). + Into(result) + return +} + +// Delete takes name of the testType and deletes it. Returns an error if one occurs. +func (c *testTypes) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("testtypes"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *testTypes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("testtypes"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched testType. +func (c *testTypes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *example2.TestType, err error) { + result = &example2.TestType{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("testtypes"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/clientset.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/clientset.go new file mode 100644 index 00000000..8ba9799f --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/clientset.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 versioned + +import ( + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" + examplev1 "k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1" + secondexamplev1 "k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + ExampleV1() examplev1.ExampleV1Interface + // Deprecated: please explicitly pick a version if possible. + Example() examplev1.ExampleV1Interface + SecondExampleV1() secondexamplev1.SecondExampleV1Interface + // Deprecated: please explicitly pick a version if possible. + SecondExample() secondexamplev1.SecondExampleV1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + exampleV1 *examplev1.ExampleV1Client + secondExampleV1 *secondexamplev1.SecondExampleV1Client +} + +// ExampleV1 retrieves the ExampleV1Client +func (c *Clientset) ExampleV1() examplev1.ExampleV1Interface { + return c.exampleV1 +} + +// Deprecated: Example retrieves the default version of ExampleClient. +// Please explicitly pick a version. +func (c *Clientset) Example() examplev1.ExampleV1Interface { + return c.exampleV1 +} + +// SecondExampleV1 retrieves the SecondExampleV1Client +func (c *Clientset) SecondExampleV1() secondexamplev1.SecondExampleV1Interface { + return c.secondExampleV1 +} + +// Deprecated: SecondExample retrieves the default version of SecondExampleClient. +// Please explicitly pick a version. +func (c *Clientset) SecondExample() secondexamplev1.SecondExampleV1Interface { + return c.secondExampleV1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.exampleV1, err = examplev1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.secondExampleV1, err = secondexamplev1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.exampleV1 = examplev1.NewForConfigOrDie(c) + cs.secondExampleV1 = secondexamplev1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.exampleV1 = examplev1.New(c) + cs.secondExampleV1 = secondexamplev1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/doc.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/doc.go new file mode 100644 index 00000000..41721ca5 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/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 clientset. +package versioned diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/clientset_generated.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 00000000..6dce4fed --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/clientset_generated.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 client-gen. DO NOT EDIT. + +package fake + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/discovery" + fakediscovery "k8s.io/client-go/discovery/fake" + "k8s.io/client-go/testing" + clientset "k8s.io/code-generator/_examples/apiserver/clientset/versioned" + examplev1 "k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1" + fakeexamplev1 "k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake" + secondexamplev1 "k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1" + fakesecondexamplev1 "k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + 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 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 Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +var _ clientset.Interface = &Clientset{} + +// ExampleV1 retrieves the ExampleV1Client +func (c *Clientset) ExampleV1() examplev1.ExampleV1Interface { + return &fakeexamplev1.FakeExampleV1{Fake: &c.Fake} +} + +// Example retrieves the ExampleV1Client +func (c *Clientset) Example() examplev1.ExampleV1Interface { + return &fakeexamplev1.FakeExampleV1{Fake: &c.Fake} +} + +// SecondExampleV1 retrieves the SecondExampleV1Client +func (c *Clientset) SecondExampleV1() secondexamplev1.SecondExampleV1Interface { + return &fakesecondexamplev1.FakeSecondExampleV1{Fake: &c.Fake} +} + +// SecondExample retrieves the SecondExampleV1Client +func (c *Clientset) SecondExample() secondexamplev1.SecondExampleV1Interface { + return &fakesecondexamplev1.FakeSecondExampleV1{Fake: &c.Fake} +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/doc.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/doc.go new file mode 100644 index 00000000..9b99e716 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/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. + +// This package has the automatically generated fake clientset. +package fake diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/register.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/register.go new file mode 100644 index 00000000..79e20050 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/register.go @@ -0,0 +1,56 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + examplev1 "k8s.io/code-generator/_examples/apiserver/apis/example/v1" + secondexamplev1 "k8s.io/code-generator/_examples/apiserver/apis/example2/v1" +) + +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) +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// 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) +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/scheme/doc.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/scheme/doc.go new file mode 100644 index 00000000..7dc37561 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/scheme/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 contains the scheme of the automatically generated clientset. +package scheme diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/scheme/register.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/scheme/register.go new file mode 100644 index 00000000..16f0196a --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/scheme/register.go @@ -0,0 +1,56 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 scheme + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + examplev1 "k8s.io/code-generator/_examples/apiserver/apis/example/v1" + secondexamplev1 "k8s.io/code-generator/_examples/apiserver/apis/example2/v1" +) + +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) +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// 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) +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/doc.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/doc.go new file mode 100644 index 00000000..3af5d054 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/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 v1 diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/example_client.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/example_client.go new file mode 100644 index 00000000..743c8ded --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/example_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 v1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" + v1 "k8s.io/code-generator/_examples/apiserver/apis/example/v1" + "k8s.io/code-generator/_examples/apiserver/clientset/versioned/scheme" +) + +type ExampleV1Interface interface { + RESTClient() rest.Interface + TestTypesGetter +} + +// ExampleV1Client is used to interact with features provided by the example.apiserver.code-generator.k8s.io group. +type ExampleV1Client struct { + restClient rest.Interface +} + +func (c *ExampleV1Client) TestTypes(namespace string) TestTypeInterface { + return newTestTypes(c, namespace) +} + +// NewForConfig creates a new ExampleV1Client for the given config. +func NewForConfig(c *rest.Config) (*ExampleV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &ExampleV1Client{client}, nil +} + +// NewForConfigOrDie creates a new ExampleV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *ExampleV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new ExampleV1Client for the given RESTClient. +func New(c rest.Interface) *ExampleV1Client { + return &ExampleV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.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 *ExampleV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/doc.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/doc.go new file mode 100644 index 00000000..16f44399 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/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/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/fake_example_client.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/fake_example_client.go new file mode 100644 index 00000000..509a5b42 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/fake_example_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 ( + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" + v1 "k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1" +) + +type FakeExampleV1 struct { + *testing.Fake +} + +func (c *FakeExampleV1) TestTypes(namespace string) v1.TestTypeInterface { + return &FakeTestTypes{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeExampleV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/fake_testtype.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/fake_testtype.go new file mode 100644 index 00000000..100de180 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/fake_testtype.go @@ -0,0 +1,140 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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" + example_v1 "k8s.io/code-generator/_examples/apiserver/apis/example/v1" +) + +// FakeTestTypes implements TestTypeInterface +type FakeTestTypes struct { + Fake *FakeExampleV1 + ns string +} + +var testtypesResource = schema.GroupVersionResource{Group: "example.apiserver.code-generator.k8s.io", Version: "v1", Resource: "testtypes"} + +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) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(testtypesResource, c.ns, name), &example_v1.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example_v1.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) { + obj, err := c.Fake. + Invokes(testing.NewListAction(testtypesResource, testtypesKind, c.ns, opts), &example_v1.TestTypeList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &example_v1.TestTypeList{ListMeta: obj.(*example_v1.TestTypeList).ListMeta} + for _, item := range obj.(*example_v1.TestTypeList).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 testTypes. +func (c *FakeTestTypes) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(testtypesResource, c.ns, opts)) + +} + +// 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) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &example_v1.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example_v1.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) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &example_v1.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example_v1.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) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &example_v1.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example_v1.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{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +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{}) + 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) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, data, subresources...), &example_v1.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example_v1.TestType), err +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/generated_expansion.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/generated_expansion.go new file mode 100644 index 00000000..d513810d --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/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 v1 + +type TestTypeExpansion interface{} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/testtype.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/testtype.go new file mode 100644 index 00000000..d9aa3c5d --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/testtype.go @@ -0,0 +1,174 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 ( + meta_v1 "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/apiserver/apis/example/v1" + scheme "k8s.io/code-generator/_examples/apiserver/clientset/versioned/scheme" +) + +// TestTypesGetter has a method to return a TestTypeInterface. +// A group's client should implement this interface. +type TestTypesGetter interface { + TestTypes(namespace string) TestTypeInterface +} + +// TestTypeInterface has methods to work with TestType resources. +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) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) + TestTypeExpansion +} + +// testTypes implements TestTypeInterface +type testTypes struct { + client rest.Interface + ns string +} + +// newTestTypes returns a TestTypes +func newTestTypes(c *ExampleV1Client, namespace string) *testTypes { + return &testTypes{ + client: c.RESTClient(), + ns: namespace, + } +} + +// 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) { + result = &v1.TestType{} + err = c.client.Get(). + Namespace(c.ns). + Resource("testtypes"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// 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) { + result = &v1.TestTypeList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested testTypes. +func (c *testTypes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// 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 *testTypes) Create(testType *v1.TestType) (result *v1.TestType, err error) { + result = &v1.TestType{} + err = c.client.Post(). + Namespace(c.ns). + Resource("testtypes"). + Body(testType). + Do(). + Into(result) + return +} + +// 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 *testTypes) Update(testType *v1.TestType) (result *v1.TestType, err error) { + result = &v1.TestType{} + err = c.client.Put(). + Namespace(c.ns). + Resource("testtypes"). + Name(testType.Name). + Body(testType). + 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 *testTypes) UpdateStatus(testType *v1.TestType) (result *v1.TestType, err error) { + result = &v1.TestType{} + err = c.client.Put(). + Namespace(c.ns). + Resource("testtypes"). + Name(testType.Name). + SubResource("status"). + Body(testType). + Do(). + Into(result) + return +} + +// 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 { + return c.client.Delete(). + Namespace(c.ns). + Resource("testtypes"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *testTypes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("testtypes"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched testType. +func (c *testTypes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) { + result = &v1.TestType{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("testtypes"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/doc.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/doc.go new file mode 100644 index 00000000..3af5d054 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/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 v1 diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/example2_client.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/example2_client.go new file mode 100644 index 00000000..1271c0f1 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/example2_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 v1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" + v1 "k8s.io/code-generator/_examples/apiserver/apis/example2/v1" + "k8s.io/code-generator/_examples/apiserver/clientset/versioned/scheme" +) + +type SecondExampleV1Interface interface { + RESTClient() rest.Interface + TestTypesGetter +} + +// SecondExampleV1Client is used to interact with features provided by the example.test.apiserver.code-generator.k8s.io group. +type SecondExampleV1Client struct { + restClient rest.Interface +} + +func (c *SecondExampleV1Client) TestTypes(namespace string) TestTypeInterface { + return newTestTypes(c, namespace) +} + +// NewForConfig creates a new SecondExampleV1Client for the given config. +func NewForConfig(c *rest.Config) (*SecondExampleV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &SecondExampleV1Client{client}, nil +} + +// NewForConfigOrDie creates a new SecondExampleV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *SecondExampleV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new SecondExampleV1Client for the given RESTClient. +func New(c rest.Interface) *SecondExampleV1Client { + return &SecondExampleV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.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 *SecondExampleV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/doc.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/doc.go new file mode 100644 index 00000000..16f44399 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/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/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/fake_example2_client.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/fake_example2_client.go new file mode 100644 index 00000000..1820e182 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/fake_example2_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 ( + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" + v1 "k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1" +) + +type FakeSecondExampleV1 struct { + *testing.Fake +} + +func (c *FakeSecondExampleV1) TestTypes(namespace string) v1.TestTypeInterface { + return &FakeTestTypes{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeSecondExampleV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/fake_testtype.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/fake_testtype.go new file mode 100644 index 00000000..296975e4 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/fake_testtype.go @@ -0,0 +1,140 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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" + example2_v1 "k8s.io/code-generator/_examples/apiserver/apis/example2/v1" +) + +// FakeTestTypes implements TestTypeInterface +type FakeTestTypes struct { + Fake *FakeSecondExampleV1 + ns string +} + +var testtypesResource = schema.GroupVersionResource{Group: "example.test.apiserver.code-generator.k8s.io", Version: "v1", Resource: "testtypes"} + +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) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(testtypesResource, c.ns, name), &example2_v1.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example2_v1.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) { + obj, err := c.Fake. + Invokes(testing.NewListAction(testtypesResource, testtypesKind, c.ns, opts), &example2_v1.TestTypeList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &example2_v1.TestTypeList{ListMeta: obj.(*example2_v1.TestTypeList).ListMeta} + for _, item := range obj.(*example2_v1.TestTypeList).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 testTypes. +func (c *FakeTestTypes) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(testtypesResource, c.ns, opts)) + +} + +// 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) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &example2_v1.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example2_v1.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) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &example2_v1.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example2_v1.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) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &example2_v1.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example2_v1.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{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +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{}) + 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) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, data, subresources...), &example2_v1.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example2_v1.TestType), err +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/generated_expansion.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/generated_expansion.go new file mode 100644 index 00000000..d513810d --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/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 v1 + +type TestTypeExpansion interface{} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go new file mode 100644 index 00000000..f199ee09 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go @@ -0,0 +1,174 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 ( + meta_v1 "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/apiserver/apis/example2/v1" + scheme "k8s.io/code-generator/_examples/apiserver/clientset/versioned/scheme" +) + +// TestTypesGetter has a method to return a TestTypeInterface. +// A group's client should implement this interface. +type TestTypesGetter interface { + TestTypes(namespace string) TestTypeInterface +} + +// TestTypeInterface has methods to work with TestType resources. +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) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) + TestTypeExpansion +} + +// testTypes implements TestTypeInterface +type testTypes struct { + client rest.Interface + ns string +} + +// newTestTypes returns a TestTypes +func newTestTypes(c *SecondExampleV1Client, namespace string) *testTypes { + return &testTypes{ + client: c.RESTClient(), + ns: namespace, + } +} + +// 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) { + result = &v1.TestType{} + err = c.client.Get(). + Namespace(c.ns). + Resource("testtypes"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// 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) { + result = &v1.TestTypeList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested testTypes. +func (c *testTypes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// 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 *testTypes) Create(testType *v1.TestType) (result *v1.TestType, err error) { + result = &v1.TestType{} + err = c.client.Post(). + Namespace(c.ns). + Resource("testtypes"). + Body(testType). + Do(). + Into(result) + return +} + +// 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 *testTypes) Update(testType *v1.TestType) (result *v1.TestType, err error) { + result = &v1.TestType{} + err = c.client.Put(). + Namespace(c.ns). + Resource("testtypes"). + Name(testType.Name). + Body(testType). + 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 *testTypes) UpdateStatus(testType *v1.TestType) (result *v1.TestType, err error) { + result = &v1.TestType{} + err = c.client.Put(). + Namespace(c.ns). + Resource("testtypes"). + Name(testType.Name). + SubResource("status"). + Body(testType). + Do(). + Into(result) + return +} + +// 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 { + return c.client.Delete(). + Namespace(c.ns). + Resource("testtypes"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *testTypes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("testtypes"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched testType. +func (c *testTypes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) { + result = &v1.TestType{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("testtypes"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/interface.go b/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/interface.go new file mode 100644 index 00000000..9cc5d1b0 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/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 example + +import ( + v1 "k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/v1" + internalinterfaces "k8s.io/code-generator/_examples/apiserver/informers/externalversions/internalinterfaces" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1 provides access to shared informers for resources in V1. + V1() v1.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} +} + +// V1 returns a new v1.Interface. +func (g *group) V1() v1.Interface { + return v1.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/v1/interface.go b/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/v1/interface.go new file mode 100644 index 00000000..1ccc8f3c --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/v1/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 v1 + +import ( + internalinterfaces "k8s.io/code-generator/_examples/apiserver/informers/externalversions/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // TestTypes returns a TestTypeInformer. + TestTypes() TestTypeInformer +} + +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} +} + +// TestTypes returns a TestTypeInformer. +func (v *version) TestTypes() TestTypeInformer { + return &testTypeInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/v1/testtype.go b/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/v1/testtype.go new file mode 100644 index 00000000..84fc6297 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/v1/testtype.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 v1 + +import ( + time "time" + + meta_v1 "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" + 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" +) + +// TestTypeInformer provides access to a shared informer and lister for +// TestTypes. +type TestTypeInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.TestTypeLister +} + +type testTypeInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// 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 versioned.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 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) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ExampleV1().TestTypes(namespace).List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ExampleV1().TestTypes(namespace).Watch(options) + }, + }, + &example_v1.TestType{}, + resyncPeriod, + indexers, + ) +} + +func (f *testTypeInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredTestTypeInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *testTypeInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&example_v1.TestType{}, f.defaultInformer) +} + +func (f *testTypeInformer) Lister() v1.TestTypeLister { + return v1.NewTestTypeLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/interface.go b/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/interface.go new file mode 100644 index 00000000..3a791dd0 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/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 example + +import ( + v1 "k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/v1" + internalinterfaces "k8s.io/code-generator/_examples/apiserver/informers/externalversions/internalinterfaces" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1 provides access to shared informers for resources in V1. + V1() v1.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} +} + +// V1 returns a new v1.Interface. +func (g *group) V1() v1.Interface { + return v1.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/v1/interface.go b/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/v1/interface.go new file mode 100644 index 00000000..1ccc8f3c --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/v1/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 v1 + +import ( + internalinterfaces "k8s.io/code-generator/_examples/apiserver/informers/externalversions/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // TestTypes returns a TestTypeInformer. + TestTypes() TestTypeInformer +} + +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} +} + +// TestTypes returns a TestTypeInformer. +func (v *version) TestTypes() TestTypeInformer { + return &testTypeInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/v1/testtype.go b/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/v1/testtype.go new file mode 100644 index 00000000..1d366be5 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/v1/testtype.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 v1 + +import ( + time "time" + + meta_v1 "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" + 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" +) + +// TestTypeInformer provides access to a shared informer and lister for +// TestTypes. +type TestTypeInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.TestTypeLister +} + +type testTypeInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// 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 versioned.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 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) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SecondExampleV1().TestTypes(namespace).List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SecondExampleV1().TestTypes(namespace).Watch(options) + }, + }, + &example2_v1.TestType{}, + resyncPeriod, + indexers, + ) +} + +func (f *testTypeInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredTestTypeInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *testTypeInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&example2_v1.TestType{}, f.defaultInformer) +} + +func (f *testTypeInformer) Lister() v1.TestTypeLister { + return v1.NewTestTypeLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/factory.go b/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/factory.go new file mode 100644 index 00000000..fc4aa0d3 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/factory.go @@ -0,0 +1,186 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 externalversions + +import ( + reflect "reflect" + sync "sync" + time "time" + + 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" + versioned "k8s.io/code-generator/_examples/apiserver/clientset/versioned" + example "k8s.io/code-generator/_examples/apiserver/informers/externalversions/example" + example2 "k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2" + 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. + // This allows Start() to be called multiple times safely. + startedInformers map[reflect.Type]bool +} + +// 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 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. +func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { + f.lock.Lock() + defer f.lock.Unlock() + + for informerType, informer := range f.informers { + if !f.startedInformers[informerType] { + go informer.Run(stopCh) + f.startedInformers[informerType] = true + } + } +} + +// WaitForCacheSync waits for all started informers' cache were synced. +func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { + informers := func() map[reflect.Type]cache.SharedIndexInformer { + f.lock.Lock() + defer f.lock.Unlock() + + informers := map[reflect.Type]cache.SharedIndexInformer{} + for informerType, informer := range f.informers { + if f.startedInformers[informerType] { + informers[informerType] = informer + } + } + return informers + }() + + res := map[reflect.Type]bool{} + for informType, informer := range informers { + res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced) + } + return res +} + +// InternalInformerFor returns the SharedIndexInformer for obj using an internal +// client. +func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { + f.lock.Lock() + defer f.lock.Unlock() + + informerType := reflect.TypeOf(obj) + informer, exists := f.informers[informerType] + if exists { + return informer + } + + resyncPeriod, exists := f.customResync[informerType] + if !exists { + resyncPeriod = f.defaultResync + } + + informer = newFunc(f.client, resyncPeriod) + f.informers[informerType] = informer + + return informer +} + +// SharedInformerFactory provides shared informers for resources in all known +// API group versions. +type SharedInformerFactory interface { + internalinterfaces.SharedInformerFactory + ForResource(resource schema.GroupVersionResource) (GenericInformer, error) + WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool + + Example() example.Interface + SecondExample() example2.Interface +} + +func (f *sharedInformerFactory) Example() example.Interface { + return example.New(f, f.namespace, f.tweakListOptions) +} + +func (f *sharedInformerFactory) SecondExample() example2.Interface { + return example2.New(f, f.namespace, f.tweakListOptions) +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/generic.go b/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/generic.go new file mode 100644 index 00000000..aee8fad3 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/generic.go @@ -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. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package externalversions + +import ( + "fmt" + + 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" +) + +// GenericInformer is type of SharedIndexInformer which will locate and delegate to other +// sharedInformers based on type +type GenericInformer interface { + Informer() cache.SharedIndexInformer + Lister() cache.GenericLister +} + +type genericInformer struct { + informer cache.SharedIndexInformer + resource schema.GroupResource +} + +// Informer returns the SharedIndexInformer. +func (f *genericInformer) Informer() cache.SharedIndexInformer { + return f.informer +} + +// Lister returns the GenericLister. +func (f *genericInformer) Lister() cache.GenericLister { + return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource) +} + +// ForResource gives generic access to a shared informer of the matching type +// TODO extend this to unknown resources with a client pool +func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { + switch resource { + // Group=example.apiserver.code-generator.k8s.io, Version=v1 + case v1.SchemeGroupVersion.WithResource("testtypes"): + 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"): + return &genericInformer{resource: resource.GroupResource(), informer: f.SecondExample().V1().TestTypes().Informer()}, nil + + } + + return nil, fmt.Errorf("no informer found for %v", resource) +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/internalinterfaces/factory_interfaces.go b/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/internalinterfaces/factory_interfaces.go new file mode 100644 index 00000000..6318f528 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -0,0 +1,38 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 internalinterfaces + +import ( + time "time" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + cache "k8s.io/client-go/tools/cache" + versioned "k8s.io/code-generator/_examples/apiserver/clientset/versioned" +) + +type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer + +// SharedInformerFactory a small interface to allow for adding an informer without an import cycle +type SharedInformerFactory interface { + Start(stopCh <-chan struct{}) + InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer +} + +type TweakListOptionsFunc func(*v1.ListOptions) diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/interface.go b/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/interface.go new file mode 100644 index 00000000..d2a36b3c --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/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 example + +import ( + internalversion "k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/internalversion" + internalinterfaces "k8s.io/code-generator/_examples/apiserver/informers/internalversion/internalinterfaces" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // InternalVersion provides access to shared informers for resources in InternalVersion. + InternalVersion() internalversion.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} +} + +// InternalVersion returns a new internalversion.Interface. +func (g *group) InternalVersion() internalversion.Interface { + return internalversion.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/internalversion/interface.go b/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/internalversion/interface.go new file mode 100644 index 00000000..0fd5f8c3 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/internalversion/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 internalversion + +import ( + internalinterfaces "k8s.io/code-generator/_examples/apiserver/informers/internalversion/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // TestTypes returns a TestTypeInformer. + TestTypes() TestTypeInformer +} + +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} +} + +// TestTypes returns a TestTypeInformer. +func (v *version) TestTypes() TestTypeInformer { + return &testTypeInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/internalversion/testtype.go b/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/internalversion/testtype.go new file mode 100644 index 00000000..3745a315 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/internalversion/testtype.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 internalversion + +import ( + time "time" + + v1 "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 "k8s.io/code-generator/_examples/apiserver/apis/example" + clientset_internalversion "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" +) + +// TestTypeInformer provides access to a shared informer and lister for +// TestTypes. +type TestTypeInformer interface { + Informer() cache.SharedIndexInformer + Lister() internalversion.TestTypeLister +} + +type testTypeInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// 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 { + 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 { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.Example().TestTypes(namespace).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.Example().TestTypes(namespace).Watch(options) + }, + }, + &example.TestType{}, + resyncPeriod, + indexers, + ) +} + +func (f *testTypeInformer) defaultInformer(client clientset_internalversion.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredTestTypeInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *testTypeInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&example.TestType{}, f.defaultInformer) +} + +func (f *testTypeInformer) Lister() internalversion.TestTypeLister { + return internalversion.NewTestTypeLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/interface.go b/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/interface.go new file mode 100644 index 00000000..9a5b411a --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/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 example + +import ( + internalversion "k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/internalversion" + internalinterfaces "k8s.io/code-generator/_examples/apiserver/informers/internalversion/internalinterfaces" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // InternalVersion provides access to shared informers for resources in InternalVersion. + InternalVersion() internalversion.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} +} + +// InternalVersion returns a new internalversion.Interface. +func (g *group) InternalVersion() internalversion.Interface { + return internalversion.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/internalversion/interface.go b/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/internalversion/interface.go new file mode 100644 index 00000000..0fd5f8c3 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/internalversion/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 internalversion + +import ( + internalinterfaces "k8s.io/code-generator/_examples/apiserver/informers/internalversion/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // TestTypes returns a TestTypeInformer. + TestTypes() TestTypeInformer +} + +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} +} + +// TestTypes returns a TestTypeInformer. +func (v *version) TestTypes() TestTypeInformer { + return &testTypeInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/internalversion/testtype.go b/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/internalversion/testtype.go new file mode 100644 index 00000000..51518210 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/internalversion/testtype.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 internalversion + +import ( + time "time" + + v1 "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 "k8s.io/code-generator/_examples/apiserver/apis/example2" + clientset_internalversion "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" +) + +// TestTypeInformer provides access to a shared informer and lister for +// TestTypes. +type TestTypeInformer interface { + Informer() cache.SharedIndexInformer + Lister() internalversion.TestTypeLister +} + +type testTypeInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// 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 { + 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 { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SecondExample().TestTypes(namespace).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SecondExample().TestTypes(namespace).Watch(options) + }, + }, + &example2.TestType{}, + resyncPeriod, + indexers, + ) +} + +func (f *testTypeInformer) defaultInformer(client clientset_internalversion.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredTestTypeInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *testTypeInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&example2.TestType{}, f.defaultInformer) +} + +func (f *testTypeInformer) Lister() internalversion.TestTypeLister { + return internalversion.NewTestTypeLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/factory.go b/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/factory.go new file mode 100644 index 00000000..ca6d4def --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/factory.go @@ -0,0 +1,186 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 internalversion + +import ( + reflect "reflect" + sync "sync" + time "time" + + 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" + internalversion "k8s.io/code-generator/_examples/apiserver/clientset/internalversion" + example "k8s.io/code-generator/_examples/apiserver/informers/internalversion/example" + example2 "k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2" + 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. + // This allows Start() to be called multiple times safely. + startedInformers map[reflect.Type]bool +} + +// 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 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 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: 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. +func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { + f.lock.Lock() + defer f.lock.Unlock() + + for informerType, informer := range f.informers { + if !f.startedInformers[informerType] { + go informer.Run(stopCh) + f.startedInformers[informerType] = true + } + } +} + +// WaitForCacheSync waits for all started informers' cache were synced. +func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { + informers := func() map[reflect.Type]cache.SharedIndexInformer { + f.lock.Lock() + defer f.lock.Unlock() + + informers := map[reflect.Type]cache.SharedIndexInformer{} + for informerType, informer := range f.informers { + if f.startedInformers[informerType] { + informers[informerType] = informer + } + } + return informers + }() + + res := map[reflect.Type]bool{} + for informType, informer := range informers { + res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced) + } + return res +} + +// InternalInformerFor returns the SharedIndexInformer for obj using an internal +// client. +func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { + f.lock.Lock() + defer f.lock.Unlock() + + informerType := reflect.TypeOf(obj) + informer, exists := f.informers[informerType] + if exists { + return informer + } + + resyncPeriod, exists := f.customResync[informerType] + if !exists { + resyncPeriod = f.defaultResync + } + + informer = newFunc(f.client, resyncPeriod) + f.informers[informerType] = informer + + return informer +} + +// SharedInformerFactory provides shared informers for resources in all known +// API group versions. +type SharedInformerFactory interface { + internalinterfaces.SharedInformerFactory + ForResource(resource schema.GroupVersionResource) (GenericInformer, error) + WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool + + Example() example.Interface + SecondExample() example2.Interface +} + +func (f *sharedInformerFactory) Example() example.Interface { + return example.New(f, f.namespace, f.tweakListOptions) +} + +func (f *sharedInformerFactory) SecondExample() example2.Interface { + return example2.New(f, f.namespace, f.tweakListOptions) +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/generic.go b/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/generic.go new file mode 100644 index 00000000..046ccac9 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/generic.go @@ -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. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package internalversion + +import ( + "fmt" + + schema "k8s.io/apimachinery/pkg/runtime/schema" + cache "k8s.io/client-go/tools/cache" + example "k8s.io/code-generator/_examples/apiserver/apis/example" + example2 "k8s.io/code-generator/_examples/apiserver/apis/example2" +) + +// GenericInformer is type of SharedIndexInformer which will locate and delegate to other +// sharedInformers based on type +type GenericInformer interface { + Informer() cache.SharedIndexInformer + Lister() cache.GenericLister +} + +type genericInformer struct { + informer cache.SharedIndexInformer + resource schema.GroupResource +} + +// Informer returns the SharedIndexInformer. +func (f *genericInformer) Informer() cache.SharedIndexInformer { + return f.informer +} + +// Lister returns the GenericLister. +func (f *genericInformer) Lister() cache.GenericLister { + return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource) +} + +// ForResource gives generic access to a shared informer of the matching type +// TODO extend this to unknown resources with a client pool +func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { + switch resource { + // Group=example.apiserver.code-generator.k8s.io, Version=internalVersion + case example.SchemeGroupVersion.WithResource("testtypes"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Example().InternalVersion().TestTypes().Informer()}, nil + + // Group=example.test.apiserver.code-generator.k8s.io, Version=internalVersion + case example2.SchemeGroupVersion.WithResource("testtypes"): + return &genericInformer{resource: resource.GroupResource(), informer: f.SecondExample().InternalVersion().TestTypes().Informer()}, nil + + } + + return nil, fmt.Errorf("no informer found for %v", resource) +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/internalinterfaces/factory_interfaces.go b/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/internalinterfaces/factory_interfaces.go new file mode 100644 index 00000000..03c67924 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/informers/internalversion/internalinterfaces/factory_interfaces.go @@ -0,0 +1,38 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 internalinterfaces + +import ( + time "time" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + cache "k8s.io/client-go/tools/cache" + internalversion "k8s.io/code-generator/_examples/apiserver/clientset/internalversion" +) + +type NewInformerFunc func(internalversion.Interface, time.Duration) cache.SharedIndexInformer + +// SharedInformerFactory a small interface to allow for adding an informer without an import cycle +type SharedInformerFactory interface { + Start(stopCh <-chan struct{}) + InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer +} + +type TweakListOptionsFunc func(*v1.ListOptions) diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/listers/example/internalversion/expansion_generated.go b/vendor/k8s.io/code-generator/_examples/apiserver/listers/example/internalversion/expansion_generated.go new file mode 100644 index 00000000..4bb87150 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/listers/example/internalversion/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 internalversion + +// TestTypeListerExpansion allows custom methods to be added to +// TestTypeLister. +type TestTypeListerExpansion interface{} + +// TestTypeNamespaceListerExpansion allows custom methods to be added to +// TestTypeNamespaceLister. +type TestTypeNamespaceListerExpansion interface{} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/listers/example/internalversion/testtype.go b/vendor/k8s.io/code-generator/_examples/apiserver/listers/example/internalversion/testtype.go new file mode 100644 index 00000000..9daa91bb --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/listers/example/internalversion/testtype.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 internalversion + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" + example "k8s.io/code-generator/_examples/apiserver/apis/example" +) + +// TestTypeLister helps list TestTypes. +type TestTypeLister interface { + // List lists all TestTypes in the indexer. + List(selector labels.Selector) (ret []*example.TestType, err error) + // TestTypes returns an object that can list and get TestTypes. + TestTypes(namespace string) TestTypeNamespaceLister + TestTypeListerExpansion +} + +// testTypeLister implements the TestTypeLister interface. +type testTypeLister struct { + indexer cache.Indexer +} + +// NewTestTypeLister returns a new TestTypeLister. +func NewTestTypeLister(indexer cache.Indexer) TestTypeLister { + return &testTypeLister{indexer: indexer} +} + +// List lists all TestTypes in the indexer. +func (s *testTypeLister) List(selector labels.Selector) (ret []*example.TestType, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*example.TestType)) + }) + return ret, err +} + +// TestTypes returns an object that can list and get TestTypes. +func (s *testTypeLister) TestTypes(namespace string) TestTypeNamespaceLister { + return testTypeNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// TestTypeNamespaceLister helps list and get TestTypes. +type TestTypeNamespaceLister interface { + // List lists all TestTypes in the indexer for a given namespace. + List(selector labels.Selector) (ret []*example.TestType, err error) + // Get retrieves the TestType from the indexer for a given namespace and name. + Get(name string) (*example.TestType, error) + TestTypeNamespaceListerExpansion +} + +// testTypeNamespaceLister implements the TestTypeNamespaceLister +// interface. +type testTypeNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all TestTypes in the indexer for a given namespace. +func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*example.TestType, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*example.TestType)) + }) + return ret, err +} + +// Get retrieves the TestType from the indexer for a given namespace and name. +func (s testTypeNamespaceLister) Get(name string) (*example.TestType, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(example.Resource("testtype"), name) + } + return obj.(*example.TestType), nil +} diff --git a/vendor/k8s.io/utils/exec/new_test.go b/vendor/k8s.io/code-generator/_examples/apiserver/listers/example/v1/expansion_generated.go similarity index 59% rename from vendor/k8s.io/utils/exec/new_test.go rename to vendor/k8s.io/code-generator/_examples/apiserver/listers/example/v1/expansion_generated.go index dba9bb35..0192e05f 100644 --- a/vendor/k8s.io/utils/exec/new_test.go +++ b/vendor/k8s.io/code-generator/_examples/apiserver/listers/example/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,24 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -package exec_test +// Code generated by lister-gen. DO NOT EDIT. -import ( - "bytes" - "fmt" +package v1 - "k8s.io/utils/exec" -) +// TestTypeListerExpansion allows custom methods to be added to +// TestTypeLister. +type TestTypeListerExpansion interface{} -func ExampleNew() { - exec := exec.New() - - cmd := exec.Command("echo", "Bonjour!") - buff := bytes.Buffer{} - cmd.SetStdout(&buff) - if err := cmd.Run(); err != nil { - panic(err) - } - fmt.Println(buff.String()) - // Output: Bonjour! -} +// TestTypeNamespaceListerExpansion allows custom methods to be added to +// TestTypeNamespaceLister. +type TestTypeNamespaceListerExpansion interface{} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/listers/example/v1/testtype.go b/vendor/k8s.io/code-generator/_examples/apiserver/listers/example/v1/testtype.go new file mode 100644 index 00000000..a9b3d87c --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/listers/example/v1/testtype.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 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/apiserver/apis/example/v1" +) + +// TestTypeLister helps list TestTypes. +type TestTypeLister interface { + // List lists all TestTypes in the indexer. + List(selector labels.Selector) (ret []*v1.TestType, err error) + // TestTypes returns an object that can list and get TestTypes. + TestTypes(namespace string) TestTypeNamespaceLister + TestTypeListerExpansion +} + +// testTypeLister implements the TestTypeLister interface. +type testTypeLister struct { + indexer cache.Indexer +} + +// NewTestTypeLister returns a new TestTypeLister. +func NewTestTypeLister(indexer cache.Indexer) TestTypeLister { + return &testTypeLister{indexer: indexer} +} + +// List lists all TestTypes in the indexer. +func (s *testTypeLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.TestType)) + }) + return ret, err +} + +// TestTypes returns an object that can list and get TestTypes. +func (s *testTypeLister) TestTypes(namespace string) TestTypeNamespaceLister { + return testTypeNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// TestTypeNamespaceLister helps list and get TestTypes. +type TestTypeNamespaceLister interface { + // List lists all TestTypes in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1.TestType, err error) + // Get retrieves the TestType from the indexer for a given namespace and name. + Get(name string) (*v1.TestType, error) + TestTypeNamespaceListerExpansion +} + +// testTypeNamespaceLister implements the TestTypeNamespaceLister +// interface. +type testTypeNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all TestTypes in the indexer for a given namespace. +func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.TestType)) + }) + return ret, err +} + +// Get retrieves the TestType from the indexer for a given namespace and name. +func (s testTypeNamespaceLister) Get(name string) (*v1.TestType, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1.Resource("testtype"), name) + } + return obj.(*v1.TestType), nil +} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/listers/example2/internalversion/expansion_generated.go b/vendor/k8s.io/code-generator/_examples/apiserver/listers/example2/internalversion/expansion_generated.go new file mode 100644 index 00000000..4bb87150 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/listers/example2/internalversion/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 internalversion + +// TestTypeListerExpansion allows custom methods to be added to +// TestTypeLister. +type TestTypeListerExpansion interface{} + +// TestTypeNamespaceListerExpansion allows custom methods to be added to +// TestTypeNamespaceLister. +type TestTypeNamespaceListerExpansion interface{} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/listers/example2/internalversion/testtype.go b/vendor/k8s.io/code-generator/_examples/apiserver/listers/example2/internalversion/testtype.go new file mode 100644 index 00000000..724e6387 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/listers/example2/internalversion/testtype.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 internalversion + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" + example2 "k8s.io/code-generator/_examples/apiserver/apis/example2" +) + +// TestTypeLister helps list TestTypes. +type TestTypeLister interface { + // List lists all TestTypes in the indexer. + List(selector labels.Selector) (ret []*example2.TestType, err error) + // TestTypes returns an object that can list and get TestTypes. + TestTypes(namespace string) TestTypeNamespaceLister + TestTypeListerExpansion +} + +// testTypeLister implements the TestTypeLister interface. +type testTypeLister struct { + indexer cache.Indexer +} + +// NewTestTypeLister returns a new TestTypeLister. +func NewTestTypeLister(indexer cache.Indexer) TestTypeLister { + return &testTypeLister{indexer: indexer} +} + +// List lists all TestTypes in the indexer. +func (s *testTypeLister) List(selector labels.Selector) (ret []*example2.TestType, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*example2.TestType)) + }) + return ret, err +} + +// TestTypes returns an object that can list and get TestTypes. +func (s *testTypeLister) TestTypes(namespace string) TestTypeNamespaceLister { + return testTypeNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// TestTypeNamespaceLister helps list and get TestTypes. +type TestTypeNamespaceLister interface { + // List lists all TestTypes in the indexer for a given namespace. + List(selector labels.Selector) (ret []*example2.TestType, err error) + // Get retrieves the TestType from the indexer for a given namespace and name. + Get(name string) (*example2.TestType, error) + TestTypeNamespaceListerExpansion +} + +// testTypeNamespaceLister implements the TestTypeNamespaceLister +// interface. +type testTypeNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all TestTypes in the indexer for a given namespace. +func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*example2.TestType, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*example2.TestType)) + }) + return ret, err +} + +// Get retrieves the TestType from the indexer for a given namespace and name. +func (s testTypeNamespaceLister) Get(name string) (*example2.TestType, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(example2.Resource("testtype"), name) + } + return obj.(*example2.TestType), nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_test.go b/vendor/k8s.io/code-generator/_examples/apiserver/listers/example2/v1/expansion_generated.go similarity index 59% rename from vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_test.go rename to vendor/k8s.io/code-generator/_examples/apiserver/listers/example2/v1/expansion_generated.go index cbcbbcef..0192e05f 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_test.go +++ b/vendor/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,19 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -package unstructured +// Code generated by lister-gen. DO NOT EDIT. -import ( - "testing" +package v1 - "github.com/stretchr/testify/assert" -) +// TestTypeListerExpansion allows custom methods to be added to +// TestTypeLister. +type TestTypeListerExpansion interface{} -func TestNilUnstructuredContent(t *testing.T) { - var u Unstructured - uCopy := u.DeepCopy() - content := u.UnstructuredContent() - expContent := make(map[string]interface{}) - assert.EqualValues(t, expContent, content) - assert.Equal(t, uCopy, &u) -} +// TestTypeNamespaceListerExpansion allows custom methods to be added to +// TestTypeNamespaceLister. +type TestTypeNamespaceListerExpansion interface{} diff --git a/vendor/k8s.io/code-generator/_examples/apiserver/listers/example2/v1/testtype.go b/vendor/k8s.io/code-generator/_examples/apiserver/listers/example2/v1/testtype.go new file mode 100644 index 00000000..8aa178af --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/apiserver/listers/example2/v1/testtype.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 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/apiserver/apis/example2/v1" +) + +// TestTypeLister helps list TestTypes. +type TestTypeLister interface { + // List lists all TestTypes in the indexer. + List(selector labels.Selector) (ret []*v1.TestType, err error) + // TestTypes returns an object that can list and get TestTypes. + TestTypes(namespace string) TestTypeNamespaceLister + TestTypeListerExpansion +} + +// testTypeLister implements the TestTypeLister interface. +type testTypeLister struct { + indexer cache.Indexer +} + +// NewTestTypeLister returns a new TestTypeLister. +func NewTestTypeLister(indexer cache.Indexer) TestTypeLister { + return &testTypeLister{indexer: indexer} +} + +// List lists all TestTypes in the indexer. +func (s *testTypeLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.TestType)) + }) + return ret, err +} + +// TestTypes returns an object that can list and get TestTypes. +func (s *testTypeLister) TestTypes(namespace string) TestTypeNamespaceLister { + return testTypeNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// TestTypeNamespaceLister helps list and get TestTypes. +type TestTypeNamespaceLister interface { + // List lists all TestTypes in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1.TestType, err error) + // Get retrieves the TestType from the indexer for a given namespace and name. + Get(name string) (*v1.TestType, error) + TestTypeNamespaceListerExpansion +} + +// testTypeNamespaceLister implements the TestTypeNamespaceLister +// interface. +type testTypeNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all TestTypes in the indexer for a given namespace. +func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.TestType)) + }) + return ret, err +} + +// Get retrieves the TestType from the indexer for a given namespace and name. +func (s testTypeNamespaceLister) Get(name string) (*v1.TestType, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1.Resource("testtype"), name) + } + return obj.(*v1.TestType), nil +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/apis/example/v1/doc.go b/vendor/k8s.io/code-generator/_examples/crd/apis/example/v1/doc.go new file mode 100644 index 00000000..e6614c0d --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/apis/example/v1/doc.go @@ -0,0 +1,20 @@ +/* +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. +*/ + +// +k8s:deepcopy-gen=package +// +k8s:defaulter-gen=TypeMeta +// +groupName=example.crd.code-generator.k8s.io +package v1 diff --git a/vendor/k8s.io/code-generator/_examples/crd/apis/example/v1/register.go b/vendor/k8s.io/code-generator/_examples/crd/apis/example/v1/register.go new file mode 100644 index 00000000..58371e0e --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/apis/example/v1/register.go @@ -0,0 +1,59 @@ +/* +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 v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +var SchemeGroupVersion = schema.GroupVersion{Group: "example.crd.code-generator.k8s.io", Version: "v1"} + +var ( + // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. + // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. + 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) +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &TestType{}, + &TestTypeList{}, + ) + + scheme.AddKnownTypes(SchemeGroupVersion, + &metav1.Status{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/apis/example/v1/types.go b/vendor/k8s.io/code-generator/_examples/crd/apis/example/v1/types.go new file mode 100644 index 00000000..d79ea38b --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/apis/example/v1/types.go @@ -0,0 +1,74 @@ +/* +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 v1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// TestType is a top-level type. A client is created for it. +type TestType struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + // +optional + Status TestTypeStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// TestTypeList is a top-level list type. The client methods for lists are automatically created. +// You are not supposed to create a separated client for this one. +type TestTypeList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + Items []TestType `json:"items"` +} + +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/vendor/k8s.io/code-generator/_examples/crd/apis/example/v1/zz_generated.deepcopy.go b/vendor/k8s.io/code-generator/_examples/crd/apis/example/v1/zz_generated.deepcopy.go new file mode 100644 index 00000000..a3b4bfa9 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/apis/example/v1/zz_generated.deepcopy.go @@ -0,0 +1,177 @@ +// +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 ( + 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 + 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 TestType. +func (in *TestType) DeepCopy() *TestType { + if in == nil { + return nil + } + out := new(TestType) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestType) 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 *TestTypeList) DeepCopyInto(out *TestTypeList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TestType, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTypeList. +func (in *TestTypeList) DeepCopy() *TestTypeList { + if in == nil { + return nil + } + out := new(TestTypeList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestTypeList) 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 *TestTypeStatus) DeepCopyInto(out *TestTypeStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTypeStatus. +func (in *TestTypeStatus) DeepCopy() *TestTypeStatus { + if in == nil { + return nil + } + out := new(TestTypeStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/apis/example/v1/zz_generated.defaults.go b/vendor/k8s.io/code-generator/_examples/crd/apis/example/v1/zz_generated.defaults.go new file mode 100644 index 00000000..cce2e603 --- /dev/null +++ b/vendor/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/vendor/k8s.io/code-generator/_examples/crd/apis/example2/v1/doc.go b/vendor/k8s.io/code-generator/_examples/crd/apis/example2/v1/doc.go new file mode 100644 index 00000000..6521d83f --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/apis/example2/v1/doc.go @@ -0,0 +1,21 @@ +/* +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. +*/ + +// +k8s:deepcopy-gen=package +// +k8s:defaulter-gen=TypeMeta +// +groupName=example.test.crd.code-generator.k8s.io +// +groupGoName=SecondExample +package v1 diff --git a/vendor/k8s.io/code-generator/_examples/crd/apis/example2/v1/register.go b/vendor/k8s.io/code-generator/_examples/crd/apis/example2/v1/register.go new file mode 100644 index 00000000..d0a852a3 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/apis/example2/v1/register.go @@ -0,0 +1,59 @@ +/* +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 v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +var SchemeGroupVersion = schema.GroupVersion{Group: "example.test.crd.code-generator.k8s.io", Version: "v1"} + +var ( + // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. + // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. + 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) +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &TestType{}, + &TestTypeList{}, + ) + + scheme.AddKnownTypes(SchemeGroupVersion, + &metav1.Status{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/apis/example2/v1/types.go b/vendor/k8s.io/code-generator/_examples/crd/apis/example2/v1/types.go new file mode 100644 index 00000000..5c2ebc4d --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/apis/example2/v1/types.go @@ -0,0 +1,47 @@ +/* +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 v1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// TestType is a top-level type. A client is created for it. +type TestType struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + // +optional + Status TestTypeStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// TestTypeList is a top-level list type. The client methods for lists are automatically created. +// You are not supposed to create a separated client for this one. +type TestTypeList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + Items []TestType `json:"items"` +} + +type TestTypeStatus struct { + Blah string +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/apis/example2/v1/zz_generated.deepcopy.go b/vendor/k8s.io/code-generator/_examples/crd/apis/example2/v1/zz_generated.deepcopy.go new file mode 100644 index 00000000..dae52ff1 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/apis/example2/v1/zz_generated.deepcopy.go @@ -0,0 +1,101 @@ +// +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 ( + 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 *TestType) DeepCopyInto(out *TestType) { + *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 TestType. +func (in *TestType) DeepCopy() *TestType { + if in == nil { + return nil + } + out := new(TestType) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestType) 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 *TestTypeList) DeepCopyInto(out *TestTypeList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TestType, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTypeList. +func (in *TestTypeList) DeepCopy() *TestTypeList { + if in == nil { + return nil + } + out := new(TestTypeList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestTypeList) 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 *TestTypeStatus) DeepCopyInto(out *TestTypeStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestTypeStatus. +func (in *TestTypeStatus) DeepCopy() *TestTypeStatus { + if in == nil { + return nil + } + out := new(TestTypeStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/apis/example2/v1/zz_generated.defaults.go b/vendor/k8s.io/code-generator/_examples/crd/apis/example2/v1/zz_generated.defaults.go new file mode 100644 index 00000000..cce2e603 --- /dev/null +++ b/vendor/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/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/clientset.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/clientset.go new file mode 100644 index 00000000..034e06ad --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/clientset.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 versioned + +import ( + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" + examplev1 "k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1" + secondexamplev1 "k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + ExampleV1() examplev1.ExampleV1Interface + // Deprecated: please explicitly pick a version if possible. + Example() examplev1.ExampleV1Interface + SecondExampleV1() secondexamplev1.SecondExampleV1Interface + // Deprecated: please explicitly pick a version if possible. + SecondExample() secondexamplev1.SecondExampleV1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + exampleV1 *examplev1.ExampleV1Client + secondExampleV1 *secondexamplev1.SecondExampleV1Client +} + +// ExampleV1 retrieves the ExampleV1Client +func (c *Clientset) ExampleV1() examplev1.ExampleV1Interface { + return c.exampleV1 +} + +// Deprecated: Example retrieves the default version of ExampleClient. +// Please explicitly pick a version. +func (c *Clientset) Example() examplev1.ExampleV1Interface { + return c.exampleV1 +} + +// SecondExampleV1 retrieves the SecondExampleV1Client +func (c *Clientset) SecondExampleV1() secondexamplev1.SecondExampleV1Interface { + return c.secondExampleV1 +} + +// Deprecated: SecondExample retrieves the default version of SecondExampleClient. +// Please explicitly pick a version. +func (c *Clientset) SecondExample() secondexamplev1.SecondExampleV1Interface { + return c.secondExampleV1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.exampleV1, err = examplev1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + cs.secondExampleV1, err = secondexamplev1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.exampleV1 = examplev1.NewForConfigOrDie(c) + cs.secondExampleV1 = secondexamplev1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.exampleV1 = examplev1.New(c) + cs.secondExampleV1 = secondexamplev1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/doc.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/doc.go new file mode 100644 index 00000000..41721ca5 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/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 clientset. +package versioned diff --git a/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/clientset_generated.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 00000000..4ad8bba7 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/clientset_generated.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 client-gen. DO NOT EDIT. + +package fake + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/discovery" + fakediscovery "k8s.io/client-go/discovery/fake" + "k8s.io/client-go/testing" + clientset "k8s.io/code-generator/_examples/crd/clientset/versioned" + examplev1 "k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1" + fakeexamplev1 "k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake" + secondexamplev1 "k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1" + fakesecondexamplev1 "k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + 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 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 Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +var _ clientset.Interface = &Clientset{} + +// ExampleV1 retrieves the ExampleV1Client +func (c *Clientset) ExampleV1() examplev1.ExampleV1Interface { + return &fakeexamplev1.FakeExampleV1{Fake: &c.Fake} +} + +// Example retrieves the ExampleV1Client +func (c *Clientset) Example() examplev1.ExampleV1Interface { + return &fakeexamplev1.FakeExampleV1{Fake: &c.Fake} +} + +// SecondExampleV1 retrieves the SecondExampleV1Client +func (c *Clientset) SecondExampleV1() secondexamplev1.SecondExampleV1Interface { + return &fakesecondexamplev1.FakeSecondExampleV1{Fake: &c.Fake} +} + +// SecondExample retrieves the SecondExampleV1Client +func (c *Clientset) SecondExample() secondexamplev1.SecondExampleV1Interface { + return &fakesecondexamplev1.FakeSecondExampleV1{Fake: &c.Fake} +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/doc.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/doc.go new file mode 100644 index 00000000..9b99e716 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/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. + +// This package has the automatically generated fake clientset. +package fake diff --git a/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/register.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/register.go new file mode 100644 index 00000000..d91e79da --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/register.go @@ -0,0 +1,56 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + examplev1 "k8s.io/code-generator/_examples/crd/apis/example/v1" + secondexamplev1 "k8s.io/code-generator/_examples/crd/apis/example2/v1" +) + +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) +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// 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) +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/scheme/doc.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/scheme/doc.go new file mode 100644 index 00000000..7dc37561 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/scheme/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 contains the scheme of the automatically generated clientset. +package scheme diff --git a/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/scheme/register.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/scheme/register.go new file mode 100644 index 00000000..7a5ad4f8 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/scheme/register.go @@ -0,0 +1,56 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 scheme + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + examplev1 "k8s.io/code-generator/_examples/crd/apis/example/v1" + secondexamplev1 "k8s.io/code-generator/_examples/crd/apis/example2/v1" +) + +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) +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// 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) +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go new file mode 100644 index 00000000..a55b859e --- /dev/null +++ b/vendor/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 ( + meta_v1 "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 *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.ClusterTestType, error) + List(opts meta_v1.ListOptions) (*v1.ClusterTestTypeList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterTestType, err error) + GetScale(clusterTestTypeName string, options meta_v1.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 meta_v1.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 meta_v1.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 meta_v1.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 *meta_v1.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 *meta_v1.DeleteOptions, listOptions meta_v1.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 meta_v1.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/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/doc.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/doc.go new file mode 100644 index 00000000..3af5d054 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/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 v1 diff --git a/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/example_client.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/example_client.go new file mode 100644 index 00000000..25d80728 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/example_client.go @@ -0,0 +1,95 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" + v1 "k8s.io/code-generator/_examples/crd/apis/example/v1" + "k8s.io/code-generator/_examples/crd/clientset/versioned/scheme" +) + +type ExampleV1Interface interface { + RESTClient() rest.Interface + ClusterTestTypesGetter + TestTypesGetter +} + +// ExampleV1Client is used to interact with features provided by the example.crd.code-generator.k8s.io group. +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) +} + +// NewForConfig creates a new ExampleV1Client for the given config. +func NewForConfig(c *rest.Config) (*ExampleV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &ExampleV1Client{client}, nil +} + +// NewForConfigOrDie creates a new ExampleV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *ExampleV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new ExampleV1Client for the given RESTClient. +func New(c rest.Interface) *ExampleV1Client { + return &ExampleV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.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 *ExampleV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/doc.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/doc.go new file mode 100644 index 00000000..16f44399 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/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/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_clustertesttype.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_clustertesttype.go new file mode 100644 index 00000000..66eda8bc --- /dev/null +++ b/vendor/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" + example_v1 "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 *example_v1.ClusterTestType, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(clustertesttypesResource, name), &example_v1.ClusterTestType{}) + if obj == nil { + return nil, err + } + return obj.(*example_v1.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 *example_v1.ClusterTestTypeList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(clustertesttypesResource, clustertesttypesKind, opts), &example_v1.ClusterTestTypeList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &example_v1.ClusterTestTypeList{ListMeta: obj.(*example_v1.ClusterTestTypeList).ListMeta} + for _, item := range obj.(*example_v1.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 *example_v1.ClusterTestType) (result *example_v1.ClusterTestType, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(clustertesttypesResource, clusterTestType), &example_v1.ClusterTestType{}) + if obj == nil { + return nil, err + } + return obj.(*example_v1.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 *example_v1.ClusterTestType) (result *example_v1.ClusterTestType, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(clustertesttypesResource, clusterTestType), &example_v1.ClusterTestType{}) + if obj == nil { + return nil, err + } + return obj.(*example_v1.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 *example_v1.ClusterTestType) (*example_v1.ClusterTestType, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(clustertesttypesResource, "status", clusterTestType), &example_v1.ClusterTestType{}) + if obj == nil { + return nil, err + } + return obj.(*example_v1.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), &example_v1.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, &example_v1.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 *example_v1.ClusterTestType, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clustertesttypesResource, name, data, subresources...), &example_v1.ClusterTestType{}) + if obj == nil { + return nil, err + } + return obj.(*example_v1.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/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_example_client.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_example_client.go new file mode 100644 index 00000000..e6aa9999 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_example_client.go @@ -0,0 +1,44 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 ( + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" + v1 "k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1" +) + +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} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeExampleV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_testtype.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_testtype.go new file mode 100644 index 00000000..d925d9b3 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_testtype.go @@ -0,0 +1,140 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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" + example_v1 "k8s.io/code-generator/_examples/crd/apis/example/v1" +) + +// FakeTestTypes implements TestTypeInterface +type FakeTestTypes struct { + Fake *FakeExampleV1 + ns string +} + +var testtypesResource = schema.GroupVersionResource{Group: "example.crd.code-generator.k8s.io", Version: "v1", Resource: "testtypes"} + +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) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(testtypesResource, c.ns, name), &example_v1.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example_v1.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) { + obj, err := c.Fake. + Invokes(testing.NewListAction(testtypesResource, testtypesKind, c.ns, opts), &example_v1.TestTypeList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &example_v1.TestTypeList{ListMeta: obj.(*example_v1.TestTypeList).ListMeta} + for _, item := range obj.(*example_v1.TestTypeList).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 testTypes. +func (c *FakeTestTypes) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(testtypesResource, c.ns, opts)) + +} + +// 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) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &example_v1.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example_v1.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) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &example_v1.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example_v1.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) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &example_v1.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example_v1.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{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +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{}) + 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) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, data, subresources...), &example_v1.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example_v1.TestType), err +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/generated_expansion.go similarity index 66% rename from vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto rename to vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/generated_expansion.go index 8655f481..3059734a 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/generated_expansion.go @@ -14,15 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. -// This file was autogenerated by go-to-protobuf. Do not edit it manually! +package v1 -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"; +type ClusterTestTypeExpansion interface{} +type TestTypeExpansion interface{} diff --git a/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/testtype.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/testtype.go new file mode 100644 index 00000000..b5b510ff --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/testtype.go @@ -0,0 +1,174 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 ( + meta_v1 "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" +) + +// TestTypesGetter has a method to return a TestTypeInterface. +// A group's client should implement this interface. +type TestTypesGetter interface { + TestTypes(namespace string) TestTypeInterface +} + +// TestTypeInterface has methods to work with TestType resources. +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) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) + TestTypeExpansion +} + +// testTypes implements TestTypeInterface +type testTypes struct { + client rest.Interface + ns string +} + +// newTestTypes returns a TestTypes +func newTestTypes(c *ExampleV1Client, namespace string) *testTypes { + return &testTypes{ + client: c.RESTClient(), + ns: namespace, + } +} + +// 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) { + result = &v1.TestType{} + err = c.client.Get(). + Namespace(c.ns). + Resource("testtypes"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// 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) { + result = &v1.TestTypeList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested testTypes. +func (c *testTypes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// 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 *testTypes) Create(testType *v1.TestType) (result *v1.TestType, err error) { + result = &v1.TestType{} + err = c.client.Post(). + Namespace(c.ns). + Resource("testtypes"). + Body(testType). + Do(). + Into(result) + return +} + +// 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 *testTypes) Update(testType *v1.TestType) (result *v1.TestType, err error) { + result = &v1.TestType{} + err = c.client.Put(). + Namespace(c.ns). + Resource("testtypes"). + Name(testType.Name). + Body(testType). + 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 *testTypes) UpdateStatus(testType *v1.TestType) (result *v1.TestType, err error) { + result = &v1.TestType{} + err = c.client.Put(). + Namespace(c.ns). + Resource("testtypes"). + Name(testType.Name). + SubResource("status"). + Body(testType). + Do(). + Into(result) + return +} + +// 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 { + return c.client.Delete(). + Namespace(c.ns). + Resource("testtypes"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *testTypes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("testtypes"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched testType. +func (c *testTypes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) { + result = &v1.TestType{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("testtypes"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/doc.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/doc.go new file mode 100644 index 00000000..3af5d054 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/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 v1 diff --git a/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/example2_client.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/example2_client.go new file mode 100644 index 00000000..210b6509 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/example2_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 v1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" + v1 "k8s.io/code-generator/_examples/crd/apis/example2/v1" + "k8s.io/code-generator/_examples/crd/clientset/versioned/scheme" +) + +type SecondExampleV1Interface interface { + RESTClient() rest.Interface + TestTypesGetter +} + +// SecondExampleV1Client is used to interact with features provided by the example.test.crd.code-generator.k8s.io group. +type SecondExampleV1Client struct { + restClient rest.Interface +} + +func (c *SecondExampleV1Client) TestTypes(namespace string) TestTypeInterface { + return newTestTypes(c, namespace) +} + +// NewForConfig creates a new SecondExampleV1Client for the given config. +func NewForConfig(c *rest.Config) (*SecondExampleV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &SecondExampleV1Client{client}, nil +} + +// NewForConfigOrDie creates a new SecondExampleV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *SecondExampleV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new SecondExampleV1Client for the given RESTClient. +func New(c rest.Interface) *SecondExampleV1Client { + return &SecondExampleV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.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 *SecondExampleV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/doc.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/doc.go new file mode 100644 index 00000000..16f44399 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/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/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/fake_example2_client.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/fake_example2_client.go new file mode 100644 index 00000000..0d55a6b8 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/fake_example2_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 ( + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" + v1 "k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1" +) + +type FakeSecondExampleV1 struct { + *testing.Fake +} + +func (c *FakeSecondExampleV1) TestTypes(namespace string) v1.TestTypeInterface { + return &FakeTestTypes{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeSecondExampleV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/fake_testtype.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/fake_testtype.go new file mode 100644 index 00000000..8a51cbf8 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/fake_testtype.go @@ -0,0 +1,140 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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" + example2_v1 "k8s.io/code-generator/_examples/crd/apis/example2/v1" +) + +// FakeTestTypes implements TestTypeInterface +type FakeTestTypes struct { + Fake *FakeSecondExampleV1 + ns string +} + +var testtypesResource = schema.GroupVersionResource{Group: "example.test.crd.code-generator.k8s.io", Version: "v1", Resource: "testtypes"} + +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) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(testtypesResource, c.ns, name), &example2_v1.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example2_v1.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) { + obj, err := c.Fake. + Invokes(testing.NewListAction(testtypesResource, testtypesKind, c.ns, opts), &example2_v1.TestTypeList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &example2_v1.TestTypeList{ListMeta: obj.(*example2_v1.TestTypeList).ListMeta} + for _, item := range obj.(*example2_v1.TestTypeList).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 testTypes. +func (c *FakeTestTypes) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(testtypesResource, c.ns, opts)) + +} + +// 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) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &example2_v1.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example2_v1.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) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &example2_v1.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example2_v1.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) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &example2_v1.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example2_v1.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{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +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{}) + 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) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, data, subresources...), &example2_v1.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*example2_v1.TestType), err +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/generated_expansion.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/generated_expansion.go new file mode 100644 index 00000000..d513810d --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/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 v1 + +type TestTypeExpansion interface{} diff --git a/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/testtype.go b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/testtype.go new file mode 100644 index 00000000..9691956e --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/testtype.go @@ -0,0 +1,174 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 ( + meta_v1 "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/example2/v1" + scheme "k8s.io/code-generator/_examples/crd/clientset/versioned/scheme" +) + +// TestTypesGetter has a method to return a TestTypeInterface. +// A group's client should implement this interface. +type TestTypesGetter interface { + TestTypes(namespace string) TestTypeInterface +} + +// TestTypeInterface has methods to work with TestType resources. +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) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) + TestTypeExpansion +} + +// testTypes implements TestTypeInterface +type testTypes struct { + client rest.Interface + ns string +} + +// newTestTypes returns a TestTypes +func newTestTypes(c *SecondExampleV1Client, namespace string) *testTypes { + return &testTypes{ + client: c.RESTClient(), + ns: namespace, + } +} + +// 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) { + result = &v1.TestType{} + err = c.client.Get(). + Namespace(c.ns). + Resource("testtypes"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// 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) { + result = &v1.TestTypeList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested testTypes. +func (c *testTypes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// 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 *testTypes) Create(testType *v1.TestType) (result *v1.TestType, err error) { + result = &v1.TestType{} + err = c.client.Post(). + Namespace(c.ns). + Resource("testtypes"). + Body(testType). + Do(). + Into(result) + return +} + +// 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 *testTypes) Update(testType *v1.TestType) (result *v1.TestType, err error) { + result = &v1.TestType{} + err = c.client.Put(). + Namespace(c.ns). + Resource("testtypes"). + Name(testType.Name). + Body(testType). + 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 *testTypes) UpdateStatus(testType *v1.TestType) (result *v1.TestType, err error) { + result = &v1.TestType{} + err = c.client.Put(). + Namespace(c.ns). + Resource("testtypes"). + Name(testType.Name). + SubResource("status"). + Body(testType). + Do(). + Into(result) + return +} + +// 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 { + return c.client.Delete(). + Namespace(c.ns). + Resource("testtypes"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *testTypes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("testtypes"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched testType. +func (c *testTypes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) { + result = &v1.TestType{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("testtypes"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example/interface.go b/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example/interface.go new file mode 100644 index 00000000..10c18944 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example/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 example + +import ( + v1 "k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1" + internalinterfaces "k8s.io/code-generator/_examples/crd/informers/externalversions/internalinterfaces" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1 provides access to shared informers for resources in V1. + V1() v1.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} +} + +// V1 returns a new v1.Interface. +func (g *group) V1() v1.Interface { + return v1.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/clustertesttype.go b/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/clustertesttype.go new file mode 100644 index 00000000..cef599f4 --- /dev/null +++ b/vendor/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" + + meta_v1 "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" + 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 meta_v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ExampleV1().ClusterTestTypes().List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ExampleV1().ClusterTestTypes().Watch(options) + }, + }, + &example_v1.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(&example_v1.ClusterTestType{}, f.defaultInformer) +} + +func (f *clusterTestTypeInformer) Lister() v1.ClusterTestTypeLister { + return v1.NewClusterTestTypeLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/interface.go b/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/interface.go new file mode 100644 index 00000000..1e17b132 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/interface.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. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1 + +import ( + internalinterfaces "k8s.io/code-generator/_examples/crd/informers/externalversions/internalinterfaces" +) + +// 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 +} + +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} +} + +// 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/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/testtype.go b/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/testtype.go new file mode 100644 index 00000000..04aa7833 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/testtype.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 v1 + +import ( + time "time" + + meta_v1 "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" + 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" +) + +// TestTypeInformer provides access to a shared informer and lister for +// TestTypes. +type TestTypeInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.TestTypeLister +} + +type testTypeInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// 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 versioned.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 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) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ExampleV1().TestTypes(namespace).List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ExampleV1().TestTypes(namespace).Watch(options) + }, + }, + &example_v1.TestType{}, + resyncPeriod, + indexers, + ) +} + +func (f *testTypeInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredTestTypeInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *testTypeInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&example_v1.TestType{}, f.defaultInformer) +} + +func (f *testTypeInformer) Lister() v1.TestTypeLister { + return v1.NewTestTypeLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/interface.go b/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/interface.go new file mode 100644 index 00000000..9e00c7b8 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/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 example + +import ( + v1 "k8s.io/code-generator/_examples/crd/informers/externalversions/example2/v1" + internalinterfaces "k8s.io/code-generator/_examples/crd/informers/externalversions/internalinterfaces" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1 provides access to shared informers for resources in V1. + V1() v1.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} +} + +// V1 returns a new v1.Interface. +func (g *group) V1() v1.Interface { + return v1.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/v1/interface.go b/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/v1/interface.go new file mode 100644 index 00000000..02435228 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/v1/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 v1 + +import ( + internalinterfaces "k8s.io/code-generator/_examples/crd/informers/externalversions/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // TestTypes returns a TestTypeInformer. + TestTypes() TestTypeInformer +} + +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} +} + +// TestTypes returns a TestTypeInformer. +func (v *version) TestTypes() TestTypeInformer { + return &testTypeInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/v1/testtype.go b/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/v1/testtype.go new file mode 100644 index 00000000..095237c4 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/v1/testtype.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 v1 + +import ( + time "time" + + meta_v1 "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" + 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" +) + +// TestTypeInformer provides access to a shared informer and lister for +// TestTypes. +type TestTypeInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.TestTypeLister +} + +type testTypeInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// 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 versioned.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 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) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SecondExampleV1().TestTypes(namespace).List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SecondExampleV1().TestTypes(namespace).Watch(options) + }, + }, + &example2_v1.TestType{}, + resyncPeriod, + indexers, + ) +} + +func (f *testTypeInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredTestTypeInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *testTypeInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&example2_v1.TestType{}, f.defaultInformer) +} + +func (f *testTypeInformer) Lister() v1.TestTypeLister { + return v1.NewTestTypeLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/factory.go b/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/factory.go new file mode 100644 index 00000000..7d6d1f93 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/factory.go @@ -0,0 +1,186 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 externalversions + +import ( + reflect "reflect" + sync "sync" + time "time" + + 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" + versioned "k8s.io/code-generator/_examples/crd/clientset/versioned" + example "k8s.io/code-generator/_examples/crd/informers/externalversions/example" + example2 "k8s.io/code-generator/_examples/crd/informers/externalversions/example2" + 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. + // This allows Start() to be called multiple times safely. + startedInformers map[reflect.Type]bool +} + +// 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 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. +func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { + f.lock.Lock() + defer f.lock.Unlock() + + for informerType, informer := range f.informers { + if !f.startedInformers[informerType] { + go informer.Run(stopCh) + f.startedInformers[informerType] = true + } + } +} + +// WaitForCacheSync waits for all started informers' cache were synced. +func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { + informers := func() map[reflect.Type]cache.SharedIndexInformer { + f.lock.Lock() + defer f.lock.Unlock() + + informers := map[reflect.Type]cache.SharedIndexInformer{} + for informerType, informer := range f.informers { + if f.startedInformers[informerType] { + informers[informerType] = informer + } + } + return informers + }() + + res := map[reflect.Type]bool{} + for informType, informer := range informers { + res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced) + } + return res +} + +// InternalInformerFor returns the SharedIndexInformer for obj using an internal +// client. +func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { + f.lock.Lock() + defer f.lock.Unlock() + + informerType := reflect.TypeOf(obj) + informer, exists := f.informers[informerType] + if exists { + return informer + } + + resyncPeriod, exists := f.customResync[informerType] + if !exists { + resyncPeriod = f.defaultResync + } + + informer = newFunc(f.client, resyncPeriod) + f.informers[informerType] = informer + + return informer +} + +// SharedInformerFactory provides shared informers for resources in all known +// API group versions. +type SharedInformerFactory interface { + internalinterfaces.SharedInformerFactory + ForResource(resource schema.GroupVersionResource) (GenericInformer, error) + WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool + + Example() example.Interface + SecondExample() example2.Interface +} + +func (f *sharedInformerFactory) Example() example.Interface { + return example.New(f, f.namespace, f.tweakListOptions) +} + +func (f *sharedInformerFactory) SecondExample() example2.Interface { + return example2.New(f, f.namespace, f.tweakListOptions) +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/generic.go b/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/generic.go new file mode 100644 index 00000000..d89bd2a7 --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/generic.go @@ -0,0 +1,69 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 externalversions + +import ( + "fmt" + + 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" +) + +// GenericInformer is type of SharedIndexInformer which will locate and delegate to other +// sharedInformers based on type +type GenericInformer interface { + Informer() cache.SharedIndexInformer + Lister() cache.GenericLister +} + +type genericInformer struct { + informer cache.SharedIndexInformer + resource schema.GroupResource +} + +// Informer returns the SharedIndexInformer. +func (f *genericInformer) Informer() cache.SharedIndexInformer { + return f.informer +} + +// Lister returns the GenericLister. +func (f *genericInformer) Lister() cache.GenericLister { + return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource) +} + +// ForResource gives generic access to a shared informer of the matching type +// TODO extend this to unknown resources with a client pool +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"): + return &genericInformer{resource: resource.GroupResource(), informer: f.SecondExample().V1().TestTypes().Informer()}, nil + + } + + return nil, fmt.Errorf("no informer found for %v", resource) +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/internalinterfaces/factory_interfaces.go b/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/internalinterfaces/factory_interfaces.go new file mode 100644 index 00000000..02e0d6ac --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -0,0 +1,38 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 internalinterfaces + +import ( + time "time" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + cache "k8s.io/client-go/tools/cache" + versioned "k8s.io/code-generator/_examples/crd/clientset/versioned" +) + +type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer + +// SharedInformerFactory a small interface to allow for adding an informer without an import cycle +type SharedInformerFactory interface { + Start(stopCh <-chan struct{}) + InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer +} + +type TweakListOptionsFunc func(*v1.ListOptions) diff --git a/vendor/k8s.io/code-generator/_examples/crd/listers/example/v1/clustertesttype.go b/vendor/k8s.io/code-generator/_examples/crd/listers/example/v1/clustertesttype.go new file mode 100644 index 00000000..584b3b27 --- /dev/null +++ b/vendor/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/vendor/k8s.io/code-generator/_examples/crd/listers/example/v1/expansion_generated.go b/vendor/k8s.io/code-generator/_examples/crd/listers/example/v1/expansion_generated.go new file mode 100644 index 00000000..2681a29f --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/listers/example/v1/expansion_generated.go @@ -0,0 +1,31 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 + +// ClusterTestTypeListerExpansion allows custom methods to be added to +// ClusterTestTypeLister. +type ClusterTestTypeListerExpansion interface{} + +// TestTypeListerExpansion allows custom methods to be added to +// TestTypeLister. +type TestTypeListerExpansion interface{} + +// TestTypeNamespaceListerExpansion allows custom methods to be added to +// TestTypeNamespaceLister. +type TestTypeNamespaceListerExpansion interface{} diff --git a/vendor/k8s.io/code-generator/_examples/crd/listers/example/v1/testtype.go b/vendor/k8s.io/code-generator/_examples/crd/listers/example/v1/testtype.go new file mode 100644 index 00000000..7055b6cc --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/listers/example/v1/testtype.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 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" +) + +// TestTypeLister helps list TestTypes. +type TestTypeLister interface { + // List lists all TestTypes in the indexer. + List(selector labels.Selector) (ret []*v1.TestType, err error) + // TestTypes returns an object that can list and get TestTypes. + TestTypes(namespace string) TestTypeNamespaceLister + TestTypeListerExpansion +} + +// testTypeLister implements the TestTypeLister interface. +type testTypeLister struct { + indexer cache.Indexer +} + +// NewTestTypeLister returns a new TestTypeLister. +func NewTestTypeLister(indexer cache.Indexer) TestTypeLister { + return &testTypeLister{indexer: indexer} +} + +// List lists all TestTypes in the indexer. +func (s *testTypeLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.TestType)) + }) + return ret, err +} + +// TestTypes returns an object that can list and get TestTypes. +func (s *testTypeLister) TestTypes(namespace string) TestTypeNamespaceLister { + return testTypeNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// TestTypeNamespaceLister helps list and get TestTypes. +type TestTypeNamespaceLister interface { + // List lists all TestTypes in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1.TestType, err error) + // Get retrieves the TestType from the indexer for a given namespace and name. + Get(name string) (*v1.TestType, error) + TestTypeNamespaceListerExpansion +} + +// testTypeNamespaceLister implements the TestTypeNamespaceLister +// interface. +type testTypeNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all TestTypes in the indexer for a given namespace. +func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.TestType)) + }) + return ret, err +} + +// Get retrieves the TestType from the indexer for a given namespace and name. +func (s testTypeNamespaceLister) Get(name string) (*v1.TestType, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1.Resource("testtype"), name) + } + return obj.(*v1.TestType), nil +} diff --git a/vendor/k8s.io/code-generator/_examples/crd/listers/example2/v1/expansion_generated.go b/vendor/k8s.io/code-generator/_examples/crd/listers/example2/v1/expansion_generated.go new file mode 100644 index 00000000..0192e05f --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/listers/example2/v1/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 v1 + +// TestTypeListerExpansion allows custom methods to be added to +// TestTypeLister. +type TestTypeListerExpansion interface{} + +// TestTypeNamespaceListerExpansion allows custom methods to be added to +// TestTypeNamespaceLister. +type TestTypeNamespaceListerExpansion interface{} diff --git a/vendor/k8s.io/code-generator/_examples/crd/listers/example2/v1/testtype.go b/vendor/k8s.io/code-generator/_examples/crd/listers/example2/v1/testtype.go new file mode 100644 index 00000000..d3b15c0b --- /dev/null +++ b/vendor/k8s.io/code-generator/_examples/crd/listers/example2/v1/testtype.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 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/example2/v1" +) + +// TestTypeLister helps list TestTypes. +type TestTypeLister interface { + // List lists all TestTypes in the indexer. + List(selector labels.Selector) (ret []*v1.TestType, err error) + // TestTypes returns an object that can list and get TestTypes. + TestTypes(namespace string) TestTypeNamespaceLister + TestTypeListerExpansion +} + +// testTypeLister implements the TestTypeLister interface. +type testTypeLister struct { + indexer cache.Indexer +} + +// NewTestTypeLister returns a new TestTypeLister. +func NewTestTypeLister(indexer cache.Indexer) TestTypeLister { + return &testTypeLister{indexer: indexer} +} + +// List lists all TestTypes in the indexer. +func (s *testTypeLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.TestType)) + }) + return ret, err +} + +// TestTypes returns an object that can list and get TestTypes. +func (s *testTypeLister) TestTypes(namespace string) TestTypeNamespaceLister { + return testTypeNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// TestTypeNamespaceLister helps list and get TestTypes. +type TestTypeNamespaceLister interface { + // List lists all TestTypes in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1.TestType, err error) + // Get retrieves the TestType from the indexer for a given namespace and name. + Get(name string) (*v1.TestType, error) + TestTypeNamespaceListerExpansion +} + +// testTypeNamespaceLister implements the TestTypeNamespaceLister +// interface. +type testTypeNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all TestTypes in the indexer for a given namespace. +func (s testTypeNamespaceLister) List(selector labels.Selector) (ret []*v1.TestType, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.TestType)) + }) + return ret, err +} + +// Get retrieves the TestType from the indexer for a given namespace and name. +func (s testTypeNamespaceLister) Get(name string) (*v1.TestType, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1.Resource("testtype"), name) + } + return obj.(*v1.TestType), nil +} diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/args/gvpackages_test.go b/vendor/k8s.io/code-generator/cmd/client-gen/args/gvpackages_test.go deleted file mode 100644 index f8891bec..00000000 --- a/vendor/k8s.io/code-generator/cmd/client-gen/args/gvpackages_test.go +++ /dev/null @@ -1,116 +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 args - -import ( - "fmt" - "reflect" - "strings" - "testing" - - "github.com/spf13/pflag" - - "k8s.io/code-generator/cmd/client-gen/types" -) - -func TestGVPackageFlag(t *testing.T) { - tests := []struct { - args []string - def []string - importBasePath string - expected map[types.GroupVersion]string - expectedGroups []types.GroupVersions - parseError string - }{ - { - args: []string{}, - expected: map[types.GroupVersion]string{}, - expectedGroups: []types.GroupVersions{}, - }, - { - args: []string{"foo/bar/v1", "foo/bar/v2", "foo/bar/", "foo/v1"}, - expectedGroups: []types.GroupVersions{ - {PackageName: "bar", Group: types.Group("bar"), Versions: []types.PackageVersion{ - {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{ - {Version: "v1", Package: "foo/v1"}, - }}, - }, - }, - { - args: []string{"foo/bar/v1", "foo/bar/v2", "foo/bar/", "foo/v1"}, - def: []string{"foo/bar/v1alpha1", "foo/v1"}, - expectedGroups: []types.GroupVersions{ - {PackageName: "bar", Group: types.Group("bar"), Versions: []types.PackageVersion{ - {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{ - {Version: "v1", Package: "foo/v1"}, - }}, - }, - }, - { - args: []string{"api/v1", "api"}, - expectedGroups: []types.GroupVersions{ - {PackageName: "core", Group: types.Group("api"), Versions: []types.PackageVersion{ - {Version: "v1", Package: "core/v1"}, - {Version: "", Package: "core"}, - }}, - }, - }, - { - args: []string{"foo/v1"}, - importBasePath: "k8s.io/api", - expectedGroups: []types.GroupVersions{ - {PackageName: "foo", Group: types.Group("foo"), Versions: []types.PackageVersion{ - {Version: "v1", Package: "k8s.io/api/foo/v1"}, - }}, - }, - }, - } - for i, test := range tests { - fs := pflag.NewFlagSet("testGVPackage", pflag.ContinueOnError) - groups := []types.GroupVersions{} - builder := NewGroupVersionsBuilder(&groups) - fs.Var(NewGVPackagesValue(builder, test.def), "input", "usage") - fs.Var(NewInputBasePathValue(builder, test.importBasePath), "input-base-path", "usage") - - args := []string{} - for _, a := range test.args { - args = append(args, fmt.Sprintf("--input=%s", a)) - } - - err := fs.Parse(args) - if test.parseError != "" { - if err == nil { - t.Errorf("%d: expected error %q, got nil", i, test.parseError) - } else if !strings.Contains(err.Error(), test.parseError) { - t.Errorf("%d: expected error %q, got %q", i, test.parseError, err) - } - } else if err != nil { - t.Errorf("%d: expected nil error, got %v", i, err) - } - if !reflect.DeepEqual(groups, test.expectedGroups) { - t.Errorf("%d: expected groups %+v, got groups %+v", i, test.expectedGroups, groups) - } - } -} diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/util/tags_test.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/util/tags_test.go deleted file mode 100644 index a5c93875..00000000 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/util/tags_test.go +++ /dev/null @@ -1,148 +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 util - -import ( - "reflect" - "testing" -) - -func TestParseTags(t *testing.T) { - testCases := map[string]struct { - lines []string - expectTags Tags - expectError bool - }{ - "genclient": { - lines: []string{`+genclient`}, - expectTags: Tags{GenerateClient: true}, - }, - "genclient=true": { - lines: []string{`+genclient=true`}, - expectError: true, - }, - "nonNamespaced=true": { - lines: []string{`+genclient=true`, `+nonNamespaced=true`}, - expectError: true, - }, - "readonly=true": { - lines: []string{`+genclient=true`, `+readonly=true`}, - expectError: true, - }, - "genclient:nonNamespaced": { - lines: []string{`+genclient`, `+genclient:nonNamespaced`}, - expectTags: Tags{GenerateClient: true, NonNamespaced: true}, - }, - "genclient:noVerbs": { - lines: []string{`+genclient`, `+genclient:noVerbs`}, - expectTags: Tags{GenerateClient: true, NoVerbs: true}, - }, - "genclient:noStatus": { - lines: []string{`+genclient`, `+genclient:noStatus`}, - expectTags: Tags{GenerateClient: true, NoStatus: true}, - }, - "genclient:onlyVerbs": { - lines: []string{`+genclient`, `+genclient:onlyVerbs=create,delete`}, - expectTags: Tags{GenerateClient: true, SkipVerbs: []string{"update", "updateStatus", "deleteCollection", "get", "list", "watch", "patch"}}, - }, - "genclient:readonly": { - lines: []string{`+genclient`, `+genclient:readonly`}, - expectTags: Tags{GenerateClient: true, SkipVerbs: []string{"create", "update", "updateStatus", "delete", "deleteCollection", "patch"}}, - }, - "genclient:conflict": { - lines: []string{`+genclient`, `+genclient:onlyVerbs=create`, `+genclient:skipVerbs=create`}, - expectError: true, - }, - "genclient:invalid": { - lines: []string{`+genclient`, `+genclient:invalid`}, - expectError: true, - }, - } - for key, c := range testCases { - result, err := ParseClientGenTags(c.lines) - if err != nil && !c.expectError { - t.Fatalf("unexpected error: %v", err) - } - if !c.expectError && !reflect.DeepEqual(result, c.expectTags) { - t.Errorf("[%s] expected %#v to be %#v", key, result, c.expectTags) - } - } -} - -func TestParseTagsExtension(t *testing.T) { - testCases := map[string]struct { - lines []string - expectedExtensions []extension - expectError bool - }{ - "simplest extension": { - lines: []string{`+genclient:method=Foo,verb=create`}, - expectedExtensions: []extension{{VerbName: "Foo", VerbType: "create"}}, - }, - "multiple extensions": { - lines: []string{`+genclient:method=Foo,verb=create`, `+genclient:method=Bar,verb=get`}, - expectedExtensions: []extension{{VerbName: "Foo", VerbType: "create"}, {VerbName: "Bar", VerbType: "get"}}, - }, - "extension without verb": { - lines: []string{`+genclient:method`}, - expectError: true, - }, - "extension without verb type": { - lines: []string{`+genclient:method=Foo`}, - expectError: true, - }, - "sub-resource extension": { - lines: []string{`+genclient:method=Foo,verb=create,subresource=bar`}, - expectedExtensions: []extension{{VerbName: "Foo", VerbType: "create", SubResourcePath: "bar"}}, - }, - "output type extension": { - lines: []string{`+genclient:method=Foos,verb=list,result=Bars`}, - expectedExtensions: []extension{{VerbName: "Foos", VerbType: "list", ResultTypeOverride: "Bars"}}, - }, - "input type extension": { - lines: []string{`+genclient:method=Foo,verb=update,input=Bar`}, - expectedExtensions: []extension{{VerbName: "Foo", VerbType: "update", InputTypeOverride: "Bar"}}, - }, - "unknown verb type extension": { - lines: []string{`+genclient:method=Foo,verb=explode`}, - expectedExtensions: nil, - expectError: true, - }, - "invalid verb extension": { - lines: []string{`+genclient:method=Foo,unknown=bar`}, - expectedExtensions: nil, - expectError: true, - }, - "empty verb extension subresource": { - lines: []string{`+genclient:method=Foo,verb=get,subresource=`}, - expectedExtensions: nil, - expectError: true, - }, - } - for key, c := range testCases { - result, err := ParseClientGenTags(c.lines) - if err != nil && !c.expectError { - t.Fatalf("[%s] unexpected error: %v", key, err) - } - if err != nil && c.expectError { - t.Logf("[%s] got expected error: %+v", key, err) - } - if !c.expectError && !reflect.DeepEqual(result.Extensions, c.expectedExtensions) { - t.Errorf("[%s] expected %#+v to be %#+v", key, result.Extensions, c.expectedExtensions) - } - } -} diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/types/helpers_test.go b/vendor/k8s.io/code-generator/cmd/client-gen/types/helpers_test.go deleted file mode 100644 index dec62dff..00000000 --- a/vendor/k8s.io/code-generator/cmd/client-gen/types/helpers_test.go +++ /dev/null @@ -1,32 +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 types - -import ( - "reflect" - "sort" - "testing" -) - -func TestVersionSort(t *testing.T) { - unsortedVersions := []string{"v4beta1", "v2beta1", "v2alpha1", "v3", "v1"} - expected := []string{"v2alpha1", "v2beta1", "v4beta1", "v1", "v3"} - sort.Sort(sortableSliceOfVersions(unsortedVersions)) - if !reflect.DeepEqual(unsortedVersions, expected) { - t.Errorf("expected %#v\ngot %#v", expected, unsortedVersions) - } -} diff --git a/vendor/k8s.io/code-generator/cmd/conversion-gen/args/args.go b/vendor/k8s.io/code-generator/cmd/conversion-gen/args/args.go new file mode 100644 index 00000000..07ce6e72 --- /dev/null +++ b/vendor/k8s.io/code-generator/cmd/conversion-gen/args/args.go @@ -0,0 +1,83 @@ +/* +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 args + +import ( + "fmt" + + "github.com/spf13/pflag" + "k8s.io/gengo/args" +) + +// DefaultBasePeerDirs are the peer-dirs nearly everybody will use, i.e. those coming from +// apimachinery. +var DefaultBasePeerDirs = []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1", + "k8s.io/apimachinery/pkg/conversion", + "k8s.io/apimachinery/pkg/runtime", +} + +// CustomArgs is used by the gengo framework to pass args specific to this generator. +type CustomArgs struct { + // Base peer dirs which nearly everybody will use, i.e. outside of Kubernetes core. Peer dirs + // are declared to make the generator pick up manually written conversion funcs from external + // packages. + BasePeerDirs []string + + // Custom peer dirs which are application specific. Peer dirs are declared to make the + // generator pick up manually written conversion funcs from external packages. + ExtraPeerDirs []string + + // 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. + SkipUnsafe bool +} + +// NewDefaults returns default arguments for the generator. +func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { + genericArgs := args.Default().WithoutDefaultFlagParsing() + customArgs := &CustomArgs{ + BasePeerDirs: DefaultBasePeerDirs, + SkipUnsafe: false, + } + genericArgs.CustomArgs = customArgs + genericArgs.OutputFileBaseName = "conversion_generated" + return genericArgs, customArgs +} + +// AddFlags add the generator flags to the flag set. +func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet) { + pflag.CommandLine.StringSliceVar(&ca.BasePeerDirs, "base-peer-dirs", ca.BasePeerDirs, + "Comma-separated list of apimachinery import paths which are considered, after tag-specified peers, for conversions. Only change these if you have very good reasons.") + pflag.CommandLine.StringSliceVar(&ca.ExtraPeerDirs, "extra-peer-dirs", ca.ExtraPeerDirs, + "Application specific comma-separated list of import paths which are considered, after tag-specified peers and base-peer-dirs, for conversions.") + pflag.CommandLine.BoolVar(&ca.SkipUnsafe, "skip-unsafe", ca.SkipUnsafe, + "If true, will not generate code using unsafe pointer conversions; resulting code may be slower.") +} + +// Validate checks the given arguments. +func Validate(genericArgs *args.GeneratorArgs) error { + _ = genericArgs.CustomArgs.(*CustomArgs) + + if len(genericArgs.OutputFileBaseName) == 0 { + return fmt.Errorf("output file base name cannot be empty") + } + + return nil +} diff --git a/vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go b/vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go new file mode 100644 index 00000000..3c16a85b --- /dev/null +++ b/vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go @@ -0,0 +1,960 @@ +/* +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 generators + +import ( + "bytes" + "fmt" + "io" + "path/filepath" + "sort" + "strings" + + "k8s.io/gengo/args" + "k8s.io/gengo/generator" + "k8s.io/gengo/namer" + "k8s.io/gengo/types" + + "github.com/golang/glog" + + conversionargs "k8s.io/code-generator/cmd/conversion-gen/args" +) + +// These are the comment tags that carry parameters for conversion generation. +const ( + // e.g., "+k8s:conversion-gen=" in doc.go, where is the + // import path of the package the peer types are defined in. + // e.g., "+k8s:conversion-gen=false" in a type's comment will let + // conversion-gen skip that type. + tagName = "k8s:conversion-gen" + // e.g., "+k8s:conversion-gen-external-types=" in doc.go, where + // is the relative path to the package the types are defined in. + externalTypesTagName = "k8s:conversion-gen-external-types" +) + +func extractTag(comments []string) []string { + return types.ExtractCommentTags("+", comments)[tagName] +} + +func extractExternalTypesTag(comments []string) []string { + return types.ExtractCommentTags("+", comments)[externalTypesTagName] +} + +func isCopyOnly(comments []string) bool { + values := types.ExtractCommentTags("+", comments)["k8s:conversion-fn"] + return len(values) == 1 && values[0] == "copy-only" +} + +func isDrop(comments []string) bool { + values := types.ExtractCommentTags("+", comments)["k8s:conversion-fn"] + return len(values) == 1 && values[0] == "drop" +} + +// TODO: This is created only to reduce number of changes in a single PR. +// Remove it and use PublicNamer instead. +func conversionNamer() *namer.NameStrategy { + return &namer.NameStrategy{ + Join: func(pre string, in []string, post string) string { + return strings.Join(in, "_") + }, + PrependPackageNames: 1, + } +} + +func defaultFnNamer() *namer.NameStrategy { + return &namer.NameStrategy{ + Prefix: "SetDefaults_", + Join: func(pre string, in []string, post string) string { + return pre + strings.Join(in, "_") + post + }, + } +} + +// NameSystems returns the name system used by the generators in this package. +func NameSystems() namer.NameSystems { + return namer.NameSystems{ + "public": conversionNamer(), + "raw": namer.NewRawNamer("", nil), + "defaultfn": defaultFnNamer(), + } +} + +// DefaultNameSystem returns the default name system for ordering the types to be +// processed by the generators in this package. +func DefaultNameSystem() string { + return "public" +} + +func getPeerTypeFor(context *generator.Context, t *types.Type, potenialPeerPkgs []string) *types.Type { + for _, ppp := range potenialPeerPkgs { + p := context.Universe.Package(ppp) + if p == nil { + continue + } + if p.Has(t.Name.Name) { + return p.Type(t.Name.Name) + } + } + return nil +} + +type conversionPair struct { + inType *types.Type + outType *types.Type +} + +// All of the types in conversions map are of type "DeclarationOf" with +// the underlying type being "Func". +type conversionFuncMap map[conversionPair]*types.Type + +// Returns all manually-defined conversion functions in the package. +func getManualConversionFunctions(context *generator.Context, pkg *types.Package, manualMap conversionFuncMap) { + if pkg == nil { + glog.Warningf("Skipping nil package passed to getManualConversionFunctions") + return + } + glog.V(5).Infof("Scanning for conversion functions in %v", pkg.Name) + + scopeName := types.Ref(conversionPackagePath, "Scope").Name + errorName := types.Ref("", "error").Name + buffer := &bytes.Buffer{} + sw := generator.NewSnippetWriter(buffer, context, "$", "$") + + for _, f := range pkg.Functions { + if f.Underlying == nil || f.Underlying.Kind != types.Func { + glog.Errorf("Malformed function: %#v", f) + continue + } + if f.Underlying.Signature == nil { + glog.Errorf("Function without signature: %#v", f) + continue + } + glog.V(8).Infof("Considering function %s", f.Name) + signature := f.Underlying.Signature + // Check whether the function is conversion function. + // Note that all of them have signature: + // func Convert_inType_To_outType(inType, outType, conversion.Scope) error + if signature.Receiver != nil { + glog.V(8).Infof("%s has a receiver", f.Name) + continue + } + if len(signature.Parameters) != 3 || signature.Parameters[2].Name != scopeName { + glog.V(8).Infof("%s has wrong parameters", f.Name) + continue + } + if len(signature.Results) != 1 || signature.Results[0].Name != errorName { + glog.V(8).Infof("%s has wrong results", f.Name) + continue + } + inType := signature.Parameters[0] + outType := signature.Parameters[1] + if inType.Kind != types.Pointer || outType.Kind != types.Pointer { + glog.V(8).Infof("%s has wrong parameter types", f.Name) + continue + } + // Now check if the name satisfies the convention. + // TODO: This should call the Namer directly. + args := argsFromType(inType.Elem, outType.Elem) + sw.Do("Convert_$.inType|public$_To_$.outType|public$", args) + if f.Name.Name == buffer.String() { + glog.V(4).Infof("Found conversion function %s", f.Name) + 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)) + } + manualMap[key] = f + } else { + glog.V(8).Infof("%s has wrong name", f.Name) + } + buffer.Reset() + } +} + +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{} + header := append([]byte(fmt.Sprintf("// +build !%s\n\n", arguments.GeneratedBuildTag)), boilerplate...) + + // Accumulate pre-existing conversion functions. + // TODO: This is too ad-hoc. We need a better way. + manualConversions := conversionFuncMap{} + + // Record types that are memory equivalent. A type is memory equivalent + // if it has the same memory layout and no nested manual conversion is + // defined. + // TODO: in the future, relax the nested manual conversion requirement + // if we can show that a large enough types are memory identical but + // have non-trivial conversion + memoryEquivalentTypes := equalMemoryTypes{} + + // We are generating conversions only for packages that are explicitly + // passed as InputDir. + processed := map[string]bool{} + for _, i := range context.Inputs { + // skip duplicates + if processed[i] { + continue + } + processed[i] = true + + glog.V(5).Infof("considering pkg %q", i) + pkg := context.Universe[i] + // typesPkg is where the versioned types are defined. Sometimes it is + // different from pkg. For example, kubernetes core/v1 types are defined + // in vendor/k8s.io/api/core/v1, while pkg is at pkg/api/v1. + typesPkg := pkg + if pkg == nil { + // If the input had no Go files, for example. + continue + } + + // Add conversion and defaulting functions. + getManualConversionFunctions(context, pkg, manualConversions) + + // Only generate conversions for packages which explicitly request it + // by specifying one or more "+k8s:conversion-gen=" + // in their doc.go file. + peerPkgs := extractTag(pkg.Comments) + if peerPkgs != nil { + glog.V(5).Infof(" tags: %q", peerPkgs) + } else { + glog.V(5).Infof(" no tag") + continue + } + skipUnsafe := false + if customArgs, ok := arguments.CustomArgs.(*conversionargs.CustomArgs); ok { + peerPkgs = append(peerPkgs, customArgs.BasePeerDirs...) + peerPkgs = append(peerPkgs, customArgs.ExtraPeerDirs...) + skipUnsafe = customArgs.SkipUnsafe + } + + // if the external types are not in the same package where the conversion functions to be generated + externalTypesValues := extractExternalTypesTag(pkg.Comments) + if externalTypesValues != nil { + if len(externalTypesValues) != 1 { + glog.Fatalf(" expect only one value for %q tag, got: %q", externalTypesTagName, externalTypesValues) + } + externalTypes := externalTypesValues[0] + glog.V(5).Infof(" external types tags: %q", externalTypes) + var err error + typesPkg, err = context.AddDirectory(externalTypes) + if err != nil { + glog.Fatalf("cannot import package %s", externalTypes) + } + // update context.Order to the latest context.Universe + orderer := namer.Orderer{Namer: namer.NewPublicNamer(1)} + context.Order = orderer.OrderUniverse(context.Universe) + } + + // if the source path is within a /vendor/ directory (for example, + // k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1), allow + // generation to output to the proper relative path (under vendor). + // Otherwise, the generator will create the file in the wrong location + // in the output directory. + // TODO: build a more fundamental concept in gengo for dealing with modifications + // to vendored packages. + vendorless := func(pkg string) string { + if pos := strings.LastIndex(pkg, "/vendor/"); pos != -1 { + return pkg[pos+len("/vendor/"):] + } + return pkg + } + for i := range peerPkgs { + peerPkgs[i] = vendorless(peerPkgs[i]) + } + + // Make sure our peer-packages are added and fully parsed. + for _, pp := range peerPkgs { + context.AddDir(pp) + p := context.Universe[pp] + if nil == p { + glog.Fatalf("failed to find pkg: %s", pp) + } + getManualConversionFunctions(context, p, manualConversions) + } + + unsafeEquality := TypesEqual(memoryEquivalentTypes) + if skipUnsafe { + unsafeEquality = noEquality{} + } + + path := pkg.Path + // if the source path is within a /vendor/ directory (for example, + // k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1), allow + // generation to output to the proper relative path (under vendor). + // Otherwise, the generator will create the file in the wrong location + // in the output directory. + // TODO: build a more fundamental concept in gengo for dealing with modifications + // to vendored packages. + if strings.HasPrefix(pkg.SourcePath, arguments.OutputBase) { + expandedPath := strings.TrimPrefix(pkg.SourcePath, arguments.OutputBase) + if strings.Contains(expandedPath, "/vendor/") { + path = expandedPath + } + } + packages = append(packages, + &generator.DefaultPackage{ + PackageName: filepath.Base(pkg.Path), + PackagePath: path, + HeaderText: header, + GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + return []generator.Generator{ + NewGenConversion(arguments.OutputFileBaseName, typesPkg.Path, pkg.Path, manualConversions, peerPkgs, unsafeEquality), + } + }, + FilterFunc: func(c *generator.Context, t *types.Type) bool { + return t.Name.Package == typesPkg.Path + }, + }) + } + + // If there is a manual conversion defined between two types, exclude it + // from being a candidate for unsafe conversion + for k, v := range manualConversions { + if isCopyOnly(v.CommentLines) { + glog.V(5).Infof("Conversion function %s will not block memory copy because it is copy-only", v.Name) + continue + } + // this type should be excluded from all equivalence, because the converter must be called. + memoryEquivalentTypes.Skip(k.inType, k.outType) + } + + return packages +} + +type equalMemoryTypes map[conversionPair]bool + +func (e equalMemoryTypes) Skip(a, b *types.Type) { + e[conversionPair{a, b}] = false + e[conversionPair{b, a}] = false +} + +func (e equalMemoryTypes) Equal(a, b *types.Type) bool { + // alreadyVisitedTypes holds all the types that have already been checked in the structural type recursion. + alreadyVisitedTypes := make(map[*types.Type]bool) + return e.cachingEqual(a, b, alreadyVisitedTypes) +} + +func (e equalMemoryTypes) cachingEqual(a, b *types.Type, alreadyVisitedTypes map[*types.Type]bool) bool { + if a == b { + return true + } + if equal, ok := e[conversionPair{a, b}]; ok { + return equal + } + if equal, ok := e[conversionPair{b, a}]; ok { + return equal + } + result := e.equal(a, b, alreadyVisitedTypes) + e[conversionPair{a, b}] = result + e[conversionPair{b, a}] = result + return result +} + +func (e equalMemoryTypes) equal(a, b *types.Type, alreadyVisitedTypes map[*types.Type]bool) bool { + in, out := unwrapAlias(a), unwrapAlias(b) + switch { + case in == out: + return true + case in.Kind == out.Kind: + // if the type exists already, return early to avoid recursion + if alreadyVisitedTypes[in] { + return true + } + alreadyVisitedTypes[in] = true + + switch in.Kind { + case types.Struct: + if len(in.Members) != len(out.Members) { + return false + } + for i, inMember := range in.Members { + outMember := out.Members[i] + if !e.cachingEqual(inMember.Type, outMember.Type, alreadyVisitedTypes) { + return false + } + } + return true + case types.Pointer: + return e.cachingEqual(in.Elem, out.Elem, alreadyVisitedTypes) + case types.Map: + return e.cachingEqual(in.Key, out.Key, alreadyVisitedTypes) && e.cachingEqual(in.Elem, out.Elem, alreadyVisitedTypes) + case types.Slice: + return e.cachingEqual(in.Elem, out.Elem, alreadyVisitedTypes) + case types.Interface: + // TODO: determine whether the interfaces are actually equivalent - for now, they must have the + // same type. + return false + case types.Builtin: + return in.Name.Name == out.Name.Name + } + } + return false +} + +func findMember(t *types.Type, name string) (types.Member, bool) { + if t.Kind != types.Struct { + return types.Member{}, false + } + for _, member := range t.Members { + if member.Name == name { + return member, true + } + } + return types.Member{}, false +} + +// unwrapAlias recurses down aliased types to find the bedrock type. +func unwrapAlias(in *types.Type) *types.Type { + for in.Kind == types.Alias { + in = in.Underlying + } + return in +} + +const ( + runtimePackagePath = "k8s.io/apimachinery/pkg/runtime" + conversionPackagePath = "k8s.io/apimachinery/pkg/conversion" +) + +type noEquality struct{} + +func (noEquality) Equal(_, _ *types.Type) bool { return false } + +type TypesEqual interface { + Equal(a, b *types.Type) bool +} + +// genConversion produces a file with a autogenerated conversions. +type genConversion struct { + generator.DefaultGen + // the package that contains the types that conversion func are going to be + // generated for + typesPackage string + // the package that the conversion funcs are going to be output to + outputPackage string + // packages that contain the peer of types in typesPacakge + peerPackages []string + manualConversions conversionFuncMap + imports namer.ImportTracker + types []*types.Type + skippedFields map[*types.Type][]string + useUnsafe TypesEqual +} + +func NewGenConversion(sanitizedName, typesPackage, outputPackage string, manualConversions conversionFuncMap, peerPkgs []string, useUnsafe TypesEqual) generator.Generator { + return &genConversion{ + DefaultGen: generator.DefaultGen{ + OptionalName: sanitizedName, + }, + typesPackage: typesPackage, + outputPackage: outputPackage, + peerPackages: peerPkgs, + manualConversions: manualConversions, + imports: generator.NewImportTracker(), + types: []*types.Type{}, + skippedFields: map[*types.Type][]string{}, + useUnsafe: useUnsafe, + } +} + +func (g *genConversion) Namers(c *generator.Context) namer.NameSystems { + // Have the raw namer for this file track what it imports. + return namer.NameSystems{ + "raw": namer.NewRawNamer(g.outputPackage, g.imports), + "publicIT": &namerPlusImportTracking{ + delegate: conversionNamer(), + tracker: g.imports, + }, + } +} + +type namerPlusImportTracking struct { + delegate namer.Namer + tracker namer.ImportTracker +} + +func (n *namerPlusImportTracking) Name(t *types.Type) string { + n.tracker.AddType(t) + return n.delegate.Name(t) +} + +func (g *genConversion) convertibleOnlyWithinPackage(inType, outType *types.Type) bool { + var t *types.Type + var other *types.Type + if inType.Name.Package == g.typesPackage { + t, other = inType, outType + } else { + t, other = outType, inType + } + + if t.Name.Package != g.typesPackage { + return false + } + // If the type has opted out, skip it. + tagvals := extractTag(t.CommentLines) + if tagvals != nil { + if tagvals[0] != "false" { + glog.Fatalf("Type %v: unsupported %s value: %q", t, tagName, tagvals[0]) + } + glog.V(5).Infof("type %v requests no conversion generation, skipping", t) + return false + } + // TODO: Consider generating functions for other kinds too. + if t.Kind != types.Struct { + return false + } + // Also, filter out private types. + if namer.IsPrivateGoName(other.Name.Name) { + return false + } + return true +} + +func (g *genConversion) Filter(c *generator.Context, t *types.Type) bool { + peerType := getPeerTypeFor(c, t, g.peerPackages) + if peerType == nil { + return false + } + if !g.convertibleOnlyWithinPackage(t, peerType) { + return false + } + + g.types = append(g.types, t) + return true +} + +func (g *genConversion) isOtherPackage(pkg string) bool { + if pkg == g.outputPackage { + return false + } + if strings.HasSuffix(pkg, `"`+g.outputPackage+`"`) { + return false + } + return true +} + +func (g *genConversion) Imports(c *generator.Context) (imports []string) { + var importLines []string + for _, singleImport := range g.imports.ImportLines() { + if g.isOtherPackage(singleImport) { + importLines = append(importLines, singleImport) + } + } + return importLines +} + +func argsFromType(inType, outType *types.Type) generator.Args { + return generator.Args{ + "inType": inType, + "outType": outType, + } +} + +const nameTmpl = "Convert_$.inType|publicIT$_To_$.outType|publicIT$" + +func (g *genConversion) preexists(inType, outType *types.Type) (*types.Type, bool) { + function, ok := g.manualConversions[conversionPair{inType, outType}] + return function, ok +} + +func (g *genConversion) Init(c *generator.Context, w io.Writer) error { + if glog.V(5) { + if m, ok := g.useUnsafe.(equalMemoryTypes); ok { + var result []string + glog.Infof("All objects without identical memory layout:") + for k, v := range m { + if v { + continue + } + result = append(result, fmt.Sprintf(" %s -> %s = %t", k.inType, k.outType, v)) + } + sort.Strings(result) + for _, s := range result { + glog.Infof(s) + } + } + } + sw := generator.NewSnippetWriter(w, c, "$", "$") + sw.Do("func init() {\n", nil) + sw.Do("localSchemeBuilder.Register(RegisterConversions)\n", nil) + sw.Do("}\n", nil) + + scheme := c.Universe.Type(types.Name{Package: runtimePackagePath, Name: "Scheme"}) + schemePtr := &types.Type{ + Kind: types.Pointer, + Elem: scheme, + } + 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) + 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)) + } + sw.Do(")\n", nil) + sw.Do("}\n\n", nil) + return sw.Error() +} + +func (g *genConversion) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error { + glog.V(5).Infof("generating for type %v", t) + peerType := getPeerTypeFor(c, t, g.peerPackages) + sw := generator.NewSnippetWriter(w, c, "$", "$") + g.generateConversion(t, peerType, sw) + g.generateConversion(peerType, t, sw) + return sw.Error() +} + +func (g *genConversion) generateConversion(inType, outType *types.Type, sw *generator.SnippetWriter) { + args := argsFromType(inType, outType). + With("Scope", types.Ref(conversionPackagePath, "Scope")) + + sw.Do("func auto"+nameTmpl+"(in *$.inType|raw$, out *$.outType|raw$, s $.Scope|raw$) error {\n", args) + g.generateFor(inType, outType, sw) + sw.Do("return nil\n", nil) + sw.Do("}\n\n", nil) + + if _, found := g.preexists(inType, outType); found { + // There is a public manual Conversion method: use it. + } else if skipped := g.skippedFields[inType]; len(skipped) != 0 { + // The inType had some fields we could not generate. + glog.Errorf("Warning: could not find nor generate a final Conversion function for %v -> %v", inType, outType) + glog.Errorf(" the following fields need manual conversion:") + for _, f := range skipped { + glog.Errorf(" - %v", f) + } + } else { + // Emit a public conversion function. + sw.Do("// "+nameTmpl+" is an autogenerated conversion function.\n", args) + sw.Do("func "+nameTmpl+"(in *$.inType|raw$, out *$.outType|raw$, s $.Scope|raw$) error {\n", args) + sw.Do("return auto"+nameTmpl+"(in, out, s)\n", args) + sw.Do("}\n\n", nil) + } +} + +// 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 *genConversion) generateFor(inType, outType *types.Type, sw *generator.SnippetWriter) { + glog.V(5).Infof("generating %v -> %v", inType, outType) + var f func(*types.Type, *types.Type, *generator.SnippetWriter) + + switch inType.Kind { + case types.Builtin: + f = g.doBuiltin + case types.Map: + f = g.doMap + case types.Slice: + f = g.doSlice + case types.Struct: + f = g.doStruct + case types.Pointer: + f = g.doPointer + case types.Alias: + f = g.doAlias + default: + f = g.doUnknown + } + + f(inType, outType, sw) +} + +func (g *genConversion) doBuiltin(inType, outType *types.Type, sw *generator.SnippetWriter) { + if inType == outType { + sw.Do("*out = *in\n", nil) + } else { + sw.Do("*out = $.|raw$(*in)\n", outType) + } +} + +func (g *genConversion) doMap(inType, outType *types.Type, sw *generator.SnippetWriter) { + sw.Do("*out = make($.|raw$, len(*in))\n", outType) + if isDirectlyAssignable(inType.Key, outType.Key) { + sw.Do("for key, val := range *in {\n", nil) + if isDirectlyAssignable(inType.Elem, outType.Elem) { + if inType.Key == outType.Key { + sw.Do("(*out)[key] = ", nil) + } else { + sw.Do("(*out)[$.|raw$(key)] = ", outType.Key) + } + if inType.Elem == outType.Elem { + sw.Do("val\n", nil) + } else { + sw.Do("$.|raw$(val)\n", outType.Elem) + } + } else { + sw.Do("newVal := new($.|raw$)\n", outType.Elem) + if function, ok := g.preexists(inType.Elem, outType.Elem); ok { + sw.Do("if err := $.|raw$(&val, newVal, s); err != nil {\n", function) + } else if g.convertibleOnlyWithinPackage(inType.Elem, outType.Elem) { + sw.Do("if err := "+nameTmpl+"(&val, newVal, s); err != nil {\n", argsFromType(inType.Elem, outType.Elem)) + } else { + sw.Do("// TODO: Inefficient conversion - can we improve it?\n", nil) + sw.Do("if err := s.Convert(&val, newVal, 0); err != nil {\n", nil) + } + sw.Do("return err\n", nil) + sw.Do("}\n", nil) + if inType.Key == outType.Key { + sw.Do("(*out)[key] = *newVal\n", nil) + } else { + sw.Do("(*out)[$.|raw$(key)] = *newVal\n", outType.Key) + } + } + } else { + // TODO: Implement it when necessary. + sw.Do("for range *in {\n", nil) + sw.Do("// FIXME: Converting unassignable keys unsupported $.|raw$\n", inType.Key) + } + sw.Do("}\n", nil) +} + +func (g *genConversion) doSlice(inType, outType *types.Type, sw *generator.SnippetWriter) { + sw.Do("*out = make($.|raw$, len(*in))\n", outType) + if inType.Elem == outType.Elem && inType.Elem.Kind == types.Builtin { + sw.Do("copy(*out, *in)\n", nil) + } else { + sw.Do("for i := range *in {\n", nil) + if isDirectlyAssignable(inType.Elem, outType.Elem) { + if inType.Elem == outType.Elem { + sw.Do("(*out)[i] = (*in)[i]\n", nil) + } else { + sw.Do("(*out)[i] = $.|raw$((*in)[i])\n", outType.Elem) + } + } else { + if function, ok := g.preexists(inType.Elem, outType.Elem); ok { + sw.Do("if err := $.|raw$(&(*in)[i], &(*out)[i], s); err != nil {\n", function) + } else if g.convertibleOnlyWithinPackage(inType.Elem, outType.Elem) { + sw.Do("if err := "+nameTmpl+"(&(*in)[i], &(*out)[i], s); err != nil {\n", argsFromType(inType.Elem, outType.Elem)) + } else { + // TODO: This triggers on metav1.ObjectMeta <-> metav1.ObjectMeta and + // similar because neither package is the target package, and + // we really don't know which package will have the conversion + // function defined. This fires on basically every object + // conversion outside of pkg/api/v1. + sw.Do("// TODO: Inefficient conversion - can we improve it?\n", nil) + sw.Do("if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil {\n", nil) + } + sw.Do("return err\n", nil) + sw.Do("}\n", nil) + } + sw.Do("}\n", nil) + } +} + +func (g *genConversion) doStruct(inType, outType *types.Type, sw *generator.SnippetWriter) { + for _, inMember := range inType.Members { + if tagvals := extractTag(inMember.CommentLines); tagvals != nil && tagvals[0] == "false" { + // This field is excluded from conversion. + sw.Do("// INFO: in."+inMember.Name+" opted out of conversion generation\n", nil) + continue + } + outMember, found := findMember(outType, inMember.Name) + if !found { + // This field doesn't exist in the peer. + sw.Do("// WARNING: in."+inMember.Name+" requires manual conversion: does not exist in peer-type\n", nil) + g.skippedFields[inType] = append(g.skippedFields[inType], inMember.Name) + continue + } + + inMemberType, outMemberType := inMember.Type, outMember.Type + // create a copy of both underlying types but give them the top level alias name (since aliases + // are assignable) + if underlying := unwrapAlias(inMemberType); underlying != inMemberType { + copied := *underlying + copied.Name = inMemberType.Name + inMemberType = &copied + } + if underlying := unwrapAlias(outMemberType); underlying != outMemberType { + copied := *underlying + copied.Name = outMemberType.Name + outMemberType = &copied + } + + args := argsFromType(inMemberType, outMemberType).With("name", inMember.Name) + + // try a direct memory copy for any type that has exactly equivalent values + if g.useUnsafe.Equal(inMemberType, outMemberType) { + args = args. + With("Pointer", types.Ref("unsafe", "Pointer")). + With("SliceHeader", types.Ref("reflect", "SliceHeader")) + switch inMemberType.Kind { + case types.Pointer: + sw.Do("out.$.name$ = ($.outType|raw$)($.Pointer|raw$(in.$.name$))\n", args) + continue + case types.Map: + sw.Do("out.$.name$ = *(*$.outType|raw$)($.Pointer|raw$(&in.$.name$))\n", args) + continue + case types.Slice: + sw.Do("out.$.name$ = *(*$.outType|raw$)($.Pointer|raw$(&in.$.name$))\n", args) + continue + } + } + + // check based on the top level name, not the underlying names + if function, ok := g.preexists(inMember.Type, outMember.Type); ok { + if isDrop(function.CommentLines) { + continue + } + // copy-only functions that are directly assignable can be inlined instead of invoked. + // As an example, conversion functions exist that allow types with private fields to be + // correctly copied between types. These functions are equivalent to a memory assignment, + // and are necessary for the reflection path, but should not block memory conversion. + // Convert_unversioned_Time_to_unversioned_Time is an example of this logic. + if !isCopyOnly(function.CommentLines) || !g.isFastConversion(inMemberType, outMemberType) { + args["function"] = function + sw.Do("if err := $.function|raw$(&in.$.name$, &out.$.name$, s); err != nil {\n", args) + sw.Do("return err\n", nil) + sw.Do("}\n", nil) + continue + } + glog.V(5).Infof("Skipped function %s because it is copy-only and we can use direct assignment", function.Name) + } + + // If we can't auto-convert, punt before we emit any code. + if inMemberType.Kind != outMemberType.Kind { + sw.Do("// WARNING: in."+inMember.Name+" requires manual conversion: inconvertible types ("+ + inMemberType.String()+" vs "+outMemberType.String()+")\n", nil) + g.skippedFields[inType] = append(g.skippedFields[inType], inMember.Name) + continue + } + + switch inMemberType.Kind { + case types.Builtin: + if inMemberType == outMemberType { + sw.Do("out.$.name$ = in.$.name$\n", args) + } else { + sw.Do("out.$.name$ = $.outType|raw$(in.$.name$)\n", args) + } + case types.Map, types.Slice, types.Pointer: + if g.isDirectlyAssignable(inMemberType, outMemberType) { + sw.Do("out.$.name$ = in.$.name$\n", args) + continue + } + + sw.Do("if in.$.name$ != nil {\n", args) + sw.Do("in, out := &in.$.name$, &out.$.name$\n", args) + g.generateFor(inMemberType, outMemberType, sw) + sw.Do("} else {\n", nil) + sw.Do("out.$.name$ = nil\n", args) + sw.Do("}\n", nil) + case types.Struct: + if g.isDirectlyAssignable(inMemberType, outMemberType) { + sw.Do("out.$.name$ = in.$.name$\n", args) + continue + } + if g.convertibleOnlyWithinPackage(inMemberType, outMemberType) { + sw.Do("if err := "+nameTmpl+"(&in.$.name$, &out.$.name$, s); err != nil {\n", args) + } else { + sw.Do("// TODO: Inefficient conversion - can we improve it?\n", nil) + sw.Do("if err := s.Convert(&in.$.name$, &out.$.name$, 0); err != nil {\n", args) + } + sw.Do("return err\n", nil) + sw.Do("}\n", nil) + case types.Alias: + if isDirectlyAssignable(inMemberType, outMemberType) { + if inMemberType == outMemberType { + sw.Do("out.$.name$ = in.$.name$\n", args) + } else { + sw.Do("out.$.name$ = $.outType|raw$(in.$.name$)\n", args) + } + } else { + if g.convertibleOnlyWithinPackage(inMemberType, outMemberType) { + sw.Do("if err := "+nameTmpl+"(&in.$.name$, &out.$.name$, s); err != nil {\n", args) + } else { + sw.Do("// TODO: Inefficient conversion - can we improve it?\n", nil) + sw.Do("if err := s.Convert(&in.$.name$, &out.$.name$, 0); err != nil {\n", args) + } + sw.Do("return err\n", nil) + sw.Do("}\n", nil) + } + default: + if g.convertibleOnlyWithinPackage(inMemberType, outMemberType) { + sw.Do("if err := "+nameTmpl+"(&in.$.name$, &out.$.name$, s); err != nil {\n", args) + } else { + sw.Do("// TODO: Inefficient conversion - can we improve it?\n", nil) + sw.Do("if err := s.Convert(&in.$.name$, &out.$.name$, 0); err != nil {\n", args) + } + sw.Do("return err\n", nil) + sw.Do("}\n", nil) + } + } +} + +func (g *genConversion) isFastConversion(inType, outType *types.Type) bool { + switch inType.Kind { + case types.Builtin: + return true + case types.Map, types.Slice, types.Pointer, types.Struct, types.Alias: + return g.isDirectlyAssignable(inType, outType) + default: + return false + } +} + +func (g *genConversion) isDirectlyAssignable(inType, outType *types.Type) bool { + return unwrapAlias(inType) == unwrapAlias(outType) +} + +func (g *genConversion) doPointer(inType, outType *types.Type, sw *generator.SnippetWriter) { + sw.Do("*out = new($.Elem|raw$)\n", outType) + if isDirectlyAssignable(inType.Elem, outType.Elem) { + if inType.Elem == outType.Elem { + sw.Do("**out = **in\n", nil) + } else { + sw.Do("**out = $.|raw$(**in)\n", outType.Elem) + } + } else { + if function, ok := g.preexists(inType.Elem, outType.Elem); ok { + sw.Do("if err := $.|raw$(*in, *out, s); err != nil {\n", function) + } else if g.convertibleOnlyWithinPackage(inType.Elem, outType.Elem) { + sw.Do("if err := "+nameTmpl+"(*in, *out, s); err != nil {\n", argsFromType(inType.Elem, outType.Elem)) + } else { + sw.Do("// TODO: Inefficient conversion - can we improve it?\n", nil) + sw.Do("if err := s.Convert(*in, *out, 0); err != nil {\n", nil) + } + sw.Do("return err\n", nil) + sw.Do("}\n", nil) + } +} + +func (g *genConversion) doAlias(inType, outType *types.Type, sw *generator.SnippetWriter) { + // TODO: Add support for aliases. + g.doUnknown(inType, outType, sw) +} + +func (g *genConversion) doUnknown(inType, outType *types.Type, sw *generator.SnippetWriter) { + sw.Do("// FIXME: Type $.|raw$ is unsupported.\n", inType) +} + +func isDirectlyAssignable(inType, outType *types.Type) bool { + // TODO: This should maybe check for actual assignability between the two + // types, rather than superficial traits that happen to indicate it is + // assignable in the ways we currently use this code. + return inType.IsAssignable() && (inType.IsPrimitive() || isSamePackage(inType, outType)) +} + +func isSamePackage(inType, outType *types.Type) bool { + return inType.Name.Package == outType.Name.Package +} diff --git a/vendor/k8s.io/code-generator/cmd/conversion-gen/main.go b/vendor/k8s.io/code-generator/cmd/conversion-gen/main.go new file mode 100644 index 00000000..f2b91cc2 --- /dev/null +++ b/vendor/k8s.io/code-generator/cmd/conversion-gen/main.go @@ -0,0 +1,76 @@ +/* +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. +*/ + +// conversion-gen is a tool for auto-generating Conversion functions. +// +// Given a list of input directories, it will scan for "peer" packages and +// generate functions that efficiently convert between same-name types in each +// package. For any pair of types that has a +// `Convert___To__ +// +// When generating for a package, individual types or fields of structs may opt +// out of Conversion generation by specifying a comment on the of the form: +// // +k8s:conversion-gen=false +package main + +import ( + "flag" + "path/filepath" + + "github.com/golang/glog" + "github.com/spf13/pflag" + "k8s.io/gengo/args" + + generatorargs "k8s.io/code-generator/cmd/conversion-gen/args" + "k8s.io/code-generator/cmd/conversion-gen/generators" + "k8s.io/code-generator/pkg/util" +) + +func main() { + genericArgs, customArgs := generatorargs.NewDefaults() + + // Override defaults. + // TODO: move this out of conversion-gen + genericArgs.GoHeaderFilePath = filepath.Join(args.DefaultSourceTree(), util.BoilerplatePath()) + + 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 { + glog.Fatalf("Error: %v", err) + } + + // Run it. + 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/vendor/k8s.io/code-generator/cmd/go-to-protobuf/.gitignore b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/.gitignore new file mode 100644 index 00000000..0e9aa466 --- /dev/null +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/.gitignore @@ -0,0 +1 @@ +go-to-protobuf diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/OWNERS b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/OWNERS new file mode 100644 index 00000000..05d4b2a6 --- /dev/null +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/OWNERS @@ -0,0 +1,4 @@ +approvers: +- smarterclayton +reviewers: +- smarterclayton diff --git a/vendor/k8s.io/apiextensions-apiserver/main.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/main.go similarity index 55% rename from vendor/k8s.io/apiextensions-apiserver/main.go rename to vendor/k8s.io/code-generator/cmd/go-to-protobuf/main.go index 888a04b1..847a6a5a 100644 --- a/vendor/k8s.io/apiextensions-apiserver/main.go +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/main.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +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. @@ -14,27 +14,26 @@ 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 ( - "flag" - "os" + goflag "flag" - "github.com/golang/glog" - - "k8s.io/apiextensions-apiserver/pkg/cmd/server" - genericapiserver "k8s.io/apiserver/pkg/server" - "k8s.io/apiserver/pkg/util/logs" + flag "github.com/spf13/pflag" + "k8s.io/code-generator/cmd/go-to-protobuf/protobuf" ) -func main() { - logs.InitLogs() - defer logs.FlushLogs() +var g = protobuf.New() - stopCh := genericapiserver.SetupSignalHandler() - cmd := server.NewServerCommand(os.Stdout, os.Stderr, stopCh) - cmd.Flags().AddGoFlagSet(flag.CommandLine) - if err := cmd.Execute(); err != nil { - glog.Fatal(err) - } +func init() { + g.BindFlags(flag.CommandLine) + goflag.Set("logtostderr", "true") + flag.CommandLine.AddGoFlagSet(goflag.CommandLine) +} + +func main() { + flag.Parse() + protobuf.Run(g) } diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go new file mode 100644 index 00000000..55507322 --- /dev/null +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go @@ -0,0 +1,349 @@ +/* +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" + "os/exec" + "path/filepath" + "strings" + + "k8s.io/code-generator/pkg/util" + "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 + APIMachineryPackages string + Packages string + OutputBase string + VendorOutputBase 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, util.BoilerplatePath()), + } + defaultProtoImport := filepath.Join(sourceTree, "k8s.io", "kubernetes", "vendor", "github.com", "gogo", "protobuf", "protobuf") + cwd, err := os.Getwd() + if err != nil { + log.Fatalf("Cannot get current directory.") + } + return &Generator{ + Common: common, + OutputBase: sourceTree, + VendorOutputBase: filepath.Join(cwd, "vendor"), + ProtoImport: []string{defaultProtoImport}, + APIMachineryPackages: strings.Join([]string{ + `+k8s.io/apimachinery/pkg/util/intstr`, + `+k8s.io/apimachinery/pkg/api/resource`, + `+k8s.io/apimachinery/pkg/runtime/schema`, + `+k8s.io/apimachinery/pkg/runtime`, + `k8s.io/apimachinery/pkg/apis/meta/v1`, + `k8s.io/apimachinery/pkg/apis/meta/v1beta1`, + `k8s.io/apimachinery/pkg/apis/testapigroup/v1`, + }, ","), + Packages: "", + DropEmbeddedFields: "k8s.io/apimachinery/pkg/apis/meta/v1.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.StringVar(&g.APIMachineryPackages, "apimachinery-packages", g.APIMachineryPackages, "comma-separated list of directories to get apimachinery input types from which are needed by any API. 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.StringVar(&g.VendorOutputBase, "vendor-output-base", g.VendorOutputBase, "The vendor/ directory to look for packages in; defaults to $PWD/vendor/.") + flag.StringSliceVar(&g.ProtoImport, "proto-import", g.ProtoImport, "The search path for the core protobuf .protos, required; defaults $GOPATH/src/k8s.io/kubernetes/vendor/github.com/gogo/protobuf/protobuf.") + 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 (consider using the go-header-file flag): %v", err) + } + + protobufNames := NewProtobufNamer() + outputPackages := generator.Packages{} + nonOutputPackages := map[string]struct{}{} + + var packages []string + if len(g.APIMachineryPackages) != 0 { + packages = append(packages, strings.Split(g.APIMachineryPackages, ",")...) + } + if len(g.Packages) != 0 { + packages = append(packages, strings.Split(g.Packages, ",")...) + } + if len(packages) == 0 { + log.Fatalf("Both apimachinery-packages and packages are empty. At least one package must be specified.") + } + + for _, d := range 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) + } else { + nonOutputPackages[name] = struct{}{} + } + } + + 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() + + var vendoredOutputPackages, localOutputPackages generator.Packages + for _, p := range protobufNames.packages { + if _, ok := nonOutputPackages[p.Name()]; ok { + // if we're not outputting the package, don't include it in either package list + continue + } + p.Vendored = strings.Contains(c.Universe[p.PackagePath].SourcePath, "/vendor/") + if p.Vendored { + vendoredOutputPackages = append(vendoredOutputPackages, p) + } else { + localOutputPackages = append(localOutputPackages, p) + } + } + + if err := protobufNames.AssignTypesToPackages(c); err != nil { + log.Fatalf("Failed to identify Common types: %v", err) + } + + if err := c.ExecutePackages(g.VendorOutputBase, vendoredOutputPackages); err != nil { + log.Fatalf("Failed executing vendor generator: %v", err) + } + if err := c.ExecutePackages(g.OutputBase, localOutputPackages); err != nil { + log.Fatalf("Failed executing local 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()) + if p.Vendored { + path = filepath.Join(g.VendorOutputBase, p.ImportPath()) + outputPath = filepath.Join(g.VendorOutputBase, 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.VendorOutputBase, vendoredOutputPackages); err != nil { + log.Fatalf("Failed executing vendor generator: %v", err) + } + if err := c.ExecutePackages(g.OutputBase, localOutputPackages); err != nil { + log.Fatalf("Failed executing local generator: %v", err) + } + } + + for _, outputPackage := range outputPackages { + p := outputPackage.(*protobufPackage) + + if len(p.StructTags) == 0 { + continue + } + + pattern := filepath.Join(g.OutputBase, p.PackagePath, "*.go") + if p.Vendored { + pattern = filepath.Join(g.VendorOutputBase, 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/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go new file mode 100644 index 00000000..0e7a7d8e --- /dev/null +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go @@ -0,0 +1,769 @@ +/* +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.stable_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: + if len(t.Members) == 0 { + return true + } + 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 this is not an alias to a slice, cast to the alias + if !field.Repeated { + 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]] = strconv.Quote(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/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/import_tracker.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/import_tracker.go new file mode 100644 index 00000000..08a991b1 --- /dev/null +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/import_tracker.go @@ -0,0 +1,50 @@ +/* +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/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/namer.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/namer.go new file mode 100644 index 00000000..423577a1 --- /dev/null +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/namer.go @@ -0,0 +1,205 @@ +/* +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) + } +} + +// isTypeApplicableToProtobuf checks to see if a type is relevant for protobuf processing. +// Currently, it filters out functions and private types. +func isTypeApplicableToProtobuf(t *types.Type) bool { + // skip functions -- we don't care about them for protobuf + if t.Kind == types.Func || (t.Kind == types.DeclarationOf && t.Underlying.Kind == types.Func) { + return false + } + // skip private types + if namer.IsPrivateGoName(t.Name.Name) { + return false + } + + return true +} + +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 + } + if !isTypeApplicableToProtobuf(t) { + // skip types that we don't care about, like functions + 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/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/package.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/package.go new file mode 100644 index 00000000..bed4c3e3 --- /dev/null +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/package.go @@ -0,0 +1,215 @@ +/* +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, this package has been vendored into our source tree and thus can + // only be generated by changing the vendor tree. + Vendored bool + + // 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/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/parser.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/parser.go new file mode 100644 index 00000000..305b718e --- /dev/null +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/parser.go @@ -0,0 +1,452 @@ +/* +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/code-generator/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/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network_test.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/tags.go similarity index 59% rename from vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network_test.go rename to vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/tags.go index 7e611766..2dff5b92 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network_test.go +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/tags.go @@ -14,30 +14,20 @@ See the License for the specific language governing permissions and limitations under the License. */ -package kubelet +package protobuf import ( - "testing" - - "github.com/stretchr/testify/assert" + "github.com/golang/glog" + "k8s.io/gengo/types" ) -func TestGetIPTablesMark(t *testing.T) { - tests := []struct { - bit int - expect string - }{ - { - 14, - "0x00004000/0x00004000", - }, - { - 15, - "0x00008000/0x00008000", - }, - } - for _, tc := range tests { - res := getIPTablesMark(tc.bit) - assert.Equal(t, tc.expect, res, "input %d", tc.bit) +// 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.Fatal(err) } + return val } diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo/main.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo/main.go new file mode 100644 index 00000000..6e5051dc --- /dev/null +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo/main.go @@ -0,0 +1,32 @@ +/* +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/vendor/k8s.io/code-generator/cmd/import-boss/.gitignore b/vendor/k8s.io/code-generator/cmd/import-boss/.gitignore new file mode 100644 index 00000000..a5c47b66 --- /dev/null +++ b/vendor/k8s.io/code-generator/cmd/import-boss/.gitignore @@ -0,0 +1 @@ +import-boss diff --git a/vendor/k8s.io/code-generator/cmd/import-boss/main.go b/vendor/k8s.io/code-generator/cmd/import-boss/main.go new file mode 100644 index 00000000..d9989944 --- /dev/null +++ b/vendor/k8s.io/code-generator/cmd/import-boss/main.go @@ -0,0 +1,89 @@ +/* +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. +*/ + +// import-boss enforces import restrictions in a given repository. +// +// When a directory is verified, import-boss looks for a file called +// ".import-restrictions". If this file is not found, parent directories will be +// recursively searched. +// +// If an ".import-restrictions" file is found, then all imports of the package +// are checked against each "rule" in the file. A rule consists of three parts: +// * A SelectorRegexp, to select the import paths that the rule applies to. +// * A list of AllowedPrefixes +// * A list of ForbiddenPrefixes +// An import is allowed if it matches at least one allowed prefix and does not +// match any forbidden prefix. An example file looks like this: +// +// { +// "Rules": [ +// { +// "SelectorRegexp": "k8s[.]io", +// "AllowedPrefixes": [ +// "k8s.io/gengo/examples", +// "k8s.io/kubernetes/third_party" +// ], +// "ForbiddenPrefixes": [ +// "k8s.io/kubernetes/pkg/third_party/deprecated" +// ] +// }, +// { +// "SelectorRegexp": "^unsafe$", +// "AllowedPrefixes": [ +// ], +// "ForbiddenPrefixes": [ +// "" +// ] +// } +// ] +// } +// +// Note the second block explicitly matches the unsafe package, and forbids it +// ("" is a prefix of everything). +package main + +import ( + "os" + "path/filepath" + + "k8s.io/code-generator/pkg/util" + "k8s.io/gengo/args" + "k8s.io/gengo/examples/import-boss/generators" + + "github.com/golang/glog" +) + +func main() { + arguments := args.Default() + + // Override defaults. + arguments.GoHeaderFilePath = filepath.Join(args.DefaultSourceTree(), util.BoilerplatePath()) + arguments.InputDirs = []string{ + "k8s.io/kubernetes/pkg/...", + "k8s.io/kubernetes/cmd/...", + "k8s.io/kubernetes/plugin/...", + } + + if err := arguments.Execute( + generators.NameSystems(), + generators.DefaultNameSystem(), + generators.Packages, + ); err != nil { + glog.Errorf("Error: %v", err) + os.Exit(1) + } + glog.V(2).Info("Completed successfully.") +} diff --git a/vendor/k8s.io/code-generator/cmd/openapi-gen/README b/vendor/k8s.io/code-generator/cmd/openapi-gen/README new file mode 100644 index 00000000..e6dcc85d --- /dev/null +++ b/vendor/k8s.io/code-generator/cmd/openapi-gen/README @@ -0,0 +1,13 @@ +# Generate OpenAPI definitions + +- 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 or a member from a tagged package/type, add "+k8s:openapi-gen=false" tag to the comment lines. + +# OpenAPI Extensions +OpenAPI spec can have extensions on types. To define one or more extensions on a type or its member +add "+k8s:openapi-gen=x-kubernetes-$NAME:$VALUE" to the comment lines before type/member. A type/member can +have multiple extensions. The rest of the line in the comment will be used as $VALUE so there is no need to +escape or quote the value string. Extensions can be use to pass more information to client generators or +documentation generators. For example a type my have a friendly name to be displayed in documentation or +being used in a client's fluent interface. + diff --git a/vendor/k8s.io/code-generator/cmd/openapi-gen/args/args.go b/vendor/k8s.io/code-generator/cmd/openapi-gen/args/args.go new file mode 100644 index 00000000..f9bb17e1 --- /dev/null +++ b/vendor/k8s.io/code-generator/cmd/openapi-gen/args/args.go @@ -0,0 +1,53 @@ +/* +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 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{} + +// NewDefaults returns default arguments for the generator. +func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { + genericArgs := args.Default().WithoutDefaultFlagParsing() + customArgs := &CustomArgs{} + genericArgs.CustomArgs = customArgs + genericArgs.OutputFileBaseName = "openapi_generated" + return genericArgs, customArgs +} + +// AddFlags add the generator flags to the flag set. +func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet) {} + +// Validate checks the given arguments. +func Validate(genericArgs *args.GeneratorArgs) error { + _ = genericArgs.CustomArgs.(*CustomArgs) + + 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/vendor/k8s.io/code-generator/cmd/openapi-gen/main.go b/vendor/k8s.io/code-generator/cmd/openapi-gen/main.go new file mode 100644 index 00000000..fbafc502 --- /dev/null +++ b/vendor/k8s.io/code-generator/cmd/openapi-gen/main.go @@ -0,0 +1,61 @@ +/* +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 ( + "flag" + "path/filepath" + + "github.com/golang/glog" + "github.com/spf13/pflag" + "k8s.io/gengo/args" + "k8s.io/kube-openapi/pkg/generators" + + generatorargs "k8s.io/code-generator/cmd/openapi-gen/args" + "k8s.io/code-generator/pkg/util" +) + +func main() { + genericArgs, customArgs := generatorargs.NewDefaults() + + // Override defaults. + // TODO: move this out of openapi-gen + genericArgs.GoHeaderFilePath = filepath.Join(args.DefaultSourceTree(), util.BoilerplatePath()) + + 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 { + glog.Fatalf("Error: %v", err) + } + + // Run it. + 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/vendor/k8s.io/gengo/examples/set-gen/.gitignore b/vendor/k8s.io/code-generator/cmd/set-gen/.gitignore similarity index 100% rename from vendor/k8s.io/gengo/examples/set-gen/.gitignore rename to vendor/k8s.io/code-generator/cmd/set-gen/.gitignore diff --git a/vendor/k8s.io/gengo/examples/set-gen/main.go b/vendor/k8s.io/code-generator/cmd/set-gen/main.go similarity index 77% rename from vendor/k8s.io/gengo/examples/set-gen/main.go rename to vendor/k8s.io/code-generator/cmd/set-gen/main.go index 7efc8e6a..cf8f01d8 100644 --- a/vendor/k8s.io/gengo/examples/set-gen/main.go +++ b/vendor/k8s.io/code-generator/cmd/set-gen/main.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// set-gen is an example usage of go2idl. +// set-gen is an example usage of gengo. // // Structs in the input directories with the below line in their comments will // have sets generated for them. @@ -26,7 +26,9 @@ package main import ( "os" + "path/filepath" + "k8s.io/code-generator/pkg/util" "k8s.io/gengo/args" "k8s.io/gengo/examples/set-gen/generators" @@ -35,6 +37,12 @@ import ( func main() { arguments := args.Default() + + // Override defaults. + arguments.GoHeaderFilePath = filepath.Join(args.DefaultSourceTree(), util.BoilerplatePath()) + arguments.InputDirs = []string{"k8s.io/kubernetes/pkg/util/sets/types"} + arguments.OutputPackagePath = "k8s.io/apimachinery/pkg/util/sets" + if err := arguments.Execute( generators.NameSystems(), generators.DefaultNameSystem(), diff --git a/vendor/k8s.io/code-generator/hack/boilerplate.go.txt b/vendor/k8s.io/code-generator/hack/boilerplate.go.txt new file mode 100644 index 00000000..b7c650da --- /dev/null +++ b/vendor/k8s.io/code-generator/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/vendor/k8s.io/code-generator/hack/update-codegen.sh b/vendor/k8s.io/code-generator/hack/update-codegen.sh new file mode 100755 index 00000000..767c2ab3 --- /dev/null +++ b/vendor/k8s.io/code-generator/hack/update-codegen.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +# 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. + +set -o errexit +set -o nounset +set -o pipefail + +# 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. +$(dirname ${BASH_SOURCE})/../generate-internal-groups.sh all \ + k8s.io/code-generator/_examples/apiserver k8s.io/code-generator/_examples/apiserver/apis k8s.io/code-generator/_examples/apiserver/apis \ + "example:v1 example2:v1" \ + --output-base "$(dirname ${BASH_SOURCE})/../../.." +$(dirname ${BASH_SOURCE})/../generate-groups.sh all \ + k8s.io/code-generator/_examples/crd k8s.io/code-generator/_examples/crd/apis \ + "example:v1 example2:v1" \ + --output-base "$(dirname ${BASH_SOURCE})/../../.." diff --git a/vendor/k8s.io/code-generator/hack/verify-codegen.sh b/vendor/k8s.io/code-generator/hack/verify-codegen.sh new file mode 100755 index 00000000..25302228 --- /dev/null +++ b/vendor/k8s.io/code-generator/hack/verify-codegen.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash + +# 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. + +set -o errexit +set -o nounset +set -o pipefail + +SCRIPT_ROOT=$(dirname "${BASH_SOURCE}")/.. +SCRIPT_BASE=${SCRIPT_ROOT}/../.. + +DIFFROOT="${SCRIPT_ROOT}/_examples" +TMP_DIFFROOT="${SCRIPT_ROOT}/_tmp/_examples" +_tmp="${SCRIPT_ROOT}/_tmp" + +cleanup() { + rm -rf "${_tmp}" +} +trap "cleanup" EXIT SIGINT + +cleanup + +mkdir -p "${TMP_DIFFROOT}" +cp -a "${DIFFROOT}"/* "${TMP_DIFFROOT}" + +"${SCRIPT_ROOT}/hack/update-codegen.sh" +echo "diffing ${DIFFROOT} against freshly generated codegen" +ret=0 +diff -Naupr "${DIFFROOT}" "${TMP_DIFFROOT}" || ret=$? +cp -a "${TMP_DIFFROOT}"/* "${DIFFROOT}" +if [[ $ret -eq 0 ]] +then + echo "${DIFFROOT} up to date." +else + echo "${DIFFROOT} is out of date. Please run hack/update-codegen.sh" + exit 1 +fi + +# smoke test +echo "Smoke testing _example by compiling..." +go build ${SCRIPT_ROOT}/_example/... \ No newline at end of file diff --git a/vendor/k8s.io/code-generator/third_party/forked/golang/reflect/type.go b/vendor/k8s.io/code-generator/third_party/forked/golang/reflect/type.go new file mode 100644 index 00000000..67957ee3 --- /dev/null +++ b/vendor/k8s.io/code-generator/third_party/forked/golang/reflect/type.go @@ -0,0 +1,91 @@ +//This package is copied from Go library reflect/type.go. +//The struct tag library provides no way to extract the list of struct tags, only +//a specific tag +package reflect + +import ( + "fmt" + + "strconv" + "strings" +) + +type StructTag struct { + Name string + Value string +} + +func (t StructTag) String() string { + return fmt.Sprintf("%s:%q", t.Name, t.Value) +} + +type StructTags []StructTag + +func (tags StructTags) String() string { + s := make([]string, 0, len(tags)) + for _, tag := range tags { + s = append(s, tag.String()) + } + return "`" + strings.Join(s, " ") + "`" +} + +func (tags StructTags) Has(name string) bool { + for i := range tags { + if tags[i].Name == name { + return true + } + } + return false +} + +// ParseStructTags returns the full set of fields in a struct tag in the order they appear in +// the struct tag. +func ParseStructTags(tag string) (StructTags, error) { + tags := StructTags{} + for tag != "" { + // Skip leading space. + i := 0 + for i < len(tag) && tag[i] == ' ' { + i++ + } + tag = tag[i:] + if tag == "" { + break + } + + // Scan to colon. A space, a quote or a control character is a syntax error. + // Strictly speaking, control chars include the range [0x7f, 0x9f], not just + // [0x00, 0x1f], but in practice, we ignore the multi-byte control characters + // as it is simpler to inspect the tag's bytes than the tag's runes. + i = 0 + for i < len(tag) && tag[i] > ' ' && tag[i] != ':' && tag[i] != '"' && tag[i] != 0x7f { + i++ + } + if i == 0 || i+1 >= len(tag) || tag[i] != ':' || tag[i+1] != '"' { + break + } + name := string(tag[:i]) + tag = tag[i+1:] + + // Scan quoted string to find value. + i = 1 + for i < len(tag) && tag[i] != '"' { + if tag[i] == '\\' { + i++ + } + i++ + } + if i >= len(tag) { + break + } + qvalue := string(tag[:i+1]) + tag = tag[i+1:] + + value, err := strconv.Unquote(qvalue) + if err != nil { + return nil, err + } + tags = append(tags, StructTag{Name: name, Value: value}) + } + return tags, nil +} diff --git a/vendor/k8s.io/gengo/.import-restrictions b/vendor/k8s.io/gengo/.import-restrictions deleted file mode 100644 index fd05377f..00000000 --- a/vendor/k8s.io/gengo/.import-restrictions +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Rules": [ - { - "SelectorRegexp": "k8s[.]io", - "AllowedPrefixes": [ - "k8s.io/gengo" - ] - } - ] -} diff --git a/vendor/k8s.io/gengo/.travis.yml b/vendor/k8s.io/gengo/.travis.yml deleted file mode 100644 index a0d74599..00000000 --- a/vendor/k8s.io/gengo/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: go -go: - - "1.10" - - tip - -go_import_path: k8s.io/gengo - -jobs: - include: - - stage: Run tests - script: - - find . -name vendor -prune -o -name Makefile -execdir make test \; - - go test -v ./... - - stage: Verify examples - script: - - go run ./examples/import-boss/main.go -i k8s.io/gengo/... --verify-only diff --git a/vendor/k8s.io/gengo/CONTRIBUTING.md b/vendor/k8s.io/gengo/CONTRIBUTING.md deleted file mode 100644 index ef37eb0b..00000000 --- a/vendor/k8s.io/gengo/CONTRIBUTING.md +++ /dev/null @@ -1,9 +0,0 @@ -# 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/vendor/k8s.io/gengo/OWNERS b/vendor/k8s.io/gengo/OWNERS deleted file mode 100644 index 756e9b6d..00000000 --- a/vendor/k8s.io/gengo/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -approvers: - - lavalamp - - wojtek-t - - sttts diff --git a/vendor/k8s.io/gengo/README.md b/vendor/k8s.io/gengo/README.md deleted file mode 100644 index eb71990e..00000000 --- a/vendor/k8s.io/gengo/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# gengo - -[![Travis Widget]][Travis] [![GoDoc Widget]][GoDoc] [![GoReport]][GoReportStatus] - -[Travis]: https://travis-ci.org/kubernetes/gengo -[Travis Widget]: https://travis-ci.org/kubernetes/gengo.svg?branch=master -[GoDoc]: https://godoc.org/k8s.io/gengo -[GoDoc Widget]: https://godoc.org/k8s.io/gengo?status.svg -[GoReport]: https://goreportcard.com/badge/github.com/kubernetes/gengo -[GoReportStatus]: https://goreportcard.com/report/github.com/kubernetes/gengo - -A package for generating things based on go files. This mechanism was first used -in Kubernetes and is split out here for ease of reuse and maintainability. - -`go get k8s.io/gengo` - -## Examples - -A set generator, deep-copy generator, defaulter generator and go-to-protobuf -generator are included here. Also, import-boss will enforce arbitrary rules about -import trees. - -## args/ - -Package args defines common arguments for a generator binary. - -## generator/ - -Package generator defines interfaces for code generators to implement, and -machinery that will execute those code generators. - -## types/ - -Package types contains the type system definition. It is modeled after Go's type -system, but it's intended that you could produce these types by parsing -something else, if you want to write the parser/converter. - -We don't directly use the go types in the go typecheck library because they are -based on implementing differing interfaces. A struct-based format is more -convenient input for template driven output. - -## parser/ - -Package parser parses go source files. - -## namer/ - -Package namer defines a naming system, for: -* helping you reference go objects in a syntactically correct way -* keeping track of what you reference, for importing the right packages -* 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/vendor/k8s.io/gengo/SECURITY_CONTACTS b/vendor/k8s.io/gengo/SECURITY_CONTACTS deleted file mode 100644 index 3895fb79..00000000 --- a/vendor/k8s.io/gengo/SECURITY_CONTACTS +++ /dev/null @@ -1,15 +0,0 @@ -# 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/vendor/k8s.io/gengo/code-of-conduct.md b/vendor/k8s.io/gengo/code-of-conduct.md deleted file mode 100644 index 0d15c00c..00000000 --- a/vendor/k8s.io/gengo/code-of-conduct.md +++ /dev/null @@ -1,3 +0,0 @@ -# Kubernetes Community Code of Conduct - -Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) diff --git a/vendor/k8s.io/gengo/examples/deepcopy-gen/.gitignore b/vendor/k8s.io/gengo/examples/deepcopy-gen/.gitignore deleted file mode 100644 index eab8184d..00000000 --- a/vendor/k8s.io/gengo/examples/deepcopy-gen/.gitignore +++ /dev/null @@ -1 +0,0 @@ -deepcopy-gen diff --git a/vendor/k8s.io/gengo/examples/deepcopy-gen/Makefile b/vendor/k8s.io/gengo/examples/deepcopy-gen/Makefile deleted file mode 100644 index 66af5608..00000000 --- a/vendor/k8s.io/gengo/examples/deepcopy-gen/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -TOOL=deepcopy-gen - -test: - @if ! git diff --quiet HEAD; then \ - echo "FAIL: git client is not clean"; \ - false; \ - fi - @go build -o /tmp/$(TOOL) - @PKGS=$$(go list ./output_tests/... | paste -sd' ' -); \ - /tmp/$(TOOL) --logtostderr --v=4 -i $$(echo $$PKGS | sed 's/ /,/g') -O zz_generated - @if ! git diff --quiet HEAD; then \ - echo "FAIL: output files changed"; \ - git diff; \ - false; \ - fi - diff --git a/vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy_test.go b/vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy_test.go deleted file mode 100644 index 8b9bad41..00000000 --- a/vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy_test.go +++ /dev/null @@ -1,713 +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 generators - -import ( - "reflect" - "testing" - - "k8s.io/gengo/types" -) - -func Test_isRootedUnder(t *testing.T) { - testCases := []struct { - path string - roots []string - expect bool - }{ - { - path: "/foo/bar", - roots: nil, - expect: false, - }, - { - path: "/foo/bar", - roots: []string{}, - expect: false, - }, - { - path: "/foo/bar", - roots: []string{ - "/bad", - }, - expect: false, - }, - { - path: "/foo/bar", - roots: []string{ - "/foo", - }, - expect: true, - }, - { - path: "/foo/bar", - roots: []string{ - "/bad", - "/foo", - }, - expect: true, - }, - { - path: "/foo/bar/qux/zorb", - roots: []string{ - "/foo/bar/qux", - }, - expect: true, - }, - { - path: "/foo/bar", - roots: []string{ - "/foo/bar", - }, - expect: true, - }, - { - path: "/foo/barn", - roots: []string{ - "/foo/bar", - }, - expect: false, - }, - { - path: "/foo/bar", - roots: []string{ - "/foo/barn", - }, - expect: false, - }, - { - path: "/foo/bar", - roots: []string{ - "", - }, - expect: true, - }, - } - - for i, tc := range testCases { - r := isRootedUnder(tc.path, tc.roots) - if r != tc.expect { - t.Errorf("case[%d]: expected %t, got %t for %q in %q", i, tc.expect, r, tc.path, tc.roots) - } - } -} - -func Test_deepCopyMethod(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 DeepCopy 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 DeepCopy 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 result). - "DeepCopy": { - 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 (wrong result). - "DeepCopy": { - 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{ - { - 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 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 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{ - { - Name: types.Name{Package: "pkgname", Name: "typename"}, - Kind: types.Builtin, - }, - }, - }, - }, - }, - }, - 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"}, - Kind: types.Builtin, - Methods: map[string]*types.Type{ - // Wrong signature (has params). - "DeepCopy": { - 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"}, - Kind: types.Builtin, - }, - }, - 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 (extra results). - "DeepCopy": { - 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{ - { - Name: types.Name{Package: "pkgname", Name: "typename"}, - Kind: types.Builtin, - }, - { - Name: types.Name{Name: "int"}, - Kind: types.Builtin, - }, - }, - }, - }, - }, - }, - expect: false, - error: true, - }, - } - - for i, tc := range testCases { - 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) - } - } -} - -func Test_extractTagParams(t *testing.T) { - testCases := []struct { - comments []string - expect *tagValue - }{ - { - comments: []string{ - "Human comment", - }, - expect: nil, - }, - { - comments: []string{ - "Human comment", - "+k8s:deepcopy-gen", - }, - expect: &tagValue{ - value: "", - register: false, - }, - }, - { - comments: []string{ - "Human comment", - "+k8s:deepcopy-gen=package", - }, - expect: &tagValue{ - value: "package", - register: false, - }, - }, - { - comments: []string{ - "Human comment", - "+k8s:deepcopy-gen=package,register", - }, - expect: &tagValue{ - value: "package", - register: true, - }, - }, - { - comments: []string{ - "Human comment", - "+k8s:deepcopy-gen=package,register=true", - }, - expect: &tagValue{ - value: "package", - register: true, - }, - }, - { - comments: []string{ - "Human comment", - "+k8s:deepcopy-gen=package,register=false", - }, - expect: &tagValue{ - value: "package", - register: false, - }, - }, - } - - for i, tc := range testCases { - r := extractTag(tc.comments) - if r == nil && tc.expect != nil { - t.Errorf("case[%d]: expected non-nil", i) - } - if r != nil && tc.expect == nil { - t.Errorf("case[%d]: expected nil, got %v", i, *r) - } - if r != nil && *r != *tc.expect { - t.Errorf("case[%d]: expected %v, got %v", i, *tc.expect, *r) - } - } -} - -func Test_extractInterfacesTag(t *testing.T) { - testCases := []struct { - comments []string - expect []string - }{ - { - comments: []string{}, - expect: nil, - }, - { - comments: []string{ - "+k8s:deepcopy-gen:interfaces=k8s.io/kubernetes/runtime.Object", - }, - expect: []string{ - "k8s.io/kubernetes/runtime.Object", - }, - }, - { - comments: []string{ - "+k8s:deepcopy-gen:interfaces=k8s.io/kubernetes/runtime.Object", - "+k8s:deepcopy-gen:interfaces=k8s.io/kubernetes/runtime.List", - }, - expect: []string{ - "k8s.io/kubernetes/runtime.Object", - "k8s.io/kubernetes/runtime.List", - }, - }, - { - comments: []string{ - "+k8s:deepcopy-gen:interfaces=k8s.io/kubernetes/runtime.Object", - "+k8s:deepcopy-gen:interfaces=k8s.io/kubernetes/runtime.Object", - }, - expect: []string{ - "k8s.io/kubernetes/runtime.Object", - "k8s.io/kubernetes/runtime.Object", - }, - }, - } - - for i, tc := range testCases { - r := extractInterfacesTag(tc.comments) - if r == nil && tc.expect != nil { - t.Errorf("case[%d]: expected non-nil", i) - } - if r != nil && tc.expect == nil { - t.Errorf("case[%d]: expected nil, got %v", i, r) - } - if r != nil && !reflect.DeepEqual(r, tc.expect) { - t.Errorf("case[%d]: expected %v, got %v", i, tc.expect, r) - } - } -} diff --git a/vendor/k8s.io/gengo/examples/deepcopy-gen/main.go b/vendor/k8s.io/gengo/examples/deepcopy-gen/main.go deleted file mode 100644 index 53d1ee36..00000000 --- a/vendor/k8s.io/gengo/examples/deepcopy-gen/main.go +++ /dev/null @@ -1,88 +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. -*/ - -// deepcopy-gen is a tool for auto-generating DeepCopy functions. -// -// Given a list of input directories, it will generate DeepCopy and DeepCopyInto -// methods that efficiently perform a full deep-copy of each type. If these -// already exist (are predefined by the developer), they are used instead of -// generating new ones. -// -// If interfaces are referenced in types, it is expected that corresponding -// DeepCopyInterfaceName methods exist, e.g. DeepCopyObject for runtime.Object. -// These can be predefined by the developer or generated through tags, see below. -// They must be added to the interfaces themselves manually, e.g. -// type Object interface { -// ... -// DeepCopyObject() Object -// } -// -// All generation is governed by comment tags in the source. Any package may -// request DeepCopy generation by including a comment in the file-comments of -// one file, of the form: -// // +k8s:deepcopy-gen=package -// -// DeepCopy functions can be generated for individual types, rather than the -// entire package by specifying a comment on the type definion of the form: -// // +k8s:deepcopy-gen=true -// -// When generating for a whole package, individual types may opt out of -// DeepCopy generation by specifying a comment on the type definition of the form: -// // +k8s:deepcopy-gen=false -// -// Additional DeepCopyInterfaceName methods can be generated by sepcifying a -// comment on the type definition of the form: -// // +k8s:deepcopy-gen:interfaces=k8s.io/kubernetes/runtime.Object,k8s.io/kubernetes/runtime.List -// This leads to the generation of DeepCopyObject and DeepCopyList with the given -// interfaces as return types. We say that the tagged type implements deepcopy for the -// interfaces. -// -// The deepcopy funcs for interfaces using "+k8s:deepcopy-gen:interfaces" use the pointer -// of the type as receiver. For those special cases where the non-pointer object should -// implement the interface, this can be done with: -// // +k8s:deepcopy-gen:nonpointer-interfaces=true -package main - -import ( - "k8s.io/gengo/args" - "k8s.io/gengo/examples/deepcopy-gen/generators" - - "github.com/golang/glog" - "github.com/spf13/pflag" -) - -func main() { - arguments := args.Default() - - // Override defaults. - arguments.OutputFileBaseName = "deepcopy_generated" - - // Custom args. - customArgs := &generators.CustomArgs{} - pflag.CommandLine.StringSliceVar(&customArgs.BoundingDirs, "bounding-dirs", customArgs.BoundingDirs, - "Comma-separated list of import paths which bound the types for which deep-copies will be generated.") - arguments.CustomArgs = customArgs - - // 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.") -} diff --git a/vendor/k8s.io/gengo/examples/defaulter-gen/.gitignore b/vendor/k8s.io/gengo/examples/defaulter-gen/.gitignore deleted file mode 100644 index dbb164e0..00000000 --- a/vendor/k8s.io/gengo/examples/defaulter-gen/.gitignore +++ /dev/null @@ -1 +0,0 @@ -defaulter-gen diff --git a/vendor/k8s.io/gengo/examples/defaulter-gen/.import-restrictions b/vendor/k8s.io/gengo/examples/defaulter-gen/.import-restrictions deleted file mode 100644 index 7e69de1f..00000000 --- a/vendor/k8s.io/gengo/examples/defaulter-gen/.import-restrictions +++ /dev/null @@ -1,12 +0,0 @@ -{ - "Rules": [ - { - "SelectorRegexp": "k8s[.]io", - "AllowedPrefixes": [ - "k8s.io/gengo", - "k8s.io/kubernetes/third_party/forked/golang", - "k8s.io/apimachinery/pkg/runtime" - ] - } - ] -} diff --git a/vendor/k8s.io/gengo/examples/defaulter-gen/Makefile b/vendor/k8s.io/gengo/examples/defaulter-gen/Makefile deleted file mode 100644 index 380442ce..00000000 --- a/vendor/k8s.io/gengo/examples/defaulter-gen/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -TOOL=defaulter-gen - -test: - @if ! git diff --quiet HEAD; then \ - echo "FAIL: git client is not clean"; \ - false; \ - fi - @go build -o /tmp/$(TOOL) - @PKGS=$$(cd _output_tests; go list ./... | paste -sd' ' -); \ - /tmp/$(TOOL) --logtostderr --v=4 -i $$(echo $$PKGS | sed 's/ /,/g') -O zz_generated - @if ! git diff --quiet HEAD; then \ - echo "FAIL: output files changed"; \ - git diff; \ - false; \ - fi diff --git a/vendor/k8s.io/gengo/examples/defaulter-gen/OWNERS b/vendor/k8s.io/gengo/examples/defaulter-gen/OWNERS deleted file mode 100644 index cefd99c3..00000000 --- a/vendor/k8s.io/gengo/examples/defaulter-gen/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -approvers: - - smarterclayton diff --git a/vendor/k8s.io/gengo/examples/defaulter-gen/main.go b/vendor/k8s.io/gengo/examples/defaulter-gen/main.go deleted file mode 100644 index 822ec4c5..00000000 --- a/vendor/k8s.io/gengo/examples/defaulter-gen/main.go +++ /dev/null @@ -1,75 +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. -*/ - -// defaulter-gen is a tool for auto-generating Defaulter functions. -// -// Given a list of input directories, it will scan for top level types -// and generate efficient defaulters for an entire object from the sum -// of the SetDefault_* methods contained in the object tree. -// -// Generation is governed by comment tags in the source. Any package may -// request defaulter generation by including one or more comment tags at -// the package comment level: -// -// // +k8s:defaulter-gen= -// -// which will create defaulters for any type that contains the provided -// field name (if the type has defaulters). Any type may request explicit -// defaulting by providing the comment tag: -// -// // +k8s:defaulter-gen=true|false -// -// An existing defaulter method (`SetDefaults_TYPE`) can provide the -// comment tag: -// -// // +k8s:defaulter-gen=covers -// -// to indicate that the defaulter does not or should not call any nested -// defaulters. -package main - -import ( - "k8s.io/gengo/args" - "k8s.io/gengo/examples/defaulter-gen/generators" - - "github.com/golang/glog" - "github.com/spf13/pflag" -) - -func main() { - arguments := args.Default() - - // Override defaults. - arguments.OutputFileBaseName = "defaulter_generated" - - // Custom args. - customArgs := &generators.CustomArgs{ - ExtraPeerDirs: []string{}, - } - pflag.CommandLine.StringSliceVar(&customArgs.ExtraPeerDirs, "extra-peer-dirs", customArgs.ExtraPeerDirs, - "Comma-separated list of import paths which are considered, after tag-specified peers, for conversions.") - arguments.CustomArgs = customArgs - - // 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.") -} diff --git a/vendor/k8s.io/gengo/examples/set-gen/Makefile b/vendor/k8s.io/gengo/examples/set-gen/Makefile deleted file mode 100644 index 0e73130a..00000000 --- a/vendor/k8s.io/gengo/examples/set-gen/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -TOOL=set-gen - -test: - @if ! git diff --quiet HEAD; then \ - echo "FAIL: git client is not clean"; \ - false; \ - fi - @go build -o /tmp/$(TOOL) - @PKGS=$$(go list ./sets/types | paste -sd' ' -); \ - /tmp/$(TOOL) --logtostderr --v=4 -i $$(echo $$PKGS | sed 's/ /,/g') -O zz_generated -o ./sets - @if ! git diff --quiet HEAD; then \ - echo "FAIL: output files changed"; \ - git diff; \ - false; \ - fi diff --git a/vendor/k8s.io/gengo/examples/set-gen/sets/set_test.go b/vendor/k8s.io/gengo/examples/set-gen/sets/set_test.go deleted file mode 100644 index df722ec2..00000000 --- a/vendor/k8s.io/gengo/examples/set-gen/sets/set_test.go +++ /dev/null @@ -1,270 +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 sets - -import ( - "reflect" - "testing" -) - -func TestStringSet(t *testing.T) { - s := String{} - s2 := String{} - if len(s) != 0 { - t.Errorf("Expected len=0: %d", len(s)) - } - s.Insert("a", "b") - if len(s) != 2 { - t.Errorf("Expected len=2: %d", len(s)) - } - s.Insert("c") - if s.Has("d") { - t.Errorf("Unexpected contents: %#v", s) - } - if !s.Has("a") { - t.Errorf("Missing contents: %#v", s) - } - s.Delete("a") - if s.Has("a") { - t.Errorf("Unexpected contents: %#v", s) - } - s.Insert("a") - if s.HasAll("a", "b", "d") { - t.Errorf("Unexpected contents: %#v", s) - } - if !s.HasAll("a", "b") { - t.Errorf("Missing contents: %#v", s) - } - s2.Insert("a", "b", "d") - if s.IsSuperset(s2) { - t.Errorf("Unexpected contents: %#v", s) - } - s2.Delete("d") - if !s.IsSuperset(s2) { - t.Errorf("Missing contents: %#v", s) - } -} - -func TestStringSetDeleteMultiples(t *testing.T) { - s := String{} - s.Insert("a", "b", "c") - if len(s) != 3 { - t.Errorf("Expected len=3: %d", len(s)) - } - - s.Delete("a", "c") - if len(s) != 1 { - t.Errorf("Expected len=1: %d", len(s)) - } - if s.Has("a") { - t.Errorf("Unexpected contents: %#v", s) - } - if s.Has("c") { - t.Errorf("Unexpected contents: %#v", s) - } - if !s.Has("b") { - t.Errorf("Missing contents: %#v", s) - } - -} - -func TestNewStringSet(t *testing.T) { - s := NewString("a", "b", "c") - if len(s) != 3 { - t.Errorf("Expected len=3: %d", len(s)) - } - if !s.Has("a") || !s.Has("b") || !s.Has("c") { - t.Errorf("Unexpected contents: %#v", s) - } -} - -func TestStringSetList(t *testing.T) { - s := NewString("z", "y", "x", "a") - if !reflect.DeepEqual(s.List(), []string{"a", "x", "y", "z"}) { - t.Errorf("List gave unexpected result: %#v", s.List()) - } -} - -func TestStringSetDifference(t *testing.T) { - a := NewString("1", "2", "3") - b := NewString("1", "2", "4", "5") - c := a.Difference(b) - d := b.Difference(a) - if len(c) != 1 { - t.Errorf("Expected len=1: %d", len(c)) - } - if !c.Has("3") { - t.Errorf("Unexpected contents: %#v", c.List()) - } - if len(d) != 2 { - t.Errorf("Expected len=2: %d", len(d)) - } - if !d.Has("4") || !d.Has("5") { - t.Errorf("Unexpected contents: %#v", d.List()) - } -} - -func TestStringSetHasAny(t *testing.T) { - a := NewString("1", "2", "3") - - if !a.HasAny("1", "4") { - t.Errorf("expected true, got false") - } - - if a.HasAny("0", "4") { - t.Errorf("expected false, got true") - } -} - -func TestStringSetEquals(t *testing.T) { - // Simple case (order doesn't matter) - a := NewString("1", "2") - b := NewString("2", "1") - if !a.Equal(b) { - t.Errorf("Expected to be equal: %v vs %v", a, b) - } - - // It is a set; duplicates are ignored - b = NewString("2", "2", "1") - if !a.Equal(b) { - t.Errorf("Expected to be equal: %v vs %v", a, b) - } - - // Edge cases around empty sets / empty strings - a = NewString() - b = NewString() - if !a.Equal(b) { - t.Errorf("Expected to be equal: %v vs %v", a, b) - } - - b = NewString("1", "2", "3") - if a.Equal(b) { - t.Errorf("Expected to be not-equal: %v vs %v", a, b) - } - - b = NewString("1", "2", "") - if a.Equal(b) { - t.Errorf("Expected to be not-equal: %v vs %v", a, b) - } - - // Check for equality after mutation - a = NewString() - a.Insert("1") - if a.Equal(b) { - t.Errorf("Expected to be not-equal: %v vs %v", a, b) - } - - a.Insert("2") - if a.Equal(b) { - t.Errorf("Expected to be not-equal: %v vs %v", a, b) - } - - a.Insert("") - if !a.Equal(b) { - t.Errorf("Expected to be equal: %v vs %v", a, b) - } - - a.Delete("") - if a.Equal(b) { - t.Errorf("Expected to be not-equal: %v vs %v", a, b) - } -} - -func TestStringUnion(t *testing.T) { - tests := []struct { - s1 String - s2 String - expected String - }{ - { - NewString("1", "2", "3", "4"), - NewString("3", "4", "5", "6"), - NewString("1", "2", "3", "4", "5", "6"), - }, - { - NewString("1", "2", "3", "4"), - NewString(), - NewString("1", "2", "3", "4"), - }, - { - NewString(), - NewString("1", "2", "3", "4"), - NewString("1", "2", "3", "4"), - }, - { - NewString(), - NewString(), - NewString(), - }, - } - - for _, test := range tests { - union := test.s1.Union(test.s2) - if union.Len() != test.expected.Len() { - t.Errorf("Expected union.Len()=%d but got %d", test.expected.Len(), union.Len()) - } - - if !union.Equal(test.expected) { - t.Errorf("Expected union.Equal(expected) but not true. union:%v expected:%v", union.List(), test.expected.List()) - } - } -} - -func TestStringIntersection(t *testing.T) { - tests := []struct { - s1 String - s2 String - expected String - }{ - { - NewString("1", "2", "3", "4"), - NewString("3", "4", "5", "6"), - NewString("3", "4"), - }, - { - NewString("1", "2", "3", "4"), - NewString("1", "2", "3", "4"), - NewString("1", "2", "3", "4"), - }, - { - NewString("1", "2", "3", "4"), - NewString(), - NewString(), - }, - { - NewString(), - NewString("1", "2", "3", "4"), - NewString(), - }, - { - NewString(), - NewString(), - NewString(), - }, - } - - for _, test := range tests { - intersection := test.s1.Intersection(test.s2) - if intersection.Len() != test.expected.Len() { - t.Errorf("Expected intersection.Len()=%d but got %d", test.expected.Len(), intersection.Len()) - } - - if !intersection.Equal(test.expected) { - t.Errorf("Expected intersection.Equal(expected) but not true. intersection:%v expected:%v", intersection.List(), test.expected.List()) - } - } -} diff --git a/vendor/k8s.io/gengo/generator/snippet_writer_test.go b/vendor/k8s.io/gengo/generator/snippet_writer_test.go deleted file mode 100644 index 04649414..00000000 --- a/vendor/k8s.io/gengo/generator/snippet_writer_test.go +++ /dev/null @@ -1,88 +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 generator_test - -import ( - "bytes" - "strings" - "testing" - - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/parser" -) - -func construct(t *testing.T, files map[string]string) *generator.Context { - b := parser.New() - for name, src := range files { - if err := b.AddFileForTest("/tmp/"+name, name, []byte(src)); err != nil { - t.Fatal(err) - } - } - c, err := generator.NewContext(b, namer.NameSystems{ - "public": namer.NewPublicNamer(0), - "private": namer.NewPrivateNamer(0), - }, "public") - if err != nil { - t.Fatal(err) - } - return c -} - -func TestSnippetWriter(t *testing.T) { - var structTest = map[string]string{ - "base/foo/proto/foo.go": ` -package foo - -// Blah is a test. -// A test, I tell you. -type Blah struct { - // A is the first field. - A int64 ` + "`" + `json:"a"` + "`" + ` - - // B is the second field. - // Multiline comments work. - B string ` + "`" + `json:"b"` + "`" + ` -} -`, - } - - c := construct(t, structTest) - b := &bytes.Buffer{} - err := generator.NewSnippetWriter(b, c, "$", "$"). - Do("$.|public$$.|private$", c.Order[0]). - Error() - if err != nil { - t.Errorf("Unexpected error %v", err) - } - if e, a := "Blahblah", b.String(); e != a { - t.Errorf("Expected %q, got %q", e, a) - } - - err = generator.NewSnippetWriter(b, c, "$", "$"). - Do("$.|public", c.Order[0]). - Error() - if err == nil { - t.Errorf("expected error on invalid template") - } else { - // Dear reader, I apologize for making the worst change - // detection test in the history of ever. - if e, a := "snippet_writer_test.go", err.Error(); !strings.Contains(a, e) { - t.Errorf("Expected %q but didn't find it in %q", e, a) - } - } -} diff --git a/vendor/k8s.io/gengo/namer/namer_test.go b/vendor/k8s.io/gengo/namer/namer_test.go deleted file mode 100644 index fd5ca636..00000000 --- a/vendor/k8s.io/gengo/namer/namer_test.go +++ /dev/null @@ -1,100 +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 namer - -import ( - "reflect" - "testing" - - "k8s.io/gengo/types" -) - -func TestNameStrategy(t *testing.T) { - u := types.Universe{} - - // Add some types. - base := u.Type(types.Name{Package: "foo/bar", Name: "Baz"}) - base.Kind = types.Struct - - tmp := u.Type(types.Name{Package: "", Name: "[]bar.Baz"}) - tmp.Kind = types.Slice - tmp.Elem = base - - tmp = u.Type(types.Name{Package: "", Name: "map[string]bar.Baz"}) - tmp.Kind = types.Map - tmp.Key = types.String - tmp.Elem = base - - tmp = u.Type(types.Name{Package: "foo/other", Name: "Baz"}) - tmp.Kind = types.Struct - tmp.Members = []types.Member{{ - Embedded: true, - Type: base, - }} - - tmp = u.Type(types.Name{Package: "", Name: "chan Baz"}) - tmp.Kind = types.Chan - tmp.Elem = base - - u.Type(types.Name{Package: "", Name: "string"}) - - o := Orderer{NewPublicNamer(0)} - order := o.OrderUniverse(u) - orderedNames := make([]string, len(order)) - for i, t := range order { - orderedNames[i] = o.Name(t) - } - expect := []string{"Baz", "Baz", "ChanBaz", "MapStringToBaz", "SliceBaz", "String"} - if e, a := expect, orderedNames; !reflect.DeepEqual(e, a) { - t.Errorf("Wanted %#v, got %#v", e, a) - } - - o = Orderer{NewRawNamer("my/package", nil)} - order = o.OrderUniverse(u) - orderedNames = make([]string, len(order)) - for i, t := range order { - orderedNames[i] = o.Name(t) - } - - expect = []string{"[]bar.Baz", "bar.Baz", "chan bar.Baz", "map[string]bar.Baz", "other.Baz", "string"} - if e, a := expect, orderedNames; !reflect.DeepEqual(e, a) { - t.Errorf("Wanted %#v, got %#v", e, a) - } - - o = Orderer{NewRawNamer("foo/bar", nil)} - order = o.OrderUniverse(u) - orderedNames = make([]string, len(order)) - for i, t := range order { - orderedNames[i] = o.Name(t) - } - - expect = []string{"Baz", "[]Baz", "chan Baz", "map[string]Baz", "other.Baz", "string"} - if e, a := expect, orderedNames; !reflect.DeepEqual(e, a) { - t.Errorf("Wanted %#v, got %#v", e, a) - } - - o = Orderer{NewPublicNamer(1)} - order = o.OrderUniverse(u) - orderedNames = make([]string, len(order)) - for i, t := range order { - orderedNames[i] = o.Name(t) - } - expect = []string{"BarBaz", "ChanBarBaz", "MapStringToBarBaz", "OtherBaz", "SliceBarBaz", "String"} - if e, a := expect, orderedNames; !reflect.DeepEqual(e, a) { - t.Errorf("Wanted %#v, got %#v", e, a) - } -} diff --git a/vendor/k8s.io/gengo/namer/plural_namer_test.go b/vendor/k8s.io/gengo/namer/plural_namer_test.go deleted file mode 100644 index a8b64855..00000000 --- a/vendor/k8s.io/gengo/namer/plural_namer_test.go +++ /dev/null @@ -1,123 +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 namer - -import ( - "testing" - - "k8s.io/gengo/types" -) - -func TestPluralNamer(t *testing.T) { - exceptions := map[string]string{ - // The type name is already in the plural form - "Endpoints": "endpoints", - } - public := NewPublicPluralNamer(exceptions) - private := NewPrivatePluralNamer(exceptions) - - cases := []struct { - typeName string - expectedPrivate string - expectedPublic string - }{ - { - "I", - "i", - "I", - }, - { - "Pod", - "pods", - "Pods", - }, - { - "Entry", - "entries", - "Entries", - }, - { - "Endpoints", - "endpoints", - "Endpoints", - }, - { - "Bus", - "buses", - "Buses", - }, - { - "Fizz", - "fizzes", - "Fizzes", - }, - { - "Search", - "searches", - "Searches", - }, - { - "Autograph", - "autographs", - "Autographs", - }, - { - "Dispatch", - "dispatches", - "Dispatches", - }, - { - "Earth", - "earths", - "Earths", - }, - { - "City", - "cities", - "Cities", - }, - { - "Ray", - "rays", - "Rays", - }, - { - "Fountain", - "fountains", - "Fountains", - }, - { - "Life", - "lives", - "Lives", - }, - { - "Leaf", - "leaves", - "Leaves", - }, - } - for _, c := range cases { - testType := &types.Type{Name: types.Name{Name: c.typeName}} - if e, a := c.expectedPrivate, private.Name(testType); e != a { - t.Errorf("Unexpected result from private plural namer. Expected: %s, Got: %s", e, a) - } - if e, a := c.expectedPublic, public.Name(testType); e != a { - t.Errorf("Unexpected result from public plural namer. Expected: %s, Got: %s", e, a) - } - } -} diff --git a/vendor/k8s.io/gengo/parser/local_parse_test.go b/vendor/k8s.io/gengo/parser/local_parse_test.go deleted file mode 100644 index 851fc7da..00000000 --- a/vendor/k8s.io/gengo/parser/local_parse_test.go +++ /dev/null @@ -1,68 +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 parser - -import ( - "testing" -) - -func TestImportBuildPackage(t *testing.T) { - b := New() - if _, err := b.importBuildPackage("fake/dep"); err != nil { - t.Fatal(err) - } - if _, ok := b.buildPackages["fake/dep"]; !ok { - t.Errorf("missing expected, but got %v", b.buildPackages) - } - - if len(b.buildPackages) > 1 { - // this would happen if the canonicalization failed to normalize the path - // you'd get a k8s.io/gengo/vendor/fake/dep key too - t.Errorf("missing one, but got %v", b.buildPackages) - } -} - -func TestCanonicalizeImportPath(t *testing.T) { - tcs := []struct { - name string - input string - output string - }{ - { - name: "passthrough", - input: "github.com/foo/bar", - output: "github.com/foo/bar", - }, - { - name: "simple", - input: "github.com/foo/vendor/k8s.io/kubernetes/pkg/api", - output: "k8s.io/kubernetes/pkg/api", - }, - { - name: "deeper", - input: "github.com/foo/bar/vendor/k8s.io/kubernetes/pkg/api", - output: "k8s.io/kubernetes/pkg/api", - }, - } - - for _, tc := range tcs { - actual := canonicalizeImportPath(tc.input) - if string(actual) != tc.output { - t.Errorf("%v: expected %q got %q", tc.name, tc.output, actual) - } - } -} diff --git a/vendor/k8s.io/gengo/parser/parse_test.go b/vendor/k8s.io/gengo/parser/parse_test.go deleted file mode 100644 index 93a1bf98..00000000 --- a/vendor/k8s.io/gengo/parser/parse_test.go +++ /dev/null @@ -1,459 +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 parser_test - -import ( - "bytes" - "path" - "path/filepath" - "reflect" - "testing" - "text/template" - - "k8s.io/gengo/args" - "k8s.io/gengo/namer" - "k8s.io/gengo/parser" - "k8s.io/gengo/types" -) - -func TestRecursive(t *testing.T) { - d := args.Default() - d.InputDirs = []string{"k8s.io/gengo/testdata/a/..."} - b, err := d.NewBuilder() - if err != nil { - t.Fatalf("Fail making builder: %v", err) - } - _, err = b.FindTypes() - if err != nil { - t.Fatalf("Fail finding types: %v", err) - } - foundB := false - for _, p := range b.FindPackages() { - t.Logf("Package: %v", p) - if p == "k8s.io/gengo/testdata/a/b" { - foundB = true - } - } - if !foundB { - t.Errorf("Expected to find packages a and b") - } -} - -type file struct { - path string - contents string -} - -// Pass files in topological order - deps first! -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(path.Dir(f.path), filepath.FromSlash(f.path), []byte(f.contents)); err != nil { - t.Fatal(err) - } - } - u, err := b.FindTypes() - if err != nil { - t.Fatal(err) - } - orderer := namer.Orderer{Namer: testNamer} - o := orderer.OrderUniverse(u) - return b, u, o -} - -func TestBuilder(t *testing.T) { - var testFiles = []file{ - { - path: "base/common/proto/common.go", contents: ` - package common - - type Object struct { - ID int64 - } - `, - }, { - path: "base/foo/proto/foo.go", contents: ` - package foo - - import ( - "base/common/proto" - ) - - type Blah struct { - common.Object - Count int64 - Frobbers map[string]*Frobber - Baz []Object - Nickname *string - NumberIsAFavorite map[int]bool - } - - type Frobber struct { - Name string - Amount int64 - } - - type Object struct { - common.Object - } - - func AFunc(obj1 common.Object, obj2 Object) Frobber { - } - - var AVar Frobber - - var ( - AnotherVar = Frobber{} - ) - `, - }, - } - - var tmplText = ` -package o -{{define "Struct"}}type {{Name .}} interface { {{range $m := .Members}}{{$n := Name $m.Type}} - {{if $m.Embedded}}{{$n}}{{else}}{{$m.Name}}() {{$n}}{{if $m.Type.Elem}}{{else}} - Set{{$m.Name}}({{$n}}){{end}}{{end}}{{end}} -} - -{{end}} -{{define "Func"}}{{$s := .Underlying.Signature}}var {{Name .}} func({{range $index,$elem := $s.Parameters}}{{if $index}}, {{end}}{{Raw $elem}}{{end}}) {{if $s.Results|len |gt 1}}({{end}}{{range $index,$elem := $s.Results}}{{if $index}}, {{end}}{{Raw .}}{{end}}{{if $s.Results|len |gt 1}}){{end}} = {{Raw .}} - -{{end}} -{{define "Var"}}{{$t := .Underlying}}var {{Name .}} {{Raw $t}} = {{Raw .}} - -{{end}} -{{range $t := .}}{{if eq $t.Kind "Struct"}}{{template "Struct" $t}}{{end}}{{end}} -{{range $t := .}}{{if eq $t.Kind "DeclarationOf"}}{{if eq $t.Underlying.Kind "Func"}}{{template "Func" $t}}{{end}}{{end}}{{end}} -{{range $t := .}}{{if eq $t.Kind "DeclarationOf"}}{{if ne $t.Underlying.Kind "Func"}}{{template "Var" $t}}{{end}}{{end}}{{end}}` - - var expect = ` -package o - - - -type CommonObject interface { - ID() Int64 - SetID(Int64) -} - -type FooBlah interface { - CommonObject - Count() Int64 - SetCount(Int64) - Frobbers() MapStringToPointerFooFrobber - Baz() SliceFooObject - Nickname() PointerString - NumberIsAFavorite() MapIntToBool -} - -type FooFrobber interface { - Name() String - SetName(String) - Amount() Int64 - SetAmount(Int64) -} - -type FooObject interface { - CommonObject -} - - -var FooAFunc func(proto.Object, proto.Object) proto.Frobber = proto.AFunc - - -var FooAVar proto.Frobber = proto.AVar - -var FooAnotherVar proto.Frobber = proto.AnotherVar - -` - testNamer := namer.NewPublicNamer(1, "proto") - rawNamer := namer.NewRawNamer("o", nil) - _, u, o := construct(t, testFiles, testNamer) - t.Logf("\n%v\n\n", o) - args := map[string]interface{}{ - "Name": testNamer.Name, - "Raw": rawNamer.Name, - } - tmpl := template.Must( - template.New(""). - Funcs(args). - Parse(tmplText), - ) - buf := &bytes.Buffer{} - tmpl.Execute(buf, o) - if e, a := expect, buf.String(); e != a { - t.Errorf("Wanted, got:\n%v\n-----\n%v\n", e, a) - } - if p := u.Package("base/foo/proto"); !p.HasImport("base/common/proto") { - t.Errorf("Unexpected lack of import line: %s", p.Imports) - } -} - -func TestStructParse(t *testing.T) { - var structTest = file{ - path: "base/foo/proto/foo.go", - contents: ` - package foo - - // Blah is a test. - // A test, I tell you. - type Blah struct { - // A is the first field. - A int64 ` + "`" + `json:"a"` + "`" + ` - - // B is the second field. - // Multiline comments work. - B string ` + "`" + `json:"b"` + "`" + ` - } - `, - } - - _, u, o := construct(t, []file{structTest}, namer.NewPublicNamer(0)) - t.Logf("%#v", o) - blahT := u.Type(types.Name{Package: "base/foo/proto", Name: "Blah"}) - if blahT == nil { - t.Fatal("type not found") - } - if e, a := types.Struct, blahT.Kind; e != a { - t.Errorf("struct kind wrong, wanted %v, got %v", e, a) - } - if e, a := []string{"Blah is a test.", "A test, I tell you."}, blahT.CommentLines; !reflect.DeepEqual(e, a) { - t.Errorf("struct comment wrong, wanted %q, got %q", e, a) - } - m := types.Member{ - Name: "B", - Embedded: false, - CommentLines: []string{"B is the second field.", "Multiline comments work."}, - Tags: `json:"b"`, - Type: types.String, - } - if e, a := m, blahT.Members[1]; !reflect.DeepEqual(e, a) { - t.Errorf("wanted, got:\n%#v\n%#v", e, a) - } -} - -func TestParseSecondClosestCommentLines(t *testing.T) { - const fileName = "base/foo/proto/foo.go" - testCases := []struct { - testFile file - expected []string - }{ - { - testFile: file{ - path: fileName, contents: ` - package foo - // Blah's SecondClosestCommentLines. - // Another line. - - // Blah is a test. - // A test, I tell you. - type Blah struct { - a int - } - `}, - expected: []string{"Blah's SecondClosestCommentLines.", "Another line."}, - }, - { - testFile: file{ - path: fileName, contents: ` - package foo - // Blah's SecondClosestCommentLines. - // Another line. - - type Blah struct { - a int - } - `}, - expected: []string{"Blah's SecondClosestCommentLines.", "Another line."}, - }, - } - for _, test := range testCases { - _, u, o := construct(t, []file{test.testFile}, namer.NewPublicNamer(0)) - t.Logf("%#v", o) - blahT := u.Type(types.Name{Package: "base/foo/proto", Name: "Blah"}) - if e, a := test.expected, blahT.SecondClosestCommentLines; !reflect.DeepEqual(e, a) { - t.Errorf("struct second closest comment wrong, wanted %q, got %q", e, a) - } - } -} - -func TestTypeKindParse(t *testing.T) { - var testFiles = []file{ - {path: "a/foo.go", contents: "package a\ntype Test string\n"}, - {path: "b/foo.go", contents: "package b\ntype Test map[int]string\n"}, - {path: "c/foo.go", contents: "package c\ntype Test []string\n"}, - {path: "d/foo.go", contents: "package d\ntype Test struct{a int; b struct{a int}; c map[int]string; d *string}\n"}, - {path: "e/foo.go", contents: "package e\ntype Test *string\n"}, - {path: "f/foo.go", contents: ` - package f - import ( - "a" - "b" - ) - type Test []a.Test - type Test2 *a.Test - type Test3 map[a.Test]b.Test - type Test4 struct { - a struct {a a.Test; b b.Test} - b map[a.Test]b.Test - c *a.Test - d []a.Test - e []string - } - `}, - {path: "g/foo.go", contents: ` - package g - type Test func(a, b string) (c, d string) - func (t Test) Method(a, b string) (c, d string) { return t(a, b) } - type Interface interface{Method(a, b string) (c, d string)} - `}, - } - - // Check that the right types are found, and the namers give the expected names. - - assertions := []struct { - Package, Name string - k types.Kind - names []string - }{ - { - Package: "a", Name: "Test", k: types.Alias, - names: []string{"Test", "ATest", "test", "aTest", "a.Test"}, - }, - { - Package: "b", Name: "Test", k: types.Map, - names: []string{"Test", "BTest", "test", "bTest", "b.Test"}, - }, - { - Package: "c", Name: "Test", k: types.Slice, - names: []string{"Test", "CTest", "test", "cTest", "c.Test"}, - }, - { - Package: "d", Name: "Test", k: types.Struct, - names: []string{"Test", "DTest", "test", "dTest", "d.Test"}, - }, - { - Package: "e", Name: "Test", k: types.Pointer, - names: []string{"Test", "ETest", "test", "eTest", "e.Test"}, - }, - { - Package: "f", Name: "Test", k: types.Slice, - names: []string{"Test", "FTest", "test", "fTest", "f.Test"}, - }, - { - Package: "g", Name: "Test", k: types.Func, - names: []string{"Test", "GTest", "test", "gTest", "g.Test"}, - }, - { - Package: "g", Name: "Interface", k: types.Interface, - names: []string{"Interface", "GInterface", "interface", "gInterface", "g.Interface"}, - }, - { - Package: "", Name: "string", k: types.Builtin, - names: []string{"String", "String", "string", "string", "string"}, - }, - { - Package: "", Name: "int", k: types.Builtin, - names: []string{"Int", "Int", "int", "int", "int"}, - }, - { - Package: "", Name: "struct{a int}", k: types.Struct, - names: []string{"StructInt", "StructInt", "structInt", "structInt", "struct{a int}"}, - }, - { - Package: "", Name: "struct{a a.Test; b b.Test}", k: types.Struct, - names: []string{"StructTestTest", "StructATestBTest", "structTestTest", "structATestBTest", "struct{a a.Test; b b.Test}"}, - }, - { - Package: "", Name: "map[int]string", k: types.Map, - names: []string{"MapIntToString", "MapIntToString", "mapIntToString", "mapIntToString", "map[int]string"}, - }, - { - Package: "", Name: "map[a.Test]b.Test", k: types.Map, - names: []string{"MapTestToTest", "MapATestToBTest", "mapTestToTest", "mapATestToBTest", "map[a.Test]b.Test"}, - }, - { - Package: "", Name: "[]string", k: types.Slice, - names: []string{"SliceString", "SliceString", "sliceString", "sliceString", "[]string"}, - }, - { - Package: "", Name: "[]a.Test", k: types.Slice, - names: []string{"SliceTest", "SliceATest", "sliceTest", "sliceATest", "[]a.Test"}, - }, - { - Package: "", Name: "*string", k: types.Pointer, - names: []string{"PointerString", "PointerString", "pointerString", "pointerString", "*string"}, - }, - { - Package: "", Name: "*a.Test", k: types.Pointer, - names: []string{"PointerTest", "PointerATest", "pointerTest", "pointerATest", "*a.Test"}, - }, - } - - namers := []namer.Namer{ - namer.NewPublicNamer(0), - namer.NewPublicNamer(1), - namer.NewPrivateNamer(0), - namer.NewPrivateNamer(1), - namer.NewRawNamer("", nil), - } - - for nameIndex, namer := range namers { - _, u, _ := construct(t, testFiles, namer) - t.Logf("Found types:\n") - for pkgName, pkg := range u { - for typeName, cur := range pkg.Types { - t.Logf("%q-%q: %s %s", pkgName, typeName, cur.Name, cur.Kind) - } - } - t.Logf("\n\n") - - for _, item := range assertions { - n := types.Name{Package: item.Package, Name: item.Name} - thisType := u.Type(n) - if thisType == nil { - t.Errorf("type %s not found", n) - continue - } - underlyingType := thisType - if item.k != types.Alias && thisType.Kind == types.Alias { - underlyingType = thisType.Underlying - if underlyingType == nil { - t.Errorf("underlying type %s not found", n) - continue - } - } - if e, a := item.k, underlyingType.Kind; e != a { - t.Errorf("%v-%s: type kind wrong, wanted %v, got %v (%#v)", nameIndex, n, e, a, underlyingType) - } - if e, a := item.names[nameIndex], namer.Name(thisType); e != a { - t.Errorf("%v-%s: Expected %q, got %q", nameIndex, n, e, a) - } - } - - // Also do some one-off checks - gtest := u.Type(types.Name{Package: "g", Name: "Test"}) - if e, a := 1, len(gtest.Methods); e != a { - t.Errorf("expected %v but found %v methods: %#v", e, a, gtest) - } - iface := u.Type(types.Name{Package: "g", Name: "Interface"}) - if e, a := 1, len(iface.Methods); e != a { - t.Errorf("expected %v but found %v methods: %#v", e, a, iface) - } - } -} diff --git a/vendor/k8s.io/gengo/types/comments_test.go b/vendor/k8s.io/gengo/types/comments_test.go deleted file mode 100644 index 161f4a6e..00000000 --- a/vendor/k8s.io/gengo/types/comments_test.go +++ /dev/null @@ -1,86 +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 types - -import ( - "reflect" - "strings" - "testing" -) - -func TestExtractCommentTags(t *testing.T) { - commentLines := []string{ - "Human comment that is ignored.", - "+foo=value1", - "+bar", - "+foo=value2", - "+baz=qux,zrb=true", - } - - a := ExtractCommentTags("+", commentLines) - e := map[string][]string{ - "foo": {"value1", "value2"}, - "bar": {""}, - "baz": {"qux,zrb=true"}, - } - if !reflect.DeepEqual(e, a) { - t.Errorf("Wanted %q, got %q", e, a) - } -} - -func TestExtractSingleBoolCommentTag(t *testing.T) { - commentLines := []string{ - "Human comment that is ignored.", - "+TRUE=true", - "+FALSE=false", - "+MULTI=true", - "+MULTI=false", - "+MULTI=multi", - "+NOTBOOL=blue", - "+EMPTY", - } - - testCases := []struct { - key string - def bool - exp bool - err string // if set, ignore exp. - }{ - {"TRUE", false, true, ""}, - {"FALSE", true, false, ""}, - {"MULTI", false, true, ""}, - {"NOTBOOL", false, true, "is not boolean"}, - {"EMPTY", false, true, "is not boolean"}, - {"ABSENT", true, true, ""}, - {"ABSENT", false, false, ""}, - } - - for i, tc := range testCases { - v, err := ExtractSingleBoolCommentTag("+", tc.key, tc.def, commentLines) - if err != nil && tc.err == "" { - t.Errorf("[%d]: unexpected failure: %v", i, err) - } else if err == nil && tc.err != "" { - t.Errorf("[%d]: expected failure: %v", i, tc.err) - } else if err != nil { - if !strings.Contains(err.Error(), tc.err) { - t.Errorf("[%d]: unexpected error: expected %q, got %q", i, tc.err, err) - } - } else if v != tc.exp { - t.Errorf("[%d]: unexpected value: expected %t, got %t", i, tc.exp, v) - } - } -} diff --git a/vendor/k8s.io/gengo/types/flatten_test.go b/vendor/k8s.io/gengo/types/flatten_test.go deleted file mode 100644 index 9da34e56..00000000 --- a/vendor/k8s.io/gengo/types/flatten_test.go +++ /dev/null @@ -1,68 +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 types - -import ( - "reflect" - "testing" -) - -func TestFlatten(t *testing.T) { - mapType := &Type{ - Name: Name{Package: "", Name: "map[string]string"}, - Kind: Map, - Key: String, - Elem: String, - } - m := []Member{ - { - Name: "Baz", - Embedded: true, - Type: &Type{ - Name: Name{Package: "pkg", Name: "Baz"}, - Kind: Struct, - Members: []Member{ - {Name: "Foo", Type: String}, - { - Name: "Qux", - Embedded: true, - Type: &Type{ - Name: Name{Package: "pkg", Name: "Qux"}, - Kind: Struct, - Members: []Member{{Name: "Zot", Type: String}}, - }, - }, - }, - }, - }, - {Name: "Bar", Type: String}, - { - Name: "NotSureIfLegal", - Embedded: true, - Type: mapType, - }, - } - e := []Member{ - {Name: "Bar", Type: String}, - {Name: "NotSureIfLegal", Type: mapType, Embedded: true}, - {Name: "Foo", Type: String}, - {Name: "Zot", Type: String}, - } - if a := FlattenMembers(m); !reflect.DeepEqual(e, a) { - t.Errorf("Expected \n%#v\n, got \n%#v\n", e, a) - } -} diff --git a/vendor/k8s.io/gengo/types/types_test.go b/vendor/k8s.io/gengo/types/types_test.go deleted file mode 100644 index 35cc4d61..00000000 --- a/vendor/k8s.io/gengo/types/types_test.go +++ /dev/null @@ -1,210 +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 types - -import ( - "testing" -) - -func TestGetBuiltin(t *testing.T) { - u := Universe{} - if builtinPkg := u.Package(""); builtinPkg.Has("string") { - t.Errorf("Expected builtin package to not have builtins until they're asked for explicitly. %#v", builtinPkg) - } - s := u.Type(Name{Package: "", Name: "string"}) - if s != String { - t.Errorf("Expected canonical string type.") - } - if builtinPkg := u.Package(""); !builtinPkg.Has("string") { - t.Errorf("Expected builtin package to exist and have builtins by default. %#v", builtinPkg) - } - if builtinPkg := u.Package(""); len(builtinPkg.Types) != 1 { - t.Errorf("Expected builtin package to not have builtins until they're asked for explicitly. %#v", builtinPkg) - } -} - -func TestGetMarker(t *testing.T) { - u := Universe{} - n := Name{Package: "path/to/package", Name: "Foo"} - f := u.Type(n) - if f == nil || f.Name != n { - t.Errorf("Expected marker type.") - } -} - -func Test_Type_IsPrimitive(t *testing.T) { - testCases := []struct { - typ Type - expect bool - }{ - { - typ: Type{ - Name: Name{Package: "pkgname", Name: "typename"}, - Kind: Builtin, - }, - expect: true, - }, - { - typ: Type{ - Name: Name{Package: "pkgname", Name: "typename"}, - Kind: Alias, - Underlying: &Type{ - Name: Name{Package: "pkgname", Name: "underlying"}, - Kind: Builtin, - }, - }, - expect: true, - }, - { - typ: Type{ - Name: Name{Package: "pkgname", Name: "typename"}, - Kind: Pointer, - Elem: &Type{ - Name: Name{Package: "pkgname", Name: "pointee"}, - Kind: Builtin, - }, - }, - expect: false, - }, - { - typ: Type{ - Name: Name{Package: "pkgname", Name: "typename"}, - Kind: Struct, - }, - expect: false, - }, - } - - for i, tc := range testCases { - r := tc.typ.IsPrimitive() - if r != tc.expect { - t.Errorf("case[%d]: expected %t, got %t", i, tc.expect, r) - } - } -} - -func Test_Type_IsAssignable(t *testing.T) { - testCases := []struct { - typ Type - expect bool - }{ - { - typ: Type{ - Name: Name{Package: "pkgname", Name: "typename"}, - Kind: Builtin, - }, - expect: true, - }, - { - typ: Type{ - Name: Name{Package: "pkgname", Name: "typename"}, - Kind: Alias, - Underlying: &Type{ - Name: Name{Package: "pkgname", Name: "underlying"}, - Kind: Builtin, - }, - }, - expect: true, - }, - { - typ: Type{ - Name: Name{Package: "pkgname", Name: "typename"}, - Kind: Pointer, - Elem: &Type{ - Name: Name{Package: "pkgname", Name: "pointee"}, - Kind: Builtin, - }, - }, - expect: false, - }, - { - typ: Type{ - Name: Name{Package: "pkgname", Name: "typename"}, - Kind: Struct, // Empty struct - }, - expect: true, - }, - { - typ: Type{ - Name: Name{Package: "pkgname", Name: "typename"}, - Kind: Struct, - Members: []Member{ - { - Name: "m1", - Type: &Type{ - Name: Name{Package: "pkgname", Name: "typename"}, - Kind: Builtin, - }, - }, - { - Name: "m2", - Type: &Type{ - Name: Name{Package: "pkgname", Name: "typename"}, - Kind: Alias, - Underlying: &Type{ - Name: Name{Package: "pkgname", Name: "underlying"}, - Kind: Builtin, - }, - }, - }, - { - Name: "m3", - Type: &Type{ - Name: Name{Package: "pkgname", Name: "typename"}, - Kind: Struct, // Empty struct - }, - }, - }, - }, - expect: true, - }, - { - typ: Type{ - Name: Name{Package: "pkgname", Name: "typename"}, - Kind: Struct, - Members: []Member{ - { - Name: "m1", - Type: &Type{ - Name: Name{Package: "pkgname", Name: "typename"}, - Kind: Builtin, - }, - }, - { - Name: "m2", - Type: &Type{ - Name: Name{Package: "pkgname", Name: "typename"}, - Kind: Pointer, - Elem: &Type{ - Name: Name{Package: "pkgname", Name: "pointee"}, - Kind: Builtin, - }, - }, - }, - }, - }, - expect: false, - }, - } - - for i, tc := range testCases { - r := tc.typ.IsAssignable() - if r != tc.expect { - t.Errorf("case[%d]: expected %t, got %t", i, tc.expect, r) - } - } -} diff --git a/vendor/k8s.io/kube-openapi/.gitignore b/vendor/k8s.io/kube-openapi/.gitignore deleted file mode 100644 index e3604777..00000000 --- a/vendor/k8s.io/kube-openapi/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.dll -*.so -*.dylib - -# Test binary, build with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 -.glide/ - -# Intellij IDEA files -.idea/ -*.iml -.vscode - diff --git a/vendor/k8s.io/kube-openapi/.travis.yml b/vendor/k8s.io/kube-openapi/.travis.yml deleted file mode 100644 index 6c770ec1..00000000 --- a/vendor/k8s.io/kube-openapi/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: go -go_import_path: k8s.io/kube-openapi -script: go test ./pkg/... ./test/... - diff --git a/vendor/k8s.io/kube-openapi/CONTRIBUTING.md b/vendor/k8s.io/kube-openapi/CONTRIBUTING.md deleted file mode 100644 index ef37eb0b..00000000 --- a/vendor/k8s.io/kube-openapi/CONTRIBUTING.md +++ /dev/null @@ -1,9 +0,0 @@ -# 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/vendor/k8s.io/kube-openapi/OWNERS b/vendor/k8s.io/kube-openapi/OWNERS deleted file mode 100755 index e8c62bfa..00000000 --- a/vendor/k8s.io/kube-openapi/OWNERS +++ /dev/null @@ -1,11 +0,0 @@ -reviewers: -- yujuhong -- gmarek -- mbohlool -- philips -- seans3 -- apelisse -approvers: -- mbohlool -- lavalamp -- seans3 diff --git a/vendor/k8s.io/kube-openapi/README.md b/vendor/k8s.io/kube-openapi/README.md deleted file mode 100644 index fd448585..00000000 --- a/vendor/k8s.io/kube-openapi/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Kube OpenAPI - -This repo is the home for Kubernetes OpenAPI discovery spec generation. The goal -is to support a subset of OpenAPI features to satisfy kubernetes use-cases but -implement that subset with little to no assumption about the structure of the -code or routes. Thus, there should be no kubernetes specific code in this repo. - - -There are two main parts: - - A model generator that goes through .go files, find and generate model -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/vendor/k8s.io/kube-openapi/code-of-conduct.md b/vendor/k8s.io/kube-openapi/code-of-conduct.md deleted file mode 100644 index 0d15c00c..00000000 --- a/vendor/k8s.io/kube-openapi/code-of-conduct.md +++ /dev/null @@ -1,3 +0,0 @@ -# Kubernetes Community Code of Conduct - -Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) diff --git a/vendor/k8s.io/kube-openapi/pkg/util/proto/openapi_suite_test.go b/vendor/k8s.io/kube-openapi/pkg/util/proto/openapi_suite_test.go deleted file mode 100644 index 24b5168e..00000000 --- a/vendor/k8s.io/kube-openapi/pkg/util/proto/openapi_suite_test.go +++ /dev/null @@ -1,49 +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 proto_test - -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/vendor/k8s.io/kube-openapi/pkg/util/proto/openapi_test.go b/vendor/k8s.io/kube-openapi/pkg/util/proto/openapi_test.go deleted file mode 100644 index b6e23725..00000000 --- a/vendor/k8s.io/kube-openapi/pkg/util/proto/openapi_test.go +++ /dev/null @@ -1,265 +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 proto_test - -import ( - "path/filepath" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "k8s.io/kube-openapi/pkg/util/proto" - "k8s.io/kube-openapi/pkg/util/proto/testing" -) - -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 v1.8 openAPIData", func() { - var models proto.Models - BeforeEach(func() { - s, err := fakeSchema.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()) - }) - - It("should have a path", func() { - Expect(deployment.GetPath().Get()).To(Equal([]string{"io.k8s.api.apps.v1beta1.Deployment"})) - }) - - It("should have a kind key of type string", func() { - Expect(deployment.Fields).To(HaveKey("kind")) - key := deployment.Fields["kind"].(*proto.Primitive) - Expect(key).ToNot(BeNil()) - Expect(key.Type).To(Equal("string")) - Expect(key.GetPath().Get()).To(Equal([]string{"io.k8s.api.apps.v1beta1.Deployment", ".kind"})) - }) - - It("should have a apiVersion key of type string", func() { - Expect(deployment.Fields).To(HaveKey("apiVersion")) - key := deployment.Fields["apiVersion"].(*proto.Primitive) - Expect(key).ToNot(BeNil()) - Expect(key.Type).To(Equal("string")) - Expect(key.GetPath().Get()).To(Equal([]string{"io.k8s.api.apps.v1beta1.Deployment", ".apiVersion"})) - }) - - It("should have a metadata key of type Reference", func() { - Expect(deployment.Fields).To(HaveKey("metadata")) - key := deployment.Fields["metadata"].(proto.Reference) - Expect(key).ToNot(BeNil()) - Expect(key.Reference()).To(Equal("io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta")) - subSchema := key.SubSchema().(*proto.Kind) - Expect(subSchema).ToNot(BeNil()) - }) - - var status *proto.Kind - It("should have a status key of type Reference", func() { - Expect(deployment.Fields).To(HaveKey("status")) - key := deployment.Fields["status"].(proto.Reference) - Expect(key).ToNot(BeNil()) - Expect(key.Reference()).To(Equal("io.k8s.api.apps.v1beta1.DeploymentStatus")) - status = key.SubSchema().(*proto.Kind) - Expect(status).ToNot(BeNil()) - }) - - It("should have a valid DeploymentStatus", func() { - By("having availableReplicas key") - Expect(status.Fields).To(HaveKey("availableReplicas")) - replicas := status.Fields["availableReplicas"].(*proto.Primitive) - Expect(replicas).ToNot(BeNil()) - Expect(replicas.Type).To(Equal("integer")) - - By("having conditions key") - Expect(status.Fields).To(HaveKey("conditions")) - conditions := status.Fields["conditions"].(*proto.Array) - Expect(conditions).ToNot(BeNil()) - Expect(conditions.GetName()).To(Equal(`Array of Reference to "io.k8s.api.apps.v1beta1.DeploymentCondition"`)) - Expect(conditions.GetExtensions()).To(Equal(map[string]interface{}{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - })) - condition := conditions.SubType.(proto.Reference) - Expect(condition.Reference()).To(Equal("io.k8s.api.apps.v1beta1.DeploymentCondition")) - }) - - var spec *proto.Kind - It("should have a spec key of type Reference", func() { - Expect(deployment.Fields).To(HaveKey("spec")) - key := deployment.Fields["spec"].(proto.Reference) - Expect(key).ToNot(BeNil()) - Expect(key.Reference()).To(Equal("io.k8s.api.apps.v1beta1.DeploymentSpec")) - spec = key.SubSchema().(*proto.Kind) - Expect(spec).ToNot(BeNil()) - }) - - It("should have a spec with no gvk", func() { - _, found := spec.GetExtensions()["x-kubernetes-group-version-kind"] - Expect(found).To(BeFalse()) - }) - - It("should have a spec with a PodTemplateSpec sub-field", func() { - Expect(spec.Fields).To(HaveKey("template")) - key := spec.Fields["template"].(proto.Reference) - Expect(key).ToNot(BeNil()) - Expect(key.Reference()).To(Equal("io.k8s.api.core.v1.PodTemplateSpec")) - }) -}) - -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() { - s, err := fakeSchema.OpenAPISchema() - Expect(err).To(BeNil()) - models, err = proto.NewOpenAPIData(s) - Expect(err).To(BeNil()) - }) - - model := "io.k8s.api.authorization.v1.LocalSubjectAccessReview" - var schema proto.Schema - It("should lookup the Schema by its model", func() { - schema = models.LookupModel(model) - Expect(schema).ToNot(BeNil()) - }) - - var sarspec *proto.Kind - It("should be a Kind and have a spec", func() { - sar := schema.(*proto.Kind) - Expect(sar).ToNot(BeNil()) - Expect(sar.Fields).To(HaveKey("spec")) - specRef := sar.Fields["spec"].(proto.Reference) - Expect(specRef).ToNot(BeNil()) - Expect(specRef.Reference()).To(Equal("io.k8s.api.authorization.v1.SubjectAccessReviewSpec")) - sarspec = specRef.SubSchema().(*proto.Kind) - Expect(sarspec).ToNot(BeNil()) - }) - - It("should have a valid SubjectAccessReviewSpec", func() { - Expect(sarspec.Fields).To(HaveKey("extra")) - extra := sarspec.Fields["extra"].(*proto.Map) - Expect(extra).ToNot(BeNil()) - Expect(extra.GetName()).To(Equal("Map of Array of string")) - Expect(extra.GetPath().Get()).To(Equal([]string{"io.k8s.api.authorization.v1.SubjectAccessReviewSpec", ".extra"})) - array := extra.SubType.(*proto.Array) - Expect(array).ToNot(BeNil()) - Expect(array.GetName()).To(Equal("Array of string")) - Expect(array.GetPath().Get()).To(Equal([]string{"io.k8s.api.authorization.v1.SubjectAccessReviewSpec", ".extra"})) - str := array.SubType.(*proto.Primitive) - Expect(str).ToNot(BeNil()) - Expect(str.Type).To(Equal("string")) - Expect(str.GetName()).To(Equal("string")) - Expect(str.GetPath().Get()).To(Equal([]string{"io.k8s.api.authorization.v1.SubjectAccessReviewSpec", ".extra"})) - }) -}) - -var _ = Describe("Path", func() { - It("can be created by NewPath", func() { - path := proto.NewPath("key") - Expect(path.String()).To(Equal("key")) - }) - It("can create and print complex paths", func() { - key := proto.NewPath("key") - array := key.ArrayPath(12) - field := array.FieldPath("subKey") - - Expect(field.String()).To(Equal("key[12].subKey")) - }) - It("has a length", func() { - key := proto.NewPath("key") - array := key.ArrayPath(12) - field := array.FieldPath("subKey") - - Expect(field.Len()).To(Equal(3)) - }) - It("can look like an array", func() { - key := proto.NewPath("key") - array := key.ArrayPath(12) - field := array.FieldPath("subKey") - - Expect(field.Get()).To(Equal([]string{"key", "[12]", ".subKey"})) - }) -}) diff --git a/vendor/k8s.io/kube-openapi/pkg/util/trie.go b/vendor/k8s.io/kube-openapi/pkg/util/trie.go deleted file mode 100644 index a9a76c17..00000000 --- a/vendor/k8s.io/kube-openapi/pkg/util/trie.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 util - -// A simple trie implementation with Add and HasPrefix methods only. -type Trie struct { - children map[byte]*Trie - wordTail bool - word string -} - -// NewTrie creates a Trie and add all strings in the provided list to it. -func NewTrie(list []string) Trie { - ret := Trie{ - children: make(map[byte]*Trie), - wordTail: false, - } - for _, v := range list { - ret.Add(v) - } - return ret -} - -// Add adds a word to this trie -func (t *Trie) Add(v string) { - root := t - for _, b := range []byte(v) { - child, exists := root.children[b] - if !exists { - child = &Trie{ - children: make(map[byte]*Trie), - wordTail: false, - } - root.children[b] = child - } - root = child - } - root.wordTail = true - root.word = v -} - -// HasPrefix returns true of v has any of the prefixes stored in this trie. -func (t *Trie) HasPrefix(v string) bool { - _, has := t.GetPrefix(v) - return has -} - -// GetPrefix is like HasPrefix but return the prefix in case of match or empty string otherwise. -func (t *Trie) GetPrefix(v string) (string, bool) { - root := t - if root.wordTail { - return root.word, true - } - for _, b := range []byte(v) { - child, exists := root.children[b] - if !exists { - return "", false - } - if child.wordTail { - return child.word, true - } - root = child - } - return "", false -} diff --git a/vendor/k8s.io/kube-openapi/pkg/util/util.go b/vendor/k8s.io/kube-openapi/pkg/util/util.go deleted file mode 100644 index bcc0c4d4..00000000 --- a/vendor/k8s.io/kube-openapi/pkg/util/util.go +++ /dev/null @@ -1,39 +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 util - -import "strings" - -// ToCanonicalName converts Golang package/type name into canonical OpenAPI name. -// Examples: -// Input: k8s.io/api/core/v1.Pod -// Output: io.k8s.api.core.v1.Pod -// -// Input: k8s.io/api/core/v1 -// Output: io.k8s.api.core.v1 -func ToCanonicalName(name string) string { - nameParts := strings.Split(name, "/") - // Reverse first part. e.g., io.k8s... instead of k8s.io... - if len(nameParts) > 0 && strings.Contains(nameParts[0], ".") { - parts := strings.Split(nameParts[0], ".") - for i, j := 0, len(parts)-1; i < j; i, j = i+1, j-1 { - parts[i], parts[j] = parts[j], parts[i] - } - nameParts[0] = strings.Join(parts, ".") - } - return strings.Join(nameParts, ".") -} diff --git a/vendor/k8s.io/kube-openapi/pkg/util/util_test.go b/vendor/k8s.io/kube-openapi/pkg/util/util_test.go deleted file mode 100644 index f3a1b91a..00000000 --- a/vendor/k8s.io/kube-openapi/pkg/util/util_test.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -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/vendor/k8s.io/kubernetes/.generated_files b/vendor/k8s.io/kubernetes/.generated_files deleted file mode 100644 index ac3b191a..00000000 --- a/vendor/k8s.io/kubernetes/.generated_files +++ /dev/null @@ -1,30 +0,0 @@ -# Files that should be ignored by tools which do not want to consider generated -# code. -# -# https://github.com/kubernetes/contrib/blob/master/mungegithub/mungers/size.go -# -# This file is a series of lines, each of the form: -# -# -# Type can be: -# path - an exact path to a single file -# file-name - an exact leaf filename, regardless of path -# path-prefix - a prefix match on the file path -# file-prefix - a prefix match of the leaf filename (no path) -# paths-from-repo - read a file from the repo and load file paths -# - -file-prefix zz_generated. - -file-name BUILD -file-name types.generated.go -file-name generated.pb.go -file-name generated.proto -file-name types_swagger_doc_generated.go - -path-prefix Godeps/ -path-prefix vendor/ -path-prefix api/swagger-spec/ -path-prefix pkg/generated/ - -paths-from-repo docs/.generated_docs diff --git a/vendor/k8s.io/kubernetes/.gitattributes b/vendor/k8s.io/kubernetes/.gitattributes deleted file mode 100644 index 7c65ce94..00000000 --- a/vendor/k8s.io/kubernetes/.gitattributes +++ /dev/null @@ -1,11 +0,0 @@ -hack/verify-flags/known-flags.txt merge=union -test/test_owners.csv merge=union - -**/zz_generated.*.go linguist-generated=true -**/types.generated.go linguist-generated=true -**/generated.pb.go linguist-generated=true -**/generated.proto -**/types_swagger_doc_generated.go linguist-generated=true -docs/api-reference/** linguist-generated=true -api/swagger-spec/*.json linguist-generated=true -api/openapi-spec/*.json linguist-generated=true diff --git a/vendor/k8s.io/kubernetes/.gitignore b/vendor/k8s.io/kubernetes/.gitignore deleted file mode 100644 index 9aa7a78a..00000000 --- a/vendor/k8s.io/kubernetes/.gitignore +++ /dev/null @@ -1,128 +0,0 @@ -# OSX leaves these everywhere on SMB shares -._* - -# OSX trash -.DS_Store - -# Eclipse files -.classpath -.project -.settings/** - -# Files generated by JetBrains IDEs, e.g. IntelliJ IDEA -.idea/ -*.iml - -# Vscode files -.vscode - -# This is where the result of the go build goes -/output*/ -/_output*/ -/_output - -# Emacs save files -*~ -\#*\# -.\#* - -# Vim-related files -[._]*.s[a-w][a-z] -[._]s[a-w][a-z] -*.un~ -Session.vim -.netrwhist - -# cscope-related files -cscope.* - -# Go test binaries -*.test -/hack/.test-cmd-auth - -# JUnit test output from ginkgo e2e tests -/junit*.xml - -# Mercurial files -**/.hg -**/.hg* - -# Vagrant -.vagrant -network_closure.sh - -# Local cluster env variables -/cluster/env.sh - -# Compiled binaries in third_party -/third_party/pkg - -# Also ignore etcd installed by hack/install-etcd.sh -/third_party/etcd* -/default.etcd - -# User cluster configs -.kubeconfig - -.tags* - -# Version file for dockerized build -.dockerized-kube-version-defs - -# Web UI -/www/master/node_modules/ -/www/master/npm-debug.log -/www/master/shared/config/development.json - -# Karma output -/www/test_out - -# precommit temporary directories created by ./hack/verify-generated-docs.sh and ./hack/lib/util.sh -/_tmp/ -/doc_tmp/ - -# Test artifacts produced by Jenkins jobs -/_artifacts/ - -# Go dependencies installed on Jenkins -/_gopath/ - -# Config directories created by gcloud and gsutil on Jenkins -/.config/gcloud*/ -/.gsutil/ - -# CoreOS stuff -/cluster/libvirt-coreos/coreos_*.img - -# Juju Stuff -/cluster/juju/charms/* -/cluster/juju/bundles/local.yaml - -# Downloaded Kubernetes binary release -/kubernetes/ - -# direnv .envrc files -.envrc - -# Downloaded kubernetes binary release tar ball -kubernetes.tar.gz - -# generated files in any directory -# TODO(thockin): uncomment this when we stop committing the generated files. -#zz_generated.* -zz_generated.openapi.go - -# make-related metadata -/.make/ - -# Just in time generated data in the source, should never be committed -/test/e2e/generated/bindata.go - -# This file used by some vendor repos (e.g. github.com/go-openapi/...) to store secret variables and should not be ignored -!\.drone\.sec - -# Godeps workspace -/Godeps/_workspace - -/bazel-* -*.pyc diff --git a/vendor/k8s.io/kubernetes/CHANGELOG-1.11.md b/vendor/k8s.io/kubernetes/CHANGELOG-1.11.md deleted file mode 100644 index 0f55fb09..00000000 --- a/vendor/k8s.io/kubernetes/CHANGELOG-1.11.md +++ /dev/null @@ -1,1825 +0,0 @@ - -- [v1.11.1](#v1111) - - [Downloads for v1.11.1](#downloads-for-v1111) - - [Client Binaries](#client-binaries) - - [Server Binaries](#server-binaries) - - [Node Binaries](#node-binaries) - - [Changelog since v1.11.0](#changelog-since-v1110) - - [Action Required](#action-required) - - [Other notable changes](#other-notable-changes) -- [v1.11.0](#v1110) - - [Downloads for v1.11.0](#downloads-for-v1110) - - [Client Binaries](#client-binaries-1) - - [Server Binaries](#server-binaries-1) - - [Node Binaries](#node-binaries-1) -- [Kubernetes 1.11 Release Notes](#kubernetes-111-release-notes) - - [Urgent Upgrade Notes](#urgent-upgrade-notes) - - [(No, really, you MUST do this before you upgrade)](#no-really-you-must-do-this-before-you-upgrade) - - [Major Themes](#major-themes) - - [SIG API Machinery](#sig-api-machinery) - - [SIG Auth](#sig-auth) - - [SIG CLI](#sig-cli) - - [SIG Cluster Lifecycle](#sig-cluster-lifecycle) - - [SIG Instrumentation](#sig-instrumentation) - - [SIG Network](#sig-network) - - [SIG Node](#sig-node) - - [SIG OpenStack](#sig-openstack) - - [SIG Scheduling](#sig-scheduling) - - [SIG Storage](#sig-storage) - - [SIG Windows](#sig-windows) - - [Known Issues](#known-issues) - - [Before Upgrading](#before-upgrading) - - [New Deprecations](#new-deprecations) - - [Removed Deprecations](#removed-deprecations) - - [Graduated to Stable/GA](#graduated-to-stablega) - - [Graduated to Beta](#graduated-to-beta) - - [New alpha features](#new-alpha-features) - - [Other Notable Changes](#other-notable-changes-1) - - [SIG API Machinery](#sig-api-machinery-1) - - [SIG Apps](#sig-apps) - - [SIG Auth](#sig-auth-1) - - [SIG Autoscaling](#sig-autoscaling) - - [SIG Azure](#sig-azure) - - [SIG CLI](#sig-cli-1) - - [SIG Cluster Lifecycle](#sig-cluster-lifecycle-1) - - [SIG GCP](#sig-gcp) - - [SIG Instrumentation](#sig-instrumentation-1) - - [SIG Network](#sig-network-1) - - [SIG Node](#sig-node-1) - - [SIG OpenStack](#sig-openstack-1) - - [SIG Scheduling](#sig-scheduling-1) - - [SIG Storage](#sig-storage-1) - - [SIG vSphere](#sig-vsphere) - - [SIG Windows](#sig-windows-1) - - [Additional changes](#additional-changes) - - [External Dependencies](#external-dependencies) - - [Bug Fixes](#bug-fixes) - - [General Fixes and Reliability](#general-fixes-and-reliability) - - [Non-user-facing changes](#non-user-facing-changes) -- [v1.11.0-rc.3](#v1110-rc3) - - [Downloads for v1.11.0-rc.3](#downloads-for-v1110-rc3) - - [Client Binaries](#client-binaries-2) - - [Server Binaries](#server-binaries-2) - - [Node Binaries](#node-binaries-2) - - [Changelog since v1.11.0-rc.2](#changelog-since-v1110-rc2) - - [Other notable changes](#other-notable-changes-2) -- [v1.11.0-rc.2](#v1110-rc2) - - [Downloads for v1.11.0-rc.2](#downloads-for-v1110-rc2) - - [Client Binaries](#client-binaries-3) - - [Server Binaries](#server-binaries-3) - - [Node Binaries](#node-binaries-3) - - [Changelog since v1.11.0-rc.1](#changelog-since-v1110-rc1) - - [Other notable changes](#other-notable-changes-3) -- [v1.11.0-rc.1](#v1110-rc1) - - [Downloads for v1.11.0-rc.1](#downloads-for-v1110-rc1) - - [Client Binaries](#client-binaries-4) - - [Server Binaries](#server-binaries-4) - - [Node Binaries](#node-binaries-4) - - [Changelog since v1.11.0-beta.2](#changelog-since-v1110-beta2) - - [Action Required](#action-required-1) - - [Other notable changes](#other-notable-changes-4) -- [v1.11.0-beta.2](#v1110-beta2) - - [Downloads for v1.11.0-beta.2](#downloads-for-v1110-beta2) - - [Client Binaries](#client-binaries-5) - - [Server Binaries](#server-binaries-5) - - [Node Binaries](#node-binaries-5) - - [Changelog since v1.11.0-beta.1](#changelog-since-v1110-beta1) - - [Action Required](#action-required-2) - - [Other notable changes](#other-notable-changes-5) -- [v1.11.0-beta.1](#v1110-beta1) - - [Downloads for v1.11.0-beta.1](#downloads-for-v1110-beta1) - - [Client Binaries](#client-binaries-6) - - [Server Binaries](#server-binaries-6) - - [Node Binaries](#node-binaries-6) - - [Changelog since v1.11.0-alpha.2](#changelog-since-v1110-alpha2) - - [Action Required](#action-required-3) - - [Other notable changes](#other-notable-changes-6) -- [v1.11.0-alpha.2](#v1110-alpha2) - - [Downloads for v1.11.0-alpha.2](#downloads-for-v1110-alpha2) - - [Client Binaries](#client-binaries-7) - - [Server Binaries](#server-binaries-7) - - [Node Binaries](#node-binaries-7) - - [Changelog since v1.11.0-alpha.1](#changelog-since-v1110-alpha1) - - [Other notable changes](#other-notable-changes-7) -- [v1.11.0-alpha.1](#v1110-alpha1) - - [Downloads for v1.11.0-alpha.1](#downloads-for-v1110-alpha1) - - [Client Binaries](#client-binaries-8) - - [Server Binaries](#server-binaries-8) - - [Node Binaries](#node-binaries-8) - - [Changelog since v1.10.0](#changelog-since-v1100) - - [Action Required](#action-required-4) - - [Other notable changes](#other-notable-changes-8) - - - - - -# v1.11.1 - -[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.11/examples) - -## Downloads for v1.11.1 - - -filename | sha256 hash --------- | ----------- -[kubernetes.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes.tar.gz) | `77d93c4ab10b1c4421835ebf3c81dc9c6d2a798949ee9132418e24d500c22d6e` -[kubernetes-src.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-src.tar.gz) | `e597a3a73f4c4933e9fb145d398adfc4e245e4465bbea50b0e55c78d2b0e70ef` - -### Client Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-client-darwin-386.tar.gz) | `d668a91a52ad9c0a95a94172f89b42b42ca8f9eafe4ac479a97fe2e11f5dbd8e` -[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-client-darwin-amd64.tar.gz) | `5d6ce0f956b789840baf207b6d2bb252a4f8f0eaf6981207eb7df25e39871452` -[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-client-linux-386.tar.gz) | `1e47c66db3b7a194327f1d3082b657140d4cfee09eb03162a658d0604c31028e` -[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-client-linux-amd64.tar.gz) | `a6c7537434fedde75fb77c593b2d2978be1aed00896a354120c5b7164e54aa99` -[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-client-linux-arm.tar.gz) | `6eed4c3f11eb844947344e283482eeeb38a4b59eb8e24174fb706e997945ce12` -[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-client-linux-arm64.tar.gz) | `c260ee179420ce396ab972ab1252a26431c50b5412de2466ede1fb506d5587af` -[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-client-linux-ppc64le.tar.gz) | `01ec89ebbeb2b673504bb629e6a20793c31e29fc9b96100796533c391f3b13f2` -[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-client-linux-s390x.tar.gz) | `28b171b63d5c49d0d64006d331daba0ef6e9e841d69c3588bb3502eb122ef76a` -[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-client-windows-386.tar.gz) | `9ee394cadd909a937aef5c82c3499ae12da226ccbaa21f6d82c4878b7cb31d6c` -[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-client-windows-amd64.tar.gz) | `ab2c21e627a2fab52193ad7af0aabc001520975aac35660dc5f857320176e6c4` - -### Server Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-server-linux-amd64.tar.gz) | `f120baa4b37323a8d7cd6e8027f7b19a544f528d2cae4028366ffbb28dc68d8a` -[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-server-linux-arm.tar.gz) | `eac27b81cf2819619fdda54a83f06aecf77aefef1f2f2accd7adcc725cb607ff` -[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-server-linux-arm64.tar.gz) | `25d87248f0da9ba71a4e6c5d1b7af2259ffd43435715d52db6044ebe85466fad` -[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-server-linux-ppc64le.tar.gz) | `7eba9021f93b6f99167cd088933aabbf11d5a6f990d796fc1b884ed97e066a3b` -[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-server-linux-s390x.tar.gz) | `144fa932ab4bea9e810958dd859fdf9b11a9f90918c22b2c9322b6c21b5c82ed` - -### Node Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-node-linux-amd64.tar.gz) | `45fae35f7c3b23ff8557dcf638eb631dabbcc46a804534ca9d1043d846ec4408` -[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-node-linux-arm.tar.gz) | `19c29a635807979a87dcac610f79373df8ee90de823cf095362dcca086844831` -[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-node-linux-arm64.tar.gz) | `35b9a5fa8671c46b9c175a4920dce269fccf84b1defdbccb24e76c4eab9fb255` -[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-node-linux-ppc64le.tar.gz) | `b4a111ee652b42c9d92288d4d86f4897af524537b9409b1f5cedefb4122bb2d6` -[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-node-linux-s390x.tar.gz) | `4730b9d81cdde078c17c0831b1b20eeda65f4df37e0f595accc63bd2c1635bae` -[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.11.1/kubernetes-node-windows-amd64.tar.gz) | `d7fdf0341efe3d6a80a295aae19874a4099644c7ddba5fa34bee3a6924e0840b` - -## Changelog since v1.11.0 - -### Action Required - -* ACTION REQUIRED: Removes defaulting of CSI file system type to ext4. All the production drivers listed under https://kubernetes-csi.github.io/docs/Drivers.html were inspected and should not be impacted after this change. If you are using a driver not in that list, please test the drivers on an updated test cluster first. ``` ([#65499](https://github.com/kubernetes/kubernetes/pull/65499), [@krunaljain](https://github.com/krunaljain)) -* kube-apiserver: the `Priority` admission plugin is now enabled by default when using `--enable-admission-plugins`. If using `--admission-control` to fully specify the set of admission plugins, the `Priority` admission plugin should be added if using the `PodPriority` feature, which is enabled by default in 1.11. ([#65739](https://github.com/kubernetes/kubernetes/pull/65739), [@liggitt](https://github.com/liggitt)) -* The `system-node-critical` and `system-cluster-critical` priority classes are now limited to the `kube-system` namespace by the `PodPriority` admission plugin. ([#65593](https://github.com/kubernetes/kubernetes/pull/65593), [@bsalamat](https://github.com/bsalamat)) - -### Other notable changes - -* kubeadm: run kube-proxy on non-master tainted nodes ([#65931](https://github.com/kubernetes/kubernetes/pull/65931), [@neolit123](https://github.com/neolit123)) -* Fix an issue with dropped audit logs, when truncating and batch backends enabled at the same time. ([#65823](https://github.com/kubernetes/kubernetes/pull/65823), [@loburm](https://github.com/loburm)) -* set EnableHTTPSTrafficOnly in azure storage account creation ([#64957](https://github.com/kubernetes/kubernetes/pull/64957), [@andyzhangx](https://github.com/andyzhangx)) -* Re-adds `pkg/generated/bindata.go` to the repository to allow some parts of k8s.io/kubernetes to be go-vendorable. ([#65985](https://github.com/kubernetes/kubernetes/pull/65985), [@ixdy](https://github.com/ixdy)) -* Fix a scalability issue where high rates of event writes degraded etcd performance. ([#64539](https://github.com/kubernetes/kubernetes/pull/64539), [@ccding](https://github.com/ccding)) -* "kubectl delete" no longer waits for dependent objects to be deleted when removing parent resources ([#65908](https://github.com/kubernetes/kubernetes/pull/65908), [@juanvallejo](https://github.com/juanvallejo)) -* Update to use go1.10.3 ([#65726](https://github.com/kubernetes/kubernetes/pull/65726), [@ixdy](https://github.com/ixdy)) -* Fix the bug where image garbage collection is disabled by mistake. ([#66051](https://github.com/kubernetes/kubernetes/pull/66051), [@jiaxuanzhou](https://github.com/jiaxuanzhou)) -* Fix `RunAsGroup` which doesn't work since 1.10. ([#65926](https://github.com/kubernetes/kubernetes/pull/65926), [@Random-Liu](https://github.com/Random-Liu)) -* Fixed cleanup of CSI metadata files. ([#65323](https://github.com/kubernetes/kubernetes/pull/65323), [@jsafrane](https://github.com/jsafrane)) -* Reload systemd config files before starting kubelet. ([#65702](https://github.com/kubernetes/kubernetes/pull/65702), [@mborsz](https://github.com/mborsz)) -* Fix a bug that preempting a pod may block forever. ([#65987](https://github.com/kubernetes/kubernetes/pull/65987), [@Random-Liu](https://github.com/Random-Liu)) -* fixes a regression in kubectl printing behavior when using go-template or jsonpath output that resulted in a "unable to match a printer" error message ([#65979](https://github.com/kubernetes/kubernetes/pull/65979), [@juanvallejo](https://github.com/juanvallejo)) -* add external resource group support for azure disk ([#64427](https://github.com/kubernetes/kubernetes/pull/64427), [@andyzhangx](https://github.com/andyzhangx)) -* Properly manage security groups for loadbalancer services on OpenStack. ([#65373](https://github.com/kubernetes/kubernetes/pull/65373), [@multi-io](https://github.com/multi-io)) -* Allow access to ClusterIP from the host network namespace when kube-proxy is started in IPVS mode without either masqueradeAll or clusterCIDR flags ([#65388](https://github.com/kubernetes/kubernetes/pull/65388), [@lbernail](https://github.com/lbernail)) -* kubeadm: Fix pause image to not use architecture, as it is a manifest list ([#65920](https://github.com/kubernetes/kubernetes/pull/65920), [@dims](https://github.com/dims)) -* bazel deb package bugfix: The kubeadm deb package now reloads the kubelet after installation ([#65554](https://github.com/kubernetes/kubernetes/pull/65554), [@rdodev](https://github.com/rdodev)) -* The garbage collector now supports CustomResourceDefinitions and APIServices. ([#65915](https://github.com/kubernetes/kubernetes/pull/65915), [@nikhita](https://github.com/nikhita)) -* fix azure storage account creation failure ([#65846](https://github.com/kubernetes/kubernetes/pull/65846), [@andyzhangx](https://github.com/andyzhangx)) -* skip nodes that have a primary NIC in a 'Failed' provisioningState ([#65412](https://github.com/kubernetes/kubernetes/pull/65412), [@yastij](https://github.com/yastij)) -* Fix 'kubectl cp' with no arguments causes a panic ([#65482](https://github.com/kubernetes/kubernetes/pull/65482), [@wgliang](https://github.com/wgliang)) -* On COS, NPD creates a node condition for frequent occurrences of unregister_netdevice ([#65342](https://github.com/kubernetes/kubernetes/pull/65342), [@dashpole](https://github.com/dashpole)) -* bugfix: Do not print feature gates in the generic apiserver code for glog level 0 ([#65584](https://github.com/kubernetes/kubernetes/pull/65584), [@neolit123](https://github.com/neolit123)) -* Add prometheus scrape port to CoreDNS service ([#65589](https://github.com/kubernetes/kubernetes/pull/65589), [@rajansandeep](https://github.com/rajansandeep)) -* kubectl: fixes a regression with --use-openapi-print-columns that would not print object contents ([#65600](https://github.com/kubernetes/kubernetes/pull/65600), [@liggitt](https://github.com/liggitt)) -* fixes an out of range panic in the NoExecuteTaintManager controller when running a non-64-bit build ([#65596](https://github.com/kubernetes/kubernetes/pull/65596), [@liggitt](https://github.com/liggitt)) -* Fixed issue 63608, which is that under rare circumstances the ResourceQuota admission controller could lose track of an request in progress and time out after waiting 10 seconds for a decision to be made. ([#64598](https://github.com/kubernetes/kubernetes/pull/64598), [@MikeSpreitzer](https://github.com/MikeSpreitzer)) - - - -# v1.11.0 - -[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.11/examples) - -## Downloads for v1.11.0 - - -filename | sha256 hash --------- | ----------- -[kubernetes.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes.tar.gz) | `3c779492574a5d8ce702d89915184f5dd52280da909abf134232e5ab00b4a885` -[kubernetes-src.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-src.tar.gz) | `f0b2d8e61860acaf50a9bae0dc36b8bfdb4bb41b8d0a1bb5a9bc3d87aad3b794` - -### Client Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-client-darwin-386.tar.gz) | `196738ef058510438b3129f0a72544544b7d52a8732948b4f9358781f87dab59` -[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-client-darwin-amd64.tar.gz) | `9ec8357b10b79f8fd87f3a836879d0a4bb46fb70adbb82f1e34dc7e91d74999f` -[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-client-linux-386.tar.gz) | `e8ee8a965d3ea241d9768b9ac868ecbbee112ef45038ff219e4006fa7f4ab4e2` -[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-client-linux-amd64.tar.gz) | `d31377c92b4cc9b3da086bc1974cbf57b0d2c2b22ae789ba84cf1b7554ea7067` -[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-client-linux-arm.tar.gz) | `9e9da909293a4682a5d6270a39894b056b3e901532b15eb8fdc0814a8d628d65` -[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-client-linux-arm64.tar.gz) | `149df9daac3e596042f5759977f9f9299a397130d9dddc2d4a2b513dd64f1092` -[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-client-linux-ppc64le.tar.gz) | `ff3d3e4714406d92e9a2b7ef2887519800b89f6592a756524f7a37dc48057f44` -[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-client-linux-s390x.tar.gz) | `e5a39bdc1e474d9d00974a81101e043aaff37c30c1418fb85a0c2561465e14c7` -[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-client-windows-386.tar.gz) | `4ba1102a33c6d4df650c4864a118f99a9882021fea6f250a35f4b4f4a2d68eaa` -[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-client-windows-amd64.tar.gz) | `0bb74af7358f9a2f4139ed1c10716a2f5f0c1c13ab3af71a0621a1983233c8d7` - -### Server Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-server-linux-amd64.tar.gz) | `b8a8a88afd8a40871749b2362dbb21295c6a9c0a85b6fc87e7febea1688eb99e` -[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-server-linux-arm.tar.gz) | `88b9168013bb07a7e17ddc0638e7d36bcd2984d049a50a96f54cb4218647d8da` -[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-server-linux-arm64.tar.gz) | `12fab9e9f0e032f278c0e114c72ea01899a0430fc772401f23e26de306e0f59f` -[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-server-linux-ppc64le.tar.gz) | `6616d726a651e733cfd4cccd78bfdc1d421c4a446edf4b617b8fd8f5e21f073e` -[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-server-linux-s390x.tar.gz) | `291838980929c8073ac592219d9576c84a9bdf233585966c81a380c3d753316e` - -### Node Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-node-linux-amd64.tar.gz) | `b23e905efb828fdffc4efc208f7343236b22c964e408fe889f529502aed4a335` -[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-node-linux-arm.tar.gz) | `44bf8973581887a2edd33eb637407e76dc0dc3a5abcc2ff04aec8338b533156d` -[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-node-linux-arm64.tar.gz) | `51e481c782233b46ee21e9635c7d8c2a84450cbe30d7b1cbe5c5982b33f40b13` -[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-node-linux-ppc64le.tar.gz) | `d1a3feda31a954d3a83193a51a117873b6ef9f8acc3e10b3f1504fece91f2eb8` -[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-node-linux-s390x.tar.gz) | `0ad76c6e6aef670c215256803b3b0d19f4730a0843429951c6421564c73d4932` -[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.11.0/kubernetes-node-windows-amd64.tar.gz) | `8ad26200ed40d40a1b78d7a5dbe56220f0813d31194f40f267b476499fe2c5c3` - -# Kubernetes 1.11 Release Notes - -## Urgent Upgrade Notes -### (No, really, you MUST do this before you upgrade) - -Before upgrading to Kubernetes 1.11, you must keep the following in mind: - -* **JSON configuration files that contain fields with incorrect case will no longer be valid. You must correct these files before upgrading.** When specifying keys in JSON resource definitions during direct API server communication, the keys are case-sensitive. A bug introduced in Kubernetes 1.8 caused the API server to accept a request with incorrect case and coerce it to correct case, but this behaviour has been fixed in 1.11 and the API server will once again be enforcing the correct case. It’s worth noting that during this time, the `kubectl` tool continued to enforce case-sensitive keys, so users that strictly manage resources with `kubectl` will be unaffected by this change. ([#65034](https://github.com/kubernetes/kubernetes/pull/65034), [@caesarxuchao](https://github.com/caesarxuchao)) -* **[Pod priority and preemption](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/) is now enabled by default.** Note that this means that pods from *any* namespace can now request priority classes that compete with and/or cause preemption of critical system pods that are already running. If that is not desired, disable the PodPriority feature by setting `--feature-gates=PodPriority=false` on the kube-apiserver, kube-scheduler, and kubelet components before upgrading to 1.11. Disabling the PodPriority feature limits [critical pods](https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical-when-priorites-are-enabled) to the `kube-system` namespace. - -## Major Themes - -### SIG API Machinery - -This release SIG API Machinery focused mainly on CustomResources. For example, subresources for CustomResources are now beta and enabled by default. With this, updates to the `/status` subresource will disallow updates to all fields other than `.status` (not just `.spec` and `.metadata` as before). Also, `required` and `description` can be used at the root of the CRD OpenAPI validation schema when the `/status` subresource is enabled. - -In addition, users can now create multiple versions of CustomResourceDefinitions, but without any kind of automatic conversion, and CustomResourceDefinitions now allow specification of additional columns for `kubectl get` output via the `spec.additionalPrinterColumns` field. - -### SIG Auth - -Work this cycle focused on graduating existing functions, and on making security functions more understandable for users. - -RBAC [cluster role aggregation](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#aggregated-clusterroles), introduced in 1.9, graduated to stable status with no changes in 1.11, and [client-go credential plugins](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins) graduated to beta status, while also adding support for obtaining TLS credentials from an external plugin. - -Kubernetes 1.11 also makes it easier to see what's happening, as audit events can now be annotated with information about how an API request was handled: - * Authorization sets `authorization.k8s.io/decision` and `authorization.k8s.io/reason` annotations with the authorization decision ("allow" or "forbid") and a human-readable description of why the decision was made (for example, RBAC includes the name of the role/binding/subject which allowed a request). - * PodSecurityPolicy admission sets `podsecuritypolicy.admission.k8s.io/admit-policy` and `podsecuritypolicy.admission.k8s.io/validate-policy` annotations containing the name of the policy that allowed a pod to be admitted. (PodSecurityPolicy also gained the ability to [limit hostPath volume mounts to be read-only](https://kubernetes.io/docs/concepts/policy/pod-security-policy/#volumes-and-file-systems).) - -In addition, the NodeRestriction admission plugin now prevents kubelets from modifying taints on their Node API objects, making it easier to keep track of which nodes should be in use. - -### SIG CLI - -SIG CLI's main focus this release was on refactoring `kubectl` internals to improve composability, readability and testability of `kubectl` commands. Those refactors will allow the team to extract a mechanism for extensibility of kubectl -- that is, plugins -- in the next releases. - -### SIG Cluster Lifecycle - -SIG Cluster Lifecycle focused on improving kubeadm’s user experience by including a set of new commands related to maintaining the kubeadm configuration file, the API version of which has now has been incremented to `v1alpha2`. These commands can handle the migration of the configuration to a newer version, printing the default configuration, and listing and pulling the required container images for bootstrapping a cluster. - -Other notable changes include: -* CoreDNS replaces kube-dns as the default DNS provider -* Improved user experience for environments without a public internet connection and users using other CRI runtimes than Docker -* Support for structured configuration for the kubelet, which avoids the need to modify the systemd drop-in file -* Many improvements to the upgrade process and other bug fixes - -### SIG Instrumentation - -As far as Sig Instrumentation, the major change in Kubernetes 1.11 is the deprecation of Heapster as part of ongoing efforts to move to the new Kubernetes monitoring model. Clusters still using Heapster for autoscaling should be migrated over to metrics-server and the custom metrics API. See the deprecation section for more information. - -### SIG Network - -The main milestones for SIG Network this release are the graduation of IPVS-based load balancing and CoreDNS to general availability. - -IPVS is an alternative approach to in-cluster load balancing that uses in-kernel hash tables rather than the previous iptables approach, while CoreDNS is a replacement for kube-dns for service discovery. - -### SIG Node - -SIG-Node advanced several features and made incremental improvements in a few key topic areas this release. - -The dynamic kubelet config feature graduated to beta, so it is enabled by default, simplifying management of the node object itself. Kubelets that are configured to work with the CRI may take advantage of the log rotation feature, which is graduating to beta this release. - -The cri-tools project, which aims to provide consistent tooling for operators to debug and introspect their nodes in production independent of their chosen container runtime, graduated to GA. - -As far as platforms, working with SIG-Windows, enhancements were made to the kubelet to improve platform support on Windows operating systems, and improvements to resource management were also made. In particular, support for sysctls on Linux graduated to beta. - -### SIG OpenStack - -SIG-OpenStack continued to build out testing, with eleven acceptance tests covering a wide-range of scenarios and use-cases. During the 1.11 cycle our reporting back to test-grid has qualified the OpenStack cloud provider as a gating job for the Kubernetes release. - -New features include improved integration between the Keystone service and Kubernetes RBAC, and a number of stability and compatibility improvements across the entire provider code-base. - -### SIG Scheduling -[Pod Priority and Preemption](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/) has graduated to Beta, so it is enabled by default. Note that this involves [significant and important changes for operators](https://github.com/kubernetes/sig-release/pull/201/files). The team also worked on improved performance and reliability of the scheduler. - -### SIG Storage - -Sig Storage graduated two features that had been introduced in previous versions and introduced three new features in an alpha state. - -The StorageProtection feature, which prevents deletion of PVCs while Pods are still using them and of PVs while still bound to a PVC, is now generally available, and volume resizing, which lets you increase size of a volume after a Pod restarts is now beta, which means it is on by default. - -New alpha features include: -* Online volume resizing will increase the filesystem size of a resized volume without requiring a Pod restart. -* AWS EBS and GCE PD volumes support increased limits on the maximum number of attached volumes per node. -* Subpath volume directories can be created using DownwardAPI environment variables. - -### SIG Windows - -This release supports more of Kubernetes API for pods and containers on Windows, including: - -* Metrics for Pod, Container, Log filesystem -* The run_as_user security contexts -* Local persistent volumes and fstype for Azure disk - -Improvements in Windows Server version 1803 also bring new storage functionality to Kubernetes v1.11, including: - -* Volume mounts for ConfigMap and Secret -* Flexvolume plugins for SMB and iSCSI storage are also available out-of-tree at [Microsoft/K8s-Storage-Plugins](https://github.com/Microsoft/K8s-Storage-Plugins) - -## Known Issues - -* IPVS based kube-proxy doesn't support graceful close connections for terminating pod. This issue will be fixed in a future release. ([#57841](https://github.com/kubernetes/kubernetes/pull/57841), [@jsravn](https://github.com/jsravn)) -* kube-proxy needs to be configured to override hostname in some environments. ([#857](https://github.com/kubernetes/kubeadm/issues/857), [@detiber](https://github.com/detiber)) -* There's a known issue where the Vertical Pod Autoscaler will radically change implementation in 1.12, so users of VPA (alpha) in 1.11 are warned that they will not be able to automatically migrate their VPA configs from 1.11 to 1.12. - - -## Before Upgrading - -* When Response is a `metav1.Status`, it is no longer copied into the audit.Event status. Only the "status", "reason" and "code" fields are set. For example, when we run `kubectl get pods abc`, the API Server returns a status object: -```{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"pods \"abc\" not found","reason":"NotFound","details":{"name":"abc","kind":"pods"},"code":404}``` -In previous versions, the whole object was logged in audit events. Starting in 1.11, only `status`, `reason`, and `code` are logged. Code that relies on the older version must be updated to avoid errors. -([#62695](https://github.com/kubernetes/kubernetes/pull/62695), [@CaoShuFeng](https://github.com/CaoShuFeng)) -* HTTP transport now uses `context.Context` to cancel dial operations. k8s.io/client-go/transport/Config struct has been updated to accept a function with a `context.Context` parameter. This is a breaking change if you use this field in your code. ([#60012](https://github.com/kubernetes/kubernetes/pull/60012), [@ash2k](https://github.com/ash2k)) -* kubectl: This client version requires the `apps/v1` APIs, so it will not work against a cluster version older than v1.9.0. Note that kubectl only guarantees compatibility with clusters that are +/-1 minor version away. ([#61419](https://github.com/kubernetes/kubernetes/pull/61419), [@enisoc](https://github.com/enisoc)) -* Pod priority and preemption is now enabled by default. Even if you don't plan to use this feature, you might need to take some action immediately after upgrading. In multi-tenant clusters where not all users are trusted, you are advised to create appropriate quotas for two default priority classes, system-cluster-critical and system-node-critical, which are added to clusters by default. `ResourceQuota` should be created to limit users from creating Pods at these priorities if not all users of your cluster are trusted. We do not advise disabling this feature because critical system Pods rely on the scheduler preemption to be scheduled when cluster is under resource pressure. -* Default mount propagation has changed from `HostToContainer` ("rslave" in Linux terminology), as it was in 1.10, to `None` ("private") to match the behavior in 1.9 and earlier releases; `HostToContainer` as a default caused regressions in some pods. If you are relying on this behavior you will need to set it explicitly. ([#62462](https://github.com/kubernetes/kubernetes/pull/62462), [@jsafrane](https://github.com/jsafrane)) -* The kube-apiserver `--storage-version` flag has been removed; you must use `--storage-versions` instead. ([#61453](https://github.com/kubernetes/kubernetes/pull/61453), [@hzxuzhonghu](https://github.com/hzxuzhonghu)) -* Authors of aggregated API servers must not rely on authorization being done by the kube-apiserver, and must do delegated authorization in addition. ([#61349](https://github.com/kubernetes/kubernetes/pull/61349), [@sttts](https://github.com/sttts)) -* GC is now bound by QPS so if you need more QPS to avoid ratelimiting GC, you'll have to set it explicitly. ([#63657](https://github.com/kubernetes/kubernetes/pull/63657), [@shyamjvs](https://github.com/shyamjvs)) -* `kubeadm join` is now blocking on the kubelet performing the TLS Bootstrap properly. Earlier, `kubeadm join` only did the discovery part and exited successfully without checking that the kubelet actually started properly and performed the TLS bootstrap correctly. Now, as kubeadm runs some post-join steps (for example, annotating the Node API object with the CRISocket), `kubeadm join` is now waiting for the kubelet to perform the TLS Bootstrap, and then uses that credential to perform further actions. This also improves the UX, as `kubeadm` will exit with a non-zero code if the kubelet isn't in a functional state, instead of pretending everything's fine. - ([#64792](https://github.com/kubernetes/kubernetes/pull/64792), [@luxas](https://github.com/luxas)) -* The structure of the kubelet dropin in the kubeadm deb package has changed significantly. Instead of hard-coding the parameters for the kubelet in the dropin, a structured configuration file for the kubelet is used, and is expected to be present in `/var/lib/kubelet/config.yaml`. For runtime-detected, instance-specific configuration values, a environment file with dynamically-generated flags at `kubeadm init` or `kubeadm join` run time is used. Finally, if you want to override something specific for the kubelet that can't be done via the kubeadm Configuration file (which is preferred), you might add flags to the `KUBELET_EXTRA_ARGS` environment variable in either `/etc/default/kubelet` -or `/etc/sysconfig/kubelet`, depending on the system you're running on. -([#64780](https://github.com/kubernetes/kubernetes/pull/64780), [@luxas](https://github.com/luxas)) -* The `--node-name` flag for kubeadm now dictates the Node API object name the kubelet uses for registration, in all cases but where you might use an in-tree cloud provider. If you're not using an in-tree cloud provider, `--node-name` will set the Node API object name. If you're using an in-tree cloud provider, you MUST make `--node-name` match the name the in-tree cloud provider decides to use. -([#64706](https://github.com/kubernetes/kubernetes/pull/64706), [@liztio](https://github.com/liztio)) -* The `PersistentVolumeLabel` admission controller is now disabled by default. If you depend on this feature (AWS/GCE) then ensure it is added to the `--enable-admission-plugins` flag on the kube-apiserver. ([#64326](https://github.com/kubernetes/kubernetes/pull/64326), [@andrewsykim](https://github.com/andrewsykim)) -* kubeadm: kubelets in kubeadm clusters now disable the readonly port (10255). If you're relying on unauthenticated access to the readonly port, please switch to using the secure port (10250). Instead, you can now use ServiceAccount tokens when talking to the secure port, which will make it easier to get access to, for example, the `/metrics` endpoint of the kubelet, securely. ([#64187](https://github.com/kubernetes/kubernetes/pull/64187), [@luxas](https://github.com/luxas)) -* The formerly publicly-available cAdvisor web UI that the kubelet ran on port 4194 by default is now turned off by default. The flag configuring what port to run this UI on `--cadvisor-port` was deprecated in v1.10. Now the default is `--cadvisor-port=0`, in other words, to not run the web server. If you still need to run cAdvisor, the recommended way to run it is via a DaemonSet. Note that the `--cadvisor-port` will be removed in v1.12 ([#63881](https://github.com/kubernetes/kubernetes/pull/63881), [@luxas](https://github.com/luxas)) - -#### New Deprecations - -* As a reminder, etcd2 as a backend is deprecated and support will be removed in Kubernetes 1.13. Please ensure that your clusters are upgraded to etcd3 as soon as possible. -* InfluxDB cluster monitoring has been deprecated as part of the deprecation of Heapster. Instead, you may use the [metrics server](https://github.com/kubernetes-incubator/metrics-server). It's a simplified heapster that is able to gather and serve current metrics values. It provides the Metrics API that is used by `kubectl top`, and horizontal pod autoscaler. Note that it doesn't include some features of Heapster, such as short term metrics for graphs in kube-dashboard and dedicated push sinks, which proved hard to maintain and scale. Clusters using Heapster for transfering metrics into long-term storage should consider using their metric solution's native Kubernetes support, if present, or should consider alternative solutions. ([#62328](https://github.com/kubernetes/kubernetes/pull/62328), [@serathius](https://github.com/serathius)) -* The kubelet `--rotate-certificates` flag is now deprecated, and will be removed in a future release. The kubelet certificate rotation feature can now be enabled via the `.RotateCertificates` field in the kubelet's config file. ([#63912](https://github.com/kubernetes/kubernetes/pull/63912), [@luxas](https://github.com/luxas)) -* The kubeadm configuration file version has been upgraded from `v1alpha2` from `v1alpha1`. `v1alpha1` read support exists in v1.11, but will be removed in v1.12. ([#63788](https://github.com/kubernetes/kubernetes/pull/63788), [@luxas](https://github.com/luxas)) -The following PRs changed the API spec: - * In the new v1alpha2 kubeadm Configuration API, the `.CloudProvider` and `.PrivilegedPods` fields don't exist anymore. Instead, you should use the out-of-tree cloud provider implementations, which are beta in v1.11. - * If you have to use the legacy in-tree cloud providers, you can rearrange your config like the example below. If you need the `cloud-config` file (located in `{cloud-config-path}`), you can mount it into the API Server and controller-manager containers using ExtraVolumes, as in: -``` -kind: MasterConfiguration -apiVersion: kubeadm.k8s.io/v1alpha2 -apiServerExtraArgs: - cloud-provider: "{cloud}" - cloud-config: "{cloud-config-path}" -apiServerExtraVolumes: -- name: cloud - hostPath: "{cloud-config-path}" - mountPath: "{cloud-config-path}" -controllerManagerExtraArgs: - cloud-provider: "{cloud}" - cloud-config: "{cloud-config-path}" -controllerManagerExtraVolumes: -- name: cloud - hostPath: "{cloud-config-path}" - mountPath: "{cloud-config-path}" -``` -* If you need to use the `.PrivilegedPods` functionality, you can still edit the manifests in `/etc/kubernetes/manifests/`, and set `.SecurityContext.Privileged=true` for the apiserver and controller manager. - ([#63866](https://github.com/kubernetes/kubernetes/pull/63866), [@luxas](https://github.com/luxas)) - * kubeadm: The Token-related fields in the `MasterConfiguration` object have now been refactored. Instead of the top-level `.Token`, `.TokenTTL`, `.TokenUsages`, `.TokenGroups` fields, there is now a `BootstrapTokens` slice of `BootstrapToken` objects that support the same features under the `.Token`, `.TTL`, `.Usages`, `.Groups` fields. ([#64408](https://github.com/kubernetes/kubernetes/pull/64408), [@luxas](https://github.com/luxas)) - * `.NodeName` and `.CRISocket` in the `MasterConfiguration` and `NodeConfiguration` v1alpha1 API objects are now `.NodeRegistration.Name` and `.NodeRegistration.CRISocket` respectively in the v1alpha2 API. The `.NoTaintMaster` field has been removed in the v1alpha2 API. ([#64210](https://github.com/kubernetes/kubernetes/pull/64210), [@luxas](https://github.com/luxas)) - * kubeadm: Support for `.AuthorizationModes` in the kubeadm v1alpha2 API has been removed. Instead, you can use the `.APIServerExtraArgs` and `.APIServerExtraVolumes` fields to achieve the same effect. Files using the v1alpha1 API and setting this field will be automatically upgraded to this v1alpha2 API and the information will be preserved. ([#64068](https://github.com/kubernetes/kubernetes/pull/64068), [@luxas](https://github.com/luxas)) -* The annotation `service.alpha.kubernetes.io/tolerate-unready-endpoints` is deprecated. Users should use Service.spec.publishNotReadyAddresses instead. ([#63742](https://github.com/kubernetes/kubernetes/pull/63742), [@thockin](https://github.com/thockin)) -* `--show-all`, which only affected pods, and even then only for human readable/non-API printers, is inert in v1.11, and will be removed in a future release. ([#60793](https://github.com/kubernetes/kubernetes/pull/60793), [@charrywanganthony](https://github.com/charrywanganthony)) -* The `kubectl rolling-update` is now deprecated. Use `kubectl rollout` instead. ([#61285](https://github.com/kubernetes/kubernetes/pull/61285), [@soltysh](https://github.com/soltysh)) -* kube-apiserver: the default `--endpoint-reconciler-type` is now `lease`. The `master-count` endpoint reconciler type is deprecated and will be removed in 1.13. ([#63383](https://github.com/kubernetes/kubernetes/pull/63383), [@liggitt](https://github.com/liggitt)) -* OpenStack built-in cloud provider is now deprecated. Please use the external cloud provider for OpenStack. ([#63524](https://github.com/kubernetes/kubernetes/pull/63524), [@dims](https://github.com/dims)) -* The Kubelet's deprecated `--allow-privileged` flag now defaults to true. This enables users to stop setting `--allow-privileged` in order to transition to `PodSecurityPolicy`. Previously, users had to continue setting `--allow-privileged`, because the default was false. ([#63442](https://github.com/kubernetes/kubernetes/pull/63442), [@mtaufen](https://github.com/mtaufen)) -* The old dynamic client has been replaced by a new one. The previous dynamic client will exist for one release in `client-go/deprecated-dynamic`. Switch as soon as possible. ([#63446](https://github.com/kubernetes/kubernetes/pull/63446), [@deads2k](https://github.com/deads2k)) -* 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) ([#64346](https://github.com/kubernetes/kubernetes/pull/64346), [@dims](https://github.com/dims)) -* 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 moEmptyDir` into the Pod's container. -([#63445](https://github.com/kubernetes/kubernetes/pull/63445), [@ericchiang](https://github.com/ericchiang)) -* Alpha annotation for PersistentVolume node affinity has been removed. Update your PersistentVolumes to use the beta PersistentVolume.nodeAffinity field before upgrading to this release. ([#61816](https://github.com/kubernetes/kubernetes/pull/61816), [@wackxu -](https://github.com/wackxu)) - -#### Removed Deprecations - -* kubeadm has removed the `.ImagePullPolicy` field in the v1alpha2 API version. Instead it's set statically to `IfNotPresent` for all required images. If you want to always pull the latest images before cluster init (as `Always` would do), run `kubeadm config images pull` before each `kubeadm init`. If you don't want the kubelet to pull any images at `kubeadm init` time, for example if you don't have an internet connection, you can also run `kubeadm config images pull` before `kubeadm init` or side-load the images some other way (such as `docker load -i image.tar`). Having the images locally cached will result in no pull at runtime, which makes it possible to run without any internet connection. ([#64096](https://github.com/kubernetes/kubernetes/pull/64096), [@luxas](https://github.com/luxas)) -* kubeadm has removed `.Etcd.SelfHosting` from its configuration API. It was never used in practice ([#63871](https://github.com/kubernetes/kubernetes/pull/63871), [@luxas](https://github.com/luxas)) -* The deprecated and inactive option '--enable-custom-metrics' has been removed in 1.11. ([#60699](https://github.com/kubernetes/kubernetes/pull/60699), [@CaoShuFeng](https://github.com/CaoShuFeng)) -* --include-extended-apis, which was deprecated back in [#32894](https://github.com/kubernetes/kubernetes/pull/32894), has been removed. ([#62803](https://github.com/kubernetes/kubernetes/pull/62803), [@deads2k](https://github.com/deads2k)) -* Kubelets will no longer set `externalID` in their node spec. This feature has been deprecated since v1.1. ([#61877](https://github.com/kubernetes/kubernetes/pull/61877), [@mikedanese](https://github.com/mikedanese)) -* The `initresource` admission plugin has been removed. ([#58784](https://github.com/kubernetes/kubernetes/pull/58784), [@wackxu](https://github.com/wackxu)) -* `ObjectMeta `, `ListOptions`, and `DeleteOptions` have been removed from the core api group. Please reference them in `meta/v1` instead. ([#61809](https://github.com/kubernetes/kubernetes/pull/61809), [@hzxuzhonghu](https://github.com/hzxuzhonghu)) -* The deprecated `--mode` flag in `check-network-mode` has been removed. ([#60102](https://github.com/kubernetes/kubernetes/pull/60102), [@satyasm](https://github.com/satyasm)) -* Support for the `alpha.kubernetes.io/nvidia-gpu` resource, which was deprecated in 1.10, has been removed. Please use the resource exposed by DevicePlugins instead (`nvidia.com/gpu`). ([#61498](https://github.com/kubernetes/kubernetes/pull/61498), [@mindprince](https://github.com/mindprince)) -* The `kube-cloud-controller-manager` flag `--service-account-private-key-file` has been removed. Use `--use-service-account-credentials` instead. ([#60875](https://github.com/kubernetes/kubernetes/pull/60875), [@charrywanganthony](https://github.com/charrywanganthony)) -* The rknetes code, which was deprecated in 1.10, has been removed. Use rktlet and CRI instead. ([#61432](https://github.com/kubernetes/kubernetes/pull/61432), [@filbranden](https://github.com/filbranden)) -* DaemonSet scheduling associated with the alpha ScheduleDaemonSetPods feature flag has been emoved. See https://github.com/kubernetes/features/issues/548 for feature status. ([#61411](https://github.com/kubernetes/kubernetes/pull/61411), [@liggitt](https://github.com/liggitt)) -* The `METADATA_AGENT_VERSION` configuration option has been removed to keep metadata agent version consistent across Kubernetes deployments. ([#63000](https://github.com/kubernetes/kubernetes/pull/63000), [@kawych](https://github.com/kawych)) -* The deprecated `--service-account-private-key-file` flag has been removed from the cloud-controller-manager. The flag is still present and supported in the kube-controller-manager. ([#65182](https://github.com/kubernetes/kubernetes/pull/65182), [@liggitt](https://github.com/liggitt)) -* Removed alpha functionality that allowed the controller manager to approve kubelet server certificates. This functionality should be replaced by automating validation and approval of node server certificate signing requests. ([#62471](https://github.com/kubernetes/kubernetes/pull/62471), [@mikedanese](https://github.com/mikedanese)) - -#### Graduated to Stable/GA -* IPVS-based in-cluster load balancing is now GA ([ref](https://github.com/kubernetes/features/issues/265)) -* Enable CoreDNS as a DNS plugin for Kubernetes ([ref](https://github.com/kubernetes/features/issues/427)) -* Azure Go SDK is now GA ([#63063](https://github.com/kubernetes/kubernetes/pull/63063), [@feiskyer](https://github.com/feiskyer)) -* ClusterRole aggregation is now GA ([ref](https://github.com/kubernetes/features/issues/502)) -* CRI validation test suite is now GA ([ref](https://github.com/kubernetes/features/issues/292)) -* StorageObjectInUseProtection is now GA ([ref](https://github.com/kubernetes/features/issues/498)) and ([ref](https://github.com/kubernetes/features/issues/499)) - -#### Graduated to Beta - -* Supporting out-of-tree/external cloud providers is now considered beta ([ref](https://github.com/kubernetes/features/issues/88)) -* Resizing PersistentVolumes after pod restart is now considered beta. ([ref](https://github.com/kubernetes/features/issues/284)) -* sysctl support is now considered beta ([ref](https://github.com/kubernetes/features/issues/34)) -* Support for Azure Virtual Machine Scale Sets is now considered beta. ([ref](https://github.com/kubernetes/features/issues/513)) -* Azure support for Cluster Autoscaler is now considered beta. ([ref](https://github.com/kubernetes/features/issues/514)) -* The ability to limit a node's access to the API is now considered beta. ([ref](https://github.com/kubernetes/features/issues/279)) -* CustomResource versioning is now considered beta. ([ref](https://github.com/kubernetes/features/issues/544)) -* Windows container configuration in CRI is now considered beta ([ref](https://github.com/kubernetes/features/issues/547)) -* CRI logging and stats are now considered beta ([ref](https://github.com/kubernetes/features/issues/552)) -* The dynamic Kubelet config feature is now beta, and the DynamicKubeletConfig feature gate is on by default. In order to use dynamic Kubelet config, ensure that the Kubelet's --dynamic-config-dir option is set. ([#64275](https://github.com/kubernetes/kubernetes/pull/64275), [@mtaufen](https://github.com/mtaufen)) -* 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. ([#6371](https://github.com/kubernetes/kubernetes/pull/63717), [@ingvagabund](https://github.com/ingvagabund)) -* Volume expansion is now considered Beta. ([#64288](https://github.com/kubernetes/kubernetes/pull/64288), [@gnufied](https://github.com/gnufied)) -* CRI container log rotation is now considered beta, and is enabled by default. ([#64046](https://github.com/kubernetes/kubernetes/pull/64046), [@yujuhong](https://github.com/yujuhong)) -* The `PriorityClass` API has been promoted to `scheduling.k8s.io/v1beta1` ([#63100](https://github.com/kubernetes/kubernetes/pull/63100), [@ravisantoshgudimetla](https://github.com/ravisantoshgudimetla)) -* The priorityClass feature is now considered beta. ([#63724](https://github.com/kubernetes/kubernetes/pull/63724), [@ravisantoshgudimetla](https://github.com/ravisantoshgudimetla)) -* client-go: credential exec plugins is now considered beta. ([#64482](https://github.com/kubernetes/kubernetes/pull/64482), [@ericchiang](https://github.com/ericchiang)) -* Subresources for custom resources is now considered beta and enabled by default. With this, updates to the `/status` subresource will disallow updates to all fields other than `.status` (not just `.spec` and `.metadata` as before). Also, `required` can be used at the root of the CRD OpenAPI validation schema when the `/status` subresource is enabled. ([#63598](https://github.com/kubernetes/kubernetes/pull/63598), [@nikhita](https://github.com/nikhita)) - -### New alpha features - -* kube-scheduler can now schedule DaemonSet pods ([ref](https://github.com/kubernetes/features/issues/548)) -* You can now resize PersistentVolumes without taking them offline ([ref](https://github.com/kubernetes/features/issues/531)) -* You can now set a maximum volume count ([ref](https://github.com/kubernetes/features/issues/554)) -* You can now do environment variable expansion in a subpath mount. ([ref](https://github.com/kubernetes/features/issues/559)) -* You can now run containers in a pod as a particular group. ([ref](https://github.com/kubernetes/features/issues/213)) -You can now bind tokens to service requests. ([ref](https://github.com/kubernetes/features/issues/542)) -* The --experimental-qos-reserve kubelet flags has been replaced by the alpha level --qos-reserved flag or the QOSReserved field in the kubeletconfig, and requires the QOSReserved feature gate to be enabled. ([#62509](https://github.com/kubernetes/kubernetes/pull/62509), [@sjenning](https://github.com/sjenning)) - -## Other Notable Changes - -### SIG API Machinery - -* Orphan delete is now supported for custom resources. ([#63386](https://github.com/kubernetes/kubernetes/pull/63386), [@roycaihw](https://github.com/roycaihw)) -* Metadata of CustomResources is now pruned and schema-checked during deserialization of requests and when read from etcd. In the former case, invalid meta data is rejected, in the later it is dropped from the CustomResource objects. ([#64267](https://github.com/kubernetes/kubernetes/pull/64267), [@sttts](https://github.com/sttts)) -* The kube-apiserver openapi doc now includes extensions identifying `APIService` and `CustomResourceDefinition` `kind`s ([#64174](https://github.com/kubernetes/kubernetes/pull/64174), [@liggitt](https://github.com/liggitt)) -* CustomResourceDefinitions Status subresource now supports GET and PATCH ([#63619](https://github.com/kubernetes/kubernetes/pull/63619), [@roycaihw](https://github.com/roycaihw)) -* When updating `/status` subresource of a custom resource, only the value at the `.status` subpath for the update is considered. ([#63385](https://github.cm/kubernetes/kubernetes/pull/63385), [@CaoShuFeng](https://github.com/CaoShuFeng)) -* Added a way to pass extra arguments to etcd. The these extra arguments can be used to adjust runtime configuration like heartbeat interval etc. ([#63961](https://github.com/kubernetes/kubernetes/pull/63961), [@mborsz](https://github.com/mborsz)) -* Added Establishing Controller on CRDs to avoid race between Established condition and CRs actually served. In HA setups, the Established condition is delayed by 5 seconds. ([#63068](https://github.com/kubernetes/kubernetes/pull/63068), [@xmudrii](https://github.com/xmudrii)) -* Added `spec.additionalPrinterColumns` to CRDs to define server side printing columns. ([#60991](https://github.com/kubernetes/kubernetes/pull/60991), [@sttts](https://github.com/sttts)) -* Added CRD Versioning with NOP converter ([#63830](https://github.com/kubernetes/kubernetes/pull/63830), [@mbohlool](https://github.com/mbohlool)) -* Allow "required" and "description" to be used at the CRD OpenAPI validation schema root when the `/status` subresource is enabled. ([#63533](https://github.com/kubernetes/kubernetes/pull/63533), [@sttts](https://github.com/sttts)) -* Etcd health checks by the apiserver now ensure the apiserver can connect to and exercise the etcd API. ([#65027](https://github.com/kubernetes/kubernetes/pull/65027), [@liggitt](https://github.com/liggitt)) api- machinery -* The deprecated `--service-account-private-key-file` flag has been removed from the `cloud-controller-manager`. The flag is still present and supported in the `kube-controller-manager`. ([#65182](https://github.com/kubernetes/kubernetes/pull/65182), [@liggitt](https://github.com/liggitt)) -* Webhooks for the mutating admission controller now support the "remove" operation. ([#64255](https://github.com/kubernetes/kubernetes/pull/64255), [@rojkov](https://github.com/rojkov)) sig-API machinery -* The CRD OpenAPI v3 specification for validation now allows `additionalProperties`, which are mutually exclusive to properties. ([#62333](https://github.com/kubernetes/kubernetes/pull/62333), [@sttts](https://github.com/sttts)) -* Added the apiserver configuration option to choose the audit output version. ([#60056](https://github.com/kubernetes/kubernetes/pull/60056), [@crassirostris](https://github.com/crassirostris)) -* Created a new `dryRun` query parameter for mutating endpoints. If the parameter is set, then the query will be rejected, as the feature is not implemented yet. This will allow forward compatibility with future clients; otherwise, future clients talking with older apiservers might end up modifying a resource even if they include the `dryRun` query parameter. ([#63557](https://github.com/kubernetes/kubernetes/pull/63557), [@apelisse](https://github.com/apelisse)) -* `list`/`watch` API requests with a `fieldSelector` that specifies `metadata.name` can now be authorized as requests for an individual named resource ([#63469](https://github.com/kubernetes/kubernetes/pull/63469), [@wojtek-t](https://github.com/wojtek-t)) -* Exposed `/debug/flags/v` to allow dynamically set glog logging level. For example, to change glog level to 3, send a PUT request such as `curl -X PUT http://127.0.0.1:8080/debug/flags/v -d "3"`. ([#63777](https://github.com/kubernetes/kubernetes/pull/63777), [@hzxuzhonghu](https://github.com/hzxuzhonghu)) -* Exec authenticator plugin supports TLS client certificates. ([#61803](https://github.com/kubernetes/kubernetes/pull/61803), [@awly](https://github.com/awly)) -* The `serverAddressByClientCIDRs` property in `metav1.APIGroup`(discovery API) is now optional instead of required. ([#61963](https://github.com/kubernetes/kubernetes/pull/61963), [@roycaihw](https://github.com/roycaihw)) -* `apiservices/status` and `certificatesigningrequests/status` now support `GET` and `PATCH` ([#64063](https://github.com/kubernetes/kubernetes/pull/64063), [@roycaihw](https://github.com/roycaihw)) -* APIServices with kube-like versions (e.g. `v1`, `v2beta1`, etc.) will be sorted appropriately within each group. ([#64004](https://github.com/kubernetes/kubernetes/pull/64004), [@mbohlool](https://github.com/mbohlool)) -* Event object references with apiversion will now that value. ([#63913](https://github.com/kubernetes/kubernetes/pull/63913), [@deads2k](https://github.com/deads2k)) -* Fixes the `kubernetes.default.svc` loopback service resolution to use a loopback configuration. ([#62649](https://github.com/kubernetes/kubernetes/pull/62649), [@liggitt](https://github.com/liggitt)) - -### SIG Apps - -* Added generators for `apps/v1` deployments. ([#61288](https://github.com/kubernetes/kubernetes/pull/61288), [@ayushpateria](https://github.com/ayushpateria)) - -### SIG Auth - -* RBAC information is now included in audit logs via audit.Event annotations: - * authorization.k8s.io/decision = {allow, forbid} - * authorization.k8s.io/reason = human-readable reason for the decision ([#58807](https://github.com/kubernetes/kubernetes/pull/58807), [@CaoShuFeng](https://github.com/CaoShuFeng)) -* `kubectl certificate approve|deny` will not modify an already approved or denied CSR unless the `--force` flag is provided. ([#61971](https://github.com/kubernetes/kubernetes/pull/61971), [@smarterclayton](https://github.com/smarterclayton)) -* The `--bootstrap-kubeconfig` argument to Kubelet previously created the first bootstrap client credentials in the certificates directory as `kubelet-client.key` and `kubelet-client.crt`. Subsequent certificates created by cert rotation were created in a combined PEM file that was atomically rotated as `kubelet-client-DATE.pem` in that directory, which meant clients relying on the `node.kubeconfig` generated by bootstrapping would never use a rotated cert. The initial bootstrap certificate is now generated into the cert directory as a PEM file and symlinked to `kubelet-client-current.pem` so that the generated kubeconfig remains valid after rotation. ([#62152](https://github.com/kubernetes/kubernetes/pull/62152), [@smarterclayton](https://github.com/smarterclayton)) -* Owner references can now be set during creation, even if the user doesn't have deletion power ([#63403](https://github.com/kubernetes/kubernetes/pull/63403), [@deads2k](https://github.com/deads2k)) -* Laid the groundwork for OIDC distributed claims handling in the apiserver authentication token checker. A distributed claim allows the OIDC provider to delegate a claim to a separate URL. ([ref](http://openid.net/specs/openid-connect-core-1_0.html#AggregatedDistributedClaims)). ([#63213](https://github.com/kubernetes/kubernetes/pull/63213), [@filmil](https://github.com/filmil)) -* RBAC: all configured authorizers are now checked to determine if an RBAC role or clusterrole escalation (setting permissions the user does not currently have via RBAC) is allowed. ([#56358](https://github.com/kubernetes/kubernetes/pull/56358), [@liggitt](https://github.com/liggitt)) -* kube-apiserver: OIDC authentication now supports requiring specific claims with `--oidc-required-claim==` Previously, there was no mechanism for a user to specify claims in the OIDC authentication process that were requid to be present in the ID Token with an expected value. This version now makes it possible to require claims support for the OIDC authentication. It allows users to pass in a `--oidc-required-claims` flag, and `key=value` pairs in the API config, which will ensure that the specified required claims are checked against the ID Token claims. ([#62136](https://github.com/kubernetes/kubernetes/pull/62136), [@rithujohn191](https://github.com/rithujohn191)) -* Included the list of security groups when failing with the errors that more than one is tagged. ([#58874](https://github.com/kubernetes/kubernetes/pull/58874), [@sorenmat](https://github.com/sorenmat)) -* Added proxy for container streaming in kubelet for streaming auth. ([#64006](https://github.com/kubernetes/kubernetes/pull/64006), [@Random-Liu](https://github.com/Random-Liu)) -* PodSecurityPolicy admission information has been added to audit logs. ([#58143](https://github.com/kubernetes/kubernetes/pull/58143), [@CaoShuFeng](https://github.com/CaoShuFeng)) -* TokenRequests now are required to have an expiration duration between 10 minutes and 2^32 seconds. ([#63999](https://github.com/kubernetes/kubernetes/pull/63999), [@mikedanese](https://github.com/mikedanese)) -* The `NodeRestriction` admission plugin now prevents kubelets from modifying/removing taints applied to their Node API object. ([#63167](https://github.com/kubernetes/kubernetes/pull/63167), [@liggitt](https://github.com/liggitt)) -* authz: nodes should not be able to delete themselves ([#62818](https://github.com/kubernetes/kubernetes/pull/62818), [@mikedanese](https://github.com/mikedanese)) - -### SIG Autoscaling - -* A cluster-autoscaler ClusterRole is added to cover only the functionality required by Cluster Autoscaler and avoid abusing system:cluster-admin role. Cloud providers other than GCE might want to update their deployments or sample yaml files to reuse the role created via add-on. ([#64503](https://github.com/kubernetes/kubernetes/pull/64503), [@kgolab](https://github.com/kgolab)) - -### SIG Azure - -* The Azure cloud provider now supports standard SKU load balancer and public IP. -`excludeMasterFromStandardLB` defaults to true, which means master nodes are excluded from the standard load balancer. Also note that because all nodes (except master) are added as loadbalancer backends, the standard load balancer doesn't work with the `service.beta.kubernetes.io/azure-load-balancer-mode` annotation. -([#61884](https://github.com/kubernetes/kubernetes/pull/61884), [#62707](https://github.com/kubernetes/kubernetes/pull/62707), [@feiskyer](https://github.com/feiskyer)) -* The Azure cloud provider now supports specifying allowed service tags by the `service.beta.kubernetes.io/azure-allowed-service-tags` annotation. ([#61467](https://github.com/kubernetes/kubernetes/pull/61467), [@feiskyer](https://github.com/feiskyer)) -* You can now change the size of an azuredisk PVC using `kubectl edit pvc pvc-azuredisk`. Note that this operation will fail if the volume is already attached to a running VM. ([#64386](https://github.com/kubernetes/kubernetes/pull/64386), [@andyzhangx](https://github.com/andyzhangx)) -* Block device support has been added for azure disk. ([#63841](https://github.com/kubernetes/kubernetes/pull/63841), [@andyzhangx](https://github.com/andyzhangx)) -* Azure VM names can now contain the underscore (`_`) character ([#63526](https://github.com/kubernetes/kubernetes/pull/63526), [@djsly](https://github.com/djsly)) -* Azure disks now support external resource groups. -([#64427](https://github.com/kubernetes/kuernetes/pull/64427), [@andyzhangx](https://github.com/andyzhangx)) -* Added reason message logs for non-existant Azure resources. -([#64248](https://github.com/kubernetes/kubernetes/pull/64248), [@feiskyer](https://github.com/feiskyer)) - -### SIG CLI - -* You can now use the `base64decode` function in kubectl go templates to decode base64-encoded data, such as `kubectl get secret SECRET -o go-template='{{ .data.KEY | base64decode }}'`. ([#60755](https://github.com/kubernetes/kubernetes/pull/60755), [@glb](https://github.com/glb)) -* `kubectl patch` now supports `--dry-run`. ([#60675](https://github.com/kubernetes/kubernetes/pull/60675), [@timoreimann](https://github.com/timoreimann)) -* The global flag `--match-server-version` is now global. `kubectl version` will respect it. ([#63613](https://github.com/kubernetes/kubernetes/pull/63613), [@deads2k](https://github.com/deads2k)) -* kubectl will list all allowed print formats when an invalid format is passed. ([#64371](https://github.com/kubernetes/kubernetes/pull/64371), [@CaoShuFeng](https://github.com/CaoShuFeng)) -* The global flag "context" now gets applied to `kubectl config view --minify`. In previous versions, this command was only available for `current-context`. Now it will be easier for users to view other non current contexts when minifying. ([#64608](https://github.com/kubernetes/kubernetes/pull/64608), [@dixudx](https://github.com/dixudx)) -* `kubectl apply --prune` supports CronJob resources. ([#62991](https://github.com/kubernetes/kubernetes/pull/62991), [@tomoe](https://github.com/tomoe)) -* The `--dry-run` flag has been enabled for `kubectl auth reconcile` ([#64458](https://github.com/kubernetes/kubernetes/pull/64458), [@mrogers950](https://github.com/mrogers950)) -* `kubectl wait` is a new command that allows waiting for one or more resources to be deleted or to reach a specific condition. It adds a `kubectl wait --for=[delete|condition=condition-name] resource/string` command. ([#64034](https://github.com/kubernetes/kubernetes/pull/64034), [@deads2k](https://github.com/deads2k)) -* `kubectl auth reconcile` only works with rbac.v1; all the core helpers have been switched over to use the external types. ([#63967](https://github.com/kubernetes/kubernetes/pull/63967), [@deads2k](https://github.com/deads2k)) -* kubectl and client-go now detect duplicated names for user, cluster and context when loading kubeconfig and report this condition as an error. ([#60464](https://github.com/kubernetes/kubernetes/pull/60464), [@roycaihw](https://github.com/roycaihw)) -* Added 'UpdateStrategyType' and 'RollingUpdateStrategy' to 'kubectl describe sts' command output. ([#63844](https://github.com/kubernetes/kubernetes/pull/63844), [@tossmilestone](https://github.com/tossmilestone)) -* Initial Korean translation for kubectl has been added. ([#62040](https://github.com/kubernetes/kubernetes/pull/62040), [@ianychoi](https://github.com/ianychoi)) -* `kubectl cp` now supports completion. -([#60371](https://github.com/kubernetes/kubernetes/pull/60371), [@superbrothers](https://github.com/superbrothers)) -* The shortcuts that were moved server-side in at least 1.9 have been removed from being hardcoded in kubectl. This means that the client-based restmappers have been moved to client-go, where everyone who needs them can have access. ([#63507](https://github.com/kubernetes/kubernetes/pull/63507), [@deads2k](https://github.com/deads2k)) -* When using `kubectl delete` with selection criteria, the defaults to is now to ignore "not found" errors. Note that this does not apply when deleting a speciic resource. ([#63490](https://github.com/kubernetes/kubernetes/pull/63490), [@deads2k](https://github.com/deads2k)) -* `kubectl create [secret | configmap] --from-file` now works on Windows with fully-qualified paths ([#63439](https://github.com/kubernetes/kubernetes/pull/63439), [@liggitt](https://github.com/liggitt)) -* Portability across systems has been increased by the use of `/usr/bin/env` in all script shebangs. ([#62657](https://github.com/kubernetes/kubernetes/pull/62657), [@matthyx](https://github.com/matthyx)) -* You can now use `kubectl api-resources` to discover resources. - ([#42873](https://github.com/kubernetes/kubernetes/pull/42873), [@xilabao](https://github.com/xilabao)) -* You can now display requests/limits of extended resources in node allocated resources. ([#46079](https://github.com/kubernetes/kubernetes/pull/46079), [@xiangpengzhao](https://github.com/xiangpengzhao)) -* The `--remove-extra-subjects` and `--remove-extra-permissions` flags have been enabled for `kubectl auth reconcile` ([#64541](https://github.com/kubernetes/kubernetes/pull/64541), [@mrogers950](https://github.com/mrogers950)) -* kubectl now has improved compatibility with older servers when creating/updating API objects ([#61949](https://github.com/kubernetes/kubernetes/pull/61949), [@liggitt](https://github.com/liggitt)) -* `kubectl apply` view/edit-last-applied now supports completion. ([#60499](https://github.com/kubernetes/kubernetes/pull/60499), [@superbrothers](https://github.com/superbrothers)) - -### SIG Cluster Lifecycle - - * kubeadm: The `:Etcd` struct has been refactored in the v1alpha2 API. All the options now reside under either `.Etcd.Local` or `.Etcd.External`. Automatic conversions from the v1alpha1 API are supported. ([#64066](https://github.com/kubernetes/kubernetes/pull/64066), [@luxas](https://github.com/luxas)) -* kubeadm now uses an upgraded API version for the configuration file, `kubeadm.k8s.io/v1alpha2`. kubeadm in v1.11 will still be able to read `v1alpha1` configuration, and will automatically convert the configuration to `v1alpha2`, both internally and when storing the configuration in the ConfigMap in the cluster. ([#63788](https://github.com/kubernetes/kubernetes/pull/63788), [@luxas](https://github.com/luxas)) -* Phase `kubeadm alpha phase kubelet` has been added to support dynamic kubelet configuration in kubeadm. ([#57224](https://github.com/kubernetes/kubernetes/pull/57224), [@xiangpengzhao](https://github.com/xiangpengzhao)) -* The kubeadm config option `API.ControlPlaneEndpoint` has been extended to take an optional port, which may differ from the apiserver's bind port. ([#62314](https://github.com/kubernetes/kubernetes/pull/62314), [@rjosephwright](https://github.com/rjosephwright)) -* The `--cluster-name` parameter has been added to kubeadm init, enabling users to specify the cluster name in kubeconfig. ([#60852](https://github.com/kubernetes/kubernetes/pull/60852), [@karan](https://github.com/karan)) -* The logging feature for kubeadm commands now supports a verbosity setting. ([#57661](https://github.com/kubernetes/kubernetes/pull/57661), [@vbmade2000](https://github.com/vbmade2000)) -* kubeadm now has a join timeout that can be controlled via the `discoveryTimeout` config option. This option is set to 5 minutes by default. ([#60983](https://github.com/kubernetes/kubernetes/pull/60983), [@rosti](https://github.com/rosti)) -* Added the `writable` boolean option to kubeadm config. This option works on a per-volume basis for `ExtraVolumes` config keys. ([#60428](https://github.com/kubernetes/kubernetes/pul60428), [@rosti](https://github.com/rosti)) -* Added a new `kubeadm upgrade node config` command. ([#64624](https://github.com/kubernetes/kubernetes/pull/64624), [@luxas](https://github.com/luxas)) -* kubeadm now makes the CoreDNS container more secure by dropping (root) capabilities and improves the integrity of the container by running the whole container in read-only. ([#64473](https://github.com/kubernetes/kubernetes/pull/64473), [@nberlee](https://github.com/nberlee)) -* kubeadm now detects the Docker cgroup driver and starts the kubelet with the matching driver. This eliminates a common error experienced by new users in when the Docker cgroup driver is not the same as the one set for the kubelet due to different Linux distributions setting different cgroup drivers for Docker, making it hard to start the kubelet properly. -([#64347](https://github.com/kubernetes/kubernetes/pull/64347), [@neolit123](https://github.com/neolit123)) -* Added a 'kubeadm config migrate' command to convert old API types to their newer counterparts in the new, supported API types. This is just a client-side tool; it just executes locally without requiring a cluster to be running, operating in much the same way as a Unix pipe that upgrades config files. ([#64232](https://github.com/kubernetes/kubernetes/pull/64232), [@luxas](https://github.com/luxas)) -* kubeadm will now pull required images during preflight checks if it cannot find them on the system. ([#64105](https://github.com/kubernetes/kubernetes/pull/64105), [@chuckha](https://github.com/chuckha)) -* "kubeadm init" now writes a structured and versioned kubelet ComponentConfiguration file to `/var/lib/kubelet/config.yaml` and an environment file with runtime flags that you can source in the systemd kubelet dropin to `/var/lib/kubelet/kubeadm-flags.env`. ([#63887](https://github.com/kubernetes/kubernetes/pull/63887), [@luxas](https://github.com/luxas)) -* A `kubeadm config print-default` command has now been added. You can use this command to output a starting point when writing your own kubeadm configuration files. ([#63969](https://github.com/kubernetes/kubernetes/pull/63969), [@luxas](https://github.com/luxas)) -* Updated kubeadm's minimum supported kubernetes in v1.11.x to 1.10 ([#63920](https://github.com/kubernetes/kubernetes/pull/63920), [@dixudx](https://github.com/dixudx)) -* Added the `kubeadm upgrade diff` command to show how static pod manifests will be changed by an upgrade. This command shows the changes that will be made to the static pod manifests before applying them. This is a narrower case than kubeadm upgrade apply --dry-run, which specifically focuses on the static pod manifests. ([#63930](https://github.com/kubernetes/kubernetes/pull/63930), [@liztio](https://github.com/liztio)) -* The `kubeadm config images pull` command can now be used to pull container images used by kubeadm. ([#63833](https://github.com/kubernetes/kubernetes/pull/63833), [@chuckha](https://github.com/chuckha)) -* kubeadm will now deploy CoreDNS by default instead of KubeDNS ([#63509](https://github.com/kubernetes/kubernetes/pull/63509), [@detiber](https://github.com/detiber)) -* Preflight checks for kubeadm no longer validate custom kube-apiserver, kube-controller-manager and kube-scheduler arguments. ([#63673](https://github.com/kubernetes/kubernetes/pull/63673), [@chuckha](https://github.com/chuckha)) -* Added a `kubeadm config images list` command that lists required container images for a kubeadm install. ([#63450](https://github.com/kubernetes/kubernetes/pull/63450), [@chuckha](https://github.com/chukha)) -* You can now use `kubeadm token` specifying `--kubeconfig`. In this case, kubeadm searches the current user home path and the environment variable KUBECONFIG for existing files. If provided, the `--kubeconfig` flag will be honored instead. ([#62850](https://github.com/kubernetes/kubernetes/pull/62850), [@neolit123](https://github.com/neolit123)) -([#64988](https://github.com/kubernetes/kubernetes/pull/64988), [@detiber](https://github.com/detiber)) -* kubeadm now sets peer URLs for the default etcd instance. Previously we left the defaults, which meant the peer URL was unsecured. -* Kubernetes now packages crictl in a cri-tools deb and rpm package. ([#64836](https://github.com/kubernetes/kubernetes/pull/64836), [@chuckha](https://github.com/chuckha)) -* kubeadm now prompts the user for confirmation when resetting a master node. ([#59115](https://github.com/kubernetes/kubernetes/pull/59115), [@alexbrand](https://github.com/alexbrand)) -* kubead now creates kube-proxy with a toleration to run on all nodes, no matter the taint. ([#62390](https://github.com/kubernetes/kubernetes/pull/62390), [@discordianfish](https://github.com/discordianfish)) -* kubeadm now sets the kubelet `--resolv-conf` flag conditionally on init. ([#64665](https://github.com/kubernetes/kubernetes/pull/64665), [@stealthybox](https://github.com/stealthybox)) -* Added ipset and udevadm to the hyperkube base image. ([#61357](https://github.com/kubernetes/kubernetes/pull/61357), [@rphillips](https://github.com/rphillips)) - -### SIG GCP - -* Kubernetes clusters on GCE now have crictl installed. Users can use it to help debug their nodes. See the [crictl documentation](https://github.com/kubernetes-incubator/cri-tools/blob/master/docs/crictl.md) for details. ([#63357](https://github.com/kubernetes/kubernetes/pull/63357), [@Random-Liu](https://github.com/Random-Liu)) -* `cluster/kube-up.sh` now provisions a Kubelet config file for GCE via the metadata server. This file is installed by the corresponding GCE init scripts. ([#62183](https://github.com/kubernetes/kubernetes/pull/62183), [@mtaufen](https://github.com/mtaufen)) -* GCE: Update cloud provider to use TPU v1 API ([#64727](https://github.com/kubernetes/kubernetes/pull/64727), [@yguo0905](https://github.com/yguo0905)) -* GCE: Bump GLBC version to 1.1.1 - fixing an issue of handling multiple certs with identical certificates. ([#62751](https://github.com/kubernetes/kubernetes/pull/62751), [@nicksardo](https://github.com/nicksardo)) - -### SIG Instrumentation - -* Added prometheus cluster monitoring addon to kube-up. ([#62195](https://github.com/kubernetes/kubernetes/pull/62195), [@serathius](https://github.com/serathius)) -* Kubelet now exposes a new endpoint, `/metrics/probes`, which exposes a Prometheus metric containing the liveness and/or readiness probe results for a container. ([#61369](https://github.com/kubernetes/kubernetes/pull/61369), [@rramkumar1](https://github.com/rramkumar1)) - -### SIG Network - -* The internal IP address of the node is now added as additional information for kubectl. ([#57623](https://github.com/kubernetes/kubernetes/pull/57623), [@dixudx](https://github.com/dixudx)) -* NetworkPolicies can now target specific pods in other namespaces by including both a namespaceSelector and a podSelector in the same peer element. ([#60452](https://github.com/kubernetes/kubernetes/pull/60452), [@danwinship](https://github.com/danwinship)) -* CoreDNS deployment configuration now uses the k8s.gcr.io imageRepository. ([#64775](https://github.com/kubernetes/kubernetes/pull/64775), [@rajansandeep](https://giub.com/rajansandeep)) -* kubelet's `--cni-bin-dir` option now accepts multiple comma-separated CNI binary directory paths, which are searched for CNI plugins in the given order. ([#58714](https://github.com/kubernetes/kubernetes/pull/58714), [@dcbw](https://github.com/dcbw)) -* You can now use `--ipvs-exclude-cidrs` to specify a list of CIDR's which the IPVS proxier should not touch when cleaning up IPVS rules. ([#62083](https://github.com/kubernetes/kubernetes/pull/62083), [@rramkumar1](https://github.com/rramkumar1)) -* You can now receive node DNS info with the `--node-ip` flag, which adds `ExternalDNS`, `InternalDNS`, and `ExternalIP` to kubelet's output. ([#63170](https://github.com/kubernetes/kubernetes/pull/63170), [@micahhausler](https://github.com/micahhausler)) -* You can now have services that listen on the same host ports on different interfaces by specifying `--nodeport-addresses`. ([#62003](https://github.com/kubernetes/kubernetes/pull/62003), [@m1093782566](https://github.com/m1093782566)) -* Added port-forward examples for service - -### SIG Node - -* CRI: The container log path has been changed from containername_attempt#.log to containername/attempt#.log ([#62015](https://github.com/kubernetes/kubernetes/pull/62015), [@feiskyer](https://github.com/feiskyer)) -* Introduced the `ContainersReady` condition in Pod status. ([#64646](https://github.com/kubernetes/kubernetes/pull/64646), [@freehan](https://github.com/freehan)) -* Kubelet will now set extended resource capacity to zero after it restarts. If the extended resource is exported by a device plugin, its capacity will change to a valid value after the device plugin re-connects with the Kubelet. If the extended resource is exported by an external component through direct node status capacity patching, the component should repatch the field after kubelet becomes ready again. During the time gap, pods previously assigned with such resources may fail kubelet admission but their controller should create new pods in response to such failures. ([#64784](https://github.com/kubernetes/kubernetes/pull/64784), [@jiayingz](https://github.com/jiayingz)) node -* You can now use a security context with Windows containers -([#64009](https://github.com/kubernetes/kubernetes/pull/64009), [@feiskyer](https://github.com/feiskyer)) -* Added e2e regression tests for kubelet security. ([#64140](https://github.com/kubernetes/kubernetes/pull/64140), [@dixudx](https://github.com/dixudx)) -* The maximum number of images the Kubelet will report in the Node status can now be controlled via the Kubelet's `--node-status-max-images` flag. The default (50) remains the same. ([#64170](https://github.com/kubernetes/kubernetes/pull/64170), [@mtaufen](https://github.com/mtaufen)) -* The Kubelet now exports metrics that report the assigned (`node_config_assigned`), last-known-good (`node_config_last_known_good`), and active (`node_config_active`) config sources, and a metric indicating whether the node is experiencing a config-related error (`node_config_error`). The config source metrics always report the value `1`, and carry the `node_config_name`, `node_config_uid`, `node_config_resource_version`, and `node_config_kubelet_key labels`, which identify the config version. The error metric reports `1` if there is an error, `0` otherwise. ([#57527](https://github.com/kubernetes/kubernetes/pull/57527), [@mtaufen](https://github.com/mtaufen)) -* You now have the ability to quota resources by priority. ([#57963](https://github.com/kubernetes/kubernetes/pull/57963), [@vikaschoudhary16](https://github.com/ikaschoudhary16)) -* The gRPC max message size in the remote container runtime has been increased to 16MB. ([#64672](https://github.com/kubernetes/kubernetes/pull/64672), [@mcluseau](https://github.com/mcluseau)) -* Added a feature gate for the plugin watcher. ([#64605](https://github.com/kubernetes/kubernetes/pull/64605), [@vikaschoudhary16](https://github.com/vikaschoudhary16)) -* The status of dynamic Kubelet config is now reported via Node.Status.Config, rather than the KubeletConfigOk node condition. ([#63314](https://github.com/kubernetes/kubernetes/pull/63314), [@mtaufen](https://github.com/mtaufen)) -* You must now specify `Node.Spec.ConfigSource.ConfigMap.KubeletConfigKey` when using dynamic Kubelet config to tell the Kubelet which key of the `ConfigMap` identifies its config file. ([#59847](https://github.com/kubernetes/kubernetes/pull/59847), [@mtaufen](https://github.com/mtaufen)) -* The dynamic Kubelet config feature will now update the config in the event of a ConfigMap mutation, which reduces the chance for silent config skew. Only name, namespace, and kubeletConfigKey may now be set in `Node.Spec.ConfigSource.ConfigMap`. The least disruptive pattern for config management is still to create a new ConfigMap and incrementally roll out a new `Node.Spec.ConfigSource`. ([#63221](https://github.com/kubernetes/kubernetes/pull/63221), [@mtaufen](https://github.com/mtaufen)) -* Change seccomp annotation from "docker/default" to "runtime/default" ([#62662](https://github.com/kubernetes/kubernetes/pull/62662), [@wangzhen127](https://github.com/wangzhen127)) -* The node authorizer now automatically sets up rules for `Node.Spec.ConfigSource` when the DynamicKubeletConfig feature gate is enabled. ([#60100](https://github.com/kubernetes/kubernetes/pull/60100), [@mtaufen](https://github.com/mtaufen)) -* CRI now defines mounting behavior. If the host path doesn't exist, the runtime should return an error. If the host path is a symlink, the runtime should follow the symlink and mount the real destination to the container. ([#61460](https://github.com/kubernetes/kubernetes/pull/61460), [@feiskyer](https://github.com/feiskyer)) - -### SIG OpenStack - -* Provide a meaningful error message in the openstack cloud provider when no valid IP address can be found for a node, rather than just the first address of the node, which leads to a load balancer error if that address is a hostname or DNS name instead of an IP address. ([#64318](https://github.com/kubernetes/kubernetes/pull/64318), [@gonzolino](https://github.com/gonzolino)) -* Restored the pre-1.10 behavior of the openstack cloud provider, which uses the instance name as the Kubernetes Node name. This requires instances be named with RFC-1123 compatible names. ([#63903](https://github.com/kubernetes/kubernetes/pull/63903), [@liggitt](https://github.com/liggitt)) -* Kubernetes will try to read the openstack auth config from the client config and fall back to read from the environment variables if the auth config is not available. ([#60200](https://github.com/kubernetes/kubernetes/pull/60200), [@dixudx](https://github.com/dixudx)) - -### SIG Scheduling - -* Schedule DaemonSet Pods in scheduler, rather than the Daemonset controller. -([#63223](https://github.com/kubernetes/kubernetes/pull/63223), [@k82cn](https://github.com/k82cn)) -* Added `MatchFields` to `NodeSelectorTerm`; in 1.11, it only supports `metadata.name`. ([#62002](https://github.com/kubernetes/kubernetes/pull/62002), [@k82cn](https://github.com/k82cn)) -* kube-scheduler now has the `--write-config-to` flag so that Scheduler canwritets default configuration to a file. -([#62515](https://github.com/kubernetes/kubernetes/pull/62515), [@resouer](https://github.com/resouer)) -* Performance of the affinity/anti-affinity predicate for the default scheduler has been significantly improved. ([#62211](https://github.com/kubernetes/kubernetes/pull/62211), [@bsalamat](https://github.com/bsalamat)) -* The 'scheduling_latency_seconds' metric into has been split into finer steps (predicate, priority, preemption). ([#65306](https://github.com/kubernetes/kubernetes/pull/65306), [@shyamjvs](https://github.com/shyamjvs)) -* Scheduler now has a summary-type metric, 'scheduling_latency_seconds'. ([#64838](https://github.com/kubernetes/kubernetes/pull/64838), [@krzysied](https://github.com/krzysied)) -* `nodeSelector.matchFields` (node's `metadata.node`) is now supported in scheduler. ([#62453](https://github.com/kubernetes/kubernetes/pull/62453), [@k82cn](https://github.com/k82cn)) -* Added a parametrizable priority function mapping requested/capacity ratio to priority. This function is disabled by default and can be enabled via the scheduler policy config file. -([#63929](https://github.com/kubernetes/kubernetes/pull/63929), [@losipiuk](https://github.com/losipiuk)) -* System critical priority classes are now automatically added at cluster boostrapping. ([#60519](https://github.com/kubernetes/kubernetes/pull/60519), [@bsalamat](https://github.com/bsalamat)) - -### SIG Storage - -* AWS EBS, Azure Disk, GCE PD and Ceph RBD volume plugins now support dynamic provisioning of raw block volumes. ([#64447](https://github.com/kubernetes/kubernetes/pull/64447), [@jsafrane](https://github.com/jsafrane)) -* gitRepo volumes in pods no longer require git 1.8.5 or newer; older git versions are now supported. ([#62394](https://github.com/kubernetes/kubernetes/pull/62394), [@jsafrane](https://github.com/jsafrane)) -* Added support for resizing Portworx volumes. ([#62308](https://github.com/kubernetes/kubernetes/pull/62308), [@harsh-px](https://github.com/harsh-px)) -* Added block volume support to Cinder volume plugin. ([#64879](https://github.com/kubernetes/kubernetes/pull/64879), [@bertinatto](https://github.com/bertinatto)) -* Provided API support for external CSI storage drivers to support block volumes. ([#64723](https://github.com/kubernetes/kubernetes/pull/64723), [@vladimirvivien](https://github.com/vladimirvivien)) -* Volume topology aware dynamic provisioning for external provisioners is now supported. ([#63193](https://github.com/kubernetes/kubernetes/pull/63193), [@lichuqiang](https://github.com/lichuqiang)) -* Added a volume projection that is able to project service account tokens. ([#62005](https://github.com/kubernetes/kubernetes/pull/62005), [@mikedanese](https://github.com/mikedanese)) -* PodSecurityPolicy now supports restricting hostPath volume mounts to be readOnly and under specific path prefixes ([#58647](https://github.com/kubernetes/kubernetes/pull/58647), [@jhorwit2](https://github.com/jhorwit2)) -* Added StorageClass API to restrict topologies of dynamically provisioned volumes. ([#63233](https://github.com/kubernetes/kubernetes/pull/63233), [@lichuqiang](https://github.com/lichuqiang)) -* Added Alpha support for dynamic volume limits based on node type ([#64154](https://github.com/kubernetes/kubernetes/pull/64154), [@gnufied](https://github.com/gnufied)) -* AWS EBS volumes can be now used as ReadOnly in pods. ([#64403](https://github.com/kubernetes/kubernetes/pull/64403), [@jsafrane](https://github.com/jsafrane)) -* Basic plumbing for volume topology aware dynamic provisionin has been implemented. ([#63232](https://github.com/kubernetes/kubernetes/pull/63232), [@lichuqiang](https://github.com/lichuqiang)) -* Changed ext3/ext4 volume creation to not reserve any portion of the volume for the root user. When creating ext3/ext4 volume, mkfs defaults to reserving 5% of the volume for the super-user (root). This patch changes the mkfs to pass -m0 to disable this setting. -([#64102](https://github.com/kubernetes/kubernetes/pull/64102), [@atombender](https://github.com/atombender)) -* Added support for NFS relations on kubernetes-worker charm. ([#63817](https://github.com/kubernetes/kubernetes/pull/63817), [@hyperbolic2346](https://github.com/hyperbolic2346)) -* Implemented kubelet side online file system resizing ([#62460](https://github.com/kubernetes/kubernetes/pull/62460), [@mlmhl](https://github.com/mlmhl)) -* Generated subpath name from Downward API env ([#49388](https://github.com/kubernetes/kubernetes/pull/49388), [@kevtaylor](https://github.com/kevtaylor)) - -### SIG vSphere - -* Added a mechanism in vSphere Cloud Provider to get credentials from Kubernetes secrets, rather than the plain text `vsphere.conf` file.([#63902](https://github.com/kubernetes/kubernetes/pull/63902), [@abrarshivani](https://github.com/abrarshivani)) -* vSphere Cloud Provider: added SAML token authentication support ([#63824](https://github.com/kubernetes/kubernetes/pull/63824), [@dougm](https://github.com/dougm)) - -### SIG Windows - -* Added log and fs stats for Windows containers. ([#62266](https://github.com/kubernetes/kubernetes/pull/62266), [@feiskyer](https://github.com/feiskyer)) -* Added security contexts for Windows containers. [#64009](https://github.com/kubernetes/kubernetes/pull/64009), ([@feiskyer](https://github.com/feiskyer)) -* Added local persistent volumes for Windows containers. ([#62012](https://github.com/kubernetes/kubernetes/pull/62012), [@andyzhangx](https://github.com/andyzhangx)) and fstype for Azure disk ([#61267](https://github.com/kubernetes/kubernetes/pull/61267), [@andyzhangx](https://github.com/andyzhangx)) -* Improvements in Windows Server version 1803 also bring new storage functionality to Kubernetes v1.11, including: - * Volume mounts for ConfigMap and Secret - * Flexvolume plugins for SMB and iSCSI storage are also available out-of-tree at [Microsoft/K8s-Storage-Plugins](https://github.com/Microsoft/K8s-Storage-Plugins) -* Setup dns servers and search domains for Windows Pods in dockershim. Docker EE version >= 17.10.0 is required for propagating DNS to containers. ([#63905](https://github.com/kubernetes/kubernetes/pull/63905), [@feiskyer](https://github.com/feiskyer)) - -### Additional changes - -* Extended the Stackdriver Metadata Agent by adding a new Deployment for ingesting unscheduled pods and services. ([#62043](https://github.com/kubernetes/kubernetes/pull/62043), [@supriyagarg](https://github.com/supriyagarg)) -* Added all kinds of resource objects' statuses in HPA description. ([#59609](https://github.com/kubernetes/kubernetes/pull/59609), [@zhangxiaoyu-zidif](https://github.com/zhangxiaoyu-zidif)) -* Implemented preemption for extender with a verb and new interface ([#58717](https://github.com/kubernetes/kubernetes/pull/58717), [@resouer](https://github.com/resouer)) -* Updated nvidia-gpu-device-plugin DaemonSet config to use RollingUpdate updateStrategy instead of OnDelete. ([#64296](https://github.com/kubernetes/kubernetes/pull/64296), [@mindprince](https://github.com/mindprince)) -* increased grpc client default response size. ([#63977](https://github.com/kubernetes/kubernetes/pull/677), [@runcom](https://github.com/runcom)) -* Applied pod name and namespace labels to pod cgroup in cAdvisor metrics ([#63406](https://github.com/kubernetes/kubernetes/pull/63406), [@derekwaynecarr](https://github.com/derekwaynecarr)) -* [fluentd-gcp addon] Use the logging agent's node name as the metadata agent URL. ([#63353](https://github.com/kubernetes/kubernetes/pull/63353), [@bmoyles0117](https://github.com/bmoyles0117)) -* The new default value for the --allow-privileged parameter of the Kubernetes-worker charm has been set to true based on changes which went into the Kubernetes 1.10 release. Before this change the default value was set to false. If you're installing Canonical Kubernetes you should expect this value to now be true by default and you should now look to use PSP (pod security policies). ([#64104](https://github.com/kubernetes/kubernetes/pull/64104), [@CalvinHartwell](https://github.com/CalvinHartwell)) - -## External Dependencies - -* Default etcd server version is v3.2.18 compared with v3.1.12 in v1.10 ([#61198](https://github.com/kubernetes/kubernetes/pull/61198)) -* Rescheduler is v0.4.0, compared with v0.3.1 in v1.10 ([#65454](https://github.com/kubernetes/kubernetes/pull/65454)) -* The validated docker versions are the same as for v1.10: 1.11.2 to 1.13.1 and 17.03.x (ref) -* The Go version is go1.10.2, as compared to go1.9.3 in v1.10. ([#63412](https://github.com/kubernetes/kubernetes/pull/63412)) -* The minimum supported go is the same as for v1.10: go1.9.1. ([#55301](https://github.com/kubernetes/kubernetes/pull/55301)) -* CNI is the same as v1.10: v0.6.0 ([#51250](https://github.com/kubernetes/kubernetes/pull/51250)) -* CSI is updated to 0.3.0 as compared to 0.2.0 in v1.10. ([#64719](https://github.com/kubernetes/kubernetes/pull/64719)) -* The dashboard add-on is the same as v1.10: v1.8.3. ([#517326](https://github.com/kubernetes/kubernetes/pull/57326)) -* Bump Heapster to v1.5.2 as compared to v1.5.0 in v1.10 ([#61396](https://github.com/kubernetes/kubernetes/pull/61396)) -* Updates Cluster Autoscaler version to v1.3.0 from v1.2.0 in v1.10. See [release notes](https://github.com/kubernetes/autoscaler/releases/tag/cluster-autoscaler-1.3.0) for details. ([#65219](https://github.com/kubernetes/kubernetes/pull/65219)) -* Kube-dns has been updated to v1.14.10, as compared to v1.14.8 in v1.10 ([#62676](https://github.com/kubernetes/kubernetes/pull/62676)) -* Influxdb is unchanged from v1.10: v1.3.3 ([#53319](https://github.com/kubernetes/kubernetes/pull/53319)) -* Grafana is unchanged from v1.10: v4.4.3 ([#53319](https://github.com/kubernetes/kubernetes/pull/53319)) -* CAdvisor is v0.30.1, as opposed to v0.29.1 in v1.10 ([#64987](https://github.com/kubernetes/kubernetes/pull/64987)) -* fluentd-gcp-scaler is unchanged from v1.10: v0.3.0 ([#61269](https://github.com/kubernetes/kubernetes/pull/61269)) -* fluentd in fluentd-es-image is unchanged from 1.10: v1.1.0 ([#58525](https://github.com/kubernetes/kubernetes/pull/58525)) -* fluentd-elasticsearch is unchanged from 1.10: v2.0.4 ([#58525](https://github.com/kubernetes/kubernetes/pull/58525)) -* fluentd-gcp is unchanged from 1.10: v3.0.0. ([#60722](https://github.com/kubernetes/kubernetes/pull/60722)) -* Ingress glbc is unchanged from 1.10: v1.0.0 ([#61302](https://github.com/kubernetes/kubernetes/pull/61302)) -* OIDC authentication is unchanged from 1.10: coreos/go-oidc v2 ([#58544](https://github.com/kubernetes/kubernetes/pull/58544)) -* Calico is unchanged from 1.10: v2.6.7 ([#59130](https://github.com/kubernetes/kubernetes/pull/59130)) -* hcsshim has been updated to v0..11 ([#64272](https://github.com/kubernetes/kubernetes/pull/64272)) -* gitRepo volumes in pods no longer require git 1.8.5 or newer; older git versions are now supported. ([#62394](https://github.com/kubernetes/kubernetes/pull/62394)) -* Update crictl on GCE to v1.11.0. ([#65254](https://github.com/kubernetes/kubernetes/pull/65254)) -* CoreDNS is now v1.1.3 ([#64258](https://github.com/kubernetes/kubernetes/pull/64258)) -* Setup dns servers and search domains for Windows Pods in dockershim. Docker EE version >= 17.10.0 is required for propagating DNS to containers. ([#63905](https://github.com/kubernetes/kubernetes/pull/63905)) -* Update version of Istio addon from 0.5.1 to 0.8.0. See [full Istio release notes](https://istio.io/about/notes/0.6.html).([#64537](https://github.com/kubernetes/kubernetes/pull/64537)) -* Update cadvisor godeps to v0.30.0 ([#64800](https://github.com/kubernetes/kubernetes/pull/64800)) -* Update event-exporter to version v0.2.0 that supports old (gke_container/gce_instance) and new (k8s_container/k8s_node/k8s_pod) stackdriver resources. ([#63918](https://github.com/kubernetes/kubernetes/pull/63918)) -* Rev the Azure SDK for networking to 2017-06-01 ([#61955](https://github.com/kubernetes/kubernetes/pull/61955)) - -## Bug Fixes - -* Fixed spurious "unable to find api field" errors patching custom resources ([#63146](https://github.com/kubernetes/kubernetes/pull/63146), [@liggitt](https://github.com/liggitt)) -* Nodes are not deleted from kubernetes anymore if node is shutdown in Openstack. ([#59931](https://github.com/kubernetes/kubernetes/pull/59931), [@zetaab](https://github.com/zetaab)) -* Re-enabled nodeipam controller for external clouds. Re-enables nodeipam controller for external clouds. Also does a small refactor so that we don't need to pass in allocateNodeCidr into the controller. - ([#63049](https://github.com/kubernetes/kubernetes/pull/63049), [@andrewsykim](https://github.com/andrewsykim)) -* Fixed a configuration error when upgrading kubeadm from 1.9 to 1.10+; Kubernetes must have the same major and minor versions as the kubeadm library. ([#62568](https://github.com/kubernetes/kubernetes/pull/62568), [@liztio](https://github.com/liztio)) -* kubectl no longer renders a List as suffix kind name for CRD resources ([#62512](https://github.com/kubernetes/kubernetes/pull/62512), [@dixudx](https://github.com/dixudx)) -* Restored old behavior to the `--template` flag in `get.go`. In old releases, providing a `--template` flag value and no `--output` value implicitly assigned a default value ("go-template") to `--output`, printing using the provided template argument. -([#65377](https://github.com/kubernetes/kubernetes/pull/65377),[@juanvallejo](https://github.com/juanvallejo)) -* Ensured cloudprovider.InstanceNotFound is reported when the VM is not found on Azure ([#61531](https://github.com/kubernetes/kubernetes/pull/61531), [@feiskyer](https://github.com/feiskyer)) -* Kubernetes version command line parameter in kubeadm has been updated to drop an unnecessary redirection from ci/latest.txt to ci-cross/latest.txt. Users should know exactly where the builds are stored on Google Cloud storage buckets from now on. For example for 1.9 and 1.10, users can specify ci/latest-1.9 and ci/latest-1.10 as the CI build jobs what build images correctly updates those. The CI jobs for master update the ci-cross/latest location, so if you are looking for latest master builds, then the correct parameter to use would be ci-cross/latest. ([#63504](https://github.com/kubernetes/kubernetes/pull/63504), [@dims](https://github.cm/dims)) -* Fixes incompatibility with custom scheduler extender configurations specifying `bindVerb` ([#65424](https://github.com/kubernetes/kubernetes/pull/65424), [@liggitt](https://github.com/liggitt)) -* kubectl built for darwin from darwin now enables cgo to use the system-native C libraries for DNS resolution. Cross-compiled kubectl (e.g. from an official kubernetes release) still uses the go-native netgo DNS implementation. ([#64219](https://github.com/kubernetes/kubernetes/pull/64219), [@ixdy](https://github.com/ixdy)) -* API server properly parses propagationPolicy as a query parameter sent with a delete request ([#63414](https://github.com/kubernetes/kubernetes/pull/63414), [@roycaihw](https://github.com/roycaihw)) -* Corrected a race condition in bootstrapping aggregated cluster roles in new HA clusters ([#63761](https://github.com/kubernetes/kubernetes/pull/63761), [@liggitt](https://github.com/liggitt)) -* kubelet: fix hangs in updating Node status after network interruptions/changes between the kubelet and API server ([#63492](https://github.com/kubernetes/kubernetes/pull/63492), [@liggitt](https://github.com/liggitt)) -* Added log and fs stats for Windows containers ([#62266](https://github.com/kubernetes/kubernetes/pull/62266), [@feiskyer](https://github.com/feiskyer)) -* Fail fast if cgroups-per-qos is set on Windows ([#62984](https://github.com/kubernetes/kubernetes/pull/62984), [@feiskyer](https://github.com/feiskyer)) -* Minor fix for VolumeZoneChecker predicate, storageclass can be in annotation and spec. ([#63749](https://github.com/kubernetes/kubernetes/pull/63749), [@wenlxie](https://github.com/wenlxie)) -* Fixes issue for readOnly subpath mounts for SELinux systems and when the volume mountPath already existed in the container image. ([#64351](https://github.com/kubernetes/kubernetes/pull/64351), [@msau42](https://github.com/msau42)) -* Fixed CSI gRPC connection leak during volume operations. ([#64519](https://github.com/kubernetes/kubernetes/pull/64519), [@vladimirvivien](https://github.com/vladimirvivien)) -* Fixed error reporting of CSI volumes attachment. ([#63303](https://github.com/kubernetes/kubernetes/pull/63303), [@jsafrane](https://github.com/jsafrane)) -* Fixed SELinux relabeling of CSI volumes. ([#64026](https://github.com/kubernetes/kubernetes/pull/64026), [@jsafrane](https://github.com/jsafrane)) -* Fixed detach of already detached CSI volumes. ([#63295](https://github.com/kubernetes/kubernetes/pull/63295), [@jsafrane](https://github.com/jsafrane)) -* fix rbd device works at block mode not get mapped to container ([#64555](https://github.com/kubernetes/kubernetes/pull/64555), [@wenlxie](https://github.com/wenlxie)) -* Fixed an issue where Portworx PVCs remain in pending state when created using a StorageClass with empty parameters ([#64895](https://github.com/kubernetes/kubernetes/pull/64895), [@harsh-px](https://github.com/harsh-px)) storage -* FIX: The OpenStack cloud providers DeleteRoute method fails to delete routes when it can’t find the corresponding instance in OpenStack. (#62729, databus23) -* [fluentd-gcp addon] Increase CPU limit for fluentd to 1 core to achieve 100kb/s throughput. ([#62430](https://github.com/kubernetes/kubernetes/pull/62430), [@bmoyles0117](https://github.com/bmoyles0117)) -* GCE: Fixed operation polling to adhere to the specified interval. Furthermore, operation errors are now returned instead of ignored. ([#64630](https://github.com/kubernetes/kubernetes/pull/64630), [@nicksardo](https://github.com/nicksardo)) -* Included kms-plugin-container.manifest to master nifests tarball. ([#65035](https://github.com/kubernetes/kubernetes/pull/65035), [@immutableT](https://github.com/immutableT)) -* Fixed missing nodes lines when kubectl top nodes ([#64389](https://github.com/kubernetes/kubernetes/pull/64389), [@yue9944882](https://github.com/yue9944882)) sig-cli -* Fixed kubectl drain --timeout option when eviction is used. ([#64378](https://github.com/kubernetes/kubernetes/pull/64378), [@wrdls](https://github.com/wrdls)) sig-cli -* Fixed kubectl auth can-i exit code. It will return 1 if the user is not allowed and 0 if it's allowed. ([#59579](https://github.com/kubernetes/kubernetes/pull/59579), [@fbac](https://github.com/fbac)) -* Fixed data loss issue if using existing azure disk with partitions in disk mount ([#63270](https://github.com/kubernetes/kubernetes/pull/63270), [@andyzhangx](https://github.com/andyzhangx)) -* Fixed azure file size grow issue ([#64383](https://github.com/kubernetes/kubernetes/pull/64383), [@andyzhangx](https://github.com/andyzhangx)) -* Fixed SessionAffinity not updated issue for Azure load balancer ([#64180](https://github.com/kubernetes/kubernetes/pull/64180), [@feiskyer](https://github.com/feiskyer)) -* Fixed kube-controller-manager panic while provisioning Azure security group rules ([#64739](https://github.com/kubernetes/kubernetes/pull/64739), [@feiskyer](https://github.com/feiskyer)) -* Fixed API server panic during concurrent GET or LIST requests with non-empty `resourceVersion`. ([#65092](https://github.com/kubernetes/kubernetes/pull/65092), [@sttts](https://github.com/sttts)) -* Fixed incorrect OpenAPI schema for CustomResourceDefinition objects ([#65256](https://github.com/kubernetes/kubernetes/pull/65256), [@liggitt](https://github.com/liggitt)) -* Fixed issue where PersistentVolume.NodeAffinity.NodeSelectorTerms were ANDed instead of ORed. ([#62556](https://github.com/kubernetes/kubernetes/pull/62556), [@msau42](https://github.com/msau42)) -* Fixed potential infinite loop that can occur when NFS PVs are recycled. ([#62572](https://github.com/kubernetes/kubernetes/pull/62572), [@joelsmith](https://github.com/joelsmith)) -* Fixed column alignment when kubectl get is used with custom columns from OpenAPI schema ([#56629](https://github.com/kubernetes/kubernetes/pull/56629), [@luksa](https://github.com/luksa)) -* kubectl: restore the ability to show resource kinds when displaying multiple objects ([#61985](https://github.com/kubernetes/kubernetes/pull/61985), [@liggitt](https://github.com/liggitt)) -* Fixed a panic in `kubectl run --attach ...` when the api server failed to create the runtime object (due to name conflict, PSP restriction, etc.) ([#61713](https://github.com/kubernetes/kubernetes/pull/61713), [@mountkin](https://github.com/mountkin)) -* kube-scheduler has been fixed to use `--leader-elect` option back to true (as it was in previous versions) ([#59732](https://github.com/kubernetes/kubernetes/pull/59732), [@dims](https://github.com/dims)) -* kubectl: fixes issue with `-o yaml` and `-o json` omitting kind and apiVersion when used with `--dry-run` ([#61808](https://github.com/kubernetes/kubernetes/pull/61808), [@liggitt](https://github.com/liggitt)) -* Ensure reasons end up as comments in `kubectl edit`. ([#60990](https://github.com/kubernetes/kubernetes/pull/60990), [@bmcstdio](https://github.com/bmcstdio)) -* Fixes issue where subpath readOnly mounts failed ([#63045](https://github.com/kubernetes/kubernetes/pull/63045), [@msau42](https://github.com/msau42)) -* Fix stackdriver metrics for node memory using wrong metric type ([#63535](https://github.co/kubernetes/kubernetes/pull/63535), [@serathius](https://github.com/serathius)) -* fix mount unmount failure for a Windows pod ([#63272](https://github.com/kubernetes/kubernetes/pull/63272), [@andyzhangx](https://github.com/andyzhangx)) - -#### General Fixes and Reliability - -* Fixed a regression in kube-scheduler to properly load client connection information from a `--config` file that references a kubeconfig file. ([#65507](https://github.com/kubernetes/kubernetes/pull/65507), [@liggitt](https://github.com/liggitt)) -* Fix regression in `v1.JobSpec.backoffLimit` that caused failed Jobs to be restarted indefinitely. ([#63650](https://github.com/kubernetes/kubernetes/pull/63650), [@soltysh](https://github.com/soltysh)) -* fixes a potential deadlock in the garbage collection controller ([#64235](https://github.com/kubernetes/kubernetes/pull/64235), [@liggitt](https://github.com/liggitt)) -* fix formatAndMount func issue on Windows ([#63248](https://github.com/kubernetes/kubernetes/pull/63248), [@andyzhangx](https://github.com/andyzhangx)) -* Fix issue of colliding nodePorts when the cluster has services with externalTrafficPolicy=Local ([#64349](https://github.com/kubernetes/kubernetes/pull/64349), [@nicksardo](https://github.com/nicksardo)) -* fixes a panic applying json patches containing out of bounds operations ([#64355](https://github.com/kubernetes/kubernetes/pull/64355), [@liggitt](https://github.com/liggitt)) -* Fix incorrectly propagated ResourceVersion in ListRequests returning 0 items. ([#64150](https://github.com/kubernetes/kubernetes/pull/64150), [@wojtek-t](https://github.com/wojtek-t)) -* GCE: Fix to make the built-in `kubernetes` service properly point to the master's load balancer address in clusters that use multiple master VMs. ([#63696](https://github.com/kubernetes/kubernetes/pull/63696), [@grosskur](https://github.com/grosskur)) -* Fixes fake client generation for non-namespaced subresources ([#60445](https://github.com/kubernetes/kubernetes/pull/60445), [@jhorwit2](https://github.com/jhorwit2)) -* Schedule even if extender is not available when using extender ([#61445](https://github.com/kubernetes/kubernetes/pull/61445), [@resouer](https://github.com/resouer)) -* Fix panic create/update CRD when mutating/validating webhook configured. ([#61404](https://github.com/kubernetes/kubernetes/pull/61404), [@hzxuzhonghu](https://github.com/hzxuzhonghu)) -* Pods requesting resources prefixed with `*kubernetes.io` will remain unscheduled if there are no nodes exposing that resource. ([#61860](https://github.com/kubernetes/kubernetes/pull/61860), [@mindprince](https://github.com/mindprince)) -* fix scheduling policy on ConfigMap breaks without the --policy-configmap-namespace flag set ([#61388](https://github.com/kubernetes/kubernetes/pull/61388), [@zjj2wry](https://github.com/zjj2wry)) -* Bugfix for erroneous upgrade needed messaging in kubernetes worker charm. ([#60873](https://github.com/kubernetes/kubernetes/pull/60873), [@wwwtyro](https://github.com/wwwtyro)) -* Fix inter-pod anti-affinity check to consider a pod a match when all the anti-affinity terms match. ([#62715](https://github.com/kubernetes/kubernetes/pull/62715), [@bsalamat](https://github.com/bsalamat)) -* Pod affinity `nodeSelectorTerm.matchExpressions` may now be empty, and works as previously documented: nil or empty `matchExpressions` matches no objects in scheduler. ([#62448](https://github.com/kubernetes/kubernetes/pull/62448), [@k82cn](https://github.com/k82cn)) -* Fix an issue in inter-pod affinity predicate that cause affinity to self being processed correctly ([#62591](https://github.com/kubernetes/kubernetes/pull/62591), [@bsalamat](https://github.com/bsalamat)) -* fix WaitForAttach failure issue for azure disk ([#62612](https://github.com/kubernetes/kubernetes/pull/62612), [@andyzhangx](https://github.com/andyzhangx)) -* Fix user visible files creation for windows ([#62375](https://github.com/kubernetes/kubernetes/pull/62375), [@feiskyer](https://github.com/feiskyer)) -* Fix machineID getting for vmss nodes when using instance metadata ([#62611](https://github.com/kubernetes/kubernetes/pull/62611), [@feiskyer](https://github.com/feiskyer)) -* Fix Forward chain default reject policy for IPVS proxier ([#62007](https://github.com/kubernetes/kubernetes/pull/62007), [@m1093782566](https://github.com/m1093782566)) -* fix nsenter GetFileType issue in containerized kubelet ([#62467](https://github.com/kubernetes/kubernetes/pull/62467), [@andyzhangx](https://github.com/andyzhangx)) -* Ensure expected load balancer is selected for Azure ([#62450](https://github.com/kubernetes/kubernetes/pull/62450), [@feiskyer](https://github.com/feiskyer)) -* Resolves forbidden error when the `daemon-set-controller` cluster role access `controllerrevisions` resources. ([#62146](https://github.com/kubernetes/kubernetes/pull/62146), [@frodenas](https://github.com/frodenas)) -* fix incompatible file type checking on Windows ([#62154](https://github.com/kubernetes/kubernetes/pull/62154), [@dixudx](https://github.com/dixudx)) -* fix local volume absolute path issue on Windows ([#620s18](https://github.com/kubernetes/kubernetes/pull/62018), [@andyzhangx](https://github.com/andyzhangx)) -* fix the issue that default azure disk fsypte(ext4) does not work on Windows ([#62250](https://github.com/kubernetes/kubernetes/pull/62250), [@andyzhangx](https://github.com/andyzhangx)) -* Fixed bug in rbd-nbd utility when nbd is used. ([#62168](https://github.com/kubernetes/kubernetes/pull/62168), [@piontec](https://github.com/piontec)) -* fix local volume issue on Windows ([#62012](https://github.com/kubernetes/kubernetes/pull/62012), [@andyzhangx](https://github.com/andyzhangx)) -* Fix a bug that fluentd doesn't inject container logs for CRI container runtimes (containerd, cri-o etc.) into elasticsearch on GCE. ([#61818](https://github.com/kubernetes/kubernetes/pull/61818), [@Random-Liu](https://github.com/Random-Liu)) -* flexvolume: trigger plugin init only for the relevant plugin while probe ([#58519](https://github.com/kubernetes/kubernetes/pull/58519), [@linyouchong](https://github.com/linyouchong)) -* Fixed ingress issue with CDK and pre-1.9 versions of kubernetes. ([#61859](https://github.com/kubernetes/kubernetes/pull/61859), [@hyperbolic2346](https://github.com/hyperbolic2346)) -* Fixed racy panics when using fake watches with ObjectTracker ([#61195](https://github.com/kubernetes/kubernetes/pull/61195), [@grantr](https://github.com/grantr)) -* Fixed mounting of UNIX sockets(and other special files) in subpaths ([#61480](https://github.com/kubernetes/kubernetes/pull/61480), [@gnufscied](https://github.com/gnufied)) -* Fixed [#61123](https://github.com/kubernetes/kubernetes/pull/61123) by triggering syncer.Update on all cases including when a syncer is created ([#61124](https://github.com/kubernetes/kubernetes/pull/61124), [@satyasm](https://github.com/satyasm)) -* Fixed data race in node lifecycle controller ([#60831](https://github.com/kubernetes/kubernetes/pull/60831), [@resouer](https://github.com/resouer)) -* Fixed resultRun by resetting it to 0 on pod restart ([#62853](https://github.com/kubernetes/kubernetes/pull62853), [@tony612](https://github.com/tony612)) -* Fixed the liveness probe to use `/bin/bash -c` instead of `/bin/bash c`. ([#63033](https://github.com/kubernetes/kubernetes/pull/63033), [@bmoyles0117](https://github.com/bmoyles0117)) -* Fixed scheduler informers to receive events for all the pods in the cluster. ([#63003](https://github.com/kubernetes/kubernetes/pull/63003), [@bsalamat](https://github.com/bsalamat)) -* Fixed in vSphere Cloud Provider to handle upgrades from kubernetes version less than v1.9.4 to v1.9.4 and above. ([#62919](https://github.com/kubernetes/kubernetes/pull/62919), [@abrarshivani](https://github.com/abrarshivani)) -* Fixed error where config map for Metadata Agent was not created by addon manager. ([#62909](https://github.com/kubernetes/kubernetes/pull/62909), [@kawych](https://github.com/kawych)) -* Fixed permissions to allow statefulset scaling for admins, editors, and viewers ([#62336](https://github.com/kubernetes/kubernetes/pull/62336), [@deads2k](https://github.com/deads2k)) -* GCE: Fixed for internal load balancer management resulting in backend services with outdated instance group links. ([#62885](https://github.com/kubernetes/kubernetes/pull/62885), [@nicksardo](https://github.com/nicksardo)) -* Deployment will stop adding pod-template-hash labels/selector to ReplicaSets and Pods it adopts. Resources created by Deployments are not affected (will still have pod-template-hash labels/selector). ([#61615](https://github.com/kubernetes/kubernetes/pull/61615), [@janetkuo](https://github.com/janetkuo)) -* Used inline func to ensure unlock is executed ([#61644](https://github.com/kubernetes/kubernetes/pull/61644), [@resouer](https://github.com/resouer)) -* kubernetes-master charm now properly clears the client-ca-file setting on the apiserver snap ([#61479](https://github.com/kubernetes/kubernetes/pull/61479), [@hyperbolic2346](https://github.com/hyperbolic2346)) -* Bound cloud allocator to 10 retries with 100 ms delay between retries. ([#61375](https://github.com/kubernetes/kubernetes/pull/61375), [@satyasm](https://github.com/satyasm)) -* Respect fstype in Windows for azure disk ([#61267](https://github.com/kubernetes/kubernetes/pull/61267), [@andyzhangx](https://github.com/andyzhangx)) -* Unready pods will no longer impact the number of desired replicas when using horizontal auto-scaling with external metrics or object metrics. ([#60886](https://github.com/kubernetes/kubernetes/pull/60886), [@mattjmcnaughton](https://github.com/mattjmcnaughton)) -* Removed unsafe double RLock in cpumanager ([#62464](https://github.com/kubernetes/kubernetes/pull/62464), [@choury](https://github.com/choury)) - -## Non-user-facing changes - -* Remove UID mutation from request.context. ([#63957](https://github.com/kubernetes/kubernetes/pull/63957), [@hzxuzhonghu](https://github.com/hzxuzhonghu)) -* Use Patch instead of Put to sync pod status. ([#62306](https://github.com/kubernetes/kubernetes/pull/62306), [@freehan](https://github.com/freehan)) -* Allow env from resource with keys & updated tests ([#60636](https://github.com/kubernetes/kubernetes/pull/60636), [@PhilipGough](https://github.com/PhilipGough)) -* set EnableHTTPSTrafficOnly in azure storage account creation ([#64957](https://github.com/kubernetes/kubernetes/pull/64957), [@andyzhangx](https://github.com/andyzhangx)) -* New conformance test added for Watch. ([#61424](https://github.com/kubernetes/kubernetes/pull/61424), [@jennybuckley](https://github.com/jennybuckley)) -* Use DeleteOptions.PropagationPolicy instead of OrphanDependents in kubectl ([#59851](https://thub.com/kubernetes/kubernetes/pull/59851), [@nilebox](https://github.com/nilebox)) -* Add probe based mechanism for kubelet plugin discovery ([#63328](https://github.com/kubernetes/kubernetes/pull/63328), [@vikaschoudhary16](https://github.com/vikaschoudhary16)) -* keep pod state consistent when scheduler cache UpdatePod ([#64692](https://github.com/kubernetes/kubernetes/pull/64692), [@adohe](https://github.com/adohe)) -* kubectl delete does not use reapers for removing objects anymore, but relies on server-side GC entirely ([#63979](https://github.com/kubernetes/kubernetes/pull/63979), [@soltysh](https://github.com/soltysh)) -* Updated default image for nginx ingress in CDK to match current Kubernetes docs. ([#64285](https://github.com/kubernetes/kubernetes/pull/64285), [@hyperbolic2346](https://github.com/hyperbolic2346)) -* Increase scheduler cache generation number monotonically in order to avoid collision and use of stale information in scheduler. ([#63264](https://github.com/kubernetes/kubernetes/pull/63264), [@bsalamat](https://github.com/bsalamat)) -* Adding CSI driver registration code. ([#64560](https://github.com/kubernetes/kubernetes/pull/64560), [@sbezverk](https://github.com/sbezverk)) -* Do not check vmSetName when getting Azure node's IP ([#63541](https://github.com/kubernetes/kubernetes/pull/63541), [@feiskyer](https://github.com/feiskyer)) -* [fluentd-gcp addon] Update event-exporter image to have the latest base image. ([#61727](https://github.com/kubernetes/kubernetes/pull/61727), [@crassirostris](https://github.com/crassirostris)) -* Make volume usage metrics available for Cinder ([#62668](https://github.com/kubernetes/kubernetes/pull/62668), [@zetaab](https://github.com/zetaab)) -* cinder volume plugin : When the cinder volume status is `error`, controller will not do `attach ` and `detach ` operation ([#61082](https://github.com/kubernetes/kubernetes/pull/61082), [@wenlxie](https://github.com/wenlxie)) -* Allow user to scale l7 default backend deployment ([#62685](https://github.com/kubernetes/kubernetes/pull/62685), [@freehan](https://github.com/freehan)) -* Add support to ingest log entries to Stackdriver against new "k8s_container" and "k8s_node" resources. ([#62076](https://github.com/kubernetes/kubernetes/pull/62076), [@qingling128](https://github.com/qingling128)) -* Disabled CheckNodeMemoryPressure and CheckNodeDiskPressure predicates if TaintNodesByCondition enabled ([#60398](https://github.com/kubernetes/kubernetes/pull/60398), [@k82cn](https://github.com/k82cn)) -* Support custom test configuration for IPAM performance integration tests ([#61959](https://github.com/kubernetes/kubernetes/pull/61959), [@satyasm](https://github.com/satyasm)) -* OIDC authentication now allows tokens without an "email_verified" claim when using the "email" claim. If an "email_verified" claim is present when using the "email" claim, it must be `true`. ([#61508](https://github.com/kubernetes/kubernetes/pull/61508), [@rithujohn191](https://github.com/rithujohn191)) -* Add e2e test for CRD Watch ([#61025](https://github.com/kubernetes/kubernetes/pull/61025), [@ayushpateria](https://github.com/ayushpateria)) -* Return error if get NodeStageSecret and NodePublishSecret failed in CSI volume plugin ([#61096](https://github.com/kubernetes/kubernetes/pull/61096), [@mlmhl](https://github.com/mlmhl)) -* kubernetes-master charm now supports metrics server for horizontal pod autoscaler. ([#60174](https://github.com/kubernetes/kubernetes/pull/60174), [@hyperbolic2346](https://github.com/hyperbolic2346)) -* In a GCE cluster, the default `HIRPIN_MODE` is now "hairpin-veth". ([#60166](https://github.com/kubernetes/kubernetes/pull/60166), [@rramkumar1](https://github.com/rramkumar1)) -* Balanced resource allocation priority in scheduler to include volume count on node ([#60525](https://github.com/kubernetes/kubernetes/pull/60525), [@ravisantoshgudimetla](https://github.com/ravisantoshgudimetla)) -* new dhcp-domain parameter to be used for figuring out the hostname of a node ([#61890](https://github.com/kubernetes/kubernetes/pull/61890), [@dims](https://github.com/dims)) -* Disable ipamperf integration tests as part of every PR verification. ([#61863](https://github.com/kubernetes/kubernetes/pull/61863), [@satyasm](https://github.com/satyasm)) -* Enable server-side print in kubectl by default, with the ability to turn it off with --server-print=false ([#61477](https://github.com/kubernetes/kubernetes/pull/61477), [@soltysh](https://github.com/soltysh)) -* Updated admission controller settings for Juju deployed Kubernetes clusters ([#61427](https://github.com/kubernetes/kubernetes/pull/61427), [@hyperbolic2346](https://github.com/hyperbolic2346)) -* Performance test framework and basic tests for the IPAM controller, to simulate behavior of the four supported modes under lightly loaded and loaded conditions, where load is defined as the number of operations to perform as against the configured kubernetes. ([#61143](https://github.com/kubernetes/kubernetes/pull/61143), [@satyasm](https://github.com/satyasm)) -* Removed always pull policy from the template for ingress on CDK. ([#61598](https://github.com/kubernetes/kubernetes/pull/61598), [@hyperbolic2346](https://github.com/hyperbolic2346)) -* `make test-cmd` now works on OSX. ([#61393](https://github.com/kubernetes/kubernetes/pull/61393), [@totherme](https://github.com/totherme)) -* Conformance: ReplicaSet must be supported in the `apps/v1` version. ([#61367](https://github.com/kubernetes/kubernetes/pull/61367), [@enisoc](https://github.com/enisoc)) -* Remove 'system' prefix from Metadata Agent rbac configuration ([#61394](https://github.com/kubernetes/kubernetes/pull/61394), [@kawych](https://github.com/kawych)) -* Support new NODE_OS_DISTRIBUTION 'custom' on GCE on a new add event. ([#61235](https://github.com/kubernetes/kubernetes/pull/61235), [@yguo0905](https://github.com/yguo0905)) -* include file name in the error when visiting files ([#60919](https://github.com/kubernetes/kubernetes/pull/60919), [@dixudx](https://github.com/dixudx)) -* Split PodPriority and PodPreemption feature gate ([#62243](https://github.com/kubernetes/kubernetes/pull/62243), [@resouer](https://github.com/resouer)) -* Code generated for CRDs now passes `go vet`. ([#62412](https://github.com/kubernetes/kubernetes/pull/62412), [@bhcleek](https://github.com/bhcleek)) -* "beginPort+offset" format support for port range which affects kube-proxy only ([#58731](https://github.com/kubernetes/kubernetes/pull/58731), [@yue9944882](https://github.com/yue9944882)) -* Added e2e test for watch ([#60331](https://github.com/kubernetes/kubernetes/pull/60331), [@jennybuckley](https://github.com/jennybuckley)) -* add warnings on using pod-infra-container-image for remote container runtime ([#62982](https://github.com/kubernetes/kubernetes/pull/62982), [@dixudx](https://github.com/dixudx)) -* Mount additional paths required for a working CA root, for setups where /etc/ssl/certs doesn't contains certificates but just symlink. ([#59122](https://github.com/kubernetes/kubernetes/pull/59122), [@klausenbusk](https://github.com/klausenbusk)) -* Introduce truncating audit bacnd that can be enabled for existing backend to limit the size of individual audit events and batches of events. ([#61711](https://github.com/kubernetes/kubernetes/pull/61711), [@crassirostris](https://github.com/crassirostris)) -* stop kubelet to cloud provider integration potentially wedging kubelet sync loop ([#62543](https://github.com/kubernetes/kubernetes/pull/62543), [@ingvagabund](https://github.com/ingvagabund)) -* Set pod status to "Running" if there is at least one container still reporting as "Running" status and others are "Completed". ([#62642](https://github.com/kubernetes/kubernetes/pull/62642), [@ceshihao](https://github.com/ceshihao)) -* Fix memory cgroup notifications, and reduce associated log spam. ([#63220](https://github.com/kubernetes/kubernetes/pull/63220), [@dashpole](https://github.com/dashpole)) -* Remove never used NewCronJobControllerFromClient method (#59471, dmathieu) - - -- [v1.11.0-rc.3](#v1110-rc3) -- [v1.11.0-rc.2](#v1110-rc2) -- [v1.11.0-rc.1](#v1110-rc1) -- [v1.11.0-beta.2](#v1110-beta2) -- [v1.11.0-beta.1](#v1110-beta1) -- [v1.11.0-alpha.2](#v1110-alpha2) -- [v1.11.0-alpha.1](#v1110-alpha1) - - - -# v1.11.0-rc.3 - -[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.11/examples) - -## Downloads for v1.11.0-rc.3 - - -filename | sha256 hash --------- | ----------- -[kubernetes.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes.tar.gz) | `25879ba96d7baf1eb9002956cef3ee40597ed7507784262881a09c00d35ab4c6` -[kubernetes-src.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-src.tar.gz) | `748786c0847e278530c790f82af52797de8b5a9e494e727d0049d4b35e370327` - -### Client Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-client-darwin-386.tar.gz) | `7a3c1b89d6787e275b4b6b855237da6964145e0234b82243c7c6803f1cbd3b46` -[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-client-darwin-amd64.tar.gz) | `0265652c3d7f98e36d1d591e3e6ec5018825b6c0cd37bf65c4d043dc313279e3` -[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-client-linux-386.tar.gz) | `600d9c83ba4d2126da1cfcd0c079d97c8ede75fad61bead1135dc9e4f7e325ce` -[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-client-linux-amd64.tar.gz) | `143fdaf82480dab68b1c783ae9f21916783335f3e4eaa132d72a2c1f7b4b393f` -[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-client-linux-arm.tar.gz) | `1bf4a0823c9c8128b19a2f0a8fbaf81226a313bc35132412a9fa1d251c2af07c` -[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-client-linux-arm64.tar.gz) | `643b84a227838dd6f1dc6c874f6966e9f098b64fd7947ff940776613fa2addf0` -[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-client-linux-ppc64le.tar.gz) | `f46e1952046e977defd1a308ebe6de3ba6a710d562d17de987966a630ea2f7a3` -[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-client-linux-s390x.tar.gz) | `7ba61a3d8e6b50b238814eb086c6f9a9354342be9ac1882d0751d6cd2ce9f295` -[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-client-windows-386.tar.gz) | `587ca7b09cd45864b8093a8aa10284d473db1f528a6173cd2e58f336673aade0` -[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-client-windows-amd64.tar.gz) | `a8b1aac95def9f2bf54a5bbd2d83a1dd7778d0a08f1986187063a9a288a9079b` - -### Server Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-server-linux-amd64.tar.gz) | `d19cc5604370eb2fa826420c99dcbdbbb9bf096ea2916549a46ace990c09e20e` -[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-server-linux-arm.tar.gz) | `47b4ac984a855df2c78443a527705e45909da27405bb7cd8f257a5cde0314518` -[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-server-linux-arm64.tar.gz) | `09f8c2692f8de291c522fc96a5cbefcd60fe7a1ba9235251be11e6dda8663360` -[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-server-linux-ppc64le.tar.gz) | `594ff5991206887a70ec0c13624fa940f7ef4ce9cb17f9d8906f7a124a7ae4d1` -[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-server-linux-s390x.tar.gz) | `43a635f34ce473dcf52870e1d8fad324776d4d958b9829a3dce49eb07f8c4412` - -### Node Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-node-linux-amd64.tar.gz) | `b3259ed3bf2063aca9e6061cc27752adc4d787dfada4498bc4495cbc962826a2` -[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-node-linux-arm.tar.gz) | `9c71370709c345e4495708d8a2c03c1698f59cc9ca60678f498e895170530f9f` -[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-node-linux-arm64.tar.gz) | `d3d1cb767da267ebe8c03c7c6176490d5d047e33596704d099597ff50e5ae3b6` -[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-node-linux-ppc64le.tar.gz) | `d7c623d9ccce9cbb4c8a5d1432ac00222b54f420699d565416e09555e2cc7ff3` -[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-node-linux-s390x.tar.gz) | `288cd27f2e428a3e805c7fcc2c3945c0c6ee2db4812ad293e2bfd9f85bccf428` -[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.11.0-rc.3/kubernetes-node-windows-amd64.tar.gz) | `991765513e0f778ec5416de456dfd709ed90a2fa97741f50dfdb0d30ee4ccbc0` - -## Changelog since v1.11.0-rc.2 - -### Other notable changes - -* Pass cluster_location argument to Heapster ([#65176](https://github.com/kubernetes/kubernetes/pull/65176), [@kawych](https://github.com/kawych)) -* Fix concurrent map access panic ([#65331](https://github.com/kubernetes/kubernetes/pull/65331), [@dashpole](https://github.com/dashpole)) - * Don't watch .mount cgroups to reduce number of inotify watches - * Fix NVML initialization race condition - * Fix brtfs disk metrics when using a subdirectory of a subvolume -* User can now use `sudo crictl` on GCE cluster. ([#65389](https://github.com/kubernetes/kubernetes/pull/65389), [@Random-Liu](https://github.com/Random-Liu)) - - - -# v1.11.0-rc.2 - -[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.11/examples) - -## Downloads for v1.11.0-rc.2 - - -filename | sha256 hash --------- | ----------- -[kubernetes.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes.tar.gz) | `30742ea1e24ade88e148db872eeef58597813bc67d485c0ff6e4b7284d59500a` -[kubernetes-src.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-src.tar.gz) | `77e1f018820542088f1e9af453a139ae8ad0691cbde98ab01695a8f499dbe4cf` - -### Client Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-client-darwin-386.tar.gz) | `2f8777fcb938bbc310fb481a56dca62e14c27f6a85e61ab4650aeb28e5f9f05a` -[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-client-darwin-amd64.tar.gz) | `30a5ed844d2b6b6b75e19e1f68f5c18ff8ec4f268c149737a6e715bc0a6e297f` -[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-client-linux-386.tar.gz) | `e4c60f463366fdf62e9c10c45c6f6b75d63aa3bd6665a0b56c9c2e2104ea9da6` -[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-client-linux-amd64.tar.gz) | `1d62f9ac92f23897d4545ebaf15d78b13b04157d83a839e347f4bd02cc484af4` -[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-client-linux-arm.tar.gz) | `8f52c6da9f95c7e127a6945a164e66d5266ebf2f4d02261653c5dd6936ec6b00` -[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-client-linux-arm64.tar.gz) | `e6b677601f0d78cf9463a86d6cc33b4861a88d2fbf3728b9c449a216fb84578e` -[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-client-linux-ppc64le.tar.gz) | `2cd49eb1d5f6d97f1342ee7f4803e9713a9cf4bfa419c86f4e1f82182d27f535` -[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-client-linux-s390x.tar.gz) | `e8134efaea3146336b24e76ae2f6f5cdc63f6aeecc65b52cd0aae92edb8432ac` -[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-client-windows-386.tar.gz) | `226b8c687251c877d5876f95f086b131ff3f831fca01dd07caf168269ee2c51d` -[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-client-windows-amd64.tar.gz) | `c590a3a7f2e08f8046752b5bbc0d0b11f174f750fdd7912a68dd5335fcedc03d` - -### Server Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-server-linux-amd64.tar.gz) | `13c518091348c1b4355bf6b1a72514e71f68ad68a51df7d0706666c488e51158` -[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-server-linux-arm.tar.gz) | `d4b4fa98ece74d2cc240cf43b59629fe0115d3750d5938ae5ece972251a96018` -[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-server-linux-arm64.tar.gz) | `6b9e9de414619fb28dbbee05537697c2fdce130abe65372b477d3858571bfabd` -[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-server-linux-ppc64le.tar.gz) | `537f27284ad47d37d9ab8c4f4113b90f55948f88cd5dbab203349a34a9ddeccb` -[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-server-linux-s390x.tar.gz) | `71299a59bd4b7b38242631b3f441885ca9dcd99934427c8399b4f4598cc47fbb` - -### Node Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-node-linux-amd64.tar.gz) | `792da4aa3c06dee14b10f219591af8e967e466c5d5646d8973abfb1071cb5202` -[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-node-linux-arm.tar.gz) | `40a276dd0efdd6e87206d9b2a994ba49c336a455bad7076ddb22a4a6aa0a885f` -[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-node-linux-arm64.tar.gz) | `867504f25a864130c28f18aa5e99be0b2a8e0223ea86d46a4033e76cbe865533` -[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-node-linux-ppc64le.tar.gz) | `b1ff4471acf84a0d4f43854c778d6e18f8d0358da1323d1812f1d1a922b56662` -[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-node-linux-s390x.tar.gz) | `b527ab6ad8f7a3220e743780412c2d6c7fdaccc4eaa71ccfe90ad3e4e98d1d80` -[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.11.0-rc.2/kubernetes-node-windows-amd64.tar.gz) | `1643e19c7dd5b139a6ab81768249d62392fcad5f6f2aec7edab279009368898b` - -## Changelog since v1.11.0-rc.1 - -### Other notable changes - -* Prevents a `kubectl delete` hang when deleting controller managed lists ([#65367](https://github.com/kubernetes/kubernetes/pull/65367), [@deads2k](https://github.com/deads2k)) -* fixes a memory leak in the kube-controller-manager observed when large numbers of pods with tolerations are created/deleted ([#65339](https://github.com/kubernetes/kubernetes/pull/65339), [@liggitt](https://github.com/liggitt)) -* The "kubectl cp" command now supports path shortcuts (../) in remote paths. ([#65189](https://github.com/kubernetes/kubernetes/pull/65189), [@juanvallejo](https://github.com/juanvallejo)) -* Split 'scheduling_latency_seconds' metric into finer steps (predicate, priority, premption) ([#65306](https://github.com/kubernetes/kubernetes/pull/65306), [@shyamjvs](https://github.com/shyamjvs)) -* fixed incorrect OpenAPI schema for CustomResourceDefinition objects ([#65256](https://github.com/kubernetes/kubernetes/pull/65256), [@liggitt](https://github.com/liggitt)) - - - -# v1.11.0-rc.1 - -[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.11/examples) - -## Downloads for v1.11.0-rc.1 - - -filename | sha256 hash --------- | ----------- -[kubernetes.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes.tar.gz) | `f4d6126030d76f4340bf36ba02562388ea6984aa3d3f3ece39359c2a0f605b73` -[kubernetes-src.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-src.tar.gz) | `6383966a2bc5b252f1938fdfe4a7c35fafaa7642da22f86a017e2b718dedda92` - -### Client Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-client-darwin-386.tar.gz) | `1582a21d8e7c9ec8719a003cd79a7c51e984f2b7b703f0816af50efa4b838c6f` -[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-client-darwin-amd64.tar.gz) | `77ae2765fcac147095d2791f42b212a6c150764a311dfb6e7740a70d0c155574` -[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-client-linux-386.tar.gz) | `87f6e22ef05bcd468424b02da2a58c0d695bd875e2130cb94adb842988aa532c` -[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-client-linux-amd64.tar.gz) | `978147f7989b5669a74be5af7c6fe9b3039956c958d17dc53f65ae2364f8485c` -[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-client-linux-arm.tar.gz) | `e7e13c6f500f86641f62fcaa34715fd8aa40913fe97ac507a73a726fb6d2f3f4` -[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-client-linux-arm64.tar.gz) | `5e35f3c80f0811b252c725c938dc4803034b4925d6fa1c2f0042132fd19d6db2` -[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-client-linux-ppc64le.tar.gz) | `0cec908e2f85763e9f066661c2f12122b13901004f552729ced66673f12669da` -[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-client-linux-s390x.tar.gz) | `ae6e0d7eb75647531b224d8a873528bb951858bfddc9595771def8a26dd2a709` -[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-client-windows-386.tar.gz) | `9eaba9edce7e06c15088612b90c8adc714509cab8ba612019c960dc3fe306b9d` -[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-client-windows-amd64.tar.gz) | `dae41cc0be99bec6b28c8bd96eccd6c41b2d51602bc6a374dff922c34708354f` - -### Server Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-server-linux-amd64.tar.gz) | `73510e5be3650bdeb219e93f78b042b4c9b616cbe672c68cab2e713c13f040ca` -[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-server-linux-arm.tar.gz) | `00475cb20dbabbc7f1a048f0907ef1b2cf34cfacab3ad82d2d86e2afae466eca` -[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-server-linux-arm64.tar.gz) | `00b1a2fa9e7c6b9929e09d7e0ec9aadc3e697d7527dcda9cd7d57e89daf618f5` -[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-server-linux-ppc64le.tar.gz) | `6c2d303a243ca4452c19b613bc71c92222c33c9322983f9a485231a7d2471681` -[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-server-linux-s390x.tar.gz) | `c93d9021bd00bd1adda521e6952c72e08beebe8d994ad92cc14c741555e429a9` - -### Node Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-node-linux-amd64.tar.gz) | `7d84cd7f60186d59e84e4b48bc5cd25ddd0fbcef4ebb2a2a3bd06831433c0135` -[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-node-linux-arm.tar.gz) | `4fa046b5c0b3d860e741b33f4da722a16d4b7de9674ab6a60da2d5749b3175ef` -[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-node-linux-arm64.tar.gz) | `db80b1916da3262b1e3aeb658b9a9c829a76e85f97e30c5fc1b07a3ef331003a` -[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-node-linux-ppc64le.tar.gz) | `c693a8b7827f9098e8f407182febc24041dd396fdd66c61f8b666252fbbb342a` -[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-node-linux-s390x.tar.gz) | `ee5becf3f2034157e4c50488278095c3685a01b7f715693a1053fa986d983dcf` -[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.11.0-rc.1/kubernetes-node-windows-amd64.tar.gz) | `65f4f7a96f89c8dcba6c21e79aeac677790c8338c3f8f0e9e27fb16154d7e06f` - -## Changelog since v1.11.0-beta.2 - -### Action Required - -* A cluster-autoscaler ClusterRole is added to cover only the functionality required by Cluster Autoscaler and avoid abusing system:cluster-admin role. ([#64503](https://github.com/kubernetes/kubernetes/pull/64503), [@kgolab](https://github.com/kgolab)) - * action required: Cloud providers other than GCE might want to update their deployments or sample yaml files to reuse the role created via add-on. - -### Other notable changes - -* The "kubectl cp" command now supports path shortcuts (../) in remote paths. ([#65189](https://github.com/kubernetes/kubernetes/pull/65189), [@juanvallejo](https://github.com/juanvallejo)) -* Update crictl on GCE to v1.11.0. ([#65254](https://github.com/kubernetes/kubernetes/pull/65254), [@Random-Liu](https://github.com/Random-Liu)) -* kubeadm: Use the release-1.11 branch by default ([#65229](https://github.com/kubernetes/kubernetes/pull/65229), [@luxas](https://github.com/luxas)) -* Updates Cluster Autoscaler version to 1.3.0. Release notes: https://github.com/kubernetes/autoscaler/releases/tag/cluster-autoscaler-1.3.0 ([#65219](https://github.com/kubernetes/kubernetes/pull/65219), [@aleksandra-malinowska](https://github.com/aleksandra-malinowska)) -* The deprecated `--service-account-private-key-file` flag has been removed from the cloud-controller-manager. The flag is still present and supported in the kube-controller-manager. ([#65182](https://github.com/kubernetes/kubernetes/pull/65182), [@liggitt](https://github.com/liggitt)) -* Update Cluster Autoscaler to v1.3.0-beta.2. Release notes for this version: https://github.com/kubernetes/autoscaler/releases/tag/cluster-autoscaler-1.3.0-beta.2 ([#65148](https://github.com/kubernetes/kubernetes/pull/65148), [@aleksandra-malinowska](https://github.com/aleksandra-malinowska)) -* Fixed API server panic during concurrent GET or LIST requests with non-empty `resourceVersion`. ([#65092](https://github.com/kubernetes/kubernetes/pull/65092), [@sttts](https://github.com/sttts)) -* Kubernetes json deserializer is now case-sensitive to restore compatibility with pre-1.8 servers. ([#65034](https://github.com/kubernetes/kubernetes/pull/65034), [@caesarxuchao](https://github.com/caesarxuchao)) - * If your config files contains fields with wrong case, the config files will be now invalid. -* GCE: Fixes operation polling to adhere to the specified interval. Furthermore, operation errors are now returned instead of ignored. ([#64630](https://github.com/kubernetes/kubernetes/pull/64630), [@nicksardo](https://github.com/nicksardo)) -* Updated hcsshim dependency to v0.6.11 ([#64272](https://github.com/kubernetes/kubernetes/pull/64272), [@jessfraz](https://github.com/jessfraz)) -* Include kms-plugin-container.manifest to master manifests tarball. ([#65035](https://github.com/kubernetes/kubernetes/pull/65035), [@immutableT](https://github.com/immutableT)) -* kubeadm - Ensure the peer port is secured by explicitly setting the peer URLs for the default etcd instance. ([#64988](https://github.com/kubernetes/kubernetes/pull/64988), [@detiber](https://github.com/detiber)) - * kubeadm - Ensure that the etcd certificates are generated using a proper CN - * kubeadm - Update generated etcd peer certificate to include localhost addresses for the default configuration. - * kubeadm - Increase the manifest update timeout to make upgrades a bit more reliable. -* Kubernetes depends on v0.30.1 of cAdvisor ([#64987](https://github.com/kubernetes/kubernetes/pull/64987), [@dashpole](https://github.com/dashpole)) -* Update Cluster Autoscaler version to 1.3.0-beta.1. Release notes: https://github.com/kubernetes/autoscaler/releases/tag/cluster-autoscaler-1.3.0-beta.1 ([#64977](https://github.com/kubernetes/kubernetes/pull/64977), [@aleksandra-malinowska](https://github.com/aleksandra-malinowska)) -* Webhooks for the mutating admission controller now support "remove" operation. ([#64255](https://github.com/kubernetes/kubernetes/pull/64255), [@rojkov](https://github.com/rojkov)) -* deprecated and inactive option '--enable-custom-metrics' is removed in 1.11 ([#60699](https://github.com/kubernetes/kubernetes/pull/60699), [@CaoShuFeng](https://github.com/CaoShuFeng)) -* kubernetes now packages cri-tools (crictl) in addition to all the other kubeadm tools in a deb and rpm. ([#64836](https://github.com/kubernetes/kubernetes/pull/64836), [@chuckha](https://github.com/chuckha)) -* Fix setup of configmap/secret/projected/downwardapi volumes ([#64855](https://github.com/kubernetes/kubernetes/pull/64855), [@gnufied](https://github.com/gnufied)) -* Setup dns servers and search domains for Windows Pods in dockershim. Docker EE version >= 17.10.0 is required for propagating DNS to containers. ([#63905](https://github.com/kubernetes/kubernetes/pull/63905), [@feiskyer](https://github.com/feiskyer)) - - - -# v1.11.0-beta.2 - -[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.11/examples) - -## Downloads for v1.11.0-beta.2 - - -filename | sha256 hash --------- | ----------- -[kubernetes.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes.tar.gz) | `0addbff3fc61047460da0fca7413f4cc679fac7482c3f09aa4f4a60d8ec8dd5c` -[kubernetes-src.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-src.tar.gz) | `943629abc5b046cc5db280417e5cf3a8342c5f67c8deb3d7283b02de67b3a3c3` - -### Client Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-client-darwin-386.tar.gz) | `9b714bb99e9d8c51c718d9ec719412b2006c921e6a5566acf387797b57014386` -[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-client-darwin-amd64.tar.gz) | `11fc9f94c82b2adc860964be8e84ed1e17ae711329cac3c7aff58067caeeffe2` -[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-client-linux-386.tar.gz) | `016abd161dc394ab6e1e8f57066ff413b523c71ac2af458bfc8dfa2107530910` -[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-client-linux-amd64.tar.gz) | `f98c223c24680aae583ff63fa8e1ef49421ddd660bd748fea493841c24ad6417` -[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-client-linux-arm.tar.gz) | `78cf5dca303314023d6f82c7570e92b814304029fb7d3941d7c04855679e120d` -[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-client-linux-arm64.tar.gz) | `c35e03687d491d9ca955121912c56d00741c86381370ed5890b0ee8b629a3e01` -[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-client-linux-ppc64le.tar.gz) | `4e848a58f822f971dbda607d26128d1b718fc07665d2f65b87936eec40b037b2` -[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-client-linux-s390x.tar.gz) | `ead83a70e4782efdaea3645ca2a59e51209041ce41f9d805d5c1d10f029b1cb0` -[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-client-windows-386.tar.gz) | `c357b28c83e769517d7b19e357260d62485e861005d98f84c752d109fa48bd20` -[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-client-windows-amd64.tar.gz) | `2ae78921a35a8a582b226521f904f0840c17e3e097364d6a3fcd10d196bec0dc` - -### Server Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-server-linux-amd64.tar.gz) | `26bd6e05a4bf942534f0578b1cdbd11b8c868aa3331e2681734ecc93d75f6b85` -[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-server-linux-arm.tar.gz) | `df706ccad0a235613e644eda363c49bfb858860a2ae5219b17b996f36669a7fc` -[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-server-linux-arm64.tar.gz) | `73f3e7a82d7c78a9f03ce0c84ae4904942f0bf88b3bf045fc9b1707b686cb04e` -[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-server-linux-ppc64le.tar.gz) | `ebeb67e45e630469d55b442d2c6092065f1c1403d1965c4340d0b6c1fa7f6676` -[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-server-linux-s390x.tar.gz) | `c82e6a41b8e451600fb5bfdad3addf3c35b5edb518a7bf9ebd03af0574d57975` - -### Node Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-node-linux-amd64.tar.gz) | `e6dbd56c10fee83f400e76ae02325eda0a583347f6b965eeb610c90d664d7990` -[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-node-linux-arm.tar.gz) | `df9d18c3af4d6ee237a238b3029823f6e90b2ae3f0d25b741d4b3fedb7ea14f8` -[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-node-linux-arm64.tar.gz) | `d84e98702651615336256d3453516df9ad39f39400f6091d9e2b4c95b4111ede` -[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-node-linux-ppc64le.tar.gz) | `a62037f00ab29302f72aa23116c304b676cc41a6f47f79a2faf4e4ea18059178` -[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-node-linux-s390x.tar.gz) | `bef66f2080f7ebf442234d841ec9c994089fa02b400d98e1b01021f1f66c4cd0` -[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.11.0-beta.2/kubernetes-node-windows-amd64.tar.gz) | `2b029715b98c3355a172ed5a6e08e73ad4ef264c74a26ed5a3da67f90764b7dc` - -## Changelog since v1.11.0-beta.1 - -### Action Required - -* [action required] `kubeadm join` is now blocking on the kubelet performing the TLS Bootstrap properly. ([#64792](https://github.com/kubernetes/kubernetes/pull/64792), [@luxas](https://github.com/luxas)) - * Earlier, `kubeadm join` only did the discovery part and exited successfully without checking that the - * kubelet actually started properly and performed the TLS bootstrap correctly. Now, as kubeadm runs - * some post-join steps (e.g. annotating the Node API object with the CRISocket as in this PR, as a - * stop-gap until this is discoverable automatically), `kubeadm join` is now waiting for the kubelet to - * perform the TLS Bootstrap, and then uses that credential to perform further actions. This also - * improves the UX, as `kubeadm` will exit with a non-zero code if the kubelet isn't in a functional - * state, instead of pretending like everything's fine. -* [action required] The structure of the kubelet dropin in the kubeadm deb package has changed significantly. ([#64780](https://github.com/kubernetes/kubernetes/pull/64780), [@luxas](https://github.com/luxas)) - * Instead of hard-coding the parameters for the kubelet in the dropin, a structured configuration file - * for the kubelet is used, and is expected to be present in `/var/lib/kubelet/config.yaml`. - * For runtime-detected, instance-specific configuration values, a environment file with - * dynamically-generated flags at `kubeadm init` or `kubeadm join` run time is used. - * Finally, if the user wants to override something specific for the kubelet that can't be done via - * the kubeadm Configuration file (which is preferred), they might add flags to the - * `KUBELET_EXTRA_ARGS` environment variable in either `/etc/default/kubelet` - * or `/etc/sysconfig/kubelet`, depending on the system you're running on. -* [action required] The `--node-name` flag for kubeadm now dictates the Node API object name the ([#64706](https://github.com/kubernetes/kubernetes/pull/64706), [@liztio](https://github.com/liztio)) - * kubelet uses for registration, in all cases but where you might use an in-tree cloud provider. - * If you're not using an in-tree cloud provider, `--node-name` will set the Node API object name. - * If you're using an in-tree cloud provider, you MUST make `--node-name` match the name the - * in-tree cloud provider decides to use. -* [action required] kubeadm: The Token-related fields in the `MasterConfiguration` object have now been refactored. Instead of the top-level `.Token`, `.TokenTTL`, `.TokenUsages`, `.TokenGroups` fields, there is now a `BootstrapTokens` slice of `BootstrapToken` objects that support the same features under the `.Token`, `.TTL`, `.Usages`, `.Groups` fields. ([#64408](https://github.com/kubernetes/kubernetes/pull/64408), [@luxas](https://github.com/luxas)) - -### Other notable changes - -* Add Vertical Pod Autoscaler to autoscaling/v2beta1 ([#63797](https://github.com/kubernetes/kubernetes/pull/63797), [@kgrygiel](https://github.com/kgrygiel)) -* kubeadm: only run kube-proxy on architecture consistent nodes ([#64696](https://github.com/kubernetes/kubernetes/pull/64696), [@dixudx](https://github.com/dixudx)) -* kubeadm: Add a new `kubeadm upgrade node config` command ([#64624](https://github.com/kubernetes/kubernetes/pull/64624), [@luxas](https://github.com/luxas)) -* Orphan delete is now supported for custom resources ([#63386](https://github.com/kubernetes/kubernetes/pull/63386), [@roycaihw](https://github.com/roycaihw)) -* Update version of Istio addon from 0.6.0 to 0.8.0. ([#64537](https://github.com/kubernetes/kubernetes/pull/64537), [@ostromart](https://github.com/ostromart)) - * See https://istio.io/about/notes/0.8.html for full Isto release notes. -* Provides API support for external CSI storage drivers to support block volumes. ([#64723](https://github.com/kubernetes/kubernetes/pull/64723), [@vladimirvivien](https://github.com/vladimirvivien)) -* kubectl will list all allowed print formats when an invalid format is passed. ([#64371](https://github.com/kubernetes/kubernetes/pull/64371), [@CaoShuFeng](https://github.com/CaoShuFeng)) -* Use IONice to reduce IO priority of du and find ([#64800](https://github.com/kubernetes/kubernetes/pull/64800), [@dashpole](https://github.com/dashpole)) - * cAdvisor ContainerReference no longer contains Labels. Use ContainerSpec instead. - * Fix a bug where cadvisor failed to discover a sub-cgroup that was created soon after the parent cgroup. -* Kubelet will set extended resource capacity to zero after it restarts. If the extended resource is exported by a device plugin, its capacity will change to a valid value after the device plugin re-connects with the Kubelet. If the extended resource is exported by an external component through direct node status capacity patching, the component should repatch the field after kubelet becomes ready again. During the time gap, pods previously assigned with such resources may fail kubelet admission but their controller should create new pods in response to such failures. ([#64784](https://github.com/kubernetes/kubernetes/pull/64784), [@jiayingz](https://github.com/jiayingz)) -* Introduce ContainersReady condition in Pod Status ([#64646](https://github.com/kubernetes/kubernetes/pull/64646), [@freehan](https://github.com/freehan)) -* 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. ([#63717](https://github.com/kubernetes/kubernetes/pull/63717), [@ingvagabund](https://github.com/ingvagabund)) -* kubeadm now configures the etcd liveness probe correctly when etcd is listening on all interfaces ([#64670](https://github.com/kubernetes/kubernetes/pull/64670), [@stealthybox](https://github.com/stealthybox)) -* Fix regression in `v1.JobSpec.backoffLimit` that caused failed Jobs to be restarted indefinitely. ([#63650](https://github.com/kubernetes/kubernetes/pull/63650), [@soltysh](https://github.com/soltysh)) -* GCE: Update cloud provider to use TPU v1 API ([#64727](https://github.com/kubernetes/kubernetes/pull/64727), [@yguo0905](https://github.com/yguo0905)) -* Kubelet: Add security context for Windows containers ([#64009](https://github.com/kubernetes/kubernetes/pull/64009), [@feiskyer](https://github.com/feiskyer)) -* Volume topology aware dynamic provisioning ([#63193](https://github.com/kubernetes/kubernetes/pull/63193), [@lichuqiang](https://github.com/lichuqiang)) -* CoreDNS deployment configuration now uses k8s.gcr.io imageRepository ([#64775](https://github.com/kubernetes/kubernetes/pull/64775), [@rajansandeep](https://github.com/rajansandeep)) -* Updated Container Storage Interface specification version to v0.3.0 ([#64719](https://github.com/kubernetes/kubernetes/pull/64719), [@davidz627](https://github.com/davidz627)) -* Kubeadm: Make CoreDNS run in read-only mode and drop all unneeded privileges ([#64473](https://github.com/kubernetes/kubernetes/pull/64473), [@nberlee](https://github.com/nberlee)) -* Add a volume projection that is able to project service account tokens. ([#62005](https://github.com/kubernetes/kubernetes/pull/62005), [@mikedanese](https://github.com/mikedanese)) -* Fix kubectl auth can-i exit code. It will return 1 if the user is not allowed and 0 if it's allowed. ([#59579](https://github.com/kubernetes/kubernetes/pull/59579), [@fbac](https://github.com/fbac)) -* apply global flag "context" for kubectl config view --minify ([#64608](https://github.com/kubernetes/kubernetes/pull/64608), [@dixudx](https://github.com/dixudx)) -* Fix kube-controller-manager panic while provisioning Azure security group rules ([#64739](https://github.com/kubernetes/kubernetes/pull/64739), [@feiskyer](https://github.com/feiskyer)) -* API change for volume topology aware dynamic provisioning ([#63233](https://github.com/kubernetes/kubernetes/pull/63233), [@lichuqiang](https://github.com/lichuqiang)) -* Add azuredisk PV size grow feature ([#64386](https://github.com/kubernetes/kubernetes/pull/64386), [@andyzhangx](https://github.com/andyzhangx)) -* Modify e2e tests to use priorityClass beta version & switch priorityClass feature to beta ([#63724](https://github.com/kubernetes/kubernetes/pull/63724), [@ravisantoshgudimetla](https://github.com/ravisantoshgudimetla)) -* Adding CSI driver registration code. ([#64560](https://github.com/kubernetes/kubernetes/pull/64560), [@sbezverk](https://github.com/sbezverk)) -* fixes a potential deadlock in the garbage collection controller ([#64235](https://github.com/kubernetes/kubernetes/pull/64235), [@liggitt](https://github.com/liggitt)) -* Fixes issue for readOnly subpath mounts for SELinux systems and when the volume mountPath already existed in the container image. ([#64351](https://github.com/kubernetes/kubernetes/pull/64351), [@msau42](https://github.com/msau42)) -* Add log and fs stats for Windows containers ([#62266](https://github.com/kubernetes/kubernetes/pull/62266), [@feiskyer](https://github.com/feiskyer)) -* client-go: credential exec plugins have been promoted to beta ([#64482](https://github.com/kubernetes/kubernetes/pull/64482), [@ericchiang](https://github.com/ericchiang)) -* Revert [#64364](https://github.com/kubernetes/kubernetes/pull/64364) to resurrect rescheduler. More info https://github.com/kubernetes/kubernetes/issues/64725 :) ([#64592](https://github.com/kubernetes/kubernetes/pull/64592), [@ravisantoshgudimetla](https://github.com/ravisantoshgudimetla)) -* Add RequestedToCapacityRatioPriority priority function. Function is parametrized with set of points mapping node utilization (0-100) to score (0-10). ([#63929](https://github.com/kubernetes/kubernetes/pull/63929), [@losipiuk](https://github.com/losipiuk)) - * Function is linear between points. Resource utilization is defined as one minus ratio of total amount of resource requested by pods on node and node's capacity (scaled to 100). - * Final utilization used for computation is arithmetic mean of cpu utilization and memory utilization. - * Function is disabled by default and can be enabled via scheduler policy config file. - * If no parametrization is specified in config file it defaults to one which gives score 10 to utilization 0 and score 0 to utilization 100. -* `kubeadm init` detects if systemd-resolved is running and configures the kubelet to use a working resolv.conf. ([#64665](https://github.com/kubernetes/kubernetes/pull/64665), [@stealthybox](https://github.com/stealthybox)) -* fix data loss issue if using existing azure disk with partitions in disk mount ([#63270](https://github.com/kubernetes/kubernetes/pull/63270), [@andyzhangx](https://github.com/andyzhangx)) -* Meta data of CustomResources is now pruned and schema checked during deserialization of requests and when read from etcd. In the former case, invalid meta data is rejected, in the later it is dropped from the CustomResource objects. ([#64267](https://github.com/kubernetes/kubernetes/pull/64267), [@sttts](https://github.com/sttts)) -* Add Alpha support for dynamic volume limits based on node type ([#64154](https://github.com/kubernetes/kubernetes/pull/64154), [@gnufied](https://github.com/gnufied)) -* Fixed CSI gRPC connection leak during volume operations. ([#64519](https://github.com/kubernetes/kubernetes/pull/64519), [@vladimirvivien](https://github.com/vladimirvivien)) -* 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 ([#64346](https://github.com/kubernetes/kubernetes/pull/64346), [@dims](https://github.com/dims)) -* `ScheduleDaemonSetPods` is an alpha feature (since v1.11) that causes DaemonSet Pods ([#63223](https://github.com/kubernetes/kubernetes/pull/63223), [@k82cn](https://github.com/k82cn)) - * to be scheduler by default scheduler, instead of Daemonset controller. When it is enabled, - * the `NodeAffinity` term (instead of `.spec.nodeName`) is added to the DaemonSet Pods; - * this enables the default scheduler to bind the Pod to the target host. If node affinity - * of DaemonSet Pod already exists, it will be replaced. - * DaemonSet controller will only perform these operations when creating DaemonSet Pods; - * and those operations will only modify the Pods of DaemonSet, no changes are made to the - * `.spec.template` of DaemonSet. -* fix formatAndMount func issue on Windows ([#63248](https://github.com/kubernetes/kubernetes/pull/63248), [@andyzhangx](https://github.com/andyzhangx)) -* AWS EBS, Azure Disk, GCE PD and Ceph RBD volume plugins support dynamic provisioning of raw block volumes. ([#64447](https://github.com/kubernetes/kubernetes/pull/64447), [@jsafrane](https://github.com/jsafrane)) -* kubeadm upgrade apply can now ignore version errors with --force ([#64570](https://github.com/kubernetes/kubernetes/pull/64570), [@liztio](https://github.com/liztio)) -* Adds feature gate for plugin watcher ([#64605](https://github.com/kubernetes/kubernetes/pull/64605), [@vikaschoudhary16](https://github.com/vikaschoudhary16)) -* Kubelet now proxies container streaming between apiserver and container runtime. The connection between kubelet and apiserver is authenticated. Container runtime should change streaming server to serve on localhost, to make the connection between kubelet and container runtime local. ([#64006](https://github.com/kubernetes/kubernetes/pull/64006), [@Random-Liu](https://github.com/Random-Liu)) - * In this way, the whole container streaming connection is secure. To switch back to the old behavior, set `--redirect-container-streaming=true` flag. -* TokenRequests now are required to have an expiration duration between 10 minutes and 2^32 seconds. ([#63999](https://github.com/kubernetes/kubernetes/pull/63999), [@mikedanese](https://github.com/mikedanese)) -* Expose `/debug/flags/v` to allow dynamically set glog logging level, if want to change glog level to 3, you only have to send a PUT request with like `curl -X PUT http://127.0.0.1:8080/debug/flags/v -d "3"`. ([#63777](https://github.com/kubernetes/kubernetes/pull/63777), [@hzxuzhonghu](https://github.com/hzxuzhonghu)) -* New conformance test added for Watch. ([#61424](https://github.com/kubernetes/kubernetes/pull/61424), [@jennybuckley](https://github.com/jennybuckley)) -* 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. ([#63445](https://github.com/kubernetes/kubernetes/pull/63445), [@ericchiang](https://github.com/ericchiang)) -* kubeadm now preserves previous manifests after upgrades ([#64337](https://github.com/kubernetes/kubernetes/pull/64337), [@liztio](https://github.com/liztio)) -* Implement kubelet side online file system resizing ([#62460](https://github.com/kubernetes/kubernetes/pull/62460), [@mlmhl](https://github.com/mlmhl)) - - - -# v1.11.0-beta.1 - -[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.11/examples) - -## Downloads for v1.11.0-beta.1 - - -filename | sha256 hash --------- | ----------- -[kubernetes.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes.tar.gz) | `3209303a10ca8dd311c500ee858b9151b43c1bb5c2b3a9fb9281722e021d6871` -[kubernetes-src.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-src.tar.gz) | `c2e4d3b1beb4cd0b2a775394a30da2c2949d380e57f729dc48c541069c103326` - -### Client Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-client-darwin-386.tar.gz) | `cbded4d58b3d2cbeb2e43c48c9dd359834c9c9aa376751a7f8960be45601fb40` -[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-client-darwin-amd64.tar.gz) | `ceccd21fda90b96865801053f1784d4062d69b11e2e911483223860dfe6c3a17` -[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-client-linux-386.tar.gz) | `75c9794a7f43f891aa839b2571fa44ffced25197578adc31b4c3cb28d7fbf158` -[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-client-linux-amd64.tar.gz) | `184905f6b8b856306483d811d015cf0b28c0703ceb372594622732da2a07989f` -[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-client-linux-arm.tar.gz) | `2d985829499588d32483d7c6a36b3b0f2b6d4031eda31c65b066b77bc51bae66` -[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-client-linux-arm64.tar.gz) | `268556ede751058162a42d0156f27e42e37b23d60b2485e350cffe6e1b376fa4` -[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-client-linux-ppc64le.tar.gz) | `8859bd7a37bf5a659eb17e47d2c54d228950b2ef48243c93f11799c455789983` -[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-client-linux-s390x.tar.gz) | `90bbe2fc45ae722a05270820336b9178baaab198401bb6888e817afe6a1a304e` -[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-client-windows-386.tar.gz) | `948b01f555abfc30990345004d5ce679d4b9d0a32d699a50b6d8309040b2b2f2` -[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-client-windows-amd64.tar.gz) | `091e9d4e7fa611cf06d2907d159e0cc36ae8602403ad0819d62df4ddbaba6095` - -### Server Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-server-linux-amd64.tar.gz) | `727a5e8241035d631d90f3d119a27384abe93cde14c242c4d2d1cf948f84a650` -[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-server-linux-arm.tar.gz) | `6eb7479348e9480d9d1ee31dc991297b93e076dd21b567c595f82d45b66ef949` -[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-server-linux-arm64.tar.gz) | `9eab5ccdfba2803a743ed12b4323ad0e8e0215779edf5752224103b6667a35c1` -[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-server-linux-ppc64le.tar.gz) | `d86b07ee28ed3d2c0668a2737fff4b3d025d4cd7b6f1aadc85f8f13b4c12e578` -[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-server-linux-s390x.tar.gz) | `c2d19acb88684a52a74f469ab26874ab224023f29290865e08c86338d30dd598` - -### Node Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-node-linux-amd64.tar.gz) | `2957bf3e9dc9cd9570597434909e5ef03e996f8443c02f9d95fa6de2cd17126f` -[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-node-linux-arm.tar.gz) | `5995b8b9628fca9eaa92c283cfb4199ab353efa8953b980eec994f49ac3a0ebd` -[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-node-linux-arm64.tar.gz) | `996691b3b894ec9769be1ee45c5053ff1560e3ef161de8f8b9ac067c0d3559d3` -[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-node-linux-ppc64le.tar.gz) | `8bb7fe72ec704afa5ad96356787972144b0f7923fc68678894424f1f62da7041` -[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-node-linux-s390x.tar.gz) | `4c1f0314ad60537c8a7866b0cabdece21284ee91ae692d1999b3d5273ee7cbaf` -[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.11.0-beta.1/kubernetes-node-windows-amd64.tar.gz) | `158832f41cd452f93482cc8a8f1dd69cc243eb63ce3581e7f2eab2de323f6202` - -## Changelog since v1.11.0-alpha.2 - -### Action Required - -* [action required] `.NodeName` and `.CRISocket` in the `MasterConfiguration` and `NodeConfiguration` v1alpha1 API objects are now `.NodeRegistration.Name` and `.NodeRegistration.CRISocket` respectively in the v1alpha2 API. The `.NoTaintMaster` field has been removed in the v1alpha2 API. ([#64210](https://github.com/kubernetes/kubernetes/pull/64210), [@luxas](https://github.com/luxas)) -* (ACTION REQUIRED) PersisntVolumeLabel admission controller is now disabled by default. If you depend on this feature (AWS/GCE) then ensure it is added to the `--enable-admission-plugins` flag on the kube-apiserver. ([#64326](https://github.com/kubernetes/kubernetes/pull/64326), [@andrewsykim](https://github.com/andrewsykim)) -* [action required] kubeadm: The `:Etcd` struct has been refactored in the v1alpha2 API. All the options now reside under either `.Etcd.Local` or `.Etcd.External`. Automatic conversions from the v1alpha1 API are supported. ([#64066](https://github.com/kubernetes/kubernetes/pull/64066), [@luxas](https://github.com/luxas)) -* [action required] kubeadm: kubelets in kubeadm clusters now disable the readonly port (10255). If you're relying on unauthenticated access to the readonly port, please switch to using the secure port (10250). Instead, you can now use ServiceAccount tokens when talking to the secure port, which will make it easier to get access to e.g. the `/metrics` endpoint of the kubelet securely. ([#64187](https://github.com/kubernetes/kubernetes/pull/64187), [@luxas](https://github.com/luxas)) -* [action required] kubeadm: Support for `.AuthorizationModes` in the kubeadm v1alpha2 API has been removed. Instead, you can use the `.APIServerExtraArgs` and `.APIServerExtraVolumes` fields to achieve the same effect. Files using the v1alpha1 API and setting this field will be automatically upgraded to this v1alpha2 API and the information will be preserved. ([#64068](https://github.com/kubernetes/kubernetes/pull/64068), [@luxas](https://github.com/luxas)) -* [action required] The formerly publicly-available cAdvisor web UI that the kubelet ran on port 4194 by default is now turned off by default. The flag configuring what port to run this UI on `--cadvisor-port` was deprecated in v1.10. Now the default is `--cadvisor-port=0`, in other words, to not run the web server. The recommended way to run cAdvisor if you still need it, is via a DaemonSet. The `--cadvisor-port` will be removed in v1.12 ([#63881](https://github.com/kubernetes/kubernetes/pull/63881), [@luxas](https://github.com/luxas)) -* [action required] kubeadm: The `.ImagePullPolicy` field has been removed in the v1alpha2 API version. Instead it's set statically to `IfNotPresent` for all required images. If you want to always pull the latest images before cluster init (like what `Always` would do), run `kubeadm config images pull` before each `kubeadm init`. If you don't want the kubelet to pull any images at `kubeadm init` time, as you for instance don't have an internet connection, you can also run `kubeadm config images pull` before `kubeadm init` or side-load the images some other way (e.g. `docker load -i image.tar`). Having the images locally cached will result in no pull at runtime, which makes it possible to run without any internet connection. ([#64096](https://github.com/kubernetes/kubernetes/pull/64096), [@luxas](https://github.com/luxas)) -* [action required] In the new v1alpha2 kubeadm Configuration API, the `.CloudProvider` and `.PrivilegedPods` fields don't exist anymore. ([#63866](https://github.com/kubernetes/kubernetes/pull/63866), [@luxas](https://github.com/luxas)) - * Instead, you should use the out-of-tree cloud provider implementations which are beta in v1.11. - * If you have to use the legacy in-tree cloud providers, you can rearrange your config like the example below. In case you need the `cloud-config` file (located in `{cloud-config-path}`), you can mount it into the API Server and controller-manager containers using ExtraVolumes like the example below. - * If you need to use the `.PrivilegedPods` functionality, you can still edit the manifests in - * `/etc/kubernetes/manifests/`, and set `.SecurityContext.Privileged=true` for the apiserver - * and controller manager. - * --- - * kind: MasterConfiguration - * apiVersion: kubeadm.k8s.io/v1alpha2 - * apiServerExtraArgs: - * cloud-provider: "{cloud}" - * cloud-config: "{cloud-config-path}" - * apiServerExtraVolumes: - * - name: cloud - * hostPath: "{cloud-config-path}" - * mountPath: "{cloud-config-path}" - * controllerManagerExtraArgs: - * cloud-provider: "{cloud}" - * cloud-config: "{cloud-config-path}" - * controllerManagerExtraVolumes: - * - name: cloud - * hostPath: "{cloud-config-path}" - * mountPath: "{cloud-config-path}" - * --- -* [action required] kubeadm now uses an upgraded API version for the configuration file, `kubeadm.k8s.io/v1alpha2`. kubeadm in v1.11 will still be able to read `v1alpha1` configuration, and will automatically convert the configuration to `v1alpha2` internally and when storing the configuration in the ConfigMap in the cluster. ([#63788](https://github.com/kubernetes/kubernetes/pull/63788), [@luxas](https://github.com/luxas)) -* The annotation `service.alpha.kubernetes.io/tolerate-unready-endpoints` is deprecated. Users should use Service.spec.publishNotReadyAddresses instead. ([#63742](https://github.com/kubernetes/kubernetes/pull/63742), [@thockin](https://github.com/thockin)) -* avoid duplicate status in audit events ([#62695](https://github.com/kubernetes/kubernetes/pull/62695), [@CaoShuFeng](https://github.com/CaoShuFeng)) - -### Other notable changes - -* Remove rescheduler from master. ([#64364](https://github.com/kubernetes/kubernetes/pull/64364), [@ravisantoshgudimetla](https://github.com/ravisantoshgudimetla)) -* Declare IPVS-based kube-proxy GA ([#58442](https://github.com/kubernetes/kubernetes/pull/58442), [@m1093782566](https://github.com/m1093782566)) -* kubeadm: conditionally set the kubelet cgroup driver for Docker ([#64347](https://github.com/kubernetes/kubernetes/pull/64347), [@neolit123](https://github.com/neolit123)) -* kubectl built for darwin from darwin now enables cgo to use the system-native C libraries for DNS resolution. Cross-compiled kubectl (e.g. from an official kubernetes release) still uses the go-native netgo DNS implementation. ([#64219](https://github.com/kubernetes/kubernetes/pull/64219), [@ixdy](https://github.com/ixdy)) -* AWS EBS volumes can be now used as ReadOnly in pods. ([#64403](https://github.com/kubernetes/kubernetes/pull/64403), [@jsafrane](https://github.com/jsafrane)) -* Exec authenticator plugin supports TLS client certificates. ([#61803](https://github.com/kubernetes/kubernetes/pull/61803), [@awly](https://github.com/awly)) -* Use Patch instead of Put to sync pod status ([#62306](https://github.com/kubernetes/kubernetes/pull/62306), [@freehan](https://github.com/freehan)) -* kubectl apply --prune supports CronJob resource. ([#62991](https://github.com/kubernetes/kubernetes/pull/62991), [@tomoe](https://github.com/tomoe)) -* Label ExternalEtcdClientCertificates can be used for ignoring all preflight check issues related to client certificate files for external etcd. ([#64269](https://github.com/kubernetes/kubernetes/pull/64269), [@kad](https://github.com/kad)) -* Provide a meaningful error message in openstack cloud provider when no valid IP address can be found for a node ([#64318](https://github.com/kubernetes/kubernetes/pull/64318), [@gonzolino](https://github.com/gonzolino)) -* kubeadm: Add a 'kubeadm config migrate' command to convert old API types to their newer counterparts in the new, supported API types. This is just a client-side tool, it just executes locally without requiring a cluster to be running. You can think about this as an Unix pipe that upgrades config files. ([#64232](https://github.com/kubernetes/kubernetes/pull/64232), [@luxas](https://github.com/luxas)) -* The --dry-run flag has been enabled for kubectl auth reconcile ([#64458](https://github.com/kubernetes/kubernetes/pull/64458), [@mrogers950](https://github.com/mrogers950)) -* Add probe based mechanism for kubelet plugin discovery ([#63328](https://github.com/kubernetes/kubernetes/pull/63328), [@vikaschoudhary16](https://github.com/vikaschoudhary16)) -* Add Establishing Controller on CRDs to avoid race between Established condition and CRs actually served. In HA setups, the Established condition is delayed by 5 seconds. ([#63068](https://github.com/kubernetes/kubernetes/pull/63068), [@xmudrii](https://github.com/xmudrii)) -* CoreDNS is now v1.1.3 ([#64258](https://github.com/kubernetes/kubernetes/pull/64258), [@rajansandeep](https://github.com/rajansandeep)) -* kubeadm will pull required images during preflight checks if it cannot find them on the system ([#64105](https://github.com/kubernetes/kubernetes/pull/64105), [@chuckha](https://github.com/chuckha)) -* kubeadm: rename the addon parameter `kube-dns` to `coredns` for `kubeadm alpha phases addons` as CoreDNS is now the default DNS server in 1.11. ([#64274](https://github.com/kubernetes/kubernetes/pull/64274), [@neolit123](https://github.com/neolit123)) -* kubeadm: when starting the API server use the arguments --enable-admission-plugins and --disable-admission-plugins instead of the deprecated --admission-control. ([#64165](https://github.com/kubernetes/kubernetes/pull/64165), [@neolit123](https://github.com/neolit123)) -* Add spec.additionalPrinterColumns to CRDs to define server side printing columns. ([#60991](https://github.com/kubernetes/kubernetes/pull/60991), [@sttts](https://github.com/sttts)) -* fix azure file size grow issue ([#64383](https://github.com/kubernetes/kubernetes/pull/64383), [@andyzhangx](https://github.com/andyzhangx)) -* Fix issue of colliding nodePorts when the cluster has services with externalTrafficPolicy=Local ([#64349](https://github.com/kubernetes/kubernetes/pull/64349), [@nicksardo](https://github.com/nicksardo)) -* fixes a panic applying json patches containing out of bounds operations ([#64355](https://github.com/kubernetes/kubernetes/pull/64355), [@liggitt](https://github.com/liggitt)) -* Fail fast if cgroups-per-qos is set on Windows ([#62984](https://github.com/kubernetes/kubernetes/pull/62984), [@feiskyer](https://github.com/feiskyer)) -* Move Volume expansion to Beta ([#64288](https://github.com/kubernetes/kubernetes/pull/64288), [@gnufied](https://github.com/gnufied)) -* kubectl delete does not use reapers for removing objects anymore, but relies on server-side GC entirely ([#63979](https://github.com/kubernetes/kubernetes/pull/63979), [@soltysh](https://github.com/soltysh)) -* Basic plumbing for volume topology aware dynamic provisioning ([#63232](https://github.com/kubernetes/kubernetes/pull/63232), [@lichuqiang](https://github.com/lichuqiang)) -* API server properly parses propagationPolicy as a query parameter sent with a delete request ([#63414](https://github.com/kubernetes/kubernetes/pull/63414), [@roycaihw](https://github.com/roycaihw)) -* Property `serverAddressByClientCIDRs` in `metav1.APIGroup` (discovery API) now become optional instead of required ([#61963](https://github.com/kubernetes/kubernetes/pull/61963), [@roycaihw](https://github.com/roycaihw)) -* The dynamic Kubelet config feature is now beta, and the DynamicKubeletConfig feature gate is on by default. In order to use dynamic Kubelet config, ensure that the Kubelet's --dynamic-config-dir option is set. ([#64275](https://github.com/kubernetes/kubernetes/pull/64275), [@mtaufen](https://github.com/mtaufen)) -* Add reason message logs for non-exist Azure resources ([#64248](https://github.com/kubernetes/kubernetes/pull/64248), [@feiskyer](https://github.com/feiskyer)) -* Fix SessionAffinity not updated issue for Azure load balancer ([#64180](https://github.com/kubernetes/kubernetes/pull/64180), [@feiskyer](https://github.com/feiskyer)) -* The kube-apiserver openapi doc now includes extensions identifying APIService and CustomResourceDefinition kinds ([#64174](https://github.com/kubernetes/kubernetes/pull/64174), [@liggitt](https://github.com/liggitt)) -* apiservices/status and certificatesigningrequests/status now support GET and PATCH ([#64063](https://github.com/kubernetes/kubernetes/pull/64063), [@roycaihw](https://github.com/roycaihw)) -* kubectl: This client version requires the `apps/v1` APIs, so it will not work against a cluster version older than v1.9.0. Note that kubectl only guarantees compatibility with clusters that are +/-1 minor version away. ([#61419](https://github.com/kubernetes/kubernetes/pull/61419), [@enisoc](https://github.com/enisoc)) -* Correct the way we reset containers and pods in kubeadm via crictl ([#63862](https://github.com/kubernetes/kubernetes/pull/63862), [@runcom](https://github.com/runcom)) -* Allow env from resource with keys & updated tests ([#60636](https://github.com/kubernetes/kubernetes/pull/60636), [@PhilipGough](https://github.com/PhilipGough)) -* The kubelet certificate rotation feature can now be enabled via the `.RotateCertificates` field in the kubelet's config file. The `--rotate-certificates` flag is now deprecated, and will be removed in a future release. ([#63912](https://github.com/kubernetes/kubernetes/pull/63912), [@luxas](https://github.com/luxas)) -* Use DeleteOptions.PropagationPolicy instead of OrphanDependents in kubectl ([#59851](https://github.com/kubernetes/kubernetes/pull/59851), [@nilebox](https://github.com/nilebox)) -* add block device support for azure disk ([#63841](https://github.com/kubernetes/kubernetes/pull/63841), [@andyzhangx](https://github.com/andyzhangx)) -* Fix incorrectly propagated ResourceVersion in ListRequests returning 0 items. ([#64150](https://github.com/kubernetes/kubernetes/pull/64150), [@wojtek-t](https://github.com/wojtek-t)) -* Changes ext3/ext4 volume creation to not reserve any portion of the volume for the root user. ([#64102](https://github.com/kubernetes/kubernetes/pull/64102), [@atombender](https://github.com/atombender)) -* Add CRD Versioning with NOP converter ([#63830](https://github.com/kubernetes/kubernetes/pull/63830), [@mbohlool](https://github.com/mbohlool)) -* adds a kubectl wait command ([#64034](https://github.com/kubernetes/kubernetes/pull/64034), [@deads2k](https://github.com/deads2k)) -* "kubeadm init" now writes a structured and versioned kubelet ComponentConfiguration file to `/var/lib/kubelet/config.yaml` and an environment file with runtime flags (you can source this file in the systemd kubelet dropin) to `/var/lib/kubelet/kubeadm-flags.env`. ([#63887](https://github.com/kubernetes/kubernetes/pull/63887), [@luxas](https://github.com/luxas)) -* `kubectl auth reconcile` only works with rbac.v1 ([#63967](https://github.com/kubernetes/kubernetes/pull/63967), [@deads2k](https://github.com/deads2k)) -* The dynamic Kubelet config feature will now update config in the event of a ConfigMap mutation, which reduces the chance for silent config skew. Only name, namespace, and kubeletConfigKey may now be set in Node.Spec.ConfigSource.ConfigMap. The least disruptive pattern for config management is still to create a new ConfigMap and incrementally roll out a new Node.Spec.ConfigSource. ([#63221](https://github.com/kubernetes/kubernetes/pull/63221), [@mtaufen](https://github.com/mtaufen)) -* Graduate CRI container log rotation to beta, and enable it by default. ([#64046](https://github.com/kubernetes/kubernetes/pull/64046), [@yujuhong](https://github.com/yujuhong)) -* APIServices with kube-like versions (e.g. v1, v2beta1, etc.) will be sorted appropriately within each group. ([#64004](https://github.com/kubernetes/kubernetes/pull/64004), [@mbohlool](https://github.com/mbohlool)) -* kubectl and client-go now detects duplicated name for user, cluster and context when loading kubeconfig and reports error ([#60464](https://github.com/kubernetes/kubernetes/pull/60464), [@roycaihw](https://github.com/roycaihw)) -* event object references with apiversion will now report an apiversion. ([#63913](https://github.com/kubernetes/kubernetes/pull/63913), [@deads2k](https://github.com/deads2k)) -* Subresources for custom resources is now beta and enabled by default. With this, updates to the `/status` subresource will disallow updates to all fields other than `.status` (not just `.spec` and `.metadata` as before). Also, `required` can be used at the root of the CRD OpenAPI validation schema when the `/status` subresource is enabled. ([#63598](https://github.com/kubernetes/kubernetes/pull/63598), [@nikhita](https://github.com/nikhita)) -* increase grpc client default response size ([#63977](https://github.com/kubernetes/kubernetes/pull/63977), [@runcom](https://github.com/runcom)) -* HTTP transport now uses `context.Context` to cancel dial operations. k8s.io/client-go/transport/Config struct has been updated to accept a function with a `context.Context` parameter. This is a breaking change if you use this field in your code. ([#60012](https://github.com/kubernetes/kubernetes/pull/60012), [@ash2k](https://github.com/ash2k)) -* Adds a mechanism in vSphere Cloud Provider to get credentials from Kubernetes secrets ([#63902](https://github.com/kubernetes/kubernetes/pull/63902), [@abrarshivani](https://github.com/abrarshivani)) -* kubeadm: A `kubeadm config print-default` command has now been added that you can use as a starting point when writing your own kubeadm configuration files ([#63969](https://github.com/kubernetes/kubernetes/pull/63969), [@luxas](https://github.com/luxas)) -* Update event-exporter to version v0.2.0 that supports old (gke_container/gce_instance) and new (k8s_container/k8s_node/k8s_pod) stackdriver resources. ([#63918](https://github.com/kubernetes/kubernetes/pull/63918), [@cezarygerard](https://github.com/cezarygerard)) -* Cluster Autoscaler 1.2.2 (release notes: https://github.com/kubernetes/autoscaler/releases/tag/cluster-autoscaler-1.2.2) ([#63974](https://github.com/kubernetes/kubernetes/pull/63974), [@aleksandra-malinowska](https://github.com/aleksandra-malinowska)) -* Update kubeadm's minimum supported kubernetes in v1.11.x to 1.10 ([#63920](https://github.com/kubernetes/kubernetes/pull/63920), [@dixudx](https://github.com/dixudx)) -* Add 'UpdateStrategyType' and 'RollingUpdateStrategy' to 'kubectl describe sts' command output. ([#63844](https://github.com/kubernetes/kubernetes/pull/63844), [@tossmilestone](https://github.com/tossmilestone)) -* Remove UID mutation from request.context. ([#63957](https://github.com/kubernetes/kubernetes/pull/63957), [@hzxuzhonghu](https://github.com/hzxuzhonghu)) -* kubeadm has removed `.Etcd.SelfHosting` from its configuration API. It was never used in practice. ([#63871](https://github.com/kubernetes/kubernetes/pull/63871), [@luxas](https://github.com/luxas)) -* list/watch API requests with a fieldSelector that specifies `metadata.name` can now be authorized as requests for an individual named resource ([#63469](https://github.com/kubernetes/kubernetes/pull/63469), [@wojtek-t](https://github.com/wojtek-t)) -* Add a way to pass extra arguments to etcd. ([#63961](https://github.com/kubernetes/kubernetes/pull/63961), [@mborsz](https://github.com/mborsz)) -* minor fix for VolumeZoneChecker predicate, storageclass can be in annotation and spec. ([#63749](https://github.com/kubernetes/kubernetes/pull/63749), [@wenlxie](https://github.com/wenlxie)) -* vSphere Cloud Provider: add SAML token authentication support ([#63824](https://github.com/kubernetes/kubernetes/pull/63824), [@dougm](https://github.com/dougm)) -* adds the `kubeadm upgrade diff` command to show how static pod manifests will be changed by an upgrade. ([#63930](https://github.com/kubernetes/kubernetes/pull/63930), [@liztio](https://github.com/liztio)) -* Fix memory cgroup notifications, and reduce associated log spam. ([#63220](https://github.com/kubernetes/kubernetes/pull/63220), [@dashpole](https://github.com/dashpole)) -* Adds a `kubeadm config images pull` command to pull container images used by kubeadm. ([#63833](https://github.com/kubernetes/kubernetes/pull/63833), [@chuckha](https://github.com/chuckha)) -* Restores the pre-1.10 behavior of the openstack cloud provider which uses the instance name as the Kubernetes Node name. This requires instances be named with RFC-1123 compatible names. ([#63903](https://github.com/kubernetes/kubernetes/pull/63903), [@liggitt](https://github.com/liggitt)) -* Added support for NFS relations on kubernetes-worker charm. ([#63817](https://github.com/kubernetes/kubernetes/pull/63817), [@hyperbolic2346](https://github.com/hyperbolic2346)) -* Stop using InfluxDB as default cluster monitoring ([#62328](https://github.com/kubernetes/kubernetes/pull/62328), [@serathius](https://github.com/serathius)) - * InfluxDB cluster monitoring is deprecated and will be removed in v1.12 -* GCE: Fix to make the built-in `kubernetes` service properly point to the master's load balancer address in clusters that use multiple master VMs. ([#63696](https://github.com/kubernetes/kubernetes/pull/63696), [@grosskur](https://github.com/grosskur)) -* Kubernetes cluster on GCE have crictl installed now. Users can use it to help debug their node. The documentation of crictl can be found https://github.com/kubernetes-incubator/cri-tools/blob/master/docs/crictl.md. ([#63357](https://github.com/kubernetes/kubernetes/pull/63357), [@Random-Liu](https://github.com/Random-Liu)) -* The NodeRestriction admission plugin now prevents kubelets from modifying/removing taints applied to their Node API object. ([#63167](https://github.com/kubernetes/kubernetes/pull/63167), [@liggitt](https://github.com/liggitt)) -* The status of dynamic Kubelet config is now reported via Node.Status.Config, rather than the KubeletConfigOk node condition. ([#63314](https://github.com/kubernetes/kubernetes/pull/63314), [@mtaufen](https://github.com/mtaufen)) -* kubeadm now checks that IPv4/IPv6 forwarding is enabled ([#63872](https://github.com/kubernetes/kubernetes/pull/63872), [@kad](https://github.com/kad)) -* kubeadm will now deploy CoreDNS by default instead of KubeDNS ([#63509](https://github.com/kubernetes/kubernetes/pull/63509), [@detiber](https://github.com/detiber)) -* This PR will leverage subtests on the existing table tests for the scheduler units. ([#63658](https://github.com/kubernetes/kubernetes/pull/63658), [@xchapter7x](https://github.com/xchapter7x)) - * Some refactoring of error/status messages and functions to align with new approach. -* kubeadm upgrade now supports external etcd setups again ([#63495](https://github.com/kubernetes/kubernetes/pull/63495), [@detiber](https://github.com/detiber)) -* fix mount unmount failure for a Windows pod ([#63272](https://github.com/kubernetes/kubernetes/pull/63272), [@andyzhangx](https://github.com/andyzhangx)) -* CRI: update documents for container logpath. The container log path has been changed from containername_attempt#.log to containername/attempt#.log ([#62015](https://github.com/kubernetes/kubernetes/pull/62015), [@feiskyer](https://github.com/feiskyer)) -* Create a new `dryRun` query parameter for mutating endpoints. If the parameter is set, then the query will be rejected, as the feature is not implemented yet. This will allow forward compatibility with future clients; otherwise, future clients talking with older apiservers might end up modifying a resource even if they include the `dryRun` query parameter. ([#63557](https://github.com/kubernetes/kubernetes/pull/63557), [@apelisse](https://github.com/apelisse)) -* kubelet: fix hangs in updating Node status after network interruptions/changes between the kubelet and API server ([#63492](https://github.com/kubernetes/kubernetes/pull/63492), [@liggitt](https://github.com/liggitt)) -* The `PriorityClass` API is promoted to `scheduling.k8s.io/v1beta1` ([#63100](https://github.com/kubernetes/kubernetes/pull/63100), [@ravisantoshgudimetla](https://github.com/ravisantoshgudimetla)) -* Services can listen on same host ports on different interfaces with --nodeport-addresses specified ([#62003](https://github.com/kubernetes/kubernetes/pull/62003), [@m1093782566](https://github.com/m1093782566)) -* kubeadm will no longer generate an unused etcd CA and certificates when configured to use an external etcd cluster. ([#63806](https://github.com/kubernetes/kubernetes/pull/63806), [@detiber](https://github.com/detiber)) -* corrects a race condition in bootstrapping aggregated cluster roles in new HA clusters ([#63761](https://github.com/kubernetes/kubernetes/pull/63761), [@liggitt](https://github.com/liggitt)) -* Adding initial Korean translation for kubectl ([#62040](https://github.com/kubernetes/kubernetes/pull/62040), [@ianychoi](https://github.com/ianychoi)) -* Report node DNS info with --node-ip flag ([#63170](https://github.com/kubernetes/kubernetes/pull/63170), [@micahhausler](https://github.com/micahhausler)) -* The old dynamic client has been replaced by a new one. The previous dynamic client will exist for one release in `client-go/deprecated-dynamic`. Switch as soon as possible. ([#63446](https://github.com/kubernetes/kubernetes/pull/63446), [@deads2k](https://github.com/deads2k)) -* CustomResourceDefinitions Status subresource now supports GET and PATCH ([#63619](https://github.com/kubernetes/kubernetes/pull/63619), [@roycaihw](https://github.com/roycaihw)) -* Re-enable nodeipam controller for external clouds. ([#63049](https://github.com/kubernetes/kubernetes/pull/63049), [@andrewsykim](https://github.com/andrewsykim)) -* Removes a preflight check for kubeadm that validated custom kube-apiserver, kube-controller-manager and kube-scheduler arguments. ([#63673](https://github.com/kubernetes/kubernetes/pull/63673), [@chuckha](https://github.com/chuckha)) -* Adds a list-images subcommand to kubeadm that lists required images for a kubeadm install. ([#63450](https://github.com/kubernetes/kubernetes/pull/63450), [@chuckha](https://github.com/chuckha)) -* Apply pod name and namespace labels to pod cgroup in cAdvisor metrics ([#63406](https://github.com/kubernetes/kubernetes/pull/63406), [@derekwaynecarr](https://github.com/derekwaynecarr)) -* try to read openstack auth config from client config and fall back to read from the environment variables if not available ([#60200](https://github.com/kubernetes/kubernetes/pull/60200), [@dixudx](https://github.com/dixudx)) -* GC is now bound by QPS (it wasn't before) and so if you need more QPS to avoid ratelimiting GC, you'll have to set it. ([#63657](https://github.com/kubernetes/kubernetes/pull/63657), [@shyamjvs](https://github.com/shyamjvs)) -* The Kubelet's deprecated --allow-privileged flag now defaults to true. This enables users to stop setting --allow-privileged in order to transition to PodSecurityPolicy. Previously, users had to continue setting --allow-privileged, because the default was false. ([#63442](https://github.com/kubernetes/kubernetes/pull/63442), [@mtaufen](https://github.com/mtaufen)) -* You must now specify Node.Spec.ConfigSource.ConfigMap.KubeletConfigKey when using dynamic Kubelet config to tell the Kubelet which key of the ConfigMap identifies its config file. ([#59847](https://github.com/kubernetes/kubernetes/pull/59847), [@mtaufen](https://github.com/mtaufen)) -* Kubernetes version command line parameter in kubeadm has been updated to drop an unnecessary redirection from ci/latest.txt to ci-cross/latest.txt. Users should know exactly where the builds are stored on Google Cloud storage buckets from now on. For example for 1.9 and 1.10, users can specify ci/latest-1.9 and ci/latest-1.10 as the CI build jobs what build images correctly updates those. The CI jobs for master update the ci-cross/latest location, so if you are looking for latest master builds, then the correct parameter to use would be ci-cross/latest. ([#63504](https://github.com/kubernetes/kubernetes/pull/63504), [@dims](https://github.com/dims)) -* Search standard KubeConfig file locations when using `kubeadm token` without `--kubeconfig`. ([#62850](https://github.com/kubernetes/kubernetes/pull/62850), [@neolit123](https://github.com/neolit123)) -* Include the list of security groups when failing with the errors that more then one is tagged ([#58874](https://github.com/kubernetes/kubernetes/pull/58874), [@sorenmat](https://github.com/sorenmat)) -* Allow "required" to be used at the CRD OpenAPI validation schema when the /status subresource is enabled. ([#63533](https://github.com/kubernetes/kubernetes/pull/63533), [@sttts](https://github.com/sttts)) -* When updating /status subresource of a custom resource, only the value at the `.status` subpath for the update is considered. ([#63385](https://github.com/kubernetes/kubernetes/pull/63385), [@CaoShuFeng](https://github.com/CaoShuFeng)) -* Supported nodeSelector.matchFields (node's `metadata.node`) in scheduler. ([#62453](https://github.com/kubernetes/kubernetes/pull/62453), [@k82cn](https://github.com/k82cn)) -* Do not check vmSetName when getting Azure node's IP ([#63541](https://github.com/kubernetes/kubernetes/pull/63541), [@feiskyer](https://github.com/feiskyer)) -* Fix stackdriver metrics for node memory using wrong metric type ([#63535](https://github.com/kubernetes/kubernetes/pull/63535), [@serathius](https://github.com/serathius)) -* [fluentd-gcp addon] Use the logging agent's node name as the metadata agent URL. ([#63353](https://github.com/kubernetes/kubernetes/pull/63353), [@bmoyles0117](https://github.com/bmoyles0117)) -* `kubectl cp` supports completion. ([#60371](https://github.com/kubernetes/kubernetes/pull/60371), [@superbrothers](https://github.com/superbrothers)) -* Azure VMSS: support VM names to contain the `_` character ([#63526](https://github.com/kubernetes/kubernetes/pull/63526), [@djsly](https://github.com/djsly)) -* OpenStack built-in cloud provider is now deprecated. Please use the external cloud provider for OpenStack. ([#63524](https://github.com/kubernetes/kubernetes/pull/63524), [@dims](https://github.com/dims)) -* the shortcuts which were moved server-side in at least 1.9 have been removed from being hardcoded in kubectl ([#63507](https://github.com/kubernetes/kubernetes/pull/63507), [@deads2k](https://github.com/deads2k)) -* Fixes fake client generation for non-namespaced subresources ([#60445](https://github.com/kubernetes/kubernetes/pull/60445), [@jhorwit2](https://github.com/jhorwit2)) -* `kubectl delete` with selection criteria defaults to ignoring not found errors ([#63490](https://github.com/kubernetes/kubernetes/pull/63490), [@deads2k](https://github.com/deads2k)) -* Increase scheduler cache generation number monotonically in order to avoid collision and use of stale information in scheduler. ([#63264](https://github.com/kubernetes/kubernetes/pull/63264), [@bsalamat](https://github.com/bsalamat)) -* Fixes issue where subpath readOnly mounts failed ([#63045](https://github.com/kubernetes/kubernetes/pull/63045), [@msau42](https://github.com/msau42)) -* Update to use go1.10.2 ([#63412](https://github.com/kubernetes/kubernetes/pull/63412), [@praseodym](https://github.com/praseodym)) -* `kubectl create [secret | configmap] --from-file` now works on Windows with fully-qualified paths ([#63439](https://github.com/kubernetes/kubernetes/pull/63439), [@liggitt](https://github.com/liggitt)) -* kube-apiserver: the default `--endpoint-reconciler-type` is now `lease`. The `master-count` endpoint reconciler type is deprecated and will be removed in 1.13. ([#63383](https://github.com/kubernetes/kubernetes/pull/63383), [@liggitt](https://github.com/liggitt)) -* owner references can be set during creation without deletion power ([#63403](https://github.com/kubernetes/kubernetes/pull/63403), [@deads2k](https://github.com/deads2k)) -* Lays groundwork for OIDC distributed claims handling in the apiserver authentication token checker. ([#63213](https://github.com/kubernetes/kubernetes/pull/63213), [@filmil](https://github.com/filmil)) - * A distributed claim allows the OIDC provider to delegate a claim to a - * separate URL. Distributed claims are of the form as seen below, and are - * defined in the OIDC Connect Core 1.0, section 5.6.2. - * For details, see: - * http://openid.net/specs/openid-connect-core-1_0.html#AggregatedDistributedClaims -* Use /usr/bin/env in all script shebangs to increase portability. ([#62657](https://github.com/kubernetes/kubernetes/pull/62657), [@matthyx](https://github.com/matthyx)) - - - -# v1.11.0-alpha.2 - -[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/master/examples) - -## Downloads for v1.11.0-alpha.2 - - -filename | sha256 hash --------- | ----------- -[kubernetes.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes.tar.gz) | `8f352d4f44b0c539cfb4fb72a64098c155771916cff31642b131f1eb7879da20` -[kubernetes-src.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-src.tar.gz) | `d2de8df039fd3bd997c992abedb0353e37691053bd927627c6438ad654055f80` - -### Client Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-client-darwin-386.tar.gz) | `ca70a374de0c3be4897d913f6ad22e426c6336837be6debff3cbf5f3fcf4b3ae` -[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-client-darwin-amd64.tar.gz) | `d6e0e6f286ef20a54047038b337b8a47f6cbd105b69917137c5c30c8fbee006f` -[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-client-linux-386.tar.gz) | `6e73e49fa99391e1474d63a102f3cf758ef84b781bc0c0de42f1e5d1cc89132b` -[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-client-linux-amd64.tar.gz) | `1c0c7a7aefabcda0d0407dfadd2ee7e379b395ae4ad1671535d99305e72eb2ae` -[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-client-linux-arm.tar.gz) | `e6310653c31114efe32db29aa06c2c1530c285cda4cccc30edf4926d0417a3a6` -[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-client-linux-arm64.tar.gz) | `188312f25a53cf30f8375ab5727e64067ede4fba53823c3a4e2e4b768938244e` -[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-client-linux-ppc64le.tar.gz) | `875f77e17c3236dde0d6e5f302c52a5193f1bf1d79d72115ae1c6de5f494b0a3` -[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-client-linux-s390x.tar.gz) | `18502d6bd9fb483c3a858d73e2d55e32b946cbb351e09788671aca6010e39ba8` -[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-client-windows-386.tar.gz) | `f0e83868dd731365b8e3f95fe33622a59d0b67d97907089c2a1c56a8eca8ebf7` -[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-client-windows-amd64.tar.gz) | `571898fd6f612d75c9cfb248875cefbe9761155f3e8c7df48fce389606414028` - -### Server Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-server-linux-amd64.tar.gz) | `1f36c8bb40050d4371f0d8362e8fad9d60c39c5f7f9e5569ec70d0731c9dd438` -[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-server-linux-arm.tar.gz) | `f503c149c1aaef2df9fea146524c4f2cb505a1946062959d1acf8bc399333437` -[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-server-linux-arm64.tar.gz) | `660d282c18e2988744d902cb2c9f3b962b3418cbfae3644e3ea854835ca19d32` -[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-server-linux-ppc64le.tar.gz) | `0682060c38c704c710cc42a887b40e26726fad9cb23368ef44236527c2a7858f` -[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-server-linux-s390x.tar.gz) | `319337deee4e12e30da57ca484ef435f280a36792c2e2e3cd3515079b911281a` - -### Node Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-node-linux-amd64.tar.gz) | `8d111b862d4cb3490d5ee2b97acd439e10408cba0c7f04c98a9f0470a4869e20` -[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-node-linux-arm.tar.gz) | `e04a30445bdabc0b895e036497fdebd102c39a53660108e45c870ae7ebc6dced` -[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-node-linux-arm64.tar.gz) | `5fea9ce404e76e7d32c06aa2e1fbf2520531901c16a2e5f0047712d0a9422e42` -[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-node-linux-ppc64le.tar.gz) | `fc6e0568f5f72790d14260ff70fe0802490a3772ed9aef2723952d706ef0fa3d` -[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-node-linux-s390x.tar.gz) | `54f97b09c5adb4657e48fda59a9f4657386b0aa4be787c188eef1ece41bd4eb8` -[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.11.0-alpha.2/kubernetes-node-windows-amd64.tar.gz) | `72dbc9c474b15cc70e7d806cd0f78f10af1f9a7b4a11f014167f1d47277154cf` - -## Changelog since v1.11.0-alpha.1 - -### Other notable changes - -* `kubeadm upgrade plan` now accepts a version which improves the UX nicer in air-gapped environments. ([#63201](https://github.com/kubernetes/kubernetes/pull/63201), [@chuckha](https://github.com/chuckha)) -* kubectl now supports --field-selector for `delete`, `label`, and `annotate` ([#60717](https://github.com/kubernetes/kubernetes/pull/60717), [@liggitt](https://github.com/liggitt)) -* kube-apiserver: `--endpoint-reconciler-type` now defaults to `lease`. The `master-count` reconciler is deprecated and will be removed in 1.13. ([#58474](https://github.com/kubernetes/kubernetes/pull/58474), [@rphillips](https://github.com/rphillips)) -* OpenStack cloudprovider: Fix deletion of orphaned routes ([#62729](https://github.com/kubernetes/kubernetes/pull/62729), [@databus23](https://github.com/databus23)) -* Fix a bug that headless service without ports fails to have endpoint created. ([#62497](https://github.com/kubernetes/kubernetes/pull/62497), [@MrHohn](https://github.com/MrHohn)) -* Fix panic for attaching AzureDisk to vmss nodes ([#63275](https://github.com/kubernetes/kubernetes/pull/63275), [@feiskyer](https://github.com/feiskyer)) -* `kubectl api-resources` now supports filtering to resources supporting specific verbs, and can output fully qualified resource names suitable for combining with commands like `kubectl get` ([#63254](https://github.com/kubernetes/kubernetes/pull/63254), [@liggitt](https://github.com/liggitt)) -* fix cephfs fuse mount bug when user is not admin ([#61804](https://github.com/kubernetes/kubernetes/pull/61804), [@zhangxiaoyu-zidif](https://github.com/zhangxiaoyu-zidif)) -* StorageObjectInUseProtection feature is GA. ([#62870](https://github.com/kubernetes/kubernetes/pull/62870), [@pospispa](https://github.com/pospispa)) -* fixed spurious "unable to find api field" errors patching custom resources ([#63146](https://github.com/kubernetes/kubernetes/pull/63146), [@liggitt](https://github.com/liggitt)) -* KUBE_API_VERSIONS is no longer respected. It was used for testing, but runtime-config is the proper flag to set. ([#63165](https://github.com/kubernetes/kubernetes/pull/63165), [@deads2k](https://github.com/deads2k)) -* Added CheckNodePIDPressurePredicate to checks if a pod can be scheduled on ([#60007](https://github.com/kubernetes/kubernetes/pull/60007), [@k82cn](https://github.com/k82cn)) - * a node reporting pid pressure condition. -* Upgrade Azure Go SDK to stable version (v14.6.0) ([#63063](https://github.com/kubernetes/kubernetes/pull/63063), [@feiskyer](https://github.com/feiskyer)) -* kubeadm: prompt the user for confirmation when resetting a master node ([#59115](https://github.com/kubernetes/kubernetes/pull/59115), [@alexbrand](https://github.com/alexbrand)) -* add warnings on using pod-infra-container-image for remote container runtime ([#62982](https://github.com/kubernetes/kubernetes/pull/62982), [@dixudx](https://github.com/dixudx)) -* Deprecate kubectl rolling-update ([#61285](https://github.com/kubernetes/kubernetes/pull/61285), [@soltysh](https://github.com/soltysh)) -* client-go developers: the new dynamic client is easier to use and the old is deprecated, you must switch. ([#62913](https://github.com/kubernetes/kubernetes/pull/62913), [@deads2k](https://github.com/deads2k)) -* Fix issue where on re-registration of device plugin, `allocatable` was not getting updated. This issue makes devices invisible to the Kubelet if device plugin restarts. Only work-around, if this fix is not there, is to restart the kubelet and then start device plugin. ([#63118](https://github.com/kubernetes/kubernetes/pull/63118), [@vikaschoudhary16](https://github.com/vikaschoudhary16)) -* Remove METADATA_AGENT_VERSION configuration option. ([#63000](https://github.com/kubernetes/kubernetes/pull/63000), [@kawych](https://github.com/kawych)) -* kubelets are no longer allowed to delete their own Node API object. Prior to 1.11, in rare circumstances related to cloudprovider node ID changes, kubelets would attempt to delete/recreate their Node object at startup. If a legacy kubelet encounters this situation, a cluster admin can remove the Node object: ([#62818](https://github.com/kubernetes/kubernetes/pull/62818), [@mikedanese](https://github.com/mikedanese)) - * `kubectl delete node/` - * or grant self-deletion permission explicitly: - * `kubectl create clusterrole self-deleting-nodes --verb=delete --resource=nodes` - * `kubectl create clusterrolebinding self-deleting-nodes --clusterrole=self-deleting-nodes --group=system:nodes` -* kubeadm creates kube-proxy with a toleration to run on all nodes, no matter the taint. ([#62390](https://github.com/kubernetes/kubernetes/pull/62390), [@discordianfish](https://github.com/discordianfish)) -* fix resultRun by resetting it to 0 on pod restart ([#62853](https://github.com/kubernetes/kubernetes/pull/62853), [@tony612](https://github.com/tony612)) -* Mount additional paths required for a working CA root, for setups where /etc/ssl/certs doesn't contains certificates but just symlink. ([#59122](https://github.com/kubernetes/kubernetes/pull/59122), [@klausenbusk](https://github.com/klausenbusk)) -* Introduce truncating audit backend that can be enabled for existing backend to limit the size of individual audit events and batches of events. ([#61711](https://github.com/kubernetes/kubernetes/pull/61711), [@crassirostris](https://github.com/crassirostris)) -* kubeadm upgrade no longer races leading to unexpected upgrade behavior on pod restarts ([#62655](https://github.com/kubernetes/kubernetes/pull/62655), [@stealthybox](https://github.com/stealthybox)) - * kubeadm upgrade now successfully upgrades etcd and the controlplane to use TLS - * kubeadm upgrade now supports external etcd setups - * kubeadm upgrade can now rollback and restore etcd after an upgrade failure -* Add --ipvs-exclude-cidrs flag to kube-proxy. ([#62083](https://github.com/kubernetes/kubernetes/pull/62083), [@rramkumar1](https://github.com/rramkumar1)) -* Fix the liveness probe to use `/bin/bash -c` instead of `/bin/bash c`. ([#63033](https://github.com/kubernetes/kubernetes/pull/63033), [@bmoyles0117](https://github.com/bmoyles0117)) -* Added `MatchFields` to `NodeSelectorTerm`; in 1.11, it only support `metadata.name`. ([#62002](https://github.com/kubernetes/kubernetes/pull/62002), [@k82cn](https://github.com/k82cn)) -* Fix scheduler informers to receive events for all the pods in the cluster. ([#63003](https://github.com/kubernetes/kubernetes/pull/63003), [@bsalamat](https://github.com/bsalamat)) -* removed unsafe double RLock in cpumanager ([#62464](https://github.com/kubernetes/kubernetes/pull/62464), [@choury](https://github.com/choury)) -* Fix in vSphere Cloud Provider to handle upgrades from kubernetes version less than v1.9.4 to v1.9.4 and above. ([#62919](https://github.com/kubernetes/kubernetes/pull/62919), [@abrarshivani](https://github.com/abrarshivani)) -* The `--bootstrap-kubeconfig` argument to Kubelet previously created the first bootstrap client credentials in the certificates directory as `kubelet-client.key` and `kubelet-client.crt`. Subsequent certificates created by cert rotation were created in a combined PEM file that was atomically rotated as `kubelet-client-DATE.pem` in that directory, which meant clients relying on the `node.kubeconfig` generated by bootstrapping would never use a rotated cert. The initial bootstrap certificate is now generated into the cert directory as a PEM file and symlinked to `kubelet-client-current.pem` so that the generated kubeconfig remains valid after rotation. ([#62152](https://github.com/kubernetes/kubernetes/pull/62152), [@smarterclayton](https://github.com/smarterclayton)) -* stop kubelet to cloud provider integration potentially wedging kubelet sync loop ([#62543](https://github.com/kubernetes/kubernetes/pull/62543), [@ingvagabund](https://github.com/ingvagabund)) -* Fix error where config map for Metadata Agent was not created by addon manager. ([#62909](https://github.com/kubernetes/kubernetes/pull/62909), [@kawych](https://github.com/kawych)) -* Fixes the kubernetes.default.svc loopback service resolution to use a loopback configuration. ([#62649](https://github.com/kubernetes/kubernetes/pull/62649), [@liggitt](https://github.com/liggitt)) -* Code generated for CRDs now passes `go vet`. ([#62412](https://github.com/kubernetes/kubernetes/pull/62412), [@bhcleek](https://github.com/bhcleek)) -* fix permissions to allow statefulset scaling for admins, editors, and viewers ([#62336](https://github.com/kubernetes/kubernetes/pull/62336), [@deads2k](https://github.com/deads2k)) -* Add support of standard LB to Azure vmss ([#62707](https://github.com/kubernetes/kubernetes/pull/62707), [@feiskyer](https://github.com/feiskyer)) -* GCE: Fix for internal load balancer management resulting in backend services with outdated instance group links. ([#62885](https://github.com/kubernetes/kubernetes/pull/62885), [@nicksardo](https://github.com/nicksardo)) -* The --experimental-qos-reserve kubelet flags is replaced by the alpha level --qos-reserved flag or QOSReserved field in the kubeletconfig and requires the QOSReserved feature gate to be enabled. ([#62509](https://github.com/kubernetes/kubernetes/pull/62509), [@sjenning](https://github.com/sjenning)) -* Set pod status to "Running" if there is at least one container still reporting as "Running" status and others are "Completed". ([#62642](https://github.com/kubernetes/kubernetes/pull/62642), [@ceshihao](https://github.com/ceshihao)) -* Split PodPriority and PodPreemption feature gate ([#62243](https://github.com/kubernetes/kubernetes/pull/62243), [@resouer](https://github.com/resouer)) -* Add support to resize Portworx volumes. ([#62308](https://github.com/kubernetes/kubernetes/pull/62308), [@harsh-px](https://github.com/harsh-px)) - - - -# v1.11.0-alpha.1 - -[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/master/examples) - -## Downloads for v1.11.0-alpha.1 - - -filename | sha256 hash --------- | ----------- -[kubernetes.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes.tar.gz) | `8e7f2b4c8f8fb948b4f7882038fd1bb3f2b967ee240d30d58347f40083ed199b` -[kubernetes-src.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-src.tar.gz) | `62ab39d8fd02309c74c2a978402ef809c0fe4bb576f1366d6bb0cff26d62e2ff` - -### Client Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-client-darwin-386.tar.gz) | `332fd9e243c9c37e31fd26d8fa1a7ccffba770a48a9b0ffe57403f028c6ad6f4` -[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-client-darwin-amd64.tar.gz) | `1703462ad564d2d52257fd59b0c8acab595fd08b41ea73fed9f6ccb4bfa074c7` -[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-client-linux-386.tar.gz) | `61073b7c5266624e0f7be323481b3111ee01511b6b96cf16468044d8a68068e3` -[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-client-linux-amd64.tar.gz) | `9a29117fa44ffc14a7004d55f4de97ad88d94076826cfc0bf9ec73c998c78f64` -[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-client-linux-arm.tar.gz) | `55114364aacd4eb6d080b818c859877dd5ce46b8f1e58e1469dfa9a50ade1cf9` -[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-client-linux-arm64.tar.gz) | `276fb16cf4aef7d1444ca754ec83365ff36184e1bc30104853f791a57934ee37` -[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-client-linux-ppc64le.tar.gz) | `8a9096dd1908b8f4004249daff7ae408e390dbc728cd237bc558192744f52116` -[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-client-linux-s390x.tar.gz) | `9297755244647b90c2d41ce9e04ee31fb158a69f011c0f4f1ec2310fa57234e7` -[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-client-windows-386.tar.gz) | `449562a4d6d82b5eb60151e6ff0b301f92b92f957e3a38b741a4c0d8b3c0611f` -[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-client-windows-amd64.tar.gz) | `ab97f150723614bcbacdf27c4ced8b45166425522a44e7de693d0e987c425f07` - -### Server Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-server-linux-amd64.tar.gz) | `4c2db4089271366933d0b63ea7fe8f0d9eb4af06fe91d6aac1b8240e2fbd62e1` -[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-server-linux-arm.tar.gz) | `d5abdfe5aa28b23cf4f4f6be27db031f885f87e2defef680f2d5b92098b2d783` -[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-server-linux-arm64.tar.gz) | `bd8a8d7c45108f4b0c2af81411c00e338e410b680abe4463f6b6d88e8adcc817` -[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-server-linux-ppc64le.tar.gz) | `cb5341af600c82d391fc5ca726ff96c48e741f597360a56cc2ada0a0f9e7ec95` -[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-server-linux-s390x.tar.gz) | `91009df3801430afde03e888f1f13a83bcb9d00b7cd4194b085684cc11657549` - -### Node Binaries - -filename | sha256 hash --------- | ----------- -[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-node-linux-amd64.tar.gz) | `22bf846c692545e7c2655e2ebe06ffc61313d7c76e4f75716be4cec457b548ed` -[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-node-linux-arm.tar.gz) | `351095bb0ec177ce1ba950d366516ed6154f6ce920eac39e2a26c48203a94e11` -[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-node-linux-arm64.tar.gz) | `947e6e9e362652db435903e9b40f14750a7ab3cc60622e78257797f6ed63b1ab` -[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-node-linux-ppc64le.tar.gz) | `1a0a1d0b96c3e01bc0737245eed76ed3db970c8d80c42450072193f23a0e186b` -[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-node-linux-s390x.tar.gz) | `6891b2e8f1f93b4f590981dccc6fd976a50a0aa5c425938fc5ca3a9c0742d16a` -[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.11.0-alpha.1/kubernetes-node-windows-amd64.tar.gz) | `70daea86c14fcafbd46f3d1bb252db50148fb9aab3371dffc4a039791caebac5` - -## Changelog since v1.10.0 - -### Action Required - -* NONE ([#62643](https://github.com/kubernetes/kubernetes/pull/62643), [@xiangpengzhao](https://github.com/xiangpengzhao)) -* ACTION REQUIRED: Alpha annotation for PersistentVolume node affinity has been removed. Update your PersistentVolumes to use the beta PersistentVolume.nodeAffinity field before upgrading to this release ([#61816](https://github.com/kubernetes/kubernetes/pull/61816), [@wackxu](https://github.com/wackxu)) -* ACTION REQUIRED: In-place node upgrades to this release from versions 1.7.14, 1.8.9, and 1.9.4 are not supported if using subpath volumes with PVCs. Such pods should be drained from the node first. ([#61373](https://github.com/kubernetes/kubernetes/pull/61373), [@msau42](https://github.com/msau42)) - -### Other notable changes - -* Make volume usage metrics available for Cinder ([#62668](https://github.com/kubernetes/kubernetes/pull/62668), [@zetaab](https://github.com/zetaab)) -* kubectl stops rendering List as suffix kind name for CRD resources ([#62512](https://github.com/kubernetes/kubernetes/pull/62512), [@dixudx](https://github.com/dixudx)) -* Removes --include-extended-apis which was deprecated back in https://github.com/kubernetes/kubernetes/pull/32894 ([#62803](https://github.com/kubernetes/kubernetes/pull/62803), [@deads2k](https://github.com/deads2k)) -* Add write-config-to to scheduler ([#62515](https://github.com/kubernetes/kubernetes/pull/62515), [@resouer](https://github.com/resouer)) -* Kubelets will no longer set `externalID` in their node spec. ([#61877](https://github.com/kubernetes/kubernetes/pull/61877), [@mikedanese](https://github.com/mikedanese)) -* kubeadm preflight: check CRI socket path if defined, otherwise check for Docker ([#62481](https://github.com/kubernetes/kubernetes/pull/62481), [@taharah](https://github.com/taharah)) -* fix network setup in hack/local-up-cluster.sh (https://github.com/kubernetes/kubernetes/pull/60431) ([#60633](https://github.com/kubernetes/kubernetes/pull/60633), [@pohly](https://github.com/pohly)) - * better error diagnostics in hack/local-up-cluster.sh output -* Add prometheus cluster monitoring addon to kube-up ([#62195](https://github.com/kubernetes/kubernetes/pull/62195), [@serathius](https://github.com/serathius)) -* Fix inter-pod anti-affinity check to consider a pod a match when all the anti-affinity terms match. ([#62715](https://github.com/kubernetes/kubernetes/pull/62715), [@bsalamat](https://github.com/bsalamat)) -* GCE: Bump GLBC version to 1.1.1 - fixing an issue of handling multiple certs with identical certificates ([#62751](https://github.com/kubernetes/kubernetes/pull/62751), [@nicksardo](https://github.com/nicksardo)) -* fixes configuration error when upgrading kubeadm from 1.9 to 1.10+ ([#62568](https://github.com/kubernetes/kubernetes/pull/62568), [@liztio](https://github.com/liztio)) - * enforces kubeadm upgrading kubernetes from the same major and minor versions as the kubeadm binary. -* Allow user to scale l7 default backend deployment ([#62685](https://github.com/kubernetes/kubernetes/pull/62685), [@freehan](https://github.com/freehan)) -* Pod affinity `nodeSelectorTerm.matchExpressions` may now be empty, and works as previously documented: nil or empty `matchExpressions` matches no objects in scheduler. ([#62448](https://github.com/kubernetes/kubernetes/pull/62448), [@k82cn](https://github.com/k82cn)) -* Add [@andrewsykim](https://github.com/andrewsykim) as an approver for CCM related code. ([#62749](https://github.com/kubernetes/kubernetes/pull/62749), [@andrewsykim](https://github.com/andrewsykim)) -* Fix an issue in inter-pod affinity predicate that cause affinity to self being processed incorrectly ([#62591](https://github.com/kubernetes/kubernetes/pull/62591), [@bsalamat](https://github.com/bsalamat)) -* fix WaitForAttach failure issue for azure disk ([#62612](https://github.com/kubernetes/kubernetes/pull/62612), [@andyzhangx](https://github.com/andyzhangx)) -* Update kube-dns to Version 1.14.10. Major changes: ([#62676](https://github.com/kubernetes/kubernetes/pull/62676), [@MrHohn](https://github.com/MrHohn)) - * - Fix a bug in DNS resolution for externalName services - * and PTR records that need to query from upstream nameserver. -* Update version of Istio addon from 0.5.1 to 0.6.0. ([#61911](https://github.com/kubernetes/kubernetes/pull/61911), [@ostromart](https://github.com/ostromart)) - * See https://istio.io/about/notes/0.6.html for full Isto release notes. -* Phase `kubeadm alpha phase kubelet` is added to support dynamic kubelet configuration in kubeadm. ([#57224](https://github.com/kubernetes/kubernetes/pull/57224), [@xiangpengzhao](https://github.com/xiangpengzhao)) -* `kubeadm alpha phase kubeconfig user` supports groups (organizations) to be specified in client cert. ([#62627](https://github.com/kubernetes/kubernetes/pull/62627), [@xiangpengzhao](https://github.com/xiangpengzhao)) -* Fix user visible files creation for windows ([#62375](https://github.com/kubernetes/kubernetes/pull/62375), [@feiskyer](https://github.com/feiskyer)) -* remove deprecated initresource admission plugin ([#58784](https://github.com/kubernetes/kubernetes/pull/58784), [@wackxu](https://github.com/wackxu)) -* Fix machineID getting for vmss nodes when using instance metadata ([#62611](https://github.com/kubernetes/kubernetes/pull/62611), [@feiskyer](https://github.com/feiskyer)) -* Fixes issue where PersistentVolume.NodeAffinity.NodeSelectorTerms were ANDed instead of ORed. ([#62556](https://github.com/kubernetes/kubernetes/pull/62556), [@msau42](https://github.com/msau42)) -* Fix potential infinite loop that can occur when NFS PVs are recycled. ([#62572](https://github.com/kubernetes/kubernetes/pull/62572), [@joelsmith](https://github.com/joelsmith)) -* Fix Forward chain default reject policy for IPVS proxier ([#62007](https://github.com/kubernetes/kubernetes/pull/62007), [@m1093782566](https://github.com/m1093782566)) -* The kubeadm config option `API.ControlPlaneEndpoint` has been extended to take an optional port which may differ from the apiserver's bind port. ([#62314](https://github.com/kubernetes/kubernetes/pull/62314), [@rjosephwright](https://github.com/rjosephwright)) -* cluster/kube-up.sh now provisions a Kubelet config file for GCE via the metadata server. This file is installed by the corresponding GCE init scripts. ([#62183](https://github.com/kubernetes/kubernetes/pull/62183), [@mtaufen](https://github.com/mtaufen)) -* Remove alpha functionality that allowed the controller manager to approve kubelet server certificates. ([#62471](https://github.com/kubernetes/kubernetes/pull/62471), [@mikedanese](https://github.com/mikedanese)) -* gitRepo volumes in pods no longer require git 1.8.5 or newer, older git versions are supported too now. ([#62394](https://github.com/kubernetes/kubernetes/pull/62394), [@jsafrane](https://github.com/jsafrane)) -* 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. ([#62462](https://github.com/kubernetes/kubernetes/pull/62462), [@jsafrane](https://github.com/jsafrane)) -* improve performance of affinity/anti-affinity predicate of default scheduler significantly. ([#62211](https://github.com/kubernetes/kubernetes/pull/62211), [@bsalamat](https://github.com/bsalamat)) -* fix nsenter GetFileType issue in containerized kubelet ([#62467](https://github.com/kubernetes/kubernetes/pull/62467), [@andyzhangx](https://github.com/andyzhangx)) -* Ensure expected load balancer is selected for Azure ([#62450](https://github.com/kubernetes/kubernetes/pull/62450), [@feiskyer](https://github.com/feiskyer)) -* Resolves forbidden error when the `daemon-set-controller` cluster role access `controllerrevisions` resources. ([#62146](https://github.com/kubernetes/kubernetes/pull/62146), [@frodenas](https://github.com/frodenas)) -* Adds --cluster-name to kubeadm init for specifying the cluster name in kubeconfig. ([#60852](https://github.com/kubernetes/kubernetes/pull/60852), [@karan](https://github.com/karan)) -* Upgrade the default etcd server version to 3.2.18 ([#61198](https://github.com/kubernetes/kubernetes/pull/61198), [@jpbetz](https://github.com/jpbetz)) -* [fluentd-gcp addon] Increase CPU limit for fluentd to 1 core to achieve 100kb/s throughput. ([#62430](https://github.com/kubernetes/kubernetes/pull/62430), [@bmoyles0117](https://github.com/bmoyles0117)) -* GCE: Bump GLBC version to 1.1.0 - supporting multiple certificates and HTTP2 ([#62427](https://github.com/kubernetes/kubernetes/pull/62427), [@nicksardo](https://github.com/nicksardo)) -* Fixed #731 kubeadm upgrade ignores HighAvailability feature gate ([#62455](https://github.com/kubernetes/kubernetes/pull/62455), [@fabriziopandini](https://github.com/fabriziopandini)) -* Cluster Autoscaler 1.2.1 (release notes: https://github.com/kubernetes/autoscaler/releases/tag/cluster-autoscaler-1.2.1) ([#62457](https://github.com/kubernetes/kubernetes/pull/62457), [@mwielgus](https://github.com/mwielgus)) -* Add generators for `apps/v1` deployments. ([#61288](https://github.com/kubernetes/kubernetes/pull/61288), [@ayushpateria](https://github.com/ayushpateria)) -* kubeadm: surface external etcd preflight validation errors ([#60585](https://github.com/kubernetes/kubernetes/pull/60585), [@alexbrand](https://github.com/alexbrand)) -* kube-apiserver: oidc authentication now supports requiring specific claims with `--oidc-required-claim==` ([#62136](https://github.com/kubernetes/kubernetes/pull/62136), [@rithujohn191](https://github.com/rithujohn191)) -* Implements verbosity logging feature for kubeadm commands ([#57661](https://github.com/kubernetes/kubernetes/pull/57661), [@vbmade2000](https://github.com/vbmade2000)) -* Allow additionalProperties in CRD OpenAPI v3 specification for validation, mutually exclusive to properties. ([#62333](https://github.com/kubernetes/kubernetes/pull/62333), [@sttts](https://github.com/sttts)) -* cinder volume plugin : ([#61082](https://github.com/kubernetes/kubernetes/pull/61082), [@wenlxie](https://github.com/wenlxie)) - * When the cinder volume status is `error`, controller will not do `attach ` and `detach ` operation -* fix incompatible file type checking on Windows ([#62154](https://github.com/kubernetes/kubernetes/pull/62154), [@dixudx](https://github.com/dixudx)) -* fix local volume absolute path issue on Windows ([#62018](https://github.com/kubernetes/kubernetes/pull/62018), [@andyzhangx](https://github.com/andyzhangx)) -* Remove `ObjectMeta ` `ListOptions` `DeleteOptions` from core api group. Please use that in meta/v1 ([#61809](https://github.com/kubernetes/kubernetes/pull/61809), [@hzxuzhonghu](https://github.com/hzxuzhonghu)) -* fix the issue that default azure disk fsypte(ext4) does not work on Windows ([#62250](https://github.com/kubernetes/kubernetes/pull/62250), [@andyzhangx](https://github.com/andyzhangx)) -* RBAC information is included in audit logs via audit.Event annotations: ([#58807](https://github.com/kubernetes/kubernetes/pull/58807), [@CaoShuFeng](https://github.com/CaoShuFeng)) - * authorization.k8s.io/decision = {allow, forbid} - * authorization.k8s.io/reason = human-readable reason for the decision -* Update kube-dns to Version 1.14.9 in kubeadm. ([#61918](https://github.com/kubernetes/kubernetes/pull/61918), [@MrHohn](https://github.com/MrHohn)) -* Add support to ingest log entries to Stackdriver against new "k8s_container" and "k8s_node" resources. ([#62076](https://github.com/kubernetes/kubernetes/pull/62076), [@qingling128](https://github.com/qingling128)) -* remove deprecated --mode flag in check-network-mode ([#60102](https://github.com/kubernetes/kubernetes/pull/60102), [@satyasm](https://github.com/satyasm)) -* Schedule even if extender is not available when using extender ([#61445](https://github.com/kubernetes/kubernetes/pull/61445), [@resouer](https://github.com/resouer)) -* Fixed column alignment when kubectl get is used with custom columns from OpenAPI schema ([#56629](https://github.com/kubernetes/kubernetes/pull/56629), [@luksa](https://github.com/luksa)) -* Fixed bug in rbd-nbd utility when nbd is used. ([#62168](https://github.com/kubernetes/kubernetes/pull/62168), [@piontec](https://github.com/piontec)) -* Extend the Stackdriver Metadata Agent by adding a new Deployment for ingesting unscheduled pods, and services. ([#62043](https://github.com/kubernetes/kubernetes/pull/62043), [@supriyagarg](https://github.com/supriyagarg)) -* Disabled CheckNodeMemoryPressure and CheckNodeDiskPressure predicates if TaintNodesByCondition enabled ([#60398](https://github.com/kubernetes/kubernetes/pull/60398), [@k82cn](https://github.com/k82cn)) -* kubeadm config can now override the Node CIDR Mask Size passed to kube-controller-manager. ([#61705](https://github.com/kubernetes/kubernetes/pull/61705), [@jstangroome](https://github.com/jstangroome)) -* Add warnings that authors of aggregated API servers must not rely on authorization being done by the kube-apiserver. ([#61349](https://github.com/kubernetes/kubernetes/pull/61349), [@sttts](https://github.com/sttts)) -* Support custom test configuration for IPAM performance integration tests ([#61959](https://github.com/kubernetes/kubernetes/pull/61959), [@satyasm](https://github.com/satyasm)) -* GCE: Updates GLBC version to 1.0.1 which includes a fix which prevents multi-cluster ingress objects from creating full load balancers. ([#62075](https://github.com/kubernetes/kubernetes/pull/62075), [@nicksardo](https://github.com/nicksardo)) -* OIDC authentication now allows tokens without an "email_verified" claim when using the "email" claim. If an "email_verified" claim is present when using the "email" claim, it must be `true`. ([#61508](https://github.com/kubernetes/kubernetes/pull/61508), [@rithujohn191](https://github.com/rithujohn191)) -* fix local volume issue on Windows ([#62012](https://github.com/kubernetes/kubernetes/pull/62012), [@andyzhangx](https://github.com/andyzhangx)) -* kubeadm: Introduce join timeout that can be controlled via the discoveryTimeout config option (set to 5 minutes by default). ([#60983](https://github.com/kubernetes/kubernetes/pull/60983), [@rosti](https://github.com/rosti)) -* Add e2e test for CRD Watch ([#61025](https://github.com/kubernetes/kubernetes/pull/61025), [@ayushpateria](https://github.com/ayushpateria)) -* Fix panic create/update CRD when mutating/validating webhook configured. ([#61404](https://github.com/kubernetes/kubernetes/pull/61404), [@hzxuzhonghu](https://github.com/hzxuzhonghu)) -* Fix a bug that fluentd doesn't inject container logs for CRI container runtimes (containerd, cri-o etc.) into elasticsearch on GCE. ([#61818](https://github.com/kubernetes/kubernetes/pull/61818), [@Random-Liu](https://github.com/Random-Liu)) -* 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"). ([#61498](https://github.com/kubernetes/kubernetes/pull/61498), [@mindprince](https://github.com/mindprince)) -* Pods requesting resources prefixed with `*kubernetes.io` will remain unscheduled if there are no nodes exposing that resource. ([#61860](https://github.com/kubernetes/kubernetes/pull/61860), [@mindprince](https://github.com/mindprince)) -* flexvolume: trigger plugin init only for the relevant plugin while probe ([#58519](https://github.com/kubernetes/kubernetes/pull/58519), [@linyouchong](https://github.com/linyouchong)) -* Update to use go1.10.1 ([#60597](https://github.com/kubernetes/kubernetes/pull/60597), [@cblecker](https://github.com/cblecker)) -* Rev the Azure SDK for networking to 2017-06-01 ([#61955](https://github.com/kubernetes/kubernetes/pull/61955), [@brendandburns](https://github.com/brendandburns)) -* Return error if get NodeStageSecret and NodePublishSecret failed in CSI volume plugin ([#61096](https://github.com/kubernetes/kubernetes/pull/61096), [@mlmhl](https://github.com/mlmhl)) -* kubectl: improves compatibility with older servers when creating/updating API objects ([#61949](https://github.com/kubernetes/kubernetes/pull/61949), [@liggitt](https://github.com/liggitt)) -* kubernetes-master charm now supports metrics server for horizontal pod autoscaler. ([#60174](https://github.com/kubernetes/kubernetes/pull/60174), [@hyperbolic2346](https://github.com/hyperbolic2346)) -* fix scheduling policy on ConfigMap breaks without the --policy-configmap-namespace flag set ([#61388](https://github.com/kubernetes/kubernetes/pull/61388), [@zjj2wry](https://github.com/zjj2wry)) -* kubectl: restore the ability to show resource kinds when displaying multiple objects ([#61985](https://github.com/kubernetes/kubernetes/pull/61985), [@liggitt](https://github.com/liggitt)) -* `kubectl certificate approve|deny` will not modify an already approved or denied CSR unless the `--force` flag is provided. ([#61971](https://github.com/kubernetes/kubernetes/pull/61971), [@smarterclayton](https://github.com/smarterclayton)) -* Kubelet now exposes a new endpoint /metrics/probes which exposes a Prometheus metric containing the liveness and/or readiness probe results for a container. ([#61369](https://github.com/kubernetes/kubernetes/pull/61369), [@rramkumar1](https://github.com/rramkumar1)) -* Balanced resource allocation priority in scheduler to include volume count on node ([#60525](https://github.com/kubernetes/kubernetes/pull/60525), [@ravisantoshgudimetla](https://github.com/ravisantoshgudimetla)) -* new dhcp-domain parameter to be used for figuring out the hostname of a node ([#61890](https://github.com/kubernetes/kubernetes/pull/61890), [@dims](https://github.com/dims)) -* Fixed a panic in `kubectl run --attach ...` when the api server failed to create the runtime object (due to name conflict, PSP restriction, etc.) ([#61713](https://github.com/kubernetes/kubernetes/pull/61713), [@mountkin](https://github.com/mountkin)) -* Ensure reasons end up as comments in `kubectl edit`. ([#60990](https://github.com/kubernetes/kubernetes/pull/60990), [@bmcstdio](https://github.com/bmcstdio)) -* kube-scheduler has been fixed to use `--leader-elect` option back to true (as it was in previous versions) ([#59732](https://github.com/kubernetes/kubernetes/pull/59732), [@dims](https://github.com/dims)) -* Azure cloud provider now supports standard SKU load balancer and public IP. To use it, set cloud provider config with ([#61884](https://github.com/kubernetes/kubernetes/pull/61884), [@feiskyer](https://github.com/feiskyer)) - * { - * "loadBalancerSku": "standard", - * "excludeMasterFromStandardLB": true, - * } - * If excludeMasterFromStandardLB is not set, it will be default to true, which means master nodes are excluded to the backend of standard LB. - * Also note standard load balancer doesn't work with annotation `service.beta.kubernetes.io/azure-load-balancer-mode`. This is because all nodes (except master) are added as the LB backends. -* The node authorizer now automatically sets up rules for Node.Spec.ConfigSource when the DynamicKubeletConfig feature gate is enabled. ([#60100](https://github.com/kubernetes/kubernetes/pull/60100), [@mtaufen](https://github.com/mtaufen)) -* Update kube-dns to Version 1.14.9. Major changes: ([#61908](https://github.com/kubernetes/kubernetes/pull/61908), [@MrHohn](https://github.com/MrHohn)) - * - Fix for kube-dns returns NXDOMAIN when not yet synced with apiserver. - * - Don't generate empty record for externalName service. - * - Add validation for upstreamNameserver port. - * - Update go version to 1.9.3. -* CRI: define the mount behavior when host path does not exist: runtime should report error if the host path doesn't exist ([#61460](https://github.com/kubernetes/kubernetes/pull/61460), [@feiskyer](https://github.com/feiskyer)) -* Fixed ingress issue with CDK and pre-1.9 versions of kubernetes. ([#61859](https://github.com/kubernetes/kubernetes/pull/61859), [@hyperbolic2346](https://github.com/hyperbolic2346)) -* Removed rknetes code, which was deprecated in 1.10. ([#61432](https://github.com/kubernetes/kubernetes/pull/61432), [@filbranden](https://github.com/filbranden)) -* Disable ipamperf integration tests as part of every PR verification. ([#61863](https://github.com/kubernetes/kubernetes/pull/61863), [@satyasm](https://github.com/satyasm)) -* Enable server-side print in kubectl by default, with the ability to turn it off with --server-print=false ([#61477](https://github.com/kubernetes/kubernetes/pull/61477), [@soltysh](https://github.com/soltysh)) -* Add ipset and udevadm to the hyperkube base image. ([#61357](https://github.com/kubernetes/kubernetes/pull/61357), [@rphillips](https://github.com/rphillips)) -* In a GCE cluster, the default HAIRPIN_MODE is now "hairpin-veth". ([#60166](https://github.com/kubernetes/kubernetes/pull/60166), [@rramkumar1](https://github.com/rramkumar1)) -* Deployment will stop adding pod-template-hash labels/selector to ReplicaSets and Pods it adopts. Resources created by Deployments are not affected (will still have pod-template-hash labels/selector). ([#61615](https://github.com/kubernetes/kubernetes/pull/61615), [@janetkuo](https://github.com/janetkuo)) -* kubectl: fixes issue with `-o yaml` and `-o json` omitting kind and apiVersion when used with `--dry-run` ([#61808](https://github.com/kubernetes/kubernetes/pull/61808), [@liggitt](https://github.com/liggitt)) -* Updated admission controller settings for Juju deployed Kubernetes clusters ([#61427](https://github.com/kubernetes/kubernetes/pull/61427), [@hyperbolic2346](https://github.com/hyperbolic2346)) -* Performance test framework and basic tests for the IPAM controller, to simulate behavior ([#61143](https://github.com/kubernetes/kubernetes/pull/61143), [@satyasm](https://github.com/satyasm)) - * of the four supported modes under lightly loaded and loaded conditions, where load is - * defined as the number of operations to perform as against the configured kubernetes - * API server QPS. -* kubernetes-master charm now properly clears the client-ca-file setting on the apiserver snap ([#61479](https://github.com/kubernetes/kubernetes/pull/61479), [@hyperbolic2346](https://github.com/hyperbolic2346)) -* Fix racy panics when using fake watches with ObjectTracker ([#61195](https://github.com/kubernetes/kubernetes/pull/61195), [@grantr](https://github.com/grantr)) -* [fluentd-gcp addon] Update event-exporter image to have the latest base image. ([#61727](https://github.com/kubernetes/kubernetes/pull/61727), [@crassirostris](https://github.com/crassirostris)) -* Use inline func to ensure unlock is executed ([#61644](https://github.com/kubernetes/kubernetes/pull/61644), [@resouer](https://github.com/resouer)) -* `kubectl apply view/edit-last-applied support completion. ([#60499](https://github.com/kubernetes/kubernetes/pull/60499), [@superbrothers](https://github.com/superbrothers)) -* Automatically add system critical priority classes at cluster boostrapping. ([#60519](https://github.com/kubernetes/kubernetes/pull/60519), [@bsalamat](https://github.com/bsalamat)) -* Ensure cloudprovider.InstanceNotFound is reported when the VM is not found on Azure ([#61531](https://github.com/kubernetes/kubernetes/pull/61531), [@feiskyer](https://github.com/feiskyer)) -* Azure cloud provider now supports specifying allowed service tags by annotation `service.beta.kubernetes.io/azure-allowed-service-tags` ([#61467](https://github.com/kubernetes/kubernetes/pull/61467), [@feiskyer](https://github.com/feiskyer)) -* Add all kinds of resource objects' statuses in HPA description. ([#59609](https://github.com/kubernetes/kubernetes/pull/59609), [@zhangxiaoyu-zidif](https://github.com/zhangxiaoyu-zidif)) -* Bound cloud allocator to 10 retries with 100 ms delay between retries. ([#61375](https://github.com/kubernetes/kubernetes/pull/61375), [@satyasm](https://github.com/satyasm)) -* Removed always pull policy from the template for ingress on CDK. ([#61598](https://github.com/kubernetes/kubernetes/pull/61598), [@hyperbolic2346](https://github.com/hyperbolic2346)) -* escape literal percent sign when formatting ([#61523](https://github.com/kubernetes/kubernetes/pull/61523), [@dixudx](https://github.com/dixudx)) -* Cluster Autoscaler 1.2.0 - release notes available here: https://github.com/kubernetes/autoscaler/releases ([#61561](https://github.com/kubernetes/kubernetes/pull/61561), [@mwielgus](https://github.com/mwielgus)) -* Fix mounting of UNIX sockets(and other special files) in subpaths ([#61480](https://github.com/kubernetes/kubernetes/pull/61480), [@gnufied](https://github.com/gnufied)) -* `kubectl patch` now supports `--dry-run`. ([#60675](https://github.com/kubernetes/kubernetes/pull/60675), [@timoreimann](https://github.com/timoreimann)) -* fix sorting taints in case the sorting keys are equal ([#61255](https://github.com/kubernetes/kubernetes/pull/61255), [@dixudx](https://github.com/dixudx)) -* NetworkPolicies can now target specific pods in other namespaces by including both a namespaceSelector and a podSelector in the same peer element. ([#60452](https://github.com/kubernetes/kubernetes/pull/60452), [@danwinship](https://github.com/danwinship)) -* include node internal ip as additional information for kubectl ([#57623](https://github.com/kubernetes/kubernetes/pull/57623), [@dixudx](https://github.com/dixudx)) -* Add apiserver configuration option to choose audit output version. ([#60056](https://github.com/kubernetes/kubernetes/pull/60056), [@crassirostris](https://github.com/crassirostris)) -* `make test-cmd` now works on OSX. ([#61393](https://github.com/kubernetes/kubernetes/pull/61393), [@totherme](https://github.com/totherme)) -* Remove kube-apiserver `--storage-version` flag, use `--storage-versions` instead. ([#61453](https://github.com/kubernetes/kubernetes/pull/61453), [@hzxuzhonghu](https://github.com/hzxuzhonghu)) -* Bump Heapster to v1.5.2 ([#61396](https://github.com/kubernetes/kubernetes/pull/61396), [@kawych](https://github.com/kawych)) -* Conformance: ReplicaSet must be supported in the `apps/v1` version. ([#61367](https://github.com/kubernetes/kubernetes/pull/61367), [@enisoc](https://github.com/enisoc)) -* You can now use the `base64decode` function in kubectl go templates to decode base64-encoded data, for example `kubectl get secret SECRET -o go-template='{{ .data.KEY | base64decode }}'`. ([#60755](https://github.com/kubernetes/kubernetes/pull/60755), [@glb](https://github.com/glb)) -* Remove 'system' prefix from Metadata Agent rbac configuration ([#61394](https://github.com/kubernetes/kubernetes/pull/61394), [@kawych](https://github.com/kawych)) -* Remove `--tls-ca-file` flag. ([#61386](https://github.com/kubernetes/kubernetes/pull/61386), [@hzxuzhonghu](https://github.com/hzxuzhonghu)) -* fix sorting tolerations in case the keys are equal ([#61252](https://github.com/kubernetes/kubernetes/pull/61252), [@dixudx](https://github.com/dixudx)) -* respect fstype in Windows for azure disk ([#61267](https://github.com/kubernetes/kubernetes/pull/61267), [@andyzhangx](https://github.com/andyzhangx)) -* `--show-all` (which only affected pods and only for human readable/non-API printers) is inert in v1.11, and will be removed in a future release. ([#60793](https://github.com/kubernetes/kubernetes/pull/60793), [@charrywanganthony](https://github.com/charrywanganthony)) -* Remove never used NewCronJobControllerFromClient method ([#59471](https://github.com/kubernetes/kubernetes/pull/59471), [@dmathieu](https://github.com/dmathieu)) -* Support new NODE_OS_DISTRIBUTION 'custom' on GCE ([#61235](https://github.com/kubernetes/kubernetes/pull/61235), [@yguo0905](https://github.com/yguo0905)) -* Fixed [#61123](https://github.com/kubernetes/kubernetes/pull/61123) by triggering syncer.Update on all cases including when a syncer is created ([#61124](https://github.com/kubernetes/kubernetes/pull/61124), [@satyasm](https://github.com/satyasm)) - * on a new add event. -* Unready pods will no longer impact the number of desired replicas when using horizontal auto-scaling with external metrics or object metrics. ([#60886](https://github.com/kubernetes/kubernetes/pull/60886), [@mattjmcnaughton](https://github.com/mattjmcnaughton)) -* include file name in the error when visiting files ([#60919](https://github.com/kubernetes/kubernetes/pull/60919), [@dixudx](https://github.com/dixudx)) -* Implement preemption for extender with a verb and new interface ([#58717](https://github.com/kubernetes/kubernetes/pull/58717), [@resouer](https://github.com/resouer)) -* `kube-cloud-controller-manager` flag `--service-account-private-key-file` is removed in v1.11 ([#60875](https://github.com/kubernetes/kubernetes/pull/60875), [@charrywanganthony](https://github.com/charrywanganthony)) -* kubeadm: Add the writable boolean option to kubeadm config. The option works on a per-volume basis for *ExtraVolumes config keys. ([#60428](https://github.com/kubernetes/kubernetes/pull/60428), [@rosti](https://github.com/rosti)) -* DaemonSet scheduling associated with the alpha ScheduleDaemonSetPods feature flag has been removed from the 1.10 release. See https://github.com/kubernetes/features/issues/548 for feature status. ([#61411](https://github.com/kubernetes/kubernetes/pull/61411), [@liggitt](https://github.com/liggitt)) -* Bugfix for erroneous upgrade needed messaging in kubernetes worker charm. ([#60873](https://github.com/kubernetes/kubernetes/pull/60873), [@wwwtyro](https://github.com/wwwtyro)) -* Fix data race in node lifecycle controller ([#60831](https://github.com/kubernetes/kubernetes/pull/60831), [@resouer](https://github.com/resouer)) -* Nodes are not deleted from kubernetes anymore if node is shutdown in Openstack. ([#59931](https://github.com/kubernetes/kubernetes/pull/59931), [@zetaab](https://github.com/zetaab)) -* "beginPort+offset" format support for port range which affects kube-proxy only ([#58731](https://github.com/kubernetes/kubernetes/pull/58731), [@yue9944882](https://github.com/yue9944882)) -* Added e2e test for watch ([#60331](https://github.com/kubernetes/kubernetes/pull/60331), [@jennybuckley](https://github.com/jennybuckley)) -* kubelet's --cni-bin-dir option now accepts multiple comma-separated CNI binary directory paths, which are search for CNI plugins in the given order. ([#58714](https://github.com/kubernetes/kubernetes/pull/58714), [@dcbw](https://github.com/dcbw)) - diff --git a/vendor/k8s.io/kubernetes/CHANGELOG.md b/vendor/k8s.io/kubernetes/CHANGELOG.md deleted file mode 100644 index 361eb783..00000000 --- a/vendor/k8s.io/kubernetes/CHANGELOG.md +++ /dev/null @@ -1,20 +0,0 @@ -## Development release: - - -## Current release: - -- [CHANGELOG-1.11.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.11.md) - -## Older releases: - -- [CHANGELOG-1.10.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.10.md) -- [CHANGELOG-1.9.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.9.md) -- [CHANGELOG-1.8.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.8.md) -- [CHANGELOG-1.7.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.7.md) -- [CHANGELOG-1.6.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.6.md) -- [CHANGELOG-1.5.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.5.md) -- [CHANGELOG-1.4.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.4.md) -- [CHANGELOG-1.3.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.3.md) -- [CHANGELOG-1.2.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.2.md) - -[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/CHANGELOG.md?pixel)]() diff --git a/vendor/k8s.io/kubernetes/CONTRIBUTING.md b/vendor/k8s.io/kubernetes/CONTRIBUTING.md deleted file mode 100644 index 9974dc68..00000000 --- a/vendor/k8s.io/kubernetes/CONTRIBUTING.md +++ /dev/null @@ -1,7 +0,0 @@ -# Contributing - -Welcome to Kubernetes! If you are interested in contributing to the [Kubernetes code repo](README.md) then checkout the [Contributor's Guide](https://git.k8s.io/community/contributors/guide/) - -The [Kubernetes community repo](https://github.com/kubernetes/community) contains information on how the community is organized and other information that is pertinent to contributing. - -[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/CONTRIBUTING.md?pixel)]() diff --git a/vendor/k8s.io/kubernetes/Godeps/LICENSES b/vendor/k8s.io/kubernetes/Godeps/LICENSES new file mode 100644 index 00000000..99dccec6 --- /dev/null +++ b/vendor/k8s.io/kubernetes/Godeps/LICENSES @@ -0,0 +1,103763 @@ +================================================================================ += Kubernetes licensed under: = + + + 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. + += LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + +================================================================================ += vendor/bitbucket.org/bertimus9/systemstat licensed under: = + +The MIT License (MIT) + +Copyright (c) 2013 Phillip Bond + +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. + += vendor/bitbucket.org/bertimus9/systemstat/LICENSE 6f7ba8122a9b3146266dafa39c5b8ee3 +================================================================================ + + +================================================================================ += vendor/bitbucket.org/ww/goautoneg licensed under: = + +PACKAGE + +package goautoneg +import "bitbucket.org/ww/goautoneg" + +HTTP Content-Type Autonegotiation. + +The functions in this package implement the behaviour specified in +http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html + +Copyright (c) 2011, Open Knowledge Foundation Ltd. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + Neither the name of the Open Knowledge Foundation Ltd. nor the + names of its contributors may be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 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. + + +FUNCTIONS + +func Negotiate(header string, alternatives []string) (content_type string) +Negotiate the most appropriate content_type given the accept header +and a list of alternatives. + +func ParseAccept(header string) (accept []Accept) +Parse an Accept Header string returning a sorted list +of clauses + + +TYPES + +type Accept struct { + Type, SubType string + Q float32 + Params map[string]string +} +Structure to represent a clause in an HTTP Accept Header + + +SUBDIRECTORIES + + .hg + += vendor/bitbucket.org/ww/goautoneg/README.txt a33eda65f1bc658f358e1d690c6a93d4 +================================================================================ + + +================================================================================ += vendor/cloud.google.com/go/compute/metadata licensed under: = + + + 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 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. + += vendor/cloud.google.com/go/LICENSE a873c5645c184d51e0f9b34e1d7cf559 +================================================================================ + + +================================================================================ += vendor/cloud.google.com/go/internal licensed under: = + + + 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 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. + += vendor/cloud.google.com/go/LICENSE a873c5645c184d51e0f9b34e1d7cf559 +================================================================================ + + +================================================================================ += vendor/github.com/abbot/go-http-auth licensed under: = + + + 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 + + += vendor/github.com/abbot/go-http-auth/LICENSE ff253ad767462c46be284da12dda33e8 +================================================================================ + + +================================================================================ += vendor/github.com/armon/circbuf licensed under: = + +The MIT License (MIT) + +Copyright (c) 2013 Armon Dadgar + +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. + += vendor/github.com/armon/circbuf/LICENSE d2d77030c0183e3d1e66d26dc1f243be +================================================================================ + + +================================================================================ += vendor/github.com/asaskevich/govalidator licensed under: = + +The MIT License (MIT) + +Copyright (c) 2014 Alex Saskevich + +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. += vendor/github.com/asaskevich/govalidator/LICENSE 9548240229052f3a5f5bdf14ac19bbe3 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/aws licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/aws/awserr licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/aws/awsutil licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/aws/client licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/aws/client/metadata licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/aws/corehandlers licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/aws/credentials licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/aws/defaults licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/aws/ec2metadata licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/aws/endpoints licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/aws/request licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/aws/session licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/aws/signer/v4 licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/internal/shareddefaults licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/private/protocol licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/private/protocol/query licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/private/protocol/rest licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/service/autoscaling licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/service/ec2 licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/service/ecr licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/service/elb licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/service/elbv2 licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/service/kms licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/service/sts licensed under: = + + + 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. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-12-01/compute licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2016 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. + += vendor/github.com/Azure/azure-sdk-for-go/LICENSE cce6fd055830ca30ff78fdf077e870d6 +================================================================================ + + +================================================================================ += vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2016 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. + += vendor/github.com/Azure/azure-sdk-for-go/LICENSE cce6fd055830ca30ff78fdf077e870d6 +================================================================================ + + +================================================================================ += vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2016 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. + += vendor/github.com/Azure/azure-sdk-for-go/LICENSE cce6fd055830ca30ff78fdf077e870d6 +================================================================================ + + +================================================================================ += vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2016 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. + += vendor/github.com/Azure/azure-sdk-for-go/LICENSE cce6fd055830ca30ff78fdf077e870d6 +================================================================================ + + +================================================================================ += vendor/github.com/Azure/azure-sdk-for-go/storage licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2016 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. + += vendor/github.com/Azure/azure-sdk-for-go/LICENSE cce6fd055830ca30ff78fdf077e870d6 +================================================================================ + + +================================================================================ += vendor/github.com/Azure/azure-sdk-for-go/version licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2016 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. + += vendor/github.com/Azure/azure-sdk-for-go/LICENSE cce6fd055830ca30ff78fdf077e870d6 +================================================================================ + + +================================================================================ += vendor/github.com/Azure/go-ansiterm licensed under: = + +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. + += vendor/github.com/Azure/go-ansiterm/LICENSE 6000442264015a23894024af9930539b +================================================================================ + + +================================================================================ += vendor/github.com/Azure/go-ansiterm/winterm licensed under: = + +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. + += vendor/github.com/Azure/go-ansiterm/LICENSE 6000442264015a23894024af9930539b +================================================================================ + + +================================================================================ += vendor/github.com/Azure/go-autorest/autorest licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Microsoft Corporation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/Azure/go-autorest/LICENSE a250e5ac3848f2acadb5adcb9555c18b +================================================================================ + + +================================================================================ += vendor/github.com/Azure/go-autorest/autorest/adal licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Microsoft Corporation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/Azure/go-autorest/LICENSE a250e5ac3848f2acadb5adcb9555c18b +================================================================================ + + +================================================================================ += vendor/github.com/Azure/go-autorest/autorest/azure licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Microsoft Corporation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/Azure/go-autorest/LICENSE a250e5ac3848f2acadb5adcb9555c18b +================================================================================ + + +================================================================================ += vendor/github.com/Azure/go-autorest/autorest/date licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Microsoft Corporation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/Azure/go-autorest/LICENSE a250e5ac3848f2acadb5adcb9555c18b +================================================================================ + + +================================================================================ += vendor/github.com/Azure/go-autorest/autorest/to licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Microsoft Corporation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/Azure/go-autorest/LICENSE a250e5ac3848f2acadb5adcb9555c18b +================================================================================ + + +================================================================================ += vendor/github.com/Azure/go-autorest/autorest/validation licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Microsoft Corporation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/Azure/go-autorest/LICENSE a250e5ac3848f2acadb5adcb9555c18b +================================================================================ + + +================================================================================ += vendor/github.com/bazelbuild/bazel-gazelle/cmd/gazelle licensed under: = + + + 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. + += vendor/github.com/bazelbuild/bazel-gazelle/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/bazelbuild/bazel-gazelle/internal/config licensed under: = + + + 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. + += vendor/github.com/bazelbuild/bazel-gazelle/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/bazelbuild/bazel-gazelle/internal/label licensed under: = + + + 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. + += vendor/github.com/bazelbuild/bazel-gazelle/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/bazelbuild/bazel-gazelle/internal/merger licensed under: = + + + 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. + += vendor/github.com/bazelbuild/bazel-gazelle/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/bazelbuild/bazel-gazelle/internal/packages licensed under: = + + + 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. + += vendor/github.com/bazelbuild/bazel-gazelle/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/bazelbuild/bazel-gazelle/internal/pathtools licensed under: = + + + 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. + += vendor/github.com/bazelbuild/bazel-gazelle/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/bazelbuild/bazel-gazelle/internal/repos licensed under: = + + + 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. + += vendor/github.com/bazelbuild/bazel-gazelle/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/bazelbuild/bazel-gazelle/internal/resolve licensed under: = + + + 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. + += vendor/github.com/bazelbuild/bazel-gazelle/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/bazelbuild/bazel-gazelle/internal/rules licensed under: = + + + 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. + += vendor/github.com/bazelbuild/bazel-gazelle/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/bazelbuild/bazel-gazelle/internal/version licensed under: = + + + 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. + += vendor/github.com/bazelbuild/bazel-gazelle/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/bazelbuild/bazel-gazelle/internal/wspace licensed under: = + + + 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. + += vendor/github.com/bazelbuild/bazel-gazelle/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/bazelbuild/buildtools/build licensed under: = + +Copyright 2016 Google Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + += vendor/github.com/bazelbuild/buildtools/LICENSE adb52eb384caedba181cd51fbcdf4b99 +================================================================================ + + +================================================================================ += vendor/github.com/bazelbuild/buildtools/tables licensed under: = + +Copyright 2016 Google Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + += vendor/github.com/bazelbuild/buildtools/LICENSE adb52eb384caedba181cd51fbcdf4b99 +================================================================================ + + +================================================================================ += vendor/github.com/beorn7/perks/quantile licensed under: = + +Copyright (C) 2013 Blake Mizerany + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + += vendor/github.com/beorn7/perks/LICENSE 0d0738f37ee8dc0b5f88a32e83c60198 +================================================================================ + + +================================================================================ += vendor/github.com/blang/semver licensed under: = + +The MIT License + +Copyright (c) 2014 Benedikt Lang + +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. + + += vendor/github.com/blang/semver/LICENSE 5a3ade42a900439691ebc22013660cae +================================================================================ + + +================================================================================ += vendor/github.com/chai2010/gettext-go/gettext licensed under: = + +Copyright 2013 ChaiShushan . All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/chai2010/gettext-go/LICENSE 87ce3ee0376881b02e75d3d5be2a6ba6 +================================================================================ + + +================================================================================ += vendor/github.com/chai2010/gettext-go/gettext/mo licensed under: = + +Copyright 2013 ChaiShushan . All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/chai2010/gettext-go/LICENSE 87ce3ee0376881b02e75d3d5be2a6ba6 +================================================================================ + + +================================================================================ += vendor/github.com/chai2010/gettext-go/gettext/plural licensed under: = + +Copyright 2013 ChaiShushan . All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/chai2010/gettext-go/LICENSE 87ce3ee0376881b02e75d3d5be2a6ba6 +================================================================================ + + +================================================================================ += vendor/github.com/chai2010/gettext-go/gettext/po licensed under: = + +Copyright 2013 ChaiShushan . All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/chai2010/gettext-go/LICENSE 87ce3ee0376881b02e75d3d5be2a6ba6 +================================================================================ + + +================================================================================ += vendor/github.com/client9/misspell licensed under: = + +The MIT License (MIT) + +Copyright (c) 2015-2017 Nick Galbreath + +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. + + += vendor/github.com/client9/misspell/LICENSE 387f6b7d6741c8a7f4f7e3c2bbdf97e4 +================================================================================ + + +================================================================================ += vendor/github.com/client9/misspell/cmd/misspell licensed under: = + +The MIT License (MIT) + +Copyright (c) 2015-2017 Nick Galbreath + +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. + + += vendor/github.com/client9/misspell/LICENSE 387f6b7d6741c8a7f4f7e3c2bbdf97e4 +================================================================================ + + +================================================================================ += vendor/github.com/cloudflare/cfssl/auth licensed under: = + +Copyright (c) 2014 CloudFlare Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 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. + += vendor/github.com/cloudflare/cfssl/LICENSE 9bd1e7022303d9bbc29fda142f3e4fd0 +================================================================================ + + +================================================================================ += vendor/github.com/cloudflare/cfssl/certdb licensed under: = + +Copyright (c) 2014 CloudFlare Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 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. + += vendor/github.com/cloudflare/cfssl/LICENSE 9bd1e7022303d9bbc29fda142f3e4fd0 +================================================================================ + + +================================================================================ += vendor/github.com/cloudflare/cfssl/config licensed under: = + +Copyright (c) 2014 CloudFlare Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 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. + += vendor/github.com/cloudflare/cfssl/LICENSE 9bd1e7022303d9bbc29fda142f3e4fd0 +================================================================================ + + +================================================================================ += vendor/github.com/cloudflare/cfssl/crypto/pkcs7 licensed under: = + +Copyright (c) 2014 CloudFlare Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 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. + += vendor/github.com/cloudflare/cfssl/LICENSE 9bd1e7022303d9bbc29fda142f3e4fd0 +================================================================================ + + +================================================================================ += vendor/github.com/cloudflare/cfssl/csr licensed under: = + +Copyright (c) 2014 CloudFlare Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 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. + += vendor/github.com/cloudflare/cfssl/LICENSE 9bd1e7022303d9bbc29fda142f3e4fd0 +================================================================================ + + +================================================================================ += vendor/github.com/cloudflare/cfssl/errors licensed under: = + +Copyright (c) 2014 CloudFlare Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 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. + += vendor/github.com/cloudflare/cfssl/LICENSE 9bd1e7022303d9bbc29fda142f3e4fd0 +================================================================================ + + +================================================================================ += vendor/github.com/cloudflare/cfssl/helpers licensed under: = + +Copyright (c) 2014 CloudFlare Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 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. + += vendor/github.com/cloudflare/cfssl/LICENSE 9bd1e7022303d9bbc29fda142f3e4fd0 +================================================================================ + + +================================================================================ += vendor/github.com/cloudflare/cfssl/helpers/derhelpers licensed under: = + +Copyright (c) 2014 CloudFlare Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 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. + += vendor/github.com/cloudflare/cfssl/LICENSE 9bd1e7022303d9bbc29fda142f3e4fd0 +================================================================================ + + +================================================================================ += vendor/github.com/cloudflare/cfssl/info licensed under: = + +Copyright (c) 2014 CloudFlare Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 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. + += vendor/github.com/cloudflare/cfssl/LICENSE 9bd1e7022303d9bbc29fda142f3e4fd0 +================================================================================ + + +================================================================================ += vendor/github.com/cloudflare/cfssl/log licensed under: = + +Copyright (c) 2014 CloudFlare Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 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. + += vendor/github.com/cloudflare/cfssl/LICENSE 9bd1e7022303d9bbc29fda142f3e4fd0 +================================================================================ + + +================================================================================ += vendor/github.com/cloudflare/cfssl/ocsp/config licensed under: = + +Copyright (c) 2014 CloudFlare Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 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. + += vendor/github.com/cloudflare/cfssl/LICENSE 9bd1e7022303d9bbc29fda142f3e4fd0 +================================================================================ + + +================================================================================ += vendor/github.com/cloudflare/cfssl/signer licensed under: = + +Copyright (c) 2014 CloudFlare Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 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. + += vendor/github.com/cloudflare/cfssl/LICENSE 9bd1e7022303d9bbc29fda142f3e4fd0 +================================================================================ + + +================================================================================ += vendor/github.com/cloudflare/cfssl/signer/local licensed under: = + +Copyright (c) 2014 CloudFlare Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 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. + += vendor/github.com/cloudflare/cfssl/LICENSE 9bd1e7022303d9bbc29fda142f3e4fd0 +================================================================================ + + +================================================================================ += vendor/github.com/clusterhq/flocker-go licensed under: = + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014-2016 ClusterHQ + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/clusterhq/flocker-go/LICENSE d8103d9796cd0e951379d0834edad066 +================================================================================ + + +================================================================================ += vendor/github.com/cockroachdb/cmux licensed under: = + + + 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. + += vendor/github.com/cockroachdb/cmux/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/codedellemc/goscaleio licensed under: = + +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. + + += vendor/github.com/codedellemc/goscaleio/LICENSE d2794c0df5b907fdace235a619d80314 +================================================================================ + + +================================================================================ += vendor/github.com/codedellemc/goscaleio/types/v1 licensed under: = + +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. + + += vendor/github.com/codedellemc/goscaleio/LICENSE d2794c0df5b907fdace235a619d80314 +================================================================================ + + +================================================================================ += vendor/github.com/container-storage-interface/spec/lib/go/csi/v0 licensed under: = + + 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. + += vendor/github.com/container-storage-interface/spec/LICENSE e3fc50a88d0a364313df4b21ef20c29e +================================================================================ + + +================================================================================ += vendor/github.com/containerd/console licensed under: = + + 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. + += vendor/github.com/containerd/console/LICENSE 86d3f3a95c324c9479bd8986968f4327 +================================================================================ + + +================================================================================ += vendor/github.com/containerd/containerd/api/services/containers/v1 licensed under: = + + + 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-2016 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. + += vendor/github.com/containerd/containerd/LICENSE.code aadc30f9c14d876ded7bedc0afd2d3d7 +================================================================================ + + +================================================================================ += vendor/github.com/containerd/containerd/api/services/tasks/v1 licensed under: = + + + 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-2016 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. + += vendor/github.com/containerd/containerd/LICENSE.code aadc30f9c14d876ded7bedc0afd2d3d7 +================================================================================ + + +================================================================================ += vendor/github.com/containerd/containerd/api/services/version/v1 licensed under: = + + + 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-2016 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. + += vendor/github.com/containerd/containerd/LICENSE.code aadc30f9c14d876ded7bedc0afd2d3d7 +================================================================================ + + +================================================================================ += vendor/github.com/containerd/containerd/api/types licensed under: = + + + 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-2016 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. + += vendor/github.com/containerd/containerd/LICENSE.code aadc30f9c14d876ded7bedc0afd2d3d7 +================================================================================ + + +================================================================================ += vendor/github.com/containerd/containerd/api/types/task licensed under: = + + + 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-2016 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. + += vendor/github.com/containerd/containerd/LICENSE.code aadc30f9c14d876ded7bedc0afd2d3d7 +================================================================================ + + +================================================================================ += vendor/github.com/containerd/containerd/containers licensed under: = + + + 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-2016 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. + += vendor/github.com/containerd/containerd/LICENSE.code aadc30f9c14d876ded7bedc0afd2d3d7 +================================================================================ + + +================================================================================ += vendor/github.com/containerd/containerd/dialer licensed under: = + + + 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-2016 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. + += vendor/github.com/containerd/containerd/LICENSE.code aadc30f9c14d876ded7bedc0afd2d3d7 +================================================================================ + + +================================================================================ += vendor/github.com/containerd/containerd/errdefs licensed under: = + + + 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-2016 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. + += vendor/github.com/containerd/containerd/LICENSE.code aadc30f9c14d876ded7bedc0afd2d3d7 +================================================================================ + + +================================================================================ += vendor/github.com/containerd/containerd/namespaces licensed under: = + + + 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-2016 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. + += vendor/github.com/containerd/containerd/LICENSE.code aadc30f9c14d876ded7bedc0afd2d3d7 +================================================================================ + + +================================================================================ += vendor/github.com/containernetworking/cni/libcni licensed under: = + + 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. + + += vendor/github.com/containernetworking/cni/LICENSE fa818a259cbed7ce8bc2a22d35a464fc +================================================================================ + + +================================================================================ += vendor/github.com/containernetworking/cni/pkg/invoke licensed under: = + + 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. + + += vendor/github.com/containernetworking/cni/LICENSE fa818a259cbed7ce8bc2a22d35a464fc +================================================================================ + + +================================================================================ += vendor/github.com/containernetworking/cni/pkg/types licensed under: = + + 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. + + += vendor/github.com/containernetworking/cni/LICENSE fa818a259cbed7ce8bc2a22d35a464fc +================================================================================ + + +================================================================================ += vendor/github.com/containernetworking/cni/pkg/types/020 licensed under: = + + 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. + + += vendor/github.com/containernetworking/cni/LICENSE fa818a259cbed7ce8bc2a22d35a464fc +================================================================================ + + +================================================================================ += vendor/github.com/containernetworking/cni/pkg/types/current licensed under: = + + 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. + + += vendor/github.com/containernetworking/cni/LICENSE fa818a259cbed7ce8bc2a22d35a464fc +================================================================================ + + +================================================================================ += vendor/github.com/containernetworking/cni/pkg/version licensed under: = + + 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. + + += vendor/github.com/containernetworking/cni/LICENSE fa818a259cbed7ce8bc2a22d35a464fc +================================================================================ + + +================================================================================ += vendor/github.com/coreos/bbolt licensed under: = + +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. + += vendor/github.com/coreos/bbolt/LICENSE 13b2a308eefa10d841e3bf2467dbe07a +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/alarm licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/auth licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/auth/authpb licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/client licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/clientv3 licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/clientv3/concurrency licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/clientv3/namespace licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/clientv3/naming licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/compactor licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/discovery licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/embed licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/error licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/etcdserver licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/etcdserver/api licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/etcdserver/api/etcdhttp licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/etcdserver/api/v2http licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/etcdserver/api/v2http/httptypes licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/etcdserver/api/v3client licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/etcdserver/api/v3election licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb/gw licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/etcdserver/api/v3lock licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb/gw licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/etcdserver/api/v3rpc licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/etcdserver/auth licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/etcdserver/etcdserverpb licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/gw licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/etcdserver/membership licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/etcdserver/stats licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/integration licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/lease licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/lease/leasehttp licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/lease/leasepb licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/mvcc licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/mvcc/backend licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/mvcc/mvccpb licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/adt licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/contention licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/cors licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/cpuutil licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/crc licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/debugutil licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/fileutil licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/httputil licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/idutil licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/ioutil licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/logutil licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/monotime licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/netutil licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/pathutil licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/pbutil licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/runtime licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/schedule licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/srv licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/testutil licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/tlsutil licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/transport licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/types licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/pkg/wait licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/proxy/grpcproxy licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/proxy/grpcproxy/cache licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/raft licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/raft/raftpb licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/rafthttp licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/snap licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/snap/snappb licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/store licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/version licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/wal licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/etcd/wal/walpb licensed under: = + + + 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. + += vendor/github.com/coreos/etcd/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/go-oidc licensed under: = + +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. + + += vendor/github.com/coreos/go-oidc/LICENSE d2794c0df5b907fdace235a619d80314 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/go-semver/semver licensed under: = + + + 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. + += vendor/github.com/coreos/go-semver/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/go-systemd/daemon licensed under: = + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [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. + += vendor/github.com/coreos/go-systemd/LICENSE 19cbd64715b51267a47bf3750cc6a8a5 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/go-systemd/dbus licensed under: = + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [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. + += vendor/github.com/coreos/go-systemd/LICENSE 19cbd64715b51267a47bf3750cc6a8a5 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/go-systemd/journal licensed under: = + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [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. + += vendor/github.com/coreos/go-systemd/LICENSE 19cbd64715b51267a47bf3750cc6a8a5 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/go-systemd/util licensed under: = + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [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. + += vendor/github.com/coreos/go-systemd/LICENSE 19cbd64715b51267a47bf3750cc6a8a5 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/pkg/capnslog licensed under: = + +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. + + += vendor/github.com/coreos/pkg/LICENSE d2794c0df5b907fdace235a619d80314 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/pkg/dlopen licensed under: = + +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. + + += vendor/github.com/coreos/pkg/LICENSE d2794c0df5b907fdace235a619d80314 +================================================================================ + + +================================================================================ += vendor/github.com/coreos/rkt/api/v1alpha licensed under: = + +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. + += vendor/github.com/coreos/rkt/LICENSE 136e4f49dbf29942c572a3a8f6e88a77 +================================================================================ + + +================================================================================ += vendor/github.com/cpuguy83/go-md2man/md2man licensed under: = + +The MIT License (MIT) + +Copyright (c) 2014 Brian Goff + +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. + += vendor/github.com/cpuguy83/go-md2man/LICENSE.md 80794f9009df723bbc6fe19234c9f517 +================================================================================ + + +================================================================================ += vendor/github.com/cyphar/filepath-securejoin licensed under: = + +Copyright (C) 2014-2015 Docker Inc & Go Authors. All rights reserved. +Copyright (C) 2017 SUSE LLC. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/cyphar/filepath-securejoin/LICENSE 8d322afab99e1998dbfcc712f94e824d +================================================================================ + + +================================================================================ += vendor/github.com/d2g/dhcp4 licensed under: = + +Copyright (c) 2013 Skagerrak Software Limited. 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 Skagerrak Software Limited 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. += vendor/github.com/d2g/dhcp4/LICENSE 0187683301a45e8ea393bb2ffd7889c8 +================================================================================ + + +================================================================================ += vendor/github.com/d2g/dhcp4client licensed under: = + +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. + + += vendor/github.com/d2g/dhcp4client/LICENSE b278a92d2c1509760384428817710378 +================================================================================ + + +================================================================================ += vendor/github.com/davecgh/go-spew/spew licensed under: = + +ISC License + +Copyright (c) 2012-2016 Dave Collins + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + += vendor/github.com/davecgh/go-spew/LICENSE 818c0a1d81cfcfdb7ecd58db268bab7e +================================================================================ + + +================================================================================ += vendor/github.com/daviddengcn/go-colortext licensed under: = + +BSD License +=========== + +Copyright (c) 2016, David Deng +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 go-colortext 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. + + +MIT License +=========== + +Copyright (c) 2016 David Deng + +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. + += vendor/github.com/daviddengcn/go-colortext/LICENSE a802db7d9a036fb71c12cf20966510dc +================================================================================ + + +================================================================================ += vendor/github.com/dgrijalva/jwt-go licensed under: = + +Copyright (c) 2012 Dave Grijalva + +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. + + += vendor/github.com/dgrijalva/jwt-go/LICENSE 276f2f3ba3749d25f6a6f5fb852d462e +================================================================================ + + +================================================================================ += vendor/github.com/docker/distribution/digestset licensed under: = + +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. + + += vendor/github.com/docker/distribution/LICENSE d2794c0df5b907fdace235a619d80314 +================================================================================ + + +================================================================================ += vendor/github.com/docker/distribution/reference licensed under: = + +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. + + += vendor/github.com/docker/distribution/LICENSE d2794c0df5b907fdace235a619d80314 +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/api licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/api/types licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/api/types/blkiodev licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/api/types/container licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/api/types/events licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/api/types/filters licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/api/types/image licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/api/types/mount licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/api/types/network licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/api/types/registry licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/api/types/strslice licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/api/types/swarm licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/api/types/swarm/runtime licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/api/types/time licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/api/types/versions licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/api/types/volume licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/client licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/pkg/ioutils licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/pkg/jsonlog licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/pkg/jsonmessage licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/pkg/longpath licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/pkg/mount licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/pkg/parsers licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/pkg/parsers/operatingsystem licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/pkg/stdcopy licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/pkg/sysinfo licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/pkg/system licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/pkg/term licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/pkg/term/windows licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/docker/pkg/tlsconfig licensed under: = + + + 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. + += vendor/github.com/docker/docker/LICENSE 9740d093a080530b5c5c6573df9af45a +================================================================================ + + +================================================================================ += vendor/github.com/docker/go-connections/nat licensed under: = + + + 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 2015 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. + += vendor/github.com/docker/go-connections/LICENSE 04424bc6f5a5be60691b9824d65c2ad8 +================================================================================ + + +================================================================================ += vendor/github.com/docker/go-connections/sockets licensed under: = + + + 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 2015 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. + += vendor/github.com/docker/go-connections/LICENSE 04424bc6f5a5be60691b9824d65c2ad8 +================================================================================ + + +================================================================================ += vendor/github.com/docker/go-connections/tlsconfig licensed under: = + + + 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 2015 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. + += vendor/github.com/docker/go-connections/LICENSE 04424bc6f5a5be60691b9824d65c2ad8 +================================================================================ + + +================================================================================ += vendor/github.com/docker/go-units licensed under: = + + + 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 2015 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. + += vendor/github.com/docker/go-units/LICENSE 04424bc6f5a5be60691b9824d65c2ad8 +================================================================================ + + +================================================================================ += vendor/github.com/docker/libnetwork/ipvs licensed under: = + +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. + + += vendor/github.com/docker/libnetwork/LICENSE d2794c0df5b907fdace235a619d80314 +================================================================================ + + +================================================================================ += vendor/github.com/docker/libtrust licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/docker/libtrust/LICENSE 435b266b3899aa8a959f17d41c56def8 +================================================================================ + + +================================================================================ += vendor/github.com/docker/spdystream licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014-2015 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/docker/spdystream/LICENSE 246dc1c1661293602d98ff9113c3be48 +================================================================================ + + +================================================================================ += vendor/github.com/docker/spdystream/spdy licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014-2015 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/docker/spdystream/LICENSE 246dc1c1661293602d98ff9113c3be48 +================================================================================ + + +================================================================================ += vendor/github.com/elazarl/go-bindata-assetfs licensed under: = + +Copyright (c) 2014, Elazar Leibovich +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/elazarl/go-bindata-assetfs/LICENSE 722abb44e97dc8f098516e09e5564a6a +================================================================================ + + +================================================================================ += vendor/github.com/elazarl/goproxy licensed under: = + +Copyright (c) 2012 Elazar Leibovich. 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 Elazar Leibovich. 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. + += vendor/github.com/elazarl/goproxy/LICENSE e2e14e5f5bd856768da39707ed93cd41 +================================================================================ + + +================================================================================ += vendor/github.com/emicklei/go-restful licensed under: = + +Copyright (c) 2012,2013 Ernest Micklei + +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. += vendor/github.com/emicklei/go-restful/LICENSE 2ebc1c12a0f4eae5394522e31961e1de +================================================================================ + + +================================================================================ += vendor/github.com/emicklei/go-restful-swagger12 licensed under: = + +Copyright (c) 2017 Ernest Micklei + +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. += vendor/github.com/emicklei/go-restful-swagger12/LICENSE b1ce415d97e837c8677d332b274d4f0b +================================================================================ + + +================================================================================ += vendor/github.com/emicklei/go-restful/log licensed under: = + +Copyright (c) 2012,2013 Ernest Micklei + +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. += vendor/github.com/emicklei/go-restful/LICENSE 2ebc1c12a0f4eae5394522e31961e1de +================================================================================ + + +================================================================================ += vendor/github.com/euank/go-kmsg-parser/kmsgparser licensed under: = + + 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. + += vendor/github.com/euank/go-kmsg-parser/LICENSE e3fc50a88d0a364313df4b21ef20c29e +================================================================================ + + +================================================================================ += vendor/github.com/evanphx/json-patch licensed under: = + +Copyright (c) 2014, Evan Phoenix +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 Evan Phoenix 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. + += vendor/github.com/evanphx/json-patch/LICENSE 72c842ec53c3334a81b6d65b6f9025a3 +================================================================================ + + +================================================================================ += vendor/github.com/exponent-io/jsonpath licensed under: = + +The MIT License (MIT) + +Copyright (c) 2015 Exponent Labs LLC + +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. + += vendor/github.com/exponent-io/jsonpath/LICENSE 42f582355f11b1d4bc8615214b7f0c38 +================================================================================ + + +================================================================================ += vendor/github.com/fatih/camelcase licensed under: = + +The MIT License (MIT) + +Copyright (c) 2015 Fatih Arslan + +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. + += vendor/github.com/fatih/camelcase/LICENSE.md 4c59b216ce25dc182cdb837e07ba07c0 +================================================================================ + + +================================================================================ += vendor/github.com/fsnotify/fsnotify licensed under: = + +Copyright (c) 2012 The Go Authors. All rights reserved. +Copyright (c) 2012 fsnotify Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/fsnotify/fsnotify/LICENSE c38914c9a7ab03bb2b96d4baaee10769 +================================================================================ + + +================================================================================ += vendor/github.com/ghodss/yaml licensed under: = + +The MIT License (MIT) + +Copyright (c) 2014 Sam Ghods + +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. + + +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/ghodss/yaml/LICENSE 0ceb9ff3b27d3a8cf451ca3785d73c71 +================================================================================ + + +================================================================================ += vendor/github.com/go-ini/ini licensed under: = + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [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. + += vendor/github.com/go-ini/ini/LICENSE 19cbd64715b51267a47bf3750cc6a8a5 +================================================================================ + + +================================================================================ += vendor/github.com/go-openapi/analysis licensed under: = + + + 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. + += vendor/github.com/go-openapi/analysis/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/go-openapi/errors licensed under: = + + + 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. + += vendor/github.com/go-openapi/errors/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/go-openapi/jsonpointer licensed under: = + + + 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. + += vendor/github.com/go-openapi/jsonpointer/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/go-openapi/jsonreference licensed under: = + + + 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. + += vendor/github.com/go-openapi/jsonreference/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/go-openapi/loads licensed under: = + + + 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. + += vendor/github.com/go-openapi/loads/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/go-openapi/runtime licensed under: = + + + 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. + += vendor/github.com/go-openapi/runtime/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/go-openapi/spec licensed under: = + + + 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. + += vendor/github.com/go-openapi/spec/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/go-openapi/strfmt licensed under: = + + + 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. + += vendor/github.com/go-openapi/strfmt/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/go-openapi/swag licensed under: = + + + 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. + += vendor/github.com/go-openapi/swag/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/go-openapi/validate licensed under: = + + + 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. + += vendor/github.com/go-openapi/validate/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/godbus/dbus licensed under: = + +Copyright (c) 2013, Georg Reinke (), Google +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +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. + += vendor/github.com/godbus/dbus/LICENSE 09042bd5c6c96a2b9e45ddf1bc517eed +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/gogoproto licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/plugin/compare licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/plugin/defaultcheck licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/plugin/description licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/plugin/embedcheck licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/plugin/enumstringer licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/plugin/equal licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/plugin/face licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/plugin/gostring licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/plugin/marshalto licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/plugin/oneofcheck licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/plugin/populate licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/plugin/size licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/plugin/stringer licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/plugin/testgen licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/plugin/union licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/plugin/unmarshal licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/proto licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/protoc-gen-gogo/grpc licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/sortkeys licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/types licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/vanity licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/gogo/protobuf/vanity/command licensed under: = + +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 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. + + += vendor/github.com/gogo/protobuf/LICENSE f76ab0572aa28f537b1508f2f2bc155e +================================================================================ + + +================================================================================ += vendor/github.com/golang/glog licensed under: = + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [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. + += vendor/github.com/golang/glog/LICENSE 19cbd64715b51267a47bf3750cc6a8a5 +================================================================================ + + +================================================================================ += vendor/github.com/golang/groupcache/lru licensed under: = + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [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. + += vendor/github.com/golang/groupcache/LICENSE 19cbd64715b51267a47bf3750cc6a8a5 +================================================================================ + + +================================================================================ += vendor/github.com/golang/mock/gomock licensed under: = + + + 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. + += vendor/github.com/golang/mock/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/golang/protobuf/jsonpb licensed under: = + +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. + + += vendor/github.com/golang/protobuf/LICENSE 14db3a56c3796a940ba32948a15f97d0 +================================================================================ + + +================================================================================ += vendor/github.com/golang/protobuf/proto licensed under: = + +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. + + += vendor/github.com/golang/protobuf/LICENSE 14db3a56c3796a940ba32948a15f97d0 +================================================================================ + + +================================================================================ += vendor/github.com/golang/protobuf/protoc-gen-go/descriptor licensed under: = + +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. + + += vendor/github.com/golang/protobuf/LICENSE 14db3a56c3796a940ba32948a15f97d0 +================================================================================ + + +================================================================================ += vendor/github.com/golang/protobuf/ptypes licensed under: = + +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. + + += vendor/github.com/golang/protobuf/LICENSE 14db3a56c3796a940ba32948a15f97d0 +================================================================================ + + +================================================================================ += vendor/github.com/golang/protobuf/ptypes/any licensed under: = + +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. + + += vendor/github.com/golang/protobuf/LICENSE 14db3a56c3796a940ba32948a15f97d0 +================================================================================ + + +================================================================================ += vendor/github.com/golang/protobuf/ptypes/duration licensed under: = + +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. + + += vendor/github.com/golang/protobuf/LICENSE 14db3a56c3796a940ba32948a15f97d0 +================================================================================ + + +================================================================================ += vendor/github.com/golang/protobuf/ptypes/struct licensed under: = + +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. + + += vendor/github.com/golang/protobuf/LICENSE 14db3a56c3796a940ba32948a15f97d0 +================================================================================ + + +================================================================================ += vendor/github.com/golang/protobuf/ptypes/timestamp licensed under: = + +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. + + += vendor/github.com/golang/protobuf/LICENSE 14db3a56c3796a940ba32948a15f97d0 +================================================================================ + + +================================================================================ += vendor/github.com/golang/protobuf/ptypes/wrappers licensed under: = + +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. + + += vendor/github.com/golang/protobuf/LICENSE 14db3a56c3796a940ba32948a15f97d0 +================================================================================ + + +================================================================================ += vendor/github.com/google/btree licensed under: = + + + 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. + += vendor/github.com/google/btree/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/accelerators licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/api licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/cache/memory licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/client/v2 licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/collector licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/container licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/container/common licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/container/containerd licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/container/crio licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/container/docker licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/container/libcontainer licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/container/raw licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/container/rkt licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/container/systemd licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/devicemapper licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/events licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/fs licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/healthz licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/http licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/http/mux licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/info/v1 licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/info/v2 licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/machine licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/manager licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/manager/watcher licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/manager/watcher/raw licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/manager/watcher/rkt licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/metrics licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/pages licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/pages/static licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/storage licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/summary licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/utils licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/utils/cloudinfo licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/utils/cpuload licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/utils/cpuload/netlink licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/utils/docker licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/utils/oomparser licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/utils/sysfs licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/utils/sysinfo licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/validate licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/version licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/cadvisor/zfs licensed under: = + + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + 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 + += vendor/github.com/google/cadvisor/LICENSE e7790b946bfacb700e8a8f2baedb3205 +================================================================================ + + +================================================================================ += vendor/github.com/google/certificate-transparency-go licensed under: = + + + 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. + += vendor/github.com/google/certificate-transparency-go/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/google/certificate-transparency-go/asn1 licensed under: = + + + 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. + += vendor/github.com/google/certificate-transparency-go/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/google/certificate-transparency-go/client licensed under: = + + + 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. + += vendor/github.com/google/certificate-transparency-go/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/google/certificate-transparency-go/client/configpb licensed under: = + + + 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. + += vendor/github.com/google/certificate-transparency-go/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/google/certificate-transparency-go/jsonclient licensed under: = + + + 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. + += vendor/github.com/google/certificate-transparency-go/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/google/certificate-transparency-go/tls licensed under: = + + + 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. + += vendor/github.com/google/certificate-transparency-go/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/google/certificate-transparency-go/x509 licensed under: = + + + 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. + += vendor/github.com/google/certificate-transparency-go/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/google/certificate-transparency-go/x509/pkix licensed under: = + + + 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. + += vendor/github.com/google/certificate-transparency-go/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/google/gofuzz licensed under: = + + + 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. + += vendor/github.com/google/gofuzz/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/google/uuid licensed under: = + +Copyright (c) 2009,2014 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/google/uuid/LICENSE 88073b6dd8ec00fe09da59e0b6dfded1 +================================================================================ + + +================================================================================ += vendor/github.com/googleapis/gnostic/compiler licensed under: = + + + 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. + + += vendor/github.com/googleapis/gnostic/LICENSE b1e01b26bacfc2232046c90a330332b3 +================================================================================ + + +================================================================================ += vendor/github.com/googleapis/gnostic/extensions licensed under: = + + + 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. + + += vendor/github.com/googleapis/gnostic/LICENSE b1e01b26bacfc2232046c90a330332b3 +================================================================================ + + +================================================================================ += vendor/github.com/googleapis/gnostic/OpenAPIv2 licensed under: = + + + 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. + + += vendor/github.com/googleapis/gnostic/LICENSE b1e01b26bacfc2232046c90a330332b3 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/extensions/volumeactions licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v1/volumes licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v2/volumes licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v3/volumes licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/common/extensions licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/attachinterfaces licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/volumeattach licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/flavors licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/images licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/identity/v2/tenants licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/identity/v2/tokens licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/identity/v3/extensions/trusts licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/external licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/listeners licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/loadbalancers licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/monitors licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/pools licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/groups licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/rules licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/networks licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/ports licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/openstack/utils licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gophercloud/gophercloud/pagination licensed under: = + +Copyright 2012-2013 Rackspace, 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. + +------ + + 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 + += vendor/github.com/gophercloud/gophercloud/LICENSE dd19699707373c2ca31531a659130416 +================================================================================ + + +================================================================================ += vendor/github.com/gorilla/websocket licensed under: = + +Copyright (c) 2013 The Gorilla WebSocket Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/gorilla/websocket/LICENSE c007b54a1743d596f46b2748d9f8c044 +================================================================================ + + +================================================================================ += vendor/github.com/gregjones/httpcache licensed under: = + +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. += vendor/github.com/gregjones/httpcache/LICENSE.txt 3cfef421226b2dacde78a4871380ac24 +================================================================================ + + +================================================================================ += vendor/github.com/gregjones/httpcache/diskcache licensed under: = + +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. += vendor/github.com/gregjones/httpcache/LICENSE.txt 3cfef421226b2dacde78a4871380ac24 +================================================================================ + + +================================================================================ += vendor/github.com/grpc-ecosystem/go-grpc-prometheus licensed under: = + + 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. += vendor/github.com/grpc-ecosystem/go-grpc-prometheus/LICENSE 7ab5c73bb7e4679b16dd7c11b3559acf +================================================================================ + + +================================================================================ += vendor/github.com/grpc-ecosystem/grpc-gateway/runtime licensed under: = + +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. + += vendor/github.com/grpc-ecosystem/grpc-gateway/LICENSE.txt c510a2a01572b82d27f28fd4d02ca318 +================================================================================ + + +================================================================================ += vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/internal licensed under: = + +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. + += vendor/github.com/grpc-ecosystem/grpc-gateway/LICENSE.txt c510a2a01572b82d27f28fd4d02ca318 +================================================================================ + + +================================================================================ += vendor/github.com/grpc-ecosystem/grpc-gateway/utilities licensed under: = + +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. + += vendor/github.com/grpc-ecosystem/grpc-gateway/LICENSE.txt c510a2a01572b82d27f28fd4d02ca318 +================================================================================ + + +================================================================================ += vendor/github.com/hashicorp/golang-lru licensed under: = + +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. + += vendor/github.com/hashicorp/golang-lru/LICENSE f27a50d2e878867827842f2c60e30bfc +================================================================================ + + +================================================================================ += vendor/github.com/hashicorp/golang-lru/simplelru licensed under: = + +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. + += vendor/github.com/hashicorp/golang-lru/LICENSE f27a50d2e878867827842f2c60e30bfc +================================================================================ + + +================================================================================ += vendor/github.com/hashicorp/hcl licensed under: = + +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. + + += vendor/github.com/hashicorp/hcl/LICENSE b278a92d2c1509760384428817710378 +================================================================================ + + +================================================================================ += vendor/github.com/hashicorp/hcl/hcl/ast licensed under: = + +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. + + += vendor/github.com/hashicorp/hcl/LICENSE b278a92d2c1509760384428817710378 +================================================================================ + + +================================================================================ += vendor/github.com/hashicorp/hcl/hcl/parser licensed under: = + +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. + + += vendor/github.com/hashicorp/hcl/LICENSE b278a92d2c1509760384428817710378 +================================================================================ + + +================================================================================ += vendor/github.com/hashicorp/hcl/hcl/scanner licensed under: = + +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. + + += vendor/github.com/hashicorp/hcl/LICENSE b278a92d2c1509760384428817710378 +================================================================================ + + +================================================================================ += vendor/github.com/hashicorp/hcl/hcl/strconv licensed under: = + +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. + + += vendor/github.com/hashicorp/hcl/LICENSE b278a92d2c1509760384428817710378 +================================================================================ + + +================================================================================ += vendor/github.com/hashicorp/hcl/hcl/token licensed under: = + +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. + + += vendor/github.com/hashicorp/hcl/LICENSE b278a92d2c1509760384428817710378 +================================================================================ + + +================================================================================ += vendor/github.com/hashicorp/hcl/json/parser licensed under: = + +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. + + += vendor/github.com/hashicorp/hcl/LICENSE b278a92d2c1509760384428817710378 +================================================================================ + + +================================================================================ += vendor/github.com/hashicorp/hcl/json/scanner licensed under: = + +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. + + += vendor/github.com/hashicorp/hcl/LICENSE b278a92d2c1509760384428817710378 +================================================================================ + + +================================================================================ += vendor/github.com/hashicorp/hcl/json/token licensed under: = + +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. + + += vendor/github.com/hashicorp/hcl/LICENSE b278a92d2c1509760384428817710378 +================================================================================ + + +================================================================================ += vendor/github.com/heketi/heketi/client/api/go-client licensed under: = + +Heketi code is released under various licenses: + +The REST API client code (in go and python) is released +under a dual license of Apache 2.0 or LGPLv3+. + +The other parts of heketi (server, cli, tests, ...) are released +under a dual license of LGPLv3+ or GPLv2. + += vendor/github.com/heketi/heketi/LICENSE a58e72c3bda574189508cb90d56fa19f +================================================================================ + + +================================================================================ += vendor/github.com/heketi/heketi/pkg/glusterfs/api licensed under: = + +Heketi code is released under various licenses: + +The REST API client code (in go and python) is released +under a dual license of Apache 2.0 or LGPLv3+. + +The other parts of heketi (server, cli, tests, ...) are released +under a dual license of LGPLv3+ or GPLv2. + += vendor/github.com/heketi/heketi/LICENSE a58e72c3bda574189508cb90d56fa19f +================================================================================ + + +================================================================================ += vendor/github.com/heketi/heketi/pkg/utils licensed under: = + +Heketi code is released under various licenses: + +The REST API client code (in go and python) is released +under a dual license of Apache 2.0 or LGPLv3+. + +The other parts of heketi (server, cli, tests, ...) are released +under a dual license of LGPLv3+ or GPLv2. + += vendor/github.com/heketi/heketi/LICENSE a58e72c3bda574189508cb90d56fa19f +================================================================================ + + +================================================================================ += vendor/github.com/imdario/mergo licensed under: = + +Copyright (c) 2013 Dario Castañé. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/imdario/mergo/LICENSE ff13e03bb57bf9c52645f2f942afa28b +================================================================================ + + +================================================================================ += vendor/github.com/inconshreveable/mousetrap licensed under: = + +Copyright 2014 Alan Shreve + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + += vendor/github.com/inconshreveable/mousetrap/LICENSE b23cff9db13f093a4e6ff77105cbd8eb +================================================================================ + + +================================================================================ += vendor/github.com/influxdata/influxdb/client/v2 licensed under: = + +The MIT License (MIT) + +Copyright (c) 2013-2016 Errplane Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + += vendor/github.com/influxdata/influxdb/LICENSE ba8146ad9cc2a128209983265136e06a +================================================================================ + + +================================================================================ += vendor/github.com/influxdata/influxdb/models licensed under: = + +The MIT License (MIT) + +Copyright (c) 2013-2016 Errplane Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + += vendor/github.com/influxdata/influxdb/LICENSE ba8146ad9cc2a128209983265136e06a +================================================================================ + + +================================================================================ += vendor/github.com/influxdata/influxdb/pkg/escape licensed under: = + +The MIT License (MIT) + +Copyright (c) 2013-2016 Errplane Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + += vendor/github.com/influxdata/influxdb/LICENSE ba8146ad9cc2a128209983265136e06a +================================================================================ + + +================================================================================ += vendor/github.com/JeffAshton/win_pdh licensed under: = + +Copyright (c) 2010 The win_pdh Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The names of the authors may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/JeffAshton/win_pdh/LICENSE fadcabe0503181faf8d4a9579bed3b7f +================================================================================ + + +================================================================================ += vendor/github.com/jmespath/go-jmespath licensed under: = + +Copyright 2015 James Saryerwinnie + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + += vendor/github.com/jmespath/go-jmespath/LICENSE 9abfa8353fce3f2cb28364e1e9016852 +================================================================================ + + +================================================================================ += vendor/github.com/jonboulle/clockwork licensed under: = + +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. + += vendor/github.com/jonboulle/clockwork/LICENSE 136e4f49dbf29942c572a3a8f6e88a77 +================================================================================ + + +================================================================================ += vendor/github.com/json-iterator/go licensed under: = + +MIT License + +Copyright (c) 2016 json-iterator + +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. + += vendor/github.com/json-iterator/go/LICENSE 0b69744b481d72d30dbf69f84a451cfd +================================================================================ + + +================================================================================ += vendor/github.com/jteeuwen/go-bindata licensed under: = + +This work is subject to the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication +license. Its contents can be found at: +http://creativecommons.org/publicdomain/zero/1.0 + += vendor/github.com/jteeuwen/go-bindata/LICENSE 8dcedca69f7a474372829521f37954b1 +================================================================================ + + +================================================================================ += vendor/github.com/jteeuwen/go-bindata/go-bindata licensed under: = + +This work is subject to the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication +license. Its contents can be found at: +http://creativecommons.org/publicdomain/zero/1.0 + += vendor/github.com/jteeuwen/go-bindata/LICENSE 8dcedca69f7a474372829521f37954b1 +================================================================================ + + +================================================================================ += vendor/github.com/kardianos/osext licensed under: = + +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/kardianos/osext/LICENSE 591778525c869cdde0ab5a1bf283cd81 +================================================================================ + + +================================================================================ += vendor/github.com/kr/fs licensed under: = + +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/kr/fs/LICENSE 591778525c869cdde0ab5a1bf283cd81 +================================================================================ + + +================================================================================ += vendor/github.com/kr/pretty licensed under: = + +The MIT License (MIT) + +Copyright 2012 Keith Rarick + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + += vendor/github.com/kr/pretty/License 9d305c2010c6891ee4f3cd42a562f78f +================================================================================ + + +================================================================================ += vendor/github.com/kr/text licensed under: = + +Copyright 2012 Keith Rarick + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + += vendor/github.com/kr/text/License 449bfedd81a372635934cf9ce004c0cf +================================================================================ + + +================================================================================ += vendor/github.com/kubernetes/repo-infra/kazel licensed under: = + + 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. + += vendor/github.com/kubernetes/repo-infra/LICENSE e3fc50a88d0a364313df4b21ef20c29e +================================================================================ + + +================================================================================ += vendor/github.com/libopenstorage/openstorage/api licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Openstorage.org. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/libopenstorage/openstorage/LICENSE 40c3e1c9eacda859a17048003909a2f8 +================================================================================ + + +================================================================================ += vendor/github.com/libopenstorage/openstorage/api/client licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Openstorage.org. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/libopenstorage/openstorage/LICENSE 40c3e1c9eacda859a17048003909a2f8 +================================================================================ + + +================================================================================ += vendor/github.com/libopenstorage/openstorage/api/client/volume licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Openstorage.org. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/libopenstorage/openstorage/LICENSE 40c3e1c9eacda859a17048003909a2f8 +================================================================================ + + +================================================================================ += vendor/github.com/libopenstorage/openstorage/api/spec licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Openstorage.org. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/libopenstorage/openstorage/LICENSE 40c3e1c9eacda859a17048003909a2f8 +================================================================================ + + +================================================================================ += vendor/github.com/libopenstorage/openstorage/pkg/parser licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Openstorage.org. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/libopenstorage/openstorage/LICENSE 40c3e1c9eacda859a17048003909a2f8 +================================================================================ + + +================================================================================ += vendor/github.com/libopenstorage/openstorage/pkg/units licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Openstorage.org. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/libopenstorage/openstorage/LICENSE 40c3e1c9eacda859a17048003909a2f8 +================================================================================ + + +================================================================================ += vendor/github.com/libopenstorage/openstorage/volume licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Openstorage.org. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/libopenstorage/openstorage/LICENSE 40c3e1c9eacda859a17048003909a2f8 +================================================================================ + + +================================================================================ += vendor/github.com/lpabon/godbc licensed under: = + +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. += vendor/github.com/lpabon/godbc/LICENSE 6c4db32a2fa8717faffa1d4f10136f47 +================================================================================ + + +================================================================================ += vendor/github.com/magiconair/properties licensed under: = + +goproperties - properties file decoder for Go + +Copyright (c) 2013-2014 - Frank Schroeder + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/magiconair/properties/LICENSE c383a608fb9a0d227953e928803b9631 +================================================================================ + + +================================================================================ += vendor/github.com/mailru/easyjson/buffer licensed under: = + +Copyright (c) 2016 Mail.Ru Group + +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. + += vendor/github.com/mailru/easyjson/LICENSE 819e81c2ec13e1bbc47dc5e90bb4d88b +================================================================================ + + +================================================================================ += vendor/github.com/mailru/easyjson/jlexer licensed under: = + +Copyright (c) 2016 Mail.Ru Group + +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. + += vendor/github.com/mailru/easyjson/LICENSE 819e81c2ec13e1bbc47dc5e90bb4d88b +================================================================================ + + +================================================================================ += vendor/github.com/mailru/easyjson/jwriter licensed under: = + +Copyright (c) 2016 Mail.Ru Group + +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. + += vendor/github.com/mailru/easyjson/LICENSE 819e81c2ec13e1bbc47dc5e90bb4d88b +================================================================================ + + +================================================================================ += vendor/github.com/MakeNowJust/heredoc licensed under: = + +The MIT License (MIT) + +Copyright (c) 2014-2017 TSUYUSATO Kitsune + +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. + += vendor/github.com/MakeNowJust/heredoc/LICENSE 59c4411f6d7dfdaa85623e672d3d4438 +================================================================================ + + +================================================================================ += vendor/github.com/marstr/guid licensed under: = + +MIT License + +Copyright (c) 2016 Martin Strobel + +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. += vendor/github.com/marstr/guid/LICENSE.txt 356484d12e6ad8a7c2d360b236e9a9c8 +================================================================================ + + +================================================================================ += vendor/github.com/mattn/go-shellwords licensed under: = + +The MIT License (MIT) + +Copyright (c) 2017 Yasuhiro Matsumoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + += vendor/github.com/mattn/go-shellwords/LICENSE e5116fc268f5118168ff06a271b50ef9 +================================================================================ + + +================================================================================ += vendor/github.com/matttproud/golang_protobuf_extensions/pbutil licensed under: = + + 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 2013 Matt T. Proud + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/matttproud/golang_protobuf_extensions/LICENSE a45ffb9ad39d4b4c1053bb27f6bb4272 +================================================================================ + + +================================================================================ += vendor/github.com/mholt/caddy/caddyfile licensed under: = + + 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. + += vendor/github.com/mholt/caddy/LICENSE.txt e3fc50a88d0a364313df4b21ef20c29e +================================================================================ + + +================================================================================ += vendor/github.com/Microsoft/go-winio licensed under: = + +The MIT License (MIT) + +Copyright (c) 2015 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + += vendor/github.com/Microsoft/go-winio/LICENSE 69205ff73858f2c22b2ca135b557e8ef +================================================================================ + + +================================================================================ += vendor/github.com/Microsoft/hcsshim licensed under: = + +The MIT License (MIT) + +Copyright (c) 2015 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. += vendor/github.com/Microsoft/hcsshim/LICENSE d4c2cbbea5ee1e7c86dff68a7073718e +================================================================================ + + +================================================================================ += vendor/github.com/miekg/dns licensed under: = + +Extensions of the original work are copyright (c) 2011 Miek Gieben + +As this is fork of the official Go code the same license applies: + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + += vendor/github.com/miekg/dns/LICENSE 147353de6868a20caa562d26eab7b3c5 +================================================================================ + + +================================================================================ += vendor/github.com/mindprince/gonvml licensed under: = + + + 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. + += vendor/github.com/mindprince/gonvml/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/mistifyio/go-zfs licensed under: = + +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (c) 2014, OmniTI Computer Consulting, 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. += vendor/github.com/mistifyio/go-zfs/LICENSE cce9462224bfb44c1866ef7bd5eddf54 +================================================================================ + + +================================================================================ += vendor/github.com/mitchellh/go-wordwrap licensed under: = + +The MIT License (MIT) + +Copyright (c) 2014 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + += vendor/github.com/mitchellh/go-wordwrap/LICENSE.md 56da355a12d4821cda57b8f23ec34bc4 +================================================================================ + + +================================================================================ += vendor/github.com/mitchellh/mapstructure licensed under: = + +The MIT License (MIT) + +Copyright (c) 2013 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + += vendor/github.com/mitchellh/mapstructure/LICENSE 3f7765c3d4f58e1f84c4313cecf0f5bd +================================================================================ + + +================================================================================ += vendor/github.com/modern-go/concurrent licensed under: = + + 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. + += vendor/github.com/modern-go/concurrent/LICENSE 86d3f3a95c324c9479bd8986968f4327 +================================================================================ + + +================================================================================ += vendor/github.com/modern-go/reflect2 licensed under: = + + 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. + += vendor/github.com/modern-go/reflect2/LICENSE 86d3f3a95c324c9479bd8986968f4327 +================================================================================ + + +================================================================================ += vendor/github.com/mohae/deepcopy licensed under: = + +The MIT License (MIT) + +Copyright (c) 2014 Joel + +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. + += vendor/github.com/mohae/deepcopy/LICENSE 268dc9c546e3de67a93c1d12a039d702 +================================================================================ + + +================================================================================ += vendor/github.com/mrunalp/fileutils licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/mrunalp/fileutils/LICENSE 435b266b3899aa8a959f17d41c56def8 +================================================================================ + + +================================================================================ += vendor/github.com/mvdan/xurls licensed under: = + +Copyright (c) 2015, Daniel Martí. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/mvdan/xurls/LICENSE d459301ff3fc917904837249508d99af +================================================================================ + + +================================================================================ += vendor/github.com/mxk/go-flowrate/flowrate licensed under: = + +Copyright (c) 2014 The Go-FlowRate Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the + distribution. + + * Neither the name of the go-flowrate project 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. + += vendor/github.com/mxk/go-flowrate/LICENSE 781f3c14fa867bae781c9e409831f954 +================================================================================ + + +================================================================================ += vendor/github.com/Nvveen/Gotty licensed under: = + +Copyright (c) 2012, Neal van Veen (nealvanveen@gmail.com) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The views and conclusions contained in the software and documentation are those +of the authors and should not be interpreted as representing official policies, +either expressed or implied, of the FreeBSD Project. + += vendor/github.com/Nvveen/Gotty/LICENSE ab11220c6af5f3758ccae7bf525f8dec +================================================================================ + + +================================================================================ += vendor/github.com/NYTimes/gziphandler licensed under: = + +Copyright (c) 2015 The New York Times Company + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this library except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + += vendor/github.com/NYTimes/gziphandler/LICENSE.md e30b94cbe70132b181f72f953fbb3c82 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/config licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/ginkgo licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/ginkgo/convert licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/ginkgo/interrupthandler licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/ginkgo/nodot licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/ginkgo/testrunner licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/ginkgo/testsuite licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/ginkgo/watch licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/internal/codelocation licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/internal/containernode licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/internal/failer licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/internal/leafnodes licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/internal/remote licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/internal/spec licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/internal/specrunner licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/internal/spec_iterator licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/internal/suite licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/internal/testingtproxy licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/internal/writer licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/reporters licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/reporters/stenographer licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/ginkgo/types licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/ginkgo/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/gomega licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/gomega/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/gomega/format licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/gomega/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/gomega/gstruct licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/gomega/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/gomega/gstruct/errors licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/gomega/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/gomega/internal/assertion licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/gomega/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/gomega/internal/asyncassertion licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/gomega/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/gomega/internal/oraclematcher licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/gomega/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/gomega/internal/testingtsupport licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/gomega/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/gomega/matchers licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/gomega/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/gomega/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/gomega/matchers/support/goraph/edge licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/gomega/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/gomega/matchers/support/goraph/node licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/gomega/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/gomega/matchers/support/goraph/util licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/gomega/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/onsi/gomega/types licensed under: = + +Copyright (c) 2013-2014 Onsi Fakhouri + +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. + += vendor/github.com/onsi/gomega/LICENSE 570603114d52313cb86c0206401c9af7 +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/go-digest licensed under: = + + + 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 2016 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. + += vendor/github.com/opencontainers/go-digest/LICENSE.code 9cd86830b557232ce55e2a6b47387471 +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/image-spec/specs-go licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2016 The Linux Foundation. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/opencontainers/image-spec/LICENSE 27ef03aa2da6e424307f102e8b42621d +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/image-spec/specs-go/v1 licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2016 The Linux Foundation. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/opencontainers/image-spec/LICENSE 27ef03aa2da6e424307f102e8b42621d +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/runc/libcontainer licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/opencontainers/runc/LICENSE 435b266b3899aa8a959f17d41c56def8 +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/runc/libcontainer/apparmor licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/opencontainers/runc/LICENSE 435b266b3899aa8a959f17d41c56def8 +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/runc/libcontainer/cgroups licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/opencontainers/runc/LICENSE 435b266b3899aa8a959f17d41c56def8 +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/opencontainers/runc/LICENSE 435b266b3899aa8a959f17d41c56def8 +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/opencontainers/runc/LICENSE 435b266b3899aa8a959f17d41c56def8 +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/runc/libcontainer/configs licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/opencontainers/runc/LICENSE 435b266b3899aa8a959f17d41c56def8 +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/runc/libcontainer/configs/validate licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/opencontainers/runc/LICENSE 435b266b3899aa8a959f17d41c56def8 +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/runc/libcontainer/criurpc licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/opencontainers/runc/LICENSE 435b266b3899aa8a959f17d41c56def8 +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/runc/libcontainer/intelrdt licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/opencontainers/runc/LICENSE 435b266b3899aa8a959f17d41c56def8 +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/runc/libcontainer/keys licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/opencontainers/runc/LICENSE 435b266b3899aa8a959f17d41c56def8 +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/runc/libcontainer/mount licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/opencontainers/runc/LICENSE 435b266b3899aa8a959f17d41c56def8 +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/runc/libcontainer/seccomp licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/opencontainers/runc/LICENSE 435b266b3899aa8a959f17d41c56def8 +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/runc/libcontainer/stacktrace licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/opencontainers/runc/LICENSE 435b266b3899aa8a959f17d41c56def8 +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/runc/libcontainer/system licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/opencontainers/runc/LICENSE 435b266b3899aa8a959f17d41c56def8 +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/runc/libcontainer/user licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/opencontainers/runc/LICENSE 435b266b3899aa8a959f17d41c56def8 +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/runc/libcontainer/utils licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/opencontainers/runc/LICENSE 435b266b3899aa8a959f17d41c56def8 +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/runtime-spec/specs-go licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 The Linux Foundation. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/opencontainers/runtime-spec/LICENSE b355a61a394a504dacde901c958f662c +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/selinux/go-selinux licensed under: = + + 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. + += vendor/github.com/opencontainers/selinux/LICENSE e3fc50a88d0a364313df4b21ef20c29e +================================================================================ + + +================================================================================ += vendor/github.com/opencontainers/selinux/go-selinux/label licensed under: = + + 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. + += vendor/github.com/opencontainers/selinux/LICENSE e3fc50a88d0a364313df4b21ef20c29e +================================================================================ + + +================================================================================ += vendor/github.com/pborman/uuid licensed under: = + +Copyright (c) 2009,2014 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/pborman/uuid/LICENSE 88073b6dd8ec00fe09da59e0b6dfded1 +================================================================================ + + +================================================================================ += vendor/github.com/pelletier/go-toml licensed under: = + +The MIT License (MIT) + +Copyright (c) 2013 - 2017 Thomas Pelletier, Eric Anderton + +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. + += vendor/github.com/pelletier/go-toml/LICENSE dc9ea87a81f62b8871b2a4158edbfde6 +================================================================================ + + +================================================================================ += vendor/github.com/peterbourgon/diskv licensed under: = + +Copyright (c) 2011-2012 Peter Bourgon + +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. + += vendor/github.com/peterbourgon/diskv/LICENSE f9f3e815fc84aa04c4f4db33c553eef9 +================================================================================ + + +================================================================================ += vendor/github.com/pkg/errors licensed under: = + +Copyright (c) 2015, Dave Cheney +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/pkg/errors/LICENSE 6fe682a02df52c6653f33bd0f7126b5a +================================================================================ + + +================================================================================ += vendor/github.com/pkg/sftp licensed under: = + +Copyright (c) 2013, Dave Cheney +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/pkg/sftp/LICENSE 452fc5cc5a9127a0e828d73423d45035 +================================================================================ + + +================================================================================ += vendor/github.com/pmezard/go-difflib/difflib licensed under: = + +Copyright (c) 2013, Patrick Mezard +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. + The names of its contributors may not 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. + += vendor/github.com/pmezard/go-difflib/LICENSE e9a2ebb8de779a07500ddecca806145e +================================================================================ + + +================================================================================ += vendor/github.com/pquerna/cachecontrol licensed under: = + + + 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. + += vendor/github.com/pquerna/cachecontrol/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/pquerna/cachecontrol/cacheobject licensed under: = + + + 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. + += vendor/github.com/pquerna/cachecontrol/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/prometheus/client_golang/prometheus licensed under: = + + 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. + += vendor/github.com/prometheus/client_golang/LICENSE 86d3f3a95c324c9479bd8986968f4327 +================================================================================ + + +================================================================================ += vendor/github.com/prometheus/client_golang/prometheus/promhttp licensed under: = + + 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. + += vendor/github.com/prometheus/client_golang/LICENSE 86d3f3a95c324c9479bd8986968f4327 +================================================================================ + + +================================================================================ += vendor/github.com/prometheus/client_model/go licensed under: = + + 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. + += vendor/github.com/prometheus/client_model/LICENSE 86d3f3a95c324c9479bd8986968f4327 +================================================================================ + + +================================================================================ += vendor/github.com/prometheus/common/expfmt licensed under: = + + 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. + += vendor/github.com/prometheus/common/LICENSE 86d3f3a95c324c9479bd8986968f4327 +================================================================================ + + +================================================================================ += vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg licensed under: = + + 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. + += vendor/github.com/prometheus/common/LICENSE 86d3f3a95c324c9479bd8986968f4327 +================================================================================ + + +================================================================================ += vendor/github.com/prometheus/common/model licensed under: = + + 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. + += vendor/github.com/prometheus/common/LICENSE 86d3f3a95c324c9479bd8986968f4327 +================================================================================ + + +================================================================================ += vendor/github.com/prometheus/procfs licensed under: = + + 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. + += vendor/github.com/prometheus/procfs/LICENSE 86d3f3a95c324c9479bd8986968f4327 +================================================================================ + + +================================================================================ += vendor/github.com/prometheus/procfs/xfs licensed under: = + + 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. + += vendor/github.com/prometheus/procfs/LICENSE 86d3f3a95c324c9479bd8986968f4327 +================================================================================ + + +================================================================================ += vendor/github.com/PuerkitoBio/purell licensed under: = + +Copyright (c) 2012, Martin Angers +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 author 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. + += vendor/github.com/PuerkitoBio/purell/LICENSE fb8b39492731abb9a3d68575f3eedbfa +================================================================================ + + +================================================================================ += vendor/github.com/PuerkitoBio/urlesc licensed under: = + +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/PuerkitoBio/urlesc/LICENSE 591778525c869cdde0ab5a1bf283cd81 +================================================================================ + + +================================================================================ += vendor/github.com/quobyte/api licensed under: = + + +Copyright (c) 2016, Quobyte 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 quobyte-automation 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. + += vendor/github.com/quobyte/api/LICENSE beacc5ea3bcda24bdcec545022dbb0b4 +================================================================================ + + +================================================================================ += vendor/github.com/rancher/go-rancher/client licensed under: = + + + 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 + += vendor/github.com/rancher/go-rancher/LICENSE 2ee41112a44fe7014dce33e26468ba93 +================================================================================ + + +================================================================================ += vendor/github.com/renstrom/dedent licensed under: = + +The MIT License (MIT) + +Copyright (c) 2015 Peter Renström + +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. + += vendor/github.com/renstrom/dedent/LICENSE 285693e07a6e1fd790cb3f3b8b5127db +================================================================================ + + +================================================================================ += vendor/github.com/robfig/cron licensed under: = + +Copyright (C) 2012 Rob Figueiredo +All Rights Reserved. + +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. + += vendor/github.com/robfig/cron/LICENSE d924a63cb54a2a6c4bd28c50b2b0af59 +================================================================================ + + +================================================================================ += vendor/github.com/rubiojr/go-vhd/vhd licensed under: = + +The MIT License (MIT) + +Copyright (c) 2015 Sergio Rubio + +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. + + += vendor/github.com/rubiojr/go-vhd/LICENSE 9ce5db55ba47444787183e59733e1977 +================================================================================ + + +================================================================================ += vendor/github.com/russross/blackfriday licensed under: = + +Blackfriday is distributed under the Simplified BSD License: + +> Copyright © 2011 Russ Ross +> All rights reserved. +> +> Redistribution and use in source and binary forms, with or without +> modification, are permitted provided that the following conditions +> are met: +> +> 1. Redistributions of source code must retain the above copyright +> notice, this list of conditions and the following disclaimer. +> +> 2. Redistributions in binary form must reproduce the above +> copyright notice, this list of conditions and the following +> disclaimer in the documentation and/or other materials provided with +> the distribution. +> +> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +> COPYRIGHT 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. + += vendor/github.com/russross/blackfriday/LICENSE.txt ecf8a8a60560c35a862a4a545f2db1b3 +================================================================================ + + +================================================================================ += vendor/github.com/satori/go.uuid licensed under: = + +Copyright (C) 2013-2016 by Maxim Bublis + +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. + += vendor/github.com/satori/go.uuid/LICENSE 02d5d17de0c82a23a09863acccc026f6 +================================================================================ + + +================================================================================ += vendor/github.com/seccomp/libseccomp-golang licensed under: = + +Copyright (c) 2015 Matthew Heon +Copyright (c) 2015 Paul Moore +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +- Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/seccomp/libseccomp-golang/LICENSE 343b433e752e8b44a543cdf61f14b628 +================================================================================ + + +================================================================================ += vendor/github.com/shurcooL/sanitized_anchor_name licensed under: = + +Copyright (c) 2015 Dmitri Shuralyov + +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. + += vendor/github.com/shurcooL/sanitized_anchor_name/LICENSE bee2c3aa5bd0f265ffbd193eb18ca30d +================================================================================ + + +================================================================================ += vendor/github.com/sirupsen/logrus licensed under: = + +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +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. + += vendor/github.com/sirupsen/logrus/LICENSE 8dadfef729c08ec4e631c4f6fc5d43a0 +================================================================================ + + +================================================================================ += vendor/github.com/spf13/afero licensed under: = + + 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. + += vendor/github.com/spf13/afero/LICENSE.txt 920d76114a32b0fb75b3f2718c5a91be +================================================================================ + + +================================================================================ += vendor/github.com/spf13/afero/mem licensed under: = + + 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. + += vendor/github.com/spf13/afero/LICENSE.txt 920d76114a32b0fb75b3f2718c5a91be +================================================================================ + + +================================================================================ += vendor/github.com/spf13/afero/sftp licensed under: = + + 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. + += vendor/github.com/spf13/afero/LICENSE.txt 920d76114a32b0fb75b3f2718c5a91be +================================================================================ + + +================================================================================ += vendor/github.com/spf13/cast licensed under: = + +The MIT License (MIT) + +Copyright (c) 2014 Steve Francia + +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. += vendor/github.com/spf13/cast/LICENSE 67fac7567cbf6ba946e5576d590b1ed4 +================================================================================ + + +================================================================================ += vendor/github.com/spf13/cobra licensed under: = + + 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. + += vendor/github.com/spf13/cobra/LICENSE.txt 920d76114a32b0fb75b3f2718c5a91be +================================================================================ + + +================================================================================ += vendor/github.com/spf13/cobra/doc licensed under: = + + 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. + += vendor/github.com/spf13/cobra/LICENSE.txt 920d76114a32b0fb75b3f2718c5a91be +================================================================================ + + +================================================================================ += vendor/github.com/spf13/jwalterweatherman licensed under: = + +The MIT License (MIT) + +Copyright (c) 2014 Steve Francia + +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. += vendor/github.com/spf13/jwalterweatherman/LICENSE 67fac7567cbf6ba946e5576d590b1ed4 +================================================================================ + + +================================================================================ += vendor/github.com/spf13/pflag licensed under: = + +Copyright (c) 2012 Alex Ogier. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/spf13/pflag/LICENSE 1e8b7dc8b906737639131047a590f21d +================================================================================ + + +================================================================================ += vendor/github.com/spf13/viper licensed under: = + +The MIT License (MIT) + +Copyright (c) 2014 Steve Francia + +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. += vendor/github.com/spf13/viper/LICENSE 67fac7567cbf6ba946e5576d590b1ed4 +================================================================================ + + +================================================================================ += vendor/github.com/storageos/go-api licensed under: = + +MIT License + +Copyright (c) 2015-2017 StorageOS + +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. + + +Copyright (c) 2013-2017, go-dockerclient authors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/storageos/go-api/LICENCE d8f852a0f38554263e64363f57b07fc4 +================================================================================ + + +================================================================================ += vendor/github.com/storageos/go-api/netutil licensed under: = + +MIT License + +Copyright (c) 2015-2017 StorageOS + +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. + + +Copyright (c) 2013-2017, go-dockerclient authors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/storageos/go-api/LICENCE d8f852a0f38554263e64363f57b07fc4 +================================================================================ + + +================================================================================ += vendor/github.com/storageos/go-api/serror licensed under: = + +MIT License + +Copyright (c) 2015-2017 StorageOS + +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. + + +Copyright (c) 2013-2017, go-dockerclient authors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/storageos/go-api/LICENCE d8f852a0f38554263e64363f57b07fc4 +================================================================================ + + +================================================================================ += vendor/github.com/storageos/go-api/types licensed under: = + +MIT License + +Copyright (c) 2015-2017 StorageOS + +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. + + +Copyright (c) 2013-2017, go-dockerclient authors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/storageos/go-api/LICENCE d8f852a0f38554263e64363f57b07fc4 +================================================================================ + + +================================================================================ += vendor/github.com/stretchr/objx licensed under: = + +objx - by Mat Ryer and Tyler Bunnell + +The MIT License (MIT) + +Copyright (c) 2014 Stretchr, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + += vendor/github.com/stretchr/objx/LICENSE.md 21e79cfe7201b9b64535bfae0895795b +================================================================================ + + +================================================================================ += vendor/github.com/stretchr/testify/assert licensed under: = + +Copyright (c) 2012 - 2013 Mat Ryer and Tyler Bunnell + +Please consider promoting this project if you find it useful. + +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. + += vendor/github.com/stretchr/testify/LICENSE 39cd1d751bc25944831de86496e3cf68 +================================================================================ + + +================================================================================ += vendor/github.com/stretchr/testify/mock licensed under: = + +Copyright (c) 2012 - 2013 Mat Ryer and Tyler Bunnell + +Please consider promoting this project if you find it useful. + +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. + += vendor/github.com/stretchr/testify/LICENSE 39cd1d751bc25944831de86496e3cf68 +================================================================================ + + +================================================================================ += vendor/github.com/stretchr/testify/require licensed under: = + +Copyright (c) 2012 - 2013 Mat Ryer and Tyler Bunnell + +Please consider promoting this project if you find it useful. + +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. + += vendor/github.com/stretchr/testify/LICENSE 39cd1d751bc25944831de86496e3cf68 +================================================================================ + + +================================================================================ += vendor/github.com/syndtr/gocapability/capability licensed under: = + +Copyright 2013 Suryandaru Triandana +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/syndtr/gocapability/LICENSE a7304f5073e7be4ba7bffabbf9f2bbca +================================================================================ + + +================================================================================ += vendor/github.com/tools/godep licensed under: = + +Copyright © 2013 Keith Rarick. +Portions Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/github.com/tools/godep/License 71eb66e9b353dd06ca5a81ce0f469e1a +================================================================================ + + +================================================================================ += vendor/github.com/ugorji/go/codec licensed under: = + +The MIT License (MIT) + +Copyright (c) 2012-2015 Ugorji Nwoke. +All rights reserved. + +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. + += vendor/github.com/ugorji/go/LICENSE a03c0693c900925da5789db4e72da142 +================================================================================ + + +================================================================================ += vendor/github.com/vishvananda/netlink licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 Vishvananda Ishaya. + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/vishvananda/netlink/LICENSE 2ade771c7d7211af507864e8dd520529 +================================================================================ + + +================================================================================ += vendor/github.com/vishvananda/netlink/nl licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 Vishvananda Ishaya. + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/vishvananda/netlink/LICENSE 2ade771c7d7211af507864e8dd520529 +================================================================================ + + +================================================================================ += vendor/github.com/vishvananda/netns licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 Vishvananda Ishaya. + Copyright 2014 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/vishvananda/netns/LICENSE 2ade771c7d7211af507864e8dd520529 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/find licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/list licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/lookup licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/lookup/methods licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/lookup/simulator licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/lookup/types licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/nfc licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/object licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/pbm licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/pbm/methods licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/pbm/types licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/property licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/session licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/simulator licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/simulator/esx licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/simulator/vpx licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/sts licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/sts/internal licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/sts/simulator licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/task licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/vim25 licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/vim25/debug licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/vim25/methods licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/vim25/mo licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/vim25/progress licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/vim25/soap licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/vim25/types licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/govmomi/vim25/xml licensed under: = + + + 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. + += vendor/github.com/vmware/govmomi/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/github.com/vmware/photon-controller-go-sdk/photon licensed under: = + + 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. + + + += vendor/github.com/vmware/photon-controller-go-sdk/LICENSE 0de60303c844eac44e45012dac1987de +================================================================================ + + +================================================================================ += vendor/github.com/vmware/photon-controller-go-sdk/photon/lightwave licensed under: = + + 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. + + + += vendor/github.com/vmware/photon-controller-go-sdk/LICENSE 0de60303c844eac44e45012dac1987de +================================================================================ + + +================================================================================ += vendor/github.com/vmware/photon-controller-go-sdk/SSPI licensed under: = + + 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. + + + += vendor/github.com/vmware/photon-controller-go-sdk/LICENSE 0de60303c844eac44e45012dac1987de +================================================================================ + + +================================================================================ += vendor/github.com/xanzy/go-cloudstack/cloudstack licensed under: = + +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. + += vendor/github.com/xanzy/go-cloudstack/LICENSE 136e4f49dbf29942c572a3a8f6e88a77 +================================================================================ + + +================================================================================ += vendor/github.com/xiang90/probing licensed under: = + +The MIT License (MIT) + +Copyright (c) 2015 Xiang Li + +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. + + += vendor/github.com/xiang90/probing/LICENSE 61b57bfd44f7924c8a12cd72d3aa1e93 +================================================================================ + + +================================================================================ += vendor/golang.org/x/crypto/bcrypt licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/crypto/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/crypto/blowfish licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/crypto/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/crypto/cryptobyte licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/crypto/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/crypto/cryptobyte/asn1 licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/crypto/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/crypto/curve25519 licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/crypto/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/crypto/ed25519 licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/crypto/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/crypto/ed25519/internal/edwards25519 licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/crypto/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/crypto/internal/chacha20 licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/crypto/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/crypto/nacl/secretbox licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/crypto/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/crypto/ocsp licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/crypto/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/crypto/pkcs12 licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/crypto/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/crypto/pkcs12/internal/rc2 licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/crypto/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/crypto/poly1305 licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/crypto/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/crypto/salsa20/salsa licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/crypto/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/crypto/ssh licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/crypto/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/crypto/ssh/terminal licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/crypto/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/exp/inotify licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/exp/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/net/context licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/net/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/net/context/ctxhttp licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/net/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/net/html licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/net/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/net/html/atom licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/net/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/net/http2 licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/net/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/net/http2/hpack licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/net/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/net/idna licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/net/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/net/internal/timeseries licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/net/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/net/lex/httplex licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/net/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/net/proxy licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/net/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/net/trace licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/net/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/net/websocket licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/net/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/oauth2 licensed under: = + +Copyright (c) 2009 The oauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/oauth2/LICENSE 704b1e0c436dbf193e7dcbd4cf06ec81 +================================================================================ + + +================================================================================ += vendor/golang.org/x/oauth2/google licensed under: = + +Copyright (c) 2009 The oauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/oauth2/LICENSE 704b1e0c436dbf193e7dcbd4cf06ec81 +================================================================================ + + +================================================================================ += vendor/golang.org/x/oauth2/internal licensed under: = + +Copyright (c) 2009 The oauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/oauth2/LICENSE 704b1e0c436dbf193e7dcbd4cf06ec81 +================================================================================ + + +================================================================================ += vendor/golang.org/x/oauth2/jws licensed under: = + +Copyright (c) 2009 The oauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/oauth2/LICENSE 704b1e0c436dbf193e7dcbd4cf06ec81 +================================================================================ + + +================================================================================ += vendor/golang.org/x/oauth2/jwt licensed under: = + +Copyright (c) 2009 The oauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/oauth2/LICENSE 704b1e0c436dbf193e7dcbd4cf06ec81 +================================================================================ + + +================================================================================ += vendor/golang.org/x/sys/unix licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/sys/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/sys/windows licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/sys/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/sys/windows/svc licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/sys/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/text/cases licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/text/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/text/encoding licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/text/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/text/encoding/internal licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/text/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/text/encoding/internal/identifier licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/text/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/text/encoding/unicode licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/text/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/text/internal licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/text/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/text/internal/tag licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/text/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/text/internal/utf8internal licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/text/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/text/language licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/text/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/text/runes licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/text/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/text/secure/bidirule licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/text/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/text/secure/precis licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/text/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/text/transform licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/text/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/text/unicode/bidi licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/text/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/text/unicode/norm licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/text/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/text/width licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/text/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/time/rate licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/time/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/tools/benchmark/parse licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/tools/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/tools/container/intsets licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/tools/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/tools/go/ast/astutil licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/tools/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/tools/go/vcs licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/tools/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/golang.org/x/tools/imports licensed under: = + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/golang.org/x/tools/LICENSE 5d4950ecb7b26d2c5e4e7b4e0dd74707 +================================================================================ + + +================================================================================ += vendor/google.golang.org/api/compute/v0.alpha licensed under: = + +Copyright (c) 2011 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/google.golang.org/api/LICENSE a651bb3d8b1c412632e28823bb432b40 +================================================================================ + + +================================================================================ += vendor/google.golang.org/api/compute/v0.beta licensed under: = + +Copyright (c) 2011 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/google.golang.org/api/LICENSE a651bb3d8b1c412632e28823bb432b40 +================================================================================ + + +================================================================================ += vendor/google.golang.org/api/compute/v1 licensed under: = + +Copyright (c) 2011 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/google.golang.org/api/LICENSE a651bb3d8b1c412632e28823bb432b40 +================================================================================ + + +================================================================================ += vendor/google.golang.org/api/container/v1 licensed under: = + +Copyright (c) 2011 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/google.golang.org/api/LICENSE a651bb3d8b1c412632e28823bb432b40 +================================================================================ + + +================================================================================ += vendor/google.golang.org/api/gensupport licensed under: = + +Copyright (c) 2011 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/google.golang.org/api/LICENSE a651bb3d8b1c412632e28823bb432b40 +================================================================================ + + +================================================================================ += vendor/google.golang.org/api/googleapi licensed under: = + +Copyright (c) 2011 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/google.golang.org/api/LICENSE a651bb3d8b1c412632e28823bb432b40 +================================================================================ + + +================================================================================ += vendor/google.golang.org/api/googleapi/internal/uritemplates licensed under: = + +Copyright (c) 2011 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/google.golang.org/api/LICENSE a651bb3d8b1c412632e28823bb432b40 +================================================================================ + + +================================================================================ += vendor/google.golang.org/api/logging/v2beta1 licensed under: = + +Copyright (c) 2011 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/google.golang.org/api/LICENSE a651bb3d8b1c412632e28823bb432b40 +================================================================================ + + +================================================================================ += vendor/google.golang.org/api/monitoring/v3 licensed under: = + +Copyright (c) 2011 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/google.golang.org/api/LICENSE a651bb3d8b1c412632e28823bb432b40 +================================================================================ + + +================================================================================ += vendor/google.golang.org/api/pubsub/v1 licensed under: = + +Copyright (c) 2011 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/google.golang.org/api/LICENSE a651bb3d8b1c412632e28823bb432b40 +================================================================================ + + +================================================================================ += vendor/google.golang.org/api/tpu/v1 licensed under: = + +Copyright (c) 2011 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/google.golang.org/api/LICENSE a651bb3d8b1c412632e28823bb432b40 +================================================================================ + + +================================================================================ += vendor/google.golang.org/genproto/googleapis/api/annotations licensed under: = + + + 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. + += vendor/google.golang.org/genproto/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/google.golang.org/genproto/googleapis/rpc/status licensed under: = + + + 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. + += vendor/google.golang.org/genproto/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/google.golang.org/grpc licensed under: = + + + 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. + += vendor/google.golang.org/grpc/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/google.golang.org/grpc/balancer licensed under: = + + + 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. + += vendor/google.golang.org/grpc/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/google.golang.org/grpc/codes licensed under: = + + + 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. + += vendor/google.golang.org/grpc/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/google.golang.org/grpc/connectivity licensed under: = + + + 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. + += vendor/google.golang.org/grpc/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/google.golang.org/grpc/credentials licensed under: = + + + 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. + += vendor/google.golang.org/grpc/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/google.golang.org/grpc/grpclb/grpc_lb_v1/messages licensed under: = + + + 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. + += vendor/google.golang.org/grpc/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/google.golang.org/grpc/grpclog licensed under: = + + + 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. + += vendor/google.golang.org/grpc/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/google.golang.org/grpc/health/grpc_health_v1 licensed under: = + + + 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. + += vendor/google.golang.org/grpc/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/google.golang.org/grpc/internal licensed under: = + + + 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. + += vendor/google.golang.org/grpc/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/google.golang.org/grpc/keepalive licensed under: = + + + 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. + += vendor/google.golang.org/grpc/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/google.golang.org/grpc/metadata licensed under: = + + + 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. + += vendor/google.golang.org/grpc/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/google.golang.org/grpc/naming licensed under: = + + + 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. + += vendor/google.golang.org/grpc/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/google.golang.org/grpc/peer licensed under: = + + + 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. + += vendor/google.golang.org/grpc/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/google.golang.org/grpc/resolver licensed under: = + + + 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. + += vendor/google.golang.org/grpc/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/google.golang.org/grpc/stats licensed under: = + + + 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. + += vendor/google.golang.org/grpc/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/google.golang.org/grpc/status licensed under: = + + + 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. + += vendor/google.golang.org/grpc/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/google.golang.org/grpc/tap licensed under: = + + + 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. + += vendor/google.golang.org/grpc/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/google.golang.org/grpc/transport licensed under: = + + + 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. + += vendor/google.golang.org/grpc/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/gopkg.in/gcfg.v1 licensed under: = + +Copyright (c) 2012 Péter Surányi. Portions Copyright (c) 2009 The Go +Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/gopkg.in/gcfg.v1/LICENSE 13cea479df204c85485b5db6eb1bc9d5 +================================================================================ + + +================================================================================ += vendor/gopkg.in/gcfg.v1/scanner licensed under: = + +Copyright (c) 2012 Péter Surányi. Portions Copyright (c) 2009 The Go +Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/gopkg.in/gcfg.v1/LICENSE 13cea479df204c85485b5db6eb1bc9d5 +================================================================================ + + +================================================================================ += vendor/gopkg.in/gcfg.v1/token licensed under: = + +Copyright (c) 2012 Péter Surányi. Portions Copyright (c) 2009 The Go +Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/gopkg.in/gcfg.v1/LICENSE 13cea479df204c85485b5db6eb1bc9d5 +================================================================================ + + +================================================================================ += vendor/gopkg.in/gcfg.v1/types licensed under: = + +Copyright (c) 2012 Péter Surányi. Portions Copyright (c) 2009 The Go +Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/gopkg.in/gcfg.v1/LICENSE 13cea479df204c85485b5db6eb1bc9d5 +================================================================================ + + +================================================================================ += vendor/gopkg.in/inf.v0 licensed under: = + +Copyright (c) 2012 Péter Surányi. Portions Copyright (c) 2009 The Go +Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/gopkg.in/inf.v0/LICENSE 13cea479df204c85485b5db6eb1bc9d5 +================================================================================ + + +================================================================================ += vendor/gopkg.in/natefinch/lumberjack.v2 licensed under: = + +The MIT License (MIT) + +Copyright (c) 2014 Nate Finch + +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. += vendor/gopkg.in/natefinch/lumberjack.v2/LICENSE 574cdb55b81249478f5af5f789e9e29f +================================================================================ + + +================================================================================ += vendor/gopkg.in/square/go-jose.v2 licensed under: = + + + 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. + += vendor/gopkg.in/square/go-jose.v2/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/gopkg.in/square/go-jose.v2/cipher licensed under: = + + + 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. + += vendor/gopkg.in/square/go-jose.v2/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/gopkg.in/square/go-jose.v2/json licensed under: = + + + 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. + += vendor/gopkg.in/square/go-jose.v2/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/gopkg.in/square/go-jose.v2/jwt licensed under: = + + + 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. + += vendor/gopkg.in/square/go-jose.v2/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/gopkg.in/warnings.v0 licensed under: = + +Copyright (c) 2016 Péter Surányi. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + += vendor/gopkg.in/warnings.v0/LICENSE c6775875c9d604beb22447dfae3d7049 +================================================================================ + + +================================================================================ += vendor/gopkg.in/yaml.v2 licensed under: = + +Copyright 2011-2016 Canonical Ltd. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + += vendor/gopkg.in/yaml.v2/LICENSE 6964839e54f4fefcdae13f22b92d0fbb +================================================================================ + + +================================================================================ += vendor/k8s.io/gengo/args licensed under: = + + + 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 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. + += vendor/k8s.io/gengo/LICENSE ad09685d909e7a9f763d2bb62d4bd6fb +================================================================================ + + +================================================================================ += vendor/k8s.io/gengo/examples/deepcopy-gen/generators licensed under: = + + + 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 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. + += vendor/k8s.io/gengo/LICENSE ad09685d909e7a9f763d2bb62d4bd6fb +================================================================================ + + +================================================================================ += vendor/k8s.io/gengo/examples/defaulter-gen/generators licensed under: = + + + 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 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. + += vendor/k8s.io/gengo/LICENSE ad09685d909e7a9f763d2bb62d4bd6fb +================================================================================ + + +================================================================================ += vendor/k8s.io/gengo/examples/import-boss/generators licensed under: = + + + 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 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. + += vendor/k8s.io/gengo/LICENSE ad09685d909e7a9f763d2bb62d4bd6fb +================================================================================ + + +================================================================================ += vendor/k8s.io/gengo/examples/set-gen/generators licensed under: = + + + 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 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. + += vendor/k8s.io/gengo/LICENSE ad09685d909e7a9f763d2bb62d4bd6fb +================================================================================ + + +================================================================================ += vendor/k8s.io/gengo/examples/set-gen/sets licensed under: = + + + 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 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. + += vendor/k8s.io/gengo/LICENSE ad09685d909e7a9f763d2bb62d4bd6fb +================================================================================ + + +================================================================================ += vendor/k8s.io/gengo/generator licensed under: = + + + 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 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. + += vendor/k8s.io/gengo/LICENSE ad09685d909e7a9f763d2bb62d4bd6fb +================================================================================ + + +================================================================================ += vendor/k8s.io/gengo/namer licensed under: = + + + 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 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. + += vendor/k8s.io/gengo/LICENSE ad09685d909e7a9f763d2bb62d4bd6fb +================================================================================ + + +================================================================================ += vendor/k8s.io/gengo/parser licensed under: = + + + 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 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. + += vendor/k8s.io/gengo/LICENSE ad09685d909e7a9f763d2bb62d4bd6fb +================================================================================ + + +================================================================================ += vendor/k8s.io/gengo/types licensed under: = + + + 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 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. + += vendor/k8s.io/gengo/LICENSE ad09685d909e7a9f763d2bb62d4bd6fb +================================================================================ + + +================================================================================ += vendor/k8s.io/heapster/metrics/api/v1/types licensed under: = + +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. + += vendor/k8s.io/heapster/LICENSE 136e4f49dbf29942c572a3a8f6e88a77 +================================================================================ + + +================================================================================ += vendor/k8s.io/kube-openapi/pkg/aggregator licensed under: = + + + 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. + += vendor/k8s.io/kube-openapi/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/k8s.io/kube-openapi/pkg/builder licensed under: = + + + 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. + += vendor/k8s.io/kube-openapi/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/k8s.io/kube-openapi/pkg/common licensed under: = + + + 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. + += vendor/k8s.io/kube-openapi/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/k8s.io/kube-openapi/pkg/generators licensed under: = + + + 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. + += vendor/k8s.io/kube-openapi/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/k8s.io/kube-openapi/pkg/handler licensed under: = + + + 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. + += vendor/k8s.io/kube-openapi/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/k8s.io/kube-openapi/pkg/util licensed under: = + + + 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. + += vendor/k8s.io/kube-openapi/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/k8s.io/kube-openapi/pkg/util/proto licensed under: = + + + 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. + += vendor/k8s.io/kube-openapi/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/k8s.io/kube-openapi/pkg/util/proto/testing licensed under: = + + + 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. + += vendor/k8s.io/kube-openapi/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/k8s.io/kube-openapi/pkg/util/proto/validation licensed under: = + + + 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. + += vendor/k8s.io/kube-openapi/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/k8s.io/utils/clock licensed under: = + + + 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. + += vendor/k8s.io/utils/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/k8s.io/utils/exec licensed under: = + + + 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. + += vendor/k8s.io/utils/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/k8s.io/utils/exec/testing licensed under: = + + + 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. + += vendor/k8s.io/utils/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + +================================================================================ += vendor/vbom.ml/util/sortorder licensed under: = + +The MIT License (MIT) +Copyright (c) 2015 Frits van Bommel +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. + += vendor/vbom.ml/util/LICENSE 9f7e1d7e8f527330ebb5f4c32e0f3e40 +================================================================================ + diff --git a/vendor/k8s.io/kubernetes/OWNERS b/vendor/k8s.io/kubernetes/OWNERS deleted file mode 100644 index 822c0893..00000000 --- a/vendor/k8s.io/kubernetes/OWNERS +++ /dev/null @@ -1,29 +0,0 @@ -filters: - ".*": - reviewers: - - brendandburns - - dchen1107 - - jbeda - - lavalamp - - smarterclayton - - thockin - approvers: - - bgrant0607 - - brendandburns - - dchen1107 - - jbeda - - monopole # To move code per kubernetes/community#598 - - lavalamp - - smarterclayton - - thockin - - wojtek-t - - # Bazel build infrastructure changes often touch files throughout the tree - "\\.bzl$": - reviewers: - - ixdy - approvers: - - ixdy - "BUILD(\\.bazel)?$": - approvers: - - ixdy diff --git a/vendor/k8s.io/kubernetes/OWNERS_ALIASES b/vendor/k8s.io/kubernetes/OWNERS_ALIASES deleted file mode 100644 index 2a3074fe..00000000 --- a/vendor/k8s.io/kubernetes/OWNERS_ALIASES +++ /dev/null @@ -1,276 +0,0 @@ -aliases: - sig-scheduling-maintainers: - - bsalamat - - davidopp - - k82cn - - timothysc - - wojtek-t - - aveshagarwal - sig-scheduling: - - bsalamat - - davidopp - - jayunit100 - - k82cn - - resouer - - timothysc - - wojtek-t - - aveshagarwal - - ravisantoshgudimetla - sig-cli-maintainers: - - adohe - - brendandburns - - deads2k - - janetkuo - - liggitt - - seans3 - - monopole - - droot - - apelisse - - mengqiy - - smarterclayton - - soltysh - sig-cli: - - adohe - - deads2k - - derekwaynecarr - - dixudx - - dims - - dshulyak - - eparis - - ericchiang - - ghodss - - juanvallejo - - mengqiy - - rootfs - - shiywang - - smarterclayton - - soltysh - sig-testing-reviewers: - - fejta - - ixdy - - rmmh - - spiffxp - sig-testing-approvers: - - fejta - - ixdy - - rmmh - - spiffxp - sig-node-reviewers: - - Random-Liu - - dashpole - - dchen1107 - - derekwaynecarr - - dims - - feiskyer - - mtaufen - - ncdc - - pmorie - - resouer - - sjpotter - - tallclair - - tmrts - - vishh - - yifan-gu - - yujuhong - sig-network-approvers: - - bowei - - caseydavenport - - danwinship - - dcbw - - dnardo - - freehan - - mrhohn - - nicksardo - - thockin - sig-network-reviewers: - - bowei - - caseydavenport - - danwinship - - dcbw - - dnardo - - freehan - - mrhohn - - nicksardo - - thockin - - rramkumar1 - sig-apps-reviewers: - - enisoc - - erictune - - foxish - - janetkuo - - kow3ns - - lukaszo - - mfojtik - - smarterclayton - - soltysh - - tnozicka - sig-apps-api-approvers: - - erictune - - smarterclayton - sig-autoscaling-maintainers: - - aleksandra-malinowska - - bskiba - - DirectXMan12 - - MaciekPytel - - mwielgus - milestone-maintainers: - - lavalamp - - deads2k - - michelleN - - mattfarina - - prydonius - - bgrant0607 - - jdumars - - ericchiang - - liggitt - - deads2k - - mwielgus - - directxman12 - - justinsb - - kris-nova - - chrislovecnm - - mfburnett - - slack - - colemickens - - foxish - - AdoHe - - lukemarsden - - jbeda - - roberthbailey - - zehicle - - jdumars - - grodrigues3 - - Phillels - - devin-donnelly - - jaredbhatti - - csbell - - quinton-hoole - - piosz - - fabxc - - thockin - - dcbw - - caseydavenport - - dchen1107 - - derekwaynecarr - - zen - - marcoceppi - - dghubble - - idvoretskyi - - xsgordon - - apsinha - - idvoretskyi - - calebamiles - - calebamiles - - wojtek-t - - countspongebob - - jbeda - - davidopp - - timothysc - - pmorie - - arschles - - vaikas-google - - duglin - - saad-ali - - childsb - - spiffxp - - fejta - - timothysc - - danielromlein - - floreks - - michmike - - abgworrall - - krzyzacy - - steveperry-53 - - radhikpac - - jpbetz - - cmluciano - - bsalamat - - m1093782566 - - tallclair - api-approvers: - - erictune - - lavalamp - - smarterclayton - - thockin - - liggitt - # - bgrant0607 # manual escalations only - api-reviewers: - - erictune - - lavalamp - - smarterclayton - - thockin - - liggitt - - wojtek-t - - deads2k - - yujuhong - - brendandburns - - derekwaynecarr - - caesarxuchao - - vishh - - mikedanese - - nikhiljindal - - gmarek - - davidopp - - pmorie - - sttts - - dchen1107 - - saad-ali - - zmerlynn - - luxas - - janetkuo - - justinsb - - pwittrock - - roberthbailey - - ncdc - - tallclair - - yifan-gu - - eparis - - mwielgus - - timothysc - - soltysh - - piosz - - jsafrane - - jbeda - dep-approvers: - - cblecker - - thockin - - sttts - feature-approvers: - - AdoHe # CLI - - bgrant0607 # Architecture - - brancz # Instrumentation - - bsalamat # Scheduling - - calebamiles # Release - - caseydavenport # Network - - childsb # Storage - - countspongebob # Scalability - - csbell # Multicluster - - dcbw # Network - - dchen1107 # Node - - deads2k # API Machinery - - derekwaynecarr # Node - - dghubble # On Premise - - directxman12 # Autoscaling - - ericchiang # Auth - - jdumars # Architecture, Cluster Ops, Release - - kow3ns # Apps - - lavalamp # API Machinery - - liggitt # Auth - - lukemarsden # Cluster Lifecycle - - luxas # Cluster Lifecycle - - marcoceppi # On Premise - - mattfarina # Apps - - michmike # Windows - - mwielgus # Autoscaling - - piosz # Instrumentation - - prydonius # Apps - - pwittrock # CLI - - quinton-hoole # Multicluster - - roberthbailey # Cluster Lifecycle - - saad-ali # Storage - - soltysh # CLI - - tallclair # Auth - - thockin # Network - - timothysc # Cluster Lifecycle, Scheduling - - wojtek-t # Scalability - - zehicle # Cluster Ops diff --git a/vendor/k8s.io/kubernetes/README.md b/vendor/k8s.io/kubernetes/README.md deleted file mode 100644 index 83e5deda..00000000 --- a/vendor/k8s.io/kubernetes/README.md +++ /dev/null @@ -1,86 +0,0 @@ -# Kubernetes - -[![Submit Queue Widget]][Submit Queue] [![GoDoc Widget]][GoDoc] [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/569/badge)](https://bestpractices.coreinfrastructure.org/projects/569) - - - ----- - -Kubernetes is an open source system for managing [containerized applications] -across multiple hosts; providing basic mechanisms for deployment, maintenance, -and scaling of applications. - -Kubernetes builds upon a decade and a half of experience at Google running -production workloads at scale using a system called [Borg], -combined with best-of-breed ideas and practices from the community. - -Kubernetes is hosted by the Cloud Native Computing Foundation ([CNCF]). -If you are a company that wants to help shape the evolution of -technologies that are container-packaged, dynamically-scheduled -and microservices-oriented, consider joining the CNCF. -For details about who's involved and how Kubernetes plays a role, -read the CNCF [announcement]. - ----- - -## To start using Kubernetes - -See our documentation on [kubernetes.io]. - -Try our [interactive tutorial]. - -Take a free course on [Scalable Microservices with Kubernetes]. - -## To start developing Kubernetes - -The [community repository] hosts all information about -building Kubernetes from source, how to contribute code -and documentation, who to contact about what, etc. - -If you want to build Kubernetes right away there are two options: - -##### You have a working [Go environment]. - -``` -$ go get -d k8s.io/kubernetes -$ cd $GOPATH/src/k8s.io/kubernetes -$ make -``` - -##### You have a working [Docker environment]. - -``` -$ git clone https://github.com/kubernetes/kubernetes -$ cd kubernetes -$ make quick-release -``` - -For the full story, head over to the [developer's documentation]. - -## Support - -If you need support, start with the [troubleshooting guide], -and work your way through the process that we've outlined. - -That said, if you have questions, reach out to us -[one way or another][communication]. - -[announcement]: https://cncf.io/news/announcement/2015/07/new-cloud-native-computing-foundation-drive-alignment-among-container -[Borg]: https://research.google.com/pubs/pub43438.html -[CNCF]: https://www.cncf.io/about -[communication]: https://git.k8s.io/community/communication -[community repository]: https://git.k8s.io/community -[containerized applications]: https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/ -[developer's documentation]: https://git.k8s.io/community/contributors/devel#readme -[Docker environment]: https://docs.docker.com/engine -[Go environment]: https://golang.org/doc/install -[GoDoc]: https://godoc.org/k8s.io/kubernetes -[GoDoc Widget]: https://godoc.org/k8s.io/kubernetes?status.svg -[interactive tutorial]: http://kubernetes.io/docs/tutorials/kubernetes-basics -[kubernetes.io]: http://kubernetes.io -[Scalable Microservices with Kubernetes]: https://www.udacity.com/course/scalable-microservices-with-kubernetes--ud615 -[Submit Queue]: http://submit-queue.k8s.io/#/ci -[Submit Queue Widget]: http://submit-queue.k8s.io/health.svg?v=1 -[troubleshooting guide]: https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/ - -[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/README.md?pixel)]() diff --git a/vendor/k8s.io/kubernetes/SECURITY_CONTACTS b/vendor/k8s.io/kubernetes/SECURITY_CONTACTS deleted file mode 100644 index 0648a8eb..00000000 --- a/vendor/k8s.io/kubernetes/SECURITY_CONTACTS +++ /dev/null @@ -1,17 +0,0 @@ -# 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/vendor/k8s.io/kubernetes/SUPPORT.md b/vendor/k8s.io/kubernetes/SUPPORT.md deleted file mode 100644 index 9ae470a2..00000000 --- a/vendor/k8s.io/kubernetes/SUPPORT.md +++ /dev/null @@ -1,39 +0,0 @@ -## Support for deploying and using Kubernetes - -Welcome to Kubernetes! We use GitHub for tracking bugs and feature requests. -This isn't the right place to get support for using Kubernetes, but the following -resources are available below, thanks for understanding. - -### Stack Overflow - -The Kubernetes Community is active on Stack Overflow, you can post your questions there: - -* [Kubernetes on Stack Overflow](http://stackoverflow.com/questions/tagged/kubernetes) - - * Here are some tips for [about how to ask good questions](http://stackoverflow.com/help/how-to-ask). - * Don't forget to check to see [what's on topic](http://stackoverflow.com/help/on-topic). - -### Documentation - -* [User Documentation](https://kubernetes.io/docs/) -* [Troubleshooting Guide](https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/) - - -### Real-time Chat - -* [Slack](https://kubernetes.slack.com) ([registration](http://slack.k8s.io)): -The `#kubernetes-users` and `#kubernetes-novice` channels are usual places where -people offer support. - -* Also check out the -[Slack Archive](http://kubernetes.slackarchive.io/) of past conversations. - -### Mailing Lists/Groups - -* [Kubernetes-users group](https://groups.google.com/forum/#!forum/kubernetes-users) - - - - diff --git a/vendor/k8s.io/kubernetes/cluster/gce/cos b/vendor/k8s.io/kubernetes/cluster/gce/cos new file mode 120000 index 00000000..67a1dec2 --- /dev/null +++ b/vendor/k8s.io/kubernetes/cluster/gce/cos @@ -0,0 +1 @@ +gci \ No newline at end of file diff --git a/vendor/k8s.io/kubernetes/cluster/gce/custom b/vendor/k8s.io/kubernetes/cluster/gce/custom new file mode 120000 index 00000000..67a1dec2 --- /dev/null +++ b/vendor/k8s.io/kubernetes/cluster/gce/custom @@ -0,0 +1 @@ +gci \ No newline at end of file diff --git a/vendor/k8s.io/kubernetes/cluster/gce/ubuntu b/vendor/k8s.io/kubernetes/cluster/gce/ubuntu new file mode 120000 index 00000000..67a1dec2 --- /dev/null +++ b/vendor/k8s.io/kubernetes/cluster/gce/ubuntu @@ -0,0 +1 @@ +gci \ No newline at end of file diff --git a/vendor/k8s.io/kubernetes/cluster/juju/layers/kubeapi-load-balancer/copyright b/vendor/k8s.io/kubernetes/cluster/juju/layers/kubeapi-load-balancer/copyright new file mode 100644 index 00000000..ac5e525c --- /dev/null +++ b/vendor/k8s.io/kubernetes/cluster/juju/layers/kubeapi-load-balancer/copyright @@ -0,0 +1,13 @@ +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. diff --git a/vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-master/actions/namespace-delete b/vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-master/actions/namespace-delete new file mode 120000 index 00000000..358cddb1 --- /dev/null +++ b/vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-master/actions/namespace-delete @@ -0,0 +1 @@ +namespace-create \ No newline at end of file diff --git a/vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-master/actions/namespace-list b/vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-master/actions/namespace-list new file mode 120000 index 00000000..358cddb1 --- /dev/null +++ b/vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-master/actions/namespace-list @@ -0,0 +1 @@ +namespace-create \ No newline at end of file diff --git a/vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-master/copyright b/vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-master/copyright new file mode 100644 index 00000000..8aec8ece --- /dev/null +++ b/vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-master/copyright @@ -0,0 +1,13 @@ +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. diff --git a/vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-worker/copyright b/vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-worker/copyright new file mode 100644 index 00000000..ac5e525c --- /dev/null +++ b/vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-worker/copyright @@ -0,0 +1,13 @@ +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. diff --git a/vendor/k8s.io/kubernetes/code-of-conduct.md b/vendor/k8s.io/kubernetes/code-of-conduct.md deleted file mode 100644 index 0d15c00c..00000000 --- a/vendor/k8s.io/kubernetes/code-of-conduct.md +++ /dev/null @@ -1,3 +0,0 @@ -# Kubernetes Community Code of Conduct - -Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) diff --git a/vendor/k8s.io/kubernetes/labels.yaml b/vendor/k8s.io/kubernetes/labels.yaml deleted file mode 100644 index a3c8fd80..00000000 --- a/vendor/k8s.io/kubernetes/labels.yaml +++ /dev/null @@ -1,370 +0,0 @@ -# Scanned and autogenerated by https://github.com/tonglil/labeler ---- -repo: kubernetes/kubernetes -labels: -- name: approved - color: 0ffa16 -- name: approved-for-milestone - color: fef2c0 -- name: area/admin - color: 0052cc -- name: area/admission-control - color: 0052cc -- name: area/api - color: 0052cc -- name: area/apiserver - color: 0052cc -- name: area/app-lifecycle - color: 0052cc -- name: area/batch - color: 0052cc -- name: area/build-release - color: 0052cc -- name: area/cadvisor - color: 0052cc -- name: area/client-libraries - color: 0052cc -- name: area/cloudprovider - color: 0052cc -- name: area/configmap-api - color: 0052cc -- name: area/controller-manager - color: 0052cc -- name: area/declarative-configuration - color: 0052cc -- name: area/dns - color: 0052cc -- name: area/docker - color: 0052cc -- name: area/downward-api - color: 0052cc -- name: area/ecosystem - color: 0052cc -- name: area/etcd - color: 0052cc -- name: area/example - color: 0052cc -- name: area/example/cassandra - color: 0052cc -- name: area/extensibility - color: 0052cc -- name: area/HA - color: 0052cc -- name: area/hw-accelerators - color: 0052cc -- name: area/images-registry - color: 0052cc -- name: area/ingress - color: 0052cc -- name: area/introspection - color: 0052cc -- name: area/ipv6 - color: 0052cc -- name: area/isolation - color: 0052cc -- name: area/kube-proxy - color: 0052cc -- name: area/kubeadm - color: 0052cc -- name: area/kubectl - color: 0052cc -- name: area/kubelet - color: 0052cc -- name: area/kubelet-api - color: 0052cc -- name: area/logging - color: 0052cc -- name: area/monitoring - color: 0052cc -- name: area/node-e2e - color: 0052cc -- name: area/node-lifecycle - color: 0052cc -- name: area/nodecontroller - color: 0052cc -- name: area/os/coreos - color: d4c5f9 -- name: area/os/fedora - color: d4c5f9 -- name: area/os/gci - color: d4c5f9 -- name: area/os/ubuntu - color: d4c5f9 -- name: area/platform/aws - color: d4c5f9 -- name: area/platform/azure - color: d4c5f9 -- name: area/platform/gce - color: d4c5f9 -- name: area/platform/gke - color: d4c5f9 -- name: area/platform/mesos - color: d4c5f9 -- name: area/platform/vagrant - color: d4c5f9 -- name: area/platform/vsphere - color: d4c5f9 -- name: area/release-infra - color: 0052cc -- name: area/reliability - color: 0052cc -- name: area/rkt - color: 0052cc -- name: area/secret-api - color: 0052cc -- name: area/security - color: d93f0b -- name: area/stateful-apps - color: 0052cc -- name: area/swagger - color: 0052cc -- name: area/system-requirement - color: 0052cc -- name: area/teardown - color: 0052cc -- name: area/test - color: 0052cc -- name: area/test-infra - color: 0052cc -- name: area/third-party-resource - color: 0052cc -- name: area/ui - color: 0052cc -- name: area/upgrade - color: 0052cc -- name: area/usability - color: 0052cc -- name: area/workload-api/cronjob - color: 0052cc -- name: area/workload-api/daemonset - color: 0052cc -- name: area/workload-api/deployment - color: 0052cc -- name: area/workload-api/job - color: 0052cc -- name: area/workload-api/replicaset - color: 0052cc -- name: beta-blocker - color: d93f0b -- name: cherrypick-approved - color: fef2c0 -- name: cherrypick-candidate - color: fef2c0 -- name: 'cla: human-approved' - color: bfe5bf -- name: 'cla: no' - color: e11d21 -- name: 'cla: yes' - color: bfe5bf -- name: 'cncf-cla: no' - color: e11d21 -- name: 'cncf-cla: yes' - color: bfe5bf -- name: do-not-merge - color: e11d21 -- name: do-not-merge/work-in-progress - color: e11d21 -- name: do-not-merge/hold - color: e11d21 -- name: do-not-merge/cherry-pick-not-approved - color: e11d21 -- name: do-not-merge/release-note-label-needed - color: e11d21 -- name: do-not-merge/blocked-paths - color: e11d21 -- name: flake-has-meta - color: fbca04 -- name: for-new-contributors - color: 006b75 -- name: help-wanted - color: 006b75 -- name: keep-open - color: fbca04 -- name: kind/api-change - color: c7def8 -- name: kind/bug - color: e11d21 -- name: kind/cleanup - color: c7def8 -- name: kind/design - color: c7def8 -- name: kind/documentation - color: c7def8 -- name: kind/enhancement - color: c7def8 -- name: kind/feature - color: c7def8 -- name: kind/flake - color: f7c6c7 -- name: kind/friction - color: c7def8 -- name: kind/mesos-flake - color: f7c6c7 -- name: kind/new-api - color: c7def8 -- name: kind/old-docs - color: c7def8 -- name: kind/postmortem - color: bfe5bf -- name: kind/support - color: eb6420 -- name: kind/technical-debt - color: c7def8 -- name: kind/upgrade-test-failure - color: fbca04 -- name: lgtm - color: 15dd18 -- name: milestone-labels-complete - color: 77bb00 -- name: milestone-labels-incomplete - color: e11d21 -- name: needs-ok-to-merge - color: ededed -- name: needs-ok-to-test - color: b60205 -- name: needs-rebase - color: BDBDBD -- name: needs-sig - color: ededed -- name: non-release-blocker - color: 0e8a16 -- name: ok-to-merge - color: fbca04 -- name: priority/awaiting-more-evidence - color: fef2c0 -- name: priority/backlog - color: fbca04 -- name: priority/critical-urgent - color: e11d21 -- name: priority/failing-test - color: e11d21 -- name: priority/important-longterm - color: eb6420 -- name: priority/important-soon - color: eb6420 -- name: priority/P0 - color: ff0000 -- name: priority/P1 - color: ededed -- name: priority/P2 - color: ededed -- name: priority/P3 - color: ededed -- name: queue/blocks-others - color: ffaa00 -- name: queue/critical-fix - color: ffaa00 -- name: queue/fix - color: ffaa00 -- name: queue/multiple-rebases - color: ffaa00 -- name: release-blocker - color: d93f0b -- name: release-note - color: c2e0c6 -- name: release-note-action-required - color: c2e0c6 -- name: release-note-label-needed - color: db5a64 -- name: release-note-none - color: c2e0c6 -- name: requires-release-czar-attention - color: d93f0b -- name: retest-not-required - color: eb6420 -- name: retest-not-required-docs-only - color: fbca04 -- name: sig/api-machinery - color: d2b48c -- name: sig/apps - color: d2b48c -- name: sig/architecture - color: d2b48c -- name: sig/auth - color: d2b48c -- name: sig/autoscaling - color: d2b48c -- name: sig/aws - color: d2b48c -- name: sig/azure - color: d2b48c -- name: sig/big-data - color: d2b48c -- name: sig/cli - color: d2b48c -- name: sig/cluster-lifecycle - color: d2b48c -- name: sig/cluster-ops - color: d2b48c -- name: sig/contributor-experience - color: d2b48c -- name: sig/docs - color: d2b48c -- name: sig/federation - color: d2b48c -- name: sig/instrumentation - color: d2b48c -- name: sig/network - color: d2b48c -- name: sig/node - color: d2b48c -- name: sig/onprem - color: d2b48c -- name: sig/openstack - color: d2b48c -- name: sig/release - color: d2b48c -- name: sig/rktnetes - color: d2b48c -- name: sig/scalability - color: d2b48c -- name: sig/scheduling - color: d2b48c -- name: sig/service-catalog - color: d2b48c -- name: sig/storage - color: d2b48c -- name: sig/testing - color: d2b48c -- name: sig/ui - color: d2b48c -- name: sig/windows - color: d2b48c -- name: size/L - color: ee9900 -- name: size/M - color: eebb00 -- name: size/S - color: 77bb00 -- name: size/XL - color: ee5500 -- name: size/XS - color: "009900" -- name: size/XXL - color: ee0000 -- name: stale - color: "795548" -- name: status/in-progress - color: fef2c0 -- name: status/in-review - color: fef2c0 -- name: team/api (deprecated - do not use) - color: ededed -- name: team/cluster (deprecated - do not use) - color: ededed -- name: team/control-plane (deprecated - do not use) - color: ededed -- name: team/gke - color: d2b48c -- name: team/huawei - color: d2b48c -- name: team/mesosphere - color: d2b48c -- name: team/redhat - color: d2b48c -- name: team/test-infra - color: ededed -- name: team/ux (deprecated - do not use) - color: ededed -- name: triaged - color: d455d0 diff --git a/vendor/k8s.io/kubernetes/pkg/.import-restrictions b/vendor/k8s.io/kubernetes/pkg/.import-restrictions deleted file mode 100644 index 77cc6121..00000000 --- a/vendor/k8s.io/kubernetes/pkg/.import-restrictions +++ /dev/null @@ -1,13 +0,0 @@ -{ - "Rules": [ - { - "SelectorRegexp": "k8s[.]io/kubernetes", - "AllowedPrefixes": [ - "" - ], - "ForbiddenPrefixes": [ - "k8s.io/kubernetes/cmd" - ] - } - ] -} diff --git a/vendor/k8s.io/kubernetes/pkg/BUILD b/vendor/k8s.io/kubernetes/pkg/BUILD deleted file mode 100644 index b46fd1f6..00000000 --- a/vendor/k8s.io/kubernetes/pkg/BUILD +++ /dev/null @@ -1,107 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/api/endpoints:all-srcs", - "//pkg/api/events:all-srcs", - "//pkg/api/legacyscheme:all-srcs", - "//pkg/api/persistentvolume:all-srcs", - "//pkg/api/persistentvolumeclaim:all-srcs", - "//pkg/api/pod:all-srcs", - "//pkg/api/ref:all-srcs", - "//pkg/api/resource:all-srcs", - "//pkg/api/service:all-srcs", - "//pkg/api/testapi:all-srcs", - "//pkg/api/testing:all-srcs", - "//pkg/api/v1/endpoints:all-srcs", - "//pkg/api/v1/node:all-srcs", - "//pkg/api/v1/pod:all-srcs", - "//pkg/api/v1/resource:all-srcs", - "//pkg/api/v1/service:all-srcs", - "//pkg/apis/abac:all-srcs", - "//pkg/apis/admission:all-srcs", - "//pkg/apis/admissionregistration:all-srcs", - "//pkg/apis/apps:all-srcs", - "//pkg/apis/authentication:all-srcs", - "//pkg/apis/authorization:all-srcs", - "//pkg/apis/autoscaling:all-srcs", - "//pkg/apis/batch:all-srcs", - "//pkg/apis/certificates:all-srcs", - "//pkg/apis/componentconfig:all-srcs", - "//pkg/apis/core:all-srcs", - "//pkg/apis/events:all-srcs", - "//pkg/apis/extensions:all-srcs", - "//pkg/apis/imagepolicy:all-srcs", - "//pkg/apis/networking:all-srcs", - "//pkg/apis/policy:all-srcs", - "//pkg/apis/rbac:all-srcs", - "//pkg/apis/scheduling:all-srcs", - "//pkg/apis/settings:all-srcs", - "//pkg/apis/storage:all-srcs", - "//pkg/auth/authorizer/abac:all-srcs", - "//pkg/auth/nodeidentifier:all-srcs", - "//pkg/capabilities:all-srcs", - "//pkg/client/chaosclient:all-srcs", - "//pkg/client/clientset_generated/internalclientset:all-srcs", - "//pkg/client/conditions:all-srcs", - "//pkg/client/informers/informers_generated/internalversion:all-srcs", - "//pkg/client/leaderelectionconfig:all-srcs", - "//pkg/client/listers/admissionregistration/internalversion:all-srcs", - "//pkg/client/listers/apis/admissionregistration:all-srcs", - "//pkg/client/listers/apps/internalversion:all-srcs", - "//pkg/client/listers/authentication/internalversion:all-srcs", - "//pkg/client/listers/authorization/internalversion:all-srcs", - "//pkg/client/listers/autoscaling/internalversion:all-srcs", - "//pkg/client/listers/batch/internalversion:all-srcs", - "//pkg/client/listers/certificates/internalversion:all-srcs", - "//pkg/client/listers/core/internalversion:all-srcs", - "//pkg/client/listers/extensions/internalversion:all-srcs", - "//pkg/client/listers/imagepolicy/internalversion:all-srcs", - "//pkg/client/listers/networking/internalversion:all-srcs", - "//pkg/client/listers/policy/internalversion:all-srcs", - "//pkg/client/listers/rbac/internalversion:all-srcs", - "//pkg/client/listers/scheduling/internalversion:all-srcs", - "//pkg/client/listers/settings/internalversion:all-srcs", - "//pkg/client/listers/storage/internalversion:all-srcs", - "//pkg/client/metrics/prometheus:all-srcs", - "//pkg/client/testdata:all-srcs", - "//pkg/client/tests:all-srcs", - "//pkg/cloudprovider:all-srcs", - "//pkg/controller:all-srcs", - "//pkg/credentialprovider:all-srcs", - "//pkg/features:all-srcs", - "//pkg/fieldpath:all-srcs", - "//pkg/generated:all-srcs", - "//pkg/kubeapiserver:all-srcs", - "//pkg/kubectl:all-srcs", - "//pkg/kubelet:all-srcs", - "//pkg/kubemark:all-srcs", - "//pkg/master:all-srcs", - "//pkg/printers:all-srcs", - "//pkg/probe:all-srcs", - "//pkg/proxy:all-srcs", - "//pkg/quota:all-srcs", - "//pkg/registry:all-srcs", - "//pkg/routes:all-srcs", - "//pkg/scheduler:all-srcs", - "//pkg/security:all-srcs", - "//pkg/securitycontext:all-srcs", - "//pkg/serviceaccount:all-srcs", - "//pkg/ssh:all-srcs", - "//pkg/util:all-srcs", - "//pkg/version:all-srcs", - "//pkg/volume:all-srcs", - "//pkg/watch/json:all-srcs", - "//pkg/windows/service:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/OWNERS b/vendor/k8s.io/kubernetes/pkg/OWNERS deleted file mode 100644 index 1b48f841..00000000 --- a/vendor/k8s.io/kubernetes/pkg/OWNERS +++ /dev/null @@ -1,12 +0,0 @@ -reviewers: - - brendandburns - - dchen1107 - - lavalamp - - smarterclayton - - thockin -approvers: - - brendandburns - - dchen1107 - - lavalamp - - smarterclayton - - thockin diff --git a/vendor/k8s.io/kubernetes/pkg/api/OWNERS b/vendor/k8s.io/kubernetes/pkg/api/OWNERS deleted file mode 100644 index 8f7783f9..00000000 --- a/vendor/k8s.io/kubernetes/pkg/api/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -approvers: -- api-approvers -reviewers: -- api-reviewers diff --git a/vendor/k8s.io/kubernetes/pkg/apis/OWNERS b/vendor/k8s.io/kubernetes/pkg/apis/OWNERS deleted file mode 100644 index 180d60f9..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/OWNERS +++ /dev/null @@ -1,44 +0,0 @@ -approvers: -- erictune -- lavalamp -- smarterclayton -- thockin -- liggitt -# - bgrant0607 # manual escalations only -reviewers: -- lavalamp -- smarterclayton -- wojtek-t -- deads2k -- yujuhong -- brendandburns -- derekwaynecarr -- caesarxuchao -- vishh -- mikedanese -- liggitt -- nikhiljindal -- gmarek -- erictune -- pmorie -- sttts -- dchen1107 -- saad-ali -- luxas -- janetkuo -- justinsb -- pwittrock -- ncdc -- tallclair -- yifan-gu -- eparis -- mwielgus -- feiskyer -- soltysh -- piosz -- dims -- errordeveloper -- madhusudancs -- krousey -- rootfs -- jszczepkowski diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/core/BUILD deleted file mode 100644 index 026cd897..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/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 = [ - "annotation_key_constants.go", - "doc.go", - "field_constants.go", - "json.go", - "objectreference.go", - "register.go", - "resource.go", - "taint.go", - "toleration.go", - "types.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/kubernetes/pkg/apis/core", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/resource: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", - "//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", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "taint_test.go", - "toleration_test.go", - ], - embed = [":go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/apis/core/fuzzer:all-srcs", - "//pkg/apis/core/helper:all-srcs", - "//pkg/apis/core/install:all-srcs", - "//pkg/apis/core/pods:all-srcs", - "//pkg/apis/core/v1:all-srcs", - "//pkg/apis/core/validation:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/OWNERS b/vendor/k8s.io/kubernetes/pkg/apis/core/OWNERS deleted file mode 100644 index 17bebcb3..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/OWNERS +++ /dev/null @@ -1,43 +0,0 @@ -approvers: -- erictune -- lavalamp -- smarterclayton -- thockin -- liggitt -# - bgrant0607 # manual escalations only -reviewers: -- thockin -- lavalamp -- smarterclayton -- wojtek-t -- deads2k -- yujuhong -- brendandburns -- derekwaynecarr -- caesarxuchao -- vishh -- mikedanese -- liggitt -- nikhiljindal -- gmarek -- erictune -- davidopp -- pmorie -- sttts -- dchen1107 -- saad-ali -- zmerlynn -- luxas -- janetkuo -- justinsb -- pwittrock -- roberthbailey -- ncdc -- tallclair -- yifan-gu -- eparis -- mwielgus -- soltysh -- piosz -- jsafrane -- jbeda diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/taint_test.go b/vendor/k8s.io/kubernetes/pkg/apis/core/taint_test.go deleted file mode 100644 index baa9404e..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/taint_test.go +++ /dev/null @@ -1,120 +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 core - -import "testing" - -func TestTaintToString(t *testing.T) { - testCases := []struct { - taint *Taint - expectedString string - }{ - { - taint: &Taint{ - Key: "foo", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - expectedString: "foo=bar:NoSchedule", - }, - { - taint: &Taint{ - Key: "foo", - Effect: TaintEffectNoSchedule, - }, - expectedString: "foo:NoSchedule", - }, - } - - for i, tc := range testCases { - if tc.expectedString != tc.taint.ToString() { - t.Errorf("[%v] expected taint %v converted to %s, got %s", i, tc.taint, tc.expectedString, tc.taint.ToString()) - } - } -} - -func TestMatchTaint(t *testing.T) { - testCases := []struct { - description string - taint *Taint - taintToMatch Taint - expectMatch bool - }{ - { - description: "two taints with the same key,value,effect should match", - taint: &Taint{ - Key: "foo", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - taintToMatch: Taint{ - Key: "foo", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - expectMatch: true, - }, - { - description: "two taints with the same key,effect but different value should match", - taint: &Taint{ - Key: "foo", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - taintToMatch: Taint{ - Key: "foo", - Value: "different-value", - Effect: TaintEffectNoSchedule, - }, - expectMatch: true, - }, - { - description: "two taints with the different key cannot match", - taint: &Taint{ - Key: "foo", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - taintToMatch: Taint{ - Key: "different-key", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - expectMatch: false, - }, - { - description: "two taints with the different effect cannot match", - taint: &Taint{ - Key: "foo", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - taintToMatch: Taint{ - Key: "foo", - Value: "bar", - Effect: TaintEffectPreferNoSchedule, - }, - expectMatch: false, - }, - } - - for _, tc := range testCases { - if tc.expectMatch != tc.taint.MatchTaint(tc.taintToMatch) { - t.Errorf("[%s] expect taint %s match taint %s", tc.description, tc.taint.ToString(), tc.taintToMatch.ToString()) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/toleration_test.go b/vendor/k8s.io/kubernetes/pkg/apis/core/toleration_test.go deleted file mode 100644 index ec7a8dec..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/toleration_test.go +++ /dev/null @@ -1,136 +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 core - -import "testing" - -func TestMatchToleration(t *testing.T) { - - tolerationSeconds := int64(5) - tolerationToMatchSeconds := int64(3) - testCases := []struct { - description string - toleration *Toleration - tolerationToMatch *Toleration - expectMatch bool - }{ - { - description: "two taints with the same key,operator,value,effect should match", - toleration: &Toleration{ - Key: "foo", - Operator: "Exists", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - tolerationToMatch: &Toleration{ - Key: "foo", - Operator: "Exists", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - expectMatch: true, - }, - { - description: "two taints with the different key cannot match", - toleration: &Toleration{ - Key: "foo", - Operator: "Exists", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - tolerationToMatch: &Toleration{ - Key: "different-key", - Operator: "Exists", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - expectMatch: false, - }, - { - description: "two taints with the different operator cannot match", - toleration: &Toleration{ - Key: "foo", - Operator: "Exists", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - tolerationToMatch: &Toleration{ - Key: "foo", - Operator: "different-operator", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - expectMatch: false, - }, - { - description: "two taints with the different value cannot match", - toleration: &Toleration{ - Key: "foo", - Operator: "Exists", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - tolerationToMatch: &Toleration{ - Key: "foo", - Operator: "Exists", - Value: "different-value", - Effect: TaintEffectNoSchedule, - }, - expectMatch: false, - }, - { - description: "two taints with the different effect cannot match", - toleration: &Toleration{ - Key: "foo", - Operator: "Exists", - Value: "bar", - Effect: TaintEffectNoSchedule, - }, - tolerationToMatch: &Toleration{ - Key: "foo", - Operator: "Exists", - Value: "bar", - Effect: TaintEffectPreferNoSchedule, - }, - expectMatch: false, - }, - { - description: "two taints with the different tolerationSeconds should match", - toleration: &Toleration{ - Key: "foo", - Operator: "Exists", - Value: "bar", - Effect: TaintEffectNoSchedule, - TolerationSeconds: &tolerationSeconds, - }, - tolerationToMatch: &Toleration{ - Key: "foo", - Operator: "Exists", - Value: "bar", - Effect: TaintEffectNoSchedule, - TolerationSeconds: &tolerationToMatchSeconds, - }, - expectMatch: true, - }, - } - - for _, tc := range testCases { - if actual := tc.toleration.MatchToleration(tc.tolerationToMatch); actual != tc.expectMatch { - t.Errorf("[%s] expect: %v , got: %v", tc.description, tc.expectMatch, !tc.expectMatch) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/features/BUILD b/vendor/k8s.io/kubernetes/pkg/features/BUILD deleted file mode 100644 index c88d15f2..00000000 --- a/vendor/k8s.io/kubernetes/pkg/features/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 = ["kube_features.go"], - importpath = "k8s.io/kubernetes/pkg/features", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/features:go_default_library", - "//vendor/k8s.io/apiserver/pkg/features: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/vendor/k8s.io/kubernetes/pkg/features/OWNERS b/vendor/k8s.io/kubernetes/pkg/features/OWNERS deleted file mode 100644 index fe7b0144..00000000 --- a/vendor/k8s.io/kubernetes/pkg/features/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -approvers: -- feature-approvers diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/BUILD deleted file mode 100644 index d6c52d72..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/BUILD +++ /dev/null @@ -1,296 +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 = [ - "active_deadline.go", - "doc.go", - "kubelet.go", - "kubelet_getters.go", - "kubelet_network.go", - "kubelet_node_status.go", - "kubelet_pods.go", - "kubelet_resources.go", - "kubelet_volumes.go", - "oom_watcher.go", - "pod_container_deletor.go", - "pod_workers.go", - "reason_cache.go", - "runonce.go", - "runtime.go", - "util.go", - "volume_host.go", - ], - importpath = "k8s.io/kubernetes/pkg/kubelet", - deps = [ - "//pkg/api/v1/pod:go_default_library", - "//pkg/api/v1/resource:go_default_library", - "//pkg/apis/core:go_default_library", - "//pkg/apis/core/pods:go_default_library", - "//pkg/apis/core/v1:go_default_library", - "//pkg/apis/core/v1/helper:go_default_library", - "//pkg/apis/core/v1/helper/qos:go_default_library", - "//pkg/capabilities:go_default_library", - "//pkg/cloudprovider:go_default_library", - "//pkg/features:go_default_library", - "//pkg/fieldpath:go_default_library", - "//pkg/kubelet/apis:go_default_library", - "//pkg/kubelet/apis/cri:go_default_library", - "//pkg/kubelet/apis/cri/runtime/v1alpha2:go_default_library", - "//pkg/kubelet/apis/kubeletconfig:go_default_library", - "//pkg/kubelet/cadvisor:go_default_library", - "//pkg/kubelet/certificate:go_default_library", - "//pkg/kubelet/checkpointmanager:go_default_library", - "//pkg/kubelet/cm:go_default_library", - "//pkg/kubelet/config:go_default_library", - "//pkg/kubelet/configmap:go_default_library", - "//pkg/kubelet/container:go_default_library", - "//pkg/kubelet/dockershim:go_default_library", - "//pkg/kubelet/dockershim/remote:go_default_library", - "//pkg/kubelet/envvars:go_default_library", - "//pkg/kubelet/events:go_default_library", - "//pkg/kubelet/eviction:go_default_library", - "//pkg/kubelet/images:go_default_library", - "//pkg/kubelet/kubeletconfig:go_default_library", - "//pkg/kubelet/kuberuntime:go_default_library", - "//pkg/kubelet/lifecycle:go_default_library", - "//pkg/kubelet/logs:go_default_library", - "//pkg/kubelet/metrics:go_default_library", - "//pkg/kubelet/metrics/collectors:go_default_library", - "//pkg/kubelet/mountpod:go_default_library", - "//pkg/kubelet/network/dns:go_default_library", - "//pkg/kubelet/pleg:go_default_library", - "//pkg/kubelet/pod:go_default_library", - "//pkg/kubelet/preemption:go_default_library", - "//pkg/kubelet/prober:go_default_library", - "//pkg/kubelet/prober/results:go_default_library", - "//pkg/kubelet/remote:go_default_library", - "//pkg/kubelet/secret:go_default_library", - "//pkg/kubelet/server:go_default_library", - "//pkg/kubelet/server/portforward:go_default_library", - "//pkg/kubelet/server/remotecommand:go_default_library", - "//pkg/kubelet/server/stats:go_default_library", - "//pkg/kubelet/server/streaming:go_default_library", - "//pkg/kubelet/stats:go_default_library", - "//pkg/kubelet/status:go_default_library", - "//pkg/kubelet/sysctl:go_default_library", - "//pkg/kubelet/token:go_default_library", - "//pkg/kubelet/types:go_default_library", - "//pkg/kubelet/util:go_default_library", - "//pkg/kubelet/util/format:go_default_library", - "//pkg/kubelet/util/manager:go_default_library", - "//pkg/kubelet/util/pluginwatcher:go_default_library", - "//pkg/kubelet/util/queue:go_default_library", - "//pkg/kubelet/util/sliceutils:go_default_library", - "//pkg/kubelet/volumemanager:go_default_library", - "//pkg/scheduler/algorithm:go_default_library", - "//pkg/scheduler/algorithm/predicates:go_default_library", - "//pkg/security/apparmor:go_default_library", - "//pkg/security/podsecuritypolicy/sysctl:go_default_library", - "//pkg/securitycontext:go_default_library", - "//pkg/util/dbus:go_default_library", - "//pkg/util/file:go_default_library", - "//pkg/util/io:go_default_library", - "//pkg/util/iptables:go_default_library", - "//pkg/util/mount:go_default_library", - "//pkg/util/node:go_default_library", - "//pkg/util/oom:go_default_library", - "//pkg/util/removeall:go_default_library", - "//pkg/version:go_default_library", - "//pkg/volume:go_default_library", - "//pkg/volume/csi:go_default_library", - "//pkg/volume/util:go_default_library", - "//pkg/volume/util/types:go_default_library", - "//pkg/volume/util/volumepathhandler:go_default_library", - "//pkg/volume/validation:go_default_library", - "//third_party/forked/golang/expansion:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/golang/groupcache/lru:go_default_library", - "//vendor/github.com/google/cadvisor/events:go_default_library", - "//vendor/github.com/google/cadvisor/info/v1:go_default_library", - "//vendor/github.com/google/cadvisor/info/v2: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/api/resource: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/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/clock: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/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/wait:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", - "//vendor/k8s.io/client-go/listers/core/v1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/client-go/tools/record:go_default_library", - "//vendor/k8s.io/client-go/util/certificate:go_default_library", - "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", - "//vendor/k8s.io/client-go/util/integer:go_default_library", - "//vendor/k8s.io/utils/exec:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "active_deadline_test.go", - "kubelet_getters_test.go", - "kubelet_network_test.go", - "kubelet_node_status_test.go", - "kubelet_pods_test.go", - "kubelet_resources_test.go", - "kubelet_test.go", - "kubelet_volumes_test.go", - "oom_watcher_test.go", - "pod_container_deletor_test.go", - "pod_workers_test.go", - "reason_cache_test.go", - "runonce_test.go", - ] + select({ - "@io_bazel_rules_go//go/platform:windows": [ - "kubelet_pods_windows_test.go", - ], - "//conditions:default": [], - }), - embed = [":go_default_library"], - deps = [ - "//pkg/apis/core/install:go_default_library", - "//pkg/capabilities:go_default_library", - "//pkg/cloudprovider/providers/fake:go_default_library", - "//pkg/kubelet/apis:go_default_library", - "//pkg/kubelet/apis/cri/runtime/v1alpha2:go_default_library", - "//pkg/kubelet/cadvisor/testing:go_default_library", - "//pkg/kubelet/cm:go_default_library", - "//pkg/kubelet/config:go_default_library", - "//pkg/kubelet/configmap:go_default_library", - "//pkg/kubelet/container:go_default_library", - "//pkg/kubelet/container/testing:go_default_library", - "//pkg/kubelet/eviction:go_default_library", - "//pkg/kubelet/images:go_default_library", - "//pkg/kubelet/lifecycle:go_default_library", - "//pkg/kubelet/logs:go_default_library", - "//pkg/kubelet/pleg:go_default_library", - "//pkg/kubelet/pod:go_default_library", - "//pkg/kubelet/pod/testing:go_default_library", - "//pkg/kubelet/prober/results:go_default_library", - "//pkg/kubelet/prober/testing:go_default_library", - "//pkg/kubelet/secret:go_default_library", - "//pkg/kubelet/server/portforward:go_default_library", - "//pkg/kubelet/server/remotecommand:go_default_library", - "//pkg/kubelet/server/stats:go_default_library", - "//pkg/kubelet/stats:go_default_library", - "//pkg/kubelet/status:go_default_library", - "//pkg/kubelet/status/testing:go_default_library", - "//pkg/kubelet/token:go_default_library", - "//pkg/kubelet/types:go_default_library", - "//pkg/kubelet/util/queue:go_default_library", - "//pkg/kubelet/util/sliceutils:go_default_library", - "//pkg/kubelet/volumemanager:go_default_library", - "//pkg/scheduler/cache:go_default_library", - "//pkg/util/mount:go_default_library", - "//pkg/version:go_default_library", - "//pkg/volume:go_default_library", - "//pkg/volume/aws_ebs:go_default_library", - "//pkg/volume/azure_dd:go_default_library", - "//pkg/volume/gce_pd:go_default_library", - "//pkg/volume/host_path:go_default_library", - "//pkg/volume/testing:go_default_library", - "//pkg/volume/util:go_default_library", - "//vendor/github.com/google/cadvisor/info/v1:go_default_library", - "//vendor/github.com/google/cadvisor/info/v2:go_default_library", - "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/github.com/stretchr/testify/require: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/resource: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/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/rand: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/util/uuid:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/fake: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", - "//vendor/k8s.io/client-go/tools/record:go_default_library", - "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", - "//vendor/k8s.io/client-go/util/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/kubelet/apis:all-srcs", - "//pkg/kubelet/cadvisor:all-srcs", - "//pkg/kubelet/certificate:all-srcs", - "//pkg/kubelet/checkpoint:all-srcs", - "//pkg/kubelet/checkpointmanager:all-srcs", - "//pkg/kubelet/client:all-srcs", - "//pkg/kubelet/cm:all-srcs", - "//pkg/kubelet/config:all-srcs", - "//pkg/kubelet/configmap:all-srcs", - "//pkg/kubelet/container:all-srcs", - "//pkg/kubelet/custommetrics:all-srcs", - "//pkg/kubelet/dockershim:all-srcs", - "//pkg/kubelet/envvars:all-srcs", - "//pkg/kubelet/events:all-srcs", - "//pkg/kubelet/eviction:all-srcs", - "//pkg/kubelet/images:all-srcs", - "//pkg/kubelet/kubeletconfig:all-srcs", - "//pkg/kubelet/kuberuntime:all-srcs", - "//pkg/kubelet/leaky:all-srcs", - "//pkg/kubelet/lifecycle:all-srcs", - "//pkg/kubelet/logs:all-srcs", - "//pkg/kubelet/metrics:all-srcs", - "//pkg/kubelet/mountpod:all-srcs", - "//pkg/kubelet/network:all-srcs", - "//pkg/kubelet/pleg:all-srcs", - "//pkg/kubelet/pod:all-srcs", - "//pkg/kubelet/preemption:all-srcs", - "//pkg/kubelet/prober:all-srcs", - "//pkg/kubelet/qos:all-srcs", - "//pkg/kubelet/remote:all-srcs", - "//pkg/kubelet/secret:all-srcs", - "//pkg/kubelet/server:all-srcs", - "//pkg/kubelet/stats:all-srcs", - "//pkg/kubelet/status:all-srcs", - "//pkg/kubelet/sysctl:all-srcs", - "//pkg/kubelet/token:all-srcs", - "//pkg/kubelet/types:all-srcs", - "//pkg/kubelet/util:all-srcs", - "//pkg/kubelet/volumemanager:all-srcs", - "//pkg/kubelet/winstats:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS b/vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS deleted file mode 100644 index 82e510ea..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS +++ /dev/null @@ -1,9 +0,0 @@ -approvers: -- Random-Liu -- dchen1107 -- derekwaynecarr -- tallclair -- vishh -- yujuhong -reviewers: -- sig-node-reviewers diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline.go b/vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline.go deleted file mode 100644 index f14024b9..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline.go +++ /dev/null @@ -1,98 +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 kubelet - -import ( - "fmt" - "time" - - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/clock" - "k8s.io/client-go/tools/record" - "k8s.io/kubernetes/pkg/kubelet/lifecycle" - "k8s.io/kubernetes/pkg/kubelet/status" -) - -const ( - reason = "DeadlineExceeded" - message = "Pod was active on the node longer than the specified deadline" -) - -// activeDeadlineHandler knows how to enforce active deadlines on pods. -type activeDeadlineHandler struct { - // the clock to use for deadline enforcement - clock clock.Clock - // the provider of pod status - podStatusProvider status.PodStatusProvider - // the recorder to dispatch events when we identify a pod has exceeded active deadline - recorder record.EventRecorder -} - -// newActiveDeadlineHandler returns an active deadline handler that can enforce pod active deadline -func newActiveDeadlineHandler( - podStatusProvider status.PodStatusProvider, - recorder record.EventRecorder, - clock clock.Clock, -) (*activeDeadlineHandler, error) { - - // check for all required fields - if clock == nil || podStatusProvider == nil || recorder == nil { - return nil, fmt.Errorf("Required arguments must not be nil: %v, %v, %v", clock, podStatusProvider, recorder) - } - return &activeDeadlineHandler{ - clock: clock, - podStatusProvider: podStatusProvider, - recorder: recorder, - }, nil -} - -// ShouldSync returns true if the pod is past its active deadline. -func (m *activeDeadlineHandler) ShouldSync(pod *v1.Pod) bool { - return m.pastActiveDeadline(pod) -} - -// ShouldEvict returns true if the pod is past its active deadline. -// It dispatches an event that the pod should be evicted if it is past its deadline. -func (m *activeDeadlineHandler) ShouldEvict(pod *v1.Pod) lifecycle.ShouldEvictResponse { - if !m.pastActiveDeadline(pod) { - return lifecycle.ShouldEvictResponse{Evict: false} - } - m.recorder.Eventf(pod, v1.EventTypeNormal, reason, message) - return lifecycle.ShouldEvictResponse{Evict: true, Reason: reason, Message: message} -} - -// pastActiveDeadline returns true if the pod has been active for more than its ActiveDeadlineSeconds -func (m *activeDeadlineHandler) pastActiveDeadline(pod *v1.Pod) bool { - // no active deadline was specified - if pod.Spec.ActiveDeadlineSeconds == nil { - return false - } - // get the latest status to determine if it was started - podStatus, ok := m.podStatusProvider.GetPodStatus(pod.UID) - if !ok { - podStatus = pod.Status - } - // we have no start time so just return - if podStatus.StartTime.IsZero() { - return false - } - // determine if the deadline was exceeded - start := podStatus.StartTime.Time - duration := m.clock.Since(start) - allowedDuration := time.Duration(*pod.Spec.ActiveDeadlineSeconds) * time.Second - return duration >= allowedDuration -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline_test.go deleted file mode 100644 index 32fbd6c3..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline_test.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 kubelet - -import ( - "testing" - "time" - - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/clock" - "k8s.io/client-go/tools/record" -) - -// mockPodStatusProvider returns the status on the specified pod -type mockPodStatusProvider struct { - pods []*v1.Pod -} - -// GetPodStatus returns the status on the associated pod with matching uid (if found) -func (m *mockPodStatusProvider) GetPodStatus(uid types.UID) (v1.PodStatus, bool) { - for _, pod := range m.pods { - if pod.UID == uid { - return pod.Status, true - } - } - return v1.PodStatus{}, false -} - -// TestActiveDeadlineHandler verifies the active deadline handler functions as expected. -func TestActiveDeadlineHandler(t *testing.T) { - pods := newTestPods(4) - fakeClock := clock.NewFakeClock(time.Now()) - podStatusProvider := &mockPodStatusProvider{pods: pods} - fakeRecorder := &record.FakeRecorder{} - handler, err := newActiveDeadlineHandler(podStatusProvider, fakeRecorder, fakeClock) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - - now := metav1.Now() - startTime := metav1.NewTime(now.Time.Add(-1 * time.Minute)) - - // this pod has exceeded its active deadline - exceededActiveDeadlineSeconds := int64(30) - pods[0].Status.StartTime = &startTime - pods[0].Spec.ActiveDeadlineSeconds = &exceededActiveDeadlineSeconds - - // this pod has not exceeded its active deadline - notYetActiveDeadlineSeconds := int64(120) - pods[1].Status.StartTime = &startTime - pods[1].Spec.ActiveDeadlineSeconds = ¬YetActiveDeadlineSeconds - - // this pod has no deadline - pods[2].Status.StartTime = &startTime - pods[2].Spec.ActiveDeadlineSeconds = nil - - testCases := []struct { - pod *v1.Pod - expected bool - }{{pods[0], true}, {pods[1], false}, {pods[2], false}, {pods[3], false}} - - for i, testCase := range testCases { - if actual := handler.ShouldSync(testCase.pod); actual != testCase.expected { - t.Errorf("[%d] ShouldSync expected %#v, got %#v", i, testCase.expected, actual) - } - actual := handler.ShouldEvict(testCase.pod) - if actual.Evict != testCase.expected { - t.Errorf("[%d] ShouldEvict.Evict expected %#v, got %#v", i, testCase.expected, actual.Evict) - } - if testCase.expected { - if actual.Reason != reason { - t.Errorf("[%d] ShouldEvict.Reason expected %#v, got %#v", i, message, actual.Reason) - } - if actual.Message != message { - t.Errorf("[%d] ShouldEvict.Message expected %#v, got %#v", i, message, actual.Message) - } - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/BUILD deleted file mode 100644 index 2a22e481..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/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 = [ - "well_known_annotations.go", - "well_known_labels.go", - ] + select({ - "@io_bazel_rules_go//go/platform:windows": [ - "well_known_annotations_windows.go", - ], - "//conditions:default": [], - }), - importpath = "k8s.io/kubernetes/pkg/kubelet/apis", - deps = select({ - "@io_bazel_rules_go//go/platform:windows": [ - "//pkg/features:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", - ], - "//conditions:default": [], - }), -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/kubelet/apis/cri:all-srcs", - "//pkg/kubelet/apis/deviceplugin/v1alpha:all-srcs", - "//pkg/kubelet/apis/deviceplugin/v1beta1:all-srcs", - "//pkg/kubelet/apis/kubeletconfig:all-srcs", - "//pkg/kubelet/apis/pluginregistration/v1alpha1:all-srcs", - "//pkg/kubelet/apis/stats/v1alpha1:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/OWNERS b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/OWNERS deleted file mode 100644 index f16238fc..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/OWNERS +++ /dev/null @@ -1,5 +0,0 @@ -reviewers: -- jiayingz -- mindprince -- RenaudWasTaken -- vishh diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1beta1/BUILD deleted file mode 100644 index 82a6bdd9..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/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 = [ - "api.pb.go", - "constants.go", - ], - importpath = "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1beta1", - 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/golang.org/x/net/context:go_default_library", - "//vendor/google.golang.org/grpc: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 = ["api.proto"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1beta1/api.proto b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1beta1/api.proto deleted file mode 100644 index efbd72c1..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1beta1/api.proto +++ /dev/null @@ -1,161 +0,0 @@ -// To regenerate api.pb.go run hack/update-device-plugin.sh -syntax = 'proto3'; - -package v1beta1; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.stringer_all) = true; -option (gogoproto.goproto_getters_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.goproto_unrecognized_all) = false; - - -// Registration is the service advertised by the Kubelet -// Only when Kubelet answers with a success code to a Register Request -// may Device Plugins start their service -// Registration may fail when device plugin version is not supported by -// Kubelet or the registered resourceName is already taken by another -// active device plugin. Device plugin is expected to terminate upon registration failure -service Registration { - rpc Register(RegisterRequest) returns (Empty) {} -} - -message DevicePluginOptions { - // Indicates if PreStartContainer call is required before each container start - bool pre_start_required = 1; -} - -message RegisterRequest { - // Version of the API the Device Plugin was built against - string version = 1; - // Name of the unix socket the device plugin is listening on - // PATH = path.Join(DevicePluginPath, endpoint) - string endpoint = 2; - // Schedulable resource name. As of now it's expected to be a DNS Label - string resource_name = 3; - // Options to be communicated with Device Manager - DevicePluginOptions options = 4; -} - -message Empty { -} - -// DevicePlugin is the service advertised by Device Plugins -service DevicePlugin { - // GetDevicePluginOptions returns options to be communicated with Device - // Manager - rpc GetDevicePluginOptions(Empty) returns (DevicePluginOptions) {} - - // ListAndWatch returns a stream of List of Devices - // Whenever a Device state change or a Device disapears, ListAndWatch - // returns the new list - rpc ListAndWatch(Empty) returns (stream ListAndWatchResponse) {} - - // Allocate is called during container creation so that the Device - // Plugin can run device specific operations and instruct Kubelet - // of the steps to make the Device available in the container - rpc Allocate(AllocateRequest) returns (AllocateResponse) {} - - // PreStartContainer is called, if indicated by Device Plugin during registeration phase, - // before each container start. Device plugin can run device specific operations - // such as reseting the device before making devices available to the container - rpc PreStartContainer(PreStartContainerRequest) returns (PreStartContainerResponse) {} -} - -// ListAndWatch returns a stream of List of Devices -// Whenever a Device state change or a Device disapears, ListAndWatch -// returns the new list -message ListAndWatchResponse { - repeated Device devices = 1; -} - -/* E.g: -* struct Device { -* ID: "GPU-fef8089b-4820-abfc-e83e-94318197576e", -* State: "Healthy", -*} */ -message Device { - // A unique ID assigned by the device plugin used - // to identify devices during the communication - // Max length of this field is 63 characters - string ID = 1; - // Health of the device, can be healthy or unhealthy, see constants.go - string health = 2; -} - -// - PreStartContainer is expected to be called before each container start if indicated by plugin during registration phase. -// - PreStartContainer allows kubelet to pass reinitialized devices to containers. -// - PreStartContainer allows Device Plugin to run device specific operations on -// the Devices requested -message PreStartContainerRequest { - repeated string devicesIDs = 1; -} - -// PreStartContainerResponse will be send by plugin in response to PreStartContainerRequest -message PreStartContainerResponse { -} - -// - Allocate is expected to be called during pod creation since allocation -// failures for any container would result in pod startup failure. -// - Allocate allows kubelet to exposes additional artifacts in a pod's -// environment as directed by the plugin. -// - Allocate allows Device Plugin to run device specific operations on -// the Devices requested -message AllocateRequest { - repeated ContainerAllocateRequest container_requests = 1; -} - -message ContainerAllocateRequest { - repeated string devicesIDs = 1; -} - -// AllocateResponse includes the artifacts that needs to be injected into -// a container for accessing 'deviceIDs' that were mentioned as part of -// 'AllocateRequest'. -// Failure Handling: -// if Kubelet sends an allocation request for dev1 and dev2. -// Allocation on dev1 succeeds but allocation on dev2 fails. -// The Device plugin should send a ListAndWatch update and fail the -// Allocation request -message AllocateResponse { - repeated ContainerAllocateResponse container_responses = 1; -} - -message ContainerAllocateResponse { - // List of environment variable to be set in the container to access one of more devices. - map envs = 1; - // Mounts for the container. - repeated Mount mounts = 2; - // Devices for the container. - repeated DeviceSpec devices = 3; - // Container annotations to pass to the container runtime - map annotations = 4; -} - -// Mount specifies a host volume to mount into a container. -// where device library or tools are installed on host and container -message Mount { - // Path of the mount within the container. - string container_path = 1; - // Path of the mount on the host. - string host_path = 2; - // If set, the mount is read-only. - bool read_only = 3; -} - -// DeviceSpec specifies a host device to mount into a container. -message DeviceSpec { - // Path of the device within the container. - string container_path = 1; - // Path of the device on the host. - string host_path = 2; - // Cgroups permissions of the device, candidates are one or more of - // * r - allows container to read from the specified device. - // * w - allows container to write to the specified device. - // * m - allows container to create device files that do not yet exist. - string permissions = 3; -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go deleted file mode 100644 index ff1e5478..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go +++ /dev/null @@ -1,2195 +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 kubelet - -import ( - "context" - "crypto/tls" - "fmt" - "math" - "net" - "net/http" - "net/url" - "os" - "path" - "sort" - "sync" - "sync/atomic" - "time" - - "github.com/golang/glog" - - cadvisorapi "github.com/google/cadvisor/info/v1" - cadvisorapiv2 "github.com/google/cadvisor/info/v2" - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/fields" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/clock" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/wait" - utilfeature "k8s.io/apiserver/pkg/util/feature" - clientset "k8s.io/client-go/kubernetes" - v1core "k8s.io/client-go/kubernetes/typed/core/v1" - corelisters "k8s.io/client-go/listers/core/v1" - "k8s.io/client-go/tools/cache" - "k8s.io/client-go/tools/record" - "k8s.io/client-go/util/certificate" - "k8s.io/client-go/util/flowcontrol" - "k8s.io/client-go/util/integer" - api "k8s.io/kubernetes/pkg/apis/core" - "k8s.io/kubernetes/pkg/cloudprovider" - "k8s.io/kubernetes/pkg/features" - internalapi "k8s.io/kubernetes/pkg/kubelet/apis/cri" - kubeletconfiginternal "k8s.io/kubernetes/pkg/kubelet/apis/kubeletconfig" - "k8s.io/kubernetes/pkg/kubelet/cadvisor" - kubeletcertificate "k8s.io/kubernetes/pkg/kubelet/certificate" - "k8s.io/kubernetes/pkg/kubelet/checkpointmanager" - "k8s.io/kubernetes/pkg/kubelet/cm" - "k8s.io/kubernetes/pkg/kubelet/config" - "k8s.io/kubernetes/pkg/kubelet/configmap" - kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - "k8s.io/kubernetes/pkg/kubelet/dockershim" - dockerremote "k8s.io/kubernetes/pkg/kubelet/dockershim/remote" - "k8s.io/kubernetes/pkg/kubelet/events" - "k8s.io/kubernetes/pkg/kubelet/eviction" - "k8s.io/kubernetes/pkg/kubelet/images" - "k8s.io/kubernetes/pkg/kubelet/kubeletconfig" - "k8s.io/kubernetes/pkg/kubelet/kuberuntime" - "k8s.io/kubernetes/pkg/kubelet/lifecycle" - "k8s.io/kubernetes/pkg/kubelet/logs" - "k8s.io/kubernetes/pkg/kubelet/metrics" - "k8s.io/kubernetes/pkg/kubelet/metrics/collectors" - "k8s.io/kubernetes/pkg/kubelet/network/dns" - "k8s.io/kubernetes/pkg/kubelet/pleg" - kubepod "k8s.io/kubernetes/pkg/kubelet/pod" - "k8s.io/kubernetes/pkg/kubelet/preemption" - "k8s.io/kubernetes/pkg/kubelet/prober" - proberesults "k8s.io/kubernetes/pkg/kubelet/prober/results" - "k8s.io/kubernetes/pkg/kubelet/remote" - "k8s.io/kubernetes/pkg/kubelet/secret" - "k8s.io/kubernetes/pkg/kubelet/server" - serverstats "k8s.io/kubernetes/pkg/kubelet/server/stats" - "k8s.io/kubernetes/pkg/kubelet/server/streaming" - "k8s.io/kubernetes/pkg/kubelet/stats" - "k8s.io/kubernetes/pkg/kubelet/status" - "k8s.io/kubernetes/pkg/kubelet/sysctl" - "k8s.io/kubernetes/pkg/kubelet/token" - kubetypes "k8s.io/kubernetes/pkg/kubelet/types" - "k8s.io/kubernetes/pkg/kubelet/util/format" - "k8s.io/kubernetes/pkg/kubelet/util/manager" - "k8s.io/kubernetes/pkg/kubelet/util/pluginwatcher" - "k8s.io/kubernetes/pkg/kubelet/util/queue" - "k8s.io/kubernetes/pkg/kubelet/util/sliceutils" - "k8s.io/kubernetes/pkg/kubelet/volumemanager" - "k8s.io/kubernetes/pkg/scheduler/algorithm/predicates" - "k8s.io/kubernetes/pkg/security/apparmor" - sysctlwhitelist "k8s.io/kubernetes/pkg/security/podsecuritypolicy/sysctl" - utildbus "k8s.io/kubernetes/pkg/util/dbus" - kubeio "k8s.io/kubernetes/pkg/util/io" - utilipt "k8s.io/kubernetes/pkg/util/iptables" - "k8s.io/kubernetes/pkg/util/mount" - nodeutil "k8s.io/kubernetes/pkg/util/node" - "k8s.io/kubernetes/pkg/util/oom" - "k8s.io/kubernetes/pkg/volume" - "k8s.io/kubernetes/pkg/volume/csi" - utilexec "k8s.io/utils/exec" -) - -const ( - // Max amount of time to wait for the container runtime to come up. - maxWaitForContainerRuntime = 30 * time.Second - - // nodeStatusUpdateRetry specifies how many times kubelet retries when posting node status failed. - nodeStatusUpdateRetry = 5 - - // ContainerLogsDir is the location of container logs. - ContainerLogsDir = "/var/log/containers" - - // MaxContainerBackOff is the max backoff period, exported for the e2e test - MaxContainerBackOff = 300 * time.Second - - // Capacity of the channel for storing pods to kill. A small number should - // suffice because a goroutine is dedicated to check the channel and does - // not block on anything else. - podKillingChannelCapacity = 50 - - // Period for performing global cleanup tasks. - housekeepingPeriod = time.Second * 2 - - // Period for performing eviction monitoring. - // TODO ensure this is in sync with internal cadvisor housekeeping. - evictionMonitoringPeriod = time.Second * 10 - - // The path in containers' filesystems where the hosts file is mounted. - etcHostsPath = "/etc/hosts" - - // Capacity of the channel for receiving pod lifecycle events. This number - // is a bit arbitrary and may be adjusted in the future. - plegChannelCapacity = 1000 - - // Generic PLEG relies on relisting for discovering container events. - // A longer period means that kubelet will take longer to detect container - // changes and to update pod status. On the other hand, a shorter period - // will cause more frequent relisting (e.g., container runtime operations), - // leading to higher cpu usage. - // Note that even though we set the period to 1s, the relisting itself can - // take more than 1s to finish if the container runtime responds slowly - // and/or when there are many container changes in one cycle. - plegRelistPeriod = time.Second * 1 - - // backOffPeriod is the period to back off when pod syncing results in an - // error. It is also used as the base period for the exponential backoff - // container restarts and image pulls. - backOffPeriod = time.Second * 10 - - // ContainerGCPeriod is the period for performing container garbage collection. - ContainerGCPeriod = time.Minute - // ImageGCPeriod is the period for performing image garbage collection. - ImageGCPeriod = 5 * time.Minute - - // Minimum number of dead containers to keep in a pod - minDeadContainerInPod = 1 -) - -// SyncHandler is an interface implemented by Kubelet, for testability -type SyncHandler interface { - HandlePodAdditions(pods []*v1.Pod) - HandlePodUpdates(pods []*v1.Pod) - HandlePodRemoves(pods []*v1.Pod) - HandlePodReconcile(pods []*v1.Pod) - HandlePodSyncs(pods []*v1.Pod) - HandlePodCleanups() error -} - -// Option is a functional option type for Kubelet -type Option func(*Kubelet) - -// Bootstrap is a bootstrapping interface for kubelet, targets the initialization protocol -type Bootstrap interface { - GetConfiguration() kubeletconfiginternal.KubeletConfiguration - BirthCry() - StartGarbageCollection() - ListenAndServe(address net.IP, port uint, tlsOptions *server.TLSOptions, auth server.AuthInterface, enableDebuggingHandlers, enableContentionProfiling bool) - ListenAndServeReadOnly(address net.IP, port uint) - Run(<-chan kubetypes.PodUpdate) - RunOnce(<-chan kubetypes.PodUpdate) ([]RunPodResult, error) -} - -// Builder creates and initializes a Kubelet instance -type Builder func(kubeCfg *kubeletconfiginternal.KubeletConfiguration, - kubeDeps *Dependencies, - crOptions *config.ContainerRuntimeOptions, - containerRuntime string, - runtimeCgroups string, - hostnameOverride string, - nodeIP string, - providerID string, - cloudProvider string, - certDirectory string, - rootDirectory string, - registerNode bool, - registerWithTaints []api.Taint, - allowedUnsafeSysctls []string, - remoteRuntimeEndpoint string, - remoteImageEndpoint string, - experimentalMounterPath string, - experimentalKernelMemcgNotification bool, - experimentalCheckNodeCapabilitiesBeforeMount bool, - experimentalNodeAllocatableIgnoreEvictionThreshold bool, - minimumGCAge metav1.Duration, - maxPerPodContainerCount int32, - maxContainerCount int32, - masterServiceNamespace string, - registerSchedulable bool, - nonMasqueradeCIDR string, - keepTerminatedPodVolumes bool, - nodeLabels map[string]string, - seccompProfileRoot string, - bootstrapCheckpointPath string, - nodeStatusMaxImages int32) (Bootstrap, error) - -// Dependencies is a bin for things we might consider "injected dependencies" -- objects constructed -// at runtime that are necessary for running the Kubelet. This is a temporary solution for grouping -// these objects while we figure out a more comprehensive dependency injection story for the Kubelet. -type Dependencies struct { - Options []Option - - // Injected Dependencies - Auth server.AuthInterface - CAdvisorInterface cadvisor.Interface - Cloud cloudprovider.Interface - ContainerManager cm.ContainerManager - DockerClientConfig *dockershim.ClientConfig - EventClient v1core.EventsGetter - HeartbeatClient v1core.CoreV1Interface - OnHeartbeatFailure func() - KubeClient clientset.Interface - ExternalKubeClient clientset.Interface - Mounter mount.Interface - OOMAdjuster *oom.OOMAdjuster - OSInterface kubecontainer.OSInterface - PodConfig *config.PodConfig - Recorder record.EventRecorder - Writer kubeio.Writer - VolumePlugins []volume.VolumePlugin - DynamicPluginProber volume.DynamicPluginProber - TLSOptions *server.TLSOptions - KubeletConfigController *kubeletconfig.Controller -} - -// makePodSourceConfig creates a config.PodConfig from the given -// KubeletConfiguration or returns an error. -func makePodSourceConfig(kubeCfg *kubeletconfiginternal.KubeletConfiguration, kubeDeps *Dependencies, nodeName types.NodeName, bootstrapCheckpointPath string) (*config.PodConfig, error) { - manifestURLHeader := make(http.Header) - if len(kubeCfg.StaticPodURLHeader) > 0 { - for k, v := range kubeCfg.StaticPodURLHeader { - for i := range v { - manifestURLHeader.Add(k, v[i]) - } - } - } - - // source of all configuration - cfg := config.NewPodConfig(config.PodConfigNotificationIncremental, kubeDeps.Recorder) - - // define file config source - if kubeCfg.StaticPodPath != "" { - glog.Infof("Adding pod path: %v", kubeCfg.StaticPodPath) - config.NewSourceFile(kubeCfg.StaticPodPath, nodeName, kubeCfg.FileCheckFrequency.Duration, cfg.Channel(kubetypes.FileSource)) - } - - // define url config source - if kubeCfg.StaticPodURL != "" { - glog.Infof("Adding pod url %q with HTTP header %v", kubeCfg.StaticPodURL, manifestURLHeader) - config.NewSourceURL(kubeCfg.StaticPodURL, manifestURLHeader, nodeName, kubeCfg.HTTPCheckFrequency.Duration, cfg.Channel(kubetypes.HTTPSource)) - } - - // Restore from the checkpoint path - // NOTE: This MUST happen before creating the apiserver source - // below, or the checkpoint would override the source of truth. - - var updatechannel chan<- interface{} - if bootstrapCheckpointPath != "" { - glog.Infof("Adding checkpoint path: %v", bootstrapCheckpointPath) - updatechannel = cfg.Channel(kubetypes.ApiserverSource) - err := cfg.Restore(bootstrapCheckpointPath, updatechannel) - if err != nil { - return nil, err - } - } - - if kubeDeps.KubeClient != nil { - glog.Infof("Watching apiserver") - if updatechannel == nil { - updatechannel = cfg.Channel(kubetypes.ApiserverSource) - } - config.NewSourceApiserver(kubeDeps.KubeClient, nodeName, updatechannel) - } - return cfg, nil -} - -func getRuntimeAndImageServices(remoteRuntimeEndpoint string, remoteImageEndpoint string, runtimeRequestTimeout metav1.Duration) (internalapi.RuntimeService, internalapi.ImageManagerService, error) { - rs, err := remote.NewRemoteRuntimeService(remoteRuntimeEndpoint, runtimeRequestTimeout.Duration) - if err != nil { - return nil, nil, err - } - is, err := remote.NewRemoteImageService(remoteImageEndpoint, runtimeRequestTimeout.Duration) - if err != nil { - return nil, nil, err - } - return rs, is, err -} - -// NewMainKubelet instantiates a new Kubelet object along with all the required internal modules. -// No initialization of Kubelet and its modules should happen here. -func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, - kubeDeps *Dependencies, - crOptions *config.ContainerRuntimeOptions, - containerRuntime string, - runtimeCgroups string, - hostnameOverride string, - nodeIP string, - providerID string, - cloudProvider string, - certDirectory string, - rootDirectory string, - registerNode bool, - registerWithTaints []api.Taint, - allowedUnsafeSysctls []string, - remoteRuntimeEndpoint string, - remoteImageEndpoint string, - experimentalMounterPath string, - experimentalKernelMemcgNotification bool, - experimentalCheckNodeCapabilitiesBeforeMount bool, - experimentalNodeAllocatableIgnoreEvictionThreshold bool, - minimumGCAge metav1.Duration, - maxPerPodContainerCount int32, - maxContainerCount int32, - masterServiceNamespace string, - registerSchedulable bool, - nonMasqueradeCIDR string, - keepTerminatedPodVolumes bool, - nodeLabels map[string]string, - seccompProfileRoot string, - bootstrapCheckpointPath string, - nodeStatusMaxImages int32) (*Kubelet, error) { - if rootDirectory == "" { - return nil, fmt.Errorf("invalid root directory %q", rootDirectory) - } - if kubeCfg.SyncFrequency.Duration <= 0 { - return nil, fmt.Errorf("invalid sync frequency %d", kubeCfg.SyncFrequency.Duration) - } - - if kubeCfg.MakeIPTablesUtilChains { - if kubeCfg.IPTablesMasqueradeBit > 31 || kubeCfg.IPTablesMasqueradeBit < 0 { - return nil, fmt.Errorf("iptables-masquerade-bit is not valid. Must be within [0, 31]") - } - if kubeCfg.IPTablesDropBit > 31 || kubeCfg.IPTablesDropBit < 0 { - return nil, fmt.Errorf("iptables-drop-bit is not valid. Must be within [0, 31]") - } - if kubeCfg.IPTablesDropBit == kubeCfg.IPTablesMasqueradeBit { - return nil, fmt.Errorf("iptables-masquerade-bit and iptables-drop-bit must be different") - } - } - - hostname := nodeutil.GetHostname(hostnameOverride) - // Query the cloud provider for our node name, default to hostname - nodeName := types.NodeName(hostname) - cloudIPs := []net.IP{} - cloudNames := []string{} - if kubeDeps.Cloud != nil { - var err error - instances, ok := kubeDeps.Cloud.Instances() - if !ok { - return nil, fmt.Errorf("failed to get instances from cloud provider") - } - - nodeName, err = instances.CurrentNodeName(context.TODO(), hostname) - if err != nil { - return nil, fmt.Errorf("error fetching current instance name from cloud provider: %v", err) - } - - glog.V(2).Infof("cloud provider determined current node name to be %s", nodeName) - - if utilfeature.DefaultFeatureGate.Enabled(features.RotateKubeletServerCertificate) { - nodeAddresses, err := instances.NodeAddresses(context.TODO(), nodeName) - if err != nil { - return nil, fmt.Errorf("failed to get the addresses of the current instance from the cloud provider: %v", err) - } - for _, nodeAddress := range nodeAddresses { - switch nodeAddress.Type { - case v1.NodeExternalIP, v1.NodeInternalIP: - ip := net.ParseIP(nodeAddress.Address) - if ip != nil && !ip.IsLoopback() { - cloudIPs = append(cloudIPs, ip) - } - case v1.NodeExternalDNS, v1.NodeInternalDNS, v1.NodeHostName: - cloudNames = append(cloudNames, nodeAddress.Address) - } - } - } - - } - - if kubeDeps.PodConfig == nil { - var err error - kubeDeps.PodConfig, err = makePodSourceConfig(kubeCfg, kubeDeps, nodeName, bootstrapCheckpointPath) - if err != nil { - return nil, err - } - } - - containerGCPolicy := kubecontainer.ContainerGCPolicy{ - MinAge: minimumGCAge.Duration, - MaxPerPodContainer: int(maxPerPodContainerCount), - MaxContainers: int(maxContainerCount), - } - - daemonEndpoints := &v1.NodeDaemonEndpoints{ - KubeletEndpoint: v1.DaemonEndpoint{Port: kubeCfg.Port}, - } - - imageGCPolicy := images.ImageGCPolicy{ - MinAge: kubeCfg.ImageMinimumGCAge.Duration, - HighThresholdPercent: int(kubeCfg.ImageGCHighThresholdPercent), - LowThresholdPercent: int(kubeCfg.ImageGCLowThresholdPercent), - } - - enforceNodeAllocatable := kubeCfg.EnforceNodeAllocatable - if experimentalNodeAllocatableIgnoreEvictionThreshold { - // Do not provide kubeCfg.EnforceNodeAllocatable to eviction threshold parsing if we are not enforcing Evictions - enforceNodeAllocatable = []string{} - } - thresholds, err := eviction.ParseThresholdConfig(enforceNodeAllocatable, kubeCfg.EvictionHard, kubeCfg.EvictionSoft, kubeCfg.EvictionSoftGracePeriod, kubeCfg.EvictionMinimumReclaim) - if err != nil { - return nil, err - } - evictionConfig := eviction.Config{ - PressureTransitionPeriod: kubeCfg.EvictionPressureTransitionPeriod.Duration, - MaxPodGracePeriodSeconds: int64(kubeCfg.EvictionMaxPodGracePeriod), - Thresholds: thresholds, - KernelMemcgNotification: experimentalKernelMemcgNotification, - PodCgroupRoot: kubeDeps.ContainerManager.GetPodCgroupRoot(), - } - - serviceIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) - if kubeDeps.KubeClient != nil { - serviceLW := cache.NewListWatchFromClient(kubeDeps.KubeClient.CoreV1().RESTClient(), "services", metav1.NamespaceAll, fields.Everything()) - r := cache.NewReflector(serviceLW, &v1.Service{}, serviceIndexer, 0) - go r.Run(wait.NeverStop) - } - serviceLister := corelisters.NewServiceLister(serviceIndexer) - - nodeIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{}) - if kubeDeps.KubeClient != nil { - fieldSelector := fields.Set{api.ObjectNameField: string(nodeName)}.AsSelector() - nodeLW := cache.NewListWatchFromClient(kubeDeps.KubeClient.CoreV1().RESTClient(), "nodes", metav1.NamespaceAll, fieldSelector) - r := cache.NewReflector(nodeLW, &v1.Node{}, nodeIndexer, 0) - go r.Run(wait.NeverStop) - } - nodeInfo := &predicates.CachedNodeInfo{NodeLister: corelisters.NewNodeLister(nodeIndexer)} - - // TODO: get the real node object of ourself, - // and use the real node name and UID. - // TODO: what is namespace for node? - nodeRef := &v1.ObjectReference{ - Kind: "Node", - Name: string(nodeName), - UID: types.UID(nodeName), - Namespace: "", - } - - containerRefManager := kubecontainer.NewRefManager() - - oomWatcher := NewOOMWatcher(kubeDeps.CAdvisorInterface, kubeDeps.Recorder) - - clusterDNS := make([]net.IP, 0, len(kubeCfg.ClusterDNS)) - for _, ipEntry := range kubeCfg.ClusterDNS { - ip := net.ParseIP(ipEntry) - if ip == nil { - glog.Warningf("Invalid clusterDNS ip '%q'", ipEntry) - } else { - clusterDNS = append(clusterDNS, ip) - } - } - httpClient := &http.Client{} - parsedNodeIP := net.ParseIP(nodeIP) - - klet := &Kubelet{ - hostname: hostname, - nodeName: nodeName, - kubeClient: kubeDeps.KubeClient, - heartbeatClient: kubeDeps.HeartbeatClient, - onRepeatedHeartbeatFailure: kubeDeps.OnHeartbeatFailure, - rootDirectory: rootDirectory, - resyncInterval: kubeCfg.SyncFrequency.Duration, - sourcesReady: config.NewSourcesReady(kubeDeps.PodConfig.SeenAllSources), - registerNode: registerNode, - registerWithTaints: registerWithTaints, - registerSchedulable: registerSchedulable, - dnsConfigurer: dns.NewConfigurer(kubeDeps.Recorder, nodeRef, parsedNodeIP, clusterDNS, kubeCfg.ClusterDomain, kubeCfg.ResolverConfig), - serviceLister: serviceLister, - nodeInfo: nodeInfo, - masterServiceNamespace: masterServiceNamespace, - streamingConnectionIdleTimeout: kubeCfg.StreamingConnectionIdleTimeout.Duration, - recorder: kubeDeps.Recorder, - cadvisor: kubeDeps.CAdvisorInterface, - cloud: kubeDeps.Cloud, - externalCloudProvider: cloudprovider.IsExternal(cloudProvider), - providerID: providerID, - nodeRef: nodeRef, - nodeLabels: nodeLabels, - nodeStatusUpdateFrequency: kubeCfg.NodeStatusUpdateFrequency.Duration, - os: kubeDeps.OSInterface, - oomWatcher: oomWatcher, - cgroupsPerQOS: kubeCfg.CgroupsPerQOS, - cgroupRoot: kubeCfg.CgroupRoot, - mounter: kubeDeps.Mounter, - writer: kubeDeps.Writer, - maxPods: int(kubeCfg.MaxPods), - podsPerCore: int(kubeCfg.PodsPerCore), - syncLoopMonitor: atomic.Value{}, - daemonEndpoints: daemonEndpoints, - containerManager: kubeDeps.ContainerManager, - containerRuntimeName: containerRuntime, - redirectContainerStreaming: crOptions.RedirectContainerStreaming, - nodeIP: parsedNodeIP, - nodeIPValidator: validateNodeIP, - clock: clock.RealClock{}, - enableControllerAttachDetach: kubeCfg.EnableControllerAttachDetach, - iptClient: utilipt.New(utilexec.New(), utildbus.New(), utilipt.ProtocolIpv4), - makeIPTablesUtilChains: kubeCfg.MakeIPTablesUtilChains, - iptablesMasqueradeBit: int(kubeCfg.IPTablesMasqueradeBit), - iptablesDropBit: int(kubeCfg.IPTablesDropBit), - experimentalHostUserNamespaceDefaulting: utilfeature.DefaultFeatureGate.Enabled(features.ExperimentalHostUserNamespaceDefaultingGate), - keepTerminatedPodVolumes: keepTerminatedPodVolumes, - nodeStatusMaxImages: nodeStatusMaxImages, - enablePluginsWatcher: utilfeature.DefaultFeatureGate.Enabled(features.KubeletPluginsWatcher), - } - - if klet.cloud != nil { - klet.cloudproviderRequestParallelism = make(chan int, 1) - klet.cloudproviderRequestSync = make(chan int) - // TODO(jchaloup): Make it configurable via --cloud-provider-request-timeout - klet.cloudproviderRequestTimeout = 10 * time.Second - } - - secretManager := secret.NewCachingSecretManager( - kubeDeps.KubeClient, manager.GetObjectTTLFromNodeFunc(klet.GetNode)) - klet.secretManager = secretManager - - configMapManager := configmap.NewCachingConfigMapManager( - kubeDeps.KubeClient, manager.GetObjectTTLFromNodeFunc(klet.GetNode)) - klet.configMapManager = configMapManager - - if klet.experimentalHostUserNamespaceDefaulting { - glog.Infof("Experimental host user namespace defaulting is enabled.") - } - - machineInfo, err := klet.cadvisor.MachineInfo() - if err != nil { - return nil, err - } - klet.machineInfo = machineInfo - - imageBackOff := flowcontrol.NewBackOff(backOffPeriod, MaxContainerBackOff) - - klet.livenessManager = proberesults.NewManager() - - klet.podCache = kubecontainer.NewCache() - var checkpointManager checkpointmanager.CheckpointManager - if bootstrapCheckpointPath != "" { - checkpointManager, err = checkpointmanager.NewCheckpointManager(bootstrapCheckpointPath) - if err != nil { - return nil, fmt.Errorf("failed to initialize checkpoint manager: %+v", err) - } - } - // podManager is also responsible for keeping secretManager and configMapManager contents up-to-date. - klet.podManager = kubepod.NewBasicPodManager(kubepod.NewBasicMirrorClient(klet.kubeClient), secretManager, configMapManager, checkpointManager) - - if remoteRuntimeEndpoint != "" { - // remoteImageEndpoint is same as remoteRuntimeEndpoint if not explicitly specified - if remoteImageEndpoint == "" { - remoteImageEndpoint = remoteRuntimeEndpoint - } - } - - // TODO: These need to become arguments to a standalone docker shim. - pluginSettings := dockershim.NetworkPluginSettings{ - HairpinMode: kubeletconfiginternal.HairpinMode(kubeCfg.HairpinMode), - NonMasqueradeCIDR: nonMasqueradeCIDR, - PluginName: crOptions.NetworkPluginName, - PluginConfDir: crOptions.CNIConfDir, - PluginBinDirString: crOptions.CNIBinDir, - MTU: int(crOptions.NetworkPluginMTU), - } - - klet.resourceAnalyzer = serverstats.NewResourceAnalyzer(klet, kubeCfg.VolumeStatsAggPeriod.Duration) - - if containerRuntime == "rkt" { - glog.Fatalln("rktnetes has been deprecated in favor of rktlet. Please see https://github.com/kubernetes-incubator/rktlet for more information.") - } - - // if left at nil, that means it is unneeded - var legacyLogProvider kuberuntime.LegacyLogProvider - - switch containerRuntime { - case kubetypes.DockerContainerRuntime: - // Create and start the CRI shim running as a grpc server. - streamingConfig := getStreamingConfig(kubeCfg, kubeDeps, crOptions) - ds, err := dockershim.NewDockerService(kubeDeps.DockerClientConfig, crOptions.PodSandboxImage, streamingConfig, - &pluginSettings, runtimeCgroups, kubeCfg.CgroupDriver, crOptions.DockershimRootDirectory, - crOptions.DockerDisableSharedPID, !crOptions.RedirectContainerStreaming) - if err != nil { - return nil, err - } - if crOptions.RedirectContainerStreaming { - klet.criHandler = ds - } - - // The unix socket for kubelet <-> dockershim communication. - glog.V(5).Infof("RemoteRuntimeEndpoint: %q, RemoteImageEndpoint: %q", - remoteRuntimeEndpoint, - remoteImageEndpoint) - glog.V(2).Infof("Starting the GRPC server for the docker CRI shim.") - server := dockerremote.NewDockerServer(remoteRuntimeEndpoint, ds) - if err := server.Start(); err != nil { - return nil, err - } - - // Create dockerLegacyService when the logging driver is not supported. - supported, err := ds.IsCRISupportedLogDriver() - if err != nil { - return nil, err - } - if !supported { - klet.dockerLegacyService = ds - legacyLogProvider = ds - } - case kubetypes.RemoteContainerRuntime: - // No-op. - break - default: - return nil, fmt.Errorf("unsupported CRI runtime: %q", containerRuntime) - } - runtimeService, imageService, err := getRuntimeAndImageServices(remoteRuntimeEndpoint, remoteImageEndpoint, kubeCfg.RuntimeRequestTimeout) - if err != nil { - return nil, err - } - klet.runtimeService = runtimeService - runtime, err := kuberuntime.NewKubeGenericRuntimeManager( - kubecontainer.FilterEventRecorder(kubeDeps.Recorder), - klet.livenessManager, - seccompProfileRoot, - containerRefManager, - machineInfo, - klet, - kubeDeps.OSInterface, - klet, - httpClient, - imageBackOff, - kubeCfg.SerializeImagePulls, - float32(kubeCfg.RegistryPullQPS), - int(kubeCfg.RegistryBurst), - kubeCfg.CPUCFSQuota, - runtimeService, - imageService, - kubeDeps.ContainerManager.InternalContainerLifecycle(), - legacyLogProvider, - ) - if err != nil { - return nil, err - } - klet.containerRuntime = runtime - klet.streamingRuntime = runtime - klet.runner = runtime - - if cadvisor.UsingLegacyCadvisorStats(containerRuntime, remoteRuntimeEndpoint) { - klet.StatsProvider = stats.NewCadvisorStatsProvider( - klet.cadvisor, - klet.resourceAnalyzer, - klet.podManager, - klet.runtimeCache, - klet.containerRuntime) - } else { - klet.StatsProvider = stats.NewCRIStatsProvider( - klet.cadvisor, - klet.resourceAnalyzer, - klet.podManager, - klet.runtimeCache, - runtimeService, - imageService, - stats.NewLogMetricsService()) - } - - klet.pleg = pleg.NewGenericPLEG(klet.containerRuntime, plegChannelCapacity, plegRelistPeriod, klet.podCache, clock.RealClock{}) - klet.runtimeState = newRuntimeState(maxWaitForContainerRuntime) - klet.runtimeState.addHealthCheck("PLEG", klet.pleg.Healthy) - klet.updatePodCIDR(kubeCfg.PodCIDR) - - // setup containerGC - containerGC, err := kubecontainer.NewContainerGC(klet.containerRuntime, containerGCPolicy, klet.sourcesReady) - if err != nil { - return nil, err - } - klet.containerGC = containerGC - klet.containerDeletor = newPodContainerDeletor(klet.containerRuntime, integer.IntMax(containerGCPolicy.MaxPerPodContainer, minDeadContainerInPod)) - - // setup imageManager - imageManager, err := images.NewImageGCManager(klet.containerRuntime, klet.StatsProvider, kubeDeps.Recorder, nodeRef, imageGCPolicy, crOptions.PodSandboxImage) - if err != nil { - return nil, fmt.Errorf("failed to initialize image manager: %v", err) - } - klet.imageManager = imageManager - - if containerRuntime == kubetypes.RemoteContainerRuntime && utilfeature.DefaultFeatureGate.Enabled(features.CRIContainerLogRotation) { - // setup containerLogManager for CRI container runtime - containerLogManager, err := logs.NewContainerLogManager( - klet.runtimeService, - kubeCfg.ContainerLogMaxSize, - int(kubeCfg.ContainerLogMaxFiles), - ) - if err != nil { - return nil, fmt.Errorf("failed to initialize container log manager: %v", err) - } - klet.containerLogManager = containerLogManager - } else { - klet.containerLogManager = logs.NewStubContainerLogManager() - } - - klet.statusManager = status.NewManager(klet.kubeClient, klet.podManager, klet) - - if kubeCfg.ServerTLSBootstrap && kubeDeps.TLSOptions != nil && utilfeature.DefaultFeatureGate.Enabled(features.RotateKubeletServerCertificate) { - var ( - ips []net.IP - names []string - ) - - // If the address was explicitly configured, use that. Otherwise, try to - // discover addresses from the cloudprovider. Otherwise, make a best guess. - if cfgAddress := net.ParseIP(kubeCfg.Address); cfgAddress != nil && !cfgAddress.IsUnspecified() { - ips = []net.IP{cfgAddress} - names = []string{klet.GetHostname(), hostnameOverride} - } else if len(cloudIPs) != 0 || len(cloudNames) != 0 { - ips = cloudIPs - names = cloudNames - } else { - localIPs, err := allGlobalUnicastIPs() - if err != nil { - return nil, err - } - ips = localIPs - names = []string{klet.GetHostname(), hostnameOverride} - } - - klet.serverCertificateManager, err = kubeletcertificate.NewKubeletServerCertificateManager(klet.kubeClient, kubeCfg, klet.nodeName, ips, names, certDirectory) - if err != nil { - return nil, fmt.Errorf("failed to initialize certificate manager: %v", err) - } - kubeDeps.TLSOptions.Config.GetCertificate = func(*tls.ClientHelloInfo) (*tls.Certificate, error) { - cert := klet.serverCertificateManager.Current() - if cert == nil { - return nil, fmt.Errorf("no serving certificate available for the kubelet") - } - return cert, nil - } - } - - klet.probeManager = prober.NewManager( - klet.statusManager, - klet.livenessManager, - klet.runner, - containerRefManager, - kubeDeps.Recorder) - - tokenManager := token.NewManager(kubeDeps.KubeClient) - - klet.volumePluginMgr, err = - NewInitializedVolumePluginMgr(klet, secretManager, configMapManager, tokenManager, kubeDeps.VolumePlugins, kubeDeps.DynamicPluginProber) - if err != nil { - return nil, err - } - if klet.enablePluginsWatcher { - klet.pluginWatcher = pluginwatcher.NewWatcher(klet.getPluginsDir()) - } - - // If the experimentalMounterPathFlag is set, we do not want to - // check node capabilities since the mount path is not the default - if len(experimentalMounterPath) != 0 { - experimentalCheckNodeCapabilitiesBeforeMount = false - // Replace the nameserver in containerized-mounter's rootfs/etc/resolve.conf with kubelet.ClusterDNS - // so that service name could be resolved - klet.dnsConfigurer.SetupDNSinContainerizedMounter(experimentalMounterPath) - } - - // setup volumeManager - klet.volumeManager = volumemanager.NewVolumeManager( - kubeCfg.EnableControllerAttachDetach, - nodeName, - klet.podManager, - klet.statusManager, - klet.kubeClient, - klet.volumePluginMgr, - klet.containerRuntime, - kubeDeps.Mounter, - klet.getPodsDir(), - kubeDeps.Recorder, - experimentalCheckNodeCapabilitiesBeforeMount, - keepTerminatedPodVolumes) - - runtimeCache, err := kubecontainer.NewRuntimeCache(klet.containerRuntime) - if err != nil { - return nil, err - } - klet.runtimeCache = runtimeCache - klet.reasonCache = NewReasonCache() - klet.workQueue = queue.NewBasicWorkQueue(klet.clock) - klet.podWorkers = newPodWorkers(klet.syncPod, kubeDeps.Recorder, klet.workQueue, klet.resyncInterval, backOffPeriod, klet.podCache) - - klet.backOff = flowcontrol.NewBackOff(backOffPeriod, MaxContainerBackOff) - klet.podKillingCh = make(chan *kubecontainer.PodPair, podKillingChannelCapacity) - klet.setNodeStatusFuncs = klet.defaultNodeStatusFuncs() - - // setup eviction manager - evictionManager, evictionAdmitHandler := eviction.NewManager(klet.resourceAnalyzer, evictionConfig, killPodNow(klet.podWorkers, kubeDeps.Recorder), klet.imageManager, klet.containerGC, kubeDeps.Recorder, nodeRef, klet.clock) - - klet.evictionManager = evictionManager - klet.admitHandlers.AddPodAdmitHandler(evictionAdmitHandler) - - if utilfeature.DefaultFeatureGate.Enabled(features.Sysctls) { - // add sysctl admission - runtimeSupport, err := sysctl.NewRuntimeAdmitHandler(klet.containerRuntime) - if err != nil { - return nil, err - } - - // Safe, whitelisted sysctls can always be used as unsafe sysctls in the spec. - // Hence, we concatenate those two lists. - safeAndUnsafeSysctls := append(sysctlwhitelist.SafeSysctlWhitelist(), allowedUnsafeSysctls...) - sysctlsWhitelist, err := sysctl.NewWhitelist(safeAndUnsafeSysctls) - if err != nil { - return nil, err - } - klet.admitHandlers.AddPodAdmitHandler(runtimeSupport) - klet.admitHandlers.AddPodAdmitHandler(sysctlsWhitelist) - } - - // enable active deadline handler - activeDeadlineHandler, err := newActiveDeadlineHandler(klet.statusManager, kubeDeps.Recorder, klet.clock) - if err != nil { - return nil, err - } - klet.AddPodSyncLoopHandler(activeDeadlineHandler) - klet.AddPodSyncHandler(activeDeadlineHandler) - - criticalPodAdmissionHandler := preemption.NewCriticalPodAdmissionHandler(klet.GetActivePods, killPodNow(klet.podWorkers, kubeDeps.Recorder), kubeDeps.Recorder) - klet.admitHandlers.AddPodAdmitHandler(lifecycle.NewPredicateAdmitHandler(klet.getNodeAnyWay, criticalPodAdmissionHandler, klet.containerManager.UpdatePluginResources)) - // apply functional Option's - for _, opt := range kubeDeps.Options { - opt(klet) - } - - klet.appArmorValidator = apparmor.NewValidator(containerRuntime) - klet.softAdmitHandlers.AddPodAdmitHandler(lifecycle.NewAppArmorAdmitHandler(klet.appArmorValidator)) - klet.softAdmitHandlers.AddPodAdmitHandler(lifecycle.NewNoNewPrivsAdmitHandler(klet.containerRuntime)) - // Finally, put the most recent version of the config on the Kubelet, so - // people can see how it was configured. - klet.kubeletConfiguration = *kubeCfg - return klet, nil -} - -type serviceLister interface { - List(labels.Selector) ([]*v1.Service, error) -} - -// Kubelet is the main kubelet implementation. -type Kubelet struct { - kubeletConfiguration kubeletconfiginternal.KubeletConfiguration - - hostname string - nodeName types.NodeName - runtimeCache kubecontainer.RuntimeCache - kubeClient clientset.Interface - heartbeatClient v1core.CoreV1Interface - iptClient utilipt.Interface - rootDirectory string - - // onRepeatedHeartbeatFailure is called when a heartbeat operation fails more than once. optional. - onRepeatedHeartbeatFailure func() - - // podWorkers handle syncing Pods in response to events. - podWorkers PodWorkers - - // resyncInterval is the interval between periodic full reconciliations of - // pods on this node. - resyncInterval time.Duration - - // sourcesReady records the sources seen by the kubelet, it is thread-safe. - sourcesReady config.SourcesReady - - // podManager is a facade that abstracts away the various sources of pods - // this Kubelet services. - podManager kubepod.Manager - - // Needed to observe and respond to situations that could impact node stability - evictionManager eviction.Manager - - // Optional, defaults to /logs/ from /var/log - logServer http.Handler - // Optional, defaults to simple Docker implementation - runner kubecontainer.ContainerCommandRunner - - // cAdvisor used for container information. - cadvisor cadvisor.Interface - - // Set to true to have the node register itself with the apiserver. - registerNode bool - // List of taints to add to a node object when the kubelet registers itself. - registerWithTaints []api.Taint - // Set to true to have the node register itself as schedulable. - registerSchedulable bool - // for internal book keeping; access only from within registerWithApiserver - registrationCompleted bool - - // dnsConfigurer is used for setting up DNS resolver configuration when launching pods. - dnsConfigurer *dns.Configurer - - // masterServiceNamespace is the namespace that the master service is exposed in. - masterServiceNamespace string - // serviceLister knows how to list services - serviceLister serviceLister - // nodeInfo knows how to get information about the node for this kubelet. - nodeInfo predicates.NodeInfo - - // a list of node labels to register - nodeLabels map[string]string - - // Last timestamp when runtime responded on ping. - // Mutex is used to protect this value. - runtimeState *runtimeState - - // Volume plugins. - volumePluginMgr *volume.VolumePluginMgr - - // Handles container probing. - probeManager prober.Manager - // Manages container health check results. - livenessManager proberesults.Manager - - // How long to keep idle streaming command execution/port forwarding - // connections open before terminating them - streamingConnectionIdleTimeout time.Duration - - // The EventRecorder to use - recorder record.EventRecorder - - // Policy for handling garbage collection of dead containers. - containerGC kubecontainer.ContainerGC - - // Manager for image garbage collection. - imageManager images.ImageGCManager - - // Manager for container logs. - containerLogManager logs.ContainerLogManager - - // Secret manager. - secretManager secret.Manager - - // ConfigMap manager. - configMapManager configmap.Manager - - // Cached MachineInfo returned by cadvisor. - machineInfo *cadvisorapi.MachineInfo - - //Cached RootFsInfo returned by cadvisor - rootfsInfo *cadvisorapiv2.FsInfo - - // Handles certificate rotations. - serverCertificateManager certificate.Manager - - // Syncs pods statuses with apiserver; also used as a cache of statuses. - statusManager status.Manager - - // VolumeManager runs a set of asynchronous loops that figure out which - // volumes need to be attached/mounted/unmounted/detached based on the pods - // scheduled on this node and makes it so. - volumeManager volumemanager.VolumeManager - - // Cloud provider interface. - cloud cloudprovider.Interface - // To keep exclusive access to the cloudproviderRequestParallelism - cloudproviderRequestMux sync.Mutex - // Keep the count of requests processed in parallel (expected to be 1 at most at a given time) - cloudproviderRequestParallelism chan int - // Sync with finished requests - cloudproviderRequestSync chan int - // Request timeout - cloudproviderRequestTimeout time.Duration - - // Indicates that the node initialization happens in an external cloud controller - externalCloudProvider bool - // Reference to this node. - nodeRef *v1.ObjectReference - - // The name of the container runtime - containerRuntimeName string - - // redirectContainerStreaming enables container streaming redirect. - redirectContainerStreaming bool - - // Container runtime. - containerRuntime kubecontainer.Runtime - - // Streaming runtime handles container streaming. - streamingRuntime kubecontainer.StreamingRuntime - - // Container runtime service (needed by container runtime Start()). - // TODO(CD): try to make this available without holding a reference in this - // struct. For example, by adding a getter to generic runtime. - runtimeService internalapi.RuntimeService - - // reasonCache caches the failure reason of the last creation of all containers, which is - // used for generating ContainerStatus. - reasonCache *ReasonCache - - // nodeStatusUpdateFrequency specifies how often kubelet posts node status to master. - // Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod - // in nodecontroller. There are several constraints: - // 1. nodeMonitorGracePeriod must be N times more than nodeStatusUpdateFrequency, where - // N means number of retries allowed for kubelet to post node status. It is pointless - // to make nodeMonitorGracePeriod be less than nodeStatusUpdateFrequency, since there - // will only be fresh values from Kubelet at an interval of nodeStatusUpdateFrequency. - // The constant must be less than podEvictionTimeout. - // 2. nodeStatusUpdateFrequency needs to be large enough for kubelet to generate node - // status. Kubelet may fail to update node status reliably if the value is too small, - // as it takes time to gather all necessary node information. - nodeStatusUpdateFrequency time.Duration - - // Generates pod events. - pleg pleg.PodLifecycleEventGenerator - - // Store kubecontainer.PodStatus for all pods. - podCache kubecontainer.Cache - - // os is a facade for various syscalls that need to be mocked during testing. - os kubecontainer.OSInterface - - // Watcher of out of memory events. - oomWatcher OOMWatcher - - // Monitor resource usage - resourceAnalyzer serverstats.ResourceAnalyzer - - // Whether or not we should have the QOS cgroup hierarchy for resource management - cgroupsPerQOS bool - - // If non-empty, pass this to the container runtime as the root cgroup. - cgroupRoot string - - // Mounter to use for volumes. - mounter mount.Interface - - // Writer interface to use for volumes. - writer kubeio.Writer - - // Manager of non-Runtime containers. - containerManager cm.ContainerManager - - // Maximum Number of Pods which can be run by this Kubelet - maxPods int - - // Monitor Kubelet's sync loop - syncLoopMonitor atomic.Value - - // Container restart Backoff - backOff *flowcontrol.Backoff - - // Channel for sending pods to kill. - podKillingCh chan *kubecontainer.PodPair - - // Information about the ports which are opened by daemons on Node running this Kubelet server. - daemonEndpoints *v1.NodeDaemonEndpoints - - // A queue used to trigger pod workers. - workQueue queue.WorkQueue - - // oneTimeInitializer is used to initialize modules that are dependent on the runtime to be up. - oneTimeInitializer sync.Once - - // If non-nil, use this IP address for the node - nodeIP net.IP - - // use this function to validate the kubelet nodeIP - nodeIPValidator func(net.IP) error - - // If non-nil, this is a unique identifier for the node in an external database, eg. cloudprovider - providerID string - - // clock is an interface that provides time related functionality in a way that makes it - // easy to test the code. - clock clock.Clock - - // handlers called during the tryUpdateNodeStatus cycle - setNodeStatusFuncs []func(*v1.Node) error - - // TODO: think about moving this to be centralized in PodWorkers in follow-on. - // the list of handlers to call during pod admission. - admitHandlers lifecycle.PodAdmitHandlers - - // softAdmithandlers are applied to the pod after it is admitted by the Kubelet, but before it is - // run. A pod rejected by a softAdmitHandler will be left in a Pending state indefinitely. If a - // rejected pod should not be recreated, or the scheduler is not aware of the rejection rule, the - // admission rule should be applied by a softAdmitHandler. - softAdmitHandlers lifecycle.PodAdmitHandlers - - // the list of handlers to call during pod sync loop. - lifecycle.PodSyncLoopHandlers - - // the list of handlers to call during pod sync. - lifecycle.PodSyncHandlers - - // the number of allowed pods per core - podsPerCore int - - // enableControllerAttachDetach indicates the Attach/Detach controller - // should manage attachment/detachment of volumes scheduled to this node, - // and disable kubelet from executing any attach/detach operations - enableControllerAttachDetach bool - - // trigger deleting containers in a pod - containerDeletor *podContainerDeletor - - // config iptables util rules - makeIPTablesUtilChains bool - - // The bit of the fwmark space to mark packets for SNAT. - iptablesMasqueradeBit int - - // The bit of the fwmark space to mark packets for dropping. - iptablesDropBit int - - // The AppArmor validator for checking whether AppArmor is supported. - appArmorValidator apparmor.Validator - - // The handler serving CRI streaming calls (exec/attach/port-forward). - criHandler http.Handler - - // experimentalHostUserNamespaceDefaulting sets userns=true when users request host namespaces (pid, ipc, net), - // are using non-namespaced capabilities (mknod, sys_time, sys_module), the pod contains a privileged container, - // or using host path volumes. - // This should only be enabled when the container runtime is performing user remapping AND if the - // experimental behavior is desired. - experimentalHostUserNamespaceDefaulting bool - - // dockerLegacyService contains some legacy methods for backward compatibility. - // It should be set only when docker is using non json-file logging driver. - dockerLegacyService dockershim.DockerLegacyService - - // StatsProvider provides the node and the container stats. - *stats.StatsProvider - - // This flag, if set, instructs the kubelet to keep volumes from terminated pods mounted to the node. - // This can be useful for debugging volume related issues. - keepTerminatedPodVolumes bool // DEPRECATED - - // pluginwatcher is a utility for Kubelet to register different types of node-level plugins - // such as device plugins or CSI plugins. It discovers plugins by monitoring inotify events under the - // directory returned by kubelet.getPluginsDir() - pluginWatcher pluginwatcher.Watcher - - // This flag sets a maximum number of images to report in the node status. - nodeStatusMaxImages int32 - - // This flag indicates that kubelet should start plugin watcher utility server for discovering Kubelet plugins - enablePluginsWatcher bool -} - -func allGlobalUnicastIPs() ([]net.IP, error) { - interfaces, err := net.Interfaces() - if err != nil { - return nil, fmt.Errorf("could not list network interfaces: %v", err) - } - var ips []net.IP - for _, i := range interfaces { - addresses, err := i.Addrs() - if err != nil { - return nil, fmt.Errorf("could not list the addresses for network interface %v: %v", i, err) - } - for _, address := range addresses { - switch v := address.(type) { - case *net.IPNet: - if v.IP.IsGlobalUnicast() { - ips = append(ips, v.IP) - } - } - } - } - return ips, nil -} - -// setupDataDirs creates: -// 1. the root directory -// 2. the pods directory -// 3. the plugins directory -func (kl *Kubelet) setupDataDirs() error { - kl.rootDirectory = path.Clean(kl.rootDirectory) - if err := os.MkdirAll(kl.getRootDir(), 0750); err != nil { - return fmt.Errorf("error creating root directory: %v", err) - } - if err := kl.mounter.MakeRShared(kl.getRootDir()); err != nil { - return fmt.Errorf("error configuring root directory: %v", err) - } - if err := os.MkdirAll(kl.getPodsDir(), 0750); err != nil { - return fmt.Errorf("error creating pods directory: %v", err) - } - if err := os.MkdirAll(kl.getPluginsDir(), 0750); err != nil { - return fmt.Errorf("error creating plugins directory: %v", err) - } - return nil -} - -// StartGarbageCollection starts garbage collection threads. -func (kl *Kubelet) StartGarbageCollection() { - loggedContainerGCFailure := false - go wait.Until(func() { - if err := kl.containerGC.GarbageCollect(); err != nil { - glog.Errorf("Container garbage collection failed: %v", err) - kl.recorder.Eventf(kl.nodeRef, v1.EventTypeWarning, events.ContainerGCFailed, err.Error()) - loggedContainerGCFailure = true - } else { - var vLevel glog.Level = 4 - if loggedContainerGCFailure { - vLevel = 1 - loggedContainerGCFailure = false - } - - glog.V(vLevel).Infof("Container garbage collection succeeded") - } - }, ContainerGCPeriod, wait.NeverStop) - - // when the high threshold is set to 100, stub the image GC manager - if kl.kubeletConfiguration.ImageGCHighThresholdPercent == 100 { - glog.V(2).Infof("ImageGCHighThresholdPercent is set 100, Disable image GC") - return - } - - prevImageGCFailed := false - go wait.Until(func() { - if err := kl.imageManager.GarbageCollect(); err != nil { - if prevImageGCFailed { - glog.Errorf("Image garbage collection failed multiple times in a row: %v", err) - // Only create an event for repeated failures - kl.recorder.Eventf(kl.nodeRef, v1.EventTypeWarning, events.ImageGCFailed, err.Error()) - } else { - glog.Errorf("Image garbage collection failed once. Stats initialization may not have completed yet: %v", err) - } - prevImageGCFailed = true - } else { - var vLevel glog.Level = 4 - if prevImageGCFailed { - vLevel = 1 - prevImageGCFailed = false - } - - glog.V(vLevel).Infof("Image garbage collection succeeded") - } - }, ImageGCPeriod, wait.NeverStop) -} - -// initializeModules will initialize internal modules that do not require the container runtime to be up. -// Note that the modules here must not depend on modules that are not initialized here. -func (kl *Kubelet) initializeModules() error { - // Prometheus metrics. - metrics.Register(kl.runtimeCache, collectors.NewVolumeStatsCollector(kl)) - - // Setup filesystem directories. - if err := kl.setupDataDirs(); err != nil { - return err - } - - // If the container logs directory does not exist, create it. - if _, err := os.Stat(ContainerLogsDir); err != nil { - if err := kl.os.MkdirAll(ContainerLogsDir, 0755); err != nil { - glog.Errorf("Failed to create directory %q: %v", ContainerLogsDir, err) - } - } - - // Start the image manager. - kl.imageManager.Start() - - // Start the certificate manager if it was enabled. - if kl.serverCertificateManager != nil { - kl.serverCertificateManager.Start() - } - - // Start out of memory watcher. - if err := kl.oomWatcher.Start(kl.nodeRef); err != nil { - return fmt.Errorf("Failed to start OOM watcher %v", err) - } - - // Start resource analyzer - kl.resourceAnalyzer.Start() - - return nil -} - -// initializeRuntimeDependentModules will initialize internal modules that require the container runtime to be up. -func (kl *Kubelet) initializeRuntimeDependentModules() { - if err := kl.cadvisor.Start(); err != nil { - // Fail kubelet and rely on the babysitter to retry starting kubelet. - // TODO(random-liu): Add backoff logic in the babysitter - glog.Fatalf("Failed to start cAdvisor %v", err) - } - - // trigger on-demand stats collection once so that we have capacity information for ephemeral storage. - // ignore any errors, since if stats collection is not successful, the container manager will fail to start below. - kl.StatsProvider.GetCgroupStats("/", true) - // Start container manager. - node, err := kl.getNodeAnyWay() - if err != nil { - // Fail kubelet and rely on the babysitter to retry starting kubelet. - glog.Fatalf("Kubelet failed to get node info: %v", err) - } - // containerManager must start after cAdvisor because it needs filesystem capacity information - if err := kl.containerManager.Start(node, kl.GetActivePods, kl.sourcesReady, kl.statusManager, kl.runtimeService); err != nil { - // Fail kubelet and rely on the babysitter to retry starting kubelet. - glog.Fatalf("Failed to start ContainerManager %v", err) - } - // eviction manager must start after cadvisor because it needs to know if the container runtime has a dedicated imagefs - kl.evictionManager.Start(kl.StatsProvider, kl.GetActivePods, kl.podResourcesAreReclaimed, evictionMonitoringPeriod) - - // container log manager must start after container runtime is up to retrieve information from container runtime - // and inform container to reopen log file after log rotation. - kl.containerLogManager.Start() - if kl.enablePluginsWatcher { - // Adding Registration Callback function for CSI Driver - kl.pluginWatcher.AddHandler("CSIPlugin", csi.RegistrationCallback) - // Start the plugin watcher - glog.V(4).Infof("starting watcher") - if err := kl.pluginWatcher.Start(); err != nil { - kl.recorder.Eventf(kl.nodeRef, v1.EventTypeWarning, events.KubeletSetupFailed, err.Error()) - glog.Fatalf("failed to start Plugin Watcher. err: %v", err) - } - } -} - -// Run starts the kubelet reacting to config updates -func (kl *Kubelet) Run(updates <-chan kubetypes.PodUpdate) { - if kl.logServer == nil { - kl.logServer = http.StripPrefix("/logs/", http.FileServer(http.Dir("/var/log/"))) - } - if kl.kubeClient == nil { - glog.Warning("No api server defined - no node status update will be sent.") - } - - if err := kl.initializeModules(); err != nil { - kl.recorder.Eventf(kl.nodeRef, v1.EventTypeWarning, events.KubeletSetupFailed, err.Error()) - glog.Fatal(err) - } - - // Start volume manager - go kl.volumeManager.Run(kl.sourcesReady, wait.NeverStop) - - if kl.kubeClient != nil { - // Start syncing node status immediately, this may set up things the runtime needs to run. - go wait.Until(kl.syncNodeStatus, kl.nodeStatusUpdateFrequency, wait.NeverStop) - } - go wait.Until(kl.updateRuntimeUp, 5*time.Second, wait.NeverStop) - - // Start loop to sync iptables util rules - if kl.makeIPTablesUtilChains { - go wait.Until(kl.syncNetworkUtil, 1*time.Minute, wait.NeverStop) - } - - // Start a goroutine responsible for killing pods (that are not properly - // handled by pod workers). - go wait.Until(kl.podKiller, 1*time.Second, wait.NeverStop) - - // Start gorouting responsible for checking limits in resolv.conf - if kl.dnsConfigurer.ResolverConfig != "" { - go wait.Until(func() { kl.dnsConfigurer.CheckLimitsForResolvConf() }, 30*time.Second, wait.NeverStop) - } - - // Start component sync loops. - kl.statusManager.Start() - kl.probeManager.Start() - - // Start the pod lifecycle event generator. - kl.pleg.Start() - kl.syncLoop(updates, kl) -} - -// syncPod is the transaction script for the sync of a single pod. -// -// Arguments: -// -// o - the SyncPodOptions for this invocation -// -// The workflow is: -// * If the pod is being created, record pod worker start latency -// * Call generateAPIPodStatus to prepare an v1.PodStatus for the pod -// * If the pod is being seen as running for the first time, record pod -// start latency -// * Update the status of the pod in the status manager -// * Kill the pod if it should not be running -// * Create a mirror pod if the pod is a static pod, and does not -// already have a mirror pod -// * Create the data directories for the pod if they do not exist -// * Wait for volumes to attach/mount -// * Fetch the pull secrets for the pod -// * Call the container runtime's SyncPod callback -// * Update the traffic shaping for the pod's ingress and egress limits -// -// If any step of this workflow errors, the error is returned, and is repeated -// on the next syncPod call. -// -// This operation writes all events that are dispatched in order to provide -// the most accurate information possible about an error situation to aid debugging. -// Callers should not throw an event if this operation returns an error. -func (kl *Kubelet) syncPod(o syncPodOptions) error { - // pull out the required options - pod := o.pod - mirrorPod := o.mirrorPod - podStatus := o.podStatus - updateType := o.updateType - - // if we want to kill a pod, do it now! - if updateType == kubetypes.SyncPodKill { - killPodOptions := o.killPodOptions - if killPodOptions == nil || killPodOptions.PodStatusFunc == nil { - return fmt.Errorf("kill pod options are required if update type is kill") - } - apiPodStatus := killPodOptions.PodStatusFunc(pod, podStatus) - kl.statusManager.SetPodStatus(pod, apiPodStatus) - // we kill the pod with the specified grace period since this is a termination - if err := kl.killPod(pod, nil, podStatus, killPodOptions.PodTerminationGracePeriodSecondsOverride); err != nil { - kl.recorder.Eventf(pod, v1.EventTypeWarning, events.FailedToKillPod, "error killing pod: %v", err) - // there was an error killing the pod, so we return that error directly - utilruntime.HandleError(err) - return err - } - return nil - } - - // Latency measurements for the main workflow are relative to the - // first time the pod was seen by the API server. - var firstSeenTime time.Time - if firstSeenTimeStr, ok := pod.Annotations[kubetypes.ConfigFirstSeenAnnotationKey]; ok { - firstSeenTime = kubetypes.ConvertToTimestamp(firstSeenTimeStr).Get() - } - - // Record pod worker start latency if being created - // TODO: make pod workers record their own latencies - if updateType == kubetypes.SyncPodCreate { - if !firstSeenTime.IsZero() { - // This is the first time we are syncing the pod. Record the latency - // since kubelet first saw the pod if firstSeenTime is set. - metrics.PodWorkerStartLatency.Observe(metrics.SinceInMicroseconds(firstSeenTime)) - } else { - glog.V(3).Infof("First seen time not recorded for pod %q", pod.UID) - } - } - - // Generate final API pod status with pod and status manager status - apiPodStatus := kl.generateAPIPodStatus(pod, podStatus) - // The pod IP may be changed in generateAPIPodStatus if the pod is using host network. (See #24576) - // TODO(random-liu): After writing pod spec into container labels, check whether pod is using host network, and - // set pod IP to hostIP directly in runtime.GetPodStatus - podStatus.IP = apiPodStatus.PodIP - - // Record the time it takes for the pod to become running. - existingStatus, ok := kl.statusManager.GetPodStatus(pod.UID) - if !ok || existingStatus.Phase == v1.PodPending && apiPodStatus.Phase == v1.PodRunning && - !firstSeenTime.IsZero() { - metrics.PodStartLatency.Observe(metrics.SinceInMicroseconds(firstSeenTime)) - } - - runnable := kl.canRunPod(pod) - if !runnable.Admit { - // Pod is not runnable; update the Pod and Container statuses to why. - apiPodStatus.Reason = runnable.Reason - apiPodStatus.Message = runnable.Message - // Waiting containers are not creating. - const waitingReason = "Blocked" - for _, cs := range apiPodStatus.InitContainerStatuses { - if cs.State.Waiting != nil { - cs.State.Waiting.Reason = waitingReason - } - } - for _, cs := range apiPodStatus.ContainerStatuses { - if cs.State.Waiting != nil { - cs.State.Waiting.Reason = waitingReason - } - } - } - - // Update status in the status manager - kl.statusManager.SetPodStatus(pod, apiPodStatus) - - // Kill pod if it should not be running - if !runnable.Admit || pod.DeletionTimestamp != nil || apiPodStatus.Phase == v1.PodFailed { - var syncErr error - if err := kl.killPod(pod, nil, podStatus, nil); err != nil { - kl.recorder.Eventf(pod, v1.EventTypeWarning, events.FailedToKillPod, "error killing pod: %v", err) - syncErr = fmt.Errorf("error killing pod: %v", err) - utilruntime.HandleError(syncErr) - } else { - if !runnable.Admit { - // There was no error killing the pod, but the pod cannot be run. - // Return an error to signal that the sync loop should back off. - syncErr = fmt.Errorf("pod cannot be run: %s", runnable.Message) - } - } - return syncErr - } - - // If the network plugin is not ready, only start the pod if it uses the host network - if rs := kl.runtimeState.networkErrors(); len(rs) != 0 && !kubecontainer.IsHostNetworkPod(pod) { - kl.recorder.Eventf(pod, v1.EventTypeWarning, events.NetworkNotReady, "network is not ready: %v", rs) - return fmt.Errorf("network is not ready: %v", rs) - } - - // Create Cgroups for the pod and apply resource parameters - // to them if cgroups-per-qos flag is enabled. - pcm := kl.containerManager.NewPodContainerManager() - // If pod has already been terminated then we need not create - // or update the pod's cgroup - if !kl.podIsTerminated(pod) { - // When the kubelet is restarted with the cgroups-per-qos - // flag enabled, all the pod's running containers - // should be killed intermittently and brought back up - // under the qos cgroup hierarchy. - // Check if this is the pod's first sync - firstSync := true - for _, containerStatus := range apiPodStatus.ContainerStatuses { - if containerStatus.State.Running != nil { - firstSync = false - break - } - } - // Don't kill containers in pod if pod's cgroups already - // exists or the pod is running for the first time - podKilled := false - if !pcm.Exists(pod) && !firstSync { - if err := kl.killPod(pod, nil, podStatus, nil); err == nil { - podKilled = true - } - } - // Create and Update pod's Cgroups - // Don't create cgroups for run once pod if it was killed above - // The current policy is not to restart the run once pods when - // the kubelet is restarted with the new flag as run once pods are - // expected to run only once and if the kubelet is restarted then - // they are not expected to run again. - // We don't create and apply updates to cgroup if its a run once pod and was killed above - if !(podKilled && pod.Spec.RestartPolicy == v1.RestartPolicyNever) { - if !pcm.Exists(pod) { - if err := kl.containerManager.UpdateQOSCgroups(); err != nil { - glog.V(2).Infof("Failed to update QoS cgroups while syncing pod: %v", err) - } - if err := pcm.EnsureExists(pod); err != nil { - kl.recorder.Eventf(pod, v1.EventTypeWarning, events.FailedToCreatePodContainer, "unable to ensure pod container exists: %v", err) - return fmt.Errorf("failed to ensure that the pod: %v cgroups exist and are correctly applied: %v", pod.UID, err) - } - } - } - } - - // Create Mirror Pod for Static Pod if it doesn't already exist - if kubepod.IsStaticPod(pod) { - podFullName := kubecontainer.GetPodFullName(pod) - deleted := false - if mirrorPod != nil { - if mirrorPod.DeletionTimestamp != nil || !kl.podManager.IsMirrorPodOf(mirrorPod, pod) { - // The mirror pod is semantically different from the static pod. Remove - // it. The mirror pod will get recreated later. - glog.Warningf("Deleting mirror pod %q because it is outdated", format.Pod(mirrorPod)) - if err := kl.podManager.DeleteMirrorPod(podFullName); err != nil { - glog.Errorf("Failed deleting mirror pod %q: %v", format.Pod(mirrorPod), err) - } else { - deleted = true - } - } - } - if mirrorPod == nil || deleted { - node, err := kl.GetNode() - if err != nil || node.DeletionTimestamp != nil { - glog.V(4).Infof("No need to create a mirror pod, since node %q has been removed from the cluster", kl.nodeName) - } else { - glog.V(4).Infof("Creating a mirror pod for static pod %q", format.Pod(pod)) - if err := kl.podManager.CreateMirrorPod(pod); err != nil { - glog.Errorf("Failed creating a mirror pod for %q: %v", format.Pod(pod), err) - } - } - } - } - - // Make data directories for the pod - if err := kl.makePodDataDirs(pod); err != nil { - kl.recorder.Eventf(pod, v1.EventTypeWarning, events.FailedToMakePodDataDirectories, "error making pod data directories: %v", err) - glog.Errorf("Unable to make pod data directories for pod %q: %v", format.Pod(pod), err) - return err - } - - // Volume manager will not mount volumes for terminated pods - if !kl.podIsTerminated(pod) { - // Wait for volumes to attach/mount - if err := kl.volumeManager.WaitForAttachAndMount(pod); err != nil { - kl.recorder.Eventf(pod, v1.EventTypeWarning, events.FailedMountVolume, "Unable to mount volumes for pod %q: %v", format.Pod(pod), err) - glog.Errorf("Unable to mount volumes for pod %q: %v; skipping pod", format.Pod(pod), err) - return err - } - } - - // Fetch the pull secrets for the pod - pullSecrets := kl.getPullSecretsForPod(pod) - - // Call the container runtime's SyncPod callback - result := kl.containerRuntime.SyncPod(pod, apiPodStatus, podStatus, pullSecrets, kl.backOff) - kl.reasonCache.Update(pod.UID, result) - if err := result.Error(); err != nil { - // Do not record an event here, as we keep all event logging for sync pod failures - // local to container runtime so we get better errors - return err - } - - return nil -} - -// Get pods which should be resynchronized. Currently, the following pod should be resynchronized: -// * pod whose work is ready. -// * internal modules that request sync of a pod. -func (kl *Kubelet) getPodsToSync() []*v1.Pod { - allPods := kl.podManager.GetPods() - podUIDs := kl.workQueue.GetWork() - podUIDSet := sets.NewString() - for _, podUID := range podUIDs { - podUIDSet.Insert(string(podUID)) - } - var podsToSync []*v1.Pod - for _, pod := range allPods { - if podUIDSet.Has(string(pod.UID)) { - // The work of the pod is ready - podsToSync = append(podsToSync, pod) - continue - } - for _, podSyncLoopHandler := range kl.PodSyncLoopHandlers { - if podSyncLoopHandler.ShouldSync(pod) { - podsToSync = append(podsToSync, pod) - break - } - } - } - return podsToSync -} - -// deletePod deletes the pod from the internal state of the kubelet by: -// 1. stopping the associated pod worker asynchronously -// 2. signaling to kill the pod by sending on the podKillingCh channel -// -// deletePod returns an error if not all sources are ready or the pod is not -// found in the runtime cache. -func (kl *Kubelet) deletePod(pod *v1.Pod) error { - if pod == nil { - return fmt.Errorf("deletePod does not allow nil pod") - } - if !kl.sourcesReady.AllReady() { - // If the sources aren't ready, skip deletion, as we may accidentally delete pods - // for sources that haven't reported yet. - return fmt.Errorf("skipping delete because sources aren't ready yet") - } - kl.podWorkers.ForgetWorker(pod.UID) - - // Runtime cache may not have been updated to with the pod, but it's okay - // because the periodic cleanup routine will attempt to delete again later. - runningPods, err := kl.runtimeCache.GetPods() - if err != nil { - return fmt.Errorf("error listing containers: %v", err) - } - runningPod := kubecontainer.Pods(runningPods).FindPod("", pod.UID) - if runningPod.IsEmpty() { - return fmt.Errorf("pod not found") - } - podPair := kubecontainer.PodPair{APIPod: pod, RunningPod: &runningPod} - - kl.podKillingCh <- &podPair - // TODO: delete the mirror pod here? - - // We leave the volume/directory cleanup to the periodic cleanup routine. - return nil -} - -// rejectPod records an event about the pod with the given reason and message, -// and updates the pod to the failed phase in the status manage. -func (kl *Kubelet) rejectPod(pod *v1.Pod, reason, message string) { - kl.recorder.Eventf(pod, v1.EventTypeWarning, reason, message) - kl.statusManager.SetPodStatus(pod, v1.PodStatus{ - Phase: v1.PodFailed, - Reason: reason, - Message: "Pod " + message}) -} - -// canAdmitPod determines if a pod can be admitted, and gives a reason if it -// cannot. "pod" is new pod, while "pods" are all admitted pods -// The function returns a boolean value indicating whether the pod -// can be admitted, a brief single-word reason and a message explaining why -// the pod cannot be admitted. -func (kl *Kubelet) canAdmitPod(pods []*v1.Pod, pod *v1.Pod) (bool, string, string) { - // the kubelet will invoke each pod admit handler in sequence - // if any handler rejects, the pod is rejected. - // TODO: move out of disk check into a pod admitter - // TODO: out of resource eviction should have a pod admitter call-out - attrs := &lifecycle.PodAdmitAttributes{Pod: pod, OtherPods: pods} - for _, podAdmitHandler := range kl.admitHandlers { - if result := podAdmitHandler.Admit(attrs); !result.Admit { - return false, result.Reason, result.Message - } - } - - return true, "", "" -} - -func (kl *Kubelet) canRunPod(pod *v1.Pod) lifecycle.PodAdmitResult { - attrs := &lifecycle.PodAdmitAttributes{Pod: pod} - // Get "OtherPods". Rejected pods are failed, so only include admitted pods that are alive. - attrs.OtherPods = kl.filterOutTerminatedPods(kl.podManager.GetPods()) - - for _, handler := range kl.softAdmitHandlers { - if result := handler.Admit(attrs); !result.Admit { - return result - } - } - - // TODO: Refactor as a soft admit handler. - if err := canRunPod(pod); err != nil { - return lifecycle.PodAdmitResult{ - Admit: false, - Reason: "Forbidden", - Message: err.Error(), - } - } - - return lifecycle.PodAdmitResult{Admit: true} -} - -// syncLoop is the main loop for processing changes. It watches for changes from -// three channels (file, apiserver, and http) and creates a union of them. For -// any new change seen, will run a sync against desired state and running state. If -// no changes are seen to the configuration, will synchronize the last known desired -// state every sync-frequency seconds. Never returns. -func (kl *Kubelet) syncLoop(updates <-chan kubetypes.PodUpdate, handler SyncHandler) { - glog.Info("Starting kubelet main sync loop.") - // The resyncTicker wakes up kubelet to checks if there are any pod workers - // that need to be sync'd. A one-second period is sufficient because the - // sync interval is defaulted to 10s. - syncTicker := time.NewTicker(time.Second) - defer syncTicker.Stop() - housekeepingTicker := time.NewTicker(housekeepingPeriod) - defer housekeepingTicker.Stop() - plegCh := kl.pleg.Watch() - const ( - base = 100 * time.Millisecond - max = 5 * time.Second - factor = 2 - ) - duration := base - for { - if rs := kl.runtimeState.runtimeErrors(); len(rs) != 0 { - glog.Infof("skipping pod synchronization - %v", rs) - // exponential backoff - time.Sleep(duration) - duration = time.Duration(math.Min(float64(max), factor*float64(duration))) - continue - } - // reset backoff if we have a success - duration = base - - kl.syncLoopMonitor.Store(kl.clock.Now()) - if !kl.syncLoopIteration(updates, handler, syncTicker.C, housekeepingTicker.C, plegCh) { - break - } - kl.syncLoopMonitor.Store(kl.clock.Now()) - } -} - -// syncLoopIteration reads from various channels and dispatches pods to the -// given handler. -// -// Arguments: -// 1. configCh: a channel to read config events from -// 2. handler: the SyncHandler to dispatch pods to -// 3. syncCh: a channel to read periodic sync events from -// 4. houseKeepingCh: a channel to read housekeeping events from -// 5. plegCh: a channel to read PLEG updates from -// -// Events are also read from the kubelet liveness manager's update channel. -// -// The workflow is to read from one of the channels, handle that event, and -// update the timestamp in the sync loop monitor. -// -// Here is an appropriate place to note that despite the syntactical -// similarity to the switch statement, the case statements in a select are -// evaluated in a pseudorandom order if there are multiple channels ready to -// read from when the select is evaluated. In other words, case statements -// are evaluated in random order, and you can not assume that the case -// statements evaluate in order if multiple channels have events. -// -// With that in mind, in truly no particular order, the different channels -// are handled as follows: -// -// * configCh: dispatch the pods for the config change to the appropriate -// handler callback for the event type -// * plegCh: update the runtime cache; sync pod -// * syncCh: sync all pods waiting for sync -// * houseKeepingCh: trigger cleanup of pods -// * liveness manager: sync pods that have failed or in which one or more -// containers have failed liveness checks -func (kl *Kubelet) syncLoopIteration(configCh <-chan kubetypes.PodUpdate, handler SyncHandler, - syncCh <-chan time.Time, housekeepingCh <-chan time.Time, plegCh <-chan *pleg.PodLifecycleEvent) bool { - select { - case u, open := <-configCh: - // Update from a config source; dispatch it to the right handler - // callback. - if !open { - glog.Errorf("Update channel is closed. Exiting the sync loop.") - return false - } - - switch u.Op { - case kubetypes.ADD: - glog.V(2).Infof("SyncLoop (ADD, %q): %q", u.Source, format.Pods(u.Pods)) - // After restarting, kubelet will get all existing pods through - // ADD as if they are new pods. These pods will then go through the - // admission process and *may* be rejected. This can be resolved - // once we have checkpointing. - handler.HandlePodAdditions(u.Pods) - case kubetypes.UPDATE: - glog.V(2).Infof("SyncLoop (UPDATE, %q): %q", u.Source, format.PodsWithDeletiontimestamps(u.Pods)) - handler.HandlePodUpdates(u.Pods) - case kubetypes.REMOVE: - glog.V(2).Infof("SyncLoop (REMOVE, %q): %q", u.Source, format.Pods(u.Pods)) - handler.HandlePodRemoves(u.Pods) - case kubetypes.RECONCILE: - glog.V(4).Infof("SyncLoop (RECONCILE, %q): %q", u.Source, format.Pods(u.Pods)) - handler.HandlePodReconcile(u.Pods) - case kubetypes.DELETE: - glog.V(2).Infof("SyncLoop (DELETE, %q): %q", u.Source, format.Pods(u.Pods)) - // DELETE is treated as a UPDATE because of graceful deletion. - handler.HandlePodUpdates(u.Pods) - case kubetypes.RESTORE: - glog.V(2).Infof("SyncLoop (RESTORE, %q): %q", u.Source, format.Pods(u.Pods)) - // These are pods restored from the checkpoint. Treat them as new - // pods. - handler.HandlePodAdditions(u.Pods) - case kubetypes.SET: - // TODO: Do we want to support this? - glog.Errorf("Kubelet does not support snapshot update") - } - - if u.Op != kubetypes.RESTORE { - // If the update type is RESTORE, it means that the update is from - // the pod checkpoints and may be incomplete. Do not mark the - // source as ready. - - // Mark the source ready after receiving at least one update from the - // source. Once all the sources are marked ready, various cleanup - // routines will start reclaiming resources. It is important that this - // takes place only after kubelet calls the update handler to process - // the update to ensure the internal pod cache is up-to-date. - kl.sourcesReady.AddSource(u.Source) - } - case e := <-plegCh: - if isSyncPodWorthy(e) { - // PLEG event for a pod; sync it. - if pod, ok := kl.podManager.GetPodByUID(e.ID); ok { - glog.V(2).Infof("SyncLoop (PLEG): %q, event: %#v", format.Pod(pod), e) - handler.HandlePodSyncs([]*v1.Pod{pod}) - } else { - // If the pod no longer exists, ignore the event. - glog.V(4).Infof("SyncLoop (PLEG): ignore irrelevant event: %#v", e) - } - } - - if e.Type == pleg.ContainerDied { - if containerID, ok := e.Data.(string); ok { - kl.cleanUpContainersInPod(e.ID, containerID) - } - } - case <-syncCh: - // Sync pods waiting for sync - podsToSync := kl.getPodsToSync() - if len(podsToSync) == 0 { - break - } - glog.V(4).Infof("SyncLoop (SYNC): %d pods; %s", len(podsToSync), format.Pods(podsToSync)) - handler.HandlePodSyncs(podsToSync) - case update := <-kl.livenessManager.Updates(): - if update.Result == proberesults.Failure { - // The liveness manager detected a failure; sync the pod. - - // We should not use the pod from livenessManager, because it is never updated after - // initialization. - pod, ok := kl.podManager.GetPodByUID(update.PodUID) - if !ok { - // If the pod no longer exists, ignore the update. - glog.V(4).Infof("SyncLoop (container unhealthy): ignore irrelevant update: %#v", update) - break - } - glog.V(1).Infof("SyncLoop (container unhealthy): %q", format.Pod(pod)) - handler.HandlePodSyncs([]*v1.Pod{pod}) - } - case <-housekeepingCh: - if !kl.sourcesReady.AllReady() { - // If the sources aren't ready or volume manager has not yet synced the states, - // skip housekeeping, as we may accidentally delete pods from unready sources. - glog.V(4).Infof("SyncLoop (housekeeping, skipped): sources aren't ready yet.") - } else { - glog.V(4).Infof("SyncLoop (housekeeping)") - if err := handler.HandlePodCleanups(); err != nil { - glog.Errorf("Failed cleaning pods: %v", err) - } - } - } - return true -} - -// dispatchWork starts the asynchronous sync of the pod in a pod worker. -// If the pod is terminated, dispatchWork -func (kl *Kubelet) dispatchWork(pod *v1.Pod, syncType kubetypes.SyncPodType, mirrorPod *v1.Pod, start time.Time) { - if kl.podIsTerminated(pod) { - if pod.DeletionTimestamp != nil { - // If the pod is in a terminated state, there is no pod worker to - // handle the work item. Check if the DeletionTimestamp has been - // set, and force a status update to trigger a pod deletion request - // to the apiserver. - kl.statusManager.TerminatePod(pod) - } - return - } - // Run the sync in an async worker. - kl.podWorkers.UpdatePod(&UpdatePodOptions{ - Pod: pod, - MirrorPod: mirrorPod, - UpdateType: syncType, - OnCompleteFunc: func(err error) { - if err != nil { - metrics.PodWorkerLatency.WithLabelValues(syncType.String()).Observe(metrics.SinceInMicroseconds(start)) - } - }, - }) - // Note the number of containers for new pods. - if syncType == kubetypes.SyncPodCreate { - metrics.ContainersPerPodCount.Observe(float64(len(pod.Spec.Containers))) - } -} - -// TODO: handle mirror pods in a separate component (issue #17251) -func (kl *Kubelet) handleMirrorPod(mirrorPod *v1.Pod, start time.Time) { - // Mirror pod ADD/UPDATE/DELETE operations are considered an UPDATE to the - // corresponding static pod. Send update to the pod worker if the static - // pod exists. - if pod, ok := kl.podManager.GetPodByMirrorPod(mirrorPod); ok { - kl.dispatchWork(pod, kubetypes.SyncPodUpdate, mirrorPod, start) - } -} - -// HandlePodAdditions is the callback in SyncHandler for pods being added from -// a config source. -func (kl *Kubelet) HandlePodAdditions(pods []*v1.Pod) { - start := kl.clock.Now() - sort.Sort(sliceutils.PodsByCreationTime(pods)) - for _, pod := range pods { - existingPods := kl.podManager.GetPods() - // Always add the pod to the pod manager. Kubelet relies on the pod - // manager as the source of truth for the desired state. If a pod does - // not exist in the pod manager, it means that it has been deleted in - // the apiserver and no action (other than cleanup) is required. - kl.podManager.AddPod(pod) - - if kubepod.IsMirrorPod(pod) { - kl.handleMirrorPod(pod, start) - continue - } - - if !kl.podIsTerminated(pod) { - // Only go through the admission process if the pod is not - // terminated. - - // We failed pods that we rejected, so activePods include all admitted - // pods that are alive. - activePods := kl.filterOutTerminatedPods(existingPods) - - // Check if we can admit the pod; if not, reject it. - if ok, reason, message := kl.canAdmitPod(activePods, pod); !ok { - kl.rejectPod(pod, reason, message) - continue - } - } - mirrorPod, _ := kl.podManager.GetMirrorPodByPod(pod) - kl.dispatchWork(pod, kubetypes.SyncPodCreate, mirrorPod, start) - kl.probeManager.AddPod(pod) - } -} - -// HandlePodUpdates is the callback in the SyncHandler interface for pods -// being updated from a config source. -func (kl *Kubelet) HandlePodUpdates(pods []*v1.Pod) { - start := kl.clock.Now() - for _, pod := range pods { - kl.podManager.UpdatePod(pod) - if kubepod.IsMirrorPod(pod) { - kl.handleMirrorPod(pod, start) - continue - } - // TODO: Evaluate if we need to validate and reject updates. - - mirrorPod, _ := kl.podManager.GetMirrorPodByPod(pod) - kl.dispatchWork(pod, kubetypes.SyncPodUpdate, mirrorPod, start) - } -} - -// HandlePodRemoves is the callback in the SyncHandler interface for pods -// being removed from a config source. -func (kl *Kubelet) HandlePodRemoves(pods []*v1.Pod) { - start := kl.clock.Now() - for _, pod := range pods { - kl.podManager.DeletePod(pod) - if kubepod.IsMirrorPod(pod) { - kl.handleMirrorPod(pod, start) - continue - } - // Deletion is allowed to fail because the periodic cleanup routine - // will trigger deletion again. - if err := kl.deletePod(pod); err != nil { - glog.V(2).Infof("Failed to delete pod %q, err: %v", format.Pod(pod), err) - } - kl.probeManager.RemovePod(pod) - } -} - -// HandlePodReconcile is the callback in the SyncHandler interface for pods -// that should be reconciled. -func (kl *Kubelet) HandlePodReconcile(pods []*v1.Pod) { - start := kl.clock.Now() - for _, pod := range pods { - // Update the pod in pod manager, status manager will do periodically reconcile according - // to the pod manager. - kl.podManager.UpdatePod(pod) - - // Reconcile Pod "Ready" condition if necessary. Trigger sync pod for reconciliation. - if status.NeedToReconcilePodReadiness(pod) { - mirrorPod, _ := kl.podManager.GetMirrorPodByPod(pod) - kl.dispatchWork(pod, kubetypes.SyncPodSync, mirrorPod, start) - } - - // After an evicted pod is synced, all dead containers in the pod can be removed. - if eviction.PodIsEvicted(pod.Status) { - if podStatus, err := kl.podCache.Get(pod.UID); err == nil { - kl.containerDeletor.deleteContainersInPod("", podStatus, true) - } - } - } -} - -// HandlePodSyncs is the callback in the syncHandler interface for pods -// that should be dispatched to pod workers for sync. -func (kl *Kubelet) HandlePodSyncs(pods []*v1.Pod) { - start := kl.clock.Now() - for _, pod := range pods { - mirrorPod, _ := kl.podManager.GetMirrorPodByPod(pod) - kl.dispatchWork(pod, kubetypes.SyncPodSync, mirrorPod, start) - } -} - -// LatestLoopEntryTime returns the last time in the sync loop monitor. -func (kl *Kubelet) LatestLoopEntryTime() time.Time { - val := kl.syncLoopMonitor.Load() - if val == nil { - return time.Time{} - } - return val.(time.Time) -} - -// updateRuntimeUp calls the container runtime status callback, initializing -// the runtime dependent modules when the container runtime first comes up, -// and returns an error if the status check fails. If the status check is OK, -// update the container runtime uptime in the kubelet runtimeState. -func (kl *Kubelet) updateRuntimeUp() { - s, err := kl.containerRuntime.Status() - if err != nil { - glog.Errorf("Container runtime sanity check failed: %v", err) - return - } - if s == nil { - glog.Errorf("Container runtime status is nil") - return - } - // Periodically log the whole runtime status for debugging. - // TODO(random-liu): Consider to send node event when optional - // condition is unmet. - glog.V(4).Infof("Container runtime status: %v", s) - networkReady := s.GetRuntimeCondition(kubecontainer.NetworkReady) - if networkReady == nil || !networkReady.Status { - glog.Errorf("Container runtime network not ready: %v", networkReady) - kl.runtimeState.setNetworkState(fmt.Errorf("runtime network not ready: %v", networkReady)) - } else { - // Set nil if the container runtime network is ready. - kl.runtimeState.setNetworkState(nil) - } - // TODO(random-liu): Add runtime error in runtimeState, and update it - // when runtime is not ready, so that the information in RuntimeReady - // condition will be propagated to NodeReady condition. - runtimeReady := s.GetRuntimeCondition(kubecontainer.RuntimeReady) - // If RuntimeReady is not set or is false, report an error. - if runtimeReady == nil || !runtimeReady.Status { - glog.Errorf("Container runtime not ready: %v", runtimeReady) - return - } - kl.oneTimeInitializer.Do(kl.initializeRuntimeDependentModules) - kl.runtimeState.setRuntimeSync(kl.clock.Now()) -} - -// GetConfiguration returns the KubeletConfiguration used to configure the kubelet. -func (kl *Kubelet) GetConfiguration() kubeletconfiginternal.KubeletConfiguration { - return kl.kubeletConfiguration -} - -// BirthCry sends an event that the kubelet has started up. -func (kl *Kubelet) BirthCry() { - // Make an event that kubelet restarted. - kl.recorder.Eventf(kl.nodeRef, v1.EventTypeNormal, events.StartingKubelet, "Starting kubelet.") -} - -// ResyncInterval returns the interval used for periodic syncs. -func (kl *Kubelet) ResyncInterval() time.Duration { - return kl.resyncInterval -} - -// ListenAndServe runs the kubelet HTTP server. -func (kl *Kubelet) ListenAndServe(address net.IP, port uint, tlsOptions *server.TLSOptions, auth server.AuthInterface, enableDebuggingHandlers, enableContentionProfiling bool) { - server.ListenAndServeKubeletServer(kl, kl.resourceAnalyzer, address, port, tlsOptions, auth, enableDebuggingHandlers, enableContentionProfiling, kl.redirectContainerStreaming, kl.criHandler) -} - -// ListenAndServeReadOnly runs the kubelet HTTP server in read-only mode. -func (kl *Kubelet) ListenAndServeReadOnly(address net.IP, port uint) { - server.ListenAndServeKubeletReadOnlyServer(kl, kl.resourceAnalyzer, address, port) -} - -// Delete the eligible dead container instances in a pod. Depending on the configuration, the latest dead containers may be kept around. -func (kl *Kubelet) cleanUpContainersInPod(podID types.UID, exitedContainerID string) { - if podStatus, err := kl.podCache.Get(podID); err == nil { - removeAll := false - if syncedPod, ok := kl.podManager.GetPodByUID(podID); ok { - // generate the api status using the cached runtime status to get up-to-date ContainerStatuses - apiPodStatus := kl.generateAPIPodStatus(syncedPod, podStatus) - // When an evicted or deleted pod has already synced, all containers can be removed. - removeAll = eviction.PodIsEvicted(syncedPod.Status) || (syncedPod.DeletionTimestamp != nil && notRunning(apiPodStatus.ContainerStatuses)) - } - kl.containerDeletor.deleteContainersInPod(exitedContainerID, podStatus, removeAll) - } -} - -// isSyncPodWorthy filters out events that are not worthy of pod syncing -func isSyncPodWorthy(event *pleg.PodLifecycleEvent) bool { - // ContatnerRemoved doesn't affect pod state - return event.Type != pleg.ContainerRemoved -} - -// Gets the streaming server configuration to use with in-process CRI shims. -func getStreamingConfig(kubeCfg *kubeletconfiginternal.KubeletConfiguration, kubeDeps *Dependencies, crOptions *config.ContainerRuntimeOptions) *streaming.Config { - config := &streaming.Config{ - StreamIdleTimeout: kubeCfg.StreamingConnectionIdleTimeout.Duration, - StreamCreationTimeout: streaming.DefaultConfig.StreamCreationTimeout, - SupportedRemoteCommandProtocols: streaming.DefaultConfig.SupportedRemoteCommandProtocols, - SupportedPortForwardProtocols: streaming.DefaultConfig.SupportedPortForwardProtocols, - } - if !crOptions.RedirectContainerStreaming { - config.Addr = net.JoinHostPort("localhost", "0") - } else { - // Use a relative redirect (no scheme or host). - config.BaseURL = &url.URL{ - Path: "/cri/", - } - if kubeDeps.TLSOptions != nil { - config.TLSConfig = kubeDeps.TLSOptions.Config - } - } - return config -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters.go deleted file mode 100644 index 89077eb7..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters.go +++ /dev/null @@ -1,313 +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 kubelet - -import ( - "fmt" - "io/ioutil" - "net" - "path/filepath" - - "github.com/golang/glog" - cadvisorapiv1 "github.com/google/cadvisor/info/v1" - - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/kubernetes/pkg/kubelet/cm" - "k8s.io/kubernetes/pkg/kubelet/config" - kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - utilfile "k8s.io/kubernetes/pkg/util/file" - utilnode "k8s.io/kubernetes/pkg/util/node" - volumeutil "k8s.io/kubernetes/pkg/volume/util" -) - -// getRootDir returns the full path to the directory under which kubelet can -// store data. These functions are useful to pass interfaces to other modules -// that may need to know where to write data without getting a whole kubelet -// instance. -func (kl *Kubelet) getRootDir() string { - return kl.rootDirectory -} - -// getPodsDir returns the full path to the directory under which pod -// directories are created. -func (kl *Kubelet) getPodsDir() string { - return filepath.Join(kl.getRootDir(), config.DefaultKubeletPodsDirName) -} - -// getPluginsDir returns the full path to the directory under which plugin -// directories are created. Plugins can use these directories for data that -// they need to persist. Plugins should create subdirectories under this named -// after their own names. -func (kl *Kubelet) getPluginsDir() string { - return filepath.Join(kl.getRootDir(), config.DefaultKubeletPluginsDirName) -} - -// getPluginDir returns a data directory name for a given plugin name. -// Plugins can use these directories to store data that they need to persist. -// For per-pod plugin data, see getPodPluginDir. -func (kl *Kubelet) getPluginDir(pluginName string) string { - return filepath.Join(kl.getPluginsDir(), pluginName) -} - -// getVolumeDevicePluginsDir returns the full path to the directory under which plugin -// directories are created. Plugins can use these directories for data that -// they need to persist. Plugins should create subdirectories under this named -// after their own names. -func (kl *Kubelet) getVolumeDevicePluginsDir() string { - return filepath.Join(kl.getRootDir(), config.DefaultKubeletPluginsDirName) -} - -// getVolumeDevicePluginDir returns a data directory name for a given plugin name. -// Plugins can use these directories to store data that they need to persist. -// For per-pod plugin data, see getVolumeDevicePluginsDir. -func (kl *Kubelet) getVolumeDevicePluginDir(pluginName string) string { - return filepath.Join(kl.getVolumeDevicePluginsDir(), pluginName, config.DefaultKubeletVolumeDevicesDirName) -} - -// GetPodDir returns the full path to the per-pod data directory for the -// specified pod. This directory may not exist if the pod does not exist. -func (kl *Kubelet) GetPodDir(podUID types.UID) string { - return kl.getPodDir(podUID) -} - -// getPodDir returns the full path to the per-pod directory for the pod with -// the given UID. -func (kl *Kubelet) getPodDir(podUID types.UID) string { - return filepath.Join(kl.getPodsDir(), string(podUID)) -} - -// getPodVolumesDir returns the full path to the per-pod data directory under -// which volumes are created for the specified pod. This directory may not -// exist if the pod does not exist. -func (kl *Kubelet) getPodVolumesDir(podUID types.UID) string { - return filepath.Join(kl.getPodDir(podUID), config.DefaultKubeletVolumesDirName) -} - -// getPodVolumeDir returns the full path to the directory which represents the -// named volume under the named plugin for specified pod. This directory may not -// exist if the pod does not exist. -func (kl *Kubelet) getPodVolumeDir(podUID types.UID, pluginName string, volumeName string) string { - return filepath.Join(kl.getPodVolumesDir(podUID), pluginName, volumeName) -} - -// getPodVolumeDevicesDir returns the full path to the per-pod data directory under -// which volumes are created for the specified pod. This directory may not -// exist if the pod does not exist. -func (kl *Kubelet) getPodVolumeDevicesDir(podUID types.UID) string { - return filepath.Join(kl.getPodDir(podUID), config.DefaultKubeletVolumeDevicesDirName) -} - -// getPodVolumeDeviceDir returns the full path to the directory which represents the -// named plugin for specified pod. This directory may not exist if the pod does not exist. -func (kl *Kubelet) getPodVolumeDeviceDir(podUID types.UID, pluginName string) string { - return filepath.Join(kl.getPodVolumeDevicesDir(podUID), pluginName) -} - -// getPodPluginsDir returns the full path to the per-pod data directory under -// which plugins may store data for the specified pod. This directory may not -// exist if the pod does not exist. -func (kl *Kubelet) getPodPluginsDir(podUID types.UID) string { - return filepath.Join(kl.getPodDir(podUID), config.DefaultKubeletPluginsDirName) -} - -// getPodPluginDir returns a data directory name for a given plugin name for a -// given pod UID. Plugins can use these directories to store data that they -// need to persist. For non-per-pod plugin data, see getPluginDir. -func (kl *Kubelet) getPodPluginDir(podUID types.UID, pluginName string) string { - return filepath.Join(kl.getPodPluginsDir(podUID), pluginName) -} - -// getPodContainerDir returns the full path to the per-pod data directory under -// which container data is held for the specified pod. This directory may not -// exist if the pod or container does not exist. -func (kl *Kubelet) getPodContainerDir(podUID types.UID, ctrName string) string { - return filepath.Join(kl.getPodDir(podUID), config.DefaultKubeletContainersDirName, ctrName) -} - -// GetPods returns all pods bound to the kubelet and their spec, and the mirror -// pods. -func (kl *Kubelet) GetPods() []*v1.Pod { - return kl.podManager.GetPods() -} - -// GetRunningPods returns all pods running on kubelet from looking at the -// container runtime cache. This function converts kubecontainer.Pod to -// v1.Pod, so only the fields that exist in both kubecontainer.Pod and -// v1.Pod are considered meaningful. -func (kl *Kubelet) GetRunningPods() ([]*v1.Pod, error) { - pods, err := kl.runtimeCache.GetPods() - if err != nil { - return nil, err - } - - apiPods := make([]*v1.Pod, 0, len(pods)) - for _, pod := range pods { - apiPods = append(apiPods, pod.ToAPIPod()) - } - return apiPods, nil -} - -// GetPodByFullName gets the pod with the given 'full' name, which -// incorporates the namespace as well as whether the pod was found. -func (kl *Kubelet) GetPodByFullName(podFullName string) (*v1.Pod, bool) { - return kl.podManager.GetPodByFullName(podFullName) -} - -// GetPodByName provides the first pod that matches namespace and name, as well -// as whether the pod was found. -func (kl *Kubelet) GetPodByName(namespace, name string) (*v1.Pod, bool) { - return kl.podManager.GetPodByName(namespace, name) -} - -// GetPodByCgroupfs provides the pod that maps to the specified cgroup, as well -// as whether the pod was found. -func (kl *Kubelet) GetPodByCgroupfs(cgroupfs string) (*v1.Pod, bool) { - pcm := kl.containerManager.NewPodContainerManager() - if result, podUID := pcm.IsPodCgroup(cgroupfs); result { - return kl.podManager.GetPodByUID(podUID) - } - return nil, false -} - -// GetHostname Returns the hostname as the kubelet sees it. -func (kl *Kubelet) GetHostname() string { - return kl.hostname -} - -// getRuntime returns the current Runtime implementation in use by the kubelet. -func (kl *Kubelet) getRuntime() kubecontainer.Runtime { - return kl.containerRuntime -} - -// GetNode returns the node info for the configured node name of this Kubelet. -func (kl *Kubelet) GetNode() (*v1.Node, error) { - if kl.kubeClient == nil { - return kl.initialNode() - } - return kl.nodeInfo.GetNodeInfo(string(kl.nodeName)) -} - -// getNodeAnyWay() must return a *v1.Node which is required by RunGeneralPredicates(). -// The *v1.Node is obtained as follows: -// Return kubelet's nodeInfo for this node, except on error or if in standalone mode, -// in which case return a manufactured nodeInfo representing a node with no pods, -// zero capacity, and the default labels. -func (kl *Kubelet) getNodeAnyWay() (*v1.Node, error) { - if kl.kubeClient != nil { - if n, err := kl.nodeInfo.GetNodeInfo(string(kl.nodeName)); err == nil { - return n, nil - } - } - return kl.initialNode() -} - -// GetNodeConfig returns the container manager node config. -func (kl *Kubelet) GetNodeConfig() cm.NodeConfig { - return kl.containerManager.GetNodeConfig() -} - -// GetPodCgroupRoot returns the listeral cgroupfs value for the cgroup containing all pods -func (kl *Kubelet) GetPodCgroupRoot() string { - return kl.containerManager.GetPodCgroupRoot() -} - -// GetHostIP returns host IP or nil in case of error. -func (kl *Kubelet) GetHostIP() (net.IP, error) { - node, err := kl.GetNode() - if err != nil { - return nil, fmt.Errorf("cannot get node: %v", err) - } - return utilnode.GetNodeHostIP(node) -} - -// getHostIPAnyway attempts to return the host IP from kubelet's nodeInfo, or -// the initialNode. -func (kl *Kubelet) getHostIPAnyWay() (net.IP, error) { - node, err := kl.getNodeAnyWay() - if err != nil { - return nil, err - } - return utilnode.GetNodeHostIP(node) -} - -// GetExtraSupplementalGroupsForPod returns a list of the extra -// supplemental groups for the Pod. These extra supplemental groups come -// from annotations on persistent volumes that the pod depends on. -func (kl *Kubelet) GetExtraSupplementalGroupsForPod(pod *v1.Pod) []int64 { - return kl.volumeManager.GetExtraSupplementalGroupsForPod(pod) -} - -// getPodVolumePathListFromDisk returns a list of the volume paths by reading the -// volume directories for the given pod from the disk. -func (kl *Kubelet) getPodVolumePathListFromDisk(podUID types.UID) ([]string, error) { - volumes := []string{} - podVolDir := kl.getPodVolumesDir(podUID) - - if pathExists, pathErr := volumeutil.PathExists(podVolDir); pathErr != nil { - return volumes, fmt.Errorf("Error checking if path %q exists: %v", podVolDir, pathErr) - } else if !pathExists { - glog.Warningf("Path %q does not exist", podVolDir) - return volumes, nil - } - - volumePluginDirs, err := ioutil.ReadDir(podVolDir) - if err != nil { - glog.Errorf("Could not read directory %s: %v", podVolDir, err) - return volumes, err - } - for _, volumePluginDir := range volumePluginDirs { - volumePluginName := volumePluginDir.Name() - volumePluginPath := filepath.Join(podVolDir, volumePluginName) - volumeDirs, err := utilfile.ReadDirNoStat(volumePluginPath) - if err != nil { - return volumes, fmt.Errorf("Could not read directory %s: %v", volumePluginPath, err) - } - for _, volumeDir := range volumeDirs { - volumes = append(volumes, filepath.Join(volumePluginPath, volumeDir)) - } - } - return volumes, nil -} - -func (kl *Kubelet) getMountedVolumePathListFromDisk(podUID types.UID) ([]string, error) { - mountedVolumes := []string{} - volumePaths, err := kl.getPodVolumePathListFromDisk(podUID) - if err != nil { - return mountedVolumes, err - } - for _, volumePath := range volumePaths { - isNotMount, err := kl.mounter.IsLikelyNotMountPoint(volumePath) - if err != nil { - return mountedVolumes, err - } - if !isNotMount { - mountedVolumes = append(mountedVolumes, volumePath) - } - } - return mountedVolumes, nil -} - -// GetVersionInfo returns information about the version of cAdvisor in use. -func (kl *Kubelet) GetVersionInfo() (*cadvisorapiv1.VersionInfo, error) { - return kl.cadvisor.VersionInfo() -} - -// GetCachedMachineInfo assumes that the machine info can't change without a reboot -func (kl *Kubelet) GetCachedMachineInfo() (*cadvisorapiv1.MachineInfo, error) { - return kl.machineInfo, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters_test.go deleted file mode 100644 index 8eb04e36..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters_test.go +++ /dev/null @@ -1,69 +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 kubelet - -import ( - "path/filepath" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestKubeletDirs(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - root := kubelet.rootDirectory - - var exp, got string - - got = kubelet.getPodsDir() - exp = filepath.Join(root, "pods") - assert.Equal(t, exp, got) - - got = kubelet.getPluginsDir() - exp = filepath.Join(root, "plugins") - assert.Equal(t, exp, got) - - got = kubelet.getPluginDir("foobar") - exp = filepath.Join(root, "plugins/foobar") - assert.Equal(t, exp, got) - - got = kubelet.getPodDir("abc123") - exp = filepath.Join(root, "pods/abc123") - assert.Equal(t, exp, got) - - got = kubelet.getPodVolumesDir("abc123") - exp = filepath.Join(root, "pods/abc123/volumes") - assert.Equal(t, exp, got) - - got = kubelet.getPodVolumeDir("abc123", "plugin", "foobar") - exp = filepath.Join(root, "pods/abc123/volumes/plugin/foobar") - assert.Equal(t, exp, got) - - got = kubelet.getPodPluginsDir("abc123") - exp = filepath.Join(root, "pods/abc123/plugins") - assert.Equal(t, exp, got) - - got = kubelet.getPodPluginDir("abc123", "foobar") - exp = filepath.Join(root, "pods/abc123/plugins/foobar") - assert.Equal(t, exp, got) - - got = kubelet.getPodContainerDir("abc123", "def456") - exp = filepath.Join(root, "pods/abc123/containers/def456") - assert.Equal(t, exp, got) -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network.go deleted file mode 100644 index fd7a84e4..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network.go +++ /dev/null @@ -1,167 +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 kubelet - -import ( - "fmt" - - "github.com/golang/glog" - "k8s.io/api/core/v1" - runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" - utiliptables "k8s.io/kubernetes/pkg/util/iptables" -) - -const ( - // KubeMarkMasqChain is the mark-for-masquerade chain - // TODO: clean up this logic in kube-proxy - KubeMarkMasqChain utiliptables.Chain = "KUBE-MARK-MASQ" - - // KubeMarkDropChain is the mark-for-drop chain - KubeMarkDropChain utiliptables.Chain = "KUBE-MARK-DROP" - - // KubePostroutingChain is kubernetes postrouting rules - KubePostroutingChain utiliptables.Chain = "KUBE-POSTROUTING" - - // KubeFirewallChain is kubernetes firewall rules - KubeFirewallChain utiliptables.Chain = "KUBE-FIREWALL" -) - -// providerRequiresNetworkingConfiguration returns whether the cloud provider -// requires special networking configuration. -func (kl *Kubelet) providerRequiresNetworkingConfiguration() bool { - // TODO: We should have a mechanism to say whether native cloud provider - // is used or whether we are using overlay networking. We should return - // true for cloud providers if they implement Routes() interface and - // we are not using overlay networking. - if kl.cloud == nil || kl.cloud.ProviderName() != "gce" { - return false - } - _, supported := kl.cloud.Routes() - return supported -} - -// updatePodCIDR updates the pod CIDR in the runtime state if it is different -// from the current CIDR. -func (kl *Kubelet) updatePodCIDR(cidr string) { - podCIDR := kl.runtimeState.podCIDR() - - if podCIDR == cidr { - return - } - - // kubelet -> generic runtime -> runtime shim -> network plugin - // docker/non-cri implementations have a passthrough UpdatePodCIDR - if err := kl.getRuntime().UpdatePodCIDR(cidr); err != nil { - glog.Errorf("Failed to update pod CIDR: %v", err) - return - } - - glog.Infof("Setting Pod CIDR: %v -> %v", podCIDR, cidr) - kl.runtimeState.setPodCIDR(cidr) -} - -// syncNetworkUtil ensures the network utility are present on host. -// Network util includes: -// 1. In nat table, KUBE-MARK-DROP rule to mark connections for dropping -// Marked connection will be drop on INPUT/OUTPUT Chain in filter table -// 2. In nat table, KUBE-MARK-MASQ rule to mark connections for SNAT -// Marked connection will get SNAT on POSTROUTING Chain in nat table -func (kl *Kubelet) syncNetworkUtil() { - if kl.iptablesMasqueradeBit < 0 || kl.iptablesMasqueradeBit > 31 { - glog.Errorf("invalid iptables-masquerade-bit %v not in [0, 31]", kl.iptablesMasqueradeBit) - return - } - - if kl.iptablesDropBit < 0 || kl.iptablesDropBit > 31 { - glog.Errorf("invalid iptables-drop-bit %v not in [0, 31]", kl.iptablesDropBit) - return - } - - if kl.iptablesDropBit == kl.iptablesMasqueradeBit { - glog.Errorf("iptables-masquerade-bit %v and iptables-drop-bit %v must be different", kl.iptablesMasqueradeBit, kl.iptablesDropBit) - return - } - - // Setup KUBE-MARK-DROP rules - dropMark := getIPTablesMark(kl.iptablesDropBit) - if _, err := kl.iptClient.EnsureChain(utiliptables.TableNAT, KubeMarkDropChain); err != nil { - glog.Errorf("Failed to ensure that %s chain %s exists: %v", utiliptables.TableNAT, KubeMarkDropChain, err) - return - } - if _, err := kl.iptClient.EnsureRule(utiliptables.Append, utiliptables.TableNAT, KubeMarkDropChain, "-j", "MARK", "--set-xmark", dropMark); err != nil { - glog.Errorf("Failed to ensure marking rule for %v: %v", KubeMarkDropChain, err) - return - } - if _, err := kl.iptClient.EnsureChain(utiliptables.TableFilter, KubeFirewallChain); err != nil { - glog.Errorf("Failed to ensure that %s chain %s exists: %v", utiliptables.TableFilter, KubeFirewallChain, err) - return - } - if _, err := kl.iptClient.EnsureRule(utiliptables.Append, utiliptables.TableFilter, KubeFirewallChain, - "-m", "comment", "--comment", "kubernetes firewall for dropping marked packets", - "-m", "mark", "--mark", dropMark, - "-j", "DROP"); err != nil { - glog.Errorf("Failed to ensure rule to drop packet marked by %v in %v chain %v: %v", KubeMarkDropChain, utiliptables.TableFilter, KubeFirewallChain, err) - return - } - if _, err := kl.iptClient.EnsureRule(utiliptables.Prepend, utiliptables.TableFilter, utiliptables.ChainOutput, "-j", string(KubeFirewallChain)); err != nil { - glog.Errorf("Failed to ensure that %s chain %s jumps to %s: %v", utiliptables.TableFilter, utiliptables.ChainOutput, KubeFirewallChain, err) - return - } - if _, err := kl.iptClient.EnsureRule(utiliptables.Prepend, utiliptables.TableFilter, utiliptables.ChainInput, "-j", string(KubeFirewallChain)); err != nil { - glog.Errorf("Failed to ensure that %s chain %s jumps to %s: %v", utiliptables.TableFilter, utiliptables.ChainInput, KubeFirewallChain, err) - return - } - - // Setup KUBE-MARK-MASQ rules - masqueradeMark := getIPTablesMark(kl.iptablesMasqueradeBit) - if _, err := kl.iptClient.EnsureChain(utiliptables.TableNAT, KubeMarkMasqChain); err != nil { - glog.Errorf("Failed to ensure that %s chain %s exists: %v", utiliptables.TableNAT, KubeMarkMasqChain, err) - return - } - if _, err := kl.iptClient.EnsureChain(utiliptables.TableNAT, KubePostroutingChain); err != nil { - glog.Errorf("Failed to ensure that %s chain %s exists: %v", utiliptables.TableNAT, KubePostroutingChain, err) - return - } - if _, err := kl.iptClient.EnsureRule(utiliptables.Append, utiliptables.TableNAT, KubeMarkMasqChain, "-j", "MARK", "--set-xmark", masqueradeMark); err != nil { - glog.Errorf("Failed to ensure marking rule for %v: %v", KubeMarkMasqChain, err) - return - } - if _, err := kl.iptClient.EnsureRule(utiliptables.Prepend, utiliptables.TableNAT, utiliptables.ChainPostrouting, - "-m", "comment", "--comment", "kubernetes postrouting rules", "-j", string(KubePostroutingChain)); err != nil { - glog.Errorf("Failed to ensure that %s chain %s jumps to %s: %v", utiliptables.TableNAT, utiliptables.ChainPostrouting, KubePostroutingChain, err) - return - } - if _, err := kl.iptClient.EnsureRule(utiliptables.Append, utiliptables.TableNAT, KubePostroutingChain, - "-m", "comment", "--comment", "kubernetes service traffic requiring SNAT", - "-m", "mark", "--mark", masqueradeMark, "-j", "MASQUERADE"); err != nil { - glog.Errorf("Failed to ensure SNAT rule for packets marked by %v in %v chain %v: %v", KubeMarkMasqChain, utiliptables.TableNAT, KubePostroutingChain, err) - return - } -} - -// getIPTablesMark returns the fwmark given the bit -func getIPTablesMark(bit int) string { - value := 1 << uint(bit) - return fmt.Sprintf("%#08x/%#08x", value, value) -} - -// GetPodDNS returns DNS settings for the pod. -// This function is defined in kubecontainer.RuntimeHelper interface so we -// have to implement it. -func (kl *Kubelet) GetPodDNS(pod *v1.Pod) (*runtimeapi.DNSConfig, error) { - return kl.dnsConfigurer.GetPodDNS(pod) -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status.go deleted file mode 100644 index 4126eb99..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status.go +++ /dev/null @@ -1,1178 +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 kubelet - -import ( - "context" - "fmt" - "math" - "net" - goruntime "runtime" - "strings" - "sync" - "time" - - "github.com/golang/glog" - "k8s.io/api/core/v1" - apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - utilnet "k8s.io/apimachinery/pkg/util/net" - utilfeature "k8s.io/apiserver/pkg/util/feature" - k8s_api_v1 "k8s.io/kubernetes/pkg/apis/core/v1" - v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" - "k8s.io/kubernetes/pkg/cloudprovider" - "k8s.io/kubernetes/pkg/features" - kubeletapis "k8s.io/kubernetes/pkg/kubelet/apis" - "k8s.io/kubernetes/pkg/kubelet/cadvisor" - "k8s.io/kubernetes/pkg/kubelet/events" - "k8s.io/kubernetes/pkg/kubelet/util" - "k8s.io/kubernetes/pkg/scheduler/algorithm" - nodeutil "k8s.io/kubernetes/pkg/util/node" - "k8s.io/kubernetes/pkg/version" - volutil "k8s.io/kubernetes/pkg/volume/util" -) - -const ( - // maxNamesPerImageInNodeStatus is max number of names per image stored in - // the node status. - maxNamesPerImageInNodeStatus = 5 -) - -// registerWithAPIServer registers the node with the cluster master. It is safe -// to call multiple times, but not concurrently (kl.registrationCompleted is -// not locked). -func (kl *Kubelet) registerWithAPIServer() { - if kl.registrationCompleted { - return - } - step := 100 * time.Millisecond - - for { - time.Sleep(step) - step = step * 2 - if step >= 7*time.Second { - step = 7 * time.Second - } - - node, err := kl.initialNode() - if err != nil { - glog.Errorf("Unable to construct v1.Node object for kubelet: %v", err) - continue - } - - glog.Infof("Attempting to register node %s", node.Name) - registered := kl.tryRegisterWithAPIServer(node) - if registered { - glog.Infof("Successfully registered node %s", node.Name) - kl.registrationCompleted = true - return - } - } -} - -// tryRegisterWithAPIServer makes an attempt to register the given node with -// the API server, returning a boolean indicating whether the attempt was -// successful. If a node with the same name already exists, it reconciles the -// value of the annotation for controller-managed attach-detach of attachable -// persistent volumes for the node. If a node of the same name exists but has -// a different externalID value, it attempts to delete that node so that a -// later attempt can recreate it. -func (kl *Kubelet) tryRegisterWithAPIServer(node *v1.Node) bool { - _, err := kl.kubeClient.CoreV1().Nodes().Create(node) - if err == nil { - return true - } - - if !apierrors.IsAlreadyExists(err) { - glog.Errorf("Unable to register node %q with API server: %v", kl.nodeName, err) - return false - } - - existingNode, err := kl.kubeClient.CoreV1().Nodes().Get(string(kl.nodeName), metav1.GetOptions{}) - if err != nil { - glog.Errorf("Unable to register node %q with API server: error getting existing node: %v", kl.nodeName, err) - return false - } - if existingNode == nil { - glog.Errorf("Unable to register node %q with API server: no node instance returned", kl.nodeName) - return false - } - - originalNode := existingNode.DeepCopy() - if originalNode == nil { - glog.Errorf("Nil %q node object", kl.nodeName) - return false - } - - glog.Infof("Node %s was previously registered", kl.nodeName) - - // Edge case: the node was previously registered; reconcile - // the value of the controller-managed attach-detach - // annotation. - requiresUpdate := kl.reconcileCMADAnnotationWithExistingNode(node, existingNode) - requiresUpdate = kl.updateDefaultLabels(node, existingNode) || requiresUpdate - requiresUpdate = kl.reconcileExtendedResource(node, existingNode) || requiresUpdate - if requiresUpdate { - if _, _, err := nodeutil.PatchNodeStatus(kl.kubeClient.CoreV1(), types.NodeName(kl.nodeName), originalNode, existingNode); err != nil { - glog.Errorf("Unable to reconcile node %q with API server: error updating node: %v", kl.nodeName, err) - return false - } - } - - return true -} - -// Zeros out extended resource capacity during reconciliation. -func (kl *Kubelet) reconcileExtendedResource(initialNode, node *v1.Node) bool { - requiresUpdate := false - for k := range node.Status.Capacity { - if v1helper.IsExtendedResourceName(k) { - node.Status.Capacity[k] = *resource.NewQuantity(int64(0), resource.DecimalSI) - node.Status.Allocatable[k] = *resource.NewQuantity(int64(0), resource.DecimalSI) - requiresUpdate = true - } - } - return requiresUpdate -} - -// updateDefaultLabels will set the default labels on the node -func (kl *Kubelet) updateDefaultLabels(initialNode, existingNode *v1.Node) bool { - defaultLabels := []string{ - kubeletapis.LabelHostname, - kubeletapis.LabelZoneFailureDomain, - kubeletapis.LabelZoneRegion, - kubeletapis.LabelInstanceType, - kubeletapis.LabelOS, - kubeletapis.LabelArch, - } - - var needsUpdate bool = false - //Set default labels but make sure to not set labels with empty values - for _, label := range defaultLabels { - if _, hasInitialValue := initialNode.Labels[label]; !hasInitialValue { - continue - } - - if existingNode.Labels[label] != initialNode.Labels[label] { - existingNode.Labels[label] = initialNode.Labels[label] - needsUpdate = true - } - - if existingNode.Labels[label] == "" { - delete(existingNode.Labels, label) - } - } - - return needsUpdate -} - -// reconcileCMADAnnotationWithExistingNode reconciles the controller-managed -// attach-detach annotation on a new node and the existing node, returning -// whether the existing node must be updated. -func (kl *Kubelet) reconcileCMADAnnotationWithExistingNode(node, existingNode *v1.Node) bool { - var ( - existingCMAAnnotation = existingNode.Annotations[volutil.ControllerManagedAttachAnnotation] - newCMAAnnotation, newSet = node.Annotations[volutil.ControllerManagedAttachAnnotation] - ) - - if newCMAAnnotation == existingCMAAnnotation { - return false - } - - // If the just-constructed node and the existing node do - // not have the same value, update the existing node with - // the correct value of the annotation. - if !newSet { - glog.Info("Controller attach-detach setting changed to false; updating existing Node") - delete(existingNode.Annotations, volutil.ControllerManagedAttachAnnotation) - } else { - glog.Info("Controller attach-detach setting changed to true; updating existing Node") - if existingNode.Annotations == nil { - existingNode.Annotations = make(map[string]string) - } - existingNode.Annotations[volutil.ControllerManagedAttachAnnotation] = newCMAAnnotation - } - - return true -} - -// initialNode constructs the initial v1.Node for this Kubelet, incorporating node -// labels, information from the cloud provider, and Kubelet configuration. -func (kl *Kubelet) initialNode() (*v1.Node, error) { - node := &v1.Node{ - ObjectMeta: metav1.ObjectMeta{ - Name: string(kl.nodeName), - Labels: map[string]string{ - kubeletapis.LabelHostname: kl.hostname, - kubeletapis.LabelOS: goruntime.GOOS, - kubeletapis.LabelArch: goruntime.GOARCH, - }, - }, - Spec: v1.NodeSpec{ - Unschedulable: !kl.registerSchedulable, - }, - } - nodeTaints := make([]v1.Taint, 0) - if len(kl.registerWithTaints) > 0 { - taints := make([]v1.Taint, len(kl.registerWithTaints)) - for i := range kl.registerWithTaints { - if err := k8s_api_v1.Convert_core_Taint_To_v1_Taint(&kl.registerWithTaints[i], &taints[i], nil); err != nil { - return nil, err - } - } - nodeTaints = append(nodeTaints, taints...) - } - if kl.externalCloudProvider { - taint := v1.Taint{ - Key: algorithm.TaintExternalCloudProvider, - Value: "true", - Effect: v1.TaintEffectNoSchedule, - } - - nodeTaints = append(nodeTaints, taint) - } - if len(nodeTaints) > 0 { - node.Spec.Taints = nodeTaints - } - // Initially, set NodeNetworkUnavailable to true. - if kl.providerRequiresNetworkingConfiguration() { - node.Status.Conditions = append(node.Status.Conditions, v1.NodeCondition{ - Type: v1.NodeNetworkUnavailable, - Status: v1.ConditionTrue, - Reason: "NoRouteCreated", - Message: "Node created without a route", - LastTransitionTime: metav1.NewTime(kl.clock.Now()), - }) - } - - if kl.enableControllerAttachDetach { - if node.Annotations == nil { - node.Annotations = make(map[string]string) - } - - glog.Infof("Setting node annotation to enable volume controller attach/detach") - node.Annotations[volutil.ControllerManagedAttachAnnotation] = "true" - } else { - glog.Infof("Controller attach/detach is disabled for this node; Kubelet will attach and detach volumes") - } - - if kl.keepTerminatedPodVolumes { - if node.Annotations == nil { - node.Annotations = make(map[string]string) - } - glog.Infof("Setting node annotation to keep pod volumes of terminated pods attached to the node") - node.Annotations[volutil.KeepTerminatedPodVolumesAnnotation] = "true" - } - - // @question: should this be place after the call to the cloud provider? which also applies labels - for k, v := range kl.nodeLabels { - if cv, found := node.ObjectMeta.Labels[k]; found { - glog.Warningf("the node label %s=%s will overwrite default setting %s", k, v, cv) - } - node.ObjectMeta.Labels[k] = v - } - - if kl.providerID != "" { - node.Spec.ProviderID = kl.providerID - } - - if kl.cloud != nil { - instances, ok := kl.cloud.Instances() - if !ok { - return nil, fmt.Errorf("failed to get instances from cloud provider") - } - - // TODO: We can't assume that the node has credentials to talk to the - // cloudprovider from arbitrary nodes. At most, we should talk to a - // local metadata server here. - var err error - if node.Spec.ProviderID == "" { - node.Spec.ProviderID, err = cloudprovider.GetInstanceProviderID(context.TODO(), kl.cloud, kl.nodeName) - if err != nil { - return nil, err - } - } - - instanceType, err := instances.InstanceType(context.TODO(), kl.nodeName) - if err != nil { - return nil, err - } - if instanceType != "" { - glog.Infof("Adding node label from cloud provider: %s=%s", kubeletapis.LabelInstanceType, instanceType) - node.ObjectMeta.Labels[kubeletapis.LabelInstanceType] = instanceType - } - // If the cloud has zone information, label the node with the zone information - zones, ok := kl.cloud.Zones() - if ok { - zone, err := zones.GetZone(context.TODO()) - if err != nil { - return nil, fmt.Errorf("failed to get zone from cloud provider: %v", err) - } - if zone.FailureDomain != "" { - glog.Infof("Adding node label from cloud provider: %s=%s", kubeletapis.LabelZoneFailureDomain, zone.FailureDomain) - node.ObjectMeta.Labels[kubeletapis.LabelZoneFailureDomain] = zone.FailureDomain - } - if zone.Region != "" { - glog.Infof("Adding node label from cloud provider: %s=%s", kubeletapis.LabelZoneRegion, zone.Region) - node.ObjectMeta.Labels[kubeletapis.LabelZoneRegion] = zone.Region - } - } - } - - kl.setNodeStatus(node) - - return node, nil -} - -// setVolumeLimits updates volume limits on the node -func (kl *Kubelet) setVolumeLimits(node *v1.Node) { - if node.Status.Capacity == nil { - node.Status.Capacity = v1.ResourceList{} - } - - if node.Status.Allocatable == nil { - node.Status.Allocatable = v1.ResourceList{} - } - - pluginWithLimits := kl.volumePluginMgr.ListVolumePluginWithLimits() - for _, volumePlugin := range pluginWithLimits { - attachLimits, err := volumePlugin.GetVolumeLimits() - if err != nil { - glog.V(4).Infof("Error getting volume limit for plugin %s", volumePlugin.GetPluginName()) - continue - } - for limitKey, value := range attachLimits { - node.Status.Capacity[v1.ResourceName(limitKey)] = *resource.NewQuantity(value, resource.DecimalSI) - node.Status.Allocatable[v1.ResourceName(limitKey)] = *resource.NewQuantity(value, resource.DecimalSI) - } - } -} - -// syncNodeStatus should be called periodically from a goroutine. -// It synchronizes node status to master, registering the kubelet first if -// necessary. -func (kl *Kubelet) syncNodeStatus() { - if kl.kubeClient == nil || kl.heartbeatClient == nil { - return - } - if kl.registerNode { - // This will exit immediately if it doesn't need to do anything. - kl.registerWithAPIServer() - } - if err := kl.updateNodeStatus(); err != nil { - glog.Errorf("Unable to update node status: %v", err) - } -} - -// updateNodeStatus updates node status to master with retries. -func (kl *Kubelet) updateNodeStatus() error { - glog.V(5).Infof("Updating node status") - for i := 0; i < nodeStatusUpdateRetry; i++ { - if err := kl.tryUpdateNodeStatus(i); err != nil { - if i > 0 && kl.onRepeatedHeartbeatFailure != nil { - kl.onRepeatedHeartbeatFailure() - } - glog.Errorf("Error updating node status, will retry: %v", err) - } else { - return nil - } - } - return fmt.Errorf("update node status exceeds retry count") -} - -// tryUpdateNodeStatus tries to update node status to master. If ReconcileCBR0 -// is set, this function will also confirm that cbr0 is configured correctly. -func (kl *Kubelet) tryUpdateNodeStatus(tryNumber int) error { - // In large clusters, GET and PUT operations on Node objects coming - // from here are the majority of load on apiserver and etcd. - // To reduce the load on etcd, we are serving GET operations from - // apiserver cache (the data might be slightly delayed but it doesn't - // seem to cause more conflict - the delays are pretty small). - // If it result in a conflict, all retries are served directly from etcd. - opts := metav1.GetOptions{} - if tryNumber == 0 { - util.FromApiserverCache(&opts) - } - node, err := kl.heartbeatClient.Nodes().Get(string(kl.nodeName), opts) - if err != nil { - return fmt.Errorf("error getting node %q: %v", kl.nodeName, err) - } - - originalNode := node.DeepCopy() - if originalNode == nil { - return fmt.Errorf("nil %q node object", kl.nodeName) - } - - if node.Spec.PodCIDR != "" { - kl.updatePodCIDR(node.Spec.PodCIDR) - } - - kl.setNodeStatus(node) - // Patch the current status on the API server - updatedNode, _, err := nodeutil.PatchNodeStatus(kl.heartbeatClient, types.NodeName(kl.nodeName), originalNode, node) - if err != nil { - return err - } - // If update finishes successfully, mark the volumeInUse as reportedInUse to indicate - // those volumes are already updated in the node's status - kl.volumeManager.MarkVolumesAsReportedInUse(updatedNode.Status.VolumesInUse) - return nil -} - -// recordNodeStatusEvent records an event of the given type with the given -// message for the node. -func (kl *Kubelet) recordNodeStatusEvent(eventType, event string) { - glog.V(2).Infof("Recording %s event message for node %s", event, kl.nodeName) - // TODO: This requires a transaction, either both node status is updated - // and event is recorded or neither should happen, see issue #6055. - kl.recorder.Eventf(kl.nodeRef, eventType, event, "Node %s status is now: %s", kl.nodeName, event) -} - -// Set IP and hostname addresses for the node. -func (kl *Kubelet) setNodeAddress(node *v1.Node) error { - if kl.nodeIP != nil { - if err := kl.nodeIPValidator(kl.nodeIP); err != nil { - return fmt.Errorf("failed to validate nodeIP: %v", err) - } - glog.V(2).Infof("Using node IP: %q", kl.nodeIP.String()) - } - - if kl.externalCloudProvider { - if kl.nodeIP != nil { - if node.ObjectMeta.Annotations == nil { - node.ObjectMeta.Annotations = make(map[string]string) - } - node.ObjectMeta.Annotations[kubeletapis.AnnotationProvidedIPAddr] = kl.nodeIP.String() - } - // We rely on the external cloud provider to supply the addresses. - return nil - } - if kl.cloud != nil { - instances, ok := kl.cloud.Instances() - if !ok { - return fmt.Errorf("failed to get instances from cloud provider") - } - // TODO(roberthbailey): Can we do this without having credentials to talk - // to the cloud provider? - // TODO(justinsb): We can if CurrentNodeName() was actually CurrentNode() and returned an interface - // TODO: If IP addresses couldn't be fetched from the cloud provider, should kubelet fallback on the other methods for getting the IP below? - var nodeAddresses []v1.NodeAddress - var err error - - // Make sure the instances.NodeAddresses returns even if the cloud provider API hangs for a long time - func() { - kl.cloudproviderRequestMux.Lock() - if len(kl.cloudproviderRequestParallelism) > 0 { - kl.cloudproviderRequestMux.Unlock() - return - } - kl.cloudproviderRequestParallelism <- 0 - kl.cloudproviderRequestMux.Unlock() - - go func() { - nodeAddresses, err = instances.NodeAddresses(context.TODO(), kl.nodeName) - - kl.cloudproviderRequestMux.Lock() - <-kl.cloudproviderRequestParallelism - kl.cloudproviderRequestMux.Unlock() - - kl.cloudproviderRequestSync <- 0 - }() - }() - - select { - case <-kl.cloudproviderRequestSync: - case <-time.After(kl.cloudproviderRequestTimeout): - err = fmt.Errorf("Timeout after %v", kl.cloudproviderRequestTimeout) - } - - if err != nil { - return fmt.Errorf("failed to get node address from cloud provider: %v", err) - } - if kl.nodeIP != nil { - enforcedNodeAddresses := []v1.NodeAddress{} - - var nodeIPType v1.NodeAddressType - for _, nodeAddress := range nodeAddresses { - if nodeAddress.Address == kl.nodeIP.String() { - enforcedNodeAddresses = append(enforcedNodeAddresses, v1.NodeAddress{Type: nodeAddress.Type, Address: nodeAddress.Address}) - nodeIPType = nodeAddress.Type - break - } - } - if len(enforcedNodeAddresses) > 0 { - for _, nodeAddress := range nodeAddresses { - if nodeAddress.Type != nodeIPType && nodeAddress.Type != v1.NodeHostName { - enforcedNodeAddresses = append(enforcedNodeAddresses, v1.NodeAddress{Type: nodeAddress.Type, Address: nodeAddress.Address}) - } - } - - enforcedNodeAddresses = append(enforcedNodeAddresses, v1.NodeAddress{Type: v1.NodeHostName, Address: kl.GetHostname()}) - node.Status.Addresses = enforcedNodeAddresses - return nil - } - return fmt.Errorf("failed to get node address from cloud provider that matches ip: %v", kl.nodeIP) - } - - // Only add a NodeHostName address if the cloudprovider did not specify one - // (we assume the cloudprovider knows best) - var addressNodeHostName *v1.NodeAddress - for i := range nodeAddresses { - if nodeAddresses[i].Type == v1.NodeHostName { - addressNodeHostName = &nodeAddresses[i] - break - } - } - if addressNodeHostName == nil { - hostnameAddress := v1.NodeAddress{Type: v1.NodeHostName, Address: kl.GetHostname()} - nodeAddresses = append(nodeAddresses, hostnameAddress) - } else { - glog.V(2).Infof("Using Node Hostname from cloudprovider: %q", addressNodeHostName.Address) - } - node.Status.Addresses = nodeAddresses - } else { - var ipAddr net.IP - var err error - - // 1) Use nodeIP if set - // 2) If the user has specified an IP to HostnameOverride, use it - // 3) Lookup the IP from node name by DNS and use the first valid IPv4 address. - // If the node does not have a valid IPv4 address, use the first valid IPv6 address. - // 4) Try to get the IP from the network interface used as default gateway - if kl.nodeIP != nil { - ipAddr = kl.nodeIP - } else if addr := net.ParseIP(kl.hostname); addr != nil { - ipAddr = addr - } else { - var addrs []net.IP - addrs, _ = net.LookupIP(node.Name) - for _, addr := range addrs { - if err = kl.nodeIPValidator(addr); err == nil { - if addr.To4() != nil { - ipAddr = addr - break - } - if addr.To16() != nil && ipAddr == nil { - ipAddr = addr - } - } - } - - if ipAddr == nil { - ipAddr, err = utilnet.ChooseHostInterface() - } - } - - if ipAddr == nil { - // We tried everything we could, but the IP address wasn't fetchable; error out - return fmt.Errorf("can't get ip address of node %s. error: %v", node.Name, err) - } - node.Status.Addresses = []v1.NodeAddress{ - {Type: v1.NodeInternalIP, Address: ipAddr.String()}, - {Type: v1.NodeHostName, Address: kl.GetHostname()}, - } - } - return nil -} - -func (kl *Kubelet) setNodeStatusMachineInfo(node *v1.Node) { - // Note: avoid blindly overwriting the capacity in case opaque - // resources are being advertised. - if node.Status.Capacity == nil { - node.Status.Capacity = v1.ResourceList{} - } - - var devicePluginAllocatable v1.ResourceList - var devicePluginCapacity v1.ResourceList - var removedDevicePlugins []string - - // TODO: Post NotReady if we cannot get MachineInfo from cAdvisor. This needs to start - // cAdvisor locally, e.g. for test-cmd.sh, and in integration test. - info, err := kl.GetCachedMachineInfo() - if err != nil { - // TODO(roberthbailey): This is required for test-cmd.sh to pass. - // See if the test should be updated instead. - node.Status.Capacity[v1.ResourceCPU] = *resource.NewMilliQuantity(0, resource.DecimalSI) - node.Status.Capacity[v1.ResourceMemory] = resource.MustParse("0Gi") - node.Status.Capacity[v1.ResourcePods] = *resource.NewQuantity(int64(kl.maxPods), resource.DecimalSI) - glog.Errorf("Error getting machine info: %v", err) - } else { - node.Status.NodeInfo.MachineID = info.MachineID - node.Status.NodeInfo.SystemUUID = info.SystemUUID - - for rName, rCap := range cadvisor.CapacityFromMachineInfo(info) { - node.Status.Capacity[rName] = rCap - } - - if kl.podsPerCore > 0 { - node.Status.Capacity[v1.ResourcePods] = *resource.NewQuantity( - int64(math.Min(float64(info.NumCores*kl.podsPerCore), float64(kl.maxPods))), resource.DecimalSI) - } else { - node.Status.Capacity[v1.ResourcePods] = *resource.NewQuantity( - int64(kl.maxPods), resource.DecimalSI) - } - - if node.Status.NodeInfo.BootID != "" && - node.Status.NodeInfo.BootID != info.BootID { - // TODO: This requires a transaction, either both node status is updated - // and event is recorded or neither should happen, see issue #6055. - kl.recorder.Eventf(kl.nodeRef, v1.EventTypeWarning, events.NodeRebooted, - "Node %s has been rebooted, boot id: %s", kl.nodeName, info.BootID) - } - node.Status.NodeInfo.BootID = info.BootID - - if utilfeature.DefaultFeatureGate.Enabled(features.LocalStorageCapacityIsolation) { - // TODO: all the node resources should use GetCapacity instead of deriving the - // capacity for every node status request - initialCapacity := kl.containerManager.GetCapacity() - if initialCapacity != nil { - node.Status.Capacity[v1.ResourceEphemeralStorage] = initialCapacity[v1.ResourceEphemeralStorage] - } - } - - devicePluginCapacity, devicePluginAllocatable, removedDevicePlugins = kl.containerManager.GetDevicePluginResourceCapacity() - if devicePluginCapacity != nil { - for k, v := range devicePluginCapacity { - if old, ok := node.Status.Capacity[k]; !ok || old.Value() != v.Value() { - glog.V(2).Infof("Update capacity for %s to %d", k, v.Value()) - } - node.Status.Capacity[k] = v - } - } - - for _, removedResource := range removedDevicePlugins { - glog.V(2).Infof("Set capacity for %s to 0 on device removal", removedResource) - // Set the capacity of the removed resource to 0 instead of - // removing the resource from the node status. This is to indicate - // that the resource is managed by device plugin and had been - // registered before. - // - // This is required to differentiate the device plugin managed - // resources and the cluster-level resources, which are absent in - // node status. - node.Status.Capacity[v1.ResourceName(removedResource)] = *resource.NewQuantity(int64(0), resource.DecimalSI) - } - } - - // Set Allocatable. - if node.Status.Allocatable == nil { - node.Status.Allocatable = make(v1.ResourceList) - } - // Remove extended resources from allocatable that are no longer - // present in capacity. - for k := range node.Status.Allocatable { - _, found := node.Status.Capacity[k] - if !found && v1helper.IsExtendedResourceName(k) { - delete(node.Status.Allocatable, k) - } - } - allocatableReservation := kl.containerManager.GetNodeAllocatableReservation() - for k, v := range node.Status.Capacity { - value := *(v.Copy()) - if res, exists := allocatableReservation[k]; exists { - value.Sub(res) - } - if value.Sign() < 0 { - // Negative Allocatable resources don't make sense. - value.Set(0) - } - node.Status.Allocatable[k] = value - } - - if devicePluginAllocatable != nil { - for k, v := range devicePluginAllocatable { - if old, ok := node.Status.Allocatable[k]; !ok || old.Value() != v.Value() { - glog.V(2).Infof("Update allocatable for %s to %d", k, v.Value()) - } - node.Status.Allocatable[k] = v - } - } - // for every huge page reservation, we need to remove it from allocatable memory - for k, v := range node.Status.Capacity { - if v1helper.IsHugePageResourceName(k) { - allocatableMemory := node.Status.Allocatable[v1.ResourceMemory] - value := *(v.Copy()) - allocatableMemory.Sub(value) - if allocatableMemory.Sign() < 0 { - // Negative Allocatable resources don't make sense. - allocatableMemory.Set(0) - } - node.Status.Allocatable[v1.ResourceMemory] = allocatableMemory - } - } -} - -// Set versioninfo for the node. -func (kl *Kubelet) setNodeStatusVersionInfo(node *v1.Node) { - verinfo, err := kl.cadvisor.VersionInfo() - if err != nil { - glog.Errorf("Error getting version info: %v", err) - return - } - - node.Status.NodeInfo.KernelVersion = verinfo.KernelVersion - node.Status.NodeInfo.OSImage = verinfo.ContainerOsVersion - - runtimeVersion := "Unknown" - if runtimeVer, err := kl.containerRuntime.Version(); err == nil { - runtimeVersion = runtimeVer.String() - } - node.Status.NodeInfo.ContainerRuntimeVersion = fmt.Sprintf("%s://%s", kl.containerRuntime.Type(), runtimeVersion) - - node.Status.NodeInfo.KubeletVersion = version.Get().String() - // TODO: kube-proxy might be different version from kubelet in the future - node.Status.NodeInfo.KubeProxyVersion = version.Get().String() -} - -// Set daemonEndpoints for the node. -func (kl *Kubelet) setNodeStatusDaemonEndpoints(node *v1.Node) { - node.Status.DaemonEndpoints = *kl.daemonEndpoints -} - -// Set images list for the node -func (kl *Kubelet) setNodeStatusImages(node *v1.Node) { - // Update image list of this node - var imagesOnNode []v1.ContainerImage - containerImages, err := kl.imageManager.GetImageList() - if err != nil { - glog.Errorf("Error getting image list: %v", err) - node.Status.Images = imagesOnNode - return - } - // sort the images from max to min, and only set top N images into the node status. - if int(kl.nodeStatusMaxImages) > -1 && - int(kl.nodeStatusMaxImages) < len(containerImages) { - containerImages = containerImages[0:kl.nodeStatusMaxImages] - } - - for _, image := range containerImages { - names := append(image.RepoDigests, image.RepoTags...) - // Report up to maxNamesPerImageInNodeStatus names per image. - if len(names) > maxNamesPerImageInNodeStatus { - names = names[0:maxNamesPerImageInNodeStatus] - } - imagesOnNode = append(imagesOnNode, v1.ContainerImage{ - Names: names, - SizeBytes: image.Size, - }) - } - - node.Status.Images = imagesOnNode -} - -// Set the GOOS and GOARCH for this node -func (kl *Kubelet) setNodeStatusGoRuntime(node *v1.Node) { - node.Status.NodeInfo.OperatingSystem = goruntime.GOOS - node.Status.NodeInfo.Architecture = goruntime.GOARCH -} - -// Set status for the node. -func (kl *Kubelet) setNodeStatusInfo(node *v1.Node) { - kl.setNodeStatusMachineInfo(node) - kl.setNodeStatusVersionInfo(node) - kl.setNodeStatusDaemonEndpoints(node) - kl.setNodeStatusImages(node) - kl.setNodeStatusGoRuntime(node) - if utilfeature.DefaultFeatureGate.Enabled(features.AttachVolumeLimit) { - kl.setVolumeLimits(node) - } -} - -// Set Ready condition for the node. -func (kl *Kubelet) setNodeReadyCondition(node *v1.Node) { - // NOTE(aaronlevy): NodeReady condition needs to be the last in the list of node conditions. - // This is due to an issue with version skewed kubelet and master components. - // ref: https://github.com/kubernetes/kubernetes/issues/16961 - currentTime := metav1.NewTime(kl.clock.Now()) - newNodeReadyCondition := v1.NodeCondition{ - Type: v1.NodeReady, - Status: v1.ConditionTrue, - Reason: "KubeletReady", - Message: "kubelet is posting ready status", - LastHeartbeatTime: currentTime, - } - rs := append(kl.runtimeState.runtimeErrors(), kl.runtimeState.networkErrors()...) - requiredCapacities := []v1.ResourceName{v1.ResourceCPU, v1.ResourceMemory, v1.ResourcePods} - if utilfeature.DefaultFeatureGate.Enabled(features.LocalStorageCapacityIsolation) { - requiredCapacities = append(requiredCapacities, v1.ResourceEphemeralStorage) - } - missingCapacities := []string{} - for _, resource := range requiredCapacities { - if _, found := node.Status.Capacity[resource]; !found { - missingCapacities = append(missingCapacities, string(resource)) - } - } - if len(missingCapacities) > 0 { - rs = append(rs, fmt.Sprintf("Missing node capacity for resources: %s", strings.Join(missingCapacities, ", "))) - } - if len(rs) > 0 { - newNodeReadyCondition = v1.NodeCondition{ - Type: v1.NodeReady, - Status: v1.ConditionFalse, - Reason: "KubeletNotReady", - Message: strings.Join(rs, ","), - LastHeartbeatTime: currentTime, - } - } - // Append AppArmor status if it's enabled. - // TODO(tallclair): This is a temporary message until node feature reporting is added. - if newNodeReadyCondition.Status == v1.ConditionTrue && - kl.appArmorValidator != nil && kl.appArmorValidator.ValidateHost() == nil { - newNodeReadyCondition.Message = fmt.Sprintf("%s. AppArmor enabled", newNodeReadyCondition.Message) - } - - // Record any soft requirements that were not met in the container manager. - status := kl.containerManager.Status() - if status.SoftRequirements != nil { - newNodeReadyCondition.Message = fmt.Sprintf("%s. WARNING: %s", newNodeReadyCondition.Message, status.SoftRequirements.Error()) - } - - readyConditionUpdated := false - needToRecordEvent := false - for i := range node.Status.Conditions { - if node.Status.Conditions[i].Type == v1.NodeReady { - if node.Status.Conditions[i].Status == newNodeReadyCondition.Status { - newNodeReadyCondition.LastTransitionTime = node.Status.Conditions[i].LastTransitionTime - } else { - newNodeReadyCondition.LastTransitionTime = currentTime - needToRecordEvent = true - } - node.Status.Conditions[i] = newNodeReadyCondition - readyConditionUpdated = true - break - } - } - if !readyConditionUpdated { - newNodeReadyCondition.LastTransitionTime = currentTime - node.Status.Conditions = append(node.Status.Conditions, newNodeReadyCondition) - } - if needToRecordEvent { - if newNodeReadyCondition.Status == v1.ConditionTrue { - kl.recordNodeStatusEvent(v1.EventTypeNormal, events.NodeReady) - } else { - kl.recordNodeStatusEvent(v1.EventTypeNormal, events.NodeNotReady) - glog.Infof("Node became not ready: %+v", newNodeReadyCondition) - } - } -} - -// setNodeMemoryPressureCondition for the node. -// TODO: this needs to move somewhere centralized... -func (kl *Kubelet) setNodeMemoryPressureCondition(node *v1.Node) { - currentTime := metav1.NewTime(kl.clock.Now()) - var condition *v1.NodeCondition - - // Check if NodeMemoryPressure condition already exists and if it does, just pick it up for update. - for i := range node.Status.Conditions { - if node.Status.Conditions[i].Type == v1.NodeMemoryPressure { - condition = &node.Status.Conditions[i] - } - } - - newCondition := false - // If the NodeMemoryPressure condition doesn't exist, create one - if condition == nil { - condition = &v1.NodeCondition{ - Type: v1.NodeMemoryPressure, - Status: v1.ConditionUnknown, - } - // cannot be appended to node.Status.Conditions here because it gets - // copied to the slice. So if we append to the slice here none of the - // updates we make below are reflected in the slice. - newCondition = true - } - - // Update the heartbeat time - condition.LastHeartbeatTime = currentTime - - // Note: The conditions below take care of the case when a new NodeMemoryPressure condition is - // created and as well as the case when the condition already exists. When a new condition - // is created its status is set to v1.ConditionUnknown which matches either - // condition.Status != v1.ConditionTrue or - // condition.Status != v1.ConditionFalse in the conditions below depending on whether - // the kubelet is under memory pressure or not. - if kl.evictionManager.IsUnderMemoryPressure() { - if condition.Status != v1.ConditionTrue { - condition.Status = v1.ConditionTrue - condition.Reason = "KubeletHasInsufficientMemory" - condition.Message = "kubelet has insufficient memory available" - condition.LastTransitionTime = currentTime - kl.recordNodeStatusEvent(v1.EventTypeNormal, "NodeHasInsufficientMemory") - } - } else if condition.Status != v1.ConditionFalse { - condition.Status = v1.ConditionFalse - condition.Reason = "KubeletHasSufficientMemory" - condition.Message = "kubelet has sufficient memory available" - condition.LastTransitionTime = currentTime - kl.recordNodeStatusEvent(v1.EventTypeNormal, "NodeHasSufficientMemory") - } - - if newCondition { - node.Status.Conditions = append(node.Status.Conditions, *condition) - } -} - -// setNodePIDPressureCondition for the node. -// TODO: this needs to move somewhere centralized... -func (kl *Kubelet) setNodePIDPressureCondition(node *v1.Node) { - currentTime := metav1.NewTime(kl.clock.Now()) - var condition *v1.NodeCondition - - // Check if NodePIDPressure condition already exists and if it does, just pick it up for update. - for i := range node.Status.Conditions { - if node.Status.Conditions[i].Type == v1.NodePIDPressure { - condition = &node.Status.Conditions[i] - } - } - - newCondition := false - // If the NodePIDPressure condition doesn't exist, create one - if condition == nil { - condition = &v1.NodeCondition{ - Type: v1.NodePIDPressure, - Status: v1.ConditionUnknown, - } - // cannot be appended to node.Status.Conditions here because it gets - // copied to the slice. So if we append to the slice here none of the - // updates we make below are reflected in the slice. - newCondition = true - } - - // Update the heartbeat time - condition.LastHeartbeatTime = currentTime - - // Note: The conditions below take care of the case when a new NodePIDPressure condition is - // created and as well as the case when the condition already exists. When a new condition - // is created its status is set to v1.ConditionUnknown which matches either - // condition.Status != v1.ConditionTrue or - // condition.Status != v1.ConditionFalse in the conditions below depending on whether - // the kubelet is under PID pressure or not. - if kl.evictionManager.IsUnderPIDPressure() { - if condition.Status != v1.ConditionTrue { - condition.Status = v1.ConditionTrue - condition.Reason = "KubeletHasInsufficientPID" - condition.Message = "kubelet has insufficient PID available" - condition.LastTransitionTime = currentTime - kl.recordNodeStatusEvent(v1.EventTypeNormal, "NodeHasInsufficientPID") - } - } else if condition.Status != v1.ConditionFalse { - condition.Status = v1.ConditionFalse - condition.Reason = "KubeletHasSufficientPID" - condition.Message = "kubelet has sufficient PID available" - condition.LastTransitionTime = currentTime - kl.recordNodeStatusEvent(v1.EventTypeNormal, "NodeHasSufficientPID") - } - - if newCondition { - node.Status.Conditions = append(node.Status.Conditions, *condition) - } -} - -// setNodeDiskPressureCondition for the node. -// TODO: this needs to move somewhere centralized... -func (kl *Kubelet) setNodeDiskPressureCondition(node *v1.Node) { - currentTime := metav1.NewTime(kl.clock.Now()) - var condition *v1.NodeCondition - - // Check if NodeDiskPressure condition already exists and if it does, just pick it up for update. - for i := range node.Status.Conditions { - if node.Status.Conditions[i].Type == v1.NodeDiskPressure { - condition = &node.Status.Conditions[i] - } - } - - newCondition := false - // If the NodeDiskPressure condition doesn't exist, create one - if condition == nil { - condition = &v1.NodeCondition{ - Type: v1.NodeDiskPressure, - Status: v1.ConditionUnknown, - } - // cannot be appended to node.Status.Conditions here because it gets - // copied to the slice. So if we append to the slice here none of the - // updates we make below are reflected in the slice. - newCondition = true - } - - // Update the heartbeat time - condition.LastHeartbeatTime = currentTime - - // Note: The conditions below take care of the case when a new NodeDiskPressure condition is - // created and as well as the case when the condition already exists. When a new condition - // is created its status is set to v1.ConditionUnknown which matches either - // condition.Status != v1.ConditionTrue or - // condition.Status != v1.ConditionFalse in the conditions below depending on whether - // the kubelet is under disk pressure or not. - if kl.evictionManager.IsUnderDiskPressure() { - if condition.Status != v1.ConditionTrue { - condition.Status = v1.ConditionTrue - condition.Reason = "KubeletHasDiskPressure" - condition.Message = "kubelet has disk pressure" - condition.LastTransitionTime = currentTime - kl.recordNodeStatusEvent(v1.EventTypeNormal, "NodeHasDiskPressure") - } - } else if condition.Status != v1.ConditionFalse { - condition.Status = v1.ConditionFalse - condition.Reason = "KubeletHasNoDiskPressure" - condition.Message = "kubelet has no disk pressure" - condition.LastTransitionTime = currentTime - kl.recordNodeStatusEvent(v1.EventTypeNormal, "NodeHasNoDiskPressure") - } - - if newCondition { - node.Status.Conditions = append(node.Status.Conditions, *condition) - } -} - -// Set OODCondition for the node. -func (kl *Kubelet) setNodeOODCondition(node *v1.Node) { - currentTime := metav1.NewTime(kl.clock.Now()) - var nodeOODCondition *v1.NodeCondition - - // Check if NodeOutOfDisk condition already exists and if it does, just pick it up for update. - for i := range node.Status.Conditions { - if node.Status.Conditions[i].Type == v1.NodeOutOfDisk { - nodeOODCondition = &node.Status.Conditions[i] - } - } - - newOODCondition := nodeOODCondition == nil - if newOODCondition { - nodeOODCondition = &v1.NodeCondition{} - } - if nodeOODCondition.Status != v1.ConditionFalse { - nodeOODCondition.Type = v1.NodeOutOfDisk - nodeOODCondition.Status = v1.ConditionFalse - nodeOODCondition.Reason = "KubeletHasSufficientDisk" - nodeOODCondition.Message = "kubelet has sufficient disk space available" - nodeOODCondition.LastTransitionTime = currentTime - kl.recordNodeStatusEvent(v1.EventTypeNormal, "NodeHasSufficientDisk") - } - - // Update the heartbeat time irrespective of all the conditions. - nodeOODCondition.LastHeartbeatTime = currentTime - - if newOODCondition { - node.Status.Conditions = append(node.Status.Conditions, *nodeOODCondition) - } -} - -// Maintains Node.Spec.Unschedulable value from previous run of tryUpdateNodeStatus() -// TODO: why is this a package var? -var ( - oldNodeUnschedulable bool - oldNodeUnschedulableLock sync.Mutex -) - -// record if node schedulable change. -func (kl *Kubelet) recordNodeSchedulableEvent(node *v1.Node) { - oldNodeUnschedulableLock.Lock() - defer oldNodeUnschedulableLock.Unlock() - if oldNodeUnschedulable != node.Spec.Unschedulable { - if node.Spec.Unschedulable { - kl.recordNodeStatusEvent(v1.EventTypeNormal, events.NodeNotSchedulable) - } else { - kl.recordNodeStatusEvent(v1.EventTypeNormal, events.NodeSchedulable) - } - oldNodeUnschedulable = node.Spec.Unschedulable - } -} - -// Update VolumesInUse field in Node Status only after states are synced up at least once -// in volume reconciler. -func (kl *Kubelet) setNodeVolumesInUseStatus(node *v1.Node) { - // Make sure to only update node status after reconciler starts syncing up states - if kl.volumeManager.ReconcilerStatesHasBeenSynced() { - node.Status.VolumesInUse = kl.volumeManager.GetVolumesInUse() - } -} - -// setNodeStatus fills in the Status fields of the given Node, overwriting -// any fields that are currently set. -// TODO(madhusudancs): Simplify the logic for setting node conditions and -// refactor the node status condition code out to a different file. -func (kl *Kubelet) setNodeStatus(node *v1.Node) { - for i, f := range kl.setNodeStatusFuncs { - glog.V(5).Infof("Setting node status at position %v", i) - if err := f(node); err != nil { - glog.Warningf("Failed to set some node status fields: %s", err) - } - } -} - -// defaultNodeStatusFuncs is a factory that generates the default set of -// setNodeStatus funcs -func (kl *Kubelet) defaultNodeStatusFuncs() []func(*v1.Node) error { - // initial set of node status update handlers, can be modified by Option's - withoutError := func(f func(*v1.Node)) func(*v1.Node) error { - return func(n *v1.Node) error { - f(n) - return nil - } - } - return []func(*v1.Node) error{ - kl.setNodeAddress, - withoutError(kl.setNodeStatusInfo), - withoutError(kl.setNodeOODCondition), - withoutError(kl.setNodeMemoryPressureCondition), - withoutError(kl.setNodeDiskPressureCondition), - withoutError(kl.setNodePIDPressureCondition), - withoutError(kl.setNodeReadyCondition), - withoutError(kl.setNodeVolumesInUseStatus), - withoutError(kl.recordNodeSchedulableEvent), - } -} - -// Validate given node IP belongs to the current host -func validateNodeIP(nodeIP net.IP) error { - // Honor IP limitations set in setNodeStatus() - if nodeIP.To4() == nil && nodeIP.To16() == nil { - return fmt.Errorf("nodeIP must be a valid IP address") - } - if nodeIP.IsLoopback() { - return fmt.Errorf("nodeIP can't be loopback address") - } - if nodeIP.IsMulticast() { - return fmt.Errorf("nodeIP can't be a multicast address") - } - if nodeIP.IsLinkLocalUnicast() { - return fmt.Errorf("nodeIP can't be a link-local unicast address") - } - if nodeIP.IsUnspecified() { - return fmt.Errorf("nodeIP can't be an all zeros address") - } - - addrs, err := net.InterfaceAddrs() - if err != nil { - return err - } - for _, addr := range addrs { - var ip net.IP - switch v := addr.(type) { - case *net.IPNet: - ip = v.IP - case *net.IPAddr: - ip = v.IP - } - if ip != nil && ip.Equal(nodeIP) { - return nil - } - } - return fmt.Errorf("Node IP: %q not found in the host's network interfaces", nodeIP.String()) -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status_test.go deleted file mode 100644 index ab79aa41..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status_test.go +++ /dev/null @@ -1,1801 +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 kubelet - -import ( - "encoding/json" - "fmt" - "net" - goruntime "runtime" - "sort" - "strconv" - "sync/atomic" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - cadvisorapi "github.com/google/cadvisor/info/v1" - cadvisorapiv2 "github.com/google/cadvisor/info/v2" - "k8s.io/api/core/v1" - apiequality "k8s.io/apimachinery/pkg/api/equality" - apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/diff" - "k8s.io/apimachinery/pkg/util/rand" - "k8s.io/apimachinery/pkg/util/strategicpatch" - "k8s.io/apimachinery/pkg/util/uuid" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/kubernetes/fake" - v1core "k8s.io/client-go/kubernetes/typed/core/v1" - "k8s.io/client-go/rest" - core "k8s.io/client-go/testing" - fakecloud "k8s.io/kubernetes/pkg/cloudprovider/providers/fake" - kubeletapis "k8s.io/kubernetes/pkg/kubelet/apis" - "k8s.io/kubernetes/pkg/kubelet/cm" - kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - "k8s.io/kubernetes/pkg/kubelet/util/sliceutils" - "k8s.io/kubernetes/pkg/version" - "k8s.io/kubernetes/pkg/volume/util" -) - -const ( - maxImageTagsForTest = 20 -) - -// generateTestingImageLists generate randomly generated image list and corresponding expectedImageList. -func generateTestingImageLists(count int, maxImages int) ([]kubecontainer.Image, []v1.ContainerImage) { - // imageList is randomly generated image list - var imageList []kubecontainer.Image - for ; count > 0; count-- { - imageItem := kubecontainer.Image{ - ID: string(uuid.NewUUID()), - RepoTags: generateImageTags(), - Size: rand.Int63nRange(minImgSize, maxImgSize+1), - } - imageList = append(imageList, imageItem) - } - - expectedImageList := makeExpectedImageList(imageList, maxImages) - return imageList, expectedImageList -} - -func makeExpectedImageList(imageList []kubecontainer.Image, maxImages int) []v1.ContainerImage { - // expectedImageList is generated by imageList according to size and maxImages - // 1. sort the imageList by size - sort.Sort(sliceutils.ByImageSize(imageList)) - // 2. convert sorted imageList to v1.ContainerImage list - var expectedImageList []v1.ContainerImage - for _, kubeImage := range imageList { - apiImage := v1.ContainerImage{ - Names: kubeImage.RepoTags[0:maxNamesPerImageInNodeStatus], - SizeBytes: kubeImage.Size, - } - - expectedImageList = append(expectedImageList, apiImage) - } - // 3. only returns the top maxImages images in expectedImageList - if maxImages == -1 { // -1 means no limit - return expectedImageList - } - return expectedImageList[0:maxImages] -} - -func generateImageTags() []string { - var tagList []string - // Generate > maxNamesPerImageInNodeStatus tags so that the test can verify - // that kubelet report up to maxNamesPerImageInNodeStatus tags. - count := rand.IntnRange(maxNamesPerImageInNodeStatus+1, maxImageTagsForTest+1) - for ; count > 0; count-- { - tagList = append(tagList, "k8s.gcr.io:v"+strconv.Itoa(count)) - } - return tagList -} - -func applyNodeStatusPatch(originalNode *v1.Node, patch []byte) (*v1.Node, error) { - original, err := json.Marshal(originalNode) - if err != nil { - return nil, fmt.Errorf("failed to marshal original node %#v: %v", originalNode, err) - } - updated, err := strategicpatch.StrategicMergePatch(original, patch, v1.Node{}) - if err != nil { - return nil, fmt.Errorf("failed to apply strategic merge patch %q on node %#v: %v", - patch, originalNode, err) - } - updatedNode := &v1.Node{} - if err := json.Unmarshal(updated, updatedNode); err != nil { - return nil, fmt.Errorf("failed to unmarshal updated node %q: %v", updated, err) - } - return updatedNode, nil -} - -type localCM struct { - cm.ContainerManager - allocatableReservation v1.ResourceList - capacity v1.ResourceList -} - -func (lcm *localCM) GetNodeAllocatableReservation() v1.ResourceList { - return lcm.allocatableReservation -} - -func (lcm *localCM) GetCapacity() v1.ResourceList { - return lcm.capacity -} - -func TestNodeStatusWithCloudProviderNodeIP(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - kubelet.kubeClient = nil // ensure only the heartbeat client is used - kubelet.hostname = testKubeletHostname - - cases := []struct { - name string - nodeIP net.IP - nodeAddresses []v1.NodeAddress - expectedAddresses []v1.NodeAddress - shouldError bool - }{ - { - name: "A single InternalIP", - nodeIP: net.ParseIP("10.1.1.1"), - nodeAddresses: []v1.NodeAddress{ - {Type: v1.NodeInternalIP, Address: "10.1.1.1"}, - {Type: v1.NodeHostName, Address: testKubeletHostname}, - }, - expectedAddresses: []v1.NodeAddress{ - {Type: v1.NodeInternalIP, Address: "10.1.1.1"}, - {Type: v1.NodeHostName, Address: testKubeletHostname}, - }, - shouldError: false, - }, - { - name: "NodeIP is external", - nodeIP: net.ParseIP("55.55.55.55"), - nodeAddresses: []v1.NodeAddress{ - {Type: v1.NodeInternalIP, Address: "10.1.1.1"}, - {Type: v1.NodeExternalIP, Address: "55.55.55.55"}, - {Type: v1.NodeHostName, Address: testKubeletHostname}, - }, - expectedAddresses: []v1.NodeAddress{ - {Type: v1.NodeInternalIP, Address: "10.1.1.1"}, - {Type: v1.NodeExternalIP, Address: "55.55.55.55"}, - {Type: v1.NodeHostName, Address: testKubeletHostname}, - }, - shouldError: false, - }, - { - // Accommodating #45201 and #49202 - name: "InternalIP and ExternalIP are the same", - nodeIP: net.ParseIP("55.55.55.55"), - nodeAddresses: []v1.NodeAddress{ - {Type: v1.NodeInternalIP, Address: "55.55.55.55"}, - {Type: v1.NodeExternalIP, Address: "55.55.55.55"}, - {Type: v1.NodeHostName, Address: testKubeletHostname}, - }, - expectedAddresses: []v1.NodeAddress{ - {Type: v1.NodeInternalIP, Address: "55.55.55.55"}, - {Type: v1.NodeExternalIP, Address: "55.55.55.55"}, - {Type: v1.NodeHostName, Address: testKubeletHostname}, - }, - shouldError: false, - }, - { - name: "An Internal/ExternalIP, an Internal/ExternalDNS", - nodeIP: net.ParseIP("10.1.1.1"), - nodeAddresses: []v1.NodeAddress{ - {Type: v1.NodeInternalIP, Address: "10.1.1.1"}, - {Type: v1.NodeExternalIP, Address: "55.55.55.55"}, - {Type: v1.NodeInternalDNS, Address: "ip-10-1-1-1.us-west-2.compute.internal"}, - {Type: v1.NodeExternalDNS, Address: "ec2-55-55-55-55.us-west-2.compute.amazonaws.com"}, - {Type: v1.NodeHostName, Address: testKubeletHostname}, - }, - expectedAddresses: []v1.NodeAddress{ - {Type: v1.NodeInternalIP, Address: "10.1.1.1"}, - {Type: v1.NodeExternalIP, Address: "55.55.55.55"}, - {Type: v1.NodeInternalDNS, Address: "ip-10-1-1-1.us-west-2.compute.internal"}, - {Type: v1.NodeExternalDNS, Address: "ec2-55-55-55-55.us-west-2.compute.amazonaws.com"}, - {Type: v1.NodeHostName, Address: testKubeletHostname}, - }, - shouldError: false, - }, - { - name: "An Internal with multiple internal IPs", - nodeIP: net.ParseIP("10.1.1.1"), - nodeAddresses: []v1.NodeAddress{ - {Type: v1.NodeInternalIP, Address: "10.1.1.1"}, - {Type: v1.NodeInternalIP, Address: "10.2.2.2"}, - {Type: v1.NodeInternalIP, Address: "10.3.3.3"}, - {Type: v1.NodeExternalIP, Address: "55.55.55.55"}, - {Type: v1.NodeHostName, Address: testKubeletHostname}, - }, - expectedAddresses: []v1.NodeAddress{ - {Type: v1.NodeInternalIP, Address: "10.1.1.1"}, - {Type: v1.NodeExternalIP, Address: "55.55.55.55"}, - {Type: v1.NodeHostName, Address: testKubeletHostname}, - }, - shouldError: false, - }, - { - name: "An InternalIP that isn't valid: should error", - nodeIP: net.ParseIP("10.2.2.2"), - nodeAddresses: []v1.NodeAddress{ - {Type: v1.NodeInternalIP, Address: "10.1.1.1"}, - {Type: v1.NodeExternalIP, Address: "55.55.55.55"}, - {Type: v1.NodeHostName, Address: testKubeletHostname}, - }, - expectedAddresses: nil, - shouldError: true, - }, - } - for _, testCase := range cases { - // testCase setup - existingNode := v1.Node{ - ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname, Annotations: make(map[string]string)}, - Spec: v1.NodeSpec{}, - } - - kubelet.nodeIP = testCase.nodeIP - - fakeCloud := &fakecloud.FakeCloud{ - Addresses: testCase.nodeAddresses, - Err: nil, - } - kubelet.cloud = fakeCloud - kubelet.cloudproviderRequestParallelism = make(chan int, 1) - kubelet.cloudproviderRequestSync = make(chan int) - kubelet.cloudproviderRequestTimeout = 10 * time.Second - kubelet.nodeIPValidator = func(nodeIP net.IP) error { - return nil - } - - // execute method - err := kubelet.setNodeAddress(&existingNode) - if err != nil && !testCase.shouldError { - t.Errorf("Unexpected error for test %s: %q", testCase.name, err) - continue - } else if err != nil && testCase.shouldError { - // expected an error - continue - } - - // Sort both sets for consistent equality - sortNodeAddresses(testCase.expectedAddresses) - sortNodeAddresses(existingNode.Status.Addresses) - - assert.True( - t, - apiequality.Semantic.DeepEqual( - testCase.expectedAddresses, - existingNode.Status.Addresses, - ), - fmt.Sprintf("Test %s failed %%s", testCase.name), - diff.ObjectDiff(testCase.expectedAddresses, existingNode.Status.Addresses), - ) - } -} - -// sortableNodeAddress is a type for sorting []v1.NodeAddress -type sortableNodeAddress []v1.NodeAddress - -func (s sortableNodeAddress) Len() int { return len(s) } -func (s sortableNodeAddress) Less(i, j int) bool { - return (string(s[i].Type) + s[i].Address) < (string(s[j].Type) + s[j].Address) -} -func (s sortableNodeAddress) Swap(i, j int) { s[j], s[i] = s[i], s[j] } - -func sortNodeAddresses(addrs sortableNodeAddress) { - sort.Sort(addrs) -} - -func TestUpdateNewNodeStatus(t *testing.T) { - cases := []struct { - desc string - nodeStatusMaxImages int32 - }{ - { - desc: "5 image limit", - nodeStatusMaxImages: 5, - }, - { - desc: "no image limit", - nodeStatusMaxImages: -1, - }, - } - - for _, tc := range cases { - t.Run(tc.desc, func(t *testing.T) { - // generate one more in inputImageList than we configure the Kubelet to report, - // or 5 images if unlimited - numTestImages := int(tc.nodeStatusMaxImages) + 1 - if tc.nodeStatusMaxImages == -1 { - numTestImages = 5 - } - inputImageList, expectedImageList := generateTestingImageLists(numTestImages, int(tc.nodeStatusMaxImages)) - testKubelet := newTestKubeletWithImageList( - t, inputImageList, false /* controllerAttachDetachEnabled */, true /*initFakeVolumePlugin*/) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - kubelet.nodeStatusMaxImages = tc.nodeStatusMaxImages - kubelet.kubeClient = nil // ensure only the heartbeat client is used - kubelet.containerManager = &localCM{ - ContainerManager: cm.NewStubContainerManager(), - allocatableReservation: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(200, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(100E6, resource.BinarySI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(2000, resource.BinarySI), - }, - capacity: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(5000, resource.BinarySI), - }, - } - kubeClient := testKubelet.fakeKubeClient - existingNode := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}} - kubeClient.ReactionChain = fake.NewSimpleClientset(&v1.NodeList{Items: []v1.Node{existingNode}}).ReactionChain - machineInfo := &cadvisorapi.MachineInfo{ - MachineID: "123", - SystemUUID: "abc", - BootID: "1b3", - NumCores: 2, - MemoryCapacity: 10E9, // 10G - } - mockCadvisor := testKubelet.fakeCadvisor - mockCadvisor.On("Start").Return(nil) - mockCadvisor.On("MachineInfo").Return(machineInfo, nil) - versionInfo := &cadvisorapi.VersionInfo{ - KernelVersion: "3.16.0-0.bpo.4-amd64", - ContainerOsVersion: "Debian GNU/Linux 7 (wheezy)", - } - mockCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{ - Usage: 400, - Capacity: 5000, - Available: 600, - }, nil) - mockCadvisor.On("RootFsInfo").Return(cadvisorapiv2.FsInfo{ - Usage: 400, - Capacity: 5000, - Available: 600, - }, nil) - mockCadvisor.On("VersionInfo").Return(versionInfo, nil) - maxAge := 0 * time.Second - options := cadvisorapiv2.RequestOptions{IdType: cadvisorapiv2.TypeName, Count: 2, Recursive: false, MaxAge: &maxAge} - mockCadvisor.On("ContainerInfoV2", "/", options).Return(map[string]cadvisorapiv2.ContainerInfo{}, nil) - kubelet.machineInfo = machineInfo - - expectedNode := &v1.Node{ - ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, - Spec: v1.NodeSpec{}, - Status: v1.NodeStatus{ - Conditions: []v1.NodeCondition{ - { - Type: v1.NodeOutOfDisk, - Status: v1.ConditionFalse, - Reason: "KubeletHasSufficientDisk", - Message: fmt.Sprintf("kubelet has sufficient disk space available"), - LastHeartbeatTime: metav1.Time{}, - LastTransitionTime: metav1.Time{}, - }, - { - Type: v1.NodeMemoryPressure, - Status: v1.ConditionFalse, - Reason: "KubeletHasSufficientMemory", - Message: fmt.Sprintf("kubelet has sufficient memory available"), - LastHeartbeatTime: metav1.Time{}, - LastTransitionTime: metav1.Time{}, - }, - { - Type: v1.NodeDiskPressure, - Status: v1.ConditionFalse, - Reason: "KubeletHasNoDiskPressure", - Message: fmt.Sprintf("kubelet has no disk pressure"), - LastHeartbeatTime: metav1.Time{}, - LastTransitionTime: metav1.Time{}, - }, - { - Type: v1.NodePIDPressure, - Status: v1.ConditionFalse, - Reason: "KubeletHasSufficientPID", - Message: fmt.Sprintf("kubelet has sufficient PID available"), - LastHeartbeatTime: metav1.Time{}, - LastTransitionTime: metav1.Time{}, - }, - { - Type: v1.NodeReady, - Status: v1.ConditionTrue, - Reason: "KubeletReady", - Message: fmt.Sprintf("kubelet is posting ready status"), - LastHeartbeatTime: metav1.Time{}, - LastTransitionTime: metav1.Time{}, - }, - }, - NodeInfo: v1.NodeSystemInfo{ - MachineID: "123", - SystemUUID: "abc", - BootID: "1b3", - KernelVersion: "3.16.0-0.bpo.4-amd64", - OSImage: "Debian GNU/Linux 7 (wheezy)", - OperatingSystem: goruntime.GOOS, - Architecture: goruntime.GOARCH, - ContainerRuntimeVersion: "test://1.5.0", - KubeletVersion: version.Get().String(), - KubeProxyVersion: version.Get().String(), - }, - Capacity: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), - v1.ResourcePods: *resource.NewQuantity(0, resource.DecimalSI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(5000, resource.BinarySI), - }, - Allocatable: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(1800, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(9900E6, resource.BinarySI), - v1.ResourcePods: *resource.NewQuantity(0, resource.DecimalSI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(3000, resource.BinarySI), - }, - Addresses: []v1.NodeAddress{ - {Type: v1.NodeInternalIP, Address: "127.0.0.1"}, - {Type: v1.NodeHostName, Address: testKubeletHostname}, - }, - Images: expectedImageList, - }, - } - - kubelet.updateRuntimeUp() - assert.NoError(t, kubelet.updateNodeStatus()) - actions := kubeClient.Actions() - require.Len(t, actions, 2) - require.True(t, actions[1].Matches("patch", "nodes")) - require.Equal(t, actions[1].GetSubresource(), "status") - - updatedNode, err := applyNodeStatusPatch(&existingNode, actions[1].(core.PatchActionImpl).GetPatch()) - assert.NoError(t, err) - for i, cond := range updatedNode.Status.Conditions { - assert.False(t, cond.LastHeartbeatTime.IsZero(), "LastHeartbeatTime for %v condition is zero", cond.Type) - assert.False(t, cond.LastTransitionTime.IsZero(), "LastTransitionTime for %v condition is zero", cond.Type) - updatedNode.Status.Conditions[i].LastHeartbeatTime = metav1.Time{} - updatedNode.Status.Conditions[i].LastTransitionTime = metav1.Time{} - } - - // Version skew workaround. See: https://github.com/kubernetes/kubernetes/issues/16961 - assert.Equal(t, v1.NodeReady, updatedNode.Status.Conditions[len(updatedNode.Status.Conditions)-1].Type, - "NotReady should be last") - assert.Len(t, updatedNode.Status.Images, len(expectedImageList)) - assert.True(t, apiequality.Semantic.DeepEqual(expectedNode, updatedNode), "%s", diff.ObjectDiff(expectedNode, updatedNode)) - }) - } -} - -func TestUpdateExistingNodeStatus(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - kubelet.nodeStatusMaxImages = 5 // don't truncate the image list that gets constructed by hand for this test - kubelet.kubeClient = nil // ensure only the heartbeat client is used - kubelet.containerManager = &localCM{ - ContainerManager: cm.NewStubContainerManager(), - allocatableReservation: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(200, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(100E6, resource.BinarySI), - }, - capacity: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(20E9, resource.BinarySI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(5000, resource.BinarySI), - }, - } - - kubeClient := testKubelet.fakeKubeClient - existingNode := v1.Node{ - ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, - Spec: v1.NodeSpec{}, - Status: v1.NodeStatus{ - Conditions: []v1.NodeCondition{ - { - Type: v1.NodeOutOfDisk, - Status: v1.ConditionFalse, - Reason: "KubeletHasSufficientDisk", - Message: fmt.Sprintf("kubelet has sufficient disk space available"), - LastHeartbeatTime: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), - LastTransitionTime: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), - }, - { - Type: v1.NodeMemoryPressure, - Status: v1.ConditionFalse, - Reason: "KubeletHasSufficientMemory", - Message: fmt.Sprintf("kubelet has sufficient memory available"), - LastHeartbeatTime: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), - LastTransitionTime: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), - }, - { - Type: v1.NodeDiskPressure, - Status: v1.ConditionFalse, - Reason: "KubeletHasSufficientDisk", - Message: fmt.Sprintf("kubelet has sufficient disk space available"), - LastHeartbeatTime: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), - LastTransitionTime: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), - }, - { - Type: v1.NodePIDPressure, - Status: v1.ConditionFalse, - Reason: "KubeletHasSufficientPID", - Message: fmt.Sprintf("kubelet has sufficient PID available"), - LastHeartbeatTime: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), - LastTransitionTime: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), - }, - { - Type: v1.NodeReady, - Status: v1.ConditionTrue, - Reason: "KubeletReady", - Message: fmt.Sprintf("kubelet is posting ready status"), - LastHeartbeatTime: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), - LastTransitionTime: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), - }, - }, - Capacity: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(3000, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(20E9, resource.BinarySI), - v1.ResourcePods: *resource.NewQuantity(0, resource.DecimalSI), - }, - Allocatable: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(2800, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(19900E6, resource.BinarySI), - v1.ResourcePods: *resource.NewQuantity(0, resource.DecimalSI), - }, - }, - } - kubeClient.ReactionChain = fake.NewSimpleClientset(&v1.NodeList{Items: []v1.Node{existingNode}}).ReactionChain - mockCadvisor := testKubelet.fakeCadvisor - mockCadvisor.On("Start").Return(nil) - machineInfo := &cadvisorapi.MachineInfo{ - MachineID: "123", - SystemUUID: "abc", - BootID: "1b3", - NumCores: 2, - MemoryCapacity: 20E9, - } - mockCadvisor.On("MachineInfo").Return(machineInfo, nil) - versionInfo := &cadvisorapi.VersionInfo{ - KernelVersion: "3.16.0-0.bpo.4-amd64", - ContainerOsVersion: "Debian GNU/Linux 7 (wheezy)", - } - mockCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{ - Usage: 400, - Capacity: 5000, - Available: 600, - }, nil) - mockCadvisor.On("RootFsInfo").Return(cadvisorapiv2.FsInfo{ - Usage: 400, - Capacity: 5000, - Available: 600, - }, nil) - mockCadvisor.On("VersionInfo").Return(versionInfo, nil) - maxAge := 0 * time.Second - options := cadvisorapiv2.RequestOptions{IdType: cadvisorapiv2.TypeName, Count: 2, Recursive: false, MaxAge: &maxAge} - mockCadvisor.On("ContainerInfoV2", "/", options).Return(map[string]cadvisorapiv2.ContainerInfo{}, nil) - kubelet.machineInfo = machineInfo - - expectedNode := &v1.Node{ - ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, - Spec: v1.NodeSpec{}, - Status: v1.NodeStatus{ - Conditions: []v1.NodeCondition{ - { - Type: v1.NodeOutOfDisk, - Status: v1.ConditionFalse, - Reason: "KubeletHasSufficientDisk", - Message: fmt.Sprintf("kubelet has sufficient disk space available"), - LastHeartbeatTime: metav1.Time{}, - LastTransitionTime: metav1.Time{}, - }, - { - Type: v1.NodeMemoryPressure, - Status: v1.ConditionFalse, - Reason: "KubeletHasSufficientMemory", - Message: fmt.Sprintf("kubelet has sufficient memory available"), - LastHeartbeatTime: metav1.Time{}, - LastTransitionTime: metav1.Time{}, - }, - { - Type: v1.NodeDiskPressure, - Status: v1.ConditionFalse, - Reason: "KubeletHasSufficientDisk", - Message: fmt.Sprintf("kubelet has sufficient disk space available"), - LastHeartbeatTime: metav1.Time{}, - LastTransitionTime: metav1.Time{}, - }, - { - Type: v1.NodePIDPressure, - Status: v1.ConditionFalse, - Reason: "KubeletHasSufficientPID", - Message: fmt.Sprintf("kubelet has sufficient PID available"), - LastHeartbeatTime: metav1.Time{}, - LastTransitionTime: metav1.Time{}, - }, - { - Type: v1.NodeReady, - Status: v1.ConditionTrue, - Reason: "KubeletReady", - Message: fmt.Sprintf("kubelet is posting ready status"), - LastHeartbeatTime: metav1.Time{}, // placeholder - LastTransitionTime: metav1.Time{}, // placeholder - }, - }, - NodeInfo: v1.NodeSystemInfo{ - MachineID: "123", - SystemUUID: "abc", - BootID: "1b3", - KernelVersion: "3.16.0-0.bpo.4-amd64", - OSImage: "Debian GNU/Linux 7 (wheezy)", - OperatingSystem: goruntime.GOOS, - Architecture: goruntime.GOARCH, - ContainerRuntimeVersion: "test://1.5.0", - KubeletVersion: version.Get().String(), - KubeProxyVersion: version.Get().String(), - }, - Capacity: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(20E9, resource.BinarySI), - v1.ResourcePods: *resource.NewQuantity(0, resource.DecimalSI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(5000, resource.BinarySI), - }, - Allocatable: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(1800, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(19900E6, resource.BinarySI), - v1.ResourcePods: *resource.NewQuantity(0, resource.DecimalSI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(5000, resource.BinarySI), - }, - Addresses: []v1.NodeAddress{ - {Type: v1.NodeInternalIP, Address: "127.0.0.1"}, - {Type: v1.NodeHostName, Address: testKubeletHostname}, - }, - // images will be sorted from max to min in node status. - Images: []v1.ContainerImage{ - { - Names: []string{"k8s.gcr.io:v1", "k8s.gcr.io:v2"}, - SizeBytes: 123, - }, - { - Names: []string{"k8s.gcr.io:v3", "k8s.gcr.io:v4"}, - SizeBytes: 456, - }, - }, - }, - } - - kubelet.updateRuntimeUp() - assert.NoError(t, kubelet.updateNodeStatus()) - - actions := kubeClient.Actions() - assert.Len(t, actions, 2) - - assert.IsType(t, core.PatchActionImpl{}, actions[1]) - patchAction := actions[1].(core.PatchActionImpl) - - updatedNode, err := applyNodeStatusPatch(&existingNode, patchAction.GetPatch()) - require.NoError(t, err) - - for i, cond := range updatedNode.Status.Conditions { - old := metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC).Time - // Expect LastHearbeat to be updated to Now, while LastTransitionTime to be the same. - assert.NotEqual(t, old, cond.LastHeartbeatTime.Rfc3339Copy().UTC(), "LastHeartbeatTime for condition %v", cond.Type) - assert.EqualValues(t, old, cond.LastTransitionTime.Rfc3339Copy().UTC(), "LastTransitionTime for condition %v", cond.Type) - - updatedNode.Status.Conditions[i].LastHeartbeatTime = metav1.Time{} - updatedNode.Status.Conditions[i].LastTransitionTime = metav1.Time{} - } - - // Version skew workaround. See: https://github.com/kubernetes/kubernetes/issues/16961 - assert.Equal(t, v1.NodeReady, updatedNode.Status.Conditions[len(updatedNode.Status.Conditions)-1].Type, - "NodeReady should be the last condition") - assert.True(t, apiequality.Semantic.DeepEqual(expectedNode, updatedNode), "%s", diff.ObjectDiff(expectedNode, updatedNode)) -} - -func TestUpdateExistingNodeStatusTimeout(t *testing.T) { - attempts := int64(0) - failureCallbacks := int64(0) - - // set up a listener that hangs connections - ln, err := net.Listen("tcp", "127.0.0.1:0") - assert.NoError(t, err) - defer ln.Close() - go func() { - // accept connections and just let them hang - for { - _, err := ln.Accept() - if err != nil { - t.Log(err) - return - } - t.Log("accepted connection") - atomic.AddInt64(&attempts, 1) - } - }() - - config := &rest.Config{ - Host: "http://" + ln.Addr().String(), - QPS: -1, - Timeout: time.Second, - } - assert.NoError(t, err) - - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - kubelet.kubeClient = nil // ensure only the heartbeat client is used - kubelet.heartbeatClient, err = v1core.NewForConfig(config) - kubelet.onRepeatedHeartbeatFailure = func() { - atomic.AddInt64(&failureCallbacks, 1) - } - kubelet.containerManager = &localCM{ - ContainerManager: cm.NewStubContainerManager(), - allocatableReservation: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(200, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(100E6, resource.BinarySI), - }, - capacity: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(20E9, resource.BinarySI), - }, - } - - // should return an error, but not hang - assert.Error(t, kubelet.updateNodeStatus()) - - // should have attempted multiple times - if actualAttempts := atomic.LoadInt64(&attempts); actualAttempts < nodeStatusUpdateRetry { - t.Errorf("Expected at least %d attempts, got %d", nodeStatusUpdateRetry, actualAttempts) - } - // should have gotten multiple failure callbacks - if actualFailureCallbacks := atomic.LoadInt64(&failureCallbacks); actualFailureCallbacks < (nodeStatusUpdateRetry - 1) { - t.Errorf("Expected %d failure callbacks, got %d", (nodeStatusUpdateRetry - 1), actualFailureCallbacks) - } -} - -func TestUpdateNodeStatusWithRuntimeStateError(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - kubelet.nodeStatusMaxImages = 5 // don't truncate the image list that gets constructed by hand for this test - kubelet.kubeClient = nil // ensure only the heartbeat client is used - kubelet.containerManager = &localCM{ - ContainerManager: cm.NewStubContainerManager(), - allocatableReservation: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(200, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(100E6, resource.BinarySI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(10E9, resource.BinarySI), - }, - capacity: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(20E9, resource.BinarySI), - }, - } - - clock := testKubelet.fakeClock - kubeClient := testKubelet.fakeKubeClient - existingNode := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}} - kubeClient.ReactionChain = fake.NewSimpleClientset(&v1.NodeList{Items: []v1.Node{existingNode}}).ReactionChain - mockCadvisor := testKubelet.fakeCadvisor - mockCadvisor.On("Start").Return(nil) - machineInfo := &cadvisorapi.MachineInfo{ - MachineID: "123", - SystemUUID: "abc", - BootID: "1b3", - NumCores: 2, - MemoryCapacity: 10E9, - } - mockCadvisor.On("MachineInfo").Return(machineInfo, nil) - versionInfo := &cadvisorapi.VersionInfo{ - KernelVersion: "3.16.0-0.bpo.4-amd64", - ContainerOsVersion: "Debian GNU/Linux 7 (wheezy)", - } - - mockCadvisor.On("VersionInfo").Return(versionInfo, nil) - maxAge := 0 * time.Second - options := cadvisorapiv2.RequestOptions{IdType: cadvisorapiv2.TypeName, Count: 2, Recursive: false, MaxAge: &maxAge} - mockCadvisor.On("ContainerInfoV2", "/", options).Return(map[string]cadvisorapiv2.ContainerInfo{}, nil) - mockCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{ - Usage: 400, - Capacity: 10E9, - }, nil) - mockCadvisor.On("RootFsInfo").Return(cadvisorapiv2.FsInfo{ - Usage: 400, - Capacity: 20E9, - }, nil) - - kubelet.machineInfo = machineInfo - - expectedNode := &v1.Node{ - ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, - Spec: v1.NodeSpec{}, - Status: v1.NodeStatus{ - Conditions: []v1.NodeCondition{ - { - Type: v1.NodeOutOfDisk, - Status: v1.ConditionFalse, - Reason: "KubeletHasSufficientDisk", - Message: fmt.Sprintf("kubelet has sufficient disk space available"), - LastHeartbeatTime: metav1.Time{}, - LastTransitionTime: metav1.Time{}, - }, - { - Type: v1.NodeMemoryPressure, - Status: v1.ConditionFalse, - Reason: "KubeletHasSufficientMemory", - Message: fmt.Sprintf("kubelet has sufficient memory available"), - LastHeartbeatTime: metav1.Time{}, - LastTransitionTime: metav1.Time{}, - }, - { - Type: v1.NodeDiskPressure, - Status: v1.ConditionFalse, - Reason: "KubeletHasNoDiskPressure", - Message: fmt.Sprintf("kubelet has no disk pressure"), - LastHeartbeatTime: metav1.Time{}, - LastTransitionTime: metav1.Time{}, - }, - { - Type: v1.NodePIDPressure, - Status: v1.ConditionFalse, - Reason: "KubeletHasSufficientPID", - Message: fmt.Sprintf("kubelet has sufficient PID available"), - LastHeartbeatTime: metav1.Time{}, - LastTransitionTime: metav1.Time{}, - }, - {}, //placeholder - }, - NodeInfo: v1.NodeSystemInfo{ - MachineID: "123", - SystemUUID: "abc", - BootID: "1b3", - KernelVersion: "3.16.0-0.bpo.4-amd64", - OSImage: "Debian GNU/Linux 7 (wheezy)", - OperatingSystem: goruntime.GOOS, - Architecture: goruntime.GOARCH, - ContainerRuntimeVersion: "test://1.5.0", - KubeletVersion: version.Get().String(), - KubeProxyVersion: version.Get().String(), - }, - Capacity: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), - v1.ResourcePods: *resource.NewQuantity(0, resource.DecimalSI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(20E9, resource.BinarySI), - }, - Allocatable: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(1800, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(9900E6, resource.BinarySI), - v1.ResourcePods: *resource.NewQuantity(0, resource.DecimalSI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(10E9, resource.BinarySI), - }, - Addresses: []v1.NodeAddress{ - {Type: v1.NodeInternalIP, Address: "127.0.0.1"}, - {Type: v1.NodeHostName, Address: testKubeletHostname}, - }, - Images: []v1.ContainerImage{ - { - Names: []string{"k8s.gcr.io:v1", "k8s.gcr.io:v2"}, - SizeBytes: 123, - }, - { - Names: []string{"k8s.gcr.io:v3", "k8s.gcr.io:v4"}, - SizeBytes: 456, - }, - }, - }, - } - - checkNodeStatus := func(status v1.ConditionStatus, reason string) { - kubeClient.ClearActions() - assert.NoError(t, kubelet.updateNodeStatus()) - actions := kubeClient.Actions() - require.Len(t, actions, 2) - require.True(t, actions[1].Matches("patch", "nodes")) - require.Equal(t, actions[1].GetSubresource(), "status") - - updatedNode, err := kubeClient.CoreV1().Nodes().Get(testKubeletHostname, metav1.GetOptions{}) - require.NoError(t, err, "can't apply node status patch") - - for i, cond := range updatedNode.Status.Conditions { - assert.False(t, cond.LastHeartbeatTime.IsZero(), "LastHeartbeatTime for %v condition is zero", cond.Type) - assert.False(t, cond.LastTransitionTime.IsZero(), "LastTransitionTime for %v condition is zero", cond.Type) - updatedNode.Status.Conditions[i].LastHeartbeatTime = metav1.Time{} - updatedNode.Status.Conditions[i].LastTransitionTime = metav1.Time{} - } - - // Version skew workaround. See: https://github.com/kubernetes/kubernetes/issues/16961 - lastIndex := len(updatedNode.Status.Conditions) - 1 - assert.Equal(t, v1.NodeReady, updatedNode.Status.Conditions[lastIndex].Type, "NodeReady should be the last condition") - assert.NotEmpty(t, updatedNode.Status.Conditions[lastIndex].Message) - - updatedNode.Status.Conditions[lastIndex].Message = "" - expectedNode.Status.Conditions[lastIndex] = v1.NodeCondition{ - Type: v1.NodeReady, - Status: status, - Reason: reason, - LastHeartbeatTime: metav1.Time{}, - LastTransitionTime: metav1.Time{}, - } - assert.True(t, apiequality.Semantic.DeepEqual(expectedNode, updatedNode), "%s", diff.ObjectDiff(expectedNode, updatedNode)) - } - - // TODO(random-liu): Refactor the unit test to be table driven test. - // Should report kubelet not ready if the runtime check is out of date - clock.SetTime(time.Now().Add(-maxWaitForContainerRuntime)) - kubelet.updateRuntimeUp() - checkNodeStatus(v1.ConditionFalse, "KubeletNotReady") - - // Should report kubelet ready if the runtime check is updated - clock.SetTime(time.Now()) - kubelet.updateRuntimeUp() - checkNodeStatus(v1.ConditionTrue, "KubeletReady") - - // Should report kubelet not ready if the runtime check is out of date - clock.SetTime(time.Now().Add(-maxWaitForContainerRuntime)) - kubelet.updateRuntimeUp() - checkNodeStatus(v1.ConditionFalse, "KubeletNotReady") - - // Should report kubelet not ready if the runtime check failed - fakeRuntime := testKubelet.fakeRuntime - // Inject error into fake runtime status check, node should be NotReady - fakeRuntime.StatusErr = fmt.Errorf("injected runtime status error") - clock.SetTime(time.Now()) - kubelet.updateRuntimeUp() - checkNodeStatus(v1.ConditionFalse, "KubeletNotReady") - - fakeRuntime.StatusErr = nil - - // Should report node not ready if runtime status is nil. - fakeRuntime.RuntimeStatus = nil - kubelet.updateRuntimeUp() - checkNodeStatus(v1.ConditionFalse, "KubeletNotReady") - - // Should report node not ready if runtime status is empty. - fakeRuntime.RuntimeStatus = &kubecontainer.RuntimeStatus{} - kubelet.updateRuntimeUp() - checkNodeStatus(v1.ConditionFalse, "KubeletNotReady") - - // Should report node not ready if RuntimeReady is false. - fakeRuntime.RuntimeStatus = &kubecontainer.RuntimeStatus{ - Conditions: []kubecontainer.RuntimeCondition{ - {Type: kubecontainer.RuntimeReady, Status: false}, - {Type: kubecontainer.NetworkReady, Status: true}, - }, - } - kubelet.updateRuntimeUp() - checkNodeStatus(v1.ConditionFalse, "KubeletNotReady") - - // Should report node ready if RuntimeReady is true. - fakeRuntime.RuntimeStatus = &kubecontainer.RuntimeStatus{ - Conditions: []kubecontainer.RuntimeCondition{ - {Type: kubecontainer.RuntimeReady, Status: true}, - {Type: kubecontainer.NetworkReady, Status: true}, - }, - } - kubelet.updateRuntimeUp() - checkNodeStatus(v1.ConditionTrue, "KubeletReady") - - // Should report node not ready if NetworkReady is false. - fakeRuntime.RuntimeStatus = &kubecontainer.RuntimeStatus{ - Conditions: []kubecontainer.RuntimeCondition{ - {Type: kubecontainer.RuntimeReady, Status: true}, - {Type: kubecontainer.NetworkReady, Status: false}, - }, - } - kubelet.updateRuntimeUp() - checkNodeStatus(v1.ConditionFalse, "KubeletNotReady") -} - -func TestUpdateNodeStatusError(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - kubelet.kubeClient = nil // ensure only the heartbeat client is used - // No matching node for the kubelet - testKubelet.fakeKubeClient.ReactionChain = fake.NewSimpleClientset(&v1.NodeList{Items: []v1.Node{}}).ReactionChain - assert.Error(t, kubelet.updateNodeStatus()) - assert.Len(t, testKubelet.fakeKubeClient.Actions(), nodeStatusUpdateRetry) -} - -func TestRegisterWithApiServer(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - kubeClient := testKubelet.fakeKubeClient - kubeClient.AddReactor("create", "nodes", func(action core.Action) (bool, runtime.Object, error) { - // Return an error on create. - return true, &v1.Node{}, &apierrors.StatusError{ - ErrStatus: metav1.Status{Reason: metav1.StatusReasonAlreadyExists}, - } - }) - kubeClient.AddReactor("get", "nodes", func(action core.Action) (bool, runtime.Object, error) { - // Return an existing (matching) node on get. - return true, &v1.Node{ - ObjectMeta: metav1.ObjectMeta{ - Name: testKubeletHostname, - Labels: map[string]string{ - kubeletapis.LabelHostname: testKubeletHostname, - kubeletapis.LabelOS: goruntime.GOOS, - kubeletapis.LabelArch: goruntime.GOARCH, - }, - }, - }, nil - }) - kubeClient.AddReactor("*", "*", func(action core.Action) (bool, runtime.Object, error) { - return true, nil, fmt.Errorf("no reaction implemented for %s", action) - }) - machineInfo := &cadvisorapi.MachineInfo{ - MachineID: "123", - SystemUUID: "abc", - BootID: "1b3", - NumCores: 2, - MemoryCapacity: 1024, - } - mockCadvisor := testKubelet.fakeCadvisor - mockCadvisor.On("MachineInfo").Return(machineInfo, nil) - versionInfo := &cadvisorapi.VersionInfo{ - KernelVersion: "3.16.0-0.bpo.4-amd64", - ContainerOsVersion: "Debian GNU/Linux 7 (wheezy)", - DockerVersion: "1.5.0", - } - mockCadvisor.On("VersionInfo").Return(versionInfo, nil) - mockCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{ - Usage: 400, - Capacity: 1000, - Available: 600, - }, nil) - mockCadvisor.On("RootFsInfo").Return(cadvisorapiv2.FsInfo{ - Usage: 9, - Capacity: 10, - }, nil) - kubelet.machineInfo = machineInfo - - done := make(chan struct{}) - go func() { - kubelet.registerWithAPIServer() - done <- struct{}{} - }() - select { - case <-time.After(wait.ForeverTestTimeout): - assert.Fail(t, "timed out waiting for registration") - case <-done: - return - } -} - -func TestTryRegisterWithApiServer(t *testing.T) { - alreadyExists := &apierrors.StatusError{ - ErrStatus: metav1.Status{Reason: metav1.StatusReasonAlreadyExists}, - } - - conflict := &apierrors.StatusError{ - ErrStatus: metav1.Status{Reason: metav1.StatusReasonConflict}, - } - - newNode := func(cmad bool) *v1.Node { - node := &v1.Node{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - kubeletapis.LabelHostname: testKubeletHostname, - kubeletapis.LabelOS: goruntime.GOOS, - kubeletapis.LabelArch: goruntime.GOARCH, - }, - }, - } - - if cmad { - node.Annotations = make(map[string]string) - node.Annotations[util.ControllerManagedAttachAnnotation] = "true" - } - - return node - } - - cases := []struct { - name string - newNode *v1.Node - existingNode *v1.Node - createError error - getError error - patchError error - deleteError error - expectedResult bool - expectedActions int - testSavedNode bool - savedNodeIndex int - savedNodeCMAD bool - }{ - { - name: "success case - new node", - newNode: &v1.Node{}, - expectedResult: true, - expectedActions: 1, - }, - { - name: "success case - existing node - no change in CMAD", - newNode: newNode(true), - createError: alreadyExists, - existingNode: newNode(true), - expectedResult: true, - expectedActions: 2, - }, - { - name: "success case - existing node - CMAD disabled", - newNode: newNode(false), - createError: alreadyExists, - existingNode: newNode(true), - expectedResult: true, - expectedActions: 3, - testSavedNode: true, - savedNodeIndex: 2, - savedNodeCMAD: false, - }, - { - name: "success case - existing node - CMAD enabled", - newNode: newNode(true), - createError: alreadyExists, - existingNode: newNode(false), - expectedResult: true, - expectedActions: 3, - testSavedNode: true, - savedNodeIndex: 2, - savedNodeCMAD: true, - }, - { - name: "create failed", - newNode: newNode(false), - createError: conflict, - expectedResult: false, - expectedActions: 1, - }, - { - name: "get existing node failed", - newNode: newNode(false), - createError: alreadyExists, - getError: conflict, - expectedResult: false, - expectedActions: 2, - }, - { - name: "update existing node failed", - newNode: newNode(false), - createError: alreadyExists, - existingNode: newNode(true), - patchError: conflict, - expectedResult: false, - expectedActions: 3, - }, - } - - notImplemented := func(action core.Action) (bool, runtime.Object, error) { - return true, nil, fmt.Errorf("no reaction implemented for %s", action) - } - - for _, tc := range cases { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled is a don't-care for this test */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - kubeClient := testKubelet.fakeKubeClient - - kubeClient.AddReactor("create", "nodes", func(action core.Action) (bool, runtime.Object, error) { - return true, nil, tc.createError - }) - kubeClient.AddReactor("get", "nodes", func(action core.Action) (bool, runtime.Object, error) { - // Return an existing (matching) node on get. - return true, tc.existingNode, tc.getError - }) - kubeClient.AddReactor("patch", "nodes", func(action core.Action) (bool, runtime.Object, error) { - if action.GetSubresource() == "status" { - return true, nil, tc.patchError - } - return notImplemented(action) - }) - kubeClient.AddReactor("delete", "nodes", func(action core.Action) (bool, runtime.Object, error) { - return true, nil, tc.deleteError - }) - kubeClient.AddReactor("*", "*", func(action core.Action) (bool, runtime.Object, error) { - return notImplemented(action) - }) - - result := kubelet.tryRegisterWithAPIServer(tc.newNode) - require.Equal(t, tc.expectedResult, result, "test [%s]", tc.name) - - actions := kubeClient.Actions() - assert.Len(t, actions, tc.expectedActions, "test [%s]", tc.name) - - if tc.testSavedNode { - var savedNode *v1.Node - - t.Logf("actions: %v: %+v", len(actions), actions) - action := actions[tc.savedNodeIndex] - if action.GetVerb() == "create" { - createAction := action.(core.CreateAction) - obj := createAction.GetObject() - require.IsType(t, &v1.Node{}, obj) - savedNode = obj.(*v1.Node) - } else if action.GetVerb() == "patch" { - patchAction := action.(core.PatchActionImpl) - var err error - savedNode, err = applyNodeStatusPatch(tc.existingNode, patchAction.GetPatch()) - require.NoError(t, err) - } - - actualCMAD, _ := strconv.ParseBool(savedNode.Annotations[util.ControllerManagedAttachAnnotation]) - assert.Equal(t, tc.savedNodeCMAD, actualCMAD, "test [%s]", tc.name) - } - } -} - -func TestUpdateNewNodeStatusTooLargeReservation(t *testing.T) { - const nodeStatusMaxImages = 5 - - // generate one more in inputImageList than we configure the Kubelet to report - inputImageList, _ := generateTestingImageLists(nodeStatusMaxImages+1, nodeStatusMaxImages) - testKubelet := newTestKubeletWithImageList( - t, inputImageList, false /* controllerAttachDetachEnabled */, true /* initFakeVolumePlugin */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - kubelet.nodeStatusMaxImages = nodeStatusMaxImages - kubelet.kubeClient = nil // ensure only the heartbeat client is used - kubelet.containerManager = &localCM{ - ContainerManager: cm.NewStubContainerManager(), - allocatableReservation: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(40000, resource.DecimalSI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(1000, resource.BinarySI), - }, - capacity: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(3000, resource.BinarySI), - }, - } - kubeClient := testKubelet.fakeKubeClient - existingNode := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}} - kubeClient.ReactionChain = fake.NewSimpleClientset(&v1.NodeList{Items: []v1.Node{existingNode}}).ReactionChain - machineInfo := &cadvisorapi.MachineInfo{ - MachineID: "123", - SystemUUID: "abc", - BootID: "1b3", - NumCores: 2, - MemoryCapacity: 10E9, // 10G - } - mockCadvisor := testKubelet.fakeCadvisor - mockCadvisor.On("Start").Return(nil) - mockCadvisor.On("MachineInfo").Return(machineInfo, nil) - versionInfo := &cadvisorapi.VersionInfo{ - KernelVersion: "3.16.0-0.bpo.4-amd64", - ContainerOsVersion: "Debian GNU/Linux 7 (wheezy)", - } - mockCadvisor.On("VersionInfo").Return(versionInfo, nil) - maxAge := 0 * time.Second - options := cadvisorapiv2.RequestOptions{IdType: cadvisorapiv2.TypeName, Count: 2, Recursive: false, MaxAge: &maxAge} - mockCadvisor.On("ContainerInfoV2", "/", options).Return(map[string]cadvisorapiv2.ContainerInfo{}, nil) - mockCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{ - Usage: 400, - Capacity: 3000, - Available: 600, - }, nil) - mockCadvisor.On("RootFsInfo").Return(cadvisorapiv2.FsInfo{ - Usage: 400, - Capacity: 3000, - Available: 600, - }, nil) - kubelet.machineInfo = machineInfo - - expectedNode := &v1.Node{ - ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, - Spec: v1.NodeSpec{}, - Status: v1.NodeStatus{ - Capacity: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), - v1.ResourcePods: *resource.NewQuantity(0, resource.DecimalSI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(3000, resource.BinarySI), - }, - Allocatable: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(0, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), - v1.ResourcePods: *resource.NewQuantity(0, resource.DecimalSI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(2000, resource.BinarySI), - }, - }, - } - - kubelet.updateRuntimeUp() - assert.NoError(t, kubelet.updateNodeStatus()) - actions := kubeClient.Actions() - require.Len(t, actions, 2) - require.True(t, actions[1].Matches("patch", "nodes")) - require.Equal(t, actions[1].GetSubresource(), "status") - - updatedNode, err := applyNodeStatusPatch(&existingNode, actions[1].(core.PatchActionImpl).GetPatch()) - assert.NoError(t, err) - assert.True(t, apiequality.Semantic.DeepEqual(expectedNode.Status.Allocatable, updatedNode.Status.Allocatable), "%s", diff.ObjectDiff(expectedNode.Status.Allocatable, updatedNode.Status.Allocatable)) -} - -func TestUpdateDefaultLabels(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - testKubelet.kubelet.kubeClient = nil // ensure only the heartbeat client is used - - cases := []struct { - name string - initialNode *v1.Node - existingNode *v1.Node - needsUpdate bool - finalLabels map[string]string - }{ - { - name: "make sure default labels exist", - initialNode: &v1.Node{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - kubeletapis.LabelHostname: "new-hostname", - kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", - kubeletapis.LabelZoneRegion: "new-zone-region", - kubeletapis.LabelInstanceType: "new-instance-type", - kubeletapis.LabelOS: "new-os", - kubeletapis.LabelArch: "new-arch", - }, - }, - }, - existingNode: &v1.Node{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{}, - }, - }, - needsUpdate: true, - finalLabels: map[string]string{ - kubeletapis.LabelHostname: "new-hostname", - kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", - kubeletapis.LabelZoneRegion: "new-zone-region", - kubeletapis.LabelInstanceType: "new-instance-type", - kubeletapis.LabelOS: "new-os", - kubeletapis.LabelArch: "new-arch", - }, - }, - { - name: "make sure default labels are up to date", - initialNode: &v1.Node{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - kubeletapis.LabelHostname: "new-hostname", - kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", - kubeletapis.LabelZoneRegion: "new-zone-region", - kubeletapis.LabelInstanceType: "new-instance-type", - kubeletapis.LabelOS: "new-os", - kubeletapis.LabelArch: "new-arch", - }, - }, - }, - existingNode: &v1.Node{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - kubeletapis.LabelHostname: "old-hostname", - kubeletapis.LabelZoneFailureDomain: "old-zone-failure-domain", - kubeletapis.LabelZoneRegion: "old-zone-region", - kubeletapis.LabelInstanceType: "old-instance-type", - kubeletapis.LabelOS: "old-os", - kubeletapis.LabelArch: "old-arch", - }, - }, - }, - needsUpdate: true, - finalLabels: map[string]string{ - kubeletapis.LabelHostname: "new-hostname", - kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", - kubeletapis.LabelZoneRegion: "new-zone-region", - kubeletapis.LabelInstanceType: "new-instance-type", - kubeletapis.LabelOS: "new-os", - kubeletapis.LabelArch: "new-arch", - }, - }, - { - name: "make sure existing labels do not get deleted", - initialNode: &v1.Node{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - kubeletapis.LabelHostname: "new-hostname", - kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", - kubeletapis.LabelZoneRegion: "new-zone-region", - kubeletapis.LabelInstanceType: "new-instance-type", - kubeletapis.LabelOS: "new-os", - kubeletapis.LabelArch: "new-arch", - }, - }, - }, - existingNode: &v1.Node{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - kubeletapis.LabelHostname: "new-hostname", - kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", - kubeletapis.LabelZoneRegion: "new-zone-region", - kubeletapis.LabelInstanceType: "new-instance-type", - kubeletapis.LabelOS: "new-os", - kubeletapis.LabelArch: "new-arch", - "please-persist": "foo", - }, - }, - }, - needsUpdate: false, - finalLabels: map[string]string{ - kubeletapis.LabelHostname: "new-hostname", - kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", - kubeletapis.LabelZoneRegion: "new-zone-region", - kubeletapis.LabelInstanceType: "new-instance-type", - kubeletapis.LabelOS: "new-os", - kubeletapis.LabelArch: "new-arch", - "please-persist": "foo", - }, - }, - { - name: "make sure existing labels do not get deleted when initial node has no opinion", - initialNode: &v1.Node{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{}, - }, - }, - existingNode: &v1.Node{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - kubeletapis.LabelHostname: "new-hostname", - kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", - kubeletapis.LabelZoneRegion: "new-zone-region", - kubeletapis.LabelInstanceType: "new-instance-type", - kubeletapis.LabelOS: "new-os", - kubeletapis.LabelArch: "new-arch", - "please-persist": "foo", - }, - }, - }, - needsUpdate: false, - finalLabels: map[string]string{ - kubeletapis.LabelHostname: "new-hostname", - kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", - kubeletapis.LabelZoneRegion: "new-zone-region", - kubeletapis.LabelInstanceType: "new-instance-type", - kubeletapis.LabelOS: "new-os", - kubeletapis.LabelArch: "new-arch", - "please-persist": "foo", - }, - }, - { - name: "no update needed", - initialNode: &v1.Node{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - kubeletapis.LabelHostname: "new-hostname", - kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", - kubeletapis.LabelZoneRegion: "new-zone-region", - kubeletapis.LabelInstanceType: "new-instance-type", - kubeletapis.LabelOS: "new-os", - kubeletapis.LabelArch: "new-arch", - }, - }, - }, - existingNode: &v1.Node{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - kubeletapis.LabelHostname: "new-hostname", - kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", - kubeletapis.LabelZoneRegion: "new-zone-region", - kubeletapis.LabelInstanceType: "new-instance-type", - kubeletapis.LabelOS: "new-os", - kubeletapis.LabelArch: "new-arch", - }, - }, - }, - needsUpdate: false, - finalLabels: map[string]string{ - kubeletapis.LabelHostname: "new-hostname", - kubeletapis.LabelZoneFailureDomain: "new-zone-failure-domain", - kubeletapis.LabelZoneRegion: "new-zone-region", - kubeletapis.LabelInstanceType: "new-instance-type", - kubeletapis.LabelOS: "new-os", - kubeletapis.LabelArch: "new-arch", - }, - }, - } - - for _, tc := range cases { - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - - needsUpdate := kubelet.updateDefaultLabels(tc.initialNode, tc.existingNode) - assert.Equal(t, tc.needsUpdate, needsUpdate, tc.name) - assert.Equal(t, tc.finalLabels, tc.existingNode.Labels, tc.name) - } -} - -func TestReconcileExtendedResource(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - testKubelet.kubelet.kubeClient = nil // ensure only the heartbeat client is used - extendedResourceName1 := v1.ResourceName("test.com/resource1") - extendedResourceName2 := v1.ResourceName("test.com/resource2") - - cases := []struct { - name string - existingNode *v1.Node - expectedNode *v1.Node - needsUpdate bool - }{ - { - name: "no update needed without extended resource", - existingNode: &v1.Node{ - Status: v1.NodeStatus{ - Capacity: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(5000, resource.BinarySI), - }, - Allocatable: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(5000, resource.BinarySI), - }, - }, - }, - expectedNode: &v1.Node{ - Status: v1.NodeStatus{ - Capacity: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(5000, resource.BinarySI), - }, - Allocatable: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(5000, resource.BinarySI), - }, - }, - }, - needsUpdate: false, - }, - { - name: "extended resource capacity is zeroed", - existingNode: &v1.Node{ - Status: v1.NodeStatus{ - Capacity: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(5000, resource.BinarySI), - extendedResourceName1: *resource.NewQuantity(int64(2), resource.DecimalSI), - extendedResourceName2: *resource.NewQuantity(int64(10), resource.DecimalSI), - }, - Allocatable: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(5000, resource.BinarySI), - extendedResourceName1: *resource.NewQuantity(int64(2), resource.DecimalSI), - extendedResourceName2: *resource.NewQuantity(int64(10), resource.DecimalSI), - }, - }, - }, - expectedNode: &v1.Node{ - Status: v1.NodeStatus{ - Capacity: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(5000, resource.BinarySI), - extendedResourceName1: *resource.NewQuantity(int64(0), resource.DecimalSI), - extendedResourceName2: *resource.NewQuantity(int64(0), resource.DecimalSI), - }, - Allocatable: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(10E9, resource.BinarySI), - v1.ResourceEphemeralStorage: *resource.NewQuantity(5000, resource.BinarySI), - extendedResourceName1: *resource.NewQuantity(int64(0), resource.DecimalSI), - extendedResourceName2: *resource.NewQuantity(int64(0), resource.DecimalSI), - }, - }, - }, - needsUpdate: true, - }, - } - - for _, tc := range cases { - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - initialNode := &v1.Node{} - - needsUpdate := kubelet.reconcileExtendedResource(initialNode, tc.existingNode) - assert.Equal(t, tc.needsUpdate, needsUpdate, tc.name) - assert.Equal(t, tc.expectedNode, tc.existingNode, tc.name) - } - -} - -func TestValidateNodeIPParam(t *testing.T) { - type test struct { - nodeIP string - success bool - testName string - } - tests := []test{ - { - nodeIP: "", - success: false, - testName: "IP not set", - }, - { - nodeIP: "127.0.0.1", - success: false, - testName: "IPv4 loopback address", - }, - { - nodeIP: "::1", - success: false, - testName: "IPv6 loopback address", - }, - { - nodeIP: "224.0.0.1", - success: false, - testName: "multicast IPv4 address", - }, - { - nodeIP: "ff00::1", - success: false, - testName: "multicast IPv6 address", - }, - { - nodeIP: "169.254.0.1", - success: false, - testName: "IPv4 link-local unicast address", - }, - { - nodeIP: "fe80::0202:b3ff:fe1e:8329", - success: false, - testName: "IPv6 link-local unicast address", - }, - { - nodeIP: "0.0.0.0", - success: false, - testName: "Unspecified IPv4 address", - }, - { - nodeIP: "::", - success: false, - testName: "Unspecified IPv6 address", - }, - { - nodeIP: "1.2.3.4", - success: false, - testName: "IPv4 address that doesn't belong to host", - }, - } - addrs, err := net.InterfaceAddrs() - if err != nil { - assert.Error(t, err, fmt.Sprintf( - "Unable to obtain a list of the node's unicast interface addresses.")) - } - for _, addr := range addrs { - var ip net.IP - switch v := addr.(type) { - case *net.IPNet: - ip = v.IP - case *net.IPAddr: - ip = v.IP - } - if ip.IsLoopback() || ip.IsLinkLocalUnicast() { - break - } - successTest := test{ - nodeIP: ip.String(), - success: true, - testName: fmt.Sprintf("Success test case for address %s", ip.String()), - } - tests = append(tests, successTest) - } - for _, test := range tests { - err := validateNodeIP(net.ParseIP(test.nodeIP)) - if test.success { - assert.NoError(t, err, "test %s", test.testName) - } else { - assert.Error(t, err, fmt.Sprintf("test %s", test.testName)) - } - } -} - -func TestSetVolumeLimits(t *testing.T) { - testKubelet := newTestKubeletWithoutFakeVolumePlugin(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - kubelet.kubeClient = nil // ensure only the heartbeat client is used - kubelet.hostname = testKubeletHostname - - var testcases = []struct { - name string - cloudProviderName string - expectedVolumeKey string - expectedLimit int64 - }{ - { - name: "For default GCE cloudprovider", - cloudProviderName: "gce", - expectedVolumeKey: util.GCEVolumeLimitKey, - expectedLimit: 16, - }, - { - name: "For default AWS Cloudprovider", - cloudProviderName: "aws", - expectedVolumeKey: util.EBSVolumeLimitKey, - expectedLimit: 39, - }, - { - name: "for default Azure cloudprovider", - cloudProviderName: "azure", - expectedVolumeKey: util.AzureVolumeLimitKey, - expectedLimit: 16, - }, - { - name: "when no cloudprovider is present", - cloudProviderName: "", - expectedVolumeKey: util.AzureVolumeLimitKey, - expectedLimit: -1, - }, - } - for _, test := range testcases { - node := &v1.Node{ - ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname, Annotations: make(map[string]string)}, - Spec: v1.NodeSpec{}, - } - - if test.cloudProviderName != "" { - fakeCloud := &fakecloud.FakeCloud{ - Provider: test.cloudProviderName, - Err: nil, - } - kubelet.cloud = fakeCloud - kubelet.cloudproviderRequestParallelism = make(chan int, 1) - kubelet.cloudproviderRequestSync = make(chan int) - kubelet.cloudproviderRequestTimeout = 10 * time.Second - } else { - kubelet.cloud = nil - } - - kubelet.setVolumeLimits(node) - nodeLimits := []v1.ResourceList{} - nodeLimits = append(nodeLimits, node.Status.Allocatable) - nodeLimits = append(nodeLimits, node.Status.Capacity) - for _, volumeLimits := range nodeLimits { - if test.expectedLimit == -1 { - _, ok := volumeLimits[v1.ResourceName(test.expectedVolumeKey)] - if ok { - t.Errorf("Expected no volume limit found for %s", test.expectedVolumeKey) - } - } else { - fl, ok := volumeLimits[v1.ResourceName(test.expectedVolumeKey)] - - if !ok { - t.Errorf("Expected to found volume limit for %s found none", test.expectedVolumeKey) - } - foundLimit, _ := fl.AsInt64() - expectedValue := resource.NewQuantity(test.expectedLimit, resource.DecimalSI) - if expectedValue.Cmp(fl) != 0 { - t.Errorf("Expected volume limit for %s to be %v found %v", test.expectedVolumeKey, test.expectedLimit, foundLimit) - } - } - - } - - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods.go deleted file mode 100644 index 0e9ea868..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods.go +++ /dev/null @@ -1,1761 +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 kubelet - -import ( - "bytes" - "fmt" - "io" - "io/ioutil" - "net/http" - "net/url" - "os" - "path" - "path/filepath" - "runtime" - "sort" - "strings" - "sync" - - "github.com/golang/glog" - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/sets" - utilvalidation "k8s.io/apimachinery/pkg/util/validation" - utilfeature "k8s.io/apiserver/pkg/util/feature" - podutil "k8s.io/kubernetes/pkg/api/v1/pod" - "k8s.io/kubernetes/pkg/api/v1/resource" - podshelper "k8s.io/kubernetes/pkg/apis/core/pods" - v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" - v1qos "k8s.io/kubernetes/pkg/apis/core/v1/helper/qos" - "k8s.io/kubernetes/pkg/features" - "k8s.io/kubernetes/pkg/fieldpath" - runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" - "k8s.io/kubernetes/pkg/kubelet/cm" - kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - "k8s.io/kubernetes/pkg/kubelet/envvars" - "k8s.io/kubernetes/pkg/kubelet/eviction" - "k8s.io/kubernetes/pkg/kubelet/images" - "k8s.io/kubernetes/pkg/kubelet/server/portforward" - remotecommandserver "k8s.io/kubernetes/pkg/kubelet/server/remotecommand" - "k8s.io/kubernetes/pkg/kubelet/status" - kubetypes "k8s.io/kubernetes/pkg/kubelet/types" - "k8s.io/kubernetes/pkg/kubelet/util/format" - mountutil "k8s.io/kubernetes/pkg/util/mount" - volumeutil "k8s.io/kubernetes/pkg/volume/util" - "k8s.io/kubernetes/pkg/volume/util/volumepathhandler" - volumevalidation "k8s.io/kubernetes/pkg/volume/validation" - "k8s.io/kubernetes/third_party/forked/golang/expansion" -) - -const ( - managedHostsHeader = "# Kubernetes-managed hosts file.\n" - managedHostsHeaderWithHostNetwork = "# Kubernetes-managed hosts file (host network).\n" -) - -// Get a list of pods that have data directories. -func (kl *Kubelet) listPodsFromDisk() ([]types.UID, error) { - podInfos, err := ioutil.ReadDir(kl.getPodsDir()) - if err != nil { - return nil, err - } - pods := []types.UID{} - for i := range podInfos { - if podInfos[i].IsDir() { - pods = append(pods, types.UID(podInfos[i].Name())) - } - } - return pods, nil -} - -// GetActivePods returns non-terminal pods -func (kl *Kubelet) GetActivePods() []*v1.Pod { - allPods := kl.podManager.GetPods() - activePods := kl.filterOutTerminatedPods(allPods) - return activePods -} - -// makeBlockVolumes maps the raw block devices specified in the path of the container -// Experimental -func (kl *Kubelet) makeBlockVolumes(pod *v1.Pod, container *v1.Container, podVolumes kubecontainer.VolumeMap, blkutil volumepathhandler.BlockVolumePathHandler) ([]kubecontainer.DeviceInfo, error) { - var devices []kubecontainer.DeviceInfo - for _, device := range container.VolumeDevices { - // check path is absolute - if !filepath.IsAbs(device.DevicePath) { - return nil, fmt.Errorf("error DevicePath `%s` must be an absolute path", device.DevicePath) - } - vol, ok := podVolumes[device.Name] - if !ok || vol.BlockVolumeMapper == nil { - glog.Errorf("Block volume cannot be satisfied for container %q, because the volume is missing or the volume mapper is nil: %+v", container.Name, device) - return nil, fmt.Errorf("cannot find volume %q to pass into container %q", device.Name, container.Name) - } - // Get a symbolic link associated to a block device under pod device path - dirPath, volName := vol.BlockVolumeMapper.GetPodDeviceMapPath() - symlinkPath := path.Join(dirPath, volName) - if islinkExist, checkErr := blkutil.IsSymlinkExist(symlinkPath); checkErr != nil { - return nil, checkErr - } else if islinkExist { - // Check readOnly in PVCVolumeSource and set read only permission if it's true. - permission := "mrw" - if vol.ReadOnly { - permission = "r" - } - glog.V(4).Infof("Device will be attached to container %q. Path on host: %v", container.Name, symlinkPath) - devices = append(devices, kubecontainer.DeviceInfo{PathOnHost: symlinkPath, PathInContainer: device.DevicePath, Permissions: permission}) - } - } - - return devices, nil -} - -// makeMounts determines the mount points for the given container. -func makeMounts(pod *v1.Pod, podDir string, container *v1.Container, hostName, hostDomain, podIP string, podVolumes kubecontainer.VolumeMap, mounter mountutil.Interface, expandEnvs []kubecontainer.EnvVar) ([]kubecontainer.Mount, func(), error) { - - // Kubernetes only mounts on /etc/hosts if: - // - container is not an infrastructure (pause) container - // - container is not already mounting on /etc/hosts - // - OS is not Windows - // Kubernetes will not mount /etc/hosts if: - // - when the Pod sandbox is being created, its IP is still unknown. Hence, PodIP will not have been set. - mountEtcHostsFile := len(podIP) > 0 && runtime.GOOS != "windows" - glog.V(3).Infof("container: %v/%v/%v podIP: %q creating hosts mount: %v", pod.Namespace, pod.Name, container.Name, podIP, mountEtcHostsFile) - mounts := []kubecontainer.Mount{} - var cleanupAction func() = nil - for i, mount := range container.VolumeMounts { - // do not mount /etc/hosts if container is already mounting on the path - mountEtcHostsFile = mountEtcHostsFile && (mount.MountPath != etcHostsPath) - vol, ok := podVolumes[mount.Name] - if !ok || vol.Mounter == nil { - glog.Errorf("Mount cannot be satisfied for container %q, because the volume is missing or the volume mounter is nil: %+v", container.Name, mount) - return nil, cleanupAction, fmt.Errorf("cannot find volume %q to mount into container %q", mount.Name, container.Name) - } - - relabelVolume := false - // If the volume supports SELinux and it has not been - // relabeled already and it is not a read-only volume, - // relabel it and mark it as labeled - if vol.Mounter.GetAttributes().Managed && vol.Mounter.GetAttributes().SupportsSELinux && !vol.SELinuxLabeled { - vol.SELinuxLabeled = true - relabelVolume = true - } - hostPath, err := volumeutil.GetPath(vol.Mounter) - if err != nil { - return nil, cleanupAction, err - } - if mount.SubPath != "" { - if !utilfeature.DefaultFeatureGate.Enabled(features.VolumeSubpath) { - return nil, cleanupAction, fmt.Errorf("volume subpaths are disabled") - } - - // Expand subpath variables - if utilfeature.DefaultFeatureGate.Enabled(features.VolumeSubpathEnvExpansion) { - mount.SubPath = kubecontainer.ExpandContainerVolumeMounts(mount, expandEnvs) - } - - if filepath.IsAbs(mount.SubPath) { - return nil, cleanupAction, fmt.Errorf("error SubPath `%s` must not be an absolute path", mount.SubPath) - } - - err = volumevalidation.ValidatePathNoBacksteps(mount.SubPath) - if err != nil { - return nil, cleanupAction, fmt.Errorf("unable to provision SubPath `%s`: %v", mount.SubPath, err) - } - - volumePath := hostPath - hostPath = filepath.Join(volumePath, mount.SubPath) - - if subPathExists, err := mounter.ExistsPath(hostPath); err != nil { - glog.Errorf("Could not determine if subPath %s exists; will not attempt to change its permissions", hostPath) - } else if !subPathExists { - // Create the sub path now because if it's auto-created later when referenced, it may have an - // incorrect ownership and mode. For example, the sub path directory must have at least g+rwx - // when the pod specifies an fsGroup, and if the directory is not created here, Docker will - // later auto-create it with the incorrect mode 0750 - // Make extra care not to escape the volume! - perm, err := mounter.GetMode(volumePath) - if err != nil { - return nil, cleanupAction, err - } - if err := mounter.SafeMakeDir(mount.SubPath, volumePath, perm); err != nil { - // Don't pass detailed error back to the user because it could give information about host filesystem - glog.Errorf("failed to create subPath directory for volumeMount %q of container %q: %v", mount.Name, container.Name, err) - return nil, cleanupAction, fmt.Errorf("failed to create subPath directory for volumeMount %q of container %q", mount.Name, container.Name) - } - } - hostPath, cleanupAction, err = mounter.PrepareSafeSubpath(mountutil.Subpath{ - VolumeMountIndex: i, - Path: hostPath, - VolumeName: vol.InnerVolumeSpecName, - VolumePath: volumePath, - PodDir: podDir, - ContainerName: container.Name, - }) - if err != nil { - // Don't pass detailed error back to the user because it could give information about host filesystem - glog.Errorf("failed to prepare subPath for volumeMount %q of container %q: %v", mount.Name, container.Name, err) - return nil, cleanupAction, fmt.Errorf("failed to prepare subPath for volumeMount %q of container %q", mount.Name, container.Name) - } - } - - // Docker Volume Mounts fail on Windows if it is not of the form C:/ - containerPath := mount.MountPath - if runtime.GOOS == "windows" { - if (strings.HasPrefix(hostPath, "/") || strings.HasPrefix(hostPath, "\\")) && !strings.Contains(hostPath, ":") { - hostPath = "c:" + hostPath - } - } - if !filepath.IsAbs(containerPath) { - containerPath = volumeutil.MakeAbsolutePath(runtime.GOOS, containerPath) - } - - propagation, err := translateMountPropagation(mount.MountPropagation) - if err != nil { - return nil, cleanupAction, err - } - glog.V(5).Infof("Pod %q container %q mount %q has propagation %q", format.Pod(pod), container.Name, mount.Name, propagation) - - mustMountRO := vol.Mounter.GetAttributes().ReadOnly && utilfeature.DefaultFeatureGate.Enabled(features.ReadOnlyAPIDataVolumes) - - mounts = append(mounts, kubecontainer.Mount{ - Name: mount.Name, - ContainerPath: containerPath, - HostPath: hostPath, - ReadOnly: mount.ReadOnly || mustMountRO, - SELinuxRelabel: relabelVolume, - Propagation: propagation, - }) - } - if mountEtcHostsFile { - hostAliases := pod.Spec.HostAliases - hostsMount, err := makeHostsMount(podDir, podIP, hostName, hostDomain, hostAliases, pod.Spec.HostNetwork) - if err != nil { - return nil, cleanupAction, err - } - mounts = append(mounts, *hostsMount) - } - return mounts, cleanupAction, nil -} - -// translateMountPropagation transforms v1.MountPropagationMode to -// runtimeapi.MountPropagation. -func translateMountPropagation(mountMode *v1.MountPropagationMode) (runtimeapi.MountPropagation, error) { - if runtime.GOOS == "windows" { - // Windows containers doesn't support mount propagation, use private for it. - // Refer https://docs.docker.com/storage/bind-mounts/#configure-bind-propagation. - return runtimeapi.MountPropagation_PROPAGATION_PRIVATE, nil - } - - if !utilfeature.DefaultFeatureGate.Enabled(features.MountPropagation) { - // mount propagation is disabled, use private as in the old versions - return runtimeapi.MountPropagation_PROPAGATION_PRIVATE, nil - } - switch { - case mountMode == nil: - // PRIVATE is the default - return runtimeapi.MountPropagation_PROPAGATION_PRIVATE, nil - case *mountMode == v1.MountPropagationHostToContainer: - return runtimeapi.MountPropagation_PROPAGATION_HOST_TO_CONTAINER, nil - case *mountMode == v1.MountPropagationBidirectional: - return runtimeapi.MountPropagation_PROPAGATION_BIDIRECTIONAL, nil - case *mountMode == v1.MountPropagationNone: - return runtimeapi.MountPropagation_PROPAGATION_PRIVATE, nil - default: - return 0, fmt.Errorf("invalid MountPropagation mode: %q", mountMode) - } -} - -// makeHostsMount makes the mountpoint for the hosts file that the containers -// in a pod are injected with. -func makeHostsMount(podDir, podIP, hostName, hostDomainName string, hostAliases []v1.HostAlias, useHostNetwork bool) (*kubecontainer.Mount, error) { - hostsFilePath := path.Join(podDir, "etc-hosts") - if err := ensureHostsFile(hostsFilePath, podIP, hostName, hostDomainName, hostAliases, useHostNetwork); err != nil { - return nil, err - } - return &kubecontainer.Mount{ - Name: "k8s-managed-etc-hosts", - ContainerPath: etcHostsPath, - HostPath: hostsFilePath, - ReadOnly: false, - SELinuxRelabel: true, - }, nil -} - -// ensureHostsFile ensures that the given host file has an up-to-date ip, host -// name, and domain name. -func ensureHostsFile(fileName, hostIP, hostName, hostDomainName string, hostAliases []v1.HostAlias, useHostNetwork bool) error { - var hostsFileContent []byte - var err error - - if useHostNetwork { - // if Pod is using host network, read hosts file from the node's filesystem. - // `etcHostsPath` references the location of the hosts file on the node. - // `/etc/hosts` for *nix systems. - hostsFileContent, err = nodeHostsFileContent(etcHostsPath, hostAliases) - if err != nil { - return err - } - } else { - // if Pod is not using host network, create a managed hosts file with Pod IP and other information. - hostsFileContent = managedHostsFileContent(hostIP, hostName, hostDomainName, hostAliases) - } - - return ioutil.WriteFile(fileName, hostsFileContent, 0644) -} - -// nodeHostsFileContent reads the content of node's hosts file. -func nodeHostsFileContent(hostsFilePath string, hostAliases []v1.HostAlias) ([]byte, error) { - hostsFileContent, err := ioutil.ReadFile(hostsFilePath) - if err != nil { - return nil, err - } - var buffer bytes.Buffer - buffer.WriteString(managedHostsHeaderWithHostNetwork) - buffer.Write(hostsFileContent) - buffer.Write(hostsEntriesFromHostAliases(hostAliases)) - return buffer.Bytes(), nil -} - -// managedHostsFileContent generates the content of the managed etc hosts based on Pod IP and other -// information. -func managedHostsFileContent(hostIP, hostName, hostDomainName string, hostAliases []v1.HostAlias) []byte { - var buffer bytes.Buffer - buffer.WriteString(managedHostsHeader) - buffer.WriteString("127.0.0.1\tlocalhost\n") // ipv4 localhost - buffer.WriteString("::1\tlocalhost ip6-localhost ip6-loopback\n") // ipv6 localhost - buffer.WriteString("fe00::0\tip6-localnet\n") - buffer.WriteString("fe00::0\tip6-mcastprefix\n") - buffer.WriteString("fe00::1\tip6-allnodes\n") - buffer.WriteString("fe00::2\tip6-allrouters\n") - if len(hostDomainName) > 0 { - buffer.WriteString(fmt.Sprintf("%s\t%s.%s\t%s\n", hostIP, hostName, hostDomainName, hostName)) - } else { - buffer.WriteString(fmt.Sprintf("%s\t%s\n", hostIP, hostName)) - } - buffer.Write(hostsEntriesFromHostAliases(hostAliases)) - return buffer.Bytes() -} - -func hostsEntriesFromHostAliases(hostAliases []v1.HostAlias) []byte { - if len(hostAliases) == 0 { - return []byte{} - } - - var buffer bytes.Buffer - buffer.WriteString("\n") - buffer.WriteString("# Entries added by HostAliases.\n") - // write each IP/hostname pair as an entry into hosts file - for _, hostAlias := range hostAliases { - for _, hostname := range hostAlias.Hostnames { - buffer.WriteString(fmt.Sprintf("%s\t%s\n", hostAlias.IP, hostname)) - } - } - return buffer.Bytes() -} - -// truncatePodHostnameIfNeeded truncates the pod hostname if it's longer than 63 chars. -func truncatePodHostnameIfNeeded(podName, hostname string) (string, error) { - // Cap hostname at 63 chars (specification is 64bytes which is 63 chars and the null terminating char). - const hostnameMaxLen = 63 - if len(hostname) <= hostnameMaxLen { - return hostname, nil - } - truncated := hostname[:hostnameMaxLen] - glog.Errorf("hostname for pod:%q was longer than %d. Truncated hostname to :%q", podName, hostnameMaxLen, truncated) - // hostname should not end with '-' or '.' - truncated = strings.TrimRight(truncated, "-.") - if len(truncated) == 0 { - // This should never happen. - return "", fmt.Errorf("hostname for pod %q was invalid: %q", podName, hostname) - } - return truncated, nil -} - -// GeneratePodHostNameAndDomain creates a hostname and domain name for a pod, -// given that pod's spec and annotations or returns an error. -func (kl *Kubelet) GeneratePodHostNameAndDomain(pod *v1.Pod) (string, string, error) { - // TODO(vmarmol): Handle better. - clusterDomain := kl.dnsConfigurer.ClusterDomain - - hostname := pod.Name - if len(pod.Spec.Hostname) > 0 { - if msgs := utilvalidation.IsDNS1123Label(pod.Spec.Hostname); len(msgs) != 0 { - return "", "", fmt.Errorf("Pod Hostname %q is not a valid DNS label: %s", pod.Spec.Hostname, strings.Join(msgs, ";")) - } - hostname = pod.Spec.Hostname - } - - hostname, err := truncatePodHostnameIfNeeded(pod.Name, hostname) - if err != nil { - return "", "", err - } - - hostDomain := "" - if len(pod.Spec.Subdomain) > 0 { - if msgs := utilvalidation.IsDNS1123Label(pod.Spec.Subdomain); len(msgs) != 0 { - return "", "", fmt.Errorf("Pod Subdomain %q is not a valid DNS label: %s", pod.Spec.Subdomain, strings.Join(msgs, ";")) - } - hostDomain = fmt.Sprintf("%s.%s.svc.%s", pod.Spec.Subdomain, pod.Namespace, clusterDomain) - } - - return hostname, hostDomain, nil -} - -// GetPodCgroupParent gets pod cgroup parent from container manager. -func (kl *Kubelet) GetPodCgroupParent(pod *v1.Pod) string { - pcm := kl.containerManager.NewPodContainerManager() - _, cgroupParent := pcm.GetPodContainerName(pod) - return cgroupParent -} - -// GenerateRunContainerOptions generates the RunContainerOptions, which can be used by -// the container runtime to set parameters for launching a container. -func (kl *Kubelet) GenerateRunContainerOptions(pod *v1.Pod, container *v1.Container, podIP string) (*kubecontainer.RunContainerOptions, func(), error) { - opts, err := kl.containerManager.GetResources(pod, container) - if err != nil { - return nil, nil, err - } - - hostname, hostDomainName, err := kl.GeneratePodHostNameAndDomain(pod) - if err != nil { - return nil, nil, err - } - opts.Hostname = hostname - podName := volumeutil.GetUniquePodName(pod) - volumes := kl.volumeManager.GetMountedVolumesForPod(podName) - - opts.PortMappings = kubecontainer.MakePortMappings(container) - - // TODO: remove feature gate check after no longer needed - if utilfeature.DefaultFeatureGate.Enabled(features.BlockVolume) { - blkutil := volumepathhandler.NewBlockVolumePathHandler() - blkVolumes, err := kl.makeBlockVolumes(pod, container, volumes, blkutil) - if err != nil { - return nil, nil, err - } - opts.Devices = append(opts.Devices, blkVolumes...) - } - - envs, err := kl.makeEnvironmentVariables(pod, container, podIP) - if err != nil { - return nil, nil, err - } - opts.Envs = append(opts.Envs, envs...) - - mounts, cleanupAction, err := makeMounts(pod, kl.getPodDir(pod.UID), container, hostname, hostDomainName, podIP, volumes, kl.mounter, opts.Envs) - if err != nil { - return nil, cleanupAction, err - } - opts.Mounts = append(opts.Mounts, mounts...) - - // Disabling adding TerminationMessagePath on Windows as these files would be mounted as docker volume and - // Docker for Windows has a bug where only directories can be mounted - if len(container.TerminationMessagePath) != 0 && runtime.GOOS != "windows" { - p := kl.getPodContainerDir(pod.UID, container.Name) - if err := os.MkdirAll(p, 0750); err != nil { - glog.Errorf("Error on creating %q: %v", p, err) - } else { - opts.PodContainerDir = p - } - } - - // only do this check if the experimental behavior is enabled, otherwise allow it to default to false - if kl.experimentalHostUserNamespaceDefaulting { - opts.EnableHostUserNamespace = kl.enableHostUserNamespace(pod) - } - - return opts, cleanupAction, nil -} - -var masterServices = sets.NewString("kubernetes") - -// getServiceEnvVarMap makes a map[string]string of env vars for services a -// pod in namespace ns should see. -func (kl *Kubelet) getServiceEnvVarMap(ns string) (map[string]string, error) { - var ( - serviceMap = make(map[string]*v1.Service) - m = make(map[string]string) - ) - - // Get all service resources from the master (via a cache), - // and populate them into service environment variables. - if kl.serviceLister == nil { - // Kubelets without masters (e.g. plain GCE ContainerVM) don't set env vars. - return m, nil - } - services, err := kl.serviceLister.List(labels.Everything()) - if err != nil { - return m, fmt.Errorf("failed to list services when setting up env vars") - } - - // project the services in namespace ns onto the master services - for i := range services { - service := services[i] - // ignore services where ClusterIP is "None" or empty - if !v1helper.IsServiceIPSet(service) { - continue - } - serviceName := service.Name - - switch service.Namespace { - // for the case whether the master service namespace is the namespace the pod - // is in, the pod should receive all the services in the namespace. - // - // ordering of the case clauses below enforces this - case ns: - serviceMap[serviceName] = service - case kl.masterServiceNamespace: - if masterServices.Has(serviceName) { - if _, exists := serviceMap[serviceName]; !exists { - serviceMap[serviceName] = service - } - } - } - } - - mappedServices := []*v1.Service{} - for key := range serviceMap { - mappedServices = append(mappedServices, serviceMap[key]) - } - - for _, e := range envvars.FromServices(mappedServices) { - m[e.Name] = e.Value - } - return m, nil -} - -// Make the environment variables for a pod in the given namespace. -func (kl *Kubelet) makeEnvironmentVariables(pod *v1.Pod, container *v1.Container, podIP string) ([]kubecontainer.EnvVar, error) { - var result []kubecontainer.EnvVar - // Note: These are added to the docker Config, but are not included in the checksum computed - // by kubecontainer.HashContainer(...). That way, we can still determine whether an - // v1.Container is already running by its hash. (We don't want to restart a container just - // because some service changed.) - // - // Note that there is a race between Kubelet seeing the pod and kubelet seeing the service. - // To avoid this users can: (1) wait between starting a service and starting; or (2) detect - // missing service env var and exit and be restarted; or (3) use DNS instead of env vars - // and keep trying to resolve the DNS name of the service (recommended). - serviceEnv, err := kl.getServiceEnvVarMap(pod.Namespace) - if err != nil { - return result, err - } - - var ( - configMaps = make(map[string]*v1.ConfigMap) - secrets = make(map[string]*v1.Secret) - tmpEnv = make(map[string]string) - ) - - // Env will override EnvFrom variables. - // Process EnvFrom first then allow Env to replace existing values. - for _, envFrom := range container.EnvFrom { - switch { - case envFrom.ConfigMapRef != nil: - cm := envFrom.ConfigMapRef - name := cm.Name - configMap, ok := configMaps[name] - if !ok { - if kl.kubeClient == nil { - return result, fmt.Errorf("Couldn't get configMap %v/%v, no kubeClient defined", pod.Namespace, name) - } - optional := cm.Optional != nil && *cm.Optional - configMap, err = kl.configMapManager.GetConfigMap(pod.Namespace, name) - if err != nil { - if errors.IsNotFound(err) && optional { - // ignore error when marked optional - continue - } - return result, err - } - configMaps[name] = configMap - } - - invalidKeys := []string{} - for k, v := range configMap.Data { - if len(envFrom.Prefix) > 0 { - k = envFrom.Prefix + k - } - if errMsgs := utilvalidation.IsEnvVarName(k); len(errMsgs) != 0 { - invalidKeys = append(invalidKeys, k) - continue - } - tmpEnv[k] = v - } - if len(invalidKeys) > 0 { - sort.Strings(invalidKeys) - kl.recorder.Eventf(pod, v1.EventTypeWarning, "InvalidEnvironmentVariableNames", "Keys [%s] from the EnvFrom configMap %s/%s were skipped since they are considered invalid environment variable names.", strings.Join(invalidKeys, ", "), pod.Namespace, name) - } - case envFrom.SecretRef != nil: - s := envFrom.SecretRef - name := s.Name - secret, ok := secrets[name] - if !ok { - if kl.kubeClient == nil { - return result, fmt.Errorf("Couldn't get secret %v/%v, no kubeClient defined", pod.Namespace, name) - } - optional := s.Optional != nil && *s.Optional - secret, err = kl.secretManager.GetSecret(pod.Namespace, name) - if err != nil { - if errors.IsNotFound(err) && optional { - // ignore error when marked optional - continue - } - return result, err - } - secrets[name] = secret - } - - invalidKeys := []string{} - for k, v := range secret.Data { - if len(envFrom.Prefix) > 0 { - k = envFrom.Prefix + k - } - if errMsgs := utilvalidation.IsEnvVarName(k); len(errMsgs) != 0 { - invalidKeys = append(invalidKeys, k) - continue - } - tmpEnv[k] = string(v) - } - if len(invalidKeys) > 0 { - sort.Strings(invalidKeys) - kl.recorder.Eventf(pod, v1.EventTypeWarning, "InvalidEnvironmentVariableNames", "Keys [%s] from the EnvFrom secret %s/%s were skipped since they are considered invalid environment variable names.", strings.Join(invalidKeys, ", "), pod.Namespace, name) - } - } - } - - // Determine the final values of variables: - // - // 1. Determine the final value of each variable: - // a. If the variable's Value is set, expand the `$(var)` references to other - // variables in the .Value field; the sources of variables are the declared - // variables of the container and the service environment variables - // b. If a source is defined for an environment variable, resolve the source - // 2. Create the container's environment in the order variables are declared - // 3. Add remaining service environment vars - var ( - mappingFunc = expansion.MappingFuncFor(tmpEnv, serviceEnv) - ) - for _, envVar := range container.Env { - runtimeVal := envVar.Value - if runtimeVal != "" { - // Step 1a: expand variable references - runtimeVal = expansion.Expand(runtimeVal, mappingFunc) - } else if envVar.ValueFrom != nil { - // Step 1b: resolve alternate env var sources - switch { - case envVar.ValueFrom.FieldRef != nil: - runtimeVal, err = kl.podFieldSelectorRuntimeValue(envVar.ValueFrom.FieldRef, pod, podIP) - if err != nil { - return result, err - } - case envVar.ValueFrom.ResourceFieldRef != nil: - defaultedPod, defaultedContainer, err := kl.defaultPodLimitsForDownwardAPI(pod, container) - if err != nil { - return result, err - } - runtimeVal, err = containerResourceRuntimeValue(envVar.ValueFrom.ResourceFieldRef, defaultedPod, defaultedContainer) - if err != nil { - return result, err - } - case envVar.ValueFrom.ConfigMapKeyRef != nil: - cm := envVar.ValueFrom.ConfigMapKeyRef - name := cm.Name - key := cm.Key - optional := cm.Optional != nil && *cm.Optional - configMap, ok := configMaps[name] - if !ok { - if kl.kubeClient == nil { - return result, fmt.Errorf("Couldn't get configMap %v/%v, no kubeClient defined", pod.Namespace, name) - } - configMap, err = kl.configMapManager.GetConfigMap(pod.Namespace, name) - if err != nil { - if errors.IsNotFound(err) && optional { - // ignore error when marked optional - continue - } - return result, err - } - configMaps[name] = configMap - } - runtimeVal, ok = configMap.Data[key] - if !ok { - if optional { - continue - } - return result, fmt.Errorf("Couldn't find key %v in ConfigMap %v/%v", key, pod.Namespace, name) - } - case envVar.ValueFrom.SecretKeyRef != nil: - s := envVar.ValueFrom.SecretKeyRef - name := s.Name - key := s.Key - optional := s.Optional != nil && *s.Optional - secret, ok := secrets[name] - if !ok { - if kl.kubeClient == nil { - return result, fmt.Errorf("Couldn't get secret %v/%v, no kubeClient defined", pod.Namespace, name) - } - secret, err = kl.secretManager.GetSecret(pod.Namespace, name) - if err != nil { - if errors.IsNotFound(err) && optional { - // ignore error when marked optional - continue - } - return result, err - } - secrets[name] = secret - } - runtimeValBytes, ok := secret.Data[key] - if !ok { - if optional { - continue - } - return result, fmt.Errorf("Couldn't find key %v in Secret %v/%v", key, pod.Namespace, name) - } - runtimeVal = string(runtimeValBytes) - } - } - // Accesses apiserver+Pods. - // So, the master may set service env vars, or kubelet may. In case both are doing - // it, we delete the key from the kubelet-generated ones so we don't have duplicate - // env vars. - // TODO: remove this next line once all platforms use apiserver+Pods. - delete(serviceEnv, envVar.Name) - - tmpEnv[envVar.Name] = runtimeVal - } - - // Append the env vars - for k, v := range tmpEnv { - result = append(result, kubecontainer.EnvVar{Name: k, Value: v}) - } - - // Append remaining service env vars. - for k, v := range serviceEnv { - // Accesses apiserver+Pods. - // So, the master may set service env vars, or kubelet may. In case both are doing - // it, we skip the key from the kubelet-generated ones so we don't have duplicate - // env vars. - // TODO: remove this next line once all platforms use apiserver+Pods. - if _, present := tmpEnv[k]; !present { - result = append(result, kubecontainer.EnvVar{Name: k, Value: v}) - } - } - return result, nil -} - -// podFieldSelectorRuntimeValue returns the runtime value of the given -// selector for a pod. -func (kl *Kubelet) podFieldSelectorRuntimeValue(fs *v1.ObjectFieldSelector, pod *v1.Pod, podIP string) (string, error) { - internalFieldPath, _, err := podshelper.ConvertDownwardAPIFieldLabel(fs.APIVersion, fs.FieldPath, "") - if err != nil { - return "", err - } - switch internalFieldPath { - case "spec.nodeName": - return pod.Spec.NodeName, nil - case "spec.serviceAccountName": - return pod.Spec.ServiceAccountName, nil - case "status.hostIP": - hostIP, err := kl.getHostIPAnyWay() - if err != nil { - return "", err - } - return hostIP.String(), nil - case "status.podIP": - return podIP, nil - } - return fieldpath.ExtractFieldPathAsString(pod, internalFieldPath) -} - -// containerResourceRuntimeValue returns the value of the provided container resource -func containerResourceRuntimeValue(fs *v1.ResourceFieldSelector, pod *v1.Pod, container *v1.Container) (string, error) { - containerName := fs.ContainerName - if len(containerName) == 0 { - return resource.ExtractContainerResourceValue(fs, container) - } - return resource.ExtractResourceValueByContainerName(fs, pod, containerName) -} - -// One of the following arguments must be non-nil: runningPod, status. -// TODO: Modify containerRuntime.KillPod() to accept the right arguments. -func (kl *Kubelet) killPod(pod *v1.Pod, runningPod *kubecontainer.Pod, status *kubecontainer.PodStatus, gracePeriodOverride *int64) error { - var p kubecontainer.Pod - if runningPod != nil { - p = *runningPod - } else if status != nil { - p = kubecontainer.ConvertPodStatusToRunningPod(kl.getRuntime().Type(), status) - } else { - return fmt.Errorf("one of the two arguments must be non-nil: runningPod, status") - } - - // Call the container runtime KillPod method which stops all running containers of the pod - if err := kl.containerRuntime.KillPod(pod, p, gracePeriodOverride); err != nil { - return err - } - if err := kl.containerManager.UpdateQOSCgroups(); err != nil { - glog.V(2).Infof("Failed to update QoS cgroups while killing pod: %v", err) - } - return nil -} - -// makePodDataDirs creates the dirs for the pod datas. -func (kl *Kubelet) makePodDataDirs(pod *v1.Pod) error { - uid := pod.UID - if err := os.MkdirAll(kl.getPodDir(uid), 0750); err != nil && !os.IsExist(err) { - return err - } - if err := os.MkdirAll(kl.getPodVolumesDir(uid), 0750); err != nil && !os.IsExist(err) { - return err - } - if err := os.MkdirAll(kl.getPodPluginsDir(uid), 0750); err != nil && !os.IsExist(err) { - return err - } - return nil -} - -// getPullSecretsForPod inspects the Pod and retrieves the referenced pull -// secrets. -func (kl *Kubelet) getPullSecretsForPod(pod *v1.Pod) []v1.Secret { - pullSecrets := []v1.Secret{} - - for _, secretRef := range pod.Spec.ImagePullSecrets { - secret, err := kl.secretManager.GetSecret(pod.Namespace, secretRef.Name) - if err != nil { - glog.Warningf("Unable to retrieve pull secret %s/%s for %s/%s due to %v. The image pull may not succeed.", pod.Namespace, secretRef.Name, pod.Namespace, pod.Name, err) - continue - } - - pullSecrets = append(pullSecrets, *secret) - } - - return pullSecrets -} - -// podIsTerminated returns true if pod is in the terminated state ("Failed" or "Succeeded"). -func (kl *Kubelet) podIsTerminated(pod *v1.Pod) bool { - // Check the cached pod status which was set after the last sync. - status, ok := kl.statusManager.GetPodStatus(pod.UID) - if !ok { - // If there is no cached status, use the status from the - // apiserver. This is useful if kubelet has recently been - // restarted. - status = pod.Status - } - return status.Phase == v1.PodFailed || status.Phase == v1.PodSucceeded || (pod.DeletionTimestamp != nil && notRunning(status.ContainerStatuses)) -} - -// IsPodTerminated returns trus if the pod with the provided UID is in a terminated state ("Failed" or "Succeeded") -// or if the pod has been deleted or removed -func (kl *Kubelet) IsPodTerminated(uid types.UID) bool { - pod, podFound := kl.podManager.GetPodByUID(uid) - if !podFound { - return true - } - return kl.podIsTerminated(pod) -} - -// IsPodDeleted returns true if the pod is deleted. For the pod to be deleted, either: -// 1. The pod object is deleted -// 2. The pod's status is evicted -// 3. The pod's deletion timestamp is set, and containers are not running -func (kl *Kubelet) IsPodDeleted(uid types.UID) bool { - pod, podFound := kl.podManager.GetPodByUID(uid) - if !podFound { - return true - } - status, statusFound := kl.statusManager.GetPodStatus(pod.UID) - if !statusFound { - status = pod.Status - } - return eviction.PodIsEvicted(status) || (pod.DeletionTimestamp != nil && notRunning(status.ContainerStatuses)) -} - -// PodResourcesAreReclaimed returns true if all required node-level resources that a pod was consuming have -// been reclaimed by the kubelet. Reclaiming resources is a prerequisite to deleting a pod from the API server. -func (kl *Kubelet) PodResourcesAreReclaimed(pod *v1.Pod, status v1.PodStatus) bool { - if !notRunning(status.ContainerStatuses) { - // We shouldnt delete pods that still have running containers - glog.V(3).Infof("Pod %q is terminated, but some containers are still running", format.Pod(pod)) - return false - } - // pod's containers should be deleted - runtimeStatus, err := kl.podCache.Get(pod.UID) - if err != nil { - glog.V(3).Infof("Pod %q is terminated, Error getting runtimeStatus from the podCache: %s", format.Pod(pod), err) - return false - } - if len(runtimeStatus.ContainerStatuses) > 0 { - var statusStr string - for _, status := range runtimeStatus.ContainerStatuses { - statusStr += fmt.Sprintf("%+v ", *status) - } - glog.V(3).Infof("Pod %q is terminated, but some containers have not been cleaned up: %s", format.Pod(pod), statusStr) - return false - } - if kl.podVolumesExist(pod.UID) && !kl.keepTerminatedPodVolumes { - // We shouldnt delete pods whose volumes have not been cleaned up if we are not keeping terminated pod volumes - glog.V(3).Infof("Pod %q is terminated, but some volumes have not been cleaned up", format.Pod(pod)) - return false - } - if kl.kubeletConfiguration.CgroupsPerQOS { - pcm := kl.containerManager.NewPodContainerManager() - if pcm.Exists(pod) { - glog.V(3).Infof("Pod %q is terminated, but pod cgroup sandbox has not been cleaned up", format.Pod(pod)) - return false - } - } - return true -} - -// podResourcesAreReclaimed simply calls PodResourcesAreReclaimed with the most up-to-date status. -func (kl *Kubelet) podResourcesAreReclaimed(pod *v1.Pod) bool { - status, ok := kl.statusManager.GetPodStatus(pod.UID) - if !ok { - status = pod.Status - } - return kl.PodResourcesAreReclaimed(pod, status) -} - -// notRunning returns true if every status is terminated or waiting, or the status list -// is empty. -func notRunning(statuses []v1.ContainerStatus) bool { - for _, status := range statuses { - if status.State.Terminated == nil && status.State.Waiting == nil { - return false - } - } - return true -} - -// filterOutTerminatedPods returns the given pods which the status manager -// does not consider failed or succeeded. -func (kl *Kubelet) filterOutTerminatedPods(pods []*v1.Pod) []*v1.Pod { - var filteredPods []*v1.Pod - for _, p := range pods { - if kl.podIsTerminated(p) { - continue - } - filteredPods = append(filteredPods, p) - } - return filteredPods -} - -// removeOrphanedPodStatuses removes obsolete entries in podStatus where -// the pod is no longer considered bound to this node. -func (kl *Kubelet) removeOrphanedPodStatuses(pods []*v1.Pod, mirrorPods []*v1.Pod) { - podUIDs := make(map[types.UID]bool) - for _, pod := range pods { - podUIDs[pod.UID] = true - } - for _, pod := range mirrorPods { - podUIDs[pod.UID] = true - } - kl.statusManager.RemoveOrphanedStatuses(podUIDs) -} - -// HandlePodCleanups performs a series of cleanup work, including terminating -// pod workers, killing unwanted pods, and removing orphaned volumes/pod -// directories. -// NOTE: This function is executed by the main sync loop, so it -// should not contain any blocking calls. -func (kl *Kubelet) HandlePodCleanups() error { - // The kubelet lacks checkpointing, so we need to introspect the set of pods - // in the cgroup tree prior to inspecting the set of pods in our pod manager. - // this ensures our view of the cgroup tree does not mistakenly observe pods - // that are added after the fact... - var ( - cgroupPods map[types.UID]cm.CgroupName - err error - ) - if kl.cgroupsPerQOS { - pcm := kl.containerManager.NewPodContainerManager() - cgroupPods, err = pcm.GetAllPodsFromCgroups() - if err != nil { - return fmt.Errorf("failed to get list of pods that still exist on cgroup mounts: %v", err) - } - } - - allPods, mirrorPods := kl.podManager.GetPodsAndMirrorPods() - // Pod phase progresses monotonically. Once a pod has reached a final state, - // it should never leave regardless of the restart policy. The statuses - // of such pods should not be changed, and there is no need to sync them. - // TODO: the logic here does not handle two cases: - // 1. If the containers were removed immediately after they died, kubelet - // may fail to generate correct statuses, let alone filtering correctly. - // 2. If kubelet restarted before writing the terminated status for a pod - // to the apiserver, it could still restart the terminated pod (even - // though the pod was not considered terminated by the apiserver). - // These two conditions could be alleviated by checkpointing kubelet. - activePods := kl.filterOutTerminatedPods(allPods) - - desiredPods := make(map[types.UID]empty) - for _, pod := range activePods { - desiredPods[pod.UID] = empty{} - } - // Stop the workers for no-longer existing pods. - // TODO: is here the best place to forget pod workers? - kl.podWorkers.ForgetNonExistingPodWorkers(desiredPods) - kl.probeManager.CleanupPods(activePods) - - runningPods, err := kl.runtimeCache.GetPods() - if err != nil { - glog.Errorf("Error listing containers: %#v", err) - return err - } - for _, pod := range runningPods { - if _, found := desiredPods[pod.ID]; !found { - kl.podKillingCh <- &kubecontainer.PodPair{APIPod: nil, RunningPod: pod} - } - } - - kl.removeOrphanedPodStatuses(allPods, mirrorPods) - // Note that we just killed the unwanted pods. This may not have reflected - // in the cache. We need to bypass the cache to get the latest set of - // running pods to clean up the volumes. - // TODO: Evaluate the performance impact of bypassing the runtime cache. - runningPods, err = kl.containerRuntime.GetPods(false) - if err != nil { - glog.Errorf("Error listing containers: %#v", err) - return err - } - - // Remove any orphaned volumes. - // Note that we pass all pods (including terminated pods) to the function, - // so that we don't remove volumes associated with terminated but not yet - // deleted pods. - err = kl.cleanupOrphanedPodDirs(allPods, runningPods) - if err != nil { - // We want all cleanup tasks to be run even if one of them failed. So - // we just log an error here and continue other cleanup tasks. - // This also applies to the other clean up tasks. - glog.Errorf("Failed cleaning up orphaned pod directories: %v", err) - } - - // Remove any orphaned mirror pods. - kl.podManager.DeleteOrphanedMirrorPods() - - // Remove any cgroups in the hierarchy for pods that are no longer running. - if kl.cgroupsPerQOS { - kl.cleanupOrphanedPodCgroups(cgroupPods, activePods) - } - - kl.backOff.GC() - return nil -} - -// podKiller launches a goroutine to kill a pod received from the channel if -// another goroutine isn't already in action. -func (kl *Kubelet) podKiller() { - killing := sets.NewString() - // guard for the killing set - lock := sync.Mutex{} - for podPair := range kl.podKillingCh { - runningPod := podPair.RunningPod - apiPod := podPair.APIPod - - lock.Lock() - exists := killing.Has(string(runningPod.ID)) - if !exists { - killing.Insert(string(runningPod.ID)) - } - lock.Unlock() - - if !exists { - go func(apiPod *v1.Pod, runningPod *kubecontainer.Pod) { - glog.V(2).Infof("Killing unwanted pod %q", runningPod.Name) - err := kl.killPod(apiPod, runningPod, nil, nil) - if err != nil { - glog.Errorf("Failed killing the pod %q: %v", runningPod.Name, err) - } - lock.Lock() - killing.Delete(string(runningPod.ID)) - lock.Unlock() - }(apiPod, runningPod) - } - } -} - -// validateContainerLogStatus returns the container ID for the desired container to retrieve logs for, based on the state -// of the container. The previous flag will only return the logs for the last terminated container, otherwise, the current -// running container is preferred over a previous termination. If info about the container is not available then a specific -// error is returned to the end user. -func (kl *Kubelet) validateContainerLogStatus(podName string, podStatus *v1.PodStatus, containerName string, previous bool) (containerID kubecontainer.ContainerID, err error) { - var cID string - - cStatus, found := podutil.GetContainerStatus(podStatus.ContainerStatuses, containerName) - // if not found, check the init containers - if !found { - cStatus, found = podutil.GetContainerStatus(podStatus.InitContainerStatuses, containerName) - } - if !found { - return kubecontainer.ContainerID{}, fmt.Errorf("container %q in pod %q is not available", containerName, podName) - } - lastState := cStatus.LastTerminationState - waiting, running, terminated := cStatus.State.Waiting, cStatus.State.Running, cStatus.State.Terminated - - switch { - case previous: - if lastState.Terminated == nil || lastState.Terminated.ContainerID == "" { - return kubecontainer.ContainerID{}, fmt.Errorf("previous terminated container %q in pod %q not found", containerName, podName) - } - cID = lastState.Terminated.ContainerID - - case running != nil: - cID = cStatus.ContainerID - - case terminated != nil: - // in cases where the next container didn't start, terminated.ContainerID will be empty, so get logs from the lastState.Terminated. - if terminated.ContainerID == "" { - if lastState.Terminated != nil && lastState.Terminated.ContainerID != "" { - cID = lastState.Terminated.ContainerID - } else { - return kubecontainer.ContainerID{}, fmt.Errorf("container %q in pod %q is terminated", containerName, podName) - } - } else { - cID = terminated.ContainerID - } - - case lastState.Terminated != nil: - if lastState.Terminated.ContainerID == "" { - return kubecontainer.ContainerID{}, fmt.Errorf("container %q in pod %q is terminated", containerName, podName) - } - cID = lastState.Terminated.ContainerID - - case waiting != nil: - // output some info for the most common pending failures - switch reason := waiting.Reason; reason { - case images.ErrImagePull.Error(): - return kubecontainer.ContainerID{}, fmt.Errorf("container %q in pod %q is waiting to start: image can't be pulled", containerName, podName) - case images.ErrImagePullBackOff.Error(): - return kubecontainer.ContainerID{}, fmt.Errorf("container %q in pod %q is waiting to start: trying and failing to pull image", containerName, podName) - default: - return kubecontainer.ContainerID{}, fmt.Errorf("container %q in pod %q is waiting to start: %v", containerName, podName, reason) - } - default: - // unrecognized state - return kubecontainer.ContainerID{}, fmt.Errorf("container %q in pod %q is waiting to start - no logs yet", containerName, podName) - } - - return kubecontainer.ParseContainerID(cID), nil -} - -// GetKubeletContainerLogs returns logs from the container -// TODO: this method is returning logs of random container attempts, when it should be returning the most recent attempt -// or all of them. -func (kl *Kubelet) GetKubeletContainerLogs(podFullName, containerName string, logOptions *v1.PodLogOptions, stdout, stderr io.Writer) error { - // Pod workers periodically write status to statusManager. If status is not - // cached there, something is wrong (or kubelet just restarted and hasn't - // caught up yet). Just assume the pod is not ready yet. - name, namespace, err := kubecontainer.ParsePodFullName(podFullName) - if err != nil { - return fmt.Errorf("unable to parse pod full name %q: %v", podFullName, err) - } - - pod, ok := kl.GetPodByName(namespace, name) - if !ok { - return fmt.Errorf("pod %q cannot be found - no logs available", name) - } - - podUID := pod.UID - if mirrorPod, ok := kl.podManager.GetMirrorPodByPod(pod); ok { - podUID = mirrorPod.UID - } - podStatus, found := kl.statusManager.GetPodStatus(podUID) - if !found { - // If there is no cached status, use the status from the - // apiserver. This is useful if kubelet has recently been - // restarted. - podStatus = pod.Status - } - - // TODO: Consolidate the logic here with kuberuntime.GetContainerLogs, here we convert container name to containerID, - // but inside kuberuntime we convert container id back to container name and restart count. - // TODO: After separate container log lifecycle management, we should get log based on the existing log files - // instead of container status. - containerID, err := kl.validateContainerLogStatus(pod.Name, &podStatus, containerName, logOptions.Previous) - if err != nil { - return err - } - - // Do a zero-byte write to stdout before handing off to the container runtime. - // This ensures at least one Write call is made to the writer when copying starts, - // even if we then block waiting for log output from the container. - if _, err := stdout.Write([]byte{}); err != nil { - return err - } - - if kl.dockerLegacyService != nil { - // dockerLegacyService should only be non-nil when we actually need it, so - // inject it into the runtimeService. - // TODO(random-liu): Remove this hack after deprecating unsupported log driver. - return kl.dockerLegacyService.GetContainerLogs(pod, containerID, logOptions, stdout, stderr) - } - return kl.containerRuntime.GetContainerLogs(pod, containerID, logOptions, stdout, stderr) -} - -// getPhase returns the phase of a pod given its container info. -func getPhase(spec *v1.PodSpec, info []v1.ContainerStatus) v1.PodPhase { - initialized := 0 - pendingInitialization := 0 - failedInitialization := 0 - for _, container := range spec.InitContainers { - containerStatus, ok := podutil.GetContainerStatus(info, container.Name) - if !ok { - pendingInitialization++ - continue - } - - switch { - case containerStatus.State.Running != nil: - pendingInitialization++ - case containerStatus.State.Terminated != nil: - if containerStatus.State.Terminated.ExitCode == 0 { - initialized++ - } else { - failedInitialization++ - } - case containerStatus.State.Waiting != nil: - if containerStatus.LastTerminationState.Terminated != nil { - if containerStatus.LastTerminationState.Terminated.ExitCode == 0 { - initialized++ - } else { - failedInitialization++ - } - } else { - pendingInitialization++ - } - default: - pendingInitialization++ - } - } - - unknown := 0 - running := 0 - waiting := 0 - stopped := 0 - failed := 0 - succeeded := 0 - for _, container := range spec.Containers { - containerStatus, ok := podutil.GetContainerStatus(info, container.Name) - if !ok { - unknown++ - continue - } - - switch { - case containerStatus.State.Running != nil: - running++ - case containerStatus.State.Terminated != nil: - stopped++ - if containerStatus.State.Terminated.ExitCode == 0 { - succeeded++ - } else { - failed++ - } - case containerStatus.State.Waiting != nil: - if containerStatus.LastTerminationState.Terminated != nil { - stopped++ - } else { - waiting++ - } - default: - unknown++ - } - } - - if failedInitialization > 0 && spec.RestartPolicy == v1.RestartPolicyNever { - return v1.PodFailed - } - - switch { - case pendingInitialization > 0: - fallthrough - case waiting > 0: - glog.V(5).Infof("pod waiting > 0, pending") - // One or more containers has not been started - return v1.PodPending - case running > 0 && unknown == 0: - // All containers have been started, and at least - // one container is running - return v1.PodRunning - case running == 0 && stopped > 0 && unknown == 0: - // All containers are terminated - if spec.RestartPolicy == v1.RestartPolicyAlways { - // All containers are in the process of restarting - return v1.PodRunning - } - if stopped == succeeded { - // RestartPolicy is not Always, and all - // containers are terminated in success - return v1.PodSucceeded - } - if spec.RestartPolicy == v1.RestartPolicyNever { - // RestartPolicy is Never, and all containers are - // terminated with at least one in failure - return v1.PodFailed - } - // RestartPolicy is OnFailure, and at least one in failure - // and in the process of restarting - return v1.PodRunning - default: - glog.V(5).Infof("pod default case, pending") - return v1.PodPending - } -} - -// generateAPIPodStatus creates the final API pod status for a pod, given the -// internal pod status. -func (kl *Kubelet) generateAPIPodStatus(pod *v1.Pod, podStatus *kubecontainer.PodStatus) v1.PodStatus { - glog.V(3).Infof("Generating status for %q", format.Pod(pod)) - - // check if an internal module has requested the pod is evicted. - for _, podSyncHandler := range kl.PodSyncHandlers { - if result := podSyncHandler.ShouldEvict(pod); result.Evict { - return v1.PodStatus{ - Phase: v1.PodFailed, - Reason: result.Reason, - Message: result.Message, - } - } - } - - s := kl.convertStatusToAPIStatus(pod, podStatus) - - // Assume info is ready to process - spec := &pod.Spec - allStatus := append(append([]v1.ContainerStatus{}, s.ContainerStatuses...), s.InitContainerStatuses...) - s.Phase = getPhase(spec, allStatus) - // Check for illegal phase transition - if pod.Status.Phase == v1.PodFailed || pod.Status.Phase == v1.PodSucceeded { - // API server shows terminal phase; transitions are not allowed - if s.Phase != pod.Status.Phase { - glog.Errorf("Pod attempted illegal phase transition from %s to %s: %v", pod.Status.Phase, s.Phase, s) - // Force back to phase from the API server - s.Phase = pod.Status.Phase - } - } - kl.probeManager.UpdatePodStatus(pod.UID, s) - s.Conditions = append(s.Conditions, status.GeneratePodInitializedCondition(spec, s.InitContainerStatuses, s.Phase)) - s.Conditions = append(s.Conditions, status.GeneratePodReadyCondition(spec, s.Conditions, s.ContainerStatuses, s.Phase)) - s.Conditions = append(s.Conditions, status.GenerateContainersReadyCondition(spec, s.ContainerStatuses, s.Phase)) - // Status manager will take care of the LastTransitionTimestamp, either preserve - // the timestamp from apiserver, or set a new one. When kubelet sees the pod, - // `PodScheduled` condition must be true. - s.Conditions = append(s.Conditions, v1.PodCondition{ - Type: v1.PodScheduled, - Status: v1.ConditionTrue, - }) - - if kl.kubeClient != nil { - hostIP, err := kl.getHostIPAnyWay() - if err != nil { - glog.V(4).Infof("Cannot get host IP: %v", err) - } else { - s.HostIP = hostIP.String() - if kubecontainer.IsHostNetworkPod(pod) && s.PodIP == "" { - s.PodIP = hostIP.String() - } - } - } - - return *s -} - -// convertStatusToAPIStatus creates an api PodStatus for the given pod from -// the given internal pod status. It is purely transformative and does not -// alter the kubelet state at all. -func (kl *Kubelet) convertStatusToAPIStatus(pod *v1.Pod, podStatus *kubecontainer.PodStatus) *v1.PodStatus { - var apiPodStatus v1.PodStatus - apiPodStatus.PodIP = podStatus.IP - // set status for Pods created on versions of kube older than 1.6 - apiPodStatus.QOSClass = v1qos.GetPodQOS(pod) - - oldPodStatus, found := kl.statusManager.GetPodStatus(pod.UID) - if !found { - oldPodStatus = pod.Status - } - - apiPodStatus.ContainerStatuses = kl.convertToAPIContainerStatuses( - pod, podStatus, - oldPodStatus.ContainerStatuses, - pod.Spec.Containers, - len(pod.Spec.InitContainers) > 0, - false, - ) - apiPodStatus.InitContainerStatuses = kl.convertToAPIContainerStatuses( - pod, podStatus, - oldPodStatus.InitContainerStatuses, - pod.Spec.InitContainers, - len(pod.Spec.InitContainers) > 0, - true, - ) - - // Preserves conditions not controlled by kubelet - for _, c := range pod.Status.Conditions { - if !kubetypes.PodConditionByKubelet(c.Type) { - apiPodStatus.Conditions = append(apiPodStatus.Conditions, c) - } - } - return &apiPodStatus -} - -// convertToAPIContainerStatuses converts the given internal container -// statuses into API container statuses. -func (kl *Kubelet) convertToAPIContainerStatuses(pod *v1.Pod, podStatus *kubecontainer.PodStatus, previousStatus []v1.ContainerStatus, containers []v1.Container, hasInitContainers, isInitContainer bool) []v1.ContainerStatus { - convertContainerStatus := func(cs *kubecontainer.ContainerStatus) *v1.ContainerStatus { - cid := cs.ID.String() - status := &v1.ContainerStatus{ - Name: cs.Name, - RestartCount: int32(cs.RestartCount), - Image: cs.Image, - ImageID: cs.ImageID, - ContainerID: cid, - } - switch cs.State { - case kubecontainer.ContainerStateRunning: - status.State.Running = &v1.ContainerStateRunning{StartedAt: metav1.NewTime(cs.StartedAt)} - case kubecontainer.ContainerStateCreated: - // Treat containers in the "created" state as if they are exited. - // The pod workers are supposed start all containers it creates in - // one sync (syncPod) iteration. There should not be any normal - // "created" containers when the pod worker generates the status at - // the beginning of a sync iteration. - fallthrough - case kubecontainer.ContainerStateExited: - status.State.Terminated = &v1.ContainerStateTerminated{ - ExitCode: int32(cs.ExitCode), - Reason: cs.Reason, - Message: cs.Message, - StartedAt: metav1.NewTime(cs.StartedAt), - FinishedAt: metav1.NewTime(cs.FinishedAt), - ContainerID: cid, - } - default: - status.State.Waiting = &v1.ContainerStateWaiting{} - } - return status - } - - // Fetch old containers statuses from old pod status. - oldStatuses := make(map[string]v1.ContainerStatus, len(containers)) - for _, status := range previousStatus { - oldStatuses[status.Name] = status - } - - // Set all container statuses to default waiting state - statuses := make(map[string]*v1.ContainerStatus, len(containers)) - defaultWaitingState := v1.ContainerState{Waiting: &v1.ContainerStateWaiting{Reason: "ContainerCreating"}} - if hasInitContainers { - defaultWaitingState = v1.ContainerState{Waiting: &v1.ContainerStateWaiting{Reason: "PodInitializing"}} - } - - for _, container := range containers { - status := &v1.ContainerStatus{ - Name: container.Name, - Image: container.Image, - State: defaultWaitingState, - } - oldStatus, found := oldStatuses[container.Name] - if found { - if oldStatus.State.Terminated != nil { - // Do not update status on terminated init containers as - // they be removed at any time. - status = &oldStatus - } else { - // Apply some values from the old statuses as the default values. - status.RestartCount = oldStatus.RestartCount - status.LastTerminationState = oldStatus.LastTerminationState - } - } - statuses[container.Name] = status - } - - // Make the latest container status comes first. - sort.Sort(sort.Reverse(kubecontainer.SortContainerStatusesByCreationTime(podStatus.ContainerStatuses))) - // Set container statuses according to the statuses seen in pod status - containerSeen := map[string]int{} - for _, cStatus := range podStatus.ContainerStatuses { - cName := cStatus.Name - if _, ok := statuses[cName]; !ok { - // This would also ignore the infra container. - continue - } - if containerSeen[cName] >= 2 { - continue - } - status := convertContainerStatus(cStatus) - if containerSeen[cName] == 0 { - statuses[cName] = status - } else { - statuses[cName].LastTerminationState = status.State - } - containerSeen[cName] = containerSeen[cName] + 1 - } - - // Handle the containers failed to be started, which should be in Waiting state. - for _, container := range containers { - if isInitContainer { - // If the init container is terminated with exit code 0, it won't be restarted. - // TODO(random-liu): Handle this in a cleaner way. - s := podStatus.FindContainerStatusByName(container.Name) - if s != nil && s.State == kubecontainer.ContainerStateExited && s.ExitCode == 0 { - continue - } - } - // If a container should be restarted in next syncpod, it is *Waiting*. - if !kubecontainer.ShouldContainerBeRestarted(&container, pod, podStatus) { - continue - } - status := statuses[container.Name] - reason, ok := kl.reasonCache.Get(pod.UID, container.Name) - if !ok { - // In fact, we could also apply Waiting state here, but it is less informative, - // and the container will be restarted soon, so we prefer the original state here. - // Note that with the current implementation of ShouldContainerBeRestarted the original state here - // could be: - // * Waiting: There is no associated historical container and start failure reason record. - // * Terminated: The container is terminated. - continue - } - if status.State.Terminated != nil { - status.LastTerminationState = status.State - } - status.State = v1.ContainerState{ - Waiting: &v1.ContainerStateWaiting{ - Reason: reason.Err.Error(), - Message: reason.Message, - }, - } - statuses[container.Name] = status - } - - var containerStatuses []v1.ContainerStatus - for _, status := range statuses { - containerStatuses = append(containerStatuses, *status) - } - - // Sort the container statuses since clients of this interface expect the list - // of containers in a pod has a deterministic order. - if isInitContainer { - kubetypes.SortInitContainerStatuses(pod, containerStatuses) - } else { - sort.Sort(kubetypes.SortedContainerStatuses(containerStatuses)) - } - return containerStatuses -} - -// ServeLogs returns logs of current machine. -func (kl *Kubelet) ServeLogs(w http.ResponseWriter, req *http.Request) { - // TODO: whitelist logs we are willing to serve - kl.logServer.ServeHTTP(w, req) -} - -// findContainer finds and returns the container with the given pod ID, full name, and container name. -// It returns nil if not found. -func (kl *Kubelet) findContainer(podFullName string, podUID types.UID, containerName string) (*kubecontainer.Container, error) { - pods, err := kl.containerRuntime.GetPods(false) - if err != nil { - return nil, err - } - // Resolve and type convert back again. - // We need the static pod UID but the kubecontainer API works with types.UID. - podUID = types.UID(kl.podManager.TranslatePodUID(podUID)) - pod := kubecontainer.Pods(pods).FindPod(podFullName, podUID) - return pod.FindContainerByName(containerName), nil -} - -// RunInContainer runs a command in a container, returns the combined stdout, stderr as an array of bytes -func (kl *Kubelet) RunInContainer(podFullName string, podUID types.UID, containerName string, cmd []string) ([]byte, error) { - container, err := kl.findContainer(podFullName, podUID, containerName) - if err != nil { - return nil, err - } - if container == nil { - return nil, fmt.Errorf("container not found (%q)", containerName) - } - // TODO(tallclair): Pass a proper timeout value. - return kl.runner.RunInContainer(container.ID, cmd, 0) -} - -// GetExec gets the URL the exec will be served from, or nil if the Kubelet will serve it. -func (kl *Kubelet) GetExec(podFullName string, podUID types.UID, containerName string, cmd []string, streamOpts remotecommandserver.Options) (*url.URL, error) { - container, err := kl.findContainer(podFullName, podUID, containerName) - if err != nil { - return nil, err - } - if container == nil { - return nil, fmt.Errorf("container not found (%q)", containerName) - } - return kl.streamingRuntime.GetExec(container.ID, cmd, streamOpts.Stdin, streamOpts.Stdout, streamOpts.Stderr, streamOpts.TTY) -} - -// GetAttach gets the URL the attach will be served from, or nil if the Kubelet will serve it. -func (kl *Kubelet) GetAttach(podFullName string, podUID types.UID, containerName string, streamOpts remotecommandserver.Options) (*url.URL, error) { - container, err := kl.findContainer(podFullName, podUID, containerName) - if err != nil { - return nil, err - } - if container == nil { - return nil, fmt.Errorf("container %s not found in pod %s", containerName, podFullName) - } - - // The TTY setting for attach must match the TTY setting in the initial container configuration, - // since whether the process is running in a TTY cannot be changed after it has started. We - // need the api.Pod to get the TTY status. - pod, found := kl.GetPodByFullName(podFullName) - if !found || (string(podUID) != "" && pod.UID != podUID) { - return nil, fmt.Errorf("pod %s not found", podFullName) - } - containerSpec := kubecontainer.GetContainerSpec(pod, containerName) - if containerSpec == nil { - return nil, fmt.Errorf("container %s not found in pod %s", containerName, podFullName) - } - tty := containerSpec.TTY - - return kl.streamingRuntime.GetAttach(container.ID, streamOpts.Stdin, streamOpts.Stdout, streamOpts.Stderr, tty) -} - -// GetPortForward gets the URL the port-forward will be served from, or nil if the Kubelet will serve it. -func (kl *Kubelet) GetPortForward(podName, podNamespace string, podUID types.UID, portForwardOpts portforward.V4Options) (*url.URL, error) { - pods, err := kl.containerRuntime.GetPods(false) - if err != nil { - return nil, err - } - // Resolve and type convert back again. - // We need the static pod UID but the kubecontainer API works with types.UID. - podUID = types.UID(kl.podManager.TranslatePodUID(podUID)) - podFullName := kubecontainer.BuildPodFullName(podName, podNamespace) - pod := kubecontainer.Pods(pods).FindPod(podFullName, podUID) - if pod.IsEmpty() { - return nil, fmt.Errorf("pod not found (%q)", podFullName) - } - - return kl.streamingRuntime.GetPortForward(podName, podNamespace, podUID, portForwardOpts.Ports) -} - -// cleanupOrphanedPodCgroups removes cgroups that should no longer exist. -// it reconciles the cached state of cgroupPods with the specified list of runningPods -func (kl *Kubelet) cleanupOrphanedPodCgroups(cgroupPods map[types.UID]cm.CgroupName, activePods []*v1.Pod) { - // Add all running pods to the set that we want to preserve - podSet := sets.NewString() - for _, pod := range activePods { - podSet.Insert(string(pod.UID)) - } - pcm := kl.containerManager.NewPodContainerManager() - - // Iterate over all the found pods to verify if they should be running - for uid, val := range cgroupPods { - // if the pod is in the running set, its not a candidate for cleanup - if podSet.Has(string(uid)) { - continue - } - - // If volumes have not been unmounted/detached, do not delete the cgroup - // so any memory backed volumes don't have their charges propagated to the - // parent croup. If the volumes still exist, reduce the cpu shares for any - // process in the cgroup to the minimum value while we wait. if the kubelet - // is configured to keep terminated volumes, we will delete the cgroup and not block. - if podVolumesExist := kl.podVolumesExist(uid); podVolumesExist && !kl.keepTerminatedPodVolumes { - glog.V(3).Infof("Orphaned pod %q found, but volumes not yet removed. Reducing cpu to minimum", uid) - if err := pcm.ReduceCPULimits(val); err != nil { - glog.Warningf("Failed to reduce cpu time for pod %q pending volume cleanup due to %v", uid, err) - } - continue - } - glog.V(3).Infof("Orphaned pod %q found, removing pod cgroups", uid) - // Destroy all cgroups of pod that should not be running, - // by first killing all the attached processes to these cgroups. - // We ignore errors thrown by the method, as the housekeeping loop would - // again try to delete these unwanted pod cgroups - go pcm.Destroy(val) - } -} - -// enableHostUserNamespace determines if the host user namespace should be used by the container runtime. -// Returns true if the pod is using a host pid, pic, or network namespace, the pod is using a non-namespaced -// capability, the pod contains a privileged container, or the pod has a host path volume. -// -// NOTE: when if a container shares any namespace with another container it must also share the user namespace -// or it will not have the correct capabilities in the namespace. This means that host user namespace -// is enabled per pod, not per container. -func (kl *Kubelet) enableHostUserNamespace(pod *v1.Pod) bool { - if kubecontainer.HasPrivilegedContainer(pod) || hasHostNamespace(pod) || - hasHostVolume(pod) || hasNonNamespacedCapability(pod) || kl.hasHostMountPVC(pod) { - return true - } - return false -} - -// hasNonNamespacedCapability returns true if MKNOD, SYS_TIME, or SYS_MODULE is requested for any container. -func hasNonNamespacedCapability(pod *v1.Pod) bool { - for _, c := range pod.Spec.Containers { - if c.SecurityContext != nil && c.SecurityContext.Capabilities != nil { - for _, cap := range c.SecurityContext.Capabilities.Add { - if cap == "MKNOD" || cap == "SYS_TIME" || cap == "SYS_MODULE" { - return true - } - } - } - } - - return false -} - -// hasHostVolume returns true if the pod spec has a HostPath volume. -func hasHostVolume(pod *v1.Pod) bool { - for _, v := range pod.Spec.Volumes { - if v.HostPath != nil { - return true - } - } - return false -} - -// hasHostNamespace returns true if hostIPC, hostNetwork, or hostPID are set to true. -func hasHostNamespace(pod *v1.Pod) bool { - if pod.Spec.SecurityContext == nil { - return false - } - return pod.Spec.HostIPC || pod.Spec.HostNetwork || pod.Spec.HostPID -} - -// hasHostMountPVC returns true if a PVC is referencing a HostPath volume. -func (kl *Kubelet) hasHostMountPVC(pod *v1.Pod) bool { - for _, volume := range pod.Spec.Volumes { - if volume.PersistentVolumeClaim != nil { - pvc, err := kl.kubeClient.CoreV1().PersistentVolumeClaims(pod.Namespace).Get(volume.PersistentVolumeClaim.ClaimName, metav1.GetOptions{}) - if err != nil { - glog.Warningf("unable to retrieve pvc %s:%s - %v", pod.Namespace, volume.PersistentVolumeClaim.ClaimName, err) - continue - } - if pvc != nil { - referencedVolume, err := kl.kubeClient.CoreV1().PersistentVolumes().Get(pvc.Spec.VolumeName, metav1.GetOptions{}) - if err != nil { - glog.Warningf("unable to retrieve pv %s - %v", pvc.Spec.VolumeName, err) - continue - } - if referencedVolume != nil && referencedVolume.Spec.HostPath != nil { - return true - } - } - } - } - return false -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods_test.go deleted file mode 100644 index f4fc43b5..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods_test.go +++ /dev/null @@ -1,2436 +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 kubelet - -import ( - "errors" - "fmt" - "io/ioutil" - "os" - "path/filepath" - "sort" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "k8s.io/api/core/v1" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" - utilfeature "k8s.io/apiserver/pkg/util/feature" - core "k8s.io/client-go/testing" - "k8s.io/client-go/tools/record" - // TODO: remove this import if - // api.Registry.GroupOrDie(v1.GroupName).GroupVersions[0].String() is changed - // to "v1"? - - _ "k8s.io/kubernetes/pkg/apis/core/install" - runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" - kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" - "k8s.io/kubernetes/pkg/kubelet/server/portforward" - "k8s.io/kubernetes/pkg/kubelet/server/remotecommand" - "k8s.io/kubernetes/pkg/util/mount" - volumetest "k8s.io/kubernetes/pkg/volume/testing" -) - -func TestMakeMounts(t *testing.T) { - bTrue := true - propagationHostToContainer := v1.MountPropagationHostToContainer - propagationBidirectional := v1.MountPropagationBidirectional - propagationNone := v1.MountPropagationNone - - testCases := map[string]struct { - container v1.Container - podVolumes kubecontainer.VolumeMap - expectErr bool - expectedErrMsg string - expectedMounts []kubecontainer.Mount - }{ - "valid mounts in unprivileged container": { - podVolumes: kubecontainer.VolumeMap{ - "disk": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "/mnt/disk"}}, - "disk4": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "/mnt/host"}}, - "disk5": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "/var/lib/kubelet/podID/volumes/empty/disk5"}}, - }, - container: v1.Container{ - Name: "container1", - VolumeMounts: []v1.VolumeMount{ - { - MountPath: "/etc/hosts", - Name: "disk", - ReadOnly: false, - MountPropagation: &propagationHostToContainer, - }, - { - MountPath: "/mnt/path3", - Name: "disk", - ReadOnly: true, - MountPropagation: &propagationNone, - }, - { - MountPath: "/mnt/path4", - Name: "disk4", - ReadOnly: false, - }, - { - MountPath: "/mnt/path5", - Name: "disk5", - ReadOnly: false, - }, - }, - }, - expectedMounts: []kubecontainer.Mount{ - { - Name: "disk", - ContainerPath: "/etc/hosts", - HostPath: "/mnt/disk", - ReadOnly: false, - SELinuxRelabel: false, - Propagation: runtimeapi.MountPropagation_PROPAGATION_HOST_TO_CONTAINER, - }, - { - Name: "disk", - ContainerPath: "/mnt/path3", - HostPath: "/mnt/disk", - ReadOnly: true, - SELinuxRelabel: false, - Propagation: runtimeapi.MountPropagation_PROPAGATION_PRIVATE, - }, - { - Name: "disk4", - ContainerPath: "/mnt/path4", - HostPath: "/mnt/host", - ReadOnly: false, - SELinuxRelabel: false, - Propagation: runtimeapi.MountPropagation_PROPAGATION_PRIVATE, - }, - { - Name: "disk5", - ContainerPath: "/mnt/path5", - HostPath: "/var/lib/kubelet/podID/volumes/empty/disk5", - ReadOnly: false, - SELinuxRelabel: false, - Propagation: runtimeapi.MountPropagation_PROPAGATION_PRIVATE, - }, - }, - expectErr: false, - }, - "valid mounts in privileged container": { - podVolumes: kubecontainer.VolumeMap{ - "disk": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "/mnt/disk"}}, - "disk4": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "/mnt/host"}}, - "disk5": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "/var/lib/kubelet/podID/volumes/empty/disk5"}}, - }, - container: v1.Container{ - Name: "container1", - VolumeMounts: []v1.VolumeMount{ - { - MountPath: "/etc/hosts", - Name: "disk", - ReadOnly: false, - MountPropagation: &propagationBidirectional, - }, - { - MountPath: "/mnt/path3", - Name: "disk", - ReadOnly: true, - MountPropagation: &propagationHostToContainer, - }, - { - MountPath: "/mnt/path4", - Name: "disk4", - ReadOnly: false, - }, - }, - SecurityContext: &v1.SecurityContext{ - Privileged: &bTrue, - }, - }, - expectedMounts: []kubecontainer.Mount{ - { - Name: "disk", - ContainerPath: "/etc/hosts", - HostPath: "/mnt/disk", - ReadOnly: false, - SELinuxRelabel: false, - Propagation: runtimeapi.MountPropagation_PROPAGATION_BIDIRECTIONAL, - }, - { - Name: "disk", - ContainerPath: "/mnt/path3", - HostPath: "/mnt/disk", - ReadOnly: true, - SELinuxRelabel: false, - Propagation: runtimeapi.MountPropagation_PROPAGATION_HOST_TO_CONTAINER, - }, - { - Name: "disk4", - ContainerPath: "/mnt/path4", - HostPath: "/mnt/host", - ReadOnly: false, - SELinuxRelabel: false, - Propagation: runtimeapi.MountPropagation_PROPAGATION_PRIVATE, - }, - }, - expectErr: false, - }, - "invalid absolute SubPath": { - podVolumes: kubecontainer.VolumeMap{ - "disk": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "/mnt/disk"}}, - }, - container: v1.Container{ - VolumeMounts: []v1.VolumeMount{ - { - MountPath: "/mnt/path3", - SubPath: "/must/not/be/absolute", - Name: "disk", - ReadOnly: true, - }, - }, - }, - expectErr: true, - expectedErrMsg: "error SubPath `/must/not/be/absolute` must not be an absolute path", - }, - "invalid SubPath with backsteps": { - podVolumes: kubecontainer.VolumeMap{ - "disk": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "/mnt/disk"}}, - }, - container: v1.Container{ - VolumeMounts: []v1.VolumeMount{ - { - MountPath: "/mnt/path3", - SubPath: "no/backsteps/../allowed", - Name: "disk", - ReadOnly: true, - }, - }, - }, - expectErr: true, - expectedErrMsg: "unable to provision SubPath `no/backsteps/../allowed`: must not contain '..'", - }, - "volume doesn't exist": { - podVolumes: kubecontainer.VolumeMap{}, - container: v1.Container{ - VolumeMounts: []v1.VolumeMount{ - { - MountPath: "/mnt/path3", - Name: "disk", - ReadOnly: true, - }, - }, - }, - expectErr: true, - expectedErrMsg: "cannot find volume \"disk\" to mount into container \"\"", - }, - "volume mounter is nil": { - podVolumes: kubecontainer.VolumeMap{ - "disk": kubecontainer.VolumeInfo{}, - }, - container: v1.Container{ - VolumeMounts: []v1.VolumeMount{ - { - MountPath: "/mnt/path3", - Name: "disk", - ReadOnly: true, - }, - }, - }, - expectErr: true, - expectedErrMsg: "cannot find volume \"disk\" to mount into container \"\"", - }, - } - - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - fm := &mount.FakeMounter{} - pod := v1.Pod{ - Spec: v1.PodSpec{ - HostNetwork: true, - }, - } - // test makeMounts with enabled mount propagation - err := utilfeature.DefaultFeatureGate.Set("MountPropagation=true") - if err != nil { - t.Errorf("Failed to enable feature gate for MountPropagation: %v", err) - return - } - - mounts, _, err := makeMounts(&pod, "/pod", &tc.container, "fakepodname", "", "", tc.podVolumes, fm, nil) - - // validate only the error if we expect an error - if tc.expectErr { - if err == nil || err.Error() != tc.expectedErrMsg { - t.Fatalf("expected error message `%s` but got `%v`", tc.expectedErrMsg, err) - } - return - } - - // otherwise validate the mounts - if err != nil { - t.Fatal(err) - } - - assert.Equal(t, tc.expectedMounts, mounts, "mounts of container %+v", tc.container) - - // test makeMounts with disabled mount propagation - err = utilfeature.DefaultFeatureGate.Set("MountPropagation=false") - if err != nil { - t.Errorf("Failed to enable feature gate for MountPropagation: %v", err) - return - } - mounts, _, err = makeMounts(&pod, "/pod", &tc.container, "fakepodname", "", "", tc.podVolumes, fm, nil) - if !tc.expectErr { - expectedPrivateMounts := []kubecontainer.Mount{} - for _, mount := range tc.expectedMounts { - // all mounts are expected to be private when mount - // propagation is disabled - mount.Propagation = runtimeapi.MountPropagation_PROPAGATION_PRIVATE - expectedPrivateMounts = append(expectedPrivateMounts, mount) - } - assert.Equal(t, expectedPrivateMounts, mounts, "mounts of container %+v", tc.container) - } - }) - } -} - -func TestDisabledSubpath(t *testing.T) { - fm := &mount.FakeMounter{} - pod := v1.Pod{ - Spec: v1.PodSpec{ - HostNetwork: true, - }, - } - podVolumes := kubecontainer.VolumeMap{ - "disk": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "/mnt/disk"}}, - } - - cases := map[string]struct { - container v1.Container - expectError bool - }{ - "subpath not specified": { - v1.Container{ - VolumeMounts: []v1.VolumeMount{ - { - MountPath: "/mnt/path3", - Name: "disk", - ReadOnly: true, - }, - }, - }, - false, - }, - "subpath specified": { - v1.Container{ - VolumeMounts: []v1.VolumeMount{ - { - MountPath: "/mnt/path3", - SubPath: "/must/not/be/absolute", - Name: "disk", - ReadOnly: true, - }, - }, - }, - true, - }, - } - - utilfeature.DefaultFeatureGate.Set("VolumeSubpath=false") - defer utilfeature.DefaultFeatureGate.Set("VolumeSubpath=true") - - for name, test := range cases { - _, _, err := makeMounts(&pod, "/pod", &test.container, "fakepodname", "", "", podVolumes, fm, nil) - if err != nil && !test.expectError { - t.Errorf("test %v failed: %v", name, err) - } - if err == nil && test.expectError { - t.Errorf("test %v failed: expected error", name) - } - } -} - -func TestMakeBlockVolumes(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - testCases := map[string]struct { - container v1.Container - podVolumes kubecontainer.VolumeMap - expectErr bool - expectedErrMsg string - expectedDevices []kubecontainer.DeviceInfo - }{ - "valid volumeDevices in container": { - podVolumes: kubecontainer.VolumeMap{ - "disk1": kubecontainer.VolumeInfo{BlockVolumeMapper: &stubBlockVolume{dirPath: "/dev/", volName: "sda"}}, - "disk2": kubecontainer.VolumeInfo{BlockVolumeMapper: &stubBlockVolume{dirPath: "/dev/disk/by-path/", volName: "diskPath"}, ReadOnly: true}, - "disk3": kubecontainer.VolumeInfo{BlockVolumeMapper: &stubBlockVolume{dirPath: "/dev/disk/by-id/", volName: "diskUuid"}}, - "disk4": kubecontainer.VolumeInfo{BlockVolumeMapper: &stubBlockVolume{dirPath: "/var/lib/", volName: "rawdisk"}, ReadOnly: true}, - }, - container: v1.Container{ - Name: "container1", - VolumeDevices: []v1.VolumeDevice{ - { - DevicePath: "/dev/sda", - Name: "disk1", - }, - { - DevicePath: "/dev/xvda", - Name: "disk2", - }, - { - DevicePath: "/dev/xvdb", - Name: "disk3", - }, - { - DevicePath: "/mnt/rawdisk", - Name: "disk4", - }, - }, - }, - expectedDevices: []kubecontainer.DeviceInfo{ - { - PathInContainer: "/dev/sda", - PathOnHost: "/dev/sda", - Permissions: "mrw", - }, - { - PathInContainer: "/dev/xvda", - PathOnHost: "/dev/disk/by-path/diskPath", - Permissions: "r", - }, - { - PathInContainer: "/dev/xvdb", - PathOnHost: "/dev/disk/by-id/diskUuid", - Permissions: "mrw", - }, - { - PathInContainer: "/mnt/rawdisk", - PathOnHost: "/var/lib/rawdisk", - Permissions: "r", - }, - }, - expectErr: false, - }, - "invalid absolute Path": { - podVolumes: kubecontainer.VolumeMap{ - "disk": kubecontainer.VolumeInfo{BlockVolumeMapper: &stubBlockVolume{dirPath: "/dev/", volName: "sda"}}, - }, - container: v1.Container{ - VolumeDevices: []v1.VolumeDevice{ - { - DevicePath: "must/be/absolute", - Name: "disk", - }, - }, - }, - expectErr: true, - expectedErrMsg: "error DevicePath `must/be/absolute` must be an absolute path", - }, - "volume doesn't exist": { - podVolumes: kubecontainer.VolumeMap{}, - container: v1.Container{ - VolumeDevices: []v1.VolumeDevice{ - { - DevicePath: "/dev/sdaa", - Name: "disk", - }, - }, - }, - expectErr: true, - expectedErrMsg: "cannot find volume \"disk\" to pass into container \"\"", - }, - "volume BlockVolumeMapper is nil": { - podVolumes: kubecontainer.VolumeMap{ - "disk": kubecontainer.VolumeInfo{}, - }, - container: v1.Container{ - VolumeDevices: []v1.VolumeDevice{ - { - DevicePath: "/dev/sdzz", - Name: "disk", - }, - }, - }, - expectErr: true, - expectedErrMsg: "cannot find volume \"disk\" to pass into container \"\"", - }, - } - - for name, tc := range testCases { - t.Run(name, func(t *testing.T) { - pod := v1.Pod{ - Spec: v1.PodSpec{ - HostNetwork: true, - }, - } - blkutil := volumetest.NewBlockVolumePathHandler() - blkVolumes, err := kubelet.makeBlockVolumes(&pod, &tc.container, tc.podVolumes, blkutil) - // validate only the error if we expect an error - if tc.expectErr { - if err == nil || err.Error() != tc.expectedErrMsg { - t.Fatalf("expected error message `%s` but got `%v`", tc.expectedErrMsg, err) - } - return - } - // otherwise validate the devices - if err != nil { - t.Fatal(err) - } - assert.Equal(t, tc.expectedDevices, blkVolumes, "devices of container %+v", tc.container) - }) - } -} - -func TestNodeHostsFileContent(t *testing.T) { - testCases := []struct { - hostsFileName string - hostAliases []v1.HostAlias - rawHostsFileContent string - expectedHostsFileContent string - }{ - { - "hosts_test_file1", - []v1.HostAlias{}, - `# hosts file for testing. -127.0.0.1 localhost -::1 localhost ip6-localhost ip6-loopback -fe00::0 ip6-localnet -fe00::0 ip6-mcastprefix -fe00::1 ip6-allnodes -fe00::2 ip6-allrouters -123.45.67.89 some.domain -`, - `# Kubernetes-managed hosts file (host network). -# hosts file for testing. -127.0.0.1 localhost -::1 localhost ip6-localhost ip6-loopback -fe00::0 ip6-localnet -fe00::0 ip6-mcastprefix -fe00::1 ip6-allnodes -fe00::2 ip6-allrouters -123.45.67.89 some.domain -`, - }, - { - "hosts_test_file2", - []v1.HostAlias{}, - `# another hosts file for testing. -127.0.0.1 localhost -::1 localhost ip6-localhost ip6-loopback -fe00::0 ip6-localnet -fe00::0 ip6-mcastprefix -fe00::1 ip6-allnodes -fe00::2 ip6-allrouters -12.34.56.78 another.domain -`, - `# Kubernetes-managed hosts file (host network). -# another hosts file for testing. -127.0.0.1 localhost -::1 localhost ip6-localhost ip6-loopback -fe00::0 ip6-localnet -fe00::0 ip6-mcastprefix -fe00::1 ip6-allnodes -fe00::2 ip6-allrouters -12.34.56.78 another.domain -`, - }, - { - "hosts_test_file1_with_host_aliases", - []v1.HostAlias{ - {IP: "123.45.67.89", Hostnames: []string{"foo", "bar", "baz"}}, - }, - `# hosts file for testing. -127.0.0.1 localhost -::1 localhost ip6-localhost ip6-loopback -fe00::0 ip6-localnet -fe00::0 ip6-mcastprefix -fe00::1 ip6-allnodes -fe00::2 ip6-allrouters -123.45.67.89 some.domain -`, - `# Kubernetes-managed hosts file (host network). -# hosts file for testing. -127.0.0.1 localhost -::1 localhost ip6-localhost ip6-loopback -fe00::0 ip6-localnet -fe00::0 ip6-mcastprefix -fe00::1 ip6-allnodes -fe00::2 ip6-allrouters -123.45.67.89 some.domain - -# Entries added by HostAliases. -123.45.67.89 foo -123.45.67.89 bar -123.45.67.89 baz -`, - }, - { - "hosts_test_file2_with_host_aliases", - []v1.HostAlias{ - {IP: "123.45.67.89", Hostnames: []string{"foo", "bar", "baz"}}, - {IP: "456.78.90.123", Hostnames: []string{"park", "doo", "boo"}}, - }, - `# another hosts file for testing. -127.0.0.1 localhost -::1 localhost ip6-localhost ip6-loopback -fe00::0 ip6-localnet -fe00::0 ip6-mcastprefix -fe00::1 ip6-allnodes -fe00::2 ip6-allrouters -12.34.56.78 another.domain -`, - `# Kubernetes-managed hosts file (host network). -# another hosts file for testing. -127.0.0.1 localhost -::1 localhost ip6-localhost ip6-loopback -fe00::0 ip6-localnet -fe00::0 ip6-mcastprefix -fe00::1 ip6-allnodes -fe00::2 ip6-allrouters -12.34.56.78 another.domain - -# Entries added by HostAliases. -123.45.67.89 foo -123.45.67.89 bar -123.45.67.89 baz -456.78.90.123 park -456.78.90.123 doo -456.78.90.123 boo -`, - }, - } - - for _, testCase := range testCases { - tmpdir, err := writeHostsFile(testCase.hostsFileName, testCase.rawHostsFileContent) - require.NoError(t, err, "could not create a temp hosts file") - defer os.RemoveAll(tmpdir) - - actualContent, fileReadErr := nodeHostsFileContent(filepath.Join(tmpdir, testCase.hostsFileName), testCase.hostAliases) - require.NoError(t, fileReadErr, "could not create read hosts file") - assert.Equal(t, testCase.expectedHostsFileContent, string(actualContent), "hosts file content not expected") - } -} - -// writeHostsFile will write a hosts file into a temporary dir, and return that dir. -// Caller is responsible for deleting the dir and its contents. -func writeHostsFile(filename string, cfg string) (string, error) { - tmpdir, err := ioutil.TempDir("", "kubelet=kubelet_pods_test.go=") - if err != nil { - return "", err - } - return tmpdir, ioutil.WriteFile(filepath.Join(tmpdir, filename), []byte(cfg), 0644) -} - -func TestManagedHostsFileContent(t *testing.T) { - testCases := []struct { - hostIP string - hostName string - hostDomainName string - hostAliases []v1.HostAlias - expectedContent string - }{ - { - "123.45.67.89", - "podFoo", - "", - []v1.HostAlias{}, - `# Kubernetes-managed hosts file. -127.0.0.1 localhost -::1 localhost ip6-localhost ip6-loopback -fe00::0 ip6-localnet -fe00::0 ip6-mcastprefix -fe00::1 ip6-allnodes -fe00::2 ip6-allrouters -123.45.67.89 podFoo -`, - }, - { - "203.0.113.1", - "podFoo", - "domainFoo", - []v1.HostAlias{}, - `# Kubernetes-managed hosts file. -127.0.0.1 localhost -::1 localhost ip6-localhost ip6-loopback -fe00::0 ip6-localnet -fe00::0 ip6-mcastprefix -fe00::1 ip6-allnodes -fe00::2 ip6-allrouters -203.0.113.1 podFoo.domainFoo podFoo -`, - }, - { - "203.0.113.1", - "podFoo", - "domainFoo", - []v1.HostAlias{ - {IP: "123.45.67.89", Hostnames: []string{"foo", "bar", "baz"}}, - }, - `# Kubernetes-managed hosts file. -127.0.0.1 localhost -::1 localhost ip6-localhost ip6-loopback -fe00::0 ip6-localnet -fe00::0 ip6-mcastprefix -fe00::1 ip6-allnodes -fe00::2 ip6-allrouters -203.0.113.1 podFoo.domainFoo podFoo - -# Entries added by HostAliases. -123.45.67.89 foo -123.45.67.89 bar -123.45.67.89 baz -`, - }, - { - "203.0.113.1", - "podFoo", - "domainFoo", - []v1.HostAlias{ - {IP: "123.45.67.89", Hostnames: []string{"foo", "bar", "baz"}}, - {IP: "456.78.90.123", Hostnames: []string{"park", "doo", "boo"}}, - }, - `# Kubernetes-managed hosts file. -127.0.0.1 localhost -::1 localhost ip6-localhost ip6-loopback -fe00::0 ip6-localnet -fe00::0 ip6-mcastprefix -fe00::1 ip6-allnodes -fe00::2 ip6-allrouters -203.0.113.1 podFoo.domainFoo podFoo - -# Entries added by HostAliases. -123.45.67.89 foo -123.45.67.89 bar -123.45.67.89 baz -456.78.90.123 park -456.78.90.123 doo -456.78.90.123 boo -`, - }, - } - - for _, testCase := range testCases { - actualContent := managedHostsFileContent(testCase.hostIP, testCase.hostName, testCase.hostDomainName, testCase.hostAliases) - assert.Equal(t, testCase.expectedContent, string(actualContent), "hosts file content not expected") - } -} - -func TestRunInContainerNoSuchPod(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - fakeRuntime := testKubelet.fakeRuntime - fakeRuntime.PodList = []*containertest.FakePod{} - - podName := "podFoo" - podNamespace := "nsFoo" - containerName := "containerFoo" - output, err := kubelet.RunInContainer( - kubecontainer.GetPodFullName(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: podName, Namespace: podNamespace}}), - "", - containerName, - []string{"ls"}) - assert.Error(t, err) - assert.Nil(t, output, "output should be nil") -} - -func TestRunInContainer(t *testing.T) { - for _, testError := range []error{nil, errors.New("bar")} { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - fakeRuntime := testKubelet.fakeRuntime - fakeCommandRunner := containertest.FakeContainerCommandRunner{ - Err: testError, - Stdout: "foo", - } - kubelet.runner = &fakeCommandRunner - - containerID := kubecontainer.ContainerID{Type: "test", ID: "abc1234"} - fakeRuntime.PodList = []*containertest.FakePod{ - {Pod: &kubecontainer.Pod{ - ID: "12345678", - Name: "podFoo", - Namespace: "nsFoo", - Containers: []*kubecontainer.Container{ - {Name: "containerFoo", - ID: containerID, - }, - }, - }}, - } - cmd := []string{"ls"} - actualOutput, err := kubelet.RunInContainer("podFoo_nsFoo", "", "containerFoo", cmd) - assert.Equal(t, containerID, fakeCommandRunner.ContainerID, "(testError=%v) ID", testError) - assert.Equal(t, cmd, fakeCommandRunner.Cmd, "(testError=%v) command", testError) - // this isn't 100% foolproof as a bug in a real ContainerCommandRunner where it fails to copy to stdout/stderr wouldn't be caught by this test - assert.Equal(t, "foo", string(actualOutput), "(testError=%v) output", testError) - assert.Equal(t, err, testError, "(testError=%v) err", testError) - } -} - -type testServiceLister struct { - services []*v1.Service -} - -func (ls testServiceLister) List(labels.Selector) ([]*v1.Service, error) { - return ls.services, nil -} - -type envs []kubecontainer.EnvVar - -func (e envs) Len() int { - return len(e) -} - -func (e envs) Swap(i, j int) { e[i], e[j] = e[j], e[i] } - -func (e envs) Less(i, j int) bool { return e[i].Name < e[j].Name } - -func buildService(name, namespace, clusterIP, protocol string, port int) *v1.Service { - return &v1.Service{ - ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, - Spec: v1.ServiceSpec{ - Ports: []v1.ServicePort{{ - Protocol: v1.Protocol(protocol), - Port: int32(port), - }}, - ClusterIP: clusterIP, - }, - } -} - -func TestMakeEnvironmentVariables(t *testing.T) { - trueVal := true - services := []*v1.Service{ - buildService("kubernetes", metav1.NamespaceDefault, "1.2.3.1", "TCP", 8081), - buildService("test", "test1", "1.2.3.3", "TCP", 8083), - buildService("kubernetes", "test2", "1.2.3.4", "TCP", 8084), - buildService("test", "test2", "1.2.3.5", "TCP", 8085), - buildService("test", "test2", "None", "TCP", 8085), - buildService("test", "test2", "", "TCP", 8085), - buildService("kubernetes", "kubernetes", "1.2.3.6", "TCP", 8086), - buildService("not-special", "kubernetes", "1.2.3.8", "TCP", 8088), - buildService("not-special", "kubernetes", "None", "TCP", 8088), - buildService("not-special", "kubernetes", "", "TCP", 8088), - } - - testCases := []struct { - name string // the name of the test case - ns string // the namespace to generate environment for - container *v1.Container // the container to use - masterServiceNs string // the namespace to read master service info from - nilLister bool // whether the lister should be nil - configMap *v1.ConfigMap // an optional ConfigMap to pull from - secret *v1.Secret // an optional Secret to pull from - expectedEnvs []kubecontainer.EnvVar // a set of expected environment vars - expectedError bool // does the test fail - expectedEvent string // does the test emit an event - }{ - { - name: "api server = Y, kubelet = Y", - ns: "test1", - container: &v1.Container{ - Env: []v1.EnvVar{ - {Name: "FOO", Value: "BAR"}, - {Name: "TEST_SERVICE_HOST", Value: "1.2.3.3"}, - {Name: "TEST_SERVICE_PORT", Value: "8083"}, - {Name: "TEST_PORT", Value: "tcp://1.2.3.3:8083"}, - {Name: "TEST_PORT_8083_TCP", Value: "tcp://1.2.3.3:8083"}, - {Name: "TEST_PORT_8083_TCP_PROTO", Value: "tcp"}, - {Name: "TEST_PORT_8083_TCP_PORT", Value: "8083"}, - {Name: "TEST_PORT_8083_TCP_ADDR", Value: "1.2.3.3"}, - }, - }, - masterServiceNs: metav1.NamespaceDefault, - nilLister: false, - expectedEnvs: []kubecontainer.EnvVar{ - {Name: "FOO", Value: "BAR"}, - {Name: "TEST_SERVICE_HOST", Value: "1.2.3.3"}, - {Name: "TEST_SERVICE_PORT", Value: "8083"}, - {Name: "TEST_PORT", Value: "tcp://1.2.3.3:8083"}, - {Name: "TEST_PORT_8083_TCP", Value: "tcp://1.2.3.3:8083"}, - {Name: "TEST_PORT_8083_TCP_PROTO", Value: "tcp"}, - {Name: "TEST_PORT_8083_TCP_PORT", Value: "8083"}, - {Name: "TEST_PORT_8083_TCP_ADDR", Value: "1.2.3.3"}, - {Name: "KUBERNETES_SERVICE_PORT", Value: "8081"}, - {Name: "KUBERNETES_SERVICE_HOST", Value: "1.2.3.1"}, - {Name: "KUBERNETES_PORT", Value: "tcp://1.2.3.1:8081"}, - {Name: "KUBERNETES_PORT_8081_TCP", Value: "tcp://1.2.3.1:8081"}, - {Name: "KUBERNETES_PORT_8081_TCP_PROTO", Value: "tcp"}, - {Name: "KUBERNETES_PORT_8081_TCP_PORT", Value: "8081"}, - {Name: "KUBERNETES_PORT_8081_TCP_ADDR", Value: "1.2.3.1"}, - }, - }, - { - name: "api server = Y, kubelet = N", - ns: "test1", - container: &v1.Container{ - Env: []v1.EnvVar{ - {Name: "FOO", Value: "BAR"}, - {Name: "TEST_SERVICE_HOST", Value: "1.2.3.3"}, - {Name: "TEST_SERVICE_PORT", Value: "8083"}, - {Name: "TEST_PORT", Value: "tcp://1.2.3.3:8083"}, - {Name: "TEST_PORT_8083_TCP", Value: "tcp://1.2.3.3:8083"}, - {Name: "TEST_PORT_8083_TCP_PROTO", Value: "tcp"}, - {Name: "TEST_PORT_8083_TCP_PORT", Value: "8083"}, - {Name: "TEST_PORT_8083_TCP_ADDR", Value: "1.2.3.3"}, - }, - }, - masterServiceNs: metav1.NamespaceDefault, - nilLister: true, - expectedEnvs: []kubecontainer.EnvVar{ - {Name: "FOO", Value: "BAR"}, - {Name: "TEST_SERVICE_HOST", Value: "1.2.3.3"}, - {Name: "TEST_SERVICE_PORT", Value: "8083"}, - {Name: "TEST_PORT", Value: "tcp://1.2.3.3:8083"}, - {Name: "TEST_PORT_8083_TCP", Value: "tcp://1.2.3.3:8083"}, - {Name: "TEST_PORT_8083_TCP_PROTO", Value: "tcp"}, - {Name: "TEST_PORT_8083_TCP_PORT", Value: "8083"}, - {Name: "TEST_PORT_8083_TCP_ADDR", Value: "1.2.3.3"}, - }, - }, - { - name: "api server = N; kubelet = Y", - ns: "test1", - container: &v1.Container{ - Env: []v1.EnvVar{ - {Name: "FOO", Value: "BAZ"}, - }, - }, - masterServiceNs: metav1.NamespaceDefault, - nilLister: false, - expectedEnvs: []kubecontainer.EnvVar{ - {Name: "FOO", Value: "BAZ"}, - {Name: "TEST_SERVICE_HOST", Value: "1.2.3.3"}, - {Name: "TEST_SERVICE_PORT", Value: "8083"}, - {Name: "TEST_PORT", Value: "tcp://1.2.3.3:8083"}, - {Name: "TEST_PORT_8083_TCP", Value: "tcp://1.2.3.3:8083"}, - {Name: "TEST_PORT_8083_TCP_PROTO", Value: "tcp"}, - {Name: "TEST_PORT_8083_TCP_PORT", Value: "8083"}, - {Name: "TEST_PORT_8083_TCP_ADDR", Value: "1.2.3.3"}, - {Name: "KUBERNETES_SERVICE_HOST", Value: "1.2.3.1"}, - {Name: "KUBERNETES_SERVICE_PORT", Value: "8081"}, - {Name: "KUBERNETES_PORT", Value: "tcp://1.2.3.1:8081"}, - {Name: "KUBERNETES_PORT_8081_TCP", Value: "tcp://1.2.3.1:8081"}, - {Name: "KUBERNETES_PORT_8081_TCP_PROTO", Value: "tcp"}, - {Name: "KUBERNETES_PORT_8081_TCP_PORT", Value: "8081"}, - {Name: "KUBERNETES_PORT_8081_TCP_ADDR", Value: "1.2.3.1"}, - }, - }, - { - name: "master service in pod ns", - ns: "test2", - container: &v1.Container{ - Env: []v1.EnvVar{ - {Name: "FOO", Value: "ZAP"}, - }, - }, - masterServiceNs: "kubernetes", - nilLister: false, - expectedEnvs: []kubecontainer.EnvVar{ - {Name: "FOO", Value: "ZAP"}, - {Name: "TEST_SERVICE_HOST", Value: "1.2.3.5"}, - {Name: "TEST_SERVICE_PORT", Value: "8085"}, - {Name: "TEST_PORT", Value: "tcp://1.2.3.5:8085"}, - {Name: "TEST_PORT_8085_TCP", Value: "tcp://1.2.3.5:8085"}, - {Name: "TEST_PORT_8085_TCP_PROTO", Value: "tcp"}, - {Name: "TEST_PORT_8085_TCP_PORT", Value: "8085"}, - {Name: "TEST_PORT_8085_TCP_ADDR", Value: "1.2.3.5"}, - {Name: "KUBERNETES_SERVICE_HOST", Value: "1.2.3.4"}, - {Name: "KUBERNETES_SERVICE_PORT", Value: "8084"}, - {Name: "KUBERNETES_PORT", Value: "tcp://1.2.3.4:8084"}, - {Name: "KUBERNETES_PORT_8084_TCP", Value: "tcp://1.2.3.4:8084"}, - {Name: "KUBERNETES_PORT_8084_TCP_PROTO", Value: "tcp"}, - {Name: "KUBERNETES_PORT_8084_TCP_PORT", Value: "8084"}, - {Name: "KUBERNETES_PORT_8084_TCP_ADDR", Value: "1.2.3.4"}, - }, - }, - { - name: "pod in master service ns", - ns: "kubernetes", - container: &v1.Container{}, - masterServiceNs: "kubernetes", - nilLister: false, - expectedEnvs: []kubecontainer.EnvVar{ - {Name: "NOT_SPECIAL_SERVICE_HOST", Value: "1.2.3.8"}, - {Name: "NOT_SPECIAL_SERVICE_PORT", Value: "8088"}, - {Name: "NOT_SPECIAL_PORT", Value: "tcp://1.2.3.8:8088"}, - {Name: "NOT_SPECIAL_PORT_8088_TCP", Value: "tcp://1.2.3.8:8088"}, - {Name: "NOT_SPECIAL_PORT_8088_TCP_PROTO", Value: "tcp"}, - {Name: "NOT_SPECIAL_PORT_8088_TCP_PORT", Value: "8088"}, - {Name: "NOT_SPECIAL_PORT_8088_TCP_ADDR", Value: "1.2.3.8"}, - {Name: "KUBERNETES_SERVICE_HOST", Value: "1.2.3.6"}, - {Name: "KUBERNETES_SERVICE_PORT", Value: "8086"}, - {Name: "KUBERNETES_PORT", Value: "tcp://1.2.3.6:8086"}, - {Name: "KUBERNETES_PORT_8086_TCP", Value: "tcp://1.2.3.6:8086"}, - {Name: "KUBERNETES_PORT_8086_TCP_PROTO", Value: "tcp"}, - {Name: "KUBERNETES_PORT_8086_TCP_PORT", Value: "8086"}, - {Name: "KUBERNETES_PORT_8086_TCP_ADDR", Value: "1.2.3.6"}, - }, - }, - { - name: "downward api pod", - ns: "downward-api", - container: &v1.Container{ - Env: []v1.EnvVar{ - { - Name: "POD_NAME", - ValueFrom: &v1.EnvVarSource{ - FieldRef: &v1.ObjectFieldSelector{ - APIVersion: "v1", - FieldPath: "metadata.name", - }, - }, - }, - { - Name: "POD_NAMESPACE", - ValueFrom: &v1.EnvVarSource{ - FieldRef: &v1.ObjectFieldSelector{ - APIVersion: "v1", - FieldPath: "metadata.namespace", - }, - }, - }, - { - Name: "POD_NODE_NAME", - ValueFrom: &v1.EnvVarSource{ - FieldRef: &v1.ObjectFieldSelector{ - APIVersion: "v1", - FieldPath: "spec.nodeName", - }, - }, - }, - { - Name: "POD_SERVICE_ACCOUNT_NAME", - ValueFrom: &v1.EnvVarSource{ - FieldRef: &v1.ObjectFieldSelector{ - APIVersion: "v1", - FieldPath: "spec.serviceAccountName", - }, - }, - }, - { - Name: "POD_IP", - ValueFrom: &v1.EnvVarSource{ - FieldRef: &v1.ObjectFieldSelector{ - APIVersion: "v1", - FieldPath: "status.podIP", - }, - }, - }, - { - Name: "HOST_IP", - ValueFrom: &v1.EnvVarSource{ - FieldRef: &v1.ObjectFieldSelector{ - APIVersion: "v1", - FieldPath: "status.hostIP", - }, - }, - }, - }, - }, - masterServiceNs: "nothing", - nilLister: true, - expectedEnvs: []kubecontainer.EnvVar{ - {Name: "POD_NAME", Value: "dapi-test-pod-name"}, - {Name: "POD_NAMESPACE", Value: "downward-api"}, - {Name: "POD_NODE_NAME", Value: "node-name"}, - {Name: "POD_SERVICE_ACCOUNT_NAME", Value: "special"}, - {Name: "POD_IP", Value: "1.2.3.4"}, - {Name: "HOST_IP", Value: testKubeletHostIP}, - }, - }, - { - name: "env expansion", - ns: "test1", - container: &v1.Container{ - Env: []v1.EnvVar{ - { - Name: "TEST_LITERAL", - Value: "test-test-test", - }, - { - Name: "POD_NAME", - ValueFrom: &v1.EnvVarSource{ - FieldRef: &v1.ObjectFieldSelector{ - APIVersion: "v1", - FieldPath: "metadata.name", - }, - }, - }, - { - Name: "OUT_OF_ORDER_TEST", - Value: "$(OUT_OF_ORDER_TARGET)", - }, - { - Name: "OUT_OF_ORDER_TARGET", - Value: "FOO", - }, - { - Name: "EMPTY_VAR", - }, - { - Name: "EMPTY_TEST", - Value: "foo-$(EMPTY_VAR)", - }, - { - Name: "POD_NAME_TEST2", - Value: "test2-$(POD_NAME)", - }, - { - Name: "POD_NAME_TEST3", - Value: "$(POD_NAME_TEST2)-3", - }, - { - Name: "LITERAL_TEST", - Value: "literal-$(TEST_LITERAL)", - }, - { - Name: "SERVICE_VAR_TEST", - Value: "$(TEST_SERVICE_HOST):$(TEST_SERVICE_PORT)", - }, - { - Name: "TEST_UNDEFINED", - Value: "$(UNDEFINED_VAR)", - }, - }, - }, - masterServiceNs: "nothing", - nilLister: false, - expectedEnvs: []kubecontainer.EnvVar{ - { - Name: "TEST_LITERAL", - Value: "test-test-test", - }, - { - Name: "POD_NAME", - Value: "dapi-test-pod-name", - }, - { - Name: "POD_NAME_TEST2", - Value: "test2-dapi-test-pod-name", - }, - { - Name: "POD_NAME_TEST3", - Value: "test2-dapi-test-pod-name-3", - }, - { - Name: "LITERAL_TEST", - Value: "literal-test-test-test", - }, - { - Name: "TEST_SERVICE_HOST", - Value: "1.2.3.3", - }, - { - Name: "TEST_SERVICE_PORT", - Value: "8083", - }, - { - Name: "TEST_PORT", - Value: "tcp://1.2.3.3:8083", - }, - { - Name: "TEST_PORT_8083_TCP", - Value: "tcp://1.2.3.3:8083", - }, - { - Name: "TEST_PORT_8083_TCP_PROTO", - Value: "tcp", - }, - { - Name: "TEST_PORT_8083_TCP_PORT", - Value: "8083", - }, - { - Name: "TEST_PORT_8083_TCP_ADDR", - Value: "1.2.3.3", - }, - { - Name: "SERVICE_VAR_TEST", - Value: "1.2.3.3:8083", - }, - { - Name: "OUT_OF_ORDER_TEST", - Value: "$(OUT_OF_ORDER_TARGET)", - }, - { - Name: "OUT_OF_ORDER_TARGET", - Value: "FOO", - }, - { - Name: "TEST_UNDEFINED", - Value: "$(UNDEFINED_VAR)", - }, - { - Name: "EMPTY_VAR", - }, - { - Name: "EMPTY_TEST", - Value: "foo-", - }, - }, - }, - { - name: "configmapkeyref_missing_optional", - ns: "test", - container: &v1.Container{ - Env: []v1.EnvVar{ - { - Name: "POD_NAME", - ValueFrom: &v1.EnvVarSource{ - ConfigMapKeyRef: &v1.ConfigMapKeySelector{ - LocalObjectReference: v1.LocalObjectReference{Name: "missing-config-map"}, - Key: "key", - Optional: &trueVal, - }, - }, - }, - }, - }, - masterServiceNs: "nothing", - expectedEnvs: nil, - }, - { - name: "configmapkeyref_missing_key_optional", - ns: "test", - container: &v1.Container{ - Env: []v1.EnvVar{ - { - Name: "POD_NAME", - ValueFrom: &v1.EnvVarSource{ - ConfigMapKeyRef: &v1.ConfigMapKeySelector{ - LocalObjectReference: v1.LocalObjectReference{Name: "test-config-map"}, - Key: "key", - Optional: &trueVal, - }, - }, - }, - }, - }, - masterServiceNs: "nothing", - nilLister: true, - configMap: &v1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: "test1", - Name: "test-configmap", - }, - Data: map[string]string{ - "a": "b", - }, - }, - expectedEnvs: nil, - }, - { - name: "secretkeyref_missing_optional", - ns: "test", - container: &v1.Container{ - Env: []v1.EnvVar{ - { - Name: "POD_NAME", - ValueFrom: &v1.EnvVarSource{ - SecretKeyRef: &v1.SecretKeySelector{ - LocalObjectReference: v1.LocalObjectReference{Name: "missing-secret"}, - Key: "key", - Optional: &trueVal, - }, - }, - }, - }, - }, - masterServiceNs: "nothing", - expectedEnvs: nil, - }, - { - name: "secretkeyref_missing_key_optional", - ns: "test", - container: &v1.Container{ - Env: []v1.EnvVar{ - { - Name: "POD_NAME", - ValueFrom: &v1.EnvVarSource{ - SecretKeyRef: &v1.SecretKeySelector{ - LocalObjectReference: v1.LocalObjectReference{Name: "test-secret"}, - Key: "key", - Optional: &trueVal, - }, - }, - }, - }, - }, - masterServiceNs: "nothing", - nilLister: true, - secret: &v1.Secret{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: "test1", - Name: "test-secret", - }, - Data: map[string][]byte{ - "a": []byte("b"), - }, - }, - expectedEnvs: nil, - }, - { - name: "configmap", - ns: "test1", - container: &v1.Container{ - EnvFrom: []v1.EnvFromSource{ - { - ConfigMapRef: &v1.ConfigMapEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-config-map"}}, - }, - { - Prefix: "p_", - ConfigMapRef: &v1.ConfigMapEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-config-map"}}, - }, - }, - Env: []v1.EnvVar{ - { - Name: "TEST_LITERAL", - Value: "test-test-test", - }, - { - Name: "EXPANSION_TEST", - Value: "$(REPLACE_ME)", - }, - { - Name: "DUPE_TEST", - Value: "ENV_VAR", - }, - }, - }, - masterServiceNs: "nothing", - nilLister: false, - configMap: &v1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: "test1", - Name: "test-configmap", - }, - Data: map[string]string{ - "REPLACE_ME": "FROM_CONFIG_MAP", - "DUPE_TEST": "CONFIG_MAP", - }, - }, - expectedEnvs: []kubecontainer.EnvVar{ - { - Name: "TEST_LITERAL", - Value: "test-test-test", - }, - { - Name: "TEST_SERVICE_HOST", - Value: "1.2.3.3", - }, - { - Name: "TEST_SERVICE_PORT", - Value: "8083", - }, - { - Name: "TEST_PORT", - Value: "tcp://1.2.3.3:8083", - }, - { - Name: "TEST_PORT_8083_TCP", - Value: "tcp://1.2.3.3:8083", - }, - { - Name: "TEST_PORT_8083_TCP_PROTO", - Value: "tcp", - }, - { - Name: "TEST_PORT_8083_TCP_PORT", - Value: "8083", - }, - { - Name: "TEST_PORT_8083_TCP_ADDR", - Value: "1.2.3.3", - }, - { - Name: "REPLACE_ME", - Value: "FROM_CONFIG_MAP", - }, - { - Name: "EXPANSION_TEST", - Value: "FROM_CONFIG_MAP", - }, - { - Name: "DUPE_TEST", - Value: "ENV_VAR", - }, - { - Name: "p_REPLACE_ME", - Value: "FROM_CONFIG_MAP", - }, - { - Name: "p_DUPE_TEST", - Value: "CONFIG_MAP", - }, - }, - }, - { - name: "configmap_missing", - ns: "test1", - container: &v1.Container{ - EnvFrom: []v1.EnvFromSource{ - {ConfigMapRef: &v1.ConfigMapEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-config-map"}}}, - }, - }, - masterServiceNs: "nothing", - expectedError: true, - }, - { - name: "configmap_missing_optional", - ns: "test", - container: &v1.Container{ - EnvFrom: []v1.EnvFromSource{ - {ConfigMapRef: &v1.ConfigMapEnvSource{ - Optional: &trueVal, - LocalObjectReference: v1.LocalObjectReference{Name: "missing-config-map"}}}, - }, - }, - masterServiceNs: "nothing", - expectedEnvs: nil, - }, - { - name: "configmap_invalid_keys", - ns: "test", - container: &v1.Container{ - EnvFrom: []v1.EnvFromSource{ - {ConfigMapRef: &v1.ConfigMapEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-config-map"}}}, - }, - }, - masterServiceNs: "nothing", - configMap: &v1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: "test1", - Name: "test-configmap", - }, - Data: map[string]string{ - "1234": "abc", - "1z": "abc", - "key": "value", - }, - }, - expectedEnvs: []kubecontainer.EnvVar{ - { - Name: "key", - Value: "value", - }, - }, - expectedEvent: "Warning InvalidEnvironmentVariableNames Keys [1234, 1z] from the EnvFrom configMap test/test-config-map were skipped since they are considered invalid environment variable names.", - }, - { - name: "configmap_invalid_keys_valid", - ns: "test", - container: &v1.Container{ - EnvFrom: []v1.EnvFromSource{ - { - Prefix: "p_", - ConfigMapRef: &v1.ConfigMapEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-config-map"}}, - }, - }, - }, - masterServiceNs: "", - configMap: &v1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: "test1", - Name: "test-configmap", - }, - Data: map[string]string{ - "1234": "abc", - }, - }, - expectedEnvs: []kubecontainer.EnvVar{ - { - Name: "p_1234", - Value: "abc", - }, - }, - }, - { - name: "secret", - ns: "test1", - container: &v1.Container{ - EnvFrom: []v1.EnvFromSource{ - { - SecretRef: &v1.SecretEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-secret"}}, - }, - { - Prefix: "p_", - SecretRef: &v1.SecretEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-secret"}}, - }, - }, - Env: []v1.EnvVar{ - { - Name: "TEST_LITERAL", - Value: "test-test-test", - }, - { - Name: "EXPANSION_TEST", - Value: "$(REPLACE_ME)", - }, - { - Name: "DUPE_TEST", - Value: "ENV_VAR", - }, - }, - }, - masterServiceNs: "nothing", - nilLister: false, - secret: &v1.Secret{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: "test1", - Name: "test-secret", - }, - Data: map[string][]byte{ - "REPLACE_ME": []byte("FROM_SECRET"), - "DUPE_TEST": []byte("SECRET"), - }, - }, - expectedEnvs: []kubecontainer.EnvVar{ - { - Name: "TEST_LITERAL", - Value: "test-test-test", - }, - { - Name: "TEST_SERVICE_HOST", - Value: "1.2.3.3", - }, - { - Name: "TEST_SERVICE_PORT", - Value: "8083", - }, - { - Name: "TEST_PORT", - Value: "tcp://1.2.3.3:8083", - }, - { - Name: "TEST_PORT_8083_TCP", - Value: "tcp://1.2.3.3:8083", - }, - { - Name: "TEST_PORT_8083_TCP_PROTO", - Value: "tcp", - }, - { - Name: "TEST_PORT_8083_TCP_PORT", - Value: "8083", - }, - { - Name: "TEST_PORT_8083_TCP_ADDR", - Value: "1.2.3.3", - }, - { - Name: "REPLACE_ME", - Value: "FROM_SECRET", - }, - { - Name: "EXPANSION_TEST", - Value: "FROM_SECRET", - }, - { - Name: "DUPE_TEST", - Value: "ENV_VAR", - }, - { - Name: "p_REPLACE_ME", - Value: "FROM_SECRET", - }, - { - Name: "p_DUPE_TEST", - Value: "SECRET", - }, - }, - }, - { - name: "secret_missing", - ns: "test1", - container: &v1.Container{ - EnvFrom: []v1.EnvFromSource{ - {SecretRef: &v1.SecretEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-secret"}}}, - }, - }, - masterServiceNs: "nothing", - expectedError: true, - }, - { - name: "secret_missing_optional", - ns: "test", - container: &v1.Container{ - EnvFrom: []v1.EnvFromSource{ - {SecretRef: &v1.SecretEnvSource{ - LocalObjectReference: v1.LocalObjectReference{Name: "missing-secret"}, - Optional: &trueVal}}, - }, - }, - masterServiceNs: "nothing", - expectedEnvs: nil, - }, - { - name: "secret_invalid_keys", - ns: "test", - container: &v1.Container{ - EnvFrom: []v1.EnvFromSource{ - {SecretRef: &v1.SecretEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-secret"}}}, - }, - }, - masterServiceNs: "nothing", - secret: &v1.Secret{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: "test1", - Name: "test-secret", - }, - Data: map[string][]byte{ - "1234": []byte("abc"), - "1z": []byte("abc"), - "key.1": []byte("value"), - }, - }, - expectedEnvs: []kubecontainer.EnvVar{ - { - Name: "key.1", - Value: "value", - }, - }, - expectedEvent: "Warning InvalidEnvironmentVariableNames Keys [1234, 1z] from the EnvFrom secret test/test-secret were skipped since they are considered invalid environment variable names.", - }, - { - name: "secret_invalid_keys_valid", - ns: "test", - container: &v1.Container{ - EnvFrom: []v1.EnvFromSource{ - { - Prefix: "p_", - SecretRef: &v1.SecretEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-secret"}}, - }, - }, - }, - masterServiceNs: "", - secret: &v1.Secret{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: "test1", - Name: "test-secret", - }, - Data: map[string][]byte{ - "1234.name": []byte("abc"), - }, - }, - expectedEnvs: []kubecontainer.EnvVar{ - { - Name: "p_1234.name", - Value: "abc", - }, - }, - }, - } - - for _, tc := range testCases { - fakeRecorder := record.NewFakeRecorder(1) - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - testKubelet.kubelet.recorder = fakeRecorder - defer testKubelet.Cleanup() - kl := testKubelet.kubelet - kl.masterServiceNamespace = tc.masterServiceNs - if tc.nilLister { - kl.serviceLister = nil - } else { - kl.serviceLister = testServiceLister{services} - } - - testKubelet.fakeKubeClient.AddReactor("get", "configmaps", func(action core.Action) (bool, runtime.Object, error) { - var err error - if tc.configMap == nil { - err = apierrors.NewNotFound(action.GetResource().GroupResource(), "configmap-name") - } - return true, tc.configMap, err - }) - testKubelet.fakeKubeClient.AddReactor("get", "secrets", func(action core.Action) (bool, runtime.Object, error) { - var err error - if tc.secret == nil { - err = apierrors.NewNotFound(action.GetResource().GroupResource(), "secret-name") - } - return true, tc.secret, err - }) - - testKubelet.fakeKubeClient.AddReactor("get", "secrets", func(action core.Action) (bool, runtime.Object, error) { - var err error - if tc.secret == nil { - err = errors.New("no secret defined") - } - return true, tc.secret, err - }) - - testPod := &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: tc.ns, - Name: "dapi-test-pod-name", - }, - Spec: v1.PodSpec{ - ServiceAccountName: "special", - NodeName: "node-name", - }, - } - podIP := "1.2.3.4" - - result, err := kl.makeEnvironmentVariables(testPod, tc.container, podIP) - select { - case e := <-fakeRecorder.Events: - assert.Equal(t, tc.expectedEvent, e) - default: - assert.Equal(t, "", tc.expectedEvent) - } - if tc.expectedError { - assert.Error(t, err, tc.name) - } else { - assert.NoError(t, err, "[%s]", tc.name) - - sort.Sort(envs(result)) - sort.Sort(envs(tc.expectedEnvs)) - assert.Equal(t, tc.expectedEnvs, result, "[%s] env entries", tc.name) - } - } -} - -func waitingState(cName string) v1.ContainerStatus { - return v1.ContainerStatus{ - Name: cName, - State: v1.ContainerState{ - Waiting: &v1.ContainerStateWaiting{}, - }, - } -} -func waitingStateWithLastTermination(cName string) v1.ContainerStatus { - return v1.ContainerStatus{ - Name: cName, - State: v1.ContainerState{ - Waiting: &v1.ContainerStateWaiting{}, - }, - LastTerminationState: v1.ContainerState{ - Terminated: &v1.ContainerStateTerminated{ - ExitCode: 0, - }, - }, - } -} -func runningState(cName string) v1.ContainerStatus { - return v1.ContainerStatus{ - Name: cName, - State: v1.ContainerState{ - Running: &v1.ContainerStateRunning{}, - }, - } -} -func stoppedState(cName string) v1.ContainerStatus { - return v1.ContainerStatus{ - Name: cName, - State: v1.ContainerState{ - Terminated: &v1.ContainerStateTerminated{}, - }, - } -} -func succeededState(cName string) v1.ContainerStatus { - return v1.ContainerStatus{ - Name: cName, - State: v1.ContainerState{ - Terminated: &v1.ContainerStateTerminated{ - ExitCode: 0, - }, - }, - } -} -func failedState(cName string) v1.ContainerStatus { - return v1.ContainerStatus{ - Name: cName, - State: v1.ContainerState{ - Terminated: &v1.ContainerStateTerminated{ - ExitCode: -1, - }, - }, - } -} - -func TestPodPhaseWithRestartAlways(t *testing.T) { - desiredState := v1.PodSpec{ - NodeName: "machine", - Containers: []v1.Container{ - {Name: "containerA"}, - {Name: "containerB"}, - }, - RestartPolicy: v1.RestartPolicyAlways, - } - - tests := []struct { - pod *v1.Pod - status v1.PodPhase - test string - }{ - {&v1.Pod{Spec: desiredState, Status: v1.PodStatus{}}, v1.PodPending, "waiting"}, - { - &v1.Pod{ - Spec: desiredState, - Status: v1.PodStatus{ - ContainerStatuses: []v1.ContainerStatus{ - runningState("containerA"), - runningState("containerB"), - }, - }, - }, - v1.PodRunning, - "all running", - }, - { - &v1.Pod{ - Spec: desiredState, - Status: v1.PodStatus{ - ContainerStatuses: []v1.ContainerStatus{ - stoppedState("containerA"), - stoppedState("containerB"), - }, - }, - }, - v1.PodRunning, - "all stopped with restart always", - }, - { - &v1.Pod{ - Spec: desiredState, - Status: v1.PodStatus{ - ContainerStatuses: []v1.ContainerStatus{ - runningState("containerA"), - stoppedState("containerB"), - }, - }, - }, - v1.PodRunning, - "mixed state #1 with restart always", - }, - { - &v1.Pod{ - Spec: desiredState, - Status: v1.PodStatus{ - ContainerStatuses: []v1.ContainerStatus{ - runningState("containerA"), - }, - }, - }, - v1.PodPending, - "mixed state #2 with restart always", - }, - { - &v1.Pod{ - Spec: desiredState, - Status: v1.PodStatus{ - ContainerStatuses: []v1.ContainerStatus{ - runningState("containerA"), - waitingState("containerB"), - }, - }, - }, - v1.PodPending, - "mixed state #3 with restart always", - }, - { - &v1.Pod{ - Spec: desiredState, - Status: v1.PodStatus{ - ContainerStatuses: []v1.ContainerStatus{ - runningState("containerA"), - waitingStateWithLastTermination("containerB"), - }, - }, - }, - v1.PodRunning, - "backoff crashloop container with restart always", - }, - } - for _, test := range tests { - status := getPhase(&test.pod.Spec, test.pod.Status.ContainerStatuses) - assert.Equal(t, test.status, status, "[test %s]", test.test) - } -} - -func TestPodPhaseWithRestartNever(t *testing.T) { - desiredState := v1.PodSpec{ - NodeName: "machine", - Containers: []v1.Container{ - {Name: "containerA"}, - {Name: "containerB"}, - }, - RestartPolicy: v1.RestartPolicyNever, - } - - tests := []struct { - pod *v1.Pod - status v1.PodPhase - test string - }{ - {&v1.Pod{Spec: desiredState, Status: v1.PodStatus{}}, v1.PodPending, "waiting"}, - { - &v1.Pod{ - Spec: desiredState, - Status: v1.PodStatus{ - ContainerStatuses: []v1.ContainerStatus{ - runningState("containerA"), - runningState("containerB"), - }, - }, - }, - v1.PodRunning, - "all running with restart never", - }, - { - &v1.Pod{ - Spec: desiredState, - Status: v1.PodStatus{ - ContainerStatuses: []v1.ContainerStatus{ - succeededState("containerA"), - succeededState("containerB"), - }, - }, - }, - v1.PodSucceeded, - "all succeeded with restart never", - }, - { - &v1.Pod{ - Spec: desiredState, - Status: v1.PodStatus{ - ContainerStatuses: []v1.ContainerStatus{ - failedState("containerA"), - failedState("containerB"), - }, - }, - }, - v1.PodFailed, - "all failed with restart never", - }, - { - &v1.Pod{ - Spec: desiredState, - Status: v1.PodStatus{ - ContainerStatuses: []v1.ContainerStatus{ - runningState("containerA"), - succeededState("containerB"), - }, - }, - }, - v1.PodRunning, - "mixed state #1 with restart never", - }, - { - &v1.Pod{ - Spec: desiredState, - Status: v1.PodStatus{ - ContainerStatuses: []v1.ContainerStatus{ - runningState("containerA"), - }, - }, - }, - v1.PodPending, - "mixed state #2 with restart never", - }, - { - &v1.Pod{ - Spec: desiredState, - Status: v1.PodStatus{ - ContainerStatuses: []v1.ContainerStatus{ - runningState("containerA"), - waitingState("containerB"), - }, - }, - }, - v1.PodPending, - "mixed state #3 with restart never", - }, - } - for _, test := range tests { - status := getPhase(&test.pod.Spec, test.pod.Status.ContainerStatuses) - assert.Equal(t, test.status, status, "[test %s]", test.test) - } -} - -func TestPodPhaseWithRestartOnFailure(t *testing.T) { - desiredState := v1.PodSpec{ - NodeName: "machine", - Containers: []v1.Container{ - {Name: "containerA"}, - {Name: "containerB"}, - }, - RestartPolicy: v1.RestartPolicyOnFailure, - } - - tests := []struct { - pod *v1.Pod - status v1.PodPhase - test string - }{ - {&v1.Pod{Spec: desiredState, Status: v1.PodStatus{}}, v1.PodPending, "waiting"}, - { - &v1.Pod{ - Spec: desiredState, - Status: v1.PodStatus{ - ContainerStatuses: []v1.ContainerStatus{ - runningState("containerA"), - runningState("containerB"), - }, - }, - }, - v1.PodRunning, - "all running with restart onfailure", - }, - { - &v1.Pod{ - Spec: desiredState, - Status: v1.PodStatus{ - ContainerStatuses: []v1.ContainerStatus{ - succeededState("containerA"), - succeededState("containerB"), - }, - }, - }, - v1.PodSucceeded, - "all succeeded with restart onfailure", - }, - { - &v1.Pod{ - Spec: desiredState, - Status: v1.PodStatus{ - ContainerStatuses: []v1.ContainerStatus{ - failedState("containerA"), - failedState("containerB"), - }, - }, - }, - v1.PodRunning, - "all failed with restart never", - }, - { - &v1.Pod{ - Spec: desiredState, - Status: v1.PodStatus{ - ContainerStatuses: []v1.ContainerStatus{ - runningState("containerA"), - succeededState("containerB"), - }, - }, - }, - v1.PodRunning, - "mixed state #1 with restart onfailure", - }, - { - &v1.Pod{ - Spec: desiredState, - Status: v1.PodStatus{ - ContainerStatuses: []v1.ContainerStatus{ - runningState("containerA"), - }, - }, - }, - v1.PodPending, - "mixed state #2 with restart onfailure", - }, - { - &v1.Pod{ - Spec: desiredState, - Status: v1.PodStatus{ - ContainerStatuses: []v1.ContainerStatus{ - runningState("containerA"), - waitingState("containerB"), - }, - }, - }, - v1.PodPending, - "mixed state #3 with restart onfailure", - }, - { - &v1.Pod{ - Spec: desiredState, - Status: v1.PodStatus{ - ContainerStatuses: []v1.ContainerStatus{ - runningState("containerA"), - waitingStateWithLastTermination("containerB"), - }, - }, - }, - v1.PodRunning, - "backoff crashloop container with restart onfailure", - }, - } - for _, test := range tests { - status := getPhase(&test.pod.Spec, test.pod.Status.ContainerStatuses) - assert.Equal(t, test.status, status, "[test %s]", test.test) - } -} - -type fakeReadWriteCloser struct{} - -func (f *fakeReadWriteCloser) Write(data []byte) (int, error) { - return 0, nil -} - -func (f *fakeReadWriteCloser) Read(data []byte) (int, error) { - return 0, nil -} - -func (f *fakeReadWriteCloser) Close() error { - return nil -} - -func TestGetExec(t *testing.T) { - const ( - podName = "podFoo" - podNamespace = "nsFoo" - podUID types.UID = "12345678" - containerID = "containerFoo" - tty = true - ) - var ( - podFullName = kubecontainer.GetPodFullName(podWithUIDNameNs(podUID, podName, podNamespace)) - command = []string{"ls"} - ) - - testcases := []struct { - description string - podFullName string - container string - expectError bool - }{{ - description: "success case", - podFullName: podFullName, - container: containerID, - }, { - description: "no such pod", - podFullName: "bar" + podFullName, - container: containerID, - expectError: true, - }, { - description: "no such container", - podFullName: podFullName, - container: "containerBar", - expectError: true, - }} - - for _, tc := range testcases { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - testKubelet.fakeRuntime.PodList = []*containertest.FakePod{ - {Pod: &kubecontainer.Pod{ - ID: podUID, - Name: podName, - Namespace: podNamespace, - Containers: []*kubecontainer.Container{ - {Name: containerID, - ID: kubecontainer.ContainerID{Type: "test", ID: containerID}, - }, - }, - }}, - } - - description := "streaming - " + tc.description - fakeRuntime := &containertest.FakeStreamingRuntime{FakeRuntime: testKubelet.fakeRuntime} - kubelet.containerRuntime = fakeRuntime - kubelet.streamingRuntime = fakeRuntime - - redirect, err := kubelet.GetExec(tc.podFullName, podUID, tc.container, command, remotecommand.Options{}) - if tc.expectError { - assert.Error(t, err, description) - } else { - assert.NoError(t, err, description) - assert.Equal(t, containertest.FakeHost, redirect.Host, description+": redirect") - } - } -} - -func TestGetPortForward(t *testing.T) { - const ( - podName = "podFoo" - podNamespace = "nsFoo" - podUID types.UID = "12345678" - port int32 = 5000 - ) - - testcases := []struct { - description string - podName string - expectError bool - }{{ - description: "success case", - podName: podName, - }, { - description: "no such pod", - podName: "bar", - expectError: true, - }} - - for _, tc := range testcases { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - testKubelet.fakeRuntime.PodList = []*containertest.FakePod{ - {Pod: &kubecontainer.Pod{ - ID: podUID, - Name: podName, - Namespace: podNamespace, - Containers: []*kubecontainer.Container{ - {Name: "foo", - ID: kubecontainer.ContainerID{Type: "test", ID: "foo"}, - }, - }, - }}, - } - - description := "streaming - " + tc.description - fakeRuntime := &containertest.FakeStreamingRuntime{FakeRuntime: testKubelet.fakeRuntime} - kubelet.containerRuntime = fakeRuntime - kubelet.streamingRuntime = fakeRuntime - - redirect, err := kubelet.GetPortForward(tc.podName, podNamespace, podUID, portforward.V4Options{}) - if tc.expectError { - assert.Error(t, err, description) - } else { - assert.NoError(t, err, description) - assert.Equal(t, containertest.FakeHost, redirect.Host, description+": redirect") - } - } -} - -func TestHasHostMountPVC(t *testing.T) { - tests := map[string]struct { - pvError error - pvcError error - expected bool - podHasPVC bool - pvcIsHostPath bool - }{ - "no pvc": {podHasPVC: false, expected: false}, - "error fetching pvc": { - podHasPVC: true, - pvcError: fmt.Errorf("foo"), - expected: false, - }, - "error fetching pv": { - podHasPVC: true, - pvError: fmt.Errorf("foo"), - expected: false, - }, - "host path pvc": { - podHasPVC: true, - pvcIsHostPath: true, - expected: true, - }, - "non host path pvc": { - podHasPVC: true, - pvcIsHostPath: false, - expected: false, - }, - } - - for k, v := range tests { - testKubelet := newTestKubelet(t, false) - defer testKubelet.Cleanup() - pod := &v1.Pod{ - Spec: v1.PodSpec{}, - } - - volumeToReturn := &v1.PersistentVolume{ - Spec: v1.PersistentVolumeSpec{}, - } - - if v.podHasPVC { - pod.Spec.Volumes = []v1.Volume{ - { - VolumeSource: v1.VolumeSource{ - PersistentVolumeClaim: &v1.PersistentVolumeClaimVolumeSource{}, - }, - }, - } - - if v.pvcIsHostPath { - volumeToReturn.Spec.PersistentVolumeSource = v1.PersistentVolumeSource{ - HostPath: &v1.HostPathVolumeSource{}, - } - } - - } - - testKubelet.fakeKubeClient.AddReactor("get", "persistentvolumeclaims", func(action core.Action) (bool, runtime.Object, error) { - return true, &v1.PersistentVolumeClaim{ - Spec: v1.PersistentVolumeClaimSpec{ - VolumeName: "foo", - }, - }, v.pvcError - }) - testKubelet.fakeKubeClient.AddReactor("get", "persistentvolumes", func(action core.Action) (bool, runtime.Object, error) { - return true, volumeToReturn, v.pvError - }) - - actual := testKubelet.kubelet.hasHostMountPVC(pod) - if actual != v.expected { - t.Errorf("%s expected %t but got %t", k, v.expected, actual) - } - - } -} - -func TestHasNonNamespacedCapability(t *testing.T) { - createPodWithCap := func(caps []v1.Capability) *v1.Pod { - pod := &v1.Pod{ - Spec: v1.PodSpec{ - Containers: []v1.Container{{}}, - }, - } - - if len(caps) > 0 { - pod.Spec.Containers[0].SecurityContext = &v1.SecurityContext{ - Capabilities: &v1.Capabilities{ - Add: caps, - }, - } - } - return pod - } - - nilCaps := createPodWithCap([]v1.Capability{v1.Capability("foo")}) - nilCaps.Spec.Containers[0].SecurityContext = nil - - tests := map[string]struct { - pod *v1.Pod - expected bool - }{ - "nil security contxt": {createPodWithCap(nil), false}, - "nil caps": {nilCaps, false}, - "namespaced cap": {createPodWithCap([]v1.Capability{v1.Capability("foo")}), false}, - "non-namespaced cap MKNOD": {createPodWithCap([]v1.Capability{v1.Capability("MKNOD")}), true}, - "non-namespaced cap SYS_TIME": {createPodWithCap([]v1.Capability{v1.Capability("SYS_TIME")}), true}, - "non-namespaced cap SYS_MODULE": {createPodWithCap([]v1.Capability{v1.Capability("SYS_MODULE")}), true}, - } - - for k, v := range tests { - actual := hasNonNamespacedCapability(v.pod) - if actual != v.expected { - t.Errorf("%s failed, expected %t but got %t", k, v.expected, actual) - } - } -} - -func TestHasHostVolume(t *testing.T) { - pod := &v1.Pod{ - Spec: v1.PodSpec{ - Volumes: []v1.Volume{ - { - VolumeSource: v1.VolumeSource{ - HostPath: &v1.HostPathVolumeSource{}, - }, - }, - }, - }, - } - - result := hasHostVolume(pod) - if !result { - t.Errorf("expected host volume to enable host user namespace") - } - - pod.Spec.Volumes[0].VolumeSource.HostPath = nil - result = hasHostVolume(pod) - if result { - t.Errorf("expected nil host volume to not enable host user namespace") - } -} - -func TestHasHostNamespace(t *testing.T) { - tests := map[string]struct { - ps v1.PodSpec - expected bool - }{ - "nil psc": { - ps: v1.PodSpec{}, - expected: false}, - - "host pid true": { - ps: v1.PodSpec{ - HostPID: true, - SecurityContext: &v1.PodSecurityContext{}, - }, - expected: true, - }, - "host ipc true": { - ps: v1.PodSpec{ - HostIPC: true, - SecurityContext: &v1.PodSecurityContext{}, - }, - expected: true, - }, - "host net true": { - ps: v1.PodSpec{ - HostNetwork: true, - SecurityContext: &v1.PodSecurityContext{}, - }, - expected: true, - }, - "no host ns": { - ps: v1.PodSpec{ - SecurityContext: &v1.PodSecurityContext{}, - }, - expected: false, - }, - } - - for k, v := range tests { - pod := &v1.Pod{ - Spec: v.ps, - } - actual := hasHostNamespace(pod) - if actual != v.expected { - t.Errorf("%s failed, expected %t but got %t", k, v.expected, actual) - } - } -} - -func TestTruncatePodHostname(t *testing.T) { - for c, test := range map[string]struct { - input string - output string - }{ - "valid hostname": { - input: "test.pod.hostname", - output: "test.pod.hostname", - }, - "too long hostname": { - input: "1234567.1234567.1234567.1234567.1234567.1234567.1234567.1234567.1234567.", // 8*9=72 chars - output: "1234567.1234567.1234567.1234567.1234567.1234567.1234567.1234567", //8*8-1=63 chars - }, - "hostname end with .": { - input: "1234567.1234567.1234567.1234567.1234567.1234567.1234567.123456.1234567.", // 8*9-1=71 chars - output: "1234567.1234567.1234567.1234567.1234567.1234567.1234567.123456", //8*8-2=62 chars - }, - "hostname end with -": { - input: "1234567.1234567.1234567.1234567.1234567.1234567.1234567.123456-1234567.", // 8*9-1=71 chars - output: "1234567.1234567.1234567.1234567.1234567.1234567.1234567.123456", //8*8-2=62 chars - }, - } { - t.Logf("TestCase: %q", c) - output, err := truncatePodHostnameIfNeeded("test-pod", test.input) - assert.NoError(t, err) - assert.Equal(t, test.output, output) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods_windows_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods_windows_test.go deleted file mode 100644 index 628c2ecd..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods_windows_test.go +++ /dev/null @@ -1,102 +0,0 @@ -// +build windows - -/* -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 kubelet - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "k8s.io/api/core/v1" - kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - "k8s.io/kubernetes/pkg/util/mount" -) - -func TestMakeMountsWindows(t *testing.T) { - container := v1.Container{ - VolumeMounts: []v1.VolumeMount{ - { - MountPath: "c:/etc/hosts", - Name: "disk", - ReadOnly: false, - }, - { - MountPath: "c:/mnt/path3", - Name: "disk", - ReadOnly: true, - }, - { - MountPath: "c:/mnt/path4", - Name: "disk4", - ReadOnly: false, - }, - { - MountPath: "c:/mnt/path5", - Name: "disk5", - ReadOnly: false, - }, - }, - } - - podVolumes := kubecontainer.VolumeMap{ - "disk": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "c:/mnt/disk"}}, - "disk4": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "c:/mnt/host"}}, - "disk5": kubecontainer.VolumeInfo{Mounter: &stubVolume{path: "c:/var/lib/kubelet/podID/volumes/empty/disk5"}}, - } - - pod := v1.Pod{ - Spec: v1.PodSpec{ - HostNetwork: true, - }, - } - - fm := &mount.FakeMounter{} - mounts, _, _ := makeMounts(&pod, "/pod", &container, "fakepodname", "", "", podVolumes, fm, nil) - - expectedMounts := []kubecontainer.Mount{ - { - Name: "disk", - ContainerPath: "c:/etc/hosts", - HostPath: "c:/mnt/disk", - ReadOnly: false, - SELinuxRelabel: false, - }, - { - Name: "disk", - ContainerPath: "c:/mnt/path3", - HostPath: "c:/mnt/disk", - ReadOnly: true, - SELinuxRelabel: false, - }, - { - Name: "disk4", - ContainerPath: "c:/mnt/path4", - HostPath: "c:/mnt/host", - ReadOnly: false, - SELinuxRelabel: false, - }, - { - Name: "disk5", - ContainerPath: "c:/mnt/path5", - HostPath: "c:/var/lib/kubelet/podID/volumes/empty/disk5", - ReadOnly: false, - SELinuxRelabel: false, - }, - } - assert.Equal(t, expectedMounts, mounts, "mounts of container %+v", container) -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources.go deleted file mode 100644 index dc47a858..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources.go +++ /dev/null @@ -1,57 +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 kubelet - -import ( - "fmt" - - "github.com/golang/glog" - - "k8s.io/api/core/v1" - "k8s.io/kubernetes/pkg/api/v1/resource" -) - -// defaultPodLimitsForDownwardAPI copies the input pod, and optional container, -// and applies default resource limits. it returns a copy of the input pod, -// and a copy of the input container (if specified) with default limits -// applied. if a container has no limit specified, it will default the limit to -// the node allocatable. -// TODO: if/when we have pod level resources, we need to update this function -// to use those limits instead of node allocatable. -func (kl *Kubelet) defaultPodLimitsForDownwardAPI(pod *v1.Pod, container *v1.Container) (*v1.Pod, *v1.Container, error) { - if pod == nil { - return nil, nil, fmt.Errorf("invalid input, pod cannot be nil") - } - - node, err := kl.getNodeAnyWay() - if err != nil { - return nil, nil, fmt.Errorf("failed to find node object, expected a node") - } - allocatable := node.Status.Allocatable - glog.Infof("allocatable: %v", allocatable) - outputPod := pod.DeepCopy() - for idx := range outputPod.Spec.Containers { - resource.MergeContainerResourceLimits(&outputPod.Spec.Containers[idx], allocatable) - } - - var outputContainer *v1.Container - if container != nil { - outputContainer = container.DeepCopy() - resource.MergeContainerResourceLimits(outputContainer, allocatable) - } - return outputPod, outputContainer, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources_test.go deleted file mode 100644 index c5833b25..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources_test.go +++ /dev/null @@ -1,111 +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 kubelet - -import ( - "testing" - - "github.com/stretchr/testify/assert" - - cadvisorapi "github.com/google/cadvisor/info/v1" - cadvisorapiv2 "github.com/google/cadvisor/info/v2" - "k8s.io/api/core/v1" - apiequality "k8s.io/apimachinery/pkg/api/equality" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func TestPodResourceLimitsDefaulting(t *testing.T) { - cpuCores := resource.MustParse("10") - memoryCapacity := resource.MustParse("10Gi") - tk := newTestKubelet(t, true) - defer tk.Cleanup() - tk.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) - tk.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{ - NumCores: int(cpuCores.Value()), - MemoryCapacity: uint64(memoryCapacity.Value()), - }, nil) - tk.fakeCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) - tk.fakeCadvisor.On("RootFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) - tk.kubelet.nodeInfo = &testNodeInfo{ - nodes: []*v1.Node{ - { - ObjectMeta: metav1.ObjectMeta{ - Name: string(tk.kubelet.nodeName), - }, - Status: v1.NodeStatus{ - Allocatable: v1.ResourceList{ - v1.ResourceCPU: resource.MustParse("6"), - v1.ResourceMemory: resource.MustParse("4Gi"), - }, - }, - }, - }, - } - cases := []struct { - pod *v1.Pod - expected *v1.Pod - }{ - { - pod: getPod("0", "0"), - expected: getPod("6", "4Gi"), - }, - { - pod: getPod("1", "0"), - expected: getPod("1", "4Gi"), - }, - { - pod: getPod("", ""), - expected: getPod("6", "4Gi"), - }, - { - pod: getPod("0", "1Mi"), - expected: getPod("6", "1Mi"), - }, - } - as := assert.New(t) - for idx, tc := range cases { - actual, _, err := tk.kubelet.defaultPodLimitsForDownwardAPI(tc.pod, nil) - as.Nil(err, "failed to default pod limits: %v", err) - if !apiequality.Semantic.DeepEqual(tc.expected, actual) { - as.Fail("test case [%d] failed. Expected: %+v, Got: %+v", idx, tc.expected, actual) - } - } -} - -func getPod(cpuLimit, memoryLimit string) *v1.Pod { - resources := v1.ResourceRequirements{} - if cpuLimit != "" || memoryLimit != "" { - resources.Limits = make(v1.ResourceList) - } - if cpuLimit != "" { - resources.Limits[v1.ResourceCPU] = resource.MustParse(cpuLimit) - } - if memoryLimit != "" { - resources.Limits[v1.ResourceMemory] = resource.MustParse(memoryLimit) - } - return &v1.Pod{ - Spec: v1.PodSpec{ - Containers: []v1.Container{ - { - Name: "foo", - Resources: resources, - }, - }, - }, - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_test.go deleted file mode 100644 index fd18b128..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_test.go +++ /dev/null @@ -1,2263 +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 kubelet - -import ( - "fmt" - "io/ioutil" - "os" - "sort" - "testing" - "time" - - cadvisorapi "github.com/google/cadvisor/info/v1" - cadvisorapiv2 "github.com/google/cadvisor/info/v2" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/clock" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/kubernetes/fake" - "k8s.io/client-go/tools/record" - "k8s.io/client-go/util/flowcontrol" - "k8s.io/kubernetes/pkg/capabilities" - cadvisortest "k8s.io/kubernetes/pkg/kubelet/cadvisor/testing" - "k8s.io/kubernetes/pkg/kubelet/cm" - "k8s.io/kubernetes/pkg/kubelet/config" - "k8s.io/kubernetes/pkg/kubelet/configmap" - kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" - "k8s.io/kubernetes/pkg/kubelet/eviction" - "k8s.io/kubernetes/pkg/kubelet/images" - "k8s.io/kubernetes/pkg/kubelet/lifecycle" - "k8s.io/kubernetes/pkg/kubelet/logs" - "k8s.io/kubernetes/pkg/kubelet/pleg" - kubepod "k8s.io/kubernetes/pkg/kubelet/pod" - podtest "k8s.io/kubernetes/pkg/kubelet/pod/testing" - proberesults "k8s.io/kubernetes/pkg/kubelet/prober/results" - probetest "k8s.io/kubernetes/pkg/kubelet/prober/testing" - "k8s.io/kubernetes/pkg/kubelet/secret" - serverstats "k8s.io/kubernetes/pkg/kubelet/server/stats" - "k8s.io/kubernetes/pkg/kubelet/stats" - "k8s.io/kubernetes/pkg/kubelet/status" - statustest "k8s.io/kubernetes/pkg/kubelet/status/testing" - "k8s.io/kubernetes/pkg/kubelet/token" - kubetypes "k8s.io/kubernetes/pkg/kubelet/types" - "k8s.io/kubernetes/pkg/kubelet/util/queue" - kubeletvolume "k8s.io/kubernetes/pkg/kubelet/volumemanager" - schedulercache "k8s.io/kubernetes/pkg/scheduler/cache" - "k8s.io/kubernetes/pkg/util/mount" - "k8s.io/kubernetes/pkg/volume" - "k8s.io/kubernetes/pkg/volume/aws_ebs" - "k8s.io/kubernetes/pkg/volume/azure_dd" - "k8s.io/kubernetes/pkg/volume/gce_pd" - _ "k8s.io/kubernetes/pkg/volume/host_path" - volumetest "k8s.io/kubernetes/pkg/volume/testing" - "k8s.io/kubernetes/pkg/volume/util" -) - -func init() { - utilruntime.ReallyCrash = true -} - -const ( - testKubeletHostname = "127.0.0.1" - testKubeletHostIP = "127.0.0.1" - - // TODO(harry) any global place for these two? - // Reasonable size range of all container images. 90%ile of images on dockerhub drops into this range. - minImgSize int64 = 23 * 1024 * 1024 - maxImgSize int64 = 1000 * 1024 * 1024 -) - -// fakeImageGCManager is a fake image gc manager for testing. It will return image -// list from fake runtime directly instead of caching it. -type fakeImageGCManager struct { - fakeImageService kubecontainer.ImageService - images.ImageGCManager -} - -func (f *fakeImageGCManager) GetImageList() ([]kubecontainer.Image, error) { - return f.fakeImageService.ListImages() -} - -type TestKubelet struct { - kubelet *Kubelet - fakeRuntime *containertest.FakeRuntime - fakeCadvisor *cadvisortest.Mock - fakeKubeClient *fake.Clientset - fakeMirrorClient *podtest.FakeMirrorClient - fakeClock *clock.FakeClock - mounter mount.Interface - volumePlugin *volumetest.FakeVolumePlugin -} - -func (tk *TestKubelet) Cleanup() { - if tk.kubelet != nil { - os.RemoveAll(tk.kubelet.rootDirectory) - } -} - -func (tk *TestKubelet) chainMock() { - tk.fakeCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) - tk.fakeCadvisor.On("RootFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) -} - -// newTestKubelet returns test kubelet with two images. -func newTestKubelet(t *testing.T, controllerAttachDetachEnabled bool) *TestKubelet { - imageList := []kubecontainer.Image{ - { - ID: "abc", - RepoTags: []string{"k8s.gcr.io:v1", "k8s.gcr.io:v2"}, - Size: 123, - }, - { - ID: "efg", - RepoTags: []string{"k8s.gcr.io:v3", "k8s.gcr.io:v4"}, - Size: 456, - }, - } - return newTestKubeletWithImageList(t, imageList, controllerAttachDetachEnabled, true /*initFakeVolumePlugin*/) -} - -func newTestKubeletWithoutFakeVolumePlugin(t *testing.T, controllerAttachDetachEnabled bool) *TestKubelet { - imageList := []kubecontainer.Image{ - { - ID: "abc", - RepoTags: []string{"k8s.gcr.io:v1", "k8s.gcr.io:v2"}, - Size: 123, - }, - { - ID: "efg", - RepoTags: []string{"k8s.gcr.io:v3", "k8s.gcr.io:v4"}, - Size: 456, - }, - } - return newTestKubeletWithImageList(t, imageList, controllerAttachDetachEnabled, false /*initFakeVolumePlugin*/) -} - -func newTestKubeletWithImageList( - t *testing.T, - imageList []kubecontainer.Image, - controllerAttachDetachEnabled bool, - initFakeVolumePlugin bool) *TestKubelet { - fakeRuntime := &containertest.FakeRuntime{} - fakeRuntime.RuntimeType = "test" - fakeRuntime.VersionInfo = "1.5.0" - fakeRuntime.ImageList = imageList - // Set ready conditions by default. - fakeRuntime.RuntimeStatus = &kubecontainer.RuntimeStatus{ - Conditions: []kubecontainer.RuntimeCondition{ - {Type: "RuntimeReady", Status: true}, - {Type: "NetworkReady", Status: true}, - }, - } - - fakeRecorder := &record.FakeRecorder{} - fakeKubeClient := &fake.Clientset{} - kubelet := &Kubelet{} - kubelet.recorder = fakeRecorder - kubelet.kubeClient = fakeKubeClient - kubelet.heartbeatClient = fakeKubeClient.CoreV1() - kubelet.os = &containertest.FakeOS{} - kubelet.mounter = &mount.FakeMounter{} - - kubelet.hostname = testKubeletHostname - kubelet.nodeName = types.NodeName(testKubeletHostname) - kubelet.runtimeState = newRuntimeState(maxWaitForContainerRuntime) - kubelet.runtimeState.setNetworkState(nil) - if tempDir, err := ioutil.TempDir("/tmp", "kubelet_test."); err != nil { - t.Fatalf("can't make a temp rootdir: %v", err) - } else { - kubelet.rootDirectory = tempDir - } - if err := os.MkdirAll(kubelet.rootDirectory, 0750); err != nil { - t.Fatalf("can't mkdir(%q): %v", kubelet.rootDirectory, err) - } - kubelet.sourcesReady = config.NewSourcesReady(func(_ sets.String) bool { return true }) - kubelet.masterServiceNamespace = metav1.NamespaceDefault - kubelet.serviceLister = testServiceLister{} - kubelet.nodeInfo = testNodeInfo{ - nodes: []*v1.Node{ - { - ObjectMeta: metav1.ObjectMeta{ - Name: string(kubelet.nodeName), - }, - Status: v1.NodeStatus{ - Conditions: []v1.NodeCondition{ - { - Type: v1.NodeReady, - Status: v1.ConditionTrue, - Reason: "Ready", - Message: "Node ready", - }, - }, - Addresses: []v1.NodeAddress{ - { - Type: v1.NodeInternalIP, - Address: testKubeletHostIP, - }, - }, - }, - }, - }, - } - kubelet.recorder = fakeRecorder - if err := kubelet.setupDataDirs(); err != nil { - t.Fatalf("can't initialize kubelet data dirs: %v", err) - } - kubelet.daemonEndpoints = &v1.NodeDaemonEndpoints{} - - mockCadvisor := &cadvisortest.Mock{} - kubelet.cadvisor = mockCadvisor - - fakeMirrorClient := podtest.NewFakeMirrorClient() - secretManager := secret.NewSimpleSecretManager(kubelet.kubeClient) - kubelet.secretManager = secretManager - configMapManager := configmap.NewSimpleConfigMapManager(kubelet.kubeClient) - kubelet.configMapManager = configMapManager - kubelet.podManager = kubepod.NewBasicPodManager(fakeMirrorClient, kubelet.secretManager, kubelet.configMapManager, podtest.NewMockCheckpointManager()) - kubelet.statusManager = status.NewManager(fakeKubeClient, kubelet.podManager, &statustest.FakePodDeletionSafetyProvider{}) - - kubelet.containerRuntime = fakeRuntime - kubelet.runtimeCache = containertest.NewFakeRuntimeCache(kubelet.containerRuntime) - kubelet.reasonCache = NewReasonCache() - kubelet.podCache = containertest.NewFakeCache(kubelet.containerRuntime) - kubelet.podWorkers = &fakePodWorkers{ - syncPodFn: kubelet.syncPod, - cache: kubelet.podCache, - t: t, - } - - kubelet.probeManager = probetest.FakeManager{} - kubelet.livenessManager = proberesults.NewManager() - - kubelet.containerManager = cm.NewStubContainerManager() - fakeNodeRef := &v1.ObjectReference{ - Kind: "Node", - Name: testKubeletHostname, - UID: types.UID(testKubeletHostname), - Namespace: "", - } - - volumeStatsAggPeriod := time.Second * 10 - kubelet.resourceAnalyzer = serverstats.NewResourceAnalyzer(kubelet, volumeStatsAggPeriod) - - kubelet.StatsProvider = stats.NewCadvisorStatsProvider( - kubelet.cadvisor, - kubelet.resourceAnalyzer, - kubelet.podManager, - kubelet.runtimeCache, - fakeRuntime) - fakeImageGCPolicy := images.ImageGCPolicy{ - HighThresholdPercent: 90, - LowThresholdPercent: 80, - } - imageGCManager, err := images.NewImageGCManager(fakeRuntime, kubelet.StatsProvider, fakeRecorder, fakeNodeRef, fakeImageGCPolicy, "") - assert.NoError(t, err) - kubelet.imageManager = &fakeImageGCManager{ - fakeImageService: fakeRuntime, - ImageGCManager: imageGCManager, - } - kubelet.containerLogManager = logs.NewStubContainerLogManager() - containerGCPolicy := kubecontainer.ContainerGCPolicy{ - MinAge: time.Duration(0), - MaxPerPodContainer: 1, - MaxContainers: -1, - } - containerGC, err := kubecontainer.NewContainerGC(fakeRuntime, containerGCPolicy, kubelet.sourcesReady) - assert.NoError(t, err) - kubelet.containerGC = containerGC - - fakeClock := clock.NewFakeClock(time.Now()) - kubelet.backOff = flowcontrol.NewBackOff(time.Second, time.Minute) - kubelet.backOff.Clock = fakeClock - kubelet.podKillingCh = make(chan *kubecontainer.PodPair, 20) - kubelet.resyncInterval = 10 * time.Second - kubelet.workQueue = queue.NewBasicWorkQueue(fakeClock) - // Relist period does not affect the tests. - kubelet.pleg = pleg.NewGenericPLEG(fakeRuntime, 100, time.Hour, nil, clock.RealClock{}) - kubelet.clock = fakeClock - kubelet.setNodeStatusFuncs = kubelet.defaultNodeStatusFuncs() - - nodeRef := &v1.ObjectReference{ - Kind: "Node", - Name: string(kubelet.nodeName), - UID: types.UID(kubelet.nodeName), - Namespace: "", - } - // setup eviction manager - evictionManager, evictionAdmitHandler := eviction.NewManager(kubelet.resourceAnalyzer, eviction.Config{}, killPodNow(kubelet.podWorkers, fakeRecorder), kubelet.imageManager, kubelet.containerGC, fakeRecorder, nodeRef, kubelet.clock) - - kubelet.evictionManager = evictionManager - kubelet.admitHandlers.AddPodAdmitHandler(evictionAdmitHandler) - // Add this as cleanup predicate pod admitter - kubelet.admitHandlers.AddPodAdmitHandler(lifecycle.NewPredicateAdmitHandler(kubelet.getNodeAnyWay, lifecycle.NewAdmissionFailureHandlerStub(), kubelet.containerManager.UpdatePluginResources)) - - allPlugins := []volume.VolumePlugin{} - plug := &volumetest.FakeVolumePlugin{PluginName: "fake", Host: nil} - if initFakeVolumePlugin { - allPlugins = append(allPlugins, plug) - } else { - allPlugins = append(allPlugins, aws_ebs.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, gce_pd.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, azure_dd.ProbeVolumePlugins()...) - } - - var prober volume.DynamicPluginProber = nil // TODO (#51147) inject mock - kubelet.volumePluginMgr, err = - NewInitializedVolumePluginMgr(kubelet, kubelet.secretManager, kubelet.configMapManager, token.NewManager(kubelet.kubeClient), allPlugins, prober) - require.NoError(t, err, "Failed to initialize VolumePluginMgr") - - kubelet.mounter = &mount.FakeMounter{} - kubelet.volumeManager = kubeletvolume.NewVolumeManager( - controllerAttachDetachEnabled, - kubelet.nodeName, - kubelet.podManager, - kubelet.statusManager, - fakeKubeClient, - kubelet.volumePluginMgr, - fakeRuntime, - kubelet.mounter, - kubelet.getPodsDir(), - kubelet.recorder, - false, /* experimentalCheckNodeCapabilitiesBeforeMount*/ - false /* keepTerminatedPodVolumes */) - - // enable active deadline handler - activeDeadlineHandler, err := newActiveDeadlineHandler(kubelet.statusManager, kubelet.recorder, kubelet.clock) - require.NoError(t, err, "Can't initialize active deadline handler") - - kubelet.AddPodSyncLoopHandler(activeDeadlineHandler) - kubelet.AddPodSyncHandler(activeDeadlineHandler) - return &TestKubelet{kubelet, fakeRuntime, mockCadvisor, fakeKubeClient, fakeMirrorClient, fakeClock, nil, plug} -} - -func newTestPods(count int) []*v1.Pod { - pods := make([]*v1.Pod, count) - for i := 0; i < count; i++ { - pods[i] = &v1.Pod{ - Spec: v1.PodSpec{ - HostNetwork: true, - }, - ObjectMeta: metav1.ObjectMeta{ - UID: types.UID(10000 + i), - Name: fmt.Sprintf("pod%d", i), - }, - } - } - return pods -} - -func TestSyncLoopAbort(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - kubelet.runtimeState.setRuntimeSync(time.Now()) - // The syncLoop waits on time.After(resyncInterval), set it really big so that we don't race for - // the channel close - kubelet.resyncInterval = time.Second * 30 - - ch := make(chan kubetypes.PodUpdate) - close(ch) - - // sanity check (also prevent this test from hanging in the next step) - ok := kubelet.syncLoopIteration(ch, kubelet, make(chan time.Time), make(chan time.Time), make(chan *pleg.PodLifecycleEvent, 1)) - require.False(t, ok, "Expected syncLoopIteration to return !ok since update chan was closed") - - // this should terminate immediately; if it hangs then the syncLoopIteration isn't aborting properly - kubelet.syncLoop(ch, kubelet) -} - -func TestSyncPodsStartPod(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - fakeRuntime := testKubelet.fakeRuntime - pods := []*v1.Pod{ - podWithUIDNameNsSpec("12345678", "foo", "new", v1.PodSpec{ - Containers: []v1.Container{ - {Name: "bar"}, - }, - }), - } - kubelet.podManager.SetPods(pods) - kubelet.HandlePodSyncs(pods) - fakeRuntime.AssertStartedPods([]string{string(pods[0].UID)}) -} - -func TestSyncPodsDeletesWhenSourcesAreReady(t *testing.T) { - ready := false - - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - fakeRuntime := testKubelet.fakeRuntime - kubelet := testKubelet.kubelet - kubelet.sourcesReady = config.NewSourcesReady(func(_ sets.String) bool { return ready }) - - fakeRuntime.PodList = []*containertest.FakePod{ - {Pod: &kubecontainer.Pod{ - ID: "12345678", - Name: "foo", - Namespace: "new", - Containers: []*kubecontainer.Container{ - {Name: "bar"}, - }, - }}, - } - kubelet.HandlePodCleanups() - // Sources are not ready yet. Don't remove any pods. - fakeRuntime.AssertKilledPods([]string{}) - - ready = true - kubelet.HandlePodCleanups() - - // Sources are ready. Remove unwanted pods. - fakeRuntime.AssertKilledPods([]string{"12345678"}) -} - -type testNodeLister struct { - nodes []*v1.Node -} - -type testNodeInfo struct { - nodes []*v1.Node -} - -func (ls testNodeInfo) GetNodeInfo(id string) (*v1.Node, error) { - for _, node := range ls.nodes { - if node.Name == id { - return node, nil - } - } - return nil, fmt.Errorf("Node with name: %s does not exist", id) -} - -func (ls testNodeLister) List(selector labels.Selector) ([]*v1.Node, error) { - return ls.nodes, nil -} - -func checkPodStatus(t *testing.T, kl *Kubelet, pod *v1.Pod, phase v1.PodPhase) { - status, found := kl.statusManager.GetPodStatus(pod.UID) - require.True(t, found, "Status of pod %q is not found in the status map", pod.UID) - require.Equal(t, phase, status.Phase) -} - -// Tests that we handle port conflicts correctly by setting the failed status in status map. -func TestHandlePortConflicts(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - kl := testKubelet.kubelet - - kl.nodeInfo = testNodeInfo{nodes: []*v1.Node{ - { - ObjectMeta: metav1.ObjectMeta{Name: string(kl.nodeName)}, - Status: v1.NodeStatus{ - Allocatable: v1.ResourceList{ - v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), - }, - }, - }, - }} - - spec := v1.PodSpec{NodeName: string(kl.nodeName), Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 80}}}}} - pods := []*v1.Pod{ - podWithUIDNameNsSpec("123456789", "newpod", "foo", spec), - podWithUIDNameNsSpec("987654321", "oldpod", "foo", spec), - } - // Make sure the Pods are in the reverse order of creation time. - pods[1].CreationTimestamp = metav1.NewTime(time.Now()) - pods[0].CreationTimestamp = metav1.NewTime(time.Now().Add(1 * time.Second)) - // The newer pod should be rejected. - notfittingPod := pods[0] - fittingPod := pods[1] - - kl.HandlePodAdditions(pods) - - // Check pod status stored in the status map. - checkPodStatus(t, kl, notfittingPod, v1.PodFailed) - checkPodStatus(t, kl, fittingPod, v1.PodPending) -} - -// Tests that we handle host name conflicts correctly by setting the failed status in status map. -func TestHandleHostNameConflicts(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - kl := testKubelet.kubelet - - kl.nodeInfo = testNodeInfo{nodes: []*v1.Node{ - { - ObjectMeta: metav1.ObjectMeta{Name: "127.0.0.1"}, - Status: v1.NodeStatus{ - Allocatable: v1.ResourceList{ - v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), - }, - }, - }, - }} - - // default NodeName in test is 127.0.0.1 - pods := []*v1.Pod{ - podWithUIDNameNsSpec("123456789", "notfittingpod", "foo", v1.PodSpec{NodeName: "127.0.0.2"}), - podWithUIDNameNsSpec("987654321", "fittingpod", "foo", v1.PodSpec{NodeName: "127.0.0.1"}), - } - - notfittingPod := pods[0] - fittingPod := pods[1] - - kl.HandlePodAdditions(pods) - - // Check pod status stored in the status map. - checkPodStatus(t, kl, notfittingPod, v1.PodFailed) - checkPodStatus(t, kl, fittingPod, v1.PodPending) -} - -// Tests that we handle not matching labels selector correctly by setting the failed status in status map. -func TestHandleNodeSelector(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - kl := testKubelet.kubelet - nodes := []*v1.Node{ - { - ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname, Labels: map[string]string{"key": "B"}}, - Status: v1.NodeStatus{ - Allocatable: v1.ResourceList{ - v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), - }, - }, - }, - } - kl.nodeInfo = testNodeInfo{nodes: nodes} - pods := []*v1.Pod{ - podWithUIDNameNsSpec("123456789", "podA", "foo", v1.PodSpec{NodeSelector: map[string]string{"key": "A"}}), - podWithUIDNameNsSpec("987654321", "podB", "foo", v1.PodSpec{NodeSelector: map[string]string{"key": "B"}}), - } - // The first pod should be rejected. - notfittingPod := pods[0] - fittingPod := pods[1] - - kl.HandlePodAdditions(pods) - - // Check pod status stored in the status map. - checkPodStatus(t, kl, notfittingPod, v1.PodFailed) - checkPodStatus(t, kl, fittingPod, v1.PodPending) -} - -// Tests that we handle exceeded resources correctly by setting the failed status in status map. -func TestHandleMemExceeded(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - kl := testKubelet.kubelet - nodes := []*v1.Node{ - {ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, - Status: v1.NodeStatus{Capacity: v1.ResourceList{}, Allocatable: v1.ResourceList{ - v1.ResourceCPU: *resource.NewMilliQuantity(10, resource.DecimalSI), - v1.ResourceMemory: *resource.NewQuantity(100, resource.BinarySI), - v1.ResourcePods: *resource.NewQuantity(40, resource.DecimalSI), - }}}, - } - kl.nodeInfo = testNodeInfo{nodes: nodes} - - spec := v1.PodSpec{NodeName: string(kl.nodeName), - Containers: []v1.Container{{Resources: v1.ResourceRequirements{ - Requests: v1.ResourceList{ - v1.ResourceMemory: resource.MustParse("90"), - }, - }}}, - } - pods := []*v1.Pod{ - podWithUIDNameNsSpec("123456789", "newpod", "foo", spec), - podWithUIDNameNsSpec("987654321", "oldpod", "foo", spec), - } - // Make sure the Pods are in the reverse order of creation time. - pods[1].CreationTimestamp = metav1.NewTime(time.Now()) - pods[0].CreationTimestamp = metav1.NewTime(time.Now().Add(1 * time.Second)) - // The newer pod should be rejected. - notfittingPod := pods[0] - fittingPod := pods[1] - - kl.HandlePodAdditions(pods) - - // Check pod status stored in the status map. - checkPodStatus(t, kl, notfittingPod, v1.PodFailed) - checkPodStatus(t, kl, fittingPod, v1.PodPending) -} - -// Tests that we handle result of interface UpdatePluginResources correctly -// by setting corresponding status in status map. -func TestHandlePluginResources(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - kl := testKubelet.kubelet - - adjustedResource := v1.ResourceName("domain1.com/adjustedResource") - emptyResource := v1.ResourceName("domain2.com/emptyResource") - missingResource := v1.ResourceName("domain2.com/missingResource") - failedResource := v1.ResourceName("domain2.com/failedResource") - resourceQuantity0 := *resource.NewQuantity(int64(0), resource.DecimalSI) - resourceQuantity1 := *resource.NewQuantity(int64(1), resource.DecimalSI) - resourceQuantity2 := *resource.NewQuantity(int64(2), resource.DecimalSI) - resourceQuantityInvalid := *resource.NewQuantity(int64(-1), resource.DecimalSI) - allowedPodQuantity := *resource.NewQuantity(int64(10), resource.DecimalSI) - nodes := []*v1.Node{ - {ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, - Status: v1.NodeStatus{Capacity: v1.ResourceList{}, Allocatable: v1.ResourceList{ - adjustedResource: resourceQuantity1, - emptyResource: resourceQuantity0, - v1.ResourcePods: allowedPodQuantity, - }}}, - } - kl.nodeInfo = testNodeInfo{nodes: nodes} - - updatePluginResourcesFunc := func(node *schedulercache.NodeInfo, attrs *lifecycle.PodAdmitAttributes) error { - // Maps from resourceName to the value we use to set node.allocatableResource[resourceName]. - // A resource with invalid value (< 0) causes the function to return an error - // to emulate resource Allocation failure. - // Resources not contained in this map will have their node.allocatableResource - // quantity unchanged. - updateResourceMap := map[v1.ResourceName]resource.Quantity{ - adjustedResource: resourceQuantity2, - emptyResource: resourceQuantity0, - failedResource: resourceQuantityInvalid, - } - pod := attrs.Pod - allocatableResource := node.AllocatableResource() - newAllocatableResource := allocatableResource.Clone() - for _, container := range pod.Spec.Containers { - for resource := range container.Resources.Requests { - newQuantity, exist := updateResourceMap[resource] - if !exist { - continue - } - if newQuantity.Value() < 0 { - return fmt.Errorf("Allocation failed") - } - newAllocatableResource.ScalarResources[resource] = newQuantity.Value() - } - } - node.SetAllocatableResource(newAllocatableResource) - return nil - } - - // add updatePluginResourcesFunc to admission handler, to test it's behavior. - kl.admitHandlers = lifecycle.PodAdmitHandlers{} - kl.admitHandlers.AddPodAdmitHandler(lifecycle.NewPredicateAdmitHandler(kl.getNodeAnyWay, lifecycle.NewAdmissionFailureHandlerStub(), updatePluginResourcesFunc)) - - // pod requiring adjustedResource can be successfully allocated because updatePluginResourcesFunc - // adjusts node.allocatableResource for this resource to a sufficient value. - fittingPodSpec := v1.PodSpec{NodeName: string(kl.nodeName), - Containers: []v1.Container{{Resources: v1.ResourceRequirements{ - Limits: v1.ResourceList{ - adjustedResource: resourceQuantity2, - }, - Requests: v1.ResourceList{ - adjustedResource: resourceQuantity2, - }, - }}}, - } - // pod requiring emptyResource (extended resources with 0 allocatable) will - // not pass PredicateAdmit. - emptyPodSpec := v1.PodSpec{NodeName: string(kl.nodeName), - Containers: []v1.Container{{Resources: v1.ResourceRequirements{ - Limits: v1.ResourceList{ - emptyResource: resourceQuantity2, - }, - Requests: v1.ResourceList{ - emptyResource: resourceQuantity2, - }, - }}}, - } - // pod requiring missingResource will pass PredicateAdmit. - // - // Extended resources missing in node status are ignored in PredicateAdmit. - // This is required to support extended resources that are not managed by - // device plugin, such as cluster-level resources. - missingPodSpec := v1.PodSpec{NodeName: string(kl.nodeName), - Containers: []v1.Container{{Resources: v1.ResourceRequirements{ - Limits: v1.ResourceList{ - missingResource: resourceQuantity2, - }, - Requests: v1.ResourceList{ - missingResource: resourceQuantity2, - }, - }}}, - } - // pod requiring failedResource will fail with the resource failed to be allocated. - failedPodSpec := v1.PodSpec{NodeName: string(kl.nodeName), - Containers: []v1.Container{{Resources: v1.ResourceRequirements{ - Limits: v1.ResourceList{ - failedResource: resourceQuantity1, - }, - Requests: v1.ResourceList{ - failedResource: resourceQuantity1, - }, - }}}, - } - - fittingPod := podWithUIDNameNsSpec("1", "fittingpod", "foo", fittingPodSpec) - emptyPod := podWithUIDNameNsSpec("2", "emptypod", "foo", emptyPodSpec) - missingPod := podWithUIDNameNsSpec("3", "missingpod", "foo", missingPodSpec) - failedPod := podWithUIDNameNsSpec("4", "failedpod", "foo", failedPodSpec) - - kl.HandlePodAdditions([]*v1.Pod{fittingPod, emptyPod, missingPod, failedPod}) - - // Check pod status stored in the status map. - checkPodStatus(t, kl, fittingPod, v1.PodPending) - checkPodStatus(t, kl, emptyPod, v1.PodFailed) - checkPodStatus(t, kl, missingPod, v1.PodPending) - checkPodStatus(t, kl, failedPod, v1.PodFailed) -} - -// TODO(filipg): This test should be removed once StatusSyncer can do garbage collection without external signal. -func TestPurgingObsoleteStatusMapEntries(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - versionInfo := &cadvisorapi.VersionInfo{ - KernelVersion: "3.16.0-0.bpo.4-amd64", - ContainerOsVersion: "Debian GNU/Linux 7 (wheezy)", - DockerVersion: "1.5.0", - } - testKubelet.fakeCadvisor.On("VersionInfo").Return(versionInfo, nil) - - kl := testKubelet.kubelet - pods := []*v1.Pod{ - {ObjectMeta: metav1.ObjectMeta{Name: "pod1", UID: "1234"}, Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 80}}}}}}, - {ObjectMeta: metav1.ObjectMeta{Name: "pod2", UID: "4567"}, Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 80}}}}}}, - } - podToTest := pods[1] - // Run once to populate the status map. - kl.HandlePodAdditions(pods) - if _, found := kl.statusManager.GetPodStatus(podToTest.UID); !found { - t.Fatalf("expected to have status cached for pod2") - } - // Sync with empty pods so that the entry in status map will be removed. - kl.podManager.SetPods([]*v1.Pod{}) - kl.HandlePodCleanups() - if _, found := kl.statusManager.GetPodStatus(podToTest.UID); found { - t.Fatalf("expected to not have status cached for pod2") - } -} - -func TestValidateContainerLogStatus(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - containerName := "x" - testCases := []struct { - statuses []v1.ContainerStatus - success bool // whether getting logs for the container should succeed. - pSuccess bool // whether getting logs for the previous container should succeed. - }{ - { - statuses: []v1.ContainerStatus{ - { - Name: containerName, - State: v1.ContainerState{ - Running: &v1.ContainerStateRunning{}, - }, - LastTerminationState: v1.ContainerState{ - Terminated: &v1.ContainerStateTerminated{ContainerID: "docker://fakeid"}, - }, - }, - }, - success: true, - pSuccess: true, - }, - { - statuses: []v1.ContainerStatus{ - { - Name: containerName, - State: v1.ContainerState{ - Running: &v1.ContainerStateRunning{}, - }, - }, - }, - success: true, - pSuccess: false, - }, - { - statuses: []v1.ContainerStatus{ - { - Name: containerName, - State: v1.ContainerState{ - Terminated: &v1.ContainerStateTerminated{}, - }, - }, - }, - success: false, - pSuccess: false, - }, - { - statuses: []v1.ContainerStatus{ - { - Name: containerName, - State: v1.ContainerState{ - Terminated: &v1.ContainerStateTerminated{ContainerID: "docker://fakeid"}, - }, - }, - }, - success: true, - pSuccess: false, - }, - { - statuses: []v1.ContainerStatus{ - { - Name: containerName, - State: v1.ContainerState{ - Terminated: &v1.ContainerStateTerminated{}, - }, - LastTerminationState: v1.ContainerState{ - Terminated: &v1.ContainerStateTerminated{}, - }, - }, - }, - success: false, - pSuccess: false, - }, - { - statuses: []v1.ContainerStatus{ - { - Name: containerName, - State: v1.ContainerState{ - Terminated: &v1.ContainerStateTerminated{}, - }, - LastTerminationState: v1.ContainerState{ - Terminated: &v1.ContainerStateTerminated{ContainerID: "docker://fakeid"}, - }, - }, - }, - success: true, - pSuccess: true, - }, - { - statuses: []v1.ContainerStatus{ - { - Name: containerName, - State: v1.ContainerState{ - Waiting: &v1.ContainerStateWaiting{}, - }, - }, - }, - success: false, - pSuccess: false, - }, - { - statuses: []v1.ContainerStatus{ - { - Name: containerName, - State: v1.ContainerState{Waiting: &v1.ContainerStateWaiting{Reason: "ErrImagePull"}}, - }, - }, - success: false, - pSuccess: false, - }, - { - statuses: []v1.ContainerStatus{ - { - Name: containerName, - State: v1.ContainerState{Waiting: &v1.ContainerStateWaiting{Reason: "ErrImagePullBackOff"}}, - }, - }, - success: false, - pSuccess: false, - }, - } - - for i, tc := range testCases { - // Access the log of the most recent container - previous := false - podStatus := &v1.PodStatus{ContainerStatuses: tc.statuses} - _, err := kubelet.validateContainerLogStatus("podName", podStatus, containerName, previous) - if !tc.success { - assert.Error(t, err, fmt.Sprintf("[case %d] error", i)) - } else { - assert.NoError(t, err, "[case %d] error", i) - } - // Access the log of the previous, terminated container - previous = true - _, err = kubelet.validateContainerLogStatus("podName", podStatus, containerName, previous) - if !tc.pSuccess { - assert.Error(t, err, fmt.Sprintf("[case %d] error", i)) - } else { - assert.NoError(t, err, "[case %d] error", i) - } - // Access the log of a container that's not in the pod - _, err = kubelet.validateContainerLogStatus("podName", podStatus, "blah", false) - assert.Error(t, err, fmt.Sprintf("[case %d] invalid container name should cause an error", i)) - } -} - -func TestCreateMirrorPod(t *testing.T) { - for _, updateType := range []kubetypes.SyncPodType{kubetypes.SyncPodCreate, kubetypes.SyncPodUpdate} { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - - kl := testKubelet.kubelet - manager := testKubelet.fakeMirrorClient - pod := podWithUIDNameNs("12345678", "bar", "foo") - pod.Annotations[kubetypes.ConfigSourceAnnotationKey] = "file" - pods := []*v1.Pod{pod} - kl.podManager.SetPods(pods) - err := kl.syncPod(syncPodOptions{ - pod: pod, - podStatus: &kubecontainer.PodStatus{}, - updateType: updateType, - }) - assert.NoError(t, err) - podFullName := kubecontainer.GetPodFullName(pod) - assert.True(t, manager.HasPod(podFullName), "Expected mirror pod %q to be created", podFullName) - assert.Equal(t, 1, manager.NumOfPods(), "Expected only 1 mirror pod %q, got %+v", podFullName, manager.GetPods()) - } -} - -func TestDeleteOutdatedMirrorPod(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - - kl := testKubelet.kubelet - manager := testKubelet.fakeMirrorClient - pod := podWithUIDNameNsSpec("12345678", "foo", "ns", v1.PodSpec{ - Containers: []v1.Container{ - {Name: "1234", Image: "foo"}, - }, - }) - pod.Annotations[kubetypes.ConfigSourceAnnotationKey] = "file" - - // Mirror pod has an outdated spec. - mirrorPod := podWithUIDNameNsSpec("11111111", "foo", "ns", v1.PodSpec{ - Containers: []v1.Container{ - {Name: "1234", Image: "bar"}, - }, - }) - mirrorPod.Annotations[kubetypes.ConfigSourceAnnotationKey] = "api" - mirrorPod.Annotations[kubetypes.ConfigMirrorAnnotationKey] = "mirror" - - pods := []*v1.Pod{pod, mirrorPod} - kl.podManager.SetPods(pods) - err := kl.syncPod(syncPodOptions{ - pod: pod, - mirrorPod: mirrorPod, - podStatus: &kubecontainer.PodStatus{}, - updateType: kubetypes.SyncPodUpdate, - }) - assert.NoError(t, err) - name := kubecontainer.GetPodFullName(pod) - creates, deletes := manager.GetCounts(name) - if creates != 1 || deletes != 1 { - t.Errorf("expected 1 creation and 1 deletion of %q, got %d, %d", name, creates, deletes) - } -} - -func TestDeleteOrphanedMirrorPods(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - - kl := testKubelet.kubelet - manager := testKubelet.fakeMirrorClient - orphanPods := []*v1.Pod{ - { - ObjectMeta: metav1.ObjectMeta{ - UID: "12345678", - Name: "pod1", - Namespace: "ns", - Annotations: map[string]string{ - kubetypes.ConfigSourceAnnotationKey: "api", - kubetypes.ConfigMirrorAnnotationKey: "mirror", - }, - }, - }, - { - ObjectMeta: metav1.ObjectMeta{ - UID: "12345679", - Name: "pod2", - Namespace: "ns", - Annotations: map[string]string{ - kubetypes.ConfigSourceAnnotationKey: "api", - kubetypes.ConfigMirrorAnnotationKey: "mirror", - }, - }, - }, - } - - kl.podManager.SetPods(orphanPods) - // Sync with an empty pod list to delete all mirror pods. - kl.HandlePodCleanups() - assert.Len(t, manager.GetPods(), 0, "Expected 0 mirror pods") - for _, pod := range orphanPods { - name := kubecontainer.GetPodFullName(pod) - creates, deletes := manager.GetCounts(name) - if creates != 0 || deletes != 1 { - t.Errorf("expected 0 creation and one deletion of %q, got %d, %d", name, creates, deletes) - } - } -} - -func TestGetContainerInfoForMirrorPods(t *testing.T) { - // pods contain one static and one mirror pod with the same name but - // different UIDs. - pods := []*v1.Pod{ - { - ObjectMeta: metav1.ObjectMeta{ - UID: "1234", - Name: "qux", - Namespace: "ns", - Annotations: map[string]string{ - kubetypes.ConfigSourceAnnotationKey: "file", - }, - }, - Spec: v1.PodSpec{ - Containers: []v1.Container{ - {Name: "foo"}, - }, - }, - }, - { - ObjectMeta: metav1.ObjectMeta{ - UID: "5678", - Name: "qux", - Namespace: "ns", - Annotations: map[string]string{ - kubetypes.ConfigSourceAnnotationKey: "api", - kubetypes.ConfigMirrorAnnotationKey: "mirror", - }, - }, - Spec: v1.PodSpec{ - Containers: []v1.Container{ - {Name: "foo"}, - }, - }, - }, - } - - containerID := "ab2cdf" - containerPath := fmt.Sprintf("/docker/%v", containerID) - containerInfo := cadvisorapi.ContainerInfo{ - ContainerReference: cadvisorapi.ContainerReference{ - Name: containerPath, - }, - } - - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - fakeRuntime := testKubelet.fakeRuntime - mockCadvisor := testKubelet.fakeCadvisor - cadvisorReq := &cadvisorapi.ContainerInfoRequest{} - mockCadvisor.On("DockerContainer", containerID, cadvisorReq).Return(containerInfo, nil) - kubelet := testKubelet.kubelet - - fakeRuntime.PodList = []*containertest.FakePod{ - {Pod: &kubecontainer.Pod{ - ID: "1234", - Name: "qux", - Namespace: "ns", - Containers: []*kubecontainer.Container{ - { - Name: "foo", - ID: kubecontainer.ContainerID{Type: "test", ID: containerID}, - }, - }, - }}, - } - - kubelet.podManager.SetPods(pods) - // Use the mirror pod UID to retrieve the stats. - stats, err := kubelet.GetContainerInfo("qux_ns", "5678", "foo", cadvisorReq) - assert.NoError(t, err) - require.NotNil(t, stats) - mockCadvisor.AssertExpectations(t) -} - -func TestHostNetworkAllowed(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - - kubelet := testKubelet.kubelet - - capabilities.SetForTests(capabilities.Capabilities{ - PrivilegedSources: capabilities.PrivilegedSources{ - HostNetworkSources: []string{kubetypes.ApiserverSource, kubetypes.FileSource}, - }, - }) - pod := podWithUIDNameNsSpec("12345678", "foo", "new", v1.PodSpec{ - Containers: []v1.Container{ - {Name: "foo"}, - }, - HostNetwork: true, - }) - pod.Annotations[kubetypes.ConfigSourceAnnotationKey] = kubetypes.FileSource - - kubelet.podManager.SetPods([]*v1.Pod{pod}) - err := kubelet.syncPod(syncPodOptions{ - pod: pod, - podStatus: &kubecontainer.PodStatus{}, - updateType: kubetypes.SyncPodUpdate, - }) - assert.NoError(t, err, "expected pod infra creation to succeed") -} - -func TestHostNetworkDisallowed(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - - kubelet := testKubelet.kubelet - - capabilities.SetForTests(capabilities.Capabilities{ - PrivilegedSources: capabilities.PrivilegedSources{ - HostNetworkSources: []string{}, - }, - }) - pod := podWithUIDNameNsSpec("12345678", "foo", "new", v1.PodSpec{ - Containers: []v1.Container{ - {Name: "foo"}, - }, - HostNetwork: true, - }) - pod.Annotations[kubetypes.ConfigSourceAnnotationKey] = kubetypes.FileSource - - err := kubelet.syncPod(syncPodOptions{ - pod: pod, - podStatus: &kubecontainer.PodStatus{}, - updateType: kubetypes.SyncPodUpdate, - }) - assert.Error(t, err, "expected pod infra creation to fail") -} - -func TestHostPIDAllowed(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - - kubelet := testKubelet.kubelet - - capabilities.SetForTests(capabilities.Capabilities{ - PrivilegedSources: capabilities.PrivilegedSources{ - HostPIDSources: []string{kubetypes.ApiserverSource, kubetypes.FileSource}, - }, - }) - pod := podWithUIDNameNsSpec("12345678", "foo", "new", v1.PodSpec{ - Containers: []v1.Container{ - {Name: "foo"}, - }, - HostPID: true, - }) - pod.Annotations[kubetypes.ConfigSourceAnnotationKey] = kubetypes.FileSource - - kubelet.podManager.SetPods([]*v1.Pod{pod}) - err := kubelet.syncPod(syncPodOptions{ - pod: pod, - podStatus: &kubecontainer.PodStatus{}, - updateType: kubetypes.SyncPodUpdate, - }) - assert.NoError(t, err, "expected pod infra creation to succeed") -} - -func TestHostPIDDisallowed(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - - kubelet := testKubelet.kubelet - - capabilities.SetForTests(capabilities.Capabilities{ - PrivilegedSources: capabilities.PrivilegedSources{ - HostPIDSources: []string{}, - }, - }) - pod := podWithUIDNameNsSpec("12345678", "foo", "new", v1.PodSpec{ - Containers: []v1.Container{ - {Name: "foo"}, - }, - HostPID: true, - }) - pod.Annotations[kubetypes.ConfigSourceAnnotationKey] = kubetypes.FileSource - - err := kubelet.syncPod(syncPodOptions{ - pod: pod, - podStatus: &kubecontainer.PodStatus{}, - updateType: kubetypes.SyncPodUpdate, - }) - assert.Error(t, err, "expected pod infra creation to fail") -} - -func TestHostIPCAllowed(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - - kubelet := testKubelet.kubelet - - capabilities.SetForTests(capabilities.Capabilities{ - PrivilegedSources: capabilities.PrivilegedSources{ - HostIPCSources: []string{kubetypes.ApiserverSource, kubetypes.FileSource}, - }, - }) - pod := podWithUIDNameNsSpec("12345678", "foo", "new", v1.PodSpec{ - Containers: []v1.Container{ - {Name: "foo"}, - }, - HostIPC: true, - }) - pod.Annotations[kubetypes.ConfigSourceAnnotationKey] = kubetypes.FileSource - - kubelet.podManager.SetPods([]*v1.Pod{pod}) - err := kubelet.syncPod(syncPodOptions{ - pod: pod, - podStatus: &kubecontainer.PodStatus{}, - updateType: kubetypes.SyncPodUpdate, - }) - assert.NoError(t, err, "expected pod infra creation to succeed") -} - -func TestHostIPCDisallowed(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - - kubelet := testKubelet.kubelet - - capabilities.SetForTests(capabilities.Capabilities{ - PrivilegedSources: capabilities.PrivilegedSources{ - HostIPCSources: []string{}, - }, - }) - pod := podWithUIDNameNsSpec("12345678", "foo", "new", v1.PodSpec{ - Containers: []v1.Container{ - {Name: "foo"}, - }, - HostIPC: true, - }) - pod.Annotations[kubetypes.ConfigSourceAnnotationKey] = kubetypes.FileSource - - err := kubelet.syncPod(syncPodOptions{ - pod: pod, - podStatus: &kubecontainer.PodStatus{}, - updateType: kubetypes.SyncPodUpdate, - }) - assert.Error(t, err, "expected pod infra creation to fail") -} - -func TestPrivilegeContainerAllowed(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - - kubelet := testKubelet.kubelet - - capabilities.SetForTests(capabilities.Capabilities{ - AllowPrivileged: true, - }) - privileged := true - pod := podWithUIDNameNsSpec("12345678", "foo", "new", v1.PodSpec{ - Containers: []v1.Container{ - {Name: "foo", SecurityContext: &v1.SecurityContext{Privileged: &privileged}}, - }, - }) - - kubelet.podManager.SetPods([]*v1.Pod{pod}) - err := kubelet.syncPod(syncPodOptions{ - pod: pod, - podStatus: &kubecontainer.PodStatus{}, - updateType: kubetypes.SyncPodUpdate, - }) - assert.NoError(t, err, "expected pod infra creation to succeed") -} - -func TestPrivilegedContainerDisallowed(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - kubelet := testKubelet.kubelet - - capabilities.SetForTests(capabilities.Capabilities{ - AllowPrivileged: false, - }) - privileged := true - pod := podWithUIDNameNsSpec("12345678", "foo", "new", v1.PodSpec{ - Containers: []v1.Container{ - {Name: "foo", SecurityContext: &v1.SecurityContext{Privileged: &privileged}}, - }, - }) - - err := kubelet.syncPod(syncPodOptions{ - pod: pod, - podStatus: &kubecontainer.PodStatus{}, - updateType: kubetypes.SyncPodUpdate, - }) - assert.Error(t, err, "expected pod infra creation to fail") -} - -func TestNetworkErrorsWithoutHostNetwork(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - kubelet := testKubelet.kubelet - - kubelet.runtimeState.setNetworkState(fmt.Errorf("simulated network error")) - capabilities.SetForTests(capabilities.Capabilities{ - PrivilegedSources: capabilities.PrivilegedSources{ - HostNetworkSources: []string{kubetypes.ApiserverSource, kubetypes.FileSource}, - }, - }) - - pod := podWithUIDNameNsSpec("12345678", "hostnetwork", "new", v1.PodSpec{ - HostNetwork: false, - - Containers: []v1.Container{ - {Name: "foo"}, - }, - }) - - kubelet.podManager.SetPods([]*v1.Pod{pod}) - err := kubelet.syncPod(syncPodOptions{ - pod: pod, - podStatus: &kubecontainer.PodStatus{}, - updateType: kubetypes.SyncPodUpdate, - }) - assert.Error(t, err, "expected pod with hostNetwork=false to fail when network in error") - - pod.Annotations[kubetypes.ConfigSourceAnnotationKey] = kubetypes.FileSource - pod.Spec.HostNetwork = true - err = kubelet.syncPod(syncPodOptions{ - pod: pod, - podStatus: &kubecontainer.PodStatus{}, - updateType: kubetypes.SyncPodUpdate, - }) - assert.NoError(t, err, "expected pod with hostNetwork=true to succeed when network in error") -} - -func TestFilterOutTerminatedPods(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - pods := newTestPods(5) - now := metav1.NewTime(time.Now()) - pods[0].Status.Phase = v1.PodFailed - pods[1].Status.Phase = v1.PodSucceeded - // The pod is terminating, should not filter out. - pods[2].Status.Phase = v1.PodRunning - pods[2].DeletionTimestamp = &now - pods[2].Status.ContainerStatuses = []v1.ContainerStatus{ - {State: v1.ContainerState{ - Running: &v1.ContainerStateRunning{ - StartedAt: now, - }, - }}, - } - pods[3].Status.Phase = v1.PodPending - pods[4].Status.Phase = v1.PodRunning - - expected := []*v1.Pod{pods[2], pods[3], pods[4]} - kubelet.podManager.SetPods(pods) - actual := kubelet.filterOutTerminatedPods(pods) - assert.Equal(t, expected, actual) -} - -func TestSyncPodsSetStatusToFailedForPodsThatRunTooLong(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - fakeRuntime := testKubelet.fakeRuntime - testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) - kubelet := testKubelet.kubelet - - now := metav1.Now() - startTime := metav1.NewTime(now.Time.Add(-1 * time.Minute)) - exceededActiveDeadlineSeconds := int64(30) - - pods := []*v1.Pod{ - { - ObjectMeta: metav1.ObjectMeta{ - UID: "12345678", - Name: "bar", - Namespace: "new", - }, - Spec: v1.PodSpec{ - Containers: []v1.Container{ - {Name: "foo"}, - }, - ActiveDeadlineSeconds: &exceededActiveDeadlineSeconds, - }, - Status: v1.PodStatus{ - StartTime: &startTime, - }, - }, - } - - fakeRuntime.PodList = []*containertest.FakePod{ - {Pod: &kubecontainer.Pod{ - ID: "12345678", - Name: "bar", - Namespace: "new", - Containers: []*kubecontainer.Container{ - {Name: "foo"}, - }, - }}, - } - - // Let the pod worker sets the status to fail after this sync. - kubelet.HandlePodUpdates(pods) - status, found := kubelet.statusManager.GetPodStatus(pods[0].UID) - assert.True(t, found, "expected to found status for pod %q", pods[0].UID) - assert.Equal(t, v1.PodFailed, status.Phase) -} - -func TestSyncPodsDoesNotSetPodsThatDidNotRunTooLongToFailed(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - fakeRuntime := testKubelet.fakeRuntime - testKubelet.chainMock() - - kubelet := testKubelet.kubelet - - now := metav1.Now() - startTime := metav1.NewTime(now.Time.Add(-1 * time.Minute)) - exceededActiveDeadlineSeconds := int64(300) - - pods := []*v1.Pod{ - { - ObjectMeta: metav1.ObjectMeta{ - UID: "12345678", - Name: "bar", - Namespace: "new", - }, - Spec: v1.PodSpec{ - Containers: []v1.Container{ - {Name: "foo"}, - }, - ActiveDeadlineSeconds: &exceededActiveDeadlineSeconds, - }, - Status: v1.PodStatus{ - StartTime: &startTime, - }, - }, - } - - fakeRuntime.PodList = []*containertest.FakePod{ - {Pod: &kubecontainer.Pod{ - ID: "12345678", - Name: "bar", - Namespace: "new", - Containers: []*kubecontainer.Container{ - {Name: "foo"}, - }, - }}, - } - - kubelet.podManager.SetPods(pods) - kubelet.HandlePodUpdates(pods) - status, found := kubelet.statusManager.GetPodStatus(pods[0].UID) - assert.True(t, found, "expected to found status for pod %q", pods[0].UID) - assert.NotEqual(t, v1.PodFailed, status.Phase) -} - -func podWithUIDNameNs(uid types.UID, name, namespace string) *v1.Pod { - return &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - UID: uid, - Name: name, - Namespace: namespace, - Annotations: map[string]string{}, - }, - } -} - -func podWithUIDNameNsSpec(uid types.UID, name, namespace string, spec v1.PodSpec) *v1.Pod { - pod := podWithUIDNameNs(uid, name, namespace) - pod.Spec = spec - return pod -} - -func TestDeletePodDirsForDeletedPods(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - kl := testKubelet.kubelet - pods := []*v1.Pod{ - podWithUIDNameNs("12345678", "pod1", "ns"), - podWithUIDNameNs("12345679", "pod2", "ns"), - } - - kl.podManager.SetPods(pods) - // Sync to create pod directories. - kl.HandlePodSyncs(kl.podManager.GetPods()) - for i := range pods { - assert.True(t, dirExists(kl.getPodDir(pods[i].UID)), "Expected directory to exist for pod %d", i) - } - - // Pod 1 has been deleted and no longer exists. - kl.podManager.SetPods([]*v1.Pod{pods[0]}) - kl.HandlePodCleanups() - assert.True(t, dirExists(kl.getPodDir(pods[0].UID)), "Expected directory to exist for pod 0") - assert.False(t, dirExists(kl.getPodDir(pods[1].UID)), "Expected directory to be deleted for pod 1") -} - -func syncAndVerifyPodDir(t *testing.T, testKubelet *TestKubelet, pods []*v1.Pod, podsToCheck []*v1.Pod, shouldExist bool) { - kl := testKubelet.kubelet - - kl.podManager.SetPods(pods) - kl.HandlePodSyncs(pods) - kl.HandlePodCleanups() - for i, pod := range podsToCheck { - exist := dirExists(kl.getPodDir(pod.UID)) - assert.Equal(t, shouldExist, exist, "directory of pod %d", i) - } -} - -func TestDoesNotDeletePodDirsForTerminatedPods(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - kl := testKubelet.kubelet - pods := []*v1.Pod{ - podWithUIDNameNs("12345678", "pod1", "ns"), - podWithUIDNameNs("12345679", "pod2", "ns"), - podWithUIDNameNs("12345680", "pod3", "ns"), - } - - syncAndVerifyPodDir(t, testKubelet, pods, pods, true) - // Pod 1 failed, and pod 2 succeeded. None of the pod directories should be - // deleted. - kl.statusManager.SetPodStatus(pods[1], v1.PodStatus{Phase: v1.PodFailed}) - kl.statusManager.SetPodStatus(pods[2], v1.PodStatus{Phase: v1.PodSucceeded}) - syncAndVerifyPodDir(t, testKubelet, pods, pods, true) -} - -func TestDoesNotDeletePodDirsIfContainerIsRunning(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - runningPod := &kubecontainer.Pod{ - ID: "12345678", - Name: "pod1", - Namespace: "ns", - } - apiPod := podWithUIDNameNs(runningPod.ID, runningPod.Name, runningPod.Namespace) - - // Sync once to create pod directory; confirm that the pod directory has - // already been created. - pods := []*v1.Pod{apiPod} - syncAndVerifyPodDir(t, testKubelet, pods, []*v1.Pod{apiPod}, true) - - // Pretend the pod is deleted from apiserver, but is still active on the node. - // The pod directory should not be removed. - pods = []*v1.Pod{} - testKubelet.fakeRuntime.PodList = []*containertest.FakePod{{runningPod, ""}} - syncAndVerifyPodDir(t, testKubelet, pods, []*v1.Pod{apiPod}, true) - - // The pod is deleted and also not active on the node. The pod directory - // should be removed. - pods = []*v1.Pod{} - testKubelet.fakeRuntime.PodList = []*containertest.FakePod{} - syncAndVerifyPodDir(t, testKubelet, pods, []*v1.Pod{apiPod}, false) -} - -func TestGetPodsToSync(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - clock := testKubelet.fakeClock - pods := newTestPods(5) - - exceededActiveDeadlineSeconds := int64(30) - notYetActiveDeadlineSeconds := int64(120) - startTime := metav1.NewTime(clock.Now()) - pods[0].Status.StartTime = &startTime - pods[0].Spec.ActiveDeadlineSeconds = &exceededActiveDeadlineSeconds - pods[1].Status.StartTime = &startTime - pods[1].Spec.ActiveDeadlineSeconds = ¬YetActiveDeadlineSeconds - pods[2].Status.StartTime = &startTime - pods[2].Spec.ActiveDeadlineSeconds = &exceededActiveDeadlineSeconds - - kubelet.podManager.SetPods(pods) - kubelet.workQueue.Enqueue(pods[2].UID, 0) - kubelet.workQueue.Enqueue(pods[3].UID, 30*time.Second) - kubelet.workQueue.Enqueue(pods[4].UID, 2*time.Minute) - - clock.Step(1 * time.Minute) - - expected := []*v1.Pod{pods[2], pods[3], pods[0]} - podsToSync := kubelet.getPodsToSync() - sort.Sort(podsByUID(expected)) - sort.Sort(podsByUID(podsToSync)) - assert.Equal(t, expected, podsToSync) -} - -func TestGenerateAPIPodStatusWithSortedContainers(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - kubelet := testKubelet.kubelet - numContainers := 10 - expectedOrder := []string{} - cStatuses := []*kubecontainer.ContainerStatus{} - specContainerList := []v1.Container{} - for i := 0; i < numContainers; i++ { - id := fmt.Sprintf("%v", i) - containerName := fmt.Sprintf("%vcontainer", id) - expectedOrder = append(expectedOrder, containerName) - cStatus := &kubecontainer.ContainerStatus{ - ID: kubecontainer.BuildContainerID("test", id), - Name: containerName, - } - // Rearrange container statuses - if i%2 == 0 { - cStatuses = append(cStatuses, cStatus) - } else { - cStatuses = append([]*kubecontainer.ContainerStatus{cStatus}, cStatuses...) - } - specContainerList = append(specContainerList, v1.Container{Name: containerName}) - } - pod := podWithUIDNameNs("uid1", "foo", "test") - pod.Spec = v1.PodSpec{ - Containers: specContainerList, - } - - status := &kubecontainer.PodStatus{ - ID: pod.UID, - Name: pod.Name, - Namespace: pod.Namespace, - ContainerStatuses: cStatuses, - } - for i := 0; i < 5; i++ { - apiStatus := kubelet.generateAPIPodStatus(pod, status) - for i, c := range apiStatus.ContainerStatuses { - if expectedOrder[i] != c.Name { - t.Fatalf("Container status not sorted, expected %v at index %d, but found %v", expectedOrder[i], i, c.Name) - } - } - } -} - -func verifyContainerStatuses(t *testing.T, statuses []v1.ContainerStatus, state, lastTerminationState map[string]v1.ContainerState, message string) { - for _, s := range statuses { - assert.Equal(t, s.State, state[s.Name], "%s: state", message) - assert.Equal(t, s.LastTerminationState, lastTerminationState[s.Name], "%s: last terminated state", message) - } -} - -// Test generateAPIPodStatus with different reason cache and old api pod status. -func TestGenerateAPIPodStatusWithReasonCache(t *testing.T) { - // The following waiting reason and message are generated in convertStatusToAPIStatus() - startWaitingReason := "ContainerCreating" - initWaitingReason := "PodInitializing" - testTimestamp := time.Unix(123456789, 987654321) - testErrorReason := fmt.Errorf("test-error") - emptyContainerID := (&kubecontainer.ContainerID{}).String() - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - kubelet := testKubelet.kubelet - pod := podWithUIDNameNs("12345678", "foo", "new") - pod.Spec = v1.PodSpec{RestartPolicy: v1.RestartPolicyOnFailure} - - podStatus := &kubecontainer.PodStatus{ - ID: pod.UID, - Name: pod.Name, - Namespace: pod.Namespace, - } - tests := []struct { - containers []v1.Container - statuses []*kubecontainer.ContainerStatus - reasons map[string]error - oldStatuses []v1.ContainerStatus - expectedState map[string]v1.ContainerState - // Only set expectedInitState when it is different from expectedState - expectedInitState map[string]v1.ContainerState - expectedLastTerminationState map[string]v1.ContainerState - }{ - // For container with no historical record, State should be Waiting, LastTerminationState should be retrieved from - // old status from apiserver. - { - containers: []v1.Container{{Name: "without-old-record"}, {Name: "with-old-record"}}, - statuses: []*kubecontainer.ContainerStatus{}, - reasons: map[string]error{}, - oldStatuses: []v1.ContainerStatus{{ - Name: "with-old-record", - LastTerminationState: v1.ContainerState{Terminated: &v1.ContainerStateTerminated{}}, - }}, - expectedState: map[string]v1.ContainerState{ - "without-old-record": {Waiting: &v1.ContainerStateWaiting{ - Reason: startWaitingReason, - }}, - "with-old-record": {Waiting: &v1.ContainerStateWaiting{ - Reason: startWaitingReason, - }}, - }, - expectedInitState: map[string]v1.ContainerState{ - "without-old-record": {Waiting: &v1.ContainerStateWaiting{ - Reason: initWaitingReason, - }}, - "with-old-record": {Waiting: &v1.ContainerStateWaiting{ - Reason: initWaitingReason, - }}, - }, - expectedLastTerminationState: map[string]v1.ContainerState{ - "with-old-record": {Terminated: &v1.ContainerStateTerminated{}}, - }, - }, - // For running container, State should be Running, LastTerminationState should be retrieved from latest terminated status. - { - containers: []v1.Container{{Name: "running"}}, - statuses: []*kubecontainer.ContainerStatus{ - { - Name: "running", - State: kubecontainer.ContainerStateRunning, - StartedAt: testTimestamp, - }, - { - Name: "running", - State: kubecontainer.ContainerStateExited, - ExitCode: 1, - }, - }, - reasons: map[string]error{}, - oldStatuses: []v1.ContainerStatus{}, - expectedState: map[string]v1.ContainerState{ - "running": {Running: &v1.ContainerStateRunning{ - StartedAt: metav1.NewTime(testTimestamp), - }}, - }, - expectedLastTerminationState: map[string]v1.ContainerState{ - "running": {Terminated: &v1.ContainerStateTerminated{ - ExitCode: 1, - ContainerID: emptyContainerID, - }}, - }, - }, - // For terminated container: - // * If there is no recent start error record, State should be Terminated, LastTerminationState should be retrieved from - // second latest terminated status; - // * If there is recent start error record, State should be Waiting, LastTerminationState should be retrieved from latest - // terminated status; - // * If ExitCode = 0, restart policy is RestartPolicyOnFailure, the container shouldn't be restarted. No matter there is - // recent start error or not, State should be Terminated, LastTerminationState should be retrieved from second latest - // terminated status. - { - containers: []v1.Container{{Name: "without-reason"}, {Name: "with-reason"}}, - statuses: []*kubecontainer.ContainerStatus{ - { - Name: "without-reason", - State: kubecontainer.ContainerStateExited, - ExitCode: 1, - }, - { - Name: "with-reason", - State: kubecontainer.ContainerStateExited, - ExitCode: 2, - }, - { - Name: "without-reason", - State: kubecontainer.ContainerStateExited, - ExitCode: 3, - }, - { - Name: "with-reason", - State: kubecontainer.ContainerStateExited, - ExitCode: 4, - }, - { - Name: "succeed", - State: kubecontainer.ContainerStateExited, - ExitCode: 0, - }, - { - Name: "succeed", - State: kubecontainer.ContainerStateExited, - ExitCode: 5, - }, - }, - reasons: map[string]error{"with-reason": testErrorReason, "succeed": testErrorReason}, - oldStatuses: []v1.ContainerStatus{}, - expectedState: map[string]v1.ContainerState{ - "without-reason": {Terminated: &v1.ContainerStateTerminated{ - ExitCode: 1, - ContainerID: emptyContainerID, - }}, - "with-reason": {Waiting: &v1.ContainerStateWaiting{Reason: testErrorReason.Error()}}, - "succeed": {Terminated: &v1.ContainerStateTerminated{ - ExitCode: 0, - ContainerID: emptyContainerID, - }}, - }, - expectedLastTerminationState: map[string]v1.ContainerState{ - "without-reason": {Terminated: &v1.ContainerStateTerminated{ - ExitCode: 3, - ContainerID: emptyContainerID, - }}, - "with-reason": {Terminated: &v1.ContainerStateTerminated{ - ExitCode: 2, - ContainerID: emptyContainerID, - }}, - "succeed": {Terminated: &v1.ContainerStateTerminated{ - ExitCode: 5, - ContainerID: emptyContainerID, - }}, - }, - }, - } - - for i, test := range tests { - kubelet.reasonCache = NewReasonCache() - for n, e := range test.reasons { - kubelet.reasonCache.add(pod.UID, n, e, "") - } - pod.Spec.Containers = test.containers - pod.Status.ContainerStatuses = test.oldStatuses - podStatus.ContainerStatuses = test.statuses - apiStatus := kubelet.generateAPIPodStatus(pod, podStatus) - verifyContainerStatuses(t, apiStatus.ContainerStatuses, test.expectedState, test.expectedLastTerminationState, fmt.Sprintf("case %d", i)) - } - - // Everything should be the same for init containers - for i, test := range tests { - kubelet.reasonCache = NewReasonCache() - for n, e := range test.reasons { - kubelet.reasonCache.add(pod.UID, n, e, "") - } - pod.Spec.InitContainers = test.containers - pod.Status.InitContainerStatuses = test.oldStatuses - podStatus.ContainerStatuses = test.statuses - apiStatus := kubelet.generateAPIPodStatus(pod, podStatus) - expectedState := test.expectedState - if test.expectedInitState != nil { - expectedState = test.expectedInitState - } - verifyContainerStatuses(t, apiStatus.InitContainerStatuses, expectedState, test.expectedLastTerminationState, fmt.Sprintf("case %d", i)) - } -} - -// Test generateAPIPodStatus with different restart policies. -func TestGenerateAPIPodStatusWithDifferentRestartPolicies(t *testing.T) { - testErrorReason := fmt.Errorf("test-error") - emptyContainerID := (&kubecontainer.ContainerID{}).String() - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - kubelet := testKubelet.kubelet - pod := podWithUIDNameNs("12345678", "foo", "new") - containers := []v1.Container{{Name: "succeed"}, {Name: "failed"}} - podStatus := &kubecontainer.PodStatus{ - ID: pod.UID, - Name: pod.Name, - Namespace: pod.Namespace, - ContainerStatuses: []*kubecontainer.ContainerStatus{ - { - Name: "succeed", - State: kubecontainer.ContainerStateExited, - ExitCode: 0, - }, - { - Name: "failed", - State: kubecontainer.ContainerStateExited, - ExitCode: 1, - }, - { - Name: "succeed", - State: kubecontainer.ContainerStateExited, - ExitCode: 2, - }, - { - Name: "failed", - State: kubecontainer.ContainerStateExited, - ExitCode: 3, - }, - }, - } - kubelet.reasonCache.add(pod.UID, "succeed", testErrorReason, "") - kubelet.reasonCache.add(pod.UID, "failed", testErrorReason, "") - for c, test := range []struct { - restartPolicy v1.RestartPolicy - expectedState map[string]v1.ContainerState - expectedLastTerminationState map[string]v1.ContainerState - // Only set expectedInitState when it is different from expectedState - expectedInitState map[string]v1.ContainerState - // Only set expectedInitLastTerminationState when it is different from expectedLastTerminationState - expectedInitLastTerminationState map[string]v1.ContainerState - }{ - { - restartPolicy: v1.RestartPolicyNever, - expectedState: map[string]v1.ContainerState{ - "succeed": {Terminated: &v1.ContainerStateTerminated{ - ExitCode: 0, - ContainerID: emptyContainerID, - }}, - "failed": {Terminated: &v1.ContainerStateTerminated{ - ExitCode: 1, - ContainerID: emptyContainerID, - }}, - }, - expectedLastTerminationState: map[string]v1.ContainerState{ - "succeed": {Terminated: &v1.ContainerStateTerminated{ - ExitCode: 2, - ContainerID: emptyContainerID, - }}, - "failed": {Terminated: &v1.ContainerStateTerminated{ - ExitCode: 3, - ContainerID: emptyContainerID, - }}, - }, - }, - { - restartPolicy: v1.RestartPolicyOnFailure, - expectedState: map[string]v1.ContainerState{ - "succeed": {Terminated: &v1.ContainerStateTerminated{ - ExitCode: 0, - ContainerID: emptyContainerID, - }}, - "failed": {Waiting: &v1.ContainerStateWaiting{Reason: testErrorReason.Error()}}, - }, - expectedLastTerminationState: map[string]v1.ContainerState{ - "succeed": {Terminated: &v1.ContainerStateTerminated{ - ExitCode: 2, - ContainerID: emptyContainerID, - }}, - "failed": {Terminated: &v1.ContainerStateTerminated{ - ExitCode: 1, - ContainerID: emptyContainerID, - }}, - }, - }, - { - restartPolicy: v1.RestartPolicyAlways, - expectedState: map[string]v1.ContainerState{ - "succeed": {Waiting: &v1.ContainerStateWaiting{Reason: testErrorReason.Error()}}, - "failed": {Waiting: &v1.ContainerStateWaiting{Reason: testErrorReason.Error()}}, - }, - expectedLastTerminationState: map[string]v1.ContainerState{ - "succeed": {Terminated: &v1.ContainerStateTerminated{ - ExitCode: 0, - ContainerID: emptyContainerID, - }}, - "failed": {Terminated: &v1.ContainerStateTerminated{ - ExitCode: 1, - ContainerID: emptyContainerID, - }}, - }, - // If the init container is terminated with exit code 0, it won't be restarted even when the - // restart policy is RestartAlways. - expectedInitState: map[string]v1.ContainerState{ - "succeed": {Terminated: &v1.ContainerStateTerminated{ - ExitCode: 0, - ContainerID: emptyContainerID, - }}, - "failed": {Waiting: &v1.ContainerStateWaiting{Reason: testErrorReason.Error()}}, - }, - expectedInitLastTerminationState: map[string]v1.ContainerState{ - "succeed": {Terminated: &v1.ContainerStateTerminated{ - ExitCode: 2, - ContainerID: emptyContainerID, - }}, - "failed": {Terminated: &v1.ContainerStateTerminated{ - ExitCode: 1, - ContainerID: emptyContainerID, - }}, - }, - }, - } { - pod.Spec.RestartPolicy = test.restartPolicy - // Test normal containers - pod.Spec.Containers = containers - apiStatus := kubelet.generateAPIPodStatus(pod, podStatus) - expectedState, expectedLastTerminationState := test.expectedState, test.expectedLastTerminationState - verifyContainerStatuses(t, apiStatus.ContainerStatuses, expectedState, expectedLastTerminationState, fmt.Sprintf("case %d", c)) - pod.Spec.Containers = nil - - // Test init containers - pod.Spec.InitContainers = containers - apiStatus = kubelet.generateAPIPodStatus(pod, podStatus) - if test.expectedInitState != nil { - expectedState = test.expectedInitState - } - if test.expectedInitLastTerminationState != nil { - expectedLastTerminationState = test.expectedInitLastTerminationState - } - verifyContainerStatuses(t, apiStatus.InitContainerStatuses, expectedState, expectedLastTerminationState, fmt.Sprintf("case %d", c)) - pod.Spec.InitContainers = nil - } -} - -// testPodAdmitHandler is a lifecycle.PodAdmitHandler for testing. -type testPodAdmitHandler struct { - // list of pods to reject. - podsToReject []*v1.Pod -} - -// Admit rejects all pods in the podsToReject list with a matching UID. -func (a *testPodAdmitHandler) Admit(attrs *lifecycle.PodAdmitAttributes) lifecycle.PodAdmitResult { - for _, podToReject := range a.podsToReject { - if podToReject.UID == attrs.Pod.UID { - return lifecycle.PodAdmitResult{Admit: false, Reason: "Rejected", Message: "Pod is rejected"} - } - } - return lifecycle.PodAdmitResult{Admit: true} -} - -// Test verifies that the kubelet invokes an admission handler during HandlePodAdditions. -func TestHandlePodAdditionsInvokesPodAdmitHandlers(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - testKubelet.chainMock() - kl := testKubelet.kubelet - kl.nodeInfo = testNodeInfo{nodes: []*v1.Node{ - { - ObjectMeta: metav1.ObjectMeta{Name: string(kl.nodeName)}, - Status: v1.NodeStatus{ - Allocatable: v1.ResourceList{ - v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), - }, - }, - }, - }} - - pods := []*v1.Pod{ - { - ObjectMeta: metav1.ObjectMeta{ - UID: "123456789", - Name: "podA", - Namespace: "foo", - }, - }, - { - ObjectMeta: metav1.ObjectMeta{ - UID: "987654321", - Name: "podB", - Namespace: "foo", - }, - }, - } - podToReject := pods[0] - podToAdmit := pods[1] - podsToReject := []*v1.Pod{podToReject} - - kl.admitHandlers.AddPodAdmitHandler(&testPodAdmitHandler{podsToReject: podsToReject}) - - kl.HandlePodAdditions(pods) - - // Check pod status stored in the status map. - checkPodStatus(t, kl, podToReject, v1.PodFailed) - checkPodStatus(t, kl, podToAdmit, v1.PodPending) -} - -// testPodSyncLoopHandler is a lifecycle.PodSyncLoopHandler that is used for testing. -type testPodSyncLoopHandler struct { - // list of pods to sync - podsToSync []*v1.Pod -} - -// ShouldSync evaluates if the pod should be synced from the kubelet. -func (a *testPodSyncLoopHandler) ShouldSync(pod *v1.Pod) bool { - for _, podToSync := range a.podsToSync { - if podToSync.UID == pod.UID { - return true - } - } - return false -} - -// TestGetPodsToSyncInvokesPodSyncLoopHandlers ensures that the get pods to sync routine invokes the handler. -func TestGetPodsToSyncInvokesPodSyncLoopHandlers(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - pods := newTestPods(5) - expected := []*v1.Pod{pods[0]} - kubelet.AddPodSyncLoopHandler(&testPodSyncLoopHandler{expected}) - kubelet.podManager.SetPods(pods) - - podsToSync := kubelet.getPodsToSync() - sort.Sort(podsByUID(expected)) - sort.Sort(podsByUID(podsToSync)) - assert.Equal(t, expected, podsToSync) -} - -// testPodSyncHandler is a lifecycle.PodSyncHandler that is used for testing. -type testPodSyncHandler struct { - // list of pods to evict. - podsToEvict []*v1.Pod - // the reason for the eviction - reason string - // the message for the eviction - message string -} - -// ShouldEvict evaluates if the pod should be evicted from the kubelet. -func (a *testPodSyncHandler) ShouldEvict(pod *v1.Pod) lifecycle.ShouldEvictResponse { - for _, podToEvict := range a.podsToEvict { - if podToEvict.UID == pod.UID { - return lifecycle.ShouldEvictResponse{Evict: true, Reason: a.reason, Message: a.message} - } - } - return lifecycle.ShouldEvictResponse{Evict: false} -} - -// TestGenerateAPIPodStatusInvokesPodSyncHandlers invokes the handlers and reports the proper status -func TestGenerateAPIPodStatusInvokesPodSyncHandlers(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - pod := newTestPods(1)[0] - podsToEvict := []*v1.Pod{pod} - kubelet.AddPodSyncHandler(&testPodSyncHandler{podsToEvict, "Evicted", "because"}) - status := &kubecontainer.PodStatus{ - ID: pod.UID, - Name: pod.Name, - Namespace: pod.Namespace, - } - apiStatus := kubelet.generateAPIPodStatus(pod, status) - require.Equal(t, v1.PodFailed, apiStatus.Phase) - require.Equal(t, "Evicted", apiStatus.Reason) - require.Equal(t, "because", apiStatus.Message) -} - -func TestSyncPodKillPod(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kl := testKubelet.kubelet - pod := &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - UID: "12345678", - Name: "bar", - Namespace: "foo", - }, - } - pods := []*v1.Pod{pod} - kl.podManager.SetPods(pods) - gracePeriodOverride := int64(0) - err := kl.syncPod(syncPodOptions{ - pod: pod, - podStatus: &kubecontainer.PodStatus{}, - updateType: kubetypes.SyncPodKill, - killPodOptions: &KillPodOptions{ - PodStatusFunc: func(p *v1.Pod, podStatus *kubecontainer.PodStatus) v1.PodStatus { - return v1.PodStatus{ - Phase: v1.PodFailed, - Reason: "reason", - Message: "message", - } - }, - PodTerminationGracePeriodSecondsOverride: &gracePeriodOverride, - }, - }) - require.NoError(t, err) - - // Check pod status stored in the status map. - checkPodStatus(t, kl, pod, v1.PodFailed) -} - -func waitForVolumeUnmount( - volumeManager kubeletvolume.VolumeManager, - pod *v1.Pod) error { - var podVolumes kubecontainer.VolumeMap - err := retryWithExponentialBackOff( - time.Duration(50*time.Millisecond), - func() (bool, error) { - // Verify volumes detached - podVolumes = volumeManager.GetMountedVolumesForPod( - util.GetUniquePodName(pod)) - - if len(podVolumes) != 0 { - return false, nil - } - - return true, nil - }, - ) - - if err != nil { - return fmt.Errorf( - "Expected volumes to be unmounted. But some volumes are still mounted: %#v", podVolumes) - } - - return nil -} - -func waitForVolumeDetach( - volumeName v1.UniqueVolumeName, - volumeManager kubeletvolume.VolumeManager) error { - attachedVolumes := []v1.UniqueVolumeName{} - err := retryWithExponentialBackOff( - time.Duration(50*time.Millisecond), - func() (bool, error) { - // Verify volumes detached - volumeAttached := volumeManager.VolumeIsAttached(volumeName) - return !volumeAttached, nil - }, - ) - - if err != nil { - return fmt.Errorf( - "Expected volumes to be detached. But some volumes are still attached: %#v", attachedVolumes) - } - - return nil -} - -func retryWithExponentialBackOff(initialDuration time.Duration, fn wait.ConditionFunc) error { - backoff := wait.Backoff{ - Duration: initialDuration, - Factor: 3, - Jitter: 0, - Steps: 6, - } - return wait.ExponentialBackoff(backoff, fn) -} - -func simulateVolumeInUseUpdate( - volumeName v1.UniqueVolumeName, - stopCh <-chan struct{}, - volumeManager kubeletvolume.VolumeManager) { - ticker := time.NewTicker(100 * time.Millisecond) - defer ticker.Stop() - for { - select { - case <-ticker.C: - volumeManager.MarkVolumesAsReportedInUse( - []v1.UniqueVolumeName{volumeName}) - case <-stopCh: - return - } - } -} - -func runVolumeManager(kubelet *Kubelet) chan struct{} { - stopCh := make(chan struct{}) - go kubelet.volumeManager.Run(kubelet.sourcesReady, stopCh) - return stopCh -} - -// Sort pods by UID. -type podsByUID []*v1.Pod - -func (p podsByUID) Len() int { return len(p) } -func (p podsByUID) Swap(i, j int) { p[i], p[j] = p[j], p[i] } -func (p podsByUID) Less(i, j int) bool { return p[i].UID < p[j].UID } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes.go deleted file mode 100644 index 09179fec..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes.go +++ /dev/null @@ -1,149 +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 kubelet - -import ( - "fmt" - - "github.com/golang/glog" - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" - utilerrors "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/apimachinery/pkg/util/sets" - kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - "k8s.io/kubernetes/pkg/util/removeall" - "k8s.io/kubernetes/pkg/volume" - volumetypes "k8s.io/kubernetes/pkg/volume/util/types" -) - -// ListVolumesForPod returns a map of the mounted volumes for the given pod. -// The key in the map is the OuterVolumeSpecName (i.e. pod.Spec.Volumes[x].Name) -func (kl *Kubelet) ListVolumesForPod(podUID types.UID) (map[string]volume.Volume, bool) { - volumesToReturn := make(map[string]volume.Volume) - podVolumes := kl.volumeManager.GetMountedVolumesForPod( - volumetypes.UniquePodName(podUID)) - for outerVolumeSpecName, volume := range podVolumes { - // TODO: volume.Mounter could be nil if volume object is recovered - // from reconciler's sync state process. PR 33616 will fix this problem - // to create Mounter object when recovering volume state. - if volume.Mounter == nil { - continue - } - volumesToReturn[outerVolumeSpecName] = volume.Mounter - } - - return volumesToReturn, len(volumesToReturn) > 0 -} - -// podVolumesExist checks with the volume manager and returns true any of the -// pods for the specified volume are mounted. -func (kl *Kubelet) podVolumesExist(podUID types.UID) bool { - if mountedVolumes := - kl.volumeManager.GetMountedVolumesForPod( - volumetypes.UniquePodName(podUID)); len(mountedVolumes) > 0 { - return true - } - // TODO: This checks pod volume paths and whether they are mounted. If checking returns error, podVolumesExist will return true - // which means we consider volumes might exist and requires further checking. - // There are some volume plugins such as flexvolume might not have mounts. See issue #61229 - volumePaths, err := kl.getMountedVolumePathListFromDisk(podUID) - if err != nil { - glog.Errorf("pod %q found, but error %v occurred during checking mounted volumes from disk", podUID, err) - return true - } - if len(volumePaths) > 0 { - glog.V(4).Infof("pod %q found, but volumes are still mounted on disk %v", podUID, volumePaths) - return true - } - - return false -} - -// newVolumeMounterFromPlugins attempts to find a plugin by volume spec, pod -// and volume options and then creates a Mounter. -// Returns a valid mounter or an error. -func (kl *Kubelet) newVolumeMounterFromPlugins(spec *volume.Spec, pod *v1.Pod, opts volume.VolumeOptions) (volume.Mounter, error) { - plugin, err := kl.volumePluginMgr.FindPluginBySpec(spec) - if err != nil { - return nil, fmt.Errorf("can't use volume plugins for %s: %v", spec.Name(), err) - } - physicalMounter, err := plugin.NewMounter(spec, pod, opts) - if err != nil { - return nil, fmt.Errorf("failed to instantiate mounter for volume: %s using plugin: %s with a root cause: %v", spec.Name(), plugin.GetPluginName(), err) - } - glog.V(10).Infof("Using volume plugin %q to mount %s", plugin.GetPluginName(), spec.Name()) - return physicalMounter, nil -} - -// cleanupOrphanedPodDirs removes the volumes of pods that should not be -// running and that have no containers running. Note that we roll up logs here since it runs in the main loop. -func (kl *Kubelet) cleanupOrphanedPodDirs(pods []*v1.Pod, runningPods []*kubecontainer.Pod) error { - allPods := sets.NewString() - for _, pod := range pods { - allPods.Insert(string(pod.UID)) - } - for _, pod := range runningPods { - allPods.Insert(string(pod.ID)) - } - - found, err := kl.listPodsFromDisk() - if err != nil { - return err - } - - orphanRemovalErrors := []error{} - orphanVolumeErrors := []error{} - - for _, uid := range found { - if allPods.Has(string(uid)) { - continue - } - // If volumes have not been unmounted/detached, do not delete directory. - // Doing so may result in corruption of data. - if podVolumesExist := kl.podVolumesExist(uid); podVolumesExist { - glog.V(3).Infof("Orphaned pod %q found, but volumes are not cleaned up", uid) - continue - } - // If there are still volume directories, do not delete directory - volumePaths, err := kl.getPodVolumePathListFromDisk(uid) - if err != nil { - orphanVolumeErrors = append(orphanVolumeErrors, fmt.Errorf("Orphaned pod %q found, but error %v occurred during reading volume dir from disk", uid, err)) - continue - } - if len(volumePaths) > 0 { - orphanVolumeErrors = append(orphanVolumeErrors, fmt.Errorf("Orphaned pod %q found, but volume paths are still present on disk", uid)) - continue - } - glog.V(3).Infof("Orphaned pod %q found, removing", uid) - if err := removeall.RemoveAllOneFilesystem(kl.mounter, kl.getPodDir(uid)); err != nil { - glog.Errorf("Failed to remove orphaned pod %q dir; err: %v", uid, err) - orphanRemovalErrors = append(orphanRemovalErrors, err) - } - } - - logSpew := func(errs []error) { - if len(errs) > 0 { - glog.Errorf("%v : There were a total of %v errors similar to this. Turn up verbosity to see them.", errs[0], len(errs)) - for _, err := range errs { - glog.V(5).Infof("Orphan pod: %v", err) - } - } - } - logSpew(orphanVolumeErrors) - logSpew(orphanRemovalErrors) - return utilerrors.NewAggregate(orphanRemovalErrors) -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes_test.go deleted file mode 100644 index a82aa061..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes_test.go +++ /dev/null @@ -1,473 +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 kubelet - -import ( - "fmt" - "testing" - - "github.com/stretchr/testify/assert" - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" - core "k8s.io/client-go/testing" - "k8s.io/kubernetes/pkg/volume" - volumetest "k8s.io/kubernetes/pkg/volume/testing" - "k8s.io/kubernetes/pkg/volume/util" -) - -func TestListVolumesForPod(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - - pod := podWithUIDNameNsSpec("12345678", "foo", "test", v1.PodSpec{ - Volumes: []v1.Volume{ - { - Name: "vol1", - VolumeSource: v1.VolumeSource{ - GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ - PDName: "fake-device1", - }, - }, - }, - { - Name: "vol2", - VolumeSource: v1.VolumeSource{ - GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ - PDName: "fake-device2", - }, - }, - }, - }, - }) - - stopCh := runVolumeManager(kubelet) - defer close(stopCh) - - kubelet.podManager.SetPods([]*v1.Pod{pod}) - err := kubelet.volumeManager.WaitForAttachAndMount(pod) - assert.NoError(t, err) - - podName := util.GetUniquePodName(pod) - - volumesToReturn, volumeExsit := kubelet.ListVolumesForPod(types.UID(podName)) - assert.True(t, volumeExsit, "expected to find volumes for pod %q", podName) - - outerVolumeSpecName1 := "vol1" - assert.NotNil(t, volumesToReturn[outerVolumeSpecName1], "key %s", outerVolumeSpecName1) - - outerVolumeSpecName2 := "vol2" - assert.NotNil(t, volumesToReturn[outerVolumeSpecName2], "key %s", outerVolumeSpecName2) - -} - -func TestPodVolumesExist(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - - pods := []*v1.Pod{ - { - ObjectMeta: metav1.ObjectMeta{ - Name: "pod1", - UID: "pod1uid", - }, - Spec: v1.PodSpec{ - Volumes: []v1.Volume{ - { - Name: "vol1", - VolumeSource: v1.VolumeSource{ - GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ - PDName: "fake-device1", - }, - }, - }, - }, - }, - }, - { - ObjectMeta: metav1.ObjectMeta{ - Name: "pod2", - UID: "pod2uid", - }, - Spec: v1.PodSpec{ - Volumes: []v1.Volume{ - { - Name: "vol2", - VolumeSource: v1.VolumeSource{ - GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ - PDName: "fake-device2", - }, - }, - }, - }, - }, - }, - { - ObjectMeta: metav1.ObjectMeta{ - Name: "pod3", - UID: "pod3uid", - }, - Spec: v1.PodSpec{ - Volumes: []v1.Volume{ - { - Name: "vol3", - VolumeSource: v1.VolumeSource{ - GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ - PDName: "fake-device3", - }, - }, - }, - }, - }, - }, - } - - stopCh := runVolumeManager(kubelet) - defer close(stopCh) - - kubelet.podManager.SetPods(pods) - for _, pod := range pods { - err := kubelet.volumeManager.WaitForAttachAndMount(pod) - assert.NoError(t, err) - } - - for _, pod := range pods { - podVolumesExist := kubelet.podVolumesExist(pod.UID) - assert.True(t, podVolumesExist, "pod %q", pod.UID) - } -} - -func TestVolumeAttachAndMountControllerDisabled(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - - pod := podWithUIDNameNsSpec("12345678", "foo", "test", v1.PodSpec{ - Volumes: []v1.Volume{ - { - Name: "vol1", - VolumeSource: v1.VolumeSource{ - GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ - PDName: "fake-device", - }, - }, - }, - }, - }) - - stopCh := runVolumeManager(kubelet) - defer close(stopCh) - - kubelet.podManager.SetPods([]*v1.Pod{pod}) - err := kubelet.volumeManager.WaitForAttachAndMount(pod) - assert.NoError(t, err) - - podVolumes := kubelet.volumeManager.GetMountedVolumesForPod( - util.GetUniquePodName(pod)) - - expectedPodVolumes := []string{"vol1"} - assert.Len(t, podVolumes, len(expectedPodVolumes), "Volumes for pod %+v", pod) - for _, name := range expectedPodVolumes { - assert.Contains(t, podVolumes, name, "Volumes for pod %+v", pod) - } - assert.True(t, testKubelet.volumePlugin.GetNewAttacherCallCount() >= 1, "Expected plugin NewAttacher to be called at least once") - assert.NoError(t, volumetest.VerifyWaitForAttachCallCount( - 1 /* expectedWaitForAttachCallCount */, testKubelet.volumePlugin)) - assert.NoError(t, volumetest.VerifyAttachCallCount( - 1 /* expectedAttachCallCount */, testKubelet.volumePlugin)) - assert.NoError(t, volumetest.VerifyMountDeviceCallCount( - 1 /* expectedMountDeviceCallCount */, testKubelet.volumePlugin)) - assert.NoError(t, volumetest.VerifySetUpCallCount( - 1 /* expectedSetUpCallCount */, testKubelet.volumePlugin)) -} - -func TestVolumeUnmountAndDetachControllerDisabled(t *testing.T) { - testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - - pod := podWithUIDNameNsSpec("12345678", "foo", "test", v1.PodSpec{ - Volumes: []v1.Volume{ - { - Name: "vol1", - VolumeSource: v1.VolumeSource{ - GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ - PDName: "fake-device", - }, - }, - }, - }, - }) - - stopCh := runVolumeManager(kubelet) - defer close(stopCh) - - // Add pod - kubelet.podManager.SetPods([]*v1.Pod{pod}) - - // Verify volumes attached - err := kubelet.volumeManager.WaitForAttachAndMount(pod) - assert.NoError(t, err) - - podVolumes := kubelet.volumeManager.GetMountedVolumesForPod( - util.GetUniquePodName(pod)) - - expectedPodVolumes := []string{"vol1"} - assert.Len(t, podVolumes, len(expectedPodVolumes), "Volumes for pod %+v", pod) - for _, name := range expectedPodVolumes { - assert.Contains(t, podVolumes, name, "Volumes for pod %+v", pod) - } - - assert.True(t, testKubelet.volumePlugin.GetNewAttacherCallCount() >= 1, "Expected plugin NewAttacher to be called at least once") - assert.NoError(t, volumetest.VerifyWaitForAttachCallCount( - 1 /* expectedWaitForAttachCallCount */, testKubelet.volumePlugin)) - assert.NoError(t, volumetest.VerifyAttachCallCount( - 1 /* expectedAttachCallCount */, testKubelet.volumePlugin)) - assert.NoError(t, volumetest.VerifyMountDeviceCallCount( - 1 /* expectedMountDeviceCallCount */, testKubelet.volumePlugin)) - assert.NoError(t, volumetest.VerifySetUpCallCount( - 1 /* expectedSetUpCallCount */, testKubelet.volumePlugin)) - - // Remove pod - kubelet.podManager.SetPods([]*v1.Pod{}) - - assert.NoError(t, waitForVolumeUnmount(kubelet.volumeManager, pod)) - - // Verify volumes unmounted - podVolumes = kubelet.volumeManager.GetMountedVolumesForPod( - util.GetUniquePodName(pod)) - - assert.Len(t, podVolumes, 0, - "Expected volumes to be unmounted and detached. But some volumes are still mounted: %#v", podVolumes) - - assert.NoError(t, volumetest.VerifyTearDownCallCount( - 1 /* expectedTearDownCallCount */, testKubelet.volumePlugin)) - - // Verify volumes detached and no longer reported as in use - assert.NoError(t, waitForVolumeDetach(v1.UniqueVolumeName("fake/fake-device"), kubelet.volumeManager)) - assert.True(t, testKubelet.volumePlugin.GetNewAttacherCallCount() >= 1, "Expected plugin NewAttacher to be called at least once") - assert.NoError(t, volumetest.VerifyDetachCallCount( - 1 /* expectedDetachCallCount */, testKubelet.volumePlugin)) -} - -func TestVolumeAttachAndMountControllerEnabled(t *testing.T) { - testKubelet := newTestKubelet(t, true /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - kubeClient := testKubelet.fakeKubeClient - kubeClient.AddReactor("get", "nodes", - func(action core.Action) (bool, runtime.Object, error) { - return true, &v1.Node{ - ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, - Status: v1.NodeStatus{ - VolumesAttached: []v1.AttachedVolume{ - { - Name: "fake/fake-device", - DevicePath: "fake/path", - }, - }}, - }, nil - }) - kubeClient.AddReactor("*", "*", func(action core.Action) (bool, runtime.Object, error) { - return true, nil, fmt.Errorf("no reaction implemented for %s", action) - }) - - pod := podWithUIDNameNsSpec("12345678", "foo", "test", v1.PodSpec{ - Volumes: []v1.Volume{ - { - Name: "vol1", - VolumeSource: v1.VolumeSource{ - GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ - PDName: "fake-device", - }, - }, - }, - }, - }) - - stopCh := runVolumeManager(kubelet) - defer close(stopCh) - - kubelet.podManager.SetPods([]*v1.Pod{pod}) - - // Fake node status update - go simulateVolumeInUseUpdate( - v1.UniqueVolumeName("fake/fake-device"), - stopCh, - kubelet.volumeManager) - - assert.NoError(t, kubelet.volumeManager.WaitForAttachAndMount(pod)) - - podVolumes := kubelet.volumeManager.GetMountedVolumesForPod( - util.GetUniquePodName(pod)) - - expectedPodVolumes := []string{"vol1"} - assert.Len(t, podVolumes, len(expectedPodVolumes), "Volumes for pod %+v", pod) - for _, name := range expectedPodVolumes { - assert.Contains(t, podVolumes, name, "Volumes for pod %+v", pod) - } - assert.True(t, testKubelet.volumePlugin.GetNewAttacherCallCount() >= 1, "Expected plugin NewAttacher to be called at least once") - assert.NoError(t, volumetest.VerifyWaitForAttachCallCount( - 1 /* expectedWaitForAttachCallCount */, testKubelet.volumePlugin)) - assert.NoError(t, volumetest.VerifyZeroAttachCalls(testKubelet.volumePlugin)) - assert.NoError(t, volumetest.VerifyMountDeviceCallCount( - 1 /* expectedMountDeviceCallCount */, testKubelet.volumePlugin)) - assert.NoError(t, volumetest.VerifySetUpCallCount( - 1 /* expectedSetUpCallCount */, testKubelet.volumePlugin)) -} - -func TestVolumeUnmountAndDetachControllerEnabled(t *testing.T) { - testKubelet := newTestKubelet(t, true /* controllerAttachDetachEnabled */) - defer testKubelet.Cleanup() - kubelet := testKubelet.kubelet - kubeClient := testKubelet.fakeKubeClient - kubeClient.AddReactor("get", "nodes", - func(action core.Action) (bool, runtime.Object, error) { - return true, &v1.Node{ - ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, - Status: v1.NodeStatus{ - VolumesAttached: []v1.AttachedVolume{ - { - Name: "fake/fake-device", - DevicePath: "fake/path", - }, - }}, - }, nil - }) - kubeClient.AddReactor("*", "*", func(action core.Action) (bool, runtime.Object, error) { - return true, nil, fmt.Errorf("no reaction implemented for %s", action) - }) - - pod := podWithUIDNameNsSpec("12345678", "foo", "test", v1.PodSpec{ - Volumes: []v1.Volume{ - { - Name: "vol1", - VolumeSource: v1.VolumeSource{ - GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{ - PDName: "fake-device", - }, - }, - }, - }, - }) - - stopCh := runVolumeManager(kubelet) - defer close(stopCh) - - // Add pod - kubelet.podManager.SetPods([]*v1.Pod{pod}) - - // Fake node status update - go simulateVolumeInUseUpdate( - v1.UniqueVolumeName("fake/fake-device"), - stopCh, - kubelet.volumeManager) - - // Verify volumes attached - assert.NoError(t, kubelet.volumeManager.WaitForAttachAndMount(pod)) - - podVolumes := kubelet.volumeManager.GetMountedVolumesForPod( - util.GetUniquePodName(pod)) - - expectedPodVolumes := []string{"vol1"} - assert.Len(t, podVolumes, len(expectedPodVolumes), "Volumes for pod %+v", pod) - for _, name := range expectedPodVolumes { - assert.Contains(t, podVolumes, name, "Volumes for pod %+v", pod) - } - - assert.True(t, testKubelet.volumePlugin.GetNewAttacherCallCount() >= 1, "Expected plugin NewAttacher to be called at least once") - assert.NoError(t, volumetest.VerifyWaitForAttachCallCount( - 1 /* expectedWaitForAttachCallCount */, testKubelet.volumePlugin)) - assert.NoError(t, volumetest.VerifyZeroAttachCalls(testKubelet.volumePlugin)) - assert.NoError(t, volumetest.VerifyMountDeviceCallCount( - 1 /* expectedMountDeviceCallCount */, testKubelet.volumePlugin)) - assert.NoError(t, volumetest.VerifySetUpCallCount( - 1 /* expectedSetUpCallCount */, testKubelet.volumePlugin)) - - // Remove pod - kubelet.podManager.SetPods([]*v1.Pod{}) - - assert.NoError(t, waitForVolumeUnmount(kubelet.volumeManager, pod)) - - // Verify volumes unmounted - podVolumes = kubelet.volumeManager.GetMountedVolumesForPod( - util.GetUniquePodName(pod)) - - assert.Len(t, podVolumes, 0, - "Expected volumes to be unmounted and detached. But some volumes are still mounted: %#v", podVolumes) - - assert.NoError(t, volumetest.VerifyTearDownCallCount( - 1 /* expectedTearDownCallCount */, testKubelet.volumePlugin)) - - // Verify volumes detached and no longer reported as in use - assert.NoError(t, waitForVolumeDetach(v1.UniqueVolumeName("fake/fake-device"), kubelet.volumeManager)) - assert.True(t, testKubelet.volumePlugin.GetNewAttacherCallCount() >= 1, "Expected plugin NewAttacher to be called at least once") - assert.NoError(t, volumetest.VerifyZeroDetachCallCount(testKubelet.volumePlugin)) -} - -type stubVolume struct { - path string - volume.MetricsNil -} - -func (f *stubVolume) GetPath() string { - return f.path -} - -func (f *stubVolume) GetAttributes() volume.Attributes { - return volume.Attributes{} -} - -func (f *stubVolume) CanMount() error { - return nil -} - -func (f *stubVolume) SetUp(fsGroup *int64) error { - return nil -} - -func (f *stubVolume) SetUpAt(dir string, fsGroup *int64) error { - return nil -} - -type stubBlockVolume struct { - dirPath string - volName string -} - -func (f *stubBlockVolume) GetGlobalMapPath(spec *volume.Spec) (string, error) { - return "", nil -} - -func (f *stubBlockVolume) GetPodDeviceMapPath() (string, string) { - return f.dirPath, f.volName -} - -func (f *stubBlockVolume) SetUpDevice() (string, error) { - return "", nil -} - -func (f stubBlockVolume) MapDevice(devicePath, globalMapPath, volumeMapPath, volumeMapName string, podUID types.UID) error { - return nil -} - -func (f *stubBlockVolume) TearDownDevice(mapPath string, devicePath string) error { - return nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/oom_watcher.go b/vendor/k8s.io/kubernetes/pkg/kubelet/oom_watcher.go deleted file mode 100644 index 448082b0..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/oom_watcher.go +++ /dev/null @@ -1,74 +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 kubelet - -import ( - "github.com/golang/glog" - "github.com/google/cadvisor/events" - cadvisorapi "github.com/google/cadvisor/info/v1" - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/client-go/tools/record" - "k8s.io/kubernetes/pkg/kubelet/cadvisor" -) - -// OOMWatcher defines the interface of OOM watchers. -type OOMWatcher interface { - Start(ref *v1.ObjectReference) error -} - -type realOOMWatcher struct { - cadvisor cadvisor.Interface - recorder record.EventRecorder -} - -// NewOOMWatcher creates and initializes a OOMWatcher based on parameters. -func NewOOMWatcher(cadvisor cadvisor.Interface, recorder record.EventRecorder) OOMWatcher { - return &realOOMWatcher{ - cadvisor: cadvisor, - recorder: recorder, - } -} - -const systemOOMEvent = "SystemOOM" - -// Watches cadvisor for system oom's and records an event for every system oom encountered. -func (ow *realOOMWatcher) Start(ref *v1.ObjectReference) error { - request := events.Request{ - EventType: map[cadvisorapi.EventType]bool{ - cadvisorapi.EventOom: true, - }, - ContainerName: "/", - IncludeSubcontainers: false, - } - eventChannel, err := ow.cadvisor.WatchEvents(&request) - if err != nil { - return err - } - - go func() { - defer runtime.HandleCrash() - - for event := range eventChannel.GetChannel() { - glog.V(2).Infof("Got sys oom event from cadvisor: %v", event) - ow.recorder.PastEventf(ref, metav1.Time{Time: event.Timestamp}, v1.EventTypeWarning, systemOOMEvent, "System OOM encountered") - } - glog.Errorf("Unexpectedly stopped receiving OOM notifications from cAdvisor") - }() - return nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/oom_watcher_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/oom_watcher_test.go deleted file mode 100644 index 6fd0287e..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/oom_watcher_test.go +++ /dev/null @@ -1,38 +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 kubelet - -import ( - "testing" - - "github.com/stretchr/testify/assert" - - "k8s.io/api/core/v1" - "k8s.io/client-go/tools/record" - cadvisortest "k8s.io/kubernetes/pkg/kubelet/cadvisor/testing" -) - -func TestBasic(t *testing.T) { - fakeRecorder := &record.FakeRecorder{} - mockCadvisor := &cadvisortest.Fake{} - node := &v1.ObjectReference{} - oomWatcher := NewOOMWatcher(mockCadvisor, fakeRecorder) - assert.NoError(t, oomWatcher.Start(node)) - - // TODO: Improve this test once cadvisor exports events.EventChannel as an interface - // and thereby allow using a mock version of cadvisor. -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pod_container_deletor.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pod_container_deletor.go deleted file mode 100644 index 48a85958..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pod_container_deletor.go +++ /dev/null @@ -1,112 +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 kubelet - -import ( - "sort" - - "github.com/golang/glog" - "k8s.io/apimachinery/pkg/util/wait" - kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" -) - -const ( - // The limit on the number of buffered container deletion requests - // This number is a bit arbitrary and may be adjusted in the future. - containerDeletorBufferLimit = 50 -) - -type containerStatusbyCreatedList []*kubecontainer.ContainerStatus - -type podContainerDeletor struct { - worker chan<- kubecontainer.ContainerID - containersToKeep int -} - -func (a containerStatusbyCreatedList) Len() int { return len(a) } -func (a containerStatusbyCreatedList) Swap(i, j int) { a[i], a[j] = a[j], a[i] } -func (a containerStatusbyCreatedList) Less(i, j int) bool { return a[i].CreatedAt.After(a[j].CreatedAt) } - -func newPodContainerDeletor(runtime kubecontainer.Runtime, containersToKeep int) *podContainerDeletor { - buffer := make(chan kubecontainer.ContainerID, containerDeletorBufferLimit) - go wait.Until(func() { - for { - id := <-buffer - runtime.DeleteContainer(id) - } - }, 0, wait.NeverStop) - - return &podContainerDeletor{ - worker: buffer, - containersToKeep: containersToKeep, - } -} - -// getContainersToDeleteInPod returns the exited containers in a pod whose name matches the name inferred from filterContainerId (if not empty), ordered by the creation time from the latest to the earliest. -// If filterContainerID is empty, all dead containers in the pod are returned. -func getContainersToDeleteInPod(filterContainerID string, podStatus *kubecontainer.PodStatus, containersToKeep int) containerStatusbyCreatedList { - matchedContainer := func(filterContainerId string, podStatus *kubecontainer.PodStatus) *kubecontainer.ContainerStatus { - if filterContainerId == "" { - return nil - } - for _, containerStatus := range podStatus.ContainerStatuses { - if containerStatus.ID.ID == filterContainerId { - return containerStatus - } - } - return nil - }(filterContainerID, podStatus) - - if filterContainerID != "" && matchedContainer == nil { - glog.Warningf("Container %q not found in pod's containers", filterContainerID) - return containerStatusbyCreatedList{} - } - - // Find the exited containers whose name matches the name of the container with id being filterContainerId - var candidates containerStatusbyCreatedList - for _, containerStatus := range podStatus.ContainerStatuses { - if containerStatus.State != kubecontainer.ContainerStateExited { - continue - } - if matchedContainer == nil || matchedContainer.Name == containerStatus.Name { - candidates = append(candidates, containerStatus) - } - } - - if len(candidates) <= containersToKeep { - return containerStatusbyCreatedList{} - } - sort.Sort(candidates) - return candidates[containersToKeep:] -} - -// deleteContainersInPod issues container deletion requests for containers selected by getContainersToDeleteInPod. -func (p *podContainerDeletor) deleteContainersInPod(filterContainerID string, podStatus *kubecontainer.PodStatus, removeAll bool) { - containersToKeep := p.containersToKeep - if removeAll { - containersToKeep = 0 - filterContainerID = "" - } - - for _, candidate := range getContainersToDeleteInPod(filterContainerID, podStatus, containersToKeep) { - select { - case p.worker <- candidate.ID: - default: - glog.Warningf("Failed to issue the request to remove container %v", candidate.ID) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pod_container_deletor_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pod_container_deletor_test.go deleted file mode 100644 index 196a6660..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pod_container_deletor_test.go +++ /dev/null @@ -1,203 +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 kubelet - -import ( - "reflect" - "testing" - "time" - - kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" -) - -func TestGetContainersToDeleteInPodWithFilter(t *testing.T) { - pod := kubecontainer.PodStatus{ - ContainerStatuses: []*kubecontainer.ContainerStatus{ - { - ID: kubecontainer.ContainerID{Type: "test", ID: "1"}, - Name: "foo", - CreatedAt: time.Now(), - State: kubecontainer.ContainerStateExited, - }, - { - ID: kubecontainer.ContainerID{Type: "test", ID: "2"}, - Name: "bar", - CreatedAt: time.Now().Add(time.Second), - State: kubecontainer.ContainerStateExited, - }, - { - ID: kubecontainer.ContainerID{Type: "test", ID: "3"}, - Name: "bar", - CreatedAt: time.Now().Add(2 * time.Second), - State: kubecontainer.ContainerStateExited, - }, - { - ID: kubecontainer.ContainerID{Type: "test", ID: "4"}, - Name: "bar", - CreatedAt: time.Now().Add(3 * time.Second), - State: kubecontainer.ContainerStateExited, - }, - { - ID: kubecontainer.ContainerID{Type: "test", ID: "5"}, - Name: "bar", - CreatedAt: time.Now().Add(4 * time.Second), - State: kubecontainer.ContainerStateRunning, - }, - }, - } - - testCases := []struct { - containersToKeep int - expectedContainersToDelete containerStatusbyCreatedList - }{ - { - 0, - []*kubecontainer.ContainerStatus{pod.ContainerStatuses[3], pod.ContainerStatuses[2], pod.ContainerStatuses[1]}, - }, - { - 1, - []*kubecontainer.ContainerStatus{pod.ContainerStatuses[2], pod.ContainerStatuses[1]}, - }, - { - 2, - []*kubecontainer.ContainerStatus{pod.ContainerStatuses[1]}, - }, - } - - for _, test := range testCases { - candidates := getContainersToDeleteInPod("4", &pod, test.containersToKeep) - if !reflect.DeepEqual(candidates, test.expectedContainersToDelete) { - t.Errorf("expected %v got %v", test.expectedContainersToDelete, candidates) - } - } -} - -func TestGetContainersToDeleteInPod(t *testing.T) { - pod := kubecontainer.PodStatus{ - ContainerStatuses: []*kubecontainer.ContainerStatus{ - { - ID: kubecontainer.ContainerID{Type: "test", ID: "1"}, - Name: "foo", - CreatedAt: time.Now(), - State: kubecontainer.ContainerStateExited, - }, - { - ID: kubecontainer.ContainerID{Type: "test", ID: "2"}, - Name: "bar", - CreatedAt: time.Now().Add(time.Second), - State: kubecontainer.ContainerStateExited, - }, - { - ID: kubecontainer.ContainerID{Type: "test", ID: "3"}, - Name: "bar", - CreatedAt: time.Now().Add(2 * time.Second), - State: kubecontainer.ContainerStateExited, - }, - { - ID: kubecontainer.ContainerID{Type: "test", ID: "4"}, - Name: "bar", - CreatedAt: time.Now().Add(3 * time.Second), - State: kubecontainer.ContainerStateExited, - }, - { - ID: kubecontainer.ContainerID{Type: "test", ID: "5"}, - Name: "bar", - CreatedAt: time.Now().Add(4 * time.Second), - State: kubecontainer.ContainerStateRunning, - }, - }, - } - - testCases := []struct { - containersToKeep int - expectedContainersToDelete containerStatusbyCreatedList - }{ - { - 0, - []*kubecontainer.ContainerStatus{pod.ContainerStatuses[3], pod.ContainerStatuses[2], pod.ContainerStatuses[1], pod.ContainerStatuses[0]}, - }, - { - 1, - []*kubecontainer.ContainerStatus{pod.ContainerStatuses[2], pod.ContainerStatuses[1], pod.ContainerStatuses[0]}, - }, - { - 2, - []*kubecontainer.ContainerStatus{pod.ContainerStatuses[1], pod.ContainerStatuses[0]}, - }, - } - - for _, test := range testCases { - candidates := getContainersToDeleteInPod("", &pod, test.containersToKeep) - if !reflect.DeepEqual(candidates, test.expectedContainersToDelete) { - t.Errorf("expected %v got %v", test.expectedContainersToDelete, candidates) - } - } -} - -func TestGetContainersToDeleteInPodWithNoMatch(t *testing.T) { - pod := kubecontainer.PodStatus{ - ContainerStatuses: []*kubecontainer.ContainerStatus{ - { - ID: kubecontainer.ContainerID{Type: "test", ID: "1"}, - Name: "foo", - CreatedAt: time.Now(), - State: kubecontainer.ContainerStateExited, - }, - { - ID: kubecontainer.ContainerID{Type: "test", ID: "2"}, - Name: "bar", - CreatedAt: time.Now().Add(time.Second), - State: kubecontainer.ContainerStateExited, - }, - { - ID: kubecontainer.ContainerID{Type: "test", ID: "3"}, - Name: "bar", - CreatedAt: time.Now().Add(2 * time.Second), - State: kubecontainer.ContainerStateExited, - }, - { - ID: kubecontainer.ContainerID{Type: "test", ID: "4"}, - Name: "bar", - CreatedAt: time.Now().Add(3 * time.Second), - State: kubecontainer.ContainerStateExited, - }, - { - ID: kubecontainer.ContainerID{Type: "test", ID: "5"}, - Name: "bar", - CreatedAt: time.Now().Add(4 * time.Second), - State: kubecontainer.ContainerStateRunning, - }, - }, - } - - testCases := []struct { - filterID string - expectedContainersToDelete containerStatusbyCreatedList - }{ - { - "abc", - []*kubecontainer.ContainerStatus{}, - }, - } - - for _, test := range testCases { - candidates := getContainersToDeleteInPod(test.filterID, &pod, len(pod.ContainerStatuses)) - if !reflect.DeepEqual(candidates, test.expectedContainersToDelete) { - t.Errorf("expected %v got %v", test.expectedContainersToDelete, candidates) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers.go deleted file mode 100644 index 5a1fb992..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers.go +++ /dev/null @@ -1,333 +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 kubelet - -import ( - "fmt" - "sync" - "time" - - "github.com/golang/glog" - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/tools/record" - kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - "k8s.io/kubernetes/pkg/kubelet/events" - "k8s.io/kubernetes/pkg/kubelet/eviction" - kubetypes "k8s.io/kubernetes/pkg/kubelet/types" - "k8s.io/kubernetes/pkg/kubelet/util/format" - "k8s.io/kubernetes/pkg/kubelet/util/queue" -) - -// OnCompleteFunc is a function that is invoked when an operation completes. -// If err is non-nil, the operation did not complete successfully. -type OnCompleteFunc func(err error) - -// PodStatusFunc is a function that is invoked to generate a pod status. -type PodStatusFunc func(pod *v1.Pod, podStatus *kubecontainer.PodStatus) v1.PodStatus - -// KillPodOptions are options when performing a pod update whose update type is kill. -type KillPodOptions struct { - // PodStatusFunc is the function to invoke to set pod status in response to a kill request. - PodStatusFunc PodStatusFunc - // PodTerminationGracePeriodSecondsOverride is optional override to use if a pod is being killed as part of kill operation. - PodTerminationGracePeriodSecondsOverride *int64 -} - -// UpdatePodOptions is an options struct to pass to a UpdatePod operation. -type UpdatePodOptions struct { - // pod to update - Pod *v1.Pod - // the mirror pod for the pod to update, if it is a static pod - MirrorPod *v1.Pod - // the type of update (create, update, sync, kill) - UpdateType kubetypes.SyncPodType - // optional callback function when operation completes - // this callback is not guaranteed to be completed since a pod worker may - // drop update requests if it was fulfilling a previous request. this is - // only guaranteed to be invoked in response to a kill pod request which is - // always delivered. - OnCompleteFunc OnCompleteFunc - // if update type is kill, use the specified options to kill the pod. - KillPodOptions *KillPodOptions -} - -// PodWorkers is an abstract interface for testability. -type PodWorkers interface { - UpdatePod(options *UpdatePodOptions) - ForgetNonExistingPodWorkers(desiredPods map[types.UID]empty) - ForgetWorker(uid types.UID) -} - -// syncPodOptions provides the arguments to a SyncPod operation. -type syncPodOptions struct { - // the mirror pod for the pod to sync, if it is a static pod - mirrorPod *v1.Pod - // pod to sync - pod *v1.Pod - // the type of update (create, update, sync) - updateType kubetypes.SyncPodType - // the current status - podStatus *kubecontainer.PodStatus - // if update type is kill, use the specified options to kill the pod. - killPodOptions *KillPodOptions -} - -// the function to invoke to perform a sync. -type syncPodFnType func(options syncPodOptions) error - -const ( - // jitter factor for resyncInterval - workerResyncIntervalJitterFactor = 0.5 - - // jitter factor for backOffPeriod - workerBackOffPeriodJitterFactor = 0.5 -) - -type podWorkers struct { - // Protects all per worker fields. - podLock sync.Mutex - - // Tracks all running per-pod goroutines - per-pod goroutine will be - // processing updates received through its corresponding channel. - podUpdates map[types.UID]chan UpdatePodOptions - // Track the current state of per-pod goroutines. - // Currently all update request for a given pod coming when another - // update of this pod is being processed are ignored. - isWorking map[types.UID]bool - // Tracks the last undelivered work item for this pod - a work item is - // undelivered if it comes in while the worker is working. - lastUndeliveredWorkUpdate map[types.UID]UpdatePodOptions - - workQueue queue.WorkQueue - - // This function is run to sync the desired stated of pod. - // NOTE: This function has to be thread-safe - it can be called for - // different pods at the same time. - syncPodFn syncPodFnType - - // The EventRecorder to use - recorder record.EventRecorder - - // backOffPeriod is the duration to back off when there is a sync error. - backOffPeriod time.Duration - - // resyncInterval is the duration to wait until the next sync. - resyncInterval time.Duration - - // podCache stores kubecontainer.PodStatus for all pods. - podCache kubecontainer.Cache -} - -func newPodWorkers(syncPodFn syncPodFnType, recorder record.EventRecorder, workQueue queue.WorkQueue, - resyncInterval, backOffPeriod time.Duration, podCache kubecontainer.Cache) *podWorkers { - return &podWorkers{ - podUpdates: map[types.UID]chan UpdatePodOptions{}, - isWorking: map[types.UID]bool{}, - lastUndeliveredWorkUpdate: map[types.UID]UpdatePodOptions{}, - syncPodFn: syncPodFn, - recorder: recorder, - workQueue: workQueue, - resyncInterval: resyncInterval, - backOffPeriod: backOffPeriod, - podCache: podCache, - } -} - -func (p *podWorkers) managePodLoop(podUpdates <-chan UpdatePodOptions) { - var lastSyncTime time.Time - for update := range podUpdates { - err := func() error { - podUID := update.Pod.UID - // This is a blocking call that would return only if the cache - // has an entry for the pod that is newer than minRuntimeCache - // Time. This ensures the worker doesn't start syncing until - // after the cache is at least newer than the finished time of - // the previous sync. - status, err := p.podCache.GetNewerThan(podUID, lastSyncTime) - if err != nil { - // This is the legacy event thrown by manage pod loop - // all other events are now dispatched from syncPodFn - p.recorder.Eventf(update.Pod, v1.EventTypeWarning, events.FailedSync, "error determining status: %v", err) - return err - } - err = p.syncPodFn(syncPodOptions{ - mirrorPod: update.MirrorPod, - pod: update.Pod, - podStatus: status, - killPodOptions: update.KillPodOptions, - updateType: update.UpdateType, - }) - lastSyncTime = time.Now() - return err - }() - // notify the call-back function if the operation succeeded or not - if update.OnCompleteFunc != nil { - update.OnCompleteFunc(err) - } - if err != nil { - // IMPORTANT: we do not log errors here, the syncPodFn is responsible for logging errors - glog.Errorf("Error syncing pod %s (%q), skipping: %v", update.Pod.UID, format.Pod(update.Pod), err) - } - p.wrapUp(update.Pod.UID, err) - } -} - -// Apply the new setting to the specified pod. -// If the options provide an OnCompleteFunc, the function is invoked if the update is accepted. -// Update requests are ignored if a kill pod request is pending. -func (p *podWorkers) UpdatePod(options *UpdatePodOptions) { - pod := options.Pod - uid := pod.UID - var podUpdates chan UpdatePodOptions - var exists bool - - p.podLock.Lock() - defer p.podLock.Unlock() - if podUpdates, exists = p.podUpdates[uid]; !exists { - // We need to have a buffer here, because checkForUpdates() method that - // puts an update into channel is called from the same goroutine where - // the channel is consumed. However, it is guaranteed that in such case - // the channel is empty, so buffer of size 1 is enough. - podUpdates = make(chan UpdatePodOptions, 1) - p.podUpdates[uid] = podUpdates - - // Creating a new pod worker either means this is a new pod, or that the - // kubelet just restarted. In either case the kubelet is willing to believe - // the status of the pod for the first pod worker sync. See corresponding - // comment in syncPod. - go func() { - defer runtime.HandleCrash() - p.managePodLoop(podUpdates) - }() - } - if !p.isWorking[pod.UID] { - p.isWorking[pod.UID] = true - podUpdates <- *options - } else { - // if a request to kill a pod is pending, we do not let anything overwrite that request. - update, found := p.lastUndeliveredWorkUpdate[pod.UID] - if !found || update.UpdateType != kubetypes.SyncPodKill { - p.lastUndeliveredWorkUpdate[pod.UID] = *options - } - } -} - -func (p *podWorkers) removeWorker(uid types.UID) { - if ch, ok := p.podUpdates[uid]; ok { - close(ch) - delete(p.podUpdates, uid) - // If there is an undelivered work update for this pod we need to remove it - // since per-pod goroutine won't be able to put it to the already closed - // channel when it finishes processing the current work update. - if _, cached := p.lastUndeliveredWorkUpdate[uid]; cached { - delete(p.lastUndeliveredWorkUpdate, uid) - } - } -} -func (p *podWorkers) ForgetWorker(uid types.UID) { - p.podLock.Lock() - defer p.podLock.Unlock() - p.removeWorker(uid) -} - -func (p *podWorkers) ForgetNonExistingPodWorkers(desiredPods map[types.UID]empty) { - p.podLock.Lock() - defer p.podLock.Unlock() - for key := range p.podUpdates { - if _, exists := desiredPods[key]; !exists { - p.removeWorker(key) - } - } -} - -func (p *podWorkers) wrapUp(uid types.UID, syncErr error) { - // Requeue the last update if the last sync returned error. - switch { - case syncErr == nil: - // No error; requeue at the regular resync interval. - p.workQueue.Enqueue(uid, wait.Jitter(p.resyncInterval, workerResyncIntervalJitterFactor)) - default: - // Error occurred during the sync; back off and then retry. - p.workQueue.Enqueue(uid, wait.Jitter(p.backOffPeriod, workerBackOffPeriodJitterFactor)) - } - p.checkForUpdates(uid) -} - -func (p *podWorkers) checkForUpdates(uid types.UID) { - p.podLock.Lock() - defer p.podLock.Unlock() - if workUpdate, exists := p.lastUndeliveredWorkUpdate[uid]; exists { - p.podUpdates[uid] <- workUpdate - delete(p.lastUndeliveredWorkUpdate, uid) - } else { - p.isWorking[uid] = false - } -} - -// killPodNow returns a KillPodFunc that can be used to kill a pod. -// It is intended to be injected into other modules that need to kill a pod. -func killPodNow(podWorkers PodWorkers, recorder record.EventRecorder) eviction.KillPodFunc { - return func(pod *v1.Pod, status v1.PodStatus, gracePeriodOverride *int64) error { - // determine the grace period to use when killing the pod - gracePeriod := int64(0) - if gracePeriodOverride != nil { - gracePeriod = *gracePeriodOverride - } else if pod.Spec.TerminationGracePeriodSeconds != nil { - gracePeriod = *pod.Spec.TerminationGracePeriodSeconds - } - - // we timeout and return an error if we don't get a callback within a reasonable time. - // the default timeout is relative to the grace period (we settle on 10s to wait for kubelet->runtime traffic to complete in sigkill) - timeout := int64(gracePeriod + (gracePeriod / 2)) - minTimeout := int64(10) - if timeout < minTimeout { - timeout = minTimeout - } - timeoutDuration := time.Duration(timeout) * time.Second - - // open a channel we block against until we get a result - type response struct { - err error - } - ch := make(chan response, 1) - podWorkers.UpdatePod(&UpdatePodOptions{ - Pod: pod, - UpdateType: kubetypes.SyncPodKill, - OnCompleteFunc: func(err error) { - ch <- response{err: err} - }, - KillPodOptions: &KillPodOptions{ - PodStatusFunc: func(p *v1.Pod, podStatus *kubecontainer.PodStatus) v1.PodStatus { - return status - }, - PodTerminationGracePeriodSecondsOverride: gracePeriodOverride, - }, - }) - - // wait for either a response, or a timeout - select { - case r := <-ch: - return r.err - case <-time.After(timeoutDuration): - recorder.Eventf(pod, v1.EventTypeWarning, events.ExceededGracePeriod, "Container runtime did not kill the pod within specified grace period.") - return fmt.Errorf("timeout waiting to kill pod") - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers_test.go deleted file mode 100644 index ff13baa9..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers_test.go +++ /dev/null @@ -1,355 +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 kubelet - -import ( - "reflect" - "sync" - "testing" - "time" - - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/clock" - "k8s.io/client-go/tools/record" - kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" - kubetypes "k8s.io/kubernetes/pkg/kubelet/types" - "k8s.io/kubernetes/pkg/kubelet/util/queue" -) - -// fakePodWorkers runs sync pod function in serial, so we can have -// deterministic behaviour in testing. -type fakePodWorkers struct { - syncPodFn syncPodFnType - cache kubecontainer.Cache - t TestingInterface -} - -func (f *fakePodWorkers) UpdatePod(options *UpdatePodOptions) { - status, err := f.cache.Get(options.Pod.UID) - if err != nil { - f.t.Errorf("Unexpected error: %v", err) - } - if err := f.syncPodFn(syncPodOptions{ - mirrorPod: options.MirrorPod, - pod: options.Pod, - podStatus: status, - updateType: options.UpdateType, - killPodOptions: options.KillPodOptions, - }); err != nil { - f.t.Errorf("Unexpected error: %v", err) - } -} - -func (f *fakePodWorkers) ForgetNonExistingPodWorkers(desiredPods map[types.UID]empty) {} - -func (f *fakePodWorkers) ForgetWorker(uid types.UID) {} - -type TestingInterface interface { - Errorf(format string, args ...interface{}) -} - -func newPod(uid, name string) *v1.Pod { - return &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - UID: types.UID(uid), - Name: name, - }, - } -} - -// syncPodRecord is a record of a sync pod call -type syncPodRecord struct { - name string - updateType kubetypes.SyncPodType -} - -func createPodWorkers() (*podWorkers, map[types.UID][]syncPodRecord) { - lock := sync.Mutex{} - processed := make(map[types.UID][]syncPodRecord) - fakeRecorder := &record.FakeRecorder{} - fakeRuntime := &containertest.FakeRuntime{} - fakeCache := containertest.NewFakeCache(fakeRuntime) - podWorkers := newPodWorkers( - func(options syncPodOptions) error { - func() { - lock.Lock() - defer lock.Unlock() - pod := options.pod - processed[pod.UID] = append(processed[pod.UID], syncPodRecord{ - name: pod.Name, - updateType: options.updateType, - }) - }() - return nil - }, - fakeRecorder, - queue.NewBasicWorkQueue(&clock.RealClock{}), - time.Second, - time.Second, - fakeCache, - ) - return podWorkers, processed -} - -func drainWorkers(podWorkers *podWorkers, numPods int) { - for { - stillWorking := false - podWorkers.podLock.Lock() - for i := 0; i < numPods; i++ { - if podWorkers.isWorking[types.UID(string(i))] { - stillWorking = true - } - } - podWorkers.podLock.Unlock() - if !stillWorking { - break - } - time.Sleep(50 * time.Millisecond) - } -} - -func TestUpdatePod(t *testing.T) { - podWorkers, processed := createPodWorkers() - - numPods := 20 - for i := 0; i < numPods; i++ { - for j := i; j < numPods; j++ { - podWorkers.UpdatePod(&UpdatePodOptions{ - Pod: newPod(string(j), string(i)), - UpdateType: kubetypes.SyncPodCreate, - }) - } - } - drainWorkers(podWorkers, numPods) - - if len(processed) != numPods { - t.Errorf("Not all pods processed: %v", len(processed)) - return - } - for i := 0; i < numPods; i++ { - uid := types.UID(i) - if len(processed[uid]) < 1 || len(processed[uid]) > i+1 { - t.Errorf("Pod %v processed %v times", i, len(processed[uid])) - continue - } - - // PodWorker guarantees the first and the last event will be processed - first := 0 - last := len(processed[uid]) - 1 - if processed[uid][first].name != string(0) { - t.Errorf("Pod %v: incorrect order %v, %v", i, first, processed[uid][first]) - - } - if processed[uid][last].name != string(i) { - t.Errorf("Pod %v: incorrect order %v, %v", i, last, processed[uid][last]) - } - } -} - -func TestUpdatePodDoesNotForgetSyncPodKill(t *testing.T) { - podWorkers, processed := createPodWorkers() - numPods := 20 - for i := 0; i < numPods; i++ { - pod := newPod(string(i), string(i)) - podWorkers.UpdatePod(&UpdatePodOptions{ - Pod: pod, - UpdateType: kubetypes.SyncPodCreate, - }) - podWorkers.UpdatePod(&UpdatePodOptions{ - Pod: pod, - UpdateType: kubetypes.SyncPodKill, - }) - podWorkers.UpdatePod(&UpdatePodOptions{ - Pod: pod, - UpdateType: kubetypes.SyncPodUpdate, - }) - } - drainWorkers(podWorkers, numPods) - if len(processed) != numPods { - t.Errorf("Not all pods processed: %v", len(processed)) - return - } - for i := 0; i < numPods; i++ { - uid := types.UID(i) - // each pod should be processed two times (create, kill, but not update) - syncPodRecords := processed[uid] - if len(syncPodRecords) < 2 { - t.Errorf("Pod %v processed %v times, but expected at least 2", i, len(syncPodRecords)) - continue - } - if syncPodRecords[0].updateType != kubetypes.SyncPodCreate { - t.Errorf("Pod %v event was %v, but expected %v", i, syncPodRecords[0].updateType, kubetypes.SyncPodCreate) - } - if syncPodRecords[1].updateType != kubetypes.SyncPodKill { - t.Errorf("Pod %v event was %v, but expected %v", i, syncPodRecords[1].updateType, kubetypes.SyncPodKill) - } - } -} - -func TestForgetNonExistingPodWorkers(t *testing.T) { - podWorkers, _ := createPodWorkers() - - numPods := 20 - for i := 0; i < numPods; i++ { - podWorkers.UpdatePod(&UpdatePodOptions{ - Pod: newPod(string(i), "name"), - UpdateType: kubetypes.SyncPodUpdate, - }) - } - drainWorkers(podWorkers, numPods) - - if len(podWorkers.podUpdates) != numPods { - t.Errorf("Incorrect number of open channels %v", len(podWorkers.podUpdates)) - } - - desiredPods := map[types.UID]empty{} - desiredPods[types.UID(2)] = empty{} - desiredPods[types.UID(14)] = empty{} - podWorkers.ForgetNonExistingPodWorkers(desiredPods) - if len(podWorkers.podUpdates) != 2 { - t.Errorf("Incorrect number of open channels %v", len(podWorkers.podUpdates)) - } - if _, exists := podWorkers.podUpdates[types.UID(2)]; !exists { - t.Errorf("No updates channel for pod 2") - } - if _, exists := podWorkers.podUpdates[types.UID(14)]; !exists { - t.Errorf("No updates channel for pod 14") - } - - podWorkers.ForgetNonExistingPodWorkers(map[types.UID]empty{}) - if len(podWorkers.podUpdates) != 0 { - t.Errorf("Incorrect number of open channels %v", len(podWorkers.podUpdates)) - } -} - -type simpleFakeKubelet struct { - pod *v1.Pod - mirrorPod *v1.Pod - podStatus *kubecontainer.PodStatus - wg sync.WaitGroup -} - -func (kl *simpleFakeKubelet) syncPod(options syncPodOptions) error { - kl.pod, kl.mirrorPod, kl.podStatus = options.pod, options.mirrorPod, options.podStatus - return nil -} - -func (kl *simpleFakeKubelet) syncPodWithWaitGroup(options syncPodOptions) error { - kl.pod, kl.mirrorPod, kl.podStatus = options.pod, options.mirrorPod, options.podStatus - kl.wg.Done() - return nil -} - -// byContainerName sort the containers in a running pod by their names. -type byContainerName kubecontainer.Pod - -func (b byContainerName) Len() int { return len(b.Containers) } - -func (b byContainerName) Swap(i, j int) { - b.Containers[i], b.Containers[j] = b.Containers[j], b.Containers[i] -} - -func (b byContainerName) Less(i, j int) bool { - return b.Containers[i].Name < b.Containers[j].Name -} - -// TestFakePodWorkers verifies that the fakePodWorkers behaves the same way as the real podWorkers -// for their invocation of the syncPodFn. -func TestFakePodWorkers(t *testing.T) { - fakeRecorder := &record.FakeRecorder{} - fakeRuntime := &containertest.FakeRuntime{} - fakeCache := containertest.NewFakeCache(fakeRuntime) - - kubeletForRealWorkers := &simpleFakeKubelet{} - kubeletForFakeWorkers := &simpleFakeKubelet{} - - realPodWorkers := newPodWorkers(kubeletForRealWorkers.syncPodWithWaitGroup, fakeRecorder, queue.NewBasicWorkQueue(&clock.RealClock{}), time.Second, time.Second, fakeCache) - fakePodWorkers := &fakePodWorkers{kubeletForFakeWorkers.syncPod, fakeCache, t} - - tests := []struct { - pod *v1.Pod - mirrorPod *v1.Pod - }{ - { - &v1.Pod{}, - &v1.Pod{}, - }, - { - podWithUIDNameNs("12345678", "foo", "new"), - podWithUIDNameNs("12345678", "fooMirror", "new"), - }, - { - podWithUIDNameNs("98765", "bar", "new"), - podWithUIDNameNs("98765", "barMirror", "new"), - }, - } - - for i, tt := range tests { - kubeletForRealWorkers.wg.Add(1) - realPodWorkers.UpdatePod(&UpdatePodOptions{ - Pod: tt.pod, - MirrorPod: tt.mirrorPod, - UpdateType: kubetypes.SyncPodUpdate, - }) - fakePodWorkers.UpdatePod(&UpdatePodOptions{ - Pod: tt.pod, - MirrorPod: tt.mirrorPod, - UpdateType: kubetypes.SyncPodUpdate, - }) - - kubeletForRealWorkers.wg.Wait() - - if !reflect.DeepEqual(kubeletForRealWorkers.pod, kubeletForFakeWorkers.pod) { - t.Errorf("%d: Expected: %#v, Actual: %#v", i, kubeletForRealWorkers.pod, kubeletForFakeWorkers.pod) - } - - if !reflect.DeepEqual(kubeletForRealWorkers.mirrorPod, kubeletForFakeWorkers.mirrorPod) { - t.Errorf("%d: Expected: %#v, Actual: %#v", i, kubeletForRealWorkers.mirrorPod, kubeletForFakeWorkers.mirrorPod) - } - - if !reflect.DeepEqual(kubeletForRealWorkers.podStatus, kubeletForFakeWorkers.podStatus) { - t.Errorf("%d: Expected: %#v, Actual: %#v", i, kubeletForRealWorkers.podStatus, kubeletForFakeWorkers.podStatus) - } - } -} - -// TestKillPodNowFunc tests the blocking kill pod function works with pod workers as expected. -func TestKillPodNowFunc(t *testing.T) { - fakeRecorder := &record.FakeRecorder{} - podWorkers, processed := createPodWorkers() - killPodFunc := killPodNow(podWorkers, fakeRecorder) - pod := newPod("test", "test") - gracePeriodOverride := int64(0) - err := killPodFunc(pod, v1.PodStatus{Phase: v1.PodFailed, Reason: "reason", Message: "message"}, &gracePeriodOverride) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - if len(processed) != 1 { - t.Errorf("len(processed) expected: %v, actual: %v", 1, len(processed)) - return - } - syncPodRecords := processed[pod.UID] - if len(syncPodRecords) != 1 { - t.Errorf("Pod processed %v times, but expected %v", len(syncPodRecords), 1) - } - if syncPodRecords[0].updateType != kubetypes.SyncPodKill { - t.Errorf("Pod update type was %v, but expected %v", syncPodRecords[0].updateType, kubetypes.SyncPodKill) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/reason_cache.go b/vendor/k8s.io/kubernetes/pkg/kubelet/reason_cache.go deleted file mode 100644 index 4c42ab8a..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/reason_cache.go +++ /dev/null @@ -1,105 +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 kubelet - -import ( - "fmt" - "sync" - - "github.com/golang/groupcache/lru" - "k8s.io/apimachinery/pkg/types" - kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" -) - -// ReasonCache stores the failure reason of the latest container start -// in a string, keyed by _. The goal is to -// propagate this reason to the container status. This endeavor is -// "best-effort" for two reasons: -// 1. The cache is not persisted. -// 2. We use an LRU cache to avoid extra garbage collection work. This -// means that some entries may be recycled before a pod has been -// deleted. -// TODO(random-liu): Use more reliable cache which could collect garbage of failed pod. -// TODO(random-liu): Move reason cache to somewhere better. -type ReasonCache struct { - lock sync.Mutex - cache *lru.Cache -} - -// Reason is the cached item in ReasonCache -type reasonItem struct { - Err error - Message string -} - -// maxReasonCacheEntries is the cache entry number in lru cache. 1000 is a proper number -// for our 100 pods per node target. If we support more pods per node in the future, we -// may want to increase the number. -const maxReasonCacheEntries = 1000 - -// NewReasonCache creates an instance of 'ReasonCache'. -func NewReasonCache() *ReasonCache { - return &ReasonCache{cache: lru.New(maxReasonCacheEntries)} -} - -func (c *ReasonCache) composeKey(uid types.UID, name string) string { - return fmt.Sprintf("%s_%s", uid, name) -} - -// add adds error reason into the cache -func (c *ReasonCache) add(uid types.UID, name string, reason error, message string) { - c.lock.Lock() - defer c.lock.Unlock() - c.cache.Add(c.composeKey(uid, name), reasonItem{reason, message}) -} - -// Update updates the reason cache with the SyncPodResult. Only SyncResult with -// StartContainer action will change the cache. -func (c *ReasonCache) Update(uid types.UID, result kubecontainer.PodSyncResult) { - for _, r := range result.SyncResults { - if r.Action != kubecontainer.StartContainer { - continue - } - name := r.Target.(string) - if r.Error != nil { - c.add(uid, name, r.Error, r.Message) - } else { - c.Remove(uid, name) - } - } -} - -// Remove removes error reason from the cache -func (c *ReasonCache) Remove(uid types.UID, name string) { - c.lock.Lock() - defer c.lock.Unlock() - c.cache.Remove(c.composeKey(uid, name)) -} - -// Get gets error reason from the cache. The return values are error reason, error message and -// whether an error reason is found in the cache. If no error reason is found, empty string will -// be returned for error reason and error message. -func (c *ReasonCache) Get(uid types.UID, name string) (*reasonItem, bool) { - c.lock.Lock() - defer c.lock.Unlock() - value, ok := c.cache.Get(c.composeKey(uid, name)) - if !ok { - return nil, false - } - info := value.(reasonItem) - return &info, true -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/reason_cache_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/reason_cache_test.go deleted file mode 100644 index 53f2b70b..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/reason_cache_test.go +++ /dev/null @@ -1,69 +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 kubelet - -import ( - "testing" - - "k8s.io/apimachinery/pkg/types" - kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" -) - -func TestReasonCache(t *testing.T) { - // Create test sync result - syncResult := kubecontainer.PodSyncResult{} - results := []*kubecontainer.SyncResult{ - // reason cache should be set for SyncResult with StartContainer action and error - kubecontainer.NewSyncResult(kubecontainer.StartContainer, "container_1"), - // reason cache should not be set for SyncResult with StartContainer action but without error - kubecontainer.NewSyncResult(kubecontainer.StartContainer, "container_2"), - // reason cache should not be set for SyncResult with other actions - kubecontainer.NewSyncResult(kubecontainer.KillContainer, "container_3"), - } - results[0].Fail(kubecontainer.ErrRunContainer, "message_1") - results[2].Fail(kubecontainer.ErrKillContainer, "message_3") - syncResult.AddSyncResult(results...) - uid := types.UID("pod_1") - - reasonCache := NewReasonCache() - reasonCache.Update(uid, syncResult) - assertReasonInfo(t, reasonCache, uid, results[0], true) - assertReasonInfo(t, reasonCache, uid, results[1], false) - assertReasonInfo(t, reasonCache, uid, results[2], false) - - reasonCache.Remove(uid, results[0].Target.(string)) - assertReasonInfo(t, reasonCache, uid, results[0], false) -} - -func assertReasonInfo(t *testing.T, cache *ReasonCache, uid types.UID, result *kubecontainer.SyncResult, found bool) { - name := result.Target.(string) - actualReason, ok := cache.Get(uid, name) - if ok && !found { - t.Fatalf("unexpected cache hit: %v, %q", actualReason.Err, actualReason.Message) - } - if !ok && found { - t.Fatalf("corresponding reason info not found") - } - if !found { - return - } - reason := result.Error - message := result.Message - if actualReason.Err != reason || actualReason.Message != message { - t.Errorf("expected %v %q, got %v %q", reason, message, actualReason.Err, actualReason.Message) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/runonce.go b/vendor/k8s.io/kubernetes/pkg/kubelet/runonce.go deleted file mode 100644 index 294580e7..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/runonce.go +++ /dev/null @@ -1,177 +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 kubelet - -import ( - "fmt" - "os" - "time" - - "github.com/golang/glog" - "k8s.io/api/core/v1" - kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - kubetypes "k8s.io/kubernetes/pkg/kubelet/types" - "k8s.io/kubernetes/pkg/kubelet/util/format" -) - -const ( - runOnceManifestDelay = 1 * time.Second - runOnceMaxRetries = 10 - runOnceRetryDelay = 1 * time.Second - runOnceRetryDelayBackoff = 2 -) - -// RunPodResult defines the running results of a Pod. -type RunPodResult struct { - Pod *v1.Pod - Err error -} - -// RunOnce polls from one configuration update and run the associated pods. -func (kl *Kubelet) RunOnce(updates <-chan kubetypes.PodUpdate) ([]RunPodResult, error) { - // Setup filesystem directories. - if err := kl.setupDataDirs(); err != nil { - return nil, err - } - - // If the container logs directory does not exist, create it. - if _, err := os.Stat(ContainerLogsDir); err != nil { - if err := kl.os.MkdirAll(ContainerLogsDir, 0755); err != nil { - glog.Errorf("Failed to create directory %q: %v", ContainerLogsDir, err) - } - } - - select { - case u := <-updates: - glog.Infof("processing manifest with %d pods", len(u.Pods)) - result, err := kl.runOnce(u.Pods, runOnceRetryDelay) - glog.Infof("finished processing %d pods", len(u.Pods)) - return result, err - case <-time.After(runOnceManifestDelay): - return nil, fmt.Errorf("no pod manifest update after %v", runOnceManifestDelay) - } -} - -// runOnce runs a given set of pods and returns their status. -func (kl *Kubelet) runOnce(pods []*v1.Pod, retryDelay time.Duration) (results []RunPodResult, err error) { - ch := make(chan RunPodResult) - admitted := []*v1.Pod{} - for _, pod := range pods { - // Check if we can admit the pod. - if ok, reason, message := kl.canAdmitPod(admitted, pod); !ok { - kl.rejectPod(pod, reason, message) - results = append(results, RunPodResult{pod, nil}) - continue - } - - admitted = append(admitted, pod) - go func(pod *v1.Pod) { - err := kl.runPod(pod, retryDelay) - ch <- RunPodResult{pod, err} - }(pod) - } - - glog.Infof("Waiting for %d pods", len(admitted)) - failedPods := []string{} - for i := 0; i < len(admitted); i++ { - res := <-ch - results = append(results, res) - if res.Err != nil { - faliedContainerName, err := kl.getFailedContainers(res.Pod) - if err != nil { - glog.Infof("unable to get failed containers' names for pod %q, error:%v", format.Pod(res.Pod), err) - } else { - glog.Infof("unable to start pod %q because container:%v failed", format.Pod(res.Pod), faliedContainerName) - } - failedPods = append(failedPods, format.Pod(res.Pod)) - } else { - glog.Infof("started pod %q", format.Pod(res.Pod)) - } - } - if len(failedPods) > 0 { - return results, fmt.Errorf("error running pods: %v", failedPods) - } - glog.Infof("%d pods started", len(pods)) - return results, err -} - -// runPod runs a single pod and wait until all containers are running. -func (kl *Kubelet) runPod(pod *v1.Pod, retryDelay time.Duration) error { - delay := retryDelay - retry := 0 - for { - status, err := kl.containerRuntime.GetPodStatus(pod.UID, pod.Name, pod.Namespace) - if err != nil { - return fmt.Errorf("Unable to get status for pod %q: %v", format.Pod(pod), err) - } - - if kl.isPodRunning(pod, status) { - glog.Infof("pod %q containers running", format.Pod(pod)) - return nil - } - glog.Infof("pod %q containers not running: syncing", format.Pod(pod)) - - glog.Infof("Creating a mirror pod for static pod %q", format.Pod(pod)) - if err := kl.podManager.CreateMirrorPod(pod); err != nil { - glog.Errorf("Failed creating a mirror pod %q: %v", format.Pod(pod), err) - } - mirrorPod, _ := kl.podManager.GetMirrorPodByPod(pod) - if err = kl.syncPod(syncPodOptions{ - pod: pod, - mirrorPod: mirrorPod, - podStatus: status, - updateType: kubetypes.SyncPodUpdate, - }); err != nil { - return fmt.Errorf("error syncing pod %q: %v", format.Pod(pod), err) - } - if retry >= runOnceMaxRetries { - return fmt.Errorf("timeout error: pod %q containers not running after %d retries", format.Pod(pod), runOnceMaxRetries) - } - // TODO(proppy): health checking would be better than waiting + checking the state at the next iteration. - glog.Infof("pod %q containers synced, waiting for %v", format.Pod(pod), delay) - time.Sleep(delay) - retry++ - delay *= runOnceRetryDelayBackoff - } -} - -// isPodRunning returns true if all containers of a manifest are running. -func (kl *Kubelet) isPodRunning(pod *v1.Pod, status *kubecontainer.PodStatus) bool { - for _, c := range pod.Spec.Containers { - cs := status.FindContainerStatusByName(c.Name) - if cs == nil || cs.State != kubecontainer.ContainerStateRunning { - glog.Infof("Container %q for pod %q not running", c.Name, format.Pod(pod)) - return false - } - } - return true -} - -// getFailedContainer returns failed container name for pod. -func (kl *Kubelet) getFailedContainers(pod *v1.Pod) ([]string, error) { - status, err := kl.containerRuntime.GetPodStatus(pod.UID, pod.Name, pod.Namespace) - if err != nil { - return nil, fmt.Errorf("unable to get status for pod %q: %v", format.Pod(pod), err) - } - var containerNames []string - for _, cs := range status.ContainerStatuses { - if cs.State != kubecontainer.ContainerStateRunning && cs.ExitCode != 0 { - containerNames = append(containerNames, cs.Name) - } - } - return containerNames, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/runonce_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/runonce_test.go deleted file mode 100644 index 6047d664..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/runonce_test.go +++ /dev/null @@ -1,171 +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 kubelet - -import ( - "os" - "testing" - "time" - - cadvisorapi "github.com/google/cadvisor/info/v1" - cadvisorapiv2 "github.com/google/cadvisor/info/v2" - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/clock" - "k8s.io/client-go/kubernetes/fake" - "k8s.io/client-go/tools/record" - utiltesting "k8s.io/client-go/util/testing" - cadvisortest "k8s.io/kubernetes/pkg/kubelet/cadvisor/testing" - "k8s.io/kubernetes/pkg/kubelet/cm" - "k8s.io/kubernetes/pkg/kubelet/configmap" - kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" - "k8s.io/kubernetes/pkg/kubelet/eviction" - kubepod "k8s.io/kubernetes/pkg/kubelet/pod" - podtest "k8s.io/kubernetes/pkg/kubelet/pod/testing" - "k8s.io/kubernetes/pkg/kubelet/secret" - "k8s.io/kubernetes/pkg/kubelet/server/stats" - "k8s.io/kubernetes/pkg/kubelet/status" - statustest "k8s.io/kubernetes/pkg/kubelet/status/testing" - "k8s.io/kubernetes/pkg/kubelet/volumemanager" - "k8s.io/kubernetes/pkg/util/mount" - "k8s.io/kubernetes/pkg/volume" - volumetest "k8s.io/kubernetes/pkg/volume/testing" -) - -func TestRunOnce(t *testing.T) { - cadvisor := &cadvisortest.Mock{} - cadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) - cadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{ - Usage: 400, - Capacity: 1000, - Available: 600, - }, nil) - cadvisor.On("RootFsInfo").Return(cadvisorapiv2.FsInfo{ - Usage: 9, - Capacity: 10, - }, nil) - fakeSecretManager := secret.NewFakeManager() - fakeConfigMapManager := configmap.NewFakeManager() - podManager := kubepod.NewBasicPodManager( - podtest.NewFakeMirrorClient(), fakeSecretManager, fakeConfigMapManager, podtest.NewMockCheckpointManager()) - fakeRuntime := &containertest.FakeRuntime{} - basePath, err := utiltesting.MkTmpdir("kubelet") - if err != nil { - t.Fatalf("can't make a temp rootdir %v", err) - } - defer os.RemoveAll(basePath) - kb := &Kubelet{ - rootDirectory: basePath, - recorder: &record.FakeRecorder{}, - cadvisor: cadvisor, - nodeInfo: testNodeInfo{}, - statusManager: status.NewManager(nil, podManager, &statustest.FakePodDeletionSafetyProvider{}), - podManager: podManager, - os: &containertest.FakeOS{}, - containerRuntime: fakeRuntime, - reasonCache: NewReasonCache(), - clock: clock.RealClock{}, - kubeClient: &fake.Clientset{}, - hostname: testKubeletHostname, - nodeName: testKubeletHostname, - runtimeState: newRuntimeState(time.Second), - } - kb.containerManager = cm.NewStubContainerManager() - - plug := &volumetest.FakeVolumePlugin{PluginName: "fake", Host: nil} - kb.volumePluginMgr, err = - NewInitializedVolumePluginMgr(kb, fakeSecretManager, fakeConfigMapManager, nil, []volume.VolumePlugin{plug}, nil /* prober */) - if err != nil { - t.Fatalf("failed to initialize VolumePluginMgr: %v", err) - } - kb.volumeManager = volumemanager.NewVolumeManager( - true, - kb.nodeName, - kb.podManager, - kb.statusManager, - kb.kubeClient, - kb.volumePluginMgr, - fakeRuntime, - kb.mounter, - kb.getPodsDir(), - kb.recorder, - false, /* experimentalCheckNodeCapabilitiesBeforeMount */ - false /* keepTerminatedPodVolumes */) - - // TODO: Factor out "StatsProvider" from Kubelet so we don't have a cyclic dependency - volumeStatsAggPeriod := time.Second * 10 - kb.resourceAnalyzer = stats.NewResourceAnalyzer(kb, volumeStatsAggPeriod) - nodeRef := &v1.ObjectReference{ - Kind: "Node", - Name: string(kb.nodeName), - UID: types.UID(kb.nodeName), - Namespace: "", - } - fakeKillPodFunc := func(pod *v1.Pod, podStatus v1.PodStatus, gracePeriodOverride *int64) error { - return nil - } - evictionManager, evictionAdmitHandler := eviction.NewManager(kb.resourceAnalyzer, eviction.Config{}, fakeKillPodFunc, nil, nil, kb.recorder, nodeRef, kb.clock) - - kb.evictionManager = evictionManager - kb.admitHandlers.AddPodAdmitHandler(evictionAdmitHandler) - kb.mounter = &mount.FakeMounter{} - if err := kb.setupDataDirs(); err != nil { - t.Errorf("Failed to init data dirs: %v", err) - } - - pods := []*v1.Pod{ - { - ObjectMeta: metav1.ObjectMeta{ - UID: "12345678", - Name: "foo", - Namespace: "new", - }, - Spec: v1.PodSpec{ - Containers: []v1.Container{ - {Name: "bar"}, - }, - }, - }, - } - podManager.SetPods(pods) - // The original test here is totally meaningless, because fakeruntime will always return an empty podStatus. While - // the original logic of isPodRunning happens to return true when podstatus is empty, so the test can always pass. - // Now the logic in isPodRunning is changed, to let the test pass, we set the podstatus directly in fake runtime. - // This is also a meaningless test, because the isPodRunning will also always return true after setting this. However, - // because runonce is never used in kubernetes now, we should deprioritize the cleanup work. - // TODO(random-liu) Fix the test, make it meaningful. - fakeRuntime.PodStatus = kubecontainer.PodStatus{ - ContainerStatuses: []*kubecontainer.ContainerStatus{ - { - Name: "bar", - State: kubecontainer.ContainerStateRunning, - }, - }, - } - results, err := kb.runOnce(pods, time.Millisecond) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - if results[0].Err != nil { - t.Errorf("unexpected run pod error: %v", results[0].Err) - } - if results[0].Pod.Name != "foo" { - t.Errorf("unexpected pod: %q", results[0].Pod.Name) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/runtime.go b/vendor/k8s.io/kubernetes/pkg/kubelet/runtime.go deleted file mode 100644 index 18883cb7..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/runtime.go +++ /dev/null @@ -1,118 +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 kubelet - -import ( - "fmt" - "sync" - "time" -) - -type runtimeState struct { - sync.RWMutex - lastBaseRuntimeSync time.Time - baseRuntimeSyncThreshold time.Duration - networkError error - internalError error - cidr string - healthChecks []*healthCheck -} - -// A health check function should be efficient and not rely on external -// components (e.g., container runtime). -type healthCheckFnType func() (bool, error) - -type healthCheck struct { - name string - fn healthCheckFnType -} - -func (s *runtimeState) addHealthCheck(name string, f healthCheckFnType) { - s.Lock() - defer s.Unlock() - s.healthChecks = append(s.healthChecks, &healthCheck{name: name, fn: f}) -} - -func (s *runtimeState) setRuntimeSync(t time.Time) { - s.Lock() - defer s.Unlock() - s.lastBaseRuntimeSync = t -} - -func (s *runtimeState) setInternalError(err error) { - s.Lock() - defer s.Unlock() - s.internalError = err -} - -func (s *runtimeState) setNetworkState(err error) { - s.Lock() - defer s.Unlock() - s.networkError = err -} - -func (s *runtimeState) setPodCIDR(cidr string) { - s.Lock() - defer s.Unlock() - s.cidr = cidr -} - -func (s *runtimeState) podCIDR() string { - s.RLock() - defer s.RUnlock() - return s.cidr -} - -func (s *runtimeState) runtimeErrors() []string { - s.RLock() - defer s.RUnlock() - var ret []string - if !s.lastBaseRuntimeSync.Add(s.baseRuntimeSyncThreshold).After(time.Now()) { - ret = append(ret, "container runtime is down") - } - if s.internalError != nil { - ret = append(ret, s.internalError.Error()) - } - for _, hc := range s.healthChecks { - if ok, err := hc.fn(); !ok { - ret = append(ret, fmt.Sprintf("%s is not healthy: %v", hc.name, err)) - } - } - - return ret -} - -func (s *runtimeState) networkErrors() []string { - s.RLock() - defer s.RUnlock() - var ret []string - if s.networkError != nil { - ret = append(ret, s.networkError.Error()) - } - return ret -} - -func newRuntimeState( - runtimeSyncThreshold time.Duration, -) *runtimeState { - return &runtimeState{ - lastBaseRuntimeSync: time.Time{}, - baseRuntimeSyncThreshold: runtimeSyncThreshold, - networkError: fmt.Errorf("network state unknown"), - internalError: nil, - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util.go deleted file mode 100644 index 3047c2fa..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/util.go +++ /dev/null @@ -1,129 +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 kubelet - -import ( - "fmt" - "os" - - "k8s.io/api/core/v1" - "k8s.io/kubernetes/pkg/capabilities" - kubetypes "k8s.io/kubernetes/pkg/kubelet/types" - "k8s.io/kubernetes/pkg/securitycontext" -) - -// Check whether we have the capabilities to run the specified pod. -func canRunPod(pod *v1.Pod) error { - if !capabilities.Get().AllowPrivileged { - for _, container := range pod.Spec.Containers { - if securitycontext.HasPrivilegedRequest(&container) { - return fmt.Errorf("pod with UID %q specified privileged container, but is disallowed", pod.UID) - } - } - for _, container := range pod.Spec.InitContainers { - if securitycontext.HasPrivilegedRequest(&container) { - return fmt.Errorf("pod with UID %q specified privileged init container, but is disallowed", pod.UID) - } - } - } - - if pod.Spec.HostNetwork { - allowed, err := allowHostNetwork(pod) - if err != nil { - return err - } - if !allowed { - return fmt.Errorf("pod with UID %q specified host networking, but is disallowed", pod.UID) - } - } - - if pod.Spec.HostPID { - allowed, err := allowHostPID(pod) - if err != nil { - return err - } - if !allowed { - return fmt.Errorf("pod with UID %q specified host PID, but is disallowed", pod.UID) - } - } - - if pod.Spec.HostIPC { - allowed, err := allowHostIPC(pod) - if err != nil { - return err - } - if !allowed { - return fmt.Errorf("pod with UID %q specified host ipc, but is disallowed", pod.UID) - } - } - - return nil -} - -// Determined whether the specified pod is allowed to use host networking -func allowHostNetwork(pod *v1.Pod) (bool, error) { - podSource, err := kubetypes.GetPodSource(pod) - if err != nil { - return false, err - } - for _, source := range capabilities.Get().PrivilegedSources.HostNetworkSources { - if source == podSource { - return true, nil - } - } - return false, nil -} - -// Determined whether the specified pod is allowed to use host PID -func allowHostPID(pod *v1.Pod) (bool, error) { - podSource, err := kubetypes.GetPodSource(pod) - if err != nil { - return false, err - } - for _, source := range capabilities.Get().PrivilegedSources.HostPIDSources { - if source == podSource { - return true, nil - } - } - return false, nil -} - -// Determined whether the specified pod is allowed to use host ipc -func allowHostIPC(pod *v1.Pod) (bool, error) { - podSource, err := kubetypes.GetPodSource(pod) - if err != nil { - return false, err - } - for _, source := range capabilities.Get().PrivilegedSources.HostIPCSources { - if source == podSource { - return true, nil - } - } - return false, nil -} - -// dirExists returns true if the path exists and represents a directory. -func dirExists(path string) bool { - s, err := os.Stat(path) - if err != nil { - return false - } - return s.IsDir() -} - -// empty is a placeholder type used to implement a set -type empty struct{} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volume_host.go b/vendor/k8s.io/kubernetes/pkg/kubelet/volume_host.go deleted file mode 100644 index 1d8bfcc9..00000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volume_host.go +++ /dev/null @@ -1,272 +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 kubelet - -import ( - "fmt" - "net" - "runtime" - - "github.com/golang/glog" - - authenticationv1 "k8s.io/api/authentication/v1" - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" - utilfeature "k8s.io/apiserver/pkg/util/feature" - clientset "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/record" - "k8s.io/kubernetes/pkg/cloudprovider" - "k8s.io/kubernetes/pkg/features" - "k8s.io/kubernetes/pkg/kubelet/configmap" - "k8s.io/kubernetes/pkg/kubelet/container" - "k8s.io/kubernetes/pkg/kubelet/mountpod" - "k8s.io/kubernetes/pkg/kubelet/secret" - "k8s.io/kubernetes/pkg/kubelet/token" - "k8s.io/kubernetes/pkg/util/io" - "k8s.io/kubernetes/pkg/util/mount" - "k8s.io/kubernetes/pkg/volume" - "k8s.io/kubernetes/pkg/volume/util" -) - -// NewInitializedVolumePluginMgr returns a new instance of -// volume.VolumePluginMgr initialized with kubelets implementation of the -// volume.VolumeHost interface. -// -// kubelet - used by VolumeHost methods to expose kubelet specific parameters -// plugins - used to initialize volumePluginMgr -func NewInitializedVolumePluginMgr( - kubelet *Kubelet, - secretManager secret.Manager, - configMapManager configmap.Manager, - tokenManager *token.Manager, - plugins []volume.VolumePlugin, - prober volume.DynamicPluginProber) (*volume.VolumePluginMgr, error) { - - mountPodManager, err := mountpod.NewManager(kubelet.getRootDir(), kubelet.podManager) - if err != nil { - return nil, err - } - kvh := &kubeletVolumeHost{ - kubelet: kubelet, - volumePluginMgr: volume.VolumePluginMgr{}, - secretManager: secretManager, - configMapManager: configMapManager, - tokenManager: tokenManager, - mountPodManager: mountPodManager, - } - - if err := kvh.volumePluginMgr.InitPlugins(plugins, prober, kvh); err != nil { - return nil, fmt.Errorf( - "Could not initialize volume plugins for KubeletVolumePluginMgr: %v", - err) - } - - return &kvh.volumePluginMgr, nil -} - -// Compile-time check to ensure kubeletVolumeHost implements the VolumeHost interface -var _ volume.VolumeHost = &kubeletVolumeHost{} - -func (kvh *kubeletVolumeHost) GetPluginDir(pluginName string) string { - return kvh.kubelet.getPluginDir(pluginName) -} - -type kubeletVolumeHost struct { - kubelet *Kubelet - volumePluginMgr volume.VolumePluginMgr - secretManager secret.Manager - tokenManager *token.Manager - configMapManager configmap.Manager - mountPodManager mountpod.Manager -} - -func (kvh *kubeletVolumeHost) GetVolumeDevicePluginDir(pluginName string) string { - return kvh.kubelet.getVolumeDevicePluginDir(pluginName) -} - -func (kvh *kubeletVolumeHost) GetPodsDir() string { - return kvh.kubelet.getPodsDir() -} - -func (kvh *kubeletVolumeHost) GetPodVolumeDir(podUID types.UID, pluginName string, volumeName string) string { - dir := kvh.kubelet.getPodVolumeDir(podUID, pluginName, volumeName) - if runtime.GOOS == "windows" { - dir = util.GetWindowsPath(dir) - } - return dir -} - -func (kvh *kubeletVolumeHost) GetPodVolumeDeviceDir(podUID types.UID, pluginName string) string { - return kvh.kubelet.getPodVolumeDeviceDir(podUID, pluginName) -} - -func (kvh *kubeletVolumeHost) GetPodPluginDir(podUID types.UID, pluginName string) string { - return kvh.kubelet.getPodPluginDir(podUID, pluginName) -} - -func (kvh *kubeletVolumeHost) GetKubeClient() clientset.Interface { - return kvh.kubelet.kubeClient -} - -func (kvh *kubeletVolumeHost) NewWrapperMounter( - volName string, - spec volume.Spec, - pod *v1.Pod, - opts volume.VolumeOptions) (volume.Mounter, error) { - // The name of wrapper volume is set to "wrapped_{wrapped_volume_name}" - wrapperVolumeName := "wrapped_" + volName - if spec.Volume != nil { - spec.Volume.Name = wrapperVolumeName - } - - return kvh.kubelet.newVolumeMounterFromPlugins(&spec, pod, opts) -} - -func (kvh *kubeletVolumeHost) NewWrapperUnmounter(volName string, spec volume.Spec, podUID types.UID) (volume.Unmounter, error) { - // The name of wrapper volume is set to "wrapped_{wrapped_volume_name}" - wrapperVolumeName := "wrapped_" + volName - if spec.Volume != nil { - spec.Volume.Name = wrapperVolumeName - } - - plugin, err := kvh.kubelet.volumePluginMgr.FindPluginBySpec(&spec) - if err != nil { - return nil, err - } - - return plugin.NewUnmounter(spec.Name(), podUID) -} - -func (kvh *kubeletVolumeHost) GetCloudProvider() cloudprovider.Interface { - return kvh.kubelet.cloud -} - -func (kvh *kubeletVolumeHost) GetMounter(pluginName string) mount.Interface { - exec, err := kvh.getMountExec(pluginName) - if err != nil { - glog.V(2).Infof("Error finding mount pod for plugin %s: %s", pluginName, err.Error()) - // Use the default mounter - exec = nil - } - if exec == nil { - return kvh.kubelet.mounter - } - return mount.NewExecMounter(exec, kvh.kubelet.mounter) -} - -func (kvh *kubeletVolumeHost) GetWriter() io.Writer { - return kvh.kubelet.writer -} - -func (kvh *kubeletVolumeHost) GetHostName() string { - return kvh.kubelet.hostname -} - -func (kvh *kubeletVolumeHost) GetHostIP() (net.IP, error) { - return kvh.kubelet.GetHostIP() -} - -func (kvh *kubeletVolumeHost) GetNodeAllocatable() (v1.ResourceList, error) { - node, err := kvh.kubelet.getNodeAnyWay() - if err != nil { - return nil, fmt.Errorf("error retrieving node: %v", err) - } - return node.Status.Allocatable, nil -} - -func (kvh *kubeletVolumeHost) GetSecretFunc() func(namespace, name string) (*v1.Secret, error) { - return kvh.secretManager.GetSecret -} - -func (kvh *kubeletVolumeHost) GetConfigMapFunc() func(namespace, name string) (*v1.ConfigMap, error) { - return kvh.configMapManager.GetConfigMap -} - -func (kvh *kubeletVolumeHost) GetServiceAccountTokenFunc() func(namespace, name string, tr *authenticationv1.TokenRequest) (*authenticationv1.TokenRequest, error) { - return kvh.tokenManager.GetServiceAccountToken -} - -func (kvh *kubeletVolumeHost) GetNodeLabels() (map[string]string, error) { - node, err := kvh.kubelet.GetNode() - if err != nil { - return nil, fmt.Errorf("error retrieving node: %v", err) - } - return node.Labels, nil -} - -func (kvh *kubeletVolumeHost) GetNodeName() types.NodeName { - return kvh.kubelet.nodeName -} - -func (kvh *kubeletVolumeHost) GetEventRecorder() record.EventRecorder { - return kvh.kubelet.recorder -} - -func (kvh *kubeletVolumeHost) GetExec(pluginName string) mount.Exec { - exec, err := kvh.getMountExec(pluginName) - if err != nil { - glog.V(2).Infof("Error finding mount pod for plugin %s: %s", pluginName, err.Error()) - // Use the default exec - exec = nil - } - if exec == nil { - return mount.NewOsExec() - } - return exec -} - -// getMountExec returns mount.Exec implementation that leads to pod with mount -// utilities. It returns nil,nil when there is no such pod and default mounter / -// os.Exec should be used. -func (kvh *kubeletVolumeHost) getMountExec(pluginName string) (mount.Exec, error) { - if !utilfeature.DefaultFeatureGate.Enabled(features.MountContainers) { - glog.V(5).Infof("using default mounter/exec for %s", pluginName) - return nil, nil - } - - pod, container, err := kvh.mountPodManager.GetMountPod(pluginName) - if err != nil { - return nil, err - } - if pod == nil { - // Use default mounter/exec for this plugin - glog.V(5).Infof("using default mounter/exec for %s", pluginName) - return nil, nil - } - glog.V(5).Infof("using container %s/%s/%s to execute mount utilites for %s", pod.Namespace, pod.Name, container, pluginName) - return &containerExec{ - pod: pod, - containerName: container, - kl: kvh.kubelet, - }, nil -} - -// containerExec is implementation of mount.Exec that executes commands in given -// container in given pod. -type containerExec struct { - pod *v1.Pod - containerName string - kl *Kubelet -} - -var _ mount.Exec = &containerExec{} - -func (e *containerExec) Run(cmd string, args ...string) ([]byte, error) { - cmdline := append([]string{cmd}, args...) - glog.V(5).Infof("Exec mounter running in pod %s/%s/%s: %v", e.pod.Namespace, e.pod.Name, e.containerName, cmdline) - return e.kl.RunInContainer(container.GetPodFullName(e.pod), e.pod.UID, e.containerName, cmdline) -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/BUILD b/vendor/k8s.io/kubernetes/pkg/util/BUILD deleted file mode 100644 index 27bee9d6..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/BUILD +++ /dev/null @@ -1,78 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/util/async:all-srcs", - "//pkg/util/bandwidth:all-srcs", - "//pkg/util/config:all-srcs", - "//pkg/util/configz:all-srcs", - "//pkg/util/conntrack:all-srcs", - "//pkg/util/dbus:all-srcs", - "//pkg/util/ebtables:all-srcs", - "//pkg/util/env:all-srcs", - "//pkg/util/file:all-srcs", - "//pkg/util/filesystem:all-srcs", - "//pkg/util/flag:all-srcs", - "//pkg/util/flock:all-srcs", - "//pkg/util/goroutinemap:all-srcs", - "//pkg/util/hash:all-srcs", - "//pkg/util/initsystem:all-srcs", - "//pkg/util/interrupt:all-srcs", - "//pkg/util/io:all-srcs", - "//pkg/util/ipconfig:all-srcs", - "//pkg/util/ipset:all-srcs", - "//pkg/util/iptables:all-srcs", - "//pkg/util/ipvs:all-srcs", - "//pkg/util/keymutex:all-srcs", - "//pkg/util/labels:all-srcs", - "//pkg/util/limitwriter:all-srcs", - "//pkg/util/maps:all-srcs", - "//pkg/util/metrics:all-srcs", - "//pkg/util/mount:all-srcs", - "//pkg/util/net:all-srcs", - "//pkg/util/netsh:all-srcs", - "//pkg/util/node:all-srcs", - "//pkg/util/normalizer:all-srcs", - "//pkg/util/nsenter:all-srcs", - "//pkg/util/oom:all-srcs", - "//pkg/util/parsers:all-srcs", - "//pkg/util/pod:all-srcs", - "//pkg/util/pointer:all-srcs", - "//pkg/util/procfs:all-srcs", - "//pkg/util/reflector/prometheus:all-srcs", - "//pkg/util/removeall:all-srcs", - "//pkg/util/resizefs:all-srcs", - "//pkg/util/resourcecontainer:all-srcs", - "//pkg/util/rlimit:all-srcs", - "//pkg/util/selinux:all-srcs", - "//pkg/util/slice:all-srcs", - "//pkg/util/strings:all-srcs", - "//pkg/util/sysctl:all-srcs", - "//pkg/util/system:all-srcs", - "//pkg/util/tail:all-srcs", - "//pkg/util/taints:all-srcs", - "//pkg/util/template:all-srcs", - "//pkg/util/term:all-srcs", - "//pkg/util/threading:all-srcs", - "//pkg/util/tolerations:all-srcs", - "//pkg/util/version:all-srcs", - "//pkg/util/workqueue/prometheus:all-srcs", - ], - tags = ["automanaged"], -) - -sh_test( - name = "verify-util-pkg", - size = "small", - srcs = ["verify-util-pkg.sh"], - data = glob(["*.go"]), -) diff --git a/vendor/k8s.io/kubernetes/pkg/util/node/BUILD b/vendor/k8s.io/kubernetes/pkg/util/node/BUILD deleted file mode 100644 index 1e198dbb..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/node/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_library( - name = "go_default_library", - srcs = ["node.go"], - importpath = "k8s.io/kubernetes/pkg/util/node", - deps = [ - "//pkg/apis/core:go_default_library", - "//pkg/kubelet/apis:go_default_library", - "//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/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/strategicpatch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["node_test.go"], - embed = [":go_default_library"], - deps = [ - "//pkg/kubelet/apis:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//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/vendor/k8s.io/kubernetes/pkg/util/node/node_test.go b/vendor/k8s.io/kubernetes/pkg/util/node/node_test.go deleted file mode 100644 index b59f355a..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/node/node_test.go +++ /dev/null @@ -1,91 +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 node - -import ( - "testing" - - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - kubeletapis "k8s.io/kubernetes/pkg/kubelet/apis" -) - -func TestGetPreferredAddress(t *testing.T) { - testcases := map[string]struct { - Labels map[string]string - Addresses []v1.NodeAddress - Preferences []v1.NodeAddressType - - ExpectErr string - ExpectAddress string - }{ - "no addresses": { - ExpectErr: "no preferred addresses found; known addresses: []", - }, - "missing address": { - Addresses: []v1.NodeAddress{ - {Type: v1.NodeInternalIP, Address: "1.2.3.4"}, - }, - Preferences: []v1.NodeAddressType{v1.NodeHostName}, - ExpectErr: "no preferred addresses found; known addresses: [{InternalIP 1.2.3.4}]", - }, - "found address": { - Addresses: []v1.NodeAddress{ - {Type: v1.NodeInternalIP, Address: "1.2.3.4"}, - {Type: v1.NodeExternalIP, Address: "1.2.3.5"}, - {Type: v1.NodeExternalIP, Address: "1.2.3.7"}, - }, - Preferences: []v1.NodeAddressType{v1.NodeHostName, v1.NodeExternalIP}, - ExpectAddress: "1.2.3.5", - }, - "found hostname address": { - Labels: map[string]string{kubeletapis.LabelHostname: "label-hostname"}, - Addresses: []v1.NodeAddress{ - {Type: v1.NodeExternalIP, Address: "1.2.3.5"}, - {Type: v1.NodeHostName, Address: "status-hostname"}, - }, - Preferences: []v1.NodeAddressType{v1.NodeHostName, v1.NodeExternalIP}, - ExpectAddress: "status-hostname", - }, - "found label address": { - Labels: map[string]string{kubeletapis.LabelHostname: "label-hostname"}, - Addresses: []v1.NodeAddress{ - {Type: v1.NodeExternalIP, Address: "1.2.3.5"}, - }, - Preferences: []v1.NodeAddressType{v1.NodeHostName, v1.NodeExternalIP}, - ExpectAddress: "label-hostname", - }, - } - - for k, tc := range testcases { - node := &v1.Node{ - ObjectMeta: metav1.ObjectMeta{Labels: tc.Labels}, - Status: v1.NodeStatus{Addresses: tc.Addresses}, - } - address, err := GetPreferredNodeAddress(node, tc.Preferences) - errString := "" - if err != nil { - errString = err.Error() - } - if errString != tc.ExpectErr { - t.Errorf("%s: expected err=%q, got %q", k, tc.ExpectErr, errString) - } - if address != tc.ExpectAddress { - t.Errorf("%s: expected address=%q, got %q", k, tc.ExpectAddress, address) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/verify-util-pkg.sh b/vendor/k8s.io/kubernetes/pkg/util/verify-util-pkg.sh deleted file mode 100755 index 5c1fbecc..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/verify-util-pkg.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash - -# 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. - -# verify-util-pkg.sh checks whether *.go except doc.go in pkg/util have been moved into -# sub-pkgs, see issue #15634. - -set -o errexit -set -o nounset -set -o pipefail - -BASH_DIR=$(dirname "${BASH_SOURCE}") - -find_go_files() { - find . -maxdepth 1 -not \( \ - \( \ - -wholename './doc.go' \ - \) -prune \ - \) -name '*.go' -} - -ret=0 - -pushd "${BASH_DIR}" > /dev/null - for path in `find_go_files`; do - file=$(basename $path) - echo "Found pkg/util/${file}, but should be moved into util sub-pkgs." 1>&2 - ret=1 - done -popd > /dev/null - -if [[ ${ret} -gt 0 ]]; then - exit ${ret} -fi - -echo "Util Package Verified." diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/api/LICENSE b/vendor/k8s.io/kubernetes/staging/src/k8s.io/api/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/api/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/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiextensions-apiserver/LICENSE b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiextensions-apiserver/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiextensions-apiserver/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/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/LICENSE b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/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/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/LICENSE b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/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/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/LICENSE b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/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/vendor/k8s.io/kubernetes/staging/src/k8s.io/code-generator/LICENSE b/vendor/k8s.io/kubernetes/staging/src/k8s.io/code-generator/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/code-generator/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/vendor/k8s.io/kubernetes/staging/src/k8s.io/kube-aggregator/LICENSE b/vendor/k8s.io/kubernetes/staging/src/k8s.io/kube-aggregator/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/kube-aggregator/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/vendor/k8s.io/kubernetes/staging/src/k8s.io/metrics/LICENSE b/vendor/k8s.io/kubernetes/staging/src/k8s.io/metrics/LICENSE new file mode 100644 index 00000000..8dada3ed --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/metrics/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. diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/sample-apiserver/LICENSE b/vendor/k8s.io/kubernetes/staging/src/k8s.io/sample-apiserver/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/sample-apiserver/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/vendor/k8s.io/kubernetes/staging/src/k8s.io/sample-controller/LICENSE b/vendor/k8s.io/kubernetes/staging/src/k8s.io/sample-controller/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/sample-controller/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/vendor/k8s.io/kubernetes/third_party/forked/golang/LICENSE b/vendor/k8s.io/kubernetes/third_party/forked/golang/LICENSE new file mode 100644 index 00000000..74487567 --- /dev/null +++ b/vendor/k8s.io/kubernetes/third_party/forked/golang/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/k8s.io/kubernetes/third_party/forked/golang/PATENTS b/vendor/k8s.io/kubernetes/third_party/forked/golang/PATENTS new file mode 100644 index 00000000..73309904 --- /dev/null +++ b/vendor/k8s.io/kubernetes/third_party/forked/golang/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/k8s.io/kubernetes/third_party/forked/gonum/graph/LICENSE b/vendor/k8s.io/kubernetes/third_party/forked/gonum/graph/LICENSE new file mode 100644 index 00000000..76edf5ef --- /dev/null +++ b/vendor/k8s.io/kubernetes/third_party/forked/gonum/graph/LICENSE @@ -0,0 +1,23 @@ +Copyright ©2013 The gonum Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the gonum project nor the names of its authors and + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/vendor/k8s.io/kubernetes/third_party/forked/shell2junit/LICENSE b/vendor/k8s.io/kubernetes/third_party/forked/shell2junit/LICENSE new file mode 100644 index 00000000..a03114bc --- /dev/null +++ b/vendor/k8s.io/kubernetes/third_party/forked/shell2junit/LICENSE @@ -0,0 +1,172 @@ + Shell2Junit License Information + +Feb, 2010 + +shell2junit library and sample code is licensed under Apache License, v.2.0. + +(c) 2009 Manolo Carrasco (Manuel Carrasco Moñino) + +===== + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the +copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other +entities that control, are controlled by, or are under common control with +that entity. For the purposes of this definition, "control" means (i) the +power, direct or indirect, to cause the direction or management of such +entity, whether by contract or otherwise, or (ii) ownership of fifty percent +(50%) or more of the outstanding shares, or (iii) beneficial ownership of +such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, and +configuration files. + +"Object" form shall mean any form resulting from mechanical transformation +or translation of a Source form, including but not limited to compiled +object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, +made available under the License, as indicated by a copyright notice that is +included in or attached to the work (an example is provided in the Appendix +below). + +"Derivative Works" shall mean any work, whether in Source or Object form, +that is based on (or derived from) the Work and for which the editorial +revisions, annotations, elaborations, or other modifications represent, as a +whole, an original work of authorship. For the purposes of this License, +Derivative Works shall not include works that remain separable from, or +merely link (or bind by name) to the interfaces of, the Work and Derivative +Works thereof. + +"Contribution" shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor for +inclusion in the Work by the copyright owner or by an individual or Legal +Entity authorized to submit on behalf of the copyright owner. For the +purposes of this definition, "submitted" means any form of electronic, +verbal, or written communication sent to the Licensor or its +representatives, including but not limited to communication on electronic +mailing lists, source code control systems, and issue tracking systems that +are managed by, or on behalf of, the Licensor for the purpose of discussing +and improving the Work, but excluding communication that is conspicuously +marked or otherwise designated in writing by the copyright owner as "Not a +Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on +behalf of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this +License, each Contributor hereby grants to You a perpetual, worldwide, +non-exclusive, no-charge, royalty-free, irrevocable copyright license to +reproduce, prepare Derivative Works of, publicly display, publicly perform, +sublicense, and distribute the Work and such Derivative Works in Source or +Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this +License, each Contributor hereby grants to You a perpetual, worldwide, +non-exclusive, no-charge, royalty-free, irrevocable (except as stated in +this section) patent license to make, have made, use, offer to sell, sell, +import, and otherwise transfer the Work, where such license applies only to +those patent claims licensable by such Contributor that are necessarily +infringed by their Contribution(s) alone or by combination of their +Contribution(s) with the Work to which such Contribution(s) was submitted. +If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this +License for that Work shall terminate as of the date such litigation is +filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or +Derivative Works thereof in any medium, with or without modifications, and +in Source or Object form, provided that You meet the following conditions: + +a. You must give any other recipients of the Work or Derivative Works a copy +of this License; and + +b. You must cause any modified files to carry prominent notices stating that +You changed the files; and + +c. You must retain, in the Source form of any Derivative Works that You +distribute, all copyright, patent, trademark, and attribution notices from +the Source form of the Work, excluding those notices that do not pertain to +any part of the Derivative Works; and + +d. If the Work includes a "NOTICE" text file as part of its distribution, +then any Derivative Works that You distribute must include a readable copy +of the attribution notices contained within such NOTICE file, excluding +those notices that do not pertain to any part of the Derivative Works, in at +least one of the following places: within a NOTICE text file distributed as +part of the Derivative Works; within the Source form or documentation, if +provided along with the Derivative Works; or, within a display generated by +the Derivative Works, if and wherever such third-party notices normally +appear. The contents of the NOTICE file are for informational purposes only +and do not modify the License. You may add Your own attribution notices +within Derivative Works that You distribute, alongside or as an addendum to +the NOTICE text from the Work, provided that such additional attribution +notices cannot be construed as modifying the License. + +You may add Your own copyright statement to Your modifications and may +provide additional or different license terms and conditions for use, +reproduction, or distribution of Your modifications, or for any such +Derivative Works as a whole, provided Your use, reproduction, and +distribution of the Work otherwise complies with the conditions stated in +this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any +Contribution intentionally submitted for inclusion in the Work by You to the +Licensor shall be under the terms and conditions of this License, without +any additional terms or conditions. Notwithstanding the above, nothing +herein shall supersede or modify the terms of any separate license agreement +you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade +names, trademarks, service marks, or product names of the Licensor, except +as required for reasonable and customary use in describing the origin of the +Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in +writing, Licensor provides the Work (and each Contributor provides its +Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied, including, without limitation, any +warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or +FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining +the appropriateness of using or redistributing the Work and assume any risks +associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether +in tort (including negligence), contract, or otherwise, unless required by +applicable law (such as deliberate and grossly negligent acts) or agreed to +in writing, shall any Contributor be liable to You for damages, including +any direct, indirect, special, incidental, or consequential damages of any +character arising as a result of this License or out of the use or inability +to use the Work (including but not limited to damages for loss of goodwill, +work stoppage, computer failure or malfunction, or any and all other +commercial damages or losses), even if such Contributor has been advised of +the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work +or Derivative Works thereof, You may choose to offer, and charge a fee for, +acceptance of support, warranty, indemnity, or other liability obligations +and/or rights consistent with this License. However, in accepting such +obligations, You may act only on Your own behalf and on Your sole +responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any +liability incurred by, or claims asserted against, such Contributor by +reason of your accepting any such warranty or additional liability. + diff --git a/vendor/k8s.io/kubernetes/third_party/intemp/LICENSE b/vendor/k8s.io/kubernetes/third_party/intemp/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/vendor/k8s.io/kubernetes/third_party/intemp/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/vendor/k8s.io/kubernetes/third_party/swagger-ui/LICENSE b/vendor/k8s.io/kubernetes/third_party/swagger-ui/LICENSE new file mode 100644 index 00000000..9f93e067 --- /dev/null +++ b/vendor/k8s.io/kubernetes/third_party/swagger-ui/LICENSE @@ -0,0 +1,11 @@ +Copyright 2014 Reverb Technologies, 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 [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/vendor/k8s.io/utils/.travis.yml b/vendor/k8s.io/utils/.travis.yml deleted file mode 100644 index d39066cc..00000000 --- a/vendor/k8s.io/utils/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: go -go: - - 1.8.x - - 1.9.x -go_import_path: k8s.io/utils -script: - - diff -u <(echo -n) <(gofmt -d .) - - go tool vet . - - go test -v -race ./... diff --git a/vendor/k8s.io/utils/CONTRIBUTING.md b/vendor/k8s.io/utils/CONTRIBUTING.md deleted file mode 100644 index ef37eb0b..00000000 --- a/vendor/k8s.io/utils/CONTRIBUTING.md +++ /dev/null @@ -1,9 +0,0 @@ -# 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/vendor/k8s.io/utils/HOWTOMOVE.md b/vendor/k8s.io/utils/HOWTOMOVE.md deleted file mode 100644 index 49028998..00000000 --- a/vendor/k8s.io/utils/HOWTOMOVE.md +++ /dev/null @@ -1,31 +0,0 @@ -# How to move a utility pkg from other kubernetes repos - -It has 2 steps to move a pkg from other Kubernetes repos to `k8s.io/utils` repo: -- copy the pkg to `k8s.io/utils` repo -- update the import paths and `vendor/` in the repos that refer this pkg - -## Copy the pkg to `k8s.io/utils` repo - -Copying should preserve all the git history associated with it. -[Here](http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/) is a working approach. -Note: You may need to use `--allow-unrelated-histories` if you get error when running `git pull` following the post above. - -Then, you may need to restructure the package to make sure it has the following structure. - - . - ├── doc.go # Description for this package - ├── .go # utility go file - ├── _test.go # go unit tests - └── testing # All the testing framework - └── fake_.go # Testing framework go file - -[#5](https://github.com/kubernetes/utils/pull/5) is an example for this step. - -## Update the repos that refer the pkg - -You should update the import paths. -Then follow [this doc](https://github.com/kubernetes/community/blob/master/contributors/devel/godep.md) to update `vendor/` and `Godeps/`. - -You may want to run `make bazel-test` to make sure all new references work. - -[kubernetes/kubernetes#49234](https://github.com/kubernetes/kubernetes/pull/49234) is an example for this step. diff --git a/vendor/k8s.io/utils/README.md b/vendor/k8s.io/utils/README.md deleted file mode 100644 index 9551c5a5..00000000 --- a/vendor/k8s.io/utils/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# Utils - -[![Build Status]](https://travis-ci.org/kubernetes/utils) [![GoDoc](https://godoc.org/k8s.io/utils?status.svg)](https://godoc.org/k8s.io/utils) - -A set of Go libraries that provide low-level, -kubernetes-independent packages supplementing the [Go -standard libs]. - -## Purpose - -As Kubernetes grows and spins functionality out of its -[core] and into cooperating repositories like -[apiserver], [kubectl], [kubeadm], etc., the need -arises for leaf repositories to house shared code and -avoid cycles in repository relationships. - -This repository is intended to hold shared utilities -with no Kubernetes dependence that may be of interest -to any Go project. See these [instructions for moving] -an existing package to this repository. - - -## Criteria for adding code here - -- Used by multiple Kubernetes repositories. - -- Full unit test coverage. - -- Go tools compliant (`go get`, `go test`, etc.). - -- Complex enough to be worth vendoring, rather than copying. - -- Stable, or backward compatible, API. - -- _No dependence on any Kubernetes repository_. - -## Libraries - -- [Exec](/exec) provides an interface for `os/exec`. It makes it easier - to mock and replace in tests, especially with - the [FakeExec](exec/testing/fake_exec.go) struct. - -- [Temp](/temp) provides an interface to create temporary directories. It also - provides a [FakeDir](temp/temptest) implementation to replace in tests. - -- [Clock](/clock) provides an interface for time-based operations. It allows - mocking time for testing. - -- [Pointers](/pointers) provides some functions for pointer-based operations. - -[Build Status]: https://travis-ci.org/kubernetes/utils.svg?branch=master -[Go standard libs]: https://golang.org/pkg/#stdlib -[api]: https://github.com/kubernetes/api -[apiserver]: https://github.com/kubernetes/apiserver -[core]: https://github.com/kubernetes/kubernetes -[ingress]: https://github.com/kubernetes/ingress -[kubeadm]: https://github.com/kubernetes/kubeadm -[kubectl]: https://github.com/kubernetes/kubectl -[instructions for moving]: ./HOWTOMOVE.md - -## Contributing - -Please see [CONTRIBUTING.md](CONTRIBUTING.md) for instructions on how to contribute. diff --git a/vendor/k8s.io/utils/code-of-conduct.md b/vendor/k8s.io/utils/code-of-conduct.md deleted file mode 100644 index 0d15c00c..00000000 --- a/vendor/k8s.io/utils/code-of-conduct.md +++ /dev/null @@ -1,3 +0,0 @@ -# Kubernetes Community Code of Conduct - -Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) diff --git a/vendor/k8s.io/utils/exec/exec_test.go b/vendor/k8s.io/utils/exec/exec_test.go deleted file mode 100644 index 99ff44df..00000000 --- a/vendor/k8s.io/utils/exec/exec_test.go +++ /dev/null @@ -1,141 +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 exec - -import ( - "context" - osexec "os/exec" - "testing" - "time" -) - -func TestExecutorNoArgs(t *testing.T) { - ex := New() - - cmd := ex.Command("true") - out, err := cmd.CombinedOutput() - if err != nil { - t.Errorf("expected success, got %v", err) - } - if len(out) != 0 { - t.Errorf("expected no output, got %q", string(out)) - } - - cmd = ex.Command("false") - out, err = cmd.CombinedOutput() - if err == nil { - t.Errorf("expected failure, got nil error") - } - if len(out) != 0 { - t.Errorf("expected no output, got %q", string(out)) - } - ee, ok := err.(ExitError) - if !ok { - t.Errorf("expected an ExitError, got %+v", err) - } - if ee.Exited() { - if code := ee.ExitStatus(); code != 1 { - t.Errorf("expected exit status 1, got %d", code) - } - } - - cmd = ex.Command("/does/not/exist") - out, err = cmd.CombinedOutput() - if err == nil { - t.Errorf("expected failure, got nil error") - } - if ee, ok := err.(ExitError); ok { - t.Errorf("expected non-ExitError, got %+v", ee) - } -} - -func TestExecutorWithArgs(t *testing.T) { - ex := New() - - cmd := ex.Command("echo", "stdout") - out, err := cmd.CombinedOutput() - if err != nil { - t.Errorf("expected success, got %+v", err) - } - if string(out) != "stdout\n" { - t.Errorf("unexpected output: %q", string(out)) - } - - cmd = ex.Command("/bin/sh", "-c", "echo stderr > /dev/stderr") - out, err = cmd.CombinedOutput() - if err != nil { - t.Errorf("expected success, got %+v", err) - } - if string(out) != "stderr\n" { - t.Errorf("unexpected output: %q", string(out)) - } -} - -func TestLookPath(t *testing.T) { - ex := New() - - shExpected, _ := osexec.LookPath("sh") - sh, _ := ex.LookPath("sh") - if sh != shExpected { - t.Errorf("unexpected result for LookPath: got %s, expected %s", sh, shExpected) - } -} - -func TestExecutableNotFound(t *testing.T) { - exec := New() - - cmd := exec.Command("fake_executable_name") - _, err := cmd.CombinedOutput() - if err != ErrExecutableNotFound { - t.Errorf("cmd.CombinedOutput(): Expected error ErrExecutableNotFound but got %v", err) - } - - cmd = exec.Command("fake_executable_name") - _, err = cmd.Output() - if err != ErrExecutableNotFound { - t.Errorf("cmd.Output(): Expected error ErrExecutableNotFound but got %v", err) - } - - cmd = exec.Command("fake_executable_name") - err = cmd.Run() - if err != ErrExecutableNotFound { - t.Errorf("cmd.Run(): Expected error ErrExecutableNotFound but got %v", err) - } -} - -func TestStopBeforeStart(t *testing.T) { - cmd := New().Command("echo", "hello") - - // no panic calling Stop before calling Run - cmd.Stop() - - cmd.Run() - - // no panic calling Stop after command is done - cmd.Stop() -} - -func TestTimeout(t *testing.T) { - exec := New() - ctx, cancel := context.WithTimeout(context.Background(), time.Nanosecond) - defer cancel() - - err := exec.CommandContext(ctx, "sleep", "2").Run() - if err != context.DeadlineExceeded { - t.Errorf("expected %v but got %v", context.DeadlineExceeded, err) - } -}