chore(init): 初始化解忧商行项目并完成 Phase 0 基座

This commit is contained in:
yml2213
2026-10-30 11:46:10 +08:00
commit 8d9481c251
689 changed files with 138703 additions and 0 deletions
@@ -0,0 +1,23 @@
package push
import (
"context"
"errors"
)
var ErrProviderConfigInvalid = errors.New("push provider config invalid")
// Message 描述一条待发送的推送消息。
type Message struct {
Title string
Content string
}
// Provider 是站外推送渠道的统一接口。
// 实现方负责具体的 HTTP 调用(Bark、WPush 等)。
type Provider interface {
// Name 返回渠道标识,用于日志。
Name() string
// Send 发送一条推送消息。失败时返回 error。
Send(ctx context.Context, msg Message) error
}