gocloud.dev: gocloud.dev Index | Files | Directories

package cloud

import "gocloud.dev"

Package cloud contains a library and tools for open cloud development in Go.

The Go Cloud Development Kit (Go CDK) allows application developers to seamlessly deploy cloud applications on any combination of cloud providers. It does this by providing stable, idiomatic interfaces for common uses like storage and databases. Think `database/sql` for cloud products.

At the core of the Go CDK are common "portable types" implemented by cloud providers. For example, objects of the blob.Bucket portable type can be created using gcsblob.OpenBucket, s3blob.OpenBucket, or any other provider. Then, the blob.Bucket can be used throughout your application without worrying about the underlying implementation.

The Go CDK works well with a code generator called Wire (https://github.com/google/wire/blob/master/README.md). It creates human-readable code that only imports the cloud SDKs for providers you use. This allows the Go CDK to grow to support any number of cloud providers, without increasing compile times or binary sizes, and avoiding any side effects from `init()` functions.

For non-reference documentation, see https://gocloud.dev/

URLs

See https://gocloud.dev/concepts/urls/ for a discussion of URLs in the Go CDK.

As

See https://gocloud.dev/concepts/as/ for a discussion of how to write provider-specific code with the Go CDK.

Index

Package Files

doc.go

Directories

PathSynopsis
awsPackage aws provides fundamental Wire providers for Amazon Web Services (AWS).
aws/awscloudPackage awscloud contains Wire providers for AWS services.
aws/rdsPackage rds contains Wire providers that are common across RDS.
azure/azurecloudPackage azurecloud contains Wire providers for Azure services.
azure/azuredbPackage azuredb contains Wire providers that are common across Azure Database.
blobPackage blob provides an easy and portable way to interact with blobs within a storage location, hereafter called a "bucket".
blob/azureblobPackage azureblob provides a blob implementation that uses Azure Storage’s BlockBlob.
blob/driverPackage driver defines a set of interfaces that the blob package uses to interact with the underlying blob services.
blob/drivertestPackage drivertest provides a conformance test for implementations of driver.
blob/fileblobPackage fileblob provides a blob implementation that uses the filesystem.
blob/gcsblobPackage gcsblob provides a blob implementation that uses GCS.
blob/memblobPackage memblob provides an in-memory blob implementation.
blob/s3blobPackage s3blob provides a blob implementation that uses S3.
gcerrorsPackage gcerrors provides support for getting error codes from errors returned by Go CDK APIs.
gcpPackage gcp provides fundamental Wire providers and types for Google Cloud Platform (GCP).
gcp/cloudsqlPackage cloudsql contains Wire providers that are common across Google Cloud SQL.
gcp/gcpcloudPackage gcpcloud contains Wire providers for GCP services.
healthPackage health provides health check handlers.
health/sqlhealthPackage sqlhealth provides a health check for a SQL database connection.
internal/batcherPackage batcher supports batching of items.
internal/cmd/gocdk
internal/contributebotcontributebot is a service for keeping the Go Cloud Development Kit project tidy.
internal/contributebot/webhook
internal/docstorePackage docstore provides a portable implementation of a document store.
internal/docstore/driverPackage driver defines a set of interfaces that the docstore package uses to interact with the underlying services.
internal/docstore/drivertestPackage drivertest provides a conformance test for implementations of driver.
internal/docstore/dynamodocstorePackage dynamodocstore provides a docstore implementation backed by AWS DynamoDB.
internal/docstore/firedocstorePackage firedocstore provides an implementation of the docstore API for Google Cloud Firestore.
internal/docstore/internal/fieldsPackage fields provides a view of the fields of a struct that follows the Go rules, amended to consider tags and case insensitivity.
internal/docstore/memdocstorePackage memdocstore provides an in-memory implementation of the docstore API.
internal/docstore/mongodocstorePackage mongodocstore provides an implementation of the docstore API for MongoDB.
internal/escapePackage escape includes helpers for escaping and unescaping strings.
internal/gcerrPackage gcerr provides an error type for Go CDK APIs.
internal/ocPackage oc supports OpenCensus tracing and metrics for the Go Cloud Development Kit.
internal/openurlPackage openurl provides helpers for URLMux and URLOpeners in portable APIs.
internal/retryPackage retry provides retry logic.
internal/testing/octestPackage octest supports testing of OpenCensus integrations.
internal/testing/setup
internal/testing/terraformPackage terraform provides a function to read Terraform output.
internal/testing/test-summarySummarizes the output of go test.
internal/tracePackage trace provides support for OpenCensus tracing.
internal/useragentPackage useragent includes constants and utilitiesfor setting the User-Agent for Go CDK connections to GCP.
internal/website/gatherexamplesCommand gatherexamples extracts examples in a Go module into a JSON-formatted object.
mysqlPackage mysql provides functions to open MySQL databases with OpenCensus instrumentation.
mysql/azuremysqlPackage azuremysql provides connections to Azure Database for MySQL.
mysql/cloudmysqlPackage cloudmysql provides connections to managed MySQL Cloud SQL instances.
mysql/rdsmysqlPackage rdsmysql provides connections to AWS RDS MySQL instances.
postgresPackage postgres provides functions to open PostgreSQL databases with OpenCensus instrumentation.
postgres/cloudpostgresPackage cloudpostgres provides connections to managed PostgreSQL Cloud SQL instances.
postgres/rdspostgresPackage rdspostgres provides connections to AWS RDS PostgreSQL instances.
pubsubPackage pubsub provides an easy and portable way to interact with publish/ subscribe systems.
pubsub/awssnssqsPackage awssnssqs provides two implementations of pubsub.Topic, one that sends messages to AWS SNS (Simple Notification Service), and one that sends messages to SQS (Simple Queuing Service).
pubsub/azuresbPackage azuresb provides an implementation of pubsub using Azure Service Bus Topic and Subscription.
pubsub/driverPackage driver defines a set of interfaces that the pubsub package uses to interact with the underlying pubsub services.
pubsub/drivertestPackage drivertest provides a conformance test for implementations of driver.
pubsub/gcppubsubPackage gcppubsub provides a pubsub implementation that uses GCP PubSub.
pubsub/kafkapubsubPackage kafkapubsub provides an implementation of pubsub for Kafka.
pubsub/mempubsubPackage mempubsub provides an in-memory pubsub implementation.
pubsub/natspubsubPackage natspubsub provides a pubsub implementation for NATS.io.
pubsub/rabbitpubsubPackage rabbitpubsub provides an pubsub implementation for RabbitMQ.
requestlogPackage requestlog provides an http.Handler that logs information about requests.
runtimevarPackage runtimevar provides an easy and portable way to watch runtime configuration variables.
runtimevar/awsparamstorePackage awsparamstore provides a runtimevar implementation with variables read from AWS Systems Manager Parameter Store (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-paramstore.html) Use OpenVariable to construct a *runtimevar.Variable.
runtimevar/blobvarPackage blobvar provides a runtimevar implementation with variables read from a blob.Bucket.
runtimevar/constantvarPackage constantvar provides a runtimevar implementation with Variables that never change.
runtimevar/driverPackage driver provides the interface for providers of runtimevar.
runtimevar/drivertestPackage drivertest provides a conformance test for implementations of runtimevar.
runtimevar/etcdvarPackage etcdvar provides a runtimevar implementation with variables backed by etcd.
runtimevar/filevarPackage filevar provides a runtimevar implementation with variables backed by the filesystem.
runtimevar/gcpruntimeconfigPackage gcpruntimeconfig provides a runtimevar implementation with variables read from GCP Cloud Runtime Configurator (https://cloud.google.com/deployment-manager/runtime-configurator).
runtimevar/httpvarPackage httpvar provides a runtimevar implementation with variables backed by http endpoint.
samples/gocdk-blobgocdk-blob demonstrates the use of the Go CDK blob package in a simple command-line application.
samples/gocdk-pubsubgocdk-pubsub demonstrates the use of the Go CDK pubsub package in a simple command-line application.
samples/gocdk-runtimevargocdk-runtimevar demonstrates the use of the Go CDK runtimevar package in a simple command-line application.
samples/gocdk-secretsgocdk-secrets demonstrates the use of the Go CDK secrets package in a simple command-line application.
samples/guestbookguestbook is a sample application that records visitors' messages, displays a cloud banner, and an administrative message.
samples/guestbook/aws/provision_dbThe provision_db program connects to an RDS database and initializes it with SQL from stdin.
samples/guestbook/gcp/deployThe deploy program builds the Guestbook server locally and deploys it to GKE.
samples/guestbook/gcp/provision_dbThe provision_db program connects to a Cloud SQL database and initializes it with SQL from a file.
samples/guestbook/localdb
samples/serverCommand server runs a simple HTTP server with integrated Stackdriver tracing and health checks.
samples/tutorialCommand upload saves files to blob storage on GCP, AWS, and Azure.
secretsPackage secrets provides an easy and portable way to encrypt and decrypt messages.
secrets/awskmsPackage awskms provides a secrets implementation backed by AWS KMS.
secrets/azurekeyvaultPackage azurekeyvault provides a secrets implementation backed by Azure KeyVault.
secrets/driverPackage driver defines interfaces to be implemented for providers of the secrets package.
secrets/drivertestPackage drivertest provides a conformance test for implementations of the secrets driver.
secrets/gcpkmsPackage gcpkms provides a secrets implementation backed by Google Cloud KMS.
secrets/localsecretsPackage localsecrets provides a secrets implementation using a locally locally provided symmetric key.
secrets/vaultPackage vault provides a secrets implementation using the Transit Secrets Engine of Vault by Hashicorp.
serverPackage server provides a preconfigured HTTP server with diagnostic hooks.
server/driverPackage driver defines an interface for custom HTTP listeners.
server/sdserverPackage sdserver provides the diagnostic hooks for a server using Stackdriver.
server/xrayserverPackage xrayserver provides the diagnostic hooks for a server using AWS X-Ray.
tests/aws/app
tests/gcp/appThe app command is a test app that is initialized with the GCP SDK.
tests/internal/testutilPackage testutil contains utility functions used by server tests against different platforms.

Updated 2019-05-22. Refresh now. Tools for package owners.