feat: add auditing to user routes (#3961)

This commit is contained in:
Colin Adler
2022-09-08 21:16:16 -05:00
committed by GitHub
parent c026464375
commit 4e26e325a6
11 changed files with 258 additions and 61 deletions

View File

@ -22,3 +22,18 @@ func (nop) Export(context.Context, database.AuditLog) error {
}
func (nop) diff(any, any) Map { return Map{} }
func NewMock() *MockAuditor {
return &MockAuditor{}
}
type MockAuditor struct {
AuditLogs []database.AuditLog
}
func (a *MockAuditor) Export(_ context.Context, alog database.AuditLog) error {
a.AuditLogs = append(a.AuditLogs, alog)
return nil
}
func (*MockAuditor) diff(any, any) Map { return Map{} }