Implementing batch deletes for calls, logs and routes

Partially-Closes: #302
This commit is contained in:
Denis Makogon
2017-09-11 11:41:03 +03:00
parent 774d53662f
commit 3e190342fb
8 changed files with 86 additions and 2 deletions

View File

@@ -45,3 +45,12 @@ func (m *mock) DeleteLog(ctx context.Context, appName, callID string) error {
delete(m.Logs, callID)
return nil
}
func (m *mock) BatchDeleteLogs(ctx context.Context, appName string) error {
for _, log := range m.Logs {
if log.AppName == appName {
m.DeleteLog(ctx, appName, log.CallID)
}
}
return nil
}