database

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: MIT 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 {
	Adapter  string `json:"adapter"`
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Username string `json:"username"`
	Password string `json:"password"`
	Database string `json:"database"`
	SSLMode  string `json:"sslmode"`
}

func NewConnectionDataFromConfig

func NewConnectionDataFromConfig(c *config.Config) *Connection

func (*Connection) GenerateAdapterDBURL

func (c *Connection) GenerateAdapterDBURL() (*dburl.URL, error)

func (*Connection) GenerateAdapterDSN

func (c *Connection) GenerateAdapterDSN() (string, error)

func (*Connection) Open

func (c *Connection) Open(logger logger.Interface) (*gorm.DB, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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