| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 type ds struct{} | 65 type ds struct{} |
| 66 | 66 |
| 67 func (ds) NewKey(kind string, sid string, iid int64, par datastore.Key) datastor
e.Key { | 67 func (ds) NewKey(kind string, sid string, iid int64, par datastore.Key) datastor
e.Key { |
| 68 return datastore.NewKey("dummy~appid", "", kind, sid, iid, par) | 68 return datastore.NewKey("dummy~appid", "", kind, sid, iid, par) |
| 69 } | 69 } |
| 70 func (ds) DecodeKey(string) (datastore.Key, error) { panic(ni()) } | 70 func (ds) DecodeKey(string) (datastore.Key, error) { panic(ni()) } |
| 71 func (ds) PutMulti([]datastore.Key, []datastore.PropertyMap, datastore.PutMultiC
B) error { | 71 func (ds) PutMulti([]datastore.Key, []datastore.PropertyMap, datastore.PutMultiC
B) error { |
| 72 panic(ni()) | 72 panic(ni()) |
| 73 } | 73 } |
| 74 func (ds) GetMulti([]datastore.Key, datastore.GetMultiCB) error { panic(ni
()) } | 74 func (ds) GetMulti([]datastore.Key, datastore.MultiMetaGetter, datastore.GetMult
iCB) error { |
| 75 » panic(ni()) |
| 76 } |
| 75 func (ds) DeleteMulti([]datastore.Key, datastore.DeleteMultiCB) error { panic(ni
()) } | 77 func (ds) DeleteMulti([]datastore.Key, datastore.DeleteMultiCB) error { panic(ni
()) } |
| 76 func (ds) NewQuery(string) datastore.Query { panic(ni
()) } | 78 func (ds) NewQuery(string) datastore.Query { panic(ni
()) } |
| 77 func (ds) Run(datastore.Query, datastore.RawRunCB) error { panic(ni
()) } | 79 func (ds) Run(datastore.Query, datastore.RawRunCB) error { panic(ni
()) } |
| 78 func (ds) RunInTransaction(func(context.Context) error, *datastore.TransactionOp
tions) error { | 80 func (ds) RunInTransaction(func(context.Context) error, *datastore.TransactionOp
tions) error { |
| 79 panic(ni()) | 81 panic(ni()) |
| 80 } | 82 } |
| 81 | 83 |
| 82 var dummyDSInst = ds{} | 84 var dummyDSInst = ds{} |
| 83 | 85 |
| 84 // Datastore returns a dummy datastore.RawInterface implementation suitable | 86 // Datastore returns a dummy datastore.RawInterface implementation suitable |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 func (i) IsCapabilityDisabled(err error) bool
{ panic(ni()) } | 148 func (i) IsCapabilityDisabled(err error) bool
{ panic(ni()) } |
| 147 func (i) IsOverQuota(err error) bool
{ panic(ni()) } | 149 func (i) IsOverQuota(err error) bool
{ panic(ni()) } |
| 148 func (i) IsTimeoutError(err error) bool
{ panic(ni()) } | 150 func (i) IsTimeoutError(err error) bool
{ panic(ni()) } |
| 149 | 151 |
| 150 var dummyInfoInst = i{} | 152 var dummyInfoInst = i{} |
| 151 | 153 |
| 152 // Info returns a dummy info.Interface implementation suitable for embedding. | 154 // Info returns a dummy info.Interface implementation suitable for embedding. |
| 153 // Every method panics with a message containing the name of the method which | 155 // Every method panics with a message containing the name of the method which |
| 154 // was unimplemented. | 156 // was unimplemented. |
| 155 func Info() info.Interface { return dummyInfoInst } | 157 func Info() info.Interface { return dummyInfoInst } |
| OLD | NEW |