Documentation ¶
Index ¶
- Variables
- func CheckStatusCode(code int)
- func ErrResp(c *gin.Context, code int, err error) (int, interface{})
- func FsRootPath(userName, relFilePath string) string
- func GetUserId(ctx *gin.Context) (uint64, error)
- func GetUserInfo(tokenStr string, tokenEncDec cryptoutil.ITokenEncDec) (map[string]string, error)
- func NewMsgResp(code int, msg string) (int, interface{})
- func Resp(code int) (int, interface{})
- func UploadFolder(userName string) string
- func UploadPath(userName, relFilePath string) string
- type MsgResp
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // dirs UploadDir = "uploadings" FsDir = "files" FsRootDir = "files" UserIDParam = "uid" UserParam = "user" PwdParam = "pwd" NewPwdParam = "newpwd" RoleParam = "role" ExpireParam = "expire" CaptchaIDParam = "capid" TokenCookie = "tk" LastID = "lid" // DownloadChunkSize can not be greater than limiter's token count // downloadSpeedLimit can not be lower than DownloadChunkSize DownloadChunkSize = 100 * 1024 ErrAccessDenied = errors.New("access denied") )
Functions ¶
func CheckStatusCode ¶ added in v0.10.4
func CheckStatusCode(code int)
Check if the status code is valid, panic if not.
func FsRootPath ¶
func GetUserInfo ¶
func GetUserInfo(tokenStr string, tokenEncDec cryptoutil.ITokenEncDec) (map[string]string, error)
func NewMsgResp ¶
func UploadFolder ¶
func UploadPath ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.