http

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Array

type Array []jsoniter.Any

func (Array) Float64

func (a Array) Float64() []float64

func (Array) Int

func (a Array) Int() []int

func (Array) String

func (a Array) String() []string

type Files

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

func (Files) All

func (f Files) All() map[string][]*multipart.FileHeader

func (Files) Get

func (f Files) Get(fileName string) *multipart.FileHeader

func (Files) GetAll

func (f Files) GetAll(fileName string) []*multipart.FileHeader

type Json

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

func (Json) Array

func (j Json) Array(path ...interface{}) Array

func (Json) Bytes

func (j Json) Bytes() []byte

func (Json) Empty

func (j Json) Empty(key string) bool

func (Json) Get

func (j Json) Get(path ...interface{}) Value

func (Json) Has

func (j Json) Has(key string) bool

func (Json) Iter

func (j Json) Iter() jsoniter.Any

GetByID 获取

func (Json) Path

func (j Json) Path(path ...interface{}) jsoniter.Any

func (Json) Reset

func (j Json) Reset(data interface{}) jsoniter.Any

func (Json) String

func (j Json) String() string

type JsonFormat

type JsonFormat struct {
	Status string      `json:"status"`
	Code   int         `json:"code"`
	Msg    interface{} `json:"msg"`
}

type Store

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

func (Store) Add

func (store Store) Add(key string, value string)

func (Store) AllValues

func (store Store) AllValues() [][]string

func (Store) Empty

func (store Store) Empty(key string) bool

func (Store) Get

func (store Store) Get(key string) Value

func (Store) GetAll

func (store Store) GetAll(key string) []string

func (Store) Has

func (store Store) Has(key string) bool

func (Store) Keys

func (store Store) Keys() []string

func (Store) Remove

func (store Store) Remove(key string)

func (Store) String

func (store Store) String() string

func (Store) Values

func (store Store) Values() []string

type Stream

type Stream struct {
	// Server   *Server
	Response http.ResponseWriter
	Request  *http.Request
	Params   lemo.Params
	Context  lemo.Context
	Query    Store
	Form     Store
	Json     Json
	Files    Files
	// contains filtered or unexported fields
}

func NewStream

func NewStream(w http.ResponseWriter, r *http.Request) *Stream

func (*Stream) AutoGet

func (stream *Stream) AutoGet(key string) Value

func (*Stream) AutoParse

func (stream *Stream) AutoParse()

func (*Stream) ClientIP

func (stream *Stream) ClientIP() string

func (*Stream) End

func (stream *Stream) End(data interface{}) exception.Error

func (*Stream) EndBytes

func (stream *Stream) EndBytes(data []byte) exception.Error

func (*Stream) EndFile

func (stream *Stream) EndFile(fileName string, content interface{}) exception.Error

func (*Stream) EndJson

func (stream *Stream) EndJson(data interface{}) exception.Error

func (*Stream) EndString

func (stream *Stream) EndString(data string) exception.Error

func (*Stream) Forward

func (stream *Stream) Forward(fn func(stream *Stream) exception.Error) exception.Error

func (*Stream) Host

func (stream *Stream) Host() string

func (*Stream) JsonFormat

func (stream *Stream) JsonFormat(status string, code int, msg interface{}) exception.Error

func (*Stream) ParseFiles

func (stream *Stream) ParseFiles() Files

func (*Stream) ParseForm

func (stream *Stream) ParseForm() Store

func (*Stream) ParseJson

func (stream *Stream) ParseJson() Json

func (*Stream) ParseMultipart

func (stream *Stream) ParseMultipart() Store

func (*Stream) ParseQuery

func (stream *Stream) ParseQuery() Store

func (*Stream) Scheme

func (stream *Stream) Scheme() string

func (*Stream) SetHeader

func (stream *Stream) SetHeader(header string, content string)

func (*Stream) SetMaxMemory

func (stream *Stream) SetMaxMemory(maxMemory int64)

func (*Stream) String

func (stream *Stream) String() string

func (*Stream) Url

func (stream *Stream) Url() string

type Value

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

func (Value) Bool

func (v Value) Bool() bool

func (Value) Bytes

func (v Value) Bytes() []byte

func (Value) Float64

func (v Value) Float64() float64

func (Value) Int

func (v Value) Int() int

func (Value) String

func (v Value) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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