log_enc

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptText

func DecryptText(key, text []byte) ([]byte, error)

func EncryptLogData

func EncryptLogData(pat string, vars ...interface{}) string

func EncryptText

func EncryptText(key, text []byte) ([]byte, error)

func EncryptTextIndexable

func EncryptTextIndexable(key, xiv, text []byte) ([]byte, error)

func EncryptTextToB64

func EncryptTextToB64(key, text []byte) string

func EncryptTextToB64Indexable

func EncryptTextToB64Indexable(key, iv, text []byte) string

func LogApacheReq

func LogApacheReq(data string)

Log in apache format (inside a string for zap)

func LogAttentionError

func LogAttentionError(c *gin.Context, err error, message string)

func LogInternalMiscError

func LogInternalMiscError(c *gin.Context, err error, message string)

Log a internal misc error.

func LogInvalidMethodError

func LogInvalidMethodError(c *gin.Context)

Log an invalid method.

func LogIt

func LogIt(s string, x ...interface{})

LogIt sends output to both the log file, logFilePtr, and to os.Stderr if we are running in dev mode (gCfg.LogMode == "dev")

func LogMiscError

func LogMiscError(c *gin.Context, err error, message string)

Log a misc error.

func LogMiscWarn

func LogMiscWarn(c *gin.Context, err error, message string)

Log a misc warning

func LogParamError

func LogParamError(c *gin.Context, pn, msg string)

Log an invalid parameter error.

func LogPrivError

func LogPrivError(c *gin.Context, priv_missing, msg string)

Log an missing privilege.

func LogS3Error

func LogS3Error(err error, message, RequestURI, Method, requestId string)

func LogSQLError

func LogSQLError(c *gin.Context, stmt string, err error, encPat string, data ...interface{})

Log a SQL error.

func LogSQLErrorNoErr

func LogSQLErrorNoErr(c *gin.Context, stmt string, err error, encPat string, data ...interface{})

func LogSQLPrivelage

func LogSQLPrivelage(c *gin.Context, priv_missing, encPat string, user_id string)

log_enc.LogSQLPrivilage(c, aPriv, ".", user_id) // Don't need to encyprt user_id

func LogStoredProcError

func LogStoredProcError(c *gin.Context, stmt string, encPat string, data ...interface{})

LogStoredProcError(www, req, stmt, SVar(RegisterResp), pp.Un, pp.Pw /*gCfg.EncryptionPassword,*/, pp.RealName /*, gCfg.UserdataPassword*/)

func SetJsonHdr

func SetJsonHdr(c *gin.Context)

SetJsonHdr will set a content-type header to "application/json; charset=utf-8"

func SetupLogEnc

func SetupLogEnc(gcfg *data.GlobalConfigData, log *os.File)

Types

This section is empty.

Jump to

Keyboard shortcuts

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