hms

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	AppId     string
	AppSecret string
}

Client Client

func NewClient

func NewClient(appId, secret string) *Client

NewClient NewClient 传入appId和appSecret

func (*Client) CodeToAccessToken

func (c *Client) CodeToAccessToken(code string) (accessData *QuickAppAccessToken, err error)

CodeToAccessToken 根据code值换行accessToken

func (*Client) RefreshTokenToAccessToken

func (c *Client) RefreshTokenToAccessToken(refreshToken string) (accessData *QuickAppAccessToken, err error)

用refreshToken换accessToken

type QuickAppAccessToken

type QuickAppAccessToken struct {
	AccessToken    string `json:"access_token"`
	ExpiresIn      int    `json:"expires_in"`
	RefreshToken   string `json:"refresh_token"`
	Scope          string `json:"scope"`
	TokenType      int64  `json:"token_type"`
	Error          string `json:"error"`
	ErrDescription string `json:"error_description"`
}

QuickAppAccessToken 华为accesstoken应答参数

Jump to

Keyboard shortcuts

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