v1

package
v0.0.0-...-5c774c8 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(clientOptions *options.ClientOptions, poolOptions *options.ClientOptions) (*mongo.Client, context.Context, context.CancelFunc, error)

func Ping

func Ping(client *mongo.Client, ctx context.Context) error

Types

type ConnectionPoolDetail

type ConnectionPoolDetail struct {
	MaxPoolSize     uint64 `yaml:"maxPoolSize"`
	MinPoolSize     uint64 `yaml:"minPoolSize"`
	MaxIdleTime     int64  `yaml:"maxIdleTime"`
	MaxConnIdleTime int64  `yaml:"maxConnIdleTime"`
	ConnectTimeout  int64  `yaml:"connectTimeout"`
}

type Mongo

type Mongo struct {
	URI                  string               `yaml:"uri"`
	Username             string               `yaml:"username"`
	Password             string               `yaml:"password"`
	ConnectionPoolDetail ConnectionPoolDetail `yaml:"connectionPoolDetail"`
}

func (*Mongo) InitializeMongoConnection

func (mongo *Mongo) InitializeMongoConnection() (*mongo.Client, error)

type ResultCriteria

type ResultCriteria struct {
	Filters bson.M `json:"filters"`
	Sort    bson.D `json:"sort"`
	Update  bson.M `json:"update"`
}

Jump to

Keyboard shortcuts

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