Documentation ¶
Index ¶
- Constants
- Variables
- func InitAndRun(filepath string)
- type Config
- type Context
- type DataExchangeBody
- type Doc
- type Docs
- type Engine
- type FWatcher
- type HandlersChain
- type HttpHandlerFunc
- type Hub
- type IRoutes
- type Notify
- type Response
- type RouterGroup
- func (group *RouterGroup) BasePath() string
- func (group *RouterGroup) DELETE(relativePath string, handlers ...HttpHandlerFunc) IRoutes
- func (group *RouterGroup) GET(relativePath string, handlers ...HttpHandlerFunc) IRoutes
- func (group *RouterGroup) Group(relativePath string, handlers ...HttpHandlerFunc) *RouterGroup
- func (group *RouterGroup) Handler(httpMethod, relativePath string, handlers ...HttpHandlerFunc) IRoutes
- func (group *RouterGroup) OPTION(relativePath string, handlers ...HttpHandlerFunc) IRoutes
- func (group *RouterGroup) POST(relativePath string, handlers ...HttpHandlerFunc) IRoutes
- func (group *RouterGroup) PUT(relativePath string, handlers ...HttpHandlerFunc) IRoutes
- func (group *RouterGroup) Use(middleware ...HttpHandlerFunc) IRoutes
- type Store
- func (s *Store) Delete(k string)
- func (s *Store) GetFloat32(k string) float32
- func (s *Store) GetFloat64(k string) float64
- func (s *Store) GetInt(k string) int
- func (s *Store) GetString(k string) string
- func (s *Store) GetValue(k string) interface{}
- func (s *Store) Run()
- func (s *Store) Set(k string, v interface{}, expire time.Duration)
- type TransmissionData
- type Value
Constants ¶
View Source
const ( Title int = iota Url Header Method Param Hint Return )
Variables ¶
View Source
var DefaultWriter io.Writer = os.Stdout
Functions ¶
func InitAndRun ¶
func InitAndRun(filepath string)
Types ¶
type Config ¶
type DataExchangeBody ¶
type Engine ¶
type Engine struct { RouterGroup // contains filtered or unexported fields }
type HandlersChain ¶
type HandlersChain []HttpHandlerFunc
type HttpHandlerFunc ¶
type HttpHandlerFunc func(ctx *Context)
type IRoutes ¶
type IRoutes interface { Use(...HttpHandlerFunc) IRoutes Handler(string, string, ...HttpHandlerFunc) IRoutes GET(string, ...HttpHandlerFunc) IRoutes POST(string, ...HttpHandlerFunc) IRoutes DELETE(string, ...HttpHandlerFunc) IRoutes PUT(string, ...HttpHandlerFunc) IRoutes OPTION(string, ...HttpHandlerFunc) IRoutes }
type RouterGroup ¶
type RouterGroup struct { Handlers HandlersChain // contains filtered or unexported fields }
func (*RouterGroup) BasePath ¶
func (group *RouterGroup) BasePath() string
func (*RouterGroup) DELETE ¶
func (group *RouterGroup) DELETE(relativePath string, handlers ...HttpHandlerFunc) IRoutes
func (*RouterGroup) GET ¶
func (group *RouterGroup) GET(relativePath string, handlers ...HttpHandlerFunc) IRoutes
func (*RouterGroup) Group ¶
func (group *RouterGroup) Group(relativePath string, handlers ...HttpHandlerFunc) *RouterGroup
func (*RouterGroup) Handler ¶
func (group *RouterGroup) Handler(httpMethod, relativePath string, handlers ...HttpHandlerFunc) IRoutes
func (*RouterGroup) OPTION ¶
func (group *RouterGroup) OPTION(relativePath string, handlers ...HttpHandlerFunc) IRoutes
func (*RouterGroup) POST ¶
func (group *RouterGroup) POST(relativePath string, handlers ...HttpHandlerFunc) IRoutes
func (*RouterGroup) PUT ¶
func (group *RouterGroup) PUT(relativePath string, handlers ...HttpHandlerFunc) IRoutes
func (*RouterGroup) Use ¶
func (group *RouterGroup) Use(middleware ...HttpHandlerFunc) IRoutes
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) GetFloat32 ¶
func (*Store) GetFloat64 ¶
type TransmissionData ¶
@title: 数据传输结构体 @param: type:int:传输类型 @param: data:string:传输信息 @param: state:int:传输动作 @param: identity:string:身份信息
Click to show internal directories.
Click to hide internal directories.