MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / AuditReadEvent

Method AuditReadEvent

db/changes.go:578–589  ·  view source on GitHub ↗

AuditReadEvent issues a read event for this change entry. If there is no document body, there will be no event used.

(ctx context.Context)

Source from the content-addressed store, hash-verified

576
577// AuditReadEvent issues a read event for this change entry. If there is no document body, there will be no event used.
578func (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
591func (ce *ChangeEntry) SetBranched(isBranched bool) {
592 ce.branched = isBranched

Callers 3

sendSimpleChangesMethod · 0.80

Calls 2

ChangeVersionStringMethod · 0.95
AuditFunction · 0.92

Tested by

no test coverage detected