mongodb

package
v0.0.0-...-1a5deed Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMongoDB

func NewMongoDB(client *mongo.Database) database.DB

NewMongoDB creates a new instance of the mongodb client

func NewRawRecordRepository

func NewRawRecordRepository(db *mongo.Database, collection string) database.RawRecordRepository

NewRawRecordRepository creates a new instance of the raw record repository

Types

type MongoDB

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

MongoDB is the struct for mongodb

func (*MongoDB) RawRecordRepository

func (db *MongoDB) RawRecordRepository() database.RawRecordRepository

RawRecordRepository represents a raw record

type RawRecordRepository

type RawRecordRepository struct {
	mongodb.Repository
}

RawRecordRepository creates a new instance of the raw record repository

func (*RawRecordRepository) FetchByRequestId

func (repository *RawRecordRepository) FetchByRequestId(requestID id.ID) (records []entities.RawRecord, err error)

FetchByRequestId returns all raw records with a given request id sorted in ascending order.

func (*RawRecordRepository) StoreMany

func (repository *RawRecordRepository) StoreMany(records []entities.RawRecord) error

StoreMany stores multiple raw records

Jump to

Keyboard shortcuts

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