Versions in this module Expand all Collapse all v1 v1.0.1 Nov 28, 2023 Changes in this version + const EnvAuditWebhookAuthToken + const EnvAuditWebhookClientCert + const EnvAuditWebhookClientKey + const EnvAuditWebhookEnable + const EnvAuditWebhookEndpoint + const EnvAuditWebhookQueueSize + const EnvGlobalDeploymentID + const EnvLoggerAnonymousEnable + const EnvLoggerJSONEnable + const EnvLoggerQuietEnable + const EnvLoggerWebhookAuthToken + const EnvLoggerWebhookClientCert + const EnvLoggerWebhookClientKey + const EnvLoggerWebhookEnable + const EnvLoggerWebhookEndpoint + const EnvLoggerWebhookQueueSize + var BodyPlaceHolder = []byte("<BODY>") + var Disable = false + var ErrCritical struct + var GlobalContext context.Context + func AuditLog(ctx context.Context, w *ResponseWriter, r *http.Request, ...) + func CriticalIf(ctx context.Context, err error, errKind ...interface{}) + func EnableAnonymous() + func EnableJSON() + func EnableQuiet() + func Error(msg string, data ...interface{}) + func Fatal(err error, msg string, data ...interface{}) + func FatalIf(err error, msg string, data ...interface{}) + func GetAuditEntry(ctx context.Context) *audit.Entry + func GetGlobalDeploymentID() string + func Info(msg string, data ...interface{}) + func Init(goPath, goRoot string) + func InitializeLogger(ctx context.Context, transport *http.Transport) error + func IsAnonymous() bool + func IsJSON() bool + func IsQuiet() bool + func LogAlwaysIf(ctx context.Context, err error, errKind ...interface{}) + func LogIf(ctx context.Context, err error, errKind ...interface{}) + func LogOnceIf(ctx context.Context, err error, id interface{}, errKind ...interface{}) + func NewHTTPTransportWithClientCerts(parentTransport *http.Transport, clientCert, clientKey string) *http.Transport + func RegisterError(f func(string, error, bool) string) + func SetAuditEntry(ctx context.Context, audit *audit.Entry) context.Context + func SetReqInfo(ctx context.Context, req *ReqInfo) context.Context + func UpdateAuditWebhookTargets(cfg Config) error + func UpdateSystemTargets(cfg Config) error + type Config struct + AuditWebhook map[string]http.Config + HTTP map[string]http.Config + func LookupConfigForSubSys(subSys string) (cfg Config, err error) + func NewConfig() Config + type KeyVal struct + Key string + Val interface{} + type Kind string + const All + const Minio + type Level int8 + const ErrorLvl + const FatalLvl + const InformationLvl + func (level Level) String() string + type Logger interface + type ObjectVersion struct + ObjectName string + VersionID string + type ReqInfo struct + API string + AccessKey string + BucketName string + DeploymentID string + Host string + ObjectName string + Objects []ObjectVersion + RemoteHost string + RequestID string + SessionID string + UserAgent string + VersionID string + func GetReqInfo(ctx context.Context) *ReqInfo + func (r *ReqInfo) GetTags() []KeyVal + func (r *ReqInfo) GetTagsMap() map[string]interface{} + type ResponseWriter struct + LogAllBody bool + LogErrBody bool + StartTime time.Time + StatusCode int + TimeToFirstByte time.Duration + func NewResponseWriter(w http.ResponseWriter) *ResponseWriter + func (lrw *ResponseWriter) Body() []byte + func (lrw *ResponseWriter) Flush() + func (lrw *ResponseWriter) Size() int + func (lrw *ResponseWriter) Write(p []byte) (int, error) + func (lrw *ResponseWriter) WriteHeader(code int) + type Target interface + Cancel func() + Endpoint func() string + Init func() error + Send func(entry interface{}, errKind string) error + String func() string + Type func() types.TargetType + func AuditTargets() []Target + func SystemTargets() []Target