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

Method handleGetDocChannels

rest/diagnostic_doc_api.go:83–96  ·  view source on GitHub ↗

HTTP handler for a GET of a document's channels and their sequence spans

()

Source from the content-addressed store, hash-verified

81
82// HTTP handler for a GET of a document's channels and their sequence spans
83func (h *handler) handleGetDocChannels() error {
84 docid := h.PathVar("docid")
85
86 doc, err := h.collection.GetDocument(h.ctx(), docid, db.DocUnmarshalSync)
87 if err != nil {
88 return err
89 }
90 if doc == nil {
91 return kNotFoundError
92 }
93 resp := populateDocChannelInfo(*doc)
94 h.writeJSON(resp)
95 return nil
96}
97
98// HTTP handler for running a document through the sync function and returning the results
99//

Callers

nothing calls this directly

Calls 5

PathVarMethod · 0.95
ctxMethod · 0.95
writeJSONMethod · 0.95
populateDocChannelInfoFunction · 0.85
GetDocumentMethod · 0.65

Tested by

no test coverage detected