Skip to content

Commit 823a58d

Browse files
committed
add nop auditor
1 parent bdde128 commit 823a58d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

coderd/audit/audit.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,15 @@ type Auditor interface {
1010
Export(ctx context.Context, alog database.AuditLog) error
1111
diff(old, new any) Map
1212
}
13+
14+
func NewNop() Auditor {
15+
return nop{}
16+
}
17+
18+
type nop struct{}
19+
20+
func (nop) Export(context.Context, database.AuditLog) error {
21+
return nil
22+
}
23+
24+
func (nop) diff(any, any) Map { return Map{} }

0 commit comments

Comments
 (0)