utils

package
v0.0.0-...-63ace11 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EXPIRE_TIME                  = 600000
	CLEAN_INTERVAL time.Duration = 60 * time.Second
)

Variables

View Source
var (
	LOGGER *zap.Logger = nil
)

Functions

func CurrentTimeMicro

func CurrentTimeMicro() int64

func CurrentTimeMilli

func CurrentTimeMilli() int64

func CurrentTimeNano

func CurrentTimeNano() int64

func CurrentTimeSec

func CurrentTimeSec() int64

func GenUUID

func GenUUID() string

func GeneratePasswd

func GeneratePasswd(accName, passwd string) string

func GetMagicKey

func GetMagicKey(c *gin.Context) string

func GetRedisSessionKey

func GetRedisSessionKey(accName string) string

func InitLogger

func InitLogger()

func Json2Struct

func Json2Struct(data []byte, dest interface{})

func MD5V

func MD5V(str string) string

func MD5V2

func MD5V2(str string) string

func MD5V3

func MD5V3(str string) string

func Marshal

func Marshal(data map[string]interface{}) []byte

func PostJson

func PostJson(url string, postData *string) []byte

func Struct2Json

func Struct2Json(val interface{}) string

func TimeFmt

func TimeFmt(ts *int64) string

func Unmarshal

func Unmarshal(file string) map[string]interface{}

Types

type DeployLog

type DeployLog struct {
	// contains filtered or unexported fields
}

func NewDeployLog

func NewDeployLog() *DeployLog

func (*DeployLog) GetLog

func (l *DeployLog) GetLog(logKey string, result *result.ResultBean)

func (*DeployLog) PubErrorLog

func (l *DeployLog) PubErrorLog(logKey, log string)

func (*DeployLog) PubFailLog

func (l *DeployLog) PubFailLog(logKey, log string)

func (*DeployLog) PubLog

func (l *DeployLog) PubLog(logKey, log string)

func (*DeployLog) PubSuccessLog

func (l *DeployLog) PubSuccessLog(logKey, log string)

type LogItem

type LogItem struct {
	TS       int64
	LogQueue *list.List
	// contains filtered or unexported fields
}

func NewLogItem

func NewLogItem() *LogItem

func (*LogItem) Clear

func (i *LogItem) Clear()

func (*LogItem) GetLog

func (i *LogItem) GetLog() string

func (*LogItem) PutLog

func (i *LogItem) PutLog(log string)

type SmsWebConsoleConnector

type SmsWebConsoleConnector struct {
	IP     string
	Port   int
	Passwd string
	// contains filtered or unexported fields
}

func (*SmsWebConsoleConnector) Close

func (h *SmsWebConsoleConnector) Close()

func (*SmsWebConsoleConnector) Connect

func (h *SmsWebConsoleConnector) Connect() bool

func (*SmsWebConsoleConnector) SendData

func (h *SmsWebConsoleConnector) SendData(message []byte) bool

Directories

Path Synopsis
Package multimap provides an abstract MultiMap interface.
Package multimap provides an abstract MultiMap interface.
setmultimap
Package setmultimap implements a multimap backed by a set.
Package setmultimap implements a multimap backed by a set.
slicemultimap
Package slicemultimap implements a multimap backed by go's native slice.
Package slicemultimap implements a multimap backed by go's native slice.

Jump to

Keyboard shortcuts

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