Documentation
¶
Index ¶
- Constants
- func GetCertificateFilename(identifier string) string
- func GetKeyFilename(identifier string) string
- func GetPemFilename(identifier string) string
- func GetX509Certificate(cert []byte) (*x509.Certificate, error)
- func SortDomainsRequests(domainsRequests []*DomainRequest)
- type Cache
- type Certificate
- func (c *Certificate) GetCertificateFilename() string
- func (c *Certificate) GetKeyFilename() string
- func (c *Certificate) GetPemContent() []byte
- func (c *Certificate) GetPemFilename() string
- func (c *Certificate) IsValid() bool
- func (c *Certificate) Match(domains Domains) bool
- func (c *Certificate) UnmarshalJSON(data []byte) error
- type Certificates
- func (c Certificates) CheckIdentifierUnique(identifier string) bool
- func (c Certificates) Deletes(removeCertificates Certificates) Certificates
- func (c Certificates) GetCertificate(identifier string) *Certificate
- func (c Certificates) Match(domains Domains, onlyValid bool) *Certificate
- func (c Certificates) UnusedCertificates(domainsRequests []*DomainRequest) Certificates
- func (c Certificates) UsedCertificates(domainsRequests []*DomainRequest) Certificates
- type Domain
- type DomainRequest
- type Domains
- type Requester
- type Requesters
- type Resolver
- type Resolvers
- type State
Constants ¶
View Source
const ( Name = "lets-go-tls" NameMetrics = "lets_go_tls" NameServer = Name + "-server" NameServerMetrics = NameMetrics + "_server" NameAgent = Name + "-agent" NameAgentMetrics = NameMetrics + "_agent" )
View Source
const (
DefaultKey = "default"
)
Variables ¶
This section is empty.
Functions ¶
func GetCertificateFilename ¶
func GetKeyFilename ¶
func GetPemFilename ¶
func GetX509Certificate ¶
func GetX509Certificate(cert []byte) (*x509.Certificate, error)
func SortDomainsRequests ¶
func SortDomainsRequests(domainsRequests []*DomainRequest)
Types ¶
type Cache ¶
type Cache = cache.CacheInterface[string]
type Certificate ¶
type Certificate struct {
Identifier string `json:"identifier,omitempty"`
Main string `json:"main,omitempty"`
Domains Domains `json:"domains,omitempty"`
Certificate []byte `json:"certificate,omitempty"`
Key []byte `json:"key,omitempty"`
ExpirationDate time.Time `json:"expiration_date,omitempty"`
ObtainFailCount int `json:"obtain_fail_count,omitempty"`
ObtainFailDate time.Time `json:"obtain_fail_date,omitempty"`
UnusedAt time.Time `json:"unused_at,omitempty"`
}
func (*Certificate) GetCertificateFilename ¶
func (c *Certificate) GetCertificateFilename() string
func (*Certificate) GetKeyFilename ¶
func (c *Certificate) GetKeyFilename() string
func (*Certificate) GetPemContent ¶
func (c *Certificate) GetPemContent() []byte
func (*Certificate) GetPemFilename ¶
func (c *Certificate) GetPemFilename() string
func (*Certificate) IsValid ¶
func (c *Certificate) IsValid() bool
func (*Certificate) Match ¶
func (c *Certificate) Match(domains Domains) bool
func (*Certificate) UnmarshalJSON ¶
func (c *Certificate) UnmarshalJSON(data []byte) error
type Certificates ¶
type Certificates []*Certificate
func (Certificates) CheckIdentifierUnique ¶
func (c Certificates) CheckIdentifierUnique(identifier string) bool
func (Certificates) Deletes ¶
func (c Certificates) Deletes(removeCertificates Certificates) Certificates
func (Certificates) GetCertificate ¶
func (c Certificates) GetCertificate(identifier string) *Certificate
func (Certificates) Match ¶
func (c Certificates) Match(domains Domains, onlyValid bool) *Certificate
func (Certificates) UnusedCertificates ¶
func (c Certificates) UnusedCertificates(domainsRequests []*DomainRequest) Certificates
func (Certificates) UsedCertificates ¶
func (c Certificates) UsedCertificates(domainsRequests []*DomainRequest) Certificates
type Domain ¶
type Domain string
func (Domain) FormatSubdomainToWildcard ¶
func (Domain) IsWildcard ¶
type DomainRequest ¶
func (DomainRequest) IsIP ¶
func (dr DomainRequest) IsIP() bool
type Domains ¶
type Domains []Domain
func (Domains) ContainsWildcard ¶
func (Domains) ToStringSlice ¶
type Requester ¶
type Requester interface {
ID() string
Fetch() ([]*DomainRequest, error)
}
type Requesters ¶
func (Requesters) Get ¶
func (p Requesters) Get(key string) Requester
type Resolver ¶
type Resolver interface {
ID() string
TypeChallenge() string
Obtain(request certificate.ObtainRequest) (*certificate.Resource, error)
RenewWithOptions(certRes certificate.Resource, options *certificate.RenewOptions) (*certificate.Resource, error)
Register(options registration.RegisterOptions) (*registration.Resource, error)
Match(certificate *Certificate) bool
}
type Resolvers ¶
func (Resolvers) FindResolver ¶
func (r Resolvers) FindResolver(certificate *Certificate) Resolver
type State ¶
type State struct {
Account *acme.Account `json:"account,omitempty"`
Certificates Certificates `json:"certificates"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.