approzium

package module
v0.0.0-...-9f81391 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: Apache-2.0 Imports: 16 Imported by: 1

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
}

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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