Documentation
¶
Index ¶
- Constants
- func AES_CTR_Decrypt(encryptedData []byte) ([]byte, error)
- func AES_CTR_Encrypt(plainText []byte) ([]byte, error)
- func CompareInt32(name string, old, new int32, reqLogger logr.Logger) bool
- func CompareIntPoint(name string, old, new *int, reqLogger logr.Logger) bool
- func CompareStringValue(name string, old, new string, reqLogger logr.Logger) bool
- func Round(num float64) int
- func SliceJoin(a []Stringer, sep string) string
- func ValidateAndSetAESKey() error
- type Stringer
Constants ¶
View Source
const (
// Environment variable name for AES key
AESKeyEnvVar = "AES_SECRET_KEY"
)
Variables ¶
This section is empty.
Functions ¶
func AES_CTR_Decrypt ¶
AES_CTR_Decrypt decrypts base64 encoded string and returns plaintext (for backward compatibility)
func AES_CTR_Encrypt ¶
AES_CTR_Encrypt encrypts plaintext and returns base64 encoded string (for backward compatibility)
func CompareStringValue ¶
func SliceJoin ¶
SliceJoin concatenates the elements of a to create a single string. The separator string sep is placed between elements in the resulting string.
func ValidateAndSetAESKey ¶
func ValidateAndSetAESKey() error
ValidateAndSetAESKey validates the AES key from environment variable and sets it for use This function should be called during application startup (e.g., in main.go) Returns error if key is missing or invalid
Types ¶
Click to show internal directories.
Click to hide internal directories.