summaryrefslogtreecommitdiffstats
path: root/plugin/client_rpc_generated.go
diff options
context:
space:
mode:
authorJesse Hallam <jesse.hallam@gmail.com>2018-07-20 12:03:08 -0400
committerChristopher Speller <crspeller@gmail.com>2018-07-20 09:03:08 -0700
commit908a682fcf3bbc48db75099f636d627616757b24 (patch)
tree255879c6545cd16fd6d16adadb55d07b089bcbe4 /plugin/client_rpc_generated.go
parent610ac5a53c0f6536ca65ed2fe6e0646b468bd275 (diff)
downloadchat-908a682fcf3bbc48db75099f636d627616757b24.tar.gz
chat-908a682fcf3bbc48db75099f636d627616757b24.tar.bz2
chat-908a682fcf3bbc48db75099f636d627616757b24.zip
make GetChannelByName take teamId first (#9134)
* make GetChannelByName take teamId first I think it is more natural to accept `teamId`, then `channelName`, given the pattern followed by other Plugin API methods and even the SQL Store itself. The App layer seems unusual in accepting `channelName` first. This also re-generates the mocks fixing the parameter order for the recently added `UserStatus` APIs. * add GetChannelByNameForTeamName
Diffstat (limited to 'plugin/client_rpc_generated.go')
-rw-r--r--plugin/client_rpc_generated.go36
1 files changed, 33 insertions, 3 deletions
diff --git a/plugin/client_rpc_generated.go b/plugin/client_rpc_generated.go
index a96ff33e5..9f25e1478 100644
--- a/plugin/client_rpc_generated.go
+++ b/plugin/client_rpc_generated.go
@@ -1286,8 +1286,8 @@ type Z_GetChannelByNameReturns struct {
B *model.AppError
}
-func (g *apiRPCClient) GetChannelByName(name, teamId string) (*model.Channel, *model.AppError) {
- _args := &Z_GetChannelByNameArgs{name, teamId}
+func (g *apiRPCClient) GetChannelByName(teamId, name string) (*model.Channel, *model.AppError) {
+ _args := &Z_GetChannelByNameArgs{teamId, name}
_returns := &Z_GetChannelByNameReturns{}
if err := g.client.Call("Plugin.GetChannelByName", _args, _returns); err != nil {
g.log.Error("RPC call to GetChannelByName API failed.", mlog.Err(err))
@@ -1297,7 +1297,7 @@ func (g *apiRPCClient) GetChannelByName(name, teamId string) (*model.Channel, *m
func (s *apiRPCServer) GetChannelByName(args *Z_GetChannelByNameArgs, returns *Z_GetChannelByNameReturns) error {
if hook, ok := s.impl.(interface {
- GetChannelByName(name, teamId string) (*model.Channel, *model.AppError)
+ GetChannelByName(teamId, name string) (*model.Channel, *model.AppError)
}); ok {
returns.A, returns.B = hook.GetChannelByName(args.A, args.B)
} else {
@@ -1306,6 +1306,36 @@ func (s *apiRPCServer) GetChannelByName(args *Z_GetChannelByNameArgs, returns *Z
return nil
}
+type Z_GetChannelByNameForTeamNameArgs struct {
+ A string
+ B string
+}
+
+type Z_GetChannelByNameForTeamNameReturns struct {
+ A *model.Channel
+ B *model.AppError
+}
+
+func (g *apiRPCClient) GetChannelByNameForTeamName(teamName, channelName string) (*model.Channel, *model.AppError) {
+ _args := &Z_GetChannelByNameForTeamNameArgs{teamName, channelName}
+ _returns := &Z_GetChannelByNameForTeamNameReturns{}
+ if err := g.client.Call("Plugin.GetChannelByNameForTeamName", _args, _returns); err != nil {
+ g.log.Error("RPC call to GetChannelByNameForTeamName API failed.", mlog.Err(err))
+ }
+ return _returns.A, _returns.B
+}
+
+func (s *apiRPCServer) GetChannelByNameForTeamName(args *Z_GetChannelByNameForTeamNameArgs, returns *Z_GetChannelByNameForTeamNameReturns) error {
+ if hook, ok := s.impl.(interface {
+ GetChannelByNameForTeamName(teamName, channelName string) (*model.Channel, *model.AppError)
+ }); ok {
+ returns.A, returns.B = hook.GetChannelByNameForTeamName(args.A, args.B)
+ } else {
+ return fmt.Errorf("API GetChannelByNameForTeamName called but not implemented.")
+ }
+ return nil
+}
+
type Z_GetDirectChannelArgs struct {
A string
B string