golang-im聊天
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

19 lines
638 B

  1. package proxy
  2. import (
  3. "context"
  4. "gim/pkg/pb"
  5. "time"
  6. "google.golang.org/protobuf/proto"
  7. )
  8. var MessageProxy messageProxy
  9. type messageProxy interface {
  10. SendToUser(ctx context.Context, sender *pb.Sender, toUserId int64, req *pb.SendMessageReq) (int64, error)
  11. RecallMessageSendToUser(ctx context.Context, sender *pb.Sender, toUserId int64, req *pb.RecallMessageReq, sendTime time.Time) (int64, error)
  12. SendRedPackageToUser(ctx context.Context, sender *pb.Sender, toUserId int64, req *pb.SendRedPacketReq) (int64, error)
  13. PushToUser(ctx context.Context, userId int64, code pb.PushCode, message proto.Message, isPersist bool) error
  14. }