Documentation
¶
Index ¶
- Variables
- func ClientFilter() gin.HandlerFunc
- func ImageCache(ttl time.Duration, reg *regexp.Regexp) gin.HandlerFunc
- func Logger() gin.HandlerFunc
- func Recovery() gin.HandlerFunc
- func SetRefererPolicy(value constants.ReferrerPolicy) gin.HandlerFunc
- func SubtitleCache(ttl time.Duration, reg *regexp.Regexp) gin.HandlerFunc
- type CacheData
- type WriterWarp
Constants ¶
This section is empty.
Variables ¶
View Source
var CacheKeyIgnoreQuery = []string{
"api_key",
"starttimeticks",
"x-playback-session-id",
"playsessionid",
"tag",
}
计算Key时忽略的查询参数
Functions ¶
func ImageCache ¶
func Recovery ¶
func Recovery() gin.HandlerFunc
func SetRefererPolicy ¶
func SetRefererPolicy(value constants.ReferrerPolicy) gin.HandlerFunc
设置Referer策略
func SubtitleCache ¶
Types ¶
type CacheData ¶
type CacheData struct {
StatusCode int // code 响应码
Header http.Header // header 响应头信息
Body []byte // body 响应体
}
func ParseCacheData ¶
func (*CacheData) WriteResponse ¶
type WriterWarp ¶
type WriterWarp struct {
gin.ResponseWriter
Body bytes.Buffer
}
自定义的请求响应器
用于记录缓存数据
Click to show internal directories.
Click to hide internal directories.