helpers

package
v0.0.0-...-af5d6c7 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DerefString

func DerefString(s *string) string

DerefString returns the value of a string pointer or empty string if nil

func HashSystemSecretSHA256

func HashSystemSecretSHA256(secret string) (string, error)

HashSystemSecretSHA256 generates a salted SHA256 hash of the system secret. Returns format: hex_salt:hex_hash

func NilIfEmpty

func NilIfEmpty(s string) *string

NilIfEmpty returns nil if the string is empty, otherwise returns a pointer to the string

func ProcessInBatches

func ProcessInBatches[T any](items []T, batchSize int, processFn func(batch []T) error) error

ProcessInBatches processes items in batches of the given size, calling processFn for each batch. Returns an error if any batch fails.

func StrPtr

func StrPtr(s string) *string

StrPtr returns a pointer to a string

func VerifySystemSecretSHA256

func VerifySystemSecretSHA256(secret, encodedHash string) (bool, error)

VerifySystemSecretSHA256 verifies a system secret against a salted SHA256 hash. Expected format: hex_salt:hex_hash

Types

This section is empty.

Jump to

Keyboard shortcuts

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