Encrypt restore token

This commit is contained in:
Unrud 2025-03-18 09:18:15 +01:00
parent abd9fd4773
commit 16dc47b570
11 changed files with 137 additions and 49 deletions

View file

@ -55,14 +55,14 @@ const (
type ControllerInfo struct {
Name string
Init func(bool) (Controller, error)
Init func() (Controller, error)
priority int
}
var Controllers []ControllerInfo
func RegisterController(name string, init func(bool) (Controller, error), priority int) {
func RegisterController(name string, init func() (Controller, error), priority int) {
Controllers = append(Controllers, ControllerInfo{name, init, priority})
sort.SliceStable(Controllers, func(i, j int) bool {
return Controllers[i].priority < Controllers[j].priority