Documentation ¶
Overview ¶
Package certs implements a CertSource which speaks to the public CLoud SQL API endpoint.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RemoteCertSource ¶
type RemoteCertSource struct {
// contains filtered or unexported fields
}
RemoteCertSource 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.
func NewCertSource ¶
func NewCertSource(host string, c *http.Client, checkRegion bool) *RemoteCertSource
NewCertSource returns a CertSource which can be used to authenticate using the provided oauth token. The provided client must not be nil.
func (*RemoteCertSource) Local ¶
func (s *RemoteCertSource) Local(instance string) (ret tls.Certificate, err error)
Local returns a certificate that may be used to establish a TLS connection to the specified instance.
func (*RemoteCertSource) Remote ¶
func (s *RemoteCertSource) Remote(instance string) (cert *x509.Certificate, addr, name string, err error)
Remote returns the specified instance's CA certificate, address, and name.