Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
Conn maintains a connection to the database.
type Host ¶
type Host struct { ID int64 `gorm:"primaryKey" json:"id"` Name string `gorm:"not null" json:"name"` Addr string `gorm:"not null" json:"addr"` }
Host represents an SMTP server that can send email.
type User ¶
type User struct { ID int64 `gorm:"primaryKey" json:"id"` Email string `gorm:"not null;uniqueIndex" json:"email"` Password string `gorm:"not null" json:"-"` }
User corresponds to a user that can login to the admin page.
func (*User) Authenticate ¶
Authenticate compares the provided password to the one stored in the database. An error is returned if the values do not match.
func (*User) SetPassword ¶
SetPassword salts and hashes the user's password. It does not store the new value in the database.
Click to show internal directories.
Click to hide internal directories.