Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetSessionKeyRequest ¶
type GetSessionKeyRequest struct { AccessToken string // 授权小程序的接口调用凭据 Code string // 调用 swan.login 后获取的 code GrantType string // 授权类型,固定字符串:“authorization_code” }
GetSessionKeyRequest 请求结构体
type GetSessionKeyResponse ¶
type GetSessionKeyResponse struct { Errno int64 `json:"errno"` // 错误码 ErrorDescription string `json:"error_description"` // 错误描述信息,用来帮助理解和解决发生的错误 ErrMsg string `json:"msg"` // 错误信息 ErrorCode int64 `json:"error_code"` // openapi 错误码 ErrorMsg string `json:"error_msg"` // openapi 错误信息 Data GetSessionKeyResponsedata }
type GetSessionKeyResponsedata ¶
type GetSessionKeyResponsedata struct { Errno int64 `json:"errno"` // 错误码 ErrorDescription string `json:"error_description"` // 错误描述信息,用来帮助理解和解决发生的错误 Msg string `json:"msg"` // 错误描述 }
func GetSessionKey ¶
func GetSessionKey(params *GetSessionKeyRequest) (*GetSessionKeyResponsedata, error)
GetSessionKey
type GetUnionIDRequest ¶
type GetUnionIDRequest struct { AccessToken string // 授权小程序的接口调用凭据 OpenID string // 用户 openid ,需要经过用户登录授权 }
GetUnionIDRequest 请求结构体
type GetUnionIDResponse ¶
type GetUnionIDResponse struct { Data GetUnionIDResponsedata `json:"data"` // 详细数据,errno 为 0 的情况下才有意义 Errno int64 `json:"errno"` // 状态码 ErrMsg string `json:"msg"` // 错误信息 ErrorCode int64 `json:"error_code"` // openapi 错误码 ErrorMsg string `json:"error_msg"` // openapi 错误信息 }
type GetUnionIDResponsedata ¶
type GetUnionIDResponsedata struct {
UnionID string `json:"union_id"` // 对应的 union id
}
func GetUnionID ¶
func GetUnionID(params *GetUnionIDRequest) (*GetUnionIDResponsedata, error)
GetUnionID
Click to show internal directories.
Click to hide internal directories.