Repolode
google

google/go-cloud

A Go library of portable APIs for blob storage, pub/sub, databases and secrets, so one codebase runs on any major cloud.

Stars
9,920
Forks
863
Open issues
2
Last commit
5 days ago

What is it?

The Go Cloud Development Kit (Go CDK) lets Go developers write cloud applications against stable, idiomatic interfaces for common services such as blob storage, databases, and messaging. Application code calls one API, while provider-specific drivers handle the details of each cloud, so the same program can be deployed across different cloud providers.

The kit covers blob storage, publish/subscribe, runtime-changing variables, document storage, secrets, and MySQL/PostgreSQL connections, along with server utilities for request logging, tracing, and health checks. Its design is modeled on Go's database/sql package. It pairs with the Wire code generator, which produces readable code that imports only the cloud SDKs a given application uses.

The APIs are documented as alpha, and the maintainers prefer to keep the existing drivers in this repository rather than add new ones, pointing contributors to separate repositories for new providers.

Key features

  • 01Portable blob storage API that works across S3, Google Cloud Storage and other backends.
  • 02Pub/sub, runtime variables, document storage and secrets APIs behind one interface each.
  • 03MySQL (including MariaDB) and PostgreSQL connection support.
  • 04Built-in request logging, tracing and health checking for servers.
  • 05Designed to pair with Wire so only the cloud SDKs you use are compiled in.

Use cases

  • Building a Go service that must run on AWS, GCP or Azure without rewriting storage code.
  • Abstracting object storage so local tests and production use different backends.
  • Adding portable secrets or pub/sub handling to a multi-cloud Go application.

Quick start

  1. 1

    Install the Go CDK module into your Go project

    go get gocloud.dev
  2. 2

    Read the documentation and tutorials on the project website

Things to know

  • The README says the APIs are still in alpha.
  • The project prefers maintaining existing drivers and is unlikely to accept new ones in the main repository.
  • Cloud-specific drivers you need may live in separate external repositories.

Topics

FAQ

What is go-cloud?
A Go library of portable APIs for blob storage, pub/sub, databases and secrets, so one codebase runs on any major cloud. The Go Cloud Development Kit (Go CDK) lets Go developers write cloud applications against stable, idiomatic interfaces for common services such as blob storage, databases, and messaging. Application code calls one API, while provider-specific drivers handle the details of each cloud, so the same program can be deployed across different cloud providers.
Is go-cloud free to use? What license does it have?
go-cloud is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is go-cloud still maintained?
Actively maintained. The last commit to go-cloud was on Nov 2, 2026.
What can I use go-cloud for?
Building a Go service that must run on AWS, GCP or Azure without rewriting storage code. Abstracting object storage so local tests and production use different backends. Adding portable secrets or pub/sub handling to a multi-cloud Go application.
How do I install go-cloud?
Install the Go CDK module into your Go project: go get gocloud.dev Read the documentation and tutorials on the project website
Where can I get go-cloud?
The source code and installation instructions are on GitHub: https://github.com/google/go-cloud

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects