config: return error if plugin type is empty (#4235)

This commit is contained in:
fatedier
2024-05-23 14:52:12 +08:00
committed by GitHub
parent 301515d2e8
commit 522e2c94c1
3 changed files with 14 additions and 1 deletions

View File

@@ -195,6 +195,10 @@ func (c *TypedProxyConfig) UnmarshalJSON(b []byte) error {
return nil
}
func (c *TypedProxyConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(c.ProxyConfigurer)
}
type ProxyConfigurer interface {
Complete(namePrefix string)
GetBaseConfig() *ProxyBaseConfig