|
|
@@ -29,6 +29,7 @@ var _ = new(base.Html)
|
|
|
const _ = http.SupportPackageIsVersion1
|
|
|
|
|
|
type ManagerHTTPServer interface {
|
|
|
+ FindAITask(context.Context, *FindAITaskRequest) (*FindAITaskReply, error)
|
|
|
FindOnlineCanMatchingPerson(context.Context, *emptypb.Empty) (*websocket.FindOnlineCanMatchingPersonReply, error)
|
|
|
FindOnlinePerson(context.Context, *FindOnlinePersonRequest) (*websocket.FindOnlinePersonReply, error)
|
|
|
ManagerAddBlackPicture(context.Context, *ManagerAddBlackPictureRequest) (*emptypb.Empty, error)
|
|
|
@@ -69,6 +70,7 @@ type ManagerHTTPServer interface {
|
|
|
OnlinePerson(context.Context, *emptypb.Empty) (*OnlinePersonReply, error)
|
|
|
SendWebsocketMsg(context.Context, *common.PersonIDParam) (*websocket.SendMsgReply, error)
|
|
|
SetScripPass(context.Context, *common.ScripID) (*emptypb.Empty, error)
|
|
|
+ UpdateAITaskIsFinish(context.Context, *UpdateAITaskIsFinishRequest) (*emptypb.Empty, error)
|
|
|
}
|
|
|
|
|
|
func RegisterManagerHTTPServer(s *http.Server, srv ManagerHTTPServer) {
|
|
|
@@ -113,6 +115,8 @@ func RegisterManagerHTTPServer(s *http.Server, srv ManagerHTTPServer) {
|
|
|
r.POST("/api/manager/websocket/send", _Manager_SendWebsocketMsg0_HTTP_Handler(srv))
|
|
|
r.POST("/api/manager/scrip/all/list", _Manager_ManagerFindScripAllList0_HTTP_Handler(srv))
|
|
|
r.POST("/api/manager/scrip/pass", _Manager_SetScripPass0_HTTP_Handler(srv))
|
|
|
+ r.POST("/api/manager/ai/task/finish", _Manager_UpdateAITaskIsFinish0_HTTP_Handler(srv))
|
|
|
+ r.POST("/api/manager/ai/task/find", _Manager_FindAITask0_HTTP_Handler(srv))
|
|
|
}
|
|
|
|
|
|
func _Manager_ManagerFindUserList0_HTTP_Handler(srv ManagerHTTPServer) func(ctx http.Context) error {
|
|
|
@@ -1195,7 +1199,62 @@ func _Manager_SetScripPass0_HTTP_Handler(srv ManagerHTTPServer) func(ctx http.Co
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+func _Manager_UpdateAITaskIsFinish0_HTTP_Handler(srv ManagerHTTPServer) func(ctx http.Context) error {
|
|
|
+ return func(ctx http.Context) error {
|
|
|
+ var in UpdateAITaskIsFinishRequest
|
|
|
+ if err := ctx.Bind(&in); err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ if err := ctx.BindQuery(&in); err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ http.SetOperation(ctx, "/api.manager.Manager/UpdateAITaskIsFinish")
|
|
|
+ h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.UpdateAITaskIsFinish(ctx, req.(*UpdateAITaskIsFinishRequest))
|
|
|
+ })
|
|
|
+ out, err := h(ctx, &in)
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ success := &reply.SuccessReply{
|
|
|
+ Code: 0,
|
|
|
+ }
|
|
|
+ if out != nil {
|
|
|
+ success.Data = out
|
|
|
+ }
|
|
|
+ return ctx.Result(200, success)
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+func _Manager_FindAITask0_HTTP_Handler(srv ManagerHTTPServer) func(ctx http.Context) error {
|
|
|
+ return func(ctx http.Context) error {
|
|
|
+ var in FindAITaskRequest
|
|
|
+ if err := ctx.Bind(&in); err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ if err := ctx.BindQuery(&in); err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ http.SetOperation(ctx, "/api.manager.Manager/FindAITask")
|
|
|
+ h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.FindAITask(ctx, req.(*FindAITaskRequest))
|
|
|
+ })
|
|
|
+ out, err := h(ctx, &in)
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ success := &reply.SuccessReply{
|
|
|
+ Code: 0,
|
|
|
+ }
|
|
|
+ if out != nil {
|
|
|
+ success.Data = out
|
|
|
+ }
|
|
|
+ return ctx.Result(200, success)
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
type ManagerHTTPClient interface {
|
|
|
+ FindAITask(ctx context.Context, req *FindAITaskRequest, opts ...http.CallOption) (rsp *FindAITaskReply, err error)
|
|
|
FindOnlineCanMatchingPerson(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *websocket.FindOnlineCanMatchingPersonReply, err error)
|
|
|
FindOnlinePerson(ctx context.Context, req *FindOnlinePersonRequest, opts ...http.CallOption) (rsp *websocket.FindOnlinePersonReply, err error)
|
|
|
ManagerAddBlackPicture(ctx context.Context, req *ManagerAddBlackPictureRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
|
|
|
@@ -1236,6 +1295,7 @@ type ManagerHTTPClient interface {
|
|
|
OnlinePerson(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *OnlinePersonReply, err error)
|
|
|
SendWebsocketMsg(ctx context.Context, req *common.PersonIDParam, opts ...http.CallOption) (rsp *websocket.SendMsgReply, err error)
|
|
|
SetScripPass(ctx context.Context, req *common.ScripID, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
|
|
|
+ UpdateAITaskIsFinish(ctx context.Context, req *UpdateAITaskIsFinishRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
|
|
|
}
|
|
|
|
|
|
type ManagerHTTPClientImpl struct {
|
|
|
@@ -1246,6 +1306,19 @@ func NewManagerHTTPClient(client *http.Client) ManagerHTTPClient {
|
|
|
return &ManagerHTTPClientImpl{client}
|
|
|
}
|
|
|
|
|
|
+func (c *ManagerHTTPClientImpl) FindAITask(ctx context.Context, in *FindAITaskRequest, opts ...http.CallOption) (*FindAITaskReply, error) {
|
|
|
+ var out FindAITaskReply
|
|
|
+ pattern := "/api/manager/ai/task/find"
|
|
|
+ path := binding.EncodeURL(pattern, in, false)
|
|
|
+ opts = append(opts, http.Operation("/api.manager.Manager/FindAITask"))
|
|
|
+ opts = append(opts, http.PathTemplate(pattern))
|
|
|
+ err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return &out, err
|
|
|
+}
|
|
|
+
|
|
|
func (c *ManagerHTTPClientImpl) FindOnlineCanMatchingPerson(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*websocket.FindOnlineCanMatchingPersonReply, error) {
|
|
|
var out websocket.FindOnlineCanMatchingPersonReply
|
|
|
pattern := "/api/manager/user/matching/list"
|
|
|
@@ -1765,3 +1838,16 @@ func (c *ManagerHTTPClientImpl) SetScripPass(ctx context.Context, in *common.Scr
|
|
|
}
|
|
|
return &out, err
|
|
|
}
|
|
|
+
|
|
|
+func (c *ManagerHTTPClientImpl) UpdateAITaskIsFinish(ctx context.Context, in *UpdateAITaskIsFinishRequest, opts ...http.CallOption) (*emptypb.Empty, error) {
|
|
|
+ var out emptypb.Empty
|
|
|
+ pattern := "/api/manager/ai/task/finish"
|
|
|
+ path := binding.EncodeURL(pattern, in, false)
|
|
|
+ opts = append(opts, http.Operation("/api.manager.Manager/UpdateAITaskIsFinish"))
|
|
|
+ opts = append(opts, http.PathTemplate(pattern))
|
|
|
+ err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return &out, err
|
|
|
+}
|