| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package dummy | 5 package dummy |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "fmt" | 8 "fmt" |
| 9 "runtime" | 9 "runtime" |
| 10 "strings" | 10 "strings" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 | 68 |
| 69 return fmt.Errorf(niFmtStr, iface, funcName) | 69 return fmt.Errorf(niFmtStr, iface, funcName) |
| 70 } | 70 } |
| 71 | 71 |
| 72 /////////////////////////////////// ds //////////////////////////////////// | 72 /////////////////////////////////// ds //////////////////////////////////// |
| 73 | 73 |
| 74 type ds struct{} | 74 type ds struct{} |
| 75 | 75 |
| 76 func (ds) AllocateIDs(*datastore.Key, int) (int64, error) { | 76 func (ds) AllocateIDs([]*datastore.Key, datastore.PutMultiCB) error
{ panic(ni()) } |
| 77 » panic(ni()) | 77 func (ds) PutMulti([]*datastore.Key, []datastore.PropertyMap, datastore.PutMulti
CB) error { panic(ni()) } |
| 78 } | |
| 79 func (ds) PutMulti([]*datastore.Key, []datastore.PropertyMap, datastore.PutMulti
CB) error { | |
| 80 » panic(ni()) | |
| 81 } | |
| 82 func (ds) GetMulti([]*datastore.Key, datastore.MultiMetaGetter, datastore.GetMul
tiCB) error { | 78 func (ds) GetMulti([]*datastore.Key, datastore.MultiMetaGetter, datastore.GetMul
tiCB) error { |
| 83 panic(ni()) | 79 panic(ni()) |
| 84 } | 80 } |
| 85 func (ds) DeleteMulti([]*datastore.Key, datastore.DeleteMultiCB) error { panic(n
i()) } | 81 func (ds) DeleteMulti([]*datastore.Key, datastore.DeleteMultiCB) error { panic(n
i()) } |
| 86 func (ds) NewQuery(string) datastore.Query { panic(n
i()) } | |
| 87 func (ds) DecodeCursor(string) (datastore.Cursor, error) { panic(n
i()) } | 82 func (ds) DecodeCursor(string) (datastore.Cursor, error) { panic(n
i()) } |
| 88 func (ds) Count(*datastore.FinalizedQuery) (int64, error) { panic(n
i()) } | 83 func (ds) Count(*datastore.FinalizedQuery) (int64, error) { panic(n
i()) } |
| 89 func (ds) Run(*datastore.FinalizedQuery, datastore.RawRunCB) error { panic(n
i()) } | 84 func (ds) Run(*datastore.FinalizedQuery, datastore.RawRunCB) error { panic(n
i()) } |
| 90 func (ds) RunInTransaction(func(context.Context) error, *datastore.TransactionOp
tions) error { | 85 func (ds) RunInTransaction(func(context.Context) error, *datastore.TransactionOp
tions) error { |
| 91 panic(ni()) | 86 panic(ni()) |
| 92 } | 87 } |
| 93 func (ds) Testable() datastore.Testable { return nil } | 88 func (ds) Testable() datastore.Testable { return nil } |
| 94 | 89 |
| 95 var dummyDSInst = ds{} | 90 var dummyDSInst = ds{} |
| 96 | 91 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 func (mod) DefaultVersion(module string) (string, error) { panic(
ni()) } | 212 func (mod) DefaultVersion(module string) (string, error) { panic(
ni()) } |
| 218 func (mod) Start(module, version string) error { panic(
ni()) } | 213 func (mod) Start(module, version string) error { panic(
ni()) } |
| 219 func (mod) Stop(module, version string) error { panic(
ni()) } | 214 func (mod) Stop(module, version string) error { panic(
ni()) } |
| 220 | 215 |
| 221 var dummyModuleInst = mod{} | 216 var dummyModuleInst = mod{} |
| 222 | 217 |
| 223 // Module returns a dummy module.Interface implementation suitable for | 218 // Module returns a dummy module.Interface implementation suitable for |
| 224 // embedding. Every method panics with a message containing the name of the | 219 // embedding. Every method panics with a message containing the name of the |
| 225 // method which was unimplemented. | 220 // method which was unimplemented. |
| 226 func Module() module.Interface { return dummyModuleInst } | 221 func Module() module.Interface { return dummyModuleInst } |
| OLD | NEW |