Add *partial_csv type in eventReader ( almost complete)

This commit is contained in:
TeoV
2020-01-17 15:58:47 +02:00
parent 35caf1390f
commit c074fd2369
12 changed files with 694 additions and 22 deletions

View File

@@ -254,3 +254,16 @@ func (se *SafEvent) AsCDR(cfg *config.CGRConfig, tnt, tmz string) (cdr *CDR, err
se.RUnlock()
return
}
// AsCGREvent exports the SafEvent as CGREvent
func (se *SafEvent) AsCGREvent(tnt string) (cgrEv *utils.CGREvent) {
se.RLock()
cgrEv = &utils.CGREvent{
Tenant: tnt,
ID: utils.UUIDSha1Prefix(),
Time: utils.TimePointer(time.Now()),
Event: se.Me.Data(),
}
se.RUnlock()
return
}