Documentation ¶
Index ¶
- Variables
- 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(username string) (tokenString string, err error)
- func GetApiUrl(r *http.Request) string
- func Proxy(w http.ResponseWriter, r *http.Request, link *model.Link, file model.Obj) error
- func Sign(obj model.Obj, parent string, encrypt bool) string
- func SuccessResp(c *gin.Context, data ...interface{})
- type PageResp
- type Resp
- type UserClaims
Constants ¶
This section is empty.
Variables ¶
View Source
var HttpClient = &http.Client{}
View Source
var SecretKey []byte
Functions ¶
func ErrorWithDataResp ¶ added in v3.5.1
func GenerateToken ¶
func SuccessResp ¶
Types ¶
type PageResp ¶
type PageResp struct { Content interface{} `json:"content"` Total int64 `json:"total"` }
type UserClaims ¶
type UserClaims struct { Username string `json:"username"` jwt.RegisteredClaims }
func ParseToken ¶
func ParseToken(tokenString string) (*UserClaims, error)
Click to show internal directories.
Click to hide internal directories.