apiutil

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

View Source
const (
	FileNameSpecialChars = "\\/:*?\"<>|"
)

Variables

This section is empty.

Functions

func AddCommonHeader

func AddCommonHeader(headers map[string]string) map[string]string

AddCommonHeader 增加公共header

func CheckFileNameValid

func CheckFileNameValid(name string) bool

CheckFileNameValid 检测文件名是否有效,包含特殊字符则无效

func DateOfGmtStr

func DateOfGmtStr() string

func GetMapSet

func GetMapSet(param interface{}) map[string]interface{}

func LocalTime2UtcFormat

func LocalTime2UtcFormat(utcTimeStr string) string

LocalTime2UtcFormat 本地时间转换为UTC时间

func Rand

func Rand() string

func Timestamp

func Timestamp() int

func UnixTime2LocalFormat added in v0.0.6

func UnixTime2LocalFormat(unixTime int64) string

UnixTime2LocalFormat 时间戳转换为本地时间字符串

func UtcTime2LocalFormat

func UtcTime2LocalFormat(timeStr string) string

UtcTime2LocalFormat UTC时间转换为本地时间

func Uuid

func Uuid() string

func XRequestId

func XRequestId() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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