mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Add *partial_csv type in eventReader ( almost complete)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user