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

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