wechat

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 4 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 MiniProgramAuthMobile added in v0.1.6

type MiniProgramAuthMobile struct {
	FullMobile  string `json:"phoneNumber"`
	Mobile      string `json:"purePhoneNumber"`
	CountryCode string `json:"countryCode"`
}

func (*MiniProgramAuthMobile) ToValidMobile added in v0.1.6

func (s *MiniProgramAuthMobile) ToValidMobile() string

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 ReqAccessToken added in v0.1.6

type ReqAccessToken struct {
	AppID  string
	Secret string
	// contains filtered or unexported fields
}

type ReqMiniProgramAuthMobile added in v0.1.6

type ReqMiniProgramAuthMobile struct {
	Code string `json:"code"`
}

type RespAccessToken added in v0.1.6

type RespAccessToken struct {
	Response
	Token  string `json:"access_token"`
	Expiry int    `json:"expires_in"`
}

type RespMiniProgramAuthMobile added in v0.1.6

type RespMiniProgramAuthMobile struct {
	Response

	Mobile *MiniProgramAuthMobile `json:"phone_info"`
}

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