daos

package
v0.0.0-...-e70fe5d Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Packages gaos provides data access objects for mongo and in-memory database

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PairDAO

type PairDAO struct {
}

PairDAO fetches key value from in-memory db

func NewPairDAO

func NewPairDAO() *PairDAO

NewPairDAO returns a new pair Dao

func (PairDAO) Get

func (p PairDAO) Get(key string) (string, bool)

Get fetches a value corresponding to given key

func (PairDAO) Insert

func (s PairDAO) Insert(key string, value string) (*models.Pair, error)

Insert create a new key value pair in in-memory DB

type RecordDAO

type RecordDAO struct {
}

RecordDAO fetches data from mongo DB

func NewRecordDAO

func NewRecordDAO() *RecordDAO

NewRecordDAO creates a new RecordDAO

func (RecordDAO) Find

func (r RecordDAO) Find(sDate time.Time, eDate time.Time, minCount int, maxCount int) ([]models.Record, error)

Find does a query to mongo database, filters records and returns record Array

Jump to

Keyboard shortcuts

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