database

package
v0.0.0-...-8fab053 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Merchant = "merchant"

	GASSAPI = "GASSAPI"
)

Variables

View Source
var (
	ErrGSSAPINoneSupport = errors.New("GSSAPI mechanism none support yet")
)

Functions

func Open

func Open(ctx context.Context, config MGConfig) (*mongo.Client, error)

func StatusCheck

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

StatusCheck healthy check for mongodb.

Types

type MGConfig

type MGConfig struct {
	AuthMechanism string
	AuthSource    string
	Username      string
	Password      string
	Hosts         []string
	ReplicaName   string
	SSL           *MGSSL
	IsDirect      bool
	ReadPref      *readpref.ReadPref
}

MGConfig represent mongodb configuration properties to use the db specifically.

type MGSSL

type MGSSL struct {
	Type string
	Cert string
}

MGSSL secure options for the database connection.

Jump to

Keyboard shortcuts

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