http

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: Apache-2.0 Imports: 12 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(fileName string) []*multipart.FileHeader

func (*Files) Files

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

func (*Files) First

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

func (*Files) Index

func (f *Files) Index(fileName string, index int) *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

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 Protobuf

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

func (*Protobuf) Bytes

func (p *Protobuf) Bytes() []byte

type Store

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

func (*Store) Add

func (s *Store) Add(key string, value []string)

func (*Store) All

func (s *Store) All(key string) Values

func (*Store) Empty

func (s *Store) Empty(key string) bool

func (*Store) First

func (s *Store) First(key string) Value

func (*Store) Has

func (s *Store) Has(key string) bool

func (*Store) Index

func (s *Store) Index(key string, index int) Value

func (*Store) Keys

func (s *Store) Keys() []string

func (*Store) Remove

func (s *Store) Remove(key string)

func (*Store) String

func (s *Store) String() string

func (*Store) Struct

func (s *Store) Struct(input interface{})

func (*Store) Values

func (s *Store) Values() [][]string

type Stream

type Stream struct {
	// Server   *Server
	Response http.ResponseWriter
	Request  *http.Request
	Query    *Store
	Form     *Store
	Json     *Json
	Protobuf *Protobuf
	Files    *Files

	Params  kitty2.Params
	Context kitty2.Context
	Logger  kitty2.Logger
	// contains filtered or unexported fields
}

func (*Stream) AutoGet

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

func (*Stream) AutoParse

func (s *Stream) AutoParse()

func (*Stream) ClientIP

func (s *Stream) ClientIP() string

func (*Stream) Empty

func (s *Stream) Empty(key string) bool

func (*Stream) End

func (s *Stream) End(data interface{}) error

func (*Stream) EndBytes

func (s *Stream) EndBytes(data []byte) error

func (*Stream) EndFile

func (s *Stream) EndFile(fileName string, content interface{}) error

func (*Stream) EndJson

func (s *Stream) EndJson(data interface{}) error

func (*Stream) EndString

func (s *Stream) EndString(data string) error

func (*Stream) Forward

func (s *Stream) Forward(fn func(stream *Stream) error) error

func (*Stream) Has

func (s *Stream) Has(key string) bool

func (*Stream) Host

func (s *Stream) Host() string

func (*Stream) JsonFormat

func (s *Stream) JsonFormat(status string, code int, msg interface{}) error

func (*Stream) ParseFiles

func (s *Stream) ParseFiles() *Files

func (*Stream) ParseForm

func (s *Stream) ParseForm() *Store

func (*Stream) ParseJson

func (s *Stream) ParseJson() *Json

func (*Stream) ParseMultipart

func (s *Stream) ParseMultipart() *Store

func (*Stream) ParseProtobuf

func (s *Stream) ParseProtobuf() *Protobuf

func (*Stream) ParseQuery

func (s *Stream) ParseQuery() *Store

func (*Stream) Scheme

func (s *Stream) Scheme() string

func (*Stream) SetHeader

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

func (*Stream) SetMaxMemory

func (s *Stream) SetMaxMemory(maxMemory int64)

func (*Stream) String

func (s *Stream) String() string

func (*Stream) Url

func (s *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

type Values

type Values []string

func (Values) Bool

func (v Values) Bool() []bool

func (Values) Bytes

func (v Values) Bytes() [][]byte

func (Values) Float64

func (v Values) Float64() []float64

func (Values) Int

func (v Values) Int() []int

func (Values) String

func (v Values) String() []string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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