Documentation
¶
Index ¶
- func SetAfter(after ...after)
- func SetBefore(before ...before)
- type Array
- type Files
- type Json
- func (j Json) Array(path ...interface{}) Array
- func (j Json) Bytes() []byte
- func (j Json) Empty(key string) bool
- func (j Json) Get(path ...interface{}) Value
- func (j Json) Has(key string) bool
- func (j Json) Iter() jsoniter.Any
- func (j Json) Path(path ...interface{}) jsoniter.Any
- func (j Json) Reset(data interface{}) jsoniter.Any
- func (j Json) String() string
- type JsonFormat
- type Middle
- type RouteHandler
- func (handler *RouteHandler) Delete(path string) *route
- func (handler *RouteHandler) Get(path string) *route
- func (handler *RouteHandler) Option(path string) *route
- func (handler *RouteHandler) Patch(path string) *route
- func (handler *RouteHandler) Post(path string) *route
- func (handler *RouteHandler) Put(path string) *route
- func (handler *RouteHandler) Route(method string, path string) *route
- type Router
- type Server
- type Store
- func (store Store) Add(key string, value string)
- func (store Store) AllValues() [][]string
- func (store Store) Empty(key string) bool
- func (store Store) Get(key string) Value
- func (store Store) GetAll(key string) []string
- func (store Store) Has(key string) bool
- func (store Store) Keys() []string
- func (store Store) Remove(key string)
- func (store Store) String() string
- func (store Store) Values() []string
- type Stream
- func (stream *Stream) AutoGet(key string) Value
- func (stream *Stream) AutoParse()
- func (stream *Stream) ClientIP() string
- func (stream *Stream) End(data interface{}) error
- func (stream *Stream) EndBytes(data []byte) error
- func (stream *Stream) EndFile(fileName string, content interface{}) error
- func (stream *Stream) EndJson(data interface{}) error
- func (stream *Stream) EndString(data string) error
- func (stream *Stream) Forward(fn function) exception.Error
- func (stream *Stream) Host() string
- func (stream *Stream) JsonFormat(status string, code int, msg interface{}) exception.Error
- func (stream *Stream) LastError() interface{}
- func (stream *Stream) Match() bool
- func (stream *Stream) ParseFiles() Files
- func (stream *Stream) ParseForm() Store
- func (stream *Stream) ParseJson() Json
- func (stream *Stream) ParseMultipart() Store
- func (stream *Stream) ParseQuery() Store
- func (stream *Stream) Scheme() string
- func (stream *Stream) SetHeader(header string, content string)
- func (stream *Stream) SetMaxMemory(maxMemory int64)
- func (stream *Stream) String() string
- func (stream *Stream) Url() string
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type JsonFormat ¶
type RouteHandler ¶
type RouteHandler struct {
// contains filtered or unexported fields
}
func (*RouteHandler) Delete ¶
func (handler *RouteHandler) Delete(path string) *route
func (*RouteHandler) Get ¶
func (handler *RouteHandler) Get(path string) *route
func (*RouteHandler) Option ¶
func (handler *RouteHandler) Option(path string) *route
func (*RouteHandler) Patch ¶
func (handler *RouteHandler) Patch(path string) *route
func (*RouteHandler) Post ¶
func (handler *RouteHandler) Post(path string) *route
func (*RouteHandler) Put ¶
func (handler *RouteHandler) Put(path string) *route
func (*RouteHandler) Route ¶
func (handler *RouteHandler) Route(method string, path string) *route
type Router ¶
type Router struct {
IgnoreCase bool
// contains filtered or unexported fields
}
func (*Router) GetAllRouters ¶
func (router *Router) GetAllRouters() []*node
func (*Router) SetDefaultIndex ¶
func (*Router) SetStaticPath ¶
type Server ¶
type Server struct {
// Host 服务Host
Host string
// Port 服务端口
Port int
// Protocol 协议
Protocol string
// TLS FILE
CertFile string
// TLS KEY
KeyFile string
// AutoBind
AutoBind bool
OnOpen func(stream *Stream)
OnMessage func(stream *Stream)
OnClose func(stream *Stream)
OnError func(stream *Stream)
// contains filtered or unexported fields
}
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 (*Stream) JsonFormat ¶
func (*Stream) ParseFiles ¶
func (*Stream) ParseMultipart ¶
func (*Stream) ParseQuery ¶
func (*Stream) SetMaxMemory ¶
Click to show internal directories.
Click to hide internal directories.