base

package
v2.0.15 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiWeixin

type ApiWeixin struct {
	Logger    intf.LoggerProvider
	App       types.WeixinApp
	AppId     string
	AppSecret string
	Cache     cache.ApiWeixinCache
}

func New

func New(app types.WeixinApp, appId, appSecret string) *ApiWeixin

func (*ApiWeixin) GetAccessToken

func (b *ApiWeixin) GetAccessToken() (string, error)

func (*ApiWeixin) GetUser

func (b *ApiWeixin) GetUser(openid string) (*types.UserInfo, error)

GetUser 通过openId获取用户信息

func (*ApiWeixin) ParseResult

func (b *ApiWeixin) ParseResult(data []byte, result any) error

type ErrResponse

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

ErrResponse 微信的错误响应

Jump to

Keyboard shortcuts

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