├── samples ├── appengine │ ├── app.yaml │ ├── .vscode │ │ └── tasks.json │ ├── README.md │ ├── .gcloudignore │ └── helloworld.go ├── order │ ├── testdata │ │ ├── bad-image │ │ └── cat1 │ ├── index.html │ ├── order-form.htmlt │ └── common.go ├── guestbook │ ├── blobs │ │ ├── motd.txt │ │ ├── aws.png │ │ ├── gcp.png │ │ ├── azure.png │ │ └── gophers.jpg │ ├── gcp │ │ ├── Dockerfile │ │ └── .gcloudignore │ ├── roles.sql │ ├── README.md │ ├── azure │ │ ├── variables.tf │ │ └── outputs.tf │ ├── schema.sql │ └── aws │ │ ├── variables.tf │ │ └── outputs.tf ├── tutorial │ ├── gopher.png │ └── README.md ├── wire │ └── README.md ├── gocdk-runtimevar │ ├── runtimevar.ct │ └── main_test.go ├── gocdk-secrets │ ├── secrets.ct │ └── main_test.go ├── gocdk-pubsub │ └── pubsub.ct ├── gocdk-docstore │ ├── main_test.go │ └── docstore.ct └── gocdk-blob │ ├── main_test.go │ └── blob.ct ├── internal ├── website │ ├── content │ │ ├── aws │ │ │ ├── _index.md │ │ │ ├── rds │ │ │ │ └── _index.md │ │ │ └── awscloud │ │ │ │ └── _index.md │ │ ├── gcp │ │ │ ├── _index.md │ │ │ ├── cloudsql │ │ │ │ └── _index.md │ │ │ └── gcpcloud │ │ │ │ └── _index.md │ │ ├── blob │ │ │ ├── _index.md │ │ │ ├── driver │ │ │ │ └── _index.md │ │ │ ├── gcsblob │ │ │ │ └── _index.md │ │ │ ├── memblob │ │ │ │ └── _index.md │ │ │ ├── s3blob │ │ │ │ └── _index.md │ │ │ ├── azureblob │ │ │ │ └── _index.md │ │ │ ├── fileblob │ │ │ │ └── _index.md │ │ │ └── drivertest │ │ │ │ └── _index.md │ │ ├── health │ │ │ ├── _index.md │ │ │ └── sqlhealth │ │ │ │ └── _index.md │ │ ├── mysql │ │ │ ├── _index.md │ │ │ ├── awsmysql │ │ │ │ └── _index.md │ │ │ ├── gcpmysql │ │ │ │ └── _index.md │ │ │ ├── rdsmysql │ │ │ │ └── _index.md │ │ │ ├── azuremysql │ │ │ │ └── _index.md │ │ │ └── cloudmysql │ │ │ │ └── _index.md │ │ ├── pubsub │ │ │ ├── _index.md │ │ │ ├── azuresb │ │ │ │ └── _index.md │ │ │ ├── driver │ │ │ │ └── _index.md │ │ │ ├── awssnssqs │ │ │ │ └── _index.md │ │ │ ├── batcher │ │ │ │ └── _index.md │ │ │ ├── drivertest │ │ │ │ └── _index.md │ │ │ ├── gcppubsub │ │ │ │ └── _index.md │ │ │ ├── mempubsub │ │ │ │ └── _index.md │ │ │ ├── natspubsub │ │ │ │ └── _index.md │ │ │ ├── azurepubsub │ │ │ │ └── _index.md │ │ │ ├── kafkapubsub │ │ │ │ └── _index.md │ │ │ └── rabbitpubsub │ │ │ │ └── _index.md │ │ ├── secrets │ │ │ ├── _index.md │ │ │ ├── awskms │ │ │ │ └── _index.md │ │ │ ├── driver │ │ │ │ └── _index.md │ │ │ ├── gcpkms │ │ │ │ └── _index.md │ │ │ ├── vault │ │ │ │ └── _index.md │ │ │ ├── drivertest │ │ │ │ └── _index.md │ │ │ ├── hashivault │ │ │ │ └── _index.md │ │ │ ├── azurekeyvault │ │ │ │ └── _index.md │ │ │ └── localsecrets │ │ │ │ └── _index.md │ │ ├── server │ │ │ ├── _index.md │ │ │ ├── driver │ │ │ │ └── _index.md │ │ │ ├── health │ │ │ │ ├── _index.md │ │ │ │ └── sqlhealth │ │ │ │ │ └── _index.md │ │ │ ├── requestlog │ │ │ │ └── _index.md │ │ │ ├── sdserver │ │ │ │ └── _index.md │ │ │ └── xrayserver │ │ │ │ └── _index.md │ │ ├── docstore │ │ │ ├── _index.md │ │ │ ├── driver │ │ │ │ └── _index.md │ │ │ ├── drivertest │ │ │ │ └── _index.md │ │ │ ├── awsdynamodb │ │ │ │ └── _index.md │ │ │ ├── firedocstore │ │ │ │ └── _index.md │ │ │ ├── gcpfirestore │ │ │ │ └── _index.md │ │ │ ├── memdocstore │ │ │ │ └── _index.md │ │ │ ├── mongodocstore │ │ │ │ └── _index.md │ │ │ ├── dynamodocstore │ │ │ │ └── _index.md │ │ │ └── internal │ │ │ │ └── fields │ │ │ │ └── _index.md │ │ ├── gcerrors │ │ │ └── _index.md │ │ ├── postgres │ │ │ ├── _index.md │ │ │ ├── awspostgres │ │ │ │ └── _index.md │ │ │ ├── cloudpostgres │ │ │ │ └── _index.md │ │ │ ├── gcppostgres │ │ │ │ └── _index.md │ │ │ └── rdspostgres │ │ │ │ └── _index.md │ │ ├── internal │ │ │ ├── oc │ │ │ │ └── _index.md │ │ │ ├── gcerr │ │ │ │ └── _index.md │ │ │ ├── retry │ │ │ │ └── _index.md │ │ │ ├── trace │ │ │ │ └── _index.md │ │ │ ├── batcher │ │ │ │ └── _index.md │ │ │ ├── escape │ │ │ │ └── _index.md │ │ │ ├── openurl │ │ │ │ └── _index.md │ │ │ ├── testing │ │ │ │ ├── _index.md │ │ │ │ ├── setup │ │ │ │ │ └── _index.md │ │ │ │ ├── cmdtest │ │ │ │ │ └── _index.md │ │ │ │ ├── octest │ │ │ │ │ └── _index.md │ │ │ │ ├── terraform │ │ │ │ │ └── _index.md │ │ │ │ └── test-summary │ │ │ │ │ └── _index.md │ │ │ ├── useragent │ │ │ │ └── _index.md │ │ │ ├── releasehelper │ │ │ │ └── _index.md │ │ │ └── website │ │ │ │ └── gatherexamples │ │ │ │ └── _index.md │ │ ├── requestlog │ │ │ └── _index.md │ │ ├── runtimevar │ │ │ ├── _index.md │ │ │ ├── driver │ │ │ │ └── _index.md │ │ │ ├── blobvar │ │ │ │ └── _index.md │ │ │ ├── etcdvar │ │ │ │ └── _index.md │ │ │ ├── filevar │ │ │ │ ├── _index.md │ │ │ │ └── _demo │ │ │ │ │ └── _index.md │ │ │ ├── httpvar │ │ │ │ └── _index.md │ │ │ ├── constantvar │ │ │ │ └── _index.md │ │ │ ├── drivertest │ │ │ │ └── _index.md │ │ │ ├── awsparamstore │ │ │ │ └── _index.md │ │ │ ├── gcpruntimeconfig │ │ │ │ └── _index.md │ │ │ ├── gcpsecretmanager │ │ │ │ └── _index.md │ │ │ └── awssecretsmanager │ │ │ │ └── _index.md │ │ ├── azure │ │ │ ├── azuredb │ │ │ │ └── _index.md │ │ │ └── azurecloud │ │ │ │ └── _index.md │ │ ├── samples │ │ │ ├── order │ │ │ │ └── _index.md │ │ │ ├── server │ │ │ │ └── _index.md │ │ │ ├── appengine │ │ │ │ └── _index.md │ │ │ ├── guestbook │ │ │ │ ├── _index.md │ │ │ │ ├── localdb │ │ │ │ │ └── _index.md │ │ │ │ ├── gcp │ │ │ │ │ ├── deploy │ │ │ │ │ │ └── _index.md │ │ │ │ │ └── provision_db │ │ │ │ │ │ └── _index.md │ │ │ │ └── aws │ │ │ │ │ └── provision_db │ │ │ │ │ └── _index.md │ │ │ ├── tutorial │ │ │ │ └── _index.md │ │ │ ├── gocdk-blob │ │ │ │ └── _index.md │ │ │ ├── gocdk-pubsub │ │ │ │ └── _index.md │ │ │ ├── gocdk-secrets │ │ │ │ └── _index.md │ │ │ ├── gocdk-runtimevar │ │ │ │ └── _index.md │ │ │ └── gocdk-docstore │ │ │ │ └── _index.md │ │ ├── tests │ │ │ ├── aws │ │ │ │ └── app │ │ │ │ │ └── _index.md │ │ │ ├── gcp │ │ │ │ └── app │ │ │ │ │ └── _index.md │ │ │ └── internal │ │ │ │ └── testutil │ │ │ │ └── _index.md │ │ ├── concepts │ │ │ ├── structure │ │ │ │ ├── portable-type.png │ │ │ │ └── portable-type-no-driver.png │ │ │ ├── _index.md │ │ │ └── as.md │ │ ├── tutorials │ │ │ └── _index.md │ │ └── howto │ │ │ ├── _index.md │ │ │ └── pubsub │ │ │ └── _index.md │ ├── layouts │ │ ├── shortcodes │ │ │ ├── snippet.html │ │ │ └── goexample.html │ │ ├── index.html │ │ ├── howto │ │ │ ├── li.html │ │ │ └── list.html │ │ ├── _default │ │ │ ├── single.html │ │ │ ├── li.html │ │ │ ├── list.html │ │ │ └── sitemap.xml │ │ ├── partials │ │ │ ├── page-toc.html │ │ │ ├── header-link.html │ │ │ └── hook_head_end.html │ │ ├── 404.html │ │ └── pkg │ │ │ ├── list.html │ │ │ └── single.html │ ├── static │ │ ├── gh.png │ │ ├── favicon-32x32.png │ │ ├── placeholder-logo.png │ │ ├── go-cdk-logo-white.png │ │ ├── go-cdk-logo-gopherblue.png │ │ └── go-cdk-logo-gopherblue-small.png │ ├── archetypes │ │ ├── howto.md │ │ └── default.md │ ├── go.mod │ ├── config.toml │ ├── gatherexamples │ │ └── run.sh │ ├── README.md │ ├── makeimports.sh │ └── listnewpkgs.sh ├── docs │ ├── img │ │ ├── user-facing-type.png │ │ └── user-facing-type-no-driver.png │ └── README.md ├── gcerr │ └── errorcode_string.go ├── testing │ ├── deploywebsite.sh │ ├── gomodcleanup.sh │ ├── update_deps.sh │ ├── start_local_deps.sh │ ├── listdeps.sh │ ├── git_tag_modules.sh │ └── terraform │ │ └── terraform.go └── oc │ └── trace_test.go ├── docstore ├── internal │ └── fields │ │ └── README.md ├── gcpfirestore │ └── testdata │ │ └── TestConformance │ │ ├── Data.replay │ │ ├── Get.replay │ │ ├── Proto.replay │ │ ├── Put.replay │ │ ├── Query.replay │ │ ├── Create.replay │ │ ├── Delete.replay │ │ ├── Replace.replay │ │ ├── Update.replay │ │ ├── BeforeDo.replay │ │ ├── GetQuery.replay │ │ ├── As │ │ ├── verify_As.replay │ │ └── verify_As_returns_false_when_passed_nil.replay │ │ ├── BeforeQuery.replay │ │ ├── ExampleInDoc.replay │ │ ├── MultipleActions.replay │ │ ├── GetQueryKeyField.replay │ │ ├── SerializeRevision.replay │ │ ├── ActionsOnStructNoRev.replay │ │ └── ActionsWithCompositeID.replay ├── mongodocstore │ ├── testdata │ │ └── README │ ├── awsdocdb │ │ ├── outputs.tf │ │ └── variables.tf │ ├── go.mod │ └── localmongo.sh ├── driver │ └── actionkind_string.go ├── drivertest │ └── util.go └── oc_test.go ├── .vscode ├── settings.json └── tasks.json ├── pubsub ├── azuresb │ └── testdata │ │ └── README ├── gcppubsub │ └── testdata │ │ └── TestConformance │ │ ├── TestNack.replay │ │ ├── TestBatching.replay │ │ ├── TestMetadata.replay │ │ ├── TestAs │ │ ├── gcp_test.replay │ │ └── verify_As_returns_false_when_passed_nil.replay │ │ ├── TestDoubleAck.replay │ │ ├── TestSendReceive.replay │ │ ├── TestSendReceiveJSON.replay │ │ ├── TestSendReceiveTwo.replay │ │ ├── TestCancelSendReceive.replay │ │ ├── TestNonUTF8MessageBody.replay │ │ ├── TestErrorOnSendToClosedTopic.replay │ │ ├── TestErrorOnReceiveFromClosedSubscription.replay │ │ ├── TestNonExistentTopicSucceedsOnOpenButFailsOnSend.replay │ │ └── TestNonExistentSubscriptionSucceedsOnOpenButFailsOnReceive.replay ├── rabbitpubsub │ ├── go.mod │ └── localrabbit.sh ├── natspubsub │ └── go.mod ├── kafkapubsub │ ├── go.mod │ └── localkafka.sh └── awssnssqs │ └── testdata │ ├── TestConformanceSQSTopic │ └── TestSendReceiveTwo.replay │ └── TestConformanceSQSTopicV2 │ └── TestSendReceiveTwo.replay ├── secrets ├── gcpkms │ └── testdata │ │ └── TestConformance │ │ ├── TestMultipleKeys.replay │ │ ├── TestEncryptDecrypt.replay │ │ ├── TestAs │ │ ├── verify_As_function.replay │ │ └── verify_As_returns_false_when_passed_nil.replay │ │ ├── TestDecryptMalformedError.replay │ │ └── TestMultipleEncryptionsNotEqual.replay └── hashivault │ ├── localvault.sh │ └── go.mod ├── runtimevar ├── gcpruntimeconfig │ └── testdata │ │ └── TestConformance │ │ ├── TestJSON.replay │ │ ├── TestDelete.replay │ │ ├── TestString.replay │ │ ├── TestUpdate.replay │ │ ├── TestAs │ │ ├── verify_As.replay │ │ └── verify_As_returns_false_when_passed_nil.replay │ │ ├── TestInvalidJSON.replay │ │ ├── TestUpdateWithErrors.replay │ │ └── TestNonExistentVariable.replay ├── gcpsecretmanager │ └── testdata │ │ └── TestConformance │ │ ├── TestJSON.replay │ │ ├── TestDelete.replay │ │ ├── TestString.replay │ │ ├── TestUpdate.replay │ │ ├── TestAs │ │ ├── verify_As.replay │ │ └── verify_As_returns_false_when_passed_nil.replay │ │ ├── TestInvalidJSON.replay │ │ ├── TestUpdateWithErrors.replay │ │ └── TestNonExistentVariable.replay ├── etcdvar │ ├── go.mod │ └── localetcd.sh └── oc_test.go ├── .gitattributes ├── .codecov.yml ├── wire └── README.md ├── CODE_OF_CONDUCT.md ├── .github ├── pull_request_template.md ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ └── tests.yml ├── blob ├── gcsblob │ └── testdata │ │ ├── TestOpenBucket │ │ ├── success.replay │ │ └── empty_bucket_name_results_in_error.replay │ │ └── TestConformance │ │ ├── TestKeys │ │ └── non-UTF8_fails.replay │ │ ├── TestMetadata │ │ ├── empty_key_fails.replay │ │ ├── non-utf8_metadata_key.replay │ │ ├── non-utf8_metadata_value.replay │ │ └── duplicate_case-insensitive_key_fails.replay │ │ └── TestRead │ │ └── negative_offset_fails.replay ├── s3blob │ └── testdata │ │ ├── TestOpenBucket │ │ ├── success.replay │ │ ├── empty_bucket_name_results_in_error.replay │ │ ├── success_V2.replay │ │ └── empty_bucket_name_results_in_error_V2.replay │ │ ├── TestConformance │ │ ├── TestKeys │ │ │ └── non-UTF8_fails.replay │ │ ├── TestMetadata │ │ │ ├── empty_key_fails.replay │ │ │ ├── non-utf8_metadata_key.replay │ │ │ ├── non-utf8_metadata_value.replay │ │ │ └── duplicate_case-insensitive_key_fails.replay │ │ ├── TestRead │ │ │ └── negative_offset_fails.replay │ │ └── TestWrite │ │ │ └── write_to_empty_key_fails.replay │ │ ├── TestConformanceUsingLegacyList │ │ ├── TestKeys │ │ │ └── non-UTF8_fails.replay │ │ ├── TestMetadata │ │ │ ├── empty_key_fails.replay │ │ │ ├── non-utf8_metadata_key.replay │ │ │ ├── non-utf8_metadata_value.replay │ │ │ └── duplicate_case-insensitive_key_fails.replay │ │ ├── TestRead │ │ │ └── negative_offset_fails.replay │ │ └── TestWrite │ │ │ └── write_to_empty_key_fails.replay │ │ ├── TestConformanceV2 │ │ ├── TestKeys │ │ │ └── non-UTF8_fails.replay │ │ ├── TestMetadata │ │ │ ├── empty_key_fails.replay │ │ │ ├── non-utf8_metadata_key.replay │ │ │ ├── non-utf8_metadata_value.replay │ │ │ └── duplicate_case-insensitive_key_fails.replay │ │ ├── TestRead │ │ │ └── negative_offset_fails.replay │ │ └── TestWrite │ │ │ └── write_to_empty_key_fails.replay │ │ └── TestConformanceUsingLegacyListV2 │ │ ├── TestKeys │ │ └── non-UTF8_fails.replay │ │ ├── TestMetadata │ │ ├── empty_key_fails.replay │ │ ├── non-utf8_metadata_key.replay │ │ ├── non-utf8_metadata_value.replay │ │ └── duplicate_case-insensitive_key_fails.replay │ │ ├── TestRead │ │ └── negative_offset_fails.replay │ │ └── TestWrite │ │ └── write_to_empty_key_fails.replay ├── azureblob │ └── testdata │ │ └── TestConformance │ │ ├── TestKeys │ │ └── non-UTF8_fails.replay │ │ ├── TestMetadata │ │ ├── empty_key_fails.replay │ │ ├── non-utf8_metadata_key.replay │ │ ├── non-utf8_metadata_value.replay │ │ └── duplicate_case-insensitive_key_fails.replay │ │ └── TestRead │ │ └── negative_offset_fails.replay ├── blob_reader_test.go └── wrapped_bucket_test.go ├── allmodules ├── AUTHORS ├── azure └── azurecloud │ └── azurecloud.go ├── mysql ├── example_test.go ├── gcpmysql │ └── example_test.go ├── azuremysql │ └── example_test.go └── awsmysql │ └── example_test.go ├── postgres ├── example_test.go ├── gcppostgres │ └── example_test.go └── awspostgres │ └── example_test.go └── gcerrors └── errors_test.go /samples/appengine/app.yaml: -------------------------------------------------------------------------------- 1 | runtime: go111 2 | -------------------------------------------------------------------------------- /samples/order/testdata/bad-image: -------------------------------------------------------------------------------- 1 | This is not an image. 2 | -------------------------------------------------------------------------------- /samples/guestbook/blobs/motd.txt: -------------------------------------------------------------------------------- 1 | Message of the Day Is: Hello World! 2 | -------------------------------------------------------------------------------- /internal/website/content/aws/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/aws 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/gcp/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/gcp 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /docstore/internal/fields/README.md: -------------------------------------------------------------------------------- 1 | This package is copied from cloud.google.com/go/internal/fields. 2 | -------------------------------------------------------------------------------- /internal/website/content/aws/rds/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/aws/rds 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/blob/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/blob 3 | type: pkg 4 | --- 5 | 6 | -------------------------------------------------------------------------------- /internal/website/content/health/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/health 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/mysql/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/mysql 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/pubsub/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/pubsub 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/secrets/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/secrets 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/server/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/server 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/docstore/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/docstore 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/gcerrors/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/gcerrors 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/postgres/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/postgres 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/aws/awscloud/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/aws/awscloud 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/blob/driver/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/blob/driver 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/blob/gcsblob/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/blob/gcsblob 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/blob/memblob/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/blob/memblob 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/blob/s3blob/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/blob/s3blob 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/gcp/cloudsql/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/gcp/cloudsql 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/gcp/gcpcloud/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/gcp/gcpcloud 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/internal/oc/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/internal/oc 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/requestlog/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/requestlog 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/runtimevar/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/runtimevar 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /samples/order/testdata/cat1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/samples/order/testdata/cat1 -------------------------------------------------------------------------------- /samples/tutorial/gopher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/samples/tutorial/gopher.png -------------------------------------------------------------------------------- /internal/website/content/azure/azuredb/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/azure/azuredb 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/blob/azureblob/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/blob/azureblob 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/blob/fileblob/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/blob/fileblob 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/internal/gcerr/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/internal/gcerr 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/internal/retry/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/internal/retry 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/internal/trace/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/internal/trace 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/mysql/awsmysql/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/mysql/awsmysql 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/mysql/gcpmysql/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/mysql/gcpmysql 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/mysql/rdsmysql/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/mysql/rdsmysql 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/pubsub/azuresb/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/pubsub/azuresb 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/pubsub/driver/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/pubsub/driver 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/samples/order/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/samples/order 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/samples/server/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/samples/server 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/secrets/awskms/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/secrets/awskms 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/secrets/driver/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/secrets/driver 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/secrets/gcpkms/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/secrets/gcpkms 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/secrets/vault/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/secrets/vault 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/server/driver/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/server/driver 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/server/health/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/server/health 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/tests/aws/app/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/tests/aws/app 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/tests/gcp/app/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/tests/gcp/app 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/layouts/shortcodes/snippet.html: -------------------------------------------------------------------------------- 1 | {{ readFile (.Get 0 | printf "/snippets/%s") | markdownify -}} 2 | -------------------------------------------------------------------------------- /internal/website/static/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/internal/website/static/gh.png -------------------------------------------------------------------------------- /samples/guestbook/blobs/aws.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/samples/guestbook/blobs/aws.png -------------------------------------------------------------------------------- /samples/guestbook/blobs/gcp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/samples/guestbook/blobs/gcp.png -------------------------------------------------------------------------------- /samples/guestbook/gcp/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM gcr.io/distroless/base 2 | COPY guestbook / 3 | ENTRYPOINT ["/guestbook"] 4 | -------------------------------------------------------------------------------- /internal/website/content/azure/azurecloud/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/azure/azurecloud 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/blob/drivertest/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/blob/drivertest 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/docstore/driver/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/docstore/driver 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/health/sqlhealth/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/health/sqlhealth 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/internal/batcher/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/internal/batcher 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/internal/escape/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/internal/escape 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/internal/openurl/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/internal/openurl 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/internal/testing/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/internal/testing 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/mysql/azuremysql/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/mysql/azuremysql 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/mysql/cloudmysql/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/mysql/cloudmysql 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/pubsub/awssnssqs/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/pubsub/awssnssqs 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/pubsub/batcher/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/internal/batcher 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/pubsub/drivertest/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/pubsub/drivertest 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/pubsub/gcppubsub/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/pubsub/gcppubsub 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/pubsub/mempubsub/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/pubsub/mempubsub 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/pubsub/natspubsub/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/pubsub/natspubsub 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/runtimevar/driver/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/runtimevar/driver 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/samples/appengine/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/samples/appengine 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/samples/guestbook/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/samples/guestbook 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/samples/tutorial/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/samples/tutorial 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/server/requestlog/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/server/requestlog 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/server/sdserver/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/server/sdserver 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/server/xrayserver/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/server/xrayserver 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/layouts/index.html: -------------------------------------------------------------------------------- 1 | {{ define "main" -}} 2 | {{ partial "header-link.html" .Content }} 3 | {{- end }} 4 | -------------------------------------------------------------------------------- /samples/guestbook/blobs/azure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/samples/guestbook/blobs/azure.png -------------------------------------------------------------------------------- /internal/website/content/docstore/drivertest/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/docstore/drivertest 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/internal/useragent/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/internal/useragent 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/pubsub/azurepubsub/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/pubsub/azurepubsub 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/pubsub/kafkapubsub/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/pubsub/kafkapubsub 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/pubsub/rabbitpubsub/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/pubsub/rabbitpubsub 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/runtimevar/blobvar/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/runtimevar/blobvar 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/runtimevar/etcdvar/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/runtimevar/etcdvar 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/runtimevar/filevar/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/runtimevar/filevar 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/runtimevar/httpvar/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/runtimevar/httpvar 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/samples/gocdk-blob/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/samples/gocdk-blob 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/secrets/drivertest/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/secrets/drivertest 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/secrets/hashivault/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/secrets/hashivault 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /samples/guestbook/blobs/gophers.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/samples/guestbook/blobs/gophers.jpg -------------------------------------------------------------------------------- /internal/docs/img/user-facing-type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/internal/docs/img/user-facing-type.png -------------------------------------------------------------------------------- /internal/website/content/docstore/awsdynamodb/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/docstore/awsdynamodb 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/docstore/firedocstore/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/docstore/firedocstore 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/docstore/gcpfirestore/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/docstore/gcpfirestore 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/docstore/memdocstore/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/docstore/memdocstore 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/docstore/mongodocstore/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/docstore/mongodocstore 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/internal/releasehelper/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/internal/releasehelper 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/internal/testing/setup/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/internal/testing/setup 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/postgres/awspostgres/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/postgres/awspostgres 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/postgres/cloudpostgres/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/postgres/cloudpostgres 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/postgres/gcppostgres/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/postgres/gcppostgres 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/postgres/rdspostgres/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/postgres/rdspostgres 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/runtimevar/constantvar/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/runtimevar/constantvar 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/runtimevar/drivertest/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/runtimevar/drivertest 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/samples/gocdk-pubsub/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/samples/gocdk-pubsub 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/samples/gocdk-secrets/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/samples/gocdk-secrets 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/secrets/azurekeyvault/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/secrets/azurekeyvault 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/secrets/localsecrets/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/secrets/localsecrets 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/docstore/dynamodocstore/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/docstore/dynamodocstore 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/docstore/internal/fields/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/docstore/internal/fields 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/internal/testing/cmdtest/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/internal/testing/cmdtest 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/internal/testing/octest/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/internal/testing/octest 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/runtimevar/awsparamstore/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/runtimevar/awsparamstore 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/runtimevar/filevar/_demo/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/runtimevar/filevar/_demo 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/samples/gocdk-runtimevar/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/samples/gocdk-runtimevar 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/server/health/sqlhealth/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/server/health/sqlhealth 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/tests/internal/testutil/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/tests/internal/testutil 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/layouts/howto/li.html: -------------------------------------------------------------------------------- 1 |
  • 2 | {{ .LinkTitle }} 3 |
  • 4 | -------------------------------------------------------------------------------- /internal/website/static/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/internal/website/static/favicon-32x32.png -------------------------------------------------------------------------------- /samples/guestbook/gcp/.gcloudignore: -------------------------------------------------------------------------------- 1 | *.tf 2 | *.tfstate 3 | *.tfstate.backup 4 | .terraform/ 5 | terraform.tfvars 6 | *.pem 7 | *.json 8 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "search.exclude": { 3 | "**/*.replay": true, 4 | "**/testdata/**/*.yaml": true 5 | } 6 | } -------------------------------------------------------------------------------- /internal/website/content/internal/testing/terraform/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/internal/testing/terraform 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/runtimevar/gcpruntimeconfig/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/runtimevar/gcpruntimeconfig 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/runtimevar/gcpsecretmanager/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/runtimevar/gcpsecretmanager 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/samples/guestbook/localdb/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/samples/guestbook/localdb 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/static/placeholder-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/internal/website/static/placeholder-logo.png -------------------------------------------------------------------------------- /internal/website/content/internal/testing/test-summary/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/internal/testing/test-summary 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/runtimevar/awssecretsmanager/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/runtimevar/awssecretsmanager 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/samples/guestbook/gcp/deploy/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/samples/guestbook/gcp/deploy 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/static/go-cdk-logo-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/internal/website/static/go-cdk-logo-white.png -------------------------------------------------------------------------------- /internal/docs/img/user-facing-type-no-driver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/internal/docs/img/user-facing-type-no-driver.png -------------------------------------------------------------------------------- /internal/website/content/internal/website/gatherexamples/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/internal/website/gatherexamples 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/samples/guestbook/aws/provision_db/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/samples/guestbook/aws/provision_db 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/content/samples/guestbook/gcp/provision_db/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: gocloud.dev/samples/guestbook/gcp/provision_db 3 | type: pkg 4 | --- 5 | -------------------------------------------------------------------------------- /internal/website/static/go-cdk-logo-gopherblue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/internal/website/static/go-cdk-logo-gopherblue.png -------------------------------------------------------------------------------- /internal/website/static/go-cdk-logo-gopherblue-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/internal/website/static/go-cdk-logo-gopherblue-small.png -------------------------------------------------------------------------------- /docstore/gcpfirestore/testdata/TestConformance/Data.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/docstore/gcpfirestore/testdata/TestConformance/Data.replay -------------------------------------------------------------------------------- /docstore/gcpfirestore/testdata/TestConformance/Get.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/docstore/gcpfirestore/testdata/TestConformance/Get.replay -------------------------------------------------------------------------------- /docstore/gcpfirestore/testdata/TestConformance/Proto.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/docstore/gcpfirestore/testdata/TestConformance/Proto.replay -------------------------------------------------------------------------------- /docstore/gcpfirestore/testdata/TestConformance/Put.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/docstore/gcpfirestore/testdata/TestConformance/Put.replay -------------------------------------------------------------------------------- /docstore/gcpfirestore/testdata/TestConformance/Query.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/docstore/gcpfirestore/testdata/TestConformance/Query.replay -------------------------------------------------------------------------------- /pubsub/azuresb/testdata/README: -------------------------------------------------------------------------------- 1 | This directory is here just so that the prerelease script (internal/testing/prerelease.sh) 2 | will run this package's tests with -record. 3 | -------------------------------------------------------------------------------- /pubsub/gcppubsub/testdata/TestConformance/TestNack.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/pubsub/gcppubsub/testdata/TestConformance/TestNack.replay -------------------------------------------------------------------------------- /samples/wire/README.md: -------------------------------------------------------------------------------- 1 | # Wire Tutorial has moved 2 | 3 | The Wire Tutorial has moved to [the Wire repository](https://github.com/google/wire/tree/master/_tutorial). 4 | -------------------------------------------------------------------------------- /docstore/gcpfirestore/testdata/TestConformance/Create.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/docstore/gcpfirestore/testdata/TestConformance/Create.replay -------------------------------------------------------------------------------- /docstore/gcpfirestore/testdata/TestConformance/Delete.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/docstore/gcpfirestore/testdata/TestConformance/Delete.replay -------------------------------------------------------------------------------- /docstore/gcpfirestore/testdata/TestConformance/Replace.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/docstore/gcpfirestore/testdata/TestConformance/Replace.replay -------------------------------------------------------------------------------- /docstore/gcpfirestore/testdata/TestConformance/Update.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/docstore/gcpfirestore/testdata/TestConformance/Update.replay -------------------------------------------------------------------------------- /internal/website/content/concepts/structure/portable-type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/internal/website/content/concepts/structure/portable-type.png -------------------------------------------------------------------------------- /pubsub/gcppubsub/testdata/TestConformance/TestBatching.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/pubsub/gcppubsub/testdata/TestConformance/TestBatching.replay -------------------------------------------------------------------------------- /pubsub/gcppubsub/testdata/TestConformance/TestMetadata.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/pubsub/gcppubsub/testdata/TestConformance/TestMetadata.replay -------------------------------------------------------------------------------- /docstore/gcpfirestore/testdata/TestConformance/BeforeDo.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/docstore/gcpfirestore/testdata/TestConformance/BeforeDo.replay -------------------------------------------------------------------------------- /docstore/gcpfirestore/testdata/TestConformance/GetQuery.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/docstore/gcpfirestore/testdata/TestConformance/GetQuery.replay -------------------------------------------------------------------------------- /docstore/mongodocstore/testdata/README: -------------------------------------------------------------------------------- 1 | This directory is here just so that the prerelease script (internal/testing/prerelease.sh) 2 | will run this package's tests with -record. 3 | -------------------------------------------------------------------------------- /pubsub/gcppubsub/testdata/TestConformance/TestAs/gcp_test.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/pubsub/gcppubsub/testdata/TestConformance/TestAs/gcp_test.replay -------------------------------------------------------------------------------- /pubsub/gcppubsub/testdata/TestConformance/TestDoubleAck.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/pubsub/gcppubsub/testdata/TestConformance/TestDoubleAck.replay -------------------------------------------------------------------------------- /pubsub/gcppubsub/testdata/TestConformance/TestSendReceive.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/pubsub/gcppubsub/testdata/TestConformance/TestSendReceive.replay -------------------------------------------------------------------------------- /secrets/gcpkms/testdata/TestConformance/TestMultipleKeys.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/secrets/gcpkms/testdata/TestConformance/TestMultipleKeys.replay -------------------------------------------------------------------------------- /docstore/gcpfirestore/testdata/TestConformance/As/verify_As.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/docstore/gcpfirestore/testdata/TestConformance/As/verify_As.replay -------------------------------------------------------------------------------- /docstore/gcpfirestore/testdata/TestConformance/BeforeQuery.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/docstore/gcpfirestore/testdata/TestConformance/BeforeQuery.replay -------------------------------------------------------------------------------- /docstore/gcpfirestore/testdata/TestConformance/ExampleInDoc.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/docstore/gcpfirestore/testdata/TestConformance/ExampleInDoc.replay -------------------------------------------------------------------------------- /internal/website/content/tutorials/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Tutorials" 3 | date: 2019-03-19T18:45:15-07:00 4 | showInSidenav: true 5 | pagesInSidenav: true 6 | weight: 1 7 | --- 8 | 9 | -------------------------------------------------------------------------------- /secrets/gcpkms/testdata/TestConformance/TestEncryptDecrypt.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/secrets/gcpkms/testdata/TestConformance/TestEncryptDecrypt.replay -------------------------------------------------------------------------------- /docstore/gcpfirestore/testdata/TestConformance/MultipleActions.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/docstore/gcpfirestore/testdata/TestConformance/MultipleActions.replay -------------------------------------------------------------------------------- /internal/website/layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" -}} 2 |

    {{ .Title }}

    3 | {{ partial "page-toc.html" . }} 4 | {{ partial "header-link.html" .Content }} 5 | {{- end }} 6 | -------------------------------------------------------------------------------- /pubsub/gcppubsub/testdata/TestConformance/TestSendReceiveJSON.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/pubsub/gcppubsub/testdata/TestConformance/TestSendReceiveJSON.replay -------------------------------------------------------------------------------- /pubsub/gcppubsub/testdata/TestConformance/TestSendReceiveTwo.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/pubsub/gcppubsub/testdata/TestConformance/TestSendReceiveTwo.replay -------------------------------------------------------------------------------- /runtimevar/gcpruntimeconfig/testdata/TestConformance/TestJSON.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/runtimevar/gcpruntimeconfig/testdata/TestConformance/TestJSON.replay -------------------------------------------------------------------------------- /runtimevar/gcpsecretmanager/testdata/TestConformance/TestJSON.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/runtimevar/gcpsecretmanager/testdata/TestConformance/TestJSON.replay -------------------------------------------------------------------------------- /docstore/gcpfirestore/testdata/TestConformance/GetQueryKeyField.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/docstore/gcpfirestore/testdata/TestConformance/GetQueryKeyField.replay -------------------------------------------------------------------------------- /docstore/gcpfirestore/testdata/TestConformance/SerializeRevision.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/docstore/gcpfirestore/testdata/TestConformance/SerializeRevision.replay -------------------------------------------------------------------------------- /internal/website/content/concepts/structure/portable-type-no-driver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/internal/website/content/concepts/structure/portable-type-no-driver.png -------------------------------------------------------------------------------- /pubsub/gcppubsub/testdata/TestConformance/TestCancelSendReceive.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/pubsub/gcppubsub/testdata/TestConformance/TestCancelSendReceive.replay -------------------------------------------------------------------------------- /pubsub/gcppubsub/testdata/TestConformance/TestNonUTF8MessageBody.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/pubsub/gcppubsub/testdata/TestConformance/TestNonUTF8MessageBody.replay -------------------------------------------------------------------------------- /runtimevar/gcpruntimeconfig/testdata/TestConformance/TestDelete.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/runtimevar/gcpruntimeconfig/testdata/TestConformance/TestDelete.replay -------------------------------------------------------------------------------- /runtimevar/gcpruntimeconfig/testdata/TestConformance/TestString.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/runtimevar/gcpruntimeconfig/testdata/TestConformance/TestString.replay -------------------------------------------------------------------------------- /runtimevar/gcpruntimeconfig/testdata/TestConformance/TestUpdate.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/runtimevar/gcpruntimeconfig/testdata/TestConformance/TestUpdate.replay -------------------------------------------------------------------------------- /runtimevar/gcpsecretmanager/testdata/TestConformance/TestDelete.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/runtimevar/gcpsecretmanager/testdata/TestConformance/TestDelete.replay -------------------------------------------------------------------------------- /runtimevar/gcpsecretmanager/testdata/TestConformance/TestString.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/runtimevar/gcpsecretmanager/testdata/TestConformance/TestString.replay -------------------------------------------------------------------------------- /runtimevar/gcpsecretmanager/testdata/TestConformance/TestUpdate.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/runtimevar/gcpsecretmanager/testdata/TestConformance/TestUpdate.replay -------------------------------------------------------------------------------- /docstore/gcpfirestore/testdata/TestConformance/ActionsOnStructNoRev.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/docstore/gcpfirestore/testdata/TestConformance/ActionsOnStructNoRev.replay -------------------------------------------------------------------------------- /docstore/mongodocstore/awsdocdb/outputs.tf: -------------------------------------------------------------------------------- 1 | output "setup_ssh_tunnel" { 2 | value = "ssh -L 27019:${aws_docdb_cluster.docdbtest.endpoint}:27017 ubuntu@${aws_instance.docdbtest.public_dns} -N" 3 | } 4 | -------------------------------------------------------------------------------- /secrets/gcpkms/testdata/TestConformance/TestAs/verify_As_function.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/secrets/gcpkms/testdata/TestConformance/TestAs/verify_As_function.replay -------------------------------------------------------------------------------- /secrets/gcpkms/testdata/TestConformance/TestDecryptMalformedError.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/secrets/gcpkms/testdata/TestConformance/TestDecryptMalformedError.replay -------------------------------------------------------------------------------- /docstore/gcpfirestore/testdata/TestConformance/ActionsWithCompositeID.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/docstore/gcpfirestore/testdata/TestConformance/ActionsWithCompositeID.replay -------------------------------------------------------------------------------- /runtimevar/gcpruntimeconfig/testdata/TestConformance/TestAs/verify_As.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/runtimevar/gcpruntimeconfig/testdata/TestConformance/TestAs/verify_As.replay -------------------------------------------------------------------------------- /runtimevar/gcpruntimeconfig/testdata/TestConformance/TestInvalidJSON.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/runtimevar/gcpruntimeconfig/testdata/TestConformance/TestInvalidJSON.replay -------------------------------------------------------------------------------- /runtimevar/gcpsecretmanager/testdata/TestConformance/TestAs/verify_As.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/runtimevar/gcpsecretmanager/testdata/TestConformance/TestAs/verify_As.replay -------------------------------------------------------------------------------- /runtimevar/gcpsecretmanager/testdata/TestConformance/TestInvalidJSON.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/runtimevar/gcpsecretmanager/testdata/TestConformance/TestInvalidJSON.replay -------------------------------------------------------------------------------- /pubsub/gcppubsub/testdata/TestConformance/TestErrorOnSendToClosedTopic.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/pubsub/gcppubsub/testdata/TestConformance/TestErrorOnSendToClosedTopic.replay -------------------------------------------------------------------------------- /secrets/gcpkms/testdata/TestConformance/TestMultipleEncryptionsNotEqual.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/secrets/gcpkms/testdata/TestConformance/TestMultipleEncryptionsNotEqual.replay -------------------------------------------------------------------------------- /internal/website/archetypes/howto.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | date: {{ .Date }} 4 | draft: true 5 | showInSidenav: false # only for sections (any level) 6 | weight: 0 7 | --- 8 | 9 | -------------------------------------------------------------------------------- /internal/website/layouts/partials/page-toc.html: -------------------------------------------------------------------------------- 1 | {{if .Page.Params.toc}} 2 | 6 | {{end -}} 7 | -------------------------------------------------------------------------------- /runtimevar/gcpruntimeconfig/testdata/TestConformance/TestUpdateWithErrors.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/runtimevar/gcpruntimeconfig/testdata/TestConformance/TestUpdateWithErrors.replay -------------------------------------------------------------------------------- /runtimevar/gcpsecretmanager/testdata/TestConformance/TestUpdateWithErrors.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/runtimevar/gcpsecretmanager/testdata/TestConformance/TestUpdateWithErrors.replay -------------------------------------------------------------------------------- /runtimevar/gcpruntimeconfig/testdata/TestConformance/TestNonExistentVariable.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/runtimevar/gcpruntimeconfig/testdata/TestConformance/TestNonExistentVariable.replay -------------------------------------------------------------------------------- /runtimevar/gcpsecretmanager/testdata/TestConformance/TestNonExistentVariable.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/runtimevar/gcpsecretmanager/testdata/TestConformance/TestNonExistentVariable.replay -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text eol=lf 2 | /internal/website/data/examples.json linguist-generated=true 3 | **/testdata/**/*.yaml linguist-generated=true 4 | **/testdata/**/*.replay linguist-generated=true 5 | *.replay binary 6 | 7 | -------------------------------------------------------------------------------- /pubsub/gcppubsub/testdata/TestConformance/TestErrorOnReceiveFromClosedSubscription.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/pubsub/gcppubsub/testdata/TestConformance/TestErrorOnReceiveFromClosedSubscription.replay -------------------------------------------------------------------------------- /internal/docs/README.md: -------------------------------------------------------------------------------- 1 | # Docs 2 | 3 | This is the documentation for developers of the Go CDK, describing various 4 | coding practices and project processes. 5 | 6 | - [Design Decisions](design.md) 7 | - [Releases](release.md) 8 | -------------------------------------------------------------------------------- /secrets/gcpkms/testdata/TestConformance/TestAs/verify_As_returns_false_when_passed_nil.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/secrets/gcpkms/testdata/TestConformance/TestAs/verify_As_returns_false_when_passed_nil.replay -------------------------------------------------------------------------------- /docstore/gcpfirestore/testdata/TestConformance/As/verify_As_returns_false_when_passed_nil.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/docstore/gcpfirestore/testdata/TestConformance/As/verify_As_returns_false_when_passed_nil.replay -------------------------------------------------------------------------------- /pubsub/gcppubsub/testdata/TestConformance/TestAs/verify_As_returns_false_when_passed_nil.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/pubsub/gcppubsub/testdata/TestConformance/TestAs/verify_As_returns_false_when_passed_nil.replay -------------------------------------------------------------------------------- /pubsub/gcppubsub/testdata/TestConformance/TestNonExistentTopicSucceedsOnOpenButFailsOnSend.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/pubsub/gcppubsub/testdata/TestConformance/TestNonExistentTopicSucceedsOnOpenButFailsOnSend.replay -------------------------------------------------------------------------------- /samples/tutorial/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started With The Go Cloud Development Kit 2 | 3 | This is the source directory for the [command-line uploader tutorial][]. 4 | 5 | [command-line uploader tutorial]: https://gocloud.dev/tutorials/cli-uploader/ 6 | -------------------------------------------------------------------------------- /internal/website/go.mod: -------------------------------------------------------------------------------- 1 | module gocloud.dev/internal/website 2 | 3 | go 1.12 4 | 5 | require ( 6 | github.com/google/go-cmp v0.5.6 7 | golang.org/x/tools v0.6.0 8 | golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect 9 | ) 10 | -------------------------------------------------------------------------------- /runtimevar/gcpruntimeconfig/testdata/TestConformance/TestAs/verify_As_returns_false_when_passed_nil.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/runtimevar/gcpruntimeconfig/testdata/TestConformance/TestAs/verify_As_returns_false_when_passed_nil.replay -------------------------------------------------------------------------------- /runtimevar/gcpsecretmanager/testdata/TestConformance/TestAs/verify_As_returns_false_when_passed_nil.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/runtimevar/gcpsecretmanager/testdata/TestConformance/TestAs/verify_As_returns_false_when_passed_nil.replay -------------------------------------------------------------------------------- /.codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | project: 4 | default: 5 | target: 0 6 | threshold: null 7 | base: auto 8 | patch: 9 | default: 10 | target: 0 11 | threshold: null 12 | base: auto 13 | -------------------------------------------------------------------------------- /internal/website/content/samples/gocdk-docstore/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Gocdk Docstore" 3 | date: 2019-06-11T14:33:50-07:00 4 | showInSidenav: false # only for sections (any level) 5 | pagesInSidenav: false # only for top-level sections 6 | weight: 0 7 | --- 8 | 9 | -------------------------------------------------------------------------------- /pubsub/gcppubsub/testdata/TestConformance/TestNonExistentSubscriptionSucceedsOnOpenButFailsOnReceive.replay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multiply/go-cloud/master/pubsub/gcppubsub/testdata/TestConformance/TestNonExistentSubscriptionSucceedsOnOpenButFailsOnReceive.replay -------------------------------------------------------------------------------- /internal/website/content/concepts/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Concepts" 3 | date: 2019-05-06T09:52:00-07:00 4 | showInSidenav: true 5 | pagesInSidenav: true 6 | weight: 4 7 | --- 8 | 9 | The documents in this section describe higher level concepts in the Go CDK. 10 | -------------------------------------------------------------------------------- /internal/website/archetypes/default.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | date: {{ .Date }} 4 | draft: true 5 | showInSidenav: false # only for sections (any level) 6 | pagesInSidenav: false # only for top-level sections 7 | weight: 0 8 | --- 9 | 10 | -------------------------------------------------------------------------------- /wire/README.md: -------------------------------------------------------------------------------- 1 | # Wire has moved! 2 | 3 | Wire has moved to its own repository: [github.com/google/wire](https://github.com/google/wire) 4 | 5 | Read the [announcement][] for more details. 6 | 7 | [announcement]: https://groups.google.com/d/msg/go-cloud/4HuWfjDAkOY/Y2tUQdB_BQAJ 8 | -------------------------------------------------------------------------------- /internal/website/layouts/404.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |

    404: Page not found

    3 |

    4 | Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. 5 | Head back home to try finding it again. 6 |

    7 | {{ end }} 8 | -------------------------------------------------------------------------------- /internal/website/layouts/partials/header-link.html: -------------------------------------------------------------------------------- 1 | {{- /* https://zwbetz.com/create-header-links-hugo-vs-javascript/ */ -}} 2 | {{ . | replaceRE "()(.+)()" `${1} ${3}🔗${4}` | safeHTML -}} 3 | -------------------------------------------------------------------------------- /internal/website/content/howto/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "How-To Guides" 3 | date: 2019-03-20T14:50:56-07:00 4 | showInSidenav: true 5 | pagesInSidenav: true 6 | weight: 2 7 | --- 8 | 9 | The guides in this section are aimed to help you solve common tasks with 10 | the Go CDK. They are grouped by API. 11 | -------------------------------------------------------------------------------- /internal/website/layouts/_default/li.html: -------------------------------------------------------------------------------- 1 |
    2 |

    {{ .LinkTitle }}

    3 |
    {{.Summary}}
    4 | 5 |
    6 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | This project is covered under the [Go Code of Conduct][]. In summary: 4 | 5 | - Treat everyone with respect and kindness. 6 | - Be thoughtful in how you communicate. 7 | - Don’t be destructive or inflammatory. 8 | - If you encounter an issue, please mail conduct@golang.org. 9 | 10 | [Go Code of Conduct]: https://golang.org/conduct 11 | -------------------------------------------------------------------------------- /internal/website/layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" -}} 2 |

    {{ .Title }}

    3 | {{ partial "page-toc.html" . }} 4 | {{ partial "header-link.html" .Content }} 5 | {{ with .Data.Pages.GroupBy "Weight" }} 6 |
    7 | {{- range .}} 8 | {{- range .Pages.ByTitle}} 9 | {{.Render "li"}} 10 | {{- end }} 11 | {{- end }} 12 |
    13 | {{end}} 14 | {{- end }} 15 | -------------------------------------------------------------------------------- /internal/website/layouts/partials/hook_head_end.html: -------------------------------------------------------------------------------- 1 | {{if .Page.Params.pkgmeta}} 2 | 3 | 4 | {{end}} 5 | -------------------------------------------------------------------------------- /internal/website/layouts/howto/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" -}} 2 |

    {{ .Title }}

    3 | {{ partial "page-toc.html" . }} 4 | {{ partial "header-link.html" .Content }} 5 | {{ if or .Data.Pages }} 6 | 13 | {{- end }} 14 | {{- end }} 15 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | Please use a title starting with the name of the affected package, or \"all\", 2 | followed by a colon, followed by a short summary of the issue. Example: 3 | `blob/gcsblob: fix typo in documentation`. 4 | 5 | Please reference any Issue related to this Pull Request. Example: `Fixes #1`. 6 | 7 | See 8 | [here](https://blog.github.com/2015-01-21-how-to-write-the-perfect-pull-request/) 9 | for tips on good Pull Request description. 10 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "Test", 8 | "type": "shell", 9 | "command": "internal/testing/runchecks.sh", 10 | "group": { 11 | "kind": "test", 12 | "isDefault": true 13 | } 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /samples/appengine/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "Test", 8 | "type": "shell", 9 | "command": "go test ./...", 10 | "group": { 11 | "kind": "test", 12 | "isDefault": true 13 | } 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /internal/website/config.toml: -------------------------------------------------------------------------------- 1 | baseURL = "https://gocloud.dev/" 2 | languageCode = "en-us" 3 | title = "Go CDK" 4 | copyright = "Copyright © 2018–2019 The Go Cloud Development Kit Authors" 5 | pygmentsUseClasses = true 6 | pygmentsCodefences = true 7 | 8 | [outputs] 9 | home = ["HTML", "RSS"] 10 | section = ["HTML"] 11 | taxonomy = ["HTML"] 12 | taxonomyTerm = ["HTML", "RSS"] 13 | 14 | [[menu.footer]] 15 | identifier = "github" 16 | name = "GitHub" 17 | url = "https://github.com/google/go-cloud/" 18 | weight = 1 19 | 20 | [[menu.footer]] 21 | identifier = "private-contact" 22 | name = "Contact Team" 23 | url = "https://github.com/google/go-cloud/issues" 24 | weight = 3 25 | -------------------------------------------------------------------------------- /internal/gcerr/errorcode_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=ErrorCode"; DO NOT EDIT. 2 | 3 | package gcerr 4 | 5 | import "strconv" 6 | 7 | const _ErrorCode_name = "OKUnknownNotFoundAlreadyExistsInvalidArgumentInternalUnimplementedFailedPreconditionPermissionDeniedResourceExhaustedCanceledDeadlineExceeded" 8 | 9 | var _ErrorCode_index = [...]uint8{0, 2, 9, 17, 30, 45, 53, 66, 84, 100, 117, 125, 141} 10 | 11 | func (i ErrorCode) String() string { 12 | if i < 0 || i >= ErrorCode(len(_ErrorCode_index)-1) { 13 | return "ErrorCode(" + strconv.FormatInt(int64(i), 10) + ")" 14 | } 15 | return _ErrorCode_name[_ErrorCode_index[i]:_ErrorCode_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /internal/website/layouts/pkg/list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Nothing to see here; see the package on godoc. 10 | 11 | 12 | -------------------------------------------------------------------------------- /internal/website/layouts/pkg/single.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Nothing to see here; see the package on godoc. 10 | 11 | 12 | -------------------------------------------------------------------------------- /docstore/mongodocstore/awsdocdb/variables.tf: -------------------------------------------------------------------------------- 1 | variable "aws_region" { 2 | description = "The AWS region to create docdb cluster and ec2 instance in." 3 | default = "us-east-2" 4 | } 5 | 6 | variable "vpc_id" { 7 | description = "The ID of the default VPC used by docdb cluster and ec2 instance." 8 | } 9 | 10 | variable "ssh_public_key" { 11 | description = "A public key line in .ssh/authorized_keys format to use to authenticate to your instance. This must be added to your SSH agent for provisioning to succeed." 12 | } 13 | 14 | variable "db_username" { 15 | description = "The master username to login docdb" 16 | } 17 | 18 | variable "db_password" { 19 | description = "The master password to login docdb" 20 | } 21 | -------------------------------------------------------------------------------- /internal/testing/deploywebsite.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # TODO implement. 4 | # Here's what we had in Travis: 5 | # install: "curl -fsSL https://github.com/gohugoio/hugo/releases/download/v0.54.0/hugo_0.54.0_Linux-64bit.tar.gz | tar zxf - -C \"$HOME\" hugo" 6 | # script: "HUGO_GOOGLEANALYTICS=UA-135118641-1 \"$HOME/hugo\" -s internal/website" 7 | # deploy: 8 | # provider: pages 9 | # edge: true 10 | # fqdn: gocloud.dev 11 | # skip-cleanup: true 12 | # local-dir: internal/website/public 13 | 14 | # To do this manually: 15 | # 16 | # Invoke the `hugo` command manually (after installing `hugo`). 17 | # Separately check out the gh-pages branch of this repository. 18 | # Overwrite the contents of the branch with the public/ directory, and push 19 | # to the branch. 20 | -------------------------------------------------------------------------------- /samples/appengine/README.md: -------------------------------------------------------------------------------- 1 | # AppEngine Sample 2 | 3 | This directory holds a simple "Hello world!" AppEngine app that uses 4 | [server.Server](https://github.com/google/go-cloud/blob/master/server/server.go). 5 | 6 | ## Prerequisites 7 | 8 | You will need to install the following software to run this sample: 9 | 10 | - [Go](https://golang.org/doc/install) 11 | - [gcloud CLI](https://cloud.google.com/sdk/downloads) 12 | 13 | ## Deploying 14 | 15 | Run the following in this `samples/appengine` directory: 16 | 17 | ```shell 18 | # Build the binary. 19 | go build 20 | # Deploy it to AppEngine. 21 | gcloud app deploy 22 | # Open a browser to the app. 23 | gcloud app browse 24 | ``` 25 | 26 | Try browsing to the `/healthz/readiness` page that `server.Server` adds a 27 | handler for. 28 | -------------------------------------------------------------------------------- /samples/appengine/.gcloudignore: -------------------------------------------------------------------------------- 1 | # This file specifies files that are *not* uploaded to Google Cloud Platform 2 | # using gcloud. It follows the same syntax as .gitignore, with the addition of 3 | # "#!include" directives (which insert the entries of the given .gitignore-style 4 | # file at that point). 5 | # 6 | # For more information, run: 7 | # $ gcloud topic gcloudignore 8 | # 9 | .gcloudignore 10 | # If you would like to upload your .git directory, .gitignore file or files 11 | # from your .gitignore file, remove the corresponding line 12 | # below: 13 | .git 14 | .gitignore 15 | 16 | # Binaries for programs and plugins 17 | *.exe 18 | *.exe~ 19 | *.dll 20 | *.so 21 | *.dylib 22 | # Test binary, build with `go test -c` 23 | *.test 24 | # Output of the go coverage tool, specifically when used with LiteIDE 25 | *.out -------------------------------------------------------------------------------- /samples/guestbook/roles.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2018 The Go Cloud Development Kit Authors 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 | -- https://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 | 15 | CREATE USER 'guestbook'@'%' IDENTIFIED BY 'xyzzy'; 16 | GRANT SELECT,INSERT,UPDATE,DELETE ON guestbook.* TO 'guestbook'@'%'; 17 | -------------------------------------------------------------------------------- /samples/guestbook/README.md: -------------------------------------------------------------------------------- 1 | # Guestbook Sample 2 | 3 | Guestbook is a sample application that records visitors' messages, displays a 4 | cloud banner, and an administrative message. The main business logic is written 5 | in a cloud-agnostic manner using MySQL, the generic blob API, and the generic 6 | runtimevar API. All platform-specific code is set up by 7 | [Wire](https://github.com/google/wire). 8 | 9 | The [online tutorial](https://gocloud.dev/tutorials/guestbook) will walk you through how to build, run, and deploy this sample locally, on Google Cloud Platform (GCP), on Amazon Web Servicess (AWS), or on Microsoft Azure. 10 | 11 | ## Gophers 12 | 13 | The Go gopher was designed by Renee French and used under the 14 | [Creative Commons 3.0 Attributions](https://creativecommons.org/licenses/by/3.0/) 15 | license. 16 | -------------------------------------------------------------------------------- /docstore/driver/actionkind_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=ActionKind"; DO NOT EDIT. 2 | 3 | package driver 4 | 5 | import "strconv" 6 | 7 | func _() { 8 | // An "invalid array index" compiler error signifies that the constant values have changed. 9 | // Re-run the stringer command to generate them again. 10 | var x [1]struct{} 11 | _ = x[Create-0] 12 | _ = x[Replace-1] 13 | _ = x[Put-2] 14 | _ = x[Get-3] 15 | _ = x[Delete-4] 16 | _ = x[Update-5] 17 | } 18 | 19 | const _ActionKind_name = "CreateReplacePutGetDeleteUpdate" 20 | 21 | var _ActionKind_index = [...]uint8{0, 6, 13, 16, 19, 25, 31} 22 | 23 | func (i ActionKind) String() string { 24 | if i < 0 || i >= ActionKind(len(_ActionKind_index)-1) { 25 | return "ActionKind(" + strconv.FormatInt(int64(i), 10) + ")" 26 | } 27 | return _ActionKind_name[_ActionKind_index[i]:_ActionKind_index[i+1]] 28 | } 29 | -------------------------------------------------------------------------------- /pubsub/rabbitpubsub/go.mod: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | module gocloud.dev/pubsub/rabbitpubsub 16 | 17 | go 1.12 18 | 19 | require ( 20 | github.com/rabbitmq/amqp091-go v1.7.0 21 | gocloud.dev v0.28.0 22 | ) 23 | 24 | replace gocloud.dev => ../../ 25 | -------------------------------------------------------------------------------- /samples/guestbook/azure/variables.tf: -------------------------------------------------------------------------------- 1 | # Copyright 2019 The Go Cloud Development Kit Authors 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 | # https://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 | 15 | variable "location" { 16 | type = string 17 | description = "Location to create resources in. See https://azure.microsoft.com/en-us/global-infrastructure/locations/ for valid values." 18 | } 19 | 20 | -------------------------------------------------------------------------------- /samples/guestbook/schema.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2018 The Go Cloud Development Kit Authors 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 | -- https://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 | 15 | CREATE TABLE greetings ( 16 | content VARCHAR(255) CHARACTER SET utf8 17 | NOT NULL 18 | CHECK (content <> ''), 19 | post_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP 20 | ); 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | Please use a title starting with the name of the affected package, or \"all\", 8 | followed by a colon, followed by a short summary of the issue. Example: 9 | `blob/gcsblob: not blobby enough`. 10 | 11 | You can use `go bug` to have a cool, automatically filled out bug template, or 12 | fill out the template below. 13 | 14 | ### Describe the bug 15 | 16 | A clear and concise description of what the bug is. 17 | 18 | ### To Reproduce 19 | 20 | Steps to reproduce the behavior. 21 | 22 | ## Expected behavior 23 | 24 | A clear and concise description of what you expected to happen. 25 | 26 | ### Version 27 | 28 | Which version(s) of the Go Cloud modules are you seeing the bug with? 29 | 30 | ### Additional context 31 | 32 | Add any other context about the problem here. 33 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | Please use a title starting with the name of the affected package, or \"all\", 8 | followed by a colon, followed by a short summary of the feature request. 9 | Example: `blob/gcsblob: add support for more blobbing`. 10 | 11 | ### Is your feature request related to a problem? Please describe. 12 | 13 | A clear and concise description of what the problem is. Ex. I'm always 14 | frustrated when [...] 15 | 16 | ### Describe the solution you'd like 17 | 18 | A clear and concise description of what you want to happen. 19 | 20 | ### Describe alternatives you've considered 21 | 22 | A clear and concise description of any alternative solutions or features you've 23 | considered. 24 | 25 | ### Additional context 26 | 27 | Add any other context or screenshots about the feature request here. 28 | -------------------------------------------------------------------------------- /samples/gocdk-runtimevar/runtimevar.ct: -------------------------------------------------------------------------------- 1 | # Copyright 2019 The Go Cloud Development Kit Authors 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 | # https://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 | 15 | # Tests of the gocdk-runtimevar program. 16 | 17 | $ gocdk-runtimevar cat constant://?val=foo&decoder=string 18 | (string) foo 19 | 20 | $ fecho fvar contents 21 | 22 | $ gocdk-runtimevar cat file:///${ROOTDIR}/fvar?decoder=string 23 | (string) contents 24 | -------------------------------------------------------------------------------- /blob/gcsblob/testdata/TestOpenBucket/success.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM01G3UKB/5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Expires$", 9 | "^Signature$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$" 25 | ], 26 | "RemoveResponseHeaders": [ 27 | "^X-Google-.*$", 28 | "^X-Gfe-.*$" 29 | ], 30 | "ClearParams": [ 31 | "^Expires$", 32 | "^Signature$" 33 | ], 34 | "RemoveParams": null 35 | }, 36 | "Entries": null 37 | } -------------------------------------------------------------------------------- /blob/gcsblob/testdata/TestConformance/TestKeys/non-UTF8_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM0mHyFbv/5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Expires$", 9 | "^Signature$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$" 25 | ], 26 | "RemoveResponseHeaders": [ 27 | "^X-Google-.*$", 28 | "^X-Gfe-.*$" 29 | ], 30 | "ClearParams": [ 31 | "^Expires$", 32 | "^Signature$" 33 | ], 34 | "RemoveParams": null 35 | }, 36 | "Entries": null 37 | } -------------------------------------------------------------------------------- /blob/gcsblob/testdata/TestConformance/TestMetadata/empty_key_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM0iBSEAyv5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Expires$", 9 | "^Signature$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$" 25 | ], 26 | "RemoveResponseHeaders": [ 27 | "^X-Google-.*$", 28 | "^X-Gfe-.*$" 29 | ], 30 | "ClearParams": [ 31 | "^Expires$", 32 | "^Signature$" 33 | ], 34 | "RemoveParams": null 35 | }, 36 | "Entries": null 37 | } -------------------------------------------------------------------------------- /pubsub/natspubsub/go.mod: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | module gocloud.dev/pubsub/natspubsub 16 | 17 | go 1.12 18 | 19 | require ( 20 | github.com/google/go-cmp v0.5.9 21 | github.com/nats-io/nats-server/v2 v2.7.2 22 | github.com/nats-io/nats.go v1.23.0 23 | gocloud.dev v0.28.0 24 | ) 25 | 26 | replace gocloud.dev => ../../ 27 | -------------------------------------------------------------------------------- /blob/gcsblob/testdata/TestConformance/TestMetadata/non-utf8_metadata_key.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM0jKNaBBf5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Expires$", 9 | "^Signature$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$" 25 | ], 26 | "RemoveResponseHeaders": [ 27 | "^X-Google-.*$", 28 | "^X-Gfe-.*$" 29 | ], 30 | "ClearParams": [ 31 | "^Expires$", 32 | "^Signature$" 33 | ], 34 | "RemoveParams": null 35 | }, 36 | "Entries": null 37 | } -------------------------------------------------------------------------------- /blob/gcsblob/testdata/TestConformance/TestRead/negative_offset_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM0VBSDKqf5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Expires$", 9 | "^Signature$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$" 25 | ], 26 | "RemoveResponseHeaders": [ 27 | "^X-Google-.*$", 28 | "^X-Gfe-.*$" 29 | ], 30 | "ClearParams": [ 31 | "^Expires$", 32 | "^Signature$" 33 | ], 34 | "RemoveParams": null 35 | }, 36 | "Entries": null 37 | } -------------------------------------------------------------------------------- /blob/gcsblob/testdata/TestOpenBucket/empty_bucket_name_results_in_error.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM01G2fIVP5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Expires$", 9 | "^Signature$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$" 25 | ], 26 | "RemoveResponseHeaders": [ 27 | "^X-Google-.*$", 28 | "^X-Gfe-.*$" 29 | ], 30 | "ClearParams": [ 31 | "^Expires$", 32 | "^Signature$" 33 | ], 34 | "RemoveParams": null 35 | }, 36 | "Entries": null 37 | } -------------------------------------------------------------------------------- /blob/gcsblob/testdata/TestConformance/TestMetadata/non-utf8_metadata_value.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM0jKOk1iv5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Expires$", 9 | "^Signature$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$" 25 | ], 26 | "RemoveResponseHeaders": [ 27 | "^X-Google-.*$", 28 | "^X-Gfe-.*$" 29 | ], 30 | "ClearParams": [ 31 | "^Expires$", 32 | "^Signature$" 33 | ], 34 | "RemoveParams": null 35 | }, 36 | "Entries": null 37 | } -------------------------------------------------------------------------------- /blob/gcsblob/testdata/TestConformance/TestMetadata/duplicate_case-insensitive_key_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM0iBS3Zof5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Expires$", 9 | "^Signature$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$" 25 | ], 26 | "RemoveResponseHeaders": [ 27 | "^X-Google-.*$", 28 | "^X-Gfe-.*$" 29 | ], 30 | "ClearParams": [ 31 | "^Expires$", 32 | "^Signature$" 33 | ], 34 | "RemoveParams": null 35 | }, 36 | "Entries": null 37 | } -------------------------------------------------------------------------------- /samples/gocdk-secrets/secrets.ct: -------------------------------------------------------------------------------- 1 | # Copyright 2019 The Go Cloud Development Kit Authors 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 | # https://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 | 15 | # Tests of the gocdk-secrets program. 16 | 17 | # We can't test encrypt because its output is nondeterministic. 18 | 19 | $ gocdk-secrets decrypt -base64in base64key://smGbjm71Nxd1Ig5FS0wj9SlbzAIrnolCz9bQQ6uAhl4= vnO4Lab8WxdGAklhKUAm+OkmM4mD4aRe9+Uo3iU/sBKMsf2txirq3Gg/MIYaOCRQLw== 20 | my-secret 21 | 22 | 23 | -------------------------------------------------------------------------------- /allmodules: -------------------------------------------------------------------------------- 1 | # This file lists all the modules in our repository; it's used by scripts that 2 | # have to perform operations for each module. 3 | # 4 | # Any line that doesn't begin with a '#' character and isn't empty is treated 5 | # as a path relative to the top of the repository that has a module in it. 6 | # The 'released' field specifies whether this is a module we release and tag (a 7 | # module importable by users). 8 | # 9 | # Note: another file that lists all the modules in our repo is 10 | # the VSCode workspace gocloud.code-workspace - for now it has to be updated 11 | # manually whenever this file changes. 12 | 13 | # module-directory released 14 | . yes 15 | docstore/mongodocstore yes 16 | internal/website no 17 | pubsub/kafkapubsub yes 18 | pubsub/natspubsub yes 19 | pubsub/rabbitpubsub yes 20 | runtimevar/etcdvar yes 21 | samples no 22 | secrets/hashivault yes 23 | -------------------------------------------------------------------------------- /pubsub/kafkapubsub/go.mod: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | module gocloud.dev/pubsub/kafkapubsub 16 | 17 | go 1.12 18 | 19 | require ( 20 | github.com/Shopify/sarama v1.38.1 21 | github.com/google/go-cmp v0.5.9 22 | github.com/klauspost/compress v1.15.15 // indirect 23 | github.com/pierrec/lz4 v2.6.1+incompatible // indirect 24 | gocloud.dev v0.28.0 25 | ) 26 | 27 | replace gocloud.dev => ../../ 28 | -------------------------------------------------------------------------------- /samples/gocdk-pubsub/pubsub.ct: -------------------------------------------------------------------------------- 1 | # Copyright 2019 The Go Cloud Development Kit Authors 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 | # https://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 | 15 | # Tests of the gocdk-pubsub program. 16 | 17 | 18 | $ fecho msg this is the message 19 | 20 | $ gocdk-pubsub pub rabbit://sample-topic < msg 21 | Enter messages, one per line, to be published to "rabbit://sample-topic". 22 | 23 | $ gocdk-pubsub sub -n 1 rabbit://sample-subscription 24 | Receiving messages from "rabbit://sample-subscription"... 25 | this is the message 26 | 27 | -------------------------------------------------------------------------------- /internal/website/layouts/shortcodes/goexample.html: -------------------------------------------------------------------------------- 1 | {{/* 2 | Usage: 3 | 4 | goexample "gocloud.dev/foo.ExampleBar" 5 | goexample src="gocloud.dev/foo.ExampleBar" 6 | goexample src="gocloud.dev/foo.ExampleBar" imports="0" 7 | 8 | */ -}} 9 | {{ if .IsNamedParams -}} 10 | {{ with index .Site.Data.examples (.Get "src") -}} 11 | {{ if and .imports (ne ($.Get "imports") "0") -}} 12 | {{ highlight (printf "%s\n\n%s\n" .imports .code) "go" "" -}} 13 | {{ else -}} 14 | {{ highlight (printf "%s\n" .code) "go" "" -}} 15 | {{ end -}} 16 | {{ else -}} 17 | {{ errorf "%s: Example %q does not exist" ($.Page.File.Path) (.Get "src") -}} 18 | {{end -}} 19 | {{ else -}} 20 | {{ with index .Site.Data.examples (.Get 0) -}} 21 | {{ if .imports -}} 22 | {{ highlight (printf "%s\n\n%s\n" .imports .code) "go" "" -}} 23 | {{ else -}} 24 | {{ highlight (printf "%s\n" .code) "go" "" -}} 25 | {{ end -}} 26 | {{ else -}} 27 | {{ errorf "%s: Example %q does not exist" ($.Page.File.Path) (.Get 0) -}} 28 | {{end -}} 29 | {{ end -}} 30 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of Go Cloud Development Kit authors for copyright 2 | # purposes. 3 | # This file is distinct from the CONTRIBUTORS files. 4 | # See the latter for an explanation. 5 | 6 | # Names should be added to this file as one of 7 | # Organization's name 8 | # Individual's name 9 | # Individual's name 10 | # See CONTRIBUTORS for the meaning of multiple email addresses. 11 | 12 | # Please keep the list sorted. 13 | 14 | Andrey Chernov 15 | Ben Hinchley 16 | Boris Popovschi 17 | Gerasimos (Makis) Maropoulos 18 | Google LLC 19 | Oleg Kovalov 20 | oliverpool 21 | Sendil Kumar N 22 | Steve Jiang 23 | Vishal Saroopchand 24 | Zachary Romero 25 | -------------------------------------------------------------------------------- /internal/website/gatherexamples/run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2019 The Go Cloud Development Kit Authors 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Run gatherexamples for the project. 17 | # The output of this script should be piped into 18 | # internal/website/data/examples.json, where it's picked up by Hugo. 19 | 20 | set -eo pipefail 21 | cd "$(dirname "${BASH_SOURCE[0]}")/../../.." 22 | sed -e '/^#/d' -e '/^$/d' allmodules | awk '{print $1}' | xargs go run internal/website/gatherexamples/gatherexamples.go 23 | -------------------------------------------------------------------------------- /internal/website/layouts/_default/sitemap.xml: -------------------------------------------------------------------------------- 1 | {{ printf "" | safeHTML }} 2 | 4 | {{ range sort .Data.Pages "Permalink" }} 5 | 6 | {{ .Permalink }}{{ if not .Lastmod.IsZero }} 7 | {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} 8 | {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} 9 | {{ .Sitemap.Priority }}{{ end }}{{ if .IsTranslated }}{{ range .Translations }} 10 | {{ end }} 15 | {{ end }} 20 | 21 | {{ end }} 22 | 23 | -------------------------------------------------------------------------------- /pubsub/rabbitpubsub/localrabbit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2019 The Go Cloud Development Kit Authors 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Starts a local RabbitMQ instance via Docker. 17 | 18 | # https://coderwall.com/p/fkfaqq/safer-bash-scripts-with-set-euxo-pipefail 19 | set -euo pipefail 20 | 21 | echo "Starting RabbitMQ..." 22 | docker rm -f rabbit &> /dev/null || : 23 | docker run -d --name rabbit -p 5672:5672 rabbitmq:3.10.17 &> /dev/null 24 | sleep 15 25 | echo "...done. Run \"docker rm -f rabbit\" to clean up the container." 26 | echo 27 | -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestOpenBucket/success.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM3aNTO/4f5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^X-Amz-Date$", 9 | "^User-Agent$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$", 25 | "^Authorization$", 26 | "^Duration$", 27 | "^X-Amz-Security-Token$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^X-Amz-Date$" 35 | ], 36 | "RemoveParams": [ 37 | "^X-Amz-Credential$", 38 | "^X-Amz-Signature$", 39 | "^X-Amz-Security-Token$" 40 | ] 41 | }, 42 | "Entries": null 43 | } -------------------------------------------------------------------------------- /runtimevar/etcdvar/go.mod: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | module gocloud.dev/runtimevar/etcdvar 16 | 17 | go 1.12 18 | 19 | require ( 20 | github.com/coreos/go-semver v0.3.1 // indirect 21 | github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect 22 | github.com/google/go-cmp v0.5.9 23 | go.etcd.io/etcd v3.3.27+incompatible 24 | go.etcd.io/etcd/client/v3 v3.5.7 25 | gocloud.dev v0.28.0 26 | google.golang.org/grpc v1.53.0 27 | ) 28 | 29 | replace gocloud.dev => ../../ 30 | -------------------------------------------------------------------------------- /samples/gocdk-secrets/main_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | package main 16 | 17 | import ( 18 | "flag" 19 | "testing" 20 | 21 | "github.com/google/go-cmdtest" 22 | ) 23 | 24 | var update = flag.Bool("update", false, "replace test file contents with output") 25 | 26 | func Test(t *testing.T) { 27 | ts, err := cmdtest.Read(".") 28 | if err != nil { 29 | t.Fatal(err) 30 | } 31 | ts.Commands["gocdk-secrets"] = cmdtest.InProcessProgram("gocdk-secrets", run) 32 | ts.Run(t, *update) 33 | } 34 | -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformance/TestKeys/non-UTF8_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM2xIgdttP5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^X-Amz-Date$", 9 | "^User-Agent$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$", 25 | "^Authorization$", 26 | "^Duration$", 27 | "^X-Amz-Security-Token$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^X-Amz-Date$" 35 | ], 36 | "RemoveParams": [ 37 | "^X-Amz-Credential$", 38 | "^X-Amz-Signature$", 39 | "^X-Amz-Security-Token$" 40 | ] 41 | }, 42 | "Entries": null 43 | } -------------------------------------------------------------------------------- /samples/gocdk-docstore/main_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | package main 16 | 17 | import ( 18 | "flag" 19 | "testing" 20 | 21 | "github.com/google/go-cmdtest" 22 | ) 23 | 24 | var update = flag.Bool("update", false, "replace test file contents with output") 25 | 26 | func Test(t *testing.T) { 27 | ts, err := cmdtest.Read(".") 28 | if err != nil { 29 | t.Fatal(err) 30 | } 31 | ts.Commands["gocdk-docstore"] = cmdtest.InProcessProgram("gocdk-docstore", run) 32 | ts.Run(t, *update) 33 | } 34 | -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformance/TestMetadata/empty_key_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM2wH2zC1P5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^X-Amz-Date$", 9 | "^User-Agent$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$", 25 | "^Authorization$", 26 | "^Duration$", 27 | "^X-Amz-Security-Token$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^X-Amz-Date$" 35 | ], 36 | "RemoveParams": [ 37 | "^X-Amz-Credential$", 38 | "^X-Amz-Signature$", 39 | "^X-Amz-Security-Token$" 40 | ] 41 | }, 42 | "Entries": null 43 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformance/TestRead/negative_offset_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM2sM02F3f5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^X-Amz-Date$", 9 | "^User-Agent$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$", 25 | "^Authorization$", 26 | "^Duration$", 27 | "^X-Amz-Security-Token$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^X-Amz-Date$" 35 | ], 36 | "RemoveParams": [ 37 | "^X-Amz-Credential$", 38 | "^X-Amz-Signature$", 39 | "^X-Amz-Security-Token$" 40 | ] 41 | }, 42 | "Entries": null 43 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestOpenBucket/empty_bucket_name_results_in_error.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM3aNQ1HB/5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^X-Amz-Date$", 9 | "^User-Agent$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$", 25 | "^Authorization$", 26 | "^Duration$", 27 | "^X-Amz-Security-Token$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^X-Amz-Date$" 35 | ], 36 | "RemoveParams": [ 37 | "^X-Amz-Credential$", 38 | "^X-Amz-Signature$", 39 | "^X-Amz-Security-Token$" 40 | ] 41 | }, 42 | "Entries": null 43 | } -------------------------------------------------------------------------------- /pubsub/awssnssqs/testdata/TestConformanceSQSTopic/TestSendReceiveTwo.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afPv2KheGhP5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^X-Amz-Date$", 9 | "^User-Agent$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$", 25 | "^Authorization$", 26 | "^Duration$", 27 | "^X-Amz-Security-Token$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^X-Amz-Date$" 35 | ], 36 | "RemoveParams": [ 37 | "^X-Amz-Credential$", 38 | "^X-Amz-Signature$", 39 | "^X-Amz-Security-Token$" 40 | ] 41 | }, 42 | "Entries": null 43 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformance/TestMetadata/non-utf8_metadata_key.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM2wOOUj6v5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^X-Amz-Date$", 9 | "^User-Agent$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$", 25 | "^Authorization$", 26 | "^Duration$", 27 | "^X-Amz-Security-Token$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^X-Amz-Date$" 35 | ], 36 | "RemoveParams": [ 37 | "^X-Amz-Credential$", 38 | "^X-Amz-Signature$", 39 | "^X-Amz-Security-Token$" 40 | ] 41 | }, 42 | "Entries": null 43 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformance/TestMetadata/non-utf8_metadata_value.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM2wOPd4tv5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^X-Amz-Date$", 9 | "^User-Agent$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$", 25 | "^Authorization$", 26 | "^Duration$", 27 | "^X-Amz-Security-Token$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^X-Amz-Date$" 35 | ], 36 | "RemoveParams": [ 37 | "^X-Amz-Credential$", 38 | "^X-Amz-Signature$", 39 | "^X-Amz-Security-Token$" 40 | ] 41 | }, 42 | "Entries": null 43 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformance/TestWrite/write_to_empty_key_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM2tNtCFeP5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^X-Amz-Date$", 9 | "^User-Agent$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$", 25 | "^Authorization$", 26 | "^Duration$", 27 | "^X-Amz-Security-Token$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^X-Amz-Date$" 35 | ], 36 | "RemoveParams": [ 37 | "^X-Amz-Credential$", 38 | "^X-Amz-Signature$", 39 | "^X-Amz-Security-Token$" 40 | ] 41 | }, 42 | "Entries": null 43 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceUsingLegacyList/TestKeys/non-UTF8_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM2/NoWyhP5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^X-Amz-Date$", 9 | "^User-Agent$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$", 25 | "^Authorization$", 26 | "^Duration$", 27 | "^X-Amz-Security-Token$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^X-Amz-Date$" 35 | ], 36 | "RemoveParams": [ 37 | "^X-Amz-Credential$", 38 | "^X-Amz-Signature$", 39 | "^X-Amz-Security-Token$" 40 | ] 41 | }, 42 | "Entries": null 43 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceUsingLegacyList/TestMetadata/empty_key_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM28DLpMwf5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^X-Amz-Date$", 9 | "^User-Agent$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$", 25 | "^Authorization$", 26 | "^Duration$", 27 | "^X-Amz-Security-Token$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^X-Amz-Date$" 35 | ], 36 | "RemoveParams": [ 37 | "^X-Amz-Credential$", 38 | "^X-Amz-Signature$", 39 | "^X-Amz-Security-Token$" 40 | ] 41 | }, 42 | "Entries": null 43 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceUsingLegacyList/TestRead/negative_offset_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM23LkoG9P5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^X-Amz-Date$", 9 | "^User-Agent$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$", 25 | "^Authorization$", 26 | "^Duration$", 27 | "^X-Amz-Security-Token$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^X-Amz-Date$" 35 | ], 36 | "RemoveParams": [ 37 | "^X-Amz-Credential$", 38 | "^X-Amz-Signature$", 39 | "^X-Amz-Security-Token$" 40 | ] 41 | }, 42 | "Entries": null 43 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestOpenBucket/success_V2.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM3aNUQJg/5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Amz-Sdk-Invocation-Id$", 9 | "^X-Amz-Date$", 10 | "^User-Agent$" 11 | ], 12 | "RemoveRequestHeaders": [ 13 | "^Authorization$", 14 | "^Proxy-Authorization$", 15 | "^Connection$", 16 | "^Content-Type$", 17 | "^Date$", 18 | "^Host$", 19 | "^Transfer-Encoding$", 20 | "^Via$", 21 | "^X-Forwarded-.*$", 22 | "^X-Cloud-Trace-Context$", 23 | "^X-Goog-Api-Client$", 24 | "^X-Google-.*$", 25 | "^X-Gfe-.*$", 26 | "^Authorization$", 27 | "^Duration$", 28 | "^X-Amz-Security-Token$" 29 | ], 30 | "RemoveResponseHeaders": [ 31 | "^X-Google-.*$", 32 | "^X-Gfe-.*$" 33 | ], 34 | "ClearParams": [ 35 | "^X-Amz-Date$" 36 | ], 37 | "RemoveParams": [ 38 | "^X-Amz-Credential$", 39 | "^X-Amz-Signature$", 40 | "^X-Amz-Security-Token$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /internal/website/README.md: -------------------------------------------------------------------------------- 1 | # gocloud.dev source 2 | 3 | Source for the [gocloud.dev website][]. Powered by [Hugo][]. 4 | 5 | [gocloud.dev website]: https://gocloud.dev/ 6 | [Hugo]: https://gohugo.io/ 7 | 8 | ## Local Development 9 | 10 | Use local hugo server for preview. `cd` into this directory and run: 11 | 12 | ``` 13 | $ hugo server -D 14 | ``` 15 | 16 | This will run the Hugo server that auto-updates its output based on the source 17 | contents. It will print out the `localhost:` URL to point the browser to. 18 | 19 | This was tested with Hugo 0.53 but should work with subsequent versions as well. 20 | 21 | ## Editing 22 | 23 | Use `hugo new foo/page.md` to create `content/foo/page.md`. This will 24 | automatically add the appropriate [Front Matter][] to the site. After modifying 25 | an existing page, add the `lastmod` attribute with the current ISO date, which 26 | you can obtain with `date -I`. For example: 27 | 28 | ```yaml 29 | --- 30 | title: Foo 31 | date: "2019-03-17T09:00:00-07:00" 32 | lastmod: "2019-03-18T13:30:12-07:00" 33 | --- 34 | 35 | ... 36 | ``` 37 | 38 | [Front Matter]: https://gohugo.io/content-management/front-matter/ 39 | -------------------------------------------------------------------------------- /blob/azureblob/testdata/TestConformance/TestKeys/non-UTF8_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7bTliaH8g0L/4g", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": [ 6 | "\u003cBlock(l|L)ist\u003e\u003cLatest\u003e.*\u003c/Latest\u003e\u003c/Block(l|L)ist\u003e" 7 | ], 8 | "ClearHeaders": [ 9 | "^X-Goog-.*Encryption-Key$", 10 | "^X-Ms-Date$", 11 | "^X-Ms-Version$", 12 | "^User-Agent$" 13 | ], 14 | "RemoveRequestHeaders": [ 15 | "^Authorization$", 16 | "^Proxy-Authorization$", 17 | "^Connection$", 18 | "^Content-Type$", 19 | "^Date$", 20 | "^Host$", 21 | "^Transfer-Encoding$", 22 | "^Via$", 23 | "^X-Forwarded-.*$", 24 | "^X-Cloud-Trace-Context$", 25 | "^X-Goog-Api-Client$", 26 | "^X-Google-.*$", 27 | "^X-Gfe-.*$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^blockid$" 35 | ], 36 | "RemoveParams": [ 37 | "^se$", 38 | "^sig$", 39 | "^st$", 40 | "^X-Ms-Date$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformance/TestMetadata/duplicate_case-insensitive_key_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM2wH4KZtP5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^X-Amz-Date$", 9 | "^User-Agent$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$", 25 | "^Authorization$", 26 | "^Duration$", 27 | "^X-Amz-Security-Token$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^X-Amz-Date$" 35 | ], 36 | "RemoveParams": [ 37 | "^X-Amz-Credential$", 38 | "^X-Amz-Signature$", 39 | "^X-Amz-Security-Token$" 40 | ] 41 | }, 42 | "Entries": null 43 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceUsingLegacyList/TestMetadata/non-utf8_metadata_key.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM2/Bta9LP5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^X-Amz-Date$", 9 | "^User-Agent$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$", 25 | "^Authorization$", 26 | "^Duration$", 27 | "^X-Amz-Security-Token$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^X-Amz-Date$" 35 | ], 36 | "RemoveParams": [ 37 | "^X-Amz-Credential$", 38 | "^X-Amz-Signature$", 39 | "^X-Amz-Security-Token$" 40 | ] 41 | }, 42 | "Entries": null 43 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceUsingLegacyList/TestMetadata/non-utf8_metadata_value.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM2/BusYmf5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^X-Amz-Date$", 9 | "^User-Agent$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$", 25 | "^Authorization$", 26 | "^Duration$", 27 | "^X-Amz-Security-Token$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^X-Amz-Date$" 35 | ], 36 | "RemoveParams": [ 37 | "^X-Amz-Credential$", 38 | "^X-Amz-Signature$", 39 | "^X-Amz-Security-Token$" 40 | ] 41 | }, 42 | "Entries": null 43 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceUsingLegacyList/TestWrite/write_to_empty_key_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM24M3a9aP5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^X-Amz-Date$", 9 | "^User-Agent$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$", 25 | "^Authorization$", 26 | "^Duration$", 27 | "^X-Amz-Security-Token$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^X-Amz-Date$" 35 | ], 36 | "RemoveParams": [ 37 | "^X-Amz-Credential$", 38 | "^X-Amz-Signature$", 39 | "^X-Amz-Security-Token$" 40 | ] 41 | }, 42 | "Entries": null 43 | } -------------------------------------------------------------------------------- /blob/azureblob/testdata/TestConformance/TestMetadata/empty_key_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7bTliZLJDiBf4g", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": [ 6 | "\u003cBlock(l|L)ist\u003e\u003cLatest\u003e.*\u003c/Latest\u003e\u003c/Block(l|L)ist\u003e" 7 | ], 8 | "ClearHeaders": [ 9 | "^X-Goog-.*Encryption-Key$", 10 | "^X-Ms-Date$", 11 | "^X-Ms-Version$", 12 | "^User-Agent$" 13 | ], 14 | "RemoveRequestHeaders": [ 15 | "^Authorization$", 16 | "^Proxy-Authorization$", 17 | "^Connection$", 18 | "^Content-Type$", 19 | "^Date$", 20 | "^Host$", 21 | "^Transfer-Encoding$", 22 | "^Via$", 23 | "^X-Forwarded-.*$", 24 | "^X-Cloud-Trace-Context$", 25 | "^X-Goog-Api-Client$", 26 | "^X-Google-.*$", 27 | "^X-Gfe-.*$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^blockid$" 35 | ], 36 | "RemoveParams": [ 37 | "^se$", 38 | "^sig$", 39 | "^st$", 40 | "^X-Ms-Date$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /secrets/hashivault/localvault.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2019 The Go Cloud Development Kit Authors 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Starts a local Vault instance via Docker. 17 | 18 | # https://coderwall.com/p/fkfaqq/safer-bash-scripts-with-set-euxo-pipefail 19 | set -euo pipefail 20 | 21 | echo "Starting Vault Server..." 22 | docker rm -f dev-vault &> /dev/null || : 23 | docker run --cap-add=IPC_LOCK -d --name=dev-vault -e 'VAULT_DEV_ROOT_TOKEN_ID=faketoken' -p 8200:8200 vault:1.6.0 &> /dev/null 24 | echo "...done. Run \"docker rm -f dev-vault\" to clean up the container." 25 | echo 26 | 27 | -------------------------------------------------------------------------------- /blob/azureblob/testdata/TestConformance/TestRead/negative_offset_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7bTliXM5xz2f4g", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": [ 6 | "\u003cBlock(l|L)ist\u003e\u003cLatest\u003e.*\u003c/Latest\u003e\u003c/Block(l|L)ist\u003e" 7 | ], 8 | "ClearHeaders": [ 9 | "^X-Goog-.*Encryption-Key$", 10 | "^X-Ms-Date$", 11 | "^X-Ms-Version$", 12 | "^User-Agent$" 13 | ], 14 | "RemoveRequestHeaders": [ 15 | "^Authorization$", 16 | "^Proxy-Authorization$", 17 | "^Connection$", 18 | "^Content-Type$", 19 | "^Date$", 20 | "^Host$", 21 | "^Transfer-Encoding$", 22 | "^Via$", 23 | "^X-Forwarded-.*$", 24 | "^X-Cloud-Trace-Context$", 25 | "^X-Goog-Api-Client$", 26 | "^X-Google-.*$", 27 | "^X-Gfe-.*$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^blockid$" 35 | ], 36 | "RemoveParams": [ 37 | "^se$", 38 | "^sig$", 39 | "^st$", 40 | "^X-Ms-Date$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceV2/TestKeys/non-UTF8_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM3LGrFWW/5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Amz-Sdk-Invocation-Id$", 9 | "^X-Amz-Date$", 10 | "^User-Agent$" 11 | ], 12 | "RemoveRequestHeaders": [ 13 | "^Authorization$", 14 | "^Proxy-Authorization$", 15 | "^Connection$", 16 | "^Content-Type$", 17 | "^Date$", 18 | "^Host$", 19 | "^Transfer-Encoding$", 20 | "^Via$", 21 | "^X-Forwarded-.*$", 22 | "^X-Cloud-Trace-Context$", 23 | "^X-Goog-Api-Client$", 24 | "^X-Google-.*$", 25 | "^X-Gfe-.*$", 26 | "^Authorization$", 27 | "^Duration$", 28 | "^X-Amz-Security-Token$" 29 | ], 30 | "RemoveResponseHeaders": [ 31 | "^X-Google-.*$", 32 | "^X-Gfe-.*$" 33 | ], 34 | "ClearParams": [ 35 | "^X-Amz-Date$" 36 | ], 37 | "RemoveParams": [ 38 | "^X-Amz-Credential$", 39 | "^X-Amz-Signature$", 40 | "^X-Amz-Security-Token$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /blob/azureblob/testdata/TestConformance/TestMetadata/non-utf8_metadata_key.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7bTliaACq+//4g", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": [ 6 | "\u003cBlock(l|L)ist\u003e\u003cLatest\u003e.*\u003c/Latest\u003e\u003c/Block(l|L)ist\u003e" 7 | ], 8 | "ClearHeaders": [ 9 | "^X-Goog-.*Encryption-Key$", 10 | "^X-Ms-Date$", 11 | "^X-Ms-Version$", 12 | "^User-Agent$" 13 | ], 14 | "RemoveRequestHeaders": [ 15 | "^Authorization$", 16 | "^Proxy-Authorization$", 17 | "^Connection$", 18 | "^Content-Type$", 19 | "^Date$", 20 | "^Host$", 21 | "^Transfer-Encoding$", 22 | "^Via$", 23 | "^X-Forwarded-.*$", 24 | "^X-Cloud-Trace-Context$", 25 | "^X-Goog-Api-Client$", 26 | "^X-Google-.*$", 27 | "^X-Gfe-.*$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^blockid$" 35 | ], 36 | "RemoveParams": [ 37 | "^se$", 38 | "^sig$", 39 | "^st$", 40 | "^X-Ms-Date$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /blob/azureblob/testdata/TestConformance/TestMetadata/non-utf8_metadata_value.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7bTliaADxDVP4g", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": [ 6 | "\u003cBlock(l|L)ist\u003e\u003cLatest\u003e.*\u003c/Latest\u003e\u003c/Block(l|L)ist\u003e" 7 | ], 8 | "ClearHeaders": [ 9 | "^X-Goog-.*Encryption-Key$", 10 | "^X-Ms-Date$", 11 | "^X-Ms-Version$", 12 | "^User-Agent$" 13 | ], 14 | "RemoveRequestHeaders": [ 15 | "^Authorization$", 16 | "^Proxy-Authorization$", 17 | "^Connection$", 18 | "^Content-Type$", 19 | "^Date$", 20 | "^Host$", 21 | "^Transfer-Encoding$", 22 | "^Via$", 23 | "^X-Forwarded-.*$", 24 | "^X-Cloud-Trace-Context$", 25 | "^X-Goog-Api-Client$", 26 | "^X-Google-.*$", 27 | "^X-Gfe-.*$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^blockid$" 35 | ], 36 | "RemoveParams": [ 37 | "^se$", 38 | "^sig$", 39 | "^st$", 40 | "^X-Ms-Date$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceUsingLegacyList/TestMetadata/duplicate_case-insensitive_key_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM28DMxCM/5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^X-Amz-Date$", 9 | "^User-Agent$" 10 | ], 11 | "RemoveRequestHeaders": [ 12 | "^Authorization$", 13 | "^Proxy-Authorization$", 14 | "^Connection$", 15 | "^Content-Type$", 16 | "^Date$", 17 | "^Host$", 18 | "^Transfer-Encoding$", 19 | "^Via$", 20 | "^X-Forwarded-.*$", 21 | "^X-Cloud-Trace-Context$", 22 | "^X-Goog-Api-Client$", 23 | "^X-Google-.*$", 24 | "^X-Gfe-.*$", 25 | "^Authorization$", 26 | "^Duration$", 27 | "^X-Amz-Security-Token$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^X-Amz-Date$" 35 | ], 36 | "RemoveParams": [ 37 | "^X-Amz-Credential$", 38 | "^X-Amz-Signature$", 39 | "^X-Amz-Security-Token$" 40 | ] 41 | }, 42 | "Entries": null 43 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceV2/TestMetadata/empty_key_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM3KEqgS8/5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Amz-Sdk-Invocation-Id$", 9 | "^X-Amz-Date$", 10 | "^User-Agent$" 11 | ], 12 | "RemoveRequestHeaders": [ 13 | "^Authorization$", 14 | "^Proxy-Authorization$", 15 | "^Connection$", 16 | "^Content-Type$", 17 | "^Date$", 18 | "^Host$", 19 | "^Transfer-Encoding$", 20 | "^Via$", 21 | "^X-Forwarded-.*$", 22 | "^X-Cloud-Trace-Context$", 23 | "^X-Goog-Api-Client$", 24 | "^X-Google-.*$", 25 | "^X-Gfe-.*$", 26 | "^Authorization$", 27 | "^Duration$", 28 | "^X-Amz-Security-Token$" 29 | ], 30 | "RemoveResponseHeaders": [ 31 | "^X-Google-.*$", 32 | "^X-Gfe-.*$" 33 | ], 34 | "ClearParams": [ 35 | "^X-Amz-Date$" 36 | ], 37 | "RemoveParams": [ 38 | "^X-Amz-Credential$", 39 | "^X-Amz-Signature$", 40 | "^X-Amz-Security-Token$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceV2/TestRead/negative_offset_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM3GGzPoYP5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Amz-Sdk-Invocation-Id$", 9 | "^X-Amz-Date$", 10 | "^User-Agent$" 11 | ], 12 | "RemoveRequestHeaders": [ 13 | "^Authorization$", 14 | "^Proxy-Authorization$", 15 | "^Connection$", 16 | "^Content-Type$", 17 | "^Date$", 18 | "^Host$", 19 | "^Transfer-Encoding$", 20 | "^Via$", 21 | "^X-Forwarded-.*$", 22 | "^X-Cloud-Trace-Context$", 23 | "^X-Goog-Api-Client$", 24 | "^X-Google-.*$", 25 | "^X-Gfe-.*$", 26 | "^Authorization$", 27 | "^Duration$", 28 | "^X-Amz-Security-Token$" 29 | ], 30 | "RemoveResponseHeaders": [ 31 | "^X-Google-.*$", 32 | "^X-Gfe-.*$" 33 | ], 34 | "ClearParams": [ 35 | "^X-Amz-Date$" 36 | ], 37 | "RemoveParams": [ 38 | "^X-Amz-Credential$", 39 | "^X-Amz-Signature$", 40 | "^X-Amz-Security-Token$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /pubsub/awssnssqs/testdata/TestConformanceSQSTopicV2/TestSendReceiveTwo.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afPwFGeAal/5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Amz-Sdk-Invocation-Id$", 9 | "^X-Amz-Date$", 10 | "^User-Agent$" 11 | ], 12 | "RemoveRequestHeaders": [ 13 | "^Authorization$", 14 | "^Proxy-Authorization$", 15 | "^Connection$", 16 | "^Content-Type$", 17 | "^Date$", 18 | "^Host$", 19 | "^Transfer-Encoding$", 20 | "^Via$", 21 | "^X-Forwarded-.*$", 22 | "^X-Cloud-Trace-Context$", 23 | "^X-Goog-Api-Client$", 24 | "^X-Google-.*$", 25 | "^X-Gfe-.*$", 26 | "^Authorization$", 27 | "^Duration$", 28 | "^X-Amz-Security-Token$" 29 | ], 30 | "RemoveResponseHeaders": [ 31 | "^X-Google-.*$", 32 | "^X-Gfe-.*$" 33 | ], 34 | "ClearParams": [ 35 | "^X-Amz-Date$" 36 | ], 37 | "RemoveParams": [ 38 | "^X-Amz-Credential$", 39 | "^X-Amz-Signature$", 40 | "^X-Amz-Security-Token$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceUsingLegacyListV2/TestKeys/non-UTF8_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM3WKr2J4/5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Amz-Sdk-Invocation-Id$", 9 | "^X-Amz-Date$", 10 | "^User-Agent$" 11 | ], 12 | "RemoveRequestHeaders": [ 13 | "^Authorization$", 14 | "^Proxy-Authorization$", 15 | "^Connection$", 16 | "^Content-Type$", 17 | "^Date$", 18 | "^Host$", 19 | "^Transfer-Encoding$", 20 | "^Via$", 21 | "^X-Forwarded-.*$", 22 | "^X-Cloud-Trace-Context$", 23 | "^X-Goog-Api-Client$", 24 | "^X-Google-.*$", 25 | "^X-Gfe-.*$", 26 | "^Authorization$", 27 | "^Duration$", 28 | "^X-Amz-Security-Token$" 29 | ], 30 | "RemoveResponseHeaders": [ 31 | "^X-Google-.*$", 32 | "^X-Gfe-.*$" 33 | ], 34 | "ClearParams": [ 35 | "^X-Amz-Date$" 36 | ], 37 | "RemoveParams": [ 38 | "^X-Amz-Credential$", 39 | "^X-Amz-Signature$", 40 | "^X-Amz-Security-Token$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceV2/TestMetadata/non-utf8_metadata_key.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM3KLDFjVP5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Amz-Sdk-Invocation-Id$", 9 | "^X-Amz-Date$", 10 | "^User-Agent$" 11 | ], 12 | "RemoveRequestHeaders": [ 13 | "^Authorization$", 14 | "^Proxy-Authorization$", 15 | "^Connection$", 16 | "^Content-Type$", 17 | "^Date$", 18 | "^Host$", 19 | "^Transfer-Encoding$", 20 | "^Via$", 21 | "^X-Forwarded-.*$", 22 | "^X-Cloud-Trace-Context$", 23 | "^X-Goog-Api-Client$", 24 | "^X-Google-.*$", 25 | "^X-Gfe-.*$", 26 | "^Authorization$", 27 | "^Duration$", 28 | "^X-Amz-Security-Token$" 29 | ], 30 | "RemoveResponseHeaders": [ 31 | "^X-Google-.*$", 32 | "^X-Gfe-.*$" 33 | ], 34 | "ClearParams": [ 35 | "^X-Amz-Date$" 36 | ], 37 | "RemoveParams": [ 38 | "^X-Amz-Credential$", 39 | "^X-Amz-Signature$", 40 | "^X-Amz-Security-Token$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceV2/TestMetadata/non-utf8_metadata_value.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM3KLEVTU/5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Amz-Sdk-Invocation-Id$", 9 | "^X-Amz-Date$", 10 | "^User-Agent$" 11 | ], 12 | "RemoveRequestHeaders": [ 13 | "^Authorization$", 14 | "^Proxy-Authorization$", 15 | "^Connection$", 16 | "^Content-Type$", 17 | "^Date$", 18 | "^Host$", 19 | "^Transfer-Encoding$", 20 | "^Via$", 21 | "^X-Forwarded-.*$", 22 | "^X-Cloud-Trace-Context$", 23 | "^X-Goog-Api-Client$", 24 | "^X-Google-.*$", 25 | "^X-Gfe-.*$", 26 | "^Authorization$", 27 | "^Duration$", 28 | "^X-Amz-Security-Token$" 29 | ], 30 | "RemoveResponseHeaders": [ 31 | "^X-Google-.*$", 32 | "^X-Gfe-.*$" 33 | ], 34 | "ClearParams": [ 35 | "^X-Amz-Date$" 36 | ], 37 | "RemoveParams": [ 38 | "^X-Amz-Credential$", 39 | "^X-Amz-Signature$", 40 | "^X-Amz-Security-Token$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceV2/TestWrite/write_to_empty_key_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM3HLpTuwf5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Amz-Sdk-Invocation-Id$", 9 | "^X-Amz-Date$", 10 | "^User-Agent$" 11 | ], 12 | "RemoveRequestHeaders": [ 13 | "^Authorization$", 14 | "^Proxy-Authorization$", 15 | "^Connection$", 16 | "^Content-Type$", 17 | "^Date$", 18 | "^Host$", 19 | "^Transfer-Encoding$", 20 | "^Via$", 21 | "^X-Forwarded-.*$", 22 | "^X-Cloud-Trace-Context$", 23 | "^X-Goog-Api-Client$", 24 | "^X-Google-.*$", 25 | "^X-Gfe-.*$", 26 | "^Authorization$", 27 | "^Duration$", 28 | "^X-Amz-Security-Token$" 29 | ], 30 | "RemoveResponseHeaders": [ 31 | "^X-Google-.*$", 32 | "^X-Gfe-.*$" 33 | ], 34 | "ClearParams": [ 35 | "^X-Amz-Date$" 36 | ], 37 | "RemoveParams": [ 38 | "^X-Amz-Credential$", 39 | "^X-Amz-Signature$", 40 | "^X-Amz-Security-Token$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestOpenBucket/empty_bucket_name_results_in_error_V2.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM3aNSDmEf5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Amz-Sdk-Invocation-Id$", 9 | "^X-Amz-Date$", 10 | "^User-Agent$" 11 | ], 12 | "RemoveRequestHeaders": [ 13 | "^Authorization$", 14 | "^Proxy-Authorization$", 15 | "^Connection$", 16 | "^Content-Type$", 17 | "^Date$", 18 | "^Host$", 19 | "^Transfer-Encoding$", 20 | "^Via$", 21 | "^X-Forwarded-.*$", 22 | "^X-Cloud-Trace-Context$", 23 | "^X-Goog-Api-Client$", 24 | "^X-Google-.*$", 25 | "^X-Gfe-.*$", 26 | "^Authorization$", 27 | "^Duration$", 28 | "^X-Amz-Security-Token$" 29 | ], 30 | "RemoveResponseHeaders": [ 31 | "^X-Google-.*$", 32 | "^X-Gfe-.*$" 33 | ], 34 | "ClearParams": [ 35 | "^X-Amz-Date$" 36 | ], 37 | "RemoveParams": [ 38 | "^X-Amz-Credential$", 39 | "^X-Amz-Signature$", 40 | "^X-Amz-Security-Token$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /blob/azureblob/testdata/TestConformance/TestMetadata/duplicate_case-insensitive_key_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7bTliZLKM32P4g", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": [ 6 | "\u003cBlock(l|L)ist\u003e\u003cLatest\u003e.*\u003c/Latest\u003e\u003c/Block(l|L)ist\u003e" 7 | ], 8 | "ClearHeaders": [ 9 | "^X-Goog-.*Encryption-Key$", 10 | "^X-Ms-Date$", 11 | "^X-Ms-Version$", 12 | "^User-Agent$" 13 | ], 14 | "RemoveRequestHeaders": [ 15 | "^Authorization$", 16 | "^Proxy-Authorization$", 17 | "^Connection$", 18 | "^Content-Type$", 19 | "^Date$", 20 | "^Host$", 21 | "^Transfer-Encoding$", 22 | "^Via$", 23 | "^X-Forwarded-.*$", 24 | "^X-Cloud-Trace-Context$", 25 | "^X-Goog-Api-Client$", 26 | "^X-Google-.*$", 27 | "^X-Gfe-.*$" 28 | ], 29 | "RemoveResponseHeaders": [ 30 | "^X-Google-.*$", 31 | "^X-Gfe-.*$" 32 | ], 33 | "ClearParams": [ 34 | "^blockid$" 35 | ], 36 | "RemoveParams": [ 37 | "^se$", 38 | "^sig$", 39 | "^st$", 40 | "^X-Ms-Date$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceUsingLegacyListV2/TestMetadata/empty_key_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM3VFrKWlP5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Amz-Sdk-Invocation-Id$", 9 | "^X-Amz-Date$", 10 | "^User-Agent$" 11 | ], 12 | "RemoveRequestHeaders": [ 13 | "^Authorization$", 14 | "^Proxy-Authorization$", 15 | "^Connection$", 16 | "^Content-Type$", 17 | "^Date$", 18 | "^Host$", 19 | "^Transfer-Encoding$", 20 | "^Via$", 21 | "^X-Forwarded-.*$", 22 | "^X-Cloud-Trace-Context$", 23 | "^X-Goog-Api-Client$", 24 | "^X-Google-.*$", 25 | "^X-Gfe-.*$", 26 | "^Authorization$", 27 | "^Duration$", 28 | "^X-Amz-Security-Token$" 29 | ], 30 | "RemoveResponseHeaders": [ 31 | "^X-Google-.*$", 32 | "^X-Gfe-.*$" 33 | ], 34 | "ClearParams": [ 35 | "^X-Amz-Date$" 36 | ], 37 | "RemoveParams": [ 38 | "^X-Amz-Credential$", 39 | "^X-Amz-Signature$", 40 | "^X-Amz-Security-Token$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /docstore/mongodocstore/go.mod: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | module gocloud.dev/docstore/mongodocstore 16 | 17 | go 1.12 18 | 19 | require ( 20 | github.com/google/go-cmp v0.5.9 21 | github.com/google/wire v0.5.0 22 | github.com/klauspost/compress v1.15.15 // indirect 23 | github.com/montanaflynn/stats v0.7.0 // indirect 24 | github.com/xdg-go/scram v1.1.2 // indirect 25 | github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect 26 | go.mongodb.org/mongo-driver v1.11.2 27 | gocloud.dev v0.28.0 28 | ) 29 | 30 | replace gocloud.dev => ../../ 31 | -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceUsingLegacyListV2/TestRead/negative_offset_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM3RJOZJTv5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Amz-Sdk-Invocation-Id$", 9 | "^X-Amz-Date$", 10 | "^User-Agent$" 11 | ], 12 | "RemoveRequestHeaders": [ 13 | "^Authorization$", 14 | "^Proxy-Authorization$", 15 | "^Connection$", 16 | "^Content-Type$", 17 | "^Date$", 18 | "^Host$", 19 | "^Transfer-Encoding$", 20 | "^Via$", 21 | "^X-Forwarded-.*$", 22 | "^X-Cloud-Trace-Context$", 23 | "^X-Goog-Api-Client$", 24 | "^X-Google-.*$", 25 | "^X-Gfe-.*$", 26 | "^Authorization$", 27 | "^Duration$", 28 | "^X-Amz-Security-Token$" 29 | ], 30 | "RemoveResponseHeaders": [ 31 | "^X-Google-.*$", 32 | "^X-Gfe-.*$" 33 | ], 34 | "ClearParams": [ 35 | "^X-Amz-Date$" 36 | ], 37 | "RemoveParams": [ 38 | "^X-Amz-Credential$", 39 | "^X-Amz-Signature$", 40 | "^X-Amz-Security-Token$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceUsingLegacyListV2/TestMetadata/non-utf8_metadata_key.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM3VNis9xf5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Amz-Sdk-Invocation-Id$", 9 | "^X-Amz-Date$", 10 | "^User-Agent$" 11 | ], 12 | "RemoveRequestHeaders": [ 13 | "^Authorization$", 14 | "^Proxy-Authorization$", 15 | "^Connection$", 16 | "^Content-Type$", 17 | "^Date$", 18 | "^Host$", 19 | "^Transfer-Encoding$", 20 | "^Via$", 21 | "^X-Forwarded-.*$", 22 | "^X-Cloud-Trace-Context$", 23 | "^X-Goog-Api-Client$", 24 | "^X-Google-.*$", 25 | "^X-Gfe-.*$", 26 | "^Authorization$", 27 | "^Duration$", 28 | "^X-Amz-Security-Token$" 29 | ], 30 | "RemoveResponseHeaders": [ 31 | "^X-Google-.*$", 32 | "^X-Gfe-.*$" 33 | ], 34 | "ClearParams": [ 35 | "^X-Amz-Date$" 36 | ], 37 | "RemoveParams": [ 38 | "^X-Amz-Credential$", 39 | "^X-Amz-Signature$", 40 | "^X-Amz-Security-Token$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceUsingLegacyListV2/TestMetadata/non-utf8_metadata_value.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM3VNj877/5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Amz-Sdk-Invocation-Id$", 9 | "^X-Amz-Date$", 10 | "^User-Agent$" 11 | ], 12 | "RemoveRequestHeaders": [ 13 | "^Authorization$", 14 | "^Proxy-Authorization$", 15 | "^Connection$", 16 | "^Content-Type$", 17 | "^Date$", 18 | "^Host$", 19 | "^Transfer-Encoding$", 20 | "^Via$", 21 | "^X-Forwarded-.*$", 22 | "^X-Cloud-Trace-Context$", 23 | "^X-Goog-Api-Client$", 24 | "^X-Google-.*$", 25 | "^X-Gfe-.*$", 26 | "^Authorization$", 27 | "^Duration$", 28 | "^X-Amz-Security-Token$" 29 | ], 30 | "RemoveResponseHeaders": [ 31 | "^X-Google-.*$", 32 | "^X-Gfe-.*$" 33 | ], 34 | "ClearParams": [ 35 | "^X-Amz-Date$" 36 | ], 37 | "RemoveParams": [ 38 | "^X-Amz-Credential$", 39 | "^X-Amz-Signature$", 40 | "^X-Amz-Security-Token$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceUsingLegacyListV2/TestWrite/write_to_empty_key_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM3SLrU11P5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Amz-Sdk-Invocation-Id$", 9 | "^X-Amz-Date$", 10 | "^User-Agent$" 11 | ], 12 | "RemoveRequestHeaders": [ 13 | "^Authorization$", 14 | "^Proxy-Authorization$", 15 | "^Connection$", 16 | "^Content-Type$", 17 | "^Date$", 18 | "^Host$", 19 | "^Transfer-Encoding$", 20 | "^Via$", 21 | "^X-Forwarded-.*$", 22 | "^X-Cloud-Trace-Context$", 23 | "^X-Goog-Api-Client$", 24 | "^X-Google-.*$", 25 | "^X-Gfe-.*$", 26 | "^Authorization$", 27 | "^Duration$", 28 | "^X-Amz-Security-Token$" 29 | ], 30 | "RemoveResponseHeaders": [ 31 | "^X-Google-.*$", 32 | "^X-Gfe-.*$" 33 | ], 34 | "ClearParams": [ 35 | "^X-Amz-Date$" 36 | ], 37 | "RemoveParams": [ 38 | "^X-Amz-Credential$", 39 | "^X-Amz-Signature$", 40 | "^X-Amz-Security-Token$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceV2/TestMetadata/duplicate_case-insensitive_key_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM3KErvHxv5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Amz-Sdk-Invocation-Id$", 9 | "^X-Amz-Date$", 10 | "^User-Agent$" 11 | ], 12 | "RemoveRequestHeaders": [ 13 | "^Authorization$", 14 | "^Proxy-Authorization$", 15 | "^Connection$", 16 | "^Content-Type$", 17 | "^Date$", 18 | "^Host$", 19 | "^Transfer-Encoding$", 20 | "^Via$", 21 | "^X-Forwarded-.*$", 22 | "^X-Cloud-Trace-Context$", 23 | "^X-Goog-Api-Client$", 24 | "^X-Google-.*$", 25 | "^X-Gfe-.*$", 26 | "^Authorization$", 27 | "^Duration$", 28 | "^X-Amz-Security-Token$" 29 | ], 30 | "RemoveResponseHeaders": [ 31 | "^X-Google-.*$", 32 | "^X-Gfe-.*$" 33 | ], 34 | "ClearParams": [ 35 | "^X-Amz-Date$" 36 | ], 37 | "RemoveParams": [ 38 | "^X-Amz-Credential$", 39 | "^X-Amz-Signature$", 40 | "^X-Amz-Security-Token$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /blob/s3blob/testdata/TestConformanceUsingLegacyListV2/TestMetadata/duplicate_case-insensitive_key_fails.replay: -------------------------------------------------------------------------------- 1 | { 2 | "Initial": "AQAAAA7afM3VFsdrV/5c", 3 | "Version": "0.2", 4 | "Converter": { 5 | "ScrubBody": null, 6 | "ClearHeaders": [ 7 | "^X-Goog-.*Encryption-Key$", 8 | "^Amz-Sdk-Invocation-Id$", 9 | "^X-Amz-Date$", 10 | "^User-Agent$" 11 | ], 12 | "RemoveRequestHeaders": [ 13 | "^Authorization$", 14 | "^Proxy-Authorization$", 15 | "^Connection$", 16 | "^Content-Type$", 17 | "^Date$", 18 | "^Host$", 19 | "^Transfer-Encoding$", 20 | "^Via$", 21 | "^X-Forwarded-.*$", 22 | "^X-Cloud-Trace-Context$", 23 | "^X-Goog-Api-Client$", 24 | "^X-Google-.*$", 25 | "^X-Gfe-.*$", 26 | "^Authorization$", 27 | "^Duration$", 28 | "^X-Amz-Security-Token$" 29 | ], 30 | "RemoveResponseHeaders": [ 31 | "^X-Google-.*$", 32 | "^X-Gfe-.*$" 33 | ], 34 | "ClearParams": [ 35 | "^X-Amz-Date$" 36 | ], 37 | "RemoveParams": [ 38 | "^X-Amz-Credential$", 39 | "^X-Amz-Signature$", 40 | "^X-Amz-Security-Token$" 41 | ] 42 | }, 43 | "Entries": null 44 | } -------------------------------------------------------------------------------- /internal/testing/gomodcleanup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2019 The Go Cloud Development Kit Authors 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # This script should be run from the root directory. 17 | # It runs "go mod tidy && go list -deps ./..." on all modules in 18 | # the repo, to ensure that go.mod and go.sum are in the canonical 19 | # form that tests will verify (see check_mod_tidy.sh). 20 | set -euo pipefail 21 | 22 | sed -e '/^#/d' -e '/^$/d' allmodules | awk '{print $1}' | while read -r path || [[ -n "$path" ]]; do 23 | echo "cleaning up $path" 24 | ( cd "$path" && go mod tidy && go list -deps ./... &> /dev/null || echo " FAILED!") 25 | done 26 | -------------------------------------------------------------------------------- /internal/testing/update_deps.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2019 The Go Cloud Development Kit Authors 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # This script should be run from the root directory. 17 | # It runs "go get -u && go mod tidy" on all modules in 18 | # the repo, to update dependencies. Run runchecks.sh afterwards. 19 | set -euo pipefail 20 | 21 | sed -e '/^#/d' -e '/^$/d' allmodules | awk '{print $1}' | while read -r path || [[ -n "$path" ]]; do 22 | echo "updating $path" 23 | ( cd "$path" && go get -u ./... &> /dev/null && go mod tidy &> /dev/null || echo " FAILED! (some modules without code, like samples, are expected to fail)") 24 | done 25 | -------------------------------------------------------------------------------- /samples/guestbook/azure/outputs.tf: -------------------------------------------------------------------------------- 1 | # Copyright 2019 The Go Cloud Development Kit Authors 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 | # https://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 | 15 | output "storage_account" { 16 | value = azurerm_storage_account.guestbook.name 17 | description = "Name of the Storage Account created to store images." 18 | } 19 | 20 | output "storage_container" { 21 | value = azurerm_storage_container.guestbook.name 22 | description = "Name of the storage container created to store images." 23 | } 24 | 25 | output "access_key" { 26 | value = azurerm_storage_account.guestbook.primary_access_key 27 | description = "The primary access key for the Storage Account." 28 | } 29 | 30 | -------------------------------------------------------------------------------- /secrets/hashivault/go.mod: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | module gocloud.dev/secrets/hashivault 16 | 17 | go 1.12 18 | 19 | require ( 20 | github.com/cenkalti/backoff/v3 v3.2.2 // indirect 21 | github.com/fatih/color v1.14.1 // indirect 22 | github.com/hashicorp/go-hclog v1.4.0 // indirect 23 | github.com/hashicorp/go-retryablehttp v0.7.2 // indirect 24 | github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7 // indirect 25 | github.com/hashicorp/vault/api v1.9.0 26 | gocloud.dev v0.28.0 27 | gopkg.in/square/go-jose.v2 v2.6.0 // indirect 28 | ) 29 | 30 | replace gocloud.dev => ../../ 31 | -------------------------------------------------------------------------------- /runtimevar/etcdvar/localetcd.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2019 The Go Cloud Development Kit Authors 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Starts a local etcd instance via Docker. 17 | 18 | # https://coderwall.com/p/fkfaqq/safer-bash-scripts-with-set-euxo-pipefail 19 | set -euo pipefail 20 | 21 | # Clean up and run etcd. 22 | echo "Starting etcd..." 23 | docker rm -f etcd &> /dev/null || : 24 | docker run -d -p 2379:2379 -p 4001:4001 --name etcd quay.io/coreos/etcd:v3.5.4 /usr/local/bin/etcd --advertise-client-urls http://0.0.0.0:2379 --listen-client-urls http://0.0.0.0:2379 &> /dev/null 25 | echo "...done. Run \"docker rm -f etcd\" to clean up the container." 26 | echo 27 | -------------------------------------------------------------------------------- /internal/oc/trace_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | package oc 16 | 17 | import ( 18 | "regexp" 19 | "testing" 20 | ) 21 | 22 | type testDriver struct{} 23 | 24 | func TestProviderName(t *testing.T) { 25 | for _, test := range []struct { 26 | in interface{} 27 | want string 28 | }{ 29 | {nil, ""}, 30 | {testDriver{}, "gocloud.dev/internal/oc"}, 31 | {&testDriver{}, "gocloud.dev/internal/oc"}, 32 | {regexp.Regexp{}, "regexp"}, 33 | } { 34 | got := ProviderName(test.in) 35 | if got != test.want { 36 | t.Errorf("%v: got %q, want %q", test.in, got, test.want) 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /internal/testing/start_local_deps.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2019 The Go Cloud Development Kit Authors 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Starts all local instances needed for Go CDK tests. 17 | # You must have Docker installed. 18 | # Run this script from the top level of the tree, e.g.: 19 | # ./internal/testing/start_local_deps.sh 20 | 21 | # https://coderwall.com/p/fkfaqq/safer-bash-scripts-with-set-euxo-pipefail 22 | set -euo pipefail 23 | 24 | ./pubsub/kafkapubsub/localkafka.sh 25 | ./pubsub/rabbitpubsub/localrabbit.sh 26 | ./runtimevar/etcdvar/localetcd.sh 27 | ./docstore/mongodocstore/localmongo.sh 28 | ./secrets/hashivault/localvault.sh 29 | 30 | sleep 10 31 | -------------------------------------------------------------------------------- /azure/azurecloud/azurecloud.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | // Package azurecloud contains Wire providers for Azure services. 16 | package azurecloud // import "gocloud.dev/azure/azurecloud" 17 | 18 | import ( 19 | "github.com/google/wire" 20 | "gocloud.dev/blob/azureblob" 21 | "gocloud.dev/secrets/azurekeyvault" 22 | ) 23 | 24 | // Azure is a Wire provider set that includes the default wiring for all 25 | // Microsoft Azure services in this repository, but does not include 26 | // credentials. Individual services may require additional configuration. 27 | var Azure = wire.NewSet( 28 | azurekeyvault.Set, 29 | azureblob.Set, 30 | ) 31 | -------------------------------------------------------------------------------- /internal/website/content/howto/pubsub/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Pub/Sub" 3 | date: 2019-03-26T09:44:06-07:00 4 | showInSidenav: true 5 | --- 6 | 7 | The [`pubsub` package][] provides an easy and portable way to interact with 8 | publish/subscribe systems. This guide shows how to work with pubsub 9 | in the Go CDK. 10 | 11 | 12 | 13 | The [publish/subscribe model][] allows parts of a system to publish messages 14 | that other parts of a system may subscribe to. This is commonly used to 15 | arrange for work to happen at some point after an interactive frontend 16 | request is finished or in other event-driven computing. 17 | 18 | The [`pubsub` package][] supports operations to publish messages to a topic and 19 | to subscribe to receive messages from a topic. 20 | 21 | Subpackages contain driver implementations of pubsub for various services, 22 | including Cloud and on-prem solutions. You can develop your application 23 | locally using [`mempubsub`][], then deploy it to multiple Cloud providers with 24 | minimal initialization reconfiguration. 25 | 26 | [publish/subscribe model]: https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern 27 | [`pubsub` package]: https://godoc.org/gocloud.dev/pubsub 28 | [`mempubsub`]: https://godoc.org/gocloud.dev/pubsub/mempubsub 29 | 30 | -------------------------------------------------------------------------------- /mysql/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | package mysql_test 16 | 17 | import ( 18 | "context" 19 | "log" 20 | 21 | "gocloud.dev/mysql" 22 | ) 23 | 24 | func ExampleOpen() { 25 | // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored. 26 | // PRAGMA: On gocloud.dev, hide lines until the next blank line. 27 | ctx := context.Background() 28 | 29 | // Replace this with your actual settings. 30 | db, err := mysql.Open(ctx, "mysql://user:password@localhost/testdb") 31 | if err != nil { 32 | log.Fatal(err) 33 | } 34 | defer db.Close() 35 | 36 | // Use database in your program. 37 | db.Exec("CREATE TABLE foo (bar INT);") 38 | } 39 | -------------------------------------------------------------------------------- /samples/guestbook/aws/variables.tf: -------------------------------------------------------------------------------- 1 | # Copyright 2018 The Go Cloud Development Kit Authors 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 | # https://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 | 15 | variable "region" { 16 | type = string 17 | description = "Region to create resources in. See https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html for valid values." 18 | } 19 | 20 | variable "ssh_public_key" { 21 | type = string 22 | description = "A public key line in .ssh/authorized_keys format to use to authenticate to your instance. This must be added to your SSH agent for provisioning to succeed." 23 | } 24 | 25 | variable "paramstore_var" { 26 | default = "/guestbook/motd" 27 | description = "The location in SSM Parameter Store of the Message of the Day variable." 28 | } 29 | 30 | -------------------------------------------------------------------------------- /postgres/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | package postgres_test 16 | 17 | import ( 18 | "context" 19 | "log" 20 | 21 | "gocloud.dev/postgres" 22 | ) 23 | 24 | func ExampleOpen() { 25 | // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored. 26 | // PRAGMA: On gocloud.dev, hide lines until the next blank line. 27 | ctx := context.Background() 28 | 29 | // Replace this with your actual settings. 30 | db, err := postgres.Open(ctx, "postgres://user:password@localhost/testdb") 31 | if err != nil { 32 | log.Fatal(err) 33 | } 34 | defer db.Close() 35 | 36 | // Use database in your program. 37 | db.Exec("CREATE TABLE foo (bar INT);") 38 | } 39 | -------------------------------------------------------------------------------- /samples/gocdk-runtimevar/main_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | package main 16 | 17 | import ( 18 | "context" 19 | "flag" 20 | "testing" 21 | 22 | "github.com/google/go-cmdtest" 23 | ) 24 | 25 | var update = flag.Bool("update", false, "replace test file contents with output") 26 | 27 | func Test(t *testing.T) { 28 | ts, err := cmdtest.Read(".") 29 | if err != nil { 30 | t.Fatal(err) 31 | } 32 | 33 | type result struct { 34 | out []byte 35 | err error 36 | } 37 | 38 | ctx := context.Background() 39 | 40 | runtimevar := cmdtest.InProcessProgram("gocdk-runtimevar", func() int { 41 | return run(ctx) 42 | }) 43 | ts.Commands["gocdk-runtimevar"] = runtimevar 44 | ts.Run(t, *update) 45 | } 46 | -------------------------------------------------------------------------------- /samples/order/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Go CDK Image Conversion Sample 6 | 7 | 8 | 9 | 10 | 13 |
    14 |
    15 | 16 | 17 |
    18 |
    19 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /docstore/mongodocstore/localmongo.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2019 The Go Cloud Development Kit Authors 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Starts two local MongoDB instances (v3 and v4) via Docker listening on two 17 | # different ports. 18 | 19 | # https://coderwall.com/p/fkfaqq/safer-bash-scripts-with-set-euxo-pipefail 20 | set -euo pipefail 21 | 22 | echo "Starting MongoDB v4 listening on 27017..." 23 | docker rm -f mongo4 &> /dev/null || : 24 | docker run -d --name mongo4 -p 27017:27017 mongo:4 &> /dev/null 25 | echo "...done. Run \"docker rm -f mongo4\" to clean up the container." 26 | echo 27 | 28 | echo "Starting MongoDB v3 listening on 27018..." 29 | docker rm -f mongo3 &> /dev/null || : 30 | docker run -d --name mongo3 -p 27018:27017 mongo:3 &> /dev/null 31 | echo "...done. Run \"docker rm -f mongo3\" to clean up the container." 32 | echo 33 | 34 | -------------------------------------------------------------------------------- /samples/appengine/helloworld.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | // A simple "hello world" application using server.Server, to be run on 16 | // Google App Engine (GAE). 17 | package main 18 | 19 | import ( 20 | "fmt" 21 | "log" 22 | "net/http" 23 | "os" 24 | 25 | "github.com/gorilla/mux" 26 | "gocloud.dev/server" 27 | ) 28 | 29 | func main() { 30 | r := mux.NewRouter() 31 | r.HandleFunc("/", handle) 32 | 33 | port := os.Getenv("PORT") 34 | if port == "" { 35 | port = "8080" 36 | } 37 | srv := server.New(r, nil) 38 | log.Printf("Listening on port %s", port) 39 | log.Fatal(srv.ListenAndServe(fmt.Sprintf(":%s", port))) 40 | } 41 | 42 | func handle(w http.ResponseWriter, r *http.Request) { 43 | if r.URL.Path != "/" { 44 | http.NotFound(w, r) 45 | return 46 | } 47 | fmt.Fprint(w, "Hello world!") 48 | } 49 | -------------------------------------------------------------------------------- /internal/testing/listdeps.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2019 The Go Cloud Development Kit Authors 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | set -euo pipefail 17 | 18 | # To run this script manually to update alldeps: 19 | # 20 | # $ internal/testing/listdeps.sh > internal/testing/alldeps 21 | # 22 | # Make sure to use the same version of Go as used by tests 23 | # (see .github/actions/tests.yml) when updating the alldeps file. 24 | tmpfile=$(mktemp) 25 | function cleanup() { 26 | rm -rf "$tmpfile" 27 | } 28 | trap cleanup EXIT 29 | 30 | 31 | sed -e '/^#/d' -e '/^$/d' allmodules | awk '{print $1}' | while read -r path || [[ -n "$path" ]]; do 32 | ( cd "$path" && go list -mod=readonly -deps -f '{{with .Module}}{{.Path}}{{end}}' ./... >> "$tmpfile") 33 | done 34 | 35 | # Sort using the native byte values to keep results from different environment consistent. 36 | LC_ALL=C sort "$tmpfile" | uniq 37 | -------------------------------------------------------------------------------- /samples/order/order-form.htmlt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Create Order - Go CDK Image Conversion Sample 6 | 7 | 8 | 9 | 10 | 13 |
    14 |

    Submit an Image

    15 |
    16 | 19 |
    20 | 21 |
    22 | 25 |
    26 | 27 |
    28 |
    29 | 30 |
    31 |
    32 |
    33 | 34 | 35 | -------------------------------------------------------------------------------- /mysql/gcpmysql/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | package gcpmysql_test 16 | 17 | import ( 18 | "context" 19 | "log" 20 | 21 | "gocloud.dev/mysql" 22 | _ "gocloud.dev/mysql/gcpmysql" 23 | ) 24 | 25 | func Example() { 26 | // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored. 27 | // PRAGMA: On gocloud.dev, add a blank import: _ "gocloud.dev/mysql/gcpmysql" 28 | // PRAGMA: On gocloud.dev, hide lines until the next blank line. 29 | ctx := context.Background() 30 | 31 | // Replace this with your actual settings. 32 | db, err := mysql.Open(ctx, 33 | "gcpmysql://user:password@example-project/region/my-instance01/testdb") 34 | if err != nil { 35 | log.Fatal(err) 36 | } 37 | defer db.Close() 38 | 39 | // Use database in your program. 40 | db.Exec("CREATE TABLE foo (bar INT);") 41 | } 42 | -------------------------------------------------------------------------------- /mysql/azuremysql/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | package azuremysql_test 16 | 17 | import ( 18 | "context" 19 | "log" 20 | 21 | "gocloud.dev/mysql" 22 | _ "gocloud.dev/mysql/azuremysql" 23 | ) 24 | 25 | func Example() { 26 | // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored. 27 | // PRAGMA: On gocloud.dev, add a blank import: _ "gocloud.dev/mysql/azuremysql" 28 | // PRAGMA: On gocloud.dev, hide lines until the next blank line. 29 | ctx := context.Background() 30 | 31 | // Replace this with your actual settings. 32 | db, err := mysql.Open(ctx, 33 | "azuremysql://user:password@example00.mysql.database.azure.com/testdb") 34 | if err != nil { 35 | log.Fatal(err) 36 | } 37 | defer db.Close() 38 | 39 | // Use database in your program. 40 | db.Exec("CREATE TABLE foo (bar INT);") 41 | } 42 | -------------------------------------------------------------------------------- /samples/gocdk-blob/main_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | package main 16 | 17 | import ( 18 | "flag" 19 | "os" 20 | "path/filepath" 21 | "strings" 22 | "testing" 23 | 24 | "github.com/google/go-cmdtest" 25 | ) 26 | 27 | var update = flag.Bool("update", false, "replace test file contents with output") 28 | 29 | func Test(t *testing.T) { 30 | ts, err := cmdtest.Read(".") 31 | if err != nil { 32 | t.Fatal(err) 33 | } 34 | ts.Commands["gocdk-blob"] = cmdtest.InProcessProgram("gocdk-blob", run) 35 | ts.Setup = func(rootdir string) error { 36 | // On Windows, convert "\" to "/" and add a leading "/": 37 | slashdir := filepath.ToSlash(rootdir) 38 | if os.PathSeparator != '/' && !strings.HasPrefix(slashdir, "/") { 39 | slashdir = "/" + slashdir 40 | } 41 | return os.Setenv("ROOTDIR_URL", "file://"+slashdir) 42 | } 43 | ts.Run(t, *update) 44 | } 45 | -------------------------------------------------------------------------------- /samples/gocdk-docstore/docstore.ct: -------------------------------------------------------------------------------- 1 | # Copyright 2019 The Go Cloud Development Kit Authors 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 | # https://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 | 15 | # Tests of the gocdk-doctore program. 16 | 17 | $ setenv url mem://sample-coll/ID?filename=save 18 | 19 | # Collection is initially empty. 20 | $ gocdk-docstore ls ${url} 21 | 22 | $ gocdk-docstore put -d 2019-05-01 -id first ${url} message1 23 | Put message: first 2019-05-01: message1 24 | 25 | $ gocdk-docstore ls -d 2019-05-01 ${url} 26 | first 2019-05-01: message1 27 | 28 | $ gocdk-docstore put -d 2019-05-02 -id second ${url} message2 29 | $ gocdk-docstore ls -d 2019-05-02 ${url} 30 | Put message: second 2019-05-02: message2 31 | second 2019-05-02: message2 32 | 33 | $ gocdk-docstore update first ${url} new-message 34 | updated: first 2019-05-01: new-message 35 | 36 | 37 | # Delete everything. 38 | $ gocdk-docstore delete ${url} 39 | 40 | # Collection is empty again. 41 | $ gocdk-docstore ls ${url} 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /mysql/awsmysql/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | package awsmysql_test 16 | 17 | import ( 18 | "context" 19 | "log" 20 | 21 | "gocloud.dev/mysql" 22 | _ "gocloud.dev/mysql/awsmysql" 23 | ) 24 | 25 | func Example() { 26 | // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored. 27 | // PRAGMA: On gocloud.dev, add a blank import: _ "gocloud.dev/mysql/awsmysql" 28 | // PRAGMA: On gocloud.dev, hide lines until the next blank line. 29 | ctx := context.Background() 30 | 31 | // Replace these with your actual settings. 32 | db, err := mysql.Open(ctx, 33 | "awsmysql://myrole:swordfish@example01.xyzzy.us-west-1.rds.amazonaws.com/testdb") 34 | if err != nil { 35 | log.Fatal(err) 36 | } 37 | defer db.Close() 38 | 39 | // Use database in your program. 40 | db.ExecContext(ctx, "CREATE TABLE foo (bar INT);") 41 | } 42 | -------------------------------------------------------------------------------- /postgres/gcppostgres/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | package gcppostgres_test 16 | 17 | import ( 18 | "context" 19 | "log" 20 | 21 | "gocloud.dev/postgres" 22 | _ "gocloud.dev/postgres/gcppostgres" 23 | ) 24 | 25 | func Example() { 26 | // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored. 27 | // PRAGMA: On gocloud.dev, add a blank import: _ "gocloud.dev/postgres/gcppostgres" 28 | // PRAGMA: On gocloud.dev, hide lines until the next blank line. 29 | ctx := context.Background() 30 | 31 | // Replace this with your actual settings. 32 | db, err := postgres.Open(ctx, 33 | "gcppostgres://user:password@example-project/region/my-instance01/testdb") 34 | if err != nil { 35 | log.Fatal(err) 36 | } 37 | defer db.Close() 38 | 39 | // Use database in your program. 40 | db.Exec("CREATE TABLE foo (bar INT);") 41 | } 42 | -------------------------------------------------------------------------------- /postgres/awspostgres/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | package awspostgres_test 16 | 17 | import ( 18 | "context" 19 | "log" 20 | 21 | "gocloud.dev/postgres" 22 | _ "gocloud.dev/postgres/awspostgres" 23 | ) 24 | 25 | func Example() { 26 | // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored. 27 | // PRAGMA: On gocloud.dev, add a blank import: _ "gocloud.dev/postgres/awspostgres" 28 | // PRAGMA: On gocloud.dev, hide lines until the next blank line. 29 | ctx := context.Background() 30 | 31 | // Replace these with your actual settings. 32 | db, err := postgres.Open(ctx, 33 | "awspostgres://myrole:swordfish@example01.xyzzy.us-west-1.rds.amazonaws.com/testdb") 34 | if err != nil { 35 | log.Fatal(err) 36 | } 37 | defer db.Close() 38 | 39 | // Use database in your program. 40 | db.ExecContext(ctx, "CREATE TABLE foo (bar INT);") 41 | } 42 | -------------------------------------------------------------------------------- /internal/testing/git_tag_modules.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2021 The Go Cloud Development Kit Authors 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # This script should be run from the root directory. 17 | # It creates git tags for all marked modules listed in the allmodules file. 18 | set -euo pipefail 19 | 20 | function usage() { 21 | echo 22 | echo "Usage: git_tag_modules.sh vX.X.X" 1>&2 23 | echo " vX.X.X: the git tag version" 24 | exit 64 25 | } 26 | 27 | if [[ $# -ne 1 ]] ; then 28 | echo "Need at least one argument" 29 | usage 30 | fi 31 | version="$1" 32 | 33 | sed -e '/^#/d' -e '/^$/d' allmodules | awk '{ print $1, $2}' | while read -r path update || [[ -n "$path" ]] ; do 34 | if [[ "$update" != "yes" ]]; then 35 | echo "$path is not marked to be released" 36 | continue 37 | fi 38 | 39 | tag="$version" 40 | if [[ "$path" != "." ]]; then 41 | tag="$path/$version" 42 | fi 43 | echo "Creating tag: ${tag}" 44 | git tag "$tag" 45 | done 46 | -------------------------------------------------------------------------------- /internal/website/makeimports.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2018 The Go Cloud Development Kit Authors 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # This script generates Markdown files that will include suitable for 17 | # "go get"'s import path redirection feature (see 18 | # https://golang.org/cmd/go/#hdr-Remote_import_paths) in the final Hugo output. 19 | 20 | 21 | # https://coderwall.com/p/fkfaqq/safer-bash-scripts-with-set-euxo-pipefail 22 | # except x is too verbose 23 | set -euo pipefail 24 | 25 | # Change into repository root. 26 | cd "$(dirname "$0")/../.." 27 | OUTDIR=internal/website/content 28 | 29 | for pkg in $(internal/website/listnewpkgs.sh); do 30 | # Only consider directories that contain Go source files. 31 | outfile="$OUTDIR/$pkg/_index.md" 32 | mkdir -p "$OUTDIR/$pkg" 33 | echo "Generating gocloud.dev/$pkg" 34 | echo "---" >> "$outfile" 35 | echo "title: gocloud.dev/$pkg" >> "$outfile" 36 | echo "type: pkg" >> "$outfile" 37 | echo "---" >> "$outfile" 38 | done 39 | 40 | -------------------------------------------------------------------------------- /samples/gocdk-blob/blob.ct: -------------------------------------------------------------------------------- 1 | # Copyright 2019 The Go Cloud Development Kit Authors 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 | # https://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 | 15 | # Tests of the gocdk-blob program. 16 | 17 | # ROOTDIR_URL is a platform-specific environment variable set 18 | # in main_test.go. 19 | 20 | # Create a subdirectory so we can use fileblob. 21 | $ mkdir bucket 22 | 23 | # List an empty bucket: valid, but no output. 24 | $ gocdk-blob ls ${ROOTDIR_URL}/bucket 25 | 26 | $ fecho hello.txt hello world 27 | $ gocdk-blob upload ${ROOTDIR_URL}/bucket hw < hello.txt 28 | 29 | $ gocdk-blob ls ${ROOTDIR_URL}/bucket 30 | hw 31 | 32 | $ gocdk-blob download ${ROOTDIR_URL}/bucket hw 33 | hello world 34 | 35 | # Error downloading a bucket that doesn't exist. 36 | # For now we can't use this test case, because the output won't be the same across operating systems. 37 | #$ gocdk-blob download ${ROOTDIR_URL}/bucket noexist --> FAIL 38 | #gocdk-blob: Failed to read "noexist": blob (code=NotFound): stat ${SLASHDIR}/bucket/noexist: no such file or directory 39 | 40 | -------------------------------------------------------------------------------- /samples/order/common.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | package main 16 | 17 | import ( 18 | "time" 19 | ) 20 | 21 | // Order represents an order for a single image operation. 22 | type Order struct { 23 | ID string // unique ID, randomly generated 24 | Email string // email address of customer 25 | InImage string // name of input image 26 | OutImage string // name of output image; empty if there was an error 27 | CreateTime time.Time // time the order was created 28 | FinishTime time.Time // time the order was finished 29 | Note string // note to the customer from the processor, describing success or error 30 | DocstoreRevision interface{} 31 | } 32 | 33 | // OrderRequest is a request for an order. It is the contents of the messages 34 | // sent to the requests topic. 35 | type OrderRequest struct { 36 | ID string 37 | Email string 38 | InImage string 39 | CreateTime time.Time 40 | } 41 | -------------------------------------------------------------------------------- /samples/guestbook/aws/outputs.tf: -------------------------------------------------------------------------------- 1 | # Copyright 2018 The Go Cloud Development Kit Authors 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 | # https://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 | 15 | output "region" { 16 | value = var.region 17 | description = "Region the resources were created in." 18 | } 19 | 20 | output "bucket" { 21 | value = aws_s3_bucket.guestbook.id 22 | description = "Name of the S3 bucket created to store images." 23 | } 24 | 25 | output "database_host" { 26 | value = aws_db_instance.guestbook.address 27 | description = "Host name of the RDS MySQL database." 28 | } 29 | 30 | output "database_root_password" { 31 | value = random_string.db_password.result 32 | sensitive = true 33 | description = "Password for the root user of the RDS MySQL databse." 34 | } 35 | 36 | output "paramstore_var" { 37 | value = var.paramstore_var 38 | description = "Location of the SSM Parameter Store Message of the Day variable." 39 | } 40 | 41 | output "instance_host" { 42 | value = aws_instance.guestbook.public_ip 43 | description = "Address of the EC2 instance." 44 | } 45 | 46 | -------------------------------------------------------------------------------- /blob/blob_reader_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | package blob_test 16 | 17 | import ( 18 | "context" 19 | "testing" 20 | "testing/iotest" 21 | 22 | "gocloud.dev/blob/memblob" 23 | ) 24 | 25 | // TestReader verifies that blob.Reader implements io package interfaces correctly. 26 | func TestReader(t *testing.T) { 27 | const myKey = "testkey" 28 | 29 | bucket := memblob.OpenBucket(nil) 30 | defer bucket.Close() 31 | 32 | // Get some random data, of a large enough size to require multiple 33 | // reads/writes given our buffer size of 1024. 34 | data, err := randomData(1024*10 + 10) 35 | if err != nil { 36 | t.Fatal(err) 37 | } 38 | 39 | // Write the data to a key. 40 | ctx := context.Background() 41 | bucket.WriteAll(ctx, myKey, data, nil) 42 | 43 | // Create a blob.Reader. 44 | r, err := bucket.NewReader(ctx, myKey, nil) 45 | if err != nil { 46 | t.Fatal(err) 47 | } 48 | defer r.Close() 49 | if err := iotest.TestReader(r, data); err != nil { 50 | t.Error(err) 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /gcerrors/errors_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | package gcerrors 16 | 17 | import ( 18 | "context" 19 | "io" 20 | "testing" 21 | 22 | "gocloud.dev/internal/gcerr" 23 | ) 24 | 25 | type wrappedErr struct { 26 | err error 27 | } 28 | 29 | func (w wrappedErr) Error() string { return "wrapped" } 30 | 31 | func (w wrappedErr) Unwrap() error { return w.err } 32 | 33 | func TestCode(t *testing.T) { 34 | for _, test := range []struct { 35 | in error 36 | want ErrorCode 37 | }{ 38 | {nil, OK}, 39 | {gcerr.New(AlreadyExists, nil, 1, ""), AlreadyExists}, 40 | {wrappedErr{gcerr.New(PermissionDenied, nil, 1, "")}, PermissionDenied}, 41 | {context.Canceled, Canceled}, 42 | {context.DeadlineExceeded, DeadlineExceeded}, 43 | {wrappedErr{context.Canceled}, Canceled}, 44 | {wrappedErr{context.DeadlineExceeded}, DeadlineExceeded}, 45 | {io.EOF, Unknown}, 46 | } { 47 | got := Code(test.in) 48 | if got != test.want { 49 | t.Errorf("%v: got %s, want %s", test.in, got, test.want) 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /docstore/drivertest/util.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | package drivertest 16 | 17 | import ( 18 | "math/rand" 19 | "sync" 20 | 21 | "github.com/google/uuid" 22 | "gocloud.dev/docstore/driver" 23 | ) 24 | 25 | // MakeUniqueStringDeterministicForTesting uses a specified seed value to 26 | // produce the same sequence of values in driver.UniqueString for testing. 27 | // 28 | // Call when running tests that will be replayed. 29 | func MakeUniqueStringDeterministicForTesting(seed int64) { 30 | r := &randReader{r: rand.New(rand.NewSource(seed))} 31 | uuid.SetRand(r) 32 | } 33 | 34 | type randReader struct { 35 | mu sync.Mutex 36 | r *rand.Rand 37 | } 38 | 39 | func (r *randReader) Read(buf []byte) (int, error) { 40 | r.mu.Lock() 41 | defer r.mu.Unlock() 42 | return r.r.Read(buf) 43 | } 44 | 45 | // MustDocument is like driver.NewDocument, but panics on error. 46 | func MustDocument(doc interface{}) driver.Document { 47 | dd, err := driver.NewDocument(doc) 48 | if err != nil { 49 | panic(err) 50 | } 51 | return dd 52 | } 53 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Go Cloud Development Kit Authors 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 | # https://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 | 15 | name: tests 16 | on: [push, pull_request] 17 | jobs: 18 | build: 19 | strategy: 20 | fail-fast: false 21 | matrix: 22 | # Note: we used to include windows-latest, but it's super 23 | # flaky on Github runners, lots of OOMs. 24 | os: [ubuntu-latest, macos-latest] 25 | # When updating this, make sure to also update the 26 | # latest_go_version variable in internal/testing/runchecks.sh. 27 | go-version: [1.20.x] 28 | include: 29 | - go-version: 1.19.x 30 | os: ubuntu-latest 31 | 32 | runs-on: ${{ matrix.os }} 33 | steps: 34 | - name: Install Go 35 | uses: actions/setup-go@v2 36 | with: 37 | go-version: ${{ matrix.go-version }} 38 | - name: Checkout code 39 | uses: actions/checkout@v2 40 | with: 41 | fetch-depth: 2 # required for codecov 42 | - name: Run Tests 43 | shell: bash 44 | run: 'internal/testing/runchecks.sh' 45 | -------------------------------------------------------------------------------- /internal/testing/terraform/terraform.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | // Package terraform provides a function to read Terraform output. 16 | package terraform // import "gocloud.dev/internal/testing/terraform" 17 | 18 | import ( 19 | "encoding/json" 20 | "fmt" 21 | "os/exec" 22 | ) 23 | 24 | // ReadOutput runs `terraform output` on the given directory and returns 25 | // the parsed result. 26 | func ReadOutput(dir string) (map[string]Output, error) { 27 | c := exec.Command("terraform", "output", "-json") 28 | c.Dir = dir 29 | data, err := c.Output() 30 | if err != nil { 31 | return nil, fmt.Errorf("read terraform output: %v", err) 32 | } 33 | var parsed map[string]Output 34 | if err := json.Unmarshal(data, &parsed); err != nil { 35 | return nil, fmt.Errorf("read terraform output: %v", err) 36 | } 37 | return parsed, nil 38 | } 39 | 40 | // Output describes a single output value. 41 | type Output struct { 42 | Type string `json:"type"` // one of "string", "list", or "map" 43 | Sensitive bool `json:"sensitive"` 44 | Value interface{} `json:"value"` 45 | } 46 | -------------------------------------------------------------------------------- /internal/website/content/concepts/as.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Using provider-specific APIs 3 | date: 2019-05-10T11:17:09-07:00 4 | weight: 3 5 | --- 6 | 7 | It is not feasible or desirable for APIs like `blob.Bucket` to encompass the 8 | full functionality of every provider. Rather, we intend to provide a subset 9 | of the most commonly used functionality. There will be cases where a 10 | developer wants to access provider-specific functionality, such as unexposed 11 | APIs or data fields, errors, or options. This can be accomplished using `As` 12 | functions. 13 | 14 | 15 | 16 | ## `As` {#as} 17 | 18 | `As` functions in the APIs provide the user a way to escape the Go CDK 19 | abstraction to access provider-specific types. They might be used as an 20 | interim solution until a feature request to the Go CDK is implemented. Or, 21 | the Go CDK may choose not to support specific features, and the use of `As` 22 | will be permanent. 23 | 24 | Using `As` implies that the resulting code is no longer portable; the 25 | provider-specific code will need to be ported in order to switch providers. 26 | Therefore, it should be avoided if possible. 27 | 28 | Each API includes examples demonstrating how to use its various `As` 29 | functions, and each provider implementation documents what types it supports 30 | for each. 31 | 32 | Usage: 33 | 34 | 1. Declare a variable of the provider-specific type you want to access. 35 | 2. Pass a pointer to it to `As`. 36 | 3. If the type is supported, `As` will return `true` and copy the 37 | provider-specific type into your variable. Otherwise, it will return `false`. 38 | 39 | Provider-specific types that are intended to be mutable will be exposed 40 | as a pointer to the underlying type. 41 | -------------------------------------------------------------------------------- /pubsub/kafkapubsub/localkafka.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2019 The Go Cloud Development Kit Authors 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Starts a local Kafka instance (plus supporting Zookeeper) via Docker. 17 | 18 | # https://coderwall.com/p/fkfaqq/safer-bash-scripts-with-set-euxo-pipefail 19 | set -euo pipefail 20 | 21 | # Clean up and run Zookeeper. 22 | echo "Starting Zookeeper (for Kafka)..." 23 | docker rm -f zookeeper &> /dev/null || : 24 | docker run -d --net=host --name=zookeeper -e ZOOKEEPER_CLIENT_PORT=2181 confluentinc/cp-zookeeper:6.0.1 &> /dev/null 25 | echo "...done. Run \"docker rm -f zookeeper\" to clean up the container." 26 | echo 27 | 28 | # Clean up and run Kafka. 29 | echo "Starting Kafka..." 30 | docker rm -f kafka &> /dev/null || : 31 | docker run -d --net=host -p 9092:9092 --name=kafka -e KAFKA_ZOOKEEPER_CONNECT=localhost:2181 -e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092 -e KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 -e KAFKA_AUTO_CREATE_TOPICS_ENABLE=false -e KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS=100 confluentinc/cp-kafka:6.0.1 &> /dev/null 32 | echo "...done. Run \"docker rm -f kafka\" to clean up the container." 33 | echo 34 | -------------------------------------------------------------------------------- /internal/website/listnewpkgs.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2019 The Go Cloud Development Kit Authors 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # This script lists the package names that makeimports.sh would create 17 | # _index.md files for, one per line. 18 | 19 | 20 | # https://coderwall.com/p/fkfaqq/safer-bash-scripts-with-set-euxo-pipefail 21 | # except x is too verbose 22 | set -euo pipefail 23 | 24 | # Change into repository root. 25 | cd "$(dirname "$0")/../.." 26 | OUTDIR=internal/website/content 27 | 28 | shopt -s nullglob # glob patterns that don't match turn into the empty string, instead of themselves 29 | 30 | function files_exist() { # assumes nullglob 31 | [[ ${1:-""} != "" ]] 32 | } 33 | 34 | # Find all directories that do not begin with '.' or '_' or contain 'testdata'. Use the %P printf 35 | # directive to remove the initial './'. 36 | for pkg in $(find . -type d \( -name '[._]?*' -prune -o -name testdata -prune -o -printf '%P ' \)); do 37 | # Only consider directories that contain Go source files. 38 | outfile="$OUTDIR/$pkg/_index.md" 39 | if files_exist $pkg/*.go && [[ ! -e "$outfile" ]]; then 40 | echo "$pkg" 41 | fi 42 | done 43 | 44 | -------------------------------------------------------------------------------- /runtimevar/oc_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | package runtimevar_test 16 | 17 | import ( 18 | "context" 19 | "testing" 20 | 21 | "go.opencensus.io/stats/view" 22 | "gocloud.dev/internal/oc" 23 | "gocloud.dev/internal/testing/octest" 24 | "gocloud.dev/runtimevar" 25 | "gocloud.dev/runtimevar/constantvar" 26 | ) 27 | 28 | func TestOpenCensus(t *testing.T) { 29 | ctx := context.Background() 30 | te := octest.NewTestExporter(runtimevar.OpenCensusViews) 31 | defer te.Unregister() 32 | 33 | v := constantvar.New(1) 34 | defer v.Close() 35 | if _, err := v.Watch(ctx); err != nil { 36 | t.Fatal(err) 37 | } 38 | cctx, cancel := context.WithCancel(ctx) 39 | cancel() 40 | _, _ = v.Watch(cctx) 41 | 42 | seen := false 43 | const driver = "gocloud.dev/runtimevar/constantvar" 44 | for _, row := range te.Counts() { 45 | if _, ok := row.Data.(*view.CountData); !ok { 46 | continue 47 | } 48 | if row.Tags[0].Key == oc.ProviderKey && row.Tags[0].Value == driver { 49 | seen = true 50 | break 51 | } 52 | } 53 | if !seen { 54 | t.Errorf("did not see count row with provider=%s", driver) 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /docstore/oc_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Cloud Development Kit Authors 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 | // https://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 | 15 | package docstore_test 16 | 17 | import ( 18 | "context" 19 | "testing" 20 | 21 | "gocloud.dev/docstore" 22 | "gocloud.dev/docstore/memdocstore" 23 | "gocloud.dev/gcerrors" 24 | "gocloud.dev/internal/testing/octest" 25 | ) 26 | 27 | func TestOpenCensus(t *testing.T) { 28 | ctx := context.Background() 29 | te := octest.NewTestExporter(docstore.OpenCensusViews) 30 | defer te.Unregister() 31 | 32 | coll, err := memdocstore.OpenCollection("_id", nil) 33 | if err != nil { 34 | t.Fatal(err) 35 | } 36 | defer coll.Close() 37 | 38 | // ActionList.Do. 39 | if err := coll.Create(ctx, map[string]interface{}{"_id": "a", "count": 0}); err != nil { 40 | t.Fatal(err) 41 | } 42 | 43 | // Query.Get. 44 | iter := coll.Query().Get(ctx) 45 | iter.Stop() 46 | 47 | const driver = "gocloud.dev/docstore/memdocstore" 48 | 49 | diff := octest.Diff(te.Spans(), te.Counts(), "gocloud.dev/docstore", driver, []octest.Call{ 50 | {Method: "ActionList.Do", Code: gcerrors.OK}, 51 | {Method: "Query.Get", Code: gcerrors.OK}, 52 | }) 53 | if diff != "" { 54 | t.Error(diff) 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /blob/wrapped_bucket_test.go: -------------------------------------------------------------------------------- 1 | package blob_test 2 | 3 | import ( 4 | "context" 5 | "os" 6 | "path/filepath" 7 | "strings" 8 | "testing" 9 | 10 | "gocloud.dev/blob" 11 | "gocloud.dev/blob/fileblob" 12 | ) 13 | 14 | func TestPrefixedBucket(t *testing.T) { 15 | dir, cleanup := newTempDir() 16 | defer cleanup() 17 | bucket, err := fileblob.OpenBucket(dir, nil) 18 | if err != nil { 19 | t.Fatal(err) 20 | } 21 | 22 | const contents = "contents" 23 | ctx := context.Background() 24 | if err := bucket.WriteAll(ctx, "foo/bar/baz.txt", []byte(contents), nil); err != nil { 25 | t.Fatal(err) 26 | } 27 | 28 | wrapped := blob.PrefixedBucket(bucket, "foo/bar/") 29 | defer wrapped.Close() 30 | 31 | got, err := wrapped.ReadAll(ctx, "baz.txt") 32 | if err != nil { 33 | t.Fatal(err) 34 | } 35 | if string(got) != contents { 36 | t.Errorf("got %q want %q", string(got), contents) 37 | } 38 | } 39 | 40 | func TestSingleKeyBucket(t *testing.T) { 41 | dir, cleanup := newTempDir() 42 | defer cleanup() 43 | bucket, err := fileblob.OpenBucket(dir, nil) 44 | if err != nil { 45 | t.Fatal(err) 46 | } 47 | 48 | const contents = "contents" 49 | ctx := context.Background() 50 | if err := bucket.WriteAll(ctx, "foo/bar.txt", []byte(contents), nil); err != nil { 51 | t.Fatal(err) 52 | } 53 | 54 | dirpath := filepath.ToSlash(dir) 55 | if os.PathSeparator != '/' && !strings.HasPrefix(dirpath, "/") { 56 | dirpath = "/" + dirpath 57 | } 58 | 59 | wrapped, err := blob.OpenBucket(ctx, "file://"+dirpath+"?key=foo/bar.txt") 60 | if err != nil { 61 | t.Fatal(err) 62 | } 63 | defer wrapped.Close() 64 | got, err := wrapped.ReadAll(ctx, "") 65 | if err != nil { 66 | t.Fatal(err) 67 | } 68 | if string(got) != contents { 69 | t.Errorf("got %q want %q", string(got), contents) 70 | } 71 | } 72 | --------------------------------------------------------------------------------