Documentation ¶
Index ¶
- func Bind[I any, O any](b *Binding, item *BindItem[I, O], middlewares ...middleware.Func)
- func DeleteBind[I any, O any](b *Binding, item *SimpleBindItem[I, O], middlewares ...middleware.Func)
- func Destroy()
- func GetBind[I any, O any](b *Binding, item *SimpleBindItem[I, O], middlewares ...middleware.Func)
- func GetRouter() *gin.Engine
- func Init(apiUrlPrefix string, port string)
- func PostBind[I any, O any](b *Binding, item *SimpleBindItem[I, O], middlewares ...middleware.Func)
- func PutBind[I any, O any](b *Binding, item *SimpleBindItem[I, O], middlewares ...middleware.Func)
- func Static(b *Binding, item *StaticBindItem)
- type BindItem
- type Binding
- type BindingFunc
- type BusinessFunc
- type SimpleBindItem
- type StaticBindItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteBind ¶
func DeleteBind[I any, O any](b *Binding, item *SimpleBindItem[I, O], middlewares ...middleware.Func)
func GetBind ¶
func GetBind[I any, O any](b *Binding, item *SimpleBindItem[I, O], middlewares ...middleware.Func)
func PostBind ¶
func PostBind[I any, O any](b *Binding, item *SimpleBindItem[I, O], middlewares ...middleware.Func)
func PutBind ¶
func PutBind[I any, O any](b *Binding, item *SimpleBindItem[I, O], middlewares ...middleware.Func)
func Static ¶
func Static(b *Binding, item *StaticBindItem)
Types ¶
type BindItem ¶
type BindItem[I any, O any] struct { Method string *SimpleBindItem[I, O] }
BindItem 路由条目结构
type Binding ¶
type Binding struct {
// contains filtered or unexported fields
}
func NewBinding ¶
func NewBinding(apiVersion string, middlewares ...middleware.Func) *Binding
NewBinding 创建版本对应的binding
type BindingFunc ¶
type BusinessFunc ¶
type BusinessFunc[I any, O any] func(c *binding_context.Context, inputModel I) (O, error)
type SimpleBindItem ¶
type SimpleBindItem[I any, O any] struct { Path string // 请求路径 ResponseFunc response.SendFunc[O] // 响应泛型函数 BusinessFunc BusinessFunc[I, O] // 业务泛型函数 OptionalBindingFunc BindingFunc[O] // }
SimpleBindItem 路由条目
type StaticBindItem ¶
StaticBindItem 静态路由item
Click to show internal directories.
Click to hide internal directories.