package
0.0.0-20210110074243-d0495e5ca527
Repository: https://github.com/covid-tracing-mongolia/backend-server.git
Documentation: pkg.go.dev

# Functions

Dial establishes a MySQL/CloudSQL connection and returns a Conn object, wrapping each available query.
LogEvent Log a failed Event.
MigrateDatabase creates the database and migrates it into the correct state.
SetupLookup Setup the originator lookup used to map events to bearerTokens.

# Constants

Android events generated by Server IOS events generated by iPhones Server events generated by Server.
Android events generated by Server IOS events generated by iPhones Server events generated by Server.
OTKClaimed One Time Key Claimed OTKGenerated One Time Key Generated OTKRegenerated One Time Key Regenerated OTKExpired One Time Key Expired OTKExpiredNoUploads One Time Key Expired with no TEK uploads (not exclusive but subset) OTKExhausted One Time Key exhausted all it's TEKs.
OTKClaimed One Time Key Claimed OTKGenerated One Time Key Generated OTKRegenerated One Time Key Regenerated OTKExpired One Time Key Expired OTKExpiredNoUploads One Time Key Expired with no TEK uploads (not exclusive but subset) OTKExhausted One Time Key exhausted all it's TEKs.
OTKClaimed One Time Key Claimed OTKGenerated One Time Key Generated OTKRegenerated One Time Key Regenerated OTKExpired One Time Key Expired OTKExpiredNoUploads One Time Key Expired with no TEK uploads (not exclusive but subset) OTKExhausted One Time Key exhausted all it's TEKs.
OTKClaimed One Time Key Claimed OTKGenerated One Time Key Generated OTKRegenerated One Time Key Regenerated OTKExpired One Time Key Expired OTKExpiredNoUploads One Time Key Expired with no TEK uploads (not exclusive but subset) OTKExhausted One Time Key exhausted all it's TEKs.
OTKClaimed One Time Key Claimed OTKGenerated One Time Key Generated OTKRegenerated One Time Key Regenerated OTKExpired One Time Key Expired OTKExpiredNoUploads One Time Key Expired with no TEK uploads (not exclusive but subset) OTKExhausted One Time Key exhausted all it's TEKs.
OTKClaimed One Time Key Claimed OTKGenerated One Time Key Generated OTKRegenerated One Time Key Regenerated OTKExpired One Time Key Expired OTKExpiredNoUploads One Time Key Expired with no TEK uploads (not exclusive but subset) OTKExhausted One Time Key exhausted all it's TEKs.
OTKClaimed One Time Key Claimed OTKGenerated One Time Key Generated OTKRegenerated One Time Key Regenerated OTKExpired One Time Key Expired OTKExpiredNoUploads One Time Key Expired with no TEK uploads (not exclusive but subset) OTKExhausted One Time Key exhausted all it's TEKs.
Android events generated by Server IOS events generated by iPhones Server events generated by Server.

# Variables

No description provided by the author
ErrHashIDClaimed is returned when the client tries to get a new code for a HashID that has already used the code.
No description provided by the author
No description provided by the author
No description provided by the author
ErrNoRecordWritten indicates that, though we should have been able to write a transaction to the DB, for some reason no record was created.
ErrTooManyKeys is returned when the client tries to insert one or more keys past their limit, assigned on keypair creation.

# Structs

CountByOriginator Just a count of a thing by the Originator (Bearer Token) Originator The originator (Bearer Token) of this thing we are counting Count The number of times this thing happened.
Event the event that we are to log Identifier The EventType of the event DeviceType the DeviceType of the event Date The date the event was generated on Count The number of times the event occurred Originator The bearerToken that the event belongs to.
Events the aggregate of events identified in Identifier by Source Source the bearer token that generated these events Date the date the events occurs Count the number of times this event occurred Identifier the event that occurred.
Uploads the aggregate of uploads identified in orignator by Source Source the bearer token that generated these uploads Date the date the upload occurs Count the number of keys uploaded FirstUpload if this was the first upload by a user.

# Interfaces

Conn mediates all access to a MySQL/CloudSQL connection.

# Type aliases

DeviceType the type of the device the event was generated by.
EventType the type of the event that happened.