Versions in this module Expand all Collapse all v1 v1.0.1 Aug 24, 2023 v1.0.0 Aug 1, 2023 Changes in this version + const DefaultErrorMsg + const DefaultLogPath + const DeployEnvDev + const DeployEnvPre + const DeployEnvProd + const DeployEnvTest + const ErrAccessToken + const ErrInternal + const ErrMysql + const ErrParam + const ErrRedis + const ErrSystem + const ErrUnknown + const Success + const TraceCtx + const TraceHeaderTraceId + const TraceHeaderUserId + var Engine *gin.Engine + func ConfigError(config string) error + func ConfigNotFound(config string) error + func Error(ctx context.Context, args ...any) + func Errortf(ctx context.Context, template string, args ...any) + func GetAppMode() string + func GetAppName() string + func GetAppNamespace() string + func GetAppPodIp() string + func GetAppPodName() string + func GetAppVersion() string + func GetBool(key string) bool + func GetConfig(key string) interface + func GetDuration(key string) time.Duration + func GetEnv() string + func GetFloat64(key string) float64 + func GetInt(key string) int + func GetInt32(key string) int32 + func GetInt64(key string) int64 + func GetMessage(errCode int) string + func GetString(key string) string + func GetStringMap(key string) map[string]interface + func GetStringMapString(key string) map[string]string + func GetStringMapStringSlice(key string) map[string][]string + func GetStringSlice(key string) []string + func GetTime(key string) time.Time + func GetUint(key string) uint + func GetUint32(key string) uint32 + func GetUint64(key string) uint64 + func HandlerContext() gin.HandlerFunc + func HandlerRecovery(stack bool) gin.HandlerFunc + func Info(ctx context.Context, args ...any) + func Infotf(ctx context.Context, template string, args ...any) + func InitApp() error + func InitHttpServer() + func IsSet(key string) bool + func JsonAbort(c *gin.Context, errCode int, message string) + func JsonError(c *gin.Context, code int, message ...string) + func JsonSuccess(c *gin.Context, result any) + func NewTraceIDContext(ctx context.Context, traceID any) context.Context + func SetMessage(errCode int, message string) error + func StartSpan(ctx context.Context, format string, args ...interface{}) (string, []zap.Field) + func Warn(ctx context.Context, args ...any) + func Warntf(ctx context.Context, template string, args ...any) + type Trace struct + Method string + Path string + SpanId string + Status int + TraceId string + UserId int + func FromTraceContext(ctx context.Context) Trace