mongodb

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapToStructure

func MapToStructure(in map[string]interface{}, out interface{}) error

func StructureToMap

func StructureToMap(obj interface{}) (map[string]interface{}, error)

Types

type Client

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

func New

func New(connString string, databaseName string, timeout time.Duration) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) ContextWithTimeout

func (c *Client) ContextWithTimeout() (context.Context, context.CancelFunc)

func (*Client) Database

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

Jump to

Keyboard shortcuts

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