message

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package message is a simple package that provides a message interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTMLFormatter

func HTMLFormatter(format string, data any) (string, error)

func TextFormatter

func TextFormatter(format string, data any) (string, error)

Types

type Driver

type Driver interface {
	New() (Sender, error)
}

type Message

type Message interface {
	Message(MessageChannel) ([]byte, error)
}

type MessageChannel

type MessageChannel string

func (MessageChannel) Check

func (m MessageChannel) Check(channel MessageChannel) error

type Sender

type Sender interface {
	Send(ctx context.Context, message Message) error
}

func NewSender

func NewSender(driver Driver) (Sender, error)

Directories

Path Synopsis
Package email is a simple package that provides a email sender.
Package email is a simple package that provides a email sender.
dingtalk
Package dingtalk implements the dingtalk hook driver.
Package dingtalk implements the dingtalk hook driver.
feishu
Package feishu is a simple package that provides a feishu hook.
Package feishu is a simple package that provides a feishu hook.
other
Package other is a simple package that provides a other hook.
Package other is a simple package that provides a other hook.
wechat
Package wechat provides a set of message types for WeChat.
Package wechat provides a set of message types for WeChat.
sms
alicloud
Package alicloud implements the alicloud sms driver.
Package alicloud implements the alicloud sms driver.

Jump to

Keyboard shortcuts

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