utils

package
v0.0.0-...-48145d3 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Engine *xorm.Engine

Functions

func ApplyTemplate

func ApplyTemplate(temp string, data map[string]interface{}) (string, error)

渲染模板

func DecodeBase64

func DecodeBase64(in string) (string, error)

解密base64

func EncodeBase64

func EncodeBase64(in string) string

加密base64

func ExecCommand

func ExecCommand(cmd string) ([]byte, error)

func ExecCommandString

func ExecCommandString(cmd string) (string, error)

func GetCurrentDirectory

func GetCurrentDirectory() string

func GetIPs

func GetIPs() (ips []string)

func GetMacAddrs

func GetMacAddrs() (macAddrs []string)

0:cf:e0:44:dd:be,enp1s0

func GetRandomSalt

func GetRandomSalt() string

return len=8 salt

func GetRandomString

func GetRandomString(len int) string

生成随机字符串

func Jiami

func Jiami(code string) string

加密

func MD5

func MD5(text string) string

生成32位MD5

Types

This section is empty.

Jump to

Keyboard shortcuts

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