utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// Environment variable name for AES key
	AESKeyEnvVar = "AES_SECRET_KEY"
)

Variables

This section is empty.

Functions

func AES_CTR_Decrypt

func AES_CTR_Decrypt(encryptedData []byte) ([]byte, error)

AES_CTR_Decrypt decrypts base64 encoded string and returns plaintext (for backward compatibility)

func AES_CTR_Encrypt

func AES_CTR_Encrypt(plainText []byte) ([]byte, error)

AES_CTR_Encrypt encrypts plaintext and returns base64 encoded string (for backward compatibility)

func CompareInt32

func CompareInt32(name string, old, new int32, reqLogger logr.Logger) bool

func CompareIntPoint

func CompareIntPoint(name string, old, new *int, reqLogger logr.Logger) bool

func CompareStringValue

func CompareStringValue(name string, old, new string, reqLogger logr.Logger) bool

func Round

func Round(num float64) int

func SliceJoin

func SliceJoin(a []Stringer, sep string) string

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

type Stringer

type Stringer interface {
	String() string
}

Stringer implement the string interface

Jump to

Keyboard shortcuts

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