data

package
v1.0.4-0...-7069f2b Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: MIT Imports: 8 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 {
	Server   string
	Database string
}

func NewMongoDB

func NewMongoDB(server string, database string) *MongoDB

func (*MongoDB) Connect

func (s *MongoDB) Connect() (*mongo.Database, error)

type Store

type Store interface {
	Get(query *entities.Query) ([]entities.Data, error)
	Save(data entities.Data) error
	Delete(deviceID string) error
}

Store represents the interface to data related operations

func NewStore

func NewStore(database *mongo.Database, logger logging.Logger, expTime int32) Store

NewStore creates a new Store instance

Jump to

Keyboard shortcuts

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