chore: 初始开源发布

iotlcm-upstream-proxy:渠道缓存与转发网关。

- 内联原私有依赖:yunze-public → internal/pub/(18 文件),
  yunze-pb/pb → internal/pb/(9 文件);Consul 注册改用官方
  gogf/gf/contrib/registry/consul/v2(API 兼容)
- Go module:yz-svr → git.5iot.com/iotlcm-public/iotlcm-upstream-proxy
- 凭据与内部标识脱敏:MySQL/Redis/Consul 凭据、私网与生产 IP、内网域名
- 移除内部资产:CI 触发器
- Dockerfile 改用公共基础镜像,移除写死的 registry 凭据
- 补 Apache-2.0 LICENSE,重写 README,LF 行尾 + .gitattributes
This commit is contained in:
MiFaZhan
2026-10-22 15:46:43 +08:00
commit 82466d587d
110 changed files with 7932 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// TApi is the golang structure of table t_api for DAO operations like Where/Data.
type TApi struct {
g.Meta `orm:"table:t_api, do:true"`
Id any // ID
AppKey any // APPKey
AppSecret any // APPSecret
RateLimitPeriod any // 限流周期(秒,0:不限流)
RateLimitCount any // 限流次数
DeptId any // 所属机构
TenantId any // 租户ID
CreatedDept any // 创建部门
CreatedBy any // 创建者
CreatedAt *gtime.Time // 创建时间
UpdatedBy any // 更新者
UpdatedAt *gtime.Time // 更新时间
}
+35
View File
@@ -0,0 +1,35 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// TCustomer is the golang structure of table t_customer for DAO operations like Where/Data.
type TCustomer struct {
g.Meta `orm:"table:t_customer, do:true"`
Id any // ID
CKey any // 客户编号
CType any // 客户类型(0:企业,1:个人)
CName any // 客户名称
CShortName any // 客户简称
ContactUserName any // 联系人
ContactPhone any // 联系电话
LicenseNumber any // 统一社会信用代码
RegionCode any // 行政区域代码
Address any // 地址
DepositAmount any // 预存金额
CreditAmountTotal any // 已授信额度
CreditAmountUsed any // 已使用授信额度
DeptId any // 所属机构
TenantId any // 租户ID
CreatedDept any // 创建部门
CreatedBy any // 创建者
CreatedAt *gtime.Time // 创建时间
UpdatedBy any // 更新者
UpdatedAt *gtime.Time // 更新时间
}
+34
View File
@@ -0,0 +1,34 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// TSimAgentPackage is the golang structure of table t_sim_agent_package for DAO operations like Where/Data.
type TSimAgentPackage struct {
g.Meta `orm:"table:t_sim_agent_package, do:true"`
Id any // ID
PackageKey any // 套餐分类编码
PackageName any // 套餐分类名称
ParentPackageKey any // 上级套餐分类编码
PackageStatus any // 是否启用(0:未启用,1启用)
BillingMethod any // 计费方式(0:月,1:季,2:年)
ChannelPrice any // 渠道价格
MonthlyFee any // 月租费
PackageDataMb any // 套餐流量(MB)
PackageDataGb any // 套餐流量(GB)
ValidityPeriod any // 有效期
Description any // 描述信息
OrderNum any // 排序
TenantId any // 租户ID
CreatedDept any // 创建部门
CreatedBy any // 创建者
CreatedAt *gtime.Time // 创建时间
UpdatedBy any // 更新者
UpdatedAt *gtime.Time // 更新时间
}
+29
View File
@@ -0,0 +1,29 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// TSimAgentPacket is the golang structure of table t_sim_agent_packet for DAO operations like Where/Data.
type TSimAgentPacket struct {
g.Meta `orm:"table:t_sim_agent_packet, do:true"`
Id any // ID
PackageKey any // 套餐分类编码
PacketKey any // 套餐编码
PacketName any // 套餐名称
ValidityPeriod any // 套餐有效期(月份)
PacketStatus any // 是否启用(0:未启用,1启用)
DiscountPercent any // 折扣率(百分比)
Description any // 描述信息
TenantId any // 租户ID
CreatedDept any // 创建部门
CreatedBy any // 创建者
CreatedAt *gtime.Time // 创建时间
UpdatedBy any // 更新者
UpdatedAt *gtime.Time // 更新时间
}
+73
View File
@@ -0,0 +1,73 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// TSimCardInfo is the golang structure of table t_sim_card_info for DAO operations like Where/Data.
type TSimCardInfo struct {
g.Meta `orm:"table:t_sim_card_info, do:true"`
Id any // ID
Msisdn any // SIM号码
Iccid any // SIM卡号
Imsi any // SIM识别码
Imei any // IMEI
OpenDate *gtime.Time // 开卡日期(运营商)
ActivateDate *gtime.Time // 激活时间(运营商)
AllocationBatch any // 划拨批次
AllocationDate *gtime.Time // 划拨日期
ChanKey any // 通道编号
IsPool any // 是否流量池(0:否,1:是)
PoolKey any // 流量池编号
BatchKey any // 入库批次
BatchDate *gtime.Time // 入库日期
PackageKey any // 套餐分类编码
CurrPacketKey any // 当前套餐编码
AllowPacketChange any // 是否允许更改套餐(0:否 1:是)
CardStatus any // 卡状态
ValidityPeriod any // 有效期(月份)
ExpiryDate *gtime.Time // 套餐到期日期
UpstreamExpiryDate *gtime.Time // 上游到期时间(运营商)
IpType any // IP版本(人工录入)
NetModel any // 网络模式(人工录入)
RegionCode any // 行政区域代码(省市)
HasOffNet any // 是否开启达量断网
OffNetQuota any // 达量断网阈值(MB)
OffNetExpiryDate *gtime.Time // 达量断网过期时间
AgentShowField any // 客户展示字段设置
AgentShowValue any // 客户展示字段数据
HasTestPeriod any // 是否有测试期(0:无,1:有)
TestPeriod any // 测试期(天)
TestPeriodExpiryDate *gtime.Time // 测试期过期日期
HasSilentPeriod any // 是否有沉默期(0:无,1:有)
SilentPeriod any // 沉默期(月)
SilentPeriodExpiryDate *gtime.Time // 沉默期过期日期
HasAdditional any // 是否有附加费用(0:无 1:有)
AdditionalMultiplier any // 附加费用倍数
AdditionalAmount any // 附加金额
DataService any // 数据服务(0:关闭 1:开启)
DataTotalAmount any // 套餐流量(MB)
DataUseAmount any // 已用流量(MB)
SmsService any // 短信服务(0:关闭 1:开启)
SmsTotalAmount any // 套餐短信数量
SmsUseAmount any // 已用短信数量
VoiceService any // 语音服务(0:关闭 1:开启)
VoiceTotalAmount any // 套餐通话分钟数
VoiceUseAmount any // 已用通话分钟数
IntlRoamingService any // 国际漫游服务(0:关闭 1:开启)
IntlRoamingTotalAmount any // 套餐国际漫游流量(MB)
IntlRoamingUseAmount any // 已用国际漫游流量(MB)
Description any // 描述信息
DeptId any // 所属机构
TenantId any // 租户ID
CreatedDept any // 创建部门
CreatedBy any // 创建者
CreatedAt *gtime.Time // 创建时间
UpdatedBy any // 更新者
UpdatedAt *gtime.Time // 更新时间
}
@@ -0,0 +1,27 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// TSimChannelTemplate is the golang structure of table t_sim_channel_template for DAO operations like Where/Data.
type TSimChannelTemplate struct {
g.Meta `orm:"table:t_sim_channel_template, do:true"`
Id any // ID
TempKey any // 模板标识
TempName any // 模板名称
TempModel any // 模板模型
TempConfig any // 模板配置
TempStatus any // 模板状态(0未启用,1启用)
TenantId any // 租户ID
CreatedDept any // 创建部门
CreatedBy any // 创建者
CreatedAt *gtime.Time // 创建时间
UpdatedBy any // 更新者
UpdatedAt *gtime.Time // 更新时间
}
+35
View File
@@ -0,0 +1,35 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// TSimChannels is the golang structure of table t_sim_channels for DAO operations like Where/Data.
type TSimChannels struct {
g.Meta `orm:"table:t_sim_channels, do:true"`
Id any // ID
TempKey any // 模板标识
ChanKey any // 通道编号
ChanName any // 通道名称
ChanConfig any // 通道配置
ChanStatus any // 通道状态(0未启用,1启用)
ChanAlias any // 通道别名
RegionCode any // 通道行政区域代码(省市)
AppKey any // 应用标识
AppSecret any // 应用密钥
AccessToken any // 接口调用凭证
AccessTokenCreated *gtime.Time // 凭证申请时间
AccessTokenExpire *gtime.Time // 凭证过期时间
RefreshToken any // 刷新凭证
TenantId any // 租户ID
CreatedDept any // 创建部门
CreatedBy any // 创建者
CreatedAt *gtime.Time // 创建时间
UpdatedBy any // 更新者
UpdatedAt *gtime.Time // 更新时间
}
+25
View File
@@ -0,0 +1,25 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// TApi is the golang structure for table t_api.
type TApi struct {
Id int64 `json:"id" orm:"id" description:"ID"`
AppKey string `json:"appKey" orm:"app_key" description:"APPKey"`
AppSecret string `json:"appSecret" orm:"app_secret" description:"APPSecret"`
RateLimitPeriod int `json:"rateLimitPeriod" orm:"rate_limit_period" description:"限流周期(秒,0:不限流)"`
RateLimitCount int `json:"rateLimitCount" orm:"rate_limit_count" description:"限流次数"`
DeptId int64 `json:"deptId" orm:"dept_id" description:"所属机构"`
TenantId string `json:"tenantId" orm:"tenant_id" description:"租户ID"`
CreatedDept int64 `json:"createdDept" orm:"created_dept" description:"创建部门"`
CreatedBy int64 `json:"createdBy" orm:"created_by" description:"创建者"`
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"更新者"`
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
}
+33
View File
@@ -0,0 +1,33 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// TCustomer is the golang structure for table t_customer.
type TCustomer struct {
Id int64 `json:"id" orm:"id" description:"ID"`
CKey string `json:"cKey" orm:"c_key" description:"客户编号"`
CType int `json:"cType" orm:"c_type" description:"客户类型(0:企业,1:个人)"`
CName string `json:"cName" orm:"c_name" description:"客户名称"`
CShortName string `json:"cShortName" orm:"c_short_name" description:"客户简称"`
ContactUserName string `json:"contactUserName" orm:"contact_user_name" description:"联系人"`
ContactPhone string `json:"contactPhone" orm:"contact_phone" description:"联系电话"`
LicenseNumber string `json:"licenseNumber" orm:"license_number" description:"统一社会信用代码"`
RegionCode string `json:"regionCode" orm:"region_code" description:"行政区域代码"`
Address string `json:"address" orm:"address" description:"地址"`
DepositAmount float64 `json:"depositAmount" orm:"deposit_amount" description:"预存金额"`
CreditAmountTotal float64 `json:"creditAmountTotal" orm:"credit_amount_total" description:"已授信额度"`
CreditAmountUsed float64 `json:"creditAmountUsed" orm:"credit_amount_used" description:"已使用授信额度"`
DeptId int64 `json:"deptId" orm:"dept_id" description:"所属机构"`
TenantId string `json:"tenantId" orm:"tenant_id" description:"租户ID"`
CreatedDept int64 `json:"createdDept" orm:"created_dept" description:"创建部门"`
CreatedBy int64 `json:"createdBy" orm:"created_by" description:"创建者"`
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"更新者"`
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
}
@@ -0,0 +1,32 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// TSimAgentPackage is the golang structure for table t_sim_agent_package.
type TSimAgentPackage struct {
Id int64 `json:"id" orm:"id" description:"ID"`
PackageKey string `json:"packageKey" orm:"package_key" description:"套餐分类编码"`
PackageName string `json:"packageName" orm:"package_name" description:"套餐分类名称"`
ParentPackageKey string `json:"parentPackageKey" orm:"parent_package_key" description:"上级套餐分类编码"`
PackageStatus int `json:"packageStatus" orm:"package_status" description:"是否启用(0:未启用,1启用)"`
BillingMethod int `json:"billingMethod" orm:"billing_method" description:"计费方式(0:月,1:季,2:年)"`
ChannelPrice float64 `json:"channelPrice" orm:"channel_price" description:"渠道价格"`
MonthlyFee float64 `json:"monthlyFee" orm:"monthly_fee" description:"月租费"`
PackageDataMb float64 `json:"packageDataMb" orm:"package_data_mb" description:"套餐流量(MB)"`
PackageDataGb float64 `json:"packageDataGb" orm:"package_data_gb" description:"套餐流量(GB)"`
ValidityPeriod string `json:"validityPeriod" orm:"validity_period" description:"有效期"`
Description string `json:"description" orm:"description" description:"描述信息"`
OrderNum int `json:"orderNum" orm:"order_num" description:"排序"`
TenantId string `json:"tenantId" orm:"tenant_id" description:"租户ID"`
CreatedDept int64 `json:"createdDept" orm:"created_dept" description:"创建部门"`
CreatedBy int64 `json:"createdBy" orm:"created_by" description:"创建者"`
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"更新者"`
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
}
@@ -0,0 +1,27 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// TSimAgentPacket is the golang structure for table t_sim_agent_packet.
type TSimAgentPacket struct {
Id int64 `json:"id" orm:"id" description:"ID"`
PackageKey string `json:"packageKey" orm:"package_key" description:"套餐分类编码"`
PacketKey string `json:"packetKey" orm:"packet_key" description:"套餐编码"`
PacketName string `json:"packetName" orm:"packet_name" description:"套餐名称"`
ValidityPeriod int `json:"validityPeriod" orm:"validity_period" description:"套餐有效期(月份)"`
PacketStatus int `json:"packetStatus" orm:"packet_status" description:"是否启用(0:未启用,1启用)"`
DiscountPercent int `json:"discountPercent" orm:"discount_percent" description:"折扣率(百分比)"`
Description string `json:"description" orm:"description" description:"描述信息"`
TenantId string `json:"tenantId" orm:"tenant_id" description:"租户ID"`
CreatedDept int64 `json:"createdDept" orm:"created_dept" description:"创建部门"`
CreatedBy int64 `json:"createdBy" orm:"created_by" description:"创建者"`
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"更新者"`
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
}
+71
View File
@@ -0,0 +1,71 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// TSimCardInfo is the golang structure for table t_sim_card_info.
type TSimCardInfo struct {
Id int64 `json:"id" orm:"id" description:"ID"`
Msisdn string `json:"msisdn" orm:"msisdn" description:"SIM号码"`
Iccid string `json:"iccid" orm:"iccid" description:"SIM卡号"`
Imsi string `json:"imsi" orm:"imsi" description:"SIM识别码"`
Imei string `json:"imei" orm:"imei" description:"IMEI"`
OpenDate *gtime.Time `json:"openDate" orm:"open_date" description:"开卡日期(运营商)"`
ActivateDate *gtime.Time `json:"activateDate" orm:"activate_date" description:"激活时间(运营商)"`
AllocationBatch string `json:"allocationBatch" orm:"allocation_batch" description:"划拨批次"`
AllocationDate *gtime.Time `json:"allocationDate" orm:"allocation_date" description:"划拨日期"`
ChanKey string `json:"chanKey" orm:"chan_key" description:"通道编号"`
IsPool int `json:"isPool" orm:"is_pool" description:"是否流量池(0:否,1:是)"`
PoolKey string `json:"poolKey" orm:"pool_key" description:"流量池编号"`
BatchKey string `json:"batchKey" orm:"batch_key" description:"入库批次"`
BatchDate *gtime.Time `json:"batchDate" orm:"batch_date" description:"入库日期"`
PackageKey string `json:"packageKey" orm:"package_key" description:"套餐分类编码"`
CurrPacketKey string `json:"currPacketKey" orm:"curr_packet_key" description:"当前套餐编码"`
AllowPacketChange int `json:"allowPacketChange" orm:"allow_packet_change" description:"是否允许更改套餐(0:否 1:是)"`
CardStatus int `json:"cardStatus" orm:"card_status" description:"卡状态"`
ValidityPeriod int `json:"validityPeriod" orm:"validity_period" description:"有效期(月份)"`
ExpiryDate *gtime.Time `json:"expiryDate" orm:"expiry_date" description:"套餐到期日期"`
UpstreamExpiryDate *gtime.Time `json:"upstreamExpiryDate" orm:"upstream_expiry_date" description:"上游到期时间(运营商)"`
IpType string `json:"ipType" orm:"ip_type" description:"IP版本(人工录入)"`
NetModel string `json:"netModel" orm:"net_model" description:"网络模式(人工录入)"`
RegionCode string `json:"regionCode" orm:"region_code" description:"行政区域代码(省市)"`
HasOffNet int `json:"hasOffNet" orm:"has_off_net" description:"是否开启达量断网"`
OffNetQuota float64 `json:"offNetQuota" orm:"off_net_quota" description:"达量断网阈值(MB)"`
OffNetExpiryDate *gtime.Time `json:"offNetExpiryDate" orm:"off_net_expiry_date" description:"达量断网过期时间"`
AgentShowField string `json:"agentShowField" orm:"agent_show_field" description:"客户展示字段设置"`
AgentShowValue string `json:"agentShowValue" orm:"agent_show_value" description:"客户展示字段数据"`
HasTestPeriod int `json:"hasTestPeriod" orm:"has_test_period" description:"是否有测试期(0:无,1:有)"`
TestPeriod int `json:"testPeriod" orm:"test_period" description:"测试期(天)"`
TestPeriodExpiryDate *gtime.Time `json:"testPeriodExpiryDate" orm:"test_period_expiry_date" description:"测试期过期日期"`
HasSilentPeriod int `json:"hasSilentPeriod" orm:"has_silent_period" description:"是否有沉默期(0:无,1:有)"`
SilentPeriod int `json:"silentPeriod" orm:"silent_period" description:"沉默期(月)"`
SilentPeriodExpiryDate *gtime.Time `json:"silentPeriodExpiryDate" orm:"silent_period_expiry_date" description:"沉默期过期日期"`
HasAdditional int `json:"hasAdditional" orm:"has_additional" description:"是否有附加费用(0:无 1:有)"`
AdditionalMultiplier float64 `json:"additionalMultiplier" orm:"additional_multiplier" description:"附加费用倍数"`
AdditionalAmount float64 `json:"additionalAmount" orm:"additional_amount" description:"附加金额"`
DataService int `json:"dataService" orm:"data_service" description:"数据服务(0:关闭 1:开启)"`
DataTotalAmount float64 `json:"dataTotalAmount" orm:"data_total_amount" description:"套餐流量(MB)"`
DataUseAmount float64 `json:"dataUseAmount" orm:"data_use_amount" description:"已用流量(MB)"`
SmsService int `json:"smsService" orm:"sms_service" description:"短信服务(0:关闭 1:开启)"`
SmsTotalAmount float64 `json:"smsTotalAmount" orm:"sms_total_amount" description:"套餐短信数量"`
SmsUseAmount float64 `json:"smsUseAmount" orm:"sms_use_amount" description:"已用短信数量"`
VoiceService int `json:"voiceService" orm:"voice_service" description:"语音服务(0:关闭 1:开启)"`
VoiceTotalAmount float64 `json:"voiceTotalAmount" orm:"voice_total_amount" description:"套餐通话分钟数"`
VoiceUseAmount float64 `json:"voiceUseAmount" orm:"voice_use_amount" description:"已用通话分钟数"`
IntlRoamingService int `json:"intlRoamingService" orm:"intl_roaming_service" description:"国际漫游服务(0:关闭 1:开启)"`
IntlRoamingTotalAmount float64 `json:"intlRoamingTotalAmount" orm:"intl_roaming_total_amount" description:"套餐国际漫游流量(MB)"`
IntlRoamingUseAmount float64 `json:"intlRoamingUseAmount" orm:"intl_roaming_use_amount" description:"已用国际漫游流量(MB)"`
Description string `json:"description" orm:"description" description:"描述信息"`
DeptId int64 `json:"deptId" orm:"dept_id" description:"所属机构"`
TenantId string `json:"tenantId" orm:"tenant_id" description:"租户ID"`
CreatedDept int64 `json:"createdDept" orm:"created_dept" description:"创建部门"`
CreatedBy int64 `json:"createdBy" orm:"created_by" description:"创建者"`
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"更新者"`
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
}
@@ -0,0 +1,25 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// TSimChannelTemplate is the golang structure for table t_sim_channel_template.
type TSimChannelTemplate struct {
Id int64 `json:"id" orm:"id" description:"ID"`
TempKey string `json:"tempKey" orm:"temp_key" description:"模板标识"`
TempName string `json:"tempName" orm:"temp_name" description:"模板名称"`
TempModel string `json:"tempModel" orm:"temp_model" description:"模板模型"`
TempConfig string `json:"tempConfig" orm:"temp_config" description:"模板配置"`
TempStatus int `json:"tempStatus" orm:"temp_status" description:"模板状态(0未启用,1启用)"`
TenantId string `json:"tenantId" orm:"tenant_id" description:"租户ID"`
CreatedDept int64 `json:"createdDept" orm:"created_dept" description:"创建部门"`
CreatedBy int64 `json:"createdBy" orm:"created_by" description:"创建者"`
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"更新者"`
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
}
+33
View File
@@ -0,0 +1,33 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// TSimChannels is the golang structure for table t_sim_channels.
type TSimChannels struct {
Id int64 `json:"id" orm:"id" description:"ID"`
TempKey string `json:"tempKey" orm:"temp_key" description:"模板标识"`
ChanKey string `json:"chanKey" orm:"chan_key" description:"通道编号"`
ChanName string `json:"chanName" orm:"chan_name" description:"通道名称"`
ChanConfig string `json:"chanConfig" orm:"chan_config" description:"通道配置"`
ChanStatus int `json:"chanStatus" orm:"chan_status" description:"通道状态(0未启用,1启用)"`
ChanAlias string `json:"chanAlias" orm:"chan_alias" description:"通道别名"`
RegionCode string `json:"regionCode" orm:"region_code" description:"通道行政区域代码(省市)"`
AppKey string `json:"appKey" orm:"app_key" description:"应用标识"`
AppSecret string `json:"appSecret" orm:"app_secret" description:"应用密钥"`
AccessToken string `json:"accessToken" orm:"access_token" description:"接口调用凭证"`
AccessTokenCreated *gtime.Time `json:"accessTokenCreated" orm:"access_token_created" description:"凭证申请时间"`
AccessTokenExpire *gtime.Time `json:"accessTokenExpire" orm:"access_token_expire" description:"凭证过期时间"`
RefreshToken string `json:"refreshToken" orm:"refresh_token" description:"刷新凭证"`
TenantId string `json:"tenantId" orm:"tenant_id" description:"租户ID"`
CreatedDept int64 `json:"createdDept" orm:"created_dept" description:"创建部门"`
CreatedBy int64 `json:"createdBy" orm:"created_by" description:"创建者"`
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"更新者"`
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
}
+43
View File
@@ -0,0 +1,43 @@
package model
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-upstream-proxy/internal/model/entity"
"github.com/gogf/gf/v2/os/gtime"
)
type SimChannelConfigItemCache struct {
Template *entity.TSimChannelTemplate
Channel *entity.TSimChannels
IsNormal *int // global_yes_or_no: 0=yes, 1=no; NULL is not eligible.
Version string
}
// CanCreateInstance determines whether a channel may have a runtime instance.
func (c *SimChannelConfigItemCache) CanCreateInstance() bool {
return c != nil && c.Channel != nil && c.IsNormal != nil && *c.IsNormal == 0
}
type SimCardTempI interface {
NewTemp(ctx context.Context, channelConfig *SimChannelConfigItemCache) SimCardChannelI
}
// 接口定义
type SimCardChannelI interface {
SimBase(ctx context.Context, input *SimBaseReqJson) (SimBaseResJson, error)
}
type SimCardChannelCache struct {
Instance SimCardChannelI
Version string
}
type UpdateAccessTokenInput struct {
ChanKey string
AccessToken string
AccessTokenCreated *gtime.Time
AccessTokenExpire *gtime.Time
RefreshToken string
RefreshTokenExpire *gtime.Time
}
+36
View File
@@ -0,0 +1,36 @@
package model
import "encoding/json"
// 物联网卡标识
type SimKey struct {
ChanKey string `json:"chanKey" dc:"通道标识"`
ICCID string `json:"iccid" dc:"联网卡集成电路卡识别码20位"`
IMSI string `json:"imsi" dc:"国际移动用户识别码"`
MSISDN string `json:"msisdn" dc:"移动用户识别码"`
}
// 物联网卡基础请求参数
type SimBaseReq[T any] struct {
SimKeys []*SimKey `json:"simKeys" dc:"SIM卡标识列表"`
ReqData T `json:"reqData" dc:"请求数据"`
}
// 响应数据参数
type SimResponseData[T any] struct {
Code int `json:"code" dc:"状态码"`
Message string `json:"message" dc:"消息"`
Data T `json:"data" dc:"数据"`
}
// 物联网卡基础响应参数
type SimBaseRes[T any] struct {
Code int `json:"code" dc:"状态码"`
Message string `json:"message" dc:"消息"`
ErrCode string `json:"errCode" dc:"运营商原始错误码"`
SimKey *SimKey `json:"simKey" dc:"SIM卡标识"`
ResData T `json:"resData" dc:"响应数据"`
}
type SimBaseReqJson = SimBaseReq[json.RawMessage]
type SimBaseResJson = []*SimBaseRes[json.RawMessage]