tokenserver

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSSDKSignature

type JSSDKSignature struct {
	AppID, Noncestr, Sign string
	Timestamp             int64
}

JSSDKSignature JSSDK 签名对象

type Server

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

Server Token 中控服务

func NewServer

func NewServer() *Server

NewServer 创建Server程序

func (*Server) GenJSAPISign

func (s *Server) GenJSAPISign(appid, uri string) (JSSDKSignature, error)

GenJSAPISign 生成JSSDK Config签名配置

func (*Server) GetJSAPITicket

func (s *Server) GetJSAPITicket(appid string) (string, string, error)

GetJSAPITicket 获取微信JSAPI_Ticket

func (*Server) GetToken

func (s *Server) GetToken(appid string) (string, string, error)

GetToken 获取Access Token

func (*Server) Register

func (s *Server) Register(appid, secret string)

Register 注册微信APP账号

func (*Server) Run

func (s *Server) Run(port int)

Run 启动server 并监听HTTP端口

func (*Server) RunWithGin added in v1.0.1

func (s *Server) RunWithGin(port int)

RunWithGin run service with gin framework.

Jump to

Keyboard shortcuts

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