typeConnectionNameResolverinterface{// Resolve accepts a name, and returns a ConnName with the instance// connection string for the name. If the name cannot be resolved, returns// an error.Resolve(ctxcontext.Context,namestring)(ConnName,error)}
ConnectionNameResolver resolves the connection name string into a valid
instance name. This allows an application to replace the default
resolver with a custom implementation.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-05 UTC."],[[["\u003cp\u003eThis document provides documentation for various versions of the \u003ccode\u003ecloudsqlconn\u003c/code\u003e package, with the latest version being 1.16.0 and the current page focusing on version 1.14.2.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eConnName\u003c/code\u003e struct represents an instance connection name in the format "project:region:name," with functions to parse, retrieve, and manage different parts of it, including the domain name.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eConnectionNameResolver\u003c/code\u003e interface is used to resolve connection name strings into valid instance names, allowing custom implementations to be made for handling name resolution.\u003c/p\u003e\n"],["\u003cp\u003eThe content describes functions such as \u003ccode\u003eParseConnName\u003c/code\u003e and \u003ccode\u003eParseConnNameWithDomainName\u003c/code\u003e which are used to initialize new \u003ccode\u003eConnName\u003c/code\u003e structs, with the latter also allowing you to define the domain name.\u003c/p\u003e\n"],["\u003cp\u003eYou can access more information about this package and all of its versions on the pkg.go.dev site.\u003c/p\u003e\n"]]],[],null,[]]