db

package
v0.0.0-...-d5c80ff Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseWrapper

type DatabaseWrapper struct {
	Database     *mongo.Database
	QueryTimeout time.Duration
}

ClientWrapper acts as a database wrapper

func NewDatabaseWrapper

func NewDatabaseWrapper(dbOptions *Options) *DatabaseWrapper

NewDatabaseWrapper is a method that constructs a new databaseWrapper

type Options

type Options struct {
	User             string
	Password         string
	DataBaseName     string
	ClusterEndpoint  string
	CaFilePath       string
	ConnectTimeout   time.Duration
	QueryTimeout     time.Duration
	UseSSL           string
	ConnectionString string
	ReadPreference   string
}

Options provide database options

func NewOptions

func NewOptions(serverValues *srv.ServerValues) *Options

NewOptions instantiates a new Options object

Jump to

Keyboard shortcuts

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