16 lines
536 B
Go
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
|
|
}
|