ms-auth/internal/sessions/valkey_repository.go
Vyacheslav1557 93eaf89d78 refactor:
2024-10-09 22:07:38 +05:00

16 lines
536 B
Go

package sessions
import (
"context"
"git.sch9.ru/new_gate/ms-auth/internal/models"
)
type ValkeyRepository interface {
CreateSession(ctx context.Context, userId int32) error
ReadSessionByToken(ctx context.Context, token string) (*models.Session, error)
ReadSessionByUserId(ctx context.Context, userId int32) (*models.Session, error)
UpdateSession(ctx context.Context, session *models.Session) error
DeleteSessionByToken(ctx context.Context, token string) error
DeleteSessionByUserId(ctx context.Context, userId int32) error
}