Documentation ¶
Index ¶
- Constants
- Variables
- func BuildApi(applicationName, version string, funcName string) string
- func GetHttpType(greeter interface{}) string
- func InjectFunc(targetFunc interface{}, reqInfo RequestInfo) ([]reflect.Value, error)
- func ParseBody(elem reflect.Type, isPtr bool, reqInfo RequestInfo) (*reflect.Value, error)
- func ParseQuery(fieldName string, isPtr bool, converter func(v string) (interface{}, error), ...) (*reflect.Value, error)
- func ParseValue(elem reflect.Type, isPtr bool, reqInfo RequestInfo) (*reflect.Value, error)
- type FacadeBuilder
- type GinHandler
- type Greeter
- func GetGreeterInfo(greeter interface{}) Greeter
- func NewGetGreeter(applicationName string, host string, port int, version string) Greeter
- func NewGreeter(httpType string, applicationName string, host string, port int, version string) Greeter
- func NewPostGreeter(applicationName string, host string, port int, version string) Greeter
- type ReqTypeInfo
- type RequestInfo
Constants ¶
View Source
const FacadeBuildFunc = `` /* 158-byte string literal not displayed */
View Source
const FacadeBuildGoFile = `` /* 460-byte string literal not displayed */
Variables ¶
View Source
var BasicTypeConverter = map[string]func(v string) (interface{}, error){}
Functions ¶
func GetHttpType ¶
func GetHttpType(greeter interface{}) string
func InjectFunc ¶
func InjectFunc(targetFunc interface{}, reqInfo RequestInfo) ([]reflect.Value, error)
func ParseQuery ¶
func ParseValue ¶
Types ¶
type FacadeBuilder ¶
type FacadeBuilder struct { StorageDir string Package string VoPackage string Greeters []interface{} }
func (FacadeBuilder) Build ¶
func (fb FacadeBuilder) Build()
type GinHandler ¶
type GinHandler struct { Greeters []interface{} // contains filtered or unexported fields }
func NewGinHandler ¶
func NewGinHandler(engine *gin.Engine) GinHandler
func (*GinHandler) RegisterGreeter ¶
func (h *GinHandler) RegisterGreeter(greeter interface{})
type Greeter ¶
func GetGreeterInfo ¶
func GetGreeterInfo(greeter interface{}) Greeter
func NewGetGreeter ¶
func NewGreeter ¶
type ReqTypeInfo ¶
type ReqTypeInfo struct {
// contains filtered or unexported fields
}
type RequestInfo ¶
func NewRequestInfo ¶
func NewRequestInfo(ctx *gin.Context) (*RequestInfo, error)
Click to show internal directories.
Click to hide internal directories.