Documentation ¶
Index ¶
- func GetData(secret *v1.Secret, key string) string
- func GetExpiration(secret *v1.Secret, currentTime time.Time) (timeRemaining time.Duration, isExpired bool)
- func GetGroups(secret *v1.Secret) ([]string, error)
- func HasExpired(secret *v1.Secret, currentTime time.Time) bool
- func ParseName(name string) (secretID string, ok bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetData ¶
GetData returns the string value for the given key in the specified Secret If there is an error or if the key doesn't exist, an empty string is returned.
func GetExpiration ¶
func GetExpiration(secret *v1.Secret, currentTime time.Time) (timeRemaining time.Duration, isExpired bool)
GetExpiration checks if the secret expires isExpired indicates if the secret is already expired. timeRemaining indicates how long until it does expire. if the secret has no expiration timestamp, returns 0, false. if there is an error parsing the secret's expiration timestamp, returns 0, true.
func GetGroups ¶
GetGroups loads and validates the bootstrapapi.BootstrapTokenExtraGroupsKey key from the bootstrap token secret, returning a list of group names or an error if any of the group names are invalid.
func HasExpired ¶
HasExpired will identify whether the secret expires
Types ¶
This section is empty.