pro

package
v0.9.11 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func CmdExec added in v0.8.3

func CmdExec(cmd string) error

CmdExec exec cmd command

func CmdOutput added in v0.8.3

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

CmdOutput return cmd command output

func ConfDSN

func ConfDSN(filepath string, mysqlConfig ...string) (string, error)

ConfDSN read mysql config to dsn from config file @Return: dsn string @Params: At least one dbname parameter is required @FileTypes: The following file types are supported: ini yml env

func Decode

func Decode(jsonStr []byte, obj interface{}) interface{}

func Encode

func Encode(obj interface{}) (string, error)

func HashPassword

func HashPassword(password string) (string, error)

func MD5Encode

func MD5Encode(password string) string

func ReadJson

func ReadJson(filename string) string

func ReadSql

func ReadSql(path string) (string, error)

ReadSql read sql string from sql file

func TimeFormat

func TimeFormat() string

func TimeNow

func TimeNow()

func ToTitle

func ToTitle(s string) string

Types

type Json

type Json interface {
	ReadJson()
	ReadJsonOption()
	Encode()
	Encoder()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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