secret

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: BSD-2-Clause Imports: 8 Imported by: 0

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

func PopulateSecrets(cid string, rootKeyTriplet []string) error

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.

Directories

Path Synopsis
queue

Jump to

Keyboard shortcuts

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