About this project
This repository provides auto-generated Go client libraries for Google APIs, derived from the Google Discovery Service's JSON description files. Each API is exposed as its own importable package, so you can pull in only what you need, for example google.golang.org/api/tasks/v1 or google.golang.org/api/urlshortener/v1, then construct a service with NewService(ctx).
Key characteristics:
- Generated code: libraries are produced by a generator from Discovery documents, so they may contain breaking changes between releases; the generator and its output are considered beta.
- Support status: officially supported by Google, but the libraries are described as complete and in maintenance mode, meaning critical bugs and security issues are addressed while new features are not added.
- Cloud APIs: for Google Cloud Platform services such as Datastore or Pub/Sub, the README directs users to the separate Cloud Client Libraries for Go instead.
Authorization:
- By default, services use Google Application Default Credentials, allowing applications to run in many environments without explicit configuration.
- JSON key files can be supplied via option.WithAuthCredentialsFile with an explicit credential type (for example ServiceAccount), or JSON credentials directly via option.WithAuthCredentialsJSON.
- The older option.WithCredentialsFile and option.WithCredentialsJSON functions are deprecated due to a potential security risk.
- For finer control, an oauth2.TokenSource from golang.org/x/oauth2 can be passed with option.WithTokenSource.
Documentation and examples:
- A Getting Started guide and an examples directory are referenced for longer tutorials and sample usage.
- Package documentation is available on pkg.go.dev, and community support is directed to the golang-nuts mailing list.
This is a developer-facing SDK collection rather than an end-user application; its value lies in giving Go programs typed access to a broad range of Google APIs with consistent authentication patterns.
Comments
0 people shared their preference · Deer Point appears after 10 participants
Sign in to join the discussion.