Giter Club home page Giter Club logo

google-cloud-go's Introduction

Google Cloud Client Libraries for Go

Go Reference

Go packages for Google Cloud Platform services.

import "cloud.google.com/go"

To install the packages on your system, do not clone the repo. Instead:

  1. Change to your project directory: cd /my/cloud/project
  2. Get the package you want to use. Some products have their own module, so it's best to go get the package(s) you want to use:
go get cloud.google.com/go/firestore # Replace with the package you want to use.

NOTE: Some of these packages are under development, and may occasionally make backwards-incompatible changes.

Supported APIs

For an updated list of all of our released APIs please see our reference docs.

Our libraries are compatible with at least the three most recent, major Go releases. They are currently compatible with:

  • Go 1.22
  • Go 1.21
  • Go 1.20
  • Go 1.19

Authorization

By default, each API will use Google Application Default Credentials for authorization credentials used in calling the API endpoints. This will allow your application to run in many environments without requiring explicit configuration.

client, err := storage.NewClient(ctx)

To authorize using a JSON key file, pass option.WithCredentialsFile to the NewClient function of the desired package. For example:

client, err := storage.NewClient(ctx, option.WithCredentialsFile("path/to/keyfile.json"))

You can exert more control over authorization by using the golang.org/x/oauth2 package to create an oauth2.TokenSource. Then pass option.WithTokenSource to the NewClient function:

tokenSource := ...
client, err := storage.NewClient(ctx, option.WithTokenSource(tokenSource))

Contributing

Contributions are welcome. Please, see the CONTRIBUTING document for details.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See Contributor Code of Conduct for more information.

Links

google-cloud-go's People

Contributors

bhshkh avatar brennaepp avatar broady avatar codyoss avatar crwilcox avatar dsymonds avatar garye avatar gcf-owl-bot[bot] avatar hengfengli avatar hongalex avatar jba avatar jeanbza avatar mcgreevy avatar noahdietz avatar odeke-em avatar okdave avatar olavloite avatar pongad avatar quartzmo avatar rahul2393 avatar rakyll avatar release-please[bot] avatar renovate-bot avatar shollyman avatar tbpg avatar telpirion avatar tmdiep avatar tritone avatar yoshi-automation avatar yoshi-code-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

google-cloud-go's Issues

compute API ?

Is a compute API something that would potentially be interesting ?
I'm not a fan of using the auto-generated APIs so a nicely handmade compute API is something I'd be interested in contributing.

datastore: XG transactions

The v3 appengine client sets the allow_multiple_eg flag to true when a transaction is set as XG. I can't find a similar field in the v1 public proto, how does this work in v1 ?

datastore: ancestor queries

How should a proto for an ancestor query look ? It seems to me that ancestor queries are now done with a Filter, but I don't understand what the "property" field should be set to when using the HAS_ANCESTOR operator.

datastore: indexValues

The v3 API has a concept of "indexValues" which are opaque values because they don't have a valid "meaning" in the go world, they were used when things were loaded directly from an index due to a projection being set that way.
Am I correct in assuming this has been nuked and those now behave just like anything else and have a correct Value proto filled up for them ?

datastore: Current state ?

What is the current state of the datastore package in the experimental branch ?

I'm looking to write a program using datastore on compute engine and need such a package, and I'd like to help out however possible.
Is the current state of the experimental package what I should base myself on ? It hasn't been updated in a while now.

datastore: Saving/loading slices

I'm currently going through the testsuite converted from appengine.
One of the tests still failing is the ones involving saving/loading slices.

How should slices be loaded/saved ?
The two options seem to be either by having the same property mentioned multiple times, like this:

key:<path_element:<kind:"kind" name:"name0" > > property:<name:"B" value:<boolean_value:true > > property:<name:"F" value:<double_value:7 > > property: <name:"F" value:<double_value:8 > > property <name:"F" value:<double_value:9 > >

The other would be to use the list_value repeated field and only have the F property mentioned once, but containing 3 of the list_value repeated field.

the old v3 seems the use the former approach, but the later makes more sense for the v1 to me, is this correct ?

datastore: default to empty dataset

When working with datasets, the Datastore backend will normalize any empty datasets to the dataset of the calling application. This should be preferred to prepending "s~" to dataset ids as that is not always a valid operation.

NOT_FINISHED vs MORE_RESULTS_AFTER_LIMIT

I'd like confirmation on the behaviour of pagination with regards to the two MoreResultTypes listed in the title.
If I understand it correctly, pagination is only available when the result type is NOT_FINISHED, is this correct ?

datastore: supporting multiple types of composite filters

Right now Datastore doesn't natively support OR filters, however it is a feature we'd like to support. When switching from GAE Datastore to Cloud Datastore filters were explicitly changed from being represented as a list to a more hierarchical model to support this. There should be a plan in place for how to expose this, since now filters are assumed to be AND'ed together.

datastore: NextQuery in v1?

The v1 proto does not have a "Next" call accepting a NextQuery proto. I assume this means next queries are instead mapped to a query with a StartCursor set to the end cursor received in the previous RunQueryResult ?

testing library

Do you have a plan for providing a library for testing which allows you to easily write unit tests of your application?

datastore: meaning + GeoPoint

In the v3 proto file used by appengine, a lot of use is made of the "meaning" field to keep track whether something is a geopoint, byte array, time, etc.
In the v1 public API, the meaning field is specificly marked as "do not use", and additional Value fields have been added, it mostly maps over nicely, however, GeoPoint seems to be gone and I'm somewhat at loss as to how geopoint should be implemented with the new v1 proto API.

storage: Silently fails during API outage

ObjectWriter is silently failing during API outages, we should return an error if there is no object metadata can be retrieved.

        wc := NewWriter(ctx, bucket, object, nil)
    _, err := wc.Write([]byte("read/write test"))
    if err != nil {
        t.Error(err)
    }
    err = wc.Close()
    if err != nil {
        t.Error(err)
    }
    time.Sleep(time.Second)
    o, err := wc.Object() // o and err should not be both nil.

datastore: transactions

A transaction is an operation or set of operations that is atomic—either all of the operations in the transaction occur, or none of them occur. An application can perform multiple operations and calculations in a single transaction.

Details at /datastore/docs/concepts/transactions

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.