Documentation ¶
Index ¶
- type Connection
- func (db Connection) GetNotUploadedDiagnosisKeys(dateUntil time.Time) ([]*efgsapi.DiagnosisKeyWrapper, error)
- func (db Connection) PersistDiagnosisKeys(keys []*efgsapi.DiagnosisKey) error
- func (db Connection) RemoveDiagnosisKeys(keys []*efgsapi.DiagnosisKeyWrapper) error
- func (db Connection) RemoveInvalidKeys() error
- func (db Connection) RemoveOldKeys(dateFrom string) error
- func (db Connection) UpdateKeys(keys []*efgsapi.DiagnosisKeyWrapper) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Connection Contains database connection pool.
var Database Connection
Database Singleton connection to EFGS database.
func (Connection) GetNotUploadedDiagnosisKeys ¶
func (db Connection) GetNotUploadedDiagnosisKeys(dateUntil time.Time) ([]*efgsapi.DiagnosisKeyWrapper, error)
GetNotUploadedDiagnosisKeys Get keys from the DB that are not older than dateUntil and NOT IN EFGS.
func (Connection) PersistDiagnosisKeys ¶
func (db Connection) PersistDiagnosisKeys(keys []*efgsapi.DiagnosisKey) error
PersistDiagnosisKeys Save array of DiagnosisKey to database.
func (Connection) RemoveDiagnosisKeys ¶
func (db Connection) RemoveDiagnosisKeys(keys []*efgsapi.DiagnosisKeyWrapper) error
RemoveDiagnosisKeys Remove array of DiagnosisKeyWrapper from the DB.
func (Connection) RemoveInvalidKeys ¶
func (db Connection) RemoveInvalidKeys() error
RemoveInvalidKeys Remove N times refused keys from the DB
func (Connection) RemoveOldKeys ¶
func (db Connection) RemoveOldKeys(dateFrom string) error
RemoveOldKeys Removes keys older than date provided as parameter.
func (Connection) UpdateKeys ¶
func (db Connection) UpdateKeys(keys []*efgsapi.DiagnosisKeyWrapper) error
UpdateKeys Updates key records in the DB.
Click to show internal directories.
Click to hide internal directories.