Documentation ¶
Index ¶
- type Client
- func (c *Client) CheckFinger(finger structs.FingerRequest, accessToken string) (*structs.FingerResponse, error)
- func (c *Client) DecryptPhoneNumber(ssk, data, iv string) (phone PhoneNumber, err error)
- func (c *Client) DecryptUserInfo(rawData, encryptedData, signature, iv, ssk string) (ui UserInfo, err error)
- func (c *Client) GetAccessToken(appID string, secret string) (string, error)
- func (c *Client) GetWXQrCode(token string, scene string) (image.Image, error)
- func (c *Client) WXLogin(appID string, secret string, code string) (lres LoginResponse, err error)
- type ClientCfg
- type GetWXQRCodeRequest
- type IWXClient
- type LoginResponse
- type PhoneNumber
- type Response
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client wx Client
func (*Client) CheckFinger ¶
func (c *Client) CheckFinger(finger structs.FingerRequest, accessToken string) (*structs.FingerResponse, error)
CheckFinger ...
func (*Client) DecryptPhoneNumber ¶
func (c *Client) DecryptPhoneNumber(ssk, data, iv string) (phone PhoneNumber, err error)
DecryptPhoneNumber decrypt phone number
func (*Client) DecryptUserInfo ¶
func (c *Client) DecryptUserInfo(rawData, encryptedData, signature, iv, ssk string) (ui UserInfo, err error)
DecryptUserInfo decrypt the user information
func (*Client) GetAccessToken ¶
GetAccessToken ...
func (*Client) GetWXQrCode ¶
GetWXQrCode get WeChat qr code
type GetWXQRCodeRequest ¶
type GetWXQRCodeRequest struct { Scene string `json:"scene"` Width int64 `json:"width"` AutoColor bool `json:"auto_color"` LineColor interface{} `json:"line_color"` IsHyaLine bool `json:"is_hyaline"` }
GetWXQRCodeRequest ...
type IWXClient ¶
type IWXClient interface { WXLogin(appID string, secret string, code string) (lres LoginResponse, err error) DecryptUserInfo(rawData, encryptedData, signature, iv, ssk string) (ui UserInfo, err error) DecryptPhoneNumber(ssk, data, iv string) (phone PhoneNumber, err error) CheckFinger(finger structs.FingerRequest, accessToken string) (*structs.FingerResponse, error) GetWXQrCode(token string, scene string) (image.Image, error) GetAccessToken(appID string, secret string) (string, error) }
IWXClient defines the wx client interface
func NewWXBackend ¶
NewWXBackend returns a handle to the agent endpoints
type LoginResponse ¶
type LoginResponse struct { OpenID string `json:"openid"` SessionKey string `json:"session_key"` UnionID string `json:"unionid"` }
LoginResponse defines the login response
type PhoneNumber ¶
type PhoneNumber struct { PhoneNumber string `json:"phoneNumber"` PurePhoneNumber string `json:"purePhoneNumber"` CountryCode string `json:"countryCode"` Watermark watermark `json:"watermark"` }
PhoneNumber defines the phone number
type UserInfo ¶
type UserInfo struct { OpenID string `json:"openId"` Nickname string `json:"nickName"` Gender int `json:"gender"` Province string `json:"province"` Language string `json:"language"` Country string `json:"country"` City string `json:"city"` Avatar string `json:"avatarUrl"` UnionID string `json:"unionId"` Watermark watermark `json:"watermark"` }
UserInfo defines the user information
Click to show internal directories.
Click to hide internal directories.