Documentation ¶
Index ¶
- type Message
- func (m *Message) Clone() *Message
- func (m *Message) DuplicateCheck(enableDuplicateCheck, duplicateCheckInterval int) *Message
- func (m *Message) File(mediaId string) *file
- func (m *Message) Image(mediaId string) *image
- func (m *Message) Markdown(content string) *markdown
- func (m *Message) Text(content string) *text
- func (m *Message) Textcard(title, description, url string) *textcard
- func (m *Message) ToParty(partyList []string) *Message
- func (m *Message) ToTag(tagList []string) *Message
- func (m *Message) ToUser(userList []string) *Message
- func (m *Message) Video(mediaId string) *video
- func (m *Message) Voice(mediaId string) *voice
- type Oauth
- func (o *Oauth) GenAuthorizationUrl(redirectUri string) string
- func (o *Oauth) GenAuthorizationUrlWithState(redirectUri, state string) string
- func (o *Oauth) GenAuthorizeScanCodeUrl(redirectUri string) string
- func (o *Oauth) GenAuthorizeScanCodeUrlWithState(redirectUri, state string) string
- func (o *Oauth) GetUserInfo(code string) (*RespOauth, error)
- type RespMessage
- type RespOauth
- type Wxcom
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message struct is used to compose and fire individual message client.
func (*Message) DuplicateCheck ¶ added in v0.4.0
DuplicateCheck method enables the duplicate check. Param example: 0, 0 duplicate check is not enabled. 1, 1800 duplicate check within 1800 seconds.
type Oauth ¶ added in v0.5.0
type Oauth struct {
// contains filtered or unexported fields
}
Oauth struct is used to get user info client.
func (*Oauth) GenAuthorizationUrl ¶ added in v0.5.0
GenAuthorizationUrl method to construct web page authorization link.
func (*Oauth) GenAuthorizationUrlWithState ¶ added in v0.5.2
GenAuthorizationUrlWithState method to construct web page authorization link with state.
func (*Oauth) GenAuthorizeScanCodeUrl ¶ added in v0.5.0
GenAuthorizeScanCodeUrl method to build the scan code login authorization link.
func (*Oauth) GenAuthorizeScanCodeUrlWithState ¶ added in v0.5.2
GenAuthorizeScanCodeUrlWithState method to build the scan code login authorization link with state.
type RespMessage ¶ added in v0.4.0
type RespMessage struct { Invaliduser string `json:"invaliduser"` Invalidparty string `json:"invalidparty"` Invalidtag string `json:"invalidtag"` Msgid string `json:"msgid"` ResponseCode string `json:"response_code"` // contains filtered or unexported fields }
RespMessage struct holds response values of send message.
type RespOauth ¶ added in v0.5.0
type RespOauth struct { UserId string `json:"UserId"` DeviceId string `json:"DeviceId"` OpenId string `json:"OpenId"` ExternalUserId string `json:"external_userid"` // contains filtered or unexported fields }
RespOauth struct holds response values of get user info.
type Wxcom ¶
type Wxcom struct { Resty *resty.Client // contains filtered or unexported fields }
Wxcom struct is used to create wxcom client.
The cache uses patrickmn/go-cache. You can refer to related documents(https://github.com/patrickmn/go-cache) if necessary.
The resty uses go-resty/resty/v2. You can refer to related documents(https://github.com/go-resty/resty) if necessary.
func (*Wxcom) GetAccessToken ¶ added in v0.4.0
GetAccessToken method get access token from server or cache.
func (*Wxcom) GetAgentid ¶ added in v0.4.0
GetAgentid method get agentid from client.
func (*Wxcom) NewMessage ¶ added in v0.4.0
NewMessage is an alias for method `M()`. Creates a new Message instance.