├── mongo ├── options │ ├── testdata │ │ ├── empty-ca.pem │ │ ├── malformed-ca.pem │ │ └── csr.json │ └── clientoptions_1_10.go ├── util.go ├── integration │ ├── main.go │ ├── unified │ │ └── main.go │ └── mtest │ │ └── doc.go └── description │ └── description.go ├── vendor ├── github.com │ ├── karrick │ │ └── godirwalk │ │ │ ├── go.sum │ │ │ ├── go.mod │ │ │ ├── inoWithFileno.go │ │ │ ├── inoWithIno.go │ │ │ ├── .gitignore │ │ │ └── symdir.go │ ├── xdg-go │ │ ├── scram │ │ │ ├── .gitignore │ │ │ ├── go.mod │ │ │ └── go.sum │ │ ├── stringprep │ │ │ ├── .gitignore │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── error.go │ │ │ └── doc.go │ │ └── pbkdf2 │ │ │ ├── go.mod │ │ │ └── .gitignore │ ├── joho │ │ └── godotenv │ │ │ ├── .gitignore │ │ │ └── .travis.yml │ ├── tidwall │ │ └── pretty │ │ │ └── .travis.yml │ ├── sirupsen │ │ └── logrus │ │ │ ├── .gitignore │ │ │ ├── terminal_check_appengine.go │ │ │ ├── terminal_check_no_terminal.go │ │ │ ├── terminal_check_unix.go │ │ │ ├── terminal_check_solaris.go │ │ │ ├── terminal_check_bsd.go │ │ │ ├── terminal_check_notappengine.go │ │ │ ├── appveyor.yml │ │ │ └── go.mod │ ├── klauspost │ │ └── compress │ │ │ ├── huff0 │ │ │ └── .gitignore │ │ │ ├── snappy │ │ │ ├── runbench.cmd │ │ │ ├── decode_amd64.go │ │ │ ├── .gitignore │ │ │ └── AUTHORS │ │ │ └── zstd │ │ │ └── internal │ │ │ └── xxhash │ │ │ ├── xxhash_amd64.go │ │ │ └── xxhash_safe.go │ ├── go-stack │ │ └── stack │ │ │ ├── go.mod │ │ │ └── .travis.yml │ ├── golang │ │ └── snappy │ │ │ ├── go.mod │ │ │ ├── decode_amd64.go │ │ │ ├── .gitignore │ │ │ └── AUTHORS │ ├── montanaflynn │ │ └── stats │ │ │ ├── .gitignore │ │ │ ├── sum.go │ │ │ ├── .travis.yml │ │ │ ├── Makefile │ │ │ ├── max.go │ │ │ └── min.go │ ├── kr │ │ ├── pretty │ │ │ ├── .gitignore │ │ │ ├── go.mod │ │ │ └── Readme │ │ └── text │ │ │ ├── go.mod │ │ │ ├── doc.go │ │ │ └── Readme │ ├── gobuffalo │ │ ├── envy │ │ │ ├── version.go │ │ │ ├── env │ │ │ ├── .gometalinter.json │ │ │ ├── azure.sh │ │ │ ├── go.mod │ │ │ ├── .gitignore │ │ │ └── azure-tests.yml │ │ ├── genny │ │ │ ├── version.go │ │ │ ├── .gometalinter.json │ │ │ ├── genny.go │ │ │ ├── logger.go │ │ │ ├── .codeclimate.yml │ │ │ ├── confirm.go │ │ │ ├── dir.go │ │ │ ├── events.go │ │ │ ├── dry_runner.go │ │ │ ├── .gitignore │ │ │ ├── .goreleaser.yml.plush │ │ │ ├── azure-tests.yml │ │ │ ├── replacer.go │ │ │ ├── results.go │ │ │ ├── group.go │ │ │ └── .goreleaser.yml │ │ ├── mapi │ │ │ ├── version.go │ │ │ ├── .gometalinter.json │ │ │ ├── go.mod │ │ │ ├── .gitignore │ │ │ ├── azure-tests.yml │ │ │ └── shoulders.md │ │ ├── gogen │ │ │ ├── version.go │ │ │ ├── .gometalinter.json │ │ │ ├── goimports │ │ │ │ └── README.md │ │ │ ├── go.mod │ │ │ ├── .gitignore │ │ │ ├── package.go │ │ │ ├── azure-tests.yml │ │ │ ├── append.go │ │ │ ├── gomods │ │ │ │ └── tidy.go │ │ │ └── get.go │ │ ├── packd │ │ │ ├── version.go │ │ │ ├── .gometalinter.json │ │ │ ├── go.mod │ │ │ ├── .gitignore │ │ │ └── azure-tests.yml │ │ ├── packr │ │ │ └── v2 │ │ │ │ ├── version.go │ │ │ │ ├── .gometalinter.json │ │ │ │ └── file │ │ │ │ ├── resolver │ │ │ │ ├── packable.go │ │ │ │ └── ident.go │ │ │ │ └── info.go │ │ ├── syncx │ │ │ ├── version.go │ │ │ ├── .gometalinter.json │ │ │ ├── go.mod │ │ │ ├── .gitignore │ │ │ ├── go.sum │ │ │ └── azure-tests.yml │ │ └── logger │ │ │ ├── version.go │ │ │ ├── .gometalinter.json │ │ │ ├── outable.go │ │ │ ├── terminal_check_appengine.go │ │ │ ├── terminal_check.go │ │ │ ├── .gitignore │ │ │ └── azure-tests.yml │ ├── markbates │ │ ├── safe │ │ │ ├── version.go │ │ │ ├── .gometalinter.json │ │ │ ├── go.mod │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── shoulders.md │ │ │ └── go.sum │ │ └── oncer │ │ │ ├── log.go │ │ │ ├── go.mod │ │ │ ├── log_debug.go │ │ │ ├── .gitignore │ │ │ ├── deprecate.go │ │ │ ├── oncer.go │ │ │ └── go.sum │ ├── pelletier │ │ └── go-toml │ │ │ ├── .dockerignore │ │ │ ├── .gitignore │ │ │ ├── go.mod │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ ├── fuzz.sh │ │ │ ├── Dockerfile │ │ │ └── fuzz.go │ ├── konsorten │ │ └── go-windows-terminal-sequences │ │ │ ├── go.mod │ │ │ └── sequences_dummy.go │ ├── youmark │ │ └── pkcs8 │ │ │ ├── README │ │ │ ├── .travis.yml │ │ │ └── .gitignore │ ├── pkg │ │ └── errors │ │ │ ├── .travis.yml │ │ │ └── .gitignore │ ├── stretchr │ │ └── testify │ │ │ ├── require │ │ │ ├── require_forward.go.tmpl │ │ │ ├── require.go.tmpl │ │ │ └── forward_requirements.go │ │ │ └── assert │ │ │ ├── assertion_format.go.tmpl │ │ │ ├── assertion_forward.go.tmpl │ │ │ ├── errors.go │ │ │ └── forward_assertions.go │ └── google │ │ └── go-cmp │ │ └── cmp │ │ ├── internal │ │ ├── flags │ │ │ ├── toolchain_legacy.go │ │ │ ├── toolchain_recent.go │ │ │ └── flags.go │ │ └── diff │ │ │ └── debug_disable.go │ │ └── export_panic.go ├── golang.org │ └── x │ │ ├── sys │ │ ├── unix │ │ │ ├── .gitignore │ │ │ ├── endian_big.go │ │ │ ├── endian_little.go │ │ │ ├── constants.go │ │ │ ├── syscall_linux_amd64_gc.go │ │ │ ├── aliases.go │ │ │ ├── pagesize_unix.go │ │ │ ├── fcntl_linux_32bit.go │ │ │ ├── asm_aix_ppc64.s │ │ │ ├── asm_solaris_amd64.s │ │ │ ├── gccgo_linux_amd64.go │ │ │ ├── syscall_linux_gc.go │ │ │ ├── race0.go │ │ │ └── syscall_solaris_amd64.go │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ └── windows │ │ │ ├── mkerrors.go │ │ │ ├── aliases.go │ │ │ ├── asm_windows_arm.s │ │ │ ├── mksyscall.go │ │ │ ├── asm_windows_386.s │ │ │ ├── asm_windows_amd64.s │ │ │ ├── race0.go │ │ │ ├── types_windows_386.go │ │ │ ├── types_windows_amd64.go │ │ │ ├── types_windows_arm.go │ │ │ └── str.go │ │ ├── xerrors │ │ ├── codereview.cfg │ │ ├── go.mod │ │ ├── README │ │ └── internal │ │ │ └── internal.go │ │ ├── sync │ │ ├── AUTHORS │ │ └── CONTRIBUTORS │ │ ├── text │ │ ├── AUTHORS │ │ └── CONTRIBUTORS │ │ ├── tools │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── go │ │ │ ├── ast │ │ │ │ └── astutil │ │ │ │ │ └── util.go │ │ │ └── internal │ │ │ │ └── gcimporter │ │ │ │ └── newInterface11.go │ │ └── internal │ │ │ └── fastwalk │ │ │ ├── fastwalk_dirent_fileno.go │ │ │ ├── fastwalk_dirent_ino.go │ │ │ └── fastwalk_dirent_namlen_bsd.go │ │ └── crypto │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ └── ssh │ │ └── terminal │ │ ├── util_linux.go │ │ ├── util_aix.go │ │ └── util_bsd.go └── gopkg.in │ └── yaml.v3 │ ├── go.mod │ ├── .travis.yml │ └── NOTICE ├── x ├── mongo │ └── driver │ │ ├── integration │ │ └── integration.go │ │ ├── topology │ │ ├── connection_legacy.go │ │ ├── topology_options_1_10.go │ │ ├── topology_options_1_9.go │ │ └── cancellation_listener.go │ │ ├── operation │ │ ├── end_sessions.toml │ │ ├── drop_database.toml │ │ ├── errors.go │ │ ├── abort_transaction.toml │ │ ├── drop_collection.toml │ │ └── list_indexes.toml │ │ ├── ocsp │ │ └── options.go │ │ ├── auth │ │ ├── cred.go │ │ └── gssapi_not_enabled.go │ │ ├── legacy.go │ │ ├── batch_cursor_test.go │ │ └── mongocrypt │ │ └── errors_not_enabled.go ├── README.md └── bsonx │ └── element_test.go ├── data ├── mongocrypt │ ├── list-collections-filter.json │ ├── command.json │ ├── encrypted-value.json │ ├── command-reply.json │ ├── key-filter-keyAltName.json │ ├── encrypted-command.json │ ├── key-filter.json │ ├── json-schema.json │ ├── kms-reply.txt │ ├── encrypted-command-reply.json │ ├── mongocryptd-reply.json │ ├── mongocryptd-command-local.json │ └── mongocryptd-command-remote.json ├── server-selection │ ├── rtt │ │ ├── first_value.yml │ │ ├── value_test_1.yml │ │ ├── value_test_2.yml │ │ ├── value_test_5.yml │ │ ├── first_value_zero.yml │ │ ├── value_test_3.yml │ │ ├── value_test_4.yml │ │ ├── value_test_1.json │ │ ├── first_value.json │ │ ├── first_value_zero.json │ │ ├── value_test_2.json │ │ ├── value_test_3.json │ │ ├── value_test_4.json │ │ └── value_test_5.json │ └── server_selection │ │ ├── Unknown │ │ ├── read │ │ │ ├── SecondaryPreferred.yml │ │ │ └── SecondaryPreferred.json │ │ └── write │ │ │ ├── SecondaryPreferred.yml │ │ │ └── SecondaryPreferred.json │ │ ├── LoadBalanced │ │ ├── read │ │ │ ├── Primary.yml │ │ │ ├── Nearest.yml │ │ │ ├── Secondary.yml │ │ │ ├── PrimaryPreferred.yml │ │ │ └── SecondaryPreferred.yml │ │ └── write │ │ │ ├── Primary.yml │ │ │ ├── Nearest.yml │ │ │ ├── Secondary.yml │ │ │ ├── PrimaryPreferred.yml │ │ │ └── SecondaryPreferred.yml │ │ ├── Sharded │ │ ├── read │ │ │ ├── Primary.yml │ │ │ ├── Nearest.yml │ │ │ ├── Secondary.yml │ │ │ ├── PrimaryPreferred.yml │ │ │ └── SecondaryPreferred.yml │ │ └── write │ │ │ ├── Primary.yml │ │ │ ├── Nearest.yml │ │ │ ├── Secondary.yml │ │ │ ├── PrimaryPreferred.yml │ │ │ └── SecondaryPreferred.yml │ │ ├── Single │ │ ├── read │ │ │ └── SecondaryPreferred.yml │ │ └── write │ │ │ └── SecondaryPreferred.yml │ │ ├── ReplicaSetNoPrimary │ │ ├── read │ │ │ ├── PossiblePrimary.yml │ │ │ ├── PossiblePrimaryNearest.yml │ │ │ ├── Primary.yml │ │ │ ├── PossiblePrimary.json │ │ │ ├── PossiblePrimaryNearest.json │ │ │ ├── Nearest_non_matching.yml │ │ │ ├── Secondary_non_matching.yml │ │ │ ├── PrimaryPreferred_non_matching.yml │ │ │ ├── SecondaryPreferred_non_matching.yml │ │ │ ├── Nearest.yml │ │ │ ├── PrimaryPreferred.yml │ │ │ ├── Secondary.yml │ │ │ ├── Nearest_multiple.yml │ │ │ └── SecondaryPreferred.yml │ │ └── write │ │ │ └── SecondaryPreferred.yml │ │ └── ReplicaSetWithPrimary │ │ └── read │ │ ├── Nearest_non_matching.yml │ │ └── Primary.yml ├── extended_bson │ ├── deep_bson.json.gz │ ├── flat_bson.json.gz │ └── full_bson.json.gz ├── single_and_multi_document │ ├── tweet.json.gz │ ├── large_doc.json.gz │ └── small_doc.json.gz ├── uri-options │ ├── ca.pem │ ├── cert.pem │ ├── client.pem │ └── single-threaded-options.yml ├── unified-test-format │ ├── valid-fail │ │ ├── schemaVersion-unsupported.yml │ │ ├── schemaVersion-unsupported.json │ │ ├── entity-bucket-database-undefined.yml │ │ ├── entity-session-client-undefined.yml │ │ ├── entity-database-client-undefined.yml │ │ ├── entity-collection-database-undefined.yml │ │ ├── entity-client-apiVersion-unsupported.yml │ │ ├── entity-bucket-database-undefined.json │ │ ├── entity-session-client-undefined.json │ │ ├── entity-database-client-undefined.json │ │ ├── entity-collection-database-undefined.json │ │ ├── entity-client-apiVersion-unsupported.json │ │ ├── entity-client-storeEventsAsEntities-conflict_within_same_array.yml │ │ └── entity-client-storeEventsAsEntities-conflict_with_client_id.yml │ └── valid-pass │ │ └── assertNumberConnectionsCheckedOut.yml ├── initial-dns-seedlist-discovery │ ├── replica-set │ │ ├── two-txt-records.yml │ │ ├── no-results.yml │ │ ├── not-enough-parts.yml │ │ ├── txt-record-with-unallowed-option.yml │ │ ├── uri-with-port.yml │ │ ├── parent-part-mismatch4.yml │ │ ├── returned-parent-wrong.yml │ │ ├── two-txt-records.json │ │ ├── returned-parent-too-short.yml │ │ ├── misformatted-option.yml │ │ ├── no-results.json │ │ ├── txt-record-not-allowed-option.yml │ │ ├── direct-connection-true.yml │ │ ├── parent-part-mismatch1.yml │ │ ├── parent-part-mismatch2.yml │ │ ├── parent-part-mismatch3.yml │ │ ├── not-enough-parts.json │ │ ├── parent-part-mismatch5.yml │ │ ├── txt-record-with-unallowed-option.json │ │ ├── uri-with-two-hosts.yml │ │ ├── uri-with-port.json │ │ ├── returned-parent-wrong.json │ │ ├── parent-part-mismatch4.json │ │ ├── returned-parent-too-short.json │ │ ├── misformatted-option.json │ │ ├── txt-record-not-allowed-option.json │ │ ├── direct-connection-true.json │ │ ├── parent-part-mismatch1.json │ │ ├── parent-part-mismatch2.json │ │ ├── parent-part-mismatch3.json │ │ ├── parent-part-mismatch5.json │ │ ├── uri-with-two-hosts.json │ │ ├── one-txt-record-multiple-strings.yml │ │ ├── one-result-default-port.yml │ │ ├── one-txt-record.yml │ │ ├── direct-connection-false.yml │ │ ├── txt-record-with-overridden-ssl-option.yml │ │ ├── txt-record-with-overridden-uri-option.yml │ │ ├── two-results-default-port.yml │ │ ├── two-results-nonstandard-port.yml │ │ ├── one-txt-record-multiple-strings.json │ │ ├── one-result-default-port.json │ │ ├── one-txt-record.json │ │ ├── direct-connection-false.json │ │ ├── longer-parent-in-return.yml │ │ ├── txt-record-with-overridden-ssl-option.json │ │ ├── two-results-default-port.json │ │ ├── two-results-nonstandard-port.json │ │ ├── txt-record-with-overridden-uri-option.json │ │ └── longer-parent-in-return.json │ ├── load-balanced │ │ ├── loadBalanced-true-multiple-hosts.yml │ │ ├── loadBalanced-replicaSet-errors.json │ │ ├── loadBalanced-true-multiple-hosts.json │ │ ├── loadBalanced-replicaSet-errors.yml │ │ ├── loadBalanced-true-txt.json │ │ ├── loadBalanced-true-txt.yml │ │ ├── loadBalanced-directConnection.json │ │ └── loadBalanced-directConnection.yml │ ├── loadBalanced-false-txt.yml │ └── loadBalanced-false-txt.json ├── connection-monitoring-and-pooling │ ├── pool-close.yml │ ├── pool-create.yml │ ├── pool-create.json │ ├── pool-close.json │ ├── pool-checkout-connection.yml │ ├── pool-checkin.yml │ ├── pool-create-with-options.yml │ └── pool-checkin-make-available.yml ├── bson-corpus │ ├── null.json │ ├── maxkey.json │ ├── minkey.json │ └── undefined.json ├── collection-management │ └── README.rst ├── max-staleness │ ├── Unknown │ │ ├── SmallMaxStaleness.yml │ │ └── SmallMaxStaleness.json │ ├── ReplicaSetNoPrimary │ │ ├── MaxStalenessTooSmall.yml │ │ ├── NoKnownServers.yml │ │ ├── MaxStalenessTooSmall.json │ │ └── NoKnownServers.json │ └── Single │ │ ├── SmallMaxStaleness.yml │ │ ├── Incompatible.json │ │ └── Incompatible.yml ├── atlas-data-lake-testing │ ├── listDatabases.yml │ ├── listCollections.yml │ ├── estimatedDocumentCount.yml │ ├── runCommand.yml │ ├── listDatabases.json │ ├── listCollections.json │ └── estimatedDocumentCount.json ├── server-discovery-and-monitoring │ ├── monitoring │ │ └── README.rst │ ├── sharded │ │ ├── discover_single_mongos.yml │ │ └── normalize_uri_case.json │ └── single │ │ ├── discover_unavailable_seed.json │ │ ├── discover_unavailable_seed.yml │ │ └── direct_connection_replicaset.yml ├── client-side-encryption-prose │ └── external-schema.json ├── crud │ └── v1 │ │ ├── write │ │ └── insertOne.yml │ │ └── read │ │ ├── find-collation.yml │ │ ├── aggregate.yml │ │ ├── distinct-collation.yml │ │ └── aggregate-collation.yml ├── connection-string │ └── valid-options.yml └── retryable-writes │ └── deleteMany.yml ├── .evergreen ├── ocsp-requirements.txt ├── krb5.config └── run-mongodb-aws-ecs-test.sh ├── etc ├── assets │ └── mongo-gopher.png ├── list_pkgs.sh └── list_test_pkgs.sh ├── .gitmodules ├── .gitignore ├── version └── version.go ├── bson └── bsonrw │ └── doc.go ├── cmd ├── godriver-benchmark │ └── main.go └── operationgen │ └── README.md ├── internal └── testutil │ └── israce │ ├── race.go │ └── norace.go └── benchmark ├── canary_test.go └── multi_test.go /mongo/options/testdata/empty-ca.pem: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/karrick/godirwalk/go.sum: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/xdg-go/scram/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/xdg-go/stringprep/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/github.com/joho/godotenv/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /vendor/github.com/tidwall/pretty/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | vendor 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/xerrors/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /x/mongo/driver/integration/integration.go: -------------------------------------------------------------------------------- 1 | package integration 2 | -------------------------------------------------------------------------------- /x/mongo/driver/topology/connection_legacy.go: -------------------------------------------------------------------------------- 1 | package topology 2 | -------------------------------------------------------------------------------- /data/mongocrypt/list-collections-filter.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test" 3 | } -------------------------------------------------------------------------------- /mongo/options/testdata/malformed-ca.pem: -------------------------------------------------------------------------------- 1 | totally valid CA certificate 2 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/huff0/.gitignore: -------------------------------------------------------------------------------- 1 | /huff0-fuzz.zip 2 | -------------------------------------------------------------------------------- /vendor/github.com/go-stack/stack/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/go-stack/stack 2 | -------------------------------------------------------------------------------- /vendor/github.com/golang/snappy/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/golang/snappy 2 | -------------------------------------------------------------------------------- /vendor/github.com/montanaflynn/stats/.gitignore: -------------------------------------------------------------------------------- 1 | coverage.out 2 | .directory -------------------------------------------------------------------------------- /vendor/github.com/kr/pretty/.gitignore: -------------------------------------------------------------------------------- 1 | [568].out 2 | _go* 3 | _test* 4 | _obj 5 | -------------------------------------------------------------------------------- /vendor/golang.org/x/xerrors/go.mod: -------------------------------------------------------------------------------- 1 | module golang.org/x/xerrors 2 | 3 | go 1.11 4 | -------------------------------------------------------------------------------- /.evergreen/ocsp-requirements.txt: -------------------------------------------------------------------------------- 1 | asn1crypto==1.3.0 2 | bottle==0.12.19 3 | oscrypto==1.2.0 -------------------------------------------------------------------------------- /vendor/github.com/xdg-go/pbkdf2/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/xdg-go/pbkdf2 2 | 3 | go 1.9 4 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/envy/version.go: -------------------------------------------------------------------------------- 1 | package envy 2 | 3 | const Version = "v1.7.0" 4 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/genny/version.go: -------------------------------------------------------------------------------- 1 | package genny 2 | 3 | const Version = "v0.1.1" 4 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/mapi/version.go: -------------------------------------------------------------------------------- 1 | package mapi 2 | 3 | const Version = "v1.0.1" 4 | -------------------------------------------------------------------------------- /vendor/github.com/markbates/safe/version.go: -------------------------------------------------------------------------------- 1 | package safe 2 | 3 | const Version = "v1.0.1" 4 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/.dockerignore: -------------------------------------------------------------------------------- 1 | cmd/tomll/tomll 2 | cmd/tomljson/tomljson 3 | -------------------------------------------------------------------------------- /data/server-selection/rtt/first_value.yml: -------------------------------------------------------------------------------- 1 | avg_rtt_ms: 'NULL' 2 | new_rtt_ms: 10 3 | new_avg_rtt: 10 4 | -------------------------------------------------------------------------------- /data/server-selection/rtt/value_test_1.yml: -------------------------------------------------------------------------------- 1 | avg_rtt_ms: 0 2 | new_rtt_ms: 5 3 | new_avg_rtt: 1.0 4 | -------------------------------------------------------------------------------- /data/server-selection/rtt/value_test_2.yml: -------------------------------------------------------------------------------- 1 | avg_rtt_ms: 3.1 2 | new_rtt_ms: 36 3 | new_avg_rtt: 9.68 4 | -------------------------------------------------------------------------------- /data/server-selection/rtt/value_test_5.yml: -------------------------------------------------------------------------------- 1 | avg_rtt_ms: 0 2 | new_rtt_ms: 0.25 3 | new_avg_rtt: 0.05 4 | -------------------------------------------------------------------------------- /vendor/github.com/karrick/godirwalk/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/karrick/godirwalk 2 | 3 | go 1.12 4 | -------------------------------------------------------------------------------- /data/server-selection/rtt/first_value_zero.yml: -------------------------------------------------------------------------------- 1 | avg_rtt_ms: 'NULL' 2 | new_rtt_ms: 0 3 | new_avg_rtt: 0 4 | -------------------------------------------------------------------------------- /data/server-selection/rtt/value_test_3.yml: -------------------------------------------------------------------------------- 1 | avg_rtt_ms: 9.12 2 | new_rtt_ms: 9.12 3 | new_avg_rtt: 9.12 4 | -------------------------------------------------------------------------------- /data/server-selection/rtt/value_test_4.yml: -------------------------------------------------------------------------------- 1 | avg_rtt_ms: 1 2 | new_rtt_ms: 1000 3 | new_avg_rtt: 200.8 4 | -------------------------------------------------------------------------------- /vendor/github.com/kr/text/go.mod: -------------------------------------------------------------------------------- 1 | module "github.com/kr/text" 2 | 3 | require "github.com/kr/pty" v1.1.1 4 | -------------------------------------------------------------------------------- /vendor/github.com/kr/pretty/go.mod: -------------------------------------------------------------------------------- 1 | module "github.com/kr/pretty" 2 | 3 | require "github.com/kr/text" v0.1.0 4 | -------------------------------------------------------------------------------- /etc/assets/mongo-gopher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teslamotors/mongo-go-driver/HEAD/etc/assets/mongo-gopher.png -------------------------------------------------------------------------------- /data/mongocrypt/command.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "ssn": "457-55-5462" 5 | } 6 | } -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/gogen/version.go: -------------------------------------------------------------------------------- 1 | package gogen 2 | 3 | // Version of gogen 4 | const Version = "v0.1.1" 5 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/packd/version.go: -------------------------------------------------------------------------------- 1 | package packd 2 | 3 | // Version of packd 4 | const Version = "v0.1.0" 5 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/packr/v2/version.go: -------------------------------------------------------------------------------- 1 | package packr 2 | 3 | // Version of Packr 4 | const Version = "v2.2.0" 5 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/syncx/version.go: -------------------------------------------------------------------------------- 1 | package syncx 2 | 3 | // Version of syncx 4 | const Version = "v0.0.1" 5 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "specifications"] 2 | path = specifications 3 | url = git@github.com:mongodb/specifications.git 4 | -------------------------------------------------------------------------------- /data/server-selection/rtt/value_test_1.json: -------------------------------------------------------------------------------- 1 | { 2 | "avg_rtt_ms": 0, 3 | "new_rtt_ms": 5, 4 | "new_avg_rtt": 1 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/logger/version.go: -------------------------------------------------------------------------------- 1 | package logger 2 | 3 | // Version of the logger 4 | const Version = "v0.0.1" 5 | -------------------------------------------------------------------------------- /vendor/github.com/joho/godotenv/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.x 5 | 6 | os: 7 | - linux 8 | - osx 9 | -------------------------------------------------------------------------------- /vendor/github.com/konsorten/go-windows-terminal-sequences/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/konsorten/go-windows-terminal-sequences 2 | -------------------------------------------------------------------------------- /data/server-selection/rtt/first_value.json: -------------------------------------------------------------------------------- 1 | { 2 | "avg_rtt_ms": "NULL", 3 | "new_rtt_ms": 10, 4 | "new_avg_rtt": 10 5 | } 6 | -------------------------------------------------------------------------------- /data/server-selection/rtt/first_value_zero.json: -------------------------------------------------------------------------------- 1 | { 2 | "avg_rtt_ms": "NULL", 3 | "new_rtt_ms": 0, 4 | "new_avg_rtt": 0 5 | } 6 | -------------------------------------------------------------------------------- /data/server-selection/rtt/value_test_2.json: -------------------------------------------------------------------------------- 1 | { 2 | "avg_rtt_ms": 3.1, 3 | "new_rtt_ms": 36, 4 | "new_avg_rtt": 9.68 5 | } 6 | -------------------------------------------------------------------------------- /data/server-selection/rtt/value_test_3.json: -------------------------------------------------------------------------------- 1 | { 2 | "avg_rtt_ms": 9.12, 3 | "new_rtt_ms": 9.12, 4 | "new_avg_rtt": 9.12 5 | } 6 | -------------------------------------------------------------------------------- /data/server-selection/rtt/value_test_4.json: -------------------------------------------------------------------------------- 1 | { 2 | "avg_rtt_ms": 1, 3 | "new_rtt_ms": 1000, 4 | "new_avg_rtt": 200.8 5 | } 6 | -------------------------------------------------------------------------------- /data/server-selection/rtt/value_test_5.json: -------------------------------------------------------------------------------- 1 | { 2 | "avg_rtt_ms": 0, 3 | "new_rtt_ms": 0.25, 4 | "new_avg_rtt": 0.05 5 | } 6 | -------------------------------------------------------------------------------- /data/extended_bson/deep_bson.json.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teslamotors/mongo-go-driver/HEAD/data/extended_bson/deep_bson.json.gz -------------------------------------------------------------------------------- /data/extended_bson/flat_bson.json.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teslamotors/mongo-go-driver/HEAD/data/extended_bson/flat_bson.json.gz -------------------------------------------------------------------------------- /data/extended_bson/full_bson.json.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teslamotors/mongo-go-driver/HEAD/data/extended_bson/full_bson.json.gz -------------------------------------------------------------------------------- /vendor/github.com/xdg-go/stringprep/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/xdg-go/stringprep 2 | 3 | go 1.11 4 | 5 | require golang.org/x/text v0.3.5 6 | -------------------------------------------------------------------------------- /vendor/github.com/youmark/pkcs8/README: -------------------------------------------------------------------------------- 1 | pkcs8 package: implement PKCS#8 private key parsing and conversion as defined in RFC5208 and RFC5958 2 | -------------------------------------------------------------------------------- /vendor/github.com/kr/text/doc.go: -------------------------------------------------------------------------------- 1 | // Package text provides rudimentary functions for manipulating text in 2 | // paragraphs. 3 | package text 4 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v3/go.mod: -------------------------------------------------------------------------------- 1 | module "gopkg.in/yaml.v3" 2 | 3 | require ( 4 | "gopkg.in/check.v1" v0.0.0-20161208181325-20d25e280405 5 | ) 6 | -------------------------------------------------------------------------------- /data/single_and_multi_document/tweet.json.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teslamotors/mongo-go-driver/HEAD/data/single_and_multi_document/tweet.json.gz -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/envy/env: -------------------------------------------------------------------------------- 1 | # This is a comment 2 | # We can use equal or colon notation 3 | DIR: root 4 | FLAVOUR: none 5 | INSIDE_FOLDER=false -------------------------------------------------------------------------------- /vendor/github.com/markbates/oncer/log.go: -------------------------------------------------------------------------------- 1 | //+build !debug 2 | 3 | package oncer 4 | 5 | func log(name string, fn func()) func() { 6 | return fn 7 | } 8 | -------------------------------------------------------------------------------- /data/single_and_multi_document/large_doc.json.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teslamotors/mongo-go-driver/HEAD/data/single_and_multi_document/large_doc.json.gz -------------------------------------------------------------------------------- /data/single_and_multi_document/small_doc.json.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teslamotors/mongo-go-driver/HEAD/data/single_and_multi_document/small_doc.json.gz -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/.gitignore: -------------------------------------------------------------------------------- 1 | test_program/test_program_bin 2 | fuzz/ 3 | cmd/tomll/tomll 4 | cmd/tomljson/tomljson 5 | cmd/tomltestgen/tomltestgen 6 | -------------------------------------------------------------------------------- /vendor/golang.org/x/xerrors/README: -------------------------------------------------------------------------------- 1 | This repository holds the transition packages for the new Go 1.13 error values. 2 | See golang.org/design/29934-error-values. 3 | -------------------------------------------------------------------------------- /vendor/github.com/kr/text/Readme: -------------------------------------------------------------------------------- 1 | This is a Go package for manipulating paragraphs of text. 2 | 3 | See http://go.pkgdoc.org/github.com/kr/text for full documentation. 4 | -------------------------------------------------------------------------------- /vendor/github.com/youmark/pkcs8/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - "1.9.x" 5 | - "1.10.x" 6 | - master 7 | 8 | script: 9 | - go test -v ./... 10 | -------------------------------------------------------------------------------- /data/uri-options/ca.pem: -------------------------------------------------------------------------------- 1 | # This file exists solely for the purpose of facilitating drivers which check for the existence of files specified in the URI options at parse time. 2 | -------------------------------------------------------------------------------- /data/uri-options/cert.pem: -------------------------------------------------------------------------------- 1 | # This file exists solely for the purpose of facilitating drivers which check for the existence of files specified in the URI options at parse time. 2 | -------------------------------------------------------------------------------- /data/uri-options/client.pem: -------------------------------------------------------------------------------- 1 | # This file exists solely for the purpose of facilitating drivers which check for the existence of files specified in the URI options at parse time. 2 | -------------------------------------------------------------------------------- /.evergreen/krb5.config: -------------------------------------------------------------------------------- 1 | [realms] 2 | LDAPTEST.10GEN.CC = { 3 | kdc = ldaptest.10gen.cc 4 | admin_server = ldaptest.10gen.cc 5 | } 6 | 7 | [libdefaults] 8 | rdns = false 9 | -------------------------------------------------------------------------------- /vendor/github.com/xdg-go/scram/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/xdg-go/scram 2 | 3 | go 1.11 4 | 5 | require ( 6 | github.com/xdg-go/pbkdf2 v1.0.0 7 | github.com/xdg-go/stringprep v1.0.2 8 | ) 9 | -------------------------------------------------------------------------------- /data/unified-test-format/valid-fail/schemaVersion-unsupported.yml: -------------------------------------------------------------------------------- 1 | description: "schemaVersion-unsupported" 2 | 3 | schemaVersion: "0.1" 4 | 5 | tests: 6 | - description: "foo" 7 | operations: [] 8 | -------------------------------------------------------------------------------- /etc/list_pkgs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # list_pkgs 3 | directory="$1" 4 | if [ -z "$directory" ]; then 5 | directory="." 6 | fi 7 | go list $directory/... | sed -e "s/^go.mongodb.org\/mongo-driver/./" 8 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/envy/.gometalinter.json: -------------------------------------------------------------------------------- 1 | { 2 | "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"] 3 | } 4 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/genny/.gometalinter.json: -------------------------------------------------------------------------------- 1 | { 2 | "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"] 3 | } 4 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/gogen/.gometalinter.json: -------------------------------------------------------------------------------- 1 | { 2 | "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"] 3 | } 4 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/logger/.gometalinter.json: -------------------------------------------------------------------------------- 1 | { 2 | "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"] 3 | } 4 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/mapi/.gometalinter.json: -------------------------------------------------------------------------------- 1 | { 2 | "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"] 3 | } 4 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/packd/.gometalinter.json: -------------------------------------------------------------------------------- 1 | { 2 | "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"] 3 | } 4 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/packr/v2/.gometalinter.json: -------------------------------------------------------------------------------- 1 | { 2 | "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"] 3 | } 4 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/syncx/.gometalinter.json: -------------------------------------------------------------------------------- 1 | { 2 | "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"] 3 | } 4 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/snappy/runbench.cmd: -------------------------------------------------------------------------------- 1 | del old.txt 2 | go test -bench=. >>old.txt && go test -bench=. >>old.txt && go test -bench=. >>old.txt && benchstat -delta-test=ttest old.txt new.txt 3 | -------------------------------------------------------------------------------- /vendor/github.com/markbates/safe/.gometalinter.json: -------------------------------------------------------------------------------- 1 | { 2 | "Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"] 3 | } 4 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/pkg/errors 3 | go: 4 | - 1.11.x 5 | - 1.12.x 6 | - 1.13.x 7 | - tip 8 | 9 | script: 10 | - make check 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sync/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | debug 3 | .idea 4 | *.iml 5 | *.ipr 6 | *.iws 7 | .idea 8 | *.sublime-project 9 | *.sublime-workspace 10 | driver-test-data.tar.gz 11 | perf 12 | **mongocryptd.pid 13 | *.test 14 | **.md 15 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/two-txt-records.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test6.test.build.10gen.cc/" 2 | seeds: [] 3 | hosts: [] 4 | error: true 5 | comment: Should fail because there are two TXT records. 6 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/packr/v2/file/resolver/packable.go: -------------------------------------------------------------------------------- 1 | package resolver 2 | 3 | import "github.com/gobuffalo/packr/v2/file" 4 | 5 | type Packable interface { 6 | Pack(name string, f file.File) error 7 | } 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at https://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at https://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sync/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /data/mongocrypt/encrypted-value.json: -------------------------------------------------------------------------------- 1 | { 2 | "v": { 3 | "$binary": "AWFhYWFhYWFhYWFhYWFhYWECW+zDjR/69eS6VtuMD5+O2lZw6JyiWOw3avI7mnUkdpKzPfvy8F/nlZrgZa2cGmQsb0TmLZuk5trldosnGKD91w==", 4 | "$type": "06" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/genny/genny.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package genny is a _framework_ for writing modular generators, it however, doesn't actually generate anything. It just makes it easier for you to. :) 3 | */ 4 | package genny 5 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return true 11 | } 12 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/no-results.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test4.test.build.10gen.cc/" 2 | seeds: [] 3 | hosts: [] 4 | error: true 5 | comment: Should fail because no SRV records are present for this URI. 6 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/logger/outable.go: -------------------------------------------------------------------------------- 1 | package logger 2 | 3 | import "io" 4 | 5 | // Outable interface for loggers that allow setting the output writer 6 | type Outable interface { 7 | SetOutput(out io.Writer) 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/logger/terminal_check_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package logger 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go: -------------------------------------------------------------------------------- 1 | // +build js nacl plan9 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return false 11 | } 12 | -------------------------------------------------------------------------------- /x/mongo/driver/topology/topology_options_1_10.go: -------------------------------------------------------------------------------- 1 | // +build go1.10 2 | 3 | package topology 4 | 5 | import "crypto/x509" 6 | 7 | func x509CertSubject(cert *x509.Certificate) string { 8 | return cert.Subject.String() 9 | } 10 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/not-enough-parts.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://10gen.cc/" 2 | seeds: [] 3 | hosts: [] 4 | error: true 5 | comment: Should fail because host in URI does not have {hostname}, {domainname} and {tld}. 6 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/envy/azure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | 5 | cat >> .env << EOF 6 | # This is a comment 7 | # We can use equal or colon notation 8 | DIR: root 9 | FLAVOUR: none 10 | INSIDE_FOLDER=false 11 | EOF 12 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/pelletier/go-toml 2 | 3 | go 1.12 4 | 5 | require ( 6 | github.com/BurntSushi/toml v0.3.1 7 | github.com/davecgh/go-spew v1.1.1 8 | gopkg.in/yaml.v2 v2.2.8 9 | ) 10 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/txt-record-with-unallowed-option.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test7.test.build.10gen.cc/" 2 | seeds: [] 3 | hosts: [] 4 | error: true 5 | comment: Should fail because "ssl" is not an allowed option. 6 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/packd/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/gobuffalo/packd 2 | 3 | require ( 4 | github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754 5 | github.com/pkg/errors v0.8.1 6 | github.com/stretchr/testify v1.3.0 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/syncx/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/gobuffalo/syncx 2 | 3 | require ( 4 | github.com/davecgh/go-spew v1.1.1 // indirect 5 | github.com/pmezard/go-difflib v1.0.0 // indirect 6 | github.com/stretchr/testify v1.2.2 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/github.com/kr/pretty/Readme: -------------------------------------------------------------------------------- 1 | package pretty 2 | 3 | import "github.com/kr/pretty" 4 | 5 | Package pretty provides pretty-printing for Go values. 6 | 7 | Documentation 8 | 9 | http://godoc.org/github.com/kr/pretty 10 | -------------------------------------------------------------------------------- /vendor/github.com/markbates/oncer/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/markbates/oncer 2 | 3 | require ( 4 | github.com/davecgh/go-spew v1.1.1 // indirect 5 | github.com/pmezard/go-difflib v1.0.0 // indirect 6 | github.com/stretchr/testify v1.2.2 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/github.com/markbates/safe/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/markbates/safe 2 | 3 | require ( 4 | github.com/davecgh/go-spew v1.1.1 // indirect 5 | github.com/pmezard/go-difflib v1.0.0 // indirect 6 | github.com/stretchr/testify v1.2.2 7 | ) 8 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/uri-with-port.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test5.test.build.10gen.cc:8123/?replicaSet=repl0" 2 | seeds: [] 3 | hosts: [] 4 | error: true 5 | comment: Should fail because the mongodb+srv URI includes a port. 6 | -------------------------------------------------------------------------------- /data/mongocrypt/command-reply.json: -------------------------------------------------------------------------------- 1 | { 2 | "cursor": { 3 | "firstBatch": [ 4 | { 5 | "_id": 1, 6 | "ssn": "457-55-5462" 7 | } 8 | ], 9 | "id": 0, 10 | "ns": "test.test" 11 | }, 12 | "ok": 1 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/karrick/godirwalk/inoWithFileno.go: -------------------------------------------------------------------------------- 1 | // +build dragonfly freebsd openbsd netbsd 2 | 3 | package godirwalk 4 | 5 | import "syscall" 6 | 7 | func inoFromDirent(de *syscall.Dirent) uint64 { 8 | return uint64(de.Fileno) 9 | } 10 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch4.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test17.test.build.10gen.cc/" 2 | seeds: [] 3 | hosts: [] 4 | error: true 5 | comment: Should fail because returned host name's TLD "not-cc" mismatches URI TLD "cc". 6 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/returned-parent-wrong.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test12.test.build.10gen.cc/" 2 | seeds: [] 3 | hosts: [] 4 | error: true 5 | comment: Should fail because returned host name is too short and mismatches a parent. 6 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/two-txt-records.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test6.test.build.10gen.cc/", 3 | "seeds": [], 4 | "hosts": [], 5 | "error": true, 6 | "comment": "Should fail because there are two TXT records." 7 | } 8 | -------------------------------------------------------------------------------- /data/mongocrypt/key-filter-keyAltName.json: -------------------------------------------------------------------------------- 1 | { 2 | "$or": [ 3 | { 4 | "_id": { 5 | "$in": [] 6 | } 7 | }, 8 | { 9 | "keyAltNames": { 10 | "$in": ["altKeyName"] 11 | } 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/require/require_forward.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentWithoutT "a"}} 2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) { 3 | if h, ok := a.t.(tHelper); ok { h.Helper() } 4 | {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) 5 | } 6 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/returned-parent-too-short.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test13.test.build.10gen.cc/" 2 | seeds: [] 3 | hosts: [] 4 | error: true 5 | comment: Should fail because returned host name's parent (build.10gen.cc) misses "test." 6 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/misformatted-option.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test8.test.build.10gen.cc/" 2 | seeds: [] 3 | hosts: [] 4 | error: true 5 | comment: Should fail because the options in the TXT record are incorrectly formatted (misses value). 6 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/no-results.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test4.test.build.10gen.cc/", 3 | "seeds": [], 4 | "hosts": [], 5 | "error": true, 6 | "comment": "Should fail because no SRV records are present for this URI." 7 | } 8 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/txt-record-not-allowed-option.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test10.test.build.10gen.cc/?replicaSet=repl0" 2 | seeds: [] 3 | hosts: [] 4 | error: true 5 | comment: Should fail because socketTimeoutMS is not an allowed option. 6 | -------------------------------------------------------------------------------- /data/unified-test-format/valid-fail/schemaVersion-unsupported.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "schemaVersion-unsupported", 3 | "schemaVersion": "0.1", 4 | "tests": [ 5 | { 6 | "description": "foo", 7 | "operations": [] 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/envy/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/gobuffalo/envy 2 | 3 | require ( 4 | github.com/davecgh/go-spew v1.1.1 // indirect 5 | github.com/joho/godotenv v1.3.0 6 | github.com/rogpeppe/go-internal v1.1.0 7 | github.com/stretchr/testify v1.3.0 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentFormat}} 2 | func {{.DocInfo.Name}}f(t TestingT, {{.ParamsFormat}}) bool { 3 | if h, ok := t.(tHelper); ok { h.Helper() } 4 | return {{.DocInfo.Name}}(t, {{.ForwardedParamsFormat}}) 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentWithoutT "a"}} 2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool { 3 | if h, ok := a.t.(tHelper); ok { h.Helper() } 4 | return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/require/require.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.Comment}} 2 | func {{.DocInfo.Name}}(t TestingT, {{.Params}}) { 3 | if h, ok := t.(tHelper); ok { h.Helper() } 4 | if assert.{{.DocInfo.Name}}(t, {{.ForwardedParams}}) { return } 5 | t.FailNow() 6 | } 7 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/direct-connection-true.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test3.test.build.10gen.cc/?directConnection=true" 2 | seeds: [] 3 | hosts: [] 4 | error: true 5 | comment: Should fail because directConnection=true is incompatible with SRV URIs. 6 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch1.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test14.test.build.10gen.cc/" 2 | seeds: [] 3 | hosts: [] 4 | error: true 5 | comment: Should fail because returned host name's part "not-test" mismatches URI parent part "test". 6 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch2.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test15.test.build.10gen.cc/" 2 | seeds: [] 3 | hosts: [] 4 | error: true 5 | comment: Should fail because returned host name's part "not-build" mismatches URI parent part "build". 6 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch3.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test16.test.build.10gen.cc/" 2 | seeds: [] 3 | hosts: [] 4 | error: true 5 | comment: Should fail because returned host name's part "not-10gen" mismatches URI parent part "10gen". 6 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/genny/logger.go: -------------------------------------------------------------------------------- 1 | package genny 2 | 3 | import "github.com/gobuffalo/logger" 4 | 5 | // Logger interface for a logger to be used with genny. Logrus is 100% compatible. 6 | type Logger = logger.Logger 7 | 8 | var DefaultLogLvl = logger.InfoLevel 9 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/not-enough-parts.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://10gen.cc/", 3 | "seeds": [], 4 | "hosts": [], 5 | "error": true, 6 | "comment": "Should fail because host in URI does not have {hostname}, {domainname} and {tld}." 7 | } 8 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch5.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test19.test.build.10gen.cc/" 2 | seeds: [] 3 | hosts: [] 4 | error: true 5 | comment: Should fail because one of the returned host names' domain name parts "evil" mismatches "test". 6 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/mapi/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/gobuffalo/mapi 2 | 3 | require ( 4 | github.com/davecgh/go-spew v1.1.1 // indirect 5 | github.com/pkg/errors v0.8.0 6 | github.com/pmezard/go-difflib v1.0.0 // indirect 7 | github.com/stretchr/testify v1.2.2 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **Issue:** add link to pelletier/go-toml issue here 2 | 3 | Explanation of what this pull request does. 4 | 5 | More detailed description of the decisions being made and the reasons why (if the patch is non-trivial). 6 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/txt-record-with-unallowed-option.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test7.test.build.10gen.cc/", 3 | "seeds": [], 4 | "hosts": [], 5 | "error": true, 6 | "comment": "Should fail because \"ssl\" is not an allowed option." 7 | } 8 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/uri-with-two-hosts.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test5.test.build.10gen.cc,test6.test.build.10gen.cc/?replicaSet=repl0" 2 | seeds: [] 3 | hosts: [] 4 | error: true 5 | comment: Should fail because the mongodb+srv URI includes two host names. 6 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/uri-with-port.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test5.test.build.10gen.cc:8123/?replicaSet=repl0", 3 | "seeds": [], 4 | "hosts": [], 5 | "error": true, 6 | "comment": "Should fail because the mongodb+srv URI includes a port." 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/xdg-go/pbkdf2/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, build with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/load-balanced/loadBalanced-true-multiple-hosts.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test1.test.build.10gen.cc/?loadBalanced=true" 2 | seeds: [] 3 | hosts: [] 4 | error: true 5 | comment: Should fail because loadBalanced is true but the SRV record resolves to multiple hosts 6 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/returned-parent-wrong.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test12.test.build.10gen.cc/", 3 | "seeds": [], 4 | "hosts": [], 5 | "error": true, 6 | "comment": "Should fail because returned host name is too short and mismatches a parent." 7 | } 8 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch4.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test17.test.build.10gen.cc/", 3 | "seeds": [], 4 | "hosts": [], 5 | "error": true, 6 | "comment": "Should fail because returned host name's TLD \"not-cc\" mismatches URI TLD \"cc\"." 7 | } 8 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/returned-parent-too-short.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test13.test.build.10gen.cc/", 3 | "seeds": [], 4 | "hosts": [], 5 | "error": true, 6 | "comment": "Should fail because returned host name's parent (build.10gen.cc) misses \"test.\"" 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/go-stack/stack/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - 1.7.x 5 | - 1.8.x 6 | - 1.9.x 7 | - 1.10.x 8 | - 1.11.x 9 | - tip 10 | 11 | before_install: 12 | - go get github.com/mattn/goveralls 13 | 14 | script: 15 | - goveralls -service=travis-ci 16 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/misformatted-option.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test8.test.build.10gen.cc/", 3 | "seeds": [], 4 | "hosts": [], 5 | "error": true, 6 | "comment": "Should fail because the options in the TXT record are incorrectly formatted (misses value)." 7 | } 8 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/txt-record-not-allowed-option.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test10.test.build.10gen.cc/?replicaSet=repl0", 3 | "seeds": [], 4 | "hosts": [], 5 | "error": true, 6 | "comment": "Should fail because socketTimeoutMS is not an allowed option." 7 | } 8 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/Unknown/read/SecondaryPreferred.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: Unknown 3 | servers: [] 4 | operation: read 5 | read_preference: 6 | mode: SecondaryPreferred 7 | tag_sets: 8 | - data_center: nyc 9 | suitable_servers: [] 10 | in_latency_window: [] 11 | -------------------------------------------------------------------------------- /vendor/github.com/konsorten/go-windows-terminal-sequences/sequences_dummy.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin 2 | 3 | package sequences 4 | 5 | import ( 6 | "fmt" 7 | ) 8 | 9 | func EnableVirtualTerminalProcessing(stream uintptr, enable bool) error { 10 | return fmt.Errorf("windows only package") 11 | } 12 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/direct-connection-true.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test3.test.build.10gen.cc/?directConnection=true", 3 | "seeds": [], 4 | "hosts": [], 5 | "error": true, 6 | "comment": "Should fail because directConnection=true is incompatible with SRV URIs." 7 | } 8 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch1.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test14.test.build.10gen.cc/", 3 | "seeds": [], 4 | "hosts": [], 5 | "error": true, 6 | "comment": "Should fail because returned host name's part \"not-test\" mismatches URI parent part \"test\"." 7 | } 8 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/Unknown/write/SecondaryPreferred.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: Unknown 3 | servers: [] 4 | operation: write 5 | read_preference: 6 | mode: SecondaryPreferred 7 | tag_sets: 8 | - data_center: nyc 9 | suitable_servers: [] 10 | in_latency_window: [] 11 | -------------------------------------------------------------------------------- /vendor/github.com/xdg-go/stringprep/go.sum: -------------------------------------------------------------------------------- 1 | golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= 2 | golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 3 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 4 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/load-balanced/loadBalanced-replicaSet-errors.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test20.test.build.10gen.cc/?replicaSet=replset", 3 | "seeds": [], 4 | "hosts": [], 5 | "error": true, 6 | "comment": "Should fail because loadBalanced=true is incompatible with replicaSet" 7 | } 8 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch2.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test15.test.build.10gen.cc/", 3 | "seeds": [], 4 | "hosts": [], 5 | "error": true, 6 | "comment": "Should fail because returned host name's part \"not-build\" mismatches URI parent part \"build\"." 7 | } 8 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch3.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test16.test.build.10gen.cc/", 3 | "seeds": [], 4 | "hosts": [], 5 | "error": true, 6 | "comment": "Should fail because returned host name's part \"not-10gen\" mismatches URI parent part \"10gen\"." 7 | } 8 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/parent-part-mismatch5.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test19.test.build.10gen.cc/", 3 | "seeds": [], 4 | "hosts": [], 5 | "error": true, 6 | "comment": "Should fail because one of the returned host names' domain name parts \"evil\" mismatches \"test\"." 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/genny/.codeclimate.yml: -------------------------------------------------------------------------------- 1 | --- 2 | version: "2" 3 | plugins: 4 | golint: 5 | enabled: true 6 | checks: 7 | GoLint/Naming/MixedCaps: 8 | enabled: false 9 | govet: 10 | enabled: true 11 | gofmt: 12 | enabled: true 13 | fixme: 14 | enabled: true 15 | -------------------------------------------------------------------------------- /vendor/github.com/karrick/godirwalk/inoWithIno.go: -------------------------------------------------------------------------------- 1 | // +build aix darwin linux nacl solaris 2 | 3 | package godirwalk 4 | 5 | import "syscall" 6 | 7 | func inoFromDirent(de *syscall.Dirent) uint64 { 8 | // cast necessary on file systems that store ino as different type 9 | return uint64(de.Ino) 10 | } 11 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/uri-with-two-hosts.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test5.test.build.10gen.cc,test6.test.build.10gen.cc/?replicaSet=repl0", 3 | "seeds": [], 4 | "hosts": [], 5 | "error": true, 6 | "comment": "Should fail because the mongodb+srv URI includes two host names." 7 | } 8 | -------------------------------------------------------------------------------- /mongo/util.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) MongoDB, Inc. 2017-present. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | package mongo 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // +build ppc64 s390x mips mips64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v3/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - "1.4.x" 5 | - "1.5.x" 6 | - "1.6.x" 7 | - "1.7.x" 8 | - "1.8.x" 9 | - "1.9.x" 10 | - "1.10.x" 11 | - "1.11.x" 12 | - "1.12.x" 13 | - "1.13.x" 14 | - "tip" 15 | 16 | go_import_path: gopkg.in/yaml.v3 17 | -------------------------------------------------------------------------------- /data/connection-monitoring-and-pooling/pool-close.yml: -------------------------------------------------------------------------------- 1 | version: 1 2 | style: unit 3 | description: must be able to manually close a pool 4 | operations: 5 | - name: close 6 | events: 7 | - type: ConnectionPoolCreated 8 | address: 42 9 | options: 42 10 | - type: ConnectionPoolClosed 11 | address: 42 12 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/loadBalanced-false-txt.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test21.test.build.10gen.cc/" 2 | seeds: 3 | - localhost.test.build.10gen.cc:27017 4 | hosts: 5 | - localhost:27017 6 | - localhost:27018 7 | - localhost:27019 8 | options: 9 | loadBalanced: false 10 | ssl: true 11 | -------------------------------------------------------------------------------- /data/unified-test-format/valid-fail/entity-bucket-database-undefined.yml: -------------------------------------------------------------------------------- 1 | description: "entity-bucket-database-undefined" 2 | 3 | schemaVersion: "1.0" 4 | 5 | createEntities: 6 | - bucket: 7 | id: &bucket0 "bucket0" 8 | database: "foo" 9 | 10 | tests: 11 | - description: "foo" 12 | operations: [] 13 | -------------------------------------------------------------------------------- /data/unified-test-format/valid-fail/entity-session-client-undefined.yml: -------------------------------------------------------------------------------- 1 | description: "entity-session-client-undefined" 2 | 3 | schemaVersion: "1.0" 4 | 5 | createEntities: 6 | - session: 7 | id: &session0 "session0" 8 | client: "foo" 9 | 10 | tests: 11 | - description: "foo" 12 | operations: [] 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/go/ast/astutil/util.go: -------------------------------------------------------------------------------- 1 | package astutil 2 | 3 | import "go/ast" 4 | 5 | // Unparen returns e with any enclosing parentheses stripped. 6 | func Unparen(e ast.Expr) ast.Expr { 7 | for { 8 | p, ok := e.(*ast.ParenExpr) 9 | if !ok { 10 | return e 11 | } 12 | e = p.X 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/genny/confirm.go: -------------------------------------------------------------------------------- 1 | package genny 2 | 3 | import ( 4 | "bufio" 5 | "fmt" 6 | "os" 7 | ) 8 | 9 | func Confirm(msg string) bool { 10 | reader := bufio.NewReader(os.Stdin) 11 | fmt.Print(msg) 12 | text, _ := reader.ReadString('\n') 13 | 14 | return (text == "y\n" || text == "Y\n") 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux aix 2 | 3 | package logrus 4 | 5 | import "golang.org/x/sys/unix" 6 | 7 | const ioctlReadTermios = unix.TCGETS 8 | 9 | func isTerminal(fd int) bool { 10 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) 11 | return err == nil 12 | } 13 | 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mkerrors.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build generate 6 | 7 | package windows 8 | 9 | //go:generate ./mkerrors.bash zerrors_windows.go 10 | -------------------------------------------------------------------------------- /x/README.md: -------------------------------------------------------------------------------- 1 | MongoDB Go Driver Unstable Libraries 2 | ==================================== 3 | This directory contains unstable MongoDB Go driver libraries and packages. The APIs of these 4 | packages are not stable and there is no backward compatibility guarantee. 5 | 6 | **THESE PACKAGES ARE EXPERIMENTAL AND SUBJECT TO CHANGE.** 7 | -------------------------------------------------------------------------------- /x/bsonx/element_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) MongoDB, Inc. 2017-present. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | package bsonx 8 | -------------------------------------------------------------------------------- /data/connection-monitoring-and-pooling/pool-create.yml: -------------------------------------------------------------------------------- 1 | version: 1 2 | style: unit 3 | description: must be able to create a pool 4 | operations: 5 | - name: waitForEvent 6 | event: ConnectionPoolCreated 7 | count: 1 8 | events: 9 | - type: ConnectionPoolCreated 10 | address: 42 11 | options: 42 12 | 13 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/load-balanced/loadBalanced-true-multiple-hosts.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test1.test.build.10gen.cc/?loadBalanced=true", 3 | "seeds": [], 4 | "hosts": [], 5 | "error": true, 6 | "comment": "Should fail because loadBalanced is true but the SRV record resolves to multiple hosts" 7 | } 8 | -------------------------------------------------------------------------------- /mongo/integration/main.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) MongoDB, Inc. 2017-present. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | package integration 8 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_solaris.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "golang.org/x/sys/unix" 5 | ) 6 | 7 | // IsTerminal returns true if the given file descriptor is a terminal. 8 | func isTerminal(fd int) bool { 9 | _, err := unix.IoctlGetTermio(fd, unix.TCGETA) 10 | return err == nil 11 | } 12 | -------------------------------------------------------------------------------- /data/bson-corpus/null.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Null type", 3 | "bson_type": "0x0A", 4 | "test_key": "a", 5 | "valid": [ 6 | { 7 | "description": "Null", 8 | "canonical_bson": "080000000A610000", 9 | "canonical_extjson": "{\"a\" : null}" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /data/collection-management/README.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | Collection Management Tests 3 | =========================== 4 | 5 | This directory contains tests for collection management. They are implemented 6 | in the `Unified Test Format <../../unified-test-format/unified-test-format.rst>`__ 7 | and require schema version 1.0. 8 | 9 | -------------------------------------------------------------------------------- /mongo/integration/unified/main.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) MongoDB, Inc. 2017-present. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | package unified 8 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/genny/dir.go: -------------------------------------------------------------------------------- 1 | package genny 2 | 3 | import "os" 4 | 5 | var _ File = Dir{} 6 | 7 | type Dir struct { 8 | File 9 | Perm os.FileMode 10 | } 11 | 12 | func NewDir(path string, perm os.FileMode) File { 13 | f := NewFileS(path, path) 14 | return Dir{ 15 | File: f, 16 | Perm: perm, 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/one-txt-record-multiple-strings.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test11.test.build.10gen.cc/" 2 | seeds: 3 | - localhost.test.build.10gen.cc:27017 4 | hosts: 5 | - localhost:27017 6 | - localhost:27018 7 | - localhost:27019 8 | options: 9 | replicaSet: repl0 10 | ssl: true 11 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/one-result-default-port.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test3.test.build.10gen.cc/?replicaSet=repl0" 2 | seeds: 3 | - localhost.test.build.10gen.cc:27017 4 | hosts: 5 | - localhost:27017 6 | - localhost:27018 7 | - localhost:27019 8 | options: 9 | replicaSet: repl0 10 | ssl: true 11 | -------------------------------------------------------------------------------- /data/mongocrypt/encrypted-command.json: -------------------------------------------------------------------------------- 1 | { 2 | "filter": { 3 | "ssn": { 4 | "$binary": { 5 | "base64": "AWFhYWFhYWFhYWFhYWFhYWECRTOW9yZzNDn5dGwuqsrJQNLtgMEKaujhs9aRWRp+7Yo3JK8N8jC8P0Xjll6C1CwLsE/iP5wjOMhVv1KMMyOCSCrHorXRsb2IKPtzl2lKTqQ=", 6 | "subType": "06" 7 | } 8 | } 9 | }, 10 | "find": "test" 11 | } 12 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/LoadBalanced/read/Primary.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: LoadBalanced 3 | servers: 4 | - &1 5 | address: g:27017 6 | avg_rtt_ms: 0 7 | type: LoadBalancer 8 | operation: read 9 | read_preference: 10 | mode: Primary 11 | suitable_servers: 12 | - *1 13 | in_latency_window: 14 | - *1 15 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_amd64.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | // +build gc 3 | // +build !purego 4 | 5 | package xxhash 6 | 7 | // Sum64 computes the 64-bit xxHash digest of b. 8 | // 9 | //go:noescape 10 | func Sum64(b []byte) uint64 11 | 12 | //go:noescape 13 | func writeBlocks(*Digest, []byte) int 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/load-balanced/loadBalanced-replicaSet-errors.yml: -------------------------------------------------------------------------------- 1 | # The TXT record for test20.test.build.10gen.cc contains loadBalanced=true. 2 | uri: "mongodb+srv://test20.test.build.10gen.cc/?replicaSet=replset" 3 | seeds: [] 4 | hosts: [] 5 | error: true 6 | comment: Should fail because loadBalanced=true is incompatible with replicaSet 7 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/one-txt-record.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test5.test.build.10gen.cc/" 2 | seeds: 3 | - localhost.test.build.10gen.cc:27017 4 | hosts: 5 | - localhost:27017 6 | - localhost:27018 7 | - localhost:27019 8 | options: 9 | replicaSet: repl0 10 | authSource: thisDB 11 | ssl: true 12 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/LoadBalanced/write/Primary.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: LoadBalanced 3 | servers: 4 | - &1 5 | address: g:27017 6 | avg_rtt_ms: 0 7 | type: LoadBalancer 8 | operation: write 9 | read_preference: 10 | mode: Primary 11 | suitable_servers: 12 | - *1 13 | in_latency_window: 14 | - *1 15 | -------------------------------------------------------------------------------- /mongo/options/clientoptions_1_10.go: -------------------------------------------------------------------------------- 1 | // +build go1.10 2 | 3 | package options 4 | 5 | import "crypto/x509" 6 | 7 | func x509CertSubject(cert *x509.Certificate) string { 8 | return cert.Subject.String() 9 | } 10 | 11 | func x509MarshalPKCS8PrivateKey(pkcs8 interface{}) ([]byte, error) { 12 | return x509.MarshalPKCS8PrivateKey(pkcs8) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/genny/events.go: -------------------------------------------------------------------------------- 1 | package genny 2 | 3 | /* 4 | Events have been deprecated. Please manually trigger events if needed. 5 | */ 6 | const ( 7 | EvtStarted = "genny:runner:started" 8 | EvtFinished = "genny:runner:finished" 9 | EvtFinishedErr = "genny:runner:finished:err" 10 | EvtStepPrefix = "genny:step" 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/xerrors/internal/internal.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package internal 6 | 7 | // EnableTrace indicates whether stack information should be recorded in errors. 8 | var EnableTrace = true 9 | -------------------------------------------------------------------------------- /x/mongo/driver/topology/topology_options_1_9.go: -------------------------------------------------------------------------------- 1 | // +build !go1.10 2 | 3 | package topology 4 | 5 | import ( 6 | "crypto/x509" 7 | ) 8 | 9 | // We don't support version less then 1.10, but Evergreen needs to be able to compile the driver 10 | // using version 1.8. 11 | func x509CertSubject(cert *x509.Certificate) string { 12 | return "" 13 | } 14 | -------------------------------------------------------------------------------- /data/bson-corpus/maxkey.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Maxkey type", 3 | "bson_type": "0x7F", 4 | "test_key": "a", 5 | "valid": [ 6 | { 7 | "description": "Maxkey", 8 | "canonical_bson": "080000007F610000", 9 | "canonical_extjson": "{\"a\" : {\"$maxKey\" : 1}}" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /data/bson-corpus/minkey.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Minkey type", 3 | "bson_type": "0xFF", 4 | "test_key": "a", 5 | "valid": [ 6 | { 7 | "description": "Minkey", 8 | "canonical_bson": "08000000FF610000", 9 | "canonical_extjson": "{\"a\" : {\"$minKey\" : 1}}" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /data/mongocrypt/key-filter.json: -------------------------------------------------------------------------------- 1 | { 2 | "$or": [ 3 | { 4 | "_id": { 5 | "$in": [ 6 | { 7 | "$binary": "YWFhYWFhYWFhYWFhYWFhYQ==", 8 | "$type": "04" 9 | } 10 | ] 11 | } 12 | }, 13 | { 14 | "keyAltNames": { 15 | "$in": [] 16 | } 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /data/unified-test-format/valid-fail/entity-database-client-undefined.yml: -------------------------------------------------------------------------------- 1 | description: "entity-database-client-undefined" 2 | 3 | schemaVersion: "1.0" 4 | 5 | createEntities: 6 | - database: 7 | id: &database0 "database0" 8 | client: "foo" 9 | databaseName: "foo" 10 | 11 | tests: 12 | - description: "foo" 13 | operations: [] 14 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/gogen/goimports/README.md: -------------------------------------------------------------------------------- 1 | # goimports 2 | 3 | This package is a modified version of [https://github.com/golang/tools/tree/master/cmd/goimports](https://github.com/golang/tools/tree/master/cmd/goimports) to be called programmatically, instead of via the binary. 4 | 5 | Please see the `LICENSE` file details on the original license. 6 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin dragonfly freebsd netbsd openbsd 2 | 3 | package logrus 4 | 5 | import "golang.org/x/sys/unix" 6 | 7 | const ioctlReadTermios = unix.TIOCGETA 8 | 9 | func isTerminal(fd int) bool { 10 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) 11 | return err == nil 12 | } 13 | 14 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/direct-connection-false.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test3.test.build.10gen.cc/?directConnection=false" 2 | seeds: 3 | - localhost.test.build.10gen.cc:27017 4 | hosts: 5 | - localhost:27017 6 | - localhost:27018 7 | - localhost:27019 8 | options: 9 | ssl: true 10 | directConnection: false 11 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/load-balanced/loadBalanced-true-txt.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test20.test.build.10gen.cc/", 3 | "seeds": [ 4 | "localhost.test.build.10gen.cc:27017" 5 | ], 6 | "hosts": [ 7 | "localhost.test.build.10gen.cc:27017" 8 | ], 9 | "options": { 10 | "loadBalanced": true, 11 | "ssl": true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,!windows,!nacl,!plan9 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | ) 9 | 10 | func checkIfTerminal(w io.Writer) bool { 11 | switch v := w.(type) { 12 | case *os.File: 13 | return isTerminal(int(v.Fd())) 14 | default: 15 | return false 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /data/unified-test-format/valid-fail/entity-collection-database-undefined.yml: -------------------------------------------------------------------------------- 1 | description: "entity-collection-database-undefined" 2 | 3 | schemaVersion: "1.0" 4 | 5 | createEntities: 6 | - collection: 7 | id: &collection0 "collection0" 8 | database: "foo" 9 | collectionName: "foo" 10 | 11 | tests: 12 | - description: "foo" 13 | operations: [] 14 | -------------------------------------------------------------------------------- /vendor/github.com/xdg-go/stringprep/error.go: -------------------------------------------------------------------------------- 1 | package stringprep 2 | 3 | import "fmt" 4 | 5 | // Error describes problems encountered during stringprep, including what rune 6 | // was problematic. 7 | type Error struct { 8 | Msg string 9 | Rune rune 10 | } 11 | 12 | func (e Error) Error() string { 13 | return fmt.Sprintf("%s (rune: '\\u%04x')", e.Msg, e.Rune) 14 | } 15 | -------------------------------------------------------------------------------- /data/mongocrypt/json-schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": { 3 | "ssn": { 4 | "encrypt": { 5 | "keyId": { 6 | "$binary": "YWFhYWFhYWFhYWFhYWFhYQ==", 7 | "$type": "04" 8 | }, 9 | "type": "string", 10 | "algorithm": "AEAD_AES_CBC_HMAC_SHA512-Deterministic" 11 | } 12 | } 13 | }, 14 | "bsonType": "object" 15 | } -------------------------------------------------------------------------------- /vendor/github.com/karrick/godirwalk/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.dll 4 | *.so 5 | *.dylib 6 | 7 | # Test binary, build with `go test -c` 8 | *.test 9 | 10 | # Output of the go coverage tool, specifically when used with LiteIDE 11 | *.out 12 | 13 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 14 | .glide/ 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package terminal 6 | 7 | import "golang.org/x/sys/unix" 8 | 9 | const ioctlReadTermios = unix.TCGETS 10 | const ioctlWriteTermios = unix.TCSETS 11 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/txt-record-with-overridden-ssl-option.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test5.test.build.10gen.cc/?ssl=false" 2 | seeds: 3 | - localhost.test.build.10gen.cc:27017 4 | hosts: 5 | - localhost:27017 6 | - localhost:27018 7 | - localhost:27019 8 | options: 9 | replicaSet: repl0 10 | authSource: thisDB 11 | ssl: false 12 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/genny/dry_runner.go: -------------------------------------------------------------------------------- 1 | package genny 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/gobuffalo/logger" 7 | ) 8 | 9 | // DryRunner will NOT execute commands and write files 10 | // it is NOT destructive 11 | func DryRunner(ctx context.Context) *Runner { 12 | r := NewRunner(ctx) 13 | r.Logger = logger.New(logger.DebugLevel) 14 | return r 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | platform: x64 3 | clone_folder: c:\gopath\src\github.com\sirupsen\logrus 4 | environment: 5 | GOPATH: c:\gopath 6 | branches: 7 | only: 8 | - master 9 | install: 10 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% 11 | - go version 12 | build_script: 13 | - go get -t 14 | - go test 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/txt-record-with-overridden-uri-option.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test5.test.build.10gen.cc/?authSource=otherDB" 2 | seeds: 3 | - localhost.test.build.10gen.cc:27017 4 | hosts: 5 | - localhost:27017 6 | - localhost:27018 7 | - localhost:27019 8 | options: 9 | replicaSet: repl0 10 | authSource: otherDB 11 | ssl: true 12 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/LoadBalanced/read/Nearest.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: LoadBalanced 3 | servers: 4 | - &1 5 | address: g:27017 6 | avg_rtt_ms: 0 7 | type: LoadBalancer 8 | operation: read 9 | read_preference: 10 | mode: Nearest 11 | tag_sets: 12 | - data_center: nyc 13 | suitable_servers: 14 | - *1 15 | in_latency_window: 16 | - *1 17 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/LoadBalanced/write/Nearest.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: LoadBalanced 3 | servers: 4 | - &1 5 | address: g:27017 6 | avg_rtt_ms: 0 7 | type: LoadBalancer 8 | operation: write 9 | read_preference: 10 | mode: Nearest 11 | tag_sets: 12 | - data_center: nyc 13 | suitable_servers: 14 | - *1 15 | in_latency_window: 16 | - *1 17 | -------------------------------------------------------------------------------- /data/unified-test-format/valid-fail/entity-client-apiVersion-unsupported.yml: -------------------------------------------------------------------------------- 1 | description: "entity-client-apiVersion-unsupported" 2 | 3 | schemaVersion: "1.1" 4 | 5 | createEntities: 6 | - client: 7 | id: &client0 client0 8 | serverApi: 9 | version: "server_will_never_support_this_api_version" 10 | 11 | tests: 12 | - description: "foo" 13 | operations: [] 14 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/logger/terminal_check.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package logger 4 | 5 | import ( 6 | "io" 7 | "os" 8 | 9 | "golang.org/x/crypto/ssh/terminal" 10 | ) 11 | 12 | func checkIfTerminal(w io.Writer) bool { 13 | switch v := w.(type) { 14 | case *os.File: 15 | return terminal.IsTerminal(int(v.Fd())) 16 | default: 17 | return false 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/markbates/oncer/log_debug.go: -------------------------------------------------------------------------------- 1 | //+build debug 2 | 3 | package oncer 4 | 5 | import ( 6 | "fmt" 7 | "time" 8 | ) 9 | 10 | func log(name string, fn func()) func() { 11 | return func() { 12 | start := time.Now() 13 | if len(name) > 80 { 14 | name = name[(len(name) - 80):] 15 | } 16 | defer fmt.Println(name, time.Now().Sub(start)) 17 | fn() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/montanaflynn/stats/sum.go: -------------------------------------------------------------------------------- 1 | package stats 2 | 3 | import "math" 4 | 5 | // Sum adds all the numbers of a slice together 6 | func Sum(input Float64Data) (sum float64, err error) { 7 | 8 | if input.Len() == 0 { 9 | return math.NaN(), EmptyInput 10 | } 11 | 12 | // Add em up 13 | for _, n := range input { 14 | sum += n 15 | } 16 | 17 | return sum, nil 18 | } 19 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/loadBalanced-false-txt.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test21.test.build.10gen.cc/", 3 | "seeds": [ 4 | "localhost.test.build.10gen.cc:27017" 5 | ], 6 | "hosts": [ 7 | "localhost:27017", 8 | "localhost:27018", 9 | "localhost:27019" 10 | ], 11 | "options": { 12 | "loadBalanced": false, 13 | "ssl": true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/two-results-default-port.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test1.test.build.10gen.cc/?replicaSet=repl0" 2 | seeds: 3 | - localhost.test.build.10gen.cc:27017 4 | - localhost.test.build.10gen.cc:27018 5 | hosts: 6 | - localhost:27017 7 | - localhost:27018 8 | - localhost:27019 9 | options: 10 | replicaSet: repl0 11 | ssl: true 12 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/LoadBalanced/read/Secondary.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: LoadBalanced 3 | servers: 4 | - &1 5 | address: g:27017 6 | avg_rtt_ms: 0 7 | type: LoadBalancer 8 | operation: read 9 | read_preference: 10 | mode: Secondary 11 | tag_sets: 12 | - data_center: nyc 13 | suitable_servers: 14 | - *1 15 | in_latency_window: 16 | - *1 17 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/LoadBalanced/write/Secondary.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: LoadBalanced 3 | servers: 4 | - &1 5 | address: g:27017 6 | avg_rtt_ms: 0 7 | type: LoadBalancer 8 | operation: write 9 | read_preference: 10 | mode: Secondary 11 | tag_sets: 12 | - data_center: nyc 13 | suitable_servers: 14 | - *1 15 | in_latency_window: 16 | - *1 17 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/gogen/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/gobuffalo/gogen 2 | 3 | require ( 4 | github.com/gobuffalo/envy v1.7.0 5 | github.com/gobuffalo/genny v0.1.0 6 | github.com/gobuffalo/packr/v2 v2.2.0 7 | github.com/markbates/safe v1.0.1 8 | github.com/pkg/errors v0.8.1 9 | github.com/stretchr/testify v1.3.0 10 | golang.org/x/tools v0.0.0-20190420181800-aa740d480789 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | // +build go1.9 7 | 8 | package windows 9 | 10 | import "syscall" 11 | 12 | type Errno = syscall.Errno 13 | type SysProcAttr = syscall.SysProcAttr 14 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/two-results-nonstandard-port.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test2.test.build.10gen.cc/?replicaSet=repl0" 2 | seeds: 3 | - localhost.test.build.10gen.cc:27018 4 | - localhost.test.build.10gen.cc:27019 5 | hosts: 6 | - localhost:27017 7 | - localhost:27018 8 | - localhost:27019 9 | options: 10 | replicaSet: repl0 11 | ssl: true 12 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/fuzz.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | set -eu 3 | 4 | go get github.com/dvyukov/go-fuzz/go-fuzz 5 | go get github.com/dvyukov/go-fuzz/go-fuzz-build 6 | 7 | if [ ! -e toml-fuzz.zip ]; then 8 | go-fuzz-build github.com/pelletier/go-toml 9 | fi 10 | 11 | rm -fr fuzz 12 | mkdir -p fuzz/corpus 13 | cp *.toml fuzz/corpus 14 | 15 | go-fuzz -bin=toml-fuzz.zip -workdir=fuzz 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_aix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix 6 | 7 | package terminal 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TCGETS 12 | const ioctlWriteTermios = unix.TCSETS 13 | -------------------------------------------------------------------------------- /data/mongocrypt/kms-reply.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | x-amzn-RequestId: deeb35e5-4ecb-4bf1-9af5-84a54ff0af0e 3 | Content-Type: application/x-amz-json-1.1 4 | Content-Length: 233 5 | 6 | {"KeyId": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0", "Plaintext": "TqhXy3tKckECjy4/ZNykMWG8amBF46isVPzeOgeusKrwheBmYaU8TMG5AHR/NeUDKukqo8hBGgogiQOVpLPkqBQHD8YkLsNbDmHoGOill5QAHnniF/Lz405bGucB5TfR"} -------------------------------------------------------------------------------- /etc/list_test_pkgs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # list_pkgs 3 | directory="$1" 4 | if [ -z "$directory" ]; then 5 | directory="." 6 | fi 7 | 8 | if [ "Windows_NT" = "$OS" ]; then 9 | find "$directory" -iname "*_test.go" | perl -ple 's{(.*)/[^/]+}{$1}' | sort -u 10 | else 11 | go list -tags cse -test -f '{{.ForTest}}' $directory/... | sed -e "s/^go.mongodb.org\/mongo-driver/./" 12 | fi 13 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_legacy.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE.md file. 4 | 5 | // +build !go1.10 6 | 7 | package flags 8 | 9 | // AtLeastGo110 reports whether the Go toolchain is at least Go 1.10. 10 | const AtLeastGo110 = false 11 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/flags/toolchain_recent.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE.md file. 4 | 5 | // +build go1.10 6 | 7 | package flags 8 | 9 | // AtLeastGo110 reports whether the Go toolchain is at least Go 1.10. 10 | const AtLeastGo110 = true 11 | -------------------------------------------------------------------------------- /vendor/github.com/youmark/pkcs8/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,linux 6 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //go:noescape 13 | func gettimeofday(tv *Timeval) (err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | TEXT ·getprocaddress(SB),NOSPLIT,$0 8 | B syscall·getprocaddress(SB) 9 | 10 | TEXT ·loadlibrary(SB),NOSPLIT,$0 11 | B syscall·loadlibrary(SB) 12 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/LoadBalanced/read/PrimaryPreferred.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: LoadBalanced 3 | servers: 4 | - &1 5 | address: g:27017 6 | avg_rtt_ms: 0 7 | type: LoadBalancer 8 | operation: read 9 | read_preference: 10 | mode: PrimaryPreferred 11 | tag_sets: 12 | - data_center: nyc 13 | suitable_servers: 14 | - *1 15 | in_latency_window: 16 | - *1 17 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/LoadBalanced/read/SecondaryPreferred.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: LoadBalanced 3 | servers: 4 | - &1 5 | address: g:27017 6 | avg_rtt_ms: 0 7 | type: LoadBalancer 8 | operation: read 9 | read_preference: 10 | mode: SecondaryPreferred 11 | tag_sets: 12 | - data_center: nyc 13 | suitable_servers: 14 | - *1 15 | in_latency_window: 16 | - *1 17 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/LoadBalanced/write/PrimaryPreferred.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: LoadBalanced 3 | servers: 4 | - &1 5 | address: g:27017 6 | avg_rtt_ms: 0 7 | type: LoadBalancer 8 | operation: write 9 | read_preference: 10 | mode: PrimaryPreferred 11 | tag_sets: 12 | - data_center: nyc 13 | suitable_servers: 14 | - *1 15 | in_latency_window: 16 | - *1 17 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/flags/flags.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE.md file. 4 | 5 | package flags 6 | 7 | // Deterministic controls whether the output of Diff should be deterministic. 8 | // This is only used for testing. 9 | var Deterministic bool 10 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_safe.go: -------------------------------------------------------------------------------- 1 | package xxhash 2 | 3 | // Sum64String computes the 64-bit xxHash digest of s. 4 | func Sum64String(s string) uint64 { 5 | return Sum64([]byte(s)) 6 | } 7 | 8 | // WriteString adds more data to d. It always returns len(s), nil. 9 | func (d *Digest) WriteString(s string) (n int, err error) { 10 | return d.Write([]byte(s)) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.12-alpine3.9 as builder 2 | WORKDIR /go/src/github.com/pelletier/go-toml 3 | COPY . . 4 | ENV CGO_ENABLED=0 5 | ENV GOOS=linux 6 | RUN go install ./... 7 | 8 | FROM scratch 9 | COPY --from=builder /go/bin/tomll /usr/bin/tomll 10 | COPY --from=builder /go/bin/tomljson /usr/bin/tomljson 11 | COPY --from=builder /go/bin/jsontoml /usr/bin/jsontoml 12 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/one-txt-record-multiple-strings.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test11.test.build.10gen.cc/", 3 | "seeds": [ 4 | "localhost.test.build.10gen.cc:27017" 5 | ], 6 | "hosts": [ 7 | "localhost:27017", 8 | "localhost:27018", 9 | "localhost:27019" 10 | ], 11 | "options": { 12 | "replicaSet": "repl0", 13 | "ssl": true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /data/max-staleness/Unknown/SmallMaxStaleness.yml: -------------------------------------------------------------------------------- 1 | # Driver doesn't validate maxStalenessSeconds while TopologyType is Unknown. 2 | --- 3 | heartbeatFrequencyMS: 10000 4 | topology_description: 5 | type: Unknown 6 | servers: 7 | - &1 8 | address: a:27017 9 | type: Unknown 10 | read_preference: 11 | mode: Nearest 12 | maxStalenessSeconds: 1 13 | suitable_servers: [] 14 | in_latency_window: [] 15 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/LoadBalanced/write/SecondaryPreferred.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: LoadBalanced 3 | servers: 4 | - &1 5 | address: g:27017 6 | avg_rtt_ms: 0 7 | type: LoadBalancer 8 | operation: write 9 | read_preference: 10 | mode: SecondaryPreferred 11 | tag_sets: 12 | - data_center: nyc 13 | suitable_servers: 14 | - *1 15 | in_latency_window: 16 | - *1 17 | -------------------------------------------------------------------------------- /vendor/github.com/montanaflynn/stats/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.1 4 | - 1.2 5 | - 1.3 6 | - 1.4 7 | - 1.5 8 | - tip 9 | before_install: 10 | - sudo pip install codecov 11 | script: 12 | - go test 13 | after_success: 14 | - codecov 15 | notifications: 16 | email: 17 | recipients: 18 | - montana@montanaflynn.me 19 | on_success: change 20 | on_failure: always 21 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/sirupsen/logrus 2 | 3 | require ( 4 | github.com/davecgh/go-spew v1.1.1 // indirect 5 | github.com/konsorten/go-windows-terminal-sequences v1.0.1 6 | github.com/pmezard/go-difflib v1.0.0 // indirect 7 | github.com/stretchr/objx v0.1.1 // indirect 8 | github.com/stretchr/testify v1.2.2 9 | golang.org/x/sys v0.0.0-20190422165155-953cdadca894 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/errors.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | // AnError is an error instance useful for testing. If the code does not care 8 | // about error specifics, and only needs to return the error for example, this 9 | // error should be used to make the test code more readable. 10 | var AnError = errors.New("assert.AnError general error for testing") 11 | -------------------------------------------------------------------------------- /data/atlas-data-lake-testing/listDatabases.yml: -------------------------------------------------------------------------------- 1 | tests: 2 | - 3 | description: "ListDatabases succeeds" 4 | operations: 5 | - 6 | name: listDatabases 7 | object: client 8 | expectations: 9 | - 10 | command_started_event: 11 | command_name: "listDatabases" 12 | database_name: "admin" 13 | command: 14 | listDatabases: 1 15 | 16 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/one-result-default-port.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test3.test.build.10gen.cc/?replicaSet=repl0", 3 | "seeds": [ 4 | "localhost.test.build.10gen.cc:27017" 5 | ], 6 | "hosts": [ 7 | "localhost:27017", 8 | "localhost:27018", 9 | "localhost:27019" 10 | ], 11 | "options": { 12 | "replicaSet": "repl0", 13 | "ssl": true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/Sharded/read/Primary.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: Sharded 3 | servers: 4 | - &1 5 | address: g:27017 6 | avg_rtt_ms: 5 7 | type: Mongos 8 | - &2 9 | address: h:27017 10 | avg_rtt_ms: 35 11 | type: Mongos 12 | operation: read 13 | read_preference: 14 | mode: Primary 15 | suitable_servers: 16 | - *1 17 | - *2 18 | in_latency_window: 19 | - *1 20 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/Sharded/write/Primary.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: Sharded 3 | servers: 4 | - &1 5 | address: g:27017 6 | avg_rtt_ms: 5 7 | type: Mongos 8 | - &2 9 | address: h:27017 10 | avg_rtt_ms: 35 11 | type: Mongos 12 | operation: write 13 | read_preference: 14 | mode: Primary 15 | suitable_servers: 16 | - *1 17 | - *2 18 | in_latency_window: 19 | - *1 20 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/load-balanced/loadBalanced-true-txt.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test20.test.build.10gen.cc/" 2 | seeds: 3 | - localhost.test.build.10gen.cc:27017 4 | hosts: 5 | # In LB mode, the driver does not do server discovery, so the hostname does 6 | # not get resolved to localhost:27017. 7 | - localhost.test.build.10gen.cc:27017 8 | options: 9 | loadBalanced: true 10 | ssl: true 11 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/one-txt-record.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test5.test.build.10gen.cc/", 3 | "seeds": [ 4 | "localhost.test.build.10gen.cc:27017" 5 | ], 6 | "hosts": [ 7 | "localhost:27017", 8 | "localhost:27018", 9 | "localhost:27019" 10 | ], 11 | "options": { 12 | "replicaSet": "repl0", 13 | "authSource": "thisDB", 14 | "ssl": true 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /data/unified-test-format/valid-fail/entity-bucket-database-undefined.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "entity-bucket-database-undefined", 3 | "schemaVersion": "1.0", 4 | "createEntities": [ 5 | { 6 | "bucket": { 7 | "id": "bucket0", 8 | "database": "foo" 9 | } 10 | } 11 | ], 12 | "tests": [ 13 | { 14 | "description": "foo", 15 | "operations": [] 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /data/unified-test-format/valid-fail/entity-session-client-undefined.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "entity-session-client-undefined", 3 | "schemaVersion": "1.0", 4 | "createEntities": [ 5 | { 6 | "session": { 7 | "id": "session0", 8 | "client": "foo" 9 | } 10 | } 11 | ], 12 | "tests": [ 13 | { 14 | "description": "foo", 15 | "operations": [] 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/mapi/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | .DS_Store 3 | doc 4 | tmp 5 | pkg 6 | *.gem 7 | *.pid 8 | coverage 9 | coverage.data 10 | build/* 11 | *.pbxuser 12 | *.mode1v3 13 | .svn 14 | profile 15 | .console_history 16 | .sass-cache/* 17 | .rake_tasks~ 18 | *.log.lck 19 | solr/ 20 | .jhw-cache/ 21 | jhw.* 22 | *.sublime* 23 | node_modules/ 24 | dist/ 25 | generated/ 26 | .vendor/ 27 | bin/* 28 | gin-bin 29 | .idea/ 30 | -------------------------------------------------------------------------------- /vendor/github.com/markbates/safe/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | .DS_Store 3 | doc 4 | tmp 5 | pkg 6 | *.gem 7 | *.pid 8 | coverage 9 | coverage.data 10 | build/* 11 | *.pbxuser 12 | *.mode1v3 13 | .svn 14 | profile 15 | .console_history 16 | .sass-cache/* 17 | .rake_tasks~ 18 | *.log.lck 19 | solr/ 20 | .jhw-cache/ 21 | jhw.* 22 | *.sublime* 23 | node_modules/ 24 | dist/ 25 | generated/ 26 | .vendor/ 27 | bin/* 28 | gin-bin 29 | .idea/ 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build generate 6 | 7 | package windows 8 | 9 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go 10 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/load-balanced/loadBalanced-directConnection.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test20.test.build.10gen.cc/?directConnection=false", 3 | "seeds": [ 4 | "localhost.test.build.10gen.cc:27017" 5 | ], 6 | "hosts": [ 7 | "localhost.test.build.10gen.cc:27017" 8 | ], 9 | "options": { 10 | "loadBalanced": true, 11 | "ssl": true, 12 | "directConnection": false 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/direct-connection-false.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test3.test.build.10gen.cc/?directConnection=false", 3 | "seeds": [ 4 | "localhost.test.build.10gen.cc:27017" 5 | ], 6 | "hosts": [ 7 | "localhost:27017", 8 | "localhost:27018", 9 | "localhost:27019" 10 | ], 11 | "options": { 12 | "ssl": true, 13 | "directConnection": false 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/Unknown/read/SecondaryPreferred.json: -------------------------------------------------------------------------------- 1 | { 2 | "topology_description": { 3 | "type": "Unknown", 4 | "servers": [] 5 | }, 6 | "operation": "read", 7 | "read_preference": { 8 | "mode": "SecondaryPreferred", 9 | "tag_sets": [ 10 | { 11 | "data_center": "nyc" 12 | } 13 | ] 14 | }, 15 | "suitable_servers": [], 16 | "in_latency_window": [] 17 | } 18 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/Unknown/write/SecondaryPreferred.json: -------------------------------------------------------------------------------- 1 | { 2 | "topology_description": { 3 | "type": "Unknown", 4 | "servers": [] 5 | }, 6 | "operation": "write", 7 | "read_preference": { 8 | "mode": "SecondaryPreferred", 9 | "tag_sets": [ 10 | { 11 | "data_center": "nyc" 12 | } 13 | ] 14 | }, 15 | "suitable_servers": [], 16 | "in_latency_window": [] 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/genny/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | .DS_Store 3 | doc 4 | tmp 5 | pkg 6 | *.gem 7 | *.pid 8 | coverage 9 | coverage.data 10 | build/* 11 | *.pbxuser 12 | *.mode1v3 13 | .svn 14 | profile 15 | .console_history 16 | .sass-cache/* 17 | .rake_tasks~ 18 | *.log.lck 19 | solr/ 20 | .jhw-cache/ 21 | jhw.* 22 | *.sublime* 23 | node_modules/ 24 | dist/ 25 | generated/ 26 | .vendor/ 27 | bin/* 28 | gin-bin 29 | .idea/ 30 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/gogen/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | .DS_Store 3 | doc 4 | tmp 5 | pkg 6 | *.gem 7 | *.pid 8 | coverage 9 | coverage.data 10 | build/* 11 | *.pbxuser 12 | *.mode1v3 13 | .svn 14 | profile 15 | .console_history 16 | .sass-cache/* 17 | .rake_tasks~ 18 | *.log.lck 19 | solr/ 20 | .jhw-cache/ 21 | jhw.* 22 | *.sublime* 23 | node_modules/ 24 | dist/ 25 | generated/ 26 | .vendor/ 27 | bin/* 28 | gin-bin 29 | .idea/ 30 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/logger/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | .DS_Store 3 | doc 4 | tmp 5 | pkg 6 | *.gem 7 | *.pid 8 | coverage 9 | coverage.data 10 | build/* 11 | *.pbxuser 12 | *.mode1v3 13 | .svn 14 | profile 15 | .console_history 16 | .sass-cache/* 17 | .rake_tasks~ 18 | *.log.lck 19 | solr/ 20 | .jhw-cache/ 21 | jhw.* 22 | *.sublime* 23 | node_modules/ 24 | dist/ 25 | generated/ 26 | .vendor/ 27 | bin/* 28 | gin-bin 29 | .idea/ 30 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/syncx/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | .DS_Store 3 | doc 4 | tmp 5 | pkg 6 | *.gem 7 | *.pid 8 | coverage 9 | coverage.data 10 | build/* 11 | *.pbxuser 12 | *.mode1v3 13 | .svn 14 | profile 15 | .console_history 16 | .sass-cache/* 17 | .rake_tasks~ 18 | *.log.lck 19 | solr/ 20 | .jhw-cache/ 21 | jhw.* 22 | *.sublime* 23 | node_modules/ 24 | dist/ 25 | generated/ 26 | .vendor/ 27 | bin/* 28 | gin-bin 29 | .idea/ 30 | -------------------------------------------------------------------------------- /vendor/github.com/markbates/oncer/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | .DS_Store 3 | doc 4 | tmp 5 | pkg 6 | *.gem 7 | *.pid 8 | coverage 9 | coverage.data 10 | build/* 11 | *.pbxuser 12 | *.mode1v3 13 | .svn 14 | profile 15 | .console_history 16 | .sass-cache/* 17 | .rake_tasks~ 18 | *.log.lck 19 | solr/ 20 | .jhw-cache/ 21 | jhw.* 22 | *.sublime* 23 | node_modules/ 24 | dist/ 25 | generated/ 26 | .vendor/ 27 | bin/* 28 | gin-bin 29 | .idea/ 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_fileno.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build freebsd openbsd netbsd 6 | 7 | package fastwalk 8 | 9 | import "syscall" 10 | 11 | func direntInode(dirent *syscall.Dirent) uint64 { 12 | return uint64(dirent.Fileno) 13 | } 14 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/Single/read/SecondaryPreferred.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: Single 3 | servers: 4 | - &1 5 | address: a:27017 6 | avg_rtt_ms: 5 7 | type: Standalone 8 | tags: 9 | data_center: dc 10 | operation: read 11 | read_preference: 12 | mode: SecondaryPreferred 13 | tag_sets: 14 | - data_center: nyc 15 | suitable_servers: 16 | - *1 17 | in_latency_window: 18 | - *1 19 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/Single/write/SecondaryPreferred.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: Single 3 | servers: 4 | - &1 5 | address: a:27017 6 | avg_rtt_ms: 5 7 | type: Standalone 8 | tags: 9 | data_center: dc 10 | operation: write 11 | read_preference: 12 | mode: SecondaryPreferred 13 | tag_sets: 14 | - data_center: nyc 15 | suitable_servers: 16 | - *1 17 | in_latency_window: 18 | - *1 19 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/envy/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | .DS_Store 3 | doc 4 | tmp 5 | pkg 6 | *.gem 7 | *.pid 8 | coverage 9 | coverage.data 10 | build/* 11 | *.pbxuser 12 | *.mode1v3 13 | .svn 14 | profile 15 | .console_history 16 | .sass-cache/* 17 | .rake_tasks~ 18 | *.log.lck 19 | solr/ 20 | .jhw-cache/ 21 | jhw.* 22 | *.sublime* 23 | node_modules/ 24 | dist/ 25 | generated/ 26 | .vendor/ 27 | bin/* 28 | gin-bin 29 | .idea/ 30 | .env 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd netbsd openbsd 6 | 7 | package terminal 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TIOCGETA 12 | const ioctlWriteTermios = unix.TIOCSETA 13 | -------------------------------------------------------------------------------- /x/mongo/driver/operation/end_sessions.toml: -------------------------------------------------------------------------------- 1 | version = 0 2 | name = "EndSessions" 3 | documentation = "EndSessions performs an endSessions operation." 4 | 5 | [properties] 6 | disabled = ["collection"] 7 | 8 | [command] 9 | name = "endSessions" 10 | parameter = "sessionIDs" 11 | 12 | [request.sessionIDs] 13 | type = "array" 14 | documentation = "sessionIDs specify the sessions to be expired." 15 | skip = true 16 | constructor = true 17 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/longer-parent-in-return.yml: -------------------------------------------------------------------------------- 1 | uri: "mongodb+srv://test18.test.build.10gen.cc/?replicaSet=repl0" 2 | seeds: 3 | - localhost.sub.test.build.10gen.cc:27017 4 | hosts: 5 | - localhost:27017 6 | - localhost:27018 7 | - localhost:27019 8 | options: 9 | replicaSet: repl0 10 | ssl: true 11 | comment: Is correct, as returned host name shared the URI root "test.build.10gen.cc". 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_ino.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux darwin 6 | // +build !appengine 7 | 8 | package fastwalk 9 | 10 | import "syscall" 11 | 12 | func direntInode(dirent *syscall.Dirent) uint64 { 13 | return uint64(dirent.Ino) 14 | } 15 | -------------------------------------------------------------------------------- /data/max-staleness/ReplicaSetNoPrimary/MaxStalenessTooSmall.yml: -------------------------------------------------------------------------------- 1 | # maxStalenessSeconds must be at least 90 seconds, even with no known servers. 2 | --- 3 | topology_description: 4 | type: ReplicaSetNoPrimary 5 | servers: 6 | - &1 7 | address: a:27017 8 | type: Unknown 9 | - &2 10 | address: b:27017 11 | type: Unknown 12 | read_preference: 13 | mode: Nearest 14 | maxStalenessSeconds: 1 # Too small. 15 | error: true 16 | -------------------------------------------------------------------------------- /data/max-staleness/Unknown/SmallMaxStaleness.json: -------------------------------------------------------------------------------- 1 | { 2 | "heartbeatFrequencyMS": 10000, 3 | "topology_description": { 4 | "type": "Unknown", 5 | "servers": [ 6 | { 7 | "address": "a:27017", 8 | "type": "Unknown" 9 | } 10 | ] 11 | }, 12 | "read_preference": { 13 | "mode": "Nearest", 14 | "maxStalenessSeconds": 1 15 | }, 16 | "suitable_servers": [], 17 | "in_latency_window": [] 18 | } 19 | -------------------------------------------------------------------------------- /data/mongocrypt/encrypted-command-reply.json: -------------------------------------------------------------------------------- 1 | { 2 | "cursor" : { 3 | "firstBatch" : [ 4 | { 5 | "_id": 1, 6 | "ssn": { 7 | "$binary": "AWFhYWFhYWFhYWFhYWFhYWECRTOW9yZzNDn5dGwuqsrJQNLtgMEKaujhs9aRWRp+7Yo3JK8N8jC8P0Xjll6C1CwLsE/iP5wjOMhVv1KMMyOCSCrHorXRsb2IKPtzl2lKTqQ=", 8 | "$type": "06" 9 | } 10 | } 11 | ], 12 | "id" : 0, 13 | "ns" : "test.test" 14 | }, 15 | "ok" : 1 16 | } -------------------------------------------------------------------------------- /vendor/github.com/golang/snappy/decode_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Snappy-Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !appengine 6 | // +build gc 7 | // +build !noasm 8 | 9 | package snappy 10 | 11 | // decode has the same semantics as in decode_other.go. 12 | // 13 | //go:noescape 14 | func decode(dst, src []byte) int 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_namlen_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin freebsd openbsd netbsd 6 | 7 | package fastwalk 8 | 9 | import "syscall" 10 | 11 | func direntNamlen(dirent *syscall.Dirent) uint64 { 12 | return uint64(dirent.Namlen) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/packd/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | .DS_Store 3 | doc 4 | tmp 5 | pkg 6 | *.gem 7 | *.pid 8 | coverage 9 | coverage.data 10 | build/* 11 | *.pbxuser 12 | *.mode1v3 13 | .svn 14 | profile 15 | .console_history 16 | .sass-cache/* 17 | .rake_tasks~ 18 | *.log.lck 19 | solr/ 20 | .jhw-cache/ 21 | jhw.* 22 | *.sublime* 23 | node_modules/ 24 | dist/ 25 | generated/ 26 | .vendor/ 27 | bin/* 28 | gin-bin 29 | .idea/ 30 | Dockerfile.gocker 31 | -------------------------------------------------------------------------------- /data/connection-monitoring-and-pooling/pool-create.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "style": "unit", 4 | "description": "must be able to create a pool", 5 | "operations": [ 6 | { 7 | "name": "waitForEvent", 8 | "event": "ConnectionPoolCreated", 9 | "count": 1 10 | } 11 | ], 12 | "events": [ 13 | { 14 | "type": "ConnectionPoolCreated", 15 | "address": 42, 16 | "options": 42 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/snappy/decode_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Snappy-Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !appengine 6 | // +build gc 7 | // +build !noasm 8 | 9 | package snappy 10 | 11 | // decode has the same semantics as in decode_other.go. 12 | // 13 | //go:noescape 14 | func decode(dst, src []byte) int 15 | -------------------------------------------------------------------------------- /x/mongo/driver/operation/drop_database.toml: -------------------------------------------------------------------------------- 1 | version = 0 2 | name = "DropDatabase" 3 | documentation = "DropDatabase performs a dropDatabase operation" 4 | 5 | [properties] 6 | enabled = ["write concern"] 7 | disabled = ["collection"] 8 | 9 | [command] 10 | name = "dropDatabase" 11 | parameter = "database" 12 | 13 | [response] 14 | name = "DropDatabaseResult" 15 | 16 | [response.field.dropped] 17 | type = "string" 18 | documentation = "The dropped database." -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/txt-record-with-overridden-ssl-option.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test5.test.build.10gen.cc/?ssl=false", 3 | "seeds": [ 4 | "localhost.test.build.10gen.cc:27017" 5 | ], 6 | "hosts": [ 7 | "localhost:27017", 8 | "localhost:27018", 9 | "localhost:27019" 10 | ], 11 | "options": { 12 | "replicaSet": "repl0", 13 | "authSource": "thisDB", 14 | "ssl": false 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/ReplicaSetNoPrimary/read/PossiblePrimary.yml: -------------------------------------------------------------------------------- 1 | # Test that PossiblePrimary isn't candidate for any read preference mode. 2 | --- 3 | topology_description: 4 | type: ReplicaSetNoPrimary 5 | servers: 6 | - address: b:27017 7 | avg_rtt_ms: 5 8 | type: PossiblePrimary 9 | operation: read 10 | read_preference: 11 | mode: Primary 12 | tag_sets: 13 | - {} 14 | suitable_servers: [] 15 | in_latency_window: [] 16 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/two-results-default-port.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test1.test.build.10gen.cc/?replicaSet=repl0", 3 | "seeds": [ 4 | "localhost.test.build.10gen.cc:27017", 5 | "localhost.test.build.10gen.cc:27018" 6 | ], 7 | "hosts": [ 8 | "localhost:27017", 9 | "localhost:27018", 10 | "localhost:27019" 11 | ], 12 | "options": { 13 | "replicaSet": "repl0", 14 | "ssl": true 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/ReplicaSetNoPrimary/read/PossiblePrimaryNearest.yml: -------------------------------------------------------------------------------- 1 | # Test that PossiblePrimary isn't candidate for any read preference mode. 2 | --- 3 | topology_description: 4 | type: ReplicaSetNoPrimary 5 | servers: 6 | - address: b:27017 7 | avg_rtt_ms: 5 8 | type: PossiblePrimary 9 | operation: read 10 | read_preference: 11 | mode: Nearest 12 | tag_sets: 13 | - {} 14 | suitable_servers: [] 15 | in_latency_window: [] 16 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/Sharded/read/Nearest.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: Sharded 3 | servers: 4 | - &1 5 | address: g:27017 6 | avg_rtt_ms: 5 7 | type: Mongos 8 | - &2 9 | address: h:27017 10 | avg_rtt_ms: 35 11 | type: Mongos 12 | operation: read 13 | read_preference: 14 | mode: Nearest 15 | tag_sets: 16 | - data_center: nyc 17 | suitable_servers: 18 | - *1 19 | - *2 20 | in_latency_window: 21 | - *1 22 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/Sharded/read/Secondary.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: Sharded 3 | servers: 4 | - &1 5 | address: g:27017 6 | avg_rtt_ms: 5 7 | type: Mongos 8 | - &2 9 | address: h:27017 10 | avg_rtt_ms: 35 11 | type: Mongos 12 | operation: read 13 | read_preference: 14 | mode: Secondary 15 | tag_sets: 16 | - data_center: nyc 17 | suitable_servers: 18 | - *1 19 | - *2 20 | in_latency_window: 21 | - *1 22 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/Sharded/write/Nearest.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: Sharded 3 | servers: 4 | - &1 5 | address: g:27017 6 | avg_rtt_ms: 5 7 | type: Mongos 8 | - &2 9 | address: h:27017 10 | avg_rtt_ms: 35 11 | type: Mongos 12 | operation: write 13 | read_preference: 14 | mode: Nearest 15 | tag_sets: 16 | - data_center: nyc 17 | suitable_servers: 18 | - *1 19 | - *2 20 | in_latency_window: 21 | - *1 22 | -------------------------------------------------------------------------------- /data/unified-test-format/valid-fail/entity-database-client-undefined.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "entity-database-client-undefined", 3 | "schemaVersion": "1.0", 4 | "createEntities": [ 5 | { 6 | "database": { 7 | "id": "database0", 8 | "client": "foo", 9 | "databaseName": "foo" 10 | } 11 | } 12 | ], 13 | "tests": [ 14 | { 15 | "description": "foo", 16 | "operations": [] 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /mongo/options/testdata/csr.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosts": [ 3 | "example.com", 4 | "www.example.com", 5 | "127.0.0.1" 6 | ], 7 | "key": { 8 | "algo": "rsa", 9 | "size": 2048 10 | }, 11 | "names": [ 12 | { 13 | "C": "US", 14 | "L": "New York City", 15 | "O": "MongoDB, Inc", 16 | "OU": "WWW", 17 | "ST": "New York" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build go1.9 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | type Signal = syscall.Signal 13 | type Errno = syscall.Errno 14 | type SysProcAttr = syscall.SysProcAttr 15 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/two-results-nonstandard-port.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test2.test.build.10gen.cc/?replicaSet=repl0", 3 | "seeds": [ 4 | "localhost.test.build.10gen.cc:27018", 5 | "localhost.test.build.10gen.cc:27019" 6 | ], 7 | "hosts": [ 8 | "localhost:27017", 9 | "localhost:27018", 10 | "localhost:27019" 11 | ], 12 | "options": { 13 | "replicaSet": "repl0", 14 | "ssl": true 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/txt-record-with-overridden-uri-option.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test5.test.build.10gen.cc/?authSource=otherDB", 3 | "seeds": [ 4 | "localhost.test.build.10gen.cc:27017" 5 | ], 6 | "hosts": [ 7 | "localhost:27017", 8 | "localhost:27018", 9 | "localhost:27019" 10 | ], 11 | "options": { 12 | "replicaSet": "repl0", 13 | "authSource": "otherDB", 14 | "ssl": true 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/Sharded/write/Secondary.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: Sharded 3 | servers: 4 | - &1 5 | address: g:27017 6 | avg_rtt_ms: 5 7 | type: Mongos 8 | - &2 9 | address: h:27017 10 | avg_rtt_ms: 35 11 | type: Mongos 12 | operation: write 13 | read_preference: 14 | mode: Secondary 15 | tag_sets: 16 | - data_center: nyc 17 | suitable_servers: 18 | - *1 19 | - *2 20 | in_latency_window: 21 | - *1 22 | -------------------------------------------------------------------------------- /mongo/integration/mtest/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) MongoDB, Inc. 2017-present. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | // Package mtest is unstable and there is no backward compatibility guarantee. 8 | // It is experimental and subject to change. 9 | package mtest 10 | -------------------------------------------------------------------------------- /vendor/github.com/golang/snappy/.gitignore: -------------------------------------------------------------------------------- 1 | cmd/snappytool/snappytool 2 | testdata/bench 3 | 4 | # These explicitly listed benchmark data files are for an obsolete version of 5 | # snappy_test.go. 6 | testdata/alice29.txt 7 | testdata/asyoulik.txt 8 | testdata/fireworks.jpeg 9 | testdata/geo.protodata 10 | testdata/html 11 | testdata/html_x_4 12 | testdata/kppkn.gtb 13 | testdata/lcet10.txt 14 | testdata/paper-100k.pdf 15 | testdata/plrabn12.txt 16 | testdata/urls.10K 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // For Unix, get the pagesize from the runtime. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getpagesize() int { 14 | return syscall.Getpagesize() 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/tools/go/internal/gcimporter/newInterface11.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.11 6 | 7 | package gcimporter 8 | 9 | import "go/types" 10 | 11 | func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { 12 | return types.NewInterfaceType(methods, embeddeds) 13 | } 14 | -------------------------------------------------------------------------------- /version/version.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) MongoDB, Inc. 2017-present. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | package version // import "go.mongodb.org/mongo-driver/version" 8 | 9 | // Driver is the current version of the driver. 10 | var Driver = "v1.8.0+prerelease" 11 | -------------------------------------------------------------------------------- /data/max-staleness/ReplicaSetNoPrimary/NoKnownServers.yml: -------------------------------------------------------------------------------- 1 | # valid maxStalenessSeconds and no known servers results in an empty set of suitable servers 2 | --- 3 | topology_description: 4 | type: ReplicaSetNoPrimary 5 | servers: 6 | - &1 7 | address: a:27017 8 | type: Unknown 9 | - &2 10 | address: b:27017 11 | type: Unknown 12 | read_preference: 13 | mode: Nearest 14 | maxStalenessSeconds: 90 15 | suitable_servers: [] 16 | in_latency_window: [] 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // 6 | // System calls for 386, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-16 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-12 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /data/atlas-data-lake-testing/listCollections.yml: -------------------------------------------------------------------------------- 1 | database_name: &database_name "test" 2 | 3 | tests: 4 | - 5 | description: "ListCollections succeeds" 6 | operations: 7 | - 8 | name: listCollections 9 | object: database 10 | expectations: 11 | - 12 | command_started_event: 13 | command_name: "listCollections" 14 | database_name: *database_name 15 | command: 16 | listCollections: 1 17 | 18 | -------------------------------------------------------------------------------- /data/connection-monitoring-and-pooling/pool-close.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "style": "unit", 4 | "description": "must be able to manually close a pool", 5 | "operations": [ 6 | { 7 | "name": "close" 8 | } 9 | ], 10 | "events": [ 11 | { 12 | "type": "ConnectionPoolCreated", 13 | "address": 42, 14 | "options": 42 15 | }, 16 | { 17 | "type": "ConnectionPoolClosed", 18 | "address": 42 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/Sharded/read/PrimaryPreferred.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: Sharded 3 | servers: 4 | - &1 5 | address: g:27017 6 | avg_rtt_ms: 5 7 | type: Mongos 8 | - &2 9 | address: h:27017 10 | avg_rtt_ms: 35 11 | type: Mongos 12 | operation: read 13 | read_preference: 14 | mode: PrimaryPreferred 15 | tag_sets: 16 | - data_center: nyc 17 | suitable_servers: 18 | - *1 19 | - *2 20 | in_latency_window: 21 | - *1 22 | -------------------------------------------------------------------------------- /data/unified-test-format/valid-fail/entity-collection-database-undefined.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "entity-collection-database-undefined", 3 | "schemaVersion": "1.0", 4 | "createEntities": [ 5 | { 6 | "collection": { 7 | "id": "collection0", 8 | "database": "foo", 9 | "collectionName": "foo" 10 | } 11 | } 12 | ], 13 | "tests": [ 14 | { 15 | "description": "foo", 16 | "operations": [] 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/snappy/.gitignore: -------------------------------------------------------------------------------- 1 | cmd/snappytool/snappytool 2 | testdata/bench 3 | 4 | # These explicitly listed benchmark data files are for an obsolete version of 5 | # snappy_test.go. 6 | testdata/alice29.txt 7 | testdata/asyoulik.txt 8 | testdata/fireworks.jpeg 9 | testdata/geo.protodata 10 | testdata/html 11 | testdata/html_x_4 12 | testdata/kppkn.gtb 13 | testdata/lcet10.txt 14 | testdata/paper-100k.pdf 15 | testdata/plrabn12.txt 16 | testdata/urls.10K 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // 6 | // System calls for amd64, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-32 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-24 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /data/atlas-data-lake-testing/estimatedDocumentCount.yml: -------------------------------------------------------------------------------- 1 | collection_name: &collection_name "driverdata" 2 | database_name: &database_name "test" 3 | 4 | tests: 5 | - 6 | description: "estimatedDocumentCount succeeds" 7 | operations: 8 | - 9 | object: collection 10 | name: estimatedDocumentCount 11 | result: 15 12 | expectations: 13 | - 14 | command_started_event: 15 | command: 16 | count: *collection_name 17 | -------------------------------------------------------------------------------- /data/max-staleness/ReplicaSetNoPrimary/MaxStalenessTooSmall.json: -------------------------------------------------------------------------------- 1 | { 2 | "topology_description": { 3 | "type": "ReplicaSetNoPrimary", 4 | "servers": [ 5 | { 6 | "address": "a:27017", 7 | "type": "Unknown" 8 | }, 9 | { 10 | "address": "b:27017", 11 | "type": "Unknown" 12 | } 13 | ] 14 | }, 15 | "read_preference": { 16 | "mode": "Nearest", 17 | "maxStalenessSeconds": 1 18 | }, 19 | "error": true 20 | } 21 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/Sharded/read/SecondaryPreferred.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: Sharded 3 | servers: 4 | - &1 5 | address: g:27017 6 | avg_rtt_ms: 5 7 | type: Mongos 8 | - &2 9 | address: h:27017 10 | avg_rtt_ms: 35 11 | type: Mongos 12 | operation: read 13 | read_preference: 14 | mode: SecondaryPreferred 15 | tag_sets: 16 | - data_center: nyc 17 | suitable_servers: 18 | - *1 19 | - *2 20 | in_latency_window: 21 | - *1 22 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/Sharded/write/PrimaryPreferred.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: Sharded 3 | servers: 4 | - &1 5 | address: g:27017 6 | avg_rtt_ms: 5 7 | type: Mongos 8 | - &2 9 | address: h:27017 10 | avg_rtt_ms: 35 11 | type: Mongos 12 | operation: write 13 | read_preference: 14 | mode: PrimaryPreferred 15 | tag_sets: 16 | - data_center: nyc 17 | suitable_servers: 18 | - *1 19 | - *2 20 | in_latency_window: 21 | - *1 22 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/Sharded/write/SecondaryPreferred.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: Sharded 3 | servers: 4 | - &1 5 | address: g:27017 6 | avg_rtt_ms: 5 7 | type: Mongos 8 | - &2 9 | address: h:27017 10 | avg_rtt_ms: 35 11 | type: Mongos 12 | operation: write 13 | read_preference: 14 | mode: SecondaryPreferred 15 | tag_sets: 16 | - data_center: nyc 17 | suitable_servers: 18 | - *1 19 | - *2 20 | in_latency_window: 21 | - *1 22 | -------------------------------------------------------------------------------- /mongo/description/description.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) MongoDB, Inc. 2017-present. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | package description // import "go.mongodb.org/mongo-driver/mongo/description" 8 | 9 | // Unknown is an unknown server or topology kind. 10 | const Unknown = 0 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 linux,arm linux,mips linux,mipsle 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /bson/bsonrw/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) MongoDB, Inc. 2017-present. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | // Package bsonrw contains abstractions for reading and writing 8 | // BSON and BSON like types from sources. 9 | package bsonrw // import "go.mongodb.org/mongo-driver/bson/bsonrw" 10 | -------------------------------------------------------------------------------- /data/server-discovery-and-monitoring/monitoring/README.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | SDAM Monitoring Tests 3 | ===================== 4 | 5 | The YAML and JSON files in this directory tree are platform-independent tests 6 | that drivers can use to prove their conformance to the SDAM Monitoring spec. 7 | 8 | Format 9 | ------ 10 | 11 | The format of the tests follows the standard SDAM test and should be able to leverage 12 | the existing test runner in each language for the SDAM tests. 13 | -------------------------------------------------------------------------------- /cmd/godriver-benchmark/main.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) MongoDB, Inc. 2017-present. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | package main 8 | 9 | import ( 10 | "os" 11 | 12 | "go.mongodb.org/mongo-driver/benchmark" 13 | ) 14 | 15 | func main() { 16 | os.Exit(benchmark.DriverBenchmarkMain()) 17 | } 18 | -------------------------------------------------------------------------------- /data/client-side-encryption-prose/external-schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "bsonType": "object", 3 | "properties": { 4 | "encrypted": { 5 | "encrypt": { 6 | "keyId": [ 7 | { 8 | "$binary": { 9 | "base64": "LOCALAAAAAAAAAAAAAAAAA==", 10 | "subType": "04" 11 | } 12 | } 13 | ], 14 | "bsonType": "string", 15 | "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /vendor/github.com/markbates/oncer/deprecate.go: -------------------------------------------------------------------------------- 1 | package oncer 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "os" 7 | ) 8 | 9 | const deprecated = "DEPRECATED" 10 | 11 | var deprecationWriter io.Writer = os.Stdout 12 | 13 | func Deprecate(depth int, name string, msg string) { 14 | Do(deprecated+name, func() { 15 | fmt.Fprintf(deprecationWriter, "[%s] %s has been deprecated.\n", deprecated, name) 16 | if len(msg) > 0 { 17 | fmt.Fprintf(deprecationWriter, "\t%s\n", msg) 18 | } 19 | }) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/export_panic.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE.md file. 4 | 5 | // +build purego 6 | 7 | package cmp 8 | 9 | import "reflect" 10 | 11 | const supportExporters = false 12 | 13 | func retrieveUnexportedField(reflect.Value, reflect.StructField, bool) reflect.Value { 14 | panic("no support for forcibly accessing unexported fields") 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/markbates/safe/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | sudo: false 4 | 5 | matrix: 6 | include: 7 | - go: "1.9.x" 8 | - go: "1.10.x" 9 | - go: "1.11.x" 10 | env: 11 | - GO111MODULE=off 12 | - go: "1.11.x" 13 | env: 14 | - GO111MODULE=on 15 | - go: "tip" 16 | env: 17 | - GO111MODULE=off 18 | - go: "tip" 19 | env: 20 | - GO111MODULE=on 21 | allow_failures: 22 | - go: "tip" 23 | 24 | install: make deps 25 | 26 | script: make ci-test 27 | -------------------------------------------------------------------------------- /x/mongo/driver/topology/cancellation_listener.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) MongoDB, Inc. 2017-present. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | package topology 8 | 9 | import "context" 10 | 11 | type cancellationListener interface { 12 | Listen(context.Context, func()) 13 | StopListening() bool 14 | } 15 | -------------------------------------------------------------------------------- /data/crud/v1/write/insertOne.yml: -------------------------------------------------------------------------------- 1 | data: 2 | - {_id: 1, x: 11} 3 | 4 | tests: 5 | - 6 | description: "InsertOne with a non-existing document" 7 | operation: 8 | name: "insertOne" 9 | arguments: 10 | document: {_id: 2, x: 22} 11 | 12 | outcome: 13 | result: 14 | insertedId: 2 15 | collection: 16 | data: 17 | - {_id: 1, x: 11} 18 | - {_id: 2, x: 22} -------------------------------------------------------------------------------- /data/unified-test-format/valid-pass/assertNumberConnectionsCheckedOut.yml: -------------------------------------------------------------------------------- 1 | description: assertNumberConnectionsCheckedOut 2 | 3 | schemaVersion: '1.3' 4 | 5 | createEntities: 6 | - client: 7 | id: &client0 client0 8 | useMultipleMongoses: true 9 | 10 | tests: 11 | - description: basic assertion succeeds 12 | operations: 13 | - name: assertNumberConnectionsCheckedOut 14 | object: testRunner 15 | arguments: 16 | client: *client0 17 | connections: 0 18 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/gogen/package.go: -------------------------------------------------------------------------------- 1 | package gogen 2 | 3 | import ( 4 | "path/filepath" 5 | 6 | "github.com/gobuffalo/genny" 7 | "github.com/pkg/errors" 8 | ) 9 | 10 | func PackageName(f genny.File) (string, error) { 11 | pkg := filepath.Base(filepath.Dir(f.Name())) 12 | pf, err := ParseFile(f) 13 | if err == nil { 14 | pkg = pf.Ast.Name.String() 15 | } 16 | if len(pkg) == 0 || pkg == "." { 17 | return "", errors.New("could not determine package") 18 | } 19 | return pkg, nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/packr/v2/file/resolver/ident.go: -------------------------------------------------------------------------------- 1 | package resolver 2 | 3 | import ( 4 | "path/filepath" 5 | "runtime" 6 | "strings" 7 | ) 8 | 9 | func Key(s string) string { 10 | s = strings.Replace(s, "\\", "/", -1) 11 | return s 12 | } 13 | 14 | func OsPath(s string) string { 15 | if runtime.GOOS == "windows" { 16 | s = strings.Replace(s, "/", string(filepath.Separator), -1) 17 | } else { 18 | s = strings.Replace(s, "\\", string(filepath.Separator), -1) 19 | } 20 | return s 21 | } 22 | -------------------------------------------------------------------------------- /x/mongo/driver/operation/errors.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) MongoDB, Inc. 2017-present. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | package operation 8 | 9 | import "errors" 10 | 11 | var ( 12 | errUnacknowledgedHint = errors.New("the 'hint' command parameter cannot be used with unacknowledged writes") 13 | ) 14 | -------------------------------------------------------------------------------- /data/bson-corpus/undefined.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Undefined type (deprecated)", 3 | "bson_type": "0x06", 4 | "deprecated": true, 5 | "test_key": "a", 6 | "valid": [ 7 | { 8 | "description": "Undefined", 9 | "canonical_bson": "0800000006610000", 10 | "canonical_extjson": "{\"a\" : {\"$undefined\" : true}}", 11 | "converted_bson": "080000000A610000", 12 | "converted_extjson": "{\"a\" : null}" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /data/max-staleness/ReplicaSetNoPrimary/NoKnownServers.json: -------------------------------------------------------------------------------- 1 | { 2 | "topology_description": { 3 | "type": "ReplicaSetNoPrimary", 4 | "servers": [ 5 | { 6 | "address": "a:27017", 7 | "type": "Unknown" 8 | }, 9 | { 10 | "address": "b:27017", 11 | "type": "Unknown" 12 | } 13 | ] 14 | }, 15 | "read_preference": { 16 | "mode": "Nearest", 17 | "maxStalenessSeconds": 90 18 | }, 19 | "suitable_servers": [], 20 | "in_latency_window": [] 21 | } 22 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/ReplicaSetNoPrimary/read/Primary.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: ReplicaSetNoPrimary 3 | servers: 4 | - address: b:27017 5 | avg_rtt_ms: 5 6 | type: RSSecondary 7 | tags: 8 | data_center: nyc 9 | - address: c:27017 10 | avg_rtt_ms: 100 11 | type: RSSecondary 12 | tags: 13 | data_center: nyc 14 | operation: read 15 | read_preference: 16 | mode: Primary 17 | tag_sets: 18 | - {} 19 | suitable_servers: [] 20 | in_latency_window: [] 21 | -------------------------------------------------------------------------------- /data/unified-test-format/valid-fail/entity-client-apiVersion-unsupported.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "entity-client-apiVersion-unsupported", 3 | "schemaVersion": "1.1", 4 | "createEntities": [ 5 | { 6 | "client": { 7 | "id": "client0", 8 | "serverApi": { 9 | "version": "server_will_never_support_this_api_version" 10 | } 11 | } 12 | } 13 | ], 14 | "tests": [ 15 | { 16 | "description": "foo", 17 | "operations": [] 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /internal/testutil/israce/race.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) MongoDB, Inc. 2017-present. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | // +build race 8 | 9 | // Package israce reports if the Go race detector is enabled. 10 | package israce 11 | 12 | // Enabled reports if the race detector is enabled. 13 | const Enabled = true 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /x/mongo/driver/ocsp/options.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) MongoDB, Inc. 2017-present. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | package ocsp 8 | 9 | // VerifyOptions specifies options to configure OCSP verification. 10 | type VerifyOptions struct { 11 | Cache Cache 12 | DisableEndpointChecking bool 13 | } 14 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/replica-set/longer-parent-in-return.json: -------------------------------------------------------------------------------- 1 | { 2 | "uri": "mongodb+srv://test18.test.build.10gen.cc/?replicaSet=repl0", 3 | "seeds": [ 4 | "localhost.sub.test.build.10gen.cc:27017" 5 | ], 6 | "hosts": [ 7 | "localhost:27017", 8 | "localhost:27018", 9 | "localhost:27019" 10 | ], 11 | "options": { 12 | "replicaSet": "repl0", 13 | "ssl": true 14 | }, 15 | "comment": "Is correct, as returned host name shared the URI root \"test.build.10gen.cc\"." 16 | } 17 | -------------------------------------------------------------------------------- /internal/testutil/israce/norace.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) MongoDB, Inc. 2017-present. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | // +build !race 8 | 9 | // Package israce reports if the Go race detector is enabled. 10 | package israce 11 | 12 | // Enabled reports if the race detector is enabled. 13 | const Enabled = false 14 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE.md file. 4 | 5 | // +build !cmp_debug 6 | 7 | package diff 8 | 9 | var debug debugger 10 | 11 | type debugger struct{} 12 | 13 | func (debugger) Begin(_, _ int, f EqualFunc, _, _ *EditScript) EqualFunc { 14 | return f 15 | } 16 | func (debugger) Update() {} 17 | func (debugger) Finish() {} 18 | -------------------------------------------------------------------------------- /benchmark/canary_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) MongoDB, Inc. 2017-present. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | package benchmark 8 | 9 | import "testing" 10 | 11 | func BenchmarkCanaryInc(b *testing.B) { WrapCase(CanaryIncCase)(b) } 12 | func BenchmarkGlobalCanaryInc(b *testing.B) { WrapCase(GlobalCanaryIncCase)(b) } 13 | -------------------------------------------------------------------------------- /data/mongocrypt/mongocryptd-reply.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaRequiresEncryption": true, 3 | "ok": { 4 | "$numberInt": "1" 5 | }, 6 | "result": { 7 | "filter": { 8 | "ssn": { 9 | "$binary": { 10 | "base64": "ADgAAAAQYQABAAAABWtpABAAAAAEYWFhYWFhYWFhYWFhYWFhYQJ2AAwAAAA0NTctNTUtNTQ2MgAA", 11 | "subType": "06" 12 | } 13 | } 14 | }, 15 | "find": "test" 16 | }, 17 | "hasEncryptedPlaceholders": true 18 | } -------------------------------------------------------------------------------- /data/server-selection/server_selection/ReplicaSetNoPrimary/read/PossiblePrimary.json: -------------------------------------------------------------------------------- 1 | { 2 | "topology_description": { 3 | "type": "ReplicaSetNoPrimary", 4 | "servers": [ 5 | { 6 | "address": "b:27017", 7 | "avg_rtt_ms": 5, 8 | "type": "PossiblePrimary" 9 | } 10 | ] 11 | }, 12 | "operation": "read", 13 | "read_preference": { 14 | "mode": "Primary", 15 | "tag_sets": [ 16 | {} 17 | ] 18 | }, 19 | "suitable_servers": [], 20 | "in_latency_window": [] 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/markbates/oncer/oncer.go: -------------------------------------------------------------------------------- 1 | package oncer 2 | 3 | import ( 4 | "sync" 5 | ) 6 | 7 | var onces = &sync.Map{} 8 | 9 | func Do(name string, fn func()) { 10 | o, _ := onces.LoadOrStore(name, &sync.Once{}) 11 | if once, ok := o.(*sync.Once); ok { 12 | once.Do(log(name, fn)) 13 | } 14 | } 15 | 16 | func Reset(names ...string) { 17 | if len(names) == 0 { 18 | onces = &sync.Map{} 19 | return 20 | } 21 | 22 | for _, n := range names { 23 | onces.Delete(n) 24 | onces.Delete(deprecated + n) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/montanaflynn/stats/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all 2 | 3 | doc: 4 | godoc `pwd` 5 | 6 | webdoc: 7 | godoc -http=:44444 8 | 9 | format: 10 | go fmt 11 | 12 | test: 13 | go test -race 14 | 15 | check: format test 16 | 17 | benchmark: 18 | go test -bench=. -benchmem 19 | 20 | coverage: 21 | go test -coverprofile=coverage.out 22 | go tool cover -html="coverage.out" 23 | 24 | lint: format 25 | go get github.com/alecthomas/gometalinter 26 | gometalinter --install 27 | gometalinter 28 | 29 | default: lint test 30 | -------------------------------------------------------------------------------- /data/connection-monitoring-and-pooling/pool-checkout-connection.yml: -------------------------------------------------------------------------------- 1 | version: 1 2 | style: unit 3 | description: must be able to check out a connection 4 | operations: 5 | - name: checkOut 6 | events: 7 | - type: ConnectionCheckOutStarted 8 | address: 42 9 | - type: ConnectionCreated 10 | connectionId: 1 11 | address: 42 12 | - type: ConnectionReady 13 | connectionId: 1 14 | address: 42 15 | - type: ConnectionCheckedOut 16 | connectionId: 1 17 | address: 42 18 | ignore: 19 | - ConnectionPoolCreated 20 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/ReplicaSetNoPrimary/read/PossiblePrimaryNearest.json: -------------------------------------------------------------------------------- 1 | { 2 | "topology_description": { 3 | "type": "ReplicaSetNoPrimary", 4 | "servers": [ 5 | { 6 | "address": "b:27017", 7 | "avg_rtt_ms": 5, 8 | "type": "PossiblePrimary" 9 | } 10 | ] 11 | }, 12 | "operation": "read", 13 | "read_preference": { 14 | "mode": "Nearest", 15 | "tag_sets": [ 16 | {} 17 | ] 18 | }, 19 | "suitable_servers": [], 20 | "in_latency_window": [] 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /x/mongo/driver/auth/cred.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) MongoDB, Inc. 2017-present. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | package auth 8 | 9 | // Cred is a user's credential. 10 | type Cred struct { 11 | Source string 12 | Username string 13 | Password string 14 | PasswordSet bool 15 | Props map[string]string 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/genny/.goreleaser.yml.plush: -------------------------------------------------------------------------------- 1 | builds: 2 | - 3 | goos: 4 | - darwin 5 | - linux 6 | - windows 7 | env: 8 | - CGO_ENABLED=0 9 | main: ./genny/main.go 10 | 11 | checksum: 12 | name_template: 'checksums.txt' 13 | 14 | snapshot: 15 | name_template: "{{ .Tag }}-next" 16 | 17 | changelog: 18 | sort: asc 19 | filters: 20 | exclude: 21 | - '^docs:' 22 | - '^test:' 23 | <%= if (brew) { %> 24 | brew: 25 | github: 26 | owner: gobuffalo 27 | name: homebrew-tap 28 | <% } %> 29 | -------------------------------------------------------------------------------- /data/atlas-data-lake-testing/runCommand.yml: -------------------------------------------------------------------------------- 1 | database_name: &database_name "test" 2 | 3 | tests: 4 | - 5 | description: "ping succeeds using runCommand" 6 | operations: 7 | - 8 | name: runCommand 9 | object: database 10 | command_name: ping 11 | arguments: 12 | command: 13 | ping: 1 14 | expectations: 15 | - 16 | command_started_event: 17 | command_name: ping 18 | database_name: *database_name 19 | command: 20 | ping: 1 21 | -------------------------------------------------------------------------------- /data/connection-monitoring-and-pooling/pool-checkin.yml: -------------------------------------------------------------------------------- 1 | version: 1 2 | style: unit 3 | description: must have a method of allowing the driver to check in a connection 4 | operations: 5 | - name: checkOut 6 | label: conn 7 | - name: checkIn 8 | connection: conn 9 | events: 10 | - type: ConnectionCheckedIn 11 | connectionId: 42 12 | address: 42 13 | ignore: 14 | - ConnectionPoolCreated 15 | - ConnectionCreated 16 | - ConnectionReady 17 | - ConnectionClosed 18 | - ConnectionCheckOutStarted 19 | - ConnectionCheckedOut 20 | -------------------------------------------------------------------------------- /data/crud/v1/read/find-collation.yml: -------------------------------------------------------------------------------- 1 | data: 2 | - {_id: 1, x: 'ping'} 3 | minServerVersion: '3.4' 4 | serverless: 'forbid' 5 | 6 | tests: 7 | - 8 | description: "Find with a collation" 9 | operation: 10 | name: "find" 11 | arguments: 12 | filter: {x: 'PING'} 13 | collation: { locale: 'en_US', strength: 2 } # https://docs.mongodb.com/manual/reference/collation/#collation-document 14 | outcome: 15 | result: 16 | - {_id: 1, x: 'ping'} 17 | -------------------------------------------------------------------------------- /data/max-staleness/Single/SmallMaxStaleness.yml: -------------------------------------------------------------------------------- 1 | # Driver doesn't validate maxStalenessSeconds for direct connection. 2 | --- 3 | heartbeatFrequencyMS: 10000 4 | topology_description: 5 | type: Single 6 | servers: 7 | - &1 8 | address: a:27017 9 | type: Standalone 10 | avg_rtt_ms: 5 11 | lastUpdateTime: 0 12 | maxWireVersion: 5 13 | lastWrite: {lastWriteDate: {$numberLong: "1"}} 14 | read_preference: 15 | mode: Nearest 16 | maxStalenessSeconds: 1 17 | suitable_servers: 18 | - *1 19 | in_latency_window: 20 | - *1 21 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest_non_matching.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: ReplicaSetNoPrimary 3 | servers: 4 | - address: b:27017 5 | avg_rtt_ms: 5 6 | type: RSSecondary 7 | tags: 8 | data_center: nyc 9 | - address: c:27017 10 | avg_rtt_ms: 100 11 | type: RSSecondary 12 | tags: 13 | data_center: nyc 14 | operation: read 15 | read_preference: 16 | mode: Nearest 17 | tag_sets: 18 | - data_center: sf 19 | suitable_servers: [] 20 | in_latency_window: [] 21 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary_non_matching.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: ReplicaSetNoPrimary 3 | servers: 4 | - address: b:27017 5 | avg_rtt_ms: 5 6 | type: RSSecondary 7 | tags: 8 | data_center: nyc 9 | - address: c:27017 10 | avg_rtt_ms: 100 11 | type: RSSecondary 12 | tags: 13 | data_center: nyc 14 | operation: read 15 | read_preference: 16 | mode: Secondary 17 | tag_sets: 18 | - data_center: sf 19 | suitable_servers: [] 20 | in_latency_window: [] 21 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/forward_assertions.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | // Assertions provides assertion methods around the 4 | // TestingT interface. 5 | type Assertions struct { 6 | t TestingT 7 | } 8 | 9 | // New makes a new Assertions object for the specified TestingT. 10 | func New(t TestingT) *Assertions { 11 | return &Assertions{ 12 | t: t, 13 | } 14 | } 15 | 16 | //go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_forward.go.tmpl -include-format-funcs" 17 | -------------------------------------------------------------------------------- /vendor/github.com/xdg-go/stringprep/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 by David A. Golden. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | // Package stringprep provides data tables and algorithms for RFC-3454, 8 | // including errata (as of 2018-02). It also provides a profile for 9 | // SASLprep as defined in RFC-4013. 10 | package stringprep 11 | -------------------------------------------------------------------------------- /x/mongo/driver/operation/abort_transaction.toml: -------------------------------------------------------------------------------- 1 | version = 0 2 | name = "AbortTransaction" 3 | documentation = "AbortTransaction performs an abortTransaction operation." 4 | 5 | [properties] 6 | enabled = ["write concern"] 7 | retryable = {mode = "once per command", type = "writes"} 8 | 9 | [command] 10 | name = "abortTransaction" 11 | parameter = "database" 12 | 13 | [request.recoveryToken] 14 | type = "document" 15 | documentation = """ 16 | RecoveryToken sets the recovery token to use when committing or aborting a sharded transaction.\ 17 | """ 18 | -------------------------------------------------------------------------------- /data/mongocrypt/mongocryptd-command-local.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "ssn": "457-55-5462" 5 | }, 6 | "jsonSchema": { 7 | "properties": { 8 | "ssn": { 9 | "encrypt": { 10 | "keyId": { 11 | "$binary": "YWFhYWFhYWFhYWFhYWFhYQ==", 12 | "$type": "04" 13 | }, 14 | "type": "string", 15 | "algorithm": "AEAD_AES_CBC_HMAC_SHA512-Deterministic" 16 | } 17 | } 18 | }, 19 | "bsonType": "object" 20 | }, 21 | "isRemoteSchema": false 22 | } -------------------------------------------------------------------------------- /data/mongocrypt/mongocryptd-command-remote.json: -------------------------------------------------------------------------------- 1 | { 2 | "find": "test", 3 | "filter": { 4 | "ssn": "457-55-5462" 5 | }, 6 | "jsonSchema": { 7 | "properties": { 8 | "ssn": { 9 | "encrypt": { 10 | "keyId": { 11 | "$binary": "YWFhYWFhYWFhYWFhYWFhYQ==", 12 | "$type": "04" 13 | }, 14 | "type": "string", 15 | "algorithm": "AEAD_AES_CBC_HMAC_SHA512-Deterministic" 16 | } 17 | } 18 | }, 19 | "bsonType": "object" 20 | }, 21 | "isRemoteSchema": true 22 | } -------------------------------------------------------------------------------- /data/server-selection/server_selection/ReplicaSetNoPrimary/write/SecondaryPreferred.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: ReplicaSetNoPrimary 3 | servers: 4 | - address: b:27017 5 | avg_rtt_ms: 5 6 | type: RSSecondary 7 | tags: 8 | data_center: nyc 9 | - address: c:27017 10 | avg_rtt_ms: 100 11 | type: RSSecondary 12 | tags: 13 | data_center: nyc 14 | operation: write 15 | read_preference: 16 | mode: SecondaryPreferred 17 | tag_sets: 18 | - data_center: nyc 19 | suitable_servers: [] 20 | in_latency_window: [] 21 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/require/forward_requirements.go: -------------------------------------------------------------------------------- 1 | package require 2 | 3 | // Assertions provides assertion methods around the 4 | // TestingT interface. 5 | type Assertions struct { 6 | t TestingT 7 | } 8 | 9 | // New makes a new Assertions object for the specified TestingT. 10 | func New(t TestingT) *Assertions { 11 | return &Assertions{ 12 | t: t, 13 | } 14 | } 15 | 16 | //go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=require -template=require_forward.go.tmpl -include-format-funcs" 17 | -------------------------------------------------------------------------------- /data/server-discovery-and-monitoring/sharded/discover_single_mongos.yml: -------------------------------------------------------------------------------- 1 | description: "Discover single mongos" 2 | 3 | uri: "mongodb://a/?directConnection=false" 4 | 5 | phases: 6 | 7 | - responses: 8 | - 9 | - "a:27017" 10 | - 11 | ok: 1 12 | ismaster: true 13 | msg: "isdbgrid" 14 | minWireVersion: 0 15 | maxWireVersion: 6 16 | 17 | outcome: 18 | servers: 19 | "a:27017": 20 | type: "Mongos" 21 | setName: 22 | topologyType: "Sharded" 23 | setName: 24 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/ReplicaSetNoPrimary/read/PrimaryPreferred_non_matching.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: ReplicaSetNoPrimary 3 | servers: 4 | - address: b:27017 5 | avg_rtt_ms: 5 6 | type: RSSecondary 7 | tags: 8 | data_center: nyc 9 | - address: c:27017 10 | avg_rtt_ms: 100 11 | type: RSSecondary 12 | tags: 13 | data_center: nyc 14 | operation: read 15 | read_preference: 16 | mode: PrimaryPreferred 17 | tag_sets: 18 | - data_center: sf 19 | suitable_servers: [] 20 | in_latency_window: [] 21 | -------------------------------------------------------------------------------- /vendor/github.com/markbates/safe/shoulders.md: -------------------------------------------------------------------------------- 1 | # github.com/markbates/safe Stands on the Shoulders of Giants 2 | 3 | github.com/markbates/safe does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants this project would not be possible. Please make sure to check them out and thank them for all of their hard work. 4 | 5 | Thank you to the following **GIANTS**: 6 | 7 | 8 | * [github.com/markbates/safe](https://godoc.org/github.com/markbates/safe) 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo,linux,amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/ReplicaSetNoPrimary/read/SecondaryPreferred_non_matching.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: ReplicaSetNoPrimary 3 | servers: 4 | - address: b:27017 5 | avg_rtt_ms: 5 6 | type: RSSecondary 7 | tags: 8 | data_center: nyc 9 | - address: c:27017 10 | avg_rtt_ms: 100 11 | type: RSSecondary 12 | tags: 13 | data_center: nyc 14 | operation: read 15 | read_preference: 16 | mode: SecondaryPreferred 17 | tag_sets: 18 | - data_center: sf 19 | suitable_servers: [] 20 | in_latency_window: [] 21 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/syncx/go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 2 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 3 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 4 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 5 | github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= 6 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 7 | -------------------------------------------------------------------------------- /vendor/github.com/markbates/oncer/go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 2 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 3 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 4 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 5 | github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= 6 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 7 | -------------------------------------------------------------------------------- /vendor/github.com/markbates/safe/go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 2 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 3 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 4 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 5 | github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= 6 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 7 | -------------------------------------------------------------------------------- /x/mongo/driver/operation/drop_collection.toml: -------------------------------------------------------------------------------- 1 | version = 0 2 | name = "DropCollection" 3 | documentation = "DropCollection performs a drop operation." 4 | 5 | [command] 6 | name = "drop" 7 | parameter = "collection" 8 | 9 | [properties] 10 | enabled = ["write concern"] 11 | 12 | [response] 13 | name = "DropCollectionResult" 14 | 15 | [response.field.ns] 16 | type = "string" 17 | documentation = "The namespace of the dropped collection." 18 | 19 | [response.field.nIndexesWas] 20 | type = "int32" 21 | documentation = "The number of indexes in the dropped collection." 22 | -------------------------------------------------------------------------------- /data/connection-monitoring-and-pooling/pool-create-with-options.yml: -------------------------------------------------------------------------------- 1 | version: 1 2 | style: unit 3 | description: must be able to start a pool with various options set 4 | poolOptions: 5 | maxPoolSize: 50 6 | minPoolSize: 5 7 | maxIdleTimeMS: 100 8 | operations: 9 | - name: waitForEvent 10 | event: ConnectionPoolCreated 11 | count: 1 12 | events: 13 | - type: ConnectionPoolCreated 14 | address: 42 15 | options: 16 | maxPoolSize: 50 17 | minPoolSize: 5 18 | maxIdleTimeMS: 100 19 | ignore: 20 | - ConnectionCreated 21 | - ConnectionReady 22 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: ReplicaSetNoPrimary 3 | servers: 4 | - &1 5 | address: b:27017 6 | avg_rtt_ms: 5 7 | type: RSSecondary 8 | tags: 9 | data_center: nyc 10 | - &2 11 | address: c:27017 12 | avg_rtt_ms: 100 13 | type: RSSecondary 14 | tags: 15 | data_center: nyc 16 | operation: read 17 | read_preference: 18 | mode: Nearest 19 | tag_sets: 20 | - data_center: nyc 21 | suitable_servers: 22 | - *1 23 | - *2 24 | in_latency_window: 25 | - *1 26 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/envy/azure-tests.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - task: GoTool@0 3 | inputs: 4 | version: $(go_version) 5 | - task: Bash@3 6 | inputs: 7 | targetType: inline 8 | script: | 9 | mkdir -p "$(GOBIN)" 10 | mkdir -p "$(GOPATH)/pkg" 11 | mkdir -p "$(modulePath)" 12 | shopt -s extglob 13 | mv !(gopath) "$(modulePath)" 14 | displayName: "Setup Go Workspace" 15 | - script: | 16 | go get -t -v ./... 17 | go test -race ./... 18 | workingDirectory: "$(modulePath)" 19 | displayName: "Tests" 20 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/mapi/azure-tests.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - task: GoTool@0 3 | inputs: 4 | version: $(go_version) 5 | - task: Bash@3 6 | inputs: 7 | targetType: inline 8 | script: | 9 | mkdir -p "$(GOBIN)" 10 | mkdir -p "$(GOPATH)/pkg" 11 | mkdir -p "$(modulePath)" 12 | shopt -s extglob 13 | mv !(gopath) "$(modulePath)" 14 | displayName: "Setup Go Workspace" 15 | - script: | 16 | go get -t -v ./... 17 | go test -race ./... 18 | workingDirectory: "$(modulePath)" 19 | displayName: "Tests" 20 | -------------------------------------------------------------------------------- /vendor/github.com/golang/snappy/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of Snappy-Go authors for copyright purposes. 2 | # This file is distinct from the CONTRIBUTORS files. 3 | # See the latter for an explanation. 4 | 5 | # Names should be added to this file as 6 | # Name or Organization 7 | # The email address is not required for organizations. 8 | 9 | # Please keep the list sorted. 10 | 11 | Damian Gryski 12 | Google Inc. 13 | Jan Mercl <0xjnml@gmail.com> 14 | Rodolfo Carvalho 15 | Sebastien Binet 16 | -------------------------------------------------------------------------------- /data/connection-string/valid-options.yml: -------------------------------------------------------------------------------- 1 | tests: 2 | - 3 | description: "Option names are normalized to lowercase" 4 | uri: "mongodb://alice:secret@example.com/admin?AUTHMechanism=MONGODB-CR" 5 | valid: true 6 | warning: false 7 | hosts: 8 | - 9 | type: "hostname" 10 | host: "example.com" 11 | port: ~ 12 | auth: 13 | username: "alice" 14 | password: "secret" 15 | db: "admin" 16 | options: 17 | authmechanism: "MONGODB-CR" 18 | -------------------------------------------------------------------------------- /data/max-staleness/Single/Incompatible.json: -------------------------------------------------------------------------------- 1 | { 2 | "topology_description": { 3 | "type": "Single", 4 | "servers": [ 5 | { 6 | "address": "a:27017", 7 | "type": "Standalone", 8 | "avg_rtt_ms": 5, 9 | "lastUpdateTime": 0, 10 | "maxWireVersion": 4, 11 | "lastWrite": { 12 | "lastWriteDate": { 13 | "$numberLong": "1" 14 | } 15 | } 16 | } 17 | ] 18 | }, 19 | "read_preference": { 20 | "mode": "Nearest", 21 | "maxStalenessSeconds": 120 22 | }, 23 | "error": true 24 | } 25 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/ReplicaSetNoPrimary/read/PrimaryPreferred.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: ReplicaSetNoPrimary 3 | servers: 4 | - &1 5 | address: b:27017 6 | avg_rtt_ms: 5 7 | type: RSSecondary 8 | tags: 9 | data_center: nyc 10 | - &2 11 | address: c:27017 12 | avg_rtt_ms: 100 13 | type: RSSecondary 14 | tags: 15 | data_center: nyc 16 | operation: read 17 | read_preference: 18 | mode: PrimaryPreferred 19 | tag_sets: 20 | - {} 21 | suitable_servers: 22 | - *1 23 | - *2 24 | in_latency_window: 25 | - *1 26 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/ReplicaSetNoPrimary/read/Secondary.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: ReplicaSetNoPrimary 3 | servers: 4 | - &1 5 | address: b:27017 6 | avg_rtt_ms: 5 7 | type: RSSecondary 8 | tags: 9 | data_center: nyc 10 | - &2 11 | address: c:27017 12 | avg_rtt_ms: 100 13 | type: RSSecondary 14 | tags: 15 | data_center: nyc 16 | operation: read 17 | read_preference: 18 | mode: Secondary 19 | tag_sets: 20 | - data_center: nyc 21 | suitable_servers: 22 | - *1 23 | - *2 24 | in_latency_window: 25 | - *1 26 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/genny/azure-tests.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - task: GoTool@0 3 | inputs: 4 | version: $(go_version) 5 | - task: Bash@3 6 | inputs: 7 | targetType: inline 8 | script: | 9 | mkdir -p "$(GOBIN)" 10 | mkdir -p "$(GOPATH)/pkg" 11 | mkdir -p "$(modulePath)" 12 | shopt -s extglob 13 | mv !(gopath) "$(modulePath)" 14 | displayName: "Setup Go Workspace" 15 | - script: | 16 | go get -t -v ./... 17 | go test -race ./... 18 | workingDirectory: "$(modulePath)" 19 | displayName: "Tests" 20 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/genny/replacer.go: -------------------------------------------------------------------------------- 1 | package genny 2 | 3 | import ( 4 | "strings" 5 | ) 6 | 7 | // Replace search/replace in a file name 8 | func Replace(search string, replace string) Transformer { 9 | return NewTransformer("*", func(f File) (File, error) { 10 | name := f.Name() 11 | name = strings.Replace(name, search, replace, -1) 12 | return NewFile(name, f), nil 13 | }) 14 | } 15 | 16 | // Dot will convert -dot- in a file name to just a . 17 | // example -dot-travis.yml becomes .travis.yml 18 | func Dot() Transformer { 19 | return Replace("-dot-", ".") 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/gogen/azure-tests.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - task: GoTool@0 3 | inputs: 4 | version: $(go_version) 5 | - task: Bash@3 6 | inputs: 7 | targetType: inline 8 | script: | 9 | mkdir -p "$(GOBIN)" 10 | mkdir -p "$(GOPATH)/pkg" 11 | mkdir -p "$(modulePath)" 12 | shopt -s extglob 13 | mv !(gopath) "$(modulePath)" 14 | displayName: "Setup Go Workspace" 15 | - script: | 16 | go get -t -v ./... 17 | go test -race ./... 18 | workingDirectory: "$(modulePath)" 19 | displayName: "Tests" 20 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/logger/azure-tests.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - task: GoTool@0 3 | inputs: 4 | version: $(go_version) 5 | - task: Bash@3 6 | inputs: 7 | targetType: inline 8 | script: | 9 | mkdir -p "$(GOBIN)" 10 | mkdir -p "$(GOPATH)/pkg" 11 | mkdir -p "$(modulePath)" 12 | shopt -s extglob 13 | mv !(gopath) "$(modulePath)" 14 | displayName: "Setup Go Workspace" 15 | - script: | 16 | go get -t -v ./... 17 | go test -race ./... 18 | workingDirectory: "$(modulePath)" 19 | displayName: "Tests" 20 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/packd/azure-tests.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - task: GoTool@0 3 | inputs: 4 | version: $(go_version) 5 | - task: Bash@3 6 | inputs: 7 | targetType: inline 8 | script: | 9 | mkdir -p "$(GOBIN)" 10 | mkdir -p "$(GOPATH)/pkg" 11 | mkdir -p "$(modulePath)" 12 | shopt -s extglob 13 | mv !(gopath) "$(modulePath)" 14 | displayName: "Setup Go Workspace" 15 | - script: | 16 | go get -t -v ./... 17 | go test -race ./... 18 | workingDirectory: "$(modulePath)" 19 | displayName: "Tests" 20 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/syncx/azure-tests.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - task: GoTool@0 3 | inputs: 4 | version: $(go_version) 5 | - task: Bash@3 6 | inputs: 7 | targetType: inline 8 | script: | 9 | mkdir -p "$(GOBIN)" 10 | mkdir -p "$(GOPATH)/pkg" 11 | mkdir -p "$(modulePath)" 12 | shopt -s extglob 13 | mv !(gopath) "$(modulePath)" 14 | displayName: "Setup Go Workspace" 15 | - script: | 16 | go get -t -v ./... 17 | go test -race ./... 18 | workingDirectory: "$(modulePath)" 19 | displayName: "Tests" 20 | -------------------------------------------------------------------------------- /x/mongo/driver/legacy.go: -------------------------------------------------------------------------------- 1 | package driver 2 | 3 | // LegacyOperationKind indicates if an operation is a legacy find, getMore, or killCursors. This is used 4 | // in Operation.Execute, which will create legacy OP_QUERY, OP_GET_MORE, or OP_KILL_CURSORS instead 5 | // of sending them as a command. 6 | type LegacyOperationKind uint 7 | 8 | // These constants represent the three different kinds of legacy operations. 9 | const ( 10 | LegacyNone LegacyOperationKind = iota 11 | LegacyFind 12 | LegacyGetMore 13 | LegacyKillCursors 14 | LegacyListCollections 15 | LegacyListIndexes 16 | ) 17 | -------------------------------------------------------------------------------- /data/atlas-data-lake-testing/listDatabases.json: -------------------------------------------------------------------------------- 1 | { 2 | "tests": [ 3 | { 4 | "description": "ListDatabases succeeds", 5 | "operations": [ 6 | { 7 | "name": "listDatabases", 8 | "object": "client" 9 | } 10 | ], 11 | "expectations": [ 12 | { 13 | "command_started_event": { 14 | "command_name": "listDatabases", 15 | "database_name": "admin", 16 | "command": { 17 | "listDatabases": 1 18 | } 19 | } 20 | } 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /data/crud/v1/read/aggregate.yml: -------------------------------------------------------------------------------- 1 | data: 2 | - {_id: 1, x: 11} 3 | - {_id: 2, x: 22} 4 | - {_id: 3, x: 33} 5 | 6 | tests: 7 | - 8 | description: "Aggregate with multiple stages" 9 | operation: 10 | name: aggregate 11 | arguments: 12 | pipeline: 13 | - $sort: {x: 1} 14 | - $match: 15 | _id: {$gt: 1} 16 | batchSize: 2 17 | 18 | outcome: 19 | result: 20 | - {_id: 2, x: 22} 21 | - {_id: 3, x: 33} 22 | -------------------------------------------------------------------------------- /data/crud/v1/read/distinct-collation.yml: -------------------------------------------------------------------------------- 1 | data: 2 | - {_id: 1, string: 'PING'} 3 | - {_id: 2, string: 'ping'} 4 | minServerVersion: '3.4' 5 | serverless: 'forbid' 6 | 7 | tests: 8 | - 9 | description: "Distinct with a collation" 10 | operation: 11 | name: distinct 12 | arguments: 13 | fieldName: "string" 14 | collation: { locale: 'en_US', strength: 2 } # https://docs.mongodb.com/manual/reference/collation/#collation-document 15 | 16 | outcome: 17 | result: 18 | - 'PING' 19 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/snappy/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of Snappy-Go authors for copyright purposes. 2 | # This file is distinct from the CONTRIBUTORS files. 3 | # See the latter for an explanation. 4 | 5 | # Names should be added to this file as 6 | # Name or Organization 7 | # The email address is not required for organizations. 8 | 9 | # Please keep the list sorted. 10 | 11 | Damian Gryski 12 | Google Inc. 13 | Jan Mercl <0xjnml@gmail.com> 14 | Rodolfo Carvalho 15 | Sebastien Binet 16 | -------------------------------------------------------------------------------- /vendor/github.com/montanaflynn/stats/max.go: -------------------------------------------------------------------------------- 1 | package stats 2 | 3 | import "math" 4 | 5 | // Max finds the highest number in a slice 6 | func Max(input Float64Data) (max float64, err error) { 7 | 8 | // Return an error if there are no numbers 9 | if input.Len() == 0 { 10 | return math.NaN(), EmptyInput 11 | } 12 | 13 | // Get the first value as the starting point 14 | max = input.Get(0) 15 | 16 | // Loop and replace higher values 17 | for i := 1; i < input.Len(); i++ { 18 | if input.Get(i) > max { 19 | max = input.Get(i) 20 | } 21 | } 22 | 23 | return max, nil 24 | } 25 | -------------------------------------------------------------------------------- /x/mongo/driver/batch_cursor_test.go: -------------------------------------------------------------------------------- 1 | package driver 2 | 3 | import ( 4 | "testing" 5 | 6 | "go.mongodb.org/mongo-driver/internal/testutil/assert" 7 | ) 8 | 9 | func TestBatchCursor(t *testing.T) { 10 | t.Run("setBatchSize", func(t *testing.T) { 11 | var size int32 12 | bc := &BatchCursor{ 13 | batchSize: size, 14 | } 15 | assert.Equal(t, size, bc.batchSize, "expected batchSize %v, got %v", size, bc.batchSize) 16 | 17 | size = int32(4) 18 | bc.SetBatchSize(size) 19 | assert.Equal(t, size, bc.batchSize, "expected batchSize %v, got %v", size, bc.batchSize) 20 | }) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,!gccgo 6 | 7 | package unix 8 | 9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 11 | 12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 13 | // fail. 14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,!race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/ReplicaSetNoPrimary/read/Nearest_multiple.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: ReplicaSetNoPrimary 3 | servers: 4 | - &1 5 | address: b:27017 6 | avg_rtt_ms: 10 7 | type: RSSecondary 8 | tags: 9 | data_center: nyc 10 | - &2 11 | address: c:27017 12 | avg_rtt_ms: 20 13 | type: RSSecondary 14 | tags: 15 | data_center: nyc 16 | operation: read 17 | read_preference: 18 | mode: Nearest 19 | tag_sets: 20 | - data_center: nyc 21 | suitable_servers: 22 | - *1 23 | - *2 24 | in_latency_window: 25 | - *1 26 | - *2 27 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/ReplicaSetNoPrimary/read/SecondaryPreferred.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: ReplicaSetNoPrimary 3 | servers: 4 | - &1 5 | address: b:27017 6 | avg_rtt_ms: 5 7 | type: RSSecondary 8 | tags: 9 | data_center: nyc 10 | - &2 11 | address: c:27017 12 | avg_rtt_ms: 100 13 | type: RSSecondary 14 | tags: 15 | data_center: nyc 16 | operation: read 17 | read_preference: 18 | mode: SecondaryPreferred 19 | tag_sets: 20 | - data_center: nyc 21 | suitable_servers: 22 | - *1 23 | - *2 24 | in_latency_window: 25 | - *1 26 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/genny/results.go: -------------------------------------------------------------------------------- 1 | package genny 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | "os/exec" 7 | ) 8 | 9 | type Results struct { 10 | Files []File 11 | Commands []*exec.Cmd 12 | Requests []RequestResult 13 | } 14 | 15 | func (r Results) Find(s string) (File, error) { 16 | for _, f := range r.Files { 17 | if s == f.Name() { 18 | return f, nil 19 | } 20 | } 21 | return nil, fmt.Errorf("%s not found", s) 22 | } 23 | 24 | type RequestResult struct { 25 | Request *http.Request 26 | Response *http.Response 27 | Client *http.Client 28 | Error error 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/gogen/append.go: -------------------------------------------------------------------------------- 1 | package gogen 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/gobuffalo/genny" 7 | "github.com/pkg/errors" 8 | ) 9 | 10 | // Append allows to append source into a go file 11 | func Append(gf genny.File, expressions ...string) (genny.File, error) { 12 | pf, err := ParseFile(gf) 13 | if err != nil { 14 | return gf, errors.WithStack(err) 15 | } 16 | 17 | gf = pf.File 18 | pf.Lines = append(pf.Lines, expressions...) 19 | 20 | fileContent := strings.Join(pf.Lines, "\n") 21 | return genny.NewFile(gf.Name(), strings.NewReader(fileContent)), nil 22 | } 23 | -------------------------------------------------------------------------------- /data/max-staleness/Single/Incompatible.yml: -------------------------------------------------------------------------------- 1 | # During server selection, clients (drivers or mongos) MUST raise an error if 2 | # maxStalenessSeconds is defined and not -1 and any server's ``maxWireVersion`` 3 | # is less than 5 (`SERVER-23893`_). 4 | --- 5 | topology_description: 6 | type: Single 7 | servers: 8 | - &1 9 | address: a:27017 10 | type: Standalone 11 | avg_rtt_ms: 5 12 | lastUpdateTime: 0 13 | maxWireVersion: 4 # Incompatible. 14 | lastWrite: {lastWriteDate: {$numberLong: "1"}} 15 | read_preference: 16 | mode: Nearest 17 | maxStalenessSeconds: 120 18 | error: true 19 | -------------------------------------------------------------------------------- /data/retryable-writes/deleteMany.yml: -------------------------------------------------------------------------------- 1 | runOn: 2 | - 3 | minServerVersion: "3.6" 4 | topology: ["replicaset", "sharded", "load-balanced"] 5 | 6 | data: 7 | - { _id: 1, x: 11 } 8 | - { _id: 2, x: 22 } 9 | 10 | tests: 11 | - 12 | description: "DeleteMany ignores retryWrites" 13 | useMultipleMongoses: true 14 | operation: 15 | name: "deleteMany" 16 | arguments: 17 | filter: { } 18 | outcome: 19 | result: 20 | deletedCount: 2 21 | collection: 22 | data: [] 23 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/gogen/gomods/tidy.go: -------------------------------------------------------------------------------- 1 | package gomods 2 | 3 | import ( 4 | "os/exec" 5 | 6 | "github.com/gobuffalo/genny" 7 | ) 8 | 9 | func Tidy(path string, verbose bool) (*genny.Generator, error) { 10 | g := genny.New() 11 | g.StepName = "go:mod:tidy:" + path 12 | g.RunFn(func(r *genny.Runner) error { 13 | if !On() { 14 | return nil 15 | } 16 | return r.Chdir(path, func() error { 17 | cmd := exec.Command(genny.GoBin(), "mod", "tidy") 18 | if verbose { 19 | cmd.Args = append(cmd.Args, "-v") 20 | } 21 | return r.Exec(cmd) 22 | }) 23 | }) 24 | return g, nil 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/gogen/get.go: -------------------------------------------------------------------------------- 1 | package gogen 2 | 3 | import ( 4 | "os/exec" 5 | 6 | "github.com/gobuffalo/genny" 7 | "github.com/gobuffalo/gogen/gomods" 8 | ) 9 | 10 | func Get(pkg string, args ...string) *exec.Cmd { 11 | args = append([]string{"get"}, args...) 12 | args = append(args, pkg) 13 | cmd := exec.Command(genny.GoBin(), args...) 14 | return cmd 15 | } 16 | 17 | func Install(pkg string, args ...string) genny.RunFn { 18 | return func(r *genny.Runner) error { 19 | return gomods.Disable(func() error { 20 | cmd := Get(pkg, args...) 21 | return r.Exec(cmd) 22 | }) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /data/crud/v1/read/aggregate-collation.yml: -------------------------------------------------------------------------------- 1 | data: 2 | - {_id: 1, x: 'ping'} 3 | minServerVersion: '3.4' 4 | serverless: 'forbid' 5 | 6 | tests: 7 | - 8 | description: "Aggregate with collation" 9 | operation: 10 | name: aggregate 11 | arguments: 12 | pipeline: 13 | - $match: 14 | x: 'PING' 15 | collation: { locale: 'en_US', strength: 2 } # https://docs.mongodb.com/manual/reference/collation/#collation-document 16 | outcome: 17 | result: 18 | - {_id: 1, x: 'ping'} 19 | -------------------------------------------------------------------------------- /data/initial-dns-seedlist-discovery/load-balanced/loadBalanced-directConnection.yml: -------------------------------------------------------------------------------- 1 | # The TXT record for test20.test.build.10gen.cc contains loadBalanced=true. 2 | # DRIVERS-1721 introduced this test as passing. 3 | uri: "mongodb+srv://test20.test.build.10gen.cc/?directConnection=false" 4 | seeds: 5 | - localhost.test.build.10gen.cc:27017 6 | hosts: 7 | # In LB mode, the driver does not do server discovery, so the hostname does 8 | # not get resolved to localhost:27017. 9 | - localhost.test.build.10gen.cc:27017 10 | options: 11 | loadBalanced: true 12 | ssl: true 13 | directConnection: false 14 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/genny/group.go: -------------------------------------------------------------------------------- 1 | package genny 2 | 3 | import "sync" 4 | 5 | type Group struct { 6 | Generators []*Generator 7 | moot sync.RWMutex 8 | } 9 | 10 | func (gg *Group) Add(g *Generator) { 11 | m := &gg.moot 12 | m.Lock() 13 | defer m.Unlock() 14 | gg.Generators = append(gg.Generators, g) 15 | } 16 | 17 | func (gg *Group) Merge(g2 *Group) { 18 | for _, g := range g2.Generators { 19 | gg.Add(g) 20 | } 21 | } 22 | 23 | func (gg *Group) With(r *Runner) { 24 | m := &gg.moot 25 | m.RLock() 26 | defer m.RUnlock() 27 | for _, g := range gg.Generators { 28 | r.With(g) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/genny/.goreleaser.yml: -------------------------------------------------------------------------------- 1 | # Code generated by github.com/gobuffalo/release. DO NOT EDIT. 2 | # Edit .goreleaser.yml.plush instead 3 | 4 | builds: 5 | - 6 | goos: 7 | - darwin 8 | - linux 9 | - windows 10 | env: 11 | - CGO_ENABLED=0 12 | main: ./genny/main.go 13 | 14 | checksum: 15 | name_template: 'checksums.txt' 16 | 17 | snapshot: 18 | name_template: "{{ .Tag }}-next" 19 | 20 | changelog: 21 | sort: asc 22 | filters: 23 | exclude: 24 | - '^docs:' 25 | - '^test:' 26 | 27 | brew: 28 | github: 29 | owner: gobuffalo 30 | name: homebrew-tap 31 | 32 | -------------------------------------------------------------------------------- /vendor/github.com/karrick/godirwalk/symdir.go: -------------------------------------------------------------------------------- 1 | package godirwalk 2 | 3 | import "os" 4 | 5 | func isDirectoryOrSymlinkToDirectory(de *Dirent, osPathname string) (bool, error) { 6 | if de.IsDir() { 7 | return true, nil 8 | } 9 | return isSymlinkToDirectory(de, osPathname) 10 | } 11 | 12 | func isSymlinkToDirectory(de *Dirent, osPathname string) (bool, error) { 13 | if !de.IsSymlink() { 14 | return false, nil 15 | } 16 | // Need to resolve the symbolic link's referent in order to respond. 17 | info, err := os.Stat(osPathname) 18 | if err != nil { 19 | return false, err 20 | } 21 | return info.IsDir(), nil 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /x/mongo/driver/auth/gssapi_not_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) MongoDB, Inc. 2017-present. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | //+build !gssapi 8 | 9 | package auth 10 | 11 | // GSSAPI is the mechanism name for GSSAPI. 12 | const GSSAPI = "GSSAPI" 13 | 14 | func newGSSAPIAuthenticator(cred *Cred) (Authenticator, error) { 15 | return nil, newAuthError("GSSAPI support not enabled during build (-tags gssapi)", nil) 16 | } 17 | -------------------------------------------------------------------------------- /data/atlas-data-lake-testing/listCollections.json: -------------------------------------------------------------------------------- 1 | { 2 | "database_name": "test", 3 | "tests": [ 4 | { 5 | "description": "ListCollections succeeds", 6 | "operations": [ 7 | { 8 | "name": "listCollections", 9 | "object": "database" 10 | } 11 | ], 12 | "expectations": [ 13 | { 14 | "command_started_event": { 15 | "command_name": "listCollections", 16 | "database_name": "test", 17 | "command": { 18 | "listCollections": 1 19 | } 20 | } 21 | } 22 | ] 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /data/unified-test-format/valid-fail/entity-client-storeEventsAsEntities-conflict_within_same_array.yml: -------------------------------------------------------------------------------- 1 | description: "entity-client-storeEventsAsEntities-conflict_within_same_array" 2 | 3 | schemaVersion: "1.2" 4 | 5 | createEntities: 6 | - client: 7 | id: &client0 client0 8 | storeEventsAsEntities: 9 | - id: &events events 10 | events: ["PoolCreatedEvent", "PoolReadyEvent", "PoolClearedEvent", "PoolClosedEvent"] 11 | - id: *events 12 | events: ["CommandStartedEvent", "CommandSucceededEvent", "CommandFailedEvent"] 13 | 14 | tests: 15 | - description: "foo" 16 | operations: [] 17 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v3/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /.evergreen/run-mongodb-aws-ecs-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o errexit # Exit the script with error if any of the commands fail 4 | 5 | ############################################ 6 | # Main Program # 7 | ############################################ 8 | 9 | if [[ -z "$1" ]]; then 10 | echo "usage: $0 " 11 | exit 1 12 | fi 13 | export MONGODB_URI="$1" 14 | 15 | echo "Running MONGODB-AWS ECS authentication tests" 16 | 17 | if echo "$MONGODB_URI" | grep -q "@"; then 18 | echo "MONGODB_URI unexpectedly contains user credentials in ECS test!"; 19 | exit 1 20 | fi 21 | 22 | ./src/main 23 | -------------------------------------------------------------------------------- /cmd/operationgen/README.md: -------------------------------------------------------------------------------- 1 | The `operationgen` tool 2 | ======================= 3 | The `operationgen` tool is used to generate operations from the IDL accepted by the `drivergen` 4 | package. Most of the documentation for code generation can be found in the `drivergen` package. 5 | 6 | Building 7 | -------- 8 | Building `operationgen` requires a special library called 9 | [packr](https://github.com/gobuffalo/packr). Make sure you call `packr2 install` to install 10 | `operationgen`. Before committing, ensure you call `packr2 clean` to remove the generated files. 11 | This will help avoid bloating the git repository with unnecessary files. 12 | -------------------------------------------------------------------------------- /data/atlas-data-lake-testing/estimatedDocumentCount.json: -------------------------------------------------------------------------------- 1 | { 2 | "collection_name": "driverdata", 3 | "database_name": "test", 4 | "tests": [ 5 | { 6 | "description": "estimatedDocumentCount succeeds", 7 | "operations": [ 8 | { 9 | "object": "collection", 10 | "name": "estimatedDocumentCount", 11 | "result": 15 12 | } 13 | ], 14 | "expectations": [ 15 | { 16 | "command_started_event": { 17 | "command": { 18 | "count": "driverdata" 19 | } 20 | } 21 | } 22 | ] 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /data/unified-test-format/valid-fail/entity-client-storeEventsAsEntities-conflict_with_client_id.yml: -------------------------------------------------------------------------------- 1 | description: "entity-client-storeEventsAsEntities-conflict_with_client_id" 2 | 3 | schemaVersion: "1.2" 4 | 5 | createEntities: 6 | - client: 7 | id: &client0 client0 8 | storeEventsAsEntities: 9 | # Using the client ID here will ensure that test runners also detect 10 | # conflicts with the same entity being defined 11 | - id: *client0 12 | events: ["PoolCreatedEvent", "PoolReadyEvent", "PoolClearedEvent", "PoolClosedEvent"] 13 | 14 | tests: 15 | - description: "foo" 16 | operations: [] 17 | -------------------------------------------------------------------------------- /data/server-discovery-and-monitoring/sharded/normalize_uri_case.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Normalize URI case", 3 | "uri": "mongodb://A,B", 4 | "phases": [ 5 | { 6 | "responses": [], 7 | "outcome": { 8 | "servers": { 9 | "a:27017": { 10 | "type": "Unknown", 11 | "setName": null 12 | }, 13 | "b:27017": { 14 | "type": "Unknown", 15 | "setName": null 16 | } 17 | }, 18 | "topologyType": "Unknown", 19 | "logicalSessionTimeoutMinutes": null, 20 | "setName": null 21 | } 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/mapi/shoulders.md: -------------------------------------------------------------------------------- 1 | # github.com/gobuffalo/mapi Stands on the Shoulders of Giants 2 | 3 | github.com/gobuffalo/mapi does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants this project would not be possible. Please make sure to check them out and thank them for all of their hard work. 4 | 5 | Thank you to the following **GIANTS**: 6 | 7 | 8 | * [github.com/gobuffalo/mapi](https://godoc.org/github.com/gobuffalo/mapi) 9 | 10 | * [github.com/pkg/errors](https://godoc.org/github.com/pkg/errors) 11 | -------------------------------------------------------------------------------- /benchmark/multi_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) MongoDB, Inc. 2017-present. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | package benchmark 8 | 9 | import "testing" 10 | 11 | func BenchmarkMultiFindMany(b *testing.B) { WrapCase(MultiFindMany)(b) } 12 | func BenchmarkMultiInsertSmallDocument(b *testing.B) { WrapCase(MultiInsertSmallDocument)(b) } 13 | func BenchmarkMultiInsertLargeDocument(b *testing.B) { WrapCase(MultiInsertLargeDocument)(b) } 14 | -------------------------------------------------------------------------------- /data/server-discovery-and-monitoring/single/discover_unavailable_seed.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Discover unavailable seed", 3 | "uri": "mongodb://a/?directConnection=false", 4 | "phases": [ 5 | { 6 | "responses": [ 7 | [ 8 | "a:27017", 9 | {} 10 | ] 11 | ], 12 | "outcome": { 13 | "servers": { 14 | "a:27017": { 15 | "type": "Unknown", 16 | "setName": null 17 | } 18 | }, 19 | "topologyType": "Unknown", 20 | "logicalSessionTimeoutMinutes": null, 21 | "setName": null 22 | } 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/fuzz.go: -------------------------------------------------------------------------------- 1 | // +build gofuzz 2 | 3 | package toml 4 | 5 | func Fuzz(data []byte) int { 6 | tree, err := LoadBytes(data) 7 | if err != nil { 8 | if tree != nil { 9 | panic("tree must be nil if there is an error") 10 | } 11 | return 0 12 | } 13 | 14 | str, err := tree.ToTomlString() 15 | if err != nil { 16 | if str != "" { 17 | panic(`str must be "" if there is an error`) 18 | } 19 | panic(err) 20 | } 21 | 22 | tree, err = Load(str) 23 | if err != nil { 24 | if tree != nil { 25 | panic("tree must be nil if there is an error") 26 | } 27 | return 0 28 | } 29 | 30 | return 1 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/xdg-go/scram/go.sum: -------------------------------------------------------------------------------- 1 | github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= 2 | github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= 3 | github.com/xdg-go/stringprep v1.0.2 h1:6iq84/ryjjeRmMJwxutI51F2GIPlP5BfTvXHeYjyhBc= 4 | github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= 5 | golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= 6 | golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 7 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /x/mongo/driver/operation/list_indexes.toml: -------------------------------------------------------------------------------- 1 | version = 0 2 | name = "ListIndexes" 3 | documentation = "ListIndexes performs a listIndexes operation." 4 | response.type = "batch cursor" 5 | 6 | [properties] 7 | legacy = "listIndexes" 8 | retryable = {mode = "once per command", type = "reads"} 9 | 10 | [command] 11 | name = "listIndexes" 12 | parameter = "collection" 13 | 14 | [request.batchSize] 15 | type = "int32" 16 | documentation = "BatchSize specifies the number of documents to return in every batch." 17 | 18 | [request.maxTimeMS] 19 | type = "int64" 20 | documentation = "MaxTimeMS specifies the maximum amount of time to allow the query to run." 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (cmsg *Cmsghdr) SetLen(length int) { 22 | cmsg.Len = uint32(length) 23 | } 24 | -------------------------------------------------------------------------------- /data/server-discovery-and-monitoring/single/discover_unavailable_seed.yml: -------------------------------------------------------------------------------- 1 | description: "Discover unavailable seed" 2 | 3 | uri: "mongodb://a/?directConnection=false" 4 | 5 | phases: [ 6 | 7 | { 8 | responses: [ 9 | 10 | ["a:27017", {}] 11 | ], 12 | 13 | outcome: { 14 | 15 | servers: { 16 | 17 | "a:27017": { 18 | 19 | type: "Unknown", 20 | setName: 21 | } 22 | }, 23 | topologyType: "Unknown", 24 | logicalSessionTimeoutMinutes: null, 25 | setName: 26 | } 27 | } 28 | ] 29 | -------------------------------------------------------------------------------- /vendor/github.com/montanaflynn/stats/min.go: -------------------------------------------------------------------------------- 1 | package stats 2 | 3 | import "math" 4 | 5 | // Min finds the lowest number in a set of data 6 | func Min(input Float64Data) (min float64, err error) { 7 | 8 | // Get the count of numbers in the slice 9 | l := input.Len() 10 | 11 | // Return an error if there are no numbers 12 | if l == 0 { 13 | return math.NaN(), EmptyInput 14 | } 15 | 16 | // Get the first value as the starting point 17 | min = input.Get(0) 18 | 19 | // Iterate until done checking for a lower value 20 | for i := 1; i < l; i++ { 21 | if input.Get(i) < min { 22 | min = input.Get(i) 23 | } 24 | } 25 | return min, nil 26 | } 27 | -------------------------------------------------------------------------------- /x/mongo/driver/mongocrypt/errors_not_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) MongoDB, Inc. 2017-present. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | // +build !cse 8 | 9 | package mongocrypt 10 | 11 | // Error represents an error from an operation on a MongoCrypt instance. 12 | type Error struct { 13 | Code int32 14 | Message string 15 | } 16 | 17 | // Error implements the error interface 18 | func (Error) Error() string { 19 | panic(cseNotSupportedMsg) 20 | } 21 | -------------------------------------------------------------------------------- /data/connection-monitoring-and-pooling/pool-checkin-make-available.yml: -------------------------------------------------------------------------------- 1 | version: 1 2 | style: unit 3 | description: must make valid checked in connection available 4 | operations: 5 | - name: checkOut 6 | label: conn 7 | - name: checkIn 8 | connection: conn 9 | - name: checkOut 10 | events: 11 | - type: ConnectionCheckedOut 12 | connectionId: 1 13 | address: 42 14 | - type: ConnectionCheckedIn 15 | connectionId: 1 16 | address: 42 17 | - type: ConnectionCheckedOut 18 | connectionId: 1 19 | address: 42 20 | ignore: 21 | - ConnectionPoolCreated 22 | - ConnectionCreated 23 | - ConnectionReady 24 | - ConnectionCheckOutStarted -------------------------------------------------------------------------------- /data/server-discovery-and-monitoring/single/direct_connection_replicaset.yml: -------------------------------------------------------------------------------- 1 | description: Direct connection with replicaSet URI option 2 | 3 | uri: "mongodb://a/?replicaSet=rs&directConnection=true" 4 | 5 | phases: 6 | # We are connecting to a replica set member 7 | - responses: 8 | - 9 | - "a:27017" 10 | - ok: 1 11 | ismaster: true 12 | setName: rs 13 | minWireVersion: 0 14 | maxWireVersion: 6 15 | outcome: 16 | servers: 17 | "a:27017": 18 | type: "RSPrimary" 19 | setName: "rs" 20 | topologyType: "Single" 21 | logicalSessionTimeoutMinutes: 22 | setName: rs 23 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/ReplicaSetWithPrimary/read/Nearest_non_matching.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: ReplicaSetWithPrimary 3 | servers: 4 | - address: b:27017 5 | avg_rtt_ms: 5 6 | type: RSSecondary 7 | tags: 8 | data_center: nyc 9 | - address: c:27017 10 | avg_rtt_ms: 100 11 | type: RSSecondary 12 | tags: 13 | data_center: nyc 14 | - address: a:27017 15 | avg_rtt_ms: 26 16 | type: RSPrimary 17 | tags: 18 | data_center: nyc 19 | operation: read 20 | read_preference: 21 | mode: Nearest 22 | tag_sets: 23 | - data_center: sf 24 | suitable_servers: [] 25 | in_latency_window: [] 26 | -------------------------------------------------------------------------------- /data/server-selection/server_selection/ReplicaSetWithPrimary/read/Primary.yml: -------------------------------------------------------------------------------- 1 | topology_description: 2 | type: ReplicaSetWithPrimary 3 | servers: 4 | - address: b:27017 5 | avg_rtt_ms: 5 6 | type: RSSecondary 7 | tags: 8 | data_center: nyc 9 | - address: c:27017 10 | avg_rtt_ms: 100 11 | type: RSSecondary 12 | tags: 13 | data_center: nyc 14 | - &1 15 | address: a:27017 16 | avg_rtt_ms: 26 17 | type: RSPrimary 18 | tags: 19 | data_center: nyc 20 | operation: read 21 | read_preference: 22 | mode: Primary 23 | tag_sets: 24 | - {} 25 | suitable_servers: 26 | - *1 27 | in_latency_window: 28 | - *1 29 | -------------------------------------------------------------------------------- /data/uri-options/single-threaded-options.yml: -------------------------------------------------------------------------------- 1 | tests: 2 | - 3 | description: "Valid options specific to single-threaded drivers are parsed correctly" 4 | uri: "mongodb://example.com/?serverSelectionTryOnce=false" 5 | valid: true 6 | warning: false 7 | hosts: ~ 8 | auth: ~ 9 | options: 10 | serverSelectionTryOnce: false 11 | - 12 | description: "Invalid serverSelectionTryOnce causes a warning" 13 | uri: "mongodb://example.com/?serverSelectionTryOnce=invalid" 14 | valid: true 15 | warning: true 16 | hosts: ~ 17 | auth: ~ 18 | options: {} 19 | -------------------------------------------------------------------------------- /vendor/github.com/gobuffalo/packr/v2/file/info.go: -------------------------------------------------------------------------------- 1 | package file 2 | 3 | import ( 4 | "os" 5 | "time" 6 | ) 7 | 8 | type info struct { 9 | Path string 10 | Contents []byte 11 | size int64 12 | modTime time.Time 13 | isDir bool 14 | } 15 | 16 | func (f info) Name() string { 17 | return f.Path 18 | } 19 | 20 | func (f info) Size() int64 { 21 | return f.size 22 | } 23 | 24 | func (f info) Mode() os.FileMode { 25 | return 0444 26 | } 27 | 28 | func (f info) ModTime() time.Time { 29 | return f.modTime 30 | } 31 | 32 | func (f info) IsDir() bool { 33 | return f.isDir 34 | } 35 | 36 | func (f info) Sys() interface{} { 37 | return nil 38 | } 39 | --------------------------------------------------------------------------------