//setEntry stores stamp/value. func setEntry(tx *bolt.Tx, stamp int64, filekey string) { sb := db.MustTob(stamp) fb := db.MustTob(filekey) err := db.Put(tx, "keylibST", sb, fb) if err != nil { panic(err) } err = db.Put(tx, "keylibTS", fb, sb) if err != nil { panic(err) } }
func getTime(tx *bolt.Tx, thread string) (int64, error) { var stamp int64 k := db.MustTob(thread) _, err := db.Get(tx, "keylibTS", k, &stamp) return stamp, err }
func getThread(tx *bolt.Tx, stamp int64) (string, error) { var thread string k := db.MustTob(stamp) _, err := db.Get(tx, "keylibST", k, &thread) return thread, err }