create migration script for old data

This commit is contained in:
2023-01-15 06:30:30 +01:00
parent 82bc887767
commit 89fd0dfed7
34 changed files with 1617 additions and 58 deletions

View File

@@ -2,6 +2,7 @@ package server
import (
"gogs.mikescher.com/BlackForestBytes/goext/timeext"
"math/rand"
"time"
)
@@ -12,3 +13,12 @@ func QuotaDayString() string {
func NextDeliveryTimestamp(now time.Time) time.Time {
return now.Add(5 * time.Second)
}
func RandomAuthKey() string {
charset := "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
k := ""
for i := 0; i < 64; i++ {
k += string(charset[rand.Int()%len(charset)])
}
return k
}