Documentation ¶
Overview ¶
*
- @Time : 2020-04-26 17:38
- @Author : MassAdobe
- @Description: 基本服务工具类
*
Index ¶
- Constants
- func CopyProperty(dst, src interface{})
- func ExternalIP() (net.IP, error)
- func GetIntranetIp() string
- func GetRequestUrlParams(uri string) string
- func Marshal(pojo interface{}) string
- func Md5(str string) string
- func RandCodeSeq() string
- func RandIdempotentToken(userId int64) string
- func RandInt(min, max int) int
- func RandInt64(min, max int64) int64
- func RandSeq(n int) string
- func RandomTimestampMark() string
- func RtnCurTime() string
- func RtnTmString() (timsStr string)
- func RunInLinuxWithErr(cmd string) (string, error)
Constants ¶
View Source
const ( TIME_FORMAT_MS = "2006-01-02 15:04:05" TIME_FORMAT_MONTH = "2006-01-02" QUESTION_MARK = "?" )
*
- @Author: MassAdobe
- @TIME: 2020/12/17 3:35 下午
- @Description: 常量池
*
Variables ¶
This section is empty.
Functions ¶
func CopyProperty ¶ added in v1.2.0
func CopyProperty(dst, src interface{})
*
- @Author: MassAdobe
- @TIME: 2020/12/31 2:03 下午
- @Description: Bean转换:dst目标Bean,src来源Bean
*
func GetIntranetIp ¶
func GetIntranetIp() string
*
- @Author: MassAdobe
- @TIME: 2020-04-26 21:13
- @Description: 获取当前IP地址
*
func GetRequestUrlParams ¶
*
- @Author: MassAdobe
- @TIME: 2020/12/21 10:53 上午
- @Description: 获取请求url上的所有参数
*
func Marshal ¶
func Marshal(pojo interface{}) string
*
- @Author: MassAdobe
- @TIME: 2020-04-27 21:19
- @Description: 转化结构体为JSON字符串
*
func RandCodeSeq ¶
func RandCodeSeq() string
*
- @Author: MassAdobe
- @TIME: 2020-05-29 21:47
- @Description: 生成手机验证码
*
func RandIdempotentToken ¶ added in v1.3.2
*
- @Author: MassAdobe
- @TIME: 2021/1/7 11:35 上午
- @Description: 生成幂等token(保证64位长度)
*
func RandomTimestampMark ¶
func RandomTimestampMark() string
*
- @Author: MassAdobe
- @TIME: 2020/12/17 6:55 下午
- @Description: 生成随机时间戳标志位
*
func RtnCurTime ¶
func RtnCurTime() string
*
- @Author: MassAdobe
- @TIME: 2020/12/17 4:54 下午
- @Description: 返回当前时间戳
*
func RtnTmString ¶
func RtnTmString() (timsStr string)
*
- @Author: MassAdobe
- @TIME: 2020-04-26 21:13
- @Description: 返回时间字符串
*
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.