func (c *ACMEClient) GetAuthorizationURL() string {
	return c.Authorization.URL
}
GetAuthorizationURL returns the URL from from the ACME Authorization struct.
package leclient
import (
	"crypto"
	"crypto/x509"
	"encoding/pem"
	"errors"
	"fmt"
	"net/url"
	"strings"
	"github.com/eggsampler/acme"
	v1 "k8s.io/api/core/v1"
	kerr "k8s.io/apimachinery/pkg/api/errors"
	"sigs.k8s.io/controller-runtime/pkg/client"
	"github.com/openshift/certman-operator/config"
)
type Client interface {
	UpdateAccount([]string)
	CreateOrder([]string)
	GetOrderURL()
	OrderAuthorization()
	FetchAuthorization(string)
	GetAuthorizationURL()
	GetAuthorizationIndentifier()
	SetChallengeType()
	GetChallengeURL()
	GetDNS01KeyAuthorization()
	UpdateChallenge()
	FinalizeOrder()
	GetOrderEndpoint()
	FetchCertificates()
	RevokeCertificate()
}
type ACMEClient struct {
	Client        acme.Client
	Account       acme.Account
	Order         acme.Order
	Authorization acme.Authorization
	Challenge     acme.Challenge
}
func (c *ACMEClient) UpdateAccount(email string) (err error) {
	var contacts []string
	if email != "" {
		contacts = []string{fmt.Sprintf("mailto:%s", email)}
	}
	account, err := c.Client.UpdateAccount(c.Account, true, contacts...)
	if err != nil {
		return err
	}
	c.Account = account
	return err
}
func (c *ACMEClient) CreateOrder(domains []string) (err error) {
	var ids []acme.Identifier
	for _, domain := range domains {
		ids = append(ids, acme.Identifier{Type: "dns", Value: domain})
	}
	c.Order, err = c.Client.NewOrder(c.Account, ids)
	if err != nil {
		return err
	}
	return nil
}
func (c *ACMEClient) GetOrderURL() (URL string, err error) {
	URL = c.Order.URL
	return URL, err
}
func (c *ACMEClient) OrderAuthorization() []string {
	return c.Order.Authorizations
}
func (c *ACMEClient) FetchAuthorization(authURL string) (err error) {
	c.Authorization, err = c.Client.FetchAuthorization(c.Account, authURL)
	return err
}