refactor(10.2-01): nest framework packages under modules

- Move remaining beach packages and embedded admin assets\n- Rewrite framework, example, build, and gate paths
This commit is contained in:
Jakub Zych
2026-09-28 02:21:02 +02:00
parent ac1f6d14f4
commit 5e50b166ef
277 changed files with 303 additions and 303 deletions

26
modules/lagoon/keygen.go Normal file
View File

@@ -0,0 +1,26 @@
package lagoon
import (
"context"
"crypto/rand"
"encoding/base64"
"git.golem15.com/golem15/summercms/modules/bonfire"
)
// KeyGenerateCommand prints a fresh 32-byte base64 app.key and performs no
// other side effect (D-11).
func KeyGenerateCommand() bonfire.Command {
return bonfire.Command{
Name: "key:generate",
Description: "Print a fresh 32-byte base64 app.key",
Run: func(ctx context.Context, in bonfire.Input, out bonfire.Output) error {
key := make([]byte, encryptedKeySize)
if _, err := rand.Read(key); err != nil {
return err
}
out.Success(base64.StdEncoding.EncodeToString(key))
return nil
},
}
}