Refactor: Moved all under internal.
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

FEAT: Directadmin provider is now working
This commit is contained in:
2024-03-18 09:55:01 +13:00
parent a52034216b
commit e1bb5adf36
19 changed files with 163 additions and 73 deletions

View File

@@ -0,0 +1,31 @@
package public_resolvers
import (
"net/http"
"time"
)
const (
IfConfigMeTag = "ifconfig.me"
ifConfigMeUrl = "https://ifconfig.me"
)
type IfConfigMe struct {
baseResolver
}
func NewDefaultIfConfigMe() *IfConfigMe {
return NewIfConfigMe(&http.Client{
Timeout: 10 * time.Second,
})
}
func NewIfConfigMe(client Doer) *IfConfigMe {
return &IfConfigMe{
baseResolver: baseResolver{
client: client,
url: ifConfigMeUrl,
ipParser: defaultIpParser,
},
}
}