Documentation ¶
Index ¶
- Variables
- func AddMetricPoint(domain, port string, validity float64, e error)
- func CheckDomain(domain, port string)
- func ReverseHost(hostname string) (string, error)
- func StartAPIServer(port, indexHtml string)
- func StartDomainChecker()
- func StartMetricsServer(mtype, maddress string)
- func StoreInit(path string) error
- type Certificate
- type Domain
- func (d *Domain) CertList() (*Certificate, []*Certificate, error)
- func (d *Domain) Check() error
- func (d *Domain) Delete() error
- func (d *Domain) GetCertificate() (*x509.Certificate, error)
- func (d *Domain) LoadCertificate(serial string) (*Certificate, error)
- func (d *Domain) Status() (*Status, error)
- func (d *Domain) Store(status *Status) error
- type KeyValue
- type MetricProvider
- type Signature
- type Status
- type Store
- func (store *Store) BucketExists(bucket []string) bool
- func (store *Store) Buckets(prefix string) (<-chan *KeyValue, error)
- func (store *Store) Close()
- func (store *Store) Create(bucket []string) (err error)
- func (store *Store) Delete(bucket []string, key string) error
- func (store *Store) Get(bucket []string, key string) (value string, err error)
- func (store *Store) Remove(parent []string, bucket string) (err error)
- func (store *Store) Scan(bucket []string, prefix string, reverse bool, limit int) <-chan *KeyValue
- func (store *Store) Set(bucket []string, key, value string) error
- type Subject
Constants ¶
This section is empty.
Variables ¶
var ( ErrNoPeerCertificate = errors.New("peer did not present certificate for domain") ErrExpired = errors.New("certificate expired") ErrNotYetValid = errors.New("certificate not yet valid") ErrInvalidHostname = errors.New("invalid hostname") ErrNoCertificate = errors.New("certificate serial not found") )
var ( ErrInvalidArgument = errors.New("invalid argument") IndexHtml string )
var ( ErrNoBucket = errors.New("no bucket given") ErrInvalidBucket = errors.New("no bucket found with given name") )
Functions ¶
func AddMetricPoint ¶
func CheckDomain ¶
func CheckDomain(domain, port string)
func ReverseHost ¶
reverse a hostname (example.com => com.example.). This will provide a better form for sorting (www.example.com and api.example.com will be close together when reversed)
func StartAPIServer ¶
func StartAPIServer(port, indexHtml string)
func StartDomainChecker ¶
func StartDomainChecker()
func StartMetricsServer ¶
func StartMetricsServer(mtype, maddress string)
Types ¶
type Certificate ¶
type Certificate struct { NotBefore time.Time `json:"not_before"` NotAfter time.Time `json:"not_after"` Issuer Subject `json:"issuer"` Subject Subject `json:"subject"` SerialNumber string `json:"serial"` AlternateNames []string `json:"alternate_names,omitempty"` Signature Signature `json:"signature"` Fingerprints map[string]string `json:"fingerprints"` }
type Domain ¶
type Domain struct { Domain string `json:"domain"` Port string `json:"port"` // contains filtered or unexported fields }
func GetDomains ¶
func GetDomains() []*Domain
func (*Domain) CertList ¶
func (d *Domain) CertList() (*Certificate, []*Certificate, error)
func (*Domain) GetCertificate ¶
func (d *Domain) GetCertificate() (*x509.Certificate, error)
func (*Domain) LoadCertificate ¶
func (d *Domain) LoadCertificate(serial string) (*Certificate, error)
type MetricProvider ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store provides a structured way to load data from an underlying database (i.e. key-value store)
func (*Store) BucketExists ¶
check if a bucket exists
func (*Store) Close ¶
func (store *Store) Close()
close all connections to the underlying database file to be used by another process
func (*Store) Scan ¶
get the content of a key that acts as a prefix from the specified bucket. this func will return immediately and return a channel from which you can get a KeyValue object. if the end is reached, the channel will return nil. Note that this method does not return an error it will just immediately put nil into the channel if something happened.