MCPcopy
hub / github.com/QuantumNous/new-api / BodyStorage

Interface BodyStorage

common/body_storage.go:14–23  ·  view source on GitHub ↗

BodyStorage 请求体存储接口

Source from the content-addressed store, hash-verified

12
13// BodyStorage 请求体存储接口
14type BodyStorage interface {
15 io.ReadSeeker
16 io.Closer
17 // Bytes 获取全部内容
18 Bytes() ([]byte, error)
19 // Size 获取数据大小
20 Size() int64
21 // IsDisk 是否是磁盘存储
22 IsDisk() bool
23}
24
25// ErrStorageClosed 存储已关闭错误
26var ErrStorageClosed = fmt.Errorf("body storage is closed")

Callers 16

getModelFromJSONBodyFunction · 0.65
finishAdminAuditFunction · 0.65
decodeAPIResponseFunction · 0.65
decodeListModelsResponseFunction · 0.65
decodeFlowQuotaResponseFunction · 0.65
GetImageFromUrlFunction · 0.65
getLogFilesFunction · 0.65
getDiskCacheInfoFunction · 0.65
CleanupOldDiskCacheFilesFunction · 0.65
GetDiskCacheInfoFunction · 0.65

Implementers 2

memoryStoragecommon/body_storage.go
diskStoragecommon/body_storage.go

Calls

no outgoing calls

Tested by

no test coverage detected