utils

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64De

func Base64De(data string) ([]byte, error)

Base64De encod string

func Base64En

func Base64En(data []byte) string

Base64En encod []byte

func EncryptPwd

func EncryptPwd(pwd []byte) string

EncryptPwd 密码加密

func HmacSha1

func HmacSha1(key, value []byte) ([]byte, error)

HmacSha1 hmac sha1 加密

func MD5

func MD5(data []byte) string

MD5 use md5 encrypt

func NewLocalIPNet

func NewLocalIPNet() []*net.IPNet

func NewPostJsonRequest

func NewPostJsonRequest(url string, body interface{}) (*http.Request, error)

func NewPutJsonRequest

func NewPutJsonRequest(url string, body interface{}) (*http.Request, error)

func NullBool

func NullBool(d bool) sql.NullBool

func NullInt64

func NullInt64(d int64) sql.NullInt64

func NullString

func NullString(d string) sql.NullString

func NullTime

func NullTime(d time.Time) pq.NullTime

func PrintTable

func PrintTable(writer io.Writer, headers []string, data [][]string)

func RandmonCode

func RandmonCode(bitNumber int) string

RandmonCode 生成指定位数随机数

func RandomString

func RandomString(l int) string

RandomString 生成随机字符串

func SQLLog

func SQLLog(w io.Writer) func(d string, args ...interface{})

func Sha1

func Sha1(data string) string

func Sha256

func Sha256(data 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