diff options
author | Akash Srivastava <akashsrivastava4927@gmail.com> | 2018-10-10 18:53:36 +0530 |
---|---|---|
committer | Jesse Hallam <jesse.hallam@gmail.com> | 2018-10-10 09:23:36 -0400 |
commit | bd04d7f75698c7b68434199208dc469021b823c2 (patch) | |
tree | 9ff5c93919ff1780dbab140877a19a31f6fda5a2 /plugin/client_rpc_generated.go | |
parent | bffcccf99de8a8f3c68cff9e39d2847f0996b67b (diff) | |
download | chat-bd04d7f75698c7b68434199208dc469021b823c2.tar.gz chat-bd04d7f75698c7b68434199208dc469021b823c2.tar.bz2 chat-bd04d7f75698c7b68434199208dc469021b823c2.zip |
Add GetPostsForChannel method to plugin API (#9557)
Signed-off-by: Akash Srivastava <akash.srivastava@openebs.io>
Diffstat (limited to 'plugin/client_rpc_generated.go')
-rw-r--r-- | plugin/client_rpc_generated.go | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/plugin/client_rpc_generated.go b/plugin/client_rpc_generated.go index 96c73efde..1dc3fe143 100644 --- a/plugin/client_rpc_generated.go +++ b/plugin/client_rpc_generated.go @@ -1979,6 +1979,37 @@ func (s *apiRPCServer) GetPost(args *Z_GetPostArgs, returns *Z_GetPostReturns) e return nil } +type Z_GetPostsForChannelArgs struct { + A string + B int + C int +} + +type Z_GetPostsForChannelReturns struct { + A *model.PostList + B *model.AppError +} + +func (g *apiRPCClient) GetPostsForChannel(channelId string, page, perPage int) (*model.PostList, *model.AppError) { + _args := &Z_GetPostsForChannelArgs{channelId, page, perPage} + _returns := &Z_GetPostsForChannelReturns{} + if err := g.client.Call("Plugin.GetPostsForChannel", _args, _returns); err != nil { + log.Printf("RPC call to GetPostsForChannel API failed: %s", err.Error()) + } + return _returns.A, _returns.B +} + +func (s *apiRPCServer) GetPostsForChannel(args *Z_GetPostsForChannelArgs, returns *Z_GetPostsForChannelReturns) error { + if hook, ok := s.impl.(interface { + GetPostsForChannel(channelId string, page, perPage int) (*model.PostList, *model.AppError) + }); ok { + returns.A, returns.B = hook.GetPostsForChannel(args.A, args.B, args.C) + } else { + return encodableError(fmt.Errorf("API GetPostsForChannel called but not implemented.")) + } + return nil +} + type Z_UpdatePostArgs struct { A *model.Post } |