- Created a comprehensive documentation file for DNS provider types, including RFC 2136, Webhook, and Script providers, detailing their use cases, configurations, and security notes. - Updated the DNSProviderForm component to handle new field types including select and textarea for better user input management. - Enhanced the DNS provider schemas to include new fields for script execution, webhook authentication, and RFC 2136 configurations, improving flexibility and usability.
32 lines
926 B
Go
32 lines
926 B
Go
// Package custom provides custom DNS provider plugins for non-built-in integrations.
|
|
package custom
|
|
|
|
import (
|
|
"github.com/Wikid82/charon/backend/internal/logger"
|
|
"github.com/Wikid82/charon/backend/pkg/dnsprovider"
|
|
)
|
|
|
|
// init automatically registers all custom DNS provider plugins when the package is imported.
|
|
func init() {
|
|
providers := []dnsprovider.ProviderPlugin{
|
|
NewManualProvider(),
|
|
NewRFC2136Provider(),
|
|
NewWebhookProvider(),
|
|
NewScriptProvider(),
|
|
}
|
|
|
|
for _, provider := range providers {
|
|
if err := provider.Init(); err != nil {
|
|
logger.Log().WithError(err).Warnf("Failed to initialize custom provider: %s", provider.Type())
|
|
continue
|
|
}
|
|
|
|
if err := dnsprovider.Global().Register(provider); err != nil {
|
|
logger.Log().WithError(err).Warnf("Failed to register custom provider: %s", provider.Type())
|
|
continue
|
|
}
|
|
|
|
logger.Log().Debugf("Registered custom DNS provider: %s", provider.Type())
|
|
}
|
|
}
|