Documentation ¶
Index ¶
- Variables
- func CertificateNeedsRenewal(certificate *x509.Certificate, validityThresholdPercentage float64) (bool, time.Duration)
- func ExportsToFile(exp *exports.Exports, path string) error
- func GetLandscaperEnvironmentVariables() (landscaperconstants.OperationType, string, string, error)
- func ParseX509Certificate(input string) (*x509.Certificate, error)
Constants ¶
This section is empty.
Variables ¶
var NowFunc = time.Now
NowFunc is a function returning the current time. Exposed for testing.
Functions ¶
func CertificateNeedsRenewal ¶ added in v1.38.0
func CertificateNeedsRenewal(certificate *x509.Certificate, validityThresholdPercentage float64) (bool, time.Duration)
CertificateNeedsRenewal returns true in case the certificate is not (yet) valid or in case the given validityThresholdPercentage is exceeded. A validityThresholdPercentage lower than 1 (100%) should be given in case the certificate should be renewed well in advance before the certificate expires. Based on: https://github.com/gardener/gardenlogin-controller-manager/tree/master/.landscaper/container/internal/util
func ExportsToFile ¶ added in v1.38.0
ExportsToFile writes export data to a file.
func GetLandscaperEnvironmentVariables ¶
func GetLandscaperEnvironmentVariables() (landscaperconstants.OperationType, string, string, error)
GetLandscaperEnvironmentVariables reads landscaper-specific environment variables and returns their values
returns in order: landscaper operation, import configuration path, component descriptor path
func ParseX509Certificate ¶ added in v1.38.0
func ParseX509Certificate(input string) (*x509.Certificate, error)
ParseX509Certificate parses a given input string as a x509 certificate
Types ¶
This section is empty.