sms

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSmsNotifier

func NewSmsNotifier(smsSvc Service) notify.Notifier[Sms]

Types

type Args

type Args struct {
	Val  string
	Name string
}

type Handler added in v0.1.19

type Handler struct {
	// contains filtered or unexported fields
}

Handler 实现了 notify.Handler 接口,封装了 SMS 的发送逻辑

func NewHandler added in v0.1.19

func NewHandler(svc Service) *Handler

NewHandler 创建一个新的 SMS 处理器

func (*Handler) Send added in v0.1.19

func (h *Handler) Send(ctx context.Context, msg *notify.Message) error

Send 发送统一消息

type Notifier

type Notifier struct {
	Service Service
}

func (*Notifier) Send

type Service

type Service interface {
	Send(ctx context.Context, tmpl string, args []Args, numbers ...string) error
}

type Sms

type Sms struct {
	// contains filtered or unexported fields
}

func NewSms

func NewSms(tmpl string, args []Args, numbers ...string) *Sms

func (*Sms) Message

func (s *Sms) Message() (Sms, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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