Documentation
¶
Index ¶
- Variables
- func CheckCertExpiry(certPath string) (valid bool, expireDay float64)
- func CopyFile(content []byte, path string) error
- func CreateNonExistingFolder(path string) error
- func ObtainCertificate(client *lego.Client, domains []string) (*certificate.Resource, error)
- func SetChallenge(client *lego.Client, challenge IChallenge) error
- type Account
- type AccountsStorage
- type DNSChallenge
- type EABRegister
- type HTTPChallenge
- type HTTPMemcachedHostChallenge
- type HTTPPortChallenge
- type HTTPS3BucketChallenge
- type HTTPWebrootChallenge
- type IChallenge
- type IRegister
- type Register
- type TLSChallenge
- type TLSPortChallenge
Constants ¶
This section is empty.
Variables ¶
View Source
var (
CADirURL = lego.LEDirectoryProduction
)
Functions ¶
func CheckCertExpiry ¶
func CreateNonExistingFolder ¶
func ObtainCertificate ¶
func SetChallenge ¶
func SetChallenge(client *lego.Client, challenge IChallenge) error
Types ¶
type Account ¶
type Account struct {
Email string `json:"email"`
Registration *registration.Resource `json:"registration"`
Key crypto.PrivateKey `json:"-"`
}
Account represents a users local saved credentials.
func NewLegoClient ¶
func (*Account) GetPrivateKey ¶
func (a *Account) GetPrivateKey() crypto.PrivateKey
GetPrivateKey returns the private RSA account key.
func (*Account) GetRegistration ¶
func (a *Account) GetRegistration() *registration.Resource
GetRegistration returns the server registration.
type AccountsStorage ¶
type AccountsStorage struct {
Email string
CADirURL string
// contains filtered or unexported fields
}
func NewAccountsStorage ¶
func NewAccountsStorage(accountSavePath, email, CADirURL string) (*AccountsStorage, error)
NewAccountsStorage Creates a new AccountsStorage.
func (*AccountsStorage) GetEmail ¶
func (s *AccountsStorage) GetEmail() string
func (*AccountsStorage) LoadAccount ¶
func (s *AccountsStorage) LoadAccount() (*Account, error)
func (*AccountsStorage) Remove ¶
func (s *AccountsStorage) Remove()
func (*AccountsStorage) Save ¶
func (s *AccountsStorage) Save(account *Account) error
type DNSChallenge ¶
type EABRegister ¶
func (*EABRegister) Register ¶
func (r *EABRegister) Register(lego *lego.Client) (*registration.Resource, error)
type HTTPChallenge ¶
type HTTPChallenge struct {
HeaderName string
}
type HTTPMemcachedHostChallenge ¶
type HTTPMemcachedHostChallenge struct {
Hosts []string
}
type HTTPPortChallenge ¶
type HTTPS3BucketChallenge ¶
type HTTPS3BucketChallenge struct {
Bucket string
}
type HTTPWebrootChallenge ¶
type HTTPWebrootChallenge struct {
WebRoot string
}
type IChallenge ¶
type IRegister ¶
type IRegister interface {
Register(lego *lego.Client) (*registration.Resource, error)
}
type TLSChallenge ¶
type TLSChallenge struct {
}
type TLSPortChallenge ¶
type TLSPortChallenge struct {
HostPort string
}
Click to show internal directories.
Click to hide internal directories.