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

Function validateExistingDoc

db/validation.go:86–91  ·  view source on GitHub ↗
(doc *Document, importAllowed, docExists bool)

Source from the content-addressed store, hash-verified

84}
85
86func validateExistingDoc(doc *Document, importAllowed, docExists bool) error {
87 if !importAllowed && docExists && !doc.HasValidSyncData() {
88 return base.HTTPErrorf(409, "Not imported")
89 }
90 return nil
91}

Callers 1

documentUpdateFuncMethod · 0.85

Calls 2

HTTPErrorfFunction · 0.92
HasValidSyncDataMethod · 0.80

Tested by

no test coverage detected