Documentation ¶
Index ¶
- func FsApiExtract(controller web.FsController, ...)
- func HandleFsApi(controller web.Controller, handler func(prefix, dir string))
- func NewApiInfo(group string, field reflect.StructField, svm *ServiceMethod) web.ApiInfo
- func NewEndpoint(controller web.Controller) []web.Endpoint
- func RestApiExtract(controller web.Controller, ...)
- type ApiInfo
- type Endpoint
- type Param
- type ParamMapper
- type ServiceMethod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FsApiExtract ¶ added in v1.4.3
func FsApiExtract(controller web.FsController, handler func(apiInfo web.ApiInfo, svm web.ServiceMethod))
func HandleFsApi ¶ added in v1.3.4
func HandleFsApi(controller web.Controller, handler func(prefix, dir string))
func NewApiInfo ¶ added in v1.3.7
func NewApiInfo(group string, field reflect.StructField, svm *ServiceMethod) web.ApiInfo
func NewEndpoint ¶ added in v1.3.7
func NewEndpoint(controller web.Controller) []web.Endpoint
func RestApiExtract ¶ added in v1.4.0
func RestApiExtract(controller web.Controller, handler func(apiInfo web.ApiInfo, svm web.ServiceMethod))
Types ¶
type ApiInfo ¶ added in v1.3.7
type ApiInfo struct {
// contains filtered or unexported fields
}
func (*ApiInfo) GetDescription ¶ added in v1.3.7
func (*ApiInfo) GetField ¶ added in v1.4.0
func (a *ApiInfo) GetField() reflect.StructField
func (*ApiInfo) GetHttpMethod ¶ added in v1.3.7
func (*ApiInfo) GetMethodName ¶ added in v1.4.0
type Endpoint ¶ added in v1.3.7
type Endpoint struct { web.ApiInfo web.ServiceMethod }
func (*Endpoint) GetApiInfo ¶ added in v1.3.7
func (*Endpoint) GetServiceMethod ¶ added in v1.3.7
func (e *Endpoint) GetServiceMethod() web.ServiceMethod
type Param ¶
type Param struct {
// contains filtered or unexported fields
}
func (*Param) GetSpecifyType ¶ added in v1.4.0
type ParamMapper ¶ added in v1.4.1
type ParamMapper interface { GetStringFromPath(name string) (string, error) GetStringFromQuery(name string) (string, error) GetStringFromHeader(name string) (string, error) BindData(param web.Param) (interface{}, error) GetStringFromForm(name string) (string, error) GetMapFromForm() (map[string][]string, error) GetMultipartHeader(name string) (*multipart.FileHeader, error) GetMultipartFile(name string) (multipart.File, error) GetDataFromMultipart(name string) ([]byte, error) GetRequest() *http.Request GetResponseWriter() http.ResponseWriter GetContext() context.Context }
type ServiceMethod ¶ added in v1.3.7
func NewServiceMethod ¶ added in v1.3.7
func NewServiceMethod(method *reflect.Method, value *reflect.Value) *ServiceMethod
func (*ServiceMethod) GetMethod ¶ added in v1.3.7
func (s *ServiceMethod) GetMethod() *reflect.Method
func (*ServiceMethod) GetValue ¶ added in v1.3.7
func (s *ServiceMethod) GetValue() *reflect.Value
Click to show internal directories.
Click to hide internal directories.