Documentation ¶
Index ¶
- Constants
- func AddPluginOfEveryDay(ctx *robot.Ctx, jobTag string, matched []string, f func()) (*gocron.Job, error)
- func AddRemindForExpression(ctx *robot.Ctx, jobTag string, matched []string, f func()) (*gocron.Job, error)
- func AddRemindForInterval(ctx *robot.Ctx, jobTag string, matched []string, f func()) (*gocron.Job, error)
- func AddRemindForSpecifyTime(ctx *robot.Ctx, jobTag string, matched []string, f func()) (*gocron.Job, error)
- func AddRemindOfEveryDay(ctx *robot.Ctx, jobTag string, matched []string, f func()) (*gocron.Job, error)
- func AddRemindOfEveryMonth(ctx *robot.Ctx, jobTag string, matched []string, f func()) (*gocron.Job, error)
- func AddRemindOfEveryWeek(ctx *robot.Ctx, jobTag string, matched []string, f func()) (*gocron.Job, error)
- type Command
- type CronJob
- type MenuOptions
Constants ¶
View Source
const ( JobTypeRemind = "remind" // 提醒类任务 JobTypeFunc = "func" // 函数类任务 JobTypePlugin = "plugin" // 插件类任务 RegexOfRemindEveryMonth = `^设置每月(0?[1-9]|[12][0-9]|3[01])号(([01]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9])的提醒$` RegexOfRemindEveryWeek = `^设置每周(一|二|三|四|五|六|七|日)(([01]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9])的提醒$` RegexOfRemindEveryDay = `^设置每天(([01]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9])的提醒$` RegexOfRemindInterval = `^设置每隔(\d+)(s|秒|m|分|分钟|h|时|d|小时)的提醒$` RegexOfRemindSpecifyTime = `^设置((20[2-9][0-9]|2100)-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])\s([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9])的提醒$` RegexOfRemindExpression = `` /* 331-byte string literal not displayed */ RegexOfPluginEveryDay = `^设置每天(([01]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9])执行插件$` )
Variables ¶
This section is empty.
Functions ¶
func AddPluginOfEveryDay ¶
func AddPluginOfEveryDay(ctx *robot.Ctx, jobTag string, matched []string, f func()) (*gocron.Job, error)
AddPluginOfEveryDay 添加每天执行的插件
func AddRemindForExpression ¶
func AddRemindForExpression(ctx *robot.Ctx, jobTag string, matched []string, f func()) (*gocron.Job, error)
AddRemindForExpression 添加表达式提醒
func AddRemindForInterval ¶
func AddRemindForInterval(ctx *robot.Ctx, jobTag string, matched []string, f func()) (*gocron.Job, error)
AddRemindForInterval 添加间隔提醒
func AddRemindForSpecifyTime ¶
func AddRemindForSpecifyTime(ctx *robot.Ctx, jobTag string, matched []string, f func()) (*gocron.Job, error)
AddRemindForSpecifyTime 添加指定时间提醒
func AddRemindOfEveryDay ¶
func AddRemindOfEveryDay(ctx *robot.Ctx, jobTag string, matched []string, f func()) (*gocron.Job, error)
AddRemindOfEveryDay 添加每天提醒
Types ¶
type Command ¶ added in v1.0.3
type Command struct {
MenuMode string `gorm:"column:menu_mode;default:'1'"` // 菜单模式,默认模式一
}
type MenuOptions ¶
type MenuOptions struct { WxId string `json:"wxId"` Menus []struct { Name string `json:"name"` Alias string `json:"alias"` Priority uint64 `json:"priority"` Describe string `json:"describe"` DefStatus bool `json:"defStatus"` CurStatus bool `json:"curStatus"` } `json:"menus"` }
MenuOptions 菜单配置
Click to show internal directories.
Click to hide internal directories.