log_enc

package
v1.0.62 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: MIT Imports: 13 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 EncryptLogItem added in v1.0.41

func EncryptLogItem(vv 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 LogIt2 added in v1.0.51

func LogIt2(fp io.WriteCloser, s string, x ...interface{})

func LogIt2(fp *os.File, s string, x ...interface{}) {

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 ResetLogFile added in v1.0.40

func ResetLogFile(newFp io.WriteCloser)

func ResetLogFile(newFp *os.File) {

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.BaseConfigType, acfg *data.AppConfig, log io.WriteCloser)

func SetupLogEnc(gcfg *data.GlobalConfigData, log *os.File) { func SetupLogEnc(gcfg *data.BaseConfigType, acfg *data.AppConfig, 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