Files
EdgeAPI/internal/acme/providers.go

25 lines
613 B
Go
Raw Normal View History

2024-05-17 18:27:26 +08:00
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
2021-10-03 13:09:29 +08:00
package acme
const DefaultProviderCode = "letsencrypt"
type Provider struct {
Name string `json:"name"`
Code string `json:"code"`
Description string `json:"description"`
APIURL string `json:"apiURL"`
2022-10-27 18:12:15 +08:00
TestAPIURL string `json:"testAPIURL"`
2021-10-03 13:09:29 +08:00
RequireEAB bool `json:"requireEAB"`
EABDescription string `json:"eabDescription"`
}
func FindProviderWithCode(code string) *Provider {
for _, provider := range FindAllProviders() {
if provider.Code == code {
return provider
}
}
return nil
}