Skip to content

PURISTA API


PURISTA API / @purista/core / SecretStoreBaseClass

Class: abstract SecretStoreBaseClass<SecretStoreConfigType>

Defined in: packages/core/src/core/SecretStore/SecretStoreBaseClass.impl.ts:23

Base class for secret store adapters The actual store implementation must overwrite the protected methods:

  • getSecretImpl
  • setSecretImpl
  • removeSecretImpl

DO NOT OVERWRITE: the regular methods getSecret, setSecret or removeSecret

Extended by

Type Parameters

SecretStoreConfigType

SecretStoreConfigType extends Record<string, unknown> = EmptyObject

Constructors

Constructor

new SecretStoreBaseClass<SecretStoreConfigType>(name, config): SecretStoreBaseClass<SecretStoreConfigType>

Defined in: packages/core/src/core/SecretStore/SecretStoreBaseClass.impl.ts:31

Parameters

name

string

config

{ [K in string | number | symbol]: ({ cacheTtl?: number; enableCache?: boolean; enableGet?: boolean; enableRemove?: boolean; enableSet?: boolean; logger?: Logger; logLevel?: LogLevelName } & SecretStoreConfigType)[K] }

Returns

SecretStoreBaseClass<SecretStoreConfigType>

Properties

cache

cache: SecretStoreCacheMap

Defined in: packages/core/src/core/SecretStore/SecretStoreBaseClass.impl.ts:29


config

config: { [K in string | number | symbol]: { [K in string | number | symbol]: ({ cacheTtl?: number; enableCache?: boolean; enableGet?: boolean; enableRemove?: boolean; enableSet?: boolean; logger?: Logger; logLevel?: LogLevelName } & SecretStoreConfigType)[K] }[K] }

Defined in: packages/core/src/core/SecretStore/SecretStoreBaseClass.impl.ts:25


logger

logger: Logger

Defined in: packages/core/src/core/SecretStore/SecretStoreBaseClass.impl.ts:24


name

name: string

Defined in: packages/core/src/core/SecretStore/SecretStoreBaseClass.impl.ts:27

Methods

destroy()

destroy(): Promise<void>

Defined in: packages/core/src/core/SecretStore/SecretStoreBaseClass.impl.ts:139

Returns

Promise<void>


getSecret()

getSecret<SecretNames>(...secretNames): Promise<ObjectWithKeysFromStringArray<SecretNames, undefined | string>>

Defined in: packages/core/src/core/SecretStore/SecretStoreBaseClass.impl.ts:51

Type Parameters

SecretNames

SecretNames extends string[]

Parameters

secretNames

...SecretNames

Returns

Promise<ObjectWithKeysFromStringArray<SecretNames, undefined | string>>


getSecretImpl()

abstract protected getSecretImpl<SecretNames>(...secretNames): Promise<ObjectWithKeysFromStringArray<SecretNames, undefined | string>>

Defined in: packages/core/src/core/SecretStore/SecretStoreBaseClass.impl.ts:46

Type Parameters

SecretNames

SecretNames extends string[]

Parameters

secretNames

...SecretNames

Returns

Promise<ObjectWithKeysFromStringArray<SecretNames, undefined | string>>


removeSecret()

removeSecret(secretName): Promise<void>

Defined in: packages/core/src/core/SecretStore/SecretStoreBaseClass.impl.ts:107

Parameters

secretName

string

Returns

Promise<void>


removeSecretImpl()

abstract protected removeSecretImpl(_secretName): Promise<void>

Defined in: packages/core/src/core/SecretStore/SecretStoreBaseClass.impl.ts:105

Parameters

_secretName

string

Returns

Promise<void>


setSecret()

setSecret(secretName, secretValue): Promise<void>

Defined in: packages/core/src/core/SecretStore/SecretStoreBaseClass.impl.ts:123

Parameters

secretName

string

secretValue

string

Returns

Promise<void>


setSecretImpl()

abstract protected setSecretImpl(_secretName, _secretValue): Promise<void>

Defined in: packages/core/src/core/SecretStore/SecretStoreBaseClass.impl.ts:121

Parameters

_secretName

string

_secretValue

string

Returns

Promise<void>