Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { AppID string AppSecret string Token string EncodingAESKey string Cache cache.Cache }
Config is the Service configuration.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service encapsulates the WeChat client along with internal state for storing users.
func (*Service) AddReceivers ¶
AddReceivers takes user ids and adds them to the internal users list. The Send method will send a given message to all those users.
func (*Service) Send ¶
Send takes a message subject and a message content and sends them to all previously set users.
func (*Service) WaitForOneOffVerification ¶
func (s *Service) WaitForOneOffVerification(serverURL string, devMode bool, callback verificationCallbackFunc) error
WaitForOneOffVerification waits for the verification call from the WeChat backend.
Should be running when (re-)applying settings in wechat configuration.
Set devMode to true when using the sandbox.
See https://developers.weixin.qq.com/doc/offiaccount/en/Basic_Information/Access_Overview.html