utils

package
v1.41.5 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func ExportsToFile(exp *exports.Exports, path string) error

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.

Jump to

Keyboard shortcuts

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