Documentation ¶
Index ¶
- Constants
- Variables
- type ApplySmsTemplateRequest
- type ApplySmsTemplateResponse
- type Area
- type CheckSmsVerifyCodeRequest
- type CheckSmsVerifyCodeResponse
- type ConversionRequest
- type ConversionResponse
- type DeleteSmsTemplateRequest
- type DeleteSmsTemplateResponse
- type GetSmsTemplateAndOrderListRequest
- type GetSmsTemplateAndOrderListResponse
- type GetSubAccountDetailRequest
- type GetSubAccountDetailResponse
- type GetSubAccountListRequest
- type GetSubAccountListResponse
- type InsertSmsSubAccountReq
- type InsertSmsSubAccountResponse
- type SMS
- func (p *SMS) ApplySmsTemplate(req *ApplySmsTemplateRequest) (*ApplySmsTemplateResponse, int, error)
- func (p *SMS) BatchSend(req *SmsBatchRequest) (*SmsResponse, int, error)
- func (p *SMS) CheckVerifyCode(req *CheckSmsVerifyCodeRequest) (*CheckSmsVerifyCodeResponse, int, error)
- func (p *SMS) Conversion(req *ConversionRequest) (*ConversionResponse, int, error)
- func (p *SMS) DeleteSmsTemplate(req *DeleteSmsTemplateRequest) (*DeleteSmsTemplateResponse, int, error)
- func (p *SMS) GetAPIInfo(api string) *base.ApiInfo
- func (p *SMS) GetServiceInfo(region string) *base.ServiceInfo
- func (p *SMS) GetSmsTemplateAndOrderList(req *GetSmsTemplateAndOrderListRequest) (*GetSmsTemplateAndOrderListResponse, int, error)
- func (p *SMS) GetSubAccountDetail(req *GetSubAccountDetailRequest) (*GetSubAccountDetailResponse, int, error)
- func (p *SMS) GetSubAccountList(req *GetSubAccountListRequest) (*GetSubAccountListResponse, int, error)
- func (p *SMS) InsertSmsSubAccount(req *InsertSmsSubAccountReq) (*InsertSmsSubAccountResponse, int, error)
- func (p *SMS) Send(req *SmsRequest) (*SmsResponse, int, error)
- func (p *SMS) SendVerifyCode(req *SmsVerifyCodeRequest) (*SmsResponse, int, error)
- func (s *SMS) SetHost(host string)
- func (s *SMS) SetRegion(region string)
- func (s *SMS) SetSchema(schema string)
- type ShortUrlConfig
- type ShortUrlEnableStatus
- type SmsBatchMessages
- type SmsBatchRequest
- type SmsChannelType
- type SmsOrderStatus
- type SmsRequest
- type SmsResponse
- type SmsResult
- type SmsSubAccountDetail
- type SmsSubAccountInfo
- type SmsTemplateInfo
- type SmsVerifyCodeRequest
Constants ¶
View Source
const ( DefaultRegion = "cn-north-1" ServiceVersion20200101 = "2020-01-01" ServiceVersion20210101 = "2021-01-01" ServiceVersion20210111 = "2021-01-11" ServiceName = "volcSMS" )
Variables ¶
View Source
var ( ServiceInfo = map[string]*base.ServiceInfo{ DefaultRegion: { Timeout: 5 * time.Second, Host: "sms.volcengineapi.com", Scheme: "https", Header: http.Header{ "Accept": []string{"application/json"}, }, }, base.RegionApSingapore: { Timeout: 5 * time.Second, Host: "sms.byteplusapi.com", Scheme: "https", Header: http.Header{ "Accept": []string{"application/json"}, }, }, } ApiInfoList = map[string]*base.ApiInfo{ "SendSms": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"SendSms"}, "Version": []string{ServiceVersion20200101}, }, }, "SendBatchSms": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"SendBatchSms"}, "Version": []string{ServiceVersion20210101}, }, }, "SendSmsVerifyCode": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"SendSmsVerifyCode"}, "Version": []string{ServiceVersion20200101}, }, }, "CheckSmsVerifyCode": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"CheckSmsVerifyCode"}, "Version": []string{ServiceVersion20200101}, }, }, "Conversion": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"Conversion"}, "Version": []string{ServiceVersion20200101}, }, }, "GetSmsTemplateAndOrderList": { Method: http.MethodGet, Path: "/", Query: url.Values{ "Action": []string{"GetSmsTemplateAndOrderList"}, "Version": []string{ServiceVersion20210111}, }, }, "ApplySmsTemplate": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"ApplySmsTemplate"}, "Version": []string{ServiceVersion20210111}, }, }, "DeleteSmsTemplate": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"DeleteSmsTemplate"}, "Version": []string{ServiceVersion20210111}, }, }, "GetSubAccountList": { Method: http.MethodGet, Path: "/", Query: url.Values{ "Action": []string{"GetSubAccountList"}, "Version": []string{ServiceVersion20210111}, }, }, "GetSubAccountDetail": { Method: http.MethodGet, Path: "/", Query: url.Values{ "Action": []string{"GetSubAccountDetail"}, "Version": []string{ServiceVersion20210111}, }, }, "InsertSubAccount": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"InsertSubAccount"}, "Version": []string{ServiceVersion20210111}, }, }, } )
View Source
var DefaultInstance = NewInstance()
DefaultInstance 默认的实例
Functions ¶
This section is empty.
Types ¶
type ApplySmsTemplateRequest ¶
type ApplySmsTemplateRequest struct { SubAccount string `json:"subAccount"` Area Area `json:"area"` ChannelType SmsChannelType `json:"channelType"` Name string `json:"name"` Content string `json:"content"` Desc string `json:"desc"` ShortUrlConfig *ShortUrlConfig `json:"shortUrlConfig"` }
type ApplySmsTemplateResponse ¶
type ApplySmsTemplateResponse struct { ResponseMetadata base.ResponseMetadata Result *SmsTemplateInfo }
type CheckSmsVerifyCodeResponse ¶
type CheckSmsVerifyCodeResponse struct { ResponseMetadata base.ResponseMetadata Result string }
type ConversionRequest ¶
type ConversionResponse ¶
type ConversionResponse struct { ResponseMetadata base.ResponseMetadata Result string }
type DeleteSmsTemplateResponse ¶
type DeleteSmsTemplateResponse struct { ResponseMetadata base.ResponseMetadata Result string }
type GetSmsTemplateAndOrderListRequest ¶
type GetSmsTemplateAndOrderListRequest struct { SubAccount string `url:"subAccount,omitempty"` TemplateId string `url:"templateId"` Name string `url:"name"` Area Area `url:"area"` ChannelType string `url:"channelType"` Content string `url:"content"` PageIndex int `url:"pageIndex"` PageSize int `url:"pageSize"` }
type GetSmsTemplateAndOrderListResponse ¶
type GetSmsTemplateAndOrderListResponse struct { ResponseMetadata base.ResponseMetadata Result *struct { List []*SmsTemplateInfo `json:"list"` Total int `json:"total"` } }
type GetSubAccountDetailRequest ¶
type GetSubAccountDetailRequest struct {
SubAccount string `url:"subAccount"`
}
type GetSubAccountDetailResponse ¶
type GetSubAccountDetailResponse struct { ResponseMetadata base.ResponseMetadata Result *SmsSubAccountDetail }
type GetSubAccountListResponse ¶
type GetSubAccountListResponse struct { ResponseMetadata base.ResponseMetadata Result *struct { List []*SmsSubAccountInfo `json:"list"` Total int `json:"total"` } }
type InsertSmsSubAccountReq ¶
type InsertSmsSubAccountResponse ¶
type InsertSmsSubAccountResponse struct { ResponseMetadata base.ResponseMetadata Result string }
type SMS ¶
IAM .
func NewInstanceI18n ¶
func (*SMS) ApplySmsTemplate ¶
func (p *SMS) ApplySmsTemplate(req *ApplySmsTemplateRequest) (*ApplySmsTemplateResponse, int, error)
func (*SMS) BatchSend ¶
func (p *SMS) BatchSend(req *SmsBatchRequest) (*SmsResponse, int, error)
func (*SMS) CheckVerifyCode ¶
func (p *SMS) CheckVerifyCode(req *CheckSmsVerifyCodeRequest) (*CheckSmsVerifyCodeResponse, int, error)
func (*SMS) Conversion ¶
func (p *SMS) Conversion(req *ConversionRequest) (*ConversionResponse, int, error)
func (*SMS) DeleteSmsTemplate ¶
func (p *SMS) DeleteSmsTemplate(req *DeleteSmsTemplateRequest) (*DeleteSmsTemplateResponse, int, error)
func (*SMS) GetServiceInfo ¶
func (p *SMS) GetServiceInfo(region string) *base.ServiceInfo
GetServiceInfo interface
func (*SMS) GetSmsTemplateAndOrderList ¶
func (p *SMS) GetSmsTemplateAndOrderList(req *GetSmsTemplateAndOrderListRequest) (*GetSmsTemplateAndOrderListResponse, int, error)
func (*SMS) GetSubAccountDetail ¶
func (p *SMS) GetSubAccountDetail(req *GetSubAccountDetailRequest) (*GetSubAccountDetailResponse, int, error)
func (*SMS) GetSubAccountList ¶
func (p *SMS) GetSubAccountList(req *GetSubAccountListRequest) (*GetSubAccountListResponse, int, error)
func (*SMS) InsertSmsSubAccount ¶
func (p *SMS) InsertSmsSubAccount(req *InsertSmsSubAccountReq) (*InsertSmsSubAccountResponse, int, error)
func (*SMS) Send ¶
func (p *SMS) Send(req *SmsRequest) (*SmsResponse, int, error)
func (*SMS) SendVerifyCode ¶
func (p *SMS) SendVerifyCode(req *SmsVerifyCodeRequest) (*SmsResponse, int, error)
type ShortUrlConfig ¶
type ShortUrlConfig struct { IsEnabled ShortUrlEnableStatus `json:"isEnabled"` IsNeedClickDetails ShortUrlEnableStatus `json:"isNeedClickDetails"` RawUrl string `json:"rawUrl"` }
type ShortUrlEnableStatus ¶
type ShortUrlEnableStatus string
const ( EnableStatusNotEnabled ShortUrlEnableStatus = "0" EnableStatusEnabled ShortUrlEnableStatus = "1" )
type SmsBatchMessages ¶
type SmsBatchRequest ¶
type SmsChannelType ¶
type SmsChannelType string
const ( SmsChannelTypeCnOTP SmsChannelType = "CN_OTP" SmsChannelTypeCnNTC SmsChannelType = "CN_NTC" SmsChannelTypeCnMKT SmsChannelType = "CN_MKT" SmsChannelTypeI18nOTP SmsChannelType = "I18N_OTP" SmsChannelTypeI18nMKT SmsChannelType = "I18N_MKT" )
type SmsOrderStatus ¶
type SmsOrderStatus int64
const ( SmsOrder_REVIEWING SmsOrderStatus = 1 SmsOrder_REJECTED SmsOrderStatus = 2 SmsOrder_PASSED SmsOrderStatus = 3 SmsOrder_CLOSE SmsOrderStatus = 4 SmsOrder_EXEMPTED SmsOrderStatus = 5 )
type SmsRequest ¶
type SmsResponse ¶
type SmsResponse struct { ResponseMetadata base.ResponseMetadata Result *SmsResult `json:"Result,omitempty"` }
AssumeRole
type SmsSubAccountDetail ¶
type SmsSubAccountDetail struct { SubAccountId string `json:"subAccountId"` SubAccountName string `json:"subAccountName"` EnabledChannelType []*struct { Name string `json:"name"` Value SmsChannelType `json:"value"` Area Area } `json:"enabledChannelType"` Status int `json:"status"` Desc string `json:"desc"` CreatedTime int64 `json:"createdTime"` }
type SmsSubAccountInfo ¶
type SmsTemplateInfo ¶
type SmsTemplateInfo struct { Id string `json:"id"` ApplyId string `json:"applyId,omitempty"` TemplateId string `json:"templateId"` ChannelType SmsChannelType `json:"channelType"` ChannelTypeName string `json:"channelTypeName"` Name string `json:"name"` Content string `json:"content"` Status SmsOrderStatus `json:"status"` IsOrder bool `json:"isOrder"` Reason string `json:"reason"` CreatedTime int64 `json:"createdTime"` ShortUrlConfig *ShortUrlConfig `json:"shortUrlConfig"` }
Click to show internal directories.
Click to hide internal directories.