- Implemented `useManualChallenge`, `useChallengePoll`, and `useManualChallengeMutations` hooks for managing manual DNS challenges. - Created tests for the `useManualChallenge` hooks to ensure correct fetching and mutation behavior. - Added `ManualDNSChallenge` component for displaying challenge details and actions. - Developed end-to-end tests for the Manual DNS Provider feature, covering provider selection, challenge UI, and accessibility compliance. - Included error handling tests for verification failures and network errors.
29 lines
855 B
Go
29 lines
855 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(),
|
|
}
|
|
|
|
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())
|
|
}
|
|
}
|