mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-29 14:06:36 +08:00
1e19d8114a
- Split shared monolithic consts into bot, push, and errs with typed sentinel errors - Restructure model layer into distinct bot and push subdomains - Refactor DAO layer to enforce single-owner principle and remove cross-table raw SQL queries - Decompose 1150+ line service/push.go into push_channel, push_event, push_trigger, push_worker, and push_template - Clean up controller layer with generic request handlers and parameter validation in controller/base.go - Streamline plugin.go to core Cordis lifecycle orchestration and remove re-export bloat - Verify all unit tests, race tests, Cordis architecture rules, and Swagger generation pass cleanly
44 lines
976 B
Go
44 lines
976 B
Go
// Copyright 2026 Arctel.net
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package consts
|
|
|
|
// Push notification channel type constants.
|
|
const (
|
|
TypeCustom = "custom"
|
|
TypeEmail = "email"
|
|
TypeTelegram = "telegram"
|
|
ChannelCustom = "custom"
|
|
ChannelEmail = "email"
|
|
ChannelLark = "lark"
|
|
ChannelDingTalk = "dingtalk"
|
|
ChannelTelegram = "telegram"
|
|
ChannelBark = "bark"
|
|
ChannelDiscord = "discord"
|
|
ChannelSlack = "slack"
|
|
ChannelPushover = "pushover"
|
|
)
|
|
|
|
// Push message template and payload keys.
|
|
const (
|
|
DefaultLevelInfo = "INFO"
|
|
KeyTitle = "title"
|
|
KeyContent = "content"
|
|
KeyLevel = "level"
|
|
|
|
KeyURL = "url"
|
|
KeyToken = "token"
|
|
KeyOther = "other"
|
|
|
|
TypeText = "text"
|
|
TypePassword = "password"
|
|
TypeTextarea = "textarea"
|
|
)
|
|
|
|
// Push task identifier constants.
|
|
const (
|
|
TaskPushNotification = "msg_gateway:push_notification"
|
|
SendNotificationTask = "push:send"
|
|
TaskTypeSendNotification = "send_notification"
|
|
)
|