models

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContactSummary

type ContactSummary struct {
	First                 summaryData
	Second                summaryData
	WithSymptomsTimeSpent int64
	PositiveTimeSpent     int64
}

ContactSummary gives details about health statuses of the user's primary and secondary connections

func BuildContactSummary

func BuildContactSummary(summary neo4j.Record) ContactSummary

BuildContactSummary builds a ContactSummary from a neo4j record generated by the GetContactSummary query

type Edge

type Edge struct {
	TimeSpent int64
}

Edge represents an edge between two nodes in the neo4j database

func GenerateEdgeFromInt

func GenerateEdgeFromInt(t int64) Edge

GenerateEdgeFromInt generates an edge struct from timeSpent integer

type User

type User struct {
	AnonID       string
	PhoneNo      string
	RegToken     string
	Password     string
	Name         string
	HealthStatus float64
}

User represents the User entity stored in the database

func GetUserFromNode

func GetUserFromNode(n neo4j.Node) User

GetUserFromNode converts a neo4j node to a User Struct

func (User) GenerateJWT

func (u User) GenerateJWT() (string, error)

GenerateJWT generates a jwt for a user

Jump to

Keyboard shortcuts

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