Documentation
¶
Index ¶
- func APIPing(c *gin.Context)
- func CheckExist(c *gin.Context)
- func FileDownloadSimple(url, referer, userAgent string) (body []byte, err error)
- func InitUpload(isTest bool)
- func SaveFileToCloud(appID, rid_, hash, filename, contentType string, bodyReader io.Reader, ...) (url string, errmsg string)
- func SaveFileToLocal(filename string, body []byte) error
- func UploadChunkInit(c *gin.Context)
- func UploadChunkUpload(c *gin.Context)
- func UploadSimple(c *gin.Context)
- func UploadURLSimple(c *gin.Context)
- type FileStatus
- type StorageConfigEx
- type UContextPlus
- type UploadUrlSimpleReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileDownloadSimple ¶
FileDownloadSimple 文件下载.
func InitUpload ¶
func InitUpload(isTest bool)
func SaveFileToCloud ¶
func SaveFileToLocal ¶
Types ¶
type FileStatus ¶
type FileStatus struct { xfile.BlockStatus URL string Rid string // Md5 string ChunkSize int }
FileStatus 文件上传状态.
type StorageConfigEx ¶
type StorageConfigEx struct {
// contains filtered or unexported fields
}
type UContextPlus ¶
type UContextPlus struct {
*ginplus.ContextPlus
}
UContextPlus 扩展的上下文.
func NewUContextPlus ¶
func NewUContextPlus(c *gin.Context) (context *UContextPlus)
NewUContextPlus 创建一个扩展上下文.
func (*UContextPlus) JSONFail ¶
func (c *UContextPlus) JSONFail(status int, reason string)
JSONFail 返回出错信息
type UploadUrlSimpleReq ¶
type UploadUrlSimpleReq struct { URL string `json:"url" validate:"required"` Referer string `json:"referer"` UserAgent string `json:"userAgent"` }
UploadUrlSimpleReq 通过URL上传资源.
Click to show internal directories.
Click to hide internal directories.