certs

package
v0.0.0-...-51661ce Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2016 License: Apache-2.0 Imports: 15 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL