Versions in this module Expand all Collapse all v0 v0.0.1 Apr 20, 2023 Changes in this version + type Config struct + AppID string + Endpoint Endpoint + Lang string + RedirectUri string + Scopes []string + Secret string + State string + func (c *Config) GetAuthUrl() string + func (c *Config) GetTokenFromCode(ctx context.Context, code string) (token *gjson.Json) + func (c *Config) GetUserByToken(ctx context.Context, token string) (user *core.User, err error) + func (c *Config) SetScopes(scopes []string) + func (c *Config) SetState(state ...string) + func (c *Config) UserFromCode(ctx context.Context, code string) (user *core.User, err error) + type Endpoint struct + AuthURL string + TokenURL string + type OpenplatformConfig struct + type User struct + Avatar string + Email string + Error error + ID string + Name string + NickName string + Raw *gjson.Json + func (u *User) ContainsError() bool + func (u *User) GetAccessToken() string + func (u *User) GetAvatar() string + func (u *User) GetEmail() string + func (u *User) GetErrorCode() gcode.Code + func (u *User) GetExpiresIn() int + func (u *User) GetID() string + func (u *User) GetName() string + func (u *User) GetNickName() string + func (u *User) GetRaw() *gjson.Json + func (u *User) GetRefreshToken() string + func (u *User) SetAccessToken(token string) error + func (u *User) SetExpiresIn(expiresIn int) error + func (u *User) SetRefreshToken(token string) error + type WechatError struct + ErrCode int + ErrMsg string + func (e *WechatError) Code() gcode.Code + func (e *WechatError) Contains() bool