chore: 初始开源发布

iotlcm-openapi:对外 OpenAPI 网关(V3 接口 + 旧版兼容接口)。

- Go module:iotlcm-openapi → git.5iot.com/iotlcm-public/iotlcm-openapi(178 文件)
- 凭据与地址脱敏:JWT signingKey、MySQL DSN、Redis 口令、
  RabbitMQ DSN 全部改为 ${*} 占位;私网 IP → 文档地址段
- 7 处真实手机号 → 合法 11 位编造号
- 启动 banner 统一 IOTLCM 方块字 + 社区惯例署名
- 移除内部资产:CI 触发器
- Dockerfile 改用公共基础镜像,移除 GOPRIVATE 内网设置
- README 重写(原为 GoFrame 模板占位文案),补 Apache-2.0 LICENSE,
  LF 行尾 + .gitattributes
This commit is contained in:
MiFaZhan
2026-10-23 14:15:47 +08:00
commit 88dfe5c640
482 changed files with 34475 additions and 0 deletions
+76
View File
@@ -0,0 +1,76 @@
system:
name: "IotLCM-OpenAPI"
version: "1.0"
description: "IotLCM OpenAPI Service"
gfmode: "dev"
server:
address: ":8000"
openapiPath: "/api.json"
swaggerPath: "/swagger"
maxHeaderBytes: "20KB"
clientMaxBodySize: "200MB"
readTimeout: "20m"
writeTimeout: "20m"
logger:
path: "/app/logs"
file: "{Y-m-d-H}.log"
level: "dev"
timeFormat: "2006-01-02T15:04:05"
stdout: true
header: true
jwt:
signingKey: "${JWT_SIGNING_KEY}"
expiresTime: "7d"
bufferTime: "1d"
issuer: "iotlcm"
database:
logger:
path: "/app/logs/sql"
level: "all"
stdout: true
default:
link: "mysql:${DB_USER}:${DB_PASSWORD}@tcp(${DB_HOST}:3306)/db_iotlcm?charset=utf8mb4&parseTime=True&loc=Asia%2FShanghai"
debug: true
charset: "utf8mb4"
dryRun: false
maxIdle: 30
maxOpen: 100
maxLifetime: 120
cache:
adapter: "redis"
fileDir: "resource/cache"
redis:
default:
mode: "single"
sentinelMasterName: "iotlcm-master"
address: "192.0.2.29:6379"
db: 0
pass: "${REDIS_PASSWORD}"
minIdle: 5
maxIdle: 30
maxActive: 5000
idleTimeout: "60s"
ClientName: "OpenAPICache"
router:
exceptLogin:
- /openapi/v3/query/token
- /openapi/v3/query/operator-token
upstream:
proxy:
address: "localhost:8510"
timeout: "10s"
gateway:
address: "localhost:8110"
timeout: "10s"
rabbitmq:
enabled: true
dsn: "amqp://${MQ_USER}:${MQ_PASSWORD}@${MQ_HOST}/"
@@ -0,0 +1,21 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: template-single
labels:
app: template-single
spec:
replicas: 1
selector:
matchLabels:
app: template-single
template:
metadata:
labels:
app: template-single
spec:
containers:
- name : main
image: template-single
imagePullPolicy: Always
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- service.yaml
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: template-single
spec:
ports:
- port: 80
protocol: TCP
targetPort: 8000
selector:
app: template-single
@@ -0,0 +1,14 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: template-single-configmap
data:
config.yaml: |
server:
address: ":8000"
openapiPath: "/api.json"
swaggerPath: "/swagger"
logger:
level : "all"
stdout: true
@@ -0,0 +1,10 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: template-single
spec:
template:
spec:
containers:
- name : main
image: template-single:develop
@@ -0,0 +1,14 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
- configmap.yaml
patchesStrategicMerge:
- deployment.yaml
namespace: default
+16
View File
@@ -0,0 +1,16 @@
FROM crpi-svwhn8x8nvask31h.cn-beijing.personal.cr.aliyuncs.com/xjzlpublic/alpine
###############################################################################
# INSTALLATION
###############################################################################
ENV WORKDIR /app
ADD resource $WORKDIR/
ADD ./temp/linux_amd64/main $WORKDIR/main
RUN chmod +x $WORKDIR/main
###############################################################################
# START
###############################################################################
WORKDIR $WORKDIR
CMD ./main
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
# This shell is executed before docker build.
View File