collector

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	ID         int    `json:"id"`
	CommonName string `json:"common_name"`
	ValidUntil string `json:"valid_till"`
}

type DigicertCollector

type DigicertCollector struct {
	// contains filtered or unexported fields
}

func NewDigicertCollector

func NewDigicertCollector(logger log.Logger,
	digicertURL string,
	digicertAPIKey string,
	sandboxMode bool,
	digicertShowExpiredCertificates bool) (*DigicertCollector, error)

func (*DigicertCollector) Collect

func (c *DigicertCollector) Collect(ch chan<- prometheus.Metric)

func (*DigicertCollector) Describe

func (c *DigicertCollector) Describe(ch chan<- *prometheus.Desc)

func (*DigicertCollector) FetchDigicertData

func (c *DigicertCollector) FetchDigicertData() (*OrderList, error)

func (*DigicertCollector) UpdateMetrics

func (c *DigicertCollector) UpdateMetrics(ch chan<- prometheus.Metric)

type Order

type Order struct {
	ID           int          `json:"id"`
	Certificate  Certificate  `json:"certificate"`
	Organization Organization `json:"organization"`
}

func (*Order) FormatDateTimestamp

func (o *Order) FormatDateTimestamp() time.Time

type OrderList

type OrderList struct {
	Orders []Order `json:"orders"`
}

type Organization

type Organization struct {
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL