utils

package
v0.0.0-...-1489327 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: GPL-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDbStatusLevel

func CheckDbStatusLevel(data int, data_tips string) string

func CheckDrStatusLevel

func CheckDrStatusLevel(status string) string

func Decode

func Decode(data []byte, to interface{}) error

------------------- Decode 用gob进行数据解码

func DelCache

func DelCache(key string) error

func Encode

func Encode(data interface{}) ([]byte, error)

-------------------- Encode 用gob进行数据编码

func GetAssetImage

func GetAssetImage(Asset_Type int) string

func GetAvatar

func GetAvatar(avatar string) string

func GetAvatarSource

func GetAvatarSource(avatar string) string

func GetBrowser

func GetBrowser(browser string) string

func GetCache

func GetCache(key string, to interface{}) error

func GetCheckworkType

func GetCheckworkType(ctype int) string

func GetDate

func GetDate(timestamp int64) string

func GetDateDiff

func GetDateDiff(date1 string, date2 string) string

func GetDateDiffColor

func GetDateDiffColor(date1 string, date2 string) string

func GetDateFormat

func GetDateFormat(timestamp int64, format string) string

func GetDateMH

func GetDateMH(timestamp int64) string

func GetDateMHS

func GetDateMHS(timestamp int64) string

func GetDateParse

func GetDateParse(dates string) int64

func GetDbRoleImage

func GetDbRoleImage(Role string) string

func GetEdu

func GetEdu(edu int) string

func GetFileSuffix

func GetFileSuffix(s string) string

func GetGuid

func GetGuid() string

Guid方法

func GetLeaveType

func GetLeaveType(ltype int) string

func GetMessageSubtype

func GetMessageSubtype(subtype int) string

11知识评论12相册评论21知识赞22相册赞31请假审批32加班33报销34出差35外出36物品

func GetMessageType

func GetMessageType(ctype int) string

func GetNeedsSource

func GetNeedsSource(source int) string

func GetNeedsStage

func GetNeedsStage(stage int) string

func GetNeedsStatus

func GetNeedsStatus(status int) string

func GetOSImage

func GetOSImage(Asset_Type int) string

func GetOraInstStatus

func GetOraInstStatus(status string) string

func GetOraScreenConnectImage

func GetOraScreenConnectImage(connect int) string

func GetOs

func GetOs(os string) string

func GetResumeStatus

func GetResumeStatus(status int) string

func GetTaskStatus

func GetTaskStatus(status int) string

func GetTaskType

func GetTaskType(tasktype int) string

func GetTestStatus

func GetTestStatus(status int) string

func GetTimeParse

func GetTimeParse(times string) int64

func GetWorkYear

func GetWorkYear(year int) string

func HTMLEncode

func HTMLEncode(rs string) string

func InitCache

func InitCache()

func LoadImage

func LoadImage(path string) (img image.Image, err error)

Load Image decodes an image from a file of image.

func LogAlert

func LogAlert(v interface{})

func LogAlertf

func LogAlertf(format string, v ...interface{})

func LogCritical

func LogCritical(v interface{})

func LogCriticalf

func LogCriticalf(format string, v ...interface{})

func LogDebug

func LogDebug(v interface{})

func LogDebugf

func LogDebugf(format string, v ...interface{})

func LogEmergency

func LogEmergency(v interface{})

func LogEmergencyf

func LogEmergencyf(format string, v ...interface{})

func LogError

func LogError(v interface{})

func LogErrorf

func LogErrorf(format string, v ...interface{})

func LogInfo

func LogInfo(v interface{})

func LogInfof

func LogInfof(format string, v ...interface{})

func LogNotice

func LogNotice(v interface{})

func LogNoticef

func LogNoticef(format string, v ...interface{})

func LogWarning

func LogWarning(v interface{})

func LogWarningf

func LogWarningf(format string, v ...interface{})

func Md5

func Md5(s string) string

md5方法

func Mod

func Mod(a int, b int) int

func RandInt64

func RandInt64(min, max int64) int64

func RemoveDuplicatesAndEmpty

func RemoveDuplicatesAndEmpty(a []string) (ret []string)

数组去重来源网络

func SendMail

func SendMail(to string, subject string, body string) error

*

  • to: example@example.com;example1@163.com;example2@sina.com.cn;...
  • subject:The subject of mail
  • body: The content of mail

func SetCache

func SetCache(key string, value interface{}, timeout int) error

func SnowFlakeId

func SnowFlakeId() int64

func Strim

func Strim(str string) string

func SubString

func SubString(s string, pos, length int) string
func AjaxMsg(code int, message string) {
	this.Data["json"] = map[string]interface{}{"code": code, "message": message}
	this.ServeJSON()
	return
}

字串截取

func Unicode

func Unicode(rs string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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