Documentation ¶
Index ¶
- func NewCmdLE(out io.Writer, errOut io.Writer) *cobra.Command
- type Account
- type AccountsStorage
- func (s *AccountsStorage) ExistsAccountFilePath() bool
- func (s *AccountsStorage) GetPrivateKey(keyType certcrypto.KeyType) crypto.PrivateKey
- func (s *AccountsStorage) GetRootPath() string
- func (s *AccountsStorage) GetRootUserPath() string
- func (s *AccountsStorage) GetUserID() string
- func (s *AccountsStorage) LoadAccount(options *leOptions, privateKey crypto.PrivateKey) *Account
- func (s *AccountsStorage) Save(account *Account) error
- type AcmeUser
- type CertificatesStorage
- func (s *CertificatesStorage) CreateArchiveFolder()
- func (s *CertificatesStorage) CreateRootFolder()
- func (s *CertificatesStorage) ExistsFile(domain, extension string) bool
- func (s *CertificatesStorage) GetFileName(domain, extension string) string
- func (s *CertificatesStorage) GetRootPath() string
- func (s *CertificatesStorage) MoveToArchive(domain string) error
- func (s *CertificatesStorage) ReadCertificate(domain, extension string) ([]*x509.Certificate, error)
- func (s *CertificatesStorage) ReadFile(domain, extension string) ([]byte, error)
- func (s *CertificatesStorage) ReadResource(domain string) certificate.Resource
- func (s *CertificatesStorage) SaveResource(certRes *certificate.Resource)
- func (s *CertificatesStorage) WriteFile(domain, extension string, data []byte) error
- type KeyTypeVar
- func (f *KeyTypeVar) EC256() bool
- func (f *KeyTypeVar) EC384() bool
- func (f *KeyTypeVar) Get() certcrypto.KeyType
- func (f *KeyTypeVar) RSA2048() bool
- func (f *KeyTypeVar) RSA4096() bool
- func (f *KeyTypeVar) RSA8192() bool
- func (f *KeyTypeVar) Set(value string) error
- func (f *KeyTypeVar) String() string
- func (f *KeyTypeVar) Type() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Account ¶
type Account struct { Email string `json:"email"` Registration *registration.Resource `json:"registration"` // contains filtered or unexported fields }
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 {
// contains filtered or unexported fields
}
AccountsStorage A storage for account data.
rootPath:
./.path/accounts/ │ └── root accounts directory └── "path" option
rootUserPath:
./.path/accounts/localhost_14000/hubert@hubert.com/ │ │ │ └── userID ("email" option) │ │ └── CA server ("server" option) │ └── root accounts directory └── "path" option
keysPath:
./.path/accounts/localhost_14000/hubert@hubert.com/keys/ │ │ │ │ └── root keys directory │ │ │ └── userID ("email" option) │ │ └── CA server ("server" option) │ └── root accounts directory └── "path" option
accountFilePath:
./.path/accounts/localhost_14000/hubert@hubert.com/account.json │ │ │ │ └── account file │ │ │ └── userID ("email" option) │ │ └── CA server ("server" option) │ └── root accounts directory └── "path" option
func NewAccountsStorage ¶
func NewAccountsStorage(options *leOptions) *AccountsStorage
NewAccountsStorage Creates a new AccountsStorage.
func (*AccountsStorage) ExistsAccountFilePath ¶
func (s *AccountsStorage) ExistsAccountFilePath() bool
func (*AccountsStorage) GetPrivateKey ¶
func (s *AccountsStorage) GetPrivateKey(keyType certcrypto.KeyType) crypto.PrivateKey
func (*AccountsStorage) GetRootPath ¶
func (s *AccountsStorage) GetRootPath() string
func (*AccountsStorage) GetRootUserPath ¶
func (s *AccountsStorage) GetRootUserPath() string
func (*AccountsStorage) GetUserID ¶
func (s *AccountsStorage) GetUserID() string
func (*AccountsStorage) LoadAccount ¶
func (s *AccountsStorage) LoadAccount(options *leOptions, privateKey crypto.PrivateKey) *Account
func (*AccountsStorage) Save ¶
func (s *AccountsStorage) Save(account *Account) error
type AcmeUser ¶
type AcmeUser struct { Email string Registration *registration.Resource // contains filtered or unexported fields }
We need a user or account type that implements acme.User
func (*AcmeUser) GetPrivateKey ¶
func (u *AcmeUser) GetPrivateKey() crypto.PrivateKey
func (AcmeUser) GetRegistration ¶
func (u AcmeUser) GetRegistration() *registration.Resource
type CertificatesStorage ¶
type CertificatesStorage struct {
// contains filtered or unexported fields
}
CertificatesStorage a certificates storage.
rootPath:
./.path/certificates/ │ └── root certificates directory └── "path" option
archivePath:
./.path/archives/ │ └── archived certificates directory └── "path" option
func NewCertificatesStorage ¶
func NewCertificatesStorage(path string) *CertificatesStorage
NewCertificatesStorage create a new certificates storage.
func (*CertificatesStorage) CreateArchiveFolder ¶
func (s *CertificatesStorage) CreateArchiveFolder()
func (*CertificatesStorage) CreateRootFolder ¶
func (s *CertificatesStorage) CreateRootFolder()
func (*CertificatesStorage) ExistsFile ¶
func (s *CertificatesStorage) ExistsFile(domain, extension string) bool
func (*CertificatesStorage) GetFileName ¶
func (s *CertificatesStorage) GetFileName(domain, extension string) string
func (*CertificatesStorage) GetRootPath ¶
func (s *CertificatesStorage) GetRootPath() string
func (*CertificatesStorage) MoveToArchive ¶
func (s *CertificatesStorage) MoveToArchive(domain string) error
func (*CertificatesStorage) ReadCertificate ¶
func (s *CertificatesStorage) ReadCertificate(domain, extension string) ([]*x509.Certificate, error)
func (*CertificatesStorage) ReadFile ¶
func (s *CertificatesStorage) ReadFile(domain, extension string) ([]byte, error)
func (*CertificatesStorage) ReadResource ¶
func (s *CertificatesStorage) ReadResource(domain string) certificate.Resource
func (*CertificatesStorage) SaveResource ¶
func (s *CertificatesStorage) SaveResource(certRes *certificate.Resource)
type KeyTypeVar ¶
type KeyTypeVar string
func (*KeyTypeVar) EC256 ¶
func (f *KeyTypeVar) EC256() bool
func (*KeyTypeVar) EC384 ¶
func (f *KeyTypeVar) EC384() bool
func (*KeyTypeVar) Get ¶
func (f *KeyTypeVar) Get() certcrypto.KeyType
func (*KeyTypeVar) RSA2048 ¶
func (f *KeyTypeVar) RSA2048() bool
func (*KeyTypeVar) RSA4096 ¶
func (f *KeyTypeVar) RSA4096() bool
func (*KeyTypeVar) RSA8192 ¶
func (f *KeyTypeVar) RSA8192() bool
func (*KeyTypeVar) Set ¶
func (f *KeyTypeVar) Set(value string) error
func (*KeyTypeVar) String ¶
func (f *KeyTypeVar) String() string
func (*KeyTypeVar) Type ¶
func (f *KeyTypeVar) Type() string
Click to show internal directories.
Click to hide internal directories.