AuditReadEvent issues a read event for this change entry. If there is no document body, there will be no event used.
(ctx context.Context)
| 576 | |
| 577 | // AuditReadEvent issues a read event for this change entry. If there is no document body, there will be no event used. |
| 578 | func (ce *ChangeEntry) AuditReadEvent(ctx context.Context) { |
| 579 | if ce.Err != nil { |
| 580 | return |
| 581 | } |
| 582 | if ce.Doc == nil { |
| 583 | return |
| 584 | } |
| 585 | base.Audit(ctx, base.AuditIDDocumentRead, base.AuditFields{ |
| 586 | base.AuditFieldDocID: ce.ID, |
| 587 | base.AuditFieldDocVersion: ce.ChangeVersionString(ctx), |
| 588 | }) |
| 589 | } |
| 590 | |
| 591 | func (ce *ChangeEntry) SetBranched(isBranched bool) { |
| 592 | ce.branched = isBranched |
no test coverage detected