Files
open-im-server/pkg/common/db/controller/push.go
T

24 lines
506 B
Go
Raw Normal View History

2023-02-22 19:51:14 +08:00
package controller
import (
"context"
2023-06-19 13:02:49 +08:00
2023-03-16 10:46:06 +08:00
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache"
2023-02-22 19:51:14 +08:00
)
2023-03-01 15:32:26 +08:00
type PushDatabase interface {
2023-02-22 19:51:14 +08:00
DelFcmToken(ctx context.Context, userID string, platformID int) error
}
2023-03-01 15:32:26 +08:00
type pushDataBase struct {
2023-05-04 12:11:29 +08:00
cache cache.MsgModel
2023-02-22 19:51:14 +08:00
}
2023-05-04 12:11:29 +08:00
func NewPushDatabase(cache cache.MsgModel) PushDatabase {
2023-03-01 15:32:26 +08:00
return &pushDataBase{cache: cache}
}
func (p *pushDataBase) DelFcmToken(ctx context.Context, userID string, platformID int) error {
2023-02-22 19:51:14 +08:00
return p.cache.DelFcmToken(ctx, userID, platformID)
}