36 lines
850 B
Go
36 lines
850 B
Go
|
package redis
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"forge.cadoles.com/cadoles/bouncer/internal/queue"
|
||
|
"github.com/redis/go-redis/v9"
|
||
|
)
|
||
|
|
||
|
type Repository struct {
|
||
|
client redis.UniversalClient
|
||
|
}
|
||
|
|
||
|
// AddToQueue implements queue.Repository
|
||
|
func (*Repository) AddToQueue(ctx context.Context, queueName string, sessionId string) (uint, error) {
|
||
|
panic("unimplemented")
|
||
|
}
|
||
|
|
||
|
// IsInQueue implements queue.Repository
|
||
|
func (*Repository) IsInQueue(ctx context.Context, queueName string, sessionId string) (bool, uint, error) {
|
||
|
panic("unimplemented")
|
||
|
}
|
||
|
|
||
|
// RemoveFromQueue implements queue.Repository
|
||
|
func (*Repository) RemoveFromQueue(ctx context.Context, queueName string, sessionId string) error {
|
||
|
panic("unimplemented")
|
||
|
}
|
||
|
|
||
|
func NewRepository(client redis.UniversalClient) *Repository {
|
||
|
return &Repository{
|
||
|
client: client,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
var _ queue.Repository = &Repository{}
|