Documentation
¶
Index ¶
- func Base64_decode(dec string) string
- func Base64_encode(src string) string
- func CheckErr(err error)
- func CheckNetwork(ip, port string) (bool, error)
- func CheckServerAlive(addr string) (bool, error)
- func Compress(file *os.File, dest string) error
- func DeCompress(tarFile, dest string) error
- func FtpConnect(user, password, host, port, path string) (*goftp.FTP, error)
- func FtpUploadFile(ftp *goftp.FTP, localFile string) error
- func GetAttachMsg(body, email, toEmail, Subject, attaFile string) []byte
- func GetCPUPercent() int
- func GetClientIP(RemoteAddr string) (string, error)
- func GetDNS() ([]string, error)
- func GetDateTimeStamp(date string) int64
- func GetDiskPercent() int
- func GetGateway() (string, error)
- func GetHostname() string
- func GetLastMonthStart() int64
- func GetLastYearStart() int64
- func GetMemoryPercent() int
- func GetThisMonthStart() int64
- func GetThisYearStart() int64
- func GetTime() string
- func HourTimestamp() int64
- func MD5(str string) string
- func PathExists(path string) bool
- func SSHConnect(user, password, host, port string) (*sftp.Client, error)
- func SendMail(server, portSTR, email, pwd, toEmail, Subject, Content, file string) error
- func SendMailUsingTLS(addr string, auth smtp.Auth, from string, to []string, msg []byte) (err error)
- func SendToMail(addr string, auth smtp.Auth, from string, to []string, msg []byte) error
- func SetDNS(newDns []string) error
- func SetHostname(hostname string) error
- func SftpUploadFile(sftpClient *sftp.Client, localFile, remotePath string) error
- func SmtpConnect(addr string) (*smtp.Client, error)
- func TodayTimestamp() int64
- func UpdateTime(server string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64_decode ¶
func Base64_encode ¶
func CheckNetwork ¶
func CheckServerAlive ¶
func GetAttachMsg ¶
func GetCPUPercent ¶
func GetCPUPercent() int
func GetClientIP ¶
func GetDateTimeStamp ¶
func GetDiskPercent ¶
func GetDiskPercent() int
func GetGateway ¶
func GetHostname ¶
func GetHostname() string
func GetLastMonthStart ¶
func GetLastMonthStart() int64
func GetLastYearStart ¶
func GetLastYearStart() int64
func GetMemoryPercent ¶
func GetMemoryPercent() int
func GetThisMonthStart ¶
func GetThisMonthStart() int64
func GetThisYearStart ¶
func GetThisYearStart() int64
func HourTimestamp ¶
func HourTimestamp() int64
func PathExists ¶
func SendMailUsingTLS ¶
func SendMailUsingTLS(addr string, auth smtp.Auth, from string, to []string, msg []byte) (err error)
参考net/smtp的func SendMail() 使用net.Dial连接tls(ssl)端口时,smtp.NewClient()会卡住且不提示err len(to)>1时,to[1]开始提示是密送
func SendToMail ¶
不使用SSL
func SetHostname ¶
func SftpUploadFile ¶
func TodayTimestamp ¶
func TodayTimestamp() int64
func UpdateTime ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.