Documentation
¶
Index ¶
- Constants
- Variables
- func Api(f func())
- func CommonHandler(w http.ResponseWriter, req *http.Request, handle *reflect.Value)
- func Connect(path string) *apiInfo[none]
- func Delete(path string) *apiInfo[none]
- func Get(path string) *apiInfo[none]
- func GetMethodInfo[T any](method *reflect.Method, preUrl string, httpContext reflect.Type) (info *apiInfo[T])
- func HandlerPrefix(p string)
- func Head(path string) *apiInfo[none]
- func Log(method, path, title string)
- func Middleware[T any](middleware ...T) *apiInfo[T]
- func Options(path string) *apiInfo[none]
- func Patch(path string) *apiInfo[none]
- func Post(path string) *apiInfo[none]
- func Put(path string) *apiInfo[none]
- func Registered()
- func ResWriteReflect(w httpi.ICommonResponseWriter, traceId string, result []reflect.Value) error
- func Trace(path string) *apiInfo[none]
- type ApiInfo
- type Changelog
- type ParseToHttpResponse
- type Route
- type Service
- type Writer
Constants ¶
View Source
const Template = `` /* 332-byte string literal not displayed */
Variables ¶
Functions ¶
func CommonHandler ¶ added in v1.5.25
func GetMethodInfo ¶
func GetMethodInfo[T any](method *reflect.Method, preUrl string, httpContext reflect.Type) (info *apiInfo[T])
recover捕捉panic info
func HandlerPrefix ¶ added in v1.7.0
func HandlerPrefix(p string)
func Middleware ¶ added in v1.8.8
func Middleware[T any](middleware ...T) *apiInfo[T]
func Registered ¶
func Registered()
func ResWriteReflect ¶ added in v1.5.6
Types ¶
type ApiInfo ¶
type ParseToHttpResponse ¶
Click to show internal directories.
Click to hide internal directories.