Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1335)

Side by Side Diff: impl/cloud/datastore.go

Issue 2217063003: Update cloud package. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/gae@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « impl/cloud/context.go ('k') | impl/cloud/datastore_test.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package cloud 5 package cloud
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "reflect" 9 "reflect"
10 "strings" 10 "strings"
11 "time" 11 "time"
12 12
13 "github.com/luci/luci-go/common/errors" 13 "github.com/luci/luci-go/common/errors"
14 14
15 "cloud.google.com/go/datastore"
15 ds "github.com/luci/gae/service/datastore" 16 ds "github.com/luci/gae/service/datastore"
16 infoS "github.com/luci/gae/service/info" 17 infoS "github.com/luci/gae/service/info"
17 "google.golang.org/cloud/datastore"
18 18
19 "golang.org/x/net/context" 19 "golang.org/x/net/context"
20 ) 20 )
21 21
22 type cloudDatastore struct { 22 type cloudDatastore struct {
23 client *datastore.Client 23 client *datastore.Client
24 } 24 }
25 25
26 func (cds *cloudDatastore) use(c context.Context) context.Context { 26 func (cds *cloudDatastore) use(c context.Context) context.Context {
27 return ds.SetRawFactory(c, func(ic context.Context, wantTxn bool) ds.Raw Interface { 27 return ds.SetRawFactory(c, func(ic context.Context, wantTxn bool) ds.Raw Interface {
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 case datastore.ErrNoSuchEntity: 523 case datastore.ErrNoSuchEntity:
524 return ds.ErrNoSuchEntity 524 return ds.ErrNoSuchEntity
525 case datastore.ErrConcurrentTransaction: 525 case datastore.ErrConcurrentTransaction:
526 return ds.ErrConcurrentTransaction 526 return ds.ErrConcurrentTransaction
527 case datastore.ErrInvalidKey: 527 case datastore.ErrInvalidKey:
528 return ds.ErrInvalidKey 528 return ds.ErrInvalidKey
529 default: 529 default:
530 return err 530 return err
531 } 531 }
532 } 532 }
OLDNEW
« no previous file with comments | « impl/cloud/context.go ('k') | impl/cloud/datastore_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698