Documentation
¶
Overview ¶
Package serverchan 是 Server 酱出站通道。SendKey 以 sctp 开头的是 Server 酱³(https://<uid>.push.ft07.com/send/<key>.send), 其余按 Turbo 版(https://sctapi.ftqq.com/<key>.send);POST JSON {title, desp},返回 code 为 0 才算成功。
Index ¶
- Constants
- func Endpoint(sendKey string) (string, error)
- type Channel
- func (c *Channel) CheckConfig(conf *models.NotificationConf) error
- func (c *Channel) Close(context.Context) error
- func (c *Channel) Healthy() bool
- func (c *Channel) Init(_ context.Context, conf *models.NotificationConf) error
- func (c *Channel) OnInbound(notify.InboundHandler)
- func (c *Channel) Send(ctx context.Context, n notify.Notification) error
- func (c *Channel) SupportsInbound() bool
- func (c *Channel) Type() string
Constants ¶
View Source
const Type = "serverchan"
Type 是通道类型名。
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
Channel 是 Server 酱通道(只出站)。
func (*Channel) CheckConfig ¶
func (c *Channel) CheckConfig(conf *models.NotificationConf) error
CheckConfig 只检查配置、不发请求:保存配置前调用。
func (*Channel) SupportsInbound ¶
SupportsInbound 恒为 false。
Click to show internal directories.
Click to hide internal directories.