Documentation ¶
Index ¶
- type RespAccessToken
- type RespCommon
- type RespSendMessage
- type RespUoloadMedia
- type TokenInfo
- type TokenManager
- type WeCom
- func (w *WeCom) AddRetryCondition(condition resty.RetryConditionFunc)
- func (w *WeCom) Healthz() (interface{}, error)
- func (w *WeCom) Logger() *zerolog.Logger
- func (w *WeCom) OnAfterResponse(m resty.ResponseMiddleware)
- func (w *WeCom) OnBeforeRequest(m resty.RequestMiddleware)
- func (w *WeCom) OnError(h resty.ErrorHook)
- func (w *WeCom) SetLogger(logger *zerolog.Logger)
- func (w *WeCom) WithApp(encodingAESKey, token string) *WeComApp
- type WeComApp
- func (app *WeComApp) GetAgentId() int64
- func (app *WeComApp) RxMessageHandler(h callback.RxMessageHandler) (http.Handler, error)
- func (app *WeComApp) SendButtonInteractionTemplateCardMessage(ctx context.Context, msg message.TxButtonInteractionTemplateCardMessage) (*RespSendMessage, error)
- func (app *WeComApp) SendFileMessage(ctx context.Context, msg message.TxFileMessage) (*RespSendMessage, error)
- func (app *WeComApp) SendImageMessage(ctx context.Context, msg message.TxImageMessage) (*RespSendMessage, error)
- func (app *WeComApp) SendMarkdownMessage(ctx context.Context, msg message.TxMarkdownMessage) (*RespSendMessage, error)
- func (app *WeComApp) SendMessage(ctx context.Context, msg message.TxMessage) (*RespSendMessage, error)
- func (app *WeComApp) SendMiniProgramNoticeMessage(ctx context.Context, msg message.TxMiniProgramNoticeMessage) (*RespSendMessage, error)
- func (app *WeComApp) SendMultipleInteractionTemplateCardMessage(ctx context.Context, msg message.TxMultipleInteractionTemplateCardMessage) (*RespSendMessage, error)
- func (app *WeComApp) SendNewsMessage(ctx context.Context, msg message.TxNewsMessage) (*RespSendMessage, error)
- func (app *WeComApp) SendNewsNoticeTemplateCardMessage(ctx context.Context, msg message.TxNewsNoticeTemplateCardMessage) (*RespSendMessage, error)
- func (app *WeComApp) SendTextCardMessage(ctx context.Context, msg message.TxTextCardMessage) (*RespSendMessage, error)
- func (app *WeComApp) SendTextMessage(ctx context.Context, msg message.TxTextMessage) (*RespSendMessage, error)
- func (app *WeComApp) SendTextNoticeTemplateCardMessage(ctx context.Context, msg message.TxTextNoticeTemplateCardMessage) (*RespSendMessage, error)
- func (app *WeComApp) SendVideoMessage(ctx context.Context, msg message.TxVideoMessage) (*RespSendMessage, error)
- func (app *WeComApp) SendVoiceMessage(ctx context.Context, msg message.TxVoiceMessage) (*RespSendMessage, error)
- func (app *WeComApp) SendVoteInteractionTemplateCardMessage(ctx context.Context, msg message.TxVoteInteractionTemplateCardMessage) (*RespSendMessage, error)
- func (app *WeComApp) SetAccessTokenManager(m TokenManager)
- func (app *WeComApp) UploadFileMedia(ctx context.Context, url string) (*RespUoloadMedia, error)
- func (app *WeComApp) UploadImageMedia(ctx context.Context, url string) (*RespUoloadMedia, error)
- func (app *WeComApp) UploadVideoMedia(ctx context.Context, url string) (*RespUoloadMedia, error)
- func (app *WeComApp) UploadVoiceMedia(ctx context.Context, url string) (*RespUoloadMedia, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RespAccessToken ¶
type RespAccessToken struct { RespCommon AccessToken string `json:"access_token"` ExpiresIn int64 `json:"expires_in"` }
type RespCommon ¶
func (*RespCommon) IsAccessTokenError ¶
func (r *RespCommon) IsAccessTokenError() bool
func (*RespCommon) IsError ¶
func (r *RespCommon) IsError() bool
type RespSendMessage ¶
type RespUoloadMedia ¶
type RespUoloadMedia struct { RespCommon Type string `json:"type"` MediaId string `json:"media_id"` CreatedAt string `json:"created_at"` }
type TokenManager ¶
type WeCom ¶
type WeCom struct {
// contains filtered or unexported fields
}
func (*WeCom) AddRetryCondition ¶
func (w *WeCom) AddRetryCondition(condition resty.RetryConditionFunc)
func (*WeCom) OnAfterResponse ¶
func (w *WeCom) OnAfterResponse(m resty.ResponseMiddleware)
func (*WeCom) OnBeforeRequest ¶
func (w *WeCom) OnBeforeRequest(m resty.RequestMiddleware)
type WeComApp ¶
type WeComApp struct { *WeCom // contains filtered or unexported fields }
func (*WeComApp) GetAgentId ¶
func (*WeComApp) RxMessageHandler ¶
func (*WeComApp) SendButtonInteractionTemplateCardMessage ¶
func (app *WeComApp) SendButtonInteractionTemplateCardMessage(ctx context.Context, msg message.TxButtonInteractionTemplateCardMessage) (*RespSendMessage, error)
func (*WeComApp) SendFileMessage ¶
func (app *WeComApp) SendFileMessage(ctx context.Context, msg message.TxFileMessage) (*RespSendMessage, error)
func (*WeComApp) SendImageMessage ¶
func (app *WeComApp) SendImageMessage(ctx context.Context, msg message.TxImageMessage) (*RespSendMessage, error)
func (*WeComApp) SendMarkdownMessage ¶
func (app *WeComApp) SendMarkdownMessage(ctx context.Context, msg message.TxMarkdownMessage) (*RespSendMessage, error)
func (*WeComApp) SendMessage ¶
func (*WeComApp) SendMiniProgramNoticeMessage ¶
func (app *WeComApp) SendMiniProgramNoticeMessage(ctx context.Context, msg message.TxMiniProgramNoticeMessage) (*RespSendMessage, error)
func (*WeComApp) SendMultipleInteractionTemplateCardMessage ¶
func (app *WeComApp) SendMultipleInteractionTemplateCardMessage(ctx context.Context, msg message.TxMultipleInteractionTemplateCardMessage) (*RespSendMessage, error)
func (*WeComApp) SendNewsMessage ¶
func (app *WeComApp) SendNewsMessage(ctx context.Context, msg message.TxNewsMessage) (*RespSendMessage, error)
func (*WeComApp) SendNewsNoticeTemplateCardMessage ¶
func (app *WeComApp) SendNewsNoticeTemplateCardMessage(ctx context.Context, msg message.TxNewsNoticeTemplateCardMessage) (*RespSendMessage, error)
func (*WeComApp) SendTextCardMessage ¶
func (app *WeComApp) SendTextCardMessage(ctx context.Context, msg message.TxTextCardMessage) (*RespSendMessage, error)
func (*WeComApp) SendTextMessage ¶
func (app *WeComApp) SendTextMessage(ctx context.Context, msg message.TxTextMessage) (*RespSendMessage, error)
func (*WeComApp) SendTextNoticeTemplateCardMessage ¶
func (app *WeComApp) SendTextNoticeTemplateCardMessage(ctx context.Context, msg message.TxTextNoticeTemplateCardMessage) (*RespSendMessage, error)
func (*WeComApp) SendVideoMessage ¶
func (app *WeComApp) SendVideoMessage(ctx context.Context, msg message.TxVideoMessage) (*RespSendMessage, error)
func (*WeComApp) SendVoiceMessage ¶
func (app *WeComApp) SendVoiceMessage(ctx context.Context, msg message.TxVoiceMessage) (*RespSendMessage, error)
func (*WeComApp) SendVoteInteractionTemplateCardMessage ¶
func (app *WeComApp) SendVoteInteractionTemplateCardMessage(ctx context.Context, msg message.TxVoteInteractionTemplateCardMessage) (*RespSendMessage, error)
func (*WeComApp) SetAccessTokenManager ¶
func (app *WeComApp) SetAccessTokenManager(m TokenManager)
func (*WeComApp) UploadFileMedia ¶
func (*WeComApp) UploadImageMedia ¶
func (*WeComApp) UploadVideoMedia ¶
func (*WeComApp) UploadVoiceMedia ¶
Click to show internal directories.
Click to hide internal directories.