Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Secrets sync.Map
Secrets is where all the secrets are stored.
Functions ¶
func PopulateSecrets ¶
PopulateSecrets scans the designated secrets storage directory on disk, reading each secret file that is not marked as a backup, and loads the secrets into a global store if they have not already been loaded. This ensures that the application's current session has access to all persisted secrets. It uses a locking mechanism to prevent concurrent execution and ensure data consistency.
Parameters:
- cid (string): A correlation ID that is used for logging purposes, allowing for the tracing of the populate operation through logs.
Returns:
- error: If an error occurs during the directory reading or secret reading process, it returns an error wrapped with context about the failure point. If no errors occur, it returns nil to indicate successful completion.
func SecretsPopulated ¶
func SecretsPopulated() bool
SecretsPopulated returns a boolean indicating whether the secrets have been populated.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.