diff options
author | Hanzei <16541325+hanzei@users.noreply.github.com> | 2018-10-15 15:19:36 +0200 |
---|---|---|
committer | Saturnino Abril <saturnino.abril@gmail.com> | 2018-10-15 21:19:36 +0800 |
commit | 0267a1f76e48ae833a4f951c82e69db59d39b314 (patch) | |
tree | d58512d7ebc6a21a28fa8569431a29a9c35ccc78 /plugin/client_rpc_generated.go | |
parent | 5726d3919d194ea07b2fb0672d6bfa0e2c5edf9e (diff) | |
download | chat-0267a1f76e48ae833a4f951c82e69db59d39b314.tar.gz chat-0267a1f76e48ae833a4f951c82e69db59d39b314.tar.bz2 chat-0267a1f76e48ae833a4f951c82e69db59d39b314.zip |
Add GetPostThread() to plugin API (#9652)
Diffstat (limited to 'plugin/client_rpc_generated.go')
-rw-r--r-- | plugin/client_rpc_generated.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/plugin/client_rpc_generated.go b/plugin/client_rpc_generated.go index da41d9418..9da133449 100644 --- a/plugin/client_rpc_generated.go +++ b/plugin/client_rpc_generated.go @@ -1950,6 +1950,35 @@ func (s *apiRPCServer) DeletePost(args *Z_DeletePostArgs, returns *Z_DeletePostR return nil } +type Z_GetPostThreadArgs struct { + A string +} + +type Z_GetPostThreadReturns struct { + A *model.PostList + B *model.AppError +} + +func (g *apiRPCClient) GetPostThread(postId string) (*model.PostList, *model.AppError) { + _args := &Z_GetPostThreadArgs{postId} + _returns := &Z_GetPostThreadReturns{} + if err := g.client.Call("Plugin.GetPostThread", _args, _returns); err != nil { + log.Printf("RPC call to GetPostThread API failed: %s", err.Error()) + } + return _returns.A, _returns.B +} + +func (s *apiRPCServer) GetPostThread(args *Z_GetPostThreadArgs, returns *Z_GetPostThreadReturns) error { + if hook, ok := s.impl.(interface { + GetPostThread(postId string) (*model.PostList, *model.AppError) + }); ok { + returns.A, returns.B = hook.GetPostThread(args.A) + } else { + return encodableError(fmt.Errorf("API GetPostThread called but not implemented.")) + } + return nil +} + type Z_GetPostArgs struct { A string } |