mongodb

package
v0.0.0-...-adc1ce0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MetaToFilter

func MetaToFilter(m interface{}) (bson.D, error)

func New

func New() plugin.BackendPlugin

func StructToMap

func StructToMap(m interface{}) (map[string]Field, error)

Types

type Field

type Field struct {
	Name   string
	Value  interface{}
	IsZero bool
}

type PluginMongo

type PluginMongo struct {
	plugin.BackendPlugin

	Cols     map[string]*mongo.Collection
	Client   *mongo.Client
	Database *mongo.Database
}

func (*PluginMongo) Cfg

func (p *PluginMongo) Cfg() plugin.Cfg

func (*PluginMongo) Delete

func (p *PluginMongo) Delete(t string, m interface{}, retR interface{}) error

func (*PluginMongo) Get

func (p *PluginMongo) Get(t string, m interface{}, retR interface{}) error

func (*PluginMongo) List

func (p *PluginMongo) List(t string, m interface{}, retM interface{}) error

func (*PluginMongo) Register

func (p *PluginMongo) Register() (plugin.Cfg, error)

func (*PluginMongo) Set

func (p *PluginMongo) Set(t string, r interface{}) error

func (*PluginMongo) Start

func (p *PluginMongo) Start(c *cli.Context) error

func (*PluginMongo) Stop

func (p *PluginMongo) Stop() error

Jump to

Keyboard shortcuts

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