Documentation ¶
Index ¶
- Constants
- type Context
- func (ctx *Context) Copy() *Context
- func (ctx *Context) Deadline() (deadline time.Time, ok bool)
- func (ctx *Context) Done() <-chan struct{}
- func (ctx *Context) Err() error
- func (ctx *Context) Fail(msg string, data interface{})
- func (ctx *Context) Get(key string) (value interface{}, exist bool)
- func (ctx *Context) GetInt64(key string) int64
- func (ctx *Context) GetInt64OrDefault(key string, defaultValue int64) int64
- func (ctx *Context) GetString(key string) string
- func (ctx *Context) GetStringOrDefault(key, defaultValue string) string
- func (ctx *Context) GetTraceId() string
- func (ctx *Context) JSON(code int, data []byte)
- func (ctx *Context) Reset() *Context
- func (ctx *Context) Set(key string, value interface{})
- func (ctx *Context) SetTraceId(traceId string)
- func (ctx *Context) String() string
- func (ctx *Context) Success(msg string, data interface{})
- func (ctx *Context) Value(key interface{}) interface{}
- type Engine
- func (engine *Engine) AddRoute(path string, handler Handler)
- func (engine *Engine) Run(addr ...string) error
- func (engine *Engine) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (engine *Engine) SetAfterHandler(handlers ...Handler)
- func (engine *Engine) SetBeforeHandlers(handlers ...Handler)
- type Handler
- type Resp
- type RunReq
Constants ¶
View Source
const ( SuccessCode = 200 FailCode = 500 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Writer http.ResponseWriter Request *http.Request Param *RunReq TraceId string // contains filtered or unexported fields }
func (*Context) GetInt64OrDefault ¶
func (*Context) GetStringOrDefault ¶
func (*Context) GetTraceId ¶
func (*Context) SetTraceId ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) ServeHTTP ¶
func (engine *Engine) ServeHTTP(w http.ResponseWriter, req *http.Request)
func (*Engine) SetAfterHandler ¶
func (*Engine) SetBeforeHandlers ¶
type RunReq ¶
type RunReq struct { JobID int64 `json:"jobId"` ExecutorHandler string `json:"executorHandler"` ExecutorParams string `json:"executorParams"` ExecutorBlockStrategy string `json:"executorBlockStrategy"` ExecutorTimeout int64 `json:"executorTimeout"` LogID int64 `json:"logId"` LogDateTime int64 `json:"logDateTime"` GlueType string `json:"glueType"` GlueSource string `json:"glueSource"` GlueUpdatetime int64 `json:"glueUpdatetime"` BroadcastIndex int64 `json:"broadcastIndex"` BroadcastTotal int64 `json:"broadcastTotal"` }
Click to show internal directories.
Click to hide internal directories.