api/pkg/cert/time_source.go
baez90 57a7e10e74
Add Prometheus metrics (#10)
* Add Prometheus metrics

- cleanup
- update dependencies
- improve parsing of options where possible
- Update Go to latest version
2020-10-02 11:56:48 +02:00

20 lines
374 B
Go

//go:generate mockgen -source=$GOFILE -destination=./../../internal/mock/cert/time_source.mock.go -package=cert_mock
package cert
import "time"
type TimeSource interface {
UTCNow() time.Time
}
func NewTimeSource() TimeSource {
return &defaultTimeSource{}
}
type defaultTimeSource struct {
}
func (d defaultTimeSource) UTCNow() time.Time {
return time.Now().UTC()
}