Documentation ¶
Index ¶
- Variables
- func IsMethod(r *http.Request, method ...string) bool
- func NewLimitItem(max int) *limitItem
- func NotModified(r *http.Request, w http.ResponseWriter, cuTime time.Time) (notMod bool)
- func WithFlush(w http.ResponseWriter) http.ResponseWriter
- func WithStatusCode(w http.ResponseWriter, code int)
- type Cache
- type Exprier
- func (t *Exprier) Check(key string) (time.Time, error)
- func (t *Exprier) Disable()
- func (t *Exprier) Drop(key string)
- func (t *Exprier) Len() int
- func (t *Exprier) LoopCheck(ctx context.Context, key string, whenfail func(key string, e error)) (e error)
- func (t *Exprier) Reg(dur time.Duration, reNewKey ...string) (string, error)
- func (t *Exprier) SetMax(max int)
- type Limits
- type Web
- type WebPath
- func (t *WebPath) Delete(path string) (deleteMe bool)
- func (t *WebPath) GetConn(r *http.Request) net.Conn
- func (t *WebPath) Load(path string) (func(w http.ResponseWriter, r *http.Request), bool)
- func (t *WebPath) LoadOnePerfix(path string) (f func(w http.ResponseWriter, r *http.Request), ok bool)
- func (t *WebPath) LoadPerfix(path string) (f func(w http.ResponseWriter, r *http.Request), ok bool)
- func (t *WebPath) Reset()
- func (t *WebPath) Store(path string, f func(w http.ResponseWriter, r *http.Request))
- type WebSync
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrExpried = errors.New("ErrExpried") ErrNoFound = errors.New("ErrNoFound") )
Functions ¶
func NewLimitItem ¶ added in v0.27.16
func NewLimitItem(max int) *limitItem
func NotModified ¶ added in v0.28.20240721121146
func WithFlush ¶ added in v0.28.1
func WithFlush(w http.ResponseWriter) http.ResponseWriter
func WithStatusCode ¶ added in v0.27.16
func WithStatusCode(w http.ResponseWriter, code int)
Types ¶
type Cache ¶ added in v0.27.13
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) Cache ¶ added in v0.27.15
func (t *Cache) Cache(key string, aliveDur time.Duration, w http.ResponseWriter) http.ResponseWriter
type Exprier ¶ added in v0.28.20240107072530
type Exprier struct {
// contains filtered or unexported fields
}
func NewExprier ¶ added in v0.28.20240107072530
type Limits ¶ added in v0.27.16
type Limits struct {
// contains filtered or unexported fields
}
func (*Limits) AddLimitItem ¶ added in v0.27.16
func (t *Limits) AddLimitItem(item *limitItem)
type WebPath ¶ added in v0.22.4
type WebPath struct { Path string `json:"path"` PerSame *WebPath `json:"-"` Per *WebPath `json:"-"` Same *WebPath `json:"same"` Next *WebPath `json:"next"` // contains filtered or unexported fields }
func (*WebPath) Load ¶ added in v0.22.4
O /../../1 => /../../1
X /../../1 => /../../
X /../../1 => /../
func (*WebPath) LoadOnePerfix ¶ added in v0.28.20240309172046
func (t *WebPath) LoadOnePerfix(path string) (f func(w http.ResponseWriter, r *http.Request), ok bool)
O /../../1 => /../../1
O /../../1 => /../../
X /../../1 => /../
func (*WebPath) LoadPerfix ¶ added in v0.28.20231202144738
O /../../1 => /../../1
O /../../1 => /../../
O /../../1 => /../
type WebSync ¶ added in v0.22.4
func NewSyncMap ¶ added in v0.22.1
func NewSyncMapNoPanic ¶ added in v0.28.20241021164252
Click to show internal directories.
Click to hide internal directories.