mirror of
https://gitee.com/wanwujie/sub2api
synced 2026-04-16 04:44:45 +08:00
23 lines
898 B
Go
23 lines
898 B
Go
|
|
package service
|
|||
|
|
|
|||
|
|
import (
|
|||
|
|
"context"
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
// TempUnschedState 临时不可调度状态
|
|||
|
|
type TempUnschedState struct {
|
|||
|
|
UntilUnix int64 `json:"until_unix"` // 解除时间(Unix 时间戳)
|
|||
|
|
TriggeredAtUnix int64 `json:"triggered_at_unix"` // 触发时间(Unix 时间戳)
|
|||
|
|
StatusCode int `json:"status_code"` // 触发的错误码
|
|||
|
|
MatchedKeyword string `json:"matched_keyword"` // 匹配的关键词
|
|||
|
|
RuleIndex int `json:"rule_index"` // 触发的规则索引
|
|||
|
|
ErrorMessage string `json:"error_message"` // 错误消息
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// TempUnschedCache 临时不可调度缓存接口
|
|||
|
|
type TempUnschedCache interface {
|
|||
|
|
SetTempUnsched(ctx context.Context, accountID int64, state *TempUnschedState) error
|
|||
|
|
GetTempUnsched(ctx context.Context, accountID int64) (*TempUnschedState, error)
|
|||
|
|
DeleteTempUnsched(ctx context.Context, accountID int64) error
|
|||
|
|
}
|