Documentation ¶
Overview ¶
Package server aes
Package server config ¶
Package server svr
Index ¶
- func AesDecryptToken(token, passphrase string) (string, error)
- func AesEncryptToken(plainText, passphrase string) (string, error)
- func AesRandomKey() string
- func Cors() gin.HandlerFunc
- func RandString(len int) string
- func SendMail(host string, port int, account string, pwd string, to []string, cc []string, ...) (err error)
- func SendMailByAccount(account *MailAccount, to []string, cc []string, subject string, body string) error
- type Config
- type JSONResult
- type MailAccount
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecryptToken ¶
AesDecryptToken AesDecryptToken
func AesEncryptToken ¶
AesEncryptToken AesEncryptToken
func SendMail ¶
func SendMail(host string, port int, account string, pwd string, to []string, cc []string, subject string, body string) (err error)
SendMail to []addr
func SendMailByAccount ¶
func SendMailByAccount(account *MailAccount, to []string, cc []string, subject string, body string) error
SendMailByAccount by account
Types ¶
type Config ¶
type Config struct { Listen string // :27899 BasePath string // api = http://{{listen}}/{{BasePath}}/mailto Accounts []*MailAccount SubjectPrefx string Addrs []string TokenKey string }
Config api config
type JSONResult ¶
JSONResult JSONResult
type MailAccount ¶
type MailAccount struct { SMTP string //smtp.mail.com:25 User string Password string Max int //max send per day TodayCount int // LastSendTime time.Time // contains filtered or unexported fields }
MailAccount smtp account
Click to show internal directories.
Click to hide internal directories.