Make add a postmaster user and check for its existence on
This commit is contained in:
@@ -18,6 +18,9 @@ type Interface interface {
|
||||
SetDomain(string) error
|
||||
SetTLS([]byte, []byte) error
|
||||
|
||||
CreateAccount(*Account) error
|
||||
FindAccount(string) (*Account, error)
|
||||
|
||||
io.Closer
|
||||
}
|
||||
|
||||
@@ -138,6 +141,16 @@ func (c *concrete) SetTLS(certPEM, keyPEM []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *concrete) CreateAccount(a *Account) error {
|
||||
return c.storm.Save(a)
|
||||
}
|
||||
|
||||
func (c *concrete) FindAccount(username string) (*Account, error) {
|
||||
var a Account
|
||||
|
||||
return &a, c.storm.One("Username", username, &a)
|
||||
}
|
||||
|
||||
func (c *concrete) Close() error {
|
||||
return c.storm.Close()
|
||||
}
|
||||
|
Reference in New Issue
Block a user