Interface: Storage<PluginConfig>
pluginUtils.Storage
The base plugin class, set of utilities for developing plugins.
Type parameters
Name |
---|
PluginConfig |
Hierarchy
Plugin
<PluginConfig
>↳
Storage
Properties
config
• Readonly
config: unknown
Inherited from
Defined in
options
• Readonly
options: PluginOptions
Inherited from
Defined in
version
• Readonly
version: number
Inherited from
Defined in
Methods
add
▸ add(name
): Promise
<void
>
Parameters
Name | Type |
---|---|
name | string |
Returns
Promise
<void
>
Defined in
deleteToken
▸ deleteToken(user
, tokenKey
): Promise
<any
>
Parameters
Name | Type |
---|---|
user | string |
tokenKey | string |
Returns
Promise
<any
>
Defined in
get
▸ get(): Promise
<any
>
Returns
Promise
<any
>
Defined in
getPackageStorage
▸ getPackageStorage(packageInfo
): StorageHandler
Parameters
Name | Type |
---|---|
packageInfo | string |
Returns
Defined in
getSecret
▸ getSecret(): Promise
<string
>
Returns
Promise
<string
>
Defined in
getVersion
▸ getVersion(): number
Returns
number
Inherited from
Defined in
init
▸ init(): Promise
<void
>
Returns
Promise
<void
>
Defined in
readTokens
▸ readTokens(filter
): Promise
<Token
[]>
Parameters
Name | Type |
---|---|
filter | TokenFilter |
Returns
Promise
<Token
[]>
Defined in
remove
▸ remove(name
): Promise
<void
>
Parameters
Name | Type |
---|---|
name | string |
Returns
Promise
<void
>
Defined in
saveToken
▸ saveToken(token
): Promise
<any
>
Parameters
Name | Type |
---|---|
token | Token |
Returns
Promise
<any
>
Defined in
search
▸ search(query
): Promise
<SearchItem
[]>
Parameters
Name | Type |
---|---|
query | SearchQuery |
Returns
Promise
<SearchItem
[]>
Defined in
setSecret
▸ setSecret(secret
): Promise
<any
>
Parameters
Name | Type |
---|---|
secret | string |
Returns
Promise
<any
>