http_binding

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind

func Bind[I any, O any](b *Binding, item *BindItem[I, O], middlewares ...middleware.Func)

func DeleteBind

func DeleteBind[I any, O any](b *Binding, item *SimpleBindItem[I, O], middlewares ...middleware.Func)

func Destroy

func Destroy()

func GetBind

func GetBind[I any, O any](b *Binding, item *SimpleBindItem[I, O], middlewares ...middleware.Func)

func GetRouter

func GetRouter() *gin.Engine

func Init

func Init(apiUrlPrefix string, port string)

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]
}

type Binding

type Binding struct {
	// contains filtered or unexported fields
}

func NewBinding

func NewBinding(apiVersion string, middlewares ...middleware.Func) *Binding

type BindingFunc

type BindingFunc[O any] func(c *binding_context.Context, request any, sendFunc response.SendFunc[O]) bool

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]
}

type StaticBindItem

type StaticBindItem struct {
	RelativePath string
	Root         string
	WithBasePath bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL