Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
The Go Cloud Development Kit (Go CDK): A library and tools for open cloud development in Go.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github github: retry issue and pull request templates (#539) Oct 12, 2018
aws aws/awscloud: add AWS portable types to the Services ProviderSet (#1550) Mar 20, 2019
azure
blob all: fix go vet warnings (#1593) Mar 22, 2019
gcerrors
gcp aws_azure: bring Wire provider sets for AWS and Azure up to date (#1624) Mar 21, 2019
health docs: update copyright headers to Go Cloud Development Kit (#1188) Jan 25, 2019
internal docstore/driver: add SplitActions (#1637) Mar 22, 2019
mysql mysql: add support for Azure Database for MySQL (#1558) Mar 20, 2019
postgres postgres: RDS PostgreSQL OpenUrl implementation (#1571) Mar 20, 2019
pubsub pubsub: use fixedBatchSize int instead of dynamicBatchSize bool (#1646) Mar 22, 2019
requestlog docs: update copyright headers to Go Cloud Development Kit (#1188) Jan 25, 2019
runtimevar aws_azure: bring Wire provider sets for AWS and Azure up to date (#1624) Mar 21, 2019
samples all: correct license headers (#1640) Mar 22, 2019
secrets all: fix go vet warnings (#1593) Mar 22, 2019
server
tests docs: update a few copyrights (#1228) Feb 2, 2019
wire wire: add back README.md (#968) Dec 14, 2018
.codecov.yml
.gitignore
.travis.yml
AUTHORS
CODE_OF_CONDUCT.md CODE_OF_CONDUCT: add notice (#79) Jun 8, 2018
CONTRIBUTING.md docs: update squash and release instructions for breaking changes (#1616 Mar 21, 2019
CONTRIBUTORS
LICENSE
README.md
doc.go internal/website: migrate CLI uploader tutorial (#1617) Mar 20, 2019
go.mod
go.sum mongodocstore: docstore driver for MongoDB (#1634) Mar 22, 2019

README.md

The Go Cloud Development Kit (Go CDK)

Write once, run on any cloud ☁️

Build Status godoc Coverage

The Go Cloud Development Kit (Go CDK) allows Go 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.

Imagine writing this to read from blob storage (like Google Cloud Storage or S3):

ctx := context.Background()
bucket, err := blob.OpenBucket(ctx, "s3://my-bucket")
if err != nil {
    return err
}
defer bucket.Close()
blobReader, err := bucket.NewReader(ctx, "my-blob", nil)
if err != nil {
    return err
}

and being able to run that code on any cloud you want, avoiding all the ceremony of cloud-specific authorization, tracing, SDKs and all the other code required to make an application portable across cloud platforms.

The project works well with a code generator called Wire. 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.

You can learn more about the project from our announcement blog post, or our talk at Next 2018:

Video: Building Go Applications for the Open Cloud (Cloud Next '18)

Installation

# First "cd" into your project directory if you have one to ensure "go get" uses
# Go modules (or not) appropriately. See "go help modules" for more info.
go get gocloud.dev

The Go CDK builds at the latest stable release of Go. Previous Go versions may compile but are not supported.

Documentation

Documentation for the project lives primarily on https://gocloud.dev/, including tutorials.

You can also browse Go package reference on godoc.org.

Project status

The APIs are still in alpha, but we think they are production-ready and are actively looking for feedback from early adopters. If you have comments or questions, you can post to the go-cloud mailing list or email us at go-cdk-feedback@google.com.

Current features

The Go CDK provides generic APIs for:

  • Unstructured binary (blob) storage
  • Publish/Subscribe (pubsub)
  • Variables that change at runtime (runtimevar)
  • Connecting to MySQL and PostgreSQL databases (mysql, postgres)
  • Server startup and diagnostics: request logging, tracing, and health checking (server)

Contributing

Thank you for your interest in contributing to the Go Cloud Development Kit! ❤️

Everyone is welcome to contribute, whether it's in the form of code, documentation, bug reports, feature requests, or anything else. We encourage you to experiment with the Go CDK and make contributions to help evolve it to meet your needs!

The GitHub repository at google/go-cloud contains some provider implementations for each portable API. We intend to include Google Cloud Platform, Amazon Web Services, and Azure implementations, as well as prominent open source providers and at least one implementation suitable for use in local testing. Unfortunately, we cannot support every cloud provider directly from the project; however, we encourage contributions in separate repositories.

If you create a repository that implements the Go CDK interfaces for other providers, let us know! We would be happy to link to it here and give you a heads-up before making any breaking changes.

See the contributing guide for more details.

Community

You can contact us on the go-cloud mailing list.

This project is covered by the Go Code of Conduct.

You can’t perform that action at this time.