Documentation ¶
Index ¶
- Variables
- func BindSupport(arg ArgIn, argsIn []ArgIn, c *gin.Context) (reflect.Value, error)
- func ContextKeyValuesSupport(arg ArgIn, argsIn []ArgIn, c *gin.Context) (reflect.Value, error)
- func ConvertPtr(isPtr bool, v reflect.Value) reflect.Value
- func DefaultSupport(v0 interface{}, vs []interface{}, g *gin.Context) (bool, error)
- func DirectDealerSupport(v interface{}, vs []interface{}, c *gin.Context) (bool, error)
- func ErrorSupport(v interface{}, vs []interface{}, c *gin.Context) (bool, error)
- func GinContextSupport(arg ArgIn, argsIn []ArgIn, c *gin.Context) (reflect.Value, error)
- func HTTPRequestSupport(arg ArgIn, argsIn []ArgIn, c *gin.Context) (reflect.Value, error)
- func HTTPResponseWriterSupport(arg ArgIn, argsIn []ArgIn, c *gin.Context) (reflect.Value, error)
- func IndirectTypeOf(v interface{}) reflect.Type
- func IsAdapterError(err error) bool
- func SinglePrimitiveValueSupport(arg ArgIn, argsIn []ArgIn, c *gin.Context) (reflect.Value, error)
- type Adapter
- func (a *Adapter) Adapt(relativePath string, argV interface{}) adapt.Handler
- func (a *Adapter) After(after After) OptionFn
- func (a *Adapter) Attr(k string, v interface{}) OptionFn
- func (a *Adapter) AttrMap(attrs map[string]interface{}) OptionFn
- func (a *Adapter) Before(before Before) OptionFn
- func (a *Adapter) Default(relativePath string) adapt.Handler
- func (a *Adapter) F(v interface{}, fns ...OptionFn) adapt.Parent
- func (a *Adapter) PrependInSupport(support InSupport)
- func (a *Adapter) PrependOutSupport(support OutSupport)
- type AdapterError
- type After
- type AfterFn
- type ArgIn
- type Before
- type BeforeFn
- type DirectDealer
- type DirectResponse
- type DlFile
- type HTTPStatus
- type InSupport
- type InSupportFn
- type Option
- type OptionFn
- type OutSupport
- type OutSupportFn
- type Values
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GinContextType = reflect.TypeOf((*gin.Context)(nil)).Elem() InvalidValue = reflect.Value{} )
View Source
var HTTPResponseWriterType = reflect.TypeOf((*http.ResponseWriter)(nil)).Elem()
Functions ¶
func BindSupport ¶
func ContextKeyValuesSupport ¶
func DefaultSupport ¶
func DirectDealerSupport ¶
func ErrorSupport ¶
func GinContextSupport ¶
func HTTPRequestSupport ¶
func IndirectTypeOf ¶
IndirectTypeOf returns the non-ptr type of v.
func IsAdapterError ¶
IsAdapterError tells if err is an AdaptorError or not.
Types ¶
type Adapter ¶
type Adapter struct { InSupports []InSupport OutSupports []OutSupport }
func NewAdapter ¶
func NewAdapter() *Adapter
func (*Adapter) PrependInSupport ¶
func (*Adapter) PrependOutSupport ¶
func (a *Adapter) PrependOutSupport(support OutSupport)
type AdapterError ¶
AdapterError defines the error generated in the processing of adaptor.
type After ¶
type After interface { // Do will be called Before the adaptee invoking. Do(args []interface{}, results []interface{}) error }
type Before ¶
type Before interface { // Do will be called Before the adaptee invoking. Do(args []interface{}) error }
type DirectDealer ¶
DirectDealer is the dealer for a specified type.
type DirectResponse ¶
type DirectResponse struct { Code int Error error JSON interface{} String string ContentType string Header map[string]string }
DirectResponse represents the direct response.
func (DirectResponse) Deal ¶
func (d DirectResponse) Deal(c *gin.Context)
type HTTPStatus ¶
type HTTPStatus int
HTTPStatus defines the type of HTTP state.
func (HTTPStatus) Deal ¶
func (h HTTPStatus) Deal(c *gin.Context)
type InSupportFn ¶
type OutSupport ¶
type OutSupportFn ¶
func (OutSupportFn) OutSupport ¶
func (o OutSupportFn) OutSupport(v interface{}, vs []interface{}, c *gin.Context) (bool, error)
Click to show internal directories.
Click to hide internal directories.