Documentation
¶
Index ¶
- Variables
- func Load()
- type Certificate
- type FileStore
- func (store FileStore) AddCertificate(domain string, cert Certificate) error
- func (store FileStore) GetAllCertificates(exp int64) []Certificate
- func (store FileStore) GetCertificate(domain string) (*Certificate, error)
- func (store FileStore) Load() error
- func (store FileStore) RemoveCertificate(domain string) error
- func (store FileStore) UpdateCertificate(domain string, cert Certificate) error
- type MongoStore
- func (store MongoStore) AddCertificate(domain string, cert Certificate) error
- func (store MongoStore) GetAllCertificates(exp int64) []Certificate
- func (store MongoStore) GetCertificate(domain string) (*Certificate, error)
- func (store *MongoStore) Load() error
- func (store MongoStore) RemoveCertificate(domain string) error
- func (store MongoStore) UpdateCertificate(domain string, cert Certificate) error
- type SQLStore
- func (store SQLStore) AddCertificate(domain string, cert Certificate) error
- func (store SQLStore) GetAllCertificates(exp int64) []Certificate
- func (store SQLStore) GetCertificate(domain string) (*Certificate, error)
- func (store *SQLStore) Load() error
- func (store SQLStore) RemoveCertificate(domain string) error
- func (store SQLStore) UpdateCertificate(domain string, cert Certificate) error
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("certificate not found")
Functions ¶
Types ¶
type Certificate ¶
type Certificate struct {
Domain string `json:"domain" bson:"domain"`
CertificateData []byte `json:"-" bson:"certificate"`
PrivateKeyData []byte `json:"-" bson:"private_key"`
Issuer string `json:"issuer" bson:"issuer"`
ExpiresAt int64 `json:"expires_at" bson:"expires_at"`
CreatedAt int64 `json:"created_at" bson:"created_at"`
}
type FileStore ¶
type FileStore struct {
Directory string
}
func NewFileStore ¶
func NewFileStore() FileStore
func (FileStore) AddCertificate ¶
func (store FileStore) AddCertificate(domain string, cert Certificate) error
func (FileStore) GetAllCertificates ¶
func (store FileStore) GetAllCertificates(exp int64) []Certificate
func (FileStore) GetCertificate ¶
func (store FileStore) GetCertificate(domain string) (*Certificate, error)
func (FileStore) RemoveCertificate ¶
func (FileStore) UpdateCertificate ¶
func (store FileStore) UpdateCertificate(domain string, cert Certificate) error
type MongoStore ¶
type MongoStore struct {
ConnectionString string
DatabaseName string
// contains filtered or unexported fields
}
func NewMongoStore ¶
func NewMongoStore() *MongoStore
func (MongoStore) AddCertificate ¶
func (store MongoStore) AddCertificate(domain string, cert Certificate) error
func (MongoStore) GetAllCertificates ¶
func (store MongoStore) GetAllCertificates(exp int64) []Certificate
func (MongoStore) GetCertificate ¶
func (store MongoStore) GetCertificate(domain string) (*Certificate, error)
func (*MongoStore) Load ¶
func (store *MongoStore) Load() error
func (MongoStore) RemoveCertificate ¶
func (store MongoStore) RemoveCertificate(domain string) error
func (MongoStore) UpdateCertificate ¶
func (store MongoStore) UpdateCertificate(domain string, cert Certificate) error
type SQLStore ¶
func NewSQLStore ¶
func NewSQLStore() *SQLStore
func (SQLStore) AddCertificate ¶
func (store SQLStore) AddCertificate(domain string, cert Certificate) error
func (SQLStore) GetAllCertificates ¶
func (store SQLStore) GetAllCertificates(exp int64) []Certificate
func (SQLStore) GetCertificate ¶
func (store SQLStore) GetCertificate(domain string) (*Certificate, error)
func (SQLStore) RemoveCertificate ¶
func (SQLStore) UpdateCertificate ¶
func (store SQLStore) UpdateCertificate(domain string, cert Certificate) error
type Store ¶
type Store interface {
Load() error
AddCertificate(domain string, cert Certificate) error
GetCertificate(domain string) (*Certificate, error)
GetAllCertificates(exp int64) []Certificate
UpdateCertificate(domain string, cert Certificate) error
RemoveCertificate(domain string) error
}
var Active Store
Click to show internal directories.
Click to hide internal directories.