libs

package
v2.8.1-0...-89a7925 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

*********************************************************** ** @Description: convert ** @Author: george hao ** @Date: 2019-06-28 09:34 ** @Last Modified by: george hao ** @Last Modified time: 2019-06-28 09:34 ************************************************************

*********************************************************** ** @Description: libs ** @Author: george hao ** @Date: 2018-08-13 11:17 ** @Last Modified by: george hao ** @Last Modified time: 2018-08-13 11:17 ************************************************************

*********************************************************** ** @Description: libs ** @Author: george hao ** @Date: 2018-08-09 13:29 ** @Last Modified by: Bee ** @Last Modified time: 2019-02-15 13:50 ************************************************************

*********************************************************** ** @Description: ip ** @Author: george hao ** @Date: 2019-06-27 09:20 ** @Last Modified by: george hao ** @Last Modified time: 2019-06-27 09:20 ************************************************************

*********************************************************** ** @Description: libs ** @Author: george hao ** @Date: 2018-08-13 11:16 ** @Last Modified by: george hao ** @Last Modified time: 2018-08-13 11:16 ************************************************************

*********************************************************** ** @Description: server ** @Author: george hao ** @Date: 2019-07-02 11:16 ** @Last Modified by: george hao ** @Last Modified time: 2019-07-02 11:16 ************************************************************

Index

Constants

View Source
const (
	Byte  = 1
	KByte = Byte * 1024
	MByte = KByte * 1024
	GByte = MByte * 1024
	TByte = GByte * 1024
	PByte = TByte * 1024
	EByte = PByte * 1024
)

Variables

This section is empty.

Functions

func DataType

func DataType(i interface{}) string

查看数据类型

func Exist

func Exist(path string) bool

func FileSize

func FileSize(s int64) string

func GbkAsUtf8

func GbkAsUtf8(str string) string

func GetCurrentDirectory

func GetCurrentDirectory() (string, error)

func GetHostIp

func GetHostIp(IpType int) string

func GetRandomString

func GetRandomString(lens int) string

生成随机字符串

func HttpGet

func HttpGet(url string, param map[string]string) (string, error)

func HttpPost

func HttpPost(url string, contentType string, body io.Reader) (string, error)

func IsEmail

func IsEmail(b []byte) bool

func IsImageFile

func IsImageFile(data []byte) bool

func IsPDFFile

func IsPDFFile(data []byte) bool

func IsTextFile

func IsTextFile(data []byte) bool

func IsVideoFile

func IsVideoFile(data []byte) bool

func JobKey

func JobKey(taskId, serverId int) int

任务识别码

func LocalIp

func LocalIp() string

func Md5

func Md5(buf []byte) string

func Password

func Password(len int, pwdO string) (pwd string, salt string)

func PublicIp

func PublicIp() string

func RemoteAgent

func RemoteAgent(servers *models.TaskServer) error

func RemoteCommandByKey

func RemoteCommandByKey(servers *models.TaskServer) error

func RemoteCommandByPassword

func RemoteCommandByPassword(servers *models.TaskServer) error

func RemoteCommandByTelnetPassword

func RemoteCommandByTelnetPassword(servers *models.TaskServer) error

func SizeFormat

func SizeFormat(size float64) string

func SystemInfo

func SystemInfo(startTime int64) map[string]interface{}

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL