This commit is contained in:
withchao
2023-02-24 15:41:50 +08:00
parent ae8478dc5e
commit d7640ca864
11 changed files with 445 additions and 290 deletions
+23 -65
View File
@@ -1,5 +1,12 @@
package group
import (
"OpenIM/internal/api2rpc"
"OpenIM/pkg/apistruct"
"OpenIM/pkg/proto/group"
"github.com/gin-gonic/gin"
)
//import (
// common "OpenIM/internal/api_to_rpc"
// api "OpenIM/pkg/apistruct"
@@ -23,73 +30,24 @@ package group
// jsonData "OpenIM/internal/utils"
//)
// @Summary 把用户踢出群组
// @Description 把用户踢出群组
// @Tags 群组相关
// @ID KickGroupMember
// @Accept json
// @Param token header string true "im token"
// @Param req body api.KickGroupMemberReq true "GroupID为要操作的群ID <br> kickedUserIDList为要踢出的群用户ID <br> reason为原因"
// @Produce json
// @Success 0 {object} api.KickGroupMemberResp "result为结果码, -1为失败, 0为成功"
// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /group/kick_group [post]
//func KickGroupMember(c *gin.Context) {
// params := api.KickGroupMemberReq{}
// if err := c.BindJSON(&params); err != nil {
// log.NewError("0", "BindJSON failed ", err.Error())
// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
// return
// }
// if len(params.KickedUserIDList) > constant.MaxNotificationNum {
// errMsg := params.OperationID + " too many members " + utils.Int32ToString(int32(len(params.KickedUserIDList)))
// log.Error(params.OperationID, errMsg)
// c.JSON(http.StatusOK, gin.H{"errCode": 400, "errMsg": errMsg})
// return
// }
// req := &rpc.KickGroupMemberReq{}
// utils.CopyStructFields(req, &params)
// var ok bool
// var errInfo string
// ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
// if !ok {
// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
// log.NewError(req.OperationID, errMsg)
// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
// return
// }
//
// log.NewInfo(req.OperationID, "KickGroupMember args ", req.String())
//
// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
// if etcdConn == nil {
// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
// log.NewError(req.OperationID, errMsg)
// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
// return
// }
// client := rpc.NewGroupClient(etcdConn)
// RpcResp, err := client.KickGroupMember(context.Background(), req)
// if err != nil {
// log.NewError(req.OperationID, "FindGroupMemberAll failed ", err.Error(), req.String())
// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
// return
// }
//
// var memberListResp api.KickGroupMemberResp
// memberListResp.ErrMsg = RpcResp.CommonResp.ErrMsg
// memberListResp.ErrCode = RpcResp.CommonResp.ErrCode
// for _, v := range RpcResp.Id2ResultList {
// memberListResp.UserIDResultList = append(memberListResp.UserIDResultList, &api.UserIDResult{UserID: v.UserID, Result: v.Result})
// }
// if len(memberListResp.UserIDResultList) == 0 {
// memberListResp.UserIDResultList = []*api.UserIDResult{}
// }
//
// log.NewInfo(req.OperationID, "KickGroupMember api return ", memberListResp)
// c.JSON(http.StatusOK, memberListResp)
// api2rpc.NewRpc(api2rpc.NewGin[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp](c), group.NewGroupClient, group.GroupClient.KickGroupMember).Name("group").Call()
//}
func KickGroupMember(c *gin.Context) {
// 默认 全部自动
api := api2rpc.NewGin[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp](c)
api2rpc.NewRpc(api, group.NewGroupClient, group.GroupClient.KickGroupMember).Name("group").Call()
//// 可以自定义编辑请求和响应
//a := NewRpc(NewGin[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp](c), group.NewGroupClient, group.GroupClient.KickGroupMember)
//a.Before(func(apiReq *apistruct.KickGroupMemberReq, rpcReq *group.KickGroupMemberReq, bind func() error) error {
// return bind()
//}).After(func(rpcResp *group.KickGroupMemberResp, apiResp *apistruct.KickGroupMemberResp, bind func() error) error {
// return bind()
//}).Name("group").Call()
}
//
//// @Summary 获取群成员信息
//// @Description 获取群成员信息
+89 -44
View File
@@ -1,32 +1,23 @@
package group
import (
common "OpenIM/internal/api2rpc"
"OpenIM/pkg/apistruct"
"OpenIM/pkg/proto/group"
"context"
"errors"
"github.com/gin-gonic/gin"
"google.golang.org/grpc"
"reflect"
"testing"
)
type Ignore struct{}
func temp(client group.GroupClient, ctx context.Context, in *group.KickGroupMemberReq, opts ...grpc.CallOption) (*group.KickGroupMemberResp, error) {
return nil, nil
}
type ApiBind[A, B any] interface {
OperationID() string
OpUserID() (string, error)
Bind(*A) error
Error(error)
Write(*B)
Context() context.Context
Resp(resp *B, err error)
}
func NewApiBind[A, B any](c *gin.Context) ApiBind[A, B] {
func NewGin[A, B any](c *gin.Context) ApiBind[A, B] {
return &ginApiBind[A, B]{
c: c,
}
@@ -48,6 +39,14 @@ func (g *ginApiBind[A, B]) Bind(a *A) error {
return g.c.BindJSON(a)
}
func (g *ginApiBind[A, B]) Resp(resp *B, err error) {
if err == nil {
g.Write(resp)
} else {
g.Error(err)
}
}
func (g *ginApiBind[A, B]) Error(err error) {
//TODO implement me
}
@@ -56,71 +55,117 @@ func (g *ginApiBind[A, B]) Write(b *B) {
//TODO implement me
}
func TestName(t *testing.T) {
//var bind ApiBind[int, int]
//NewRpc(bind, "", group.NewGroupClient, temp)
var c *gin.Context
NewRpc(NewApiBind[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp](c), "", group.NewGroupClient, group.GroupClient.KickGroupMember)
func (g *ginApiBind[A, B]) Context() context.Context {
return g.c
}
//func TestName(t *testing.T) {
// //var bind ApiBind[int, int]
// //NewRpc(bind, "", group.NewGroupClient, temp)
//
// var c *gin.Context
// NewRpc(NewGin[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp](c), "", group.NewGroupClient, group.GroupClient.KickGroupMember)
//}
func KickGroupMember(c *gin.Context) {
// 默认 全部自动
NewRpc(NewApiBind[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp](c), "", group.NewGroupClient, group.GroupClient.KickGroupMember).Execute()
NewRpc(NewGin[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp](c), group.NewGroupClient, group.GroupClient.KickGroupMember).Call()
// 可以自定义编辑请求和响应
a := NewRpc(NewApiBind[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp](c), "", group.NewGroupClient, group.GroupClient.KickGroupMember)
a := NewRpc(NewGin[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp](c), group.NewGroupClient, group.GroupClient.KickGroupMember)
a.Before(func(apiReq *apistruct.KickGroupMemberReq, rpcReq *group.KickGroupMemberReq, bind func() error) error {
return bind()
}).After(func(rpcResp *group.KickGroupMemberResp, apiResp *apistruct.KickGroupMemberResp, bind func() error) error {
return bind()
}).Execute()
}).Call()
}
func NewRpc[A, B any, C, D any, Z any](bind ApiBind[A, B], name string, client func(conn *grpc.ClientConn) Z, rpc func(client Z, ctx context.Context, req C, options ...grpc.CallOption) (D, error)) *RpcRun[A, B, C, D, Z] {
return &RpcRun[A, B, C, D, Z]{
// NewRpc A: apiReq B: apiResp C: rpcReq D: rpcResp Z: rpcClient (group.GroupClient)
func NewRpc[A, B any, C, D any, Z any](bind ApiBind[A, B], client func(conn *grpc.ClientConn) Z, rpc func(client Z, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error)) *Rpc[A, B, C, D, Z] {
return &Rpc[A, B, C, D, Z]{
bind: bind,
name: name,
client: client,
rpc: rpc,
}
}
type RpcRun[A, B any, C, D any, Z any] struct {
type Rpc[A, B any, C, D any, Z any] struct {
bind ApiBind[A, B]
name string
client func(conn *grpc.ClientConn) Z
rpc func(client Z, ctx context.Context, req C, options ...grpc.CallOption) (D, error)
before func(apiReq *A, rpcReq C, bind func() error) error
after func(rpcResp D, apiResp *B, bind func() error) error
rpc func(client Z, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error)
before func(apiReq *A, rpcReq *C, bind func() error) error
after func(rpcResp *D, apiResp *B, bind func() error) error
}
func (a *RpcRun[A, B, C, D, Z]) Before(fn func(apiReq *A, rpcReq C, bind func() error) error) *RpcRun[A, B, C, D, Z] {
func (a *Rpc[A, B, C, D, Z]) Name(name string) *Rpc[A, B, C, D, Z] {
a.name = name
return a
}
func (a *Rpc[A, B, C, D, Z]) Before(fn func(apiReq *A, rpcReq *C, bind func() error) error) *Rpc[A, B, C, D, Z] {
a.before = fn
return a
}
func (a *RpcRun[A, B, C, D, Z]) After(fn func(rpcResp D, apiResp *B, bind func() error) error) *RpcRun[A, B, C, D, Z] {
func (a *Rpc[A, B, C, D, Z]) After(fn func(rpcResp *D, apiResp *B, bind func() error) error) *Rpc[A, B, C, D, Z] {
a.after = fn
return a
}
func (a *RpcRun[A, B, C, D, Z]) execute() (*B, error) {
func (a *Rpc[A, B, C, D, Z]) defaultCopyReq(apiReq *A, rpcReq *C) error {
common.CopyAny(apiReq, rpcReq)
return nil
}
func (a *Rpc[A, B, C, D, Z]) defaultCopyResp(rpcResp *D, apiResp *B) error {
common.CopyAny(rpcResp, apiResp)
return nil
}
func (a *Rpc[A, B, C, D, Z]) GetGrpcConn() (*grpc.ClientConn, error) {
return nil, nil // todo
}
func (a *Rpc[A, B, C, D, Z]) execute() (*B, error) {
var apiReq A
if err := a.bind.Bind(&apiReq); err != nil {
return nil, err
}
opID := a.bind.OperationID()
userID, err := a.bind.OpUserID()
if err != nil {
return nil, err
}
opID := a.bind.OperationID()
var rpcReq C // C type => *Struct
rpcReq = reflect.New(reflect.TypeOf(rpcReq).Elem()).Interface().(C)
return nil, nil
_, _ = opID, userID
var rpcReq C
if a.before == nil {
err = a.defaultCopyReq(&apiReq, &rpcReq)
} else {
err = a.before(&apiReq, &rpcReq, func() error { return a.defaultCopyReq(&apiReq, &rpcReq) })
}
if err != nil {
return nil, err
}
conn, err := a.GetGrpcConn()
if err != nil {
return nil, err
}
rpcResp, err := a.rpc(a.client(conn), a.bind.Context(), &rpcReq)
if err != nil {
return nil, err
}
var apiResp B
if a.after == nil {
err = a.defaultCopyResp(rpcResp, &apiResp)
} else {
err = a.after(rpcResp, &apiResp, func() error { return a.defaultCopyResp(rpcResp, &apiResp) })
}
if err != nil {
return nil, err
}
return &apiResp, nil
}
func (a *RpcRun[A, B, C, D, Z]) Execute() {
}
func GetGrpcConn(name string) (*grpc.ClientConn, error) {
return nil, errors.New("todo")
func (a *Rpc[A, B, C, D, Z]) Call() {
a.bind.Resp(a.execute())
}
+40 -43
View File
@@ -1,58 +1,55 @@
package common
package api2rpc
import (
"OpenIM/pkg/common/constant"
"OpenIM/pkg/common/log"
"OpenIM/pkg/common/tracelog"
utils2 "OpenIM/pkg/utils"
"context"
"fmt"
"github.com/gin-gonic/gin"
"google.golang.org/grpc/status"
"net/http"
"reflect"
"strings"
)
func ApiToRpc(c *gin.Context, apiReq, apiResp interface{}, rpcName string, rpcClientFunc interface{}, rpcFuncName string) {
if rpcName == "" {
rpcName = utils2.GetFuncName(1)
}
logFuncName := fmt.Sprintf("[ApiToRpc: %s]%s", utils2.GetFuncName(1), rpcFuncName)
ctx := tracelog.NewCtx(c, rpcFuncName)
defer log.ShowLog(ctx)
if err := c.BindJSON(apiReq); err != nil {
WriteErrorResponse(ctx, "BindJSON", err)
return
}
tracelog.SetCtxInfo(ctx, logFuncName, nil, "apiReq", apiReq)
etcdConn, err := rpc.GetConn(ctx, rpcName)
if err != nil {
WriteErrorResponse(ctx, "GetConn", err)
return
}
rpcClient := reflect.ValueOf(rpcClientFunc).Call([]reflect.Value{
reflect.ValueOf(etcdConn),
})[0].MethodByName(rpcFuncName) // rpcClient func
rpcReqPtr := reflect.New(rpcClient.Type().In(1).Elem()) // *req
CopyAny(apiReq, rpcReqPtr.Interface())
tracelog.SetCtxInfo(ctx, logFuncName, nil, "opUserID", c.GetString("opUserID"), "callRpcReq", rpcString(rpcReqPtr.Elem().Interface()))
respArr := rpcClient.Call([]reflect.Value{
reflect.ValueOf(context.Context(c)), // context.Context (ctx operationID. opUserID)
rpcReqPtr, // rpcClient apiReq
}) // respArr => (apiResp, error)
if !respArr[1].IsNil() { // rpcClient err != nil
err := respArr[1].Interface().(error)
WriteErrorResponse(ctx, rpcFuncName, err, "callRpcResp", "error")
return
}
rpcResp := respArr[0].Elem()
tracelog.SetCtxInfo(ctx, rpcFuncName, nil, "callRpcResp", rpcString(rpcResp.Interface()))
if apiResp != nil {
CopyAny(rpcResp.Interface(), apiResp)
}
SetSuccess(ctx, rpcFuncName, apiResp)
}
//func ApiToRpc(c *gin.Context, apiReq, apiResp interface{}, rpcName string, rpcClientFunc interface{}, rpcFuncName string) {
// if rpcName == "" {
// rpcName = utils2.GetFuncName(1)
// }
// logFuncName := fmt.Sprintf("[ApiToRpc: %s]%s", utils2.GetFuncName(1), rpcFuncName)
// ctx := tracelog.NewCtx(c, rpcFuncName)
// defer log.ShowLog(ctx)
// if err := c.BindJSON(apiReq); err != nil {
// WriteErrorResponse(ctx, "BindJSON", err)
// return
// }
// tracelog.SetCtxInfo(ctx, logFuncName, nil, "apiReq", apiReq)
// etcdConn, err := rpc.GetConn(ctx, rpcName)
// if err != nil {
// WriteErrorResponse(ctx, "GetConn", err)
// return
// }
// rpcClient := reflect.ValueOf(rpcClientFunc).Call([]reflect.Value{
// reflect.ValueOf(etcdConn),
// })[0].MethodByName(rpcFuncName) // rpcClient func
// rpcReqPtr := reflect.New(rpcClient.Type().In(1).Elem()) // *req
// CopyAny(apiReq, rpcReqPtr.Interface())
// tracelog.SetCtxInfo(ctx, logFuncName, nil, "opUserID", c.GetString("opUserID"), "callRpcReq", rpcString(rpcReqPtr.Elem().Interface()))
// respArr := rpcClient.Call([]reflect.Value{
// reflect.ValueOf(context.Context(c)), // context.Context (ctx operationID. opUserID)
// rpcReqPtr, // rpcClient apiReq
// }) // respArr => (apiResp, error)
// if !respArr[1].IsNil() { // rpcClient err != nil
// err := respArr[1].Interface().(error)
// WriteErrorResponse(ctx, rpcFuncName, err, "callRpcResp", "error")
// return
// }
// rpcResp := respArr[0].Elem()
// tracelog.SetCtxInfo(ctx, rpcFuncName, nil, "callRpcResp", rpcString(rpcResp.Interface()))
// if apiResp != nil {
// CopyAny(rpcResp.Interface(), apiResp)
// }
// SetSuccess(ctx, rpcFuncName, apiResp)
//}
func rpcString(v interface{}) string {
if s, ok := v.(interface{ String() string }); ok {
+15
View File
@@ -0,0 +1,15 @@
package api2rpc
import (
"context"
)
type Ignore struct{}
type ApiBind[A, B any] interface {
OperationID() string
OpUserID() (string, error)
Bind(*A) error
Context() context.Context
Resp(resp *B, err error)
}
+1
View File
@@ -0,0 +1 @@
package api2rpc
+1 -1
View File
@@ -1,4 +1,4 @@
package common
package api2rpc
import (
"fmt"
+67
View File
@@ -0,0 +1,67 @@
package api2rpc
import (
"context"
"github.com/gin-gonic/gin"
)
//func KickGroupMember(c *gin.Context) {
// // 默认 全部自动
// //var api ApiBind[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp] = NewGin[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp](c)
// var api ApiBind[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp] = nil
// var client func(conn *grpc.ClientConn) group.GroupClient = nil
// var rpc func(ctx context.Context, in *group.KickGroupMemberReq, opts ...grpc.CallOption) (*group.KickGroupMemberResp, error) = nil
// //NewRpc(api, client, rpc).Name("group").Call()
// NewRpc(api, client, rpc).Name("group").Call()
//
// // 可以自定义编辑请求和响应
// //a := NewRpc(NewGin[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp](c), "", group.NewGroupClient, group.GroupClient.KickGroupMember)
// //a.Before(func(apiReq *apistruct.KickGroupMemberReq, rpcReq *group.KickGroupMemberReq, bind func() error) error {
// // return bind()
// //}).After(func(rpcResp *group.KickGroupMemberResp, apiResp *apistruct.KickGroupMemberResp, bind func() error) error {
// // return bind()
// //}).Execute()
//}
//
func NewGin[A, B any](c *gin.Context) ApiBind[A, B] {
return &ginApiBind[A, B]{
c: c,
}
}
type ginApiBind[A, B any] struct {
c *gin.Context
}
func (g *ginApiBind[A, B]) OperationID() string {
return g.c.GetHeader("operationID")
}
func (g *ginApiBind[A, B]) OpUserID() (string, error) {
return "", nil
}
func (g *ginApiBind[A, B]) Bind(a *A) error {
return g.c.BindJSON(a)
}
func (g *ginApiBind[A, B]) Resp(resp *B, err error) {
if err == nil {
g.Write(resp)
} else {
g.Error(err)
}
}
func (g *ginApiBind[A, B]) Error(err error) {
//TODO implement me
}
func (g *ginApiBind[A, B]) Write(b *B) {
//TODO implement me
}
func (g *ginApiBind[A, B]) Context() context.Context {
return g.c
}
+97
View File
@@ -0,0 +1,97 @@
package api2rpc
import (
"context"
"google.golang.org/grpc"
)
// NewRpc A: apiReq B: apiResp C: rpcReq D: rpcResp Z: rpcClient (group.GroupClient)
func NewRpc[A, B any, C, D any, Z any](bind ApiBind[A, B], client func(conn *grpc.ClientConn) Z, rpc func(client Z, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error)) *Rpc[A, B, C, D, Z] {
return &Rpc[A, B, C, D, Z]{
bind: bind,
client: client,
rpc: rpc,
}
}
type Rpc[A, B any, C, D any, Z any] struct {
bind ApiBind[A, B]
name string
client func(conn *grpc.ClientConn) Z
rpc func(client Z, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error)
before func(apiReq *A, rpcReq *C, bind func() error) error
after func(rpcResp *D, apiResp *B, bind func() error) error
}
func (a *Rpc[A, B, C, D, Z]) Name(name string) *Rpc[A, B, C, D, Z] {
a.name = name
return a
}
func (a *Rpc[A, B, C, D, Z]) Before(fn func(apiReq *A, rpcReq *C, bind func() error) error) *Rpc[A, B, C, D, Z] {
a.before = fn
return a
}
func (a *Rpc[A, B, C, D, Z]) After(fn func(rpcResp *D, apiResp *B, bind func() error) error) *Rpc[A, B, C, D, Z] {
a.after = fn
return a
}
func (a *Rpc[A, B, C, D, Z]) defaultCopyReq(apiReq *A, rpcReq *C) error {
CopyAny(apiReq, rpcReq)
return nil
}
func (a *Rpc[A, B, C, D, Z]) defaultCopyResp(rpcResp *D, apiResp *B) error {
CopyAny(rpcResp, apiResp)
return nil
}
func (a *Rpc[A, B, C, D, Z]) GetGrpcConn() (*grpc.ClientConn, error) {
return nil, nil // todo
}
func (a *Rpc[A, B, C, D, Z]) execute() (*B, error) {
var apiReq A
if err := a.bind.Bind(&apiReq); err != nil {
return nil, err
}
opID := a.bind.OperationID()
userID, err := a.bind.OpUserID()
if err != nil {
return nil, err
}
_, _ = opID, userID
var rpcReq C
if a.before == nil {
err = a.defaultCopyReq(&apiReq, &rpcReq)
} else {
err = a.before(&apiReq, &rpcReq, func() error { return a.defaultCopyReq(&apiReq, &rpcReq) })
}
if err != nil {
return nil, err
}
conn, err := a.GetGrpcConn()
if err != nil {
return nil, err
}
rpcResp, err := a.rpc(a.client(conn), a.bind.Context(), &rpcReq)
if err != nil {
return nil, err
}
var apiResp B
if a.after == nil {
err = a.defaultCopyResp(rpcResp, &apiResp)
} else {
err = a.after(rpcResp, &apiResp, func() error { return a.defaultCopyResp(rpcResp, &apiResp) })
}
if err != nil {
return nil, err
}
return &apiResp, nil
}
func (a *Rpc[A, B, C, D, Z]) Call() {
a.bind.Resp(a.execute())
}
+31
View File
@@ -0,0 +1,31 @@
package common
import (
"OpenIM/internal/api2rpc"
"OpenIM/pkg/proto/group"
"github.com/gin-gonic/gin"
"testing"
)
type AReq struct {
}
type AResp struct {
}
func KickGroupMember(c *gin.Context) {
// 默认 全部自动
api2rpc.NewRpc(api2rpc.NewGin[AReq, AResp](c), group.NewGroupClient, group.GroupClient.KickGroupMember).Name("group").Call()
//// 可以自定义编辑请求和响应
//a := NewRpc(NewGin[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp](c), group.NewGroupClient, group.GroupClient.KickGroupMember)
//a.Before(func(apiReq *apistruct.KickGroupMemberReq, rpcReq *group.KickGroupMemberReq, bind func() error) error {
// return bind()
//}).After(func(rpcResp *group.KickGroupMemberResp, apiResp *apistruct.KickGroupMemberResp, bind func() error) error {
// return bind()
//}).Name("group").Call()
}
func TestName(t *testing.T) {
KickGroupMember(nil)
}