database

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataBase

type DataBase struct {
	Host     string `json:"host"`
	Port     int    `json:"Port"`
	User     string `json:"user"`
	Password string `json:"Password"`
	Name     string `json:"Name"`
	SSLMode  string `json:"sslmode"`
}

func (*DataBase) Connect

func (db *DataBase) Connect() (*sql.DB, error)

Conectar a la base de datos utilizando database/sql

func (*DataBase) CreateDB

func (db *DataBase) CreateDB(pgDB *sql.DB) error

func (*DataBase) DSN

func (db *DataBase) DSN() string

func (*DataBase) HasDB

func (db *DataBase) HasDB(pgDB *sql.DB) bool

func (*DataBase) PgConnect

func (db *DataBase) PgConnect() (*sql.DB, error)

func (*DataBase) PgDSN

func (db *DataBase) PgDSN() string

Jump to

Keyboard shortcuts

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