Documentation ¶
Index ¶
- type Config
- type EndPoint
- type Response
- type User
- func (u *User) GetAccessToken() string
- func (u *User) GetAvatar() string
- func (u *User) GetEmail() string
- 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) *User
- func (u *User) SetExpiresIn(expiresIn int) *User
- func (u *User) SetRefreshToken(token string) *User
- type WechatConfig
- func (w *WechatConfig) GetAuthURL(redierct string, state ...string) string
- func (w *WechatConfig) GetTokenFromCode(code string) (token *gjson.Json)
- func (w *WechatConfig) GetUserByToken(token string) *User
- func (w *WechatConfig) GetUserFromCode(code string) *User
- func (w *WechatConfig) OpenPlatform(componentID string, ComponentToken string) *WechatConfig
- func (w *WechatConfig) Scope(scopes []string) *WechatConfig
- func (w *WechatConfig) WithLang(lang string) *WechatConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { Raw *gjson.Json ID string Name string NickName string Avatar string Email string }
User
type WechatConfig ¶
type WechatConfig struct { RerdirectUrl string State string Scopes []string ComponentID string ComponentToken string Lang string // contains filtered or unexported fields }
func (*WechatConfig) GetAuthURL ¶
func (w *WechatConfig) GetAuthURL(redierct string, state ...string) string
GetAuthURL
func (*WechatConfig) GetTokenFromCode ¶
func (w *WechatConfig) GetTokenFromCode(code string) (token *gjson.Json)
GetTokenFromCode
func (*WechatConfig) GetUserByToken ¶
func (w *WechatConfig) GetUserByToken(token string) *User
GetUserFromToken
func (*WechatConfig) GetUserFromCode ¶
func (w *WechatConfig) GetUserFromCode(code string) *User
GetUserFromCode
func (*WechatConfig) OpenPlatform ¶
func (w *WechatConfig) OpenPlatform(componentID string, ComponentToken string) *WechatConfig
OpenPlatform 第三方平台的配置
Click to show internal directories.
Click to hide internal directories.