utils

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2018 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KC_RAND_KIND_NUM   = 0 // 纯数字
	KC_RAND_KIND_LOWER = 1 // 小写字母
	KC_RAND_KIND_UPPER = 2 // 大写字母
	KC_RAND_KIND_ALL   = 3 // 数字、大小写字母
)

Variables

This section is empty.

Functions

func AbsolutePath

func AbsolutePath(p string) (string, error)

func AddMember added in v0.5.1

func AddMember(account, password string) error

func Asset added in v0.5.1

func Asset(p string, cdn string) string

func CopyFile added in v0.5.1

func CopyFile(dstName, srcName string) (written int64, err error)

func Decode

func Decode(value string, r interface{}) error

解码

func Encode

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

编码

func FileExists added in v0.5.1

func FileExists(name string) bool

FileExists reports whether the named file or directory exists.

func FormatBytes added in v0.5.1

func FormatBytes(size int64) string

func JoinURI added in v0.5.1

func JoinURI(elem ...string) string

func Krand

func Krand(size int, kind int) []byte

随机字符串

func ModifyPassword added in v0.5.1

func ModifyPassword(account, old_password, new_password string) error

func PasswordHash

func PasswordHash(pass string) (string, error)

加密密码

func PasswordVerify

func PasswordVerify(hashing string, pass string) (bool, error)

校验密码是否有效

func Round added in v0.5.1

func Round(val float64, places int) float64

func ValidLDAPLogin added in v0.5.1

func ValidLDAPLogin(password string) (result bool, err error)

Types

This section is empty.

Directories

Path Synopsis
Package wkhtmltopdf contains wrappers around the wkhtmltopdf commandline tool
Package wkhtmltopdf contains wrappers around the wkhtmltopdf commandline tool

Jump to

Keyboard shortcuts

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