Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnectionConfig ¶
type ConnectionConfig struct {
// contains filtered or unexported fields
}
ConnectionConfig is a database configuration that can be used to create Cockroach database connection URLs.
func NewConnectionConfig ¶
func NewConnectionConfig( ctx context.Context, user string, opts ConnectionOptions, ) (*ConnectionConfig, error)
NewConnectionconfig creates a new configuration for a given user and host.
func (*ConnectionConfig) CertificateDir ¶
func (cc *ConnectionConfig) CertificateDir() string
CertificateDir returns the directory used for storing certificates.
func (*ConnectionConfig) DatabaseURL ¶
func (cc *ConnectionConfig) DatabaseURL(database string) string
DatabaseURL creates a database URL for use with sql.Open.
type ConnectionOptions ¶
type ConnectionOptions struct { SSM *ssm.SSM CertificateDirectory string DatabaseParameters url.Values Host string }
ConnectionOptions are used to control how we connect to the cluster.
type Credentials ¶
type Credentials struct { CA string `json:"ca"` Certificate string `json:"certificate"` Key string `json:"key"` }
Credentials are the credentials used to connect to and verify the identity of the database cluster.
Click to show internal directories.
Click to hide internal directories.