Documentation ¶
Index ¶
- type Config
- func (c *Config) ContactFromCode(code string) (*providers.User, error)
- func (c *Config) GetAuthURL() (string, error)
- func (c *Config) GetOAuthUrl() string
- func (c *Config) GetQrConnectURL(state string) (string, error)
- func (c *Config) GetUserByID(userID string) (*weCom.ResponseGetUserByID, error)
- func (c *Config) GetUserDetail(userTicket string) (*weCom.ResponseGetUserDetail, error)
- func (c *Config) GetUserInfo(code string) (*weCom.ResponseGetUserInfo, error)
- type OptionFunc
- func WithAgentID(agentID int) OptionFunc
- func WithCache(cache kernel.CacheInterface) OptionFunc
- func WithCallbackURL(callbackURL string) OptionFunc
- func WithCorpID(corpID string) OptionFunc
- func WithHttpDebug(debug bool) OptionFunc
- func WithOAuth(oauth work.OAuth) OptionFunc
- func WithSecret(secret string) OptionFunc
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) ContactFromCode ¶
ContactFromCode 根据code获取企业用户信息 (注意:/user/getuserinfo为旧接口 auth/getuserinfo为新接口)
func (*Config) GetQrConnectURL ¶
GetQrConnectURL 扫码授权登录
func (*Config) GetUserByID ¶
func (c *Config) GetUserByID(userID string) (*weCom.ResponseGetUserByID, error)
GetUserByID 根据用户id获取用户信息
func (*Config) GetUserDetail ¶
func (c *Config) GetUserDetail(userTicket string) (*weCom.ResponseGetUserDetail, error)
GetUserDetail 获取用户敏感信息
func (*Config) GetUserInfo ¶
func (c *Config) GetUserInfo(code string) (*weCom.ResponseGetUserInfo, error)
GetUserInfo 获取访问用户身份
type OptionFunc ¶
type OptionFunc func(cfg *Config)
func WithAgentID ¶
func WithAgentID(agentID int) OptionFunc
func WithCache ¶
func WithCache(cache kernel.CacheInterface) OptionFunc
func WithCallbackURL ¶
func WithCallbackURL(callbackURL string) OptionFunc
func WithCorpID ¶
func WithCorpID(corpID string) OptionFunc
func WithHttpDebug ¶
func WithHttpDebug(debug bool) OptionFunc
func WithOAuth ¶
func WithOAuth(oauth work.OAuth) OptionFunc
func WithSecret ¶
func WithSecret(secret string) OptionFunc
Click to show internal directories.
Click to hide internal directories.