Interface: ISecretClient

Client that will handle the communication with the Secret Storage.

Table of contents

Methods

Methods

getUsedSecrets

getUsedSecrets(): ISecretEntry[]

Returns all secrets that the user has used with readSecret or updateSecret in a function. Used for internal purpose.

Returns

ISecretEntry[]

Secrets in Key-Value Format in an array


readSecret

readSecret(key): Promise<ISecretEntry>

Searches the Secret that belong to the provided key. Will raise a SecretError if there is no secret for the provided key.

Parameters

Name Type Description
key string Name of the Secret

Returns

Promise<ISecretEntry>

Secret in Key-Value Format


updateSecret

updateSecret(updatedSecret): Promise<ISecretEntry>

Updates the Secret with the provided update-entry. Will raise a SecretError if there is no secret with the specified key.

Parameters

Name Type Description
updatedSecret ISecretEntry Secret in Key-Value Format

Returns

Promise<ISecretEntry>

Updated Version of the Secret in Key-Value Format


Interface: ISecretEntry

Properties:

key: string

Key of the secret made of chars that match [A-z0-9-_] and limited to 100 chars

value: any

Value of the secret which is limited to 10000 chars.