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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 } | 69 } |
70 func (ds) PutMulti([]*datastore.Key, []datastore.PropertyMap, datastore.PutMulti
CB) error { | 70 func (ds) PutMulti([]*datastore.Key, []datastore.PropertyMap, datastore.PutMulti
CB) error { |
71 panic(ni()) | 71 panic(ni()) |
72 } | 72 } |
73 func (ds) GetMulti([]*datastore.Key, datastore.MultiMetaGetter, datastore.GetMul
tiCB) error { | 73 func (ds) GetMulti([]*datastore.Key, datastore.MultiMetaGetter, datastore.GetMul
tiCB) error { |
74 panic(ni()) | 74 panic(ni()) |
75 } | 75 } |
76 func (ds) DeleteMulti([]*datastore.Key, datastore.DeleteMultiCB) error { panic(n
i()) } | 76 func (ds) DeleteMulti([]*datastore.Key, datastore.DeleteMultiCB) error { panic(n
i()) } |
77 func (ds) NewQuery(string) datastore.Query { panic(n
i()) } | 77 func (ds) NewQuery(string) datastore.Query { panic(n
i()) } |
78 func (ds) DecodeCursor(string) (datastore.Cursor, error) { panic(n
i()) } | 78 func (ds) DecodeCursor(string) (datastore.Cursor, error) { panic(n
i()) } |
| 79 func (ds) Count(*datastore.FinalizedQuery) (int64, error) { panic(n
i()) } |
79 func (ds) Run(*datastore.FinalizedQuery, datastore.RawRunCB) error { panic(n
i()) } | 80 func (ds) Run(*datastore.FinalizedQuery, datastore.RawRunCB) error { panic(n
i()) } |
80 func (ds) RunInTransaction(func(context.Context) error, *datastore.TransactionOp
tions) error { | 81 func (ds) RunInTransaction(func(context.Context) error, *datastore.TransactionOp
tions) error { |
81 panic(ni()) | 82 panic(ni()) |
82 } | 83 } |
83 func (ds) Testable() datastore.Testable { return nil } | 84 func (ds) Testable() datastore.Testable { return nil } |
84 | 85 |
85 var dummyDSInst = ds{} | 86 var dummyDSInst = ds{} |
86 | 87 |
87 // Datastore returns a dummy datastore.RawInterface implementation suitable | 88 // Datastore returns a dummy datastore.RawInterface implementation suitable |
88 // for embedding. Every method panics with a message containing the name of the | 89 // for embedding. Every method panics with a message containing the name of the |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 func (i) IsCapabilityDisabled(err error) bool
{ panic(ni()) } | 152 func (i) IsCapabilityDisabled(err error) bool
{ panic(ni()) } |
152 func (i) IsOverQuota(err error) bool
{ panic(ni()) } | 153 func (i) IsOverQuota(err error) bool
{ panic(ni()) } |
153 func (i) IsTimeoutError(err error) bool
{ panic(ni()) } | 154 func (i) IsTimeoutError(err error) bool
{ panic(ni()) } |
154 | 155 |
155 var dummyInfoInst = i{} | 156 var dummyInfoInst = i{} |
156 | 157 |
157 // Info returns a dummy info.Interface implementation suitable for embedding. | 158 // Info returns a dummy info.Interface implementation suitable for embedding. |
158 // Every method panics with a message containing the name of the method which | 159 // Every method panics with a message containing the name of the method which |
159 // was unimplemented. | 160 // was unimplemented. |
160 func Info() info.Interface { return dummyInfoInst } | 161 func Info() info.Interface { return dummyInfoInst } |
OLD | NEW |