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

Method IsAuditLoggingEnabled

rest/config.go:2379–2391  ·  view source on GitHub ↗

IsAuditLoggingEnabled() checks whether audit logging is enabled for the db, independent of the global setting

()

Source from the content-addressed store, hash-verified

2377
2378// IsAuditLoggingEnabled() checks whether audit logging is enabled for the db, independent of the global setting
2379func (c *DbConfig) IsAuditLoggingEnabled() (enabled bool, events []uint) {
2380
2381 if c != nil && c.Logging != nil && c.Logging.Audit != nil && c.Logging.Audit.Enabled != nil {
2382 enabled = *c.Logging.Audit.Enabled
2383 if c.Logging.Audit.EnabledEvents != nil {
2384 events = *c.Logging.Audit.EnabledEvents
2385 }
2386 return enabled, events
2387 } else {
2388 // Audit logging not defined in the config. Use default value
2389 return base.DefaultDbAuditEnabled, nil
2390 }
2391}
2392
2393// numIndexReplicas returns the number of index replicas for the database, populating the default value if necessary.
2394func (c *DbConfig) numIndexReplicas() uint {

Callers 2

handlePutDbConfigMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected