{"modulePath":"github.com/GoogleCloudPlatform/cloud-sql-proxy","version":"v1.14.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package certs\n\nPackage certs implements a CertSource which speaks to the public Cloud SQL API endpoint.\n\n## Types\n\n```go\ntype RemoteCertSource struct {\n\n\t// a list of ip address types that users select\n\tIPAddrTypes []string\n\t// contains filtered or unexported fields\n}\n```\nRemoteCertSource implements a CertSource, using Cloud SQL APIs to return Local certificates for identifying oneself as a specific user to the remote instance and Remote certificates for confirming the remote database's identity.\n\n```go\nfunc NewCertSource(host string, c *http.Client, checkRegion bool) *RemoteCertSource\n```\nNewCertSource returns a CertSource which can be used to authenticate using the provided client, which must not be nil.\n\nThis function is deprecated; use NewCertSourceOpts instead.\n\n```go\nfunc NewCertSourceOpts(c *http.Client, opts RemoteOpts) *RemoteCertSource\n```\nNewCertSourceOpts returns a CertSource configured with the provided Opts. The provided http.Client must not be nil.\n\nUse this function instead of NewCertSource; it has a more forward-compatible signature.\n\n```go\nfunc (s *RemoteCertSource) Local(instance string) (ret tls.Certificate, err error)\n```\nLocal returns a certificate that may be used to establish a TLS connection to the specified instance.\n\n```go\nfunc (s *RemoteCertSource) Remote(instance string) (cert *x509.Certificate, addr, name string, err error)\n```\nRemote returns the specified instance's CA certificate, address, and name.\n\n```go\ntype RemoteOpts struct {\n\t// APIBasePath specifies the base path for the sqladmin API. If left blank,\n\t// the default from the autogenerated sqladmin library is used (which is\n\t// sufficient for nearly all users)\n\tAPIBasePath string\n\n\t// IgnoreRegion specifies whether a missing or mismatched region in the\n\t// instance name should be ignored. In a future version this value will be\n\t// forced to 'false' by the RemoteCertSource.\n\tIgnoreRegion bool\n\n\t// A string for the RemoteCertSource to identify itself when contacting the\n\t// sqladmin API.\n\tUserAgent string\n\n\t// IP address type options\n\tIPAddrTypeOpts []string\n}\n```\nRemoteOpts are a collection of options for NewCertSourceOpts. All fields are optional.\n\n","path":"github.com/GoogleCloudPlatform/cloud-sql-proxy/proxy/certs","name":"certs","synopsis":"Package certs implements a CertSource which speaks to the public Cloud SQL API endpoint.","isRedistributable":true}
