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

Unified Diff: impl/dummy/dummy.go

Issue 1253263002: Make rawdatastore API safer for writing filters. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: fix comments Created 5 years, 5 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
« no previous file with comments | « filter/featureBreaker/rds.go ('k') | impl/dummy/dummy_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/dummy/dummy.go
diff --git a/impl/dummy/dummy.go b/impl/dummy/dummy.go
index c9a607926b385391689e11d650de5e7e4da2fba2..11b1a8278be46781484ce8c071b3d1dac3dfd529 100644
--- a/impl/dummy/dummy.go
+++ b/impl/dummy/dummy.go
@@ -64,25 +64,17 @@ func ni() error {
type rds struct{}
-func (rds) NewKey(string, string, int64, rawdatastore.Key) rawdatastore.Key { panic(ni()) }
-func (rds) DecodeKey(string) (rawdatastore.Key, error) { panic(ni()) }
-func (rds) KeyFromTokens(a, n string, t []rawdatastore.KeyTok) (rawdatastore.Key, error) { panic(ni()) }
-func (rds) Put(rawdatastore.Key, rawdatastore.PropertyLoadSaver) (rawdatastore.Key, error) {
- panic(ni())
-}
-func (rds) Get(rawdatastore.Key, rawdatastore.PropertyLoadSaver) error { panic(ni()) }
-func (rds) Delete(rawdatastore.Key) error { panic(ni()) }
-func (rds) PutMulti([]rawdatastore.Key, []rawdatastore.PropertyLoadSaver) ([]rawdatastore.Key, error) {
- panic(ni())
+func (rds) NewKey(kind string, sid string, iid int64, par rawdatastore.Key) rawdatastore.Key {
+ return rawdatastore.NewKey("dummy~appid", "", kind, sid, iid, par)
}
-func (rds) GetMulti([]rawdatastore.Key, []rawdatastore.PropertyLoadSaver) error { panic(ni()) }
-func (rds) DeleteMulti([]rawdatastore.Key) error { panic(ni()) }
-func (rds) NewQuery(string) rawdatastore.Query { panic(ni()) }
-func (rds) Run(rawdatastore.Query) rawdatastore.Iterator { panic(ni()) }
-func (rds) GetAll(rawdatastore.Query, *[]rawdatastore.PropertyMap) ([]rawdatastore.Key, error) {
+func (rds) DecodeKey(string) (rawdatastore.Key, error) { panic(ni()) }
+func (rds) PutMulti([]rawdatastore.Key, []rawdatastore.PropertyLoadSaver, rawdatastore.PutMultiCB) error {
panic(ni())
}
-func (rds) Count(rawdatastore.Query) (int, error) { panic(ni()) }
+func (rds) GetMulti([]rawdatastore.Key, rawdatastore.GetMultiCB) error { panic(ni()) }
+func (rds) DeleteMulti([]rawdatastore.Key, rawdatastore.DeleteMultiCB) error { panic(ni()) }
+func (rds) NewQuery(string) rawdatastore.Query { panic(ni()) }
+func (rds) Run(rawdatastore.Query, rawdatastore.RunCB) error { panic(ni()) }
func (rds) RunInTransaction(func(context.Context) error, *rawdatastore.TransactionOptions) error {
panic(ni())
}
@@ -147,7 +139,8 @@ func TaskQueue() taskqueue.Interface { return dummyTQInst }
type i struct{}
func (i) AccessToken(scopes ...string) (token string, expiry time.Time, err error) { panic(ni()) }
-func (i) AppID() string { panic(ni()) }
+func (i) AppID() string { return "dummy~appid" }
+func (i) GetNamespace() string { return "dummy-namespace" }
func (i) ModuleHostname(module, version, instance string) (string, error) { panic(ni()) }
func (i) ModuleName() string { panic(ni()) }
func (i) DefaultVersionHostname() string { panic(ni()) }
« no previous file with comments | « filter/featureBreaker/rds.go ('k') | impl/dummy/dummy_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698