input

package
v0.2.38 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

type Input struct {
	Method string
	// contains filtered or unexported fields
}

Input

func NewInput

func NewInput() *Input

NewInput 新建一个input

func (*Input) Bind

func (i *Input) Bind(value interface{}) error

Bind

func (*Input) BindJSON

func (i *Input) BindJSON(value interface{}) error

BindJSON

func (*Input) BindWith

func (i *Input) BindWith(value interface{}, bind binding.Binding) error

BindWith

func (*Input) BindXML

func (i *Input) BindXML(value interface{}) error

BindXML

func (*Input) BindYAML

func (i *Input) BindYAML(value interface{}) error

BindYAML

func (*Input) Body

func (i *Input) Body() string

Body

func (*Input) BodyBytes

func (i *Input) BodyBytes() []byte

BodyBytes 内容

func (*Input) ClientIp

func (i *Input) ClientIp() string

ClientIp 客户端IP

func (*Input) ContentType

func (i *Input) ContentType() string

ContentType

func (*Input) File

func (i *Input) File(name string) (*multipart.FileHeader, error)

File

func (*Input) Get

func (i *Input) Get(key string, value ...interface{}) *lib.Data

Get 获得参数

func (*Input) GetRaw

func (i *Input) GetRaw() lib.Row

GetRaw 获得参数

func (*Input) Init

func (i *Input) Init(request *http.Request)

Init 初始化

func (*Input) Param

func (i *Input) Param(key string, value ...interface{}) *lib.Data

Param 获得参数

func (*Input) ParamRaw

func (i *Input) ParamRaw() lib.Row

Param 获得参数

func (*Input) Post

func (i *Input) Post(key string, value ...interface{}) *lib.Data

Post 获得参数

func (*Input) PostRaw

func (i *Input) PostRaw() lib.Row

GetRaw 获得参数

func (*Input) R

func (i *Input) R() *http.Request

R 获取请求

func (*Input) SaveUploadByFunc

func (i *Input) SaveUploadByFunc(name string, callback UploadFunc) error

SaveUploadByFunc

func (*Input) SaveUploadFile

func (i *Input) SaveUploadFile(name, dst string) error

SaveUploadFile

func (*Input) SaveUploadFileByDir added in v0.0.71

func (i *Input) SaveUploadFileByDir(name, dir string) (string, error)

SaveUploadFileByDir

func (*Input) SetGet

func (i *Input) SetGet(key string, value interface{})

SetGet 设置参数

func (*Input) SetParam

func (i *Input) SetParam(key string, value interface{})

SetParam 设置参数

func (*Input) SetPost

func (i *Input) SetPost(key string, value interface{})

SetPost 设置参数

type UploadFunc

type UploadFunc func(*multipart.FileHeader) //上传回调

Jump to

Keyboard shortcuts

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