isms

package
v0.22.6 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package isms include resources of ucloud isms product

See also

for detail.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateISMSSignatureRequest added in v0.21.16

type CreateISMSSignatureRequest struct {
	request.CommonBase

	// 签名的资质证明文件类型,需与签名类型保持一致,说明如下:0-三证合一/企业营业执照/组织机构代码证书/社会信用代码证书;1-应用商店后台开发者管理截图;2-备案服务商的备案成功截图(含域名,网站名称,备案号);3-公众号或小程序的管理界面截图;4-商标注册证书;5-组织机构代码证书、社会信用代码证书;
	CertificateType *int `required:"true"`

	// 短信签名申请原因
	Description *string `required:"true"`

	// 短信签名的资质证明文件,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB
	File *string `required:"true"`

	// 短信签名授权委托文件,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB;当您是代理并使用第三方的签名时(也即SigPurpose为1-他用),该项为必填项;
	ProxyFile *string `required:"false"`

	// 短信签名内容;长度为2-12个字符, 可包含中文、数字和符号;无需填写【】或[],系统会自动添加
	SigContent *string `required:"true"`

	// 签名用途,0-自用,1-他用;
	SigPurpose *int `required:"true"`

	// 签名类型,说明如下:0-公司或企业的全称或简称;1-App应用的全称或简称;2-工信部备案网站的全称或简称;3-公众号或小程序的全称或简称;4-商标名的全称或简称;5-政府/机关事业单位/其他单位的全称或简称;
	SigType *int `required:"true"`
}

CreateISMSSignatureRequest is request schema for CreateISMSSignature action

type CreateISMSSignatureResponse added in v0.21.16

type CreateISMSSignatureResponse struct {
	response.CommonBase

	// 返回状态码描述,如果操作成功,默认返回为空
	Message string

	// 短信签名ID
	SigId string
}

CreateISMSSignatureResponse is response schema for CreateISMSSignature action

type CreateISMSTemplateRequest added in v0.21.16

type CreateISMSTemplateRequest struct {
	request.CommonBase

	// 视频短信模板内容。json数组的字符串格式。如:[{name:"0.txt",type:"txt",content:"北京是一座美丽的城市,我爱北京!",index:0},{name:"1.jpg",type:"jpg",content:"jpg文件字节的base64编码字符串",index:1},{name:”2.mp4”,type:"mp4",content:"mp4文件字节的base64编码字符串",index:2}]。name: 文件名,name中不能出现中文,必须要带上和type相同的后缀;type:文件类型,不能为空,文本为txt,图片为jpg、gif或png,音频为mp3,视频为mp4;content:文件内容,由文本、图片、音频、视频组成,文本使用txt文件,图片使用 jpg、gif、png 格式,音频使用 mp3 格式,视频使用mp4(视频只允许一个),文本、图片、音频、视频文件合计大小不可超过2M;index: 在视频短信中的位置。从0开始。
	Content *string `required:"true"`

	// 视频短信签名
	MsgSignature *string `required:"true"`

	// 视频短信标题
	MsgTitle *string `required:"true"`

	// 【该字段已废弃,请谨慎使用】
	NetworkOperator *string `required:"false" deprecated:"true"`

	// 【该字段已废弃,请谨慎使用】
	Purpose *int `required:"false" deprecated:"true"`

	// 备注
	Remark *string `required:"true"`

	// 视频短信模板名称
	TemplateName *string `required:"true"`

	// 退订信息,如:“回T退订”
	UnsubscribeInfo *string `required:"true"`
}

CreateISMSTemplateRequest is request schema for CreateISMSTemplate action

type CreateISMSTemplateResponse added in v0.21.16

type CreateISMSTemplateResponse struct {
	response.CommonBase

	// API接口调用出错时表示错误信息
	Message string

	// 本次接口调用请求Id,用于问题排查。
	ReqUuid string

	// 申请的模板Id。
	TemplateId string
}

CreateISMSTemplateResponse is response schema for CreateISMSTemplate action

type DeleteISMSSignatureRequest added in v0.21.16

type DeleteISMSSignatureRequest struct {
	request.CommonBase

	// 签名ID,支持以数组的方式,举例,以SigIds.0、SigIds.1...SigIds.N方式传入
	SigIds []string `required:"true"`
}

DeleteISMSSignatureRequest is request schema for DeleteISMSSignature action

type DeleteISMSSignatureResponse added in v0.21.16

type DeleteISMSSignatureResponse struct {
	response.CommonBase

	// 返回状态码描述,如果操作成功,默认返回为空
	Message string
}

DeleteISMSSignatureResponse is response schema for DeleteISMSSignature action

type DeleteISMSTemplateRequest added in v0.21.16

type DeleteISMSTemplateRequest struct {
	request.CommonBase

	// 模板ID,支持以数组的方式,举例,以TemplateIds.0、TemplateIds.1...TemplateIds.N方式传入
	TemplateIds []string `required:"true"`
}

DeleteISMSTemplateRequest is request schema for DeleteISMSTemplate action

type DeleteISMSTemplateResponse added in v0.21.16

type DeleteISMSTemplateResponse struct {
	response.CommonBase

	// 返回状态码描述,如果操作成功,默认返回为空
	Message string
}

DeleteISMSTemplateResponse is response schema for DeleteISMSTemplate action

type GetISMSSendReceiptRequest

type GetISMSSendReceiptRequest struct {
	request.CommonBase

	// 发送记录TaskId集合。调用SendUSMSVideoMessage时返回的TaskId的集合。以TaskIdSet.0、TaskIdSet.1...TaskIdSet.N的形式传入。每次请求最多支持100个
	TaskIdSet []string `required:"true"`
}

GetISMSSendReceiptRequest is request schema for GetISMSSendReceipt action

type GetISMSSendReceiptResponse

type GetISMSSendReceiptResponse struct {
	response.CommonBase

	// 本次请求结果
	Data []ReceiptPerTask

	// 错误信息
	Message string

	// 本次请求uuid
	ReqUuid string
}

GetISMSSendReceiptResponse is response schema for GetISMSSendReceipt action

type ISMSClient

type ISMSClient struct {
	*ucloud.Client
}

ISMSClient is the client of ISMS

func NewClient

func NewClient(config *ucloud.Config, credential *auth.Credential) *ISMSClient

NewClient will return a instance of ISMSClient

func (*ISMSClient) CreateISMSSignature added in v0.21.16

API: CreateISMSSignature

调用接口CreateISMSSignature申请视频短信签名

func (*ISMSClient) CreateISMSTemplate added in v0.21.16

func (c *ISMSClient) CreateISMSTemplate(req *CreateISMSTemplateRequest) (*CreateISMSTemplateResponse, error)

API: CreateISMSTemplate

申请视频短信模板

func (*ISMSClient) DeleteISMSSignature added in v0.21.16

API: DeleteISMSSignature

调用接口DeleteISMSSignature删除视频短信签名

func (*ISMSClient) DeleteISMSTemplate added in v0.21.16

func (c *ISMSClient) DeleteISMSTemplate(req *DeleteISMSTemplateRequest) (*DeleteISMSTemplateResponse, error)

API: DeleteISMSTemplate

调用接口DeleteISMSTemplate删除视频短信模板

func (*ISMSClient) GetISMSSendReceipt

func (c *ISMSClient) GetISMSSendReceipt(req *GetISMSSendReceiptRequest) (*GetISMSSendReceiptResponse, error)

API: GetISMSSendReceipt

获取视频短信发送记录的状态回执

func (*ISMSClient) NewCreateISMSSignatureRequest added in v0.21.16

func (c *ISMSClient) NewCreateISMSSignatureRequest() *CreateISMSSignatureRequest

NewCreateISMSSignatureRequest will create request of CreateISMSSignature action.

func (*ISMSClient) NewCreateISMSTemplateRequest added in v0.21.16

func (c *ISMSClient) NewCreateISMSTemplateRequest() *CreateISMSTemplateRequest

NewCreateISMSTemplateRequest will create request of CreateISMSTemplate action.

func (*ISMSClient) NewDeleteISMSSignatureRequest added in v0.21.16

func (c *ISMSClient) NewDeleteISMSSignatureRequest() *DeleteISMSSignatureRequest

NewDeleteISMSSignatureRequest will create request of DeleteISMSSignature action.

func (*ISMSClient) NewDeleteISMSTemplateRequest added in v0.21.16

func (c *ISMSClient) NewDeleteISMSTemplateRequest() *DeleteISMSTemplateRequest

NewDeleteISMSTemplateRequest will create request of DeleteISMSTemplate action.

func (*ISMSClient) NewGetISMSSendReceiptRequest

func (c *ISMSClient) NewGetISMSSendReceiptRequest() *GetISMSSendReceiptRequest

NewGetISMSSendReceiptRequest will create request of GetISMSSendReceipt action.

func (*ISMSClient) NewQueryISMSSignatureRequest added in v0.21.16

func (c *ISMSClient) NewQueryISMSSignatureRequest() *QueryISMSSignatureRequest

NewQueryISMSSignatureRequest will create request of QueryISMSSignature action.

func (*ISMSClient) NewQueryISMSTemplateRequest added in v0.21.16

func (c *ISMSClient) NewQueryISMSTemplateRequest() *QueryISMSTemplateRequest

NewQueryISMSTemplateRequest will create request of QueryISMSTemplate action.

func (*ISMSClient) NewSendISMSMessageRequest

func (c *ISMSClient) NewSendISMSMessageRequest() *SendISMSMessageRequest

NewSendISMSMessageRequest will create request of SendISMSMessage action.

func (*ISMSClient) NewUpdateISMSSignatureRequest added in v0.21.16

func (c *ISMSClient) NewUpdateISMSSignatureRequest() *UpdateISMSSignatureRequest

NewUpdateISMSSignatureRequest will create request of UpdateISMSSignature action.

func (*ISMSClient) QueryISMSSignature added in v0.21.16

func (c *ISMSClient) QueryISMSSignature(req *QueryISMSSignatureRequest) (*QueryISMSSignatureResponse, error)

API: QueryISMSSignature

调用接口QueryISMSSignature查询视频短信签名申请状态

func (*ISMSClient) QueryISMSTemplate added in v0.21.16

func (c *ISMSClient) QueryISMSTemplate(req *QueryISMSTemplateRequest) (*QueryISMSTemplateResponse, error)

API: QueryISMSTemplate

查询模板状态信息

func (*ISMSClient) SendISMSMessage

func (c *ISMSClient) SendISMSMessage(req *SendISMSMessageRequest) (*SendISMSMessageResponse, error)

API: SendISMSMessage

发送视频短信

func (*ISMSClient) UpdateISMSSignature added in v0.21.16

API: UpdateISMSSignature

调用接口UpdateISMSSignature修改未通过审核的视频短信签名,并重新提交审核

type OutSignature added in v0.21.16

type OutSignature struct {

	// 短信签名未通过审核原因
	ErrDesc string

	// 短信签名内容
	SigContent string

	// 短信签名ID
	SigId string

	// 签名状态,0-待审核 1-审核中 2-审核通过 3-审核未通过 4-被禁用
	Status int
}

OutSignature - 短信签名

type OutTemplate added in v0.21.16

type OutTemplate struct {

	// 创建时间,时间戳格式1629357838
	CreateTime int

	// 截止有效时间,时间戳格式1629357838
	ExpireTime int

	// 视频短信类型(3-会员营销)
	Purpose int

	// 备注信息
	Remark string

	// 状态描述。json格式,给出运营商维度的审核状态信息,示例:{"telecom_status":2,"telecom_desc":"审核通过","unicom_status":2,"unicom_desc":"审核通过","mobile_status":2,"mobile_desc":"审核通过"}。状态枚举值:0-创建模板时未向该运营商报备  1->审核中  2->审核通过   3->审核未通过   4->禁用   7->过期   11->待审核
	StatusDesc string

	// 模板ID
	TemplateId string

	// 模板名称
	TemplateName string
}

OutTemplate - 模板状态

type QueryISMSSignatureRequest added in v0.21.16

type QueryISMSSignatureRequest struct {
	request.CommonBase

	// 签名内容;签名ID和签名至少需填写1项;
	SigContent *string `required:"false"`

	// 已申请的短信签名ID(短信签名申请时的工单ID);签名ID和签名至少需填写1项;
	SigId *string `required:"true"`
}

QueryISMSSignatureRequest is request schema for QueryISMSSignature action

type QueryISMSSignatureResponse added in v0.21.16

type QueryISMSSignatureResponse struct {
	response.CommonBase

	// 签名信息,各字段说明详见OutSignature
	Data OutSignature

	// 发生错误时,表示具体错误描述
	Message string
}

QueryISMSSignatureResponse is response schema for QueryISMSSignature action

type QueryISMSTemplateRequest added in v0.21.16

type QueryISMSTemplateRequest struct {
	request.CommonBase

	// 模板Id
	TemplateId *string `required:"true"`
}

QueryISMSTemplateRequest is request schema for QueryISMSTemplate action

type QueryISMSTemplateResponse added in v0.21.16

type QueryISMSTemplateResponse struct {
	response.CommonBase

	// 模板状态信息
	Data OutTemplate

	// 错误信息
	Message string

	// 本次请求uuid
	ReqUuid string
}

QueryISMSTemplateResponse is response schema for QueryISMSTemplate action

type ReceiptPerPhone

type ReceiptPerPhone struct {

	// 手机号码
	Phone string

	// 回执码
	ReceiptCode string

	// 回执结果描述
	ReceiptDesc string

	// 回执结果(发送成功、发送失败、状态未知)
	ReceiptResult string

	// 回执返回时间
	ReceiptTime int

	// SessionId
	SessionId string
}

ReceiptPerPhone - 每个目的手机号的发送回执信息

type ReceiptPerTask

type ReceiptPerTask struct {

	// 每个手机号的短信回执信息集合
	ReceiptSet []ReceiptPerPhone

	// 发送短信时返回的TaskId
	TaskId string
}

ReceiptPerTask - 每个提交任务的视频短信的回执结果集合

type SendISMSMessageRequest

type SendISMSMessageRequest struct {
	request.CommonBase

	// 手机号码列表。暂时只支持中国大陆号码。若号码中带区号,需要将区号使用小括号包含,放在号码前面。如: (86)1851623xxxx
	PhoneSet []string `required:"true"`

	// 视频短信模板Id
	TemplateId *string `required:"true"`
}

SendISMSMessageRequest is request schema for SendISMSMessage action

type SendISMSMessageResponse

type SendISMSMessageResponse struct {
	response.CommonBase

	// 错误信息
	Message string

	// 本次请求uuid
	ReqUuid string

	// 本次调用TaskId,使用该字段查询回执信息
	TaskId string
}

SendISMSMessageResponse is response schema for SendISMSMessage action

type UpdateISMSSignatureRequest added in v0.21.16

type UpdateISMSSignatureRequest struct {
	request.CommonBase

	// 签名的资质证明文件类型,需与签名类型保持一致,说明如下:0-三证合一/企业营业执照/组织机构代码证书/社会信用代码证书;1-应用商店后台开发者管理截图;2-备案服务商的备案成功截图(含域名,网站名称,备案号);3-公众号或小程序的管理界面截图;4-商标注册证书;5-组织机构代码证书、社会信用代码证书;
	CertificateType *int `required:"false"`

	// 短信签名的资质证明文件URL,若未更改审核材料,则该处使用已上传审核材料的URL链接,否则使用File参数
	Document *string `required:"false"`

	// 短信签名的资质证明文件内容,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB。内容格式如下: [file type];[code type],[base64]  如:image/jpeg;base64,5YaF5a65
	File *string `required:"false"`

	// 短信签名授权委托文件URL,若未更改授权委托文件,则该处填写已上传的授权委托文件的URL链接,否则使用ProxyFile参数
	ProxyDoc *string `required:"false"`

	// 短信签名授权委托文件内容,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB;当您是代理并使用第三方的签名时(也即SigPurpose为1-他用),该项为必填项;格式和File类似。
	ProxyFile *string `required:"false"`

	// 新的短信签名内容;长度为2-12个字符, 可包含中文、数字和符号;无需填写【】或[],系统会自动添加
	SigContent *string `required:"true"`

	// 签名ID,支持以数组的方式,举例,以SigIds.0、SigIds.1...SigIds.N方式传入
	SigId *string `required:"true"`

	// 签名用途,0-自用,1-他用;
	SigPurpose *int `required:"true"`

	// 签名类型,说明如下:0-公司或企业的全称或简称;1-App应用的全称或简称;2-工信部备案网站的全称或简称;3-公众号或小程序的全称或简称;4-商标名的全称或简称;5-政府/机关事业单位/其他单位的全称或简称;
	SigType *int `required:"true"`
}

UpdateISMSSignatureRequest is request schema for UpdateISMSSignature action

type UpdateISMSSignatureResponse added in v0.21.16

type UpdateISMSSignatureResponse struct {
	response.CommonBase

	// 返回状态码描述,如果操作成功,默认返回为空
	Message string
}

UpdateISMSSignatureResponse is response schema for UpdateISMSSignature action

Jump to

Keyboard shortcuts

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