create migration script for old data
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user