utils

package
v0.0.0-...-618bfa9 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPhoneIsValid

func CheckPhoneIsValid(fl validator.FieldLevel) bool

判断手机号是否有效

func CheckPwdIsValid

func CheckPwdIsValid(hashedPwd string, originPwd string) error

func EncryptionPassword

func EncryptionPassword(originPwd string) (string, error)

func FormatTime

func FormatTime(pTime time.Time) string

func FormatTimeMilliSec

func FormatTimeMilliSec(pTime time.Time) string

func FormatTimeNormal

func FormatTimeNormal(pTime time.Time) string

func GenValidateCode

func GenValidateCode(width int) string

生成短信验证码

func GetContentType

func GetContentType(fileName string) (contentType string)

func GoTime2ProtoTime

func GoTime2ProtoTime(goTime time.Time) *timestamp.Timestamp

func HttpResponse

func HttpResponse(ctx *gin.Context, status int, data interface{}, msg string)

func NewInt64Point

func NewInt64Point(val int64) *int64

func NewStringPoint

func NewStringPoint(val string) *string

func ProtoTime2GoTime

func ProtoTime2GoTime(protoTime *timestamp.Timestamp) time.Time

Types

This section is empty.

Jump to

Keyboard shortcuts

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