Documentation ¶
Index ¶
- type Connection
- func NewConnUsingCerts(host, database, user, certsPath string, logger *zap.Logger) (*Connection, error)
- func NewConnUsingDocker(pod, network, database, user, password string, port int, logger *zap.Logger) (*Connection, error)
- func NewConnUsingPassword(host, database, user, password string, logger *zap.Logger) (*Connection, error)
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) GetConnection ¶
func (c *Connection) GetConnection() *gorm.DB
GetConnection - returns the active connection
Click to show internal directories.
Click to hide internal directories.