message-notify/publish/message_notify.php
2022-12-08 17:05:25 +08:00

57 lines
1.8 KiB
PHP

<?php
declare(strict_types=1);
use TmWms\MessageNotify\Channel\DingTalkChannel;
use TmWms\MessageNotify\Channel\FeiShuChannel;
use TmWms\MessageNotify\Channel\WechatChannel;
use TmWms\MessageNotify\Notify;
return [
'default' => env('NOTIFY_DEFAULT_CHANNEL', 'DingTalk'),
'channels' => [
// 钉钉群机器人
'DingTalk' => [
'default' => Notify::INFO,
'channel' => DingTalkChannel::class,
'pipeline' => [
// 业务信息告警群
Notify::INFO => [
'token' => env('NOTIFY_DINGTALK_TOKEN', ''),
'secret' => env('NOTIFY_DINGTALK_SECRET', ''),
'keyword' => env('NOTIFY_DINGTALK_KEYWORD', ['']),
],
// 错误信息告警群
Notify::ERROR => [
'token' => env('NOTIFY_DINGTALK_TOKEN', ''),
'secret' => env('NOTIFY_DINGTALK_SECRET', ''),
'keyword' => env('NOTIFY_DINGTALK_KEYWORD', []),
]
]
],
// 飞书群机器人
'Feishu' => [
'default' => Notify::INFO,
'channel' => FeiShuChannel::class,
'pipeline' => [
'info' => [
'token' => env('NOTIFY_FEISHU_TOKEN', ''),
'secret' => env('NOTIFY_FEISHU_SECRET', ''),
'keyword' => env('NOTIFY_FEISHU_KEYWORD'),
]
]
],
// 企业微信群机器人
'Wechat' => [
'default' => Notify::INFO,
'channel' => WechatChannel::class,
'pipeline' => [
'info' => [
'token' => env('NOTIFY_WECHAT_TOKEN'),
]
]
]
]
];