Documentation ¶
Index ¶
- Constants
- 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) GetSharingDir(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) ListSharingIDs(c *gin.Context)
- func (h *FileHandlers) ListSharings(c *gin.Context)deprecated
- 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 GetSharingDirResp
- type ListResp
- type ListUploadingsResp
- type MetadataResp
- type MkdirReq
- type MoveReq
- type Sha1Params
- type SharingIDsResp
- type SharingReq
- type SharingResp
- type UploadChunkReq
- type UploadStatusResp
Constants ¶
View Source
const ( // queries FilePathQuery = "fp" ListDirQuery = "dp" )
View Source
const (
MsgTypeSha1 = "sha1"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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) GetSharingDir ¶ added in v0.5.0
func (h *FileHandlers) GetSharingDir(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) ListSharingIDs ¶ added in v0.5.0
func (h *FileHandlers) ListSharingIDs(c *gin.Context)
func (*FileHandlers) ListSharings
deprecated
func (h *FileHandlers) ListSharings(c *gin.Context)
Deprecated: use ListSharingIDs instead
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 GetSharingDirResp ¶ added in v0.5.0
type GetSharingDirResp struct {
SharingDir string `json:"sharingDir"`
}
type ListResp ¶
type ListResp struct { Cwd string `json:"cwd"` Metadatas []*MetadataResp `json:"metadatas"` }
type ListUploadingsResp ¶
type ListUploadingsResp struct {
UploadInfos []*db.UploadInfo `json:"uploadInfos"`
}
type MetadataResp ¶
type Sha1Params ¶
type Sha1Params struct {
FilePath string
}
type SharingIDsResp ¶ added in v0.5.0
type SharingReq ¶
type SharingReq struct {
SharingPath string `json:"sharingPath"`
}
type SharingResp ¶
type SharingResp struct {
SharingDirs []string `json:"sharingDirs"`
}
type UploadChunkReq ¶
Click to show internal directories.
Click to hide internal directories.