github.com/safing/portbase@v0.19.5/database/database.go (about) 1 package database 2 3 import ( 4 "time" 5 ) 6 7 // Database holds information about a registered database. 8 type Database struct { 9 Name string 10 Description string 11 StorageType string 12 ShadowDelete bool // Whether deleted records should be kept until purged. 13 Registered time.Time 14 LastUpdated time.Time 15 LastLoaded time.Time 16 } 17 18 // Loaded updates the LastLoaded timestamp. 19 func (db *Database) Loaded() { 20 db.LastLoaded = time.Now().Round(time.Second) 21 } 22 23 // Updated updates the LastUpdated timestamp. 24 func (db *Database) Updated() { 25 db.LastUpdated = time.Now().Round(time.Second) 26 }