Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Model ¶
type Model struct {
ID int `gorm:"primary_key" json:"id"`
CreatedAt int `json:"created_at"`
UpdatedAt int `json:"updated_at"`
}
Model base fields
type SMTPAccount ¶
type SMTPAccount struct {
Model
Host string `json:"host" gorm:"uniqueIndex:idx_host_username;size:100;not null"`
Username string `json:"username" gorm:"uniqueIndex:idx_host_username;size:100;not null"`
Password string `json:"password" gorm:"size:100;not null"`
TodayUsedQuota int `json:"today_used_quota"`
QuotaPerDay int `json:"quote_per_day"`
}
SMTPAccount aoocunt details
func GetAvailabeSMTPAccount ¶
func GetAvailabeSMTPAccount() (*SMTPAccount, error)
GetAvailabeSMTPAccount get available smtp account which still has quota today
func GetSMTPAccountByID ¶
func GetSMTPAccountByID(id int) (*SMTPAccount, error)
GetSMTPAccountByID xx
func (*SMTPAccount) IncreaseTodayUsedQouta ¶
func (smtpAccount *SMTPAccount) IncreaseTodayUsedQouta() error
IncreaseTodayUsedQouta xxx
Click to show internal directories.
Click to hide internal directories.