Documentation ¶
Index ¶
- Constants
- Variables
- func UploadNS(user string) string
- type AutoLocker
- type CreateReq
- type FileHandlers
- func (h *FileHandlers) AddSharing(c *gin.Context)
- func (h *FileHandlers) Copy(c *gin.Context)
- func (h *FileHandlers) CopyDir(c *gin.Context)
- func (h *FileHandlers) Create(c *gin.Context)
- func (h *FileHandlers) DelSharing(c *gin.Context)
- func (h *FileHandlers) DelUploading(c *gin.Context)
- func (h *FileHandlers) Delete(c *gin.Context)
- func (h *FileHandlers) Download(c *gin.Context)
- func (h *FileHandlers) GenerateHash(c *gin.Context)
- func (h *FileHandlers) GetStreamReader(userID uint64, fd io.Reader) (io.ReadCloser, error)
- func (h *FileHandlers) IsSharing(c *gin.Context)
- func (h *FileHandlers) List(c *gin.Context)
- func (h *FileHandlers) ListHome(c *gin.Context)
- func (h *FileHandlers) ListSharings(c *gin.Context)
- func (h *FileHandlers) ListUploadings(c *gin.Context)
- func (h *FileHandlers) MergeFileInfos(dirPath string, infos []os.FileInfo) ([]*MetadataResp, error)
- func (h *FileHandlers) Metadata(c *gin.Context)
- func (h *FileHandlers) Mkdir(c *gin.Context)
- func (h *FileHandlers) Move(c *gin.Context)
- func (h *FileHandlers) NewAutoLocker(c *gin.Context, key string) *AutoLocker
- func (h *FileHandlers) UploadChunk(c *gin.Context)
- func (h *FileHandlers) UploadStatus(c *gin.Context)
- type GenerateHashReq
- type ListResp
- type ListUploadingsResp
- type MetadataResp
- type MkdirReq
- type MoveReq
- type Sha1Params
- type SharingReq
- type SharingResp
- type UploadChunkReq
- type UploadInfo
- type UploadMgr
- func (um *UploadMgr) AddInfo(user, filePath, tmpPath string, fileSize int64) error
- func (um *UploadMgr) DelInfo(user, filePath string) error
- func (um *UploadMgr) GetInfo(user, filePath string) (string, int64, int64, error)
- func (um *UploadMgr) ListInfo(user string) ([]*UploadInfo, error)
- func (um *UploadMgr) SetInfo(user, filePath string, newUploaded int64) error
- type UploadStatusResp
Constants ¶
View Source
const MsgTypeSha1 = "sha1"
Variables ¶
View Source
var ( // queries FilePathQuery = "fp" ListDirQuery = "dp" )
Functions ¶
Types ¶
type AutoLocker ¶
type AutoLocker struct {
// contains filtered or unexported fields
}
func (*AutoLocker) Exec ¶
func (lk *AutoLocker) Exec(handler func())
type FileHandlers ¶
type FileHandlers struct {
// contains filtered or unexported fields
}
func NewFileHandlers ¶
func (*FileHandlers) AddSharing ¶
func (h *FileHandlers) AddSharing(c *gin.Context)
func (*FileHandlers) Copy ¶
func (h *FileHandlers) Copy(c *gin.Context)
func (*FileHandlers) CopyDir ¶
func (h *FileHandlers) CopyDir(c *gin.Context)
func (*FileHandlers) Create ¶
func (h *FileHandlers) Create(c *gin.Context)
func (*FileHandlers) DelSharing ¶
func (h *FileHandlers) DelSharing(c *gin.Context)
func (*FileHandlers) DelUploading ¶
func (h *FileHandlers) DelUploading(c *gin.Context)
func (*FileHandlers) Delete ¶
func (h *FileHandlers) Delete(c *gin.Context)
func (*FileHandlers) GenerateHash ¶
func (h *FileHandlers) GenerateHash(c *gin.Context)
func (*FileHandlers) GetStreamReader ¶
func (h *FileHandlers) GetStreamReader(userID uint64, fd io.Reader) (io.ReadCloser, error)
func (*FileHandlers) IsSharing ¶
func (h *FileHandlers) IsSharing(c *gin.Context)
func (*FileHandlers) List ¶
func (h *FileHandlers) List(c *gin.Context)
func (*FileHandlers) ListHome ¶
func (h *FileHandlers) ListHome(c *gin.Context)
func (*FileHandlers) ListSharings ¶
func (h *FileHandlers) ListSharings(c *gin.Context)
func (*FileHandlers) ListUploadings ¶
func (h *FileHandlers) ListUploadings(c *gin.Context)
func (*FileHandlers) MergeFileInfos ¶
func (h *FileHandlers) MergeFileInfos(dirPath string, infos []os.FileInfo) ([]*MetadataResp, error)
func (*FileHandlers) Metadata ¶
func (h *FileHandlers) Metadata(c *gin.Context)
func (*FileHandlers) Mkdir ¶
func (h *FileHandlers) Mkdir(c *gin.Context)
func (*FileHandlers) Move ¶
func (h *FileHandlers) Move(c *gin.Context)
func (*FileHandlers) NewAutoLocker ¶
func (h *FileHandlers) NewAutoLocker(c *gin.Context, key string) *AutoLocker
func (*FileHandlers) UploadChunk ¶
func (h *FileHandlers) UploadChunk(c *gin.Context)
func (*FileHandlers) UploadStatus ¶
func (h *FileHandlers) UploadStatus(c *gin.Context)
type GenerateHashReq ¶
type GenerateHashReq struct {
FilePath string `json:"filePath"`
}
type ListResp ¶
type ListResp struct { Cwd string `json:"cwd"` Metadatas []*MetadataResp `json:"metadatas"` }
type ListUploadingsResp ¶
type ListUploadingsResp struct {
UploadInfos []*UploadInfo `json:"uploadInfos"`
}
type MetadataResp ¶
type Sha1Params ¶
type Sha1Params struct {
FilePath string
}
type SharingReq ¶
type SharingReq struct {
SharingPath string `json:"sharingPath"`
}
type SharingResp ¶
type SharingResp struct {
SharingDirs []string `json:"sharingDirs"`
}
type UploadChunkReq ¶
type UploadInfo ¶
Click to show internal directories.
Click to hide internal directories.