Skip to content

Commit 3eb094f

Browse files
committed
now EventDB is all you need
1 parent 0b36fc4 commit 3eb094f

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

events.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ type Event struct {
5555
// be waiting with the state at the beginning of the
5656
// session.
5757
type EventDB interface {
58+
// These are the only DB calls which cannot be run inside
59+
// of a session.
60+
AddUser(email, password string) error
61+
VerifyUser(email, token string) error
62+
5863
BeginSession(email, password string) (DBSession, error)
5964
}
6065

@@ -96,6 +101,14 @@ type localEventDB struct {
96101
bufferSize int
97102
}
98103

104+
func (l *localEventDB) AddUser(email, password string) error {
105+
return l.db.AddUser(email, password)
106+
}
107+
108+
func (l *localEventDB) VerifyUser(email, token string) error {
109+
return l.db.VerifyUser(email, token)
110+
}
111+
99112
func (l *localEventDB) BeginSession(email, password string) (DBSession, error) {
100113
l.lock.Lock()
101114
defer l.lock.Unlock()

0 commit comments

Comments
 (0)