cockroach

package
v1.29.5 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

Connection - the connection manager

func NewConnUsingCerts

func NewConnUsingCerts(host, database, user, certsPath string, logger *zap.Logger) (*Connection, error)

NewConnUsingCerts - creates a new connection instance using certificate

func NewConnUsingDocker

func NewConnUsingDocker(pod, network, database, user, password string, port int, logger *zap.Logger) (*Connection, error)

NewConnUsingDocker - creates a new connection instance to a local docker pod

func NewConnUsingPassword

func NewConnUsingPassword(host, database, user, password string, logger *zap.Logger) (*Connection, error)

NewConnUsingPassword - creates a new connection instance using password

func (*Connection) Close

func (c *Connection) Close()

Close - closes the connection

func (*Connection) GetConnection

func (c *Connection) GetConnection() *gorm.DB

GetConnection - returns the active connection

Jump to

Keyboard shortcuts

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