Skip to content

Latest commit

 

History

History
214 lines (121 loc) · 4.89 KB

File metadata and controls

214 lines (121 loc) · 4.89 KB

@envoy/envoy-integrations-sdk / EnvoyPluginStorage

Class: EnvoyPluginStorage

A key-value storage that can be scoped to a specific install, or to the plugin itself.

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new EnvoyPluginStorage(pluginAPI, installId?)

Parameters

Name Type
pluginAPI EnvoyPluginAPI
installId? string

Defined in

sdk/EnvoyPluginStorage.ts:16

Properties

api

Readonly api: EnvoyPluginAPI

Defined in

sdk/EnvoyPluginStorage.ts:14


installId

Readonly installId: undefined | string

Defined in

sdk/EnvoyPluginStorage.ts:16

Methods

get

get<Value>(key): Promise<null | EnvoyStorageItem<Value>>

Gets a single EnvoyStorageItem from storage.

Wrapper for single pipeline get.

Type parameters

Name Type
Value Value = unknown

Parameters

Name Type
key string

Returns

Promise<null | EnvoyStorageItem<Value>>

Defined in

sdk/EnvoyPluginStorage.ts:35


pipeline

pipeline(): default

Creates a new pipeline instance.

Returns

default

Defined in

sdk/EnvoyPluginStorage.ts:26


set

set<Value>(key, value): Promise<EnvoyStorageItem<Value>>

Sets a single EnvoyStorageItem from storage.

Wrapper for single pipeline set.

Type parameters

Name Type
Value Value = unknown

Parameters

Name Type
key string
value Value

Returns

Promise<EnvoyStorageItem<Value>>

Defined in

sdk/EnvoyPluginStorage.ts:44


setUnique

setUnique(key, options?): Promise<null | EnvoyStorageItem<string>>

Sets a single unique string EnvoyStorageItem from storage.

Wrapper for single pipeline setUnique.

Parameters

Name Type
key string
options EnvoyStorageSetUniqueOptions

Returns

Promise<null | EnvoyStorageItem<string>>

Defined in

sdk/EnvoyPluginStorage.ts:53


setUniqueNum

setUniqueNum(key, options?): Promise<null | EnvoyStorageItem<number>>

Sets a single unique number EnvoyStorageItem from storage.

Wrapper for single pipeline setUnique.

Parameters

Name Type
key string
options EnvoyStorageSetUniqueNumOptions

Returns

Promise<null | EnvoyStorageItem<number>>

Defined in

sdk/EnvoyPluginStorage.ts:62


unset

unset(key): Promise<null | EnvoyStorageItem<unknown>>

Unsets an EnvoyStorageItem from storage. Returns null if the item did not previously exist.

Wrapper for single pipeline unset.

Parameters

Name Type
key string

Returns

Promise<null | EnvoyStorageItem<unknown>>

Defined in

sdk/EnvoyPluginStorage.ts:71