Skip to content

Commit

Permalink
AK-8868 Added parser for log message
Browse files Browse the repository at this point in the history
  • Loading branch information
stefink committed Jun 20, 2022
1 parent ebf50b6 commit be7c65e
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/integrations/parser.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
package integrations

import (
"encoding/json"
"time"
)

type Log struct {
date string
DataDomainID string `json:"DataDomainID"`
Database string `json:"Database"`
Operation string `json:"Operation"`
OperationDetails string `json:"OperationDetails"`
Timestamp time.Time `json:"Timestamp"`
User string `json:"User"`
}

func ParseLog(log string) Log {
panic("UnImplemented!")
func ParseLog(logdata string) Log {
log := Log{}
json.Unmarshal([]byte(logdata), &log)
return log
}

0 comments on commit be7c65e

Please sign in to comment.