mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-05-01 02:51:45 +00:00
14 lines
405 B
Go
14 lines
405 B
Go
package ports
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
)
|
|
|
|
// GatewayCache defines cache operations for gateway service
|
|
type GatewayCache interface {
|
|
GetSessionAccountID(ctx context.Context, sessionHash string) (int64, error)
|
|
SetSessionAccountID(ctx context.Context, sessionHash string, accountID int64, ttl time.Duration) error
|
|
RefreshSessionTTL(ctx context.Context, sessionHash string, ttl time.Duration) error
|
|
}
|