Class: DaprSecretStore
PURISTA API / Modules / @purista/dapr-sdk / DaprSecretStore
Class: DaprSecretStore
@purista/dapr-sdk.DaprSecretStore
DaprSecretStore is an adapter which connects to the secret store provided by the underlaying Dapr infrastructure.
Dapr currently provides only the possibility to fetch a secret. Creating a new secret, changing an existing secret or removal of secrets is not supported.
Hierarchy
SecretStoreBaseClass
<DaprSecretStoreConfig
>↳
DaprSecretStore
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new DaprSecretStore(config?
): DaprSecretStore
Parameters
Name | Type | Description |
---|---|---|
config? | Object | - |
config.cacheTtl? | number | Cache time to live in ms |
config.clientConfig? | DaprClientConfig | The Dapr client config to interact with Dapr sidecar |
config.enableCache? | boolean | Enable cache |
config.enableGet? | boolean | Enable generally get method |
config.enableRemove? | boolean | Enable generally remove method |
config.enableSet? | boolean | Enable generally set method |
config.logLevel? | LogLevelName | A log level for new logger if logger is not set |
config.logger? | Logger | A logger instance |
config.metadata? | Object | Dapr secret store metadata |
config.metadata.namespace? | string | In case of deploying into namespace other than default, the namespace (e.g. production) must be set |
config.secretStoreName? | string | The name of the secret store |
Returns
Overrides
SecretStoreBaseClass<DaprSecretStoreConfig>.constructor
Defined in
dapr-sdk/src/DaprSecretStore/DaprSecretStore.impl.ts:19
Properties
cache
• cache: SecretStoreCacheMap
Inherited from
SecretStoreBaseClass.cache
Defined in
core/lib/types/core/SecretStore/SecretStoreBaseClass.impl.d.ts:12
client
• Private
client: HttpClient
<DaprClientConfig
>
Defined in
dapr-sdk/src/DaprSecretStore/DaprSecretStore.impl.ts:17
config
• config: Object
Type declaration
Name | Type | Description |
---|---|---|
cacheTtl? | number | Cache time to live in ms |
clientConfig? | DaprClientConfig | The Dapr client config to interact with Dapr sidecar |
enableCache? | boolean | Enable cache |
enableGet? | boolean | Enable generally get method |
enableRemove? | boolean | Enable generally remove method |
enableSet? | boolean | Enable generally set method |
logLevel? | LogLevelName | A log level for new logger if logger is not set |
logger? | Logger | A logger instance |
metadata? | { namespace? : string } | Dapr secret store metadata |
metadata.namespace? | string | In case of deploying into namespace other than default, the namespace (e.g. production) must be set |
secretStoreName? | string | The name of the secret store |
Inherited from
SecretStoreBaseClass.config
Defined in
core/lib/types/core/SecretStore/SecretStoreBaseClass.impl.d.ts:10
logger
• logger: Logger
Inherited from
SecretStoreBaseClass.logger
Defined in
core/lib/types/core/SecretStore/SecretStoreBaseClass.impl.d.ts:9
name
• name: string
Inherited from
SecretStoreBaseClass.name
Defined in
core/lib/types/core/SecretStore/SecretStoreBaseClass.impl.d.ts:11
Methods
destroy
▸ destroy(): Promise
<void
>
Returns
Promise
<void
>
Inherited from
SecretStoreBaseClass.destroy
Defined in
core/lib/types/core/SecretStore/SecretStoreBaseClass.impl.d.ts:17
getSecret
▸ getSecret(...secretNames
): Promise
<Record
<string
, string
>>
Parameters
Name | Type |
---|---|
...secretNames | string [] |
Returns
Promise
<Record
<string
, string
>>
Overrides
SecretStoreBaseClass.getSecret
Defined in
dapr-sdk/src/DaprSecretStore/DaprSecretStore.impl.ts:54
removeSecret
▸ removeSecret(_secretName
): Promise
<void
>
Parameters
Name | Type |
---|---|
_secretName | string |
Returns
Promise
<void
>
Overrides
SecretStoreBaseClass.removeSecret
Defined in
dapr-sdk/src/DaprSecretStore/DaprSecretStore.impl.ts:98
setSecret
▸ setSecret(_secretName
): Promise
<void
>
Parameters
Name | Type |
---|---|
_secretName | string |
Returns
Promise
<void
>
Overrides
SecretStoreBaseClass.setSecret