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.
Open-IM-Server/pkg/common/db/controller/push.go

29 lines
796 B

2 years ago
package controller
import (
2 years ago
"OpenIM/pkg/common/db/cache"
2 years ago
"OpenIM/pkg/proto/sdkws"
2 years ago
"context"
)
2 years ago
type PushDatabase interface {
2 years ago
DelFcmToken(ctx context.Context, userID string, platformID int) error
2 years ago
HandleSignalInvite(ctx context.Context, msg *sdkws.MsgData, pushToUserID string) (isSend bool, err error)
2 years ago
}
2 years ago
type pushDataBase struct {
2 years ago
cache cache.Cache
2 years ago
}
2 years ago
func NewPushDatabase(cache cache.Cache) PushDatabase {
return &pushDataBase{cache: cache}
}
func (p *pushDataBase) DelFcmToken(ctx context.Context, userID string, platformID int) error {
2 years ago
return p.cache.DelFcmToken(ctx, userID, platformID)
}
2 years ago
func (p *pushDataBase) HandleSignalInvite(ctx context.Context, msg *sdkws.MsgData, pushToUserID string) (isSend bool, err error) {
return p.cache.HandleSignalInvite(ctx, msg, pushToUserID)
}