diff --git a/src/integrations/parser.go b/src/integrations/parser.go index 15a0a6a..c997dd0 100644 --- a/src/integrations/parser.go +++ b/src/integrations/parser.go @@ -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 }