jssdk

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2019 License: MIT Imports: 8 Imported by: 0

README

Documentation

Index

Constants

View Source
const (
	JSAPITicketKeyCachePrefix = "wechat_mp_jsapi_ticket_"
	TicketURL                 = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?type=jsapi&access_token="
)

Variables

This section is empty.

Functions

This section is empty.

Types

type JSAPISDK

type JSAPISDK struct {
	*core.Context
}

func NewJSSDK

func NewJSSDK(context *core.Context) *JSAPISDK

func (*JSAPISDK) GetTicket

func (j *JSAPISDK) GetTicket() (ticket string, err error)

func (*JSAPISDK) GetTicketFromServer

func (j *JSAPISDK) GetTicketFromServer() (ticket JSAPITicket, err error)

func (*JSAPISDK) MakeSign

func (j *JSAPISDK) MakeSign(ticket, url string) (sign *Signs)

type JSAPITicket

type JSAPITicket struct {
	util.WxError
	Ticket    string `json:"ticket"`
	ExpiresIn int    `json:"expires_in"`
}

type Signs

type Signs struct {
	JsapiTicket string
	Noncestr    string
	Timestamp   int64
	URL         string
	Signature   string
}

Jump to

Keyboard shortcuts

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