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

Method validateConfigUpdate

rest/config.go:713–722  ·  view source on GitHub ↗

validateConfigUpdate combines the results of validate and validateChanges.

(ctx context.Context, old DbConfig, validateOIDCConfig bool)

Source from the content-addressed store, hash-verified

711
712// validateConfigUpdate combines the results of validate and validateChanges.
713func (dbConfig *DbConfig) validateConfigUpdate(ctx context.Context, old DbConfig, validateOIDCConfig bool) error {
714 validateReplications := false
715 err := dbConfig.validate(ctx, validateOIDCConfig, validateReplications)
716 var multiErr *base.MultiError
717 if !errors.As(err, &multiErr) {
718 multiErr = multiErr.Append(err)
719 }
720 multiErr = multiErr.Append(dbConfig.validateChanges(ctx, old))
721 return multiErr.ErrorOrNil()
722}
723
724// validateChanges compares the current DbConfig with the "old" config, and returns an error if any disallowed changes
725// are attempted.

Callers 1

handlePutDbConfigMethod · 0.80

Calls 4

validateMethod · 0.95
AppendMethod · 0.95
validateChangesMethod · 0.95
ErrorOrNilMethod · 0.95

Tested by

no test coverage detected