ctrl

package
v0.0.0-...-69154b6 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPContext

type HTTPContext struct {
	Context echo.Context // echo上下文
	Result  *HTTPResult
	Admin   *model.Admin
}

func (*HTTPContext) Bind

func (s *HTTPContext) Bind(i interface{}) error

func (*HTTPContext) FormFile

func (s *HTTPContext) FormFile(name string) (*multipart.FileHeader, error)

func (*HTTPContext) FormValue

func (s *HTTPContext) FormValue(name string) string

func (*HTTPContext) FormValueInt

func (s *HTTPContext) FormValueInt(name string) int

func (*HTTPContext) HTML

func (s *HTTPContext) HTML(page string) error

func (*HTTPContext) JsonErr

func (s *HTTPContext) JsonErr(code int, i interface{}) error

func (*HTTPContext) JsonOk

func (s *HTTPContext) JsonOk(i interface{}) error

func (*HTTPContext) Param

func (s *HTTPContext) Param(name string) string

func (*HTTPContext) ParamInt

func (s *HTTPContext) ParamInt(name string) int

func (*HTTPContext) Put

func (s *HTTPContext) Put(key string, value interface{})

func (*HTTPContext) QueryParam

func (s *HTTPContext) QueryParam(name string) string

func (*HTTPContext) QueryParamInt

func (s *HTTPContext) QueryParamInt(name string) int

func (*HTTPContext) ResultErr

func (s *HTTPContext) ResultErr(msg string) error

func (*HTTPContext) ResultErrStatus

func (s *HTTPContext) ResultErrStatus(status int, msg string) error

func (*HTTPContext) ResultOK

func (s *HTTPContext) ResultOK() error

func (*HTTPContext) ResultOKMsg

func (s *HTTPContext) ResultOKMsg(msg string) error

type HTTPResult

type HTTPResult struct {
	Status int                    `json:"status"` // 状态码
	Msg    string                 `json:"msg"`    // 消息
	Data   map[string]interface{} `json:"data"`   // 返回数据
}

type RESULT_STATUS

type RESULT_STATUS int

Jump to

Keyboard shortcuts

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