Go to file
yanweidong 75aa6ae647 dev 2025-09-23 13:09:27 +08:00
cache/redis ``` 2025-09-20 10:55:06 +08:00
cmd cmd 2025-02-07 14:12:04 +08:00
conf feat(conf/new.go): 添加配置文件不存在时的处理逻辑及环境变量替换 2025-09-18 13:34:35 +08:00
crypto ``` 2025-09-23 11:02:25 +08:00
data add sync map data. 2025-05-03 15:49:16 +08:00
database ``` 2025-09-23 12:37:00 +08:00
env feat:ok 2025-02-07 20:33:27 +08:00
errcode add err code 2025-04-19 20:14:37 +08:00
infra fix infra response 2025-04-18 19:11:50 +08:00
licence fix licence watch 2025-05-28 15:58:28 +08:00
middleware add middleware for CORS and mode configuration 2025-09-02 10:01:09 +08:00
oplog fix 操作痕迹可选加密 2025-09-01 12:40:23 +08:00
print feat:service mod 2025-03-29 15:02:49 +08:00
queue/nats feat:ok 2025-02-07 20:33:27 +08:00
service dev 2025-09-23 13:09:27 +08:00
third add third 2025-04-06 13:42:44 +08:00
types fix 2025-07-25 15:10:59 +08:00
utils ``` 2025-09-22 19:02:38 +08:00
vars feat(vars): 添加 OK 状态码 2025-09-12 23:27:14 +08:00
with ``` 2025-09-23 12:37:00 +08:00
README.md ``` 2025-09-22 19:02:38 +08:00
go.mod build(go): 移除 go.mod 中所有依赖项声明 2025-09-22 19:03:20 +08:00
go.sum build(go): 移除 go.mod 中所有依赖项声明 2025-09-22 19:03:20 +08:00

README.md

BSM-SDK Core

BSM-SDK Core 是一个企业级后端开发工具包的核心模块,提供了加密解密、配置管理、缓存、数据库访问、中间件等基础功能。

私有仓库设置

go env -w GOPRIVATE=git.apinb.com/*
go env -w GONOPROXY=git.apinb.com/*
go env -w GOINSECURE=git.apinb.com/*
go env -w GONOSUMDB=git.apinb.com/*

功能模块

加密与解密 (crypto)

GCM加密

AESGCMEncrypt // GCM 加密
AESGCMDecrypt // GCM 解密

CBC加密

Encrypt // CBC加密
Decrypt // CBC解密

ECB加密

AesEncryptECB // ECB加密
AesDecryptECB // ECB解密

环境变量检测

AesKeyCheck // 秘钥环境变量检测

缓存 (cache)

支持 Redis 和内存缓存。

数据库 (database)

支持 MySQL 和 PostgreSQL 数据库连接和管理。

中间件 (middleware)

提供 CORS、JWT 认证、运行模式控制等中间件功能。

消息队列 (queue)

集成 NATS 消息队列。

工具类 (utils)

提供 JSON 处理、时间处理、随机数生成等通用工具函数。