utils

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 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 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 AutoSummary added in v0.13.1

func AutoSummary(body string, l int) string

自动提取文章摘要

func Decode

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

解码

func Encode

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

编码

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 SafetyProcessor added in v1.0.1

func SafetyProcessor(html string) string

安全处理HTML文档,过滤危险标签和属性.

func StripTags added in v0.10.1

func StripTags(s string) string

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