Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( URLAuth_Code2Session = "https://api.weixin.qq.com/sns/jscode2session" URLAuth_GetAccessToken = "https://api.weixin.qq.com/cgi-bin/token" URLSubscribeMessage_Send = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send" )
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func (*Auth) Code2Session ¶
func (*Auth) GetAccessToken ¶
func (auth *Auth) GetAccessToken(ctx context.Context) (*AuthGetAccessTokenResp, error)
type AuthCode2SessionResp ¶
type AuthCode2SessionResp struct {
ErrCode int64 `json:"errcode"`
ErrMsg string `json:"errmsg"`
AppID string
OpenID string `json:"openid"` // 用户唯一标识
SessionKey string `json:"session_key"` // 会话密钥
UnionID string `json:"unionid"` // 用户在开放平台的唯一标识符,在满足UnionID下发条件的情况下会返回
}
AuthCode2SessionResp 登录凭证校验的返回结果
type AuthGetAccessTokenResp ¶
type ErrorLogger ¶
type Option ¶
type Option func(o *options)
func AccessTokenKey ¶
func AccessTokenLockerKey ¶
func HttpClient ¶
func Logger ¶
func Logger(l ErrorLogger) Option
func RedisClient ¶
func RedisClient(client redis.UniversalClient) Option
type SDK ¶
type SDK struct {
// contains filtered or unexported fields
}
SDK 微信小程序SDK
func (*SDK) SubscribeMessage ¶
func (sdk *SDK) SubscribeMessage() *SubscribeMessage
type SubscribeMessage ¶
type SubscribeMessage struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.