wechat

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WxOK = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MiniProgram

type MiniProgram struct {
	base.BaseOAuth
}

func (*MiniProgram) OAuth

func (s *MiniProgram) OAuth(req *base.Request) (*base.Response, error)

type MiniProgramAuthResponse

type MiniProgramAuthResponse struct {
	Response
	OpenID     string `json:"openid"`
	SessionKey string `json:"session_key"`
	UnionID    string `json:"unionid"`
}

type OAuth

type OAuth struct {
	base.BaseOAuth
}

func (*OAuth) OAuth

func (s *OAuth) OAuth(req *base.Request) (*base.Response, error)

type OAuthResponse

type OAuthResponse struct {
	Response
	AccessToken  string `json:"access_token"`
	Expires      int    `json:"expires_in"`
	RefreshToken string `json:"refresh_token"`
	OpenID       string `json:"openid"`
	Scope        string `json:"scope"`
	UnionID      string `json:"unionid"`
}

type Response

type Response struct {
	ErrCode int    `json:"errcode"`
	ErrMsg  string `json:"errmsg"`
}

type UserInfo

type UserInfo struct {
	OpenID     string   `json:"openid"`
	UnionID    string   `json:"unionid"`
	NickName   string   `json:"nickname"`
	Sex        int      `json:"sex"`
	Province   string   `json:"province"`
	City       string   `json:"city"`
	Country    string   `json:"country"`
	HeadImgUrl string   `json:"headimgurl"`
	Privileges []string `json:"privilege"`
}

type UserInfoResponse

type UserInfoResponse struct {
	Response
	UserInfo
}

Jump to

Keyboard shortcuts

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