Documentation ¶
Index ¶
- Constants
- func GetHandler(config *config.Config, logger logger.Logger) (router.HandlerInterface, error)
- type CertificateManager
- func (c *CertificateManager) Assign(certData agentintegration.CertificateAssignRequestData) (*agentintegration.Certificate, error)
- func (c *CertificateManager) GetStorageCertData(certName string) (*agentintegration.Certificate, error)
- func (c *CertificateManager) GetStorageCertList() ([]string, error)
- func (c *CertificateManager) Issue(certData agentintegration.CertificateIssueRequestData) (*agentintegration.Certificate, error)
- func (c *CertificateManager) RemoveCertificate(certName string) error
- func (c *CertificateManager) Upload(certName, webServer, pemData string) (*agentintegration.Certificate, error)
- type ChallengeType
- type DNSChallengeType
- type HTTPChallengeType
- type Handler
- type Storage
- func (s *Storage) AddPemCertificate(certName, pemData string) (string, error)
- func (s *Storage) GetCertificate(certName string) (*agentintegration.Certificate, error)
- func (s *Storage) GetCertificateAsString(certName string) (string, string, error)
- func (s *Storage) GetCertificateNameList() ([]string, error)
- func (s *Storage) GetCertificatePath(certName string) (string, error)
- func (s *Storage) GetCertificatesDirPath() string
- func (s *Storage) GetVhostCertificateKeyPath(certName string) string
- func (s *Storage) GetVhostCertificatePath(certName, extension string) string
- func (s *Storage) RemoveCertificate(certName string) error
Constants ¶
const ( HttpChallengeTypeCode = "http" DnsChallengeTypeCode = "dns" )
Variables ¶
This section is empty.
Functions ¶
func GetHandler ¶
Types ¶
type CertificateManager ¶
type CertificateManager struct { CertStorage *Storage Config *config.Config // contains filtered or unexported fields }
CertificateManager manages certificates: issue, renew, ....
func GetCertificateManager ¶
func (*CertificateManager) Assign ¶
func (c *CertificateManager) Assign(certData agentintegration.CertificateAssignRequestData) (*agentintegration.Certificate, error)
Assign assign certificate from the storage to a domain
func (*CertificateManager) GetStorageCertData ¶
func (c *CertificateManager) GetStorageCertData(certName string) (*agentintegration.Certificate, error)
GetStorageCertData returns certificate by name
func (*CertificateManager) GetStorageCertList ¶
func (c *CertificateManager) GetStorageCertList() ([]string, error)
GetStorageCertList returns names of all certificates in the storage
func (*CertificateManager) Issue ¶
func (c *CertificateManager) Issue(certData agentintegration.CertificateIssueRequestData) (*agentintegration.Certificate, error)
Issue issues a certificate
func (*CertificateManager) RemoveCertificate ¶
func (c *CertificateManager) RemoveCertificate(certName string) error
GetStorageCertData returns certificate by name
func (*CertificateManager) Upload ¶
func (c *CertificateManager) Upload(certName, webServer, pemData string) (*agentintegration.Certificate, error)
Upload deploys an existed certificate
type ChallengeType ¶
type ChallengeType interface {
GetParams() []string
}
ChallengeType should be implemented by object to specify challenge type during certificate issuence
type DNSChallengeType ¶
type DNSChallengeType struct {
Provider string
}
DNSChallengeType implements http challenge type
func (*DNSChallengeType) GetParams ¶
func (ct *DNSChallengeType) GetParams() []string
GetParams retuns the list of parameters for dns challenge type
type HTTPChallengeType ¶
HTTPChallengeType implements http challenge type
func (*HTTPChallengeType) GetParams ¶
func (ct *HTTPChallengeType) GetParams() []string
GetParams retuns the list of parameters for http challenge type
type Storage ¶
type Storage struct {
Path string
}
func GetDefaultCertStorage ¶
func (*Storage) AddPemCertificate ¶
AddCertificate add .pem certificate to the storage
func (*Storage) GetCertificate ¶
func (s *Storage) GetCertificate(certName string) (*agentintegration.Certificate, error)
GetStorageCertData returns certificate by name
func (*Storage) GetCertificateAsString ¶
GetCertificateAsString returns certificate file path and content
func (*Storage) GetCertificateNameList ¶
GetStorageCertList returns names of all certificates in the storage
func (*Storage) GetCertificatePath ¶
func (*Storage) GetCertificatesDirPath ¶
getCertificatesDirPath returns path to directory where certificates are stored
func (*Storage) GetVhostCertificateKeyPath ¶
func (*Storage) GetVhostCertificatePath ¶
func (*Storage) RemoveCertificate ¶
RemoveCertificate remove certificate from the storage