alismsproxyapi

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

README

English | 简体中文

Alibaba Cloud Dysmsapi SDK for Go

Modified at github.com/alibabacloud-go/dysmsapi-20170525/v3'

Fixed issue with sending through Socks5 proxy

Encapsulated SendSMS for fast SMS sending

The usage method can be found in the alismsproxyapi_test.go

Requirements

  • It's necessary for you to make sure your system have installed Go environment which version greater than 1.20.0.

Installation

If you use go mod to manage your dependence, you can use the following command:

$ go get github.com/lfhy/alismsproxyapi

Issues

Opening an Issue, Issues not conforming to the guidelines may be closed immediately.

Usage

Usage Document

Changelog

Detailed changes for each release are documented in the release notes.

References

License

Apache-2.0

Copyright (c) 2009-present, Alibaba Cloud All rights reserved.

Documentation

Index

Constants

View Source
const (
	AkSKEmptyError = "client 'AccessKeyId' or 'AccessKeySecret' is empty"
	SmsEmptyError  = "smstemplate 'SignName' or 'TemplateCode' is empty"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SMSClient added in v1.0.2

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

func NewSMSClient

func NewSMSClient(option SMSClientOptions) (*SMSClient, error)

创建阿里云验证码服务客户端

func (*SMSClient) SendSMS added in v1.0.2

func (c *SMSClient) SendSMS(phone string, templateParam string) (*client.SendSmsResponse, error)

发送验证码 参数1:发送的手机号 参数2:发送模板的参数 如:{\"code\":12345\"}

type SMSClientOptions added in v1.0.2

type SMSClientOptions struct {
	// 鉴权AK
	AccessKeyId string
	// 鉴权SK
	AccessKeySecret string
	// 代理链接支持HTTP HTTPS SOCKS5
	ProxyURL string
	// 短信签名
	SignName string
	// 模版码
	TemplateCode string
	// 访问域名 默认:dysmsapi.aliyuncs.com
	Endpoint string
	// 访问协议 默认:HTTP
	Protocol string
}

Directories

Path Synopsis
This file is auto-generated, don't edit it.
This file is auto-generated, don't edit it.
src
github.com/alibabacloud-go/alibabacloud-gateway-spi/client
This file is auto-generated, don't edit it.
This file is auto-generated, don't edit it.
github.com/alibabacloud-go/darabonba-openapi/v2/client
This file is auto-generated, don't edit it.
This file is auto-generated, don't edit it.
github.com/alibabacloud-go/endpoint-util/service
This file is auto-generated, don't edit it.
This file is auto-generated, don't edit it.
github.com/alibabacloud-go/openapi-util/service
This file is auto-generated, don't edit it.
This file is auto-generated, don't edit it.
golang.org/x/net/internal/socks
Package socks provides a SOCKS version 5 client implementation.
Package socks provides a SOCKS version 5 client implementation.
golang.org/x/net/proxy
Package proxy provides support for a variety of protocols to proxy network data.
Package proxy provides support for a variety of protocols to proxy network data.
gopkg.in/ini.v1
Package ini provides INI file read and write functionality in Go.
Package ini provides INI file read and write functionality in Go.

Jump to

Keyboard shortcuts

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