summaryrefslogtreecommitdiffstats
path: root/plugin/client_rpc_generated.go
diff options
context:
space:
mode:
authorJesús Espino <jespinog@gmail.com>2018-08-20 18:22:08 +0200
committerChristopher Speller <crspeller@gmail.com>2018-08-20 09:22:08 -0700
commitcea1796f0698956e4fab57a0015b292854bbbcf3 (patch)
tree6a1adcdf154d3307cba3d670b9a94ba4e39cc0f8 /plugin/client_rpc_generated.go
parent56d92de3f20fa1d89c2d2c09b03e933a1325af8b (diff)
downloadchat-cea1796f0698956e4fab57a0015b292854bbbcf3.tar.gz
chat-cea1796f0698956e4fab57a0015b292854bbbcf3.tar.bz2
chat-cea1796f0698956e4fab57a0015b292854bbbcf3.zip
Adding Permissions check and reactions function to plugins API (#9273)
* Adding reactions functions * Adding permissions checking in the plugins api
Diffstat (limited to 'plugin/client_rpc_generated.go')
-rw-r--r--plugin/client_rpc_generated.go175
1 files changed, 175 insertions, 0 deletions
diff --git a/plugin/client_rpc_generated.go b/plugin/client_rpc_generated.go
index 3fc03ec3f..ab41c66d9 100644
--- a/plugin/client_rpc_generated.go
+++ b/plugin/client_rpc_generated.go
@@ -1705,6 +1705,92 @@ func (s *apiRPCServer) CreatePost(args *Z_CreatePostArgs, returns *Z_CreatePostR
return nil
}
+type Z_AddReactionArgs struct {
+ A *model.Reaction
+}
+
+type Z_AddReactionReturns struct {
+ A *model.Reaction
+ B *model.AppError
+}
+
+func (g *apiRPCClient) AddReaction(reaction *model.Reaction) (*model.Reaction, *model.AppError) {
+ _args := &Z_AddReactionArgs{reaction}
+ _returns := &Z_AddReactionReturns{}
+ if err := g.client.Call("Plugin.AddReaction", _args, _returns); err != nil {
+ log.Printf("RPC call to AddReaction API failed: %s", err.Error())
+ }
+ return _returns.A, _returns.B
+}
+
+func (s *apiRPCServer) AddReaction(args *Z_AddReactionArgs, returns *Z_AddReactionReturns) error {
+ if hook, ok := s.impl.(interface {
+ AddReaction(reaction *model.Reaction) (*model.Reaction, *model.AppError)
+ }); ok {
+ returns.A, returns.B = hook.AddReaction(args.A)
+ } else {
+ return fmt.Errorf("API AddReaction called but not implemented.")
+ }
+ return nil
+}
+
+type Z_RemoveReactionArgs struct {
+ A *model.Reaction
+}
+
+type Z_RemoveReactionReturns struct {
+ A *model.AppError
+}
+
+func (g *apiRPCClient) RemoveReaction(reaction *model.Reaction) *model.AppError {
+ _args := &Z_RemoveReactionArgs{reaction}
+ _returns := &Z_RemoveReactionReturns{}
+ if err := g.client.Call("Plugin.RemoveReaction", _args, _returns); err != nil {
+ log.Printf("RPC call to RemoveReaction API failed: %s", err.Error())
+ }
+ return _returns.A
+}
+
+func (s *apiRPCServer) RemoveReaction(args *Z_RemoveReactionArgs, returns *Z_RemoveReactionReturns) error {
+ if hook, ok := s.impl.(interface {
+ RemoveReaction(reaction *model.Reaction) *model.AppError
+ }); ok {
+ returns.A = hook.RemoveReaction(args.A)
+ } else {
+ return fmt.Errorf("API RemoveReaction called but not implemented.")
+ }
+ return nil
+}
+
+type Z_GetReactionsArgs struct {
+ A string
+}
+
+type Z_GetReactionsReturns struct {
+ A []*model.Reaction
+ B *model.AppError
+}
+
+func (g *apiRPCClient) GetReactions(postId string) ([]*model.Reaction, *model.AppError) {
+ _args := &Z_GetReactionsArgs{postId}
+ _returns := &Z_GetReactionsReturns{}
+ if err := g.client.Call("Plugin.GetReactions", _args, _returns); err != nil {
+ log.Printf("RPC call to GetReactions API failed: %s", err.Error())
+ }
+ return _returns.A, _returns.B
+}
+
+func (s *apiRPCServer) GetReactions(args *Z_GetReactionsArgs, returns *Z_GetReactionsReturns) error {
+ if hook, ok := s.impl.(interface {
+ GetReactions(postId string) ([]*model.Reaction, *model.AppError)
+ }); ok {
+ returns.A, returns.B = hook.GetReactions(args.A)
+ } else {
+ return fmt.Errorf("API GetReactions called but not implemented.")
+ }
+ return nil
+}
+
type Z_SendEphemeralPostArgs struct {
A string
B *model.Post
@@ -2023,6 +2109,95 @@ func (s *apiRPCServer) PublishWebSocketEvent(args *Z_PublishWebSocketEventArgs,
return nil
}
+type Z_HasPermissionToArgs struct {
+ A string
+ B *model.Permission
+}
+
+type Z_HasPermissionToReturns struct {
+ A bool
+}
+
+func (g *apiRPCClient) HasPermissionTo(userId string, permission *model.Permission) bool {
+ _args := &Z_HasPermissionToArgs{userId, permission}
+ _returns := &Z_HasPermissionToReturns{}
+ if err := g.client.Call("Plugin.HasPermissionTo", _args, _returns); err != nil {
+ log.Printf("RPC call to HasPermissionTo API failed: %s", err.Error())
+ }
+ return _returns.A
+}
+
+func (s *apiRPCServer) HasPermissionTo(args *Z_HasPermissionToArgs, returns *Z_HasPermissionToReturns) error {
+ if hook, ok := s.impl.(interface {
+ HasPermissionTo(userId string, permission *model.Permission) bool
+ }); ok {
+ returns.A = hook.HasPermissionTo(args.A, args.B)
+ } else {
+ return fmt.Errorf("API HasPermissionTo called but not implemented.")
+ }
+ return nil
+}
+
+type Z_HasPermissionToTeamArgs struct {
+ A string
+ B string
+ C *model.Permission
+}
+
+type Z_HasPermissionToTeamReturns struct {
+ A bool
+}
+
+func (g *apiRPCClient) HasPermissionToTeam(userId, teamId string, permission *model.Permission) bool {
+ _args := &Z_HasPermissionToTeamArgs{userId, teamId, permission}
+ _returns := &Z_HasPermissionToTeamReturns{}
+ if err := g.client.Call("Plugin.HasPermissionToTeam", _args, _returns); err != nil {
+ log.Printf("RPC call to HasPermissionToTeam API failed: %s", err.Error())
+ }
+ return _returns.A
+}
+
+func (s *apiRPCServer) HasPermissionToTeam(args *Z_HasPermissionToTeamArgs, returns *Z_HasPermissionToTeamReturns) error {
+ if hook, ok := s.impl.(interface {
+ HasPermissionToTeam(userId, teamId string, permission *model.Permission) bool
+ }); ok {
+ returns.A = hook.HasPermissionToTeam(args.A, args.B, args.C)
+ } else {
+ return fmt.Errorf("API HasPermissionToTeam called but not implemented.")
+ }
+ return nil
+}
+
+type Z_HasPermissionToChannelArgs struct {
+ A string
+ B string
+ C *model.Permission
+}
+
+type Z_HasPermissionToChannelReturns struct {
+ A bool
+}
+
+func (g *apiRPCClient) HasPermissionToChannel(userId, channelId string, permission *model.Permission) bool {
+ _args := &Z_HasPermissionToChannelArgs{userId, channelId, permission}
+ _returns := &Z_HasPermissionToChannelReturns{}
+ if err := g.client.Call("Plugin.HasPermissionToChannel", _args, _returns); err != nil {
+ log.Printf("RPC call to HasPermissionToChannel API failed: %s", err.Error())
+ }
+ return _returns.A
+}
+
+func (s *apiRPCServer) HasPermissionToChannel(args *Z_HasPermissionToChannelArgs, returns *Z_HasPermissionToChannelReturns) error {
+ if hook, ok := s.impl.(interface {
+ HasPermissionToChannel(userId, channelId string, permission *model.Permission) bool
+ }); ok {
+ returns.A = hook.HasPermissionToChannel(args.A, args.B, args.C)
+ } else {
+ return fmt.Errorf("API HasPermissionToChannel called but not implemented.")
+ }
+ return nil
+}
+
type Z_LogDebugArgs struct {
A string
B []interface{}