cockroachdbh

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2020 License: MIT Imports: 7 Imported by: 0

README

cockroachdbh

Helper functions to create cockroachdb connections.

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) (*Connection, error)

NewConnUsingCerts - creates a new connection instance using certificate

func NewConnUsingDocker

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

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

func NewConnUsingPassword

func NewConnUsingPassword(host, database, user, password string) (*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