46d59b48b5
Updated all GitHub URLs from cpfarhood to privilegedescalation organization: - Repository URLs in package.json and Artifact Hub metadata - Documentation links and references - Git remote updated No functional changes - this is purely an organizational migration. Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
1.5 KiB
1.5 KiB
Headlamp Sealed Secrets API v0.2.0
Headlamp Sealed Secrets API / hooks/useSealedSecretEncryption / useSealedSecretEncryption
Function: useSealedSecretEncryption()
useSealedSecretEncryption():
object
Defined in: src/hooks/useSealedSecretEncryption.ts:73
Custom hook for SealedSecret encryption
Provides encryption functionality with built-in validation, error handling, and user notifications.
Returns
object
Object with encrypt function and encrypting state
encrypt()
encrypt: (
request) =>AsyncResult<EncryptionResult,string>
Parameters
request
Returns
AsyncResult<EncryptionResult, string>
encrypting
encrypting:
boolean
Example
const { encrypt, encrypting } = useSealedSecretEncryption();
const result = await encrypt({
name: 'my-secret',
namespace: 'default',
scope: 'strict',
keyValues: [{ key: 'password', value: 'secret123' }]
});
if (result.ok) {
// Use result.value.sealedSecretData
}