systemUtils

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

*

  • @Time : 2020-04-26 17:38
  • @Author : MassAdobe
  • @Description: 基本服务工具类

*

Index

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 ExternalIP

func ExternalIP() (net.IP, error)

*

  • @Author: MassAdobe
  • @TIME: 2020/12/17 4:33 下午
  • @Description: 获取当前系统IP

*

func GetIntranetIp

func GetIntranetIp() string

*

  • @Author: MassAdobe
  • @TIME: 2020-04-26 21:13
  • @Description: 获取当前IP地址

*

func GetRequestUrlParams

func GetRequestUrlParams(uri string) string

*

  • @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 Md5

func Md5(str string) string

*

  • @Author: MassAdobe
  • @TIME: 2020-04-26 21:12
  • @Description: md5加密

*

func RandCodeSeq

func RandCodeSeq() string

*

  • @Author: MassAdobe
  • @TIME: 2020-05-29 21:47
  • @Description: 生成手机验证码

*

func RandIdempotentToken added in v1.3.2

func RandIdempotentToken(userId int64) string

*

  • @Author: MassAdobe
  • @TIME: 2021/1/7 11:35 上午
  • @Description: 生成幂等token(保证64位长度)

*

func RandInt

func RandInt(min, max int) int

*

  • @Author: MassAdobe
  • @TIME: 2020-04-26 21:13
  • @Description: 区间随机数;返回int

*

func RandInt64

func RandInt64(min, max int64) int64

*

  • @Author: MassAdobe
  • @TIME: 2020-04-26 21:13
  • @Description: 区间随机数;返回int64

*

func RandSeq

func RandSeq(n int) string

*

  • @Author: MassAdobe
  • @TIME: 2020-04-26 21:13
  • @Description: 随机字符串

*

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: 返回时间字符串

*

func RunInLinuxWithErr

func RunInLinuxWithErr(cmd string) (string, error)

*

  • @Author: MassAdobe
  • @TIME: 2020/12/17 3:36 下午
  • @Description: 运行当前系统命令

*

Types

This section is empty.

Jump to

Keyboard shortcuts

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