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/client_rpc_generated.go | 57 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) (limited to 'plugin/client_rpc_generated.go') diff --git a/plugin/client_rpc_generated.go b/plugin/client_rpc_generated.go index 1dc3fe143..da41d9418 100644 --- a/plugin/client_rpc_generated.go +++ b/plugin/client_rpc_generated.go @@ -2156,6 +2156,36 @@ func (s *apiRPCServer) KVSet(args *Z_KVSetArgs, returns *Z_KVSetReturns) error { return nil } +type Z_KVSetWithExpiryArgs struct { + A string + B []byte + C int64 +} + +type Z_KVSetWithExpiryReturns struct { + A *model.AppError +} + +func (g *apiRPCClient) KVSetWithExpiry(key string, value []byte, expireInSeconds int64) *model.AppError { + _args := &Z_KVSetWithExpiryArgs{key, value, expireInSeconds} + _returns := &Z_KVSetWithExpiryReturns{} + if err := g.client.Call("Plugin.KVSetWithExpiry", _args, _returns); err != nil { + log.Printf("RPC call to KVSetWithExpiry API failed: %s", err.Error()) + } + return _returns.A +} + +func (s *apiRPCServer) KVSetWithExpiry(args *Z_KVSetWithExpiryArgs, returns *Z_KVSetWithExpiryReturns) error { + if hook, ok := s.impl.(interface { + KVSetWithExpiry(key string, value []byte, expireInSeconds int64) *model.AppError + }); ok { + returns.A = hook.KVSetWithExpiry(args.A, args.B, args.C) + } else { + return encodableError(fmt.Errorf("API KVSetWithExpiry called but not implemented.")) + } + return nil +} + type Z_KVGetArgs struct { A string } @@ -2213,6 +2243,33 @@ func (s *apiRPCServer) KVDelete(args *Z_KVDeleteArgs, returns *Z_KVDeleteReturns return nil } +type Z_KVDeleteAllArgs struct { +} + +type Z_KVDeleteAllReturns struct { + A *model.AppError +} + +func (g *apiRPCClient) KVDeleteAll() *model.AppError { + _args := &Z_KVDeleteAllArgs{} + _returns := &Z_KVDeleteAllReturns{} + if err := g.client.Call("Plugin.KVDeleteAll", _args, _returns); err != nil { + log.Printf("RPC call to KVDeleteAll API failed: %s", err.Error()) + } + return _returns.A +} + +func (s *apiRPCServer) KVDeleteAll(args *Z_KVDeleteAllArgs, returns *Z_KVDeleteAllReturns) error { + if hook, ok := s.impl.(interface { + KVDeleteAll() *model.AppError + }); ok { + returns.A = hook.KVDeleteAll() + } else { + return encodableError(fmt.Errorf("API KVDeleteAll called but not implemented.")) + } + return nil +} + type Z_KVListArgs struct { A int B int -- cgit v1.2.3-1-g7c22