chore(aa-log): make some resource internal only.

This commit is contained in:
Alexandre Pujol 2023-05-01 22:21:30 +01:00
parent fe2edb31d8
commit 26bd9350f2
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
2 changed files with 31 additions and 31 deletions

View file

@ -20,6 +20,11 @@ var LogFiles = []string{
"/var/log/syslog",
}
// SystemdLog is a simplified systemd json log representation.
type systemdLog struct {
Message string `json:"MESSAGE"`
}
// GetAuditLogs return a reader with the logs entries from Auditd
func GetAuditLogs(path string) (io.Reader, error) {
file, err := os.Open(filepath.Clean(path))
@ -31,7 +36,7 @@ func GetAuditLogs(path string) (io.Reader, error) {
// GetJournalctlLogs return a reader with the logs entries from Systemd
func GetJournalctlLogs(path string, useFile bool) (io.Reader, error) {
var logs []SystemdLog
var logs []systemdLog
var stdout bytes.Buffer
var value string