db

package
v0.0.0-...-61cdbde Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeStruct

func MergeStruct(oldStruct interface{}, newStruct interface{})

Types

type Firestore

type Firestore struct{}

func (Firestore) AddDocument

func (_ Firestore) AddDocument(collName string, id string, data interface{}) error

func (Firestore) GetDocument

func (_ Firestore) GetDocument(collName string, id string) (*firestore.DocumentSnapshot, error)

func (Firestore) UpdateDocument

func (_ Firestore) UpdateDocument(collName string, id string, data interface{}) error

type Mongo

type Mongo struct {
	Namespaces Namespaces
}

func (Mongo) AddDocument

func (m Mongo) AddDocument(data interface{}) error

func (Mongo) GetDocument

func (m Mongo) GetDocument(filter interface{}) (*mongo.SingleResult, error)

func (Mongo) UpdateDocument

func (m Mongo) UpdateDocument(filter interface{}, newData interface{}) error

type Namespace

type Namespace struct {
	Database   string
	Collection string
}

type Namespaces

type Namespaces []Namespace

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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