mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-18 23:33:51 +01:00
Extra providers were not being properly initialized during NewProvider(), causing certificate registration and renewal scheduling to be skipped. - Add ConfigExtra type with idx field for provider indexing - Add MergeExtraConfig() for inheriting main provider settings - Add setupExtraProviders() for recursive extra provider initialization - Refactor NewProvider to return error and call setupExtraProviders() - Add provider-scoped logger with "main" or "extra[N]" name - Add batch operations: ObtainCertIfNotExistsAll(), ObtainCertAll() - Add ForceExpiryAll() with completion tracking via WaitRenewalDone() - Add RenewMode (force/ifNeeded) for controlling renewal behavior - Add PrintCertExpiriesAll() for logging all provider certificate expiries Summary of staged changes: - config.go: Added ConfigExtra type, MergeExtraConfig(), recursive validation with path uniqueness checking - provider.go: Added provider indexing, scoped logger, batch cert operations, force renewal with completion tracking, RenewMode control - setup.go: New file with setupExtraProviders() for proper extra provider initialization - setup_test.go: New tests for extra provider setup - multi_cert_test.go: New tests for multi-certificate functionality - renew.go: Updated to use new provider API with error handling - state.go: Updated to handle NewProvider error return
23 lines
425 B
Go
23 lines
425 B
Go
package dnsproviders
|
|
|
|
type (
|
|
DummyConfig map[string]any
|
|
DummyProvider struct{}
|
|
)
|
|
|
|
func NewDummyDefaultConfig() *DummyConfig {
|
|
return &DummyConfig{}
|
|
}
|
|
|
|
func NewDummyDNSProviderConfig(*DummyConfig) (*DummyProvider, error) {
|
|
return &DummyProvider{}, nil
|
|
}
|
|
|
|
func (DummyProvider) Present(domain, token, keyAuth string) error {
|
|
return nil
|
|
}
|
|
|
|
func (DummyProvider) CleanUp(domain, token, keyAuth string) error {
|
|
return nil
|
|
}
|