Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChinesePoetryTask ¶
type ChinesePoetryTask struct {
// contains filtered or unexported fields
}
func (*ChinesePoetryTask) Convert ¶
func (task *ChinesePoetryTask) Convert(body []byte) ([]string, error)
func (*ChinesePoetryTask) Fetch ¶
func (task *ChinesePoetryTask) Fetch() ([]byte, error)
Fetch request for chinese-poetry content, related document: https://www.jinrishici.com/doc/ .
func (*ChinesePoetryTask) Title ¶
func (task *ChinesePoetryTask) Title() string
func (*ChinesePoetryTask) Type ¶
func (task *ChinesePoetryTask) Type() string
type ExecShellTask ¶
type ExecShellTask struct {
// contains filtered or unexported fields
}
func (*ExecShellTask) Fetch ¶
func (task *ExecShellTask) Fetch() ([]byte, error)
func (*ExecShellTask) Title ¶
func (task *ExecShellTask) Title() string
func (*ExecShellTask) Type ¶
func (task *ExecShellTask) Type() string
type FetchTask ¶
type FetchTask interface { // Type return the fetch task type. Type() string // Title return the message title. Title() string // Fetch request something from internet. Fetch() ([]byte, error) // Convert convert response to message lines. Convert(body []byte) ([]string, error) }
func NewFetchTask ¶
type FetchTaskExecutor ¶
type FetchTaskExecutor struct { FetchTask FetchTask ChannelNames []string ChannelMap map[string]channel.WebhookChannel PainterMap map[string]map[string]render.Painter }
func (*FetchTaskExecutor) Run ¶
func (executor *FetchTaskExecutor) Run()
Run makes FetchTaskExecutor implements cron.Job.
type HealthCheckTask ¶
type HealthCheckTask struct {
// contains filtered or unexported fields
}
func (*HealthCheckTask) Convert ¶
func (task *HealthCheckTask) Convert(body []byte) ([]string, error)
func (*HealthCheckTask) Fetch ¶
func (task *HealthCheckTask) Fetch() ([]byte, error)
func (*HealthCheckTask) Title ¶
func (task *HealthCheckTask) Title() string
func (*HealthCheckTask) Type ¶
func (task *HealthCheckTask) Type() string
type PokemonWikiTask ¶
type PokemonWikiTask struct { }
func (*PokemonWikiTask) Convert ¶
func (task *PokemonWikiTask) Convert(body []byte) ([]string, error)
func (*PokemonWikiTask) Fetch ¶
func (task *PokemonWikiTask) Fetch() ([]byte, error)
func (*PokemonWikiTask) Title ¶
func (task *PokemonWikiTask) Title() string
func (*PokemonWikiTask) Type ¶
func (task *PokemonWikiTask) Type() string
type TodayInHistoryTask ¶
type TodayInHistoryTask struct {
// contains filtered or unexported fields
}
func (*TodayInHistoryTask) Convert ¶
func (task *TodayInHistoryTask) Convert(body []byte) ([]string, error)
func (*TodayInHistoryTask) Fetch ¶
func (task *TodayInHistoryTask) Fetch() ([]byte, error)
func (*TodayInHistoryTask) Title ¶
func (task *TodayInHistoryTask) Title() string
func (*TodayInHistoryTask) Type ¶
func (task *TodayInHistoryTask) Type() string
Click to show internal directories.
Click to hide internal directories.