sms

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler 短信服务处理

func New

func New() *Handler

New 实例短信服务

func (*Handler) Driver

func (h *Handler) Driver(driver string) *Handler

Driver 指定短信驱动服务

func (*Handler) Service

func (h *Handler) Service() (Service, error)

Service 实例短信服务

func (*Handler) Services

func (h *Handler) Services(services map[enums.SmsDriver]Service) *Handler

Services 注册短信服务

type Service

type Service interface {
	// Ctx 设置上下文
	Ctx(ctx context.Context)

	// Config 短信服务平台配置
	Config(config interface{}) error

	// Send 发送短信
	Send(mobile []string, params models.SendSmsInput) (*models.SendSmsResponse, error)

	// Apply 申请短信模板-添加和修改
	Apply(params models.AddSmsTemplateInput) (*models.AddSmsTemplateResponse, error)

	// Pull 查询拉取短信发送状态
	Pull(params models.PullSendStatusInput) ([]*models.PullSendResultItem, error)

	// List 获取短信列表
	List(params models.SmsTemplateListInput) (*models.SmsListResponse, error)
}

Service 短信服务接口列表

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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