Documentation ¶
Index ¶
- Constants
- type Service
- type WxaService
- func (wxa *WxaService) CheckSignature(timestamp string, nonce string, signature string) bool
- func (wxa *WxaService) Get(url string, params *map[string]interface{}, resp interface{}) error
- func (wxa *WxaService) GetAccessToken() (string, error)
- func (wxa *WxaService) GetConfig() (cfg *config.Config)
- func (wxa *WxaService) GetFile(url string, params *map[string]interface{}) ([]byte, error)
- func (wxa *WxaService) GetKfService() *wxaKfService
- func (wxa *WxaService) GetQrCodeService() *wxaQrCodeService
- func (wxa *WxaService) GetSubscribeMsgService() *wxaSubscribeMsgService
- func (wxa *WxaService) GetUniformMessageService() *wxaUniformMessageService
- func (wxa *WxaService) GetUserService() *wxaUserService
- func (wxa *WxaService) Post(url string, data *map[string]interface{}, resp interface{}) error
- func (wxa *WxaService) PostFile(url string, data *map[string]interface{}) ([]byte, error)
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface { // get请求 Get(url string, params *map[string]interface{}, resp interface{}) error // post请求 Post(url string, data *map[string]interface{}, resp interface{}) error // get请求,请求文件 GetFile(url string, params *map[string]interface{}) ([]byte, error) // postFile请求 PostFile(url string, data *map[string]interface{}) ([]byte, error) // 执行请求 //Execute(method string, uri string, data *map[string]interface{}, resp interface{}) error // 获取access_token GetAccessToken() (string, error) // 验证消息的确来自微信服务器. CheckSignature(timestamp string, nonce string, signature string) bool // 获取Config配置 GetConfig() *config.Config }
type WxaService ¶
type WxaService struct {
// contains filtered or unexported fields
}
func NewInMemory ¶
func NewInMemory(wxaConfig *config.WxaInMemoryConfig) *WxaService
基于内存管理 access_token
func NewInRedis ¶
func NewInRedis(wxaConfig *config.WxaInRedisConfig) *WxaService
基于Redis管理 access_token
func (*WxaService) CheckSignature ¶
func (wxa *WxaService) CheckSignature(timestamp string, nonce string, signature string) bool
func (*WxaService) Get ¶
func (wxa *WxaService) Get(url string, params *map[string]interface{}, resp interface{}) error
func (*WxaService) GetAccessToken ¶
func (wxa *WxaService) GetAccessToken() (string, error)
获取access_token
func (*WxaService) GetConfig ¶
func (wxa *WxaService) GetConfig() (cfg *config.Config)
func (*WxaService) GetFile ¶
func (wxa *WxaService) GetFile(url string, params *map[string]interface{}) ([]byte, error)
func (*WxaService) GetKfService ¶
func (wxa *WxaService) GetKfService() *wxaKfService
func (*WxaService) GetQrCodeService ¶
func (wxa *WxaService) GetQrCodeService() *wxaQrCodeService
func (*WxaService) GetSubscribeMsgService ¶
func (wxa *WxaService) GetSubscribeMsgService() *wxaSubscribeMsgService
func (*WxaService) GetUniformMessageService ¶
func (wxa *WxaService) GetUniformMessageService() *wxaUniformMessageService
func (*WxaService) GetUserService ¶
func (wxa *WxaService) GetUserService() *wxaUserService
Click to show internal directories.
Click to hide internal directories.