mongokit

package
v0.0.0-...-fe7ef4e Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 7 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 {
	*mongo.Client
	// contains filtered or unexported fields
}

func NewMongoClient

func NewMongoClient(ctx context.Context, conf *MongoConfig) *MongoClient

func (*MongoClient) Close

func (c *MongoClient) Close() error

func (*MongoClient) Database

func (c *MongoClient) Database() *mongo.Database

type MongoConfig

type MongoConfig struct {
	URL      string `long:"url" env:"URL" description:"the URL of MongoDB" required:"true"`
	Database string `long:"database" env:"DATABASE" description:"the database of MongoDB" required:"true"`
}

Jump to

Keyboard shortcuts

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