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

Unified Diff: impl/dummy/dummy.go

Issue 1525923002: Implement Mail service. (Closed) Base URL: https://github.com/luci/gae.git@filter_user
Patch Set: tests and words Created 5 years 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/mail.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 a965a757e0cad00ebec60d84ad84691bdec00d68..d5badcfab682b9f8d88c2fd8677dc2db19f99dee 100644
--- a/impl/dummy/dummy.go
+++ b/impl/dummy/dummy.go
@@ -12,6 +12,7 @@ import (
"github.com/luci/gae/service/datastore"
"github.com/luci/gae/service/info"
+ "github.com/luci/gae/service/mail"
"github.com/luci/gae/service/memcache"
"github.com/luci/gae/service/taskqueue"
"github.com/luci/gae/service/user"
@@ -48,6 +49,8 @@ func ni() error {
iface = "Datastore"
case "i":
iface = "Info"
+ case "m":
+ iface = "Mail"
case "mc":
iface = "Memcache"
case "tq":
@@ -182,3 +185,18 @@ var dummyUserInst = u{}
// Every method panics with a message containing the name of the method which
// was unimplemented.
func User() user.Interface { return dummyUserInst }
+
+////////////////////////////////////// m ///////////////////////////////////////
+
+type m struct{}
+
+func (m) Send(*mail.Message) error { panic(ni()) }
+func (m) SendToAdmins(*mail.Message) error { panic(ni()) }
+func (m) Testable() mail.Testable { panic(ni()) }
+
+var dummyMailInst = m{}
+
+// Mail returns a dummy mail.Interface implementation suitable for embedding.
+// Every method panics with a message containing the name of the method which
+// was unimplemented.
+func Mail() mail.Interface { return dummyMailInst }
« no previous file with comments | « filter/featureBreaker/mail.go ('k') | impl/dummy/dummy_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698