refactor(watcher): extract auth synthesis logic into separate synthesizer package

This commit is contained in:
hkfires
2025-12-17 14:36:07 +08:00
parent d52b28b147
commit d605985f45
10 changed files with 2191 additions and 500 deletions

View File

@@ -0,0 +1,19 @@
package synthesizer
import (
"time"
"github.com/router-for-me/CLIProxyAPI/v6/internal/config"
)
// SynthesisContext provides the context needed for auth synthesis.
type SynthesisContext struct {
// Config is the current configuration
Config *config.Config
// AuthDir is the directory containing auth files
AuthDir string
// Now is the current time for timestamps
Now time.Time
// IDGenerator generates stable IDs for auth entries
IDGenerator *StableIDGenerator
}