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

Method handleAllDbs

rest/api.go:83–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81}
82
83func (h *handler) handleAllDbs() error {
84 verbose := h.getBoolQuery("verbose")
85 var dbNames []string
86 if verbose {
87 summaries := h.server.allDatabaseSummaries()
88 for _, summary := range summaries {
89 dbNames = append(dbNames, summary.DBName)
90 }
91 h.writeJSON(summaries)
92 } else {
93 dbNames = h.server.AllDatabaseNames()
94 h.writeJSON(dbNames)
95 }
96 base.Audit(h.ctx(), base.AuditIDDatabaseAllRead, base.AuditFields{base.AuditFieldDBNames: dbNames, "verbose": verbose})
97 return nil
98}
99
100func (h *handler) handleGetCompact() error {
101 compactionType := h.getQuery("type")

Callers

nothing calls this directly

Calls 6

getBoolQueryMethod · 0.95
writeJSONMethod · 0.95
ctxMethod · 0.95
AuditFunction · 0.92
allDatabaseSummariesMethod · 0.80
AllDatabaseNamesMethod · 0.80

Tested by

no test coverage detected