connection

package
v0.0.0-...-bb1ab1e Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoDB

type MongoDB struct {
	Host        string                     `json:"host,omitempty" yaml:"host,omitempty"`
	Port        string                     `json:"port,omitempty" yaml:"port,omitempty"`
	Database    string                     `json:"database,omitempty" yaml:"database,omitempty"`
	Collections custom.Map[string, string] `json:"collections,omitempty" yaml:"collections,omitempty"`
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*MongoDB) Client

func (m *MongoDB) Client() *mongo.Client

func (*MongoDB) GetCollection

func (m *MongoDB) GetCollection(collectionName string) (*mongo.Collection, error)

func (*MongoDB) Ping

func (m *MongoDB) Ping()

type MySql

type MySql struct {
	User     string  `json:"user,omitempty" yaml:"user,omitempty"`
	Password string  `json:"password,omitempty" yaml:"password,omitempty"`
	Method   string  `json:"method,omitempty" yaml:"method,omitempty"`
	Host     string  `json:"host,omitempty" yaml:"host,omitempty"`
	Port     string  `json:"port,omitempty" yaml:"port,omitempty"`
	Schema   string  `json:"schema,omitempty" yaml:"schema,omitempty"`
	Query    *string `json:"query,omitempty" yaml:"query,omitempty"`
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*MySql) Db

func (c *MySql) Db() *sql.DB

func (*MySql) Ping

func (c *MySql) Ping()

Jump to

Keyboard shortcuts

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