Documentation
¶
Index ¶
Constants ¶
View Source
const (
DefaultLogFile = "sql-runner.log"
)
Variables ¶
This section is empty.
Functions ¶
func DecryptPassword ¶ added in v1.0.0
DecryptPassword 解密密码
func EncryptPassword ¶ added in v1.0.0
EncryptPassword 加密密码
func IsEncrypted ¶ added in v1.0.0
IsEncrypted 检查密码是否已加密, 注意: 空密码不是有效密码
Types ¶
type LogEntry ¶
type LogEntry struct { Time time.Time `json:"time"` Level string `json:"level"` Source *LogSource `json:"source"` Msg string `json:"msg"` Args map[string]any `json:"args,omitempty"` }
LogEntry 表示一条日志记录
type LogSource ¶
type LogSource struct { Function string `json:"function"` File string `json:"file"` Line int `json:"line"` }
LogSource 表示日志来源信息
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger 日志记录器
Click to show internal directories.
Click to hide internal directories.