mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-29 03:20:24 +08:00
增加DNS服务商账号管理
This commit is contained in:
25
internal/dnsproviders/types.go
Normal file
25
internal/dnsproviders/types.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package dnsproviders
|
||||
|
||||
import "github.com/iwind/TeaGo/maps"
|
||||
|
||||
type ProviderType = string
|
||||
|
||||
const (
|
||||
ProviderTypeDNSPod ProviderType = "dnspod"
|
||||
)
|
||||
|
||||
var AllProviderTypes = []maps.Map{
|
||||
{
|
||||
"name": "DNSPod",
|
||||
"code": ProviderTypeDNSPod,
|
||||
},
|
||||
}
|
||||
|
||||
func FindProviderTypeName(providerType string) string {
|
||||
for _, t := range AllProviderTypes {
|
||||
if t.GetString("code") == providerType {
|
||||
return t.GetString("name")
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
Reference in New Issue
Block a user