Documentation
¶
Index ¶
- Constants
- Variables
- func Api(f func())
- func Connect(path string) *apiInfo[none]
- func Delete(path string) *apiInfo[none]
- func ErrRepFrom(err any) *errors.ErrRep
- 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 Response(w httpx.ICommonResponseWriter, traceId string, result []reflect.Value) error
- func Trace(path string) *apiInfo[none]
- type ApiInfo
- type Changelog
- type ErrRep
- type ParseToHttpResponse
- type Route
- type Service
Constants ¶
View Source
const Template = `` /* 332-byte string literal not displayed */
Variables ¶
View Source
var ( ContextType = reflect.TypeOf((*context.Context)(nil)).Elem() ContextValue = reflect.ValueOf(context.Background()) ErrorType = reflect.TypeOf((*error)(nil)).Elem() )
View Source
var (
ErrRepType = reflect.TypeOf((*ErrRep)(nil))
)
Functions ¶
func ErrRepFrom ¶ added in v1.12.2
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()
Types ¶
type ApiInfo ¶
type ParseToHttpResponse ¶
Click to show internal directories.
Click to hide internal directories.
