feat(checker): checker

This commit is contained in:
mei
2026-04-06 10:10:31 +08:00
parent 80e427d7c3
commit 189eab8a0a
13 changed files with 181 additions and 12 deletions
+12 -1
View File
@@ -9,7 +9,7 @@ import (
)
// 获取 Bilibili Client
func GetBiliClient(rule *model.Rule) (*bilibili.Client, error) {
func getBiliClient(rule *model.Rule) (*bilibili.Client, error) {
client := bilibili.New()
gormDB, err := db.GetGormDB()
if err != nil {
@@ -34,3 +34,14 @@ func GetBiliClient(rule *model.Rule) (*bilibili.Client, error) {
return client, nil
}
// 获取 Bilibili Dynamic Config
func getBiliDynamicConfig(rule *model.Rule) (*BiliDynamicConfig, error) {
var biliDynamicConfig BiliDynamicConfig
err := json.Unmarshal([]byte(rule.ConfigJson), &biliDynamicConfig)
if err != nil {
return nil, err
}
return &biliDynamicConfig, nil
}