Documentation
¶
Index ¶
- Constants
- type AlipaySystemOauthTokenResponse
- type AlipaySystemOauthTokenResult
- type AlipayUserInfoShareResponse
- type AlipayUserInfoShareResult
- type ApiError
- type Client
- func (c *Client) AlipaySystemOauthToken(ctx context.Context, grantType, code, refreshToken string, ...) (*AlipaySystemOauthTokenResult, ApiError, error)
- func (c *Client) AlipayUserInfoShare(ctx context.Context, authToken string, notMustParams ...gorequest.Params) (*AlipayUserInfoShareResult, ApiError, error)
- func (c *Client) ConfigApiGormFun(apiClientFun golog.ApiGormFun)
- func (c *Client) Get(ctx context.Context, _method string, notMustParams ...gorequest.Params) ([]byte, error)
- func (c *Client) GetAes() string
- func (c *Client) GetAlipayRSA2() string
- func (c *Client) GetAppId() string
- func (c *Client) GetAppKey() string
- func (c *Client) GetAppRSA2() string
- type ClientConfig
Constants ¶
View Source
const AuthorizationCode = "authorization_code" // 表示换取使用用户授权码code换取授权令牌
View Source
const (
LogTable = "alipayopen"
)
View Source
const RefreshToken = "refresh_token" // 表示使用refresh_token刷新获取新授权令牌
View Source
const (
Version = "1.0.6"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlipaySystemOauthTokenResponse ¶
type AlipaySystemOauthTokenResponse struct {
AlipaySystemOauthTokenResponse struct {
AlipayUserId string `json:"alipay_user_id,omitempty"`
UserId string `json:"user_id"` // 支付宝用户的唯一标识。以2088开头的16位数字。
AccessToken string `json:"access_token"` // 访问令牌。通过该令牌调用需要授权类接口
ExpiresIn string `json:"expires_in"` // 访问令牌的有效时间,单位是秒。
RefreshToken string `json:"refresh_token"` // 刷新令牌。通过该令牌可以刷新access_token
ReExpiresIn string `json:"re_expires_in"` // 刷新令牌的有效时间,单位是秒。
AuthStart string `json:"auth_start"` // 授权token开始时间,作为有效期计算的起点
} `json:"alipay_system_oauth_token_response"`
}
type AlipaySystemOauthTokenResult ¶
type AlipaySystemOauthTokenResult struct {
Result AlipaySystemOauthTokenResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type AlipayUserInfoShareResponse ¶
type AlipayUserInfoShareResponse struct {
AlipayUserId string `json:"alipay_user_id,omitempty"`
UserId string `json:"user_id"` // 支付宝用户的唯一标识。以2088开头的16位数字。
AccessToken string `json:"access_token"` // 访问令牌。通过该令牌调用需要授权类接口
ExpiresIn string `json:"expires_in"` // 访问令牌的有效时间,单位是秒。
RefreshToken string `json:"refresh_token"` // 刷新令牌。通过该令牌可以刷新access_token
ReExpiresIn string `json:"re_expires_in"` // 刷新令牌的有效时间,单位是秒。
AuthStart string `json:"auth_start"` // 授权token开始时间,作为有效期计算的起点
} `json:"alipay_system_oauth_token_response"`
}
type AlipayUserInfoShareResult ¶
type AlipayUserInfoShareResult struct {
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client 实例
func (*Client) AlipaySystemOauthToken ¶
func (c *Client) AlipaySystemOauthToken(ctx context.Context, grantType, code, refreshToken string, notMustParams ...gorequest.Params) (*AlipaySystemOauthTokenResult, ApiError, error)
AlipaySystemOauthToken 换取授权访问令牌 https://opendocs.alipay.com/open/02xtla
func (*Client) AlipayUserInfoShare ¶
func (c *Client) AlipayUserInfoShare(ctx context.Context, authToken string, notMustParams ...gorequest.Params) (*AlipayUserInfoShareResult, ApiError, error)
AlipayUserInfoShare 换取授权访问令牌 https://opendocs.alipay.com/open/02xtlb
func (*Client) ConfigApiGormFun ¶ added in v1.0.6
func (c *Client) ConfigApiGormFun(apiClientFun golog.ApiGormFun)
ConfigApiGormFun 接口日志配置
func (*Client) GetAlipayRSA2 ¶
func (*Client) GetAppRSA2 ¶
Click to show internal directories.
Click to hide internal directories.