Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.

Commit

Permalink
Add AuditLogger interface
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (VMware) <[email protected]>
  • Loading branch information
alexellis committed Aug 30, 2018
1 parent 8fc936b commit c6ee933
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions sdk/interfaces.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package sdk

type Audit interface {
Post(AuditEvent) error
}

type NilLogger struct {
}

func (l NilLogger) Post(auditEvent AuditEvent) error {
return nil
}

type AuditLogger struct {
}

func (l AuditLogger) Post(auditEvent AuditEvent) error {
PostAudit(auditEvent)
return nil
}

0 comments on commit c6ee933

Please sign in to comment.