Skip to content

Commit

Permalink
Google client update paths
Browse files Browse the repository at this point in the history
  • Loading branch information
araddon committed Aug 6, 2016
1 parent 63ed08b commit ae40f60
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 27 deletions.
32 changes: 16 additions & 16 deletions GLOCKFILE
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
github.com/araddon/dateparse a19b713c2e31cec89903deb95b4d053e9e7b4db5
cloud.google.com/go f9495dc7d5d062d1b04f594f06347c9a38be96bb
github.com/araddon/dateparse 86f3852b68545a6c7db45021ba05484cd15a372b
github.com/araddon/gou 50a94aa4a3fb69e8fbde05df290fcb49fa685e07
github.com/araddon/qlbridge b890cc9b548b80c97574b870ac8507ee2c7a4db9
github.com/araddon/qlbridge a256367c0a9113485a78a814a2fb66d455db9f15
github.com/bitly/go-hostpool d0e59c22a56e8dadfed24f74f452cea5a52722d2
github.com/bmizerany/assert b7ed37b82869576c289d7d97fb2bbd8b64a0cb28
github.com/coreos/etcd 207c92b62785d220edc74ed791fd8a22a18e378e
github.com/coreos/go-etcd de3514f25635bbfb024fdaf2a8d5f67378492675
github.com/dchest/siphash 6d8617816bb5d8268011ffbfb8720f17ce9af63c
github.com/go-sql-driver/mysql 3654d25ec346ee8ce71a68431025458d52a38ac0
github.com/gogo/protobuf 2752d97bbd91927dd1c43296dbf8700e50e2708c
github.com/golang/protobuf 3852dcfda249c2097355a6aabb199a28d97b30df
github.com/go-sql-driver/mysql 0b58b37b664c21f3010e836f1b931e1d0b0b0685
github.com/gogo/protobuf a4cceea7a401a73fefafd1a21fedbd4694124a82
github.com/golang/protobuf c3cefd437628a0b7d31b34fe44b3a7a540e98527
github.com/google/btree 7d79101e329e5a3adf994758c578dab82b90c017
github.com/hashicorp/go-immutable-radix afc5a0dbb18abdf82c277a7bc01533e81fa1d6b8
github.com/hashicorp/go-memdb 98f52f52d7a476958fa9da671354d270c50661a7
github.com/hashicorp/golang-lru a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4
github.com/jmoiron/sqlx bdae0c3219c3bdb92f3d7c70825018712787c933
github.com/kr/pretty add1dbc86daf0f983cd4a48ceb39deb95c729b67
github.com/jmoiron/sqlx 7396209bbeada6a4fcc28aa9408f89b2e71cac39
github.com/kr/pretty 737b74a46c4bf788349f72cb256fed10aea4d0ac
github.com/kr/text 7cafcd837844e784b526369c9bce262804aebc60
github.com/leekchan/timeutil 28917288c48df3d2c1cfe468c273e0b2adda0aa5
github.com/lytics/cloudstorage 08dcbf0c85da78d1bd02f6d548b83e1ca4763671
github.com/lytics/cloudstorage 2edc5b3d8e00f8080edfb7dccd7b7c1c837e30be
github.com/lytics/confl f12b6bace2ff295fc6730f6dbaf009289e2f6e80
github.com/lytics/datemath 988020f3ad34814005ab10b6c7863e31672b5f63
github.com/lytics/dfa 63e35f788f7fa5203fcd2dcd7e318da5a1b981e5
Expand All @@ -26,16 +27,15 @@ github.com/lytics/metafora eb26f00432a98228e44de8e074b9627fc4c1e457
github.com/lytics/sereno f6128b640de0742892a439b3672ac88637df977d
github.com/mattbaird/elastigo 34c4c4d8425cbdcbc8e257943a2044d5e9f7dab5
github.com/mb0/glob 1eb79d2de6c448664e7272f8b9fe1938239e3aaa
github.com/nats-io/gnatsd 8e99354b8ca40ae921463cea076abf460dd12d62
github.com/nats-io/nats d498de06529cce1536449f220f54217a10c319e5
github.com/nats-io/gnatsd 86e883ce7d54d925e3018a761da38074eb732218
github.com/nats-io/nats aea64801fab70c44603b524e0a0210c06727c972
github.com/nats-io/nuid 4f84f5f3b2786224e336af2e13dba0a0a80b76fa
github.com/pborman/uuid c55201b036063326c5b1b89ccfe45a184973d073
github.com/sony/sonyflake fa881fb1052b152e977c41023052c2f2a1c475e9
github.com/ugorji/go 45ce7596ace4534e47b69051a92aef7b64ec7b3f
golang.org/x/crypto 1f22c0103821b9390939b6776727195525381532
golang.org/x/net b400c2eff1badec7022a8c8f5bea058b6315eed7
golang.org/x/oauth2 df5b72659a3b1789a345ea643bb7c28442681652
google.golang.org/api 57212573ccf9e4f69f4caa0336831697e29adcd6
google.golang.org/cloud ebfe3819c9ab4acaf086ae57e4cbd7dee683baf0
google.golang.org/grpc a0ff1e78a98cd140c2d18a0210ab0a2a183a2b4c
golang.org/x/net 075e191f18186a8ff2becaf64478e30f4545cdad
golang.org/x/oauth2 04e1573abc896e70388bd387a69753c378d46466
google.golang.org/api 3f131f305a2ae45080e71fdb780128cc92e8745e
google.golang.org/genproto 9f48fed629f137e474fb7422a911dfad49e2eaae
google.golang.org/grpc 35896af9ad39c1fb1b1cd925fe3621be361e3d81
gopkg.in/mgo.v2 22287bab4379e1fbf6002fb4eb769888f3fb224c
9 changes: 6 additions & 3 deletions backends/datastore/datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"sync"
"time"

"cloud.google.com/go/datastore"
u "github.com/araddon/gou"
"golang.org/x/net/context"
"golang.org/x/oauth2/google"
"golang.org/x/oauth2/jwt"
"google.golang.org/cloud"
"google.golang.org/cloud/datastore"
"google.golang.org/api/option"

"github.com/araddon/qlbridge/datasource"
"github.com/araddon/qlbridge/rel"
Expand Down Expand Up @@ -147,7 +147,10 @@ func (m *GoogleDSDataSource) connect() error {
m.authConfig = conf

ctx := context.Background()
client, err := datastore.NewClient(ctx, m.cloudProjectId, cloud.WithTokenSource(conf.TokenSource(ctx)))

//client, err := datastore.NewClient(ctx, "project-id", option.WithTokenSource(conf.TokenSource(ctx)))
client, err := datastore.NewClient(ctx, m.cloudProjectId, option.WithTokenSource(conf.TokenSource(ctx)))
//client, err := datastore.NewClient(ctx, m.cloudProjectId, google.WithTokenSource(conf.TokenSource(ctx)))
if err != nil {
u.Errorf("could not create google datastore client: project:%s jwt:%s err=%v", m.cloudProjectId, m.jwtFile, err)
return err
Expand Down
9 changes: 5 additions & 4 deletions backends/datastore/datastore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import (
"testing"
"time"

"cloud.google.com/go/datastore"
u "github.com/araddon/gou"
"github.com/bmizerany/assert"
_ "github.com/go-sql-driver/mysql"
"github.com/jmoiron/sqlx"
"golang.org/x/net/context"
"golang.org/x/oauth2/google"
"google.golang.org/cloud"
"google.golang.org/cloud/datastore"
"google.golang.org/api/option"

"github.com/araddon/qlbridge/datasource"
"github.com/araddon/qlbridge/plan"
Expand Down Expand Up @@ -243,9 +243,10 @@ func loadAuth(jsonKey []byte) (context.Context, *datastore.Client) {
if err != nil {
log.Fatal(err)
}
//ctx := cloud.NewContext(*gds.GoogleProject, conf.Client(oauth2.NoContext))
ctx := context.Background()
client, err := datastore.NewClient(ctx, *gds.GoogleProject, cloud.WithTokenSource(conf.TokenSource(ctx)))
//client, err := datastore.NewClient(ctx, *gds.GoogleProject, cloud.WithTokenSource(conf.TokenSource(ctx)))

client, err := datastore.NewClient(ctx, *gds.GoogleProject, option.WithTokenSource(conf.TokenSource(ctx)))
if err != nil {
panic(err.Error())
}
Expand Down
2 changes: 1 addition & 1 deletion backends/datastore/resultreader.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"database/sql/driver"
"time"

"cloud.google.com/go/datastore"
u "github.com/araddon/gou"
"google.golang.org/cloud/datastore"

"github.com/araddon/qlbridge/datasource"
"github.com/araddon/qlbridge/exec"
Expand Down
4 changes: 2 additions & 2 deletions backends/datastore/sql_to_datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"strings"
"time"

"cloud.google.com/go/datastore"
u "github.com/araddon/gou"
"golang.org/x/net/context"
"google.golang.org/cloud/datastore"

"github.com/araddon/qlbridge/datasource"
"github.com/araddon/qlbridge/exec"
Expand Down Expand Up @@ -374,7 +374,7 @@ func (m *SqlToDatstore) Delete(key driver.Value) (int, error) {
}
return 1, nil
}
func (m *SqlToDatstore) DeleteExpression(where expr.Node) (int, error) {
func (m *SqlToDatstore) DeleteExpression(pln interface{}, where expr.Node) (int, error) {
delKey := datasource.KeyFromWhere(where)
if delKey != nil {
return m.Delete(delKey.Key())
Expand Down
2 changes: 1 addition & 1 deletion updatepackages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ cd $GOPATH/src/github.com/sony/sonyflake && git checkout master && git pull
cd $GOPATH/src/golang.org/x/net && git checkout master && git pull
cd $GOPATH/src/golang.org/x/oauth2 && git checkout master && git pull
cd $GOPATH/src/google.golang.org/api && git checkout master && git pull
cd $GOPATH/src/google.golang.org/cloud && git checkout master && git pull
cd $GOPATH/src/cloud.google.com/go/ && git checkout master && git pull
cd $GOPATH/src/google.golang.org/grpc && git checkout master && git pull
# this one is a pain, don't update manually, c headers?
#cd $GOPATH/src/gopkg.in/mgo.v2 && git checkout master && git pull
Expand Down

0 comments on commit ae40f60

Please sign in to comment.