jssdk

package
v0.0.0-...-a8365c1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s"
	JSAPI_TICKET_URL = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?type=jsapi&access_token=%s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Jssdk

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

func NewJssdk

func NewJssdk(appId, appSecret string, s Storage) *Jssdk

func (*Jssdk) GetAccessToken

func (w *Jssdk) GetAccessToken() (*accessToken, error)

获取AccessToken 通过accessToken!=nil来判断是否存在token error仅用作错误信息返回

func (*Jssdk) GetJsapiTicket

func (w *Jssdk) GetJsapiTicket() (*jsapiTicket, error)

func (*Jssdk) GetSignPackage

func (w *Jssdk) GetSignPackage(url string) (map[string]string, error)

获取签名内容

type Storage

type Storage interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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