feat: 完成一般消息通知能力的开发
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package notice
|
||||
|
||||
type webhookRenderer struct{}
|
||||
|
||||
func (webhookRenderer) Capabilities() Capabilities {
|
||||
return Capabilities{Text: true, ColorText: true, Markdown: true, Card: true}
|
||||
}
|
||||
|
||||
func (webhookRenderer) Render(config Config, message Message) (renderedRequest, error) {
|
||||
return marshalRequest(config.Webhook, message)
|
||||
}
|
||||
|
||||
func (webhookRenderer) ValidateResponse(response networkResponse) error {
|
||||
return validateHTTP(ChannelWebhook, response)
|
||||
}
|
||||
Reference in New Issue
Block a user