// Code generated by 'make generate'; DO NOT EDIT.

package lego

import (
	"fmt"
	"strings"
)

const (
	// CodeActalis is the CA code for Actalis.
	// https://guide.actalis.com/ssl/activation/acme
	CodeActalis = "actalis"

	// CodeDigicert is the CA code for Digicert.
	// https://docs.digicert.com/en/trust-lifecycle-manager/automate-management-of-certificates/acme-automation-service/third-party-acme-integration/install-and-configure-third-party-acme-clients.html
	CodeDigicert = "digicert"

	// CodeFreeSSL is the CA code for FreeSSL.
	// https://freessl.cn/
	CodeFreeSSL = "freessl"

	// CodeGlobalSign is the CA code for GlobalSign.
	// https://docs.globalsign.com/solutions/services/acme/issuing-certificates-http-validation
	CodeGlobalSign = "globalsign"

	// CodeGoogleTrust is the CA code for Google Trust.
	// https://docs.cloud.google.com/certificate-manager/docs/public-ca-tutorial#register-acme
	CodeGoogleTrust = "googletrust"

	// CodeGoogleTrustStaging is the CA code for Google Trust staging.
	// https://docs.cloud.google.com/certificate-manager/docs/public-ca-tutorial#register-acme
	CodeGoogleTrustStaging = "googletrust-staging"

	// CodeLetsEncrypt is the CA code for Let's Encrypt.
	// https://letsencrypt.org/docs/
	CodeLetsEncrypt = "letsencrypt"

	// CodeLetsEncryptStaging is the CA code for Let's Encrypt staging.
	// https://letsencrypt.org/docs/staging-environment/
	CodeLetsEncryptStaging = "letsencrypt-staging"

	// CodeLiteSSL is the CA code for LiteSSL.
	// https://litessl.cn/
	CodeLiteSSL = "litessl"

	// CodePeeringHub is the CA code for PeeringHub.
	// https://doc.peeringhub.io/guides/generating-certificate/acme-protocol-reference/list-server-directory
	CodePeeringHub = "peeringhub"

	// CodeSSLComECC is the CA code for SSL.com ECDSA.
	// https://www.ssl.com/guide/ssl-tls-certificate-issuance-and-revocation-with-acme/
	CodeSSLComECC = "sslcomecc"

	// CodeSSLComRSA is the CA code for SSL.com RSA.
	// https://www.ssl.com/guide/ssl-tls-certificate-issuance-and-revocation-with-acme/
	CodeSSLComRSA = "sslcomrsa"

	// CodeSectigo is the CA code for Sectigo DV (Domain Validation).
	// https://docs.sectigo.com/caas/caas-api-guide/create-acme-accounts
	CodeSectigo = "sectigo"

	// CodeSectigoEV is the CA code for Sectigo EV (Extended Validation).
	// https://docs.sectigo.com/
	CodeSectigoEV = "sectigoev"

	// CodeSectigoOV is the CA code for Sectigo OV (Organization Validation) .
	// https://docs.sectigo.com/caas/caas-api-guide/getting-started-ov
	CodeSectigoOV = "sectigoov"

	// CodeZeroSSL is the CA code for ZeroSSL.
	// https://zerossl.com/documentation/acme/
	CodeZeroSSL = "zerossl"
)

const (
	// DirectoryURLActalis is the directory URL for Actalis.
	// https://guide.actalis.com/ssl/activation/acme
	DirectoryURLActalis = "https://acme-api.actalis.com/acme/directory"

	// DirectoryURLDigicert is the directory URL for Digicert.
	// https://docs.digicert.com/en/trust-lifecycle-manager/automate-management-of-certificates/acme-automation-service/third-party-acme-integration/install-and-configure-third-party-acme-clients.html
	DirectoryURLDigicert = "https://one.digicert.com/mpki/api/v1/acme/v2/directory"

	// DirectoryURLFreeSSL is the directory URL for FreeSSL.
	// https://freessl.cn/
	DirectoryURLFreeSSL = "https://acmepro.freessl.cn/v2/DV"

	// DirectoryURLGlobalSign is the directory URL for GlobalSign.
	// https://docs.globalsign.com/solutions/services/acme/issuing-certificates-http-validation
	DirectoryURLGlobalSign = "https://emea.acme.atlas.globalsign.com/directory"

	// DirectoryURLGoogleTrust is the directory URL for Google Trust.
	// https://docs.cloud.google.com/certificate-manager/docs/public-ca-tutorial#register-acme
	DirectoryURLGoogleTrust = "https://dv.acme-v02.api.pki.goog/directory"

	// DirectoryURLGoogleTrustStaging is the directory URL for Google Trust staging.
	// https://docs.cloud.google.com/certificate-manager/docs/public-ca-tutorial#register-acme
	DirectoryURLGoogleTrustStaging = "https://dv.acme-v02.test-api.pki.goog/directory"

	// DirectoryURLLetsEncrypt is the directory URL for Let's Encrypt.
	// https://letsencrypt.org/docs/
	DirectoryURLLetsEncrypt = "https://acme-v02.api.letsencrypt.org/directory"

	// DirectoryURLLetsEncryptStaging is the directory URL for Let's Encrypt staging.
	// https://letsencrypt.org/docs/staging-environment/
	DirectoryURLLetsEncryptStaging = "https://acme-staging-v02.api.letsencrypt.org/directory"

	// DirectoryURLLiteSSL is the directory URL for LiteSSL.
	// https://litessl.cn/
	DirectoryURLLiteSSL = "https://acme.litessl.com/acme/v2/directory"

	// DirectoryURLPeeringHub is the directory URL for PeeringHub.
	// https://doc.peeringhub.io/guides/generating-certificate/acme-protocol-reference/list-server-directory
	DirectoryURLPeeringHub = "https://stica.peeringhub.io/acme"

	// DirectoryURLSSLComECC is the directory URL for SSL.com ECDSA.
	// https://www.ssl.com/guide/ssl-tls-certificate-issuance-and-revocation-with-acme/
	DirectoryURLSSLComECC = "https://acme.ssl.com/sslcom-dv-ecc"

	// DirectoryURLSSLComRSA is the directory URL for SSL.com RSA.
	// https://www.ssl.com/guide/ssl-tls-certificate-issuance-and-revocation-with-acme/
	DirectoryURLSSLComRSA = "https://acme.ssl.com/sslcom-dv-rsa"

	// DirectoryURLSectigo is the directory URL for Sectigo DV (Domain Validation).
	// https://docs.sectigo.com/caas/caas-api-guide/create-acme-accounts
	DirectoryURLSectigo = "https://acme.sectigo.com/v2/DV"

	// DirectoryURLSectigoEV is the directory URL for Sectigo EV (Extended Validation).
	// https://docs.sectigo.com/
	DirectoryURLSectigoEV = "https://acme.sectigo.com/v2/EV"

	// DirectoryURLSectigoOV is the directory URL for Sectigo OV (Organization Validation) .
	// https://docs.sectigo.com/caas/caas-api-guide/getting-started-ov
	DirectoryURLSectigoOV = "https://acme.sectigo.com/v2/OV"

	// DirectoryURLZeroSSL is the directory URL for ZeroSSL.
	// https://zerossl.com/documentation/acme/
	DirectoryURLZeroSSL = "https://acme.zerossl.com/v2/DV90"
)

// GetDirectoryURL returns the directory URL for the given CA code.
func GetDirectoryURL(code string) (string, error) {
	switch strings.ToLower(code) {
	case CodeActalis:
		return DirectoryURLActalis, nil

	case CodeDigicert:
		return DirectoryURLDigicert, nil

	case CodeFreeSSL:
		return DirectoryURLFreeSSL, nil

	case CodeGlobalSign:
		return DirectoryURLGlobalSign, nil

	case CodeGoogleTrust:
		return DirectoryURLGoogleTrust, nil

	case CodeGoogleTrustStaging:
		return DirectoryURLGoogleTrustStaging, nil

	case CodeLetsEncrypt:
		return DirectoryURLLetsEncrypt, nil

	case CodeLetsEncryptStaging:
		return DirectoryURLLetsEncryptStaging, nil

	case CodeLiteSSL:
		return DirectoryURLLiteSSL, nil

	case CodePeeringHub:
		return DirectoryURLPeeringHub, nil

	case CodeSSLComECC:
		return DirectoryURLSSLComECC, nil

	case CodeSSLComRSA:
		return DirectoryURLSSLComRSA, nil

	case CodeSectigo:
		return DirectoryURLSectigo, nil

	case CodeSectigoEV:
		return DirectoryURLSectigoEV, nil

	case CodeSectigoOV:
		return DirectoryURLSectigoOV, nil

	case CodeZeroSSL:
		return DirectoryURLZeroSSL, nil

	default:
		return "", fmt.Errorf("unknown ACME server code: %q", code)
	}
}

func GetAllCodes() []string {
	return []string{
		CodeActalis,
		CodeDigicert,
		CodeFreeSSL,
		CodeGlobalSign,
		CodeGoogleTrust,
		CodeGoogleTrustStaging,
		CodeLetsEncrypt,
		CodeLetsEncryptStaging,
		CodeLiteSSL,
		CodePeeringHub,
		CodeSSLComECC,
		CodeSSLComRSA,
		CodeSectigo,
		CodeSectigoEV,
		CodeSectigoOV,
		CodeZeroSSL,
	}
}
