Documentation ¶
Index ¶
- Constants
- func AESDecrypt(c string, key string) (s string, err error)
- func AESEncrypt(s string, key string) (c string, err error)
- func AESMake256Key(key string) (k []byte)
- func ChunkSplit(s string) (r string, err error)
- func Decimal2IP(n int64) (ip string, err error)
- func IP2Decimal(ip string) (n int64, err error)
- func IsBankCard(n int64) (ok bool, err error)
- func IsChineseID(s string) (ok bool, err error)
- func IsChineseWords(words string) (ok bool, err error)
- func IsEmail(email string) (ok bool, err error)
- func MD5(s string) (r string)
- func MakeBoundary() (b string)
- func Markdown(markdown []byte) (html []byte)
- func MultipartFormDataFromFile(params, files map[string][]string, boundary string) (ior io.Reader, err error)
- func MultipartFormDataFromReader(params map[string][]string, files map[string][]io.Reader, boundary string) (ior io.Reader, err error)
- func RandomNumber() (i int64)
- func SHA1(s string) (r string)
- type CIDRInfo
- type Mailgun
- type Message
- type SMTP
- type SafeMap
Constants ¶
View Source
const AES_256_KEY_LENTH = 32
View Source
const MAILGUN_API_URL = "https://api.mailgun.net/v3"
Variables ¶
This section is empty.
Functions ¶
func AESMake256Key ¶
Cut or append empty data on the key. make the key length equal 32
func Decimal2IP ¶
func IP2Decimal ¶
func IsBankCard ¶
func IsChineseID ¶
func MultipartFormDataFromFile ¶
func MultipartFormDataFromReader ¶
func RandomNumber ¶
func RandomNumber() (i int64)
Types ¶
type Message ¶
type Message struct { From *mail.Address To []*mail.Address Subject string Body string Att []string }
func (*Message) Reader ¶
MIME RFC2045 https://en.wikipedia.org/wiki/MIME
type SMTP ¶
func (*SMTP) Send ¶
RFC 821,822,1869,2821 from/to can be "some@domain.com" or RFC 5322 address, e.g. "Barry Gibbs <bg@example.com>" NOTICE: If the name is not ASCII, you should be do some encoding, eg:"=?utf-8?B?"+base64.StdEncoding.EncodeToString([]byte("名字"))+"?=" att is the file path for attachments or nil if no attachment.
type SafeMap ¶
type SafeMap struct {
// contains filtered or unexported fields
}
func NewSafeMap ¶
func NewSafeMap() *SafeMap
Click to show internal directories.
Click to hide internal directories.