1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00

Refactor datastore into it's own package for #67

This commit is contained in:
James Hillyerd
2017-12-26 14:54:49 -08:00
parent cc47895d71
commit 3a4fd3f093
17 changed files with 93 additions and 84 deletions

View File

@@ -13,9 +13,9 @@ import (
"github.com/gorilla/securecookie"
"github.com/gorilla/sessions"
"github.com/jhillyerd/inbucket/config"
"github.com/jhillyerd/inbucket/datastore"
"github.com/jhillyerd/inbucket/log"
"github.com/jhillyerd/inbucket/msghub"
"github.com/jhillyerd/inbucket/smtpd"
)
// Handler is a function type that handles an HTTP request in Inbucket
@@ -23,7 +23,7 @@ type Handler func(http.ResponseWriter, *http.Request, *Context) error
var (
// DataStore is where all the mailboxes and messages live
DataStore smtpd.DataStore
DataStore datastore.DataStore
// msgHub holds a reference to the message pub/sub system
msgHub *msghub.Hub
@@ -51,7 +51,7 @@ func init() {
func Initialize(
cfg config.WebConfig,
shutdownChan chan bool,
ds smtpd.DataStore,
ds datastore.DataStore,
mh *msghub.Hub) {
webConfig = cfg