summaryrefslogtreecommitdiffstats
path: root/app/plugin_api.go
diff options
context:
space:
mode:
authorShobhit Gupta <smartyshobhit@gmail.com>2018-10-03 13:04:37 -0700
committerJoram Wilander <jwawilander@gmail.com>2018-10-03 16:04:37 -0400
commit8c03e584c182218c84bebc8af23c70fb0cd203d4 (patch)
tree90cad75d922dc3d9fb25c4456b342b2b4e642d3b /app/plugin_api.go
parent7468f35cb0c86b60f66e1c9228a60da244d3fcc4 (diff)
downloadchat-8c03e584c182218c84bebc8af23c70fb0cd203d4.tar.gz
chat-8c03e584c182218c84bebc8af23c70fb0cd203d4.tar.bz2
chat-8c03e584c182218c84bebc8af23c70fb0cd203d4.zip
MM-11863 Add KVList method (#9467)
* Add KVList method * Add KVList method Add KVList method * Add pagination support * Change offset, limit to page, perPage * Rename constant
Diffstat (limited to 'app/plugin_api.go')
-rw-r--r--app/plugin_api.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/plugin_api.go b/app/plugin_api.go
index 20946cc52..fed4ad027 100644
--- a/app/plugin_api.go
+++ b/app/plugin_api.go
@@ -331,6 +331,10 @@ func (api *PluginAPI) KVDelete(key string) *model.AppError {
return api.app.DeletePluginKey(api.id, key)
}
+func (api *PluginAPI) KVList(page, perPage int) ([]string, *model.AppError) {
+ return api.app.ListPluginKeys(api.id, page, perPage)
+}
+
func (api *PluginAPI) PublishWebSocketEvent(event string, payload map[string]interface{}, broadcast *model.WebsocketBroadcast) {
api.app.Publish(&model.WebSocketEvent{
Event: fmt.Sprintf("custom_%v_%v", api.id, event),