Documentation ¶
Index ¶
- func CheckErrorType(t *testing.T, err error, errCode apperrors.ErrCode)
- func CreateGardenerClusterName() string
- func DecodeJson(jsonConfig string, target interface{}) error
- func Encode(input interface{}, target *bytes.Buffer) error
- func GardenerErrCodesToErrReason(lastErrors ...gardencorev1beta1.LastError) apperrors.ErrReason
- func IsNilOrEmpty(str *string) bool
- func K8SErrorToAppError(err error) apperrors.AppError
- func NotNilOrEmpty(str *string) bool
- func OkOrDefault[T any](ptr *T, def *T) *T
- func PtrTo[T any](v T) *T
- func RemoveNotAllowedCharacters(str string) string
- func RetryOnError(interval time.Duration, count int, errMsgFmt string, ...) apperrors.AppError
- func StartWithLetter(str string) string
- func UnwrapOrDefault[T any](ptr *T, def T) T
- func UnwrapOrZero[T any](ptr *T) T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateGardenerClusterName ¶
func CreateGardenerClusterName() string
func DecodeJson ¶
func GardenerErrCodesToErrReason ¶
func GardenerErrCodesToErrReason(lastErrors ...gardencorev1beta1.LastError) apperrors.ErrReason
func IsNilOrEmpty ¶
func K8SErrorToAppError ¶
func NotNilOrEmpty ¶
func OkOrDefault ¶
func OkOrDefault[T any](ptr *T, def *T) *T
OkOrDefault returns pointer or provided default pointer if pointer is nil
func RemoveNotAllowedCharacters ¶
RemoveNotAllowedCharacters returns string containing only alphanumeric characters or hyphens
func RetryOnError ¶
func StartWithLetter ¶
StartWithLetter returns given string but starting with letter
func UnwrapOrDefault ¶
func UnwrapOrDefault[T any](ptr *T, def T) T
UnwrapOrDefault returns value from pointer or provided default value if pointer is nil
func UnwrapOrZero ¶
func UnwrapOrZero[T any](ptr *T) T
UnwrapOrZero returns value from pointer or zero value if pointer is nil
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.