mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-05-18 22:37:08 +08:00
- Updated all references from v6 to v7 for `github.com/router-for-me/CLIProxyAPI`. - Ensured consistency in imports within core libraries, tests, and integration tests. - Added missing tests for new features in Redis Protocol integration.
17 lines
706 B
Go
17 lines
706 B
Go
// Package synthesizer provides auth synthesis strategies for the watcher package.
|
|
// It implements the Strategy pattern to support multiple auth sources:
|
|
// - ConfigSynthesizer: generates Auth entries from config API keys
|
|
// - FileSynthesizer: generates Auth entries from OAuth JSON files
|
|
package synthesizer
|
|
|
|
import (
|
|
coreauth "github.com/router-for-me/CLIProxyAPI/v7/sdk/cliproxy/auth"
|
|
)
|
|
|
|
// AuthSynthesizer defines the interface for generating Auth entries from various sources.
|
|
type AuthSynthesizer interface {
|
|
// Synthesize generates Auth entries from the given context.
|
|
// Returns a slice of Auth pointers and any error encountered.
|
|
Synthesize(ctx *SynthesisContext) ([]*coreauth.Auth, error)
|
|
}
|