base

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Overview

基础模块

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCallbackIP

func GetCallbackIP(clt *core.Client) (ipList []string, err error)

获取微信服务器IP地址.

如果公众号基于安全等考虑,需要获知微信服务器的IP地址列表,以便进行相关限制,可以通过该接口获得微信服务器IP地址列表。

func ShortURL

func ShortURL(clt *core.Client, longURL string) (shortURL string, err error)

ShortURL 将一条长链接转成短链接.

func UploadImage

func UploadImage(clt *core.Client, imgFilePath string) (url string, err error)

UploadImage 上传图片到微信服务器, 返回的图片url给其他场景使用, 比如图文消息, 卡卷, POI.

func UploadImageFromReader

func UploadImageFromReader(clt *core.Client, filename string, reader io.Reader) (url string, err error)

UploadImageFromReader 上传图片到微信服务器, 返回的图片url给其他场景使用, 比如图文消息, 卡卷, POI.

NOTE: 参数 filename 不是文件路径, 是 multipart/form-data 里面 filename 的值.

Types

This section is empty.

Jump to

Keyboard shortcuts

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