chore: 并入 iotlcm-upstream-chan 历史到 upstream-chan/(原提交 1e74497)
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
// ================================================================================
|
||||
// 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
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// ================================================================================
|
||||
// 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 (
|
||||
"git.5iot.com/iotlcm-public/iotlcm-upstream-chan/internal/pub/xjpubmodel"
|
||||
)
|
||||
|
||||
type (
|
||||
IInfo interface {
|
||||
GetInfo() *xjpubmodel.InfoModel
|
||||
SetInfoName(Type string, Name string, Title string, Description string)
|
||||
SetInfoBuild(buildVersion string, buildTime string, commitID string)
|
||||
SetInfoData(data map[string]interface{})
|
||||
GetInfoData() map[string]interface{}
|
||||
AddInfoData(key string, value interface{})
|
||||
DelInfoData(key string)
|
||||
GetInfoDataByKey(key string) interface{}
|
||||
}
|
||||
IInfoRpc interface {
|
||||
GetInfo() *xjpubmodel.InfoModel
|
||||
SetInfoName(Type string, Name string, Title string, Description string)
|
||||
SetInfoBuild(buildVersion string, buildTime string, commitID string)
|
||||
SetInfoData(data map[string]interface{})
|
||||
GetInfoData() map[string]interface{}
|
||||
AddInfoData(key string, value interface{})
|
||||
DelInfoData(key string)
|
||||
GetInfoDataByKey(key string) interface{}
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localInfo IInfo
|
||||
localInfoRpc IInfoRpc
|
||||
)
|
||||
|
||||
func Info() IInfo {
|
||||
if localInfo == nil {
|
||||
panic("implement not found for interface IInfo, forgot register?")
|
||||
}
|
||||
return localInfo
|
||||
}
|
||||
|
||||
func RegisterInfo(i IInfo) {
|
||||
localInfo = i
|
||||
}
|
||||
|
||||
func InfoRpc() IInfoRpc {
|
||||
if localInfoRpc == nil {
|
||||
panic("implement not found for interface IInfoRpc, forgot register?")
|
||||
}
|
||||
return localInfoRpc
|
||||
}
|
||||
|
||||
func RegisterInfoRpc(i IInfoRpc) {
|
||||
localInfoRpc = i
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
// ================================================================================
|
||||
// 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"
|
||||
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
)
|
||||
|
||||
type (
|
||||
IMiddleware interface {
|
||||
// 响应处理中间件
|
||||
ResponseHandler(r *ghttp.Request)
|
||||
// CORS 跨域处理
|
||||
CORS(r *ghttp.Request)
|
||||
// IsExceptLogin 判断是否需要验证登录
|
||||
IsExceptLogin(ctx context.Context, path string) bool
|
||||
// ResponseHandlerRaw 返回处理中间件
|
||||
ResponseHandlerRaw(r *ghttp.Request)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localMiddleware IMiddleware
|
||||
)
|
||||
|
||||
func Middleware() IMiddleware {
|
||||
if localMiddleware == nil {
|
||||
panic("implement not found for interface IMiddleware, forgot register?")
|
||||
}
|
||||
return localMiddleware
|
||||
}
|
||||
|
||||
func RegisterMiddleware(i IMiddleware) {
|
||||
localMiddleware = i
|
||||
}
|
||||
Reference in New Issue
Block a user