db

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoClient

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

MongoClient is a client interface for managing connections to a MongoDB deployment.

func NewMongoClient

func NewMongoClient(ctx context.Context) (*MongoClient, error)

NewMongoClient creates a new MongoClient.

func (*MongoClient) Close

func (c *MongoClient) Close(ctx context.Context) error

Close disconnects the underlying client connection pool.

func (*MongoClient) Conn

func (c *MongoClient) Conn() *mongo.Client

Conn is an accessor method.

type MySQLClient

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

MySQLClient is a client interface for managing a pool of zero or more underlying mysql connections.

func NewMySQLClient

func NewMySQLClient(ctx context.Context) (*MySQLClient, error)

MySQLClient creates a new MySQL.

func (*MySQLClient) Close

func (c *MySQLClient) Close() error

Close closes the underlying mysql connection.

func (*MySQLClient) Conn

func (c *MySQLClient) Conn() *sql.DB

Conn is an accessor method.

Jump to

Keyboard shortcuts

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