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

Function PersistentConfigKey

rest/config.go:2291–2301  ·  view source on GitHub ↗

PersistentConfigKey returns a document key to use to store database configs

(ctx context.Context, groupID string, metadataID string)

Source from the content-addressed store, hash-verified

2289
2290// PersistentConfigKey returns a document key to use to store database configs
2291func PersistentConfigKey(ctx context.Context, groupID string, metadataID string) string {
2292 if groupID == "" {
2293 base.WarnfCtx(ctx, "Empty group ID specified for PersistentConfigKey - using %v", PersistentConfigDefaultGroupID)
2294 groupID = PersistentConfigDefaultGroupID
2295 }
2296 if metadataID == "" {
2297 return base.PersistentConfigPrefixWithoutGroupID + groupID
2298 } else {
2299 return base.PersistentConfigPrefixWithoutGroupID + metadataID + ":" + groupID
2300 }
2301}
2302
2303// Return the persistent config key for a legacy 3.0 persistent config (single database per bucket model)
2304func PersistentConfigKey30(ctx context.Context, groupID string) string {

Calls 1

WarnfCtxFunction · 0.92