mirror of
https://gitee.com/wanwujie/sub2api
synced 2026-04-09 01:24:46 +08: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
|
|
}
|