wecom

package
v0.0.0-...-23c201c Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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 New

func New(options ...Options) (*Config, error)

func (*Config) ContactFromCode

func (c *Config) ContactFromCode(code string) (*providers.User, error)

ContactFromCode 根据code获取企业用户信息 (注意:/user/getuserinfo为旧接口 auth/getuserinfo为新接口)

func (*Config) GetAuthURL

func (c *Config) GetAuthURL() (string, error)

GetAuthURL 网页授权登录

func (*Config) GetOAuthUrl

func (c *Config) GetOAuthUrl() string

GetOAuthUrl 获取授权url地址

func (*Config) GetQrConnectURL

func (c *Config) GetQrConnectURL(state string) (string, error)

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

type Options

type Options interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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