mongo

package
v0.0.0-...-3ada85e Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

* * @Author: myxy99 <myxy99@foxmail.com> * @Date: 2020/7/30 10:34

* * @Author: myxy99 <myxy99@foxmail.com> * @Date: 2020/7/30 10:34

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultBuild

func DefaultBuild() module.Invoker

Types

type CallerCfg

type CallerCfg struct {
	Debug    bool   `ini:"debug"`
	URL      string `ini:"url"`
	Source   string `ini:"source"`
	User     string `ini:"user"`
	Password string `ini:"password"`
}

type Client

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

func Invoker

func Invoker(name string) *Client

func (*Client) FindAll

func (c *Client) FindAll(db, collection string, query, selector, result interface{}) error

func (*Client) FindOne

func (c *Client) FindOne(db, collection string, query, selector, result interface{}) error

func (*Client) Insert

func (c *Client) Insert(db, collection string, docs ...interface{}) error

func (*Client) Remove

func (c *Client) Remove(db, collection string, query interface{}) error

func (*Client) Update

func (c *Client) Update(db, collection string, query, update interface{}) error

type ClientImp

type ClientImp interface {
	Insert(db, collection string, docs ...interface{}) error
	FindOne(db, collection string, query, selector, result interface{}) error
	FindAll(db, collection string, query, selector, result interface{}) error
	Update(db, collection string, query, update interface{}) error
	Remove(db, collection string, query interface{}) error
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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