Documentation ¶
Overview ¶
Copyright 2021 Juan Pablo Tosso
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditLog ¶
type AuditLog struct { // Transaction information Transaction *AuditTransaction `json:"transaction"` // Triggered rules information Messages []*AuditMessage `json:"messages"` }
Main struct for audit log data
type AuditMessage ¶
type AuditMessage struct { Actionset string `json:"actionset"` Message string `json:"message"` Data *AuditMessageData `json:"data"` }
type AuditMessageData ¶
type AuditMessageData struct { File string `json:"file"` Line int `json:"line"` Id int `json:"id"` Rev string `json:"rev"` Msg string `json:"msg"` Data string `json:"data"` Severity int `json:"severity"` Ver string `json:"ver"` Maturity int `json:"maturity"` Accuracy int `json:"accuracy"` Tags []string `json:"tags"` }
type AuditTransaction ¶
type AuditTransaction struct { // Timestamp "02/Jan/2006:15:04:20 -0700" format Timestamp string `json:"timestamp"` UnixTimestamp int64 `json:"unix_timestamp"` // Unique ID Id string `json:"id"` // Client IP Address string representation ClientIp string `json:"client_ip"` ClientPort int `json:"client_port"` HostIp string `json:"host_ip"` HostPort int `json:"host_port"` ServerId string `json:"server_id"` Request *AuditTransactionRequest `json:"request"` Response *AuditTransactionResponse `json:"response"` Producer *AuditTransactionProducer `json:"producer"` }
Transaction information
type AuditTransactionRequest ¶
type ConcurrentLogger ¶
type ConcurrentLogger struct {
// contains filtered or unexported fields
}
func (*ConcurrentLogger) Close ¶
func (cl *ConcurrentLogger) Close() error
func (*ConcurrentLogger) Write ¶
func (l *ConcurrentLogger) Write(al *AuditLog) error
type SerialLogger ¶
type SerialLogger struct {
// contains filtered or unexported fields
}
SerialLogger is used to store logs compatible with go-FTW
func (*SerialLogger) Close ¶
func (sl *SerialLogger) Close() error
func (*SerialLogger) Write ¶
func (sl *SerialLogger) Write(al *AuditLog) error
type SyslogLogger ¶
type SyslogLogger struct {
// contains filtered or unexported fields
}
func (*SyslogLogger) Close ¶
func (sl *SyslogLogger) Close() error
func (*SyslogLogger) Write ¶
func (sl *SyslogLogger) Write(al *AuditLog) error
Click to show internal directories.
Click to hide internal directories.