mongowrap

package module
v0.0.0-...-6502cab Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	URI      string `json:"uri"`
	UserName string `json:"user_name"`
	Password string `json:"password"`
}

func LoadDBSetting

func LoadDBSetting(file string) *Config

LoadSetting은 mongdb를 접속하기 위해한 URI와 계정정보를 파일에서 읽습니다.

type FindCollection

type FindCollection struct {
	DBName         string
	CollectionName string
	Query          bson.M
	Document       []bson.M
}

type MongoConn

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

func NewMongoConn

func NewMongoConn() *MongoConn

func (*MongoConn) Close

func (c *MongoConn) Close()

func (*MongoConn) Connect

func (c *MongoConn) Connect(config *Config) (*mongo.Client, error)

func (*MongoConn) Find

func (c *MongoConn) Find(findCol *FindCollection) error

Jump to

Keyboard shortcuts

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