Documentation ¶
Index ¶
- Constants
- Variables
- type Content
- type JsonMsg
- type WeChat
- func (wx *WeChat) GetAccToken() error
- func (v WeChat) MarshalEasyJSON(w *jwriter.Writer)
- func (v WeChat) MarshalJSON() ([]byte, error)
- func (wx WeChat) SendMsg(touser, toparty, content string) ([]byte, error)
- func (v WeChat) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v WeChat) UnmarshalJSON(data []byte) error
Constants ¶
View Source
const ( AccTokenURL = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=%s&corpsecret=%s" SendmsgURL = "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=%s" TokeExpSec int64 = 7200 )
Variables ¶
View Source
var TLSClient *http.Client
Functions ¶
This section is empty.
Types ¶
type JsonMsg ¶
type JsonMsg struct { ToUser string `json:"touser,omitempty"` ToParty string `json:"toparty,omitempty"` MsgType string `json:"msgtype"` AgentID int `json:"agentid"` Text Content `json:"text"` }
func (JsonMsg) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (JsonMsg) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*JsonMsg) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*JsonMsg) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type WeChat ¶
type WeChat struct { CorpID string AgentID int Secret string // contains filtered or unexported fields }
func (*WeChat) GetAccToken ¶
func (WeChat) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (WeChat) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (WeChat) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (WeChat) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
Click to show internal directories.
Click to hide internal directories.