Documentation ¶
Index ¶
- func AddCertsToDb(certificates *certificate.Resource, domain string, email string) error
- func GenerateFreeSSLCerts(domain string, email string) *certificate.Resource
- func OpenDb() *sql.DB
- func RemoveCertFromDb(domain string) error
- func RemoveExpiredCerts()
- func RemoveRevokedCerts()
- func UpdateCertsInDb(certificates *certificate.Resource, domain string) error
- func UpdateExpiringCerts()
- type Certificate
- type MyUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCertsToDb ¶
func AddCertsToDb(certificates *certificate.Resource, domain string, email string) error
AddCertsToDb uploads certs as strings to local MySql db
func GenerateFreeSSLCerts ¶
func GenerateFreeSSLCerts(domain string, email string) *certificate.Resource
GenerateFreeSSLCerts requests/generate Cert and uploads it to db
func RemoveCertFromDb ¶
RemoveCertFromDb deletes row from db table based of primary key domain
func RemoveExpiredCerts ¶
func RemoveExpiredCerts()
RemoveExpiredCerts removes expired certs from the db
func RemoveRevokedCerts ¶
func RemoveRevokedCerts()
RemoveRevokedCerts removes certs that were revoked by the CA
func UpdateCertsInDb ¶
func UpdateCertsInDb(certificates *certificate.Resource, domain string) error
UpdateCertsInDb updates the a domains certs in the db (bc the original cert is expired)
func UpdateExpiringCerts ¶
func UpdateExpiringCerts()
UpdateExpiringCerts gets all rows in DB where cert is almost expiring, and calls UpdateCertsInDb to replace expiring certs with freshly generated ones
Types ¶
type Certificate ¶
type Certificate struct { ClientCert string `json:"clientCert"` IssuerCert string `json:"issuerCert"` }
func GetCertFromDb ¶
func GetCertFromDb(domain string) (Certificate, error)
GetCertFromDb gets cert from db from domain primary key
type MyUser ¶
type MyUser struct { Email string Registration *registration.Resource // contains filtered or unexported fields }
func (*MyUser) GetPrivateKey ¶
func (u *MyUser) GetPrivateKey() crypto.PrivateKey
func (MyUser) GetRegistration ¶
func (u MyUser) GetRegistration() *registration.Resource
Click to show internal directories.
Click to hide internal directories.