
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
github.com/perfectzoo/cat-todolist
Advanced tools
gin+grpc+gorm+etcd+mysql 的备忘录功能
api-gateway/
├── cmd // 启动入口
├── config // 配置文件
├── discovery // etcd服务注册、keep-alive、获取服务信息等等
├── internal // 业务逻辑(不对外暴露)
│ ├── handler // 视图层
│ └── service // 服务层
│ └──pb // 放置生成的pb文件
├── logs // 放置打印日志模块
├── middleware // 中间件
├── pkg // 各种包
│ ├── e // 统一错误状态码
│ ├── res // 统一response接口返回
│ └── util // 各种工具、JWT、Logger等等..
├── routes // http路由模块
└── wrappers // 各个服务之间的熔断降级
user/
├── cmd // 启动入口
├── config // 配置文件
├── discovery // etcd服务注册、keep-alive、获取服务信息等等
├── internal // 业务逻辑(不对外暴露)
│ ├── handler // 视图层
│ ├── cache // 缓存模块
│ ├── repository // 持久层
│ └── service // 服务层
│ └──pb // 放置生成的pb文件
├── logs // 放置打印日志模块
└── pkg // 各种包
├── e // 统一错误状态码
├── res // 统一response接口返回
└── util // 各种工具、JWT、Logger等等..
现在已经新建了t0分支,欢迎大家将自己的想法pr到t0分支,测试无误之后,我们将合并到main分支。
各模块下的config/config.yml文件
server:
# 模块
domain: user
# 模块名称
version: 1.0
# 模块版本
grpcAddress: "127.0.0.1:10001"
# grpc地址
datasource:
# mysql数据源
driverName: mysqlMaster
host: 127.0.0.1
port: 3306
database: basicInfo
# 数据库名
username: root
password: root
charset: utf8mb4
etcd:
# etcd 配置
address: 127.0.0.1:2379
redis:
# redis 配置
address: 127.0.0.1:6379
password:
打开postman,点击导入

选择导入文件


效果

保证etcd处于运行状态。
go mod tidy
go run main.go
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.