summaryrefslogtreecommitdiffstats
path: root/plugin/client_rpc_generated.go
diff options
context:
space:
mode:
authorCharles Kenney <Charlesc.kenney@gmail.com>2018-10-17 20:31:51 -0400
committerJesse Hallam <jesse.hallam@gmail.com>2018-10-17 20:31:51 -0400
commit3bc89083fca64a1d096cc897f13d0a9b68433a8f (patch)
tree1a3b8f81f45dd39564f80288fea2ac0970bc75f9 /plugin/client_rpc_generated.go
parentdb1123b8b28739ab78e46d8ec21f9aaa00ab520d (diff)
downloadchat-3bc89083fca64a1d096cc897f13d0a9b68433a8f.tar.gz
chat-3bc89083fca64a1d096cc897f13d0a9b68433a8f.tar.bz2
chat-3bc89083fca64a1d096cc897f13d0a9b68433a8f.zip
Add GetFileLink method to plugin API (#9665)
* add GetFileLink method to plugin API * Update plugin/api.go * add translations for new plugin API errors
Diffstat (limited to 'plugin/client_rpc_generated.go')
-rw-r--r--plugin/client_rpc_generated.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/plugin/client_rpc_generated.go b/plugin/client_rpc_generated.go
index f7db87e2e..4648b86ce 100644
--- a/plugin/client_rpc_generated.go
+++ b/plugin/client_rpc_generated.go
@@ -2399,6 +2399,35 @@ func (s *apiRPCServer) GetFileInfo(args *Z_GetFileInfoArgs, returns *Z_GetFileIn
return nil
}
+type Z_GetFileLinkArgs struct {
+ A string
+}
+
+type Z_GetFileLinkReturns struct {
+ A string
+ B *model.AppError
+}
+
+func (g *apiRPCClient) GetFileLink(fileId string) (string, *model.AppError) {
+ _args := &Z_GetFileLinkArgs{fileId}
+ _returns := &Z_GetFileLinkReturns{}
+ if err := g.client.Call("Plugin.GetFileLink", _args, _returns); err != nil {
+ log.Printf("RPC call to GetFileLink API failed: %s", err.Error())
+ }
+ return _returns.A, _returns.B
+}
+
+func (s *apiRPCServer) GetFileLink(args *Z_GetFileLinkArgs, returns *Z_GetFileLinkReturns) error {
+ if hook, ok := s.impl.(interface {
+ GetFileLink(fileId string) (string, *model.AppError)
+ }); ok {
+ returns.A, returns.B = hook.GetFileLink(args.A)
+ } else {
+ return encodableError(fmt.Errorf("API GetFileLink called but not implemented."))
+ }
+ return nil
+}
+
type Z_ReadFileArgs struct {
A string
}