feat: 支持流式和非解析HTTP请求及单条DB查询

重构HTTP请求模块,提取doRequestRaw基础方法,新增流式请求(PostStream)、非解析请求(GetNotParse/PostNotParse)及原始响应读取能力;同时在Gfdb接口中新增GetOne单条记录查询方法。
This commit is contained in:
2026-07-23 17:09:27 +08:00
parent 272943d238
commit e47dd99816
2 changed files with 61 additions and 13 deletions
+1
View File
@@ -439,6 +439,7 @@ var (
type Gfdb interface {
GetAll(ctx context.Context, sql string, args ...any) (gdb.Result, error)
GetOne(ctx context.Context, sql string, args ...any) (gdb.Record, error)
Exec(ctx context.Context, sql string, args ...any) (sql.Result, error)
Model(ctx context.Context, tableNameOrStruct ...any) *model
Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) error