Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Debug bool `json:"debug"`
AppID string `json:"appId"`
Timestamp int64 `json:"timestamp"`
NonceString string `json:"nonceStr"`
Signature string `json:"signature"`
APIList []string `json:"jsApiList"`
}
Config 表示 jssdk 中 wx.config 中的参数。
type DefaultServer ¶
type DefaultServer struct {
// contains filtered or unexported fields
}
DefaultServer 默认的 access_token 中控服务器
func NewDefaultServer ¶
func NewDefaultServer(tksrv token.Server, errlog *log.Logger) *DefaultServer
NewDefaultServer 声明一个默认的 access_token 中控服务器
若将 errlog 指定为 nil,则会将错误信息输出到 stderr 中。
func (*DefaultServer) Config ¶
func (s *DefaultServer) Config(url string) (*Config, error)
Config 表示 Config 实例
func (*DefaultServer) Refresh ¶
func (s *DefaultServer) Refresh() (*Ticket, error)
Refresh 刷新 Ticket,并获取新的 token
Click to show internal directories.
Click to hide internal directories.