github.com/btccom/go-micro/v2@v2.9.3/api/server/acme/acme.go (about) 1 // Package acme abstracts away various ACME libraries 2 package acme 3 4 import ( 5 "crypto/tls" 6 "errors" 7 "net" 8 ) 9 10 var ( 11 // ErrProviderNotImplemented can be returned when attempting to 12 // instantiate an unimplemented provider 13 ErrProviderNotImplemented = errors.New("Provider not implemented") 14 ) 15 16 // Provider is a ACME provider interface 17 type Provider interface { 18 // Listen returns a new listener 19 Listen(...string) (net.Listener, error) 20 // TLSConfig returns a tls config 21 TLSConfig(...string) (*tls.Config, error) 22 } 23 24 // The Let's Encrypt ACME endpoints 25 const ( 26 LetsEncryptStagingCA = "https://acme-staging-v02.api.letsencrypt.org/directory" 27 LetsEncryptProductionCA = "https://acme-v02.api.letsencrypt.org/directory" 28 )