summaryrefslogtreecommitdiffstats
path: root/plugin/client_rpc_generated.go
diff options
context:
space:
mode:
authordmitrysamuylovpharo <dsamuylov@pharo.com>2018-08-02 10:37:31 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2018-08-02 10:37:31 -0400
commit7a731d2bd162419086f3aeec98ec41dfcaa16696 (patch)
treefb2dcfd52b5ee074c2ce9e3fbacefc3156c5bc75 /plugin/client_rpc_generated.go
parentb728b16f9083bf5c71e9c27ad074823e8e454b04 (diff)
downloadchat-7a731d2bd162419086f3aeec98ec41dfcaa16696.tar.gz
chat-7a731d2bd162419086f3aeec98ec41dfcaa16696.tar.bz2
chat-7a731d2bd162419086f3aeec98ec41dfcaa16696.zip
Feature/fileinfo create copy (#9198)
* Initial implementation of a CopyFileInfos function that creates new FileInfo objects copied from provided FileIds with the provided user as the creator and not linked to a post yet. This can subsequently be used to copy existing attachments from another post to attach to a new post without having to re-upload the actual files * added a unit test for the CopyFileInfos function * resolving pull request suggestions
Diffstat (limited to 'plugin/client_rpc_generated.go')
-rw-r--r--plugin/client_rpc_generated.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/plugin/client_rpc_generated.go b/plugin/client_rpc_generated.go
index b43b93c5b..9106f2fad 100644
--- a/plugin/client_rpc_generated.go
+++ b/plugin/client_rpc_generated.go
@@ -1820,6 +1820,36 @@ func (s *apiRPCServer) UpdatePost(args *Z_UpdatePostArgs, returns *Z_UpdatePostR
return nil
}
+type Z_CopyFileInfosArgs struct {
+ A string
+ B []string
+}
+
+type Z_CopyFileInfosReturns struct {
+ A []string
+ B *model.AppError
+}
+
+func (g *apiRPCClient) CopyFileInfos(userId string, fileIds []string) ([]string, *model.AppError) {
+ _args := &Z_CopyFileInfosArgs{userId, fileIds}
+ _returns := &Z_CopyFileInfosReturns{}
+ if err := g.client.Call("Plugin.CopyFileInfos", _args, _returns); err != nil {
+ log.Printf("RPC call to CopyFileInfos API failed: %s", err.Error())
+ }
+ return _returns.A, _returns.B
+}
+
+func (s *apiRPCServer) CopyFileInfos(args *Z_CopyFileInfosArgs, returns *Z_CopyFileInfosReturns) error {
+ if hook, ok := s.impl.(interface {
+ CopyFileInfos(userId string, fileIds []string) ([]string, *model.AppError)
+ }); ok {
+ returns.A, returns.B = hook.CopyFileInfos(args.A, args.B)
+ } else {
+ return fmt.Errorf("API CopyFileInfos called but not implemented.")
+ }
+ return nil
+}
+
type Z_KVSetArgs struct {
A string
B []byte