_plugin

package
v0.0.0-...-e9843d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2026 License: GPL-3.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserGrowthTasksTaskSign uint32 = 1 << iota
	UserGrowthTasksTaskDaily
	UserGrowthTasksTaskIcon
	UserGrowthTasksTaskSpecial
	UserGrowthTasksTaskCustom
)
View Source
const AgainErrorId = "160002"
View Source
const IOSVersion = "18.1.1"
View Source
const StandardCronSignAgainLength = len(`a:2:{s:6:"lastdo";s:10:"2000-01-01";s:3:"num";i:0;}`)
View Source
const WenkuSemver = "9.1.40"

Variables

View Source
var DailyReportLock int32
View Source
var ForumLikePluginInfo = _function.VPtr(ForumLikePluginInfoType{
	PluginInfo{
		Name:              "kd_forum_like",
		PluginNameCN:      "批量关注贴吧",
		PluginNameCNShort: "批量关注",
		PluginNameFE:      "forum_like",
		Version:           "0.1",
		RandomDuration:    true,
		Test:              true,
		Options: map[string]string{
			"kd_forum_like_action_limit":         "50",
			"kd_forum_like_forum_limit_each_pid": "40",
			"kd_forum_like_cooldown_time_pid":    "900",
			"kd_forum_like_cooldown_time_fname":  "900",
		},
		SettingOptions: map[string]PluginSettingOption{
			"kd_forum_like_action_limit": {
				OptionName:   "kd_forum_like_action_limit",
				OptionNameCN: "每分钟最大执行数",
				Validate: &_function.OptionRule{
					Min: _function.VPtr(int64(0)),
				},
			},

			"kd_forum_like_forum_limit_each_pid": {
				OptionName:   "kd_forum_like_forum_limit_each_pid",
				OptionNameCN: "单个贴吧账号关注上限",
				Validate: &_function.OptionRule{
					Min: _function.VPtr(int64(0)),
				},
			},
			"kd_forum_like_cooldown_time_pid": {
				OptionName:   "kd_forum_like_cooldown_time_pid",
				OptionNameCN: "用户关注间隔 (s) +[0, 300)s",
				Validate: &_function.OptionRule{
					Min: _function.VPtr(int64(0)),
				},
			},
			"kd_forum_like_cooldown_time_fname": {
				OptionName:   "kd_forum_like_cooldown_time_fname",
				OptionNameCN: "贴吧关注间隔 (s)",
				Validate: &_function.OptionRule{
					Min: _function.VPtr(int64(0)),
				},
			},
		},
		Endpoints: []PluginEndpointStruct{
			{Method: http.MethodGet, Path: "switch", Function: PluginForumLikeGetSwitch},
			{Method: http.MethodPost, Path: "switch", Function: PluginForumLikeSwitch},
			{Method: http.MethodGet, Path: "settings", Function: PluginForumLikeForumConfig},

			{Method: http.MethodGet, Path: "list", Function: PluginForumLikeForumList},
			{Method: http.MethodGet, Path: "list/:pid", Function: PluginForumLikeForumList},
			{Method: http.MethodPut, Path: "list/:pid", Function: PluginForumLikeForumListAdd},
			{Method: http.MethodPost, Path: "list/:pid/clone/:source_pid/:source", Function: PluginForumLikeForumListClone},
			{Method: http.MethodDelete, Path: "list", Function: PluginForumLikeForumListDelete},
			{Method: http.MethodDelete, Path: "list/succeed", Function: PluginForumLikeForumListDeleteSucceed},
			{Method: http.MethodDelete, Path: "list/:pid", Function: PluginForumLikeForumListDelete},
			{Method: http.MethodDelete, Path: "list/:pid/succeed", Function: PluginForumLikeForumListDeleteSucceed},
			{Method: http.MethodDelete, Path: "list/:pid/:tid", Function: PluginForumLikeForumListDelete},
		},
	},
})
View Source
var ForumSupportList = []TypeForumSupportList{
	{
		Fid:   "280050",
		Nid:   2257282262,
		Name:  "最强王者",
		Tieba: "lol",
	},
	{
		Fid:   "11772",
		Nid:   1337628265,
		Name:  "路飞",
		Tieba: "海贼王",
	},
	{
		Fid:   "8230522",
		Nid:   1337623685,
		Name:  "贴吧用户_QRNVQaG",
		Tieba: "风暴英雄",
	},
	{
		Fid:   "10866131",
		Nid:   1866273558,
		Name:  "月老嘉哥",
		Tieba: "英三嘉哥",
	},
	{
		Fid:   "81570",
		Nid:   2257269894,
		Name:  "赛丽亚😇",
		Tieba: "地下城与勇士",
	},
	{
		Fid:   "401299",
		Nid:   1337623678,
		Name:  "戒色守望者",
		Tieba: "戒色",
	},
	{
		Fid:   "711567",
		Nid:   1337628263,
		Name:  "黄鱼哥",
		Tieba: "内涵",
	},
	{
		Fid:   "110019",
		Nid:   1337628266,
		Name:  "漩涡鸣人",
		Tieba: "火影忍者",
	},
	{
		Fid:   "43927",
		Nid:   2257275375,
		Name:  "剑侠客😇",
		Tieba: "梦幻西游",
	},
	{
		Fid:   "339",
		Nid:   2257275437,
		Name:  "江户川柯南😇",
		Tieba: "柯南",
	},
	{
		Fid:   "1701120",
		Nid:   2257275573,
		Name:  "陆逊😇",
		Tieba: "三国杀",
	},
	{
		Fid:   "30227",
		Nid:   1337623700,
		Name:  "灰原哀",
		Tieba: "灰原哀",
	},
	{
		Fid:   "2862817",
		Nid:   1337623686,
		Name:  "炉石旅店萌板娘",
		Tieba: "炉石传说",
	},
	{
		Fid:   "122873",
		Nid:   1337628268,
		Name:  "黑崎一护",
		Tieba: "死神",
	},
	{
		Fid:   "738100",
		Nid:   1337623692,
		Name:  "初音ミク",
		Tieba: "初音ミク",
	},
	{
		Fid:   "1627732",
		Nid:   2257275681,
		Name:  "圣堂刺客😇",
		Tieba: "dota2",
	},
	{
		Fid:   "13839385",
		Nid:   2257269364,
		Name:  "大喵😇",
		Tieba: "奇迹暖暖",
	},
	{
		Fid:   "1525417",
		Nid:   1337623679,
		Name:  "张起灵",
		Tieba: "盗墓笔记",
	},
	{
		Fid:   "667580",
		Nid:   1337623697,
		Name:  "坂田银时",
		Tieba: "银魂",
	},
	{
		Fid:   "1111175",
		Nid:   1337628284,
		Name:  "贴吧用户_QRNVGb3",
		Tieba: "黑丝",
	},
	{
		Fid:   "574961",
		Nid:   1337628277,
		Name:  "夏目贵志",
		Tieba: "夏目友人帐",
	},
	{
		Fid:   "2358322",
		Nid:   1337623698,
		Name:  "遮天叶凡",
		Tieba: "遮天",
	},
	{
		Fid:   "11760190",
		Nid:   2257282271,
		Name:  "宁海😇",
		Tieba: "战舰少女",
	},
	{
		Fid:   "5024455",
		Nid:   1337628281,
		Name:  "暖暖",
		Tieba: "暖暖环游世界",
	},
	{
		Fid:   "1089593",
		Nid:   1337623683,
		Name:  "荆天明",
		Tieba: "秦时明月",
	},
	{
		Fid:   "501133",
		Nid:   2257282249,
		Name:  "SerB😇",
		Tieba: "坦克世界",
	},
	{
		Fid:   "1786526",
		Nid:   1337628286,
		Name:  "高坂穗乃果",
		Tieba: "lovelive",
	},
	{
		Fid:   "47320",
		Nid:   1337623693,
		Name:  "沢田纲吉",
		Tieba: "家庭教师",
	},
	{
		Fid:   "15975428",
		Nid:   1337623688,
		Name:  "",
		Tieba: "大话西游手游",
	},
	{
		Fid:   "2432903",
		Nid:   2257269753,
		Name:  "天空之城TC😇",
		Tieba: "minecraft",
	},
	{
		Fid:   "1498934",
		Nid:   1337628261,
		Name:  "纳兹",
		Tieba: "妖精的尾巴",
	},
	{
		Fid:   "2941239",
		Nid:   2257269548,
		Name:  "洛天依😇",
		Tieba: "洛天依",
	},
	{
		Fid:   "27829",
		Nid:   2257269560,
		Name:  "桔梗😇",
		Tieba: "桔梗",
	},
	{
		Fid:   "16779",
		Nid:   1337623680,
		Name:  "素还真",
		Tieba: "霹雳",
	},
	{
		Fid:   "1564063",
		Nid:   2257275856,
		Name:  "御坂美琴",
		Tieba: "御坂美琴",
	},
	{
		Fid:   "551358",
		Nid:   2257275816,
		Name:  "saber",
		Tieba: "saber",
	},
	{
		Fid:   "185228",
		Nid:   2257269662,
		Name:  "龙马😇",
		Tieba: "网球王子",
	},
	{
		Fid:   "46797",
		Nid:   2257269533,
		Name:  "工藤新一",
		Tieba: "工藤新一",
	},
	{
		Fid:   "21473",
		Nid:   1337628276,
		Name:  "毛利兰",
		Tieba: "毛利兰",
	},
	{
		Fid:   "1299394",
		Nid:   1337623690,
		Name:  "吴邪",
		Tieba: "吴邪",
	},
	{
		Fid:   "1319679",
		Nid:   2257275577,
		Name:  "皮卡超人😇",
		Tieba: "部落战争",
	},
	{
		Fid:   "1321783",
		Nid:   2257275225,
		Name:  "夏尔😇",
		Tieba: "黑执事",
	},
	{
		Fid:   "5437659",
		Nid:   1337623684,
		Name:  "kiana",
		Tieba: "崩坏学园2",
	},
	{
		Fid:   "216681",
		Nid:   2257269425,
		Name:  "古河渚😇",
		Tieba: "clannad",
	},
	{
		Fid:   "9714340",
		Nid:   1337628279,
		Name:  "孟浩",
		Tieba: "我欲封天",
	},
	{
		Fid:   "78279",
		Nid:   1337623689,
		Name:  "伏见猿比古",
		Tieba: "k",
	},
	{
		Fid:   "14823520",
		Nid:   2257269780,
		Name:  "刀锋😇",
		Tieba: "cf手游",
	},
	{
		Fid:   "1866137",
		Nid:   2257269448,
		Name:  "鹿目圆香😇",
		Tieba: "魔法少女小圆",
	},
	{
		Fid:   "2099286",
		Nid:   2257269826,
		Name:  "夜刀神十香😇",
		Tieba: "datealive",
	},
	{
		Fid:   "1575589",
		Nid:   1337623701,
		Name:  "东方爱",
		Tieba: "浪漫传说",
	},
	{
		Fid:   "154782",
		Nid:   2257282283,
		Name:  "江户川哀😇",
		Tieba: "柯哀",
	},
	{
		Fid:   "4300",
		Nid:   2257282328,
		Name:  "奇犽·揍敌客😇",
		Tieba: "全职猎人",
	},
	{
		Fid:   "10254689",
		Nid:   2257269311,
		Name:  "绚濑绘里😇",
		Tieba: "lovelive国服",
	},
	{
		Fid:   "10631925",
		Nid:   2257275308,
		Name:  "温文儒雅阳光😇",
		Tieba: "炫舞时代",
	},
	{
		Fid:   "4295466",
		Nid:   1337623694,
		Name:  "柳鸣",
		Tieba: "魔天记",
	},
	{
		Fid:   "149985",
		Nid:   2257275387,
		Name:  "日向雏田😇",
		Tieba: "雏田",
	},
	{
		Fid:   "957111",
		Nid:   2257275941,
		Name:  "枫音",
		Tieba: "中萌",
	},
	{
		Fid:   "347203",
		Nid:   2257275921,
		Name:  "工藤兰😇",
		Tieba: "新兰",
	},
	{
		Fid:   "644596",
		Nid:   2257275770,
		Name:  "勒鲁什😇",
		Tieba: "叛逆的勒鲁什",
	},
	{
		Fid:   "701877",
		Nid:   2072780523,
		Name:  "如果爱粉红帖😇",
		Tieba: "如果爱",
	},
	{
		Fid:   "420456",
		Nid:   2257275411,
		Name:  "风铃😇",
		Tieba: "世萌",
	},
	{
		Fid:   "138887",
		Nid:   2257275510,
		Name:  "不二周助",
		Tieba: "不二周助",
	},
	{
		Fid:   "711389",
		Nid:   2257269774,
		Name:  "宇智波佐助😇",
		Tieba: "佐助",
	},
	{
		Fid:   "60129",
		Nid:   2257269964,
		Name:  "怪盗基德😇",
		Tieba: "怪盗基德",
	},
	{
		Fid:   "128494",
		Nid:   2257269820,
		Name:  "旗木卡卡西😇",
		Tieba: "卡卡西",
	},
	{
		Fid:   "1773771",
		Nid:   2257275519,
		Name:  "时崎狂三😇",
		Tieba: "时崎狂三",
	},
	{
		Fid:   "2812935",
		Nid:   1337623681,
		Name:  "金木研",
		Tieba: "东京食尸鬼",
	},
	{
		Fid:   "2297729",
		Nid:   2257275832,
		Name:  "小奏😇",
		Tieba: "立华奏",
	},
	{
		Fid:   "493375",
		Nid:   2257269969,
		Name:  "宇智波鼬",
		Tieba: "宇智波鼬",
	},
	{
		Fid:   "2757769",
		Nid:   2257275212,
		Name:  "闪光亚丝娜😇",
		Tieba: "亚丝娜",
	},
	{
		Fid:   "2515521",
		Nid:   2257269875,
		Name:  "利威尔阿克曼😇",
		Tieba: "利威尔",
	},
	{
		Fid:   "2966494",
		Nid:   2257275688,
		Name:  "神兽萌萌😇",
		Tieba: "炫舞2",
	},
	{
		Fid:   "1550649",
		Nid:   2257269996,
		Name:  "鲁鲁修😇",
		Tieba: "鲁鲁修",
	},
	{
		Fid:   "225307",
		Nid:   2257269677,
		Name:  "越前龙马😇",
		Tieba: "越前龙马",
	},
	{
		Fid:   "13913",
		Nid:   2257269464,
		Name:  "一露😇",
		Tieba: "一露",
	},
	{
		Fid:   "799600",
		Nid:   2257269684,
		Name:  "春野樱😇",
		Tieba: "春野樱",
	},
	{
		Fid:   "1308858",
		Nid:   1337628275,
		Name:  "盖聂",
		Tieba: "盖聂",
	},
	{
		Fid:   "4266803",
		Nid:   2257275502,
		Name:  "次元酱😇",
		Tieba: "二次元界",
	},
	{
		Fid:   "2083514",
		Nid:   2257269862,
		Name:  "秦时明月少司😇",
		Tieba: "少司命",
	},
	{
		Fid:   "2530050",
		Nid:   2257275916,
		Name:  "黄濑凉太😇",
		Tieba: "黄濑凉太",
	},
	{
		Fid:   "1278749",
		Nid:   2257275638,
		Name:  "C.C.😇",
		Tieba: "c.c.",
	},
	{
		Fid:   "11768634",
		Nid:   1337623691,
		Name:  "暴雨心奴",
		Tieba: "罪雨台",
	},
	{
		Fid:   "1446622",
		Nid:   2257275490,
		Name:  "卫庄😇",
		Tieba: "卫庄",
	},
	{
		Fid:   "683722",
		Nid:   1337623696,
		Name:  "雾岛董香",
		Tieba: "雾岛董香",
	},
	{
		Fid:   "1590884",
		Nid:   2257275344,
		Name:  "张良",
		Tieba: "秦时明月张良",
	},
	{
		Fid:   "2485436",
		Nid:   2257269581,
		Name:  "西木野真姬",
		Tieba: "西木野真姬",
	},
	{
		Fid:   "280289",
		Nid:   2257269626,
		Name:  "娜美😇",
		Tieba: "娜美",
	},
	{
		Fid:   "361521",
		Nid:   2257275803,
		Name:  "白凤😇",
		Tieba: "白凤",
	},
	{
		Fid:   "1310236",
		Nid:   2257269636,
		Name:  "端木蓉😇",
		Tieba: "端木蓉",
	},
	{
		Fid:   "2827493",
		Nid:   2257269567,
		Name:  "高渐离😇",
		Tieba: "秦时明月all高",
	},
	{
		Fid:   "2181095",
		Nid:   1337623682,
		Name:  "戒撸吧小管家",
		Tieba: "戒撸",
	},
}
View Source
var ForumSupportPluginInfo = _function.VPtr(ForumSupportPluginInfoType{
	PluginInfo{
		Name:              "ver4_rank",
		PluginNameCN:      "贴吧名人堂助攻",
		PluginNameCNShort: "名人堂",
		PluginNameFE:      "forum_support",
		Version:           "1.2",
		Options: map[string]string{
			"ver4_rank_daily":        "1",
			"ver4_rank_id":           "0",
			"ver4_rank_action_limit": "50",
		},
		SettingOptions: map[string]PluginSettingOption{
			"ver4_rank_action_limit": {
				OptionName:   "ver4_rank_action_limit",
				OptionNameCN: "每分钟最大执行数",
				Validate: &_function.OptionRule{
					Min: _function.VPtr(int64(0)),
				},
			},
		},
		Endpoints: []PluginEndpointStruct{
			{Method: http.MethodGet, Path: "switch", Function: PluginForumSupportGetSwitch},
			{Method: http.MethodPost, Path: "switch", Function: PluginForumSupportSwitch},
			{Method: http.MethodGet, Path: "list", Function: PluginForumSupportGetCharactersList},
			{Method: http.MethodGet, Path: "settings", Function: PluginForumSupportGetSettings},
			{Method: http.MethodPut, Path: "settings", Function: PluginForumSupportUpdateSettings},
		},
	},
})
View Source
var LoopBanPlugin = _function.VPtr(LoopBanPluginType{
	PluginInfo{
		Name:              "ver4_ban",
		PluginNameCN:      "循环封禁",
		PluginNameCNShort: "循环封禁",
		PluginNameFE:      "loop_ban",
		Version:           "1.4",
		Options: map[string]string{
			"ver4_ban_break_check":  "0",
			"ver4_ban_id":           "0",
			"ver4_ban_limit":        "5",
			"ver4_ban_action_limit": "50",
		},
		SettingOptions: map[string]PluginSettingOption{
			"ver4_ban_break_check": {
				OptionName:   "ver4_ban_break_check",
				OptionNameCN: "跳过吧务权限检查",
				Validate: &_function.OptionRule{
					Enum: []string{"0", "1"},
				},
			},
			"ver4_ban_limit": {
				OptionName:   "ver4_ban_limit",
				OptionNameCN: "可添加循环封禁账号上限",
				Validate: &_function.OptionRule{
					Min: _function.VPtr(int64(0)),
				},
			},
			"ver4_ban_action_limit": {
				OptionName:   "ver4_ban_action_limit",
				OptionNameCN: "每分钟最大执行数",
				Validate: &_function.OptionRule{
					Min: _function.VPtr(int64(0)),
				},
			},
		},
		Endpoints: []PluginEndpointStruct{
			{Method: http.MethodGet, Path: "switch", Function: PluginLoopBanGetSwitch},
			{Method: http.MethodPost, Path: "switch", Function: PluginLoopBanSwitch},
			{Method: http.MethodGet, Path: "reason", Function: PluginLoopBanGetReason},
			{Method: http.MethodPut, Path: "reason", Function: PluginLoopBanSetReason},
			{Method: http.MethodGet, Path: "list", Function: PluginLoopBanGetList},
			{Method: http.MethodPatch, Path: "list", Function: PluginLoopBanAddAccounts},
			{Method: http.MethodDelete, Path: "list/:id", Function: PluginLoopBanDelAccount},
			{Method: http.MethodPost, Path: "list/empty", Function: PluginLoopBanDelAllAccounts},
		},
	},
})
View Source
var LotteryPluginPlugin = _function.VPtr(LotteryPluginPluginType{
	PluginInfo{
		Name:              "ver4_lottery",
		PluginNameCN:      "知道商城抽奖",
		PluginNameCNShort: "知道商城",
		PluginNameFE:      "knows_lottery",
		Version:           "1.0",
		Options: map[string]string{
			"ver4_lottery_pid": "0",
			"ver4_lottery_day": "0",
		},
		Endpoints: []PluginEndpointStruct{
			{Method: http.MethodGet, Path: "switch", Function: PluginKnowsLotteryGetSwitch},
			{Method: http.MethodPost, Path: "switch", Function: PluginKnowsLotterySwitch},
			{Method: http.MethodGet, Path: "log", Function: PluginKnowsLotteryGetLogs},
		},
	},
})
View Source
var PluginList = make(PluginListType)
View Source
var PluginOptionValidatorMap = _function.NewKV[string, *_function.OptionRule]()
View Source
var RecheckInStatus struct {
	UnixTimestamp int64
	NowInterval   int
}
View Source
var RefreshTiebaListPlugin = _function.VPtr(RefreshTiebaListPluginType{
	PluginInfo{
		Name:              "ver4_ref",
		PluginNameCN:      "自动同步贴吧列表",
		PluginNameCNShort: "自动同步贴吧列表",
		PluginNameFE:      "",
		Version:           "1.1",
		Options: map[string]string{
			"ver4_ref_day":          "1",
			"ver4_ref_id":           "0",
			"ver4_ref_action_limit": "50",
			"ver4_ref_interval":     "240",
		},
		SettingOptions: map[string]PluginSettingOption{
			"ver4_ref_action_limit": {
				OptionName:   "ver4_ref_action_limit",
				OptionNameCN: "每分钟最大执行数",
				Validate: &_function.OptionRule{
					Min: _function.VPtr(int64(0)),
				},
			},
			"ver4_ref_interval": {
				OptionName:   "ver4_ref_interval",
				OptionNameCN: "每轮同步任务间隔(分钟)",
				Validate: &_function.OptionRule{
					Min: _function.VPtr(int64(1)),
				},
			},
		},
		Endpoints: []PluginEndpointStruct{

			{Method: http.MethodGet, Path: "status", Function: PluginRefreshTiebaListStatus},
		},
	},
})
View Source
var RenewManager = _function.VPtr(RenewManagerType{
	PluginInfo{
		Name:              "kd_renew_manager",
		PluginNameCN:      "吧主考核",
		PluginNameCNShort: "吧主考核",
		PluginNameFE:      "renew_manager",
		Version:           "0.2",
		Options: map[string]string{
			"kd_renew_manager_id":           "0",
			"kd_renew_manager_action_limit": "50",
		},
		SettingOptions: map[string]PluginSettingOption{
			"kd_renew_manager_action_limit": {
				OptionName:   "kd_renew_manager_action_limit",
				OptionNameCN: "每分钟最大执行数",
				Validate: &_function.OptionRule{
					Min: _function.VPtr(int64(0)),
				},
			},
		},
		Test: false,
		Endpoints: []PluginEndpointStruct{
			{Method: http.MethodGet, Path: "switch", Function: PluginRenewManagerGetSwitch},
			{Method: http.MethodPost, Path: "switch", Function: PluginRenewManagerSwitch},
			{Method: http.MethodGet, Path: "settings", Function: PluginRenewManagerGetSettings},
			{Method: http.MethodPost, Path: "settings", Function: PluginRenewManagerUpdateSettings},
			{Method: http.MethodGet, Path: "list", Function: PluginRenewManagerGetList},
			{Method: http.MethodPatch, Path: "list", Function: PluginRenewManagerAddAccount},
			{Method: http.MethodDelete, Path: "list/:id", Function: PluginRenewManagerDelAccount},
			{Method: http.MethodPost, Path: "list/empty", Function: PluginRenewManagerDelAllAccounts},
			{Method: http.MethodGet, Path: "check/:pid/status/:fname", Function: PluginRenewManagerPreCheckStatus},
		},
	},
})
View Source
var UserGrowthTasksBreakList = []string{"open_push_switch", "answer_question"}
View Source
var UserGrowthTasksExchangeFlowTaskIDs = []int{591, 563}
View Source
var UserGrowthTasksPlugin = _function.VPtr(UserGrowthTasksPluginType{
	PluginInfo{
		Name:              "kd_growth",
		PluginNameCN:      "用户成长任务",
		PluginNameCNShort: "成长任务",
		PluginNameFE:      "user_growth_tasks",
		Version:           "0.4",
		Options: map[string]string{
			"kd_growth_offset":       "0",
			"kd_growth_action_limit": "50",
		},
		SettingOptions: map[string]PluginSettingOption{
			"kd_growth_action_limit": {
				OptionName:   "kd_growth_action_limit",
				OptionNameCN: "每分钟最大执行数",
				Validate: &_function.OptionRule{
					Min: _function.VPtr(int64(0)),
				},
			},
		},
		Endpoints: []PluginEndpointStruct{
			{Method: http.MethodGet, Path: "settings", Function: PluginGrowthTasksGetSettings},
			{Method: http.MethodPut, Path: "settings", Function: PluginGrowthTasksSetSettings},
			{Method: http.MethodGet, Path: "list", Function: PluginGrowthTasksGetList},
			{Method: http.MethodPatch, Path: "list", Function: PluginGrowthTasksAddAccount},
			{Method: http.MethodDelete, Path: "list/:id", Function: PluginGrowthTasksDelAccount},
			{Method: http.MethodPost, Path: "list/empty", Function: PluginGrowthTasksDelAllAccounts},
			{Method: http.MethodGet, Path: "status/:pid", Function: PluginGrowthTasksGetTasksStatus},
		},
	},
})
View Source
var UserGrowthTasksPluginClientVersion = "22.4.1.0"
View Source
var UserGrowthTasksVIPRequiredActTypes = []string{"buy_member"}
View Source
var WenkuTasksPlugin = _function.VPtr(WenkuTasksPluginType{
	PluginInfo{
		Name:              "kd_wenku_tasks",
		PluginNameCN:      "文库任务",
		PluginNameCNShort: "文库任务",
		PluginNameFE:      "wenku_tasks",
		Version:           "0.1",
		Options: map[string]string{
			"kd_wenku_tasks_offset":     "0",
			"kd_wenku_tasks_vip_matrix": "0",

			"kd_wenku_tasks_action_limit": "50",
		},
		SettingOptions: map[string]PluginSettingOption{
			"kd_wenku_tasks_action_limit": {
				OptionName:   "kd_wenku_tasks_action_limit",
				OptionNameCN: "每分钟最大执行数",
				Validate: &_function.OptionRule{
					Min: _function.VPtr(int64(0)),
				},
			},
		},
		Endpoints: []PluginEndpointStruct{
			{Method: http.MethodGet, Path: "settings", Function: PluginWenkuTasksGetSettings},
			{Method: http.MethodPut, Path: "settings", Function: PluginWenkuTasksSetSettings},
			{Method: http.MethodGet, Path: "list", Function: PluginWenkuTasksGetList},
			{Method: http.MethodPatch, Path: "list", Function: PluginWenkuTasksAddAccount},
			{Method: http.MethodDelete, Path: "list/:id", Function: PluginWenkuTasksDelAccount},
			{Method: http.MethodPost, Path: "list/empty", Function: PluginWenkuTasksDelAllAccounts},
			{Method: http.MethodGet, Path: "status/:pid", Function: PluginWenkuTasksGetTasksStatus},
			{Method: http.MethodPost, Path: "claim/:pid", Function: PluginWenkuTasksClaim7DaySignVIP},
		},
	},
})
View Source
var WenkuUserAgent = "%E7%99%BE%E5%BA%A6%E6%96%87%E5%BA%93/" + WenkuSemver + ".5 CFNetwork/1568.200.51 Darwin/24.1.0"

Functions

func BatchPluginQuery

func BatchPluginQuery(originalQuery *gorm.DB, limit, rate int, selectedKeys []string, target any) error

func DailyReportAction

func DailyReportAction()

func DecryptTCData

func DecryptTCData() error

func DeleteAccount

func DeleteAccount(_type string, id int32, tx *gorm.DB) error

func DeletePluginInfo

func DeletePluginInfo(name string) error

func DoBatchCheckinAction

func DoBatchCheckinAction()

func DoCheckinAction

func DoCheckinAction()

func DoReCheckinAction

func DoReCheckinAction()

func Dosign

func Dosign(_ string, retry bool) (bool, error)

func EncryptTCData

func EncryptTCData() error

func GetLotteryToken

func GetLotteryToken(cookie *_type.TypeCookie) (string, error)

func GetMethodForumLike

func GetMethodForumLike(cookie *_type.TypeCookie, uid, fid int64, fname string) (any, error)

func InitPluginList

func InitPluginList()

func PluginForumLikeForumConfig

func PluginForumLikeForumConfig(c *echo.Context) error

func PluginForumLikeForumList

func PluginForumLikeForumList(c *echo.Context) error

func PluginForumLikeForumListAdd

func PluginForumLikeForumListAdd(c *echo.Context) error

func PluginForumLikeForumListClone

func PluginForumLikeForumListClone(c *echo.Context) error

func PluginForumLikeForumListDelete

func PluginForumLikeForumListDelete(c *echo.Context) error

func PluginForumLikeForumListDeleteSucceed

func PluginForumLikeForumListDeleteSucceed(c *echo.Context) error

func PluginForumLikeGetSwitch

func PluginForumLikeGetSwitch(c *echo.Context) error

func PluginForumLikeSwitch

func PluginForumLikeSwitch(c *echo.Context) error

func PluginForumSupportGetCharactersList

func PluginForumSupportGetCharactersList(c *echo.Context) error

endpoints

func PluginForumSupportGetSettings

func PluginForumSupportGetSettings(c *echo.Context) error

func PluginForumSupportGetSwitch

func PluginForumSupportGetSwitch(c *echo.Context) error

func PluginForumSupportSwitch

func PluginForumSupportSwitch(c *echo.Context) error

func PluginForumSupportUpdateSettings

func PluginForumSupportUpdateSettings(c *echo.Context) error

func PluginGrowthTasksAddAccount

func PluginGrowthTasksAddAccount(c *echo.Context) error

func PluginGrowthTasksDelAccount

func PluginGrowthTasksDelAccount(c *echo.Context) error

func PluginGrowthTasksDelAllAccounts

func PluginGrowthTasksDelAllAccounts(c *echo.Context) error

func PluginGrowthTasksGetList

func PluginGrowthTasksGetList(c *echo.Context) error

func PluginGrowthTasksGetSettings

func PluginGrowthTasksGetSettings(c *echo.Context) error

func PluginGrowthTasksGetTasksStatus

func PluginGrowthTasksGetTasksStatus(c *echo.Context) error

func PluginGrowthTasksSetSettings

func PluginGrowthTasksSetSettings(c *echo.Context) error

func PluginKnowsLotteryGetLogs

func PluginKnowsLotteryGetLogs(c *echo.Context) error

func PluginKnowsLotteryGetSwitch

func PluginKnowsLotteryGetSwitch(c *echo.Context) error

func PluginKnowsLotterySwitch

func PluginKnowsLotterySwitch(c *echo.Context) error

func PluginLoopBanAddAccounts

func PluginLoopBanAddAccounts(c *echo.Context) error

func PluginLoopBanDelAccount

func PluginLoopBanDelAccount(c *echo.Context) error

func PluginLoopBanDelAllAccounts

func PluginLoopBanDelAllAccounts(c *echo.Context) error

func PluginLoopBanGetList

func PluginLoopBanGetList(c *echo.Context) error

func PluginLoopBanGetReason

func PluginLoopBanGetReason(c *echo.Context) error

func PluginLoopBanGetSwitch

func PluginLoopBanGetSwitch(c *echo.Context) error

func PluginLoopBanSetReason

func PluginLoopBanSetReason(c *echo.Context) error

func PluginLoopBanSwitch

func PluginLoopBanSwitch(c *echo.Context) error

func PluginRefreshTiebaListStatus

func PluginRefreshTiebaListStatus(c *echo.Context) error

func PluginRenewManagerAddAccount

func PluginRenewManagerAddAccount(c *echo.Context) error

func PluginRenewManagerDelAccount

func PluginRenewManagerDelAccount(c *echo.Context) error

func PluginRenewManagerDelAllAccounts

func PluginRenewManagerDelAllAccounts(c *echo.Context) error

func PluginRenewManagerGetList

func PluginRenewManagerGetList(c *echo.Context) error

func PluginRenewManagerGetSettings

func PluginRenewManagerGetSettings(c *echo.Context) error

func PluginRenewManagerGetSwitch

func PluginRenewManagerGetSwitch(c *echo.Context) error

endpoint

func PluginRenewManagerPreCheckStatus

func PluginRenewManagerPreCheckStatus(c *echo.Context) error

func PluginRenewManagerSwitch

func PluginRenewManagerSwitch(c *echo.Context) error

func PluginRenewManagerUpdateSettings

func PluginRenewManagerUpdateSettings(c *echo.Context) error

func PluginWenkuTasksAddAccount

func PluginWenkuTasksAddAccount(c *echo.Context) error

func PluginWenkuTasksClaim7DaySignVIP

func PluginWenkuTasksClaim7DaySignVIP(c *echo.Context) error

func PluginWenkuTasksDelAccount

func PluginWenkuTasksDelAccount(c *echo.Context) error

func PluginWenkuTasksDelAllAccounts

func PluginWenkuTasksDelAllAccounts(c *echo.Context) error

func PluginWenkuTasksGetList

func PluginWenkuTasksGetList(c *echo.Context) error

func PluginWenkuTasksGetSettings

func PluginWenkuTasksGetSettings(c *echo.Context) error

endpoints

func PluginWenkuTasksGetTasksStatus

func PluginWenkuTasksGetTasksStatus(c *echo.Context) error

func PluginWenkuTasksSetSettings

func PluginWenkuTasksSetSettings(c *echo.Context) error

func PostNewPCBan

func PostNewPCBan(cookie *_type.TypeCookie, fid int32, portrait string, day int32, reason string) (*any, error)

func PushMessageTemplateDailyReport

func PushMessageTemplateDailyReport(username string, accountStatus []*AccountStatusStruct) _function.PushMessageTemplateStruct

func SetupSystem

func SetupSystem(dbExists, autoInstall bool, name, email, password string) bool

func UpdatePluginInfo

func UpdatePluginInfo(name string, version string, status bool, options string) error

Types

type AccountStatusStruct

type AccountStatusStruct struct {
	PID      int32  `json:"pid"`
	Name     string `json:"name"`
	Portrait string `json:"portrait"`
	IsLogout bool   `json:"is_logout"`
	_type.StatusStruct
}

func GetForumCheckInStatus

func GetForumCheckInStatus(uid []int32) ([]*AccountStatusStruct, error)

type BanAccountResponse

type BanAccountResponse struct {
	Un         string `json:"un,omitempty"`
	ServerTime string `json:"server_time,omitempty"`
	Time       int    `json:"time,omitempty"`
	Ctime      int    `json:"ctime,omitempty"`
	Logid      int    `json:"logid,omitempty"`
	ErrorCode  string `json:"error_code,omitempty"`
	ErrorMsg   string `json:"error_msg,omitempty"`
	Info       []any  `json:"info,omitempty"`
}

func PostClientBan

func PostClientBan(cookie *_type.TypeCookie, fid int32, portrait string, day int32, reason string) (*BanAccountResponse, error)

type ClaimWenku7DaySignVIPResponse

type ClaimWenku7DaySignVIPResponse struct {
	Status struct {
		Code int    `json:"code,omitempty"`
		Msg  string `json:"msg,omitempty"`
	} `json:"status,omitempty"`
	Data struct {
		IsForbiddenUser int `json:"isForbiddenUser,omitempty"`
		IsWin           int `json:"isWin,omitempty"`
		MyBean          int `json:"myBean,omitempty"`
		RemaiNum        int `json:"remaiNum,omitempty"`
		Prize           struct {
			Prizeid int    `json:"prizeid,omitempty"`
			Icon    string `json:"icon,omitempty"`
			Name    string `json:"name,omitempty"`
			Desc    string `json:"desc,omitempty"`
		} `json:"prize,omitempty"`
		Errstr string `json:"errstr,omitempty"`
	} `json:"data,omitempty"`
}

func ClaimWenku7DaySignVIP

func ClaimWenku7DaySignVIP(cookie *_type.TypeCookie) (*ClaimWenku7DaySignVIPResponse, error)

type CronSignAgainType

type CronSignAgainType struct {
	Num    int
	LastDo string
	// contains filtered or unexported fields
}

func (*CronSignAgainType) Decode

func (st *CronSignAgainType) Decode(str string) *CronSignAgainType

func (*CronSignAgainType) Encode

func (st *CronSignAgainType) Encode() string

type DailyReportStruct

type DailyReportStruct struct {
	UID  int32  `json:"uid"`
	Name string `json:"name"`

	GoDailyReport       string `json:"go_daily_report"`
	GoDailyReportStatus string `json:"go_daily_report_status"`
	GoMessageType       string `json:"go_message_type"`
}

type ForumLikePluginInfoType

type ForumLikePluginInfoType struct {
	PluginInfo
}

func (*ForumLikePluginInfoType) Action

func (pluginInfo *ForumLikePluginInfoType) Action()

func (*ForumLikePluginInfoType) Delete

func (pluginInfo *ForumLikePluginInfoType) Delete() error

func (*ForumLikePluginInfoType) ExportAccount

func (pluginInfo *ForumLikePluginInfoType) ExportAccount(uid int32, tx *gorm.DB) (map[string]any, error)

func (*ForumLikePluginInfoType) ImportAccount

func (pluginInfo *ForumLikePluginInfoType) ImportAccount(uid int32, pid map[int32]int32, data map[string]json.RawMessage, tx *gorm.DB) error

func (*ForumLikePluginInfoType) Install

func (pluginInfo *ForumLikePluginInfoType) Install() error

func (*ForumLikePluginInfoType) RemoveAccount

func (pluginInfo *ForumLikePluginInfoType) RemoveAccount(_type string, id int32, tx *gorm.DB) error

_type: `uid`, `pid`

func (*ForumLikePluginInfoType) Report

func (pluginInfo *ForumLikePluginInfoType) Report(int32, *gorm.DB) (string, error)

func (*ForumLikePluginInfoType) Reset

func (pluginInfo *ForumLikePluginInfoType) Reset(uid, pid, tid int32) error

func (*ForumLikePluginInfoType) Upgrade

func (pluginInfo *ForumLikePluginInfoType) Upgrade() error

type ForumSupportPluginInfoType

type ForumSupportPluginInfoType struct {
	PluginInfo
}

func (*ForumSupportPluginInfoType) Action

func (pluginInfo *ForumSupportPluginInfoType) Action()

func (*ForumSupportPluginInfoType) Delete

func (pluginInfo *ForumSupportPluginInfoType) Delete() error

func (*ForumSupportPluginInfoType) ExportAccount

func (pluginInfo *ForumSupportPluginInfoType) ExportAccount(uid int32, tx *gorm.DB) (map[string]any, error)

func (*ForumSupportPluginInfoType) ImportAccount

func (pluginInfo *ForumSupportPluginInfoType) ImportAccount(uid int32, pid map[int32]int32, data map[string]json.RawMessage, tx *gorm.DB) error

func (*ForumSupportPluginInfoType) Install

func (pluginInfo *ForumSupportPluginInfoType) Install() error

func (*ForumSupportPluginInfoType) RemoveAccount

func (pluginInfo *ForumSupportPluginInfoType) RemoveAccount(_type string, id int32, tx *gorm.DB) error

func (*ForumSupportPluginInfoType) Report

func (pluginInfo *ForumSupportPluginInfoType) Report(int32, *gorm.DB) (string, error)

func (*ForumSupportPluginInfoType) Reset

func (pluginInfo *ForumSupportPluginInfoType) Reset(uid, pid, tid int32) error

func (*ForumSupportPluginInfoType) Upgrade

func (pluginInfo *ForumSupportPluginInfoType) Upgrade() error

type GetLotteryResponse

type GetLotteryResponse struct {
	Errno int `json:"errno,omitempty"`
	Data  *struct {
		PrizeList []struct {
			GoodsName string `json:"goodsName,omitempty"`
		} `json:"prizeList,omitempty"`
	} `json:"data,omitempty"`
	Errmsg string `json:"errmsg,omitempty"`
}

func GetLottery

func GetLottery(cookie *_type.TypeCookie, token string) (*GetLotteryResponse, error)

type GetWenkuTaskListResponse

type GetWenkuTaskListResponse struct {
	Status struct {
		Code int    `json:"code,omitempty"`
		Msg  string `json:"msg,omitempty"`
	} `json:"status,omitempty"`
	Data struct {
		TaskList        []WenkuTaskList `json:"taskList,omitempty"`
		IsForbiddenUser int             `json:"isForbiddenUser,omitempty"`
		Errstr          string          `json:"errstr,omitempty"`
	} `json:"data,omitempty"`
}

func GetWenkuTaskList

func GetWenkuTaskList(cookie *_type.TypeCookie, _type string) (*GetWenkuTaskListResponse, error)

type: tasklist, signin

type LevelInfo

type LevelInfo struct {
	Level          int    `json:"level"`
	Name           string `json:"name"`
	GrowthValue    int    `json:"growth_value"`
	NextLevelValue int    `json:"next_level_value"`
	Status         int    `json:"status"`
	IsCurrent      int    `json:"is_current"`
}

type LoopBanPluginType

type LoopBanPluginType struct {
	PluginInfo
}

func (*LoopBanPluginType) Action

func (pluginInfo *LoopBanPluginType) Action()

func (*LoopBanPluginType) Delete

func (pluginInfo *LoopBanPluginType) Delete() error

func (*LoopBanPluginType) ExportAccount

func (pluginInfo *LoopBanPluginType) ExportAccount(uid int32, tx *gorm.DB) (map[string]any, error)

func (*LoopBanPluginType) ImportAccount

func (pluginInfo *LoopBanPluginType) ImportAccount(uid int32, pid map[int32]int32, data map[string]json.RawMessage, tx *gorm.DB) error

func (*LoopBanPluginType) Install

func (pluginInfo *LoopBanPluginType) Install() error

func (*LoopBanPluginType) RemoveAccount

func (pluginInfo *LoopBanPluginType) RemoveAccount(_type string, id int32, tx *gorm.DB) error

func (*LoopBanPluginType) Report

func (pluginInfo *LoopBanPluginType) Report(int32, *gorm.DB) (string, error)

func (*LoopBanPluginType) Reset

func (pluginInfo *LoopBanPluginType) Reset(uid, pid, tid int32) error

func (*LoopBanPluginType) Upgrade

func (pluginInfo *LoopBanPluginType) Upgrade() error

type LotteryPluginPluginType

type LotteryPluginPluginType struct {
	PluginInfo
}

func (*LotteryPluginPluginType) Action

func (pluginInfo *LotteryPluginPluginType) Action()

func (*LotteryPluginPluginType) Delete

func (pluginInfo *LotteryPluginPluginType) Delete() error

func (*LotteryPluginPluginType) ExportAccount

func (pluginInfo *LotteryPluginPluginType) ExportAccount(uid int32, tx *gorm.DB) (map[string]any, error)

func (*LotteryPluginPluginType) ImportAccount

func (pluginInfo *LotteryPluginPluginType) ImportAccount(uid int32, pid map[int32]int32, data map[string]json.RawMessage, tx *gorm.DB) error

func (*LotteryPluginPluginType) Install

func (pluginInfo *LotteryPluginPluginType) Install() error

func (*LotteryPluginPluginType) RemoveAccount

func (pluginInfo *LotteryPluginPluginType) RemoveAccount(_type string, id int32, tx *gorm.DB) error

func (*LotteryPluginPluginType) Report

func (pluginInfo *LotteryPluginPluginType) Report(int32, *gorm.DB) (string, error)

func (*LotteryPluginPluginType) Reset

func (pluginInfo *LotteryPluginPluginType) Reset(uid, pid, tid int32) error

func (*LotteryPluginPluginType) Upgrade

func (pluginInfo *LotteryPluginPluginType) Upgrade() error

type Plugin

type Plugin interface {
	PluginHooks
	PluginActionHooks
}

type PluginActionHooks

type PluginActionHooks interface {
	Install() error
	Action() //error
	Delete() error
	Upgrade() error
	RemoveAccount(string, int32, *gorm.DB) error
	ExportAccount(int32, *gorm.DB) (map[string]any, error)
	ImportAccount(int32, map[int32]int32, map[string]json.RawMessage, *gorm.DB) error

	// for future
	Report(int32, *gorm.DB) (string, error)
	Reset(int32, int32, int32) error
}

type PluginEndpointStruct

type PluginEndpointStruct struct {
	Method   string
	Path     string
	Function echo.HandlerFunc
}

type PluginForumLikeCloneBinding

type PluginForumLikeCloneBinding struct {
	Pid       uint64 `param:"pid"`
	SourcePid uint64 `param:"source_pid"`
	Source    string `param:"source"`
}

type PluginForumLikeForumListDeleteParams

type PluginForumLikeForumListDeleteParams struct {
	Pid uint64 `param:"pid"`
	Tid uint64 `param:"tid"`
}

type PluginForumLikeForumListDeleteSucceedParams

type PluginForumLikeForumListDeleteSucceedParams struct {
	Pid uint64 `param:"pid"`
}

type PluginForumLikeListBinding

type PluginForumLikeListBinding struct {
	Pid   uint64   `param:"pid"`
	Fname []string `form:"fname" json:"fname"`
}

type PluginHooks

type PluginHooks interface {
	GetInfo() *PluginInfo
	GetDBInfo() model.TcPlugin
	SetDBInfo(*model.TcPlugin) error
	Switch() bool
	GetSwitch() bool
	CheckActive() bool
	SetActive(bool) bool
	GetEndpoints() []PluginEndpointStruct
}

type PluginInfo

type PluginInfo struct {
	Name              string
	PluginNameCN      string `json:"plugin_name_cn"`
	PluginNameCNShort string `json:"plugin_name_cn_short"`
	PluginNameFE      string `json:"plugin_name_fe"`

	Version        string
	Options        map[string]string
	SettingOptions map[string]PluginSettingOption
	Info           model.TcPlugin
	Test           bool
	Endpoints      []PluginEndpointStruct

	// cron
	Active bool
	// CronJobID      string
	RandomDuration bool
	sync.Mutex
}

func (*PluginInfo) CheckActive

func (pluginInfo *PluginInfo) CheckActive() bool

func (*PluginInfo) GetDBInfo

func (pluginInfo *PluginInfo) GetDBInfo() model.TcPlugin

func (*PluginInfo) GetEndpoints

func (pluginInfo *PluginInfo) GetEndpoints() []PluginEndpointStruct

func (*PluginInfo) GetInfo

func (pluginInfo *PluginInfo) GetInfo() *PluginInfo

func (*PluginInfo) GetSwitch

func (pluginInfo *PluginInfo) GetSwitch() bool

func (*PluginInfo) SetActive

func (pluginInfo *PluginInfo) SetActive(v bool) bool

func (*PluginInfo) SetDBInfo

func (pluginInfo *PluginInfo) SetDBInfo(info *model.TcPlugin) error

func (*PluginInfo) Switch

func (pluginInfo *PluginInfo) Switch() bool

type PluginListType

type PluginListType map[string]Plugin

func (PluginListType) Register

func (list PluginListType) Register(plugin Plugin)

type PluginRenewManagerCancelTopResponse

type PluginRenewManagerCancelTopResponse struct {
	No      int `json:"no,omitempty"`
	ErrCode int `json:"err_code,omitempty"`
	Error   any `json:"error,omitempty"`
}

func PluginRenewManagerCancelTop

func PluginRenewManagerCancelTop(cookie *_type.TypeCookie, fname string, tid string) (*PluginRenewManagerCancelTopResponse, error)

type PluginRenewManagerGetThreadInfoResponse

type PluginRenewManagerGetThreadInfoResponse struct {
	No    int    `json:"no,omitempty"`
	Error string `json:"error,omitempty"`
	Data  struct {
		Forum struct {
			// ForumHelper struct {
			// 	Name      string `json:"name,omitempty"`
			// 	AvatarURL string `json:"avatar_url,omitempty"`
			// } `json:"forum_helper,omitempty"`
			// ForumAvatar string `json:"forum_avatar,omitempty"`
			ForumName string `json:"forum_name,omitempty"`
		} `json:"forum,omitempty"`
		ThreadInfo struct {
			ThreadID int64 `json:"thread_id,omitempty"`
			// PostID          int64  `json:"post_id,omitempty"`
			Title string `json:"title,omitempty"`
			// Content         string `json:"content,omitempty"`
			// PostCate        int    `json:"post_cate,omitempty"`
			// PostTag         int    `json:"post_tag,omitempty"`
			PostCreateTime string `json:"post_create_time,omitempty"`
		} `json:"thread_info,omitempty"`
		// Tbs      string `json:"tbs,omitempty"`
		UserInfo struct {
			UserName     string `json:"user_name,omitempty"`
			UserNick     string `json:"user_nick,omitempty"`
			ShowNickname string `json:"show_nickname,omitempty"`
			Portrait     string `json:"portrait,omitempty"`
		} `json:"user_info,omitempty"`
	} `json:"data,omitempty"`
}

func PluginRenewManagerGetThreadInfo

func PluginRenewManagerGetThreadInfo(cookie *_type.TypeCookie, tid int64, fid int64) (*PluginRenewManagerGetThreadInfoResponse, error)

type PluginRenewManagerUpdateSettingsResponseStruct

type PluginRenewManagerUpdateSettingsResponseStruct struct {
	ReportSwitch   bool `json:"report_switch"`
	ActionInterval int  `json:"action_interval"`
}

type PluginSettingOption

type PluginSettingOption struct {
	OptionName   string                `json:"option_name"`
	OptionNameCN string                `json:"option_name_cn"`
	Validate     *_function.OptionRule `json:"-"`
}

type PostForumLikeClientResponseStruct

type PostForumLikeClientResponseStruct struct {
	Info struct {
		CurScore     string `json:"cur_score"`
		LevelupScore string `json:"levelup_score"`
		IsLike       string `json:"is_like"`
		IsBlack      string `json:"is_black"`
		LikeNum      string `json:"like_num"`
		LevelId      string `json:"level_id"`
		LevelName    string `json:"level_name"`
		MemberSum    string `json:"member_sum"`
	} `json:"info"`
	UserPerm struct {
		LevelId   string `json:"level_id"`
		LevelName string `json:"level_name"`
	} `json:"user_perm"`
	Error struct {
		Errno   string `json:"errno"`
		Errmsg  string `json:"errmsg"`
		Usermsg string `json:"usermsg"`
	} `json:"error"`
	ErrorCode string `json:"error_code"`
	ErrorMsg  string `json:"error_msg"`
}

func PostForumLikeClient

func PostForumLikeClient(cookie *_type.TypeCookie, fid int64) (*PostForumLikeClientResponseStruct, error)

type RefreshTiebaListPluginType

type RefreshTiebaListPluginType struct {
	PluginInfo
}

func (*RefreshTiebaListPluginType) Action

func (pluginInfo *RefreshTiebaListPluginType) Action()

func (*RefreshTiebaListPluginType) Delete

func (pluginInfo *RefreshTiebaListPluginType) Delete() error

func (*RefreshTiebaListPluginType) ExportAccount

func (pluginInfo *RefreshTiebaListPluginType) ExportAccount(int32, *gorm.DB) (map[string]any, error)

func (*RefreshTiebaListPluginType) ImportAccount

func (pluginInfo *RefreshTiebaListPluginType) ImportAccount(int32, map[int32]int32, map[string]json.RawMessage, *gorm.DB) error

func (*RefreshTiebaListPluginType) Install

func (pluginInfo *RefreshTiebaListPluginType) Install() error

func (*RefreshTiebaListPluginType) RemoveAccount

func (pluginInfo *RefreshTiebaListPluginType) RemoveAccount(_type string, id int32, tx *gorm.DB) error

func (*RefreshTiebaListPluginType) Report

func (pluginInfo *RefreshTiebaListPluginType) Report(int32, *gorm.DB) (string, error)

func (*RefreshTiebaListPluginType) Reset

func (pluginInfo *RefreshTiebaListPluginType) Reset(int32, int32, int32) error

func (*RefreshTiebaListPluginType) Upgrade

func (pluginInfo *RefreshTiebaListPluginType) Upgrade() error

type RenewManagerType

type RenewManagerType struct {
	PluginInfo
}

func (*RenewManagerType) Action

func (pluginInfo *RenewManagerType) Action()

func (*RenewManagerType) Delete

func (pluginInfo *RenewManagerType) Delete() error

func (*RenewManagerType) ExportAccount

func (pluginInfo *RenewManagerType) ExportAccount(uid int32, tx *gorm.DB) (map[string]any, error)

func (*RenewManagerType) ImportAccount

func (pluginInfo *RenewManagerType) ImportAccount(uid int32, pid map[int32]int32, data map[string]json.RawMessage, tx *gorm.DB) error

func (*RenewManagerType) Install

func (pluginInfo *RenewManagerType) Install() error

func (*RenewManagerType) RemoveAccount

func (pluginInfo *RenewManagerType) RemoveAccount(_type string, id int32, tx *gorm.DB) error

func (*RenewManagerType) Report

func (pluginInfo *RenewManagerType) Report(uid int32, tx *gorm.DB) (string, error)

func (*RenewManagerType) Reset

func (pluginInfo *RenewManagerType) Reset(uid, pid, tid int32) error

func (*RenewManagerType) Upgrade

func (pluginInfo *RenewManagerType) Upgrade() error

type TypeForumSupportList

type TypeForumSupportList struct {
	Fid   string `json:"fid"`
	Nid   int64  `json:"nid"`
	Name  string `json:"name"`
	Tieba string `json:"tieba"`
}

type TypeForumSupportResponse

type TypeForumSupportResponse struct {
	No    int    `json:"no,omitempty"`
	Error string `json:"error,omitempty"`
}

func PostForumSupport

func PostForumSupport(cookie *_type.TypeCookie, fid int32, nid string) (*TypeForumSupportResponse, error)

type UpdateWenkuTaskResponse

type UpdateWenkuTaskResponse struct {
	Status struct {
		Code int    `json:"code,omitempty"`
		Msg  string `json:"msg,omitempty"`
	} `json:"status,omitempty"`
	Data struct {
		Task   WenkuTaskList `json:"task,omitempty"`
		Errstr string        `json:"errstr,omitempty"`
	} `json:"data,omitempty"`
}

func UpdateWenkuTask

func UpdateWenkuTask(cookie *_type.TypeCookie, taskID int, minVersion string, isClaim bool) (*UpdateWenkuTaskResponse, error)

isClaim = false -> do task

type UserGrowthTask

type UserGrowthTask struct {
	ID      int    `json:"id,omitempty"`
	Name    string `json:"name,omitempty"`
	ActType string `json:"act_type,omitempty"`
	URL     string `json:"url,omitempty"`
	Detail  string `json:"detail,omitempty"`
	Exp     int    `json:"exp,omitempty"`
	Current int    `json:"current,omitempty"`
	Total   int    `json:"total,omitempty"`
	//Status             int    `json:"status,omitempty"`
	SortStatus   int `json:"sort_status,omitempty"`
	CompleteTime int `json:"complete_time,omitempty"`
	StartTime    int `json:"start_time,omitempty"`
	ExpireTime   int `json:"expire_time,omitempty"`
	// MinLevel     int `json:"min_level,omitempty"`
	// TaskDoneNum  int   `json:"task_done_num,omitempty"`
	// TaskThreadID []any `json:"task_thread_id,omitempty"`
	// TargetKw           string `json:"target_kw,omitempty"`
	TargetScheme string `json:"target_scheme,omitempty"`
}

type UserGrowthTaskCollectStampResponse

type UserGrowthTaskCollectStampResponse struct {
	No    int    `json:"no,omitempty"`
	Error string `json:"error,omitempty"`
}

func PostCollectStamp

func PostCollectStamp(cookie *_type.TypeCookie, task_id int) (*UserGrowthTaskCollectStampResponse, error)

type UserGrowthTaskToSave

type UserGrowthTaskToSave struct {
	TaskID  int    `json:"task_id"`
	Name    string `json:"name"`
	ActType string `json:"act_type"`
	Status  int    `json:"status"`
	Msg     string `json:"msg"`
}

type UserGrowthTasksClientResponse

type UserGrowthTasksClientResponse struct {
	No    int    `json:"no,omitempty"`
	Error string `json:"error,omitempty"`
	Data  struct {
		Toast          json.RawMessage `json:"toast"` // they use PHP, so empty array `[]` means do nothing, an object and `success_task_ids` not empty means success
		SuccessTaskIds []int           `json:"success_task_ids"`
	} `json:"data"`
}

func PostUserGrowth

func PostUserGrowth(cookie *_type.TypeCookie, task string) (*UserGrowthTasksClientResponse, error)

func PostUserTask

func PostUserTask(cookie *_type.TypeCookie, task string, taskID int) (*UserGrowthTasksClientResponse, error)

share_thread page_sign

type UserGrowthTasksListResponse

type UserGrowthTasksListResponse struct {
	No    int    `json:"no,omitempty"`
	Error string `json:"error,omitempty"`
	Data  struct {
		User struct {
			UserID     int    `json:"user_id,omitempty"`
			Uname      string `json:"uname,omitempty"`
			Portrait   string `json:"portrait,omitempty"`
			IsTiebaVip bool   `json:"is_tieba_vip,omitempty"`
		} `json:"user,omitempty"`
		LevelInfo []LevelInfo `json:"level_info,omitempty"`
		Tmoney    struct {
			Current int `json:"current,omitempty"`
		} `json:"tmoney,omitempty"`
		TabList []struct {
			TabName      string `json:"tab_name,omitempty"`
			Name         string `json:"name,omitempty"`
			Text         string `json:"text,omitempty"`
			TaskTypeList []struct {
				TaskType string           `json:"task_type,omitempty"`
				TaskList []UserGrowthTask `json:"task_list,omitempty"`
			} `json:"task_type_list,omitempty"`
		} `json:"tab_list,omitempty"`
		Tbs string `json:"tbs,omitempty"`
	} `json:"data,omitempty"`
}

func GetUserGrowthTasksList

func GetUserGrowthTasksList(cookie *_type.TypeCookie) (*UserGrowthTasksListResponse, error)

{"no":110003,"error":"fail to call service","data":{}}

type UserGrowthTasksPluginType

type UserGrowthTasksPluginType struct {
	PluginInfo
}

func (*UserGrowthTasksPluginType) Action

func (pluginInfo *UserGrowthTasksPluginType) Action()

TODO redo growth tasks(?)

func (*UserGrowthTasksPluginType) Delete

func (pluginInfo *UserGrowthTasksPluginType) Delete() error

func (*UserGrowthTasksPluginType) ExportAccount

func (pluginInfo *UserGrowthTasksPluginType) ExportAccount(uid int32, tx *gorm.DB) (map[string]any, error)

func (*UserGrowthTasksPluginType) ImportAccount

func (pluginInfo *UserGrowthTasksPluginType) ImportAccount(uid int32, pid map[int32]int32, data map[string]json.RawMessage, tx *gorm.DB) error

func (*UserGrowthTasksPluginType) Install

func (pluginInfo *UserGrowthTasksPluginType) Install() error

func (*UserGrowthTasksPluginType) RemoveAccount

func (pluginInfo *UserGrowthTasksPluginType) RemoveAccount(_type string, id int32, tx *gorm.DB) error

func (*UserGrowthTasksPluginType) Report

func (pluginInfo *UserGrowthTasksPluginType) Report(int32, *gorm.DB) (string, error)

func (*UserGrowthTasksPluginType) Reset

func (pluginInfo *UserGrowthTasksPluginType) Reset(uid, pid, tid int32) error

func (*UserGrowthTasksPluginType) Upgrade

func (pluginInfo *UserGrowthTasksPluginType) Upgrade() error

type UserGrowthTasksUserTaskInfoWidgetResponse

type UserGrowthTasksUserTaskInfoWidgetResponse struct {
	Data struct {
		UserInfo struct {
			GrowthValue int `json:"growth_value"`
			TmoneyValue int `json:"tmoney_value"`
		} `json:"user_info"`
		IsLogin int `json:"is_login"`
	} `json:"data"`
	ErrorCode int    `json:"error_code"`
	ErrorMsg  string `json:"error_msg"`
	Time      int    `json:"time"`
}

func PostUserTaskInfoWidget

func PostUserTaskInfoWidget(cookie *_type.TypeCookie) (*UserGrowthTasksUserTaskInfoWidgetResponse, error)

error code = 0 is normal

type UserGrowthTasksWebResponse

type UserGrowthTasksWebResponse struct {
	No    int    `json:"no"`
	Error string `json:"error"`
}

type WenkuTaskList

type WenkuTaskList struct {
	TaskID   int    `json:"taskId,omitempty"`
	TaskName string `json:"taskName,omitempty"`
	// TaskDesc   string `json:"taskDesc,omitempty"`
	TaskStatus int `json:"taskStatus,omitempty"`
	// TaskIcon   string `json:"taskIcon,omitempty"`
	TaskEnd int `json:"taskEnd,omitempty"`
	// RewardNum  int    `json:"rewardNum,omitempty"`
	// RewardType int    `json:"rewardType,omitempty"`
	TaskExtra struct {
		// 	Rewards       []int `json:"rewards,omitempty"`
		SignDay       int `json:"signDay,omitempty"`
		IsFinishToday int `json:"isFinishToday,omitempty"`
	} `json:"taskExtra,omitempty"`
	// RewardIcon string `json:"rewardIcon,omitempty"`
	MinAppVer string `json:"minAppVer,omitempty"`
}

type WenkuTaskToSave

type WenkuTaskToSave struct {
	TaskName    string `json:"task_name"`
	TaskID      int    `json:"task_id"`
	TaskStatus  int    `json:"task_status"`
	Msg         string `json:"msg"`
	SignDay     int64  `json:"sign_day,omitempty"`
	ClaimStatus string `json:"claim_status,omitempty"`
}

type WenkuTasksPluginType

type WenkuTasksPluginType struct {
	PluginInfo
}

func (*WenkuTasksPluginType) Action

func (pluginInfo *WenkuTasksPluginType) Action()

func (*WenkuTasksPluginType) Delete

func (pluginInfo *WenkuTasksPluginType) Delete() error

func (*WenkuTasksPluginType) ExportAccount

func (pluginInfo *WenkuTasksPluginType) ExportAccount(uid int32, tx *gorm.DB) (map[string]any, error)

func (*WenkuTasksPluginType) ImportAccount

func (pluginInfo *WenkuTasksPluginType) ImportAccount(uid int32, pid map[int32]int32, data map[string]json.RawMessage, tx *gorm.DB) error

func (*WenkuTasksPluginType) Install

func (pluginInfo *WenkuTasksPluginType) Install() error

func (*WenkuTasksPluginType) RemoveAccount

func (pluginInfo *WenkuTasksPluginType) RemoveAccount(_type string, id int32, tx *gorm.DB) error

func (*WenkuTasksPluginType) Report

func (pluginInfo *WenkuTasksPluginType) Report(int32, *gorm.DB) (string, error)

func (*WenkuTasksPluginType) Reset

func (pluginInfo *WenkuTasksPluginType) Reset(uid, pid, tid int32) error

func (*WenkuTasksPluginType) Upgrade

func (pluginInfo *WenkuTasksPluginType) Upgrade() error

type WenkuTasksPluginVipMatrixIDSet

type WenkuTasksPluginVipMatrixIDSet struct {
	MatrixIDMap map[string][4]string
	WeekDayList map[string]struct{}
	LastDay     string
}

func (*WenkuTasksPluginVipMatrixIDSet) AddID

func (m *WenkuTasksPluginVipMatrixIDSet) AddID(id int32, uid string, day int64, autoBreak bool) error

!!! use this func for ONLY ONE UID !!!

func (*WenkuTasksPluginVipMatrixIDSet) Clean

func (m *WenkuTasksPluginVipMatrixIDSet) Clean()

func (*WenkuTasksPluginVipMatrixIDSet) DelID

!!! use this func for ONLY ONE UID !!!

func (*WenkuTasksPluginVipMatrixIDSet) Export

func (*WenkuTasksPluginVipMatrixIDSet) Import

func (m *WenkuTasksPluginVipMatrixIDSet) Import(str string, uid string) error

func (*WenkuTasksPluginVipMatrixIDSet) Init

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL