Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthClient ¶
type AuthClient struct {
// contains filtered or unexported fields
}
func NewAuthClient ¶
func NewAuthClient(grpcAddress string, config *Config) (*AuthClient, error)
Examples of grpcAddr:
- authenticator:6001
- localhost:6001
- somewhere:6001
HTTPS is used unless TLS is disabled.
func (*AuthClient) Open ¶
func (a *AuthClient) Open(driverName, dataSourceName string) (*sql.DB, error)
Open opens a database specified by its database driver name and a driver-specific data source name, usually consisting of at least a database name and connection information.
The returned DB is safe for concurrent use by multiple goroutines and maintains its own pool of idle connections. Thus, the Open function should be called just once.
type Config ¶
type Config struct { // Logger is optional. It's available for you to set in case you'd like to // customize it. If not set, it defaults to INFO level and text output. Logger *log.Logger // Set to true to disable. TLS is enabled by default. DisableTLS bool // Set to true to skip verifying the chain of trust on the server's // certificate. InsecureSkipVerify bool // This client's certificate, used for proving its identity, and used by // the caller to encrypt communication with its public key. PathToClientCert string // This client's key, used for decrypting incoming communication that was // encrypted by callers using the client cert's public key. PathToClientKey string // The path to the root certificate(s) that must have issued the identity // certificate used by Approzium's authentication server. PathToTrustedCACerts string // RoleArnToAssume is an optional field. It's useful for both testing, and // in environments like AWS Lambda where you'd to pull an ARN from the // enclosing environment to assume its identity. RoleArnToAssume string }
Click to show internal directories.
Click to hide internal directories.