db

package
v0.0.0-...-3b71f4f Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	URI            = "mongodb://dht22_db:27017" // dht22_db is the name of the docker container
	TIMEOUT        = 10 * time.Second
	GET_TIMEOUT    = 30 * time.Second
	INSERT_TIMEOUT = 5 * time.Second
	DATABASE       = "measurements"
	COLLECTION     = "dht22"
)

Variables

This section is empty.

Functions

func Connect

func Connect()

func GetAll

func GetAll() []models.Measurement

func GetAllByName

func GetAllByName(name string) []models.Measurement

func GetOne

func GetOne(id string) (m models.Measurement, e bool)

func InsertNewMeasurement

func InsertNewMeasurement(m models.Measurement)

func NameExists

func NameExists(name string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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