access

package
v1.8.101 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Zlib Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAccessToken

func GetAccessToken(tk token.Token, d data.D) (access.Token, error)

GetAccessToken https://openapi-fxg.jinritemai.com/token/create?app_key=your_app_key&method=token.create&param_json={"code":"your_code","grant_type":"authorization_code"}&timestamp=2021-06-07 17:34:46&v=2&sign=your_sign_here

func RefreshToken

func RefreshToken(tk token.Token, d data.D) (access.Token, error)

RefreshToken https://openapi-fxg.jinritemai.com/token/refresh?app_key=your_app_key&method=token.refresh&param_json={"grant_type":"refresh_token","refresh_token":"your_refresh_token"}&timestamp=2021-06-07 17:36:56&v=2&sign=your_sign

Types

type AcsData

type AcsData struct {
	Token
	ShopId   int64  `json:"shop_id,omitempty"`
	ShopName string `json:"shop_name,omitempty"`
}

type Token

type Token struct {
	AcsToken    string `json:"access_token"`
	RefToken    string `json:"refresh_token"`
	AcsExpireIn int64  `json:"expires_in,omitempty"`
	RefExpireIn int64  `json:"refresh_expires_in,omitempty"`
	Scope       string `json:"scope,omitempty"`
}

func (Token) GetAccessToken

func (a Token) GetAccessToken() access.Value

func (Token) GetRefAccessToken

func (a Token) GetRefAccessToken() access.Value

Jump to

Keyboard shortcuts

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