Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertUtil ¶
type CertUtil interface { // GetWaitTime returns the waiting time before renewing the certificate. GetWaitTime([]byte, time.Time) (time.Duration, error) }
CertUtil is an interface for utility functions on certificate.
type CertUtilImpl ¶
type CertUtilImpl struct {
// contains filtered or unexported fields
}
CertUtilImpl is the implementation of CertUtil, for production use.
func NewCertUtil ¶
func NewCertUtil(gracePeriodPercentage int) CertUtilImpl
NewCertUtil returns a new CertUtilImpl
func (CertUtilImpl) GetWaitTime ¶
GetWaitTime returns the waititng time before renewing the cert, based on current time, the timestamps in cert and graceperiod.
type FileUtil ¶
type FileUtil interface { // Read reads the file named by filename and returns all the contents unitl EOF or an error. Read(string) ([]byte, error) // Write writes data to a file named by filename. Write(string, []byte, os.FileMode) error }
FileUtil is the interface for utility functions operating on files.
type FileUtilImpl ¶
type FileUtilImpl struct { }
FileUtilImpl is an implementation of File.
Click to show internal directories.
Click to hide internal directories.