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

Function GetGoCBConnStringWithDefaults

base/gocb_connection_string.go:87–93  ·  view source on GitHub ↗

GetGoCBConnString builds a gocb connection string based on server string. This is used to set a new connection string

(server string, defaults *GoCBConnStringParams)

Source from the content-addressed store, hash-verified

85
86// GetGoCBConnString builds a gocb connection string based on server string. This is used to set a new connection string
87func GetGoCBConnStringWithDefaults(server string, defaults *GoCBConnStringParams) (string, error) {
88 connSpec, err := getGoCBConnSpec(server, defaults)
89 if err != nil {
90 return "", err
91 }
92 return connSpec.String(), nil
93}
94
95// getIntFromConnStr returns a query parameter from a connection string. If it doesn't exist, return nil and no error. If there's an error in parsing the connection string, return an error.
96func getIntFromConnStr(connstr, key string) (*int, error) {

Callers 3

GetBucketSpecFunction · 0.92

Calls 2

getGoCBConnSpecFunction · 0.85
StringMethod · 0.65

Tested by 1