Documentation ¶
Index ¶
- Variables
- func FormatToString(originStr interface{}) string
- func GenerateBaseSnowId(num int, n *snowflake.Node) string
- func GeneratePasswordHash(password string, salt string) string
- func GenerateUuid(size int) string
- func GetProjectModuleName() string
- func GetStructColumnName(s interface{}, _type int) ([]string, error)
- func InAnySlice[T string | int | int64 | float32 | float64](haystack []T, needle T) bool
- func IsPathExist(path string) bool
- func MakeFileOrPath(path string) bool
- func MakeMultiDir(filePath string) error
- func String2Int(strArr []string) []int
- type FileHeader
- type Fn
- type FormatTime
- type MyTicker
- type TreeList
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MaxUploadSize = 10 * 1024 * 1024 AllowTypes = []string{"jpg", "jpeg", "png", "svg", "gif", "bmp", "mp3", "mp4", "avi", "pdf", "xls", "xlsx", "ppt", "doc", "docx"} )
最大上传资源大小是10M
Functions ¶
func GenerateBaseSnowId ¶
GenerateBaseSnowId 生成雪花算法ID
func GeneratePasswordHash ¶
GeneratePasswordHash 生成密码hash值
func GetStructColumnName ¶
GetStructColumnName 获取结构体中的字段名称 _type: 1: 获取tag字段值 2:获取结构体字段值
func InAnySlice ¶
InAnySlice 判断某个字符串是否在字符串切片中
Types ¶
type FileHeader ¶
type FormatTime ¶
func (FormatTime) MarshalJSON ¶
func (t FormatTime) MarshalJSON() ([]byte, error)
MarshalJSON 实现时间的json序列化
func (*FormatTime) Scan ¶
func (t *FormatTime) Scan(v interface{}) error
Scan implements the Scanner interface
func (*FormatTime) UnmarshalJSON ¶
func (t *FormatTime) UnmarshalJSON(b []byte) error
UnmarshalJSON 反序列化
Click to show internal directories.
Click to hide internal directories.