summaryrefslogtreecommitdiffstats
path: root/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 /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 'plugin/api.go')
-rw-r--r--plugin/api.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugin/api.go b/plugin/api.go
index c4230860f..b85160940 100644
--- a/plugin/api.go
+++ b/plugin/api.go
@@ -196,6 +196,9 @@ type API interface {
// KVDelete will remove a key-value pair. Returns nil for non-existent keys.
KVDelete(key string) *model.AppError
+ // KVList will list all keys for a plugin.
+ KVList(page, perPage int) ([]string, *model.AppError)
+
// PublishWebSocketEvent sends an event to WebSocket connections.
// event is the type and will be prepended with "custom_<pluginid>_"
// payload is the data sent with the event. Interface values must be primitive Go types or mattermost-server/model types