Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminFileLogger ¶ added in v1.0.4
type AdminFileLogger struct {
FileLogger
}
FileLogger is a local file audit log
type AdminLogFields ¶ added in v1.0.4
type AdminLogFields struct {
Time time.Time
RemoteIP string
Requester string
RequestID string
HostID string
Operation string
RequestURI string
HttpStatus int
ErrorCode string
BytesSent int
TotalTime int64
TurnAroundTime int64
Referer string
UserAgent string
SignatureVersion string
CipherSuite string
AuthenticationType string
TLSVersion string
}
type AuditLogger ¶
type AuditLogger interface {
Log(ctx fiber.Ctx, err error, body []byte, meta LogMeta)
HangUp() error
Shutdown() error
}
func InitAdminFileLogger ¶ added in v1.0.4
func InitAdminFileLogger(logname string) (AuditLogger, error)
InitFileLogger initializes audit logs to local file
func InitFileLogger ¶
func InitFileLogger(logname string) (AuditLogger, error)
InitFileLogger initializes audit logs to local file
func InitWebhookLogger ¶
func InitWebhookLogger(url string) (AuditLogger, error)
InitWebhookLogger initializes audit logs to webhook URL
type FileLogger ¶
type FileLogger struct {
// contains filtered or unexported fields
}
FileLogger is a local file audit log
func (*FileLogger) HangUp ¶
func (f *FileLogger) HangUp() error
HangUp closes current logfile handle and opens a new one typically needed for log rotations
type LogFields ¶
type LogFields struct {
BucketOwner string
Bucket string
Time time.Time
RemoteIP string
Requester string
RequestID string
Operation string
Key string
RequestURI string
HttpStatus int
ErrorCode string
BytesSent int
ObjectSize int64
TotalTime int64
TurnAroundTime int64
Referer string
UserAgent string
VersionID string
HostID string
SignatureVersion string
CipherSuite string
AuthenticationType string
HostHeader string
TLSVersion string
AccessPointARN string
AclRequired string
}
type Loggers ¶ added in v1.0.4
type Loggers struct {
S3Logger AuditLogger
AdminLogger AuditLogger
}
func InitLogger ¶
type WebhookLogger ¶
type WebhookLogger struct {
// contains filtered or unexported fields
}
WebhookLogger is a webhook URL audit log
func (*WebhookLogger) HangUp ¶
func (wl *WebhookLogger) HangUp() error
HangUp does nothing for webhooks
func (*WebhookLogger) Shutdown ¶
func (wl *WebhookLogger) Shutdown() error
Shutdown does nothing for webhooks
Click to show internal directories.
Click to hide internal directories.