ms-auth/internal/sessions/valkey_repository.go

16 lines
536 B
Go
Raw Normal View History

2024-10-09 17:07:38 +00:00
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
}