Documentation
¶
Index ¶
- type FolderController
- type ResumableUploadController
- type ResumableUploadInstance
- type StartUploadRequest
- type TransferDownloadController
- func (c *TransferDownloadController) FinishDownload(ctx echo.Context) error
- func (c *TransferDownloadController) GetDownloadStatus(ctx echo.Context) error
- func (c *TransferDownloadController) ReceiveDownloadBytes(ctx echo.Context) error
- func (c *TransferDownloadController) StartDownload(ctx echo.Context) error
- type TransferUploadController
- func (c *TransferUploadController) CancelUpload(ctx echo.Context) error
- func (c *TransferUploadController) FinishUpload(ctx echo.Context) error
- func (c *TransferUploadController) GetUploadStatus(ctx echo.Context) error
- func (c *TransferUploadController) GetVerifyStatus(ctx echo.Context) error
- func (c *TransferUploadController) SendUploadBytes(ctx echo.Context) error
- func (c *TransferUploadController) StartUpload(ctx echo.Context) error
- type TransferUploadControllerConfig
- type UploadRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FolderController ¶
type FolderController struct {
// contains filtered or unexported fields
}
func NewFolderController ¶
func NewFolderController(fileStor stor.FileStor) *FolderController
func (*FolderController) GetOrCreateFolder ¶
func (c *FolderController) GetOrCreateFolder(ctx echo.Context) error
func (*FolderController) GetOrCreateFolderPath ¶
func (c *FolderController) GetOrCreateFolderPath(ctx echo.Context) error
type ResumableUploadController ¶ added in v1.0.1
type ResumableUploadController struct {
// contains filtered or unexported fields
}
ResumableUploadController handles file uploads with support for unlimited size and restartable uploads.
func NewResumableUploadController ¶ added in v1.0.1
func NewResumableUploadController(fileStor stor.FileStor) *ResumableUploadController
NewResumableUploadController creates a new ResumableUploadController.
func (*ResumableUploadController) FinalizeUpload ¶ added in v1.0.1
func (c *ResumableUploadController) FinalizeUpload(ctx echo.Context) error
FinalizeUpload combines all chunks for a file into a single file in the correct order.
func (*ResumableUploadController) GetUploadStatus ¶ added in v1.0.1
func (c *ResumableUploadController) GetUploadStatus(ctx echo.Context) error
GetUploadStatus returns the current status of a file upload, including the file size and chunk information.
func (*ResumableUploadController) Upload ¶ added in v1.0.1
func (c *ResumableUploadController) Upload(ctx echo.Context) error
Upload handles file uploads with support for multiple chunks being sent simultaneously. It reads the file data from the request body and writes it to a chunk file. Each chunk is stored separately and will be combined when the upload is finalized.
type ResumableUploadInstance ¶ added in v1.0.1
type StartUploadRequest ¶ added in v1.0.1
type TransferDownloadController ¶ added in v1.0.1
type TransferDownloadController struct {
// contains filtered or unexported fields
}
func NewTransferDownloadController ¶ added in v1.0.1
func NewTransferDownloadController(clientTransferStor stor.ClientTransferStor) *TransferDownloadController
func (*TransferDownloadController) FinishDownload ¶ added in v1.0.1
func (c *TransferDownloadController) FinishDownload(ctx echo.Context) error
func (*TransferDownloadController) GetDownloadStatus ¶ added in v1.0.1
func (c *TransferDownloadController) GetDownloadStatus(ctx echo.Context) error
func (*TransferDownloadController) ReceiveDownloadBytes ¶ added in v1.0.1
func (c *TransferDownloadController) ReceiveDownloadBytes(ctx echo.Context) error
func (*TransferDownloadController) StartDownload ¶ added in v1.0.1
func (c *TransferDownloadController) StartDownload(ctx echo.Context) error
type TransferUploadController ¶ added in v1.0.1
type TransferUploadController struct {
// contains filtered or unexported fields
}
func NewTransferUploadController ¶ added in v1.0.1
func NewTransferUploadController(cfg TransferUploadControllerConfig) *TransferUploadController
func (*TransferUploadController) CancelUpload ¶ added in v1.0.1
func (c *TransferUploadController) CancelUpload(ctx echo.Context) error
func (*TransferUploadController) FinishUpload ¶ added in v1.0.1
func (c *TransferUploadController) FinishUpload(ctx echo.Context) error
func (*TransferUploadController) GetUploadStatus ¶ added in v1.0.1
func (c *TransferUploadController) GetUploadStatus(ctx echo.Context) error
func (*TransferUploadController) GetVerifyStatus ¶ added in v1.0.1
func (c *TransferUploadController) GetVerifyStatus(ctx echo.Context) error
func (*TransferUploadController) SendUploadBytes ¶ added in v1.0.1
func (c *TransferUploadController) SendUploadBytes(ctx echo.Context) error
func (*TransferUploadController) StartUpload ¶ added in v1.0.1
func (c *TransferUploadController) StartUpload(ctx echo.Context) error
type TransferUploadControllerConfig ¶ added in v1.0.1
type TransferUploadControllerConfig struct {
ClientTransferStor stor.ClientTransferStor
FileStor stor.FileStor
TransferRequestStor stor.TransferRequestStor
TransferRequestFileStor stor.TransferRequestFileStor
ClientTransferCache mcapid.ClientTransferCache
}
type UploadRequest ¶ added in v1.0.1
type UploadRequest struct {
ProjectID int `json:"project_id"`
DestinationPath string `json:"destination_path"`
ChunkIndex int `json:"chunk_index"`
TotalChunks int `json:"total_chunks"`
TotalSize int64 `json:"total_size"`
}
UploadRequest contains the information needed to upload a file.