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

Method UpdateExpiry

db/document.go:941–949  ·  view source on GitHub ↗

Updates the expiry for a document

(expiry uint32)

Source from the content-addressed store, hash-verified

939
940// Updates the expiry for a document
941func (doc *Document) UpdateExpiry(expiry uint32) {
942
943 if expiry == 0 {
944 doc.Expiry = nil
945 } else {
946 expireTime := base.CbsExpiryToTime(expiry)
947 doc.Expiry = &expireTime
948 }
949}
950
951// ////// CHANNELS & ACCESS:
952

Callers 3

updateExpiryMethod · 0.95
getResyncedDocumentMethod · 0.80
ResyncDocumentMethod · 0.80

Calls 1

CbsExpiryToTimeFunction · 0.92

Tested by

no test coverage detected