util

package
v0.0.0-...-23bce59 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePassword

func GeneratePassword(mobile string) string

*

  • 生成密码

func GetMD5

func GetMD5(password string) string

*

  • md5加密

func Query

func Query(search interface{}) (condition bson.M, err error)

*

  • 将结构体转为bson.M,去除空字段,避免零值
  • search必须是查询的表的结构体,否则映射出的字段可能不是表中存在的字段

Types

type Conf

type Conf struct {
	MongoURL string `yaml:mongoURL`
}

profile variables

func GetConf

func GetConf(filename string) (*Conf, error)

Jump to

Keyboard shortcuts

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