mirror of
https://gh-proxy.org/https://github.com/klinsmaya/CLIProxyAPI.git
synced 2026-11-10 10:26:48 +08:00
- Implemented command-line flag registration and execution for plugins with priority-based conflict resolution. - Enabled plugin-owned command-line flag execution and persistence of plugin-auth data. - Added new `Host` methods to support command-line capabilities, including flag normalization, validation, and execution state management. - Introduced unit tests to ensure coverage for command-line plugin functionality, including auth data persistence. - Updated configs to normalize plugins during initialization.
24 lines
471 B
Go
24 lines
471 B
Go
//go:build !(linux || darwin || freebsd)
|
|
|
|
package pluginhost
|
|
|
|
import "fmt"
|
|
|
|
type symbolLoader interface {
|
|
Open(path string) (symbolLookup, error)
|
|
}
|
|
|
|
type symbolLookup interface {
|
|
Lookup(name string) (any, error)
|
|
}
|
|
|
|
type unsupportedLoader struct{}
|
|
|
|
func (unsupportedLoader) Open(path string) (symbolLookup, error) {
|
|
return nil, fmt.Errorf("go plugin loading is not supported on this platform")
|
|
}
|
|
|
|
func defaultSymbolLoader() symbolLoader {
|
|
return unsupportedLoader{}
|
|
}
|