mongo

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERR_ENV_REQUIRED      = "Variables de entorno requerida (%s)"
	ERR_NOT_MONGO_SERVICE = "Not mongo service"
	ERR_NOT_JSON          = "Not json"
)

Variables

This section is empty.

Functions

func Close

func Close()

func Delete

func Delete(collection, key string) error

* * Delete data from a collection * @param collection string * @param key string * @return error *

func Find

func Find(collection string, query js.Json, page, rows int) (js.List, error)

* * Find data in a collection * @param collection string * @param query js.Json * @param page int * @param rows int * @return js.List * @return error *

func Get

func Get(collection, key string) (js.Item, error)

* * Get data from a collection * @param collection string * @param key string * @return js.Items * @return error *

func Insert

func Insert(collection, key string, data interface{}) error

* * Insert data into a collection * @param collection string * @param key string * @param data interface{} * @return error *

func Set

func Set(collection string, data interface{}) error

* * Set data into a collection * @param collection string * @param key string * @param data interface{} * @return error *

Types

type Conn

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

func Load

func Load() (*Conn, error)

Jump to

Keyboard shortcuts

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