message_push

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LiveStartTitle          = "开播通知"
	LiveEndTitle            = "下播通知"
	LiveStartNotifyTemplate = "你关注的主播 【 %s 】 开播啦!"
	LiveEndNotifyTemplate   = "你关注的主播 【 %s 】 已下播。"
)

Variables

This section is empty.

Functions

func LivePush

func LivePush(ctx context.Context, anchor string, isLiving bool)

func PushMessage

func PushMessage(ctx context.Context, mp *MessageModel) (err error)

func Register

func Register(channelType string, b Builder)

Types

type Builder

type Builder interface {
	Build(string) (MessagePush, error)
}

type MessageModel

type MessageModel struct {
	Title   string
	Content string
}

type MessagePush

type MessagePush interface {
	PushMessage(ctx context.Context, channel *model.PushChannel, mp *MessageModel) (err error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL