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
Name | Type |
---|---|
SecretStoreConfigType | extends Record <string , unknown > = {} |
Hierarchy
SecretStoreBaseClass
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new SecretStoreBaseClass<SecretStoreConfigType
>(name
, config
): SecretStoreBaseClass
<SecretStoreConfigType
>
Type parameters
Name | Type |
---|---|
SecretStoreConfigType | extends Record <string , unknown > = {} |
Parameters
Name | Type |
---|---|
name | string |
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
Name | Type |
---|---|
SecretNames | extends string [] |
Parameters
Name | Type |
---|---|
...secretNames | SecretNames |
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
Name | Type |
---|---|
SecretNames | extends string [] |
Parameters
Name | Type |
---|---|
...secretNames | SecretNames |
Returns
Promise
<ObjectWithKeysFromStringArray
<SecretNames
, undefined
| string
>>
Defined in
core/SecretStore/SecretStoreBaseClass.impl.ts:43
removeSecret
▸ removeSecret(secretName
): Promise
<void
>
Parameters
Name | Type |
---|---|
secretName | string |
Returns
Promise
<void
>
Defined in
core/SecretStore/SecretStoreBaseClass.impl.ts:104
removeSecretImpl
▸ removeSecretImpl(_secretName
): Promise
<void
>
Parameters
Name | Type |
---|---|
_secretName | string |
Returns
Promise
<void
>
Defined in
core/SecretStore/SecretStoreBaseClass.impl.ts:102
setSecret
▸ setSecret(secretName
, secretValue
): Promise
<void
>
Parameters
Name | Type |
---|---|
secretName | string |
secretValue | string |
Returns
Promise
<void
>
Defined in
core/SecretStore/SecretStoreBaseClass.impl.ts:120
setSecretImpl
▸ setSecretImpl(_secretName
, _secretValue
): Promise
<void
>
Parameters
Name | Type |
---|---|
_secretName | string |
_secretValue | string |
Returns
Promise
<void
>