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\u003eThe latest version of the cloudsqlconn package is 1.16.0, and it offers access to various historical versions, ranging from 0.1.0 to the present.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eConnName\u003c/code\u003e struct represents the instance connection name in the format "project:region:name," and there are several methods available to interact with it, such as \u003ccode\u003eParseConnName\u003c/code\u003e and \u003ccode\u003eParseConnNameWithDomainName\u003c/code\u003e to get started.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eConnectionNameResolver\u003c/code\u003e interface allows for custom implementations to resolve connection names, letting you handle the connection name string.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eIsValidDomain\u003c/code\u003e function can be used to validate if a given string is a well-formed domain name.\u003c/p\u003e\n"],["\u003cp\u003eSeveral functions allow users to retrieve data from a ConnName struct including the domain name, the project, region, and the name of the Cloud SQL instance.\u003c/p\u003e\n"]]],[],null,[]]