chiyi
cfecbff8f8
docs: update README for v2 (Chinese intro and guide refresh)
v1.3.4
2026-09-03 15:32:13 +08:00
chiyi
41df889a1a
v2.0.0: error-channel APIs, correctness fixes, and server hardening
...
BREAKING CHANGES:
- Guard interface: Guard(ctx Ctx) error; returning error short-circuits
(subsequent guards and the method no longer execute)
- Wired[T]() (*T, error); New() may return error; failed wiring is sticky
- BindService/BindGuard/BindRoute return error; routes accept guards
(guards receive merged query/form params as Ctx.State)
- registration panics after Start; Ctx.Ip honors X-Forwarded-For/X-Real-IP
- internal errors sanitized to fixed client messages
FIXES:
- int64 precision loss: /cell data decoded from raw JSON bytes and
responses serialized with json.Number (no float64 round-trip)
- enum values range-checked before uint8 conversion (256 no longer
truncates to 0 and slips through)
- logger: files failing name parsing are no longer deleted; log channel
never blocks request goroutines; ConfigLogger is race-free;
logWriterWorker unlock bug fixed
- stream writer panics recovered (process no longer crashes);
streamDone closed exactly once
- generated Go client emits definitions for pointer-to-enum/struct fields
- anonymous structs rejected at registration; isPrivate safe on empty names
- removed dead Result.Id and RequestInfo.Type
ADDITIONS:
- graceful shutdown (Shutdown), StartOn, server timeouts by default
(Read 60s/Idle 120s/Write off), SetTimeouts/SetMaxConcurrency
- big-int-safe JSON in the generated TS client (>2^53 as BigInt)
- example/ demo services and cmd/genexample artifact generator
2026-09-03 15:32:07 +08:00
chiyi
9019798382
v1.3.3: add SetBodyLimit for large custom-route request bodies (multipart uploads)
v1.3.3
2026-08-21 22:29:41 +08:00
chiyi
095cb859a5
v1.3.2: add request context and generation-only binding
v1.3.2
2026-08-21 19:12:40 +08:00
chiyi
eb290cc88c
v1.3.1: improve TypeScript client reliability
v1.3.1
2026-08-21 15:06:11 +08:00
chiyi
503d0904d5
v1.3.0: BindRoute wildcard routes (/prefix/*) with RouteCtx.Wildcard
v1.3.0
2026-08-20 21:10:24 +08:00
chiyi
e6c6f68a3a
fun: upgrade TS client interceptors to fun-client parity (v1.2.0)
...
- request interceptor now receives the mutable per-request state map (token injection)
- response interceptor may return a replacement result (central token swap / error handling)
- fetch failures normalized to result status=4 (network error) instead of throwing
- stream requests also pass through request interceptors with state copy
v1.2.0
2026-08-20 12:09:43 +08:00
chiyi
05af3dc825
fun: add BindRoute for custom HTTP routes (GET/POST, form-data callbacks)
...
- BindRoute(method, path, handler) with exact-match routing dispatched before /cell RPC
- RouteCtx merges query args and form-urlencoded POST args for callback scenarios (e.g. epay notify)
- handler returns error -> unified Result error response; nil -> full control via fasthttp.RequestCtx (plain-text 'success' replies)
- /cell reserved; duplicate/invalid registration panics at startup; all existing tests pass
v1.1.0
2026-08-20 10:17:56 +08:00
chiyi
4bf991b3e7
fun: HTTP RPC framework with DI, guards, streams and codegen
...
- Service binding via reflection with 4 method signatures
- Dependency injection (Wired/auto tags) and guards
- Streamable HTTP (NDJSON) streaming responses
- Go/TypeScript client code generation (self-contained, with interceptors)
- Enum support, structured Result, logging
- 16 regression tests covering all fixed bugs
v1.0.0
2026-08-16 23:51:58 +08:00