mongodb

package
v0.0.0-...-33bd477 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoDB

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

MongoDB represents of MongoDb/Redis Client

func New

func New(projectName constants.Project) *MongoDB

func (MongoDB) Get

func (r MongoDB) Get(dbName constants.DbName, key string, params *[]string) (interface{}, error)

Get returns an array according to given parameters In redis this method returns map[string]interface{}

func (MongoDB) GetAll

func (r MongoDB) GetAll() interface{}

GetAll returns whole collectionName

func (MongoDB) Set

func (r MongoDB) Set(dbName constants.DbName, key string, value interface{}, params *[]string) error

Set sets data to mongodb collections => record : record, scraping results : recordmetadata If mongodb save operation is successful this record will be saved to redis for caching

Jump to

Keyboard shortcuts

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