Skip to main content

Class: LocalSecretService

Service for retrieving secrets from environment variables.

Implements

Constructors

new LocalSecretService()

new LocalSecretService(): LocalSecretService

Creates an instance of LocalSecretService.

Returns

LocalSecretService

Defined in

packages/core/src/services/local-secrets.ts:10

Methods

getSecret()

getSecret(key): Promise<string>

Retrieves a secret by key.

Parameters

key: string

The key of the secret to retrieve.

Returns

Promise<string>

A promise that resolves to the secret value.

Throws

If the secret is not found.

Implementation of

SecretService.getSecret

Defined in

packages/core/src/services/local-secrets.ts:32


getSecretJSON()

getSecretJSON<R>(key): Promise<R>

Retrieves a secret by key.

Type Parameters

R

Parameters

key: string

The key of the secret to retrieve.

Returns

Promise<R>

A promise that resolves to the secret value.

Throws

If the secret is not found.

Implementation of

SecretService.getSecretJSON

Defined in

packages/core/src/services/local-secrets.ts:18