query

package
v0.0.0-...-2e7266e Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUser

func AddUser(d db.Conn, phoneNo, password, name, regToken string) (models.User, error)

AddUser adds a new user to the database

func GetContactSummary

func GetContactSummary(d db.Conn, u models.User) (models.ContactSummary, error)

GetContactSummary will query the database and return information about the health statuses of people around the user

func GetUser

func GetUser(d db.Conn, phoneNo string) (models.User, error)

GetUser queries the database and gets a user by phoneNo.

func MetUser

func MetUser(d db.Conn, u1PhoneNo string, u2PhoneNo string, timeSpent int64, meetingTime int64) (map[string]interface{}, error)

MetUser takes a models.User struct and a phoneNo and adds an edge between the user corresponding to the struct and the one corresponding to the phoneNo

func UpdateHealthStatus

func UpdateHealthStatus(d db.Conn, u models.User, initHStatus float64, finalHStatus float64) (map[string]interface{}, error)

UpdateHealthStatus marks the infected value to true in the database and sets risk for other nodes around the infected node.

Types

This section is empty.

Jump to

Keyboard shortcuts

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