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

Unified Diff: go/src/infra/gae/libs/wrapper/memory/datastore_data.go

Issue 1143053004: Simplify memory package interface. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: switch to blasters Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: go/src/infra/gae/libs/wrapper/memory/datastore_data.go
diff --git a/go/src/infra/gae/libs/wrapper/memory/datastore_data.go b/go/src/infra/gae/libs/wrapper/memory/datastore_data.go
index 4d748dc78da6f85c41b4b5faf096662ce25866cb..ee185cdc4c0d1f96c9a1f3ac52e2f0eea95ca1ab 100644
--- a/go/src/infra/gae/libs/wrapper/memory/datastore_data.go
+++ b/go/src/infra/gae/libs/wrapper/memory/datastore_data.go
@@ -152,7 +152,7 @@ func (d *dataStoreData) entsKeyLocked(key *datastore.Key) (*memCollection, *data
func putPrelim(ns string, knr goon.KindNameResolver, src interface{}) (*datastore.Key, *propertyList, error) {
key := newKeyObj(ns, knr, src)
- if !KeyCouldBeValid(ns, key, UserKeyOnly) {
+ if !keyCouldBeValid(ns, key, userKeyOnly) {
// TODO(riannucci): different error for Put-ing to reserved Keys?
return nil, nil, datastore.ErrInvalidKey
}
@@ -196,7 +196,7 @@ func (d *dataStoreData) putInner(key *datastore.Key, data *propertyList) (*datas
func getInner(ns string, knr goon.KindNameResolver, dst interface{}, getColl func(*datastore.Key) (*memCollection, error)) error {
key := newKeyObj(ns, knr, dst)
- if !KeyValid(ns, key, AllowSpecialKeys) {
+ if !keyValid(ns, key, allowSpecialKeys) {
return datastore.ErrInvalidKey
}
@@ -229,7 +229,7 @@ func (d *dataStoreData) get(ns string, dst interface{}) error {
}
func (d *dataStoreData) del(ns string, key *datastore.Key) error {
- if !KeyValid(ns, key, UserKeyOnly) {
+ if !keyValid(ns, key, userKeyOnly) {
return datastore.ErrInvalidKey
}
@@ -444,7 +444,7 @@ func (td *txnDataStoreData) get(ns string, dst interface{}) error {
}
func (td *txnDataStoreData) del(ns string, key *datastore.Key) error {
- if !KeyValid(ns, key, UserKeyOnly) {
+ if !keyValid(ns, key, userKeyOnly) {
return datastore.ErrInvalidKey
}
return td.writeMutation(false, key, nil)
« no previous file with comments | « go/src/infra/gae/libs/wrapper/memory/datastore.go ('k') | go/src/infra/gae/libs/wrapper/memory/datastore_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698