Skip to content

PURISTA API / Modules / @purista/core / SecretStoreBaseClass

Class: SecretStoreBaseClass<SecretStoreConfigType>

@purista/core.SecretStoreBaseClass

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

Type parameters

NameType
SecretStoreConfigTypeextends Record<string, unknown> = {}

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

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

Type parameters

NameType
SecretStoreConfigTypeextends Record<string, unknown> = {}

Parameters

NameType
namestring
config{ [K in string | number | symbol]: (Object & SecretStoreConfigType)[K] }

Returns

SecretStoreBaseClass<SecretStoreConfigType>

Defined in

core/SecretStore/SecretStoreBaseClass.impl.ts:28

Properties

cache

cache: SecretStoreCacheMap

Defined in

core/SecretStore/SecretStoreBaseClass.impl.ts:26


config

config: { [K in string | number | symbol]: { [K in string | number | symbol]: (Object & SecretStoreConfigType)[K] }[K] }

Defined in

core/SecretStore/SecretStoreBaseClass.impl.ts:22


logger

logger: Logger

Defined in

core/SecretStore/SecretStoreBaseClass.impl.ts:21


name

name: string

Defined in

core/SecretStore/SecretStoreBaseClass.impl.ts:24

Methods

destroy

destroy(): Promise<void>

Returns

Promise<void>

Defined in

core/SecretStore/SecretStoreBaseClass.impl.ts:136


getSecret

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

Type parameters

NameType
SecretNamesextends string[]

Parameters

NameType
...secretNamesSecretNames

Returns

Promise<ObjectWithKeysFromStringArray<SecretNames, undefined | string>>

Defined in

core/SecretStore/SecretStoreBaseClass.impl.ts:48


getSecretImpl

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

Type parameters

NameType
SecretNamesextends string[]

Parameters

NameType
...secretNamesSecretNames

Returns

Promise<ObjectWithKeysFromStringArray<SecretNames, undefined | string>>

Defined in

core/SecretStore/SecretStoreBaseClass.impl.ts:43


removeSecret

removeSecret(secretName): Promise<void>

Parameters

NameType
secretNamestring

Returns

Promise<void>

Defined in

core/SecretStore/SecretStoreBaseClass.impl.ts:104


removeSecretImpl

removeSecretImpl(_secretName): Promise<void>

Parameters

NameType
_secretNamestring

Returns

Promise<void>

Defined in

core/SecretStore/SecretStoreBaseClass.impl.ts:102


setSecret

setSecret(secretName, secretValue): Promise<void>

Parameters

NameType
secretNamestring
secretValuestring

Returns

Promise<void>

Defined in

core/SecretStore/SecretStoreBaseClass.impl.ts:120


setSecretImpl

setSecretImpl(_secretName, _secretValue): Promise<void>

Parameters

NameType
_secretNamestring
_secretValuestring

Returns

Promise<void>

Defined in

core/SecretStore/SecretStoreBaseClass.impl.ts:118