Documentation ¶
Overview ¶
Package biz @author <chengjiang@buffalo-robot.com> @date 2023/2/6 @note
Package biz @author <chengjiang@buffalo-robot.com> @date 2023/2/6 @note
Index ¶
- Variables
- type DataRepo
- type IMBiz
- func (im *IMBiz) CreateMessage(ctx context.Context, req *pb.MessageReq) error
- func (im *IMBiz) CreateRobot(ctx context.Context, req *pb.CreateRobotReq) error
- func (im *IMBiz) CreateSession(ctx context.Context, req *pb.CreateSessionReq) (*models2.Session, error)
- func (im *IMBiz) CreateSessionUser(ctx context.Context, req *pb.CreateSessionUserReq) error
- func (im *IMBiz) CreateSysMessage(ctx context.Context, req *pb.SysMessageReq) error
- func (im *IMBiz) DeleteSessionUser(ctx context.Context, req *pb.DeleteSessionUserReq) error
- func (im *IMBiz) GetRobotInfo(ctx context.Context, req *pb.GetRobotInfoReq) (*pb.GetRobotInfoResp, error)
- func (im *IMBiz) GetRobotList(ctx context.Context, req *pb.RobotListReq) (*pb.GetRobotListResp, error)
- func (im *IMBiz) ListLastMessage(ctx context.Context, req *pb.ListLastMessageReq) (map[int64]*models.Message, error)
- func (im *IMBiz) ListLastSysMessages(ctx context.Context, req *pb.ListLastSysMessageReq) (map[int64]*models2.SystemNotifyMessage, error)
- func (im *IMBiz) ListMessage(ctx context.Context, req *pb.ListMessageReq) ([]*models.Message, error)
- func (im *IMBiz) ListSessionUser(ctx context.Context, req *pb.ListSessionUserReq) ([]int64, error)
- func (im *IMBiz) ListSysMessage(ctx context.Context, req *pb.ListSysMessageReq) ([]*models2.SystemNotifyMessage, error)
- func (im *IMBiz) ListUserSession(ctx context.Context, req *pb.ListUserSessionReq) ([]*models2.Session, error)
- func (im *IMBiz) PutSession(ctx context.Context, req *pb.PutSessionReq) error
- func (im *IMBiz) UpdateRobot(ctx context.Context, req *pb.UpdateRobotReq) error
- type MessageRepo
- type NotifyRobotRepo
- type PluginsRepo
- type SessionRepo
- type SystemNotifyMessageRepo
- type UserInfo
- type UserRepo
- type UsersSessionRepo
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewImBiz)
ProviderSet is biz providers.
Functions ¶
This section is empty.
Types ¶
type IMBiz ¶
type IMBiz struct {
// contains filtered or unexported fields
}
func NewImBiz ¶
func NewImBiz(pluginRepo PluginsRepo, usersSessionRepo UsersSessionRepo, sessionRepo SessionRepo, messageRepo MessageRepo, notifyMsg SystemNotifyMessageRepo, notifyRbt NotifyRobotRepo, socketio *socketio.SocketioServer, data DataRepo, ) *IMBiz
func (*IMBiz) CreateMessage ¶
func (*IMBiz) CreateRobot ¶
func (*IMBiz) CreateSession ¶
func (*IMBiz) CreateSessionUser ¶
func (*IMBiz) CreateSysMessage ¶
func (*IMBiz) DeleteSessionUser ¶
func (*IMBiz) GetRobotInfo ¶
func (im *IMBiz) GetRobotInfo(ctx context.Context, req *pb.GetRobotInfoReq) (*pb.GetRobotInfoResp, error)
func (*IMBiz) GetRobotList ¶
func (im *IMBiz) GetRobotList(ctx context.Context, req *pb.RobotListReq) (*pb.GetRobotListResp, error)
func (*IMBiz) ListLastMessage ¶
func (*IMBiz) ListLastSysMessages ¶
func (im *IMBiz) ListLastSysMessages(ctx context.Context, req *pb.ListLastSysMessageReq) (map[int64]*models2.SystemNotifyMessage, error)
func (*IMBiz) ListMessage ¶
func (*IMBiz) ListSessionUser ¶
func (*IMBiz) ListSysMessage ¶
func (im *IMBiz) ListSysMessage(ctx context.Context, req *pb.ListSysMessageReq) ([]*models2.SystemNotifyMessage, error)
func (*IMBiz) ListUserSession ¶
func (*IMBiz) PutSession ¶
func (*IMBiz) UpdateRobot ¶
type MessageRepo ¶
type MessageRepo interface { GetMessageBySessionID(ctx context.Context, sessionID, startPos, endPos int64) ([]*models2.Message, error) CreateMessage(ctx context.Context, data *models2.Message, s *dao.Session) error GetMessageByIDList(ctx context.Context, idList []int64) ([]*models2.Message, error) UpdateMessageByid(ctx context.Context, id int64, data *models2.Message, s *dao.Session, columns ...jet.Column) error ListMessage(ctx context.Context, page, perPage int32, query string) ([]*models2.Message, int64, error) DeleteMessage(ctx context.Context, idList []int64, s *dao.Session) error }
type NotifyRobotRepo ¶
type NotifyRobotRepo interface { GetNotifyRobotByID(ctx context.Context, id int64) (*models2.NotifyRobot, error) CreateNotifyRobot(ctx context.Context, data *models2.NotifyRobot, s *dao.Session) error GetNotifyRobotByIDList(ctx context.Context, idList []int64) ([]*models2.NotifyRobot, error) UpdateNotifyRobotByid(ctx context.Context, id int64, data *models2.NotifyRobot, s *dao.Session, columns ...jet.Column) error ListNotifyRobot(ctx context.Context, page, perPage int32, query string) ([]*models2.NotifyRobot, int64, error) DeleteNotifyRobot(ctx context.Context, idList []int64, s *dao.Session) error }
type PluginsRepo ¶
type PluginsRepo interface { GetPluginsByID(ctx context.Context, id int64) (*models2.Plugins, error) CreatePlugins(ctx context.Context, data *models2.Plugins, s *dao.Session) error GetPluginsByIDList(ctx context.Context, idList []int64) ([]*models2.Plugins, error) UpdatePluginsByid(ctx context.Context, id int64, data *models2.Plugins, s *dao.Session, columns ...jet.Column) error ListPlugins(ctx context.Context, page, perPage int32, query string) ([]*models2.Plugins, int64, error) DeletePlugins(ctx context.Context, idList []int64, s *dao.Session) error }
type SessionRepo ¶
type SessionRepo interface { GetSessionByID(ctx context.Context, id int64) (*models2.Session, error) CreateSession(ctx context.Context, data *models2.Session, s *dao.Session) error GetSessionByIDList(ctx context.Context, idList []int64) ([]*models2.Session, error) UpdateSessionByid(ctx context.Context, id int64, data *models2.Session, s *dao.Session, columns ...jet.Column) error ListSession(ctx context.Context, page, perPage int32, query string) ([]*models2.Session, int64, error) DeleteSession(ctx context.Context, idList []int64, s *dao.Session) error GetSessionByName(ctx context.Context, sessionName string) (*models2.Session, error) }
type SystemNotifyMessageRepo ¶
type SystemNotifyMessageRepo interface { GetMessageBySessionID(ctx context.Context, sessionID, startPos, endPos int64) ([]*models2.SystemNotifyMessage, error) GetSystemNotifyMessageByID(ctx context.Context, id int64) (*models2.SystemNotifyMessage, error) CreateSystemNotifyMessage(ctx context.Context, data *models2.SystemNotifyMessage, s *dao.Session) error GetSystemNotifyMessageByIDList(ctx context.Context, idList []int64) ([]*models2.SystemNotifyMessage, error) UpdateSystemNotifyMessageByid(ctx context.Context, id int64, data *models2.SystemNotifyMessage, s *dao.Session, columns ...jet.Column) error ListSystemNotifyMessage(ctx context.Context, page, perPage int32, query string) ([]*models2.SystemNotifyMessage, int64, error) DeleteSystemNotifyMessage(ctx context.Context, idList []int64, s *dao.Session) error }
type UserRepo ¶
type UserRepo interface { // GetUserInfo Grpc GetUserInfo(userId int64) (any, error) // RegisterRobot Grpc 注册机器人 RegisterRobot(robot *models2.NotifyRobot) (int64, error) }
UserRepo @Author @Description //for user and robot @Date 17:15 2023/2/3
type UsersSessionRepo ¶
type UsersSessionRepo interface { GetUsersSessionByID(ctx context.Context, id int64) (*models2.UsersSession, error) GetUsersSessionByIDListNoCache(ctx context.Context, idList []int64, s *dao.Session) ([]*models2.UsersSession, error) CreateUsersSession(ctx context.Context, data []*models2.UsersSession, s *dao.Session) error UpdateUsersSessionByid(ctx context.Context, id int64, data *models2.UsersSession, s *dao.Session, columns ...jet.Column) error GetUsersSessionByIDList(ctx context.Context, idList []int64) ([]*models2.UsersSession, error) ListUsersSession(ctx context.Context, page, perPage int32, query string) ([]*models2.UsersSession, int64, error) DeleteUsersSession(ctx context.Context, idList []int64, s *dao.Session) error }
Click to show internal directories.
Click to hide internal directories.