util

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64Decode

func Base64Decode(text string) (string, error)

func Base64Encode

func Base64Encode(text string) string

func Decode added in v0.6.0

func Decode(dest interface{}, src interface{}) error

func FloatToStr

func FloatToStr(f float64) string

统一的货币金额格式化,保留 8 位小数

func Generate2FASecret

func Generate2FASecret(uid string) (secret string, err error)

生成用户的密钥

func GenerateId

func GenerateId() string

func GenerateInviteCode

func GenerateInviteCode() string

func GeneratePassword

func GeneratePassword(text string) string

func IsNil

func IsNil(i interface{}) bool

func IsPhone

func IsPhone(phoneNumber string) bool

func IsPoint

func IsPoint(i interface{}) bool

func MD5

func MD5(text string) string

生成32位MD5

func RandomNumeric

func RandomNumeric(length int) string

func RandomString

func RandomString(length int) string

func Signature

func Signature(input string) (string, error)

func Verify2FA

func Verify2FA(uid string, token string) bool

验证用户token是否正确

Types

This section is empty.

Jump to

Keyboard shortcuts

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