Make add a postmaster user and check for its existence on

This commit is contained in:
2018-03-06 00:32:49 +00:00
parent 4973a683fb
commit 5aa6607746
16 changed files with 934 additions and 14 deletions

View File

@@ -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()
}