Help us shape the future of Go! Take the 2026 Go Developer Survey

ekit-handler

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: MIT

README

ekit-handler

HTTP handler 层——通用 CRUD Handler、Hertz 参数绑定、版本信息端点。

本仓库是 ekit 拆分矩阵的成员(Round-3 自 ekit-hertz 迁出)。

安装

go get github.com/yi-nology/ekit-handler@v0.1.0

包清单

  • crudh/ — 通用 CRUD HTTP Handler(依赖 ekit-gorm/crud Service;TxRepository 事务语义)
  • validatorh/ — Hertz 参数绑定(BindAndValidate、分页绑定,ValidationError 自动 400)
  • versionh/ — 版本信息 handler

依赖关系

ekit-core            文本/数据工具 + governance/lifecycle/version      (零内部依赖)
ekit-concurrency     并发与流控原语                                     (零内部依赖)
ekit-logx            日志门面 + shutdown                                (零内部依赖)
ekit-istio           Istio Proxyless                                    (零内部依赖)
  ekit-metrics       Prometheus 门面                          → core
  ekit-tracing       OTel + traceid                           → logx
  ekit-registry      注册发现 + 配置                          → core, logx
    ekit-data        缓存抽象 + 定时任务                      → core, logx, concurrency
      ekit-gorm      SQL/GORM 全家                            → core, logx
      ekit-redis     Redis 全家                               → data, core, logx
    ekit-httpx       HTTP 客户端 + 负载均衡                   → core, concurrency, logx, metrics, tracing, registry
      ekit-nns       服务治理客户端                           → httpx, registry, core, logx, tracing, metrics
        ekit-bootstrap 应用引导
    ekit-middleware  Hertz 中间件栈                           → core, concurrency, logx, metrics, tracing, registry
    ekit-handler     HTTP handler 层(CRUD/绑定/版本)        → middleware, gorm, core, tracing
    ekit-hertz       Hertz 运行时/适配/instrumentation        → nns, registry, metrics, tracing, logx, core, concurrency
    ekit-kitex       Kitex 生态                               → nns, registry, core, concurrency, logx, metrics, tracing
  ekit-workflow      流程编排                                 → concurrency, logx
ekit-kitex-examples  Kitex 示例(echo client/server)         → kitex, bootstrap, registry, logx, tracing

依赖:ekit-middleware(mw.Fail/SuccessResp)、ekit-gorm(crud Service)、ekit-core、ekit-tracing。 ekit-hertz 运行时集成因此不再依赖 GORM 与 middleware 栈——只要 Hertz 运行时的服务无需引入本仓库。

License

见 LICENSE

Directories

Path Synopsis
Package crudh 提供基于 Hertz 的通用 CRUD HTTP Handler。
Package crudh 提供基于 Hertz 的通用 CRUD HTTP Handler。
Package validatorh 提供基于 Hertz 的请求参数绑定与验证。
Package validatorh 提供基于 Hertz 的请求参数绑定与验证。
Package versionh 提供版本信息的 HTTP Handler。
Package versionh 提供版本信息的 HTTP Handler。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL