database

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBType

type DBType int
const (
	MySQL DBType = 1 << iota
	PostgreSQL
	Unknown
)

type Database

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

func NewDatabase

func NewDatabase(conf *config.DatabaseConfig, dbType DBType, queryTimeout int, log *nlog.Log) *Database

NewDatabase creates the new database tuple.

func (*Database) GetMysql

func (d *Database) GetMysql() *mysql.Mysql

func (*Database) GetPostgreSQL

func (d *Database) GetPostgreSQL() *postgresql.Postgresql

func (*Database) SetupDB

func (d *Database) SetupDB()

SetupDB used to create database

func (*Database) Start

func (d *Database) Start()

func (*Database) Stop

func (d *Database) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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