Documentation ¶
Index ¶
- Variables
- func Change2RootDir() bool
- func GenerateKey(base string) (string, error)
- func GenerateRunTimeCode() (string, error)
- func GenerateSN() (string, error)
- func GetPrivateKeyBytes() ([]byte, error)
- func InitLogger()
- func IsValidData(iData interface{}, exclude []string) bool
- func OverwriteGinLog(ctx *QCSExtractGINCtx)
- func Record(level logrus.Level, msg string)
- func SignMessage(message []byte) ([]byte, error)
- func TimeUnitStrToTimeDuration(unit string) (time.Duration, error)
- func WaitForShutdown(server *http.Server)
- type AccessLog
- type QCSExtractGINCtx
- type QCSJSONFormatter
- type QCSTextFormatter
Constants ¶
This section is empty.
Variables ¶
View Source
var (
TestBuffer string // The buffer for testing mode.
)
Functions ¶
func Change2RootDir ¶
func Change2RootDir() bool
Ensure that the current working directory is the root directory of the project.
func GenerateKey ¶
Generate an APP key by SHA3-256 for the device.
func GenerateRunTimeCode ¶
Generate a random runtime code.
func GenerateSN ¶
Generate a serial number by uuid v4 and custom rule(24 bits + 5 bits(-)).
func GetPrivateKeyBytes ¶
Get the private key bytes from the local file.
func InitLogger ¶
func InitLogger()
func IsValidData ¶
Check if the given data is all not empty except the excluded fields.
func OverwriteGinLog ¶
func OverwriteGinLog(ctx *QCSExtractGINCtx)
Overwrite the default logger of Gin Framework.
func SignMessage ¶
Sign the given message with specified hashing method.
func TimeUnitStrToTimeDuration ¶
Convert the time unit string to time.Duration.
Types ¶
type QCSExtractGINCtx ¶
type QCSJSONFormatter ¶
type QCSJSONFormatter struct {
*logrus.TextFormatter
}
type QCSTextFormatter ¶
type QCSTextFormatter struct {
*logrus.TextFormatter
}
Click to show internal directories.
Click to hide internal directories.