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

Method String

db/blip_sync_messages.go:455–489  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

453}
454
455func (rm *RevMessage) String() string {
456
457 buffer := bytes.NewBufferString("")
458
459 if id, foundId := rm.ID(); foundId {
460 buffer.WriteString(fmt.Sprintf("Id:%v ", base.UD(id).Redact()))
461 }
462
463 if coll, ok := rm.Collection(); ok {
464 buffer.WriteString(fmt.Sprintf("Collection:%v ", coll))
465 }
466
467 if rev, foundRev := rm.Rev(); foundRev {
468 buffer.WriteString(fmt.Sprintf("Rev:%v ", rev))
469 }
470
471 if rm.HasDeletedProperty() {
472 buffer.WriteString(fmt.Sprintf("Deleted:%v ", rm.Deleted()))
473 }
474
475 if deltaSrc, isDelta := rm.DeltaSrc(); isDelta {
476 buffer.WriteString(fmt.Sprintf("DeltaSrc:%v ", deltaSrc))
477 }
478
479 if sequence, foundSequence := rm.Sequence(); foundSequence {
480 buffer.WriteString(fmt.Sprintf("Sequence:%v ", sequence))
481 }
482
483 noConflicts, ok := rm.Properties[RevMessageNoConflicts]
484 if ok {
485 buffer.WriteString(fmt.Sprintf("NoConflicts:%v ", noConflicts))
486 }
487 return buffer.String()
488
489}
490
491// Rev message
492type noRevMessage struct {

Callers 1

processRevMethod · 0.95

Calls 10

IDMethod · 0.95
CollectionMethod · 0.95
RevMethod · 0.95
HasDeletedPropertyMethod · 0.95
DeletedMethod · 0.95
DeltaSrcMethod · 0.95
SequenceMethod · 0.95
UDFunction · 0.92
RedactMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected