mvc

package
v0.0.0-...-57ed434 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: AGPL-3.0 Imports: 27 Imported by: 15

Documentation

Index

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 BuildApi

func BuildApi(applicationName, version string, funcName string) string

func GetHttpType

func GetHttpType(greeter interface{}) string

func InjectFunc

func InjectFunc(targetFunc interface{}, reqInfo RequestInfo) ([]reflect.Value, error)

func ParseBody

func ParseBody(elem reflect.Type, isPtr bool, reqInfo RequestInfo) (*reflect.Value, error)

func ParseQuery

func ParseQuery(fieldName string, isPtr bool, converter func(v string) (interface{}, error), reqInfo RequestInfo) (*reflect.Value, error)

func ParseValue

func ParseValue(elem reflect.Type, isPtr bool, reqInfo RequestInfo) (*reflect.Value, error)

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

type Greeter struct {
	ApplicationName string
	Host            string
	Port            int
	Version         string
	HttpType        string
}

func GetGreeterInfo

func GetGreeterInfo(greeter interface{}) Greeter

func NewGetGreeter

func NewGetGreeter(applicationName string, host string, port int, version string) Greeter

func NewGreeter

func NewGreeter(httpType string, applicationName string, host string, port int, version string) Greeter

func NewPostGreeter

func NewPostGreeter(applicationName string, host string, port int, version string) Greeter

type ReqTypeInfo

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

type RequestInfo

type RequestInfo struct {
	Parameters map[string]string
	Body       string
	Ctx        context.Context
}

func NewRequestInfo

func NewRequestInfo(ctx *gin.Context) (*RequestInfo, error)

Jump to

Keyboard shortcuts

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