From c36e85c9126b921cf00e578ac70c1f1ee0153abd Mon Sep 17 00:00:00 2001 From: Daniel Schalla Date: Wed, 10 Oct 2018 19:55:12 +0200 Subject: DeleteAll for KV (#9431) Expire K/V Values Regenerate Code pathfix Update Expiry on Update Check for Exit Signal gofmt Rewrote Go Routine Remove tempoarily cleanup loop fix expiretime TEST: Expired Watchdog as GoRoutine Check if Srv is nil Use Scheduler/Worker for Expired Key CleanUp add license fix scheduler job type; DoJob Restructuring Remove unused imports and constants move db migration from 5.4 to 5.5 --- plugin/api.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'plugin/api.go') diff --git a/plugin/api.go b/plugin/api.go index 308067228..5a5727659 100644 --- a/plugin/api.go +++ b/plugin/api.go @@ -196,12 +196,18 @@ type API interface { // KVSet will store a key-value pair, unique per plugin. KVSet(key string, value []byte) *model.AppError + // KVSet will store a key-value pair, unique per plugin with an expiry time + KVSetWithExpiry(key string, value []byte, expireInSeconds int64) *model.AppError + // KVGet will retrieve a value based on the key. Returns nil for non-existent keys. KVGet(key string) ([]byte, *model.AppError) // KVDelete will remove a key-value pair. Returns nil for non-existent keys. KVDelete(key string) *model.AppError + // KVDeleteAll will remove all key-value pairs for a plugin. + KVDeleteAll() *model.AppError + // KVList will list all keys for a plugin. KVList(page, perPage int) ([]string, *model.AppError) -- cgit v1.2.3-1-g7c22