diff options
author | Hanzei <16541325+hanzei@users.noreply.github.com> | 2018-10-15 19:18:23 +0200 |
---|---|---|
committer | Carlos Tadeu Panato Junior <ctadeu@gmail.com> | 2018-10-15 19:18:23 +0200 |
commit | 71b7b9f090bc0f14c5737f4986fb6b5608fdd3ed (patch) | |
tree | c3a313e917f75c79a010a97e2887d0e50851808a /plugin/client_rpc_generated.go | |
parent | a35a9b9b2d9720a3753c96a4a3a36d437e518140 (diff) | |
download | chat-71b7b9f090bc0f14c5737f4986fb6b5608fdd3ed.tar.gz chat-71b7b9f090bc0f14c5737f4986fb6b5608fdd3ed.tar.bz2 chat-71b7b9f090bc0f14c5737f4986fb6b5608fdd3ed.zip |
Add GetPostsBefore() to plugin API (#9651)
Diffstat (limited to 'plugin/client_rpc_generated.go')
-rw-r--r-- | plugin/client_rpc_generated.go | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/plugin/client_rpc_generated.go b/plugin/client_rpc_generated.go index cf865f78c..890249014 100644 --- a/plugin/client_rpc_generated.go +++ b/plugin/client_rpc_generated.go @@ -2130,6 +2130,38 @@ func (s *apiRPCServer) GetPostsSince(args *Z_GetPostsSinceArgs, returns *Z_GetPo return nil } +type Z_GetPostsBeforeArgs struct { + A string + B string + C int + D int +} + +type Z_GetPostsBeforeReturns struct { + A *model.PostList + B *model.AppError +} + +func (g *apiRPCClient) GetPostsBefore(channelId, postId string, page, perPage int) (*model.PostList, *model.AppError) { + _args := &Z_GetPostsBeforeArgs{channelId, postId, page, perPage} + _returns := &Z_GetPostsBeforeReturns{} + if err := g.client.Call("Plugin.GetPostsBefore", _args, _returns); err != nil { + log.Printf("RPC call to GetPostsBefore API failed: %s", err.Error()) + } + return _returns.A, _returns.B +} + +func (s *apiRPCServer) GetPostsBefore(args *Z_GetPostsBeforeArgs, returns *Z_GetPostsBeforeReturns) error { + if hook, ok := s.impl.(interface { + GetPostsBefore(channelId, postId string, page, perPage int) (*model.PostList, *model.AppError) + }); ok { + returns.A, returns.B = hook.GetPostsBefore(args.A, args.B, args.C, args.D) + } else { + return encodableError(fmt.Errorf("API GetPostsBefore called but not implemented.")) + } + return nil +} + type Z_GetPostsForChannelArgs struct { A string B int |