Documentation ¶
Index ¶
- func InjectWebClient(s *WebClient)
- func LoadWebClient() baseiface.ISingleton
- type WebClient
- func (this *WebClient) BindBody(ctx *gin.Context) ([]byte, error)
- func (this *WebClient) CheckServiceExists(ServerName string, checkTimes int) (address string)
- func (this *WebClient) Delete(url string) *basedto.IchubResult
- func (this *WebClient) DeleteWeb(msg *webmsg.WebMsg) (*resty.Response, error)
- func (webcli *WebClient) EsPostWeb(web *webmsg.WebMsg) (*resty.Response, error)
- func (this *WebClient) ExistServiceName() bool
- func (this *WebClient) Get(url string) *basedto.IchubResult
- func (this *WebClient) Get2PageResult(msg *webmsg.WebMsg) *page.PageResult
- func (this *WebClient) Get2Result(msg *webmsg.WebMsg) *basedto.IchubResult
- func (this *WebClient) GetServiceAddr() (address string)
- func (this *WebClient) GetServiceAddrBy(ServerName string) (address string)
- func (this *WebClient) GetServiceAddrs() []*registry.Service
- func (this *WebClient) GetServiceAll(serverName string) []*registry.Service
- func (this *WebClient) GetServiceRpcAddr(sname string) (address string)
- func (this *WebClient) GetWeb(msg *webmsg.WebMsg) (*resty.Response, error)
- func (this *WebClient) GetWeb2Result(webMsg *webmsg.WebMsg) *basedto.IchubResult
- func (this *WebClient) IfServiceExists() bool
- func (this *WebClient) IfTestUrl() bool
- func (this *WebClient) Init() *WebClient
- func (self *WebClient) InitHttpsAndCookie() *resty.Client
- func (client *WebClient) InitRestyClient()
- func (this *WebClient) Post(body, url string) *basedto.IchubResult
- func (this *WebClient) Post2PageResult(msg *webmsg.WebMsg) *page.PageResult
- func (this *WebClient) Post2Result(msg *webmsg.WebMsg) *basedto.IchubResult
- func (this *WebClient) PostBatch(body, url string) *basedto.IchubResults
- func (this *WebClient) PostProxy(msg *webmsg.WebMsg, proxy baseiface.IbaseProxy) *basedto.IchubResult
- func (this *WebClient) PostWeb(msg *webmsg.WebMsg) *page.PageResult
- func (this *WebClient) PostWeb2Resp(msg *webmsg.WebMsg) (*resty.Response, error)
- func (this *WebClient) Put(body []byte, url string) *basedto.IchubResult
- func (this *WebClient) PutWeb(msg *webmsg.WebMsg) (*resty.Response, error)
- func (this *WebClient) ReadCfg()
- func (this *WebClient) RefreshAddr() string
- func (this *WebClient) RefreshAddrErr()
- func (this *WebClient) Resp2IchubResult(resp *resty.Response, err error) *basedto.IchubResult
- func (this *WebClient) Resp2IchubResults(resp *resty.Response, err error) *basedto.IchubResults
- func (this *WebClient) Resp2PageResult(resp *resty.Response, err error) *page.PageResult
- func (this *WebClient) SetBaseUrl(baseUrl string) string
- func (this *WebClient) ValueOf(clientDto *baseconfig.WebClientDto)
- func (this *WebClient) Web(msg *webmsg.WebMsg) (*resty.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InjectWebClient ¶
func InjectWebClient(s *WebClient)
func LoadWebClient ¶
func LoadWebClient() baseiface.ISingleton
Types ¶
type WebClient ¶
type WebClient struct { basedto.BaseEntity // 可测试性 baseurl -> http://xxx.xxx.xxx.xxx:xx TestUrl string `json:"testUrl"` BaseUrl string `json:"baseUrl"` //服务名称 ServerName string `json:"serverName"` // etcd注册服务器地址 xxx.xxx.xxx.xxx:xx EtcdHosts []string `json:"etcdHosts"` Registry registry.Registry `json:"-"` Config *ichubconfig.IchubConfig `json:"-"` WebTimeout time.Duration `json:"webTimeout"` // contains filtered or unexported fields }
func FindBeanWebClient ¶
func FindBeanWebClient() *WebClient
func New ¶
func New(clientDto *baseconfig.WebClientDto) *WebClient
func NewByServiceName ¶
func NewWebClient ¶
func (*WebClient) CheckServiceExists ¶
func (*WebClient) ExistServiceName ¶
func (*WebClient) Get2PageResult ¶
func (this *WebClient) Get2PageResult(msg *webmsg.WebMsg) *page.PageResult
func (*WebClient) Get2Result ¶
func (this *WebClient) Get2Result(msg *webmsg.WebMsg) *basedto.IchubResult
func (*WebClient) GetServiceAddr ¶
func (*WebClient) GetServiceAddrBy ¶
func (*WebClient) GetServiceAddrs ¶
func (*WebClient) GetServiceAll ¶
func (*WebClient) GetServiceRpcAddr ¶
func (*WebClient) GetWeb2Result ¶
func (this *WebClient) GetWeb2Result(webMsg *webmsg.WebMsg) *basedto.IchubResult
func (*WebClient) IfServiceExists ¶
func (*WebClient) InitHttpsAndCookie ¶
func (self *WebClient) InitHttpsAndCookie() *resty.Client
func (*WebClient) InitRestyClient ¶
func (client *WebClient) InitRestyClient()
func (*WebClient) Post2PageResult ¶
func (this *WebClient) Post2PageResult(msg *webmsg.WebMsg) *page.PageResult
func (*WebClient) Post2Result ¶
func (this *WebClient) Post2Result(msg *webmsg.WebMsg) *basedto.IchubResult
func (*WebClient) PostBatch ¶
func (this *WebClient) PostBatch(body, url string) *basedto.IchubResults
func (*WebClient) PostProxy ¶
func (this *WebClient) PostProxy(msg *webmsg.WebMsg, proxy baseiface.IbaseProxy) *basedto.IchubResult
func (*WebClient) PostWeb2Resp ¶
func (*WebClient) RefreshAddr ¶
func (*WebClient) RefreshAddrErr ¶
func (this *WebClient) RefreshAddrErr()
func (*WebClient) Resp2IchubResult ¶
func (this *WebClient) Resp2IchubResult(resp *resty.Response, err error) *basedto.IchubResult
func (*WebClient) Resp2IchubResults ¶
func (this *WebClient) Resp2IchubResults(resp *resty.Response, err error) *basedto.IchubResults
func (*WebClient) Resp2PageResult ¶
func (this *WebClient) Resp2PageResult(resp *resty.Response, err error) *page.PageResult
func (*WebClient) SetBaseUrl ¶
func (*WebClient) ValueOf ¶
func (this *WebClient) ValueOf(clientDto *baseconfig.WebClientDto)
Click to show internal directories.
Click to hide internal directories.