Documentation ¶
Overview ¶
GPS 定位计算距离
异步执行
*
- @Author cc
- @Date 2021/4/1 10:41
- @Description $ 钉钉群预警 *
email send
token
IP地址 ¶
*
- @Author cc
- @Date 2021/4/1 10:27
- @Description $ 条件随机 *
常见的正则表达式
string
Index ¶
- func ConvertInterfaceToMap(src interface{}) (dest map[string]interface{}, isMap bool)
- func CreateToken(user *UserInfo) (tokens string, err error)
- func DateDay() (day int)
- func DateDayFormat() string
- func DateDayMilliseconds() (r int64)
- func DateDayZero() (r int64)
- func DayMi() (rr int64)
- func Decimal(value float64) float64
- func DeleteHashKey(hashKey string, keys ...string) error
- func DeleteRedis(key string) error
- func DuplicateRemoval(a []int64) []int64
- func EarthDistance(lat1, lng1, lat2, lng2 float64) float64
- func Email(email string) (b bool)
- func EmailCode(email string) (code string, err error)
- func Encryption(password string, salt string) string
- func Equals(a, b interface{}) (bool, error)
- func Float64ToString(f float64) string
- func GenValidateCode(width int) string
- func GetBinAbsPath() string
- func GetExternal() string
- func GetHashInt64(hashKey string, key string) (ret int64, err error)
- func GetHashString(hashKey string, key string) (ret string, err error)
- func GetLocalIPAddress() string
- func GetOpId(vv interface{}) (ret interface{})
- func GetPoint(points ...int) int
- func GetStringByKey(key string) (value string, err error)
- func GetStringOrder() (order string)
- func GetWeek() (week int64)
- func Getint64Order() (order int64)
- func Int32ToStr(src int32) string
- func Int64ToStr(src int64) string
- func Int64TurnString(pr int64) string
- func IntArrayToString(p []int32) string
- func IntToStr(i int) string
- func IntTurnString(pr int) string
- func Intercept(parameter string, condition string) string
- func InterfaceTurnString(pr interface{}) string
- func IsNull(str string) (bool bool)
- func JsonToMap(jsonStr string) (map[string]interface{}, error)
- func LatitudeLongitudeDistance(lon1, lat1, lon2, lat2 float64) (distance float64)
- func MapToJson(m map[string]interface{}) (string, error)
- func MapTurnStruct(m map[string]interface{}) (obj interface{}, err error)
- func Max(m map[string]int64) (key string)
- func Md5V3(m string) string
- func Min(m map[string]int64) (v string)
- func MonthlyTotal(year int, month int) (days int)
- func Password(password string) (bools bool)
- func Phone(phone string) (bools bool)
- func RandomSection(probability []int64) (section int)
- func RandomString(length int) string
- func RedisInit(redisIp, redisPassword string, db int)
- func RemoveDuplicatesAndEmpty(a []string) (ret []string)
- func Reply(email, title, content string) (err error)
- func ResolveIPV4address(ip string) (country, area, city, Isp string, err error)
- func Salt() (salt string, err error)
- func Send(messageType, message string, isAtAll bool) error
- func SetRedisHash(hashKey string, key string, value interface{}) (err error)
- func SetRedisString(key string, code interface{}) (err error)
- func SetRedisStringCode(key string, code interface{}, expiration time.Duration) (err error)
- func SplitUtil(parameter string, condition string) []string
- func StrToInt(src string) int
- func StrToInt32(src string) int32
- func StrToInt64(src string) int64
- func StringToFloat64(s string) float64
- func StringToInt64(s string) (t int64)
- func StringTurnInt(pr string) (r int, err error)
- func StructuralTurnMap(obj interface{}) map[string]interface{}
- func Substr(str string, start, length int) string
- func SwaggerJson(swagger string) (v map[string]interface{})
- func TestHall()
- func ToInt64(value interface{}) (d int64, err error)
- func ToInt64V2(v interface{}) (d int64, err error)
- func UnixTimeInt64(q int64) (p int64)
- func UnixTimeString(q int64) (p string)
- func WeekOneAndWeekSevenTime() (one int64, seven int64)
- func WithStdLib(n int64) int64
- type Async
- type HallUserInfo
- type IP
- type IPInfo
- type IdWorker
- type IpApiCom
- type NailRobot
- type RedisUser
- type UserAll
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertInterfaceToMap ¶
interface{} 转化为 map
func DateDayFormat ¶
func DateDayFormat() string
func DateDayMilliseconds ¶
func DateDayMilliseconds() (r int64)
Time stamp for the morning of the day: in milliseconds DateDayMilliseconds 获取当日凌晨时间戳(毫秒)
func DateDayZero ¶
func DateDayZero() (r int64)
获取当日零时时间戳(秒) Time stamp of the morning of the day: unit seconds
func DeleteHashKey ¶
* 删除 hash key 删除其中的key
func DeleteRedis ¶
func EarthDistance ¶ added in v0.0.7
func Float64ToString ¶ added in v0.0.9
func GetHashString ¶
** hash key in key get value (string)
func GetStringByKey ¶
通过key获取value (type String)
func GetStringOrder ¶
func GetStringOrder() (order string)
func Getint64Order ¶
func Getint64Order() (order int64)
func IntArrayToString ¶ added in v0.0.9
func LatitudeLongitudeDistance ¶ added in v0.0.7
func MapToJson ¶
MapToJson map 转 Json Json 通过第三方工具 (https://www.sojson.com/json/json2go.html) {"code":200,"data":{"age":19,"user":"lcc"},"massge":"ok"} TestMapToJson
func MapTurnStruct ¶
map 转 struct
func RandomSection ¶ added in v0.0.9
总和==1000 的数组 返回概率数组下标(下标从0开始的)
func ResolveIPV4address ¶
ResolveIPV4address 解析IPv4 国家、地区、城市、运行商、错误
func SetRedisHash ¶
设置值hash
func SetRedisString ¶
redis 保存验证码 时间为 60秒
func SetRedisStringCode ¶
redis 保存验证码 时间为 60秒
func StringToFloat64 ¶ added in v0.0.9
func StructuralTurnMap ¶
func StructuralTurnMap(obj interface{}) map[string]interface{}
struct 转 map
func Substr ¶
start:正数 - 在字符串的指定位置开始,超出字符串长度强制把start变为字符串长度
负数 - 在从字符串结尾的指定位置开始 0 - 在字符串中的第一个字符处开始
length:正数 - 从 start 参数所在的位置返回
负数 - 从字符串末端返回
func UnixTimeInt64 ¶
返回值int64类型 时间戳(秒): time.Now().Unix()) 时间戳(纳秒): time.Now().UnixNano()) 时间戳(毫秒): time.Now().UnixNano()/1e6) 时间戳(纳秒转换为秒) time.Now().UnixNano()/1e9)
func UnixTimeString ¶
返回值string类型 时间戳(秒): time.Now().Unix()) 时间戳(纳秒): time.Now().UnixNano()) 时间戳(毫秒): time.Now().UnixNano()/1e6) 时间戳(纳秒转换为秒) time.Now().UnixNano()/1e9)
func WeekOneAndWeekSevenTime ¶
WeekOneAndWeekSevenTime 当前周一凌晨和周日最后时间戳
Types ¶
type Async ¶
type Async struct {
// contains filtered or unexported fields
}
Async 异步执行对象
type HallUserInfo ¶ added in v0.0.9
func HallUserInfoGo ¶ added in v0.0.9
func HallUserInfoGo() []HallUserInfo
type IdWorker ¶
type IdWorker struct {
// contains filtered or unexported fields
}
func (*IdWorker) InitIdWorker ¶
type IpApiCom ¶
type IpApiCom struct { Status string `json:"status"` Country string `json:"country"` CountryCode string `json:"countryCode"` Region string `json:"region"` RegionName string `json:"regionName"` City string `json:"city"` Zip string `json:"zip"` Lat float64 `json:"lat"` Lon float64 `json:"lon"` Timezone string `json:"timezone"` Isp string `json:"isp"` Org string `json:"org"` As string `json:"as"` Query string `json:"query"` }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
阿里云 短信发送
|
阿里云 短信发送 |
服务注册中心 eureka
|
服务注册中心 eureka |
二维码
|
二维码 |
alils
Package alils implements the SDK(v0.5.0) of Simple Log Service(abbr.
|
Package alils implements the SDK(v0.5.0) of Simple Log Service(abbr. |
mongodb
|
mongodb |
监听文件
|
监听文件 |
mysql
|
mysql |
权重随机出结果 返回下标
|
权重随机出结果 返回下标 |
Package ratelimit provides an efficient token bucket implementation that can be used to limit the rate of arbitrary things.
|
Package ratelimit provides an efficient token bucket implementation that can be used to limit the rate of arbitrary things. |
Package uuid provides implementation of Universally Unique Identifier (UUID).
|
Package uuid provides implementation of Universally Unique Identifier (UUID). |