notifySdk

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SEND_CHANNEL_QYWX  = "qywx"
	SEND_CHANNEL_SMS   = "sms"
	SEND_CHANNEL_EMAIL = "email"
	SEND_CHANNEL_WX    = "wx"
	SEND_CHANNEL_QQ    = "qq"
	SEND_CHANNEL_CALL  = "call"

	RECEIVER_TYPE_GROUP  = "group"
	RECEIVER_TYPE_PERSON = "person"
)

Variables

View Source
var GlobalInstance *notifyApi

Functions

func InitGlobal

func InitGlobal(notifyApiPath, key, id string) *notifyApi

func NewInstance

func NewInstance(notifyApiPath, key, id string) *notifyApi

func Send added in v0.0.4

func Send(sendReq *SendMessageRequestParams) error

Types

type BaseModel

type BaseModel struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type CallVoiceResponse

type CallVoiceResponse struct {
	BaseModel
	Data string `json:"data"`
}

type Receiver

type Receiver struct {
	Id           string `json:"id"`
	Name         string `json:"name"`
	QywxId       string `json:"qywxId"`
	Phone        string `json:"phone"`
	Email        string `json:"email"`
	WxId         string `json:"wxId"`
	WxGroupId    string `json:"wxGroupId"`
	QqGroupId    int64  `json:"qqGroupId"`
	QqFriendId   int64  `json:"qqFriendId"`
	ReceiverType string `json:"receiverType"` //group person ,default:person
	ReceiverName string `json:"receiverName"`
	ReceiverId   string `json:"receiverId"`
	SendChannel  string `json:"send_channel"` //qywx phone sms email wx qq call
}

type SendMessageRequestParams

type SendMessageRequestParams struct {
	TaskId      string            `json:"task_id"`
	SendChannel string            `json:"send_channel"` //qywx phone sms email wx qq call
	Receiver    []*Receiver       `json:"receiver"`
	TemplateId  string            `json:"template_id"`
	Text        string            `json:"text"`
	Params      map[string]string `json:"params"`
}

Jump to

Keyboard shortcuts

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