Documentation
¶
Index ¶
- Variables
- func CopyFile(content []byte, path string) error
- func CreateNonExistingFolder(path string) error
- func LegoClient(email string) (storage *AccountsStorage, account *Account, client *lego.Client, err error)
- func ObtainCertificate(client *lego.Client, domains []string) (*certificate.Resource, error)
- func SetDNSChallenge(client *lego.Client, challenge DNSChallenge) error
- func SetWebRootChallenge(client *lego.Client, webRootPath string) error
- type Account
- type AccountsStorage
- type DNSChallenge
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CADirURL = lego.LEDirectoryProduction DefaultCertTimeout = 30 )
Functions ¶
func CreateNonExistingFolder ¶
func LegoClient ¶
func ObtainCertificate ¶
func SetDNSChallenge ¶
func SetDNSChallenge(client *lego.Client, challenge DNSChallenge) 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 (*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(email, CADirURL string) (*AccountsStorage, error)
NewAccountsStorage Creates a new AccountsStorage.
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
Click to show internal directories.
Click to hide internal directories.