Files
iotlcm/upstream-chan/internal/pub/xjpubservice/httpclient.go

54 lines
1.8 KiB
Go

// ================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package xjpubservice
import (
"context"
xjpubmodel "git.5iot.com/iotlcm-public/iotlcm-upstream-chan/internal/pub/xjpubmodel"
)
type (
IHttpClient interface {
PostObj(ctx context.Context, serviceName string, path string, req interface{}, res interface{}) (err error)
Post(ctx context.Context, serviceName string, path string, req []byte) (res []byte, err error)
AllServerPost(ctx context.Context, serviceName string, path string, req []byte) (resMap map[string][]byte, err error)
}
IUpstreamProxyClient interface {
// 物联网卡在线信息实时查询
QuerySimSession(ctx context.Context, req *xjpubmodel.SimSessionInput) (res *xjpubmodel.SimSessionOutput, err error)
// 物联网卡卡状态查询
QuerySimCardStatus(ctx context.Context, req *xjpubmodel.SimCardStatusInput) (res *xjpubmodel.SimCardStatusOutput, err error)
}
)
var (
localHttpClient IHttpClient
localUpstreamProxyClient IUpstreamProxyClient
)
func HttpClient() IHttpClient {
if localHttpClient == nil {
panic("implement not found for interface IHttpClient, forgot register?")
}
return localHttpClient
}
func RegisterHttpClient(i IHttpClient) {
localHttpClient = i
}
func UpstreamProxyClient() IUpstreamProxyClient {
if localUpstreamProxyClient == nil {
panic("implement not found for interface IUpstreamProxyClient, forgot register?")
}
return localUpstreamProxyClient
}
func RegisterUpstreamProxyClient(i IUpstreamProxyClient) {
localUpstreamProxyClient = i
}