pkg

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

View Source
const (
	TextBlack = iota + 30
	TextRed
	TextGreen
	TextYellow
	TextBlue
	TextMagenta
	TextCyan
	TextWhite
)
View Source
const (
	// TrafficKey traffic key
	TrafficKey = "X-Request-ID"
	// LoggerKey logger key
	LoggerKey = "_go-admin-logger-request"
)

Variables

This section is empty.

Functions

func Black added in v0.0.6

func Black(msg string) string

func Blue added in v0.0.6

func Blue(msg string) string

func BuildMap

func BuildMap(keys []string, value string, dataType enum.DataType) map[string]any

BuildMap build map

func CompareHashAndPassword

func CompareHashAndPassword(hash string, password string) (bool, error)

CompareHashAndPassword compare hash and password

func Cyan added in v0.0.6

func Cyan(msg string) string

func DeepCopy

func DeepCopy(d any) any

DeepCopy deep copy

func GenerateMsgIDFromContext

func GenerateMsgIDFromContext(c *gin.Context) string

GenerateMsgIDFromContext 生成msgID

func Green added in v0.0.6

func Green(msg string) string

func Magenta added in v0.0.6

func Magenta(msg string) string

func MergeMap

func MergeMap(m1, m2 map[string]any) map[string]any

MergeMap merge map

func MergeMapDepth

func MergeMapDepth(m1, m2 map[string]any) map[string]any

MergeMapDepth deep merge map

func MergeMapsDepth

func MergeMapsDepth(ms ...map[string]any) map[string]any

MergeMapsDepth deep merge multi map

func ModelDeepCopy

func ModelDeepCopy(m mgm.Model) mgm.Model

ModelDeepCopy model deep copy

func Red added in v0.0.6

func Red(msg string) string

func SetColor added in v0.0.6

func SetColor(msg string, conf, bg, text int) string

func TablerDeepCopy

func TablerDeepCopy(m schema.Tabler) schema.Tabler

TablerDeepCopy model deep copy

func Translate

func Translate(from, to interface{})

Translate 结构体环转

func White added in v0.0.6

func White(msg string) string

func Yellow added in v0.0.6

func Yellow(msg string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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