pkg

package
v0.0.0-...-a682177 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2025 License: MIT Imports: 13 Imported by: 0

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

func Black(msg string) string

func Blue

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

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 GetCreatorField

func GetCreatorField() string

func GetProjectName

func GetProjectName() string

func GetStage

func GetStage() string

GetStage get stage

func Green

func Green(msg string) string

func Magenta

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 ParseEnvTemplate

func ParseEnvTemplate(t string) string

ParseEnvTemplate 替换环境变量模板

func PathCreate

func PathCreate(dir string) error

PathCreate create path

func PathExist

func PathExist(addr string) bool

PathExist path exist

func Red

func Red(msg string) string

func SetColor

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

func SetCreator

func SetCreator(data any, id string)

func SetValue

func SetValue(data any, key string, value any)

func SupportCreator

func SupportCreator(data any) bool

func SupportMultiTenant

func SupportMultiTenant(data any) bool

SupportMultiTenant support multi tenant

func TablerDeepCopy

func TablerDeepCopy(m schema.Tabler) schema.Tabler

TablerDeepCopy model deep copy

func Translate

func Translate(from, to interface{})

Translate 结构体环转

func White

func White(msg string) string

func Yellow

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