coreUtils

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RuntimePath = "" //运行路径
)

Functions

func Get

func Get(uri string) (string, error)

func GetClientIP

func GetClientIP(c *gin.Context) string

GetClientIP 获取用户真实 IP

func GetCurrentDirectory

func GetCurrentDirectory() string

func GetLocationByIp

func GetLocationByIp(ip string) (location *qqwry.Location, err error)

func GetSimpleArea

func GetSimpleArea(val string) string

GetSimpleArea 获取地区简写

func InitChunZhenIp

func InitChunZhenIp()

func InitConfig

func InitConfig(cmd string)

func InitOrderGenerator

func InitOrderGenerator(workerId int64)

InitOrderGenerator 初始化订单编号生成器

func Post

func Post(uri string, params map[string]any) (string, error)

func ResizeByBase64

func ResizeByBase64(base64Str string, percent int) (string, error)

ResizeByBase64 压缩图片(原始图片数据是base64)

Types

type OrderNoGenerator

type OrderNoGenerator struct {
	// contains filtered or unexported fields
}
var OrderGenerator *OrderNoGenerator

func NewOrderNoGenerator

func NewOrderNoGenerator(workerId int64) (*OrderNoGenerator, error)

NewOrderNoGenerator 创建订单号生成器实例

func (*OrderNoGenerator) Generate

func (g *OrderNoGenerator) Generate(pre string, length int) (string, error)

Generate 生成订单号

Jump to

Keyboard shortcuts

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