message

package
v0.0.0-...-49cc056 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeDefault = iota
	TypeRegister
	TypeLogin
	TypeModifyProfile
	TypeFindPwd
	TypeNotice
)
View Source
const ServiceSmsMessage = "pinecms.message.service.sms"

import (

"sync"

openapi "github.com/alibabacloud-go/darabonba-openapi/client"
dysmsapi20170525 "github.com/alibabacloud-go/dysmsapi-20170525/v2/client"
"github.com/alibabacloud-go/tea/tea"
"xorm.io/xorm"
"github.com/xiusin/pine/di"

)

Variables

View Source
var MessageServiceDict = map[string]string{
	ServiceNullMessage: "空短信",

	ServiceEmailMessage: "邮箱",
}
View Source
var ServiceEmailMessage = "pinecms.message.service.email"
View Source
var ServiceNullMessage = "pinecms.message.service.null"

Functions

This section is empty.

Types

type AbstractMessage

type AbstractMessage interface {
	Init() error
	Send(receiver []string, subject string, body string) error
	// receiver 接收人数组 params 模板内数据
	Notice(receiver []string, params []interface{}, templateId int) error
	// 更新单例配置
	UpdateCfg() error
}

AbstractMessage 发送接口

type EmailMessage

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

func (*EmailMessage) Init

func (n *EmailMessage) Init() error

func (*EmailMessage) Notice

func (n *EmailMessage) Notice(receiver []string, params []interface{}, templateId int) error

func (*EmailMessage) Send

func (n *EmailMessage) Send(receiver []string, subject string, body string) error

func (*EmailMessage) UpdateCfg

func (n *EmailMessage) UpdateCfg() error

type NullMessage

type NullMessage struct{}

func (NullMessage) Init

func (n NullMessage) Init() error

func (NullMessage) Notice

func (n NullMessage) Notice(receiver []string, params []interface{}, templateId int) error

func (NullMessage) Send

func (n NullMessage) Send(receiver []string, msg string, typo int) error

func (NullMessage) UpdateCfg

func (n NullMessage) UpdateCfg() error

Jump to

Keyboard shortcuts

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