Documentation
¶
Index ¶
- type Certificate
- type LECredentials
- type Storage
- func (s *Storage) GetCertificate(ctx context.Context, domain string) (*Certificate, error)
- func (s *Storage) GetExpiringCertificates(ctx context.Context, days int) ([]*Certificate, error)
- func (s *Storage) GetLECredentials(ctx context.Context, email string) (*LECredentials, error)
- func (s *Storage) Init(ctx context.Context) error
- func (s *Storage) Run(ctx context.Context) error
- func (s *Storage) SaveCertificate(ctx context.Context, cert *Certificate) error
- func (s *Storage) SaveLECredentials(ctx context.Context, creds *LECredentials) error
- func (s *Storage) TSNetStorage() *TSNetStorage
- type TSNetStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Certificate ¶
type Certificate struct {
ID int64 `json:"-"`
Domain string `json:"domain"`
Certificate []byte `json:"certificate"`
PrivateKey []byte `json:"private_key"`
IssuerCert []byte `json:"issuer_cert,omitempty"`
NotBefore time.Time `json:"not_before"`
NotAfter time.Time `json:"not_after"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Certificate represents a stored TLS certificate
func (Certificate) GetTLSCertificate ¶
func (c Certificate) GetTLSCertificate() (cert tls.Certificate, err error)
GetTLSCertificate returns the tls.Certificate from the Certificate resource
type LECredentials ¶
type LECredentials struct {
ID int64 `json:"-"`
Email string `json:"email"`
KeyType string `json:"key_type"`
Key []byte `json:"key"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
LECredentials represents stored Let's Encrypt credentials
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage handles certificate and credential persistence
func NewStorage ¶
NewStorage creates a new storage instance
func (*Storage) GetCertificate ¶
GetCertificate retrieves a certificate by domain
func (*Storage) GetExpiringCertificates ¶
GetExpiringCertificates retrieves certificates expiring within the specified days
func (*Storage) GetLECredentials ¶
GetLECredentials retrieves Let's Encrypt credentials by email
func (*Storage) SaveCertificate ¶
func (s *Storage) SaveCertificate(ctx context.Context, cert *Certificate) error
SaveCertificate saves or updates a certificate
func (*Storage) SaveLECredentials ¶
func (s *Storage) SaveLECredentials(ctx context.Context, creds *LECredentials) error
SaveLECredentials saves or updates Let's Encrypt credentials
func (*Storage) TSNetStorage ¶
func (s *Storage) TSNetStorage() *TSNetStorage
type TSNetStorage ¶
type TSNetStorage struct {
// contains filtered or unexported fields
}
func (*TSNetStorage) All ¶
All implements the ipn.ExportableStore interface and returns an iterator over all store keys.
func (*TSNetStorage) ReadState ¶
func (t *TSNetStorage) ReadState(id ipn.StateKey) ([]byte, error)
ReadState implements the ipn.StateStore interface.
func (*TSNetStorage) WriteState ¶
func (t *TSNetStorage) WriteState(id ipn.StateKey, bs []byte) error
WriteState implements the ipn.StateStore interface.