lego

package
v2.1.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2019 License: MIT Imports: 15 Imported by: 154

Documentation

Index

Constants

View Source
const (

	// LEDirectoryProduction URL to the Let's Encrypt production
	LEDirectoryProduction = "https://acme-v02.api.letsencrypt.org/directory"

	// LEDirectoryStaging URL to the Let's Encrypt staging
	LEDirectoryStaging = "https://acme-staging-v02.api.letsencrypt.org/directory"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateConfig

type CertificateConfig struct {
	KeyType certcrypto.KeyType
	Timeout time.Duration
}

type Client

type Client struct {
	Certificate  *certificate.Certifier
	Challenge    *resolver.SolverManager
	Registration *registration.Registrar
	// contains filtered or unexported fields
}

Client is the user-friendly way to ACME

func NewClient

func NewClient(config *Config) (*Client, error)

NewClient creates a new ACME client on behalf of the user. The client will depend on the ACME directory located at CADirURL for the rest of its actions. A private key of type keyType (see KeyType constants) will be generated when requesting a new certificate if one isn't provided.

func (*Client) GetExternalAccountRequired

func (c *Client) GetExternalAccountRequired() bool

GetExternalAccountRequired returns the External Account Binding requirement of the Directory

func (*Client) GetToSURL

func (c *Client) GetToSURL() string

GetToSURL returns the current ToS URL from the Directory

type Config

type Config struct {
	CADirURL    string
	User        registration.User
	UserAgent   string
	HTTPClient  *http.Client
	Certificate CertificateConfig
}

func NewConfig

func NewConfig(user registration.User) *Config

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL