certificates

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HttpChallengeTypeCode = "http"
	DnsChallengeTypeCode  = "dns"
)

Variables

This section is empty.

Functions

func GetHandler

func GetHandler(config *config.Config, logger logger.Logger) (router.HandlerInterface, error)

Types

type CertificateManager

type CertificateManager struct {
	CertStorage *Storage

	Config *config.Config
	// contains filtered or unexported fields
}

CertificateManager manages certificates: issue, renew, ....

func GetCertificateManager

func GetCertificateManager(config *config.Config, logger logger.Logger) (*CertificateManager, error)

func (*CertificateManager) Assign

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

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

type HTTPChallengeType struct {
	HTTPPort,
	TLSPort int
	WebRoot string
}

HTTPChallengeType implements http challenge type

func (*HTTPChallengeType) GetParams

func (ct *HTTPChallengeType) GetParams() []string

GetParams retuns the list of parameters for http challenge type

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func (*Handler) Handle

func (h *Handler) Handle(request router.Request) (interface{}, error)

type Storage

type Storage struct {
	Path string
}

func GetDefaultCertStorage

func GetDefaultCertStorage(config *config.Config) *Storage

func (*Storage) AddPemCertificate

func (s *Storage) AddPemCertificate(certName, pemData string) (string, error)

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

func (s *Storage) GetCertificateAsString(certName string) (string, string, error)

GetCertificateAsString returns certificate file path and content

func (*Storage) GetCertificateNameList

func (s *Storage) GetCertificateNameList() ([]string, error)

GetStorageCertList returns names of all certificates in the storage

func (*Storage) GetCertificatePath

func (s *Storage) GetCertificatePath(certName string) (string, error)

func (*Storage) GetCertificatesDirPath

func (s *Storage) GetCertificatesDirPath() string

getCertificatesDirPath returns path to directory where certificates are stored

func (*Storage) GetVhostCertificateKeyPath

func (s *Storage) GetVhostCertificateKeyPath(certName string) string

func (*Storage) GetVhostCertificatePath

func (s *Storage) GetVhostCertificatePath(certName, extension string) string

func (*Storage) RemoveCertificate

func (s *Storage) RemoveCertificate(certName string) error

RemoveCertificate remove certificate from the storage

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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