Add omitempty in event struct
This commit is contained in:
10
audit.go
10
audit.go
@@ -12,11 +12,11 @@ const (
|
||||
|
||||
type AuditResult struct {
|
||||
Op Op `bson:"op" json:"op"`
|
||||
Entity string `bson:"entity" json:"entity"`
|
||||
Data any `bson:"data" json:"data"`
|
||||
Before any `bson:"before" json:"before"`
|
||||
After any `bson:"after" json:"after"`
|
||||
Context any `bson:"context" json:"context"`
|
||||
Entity string `bson:"entity,omitempty" json:"entity,omitempty"`
|
||||
Data any `bson:"data,omitempty" json:"data,omitempty",`
|
||||
Before any `bson:"before,omitempty" json:"before,omitempty"`
|
||||
After any `bson:"after,omitempty" json:"after,omitempty"`
|
||||
Context any `bson:"context,omitempty" json:"context,omitempty"`
|
||||
}
|
||||
|
||||
type OnAudit func(audit *AuditResult) error
|
||||
Reference in New Issue
Block a user