Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Log ¶
type Log struct {
AuditID k8stypes.UID `json:"auditID,omitempty"`
RequestURI string `json:"requestURI,omitempty"`
RequestBody interface{} `json:"requestBody,omitempty"`
ResponseBody interface{} `json:"responseBody,omitempty"`
ResponseStatus string `json:"responseStatus,omitempty"`
SourceIPs []string `json:"sourceIPs,omitempty"`
User *userInfo `json:"user,omitempty"`
UserAgent string `json:"userAgent,omitempty"`
Verb string `json:"verb,omitempty"`
Stage string `json:"stage,omitempty"`
StageTimestamp string `json:"stageTimestamp,omitempty"`
}
type LogWriter ¶
type LogWriter struct {
Level int
Output *lumberjack.Logger
}
func NewLogWriter ¶
func NewLogWriter(path string, level, maxAge, maxBackup, maxSize int) *LogWriter
func (*LogWriter) LogRequest ¶
func (a *LogWriter) LogRequest(req *http.Request, auditID k8stypes.UID, authed bool, contentType, user string, group []string) error
func (*LogWriter) LogResponse ¶
func (a *LogWriter) LogResponse(resBody []byte, auditID k8stypes.UID, statusCode int, contentType string) error
Click to show internal directories.
Click to hide internal directories.