Documentation ¶
Index ¶
- Constants
- type ApiError
- type CheckUserAccessTokenArg
- type CheckUserAccessTokenReply
- type GetAccessTokenArg
- type GetAccessTokenReply
- type GetAuthUrlArg
- type GetAuthUrlReply
- type GetUserAccessTokenArg
- type GetUserAccessTokenReply
- type GetUserInfoArg
- type GetUserInfoReply
- type RefreshUserAccessTokenArg
- type RefreshUserAccessTokenReply
Constants ¶
View Source
const ( Success = 0 InvalidOpenId = 40003 ErrTypeConn = "connerr" ErrTypeResp = "resperr" ErrTypeApi = "apierr" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckUserAccessTokenArg ¶
type CheckUserAccessTokenReply ¶
type CheckUserAccessTokenReply struct {
Valid bool `json:"valid"`
}
func CheckUserAccessToken ¶
func CheckUserAccessToken(arg *CheckUserAccessTokenArg) (reply *CheckUserAccessTokenReply, err error)
type GetAccessTokenArg ¶
type GetAccessTokenReply ¶
type GetAccessTokenReply struct { AccessToken string `json:"access_token,omitempty"` ExpiresIn int64 `json:"expires_in,omitempty"` }
func GetAccessToken ¶
func GetAccessToken(arg *GetAccessTokenArg) (reply *GetAccessTokenReply, err error)
type GetAuthUrlArg ¶
type GetAuthUrlReply ¶
type GetAuthUrlReply struct {
Url string `json:"url"`
}
func GetAuthUrl ¶
func GetAuthUrl(arg *GetAuthUrlArg) (*GetAuthUrlReply, error)
type GetUserAccessTokenArg ¶
type GetUserAccessTokenReply ¶
type GetUserAccessTokenReply struct { AccessToken string `json:"accessToken"` ExpiresIn int64 `json:"expiresIn"` RefreshToken string `json:"refreshToken"` OpenId string `json:"openId"` Scope string `json:"scope"` }
func GetUserAccessToken ¶
func GetUserAccessToken(arg *GetUserAccessTokenArg) (reply *GetUserAccessTokenReply, err error)
type GetUserInfoArg ¶
type GetUserInfoReply ¶
type GetUserInfoReply struct { OpenId string `json:"openId"` Nickname string `json:"nickname"` HeadImgUrl string `json:"headImgUrl"` UnionId string `json:"unionId"` }
func GetUserInfo ¶
func GetUserInfo(arg *GetUserInfoArg) (reply *GetUserInfoReply, err error)
type RefreshUserAccessTokenReply ¶
type RefreshUserAccessTokenReply struct { AccessToken string `json:"accessToken"` ExpiresIn int64 `json:"expiresIn"` RefreshToken string `json:"refreshToken"` OpenId string `json:"openId"` Scope string `json:"scope"` }
func RefreshUserAccessToken ¶
func RefreshUserAccessToken(arg *RefreshUserAccessTokenArg) (reply *RefreshUserAccessTokenReply, err error)
Click to show internal directories.
Click to hide internal directories.