mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-14 06:57:35 +08:00
code refactor
This commit is contained in:
+8
-5
@@ -6,17 +6,20 @@ import (
|
||||
"github.com/mayswind/ezbookkeeping/pkg/errs"
|
||||
)
|
||||
|
||||
// CliHandlerFunc represents the cli handler function
|
||||
type CliHandlerFunc func(*CliContext) error
|
||||
|
||||
// MiddlewareHandlerFunc represents the middleware handler function
|
||||
type MiddlewareHandlerFunc func(*Context)
|
||||
type MiddlewareHandlerFunc func(*WebContext)
|
||||
|
||||
// ApiHandlerFunc represents the api handler function
|
||||
type ApiHandlerFunc func(*Context) (any, *errs.Error)
|
||||
type ApiHandlerFunc func(*WebContext) (any, *errs.Error)
|
||||
|
||||
// DataHandlerFunc represents the handler function that returns file data byte array and file name
|
||||
type DataHandlerFunc func(*Context) ([]byte, string, *errs.Error)
|
||||
type DataHandlerFunc func(*WebContext) ([]byte, string, *errs.Error)
|
||||
|
||||
// ImageHandlerFunc represents the handler function that returns image byte array and content type
|
||||
type ImageHandlerFunc func(*Context) ([]byte, string, *errs.Error)
|
||||
type ImageHandlerFunc func(*WebContext) ([]byte, string, *errs.Error)
|
||||
|
||||
// ProxyHandlerFunc represents the reverse proxy handler function
|
||||
type ProxyHandlerFunc func(*Context) (*httputil.ReverseProxy, *errs.Error)
|
||||
type ProxyHandlerFunc func(*WebContext) (*httputil.ReverseProxy, *errs.Error)
|
||||
|
||||
Reference in New Issue
Block a user