Peter Kurfer
7c2a41ad25
- apply changes in proxy plugin and TLS interceptor - add HTTPS proxy support - move ca-generation command to main app - minor refactoring to improve API stability - move mocks to extra packages to avoid cycling imports - fix bug in multi-port configuration - change HTTP proxy to redirect to HTTP mock instead of maintaining custom rules
20 lines
381 B
Go
20 lines
381 B
Go
//go:generate mockgen -source=time_source.go -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()
|
|
}
|