database

package
v0.0.0-...-e299d79 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MYSQL   = "mysql"
	MSSQL   = "mssql"
	MONGODB = "mongodb"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoClient

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

func NewMongoClient

func NewMongoClient(ctx context.Context, host string, port string, username string, password string, dbName string) (*MongoClient, error)

func (*MongoClient) GetDB

func (mongo *MongoClient) GetDB() *mongo.Database

func (*MongoClient) GetDatabaseDetails

func (mongo *MongoClient) GetDatabaseDetails() string

type SqlClient

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

func NewSqlClient

func NewSqlClient(ctx context.Context, dbType string, host string, port string, username string, password string, dbName string) (*SqlClient, error)

func (*SqlClient) GetDB

func (sql *SqlClient) GetDB() *sql.DB

func (*SqlClient) GetDatabaseDetails

func (sql *SqlClient) GetDatabaseDetails() string

Jump to

Keyboard shortcuts

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