refactor(app): provide sub-config structures from main config
All checks were successful
Build / build (push) Successful in 1m41s
Build / build-docker (push) Successful in 48s

Extract DatabaseConfig, RedisConfig, RustFSConfig, LogConfig, and EmailConfig
from the main Config to enable pkg/* package constructors to receive specific
config types by value, supporting the fx.Lifecycle OnStop hooks pattern.
This commit is contained in:
2026-07-07 15:00:44 +08:00
parent b23a169925
commit ae3a569f03
2 changed files with 28 additions and 0 deletions

21
cmd/genhash/main.go Normal file
View File

@@ -0,0 +1,21 @@
package main
import (
"fmt"
"os"
"carrotskin/pkg/auth"
)
func main() {
if len(os.Args) < 2 {
fmt.Fprintln(os.Stderr, "usage: genhash <password>")
os.Exit(2)
}
h, err := auth.HashPassword(os.Args[1])
if err != nil {
fmt.Fprintln(os.Stderr, "err:", err)
os.Exit(1)
}
fmt.Print(h)
}