Versions in this module Expand all Collapse all v0 v0.0.1 Nov 28, 2024 Changes in this version + var NoProxyRange = &model.RangeReadCloser + var SecretKey []byte + func CanAccess(user *model.User, meta *model.Meta, reqPath string, password string) bool + func CanWrite(meta *model.Meta, path string) bool + func ErrorResp(c *gin.Context, err error, code int, l ...bool) + func ErrorStrResp(c *gin.Context, str string, code int, l ...bool) + func ErrorWithDataResp(c *gin.Context, err error, code int, data interface{}, l ...bool) + func GenerateToken(user *model.User) (tokenString string, err error) + func GetApiUrl(r *http.Request) string + func InvalidateToken(tokenString string) error + func IsApply(metaPath, reqPath string, applySub bool) bool + func IsStorageSignEnabled(rawPath string) bool + func IsTokenInvalidated(tokenString string) bool + func Proxy(w http.ResponseWriter, r *http.Request, link *model.Link, file model.Obj) error + func ProxyRange(link *model.Link, size int64) + func ShouldProxy(storage driver.Driver, filename string) bool + func Sign(obj model.Obj, parent string, encrypt bool) string + func SuccessResp(c *gin.Context, data ...interface{}) + type PageResp struct + Content interface{} + Total int64 + type Resp struct + Code int + Data T + Message string + type UserClaims struct + PwdTS int64 + Username string + func ParseToken(tokenString string) (*UserClaims, error)