12345678910111213141516171819 |
- package wechat
- import (
- "kpt-tmr-group/config"
- "kpt-tmr-group/pkg/di"
- "net/http"
- )
- type Service interface {
- doRequest(req *http.Request) ([]byte, error)
- DoGet(url string) ([]byte, error)
- DoPost(url string, body interface{}) ([]byte, error)
- }
- var Module = di.Provide(NewService)
- func NewService(cfg *config.AppConfig) *ClientService {
- return NewClientService(cfg.WechatSetting.Appid, cfg.WechatSetting.Secret)
- }
|