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

Side by Side Diff: impl/dummy/dummy.go

Issue 1766593002: Add a MustNamespace that panics if the namespace wasn't valid (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: Add MustNamespace to the interface Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « filter/featureBreaker/gi.go ('k') | impl/memory/info.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 func (i) GetNamespace() string { return "dummy-namespace" } 144 func (i) GetNamespace() string { return "dummy-namespace" }
145 func (i) ModuleHostname(module, version, instance string) (string, error) { panic(ni()) } 145 func (i) ModuleHostname(module, version, instance string) (string, error) { panic(ni()) }
146 func (i) ModuleName() string { panic(ni()) } 146 func (i) ModuleName() string { panic(ni()) }
147 func (i) DefaultVersionHostname() string { panic(ni()) } 147 func (i) DefaultVersionHostname() string { panic(ni()) }
148 func (i) PublicCertificates() ([]info.Certificate, error) { panic(ni()) } 148 func (i) PublicCertificates() ([]info.Certificate, error) { panic(ni()) }
149 func (i) RequestID() string { panic(ni()) } 149 func (i) RequestID() string { panic(ni()) }
150 func (i) ServiceAccount() (string, error) { panic(ni()) } 150 func (i) ServiceAccount() (string, error) { panic(ni()) }
151 func (i) SignBytes(bytes []byte) (keyName string, signature []byte, err error) { panic(ni()) } 151 func (i) SignBytes(bytes []byte) (keyName string, signature []byte, err error) { panic(ni()) }
152 func (i) VersionID() string { panic(ni()) } 152 func (i) VersionID() string { panic(ni()) }
153 func (i) Namespace(namespace string) (context.Context, error) { panic(ni()) } 153 func (i) Namespace(namespace string) (context.Context, error) { panic(ni()) }
154 func (i) MustNamespace(namespace string) context.Context { panic(ni()) }
154 func (i) Datacenter() string { panic(ni()) } 155 func (i) Datacenter() string { panic(ni()) }
155 func (i) InstanceID() string { panic(ni()) } 156 func (i) InstanceID() string { panic(ni()) }
156 func (i) IsDevAppServer() bool { panic(ni()) } 157 func (i) IsDevAppServer() bool { panic(ni()) }
157 func (i) ServerSoftware() string { panic(ni()) } 158 func (i) ServerSoftware() string { panic(ni()) }
158 func (i) IsCapabilityDisabled(err error) bool { panic(ni()) } 159 func (i) IsCapabilityDisabled(err error) bool { panic(ni()) }
159 func (i) IsOverQuota(err error) bool { panic(ni()) } 160 func (i) IsOverQuota(err error) bool { panic(ni()) }
160 func (i) IsTimeoutError(err error) bool { panic(ni()) } 161 func (i) IsTimeoutError(err error) bool { panic(ni()) }
161 162
162 var dummyInfoInst = i{} 163 var dummyInfoInst = i{}
163 164
(...skipping 29 matching lines...) Expand all
193 func (m) Send(*mail.Message) error { panic(ni()) } 194 func (m) Send(*mail.Message) error { panic(ni()) }
194 func (m) SendToAdmins(*mail.Message) error { panic(ni()) } 195 func (m) SendToAdmins(*mail.Message) error { panic(ni()) }
195 func (m) Testable() mail.Testable { panic(ni()) } 196 func (m) Testable() mail.Testable { panic(ni()) }
196 197
197 var dummyMailInst = m{} 198 var dummyMailInst = m{}
198 199
199 // Mail returns a dummy mail.Interface implementation suitable for embedding. 200 // Mail returns a dummy mail.Interface implementation suitable for embedding.
200 // Every method panics with a message containing the name of the method which 201 // Every method panics with a message containing the name of the method which
201 // was unimplemented. 202 // was unimplemented.
202 func Mail() mail.Interface { return dummyMailInst } 203 func Mail() mail.Interface { return dummyMailInst }
OLDNEW
« no previous file with comments | « filter/featureBreaker/gi.go ('k') | impl/memory/info.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698