support event stream

This commit is contained in:
MaysWind
2025-04-30 22:30:01 +08:00
parent 850fbffdde
commit 20b65fd885
3 changed files with 85 additions and 0 deletions
+3
View File
@@ -15,6 +15,9 @@ type MiddlewareHandlerFunc func(*WebContext)
// ApiHandlerFunc represents the api handler function
type ApiHandlerFunc func(*WebContext) (any, *errs.Error)
// EventStreamApiHandlerFunc represents the event stream api handler function
type EventStreamApiHandlerFunc func(*WebContext) *errs.Error
// DataHandlerFunc represents the handler function that returns file data byte array and file name
type DataHandlerFunc func(*WebContext) ([]byte, string, *errs.Error)