Documentation ¶
Index ¶
- Variables
- func InitDir()
- type Chunk
- type CreateUploadResponse
- type DownloadRequest
- type File
- type FileChunk
- type FileController
- type ReassembleChunksRequest
- type ReassembleChunksResponse
- type Service
- func (u Service) CreateUpload() CreateUploadResponse
- func (u Service) Download(req DownloadRequest, header http.Header, writer http.ResponseWriter) error
- func (u Service) ReassembleChunk(req ReassembleChunksRequest) (*ReassembleChunksResponse, error)
- func (u Service) UploadChunk(req *http.Request) (*UploadChunkResponse, error)
- type UploadChunkResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var Dir = "upload"
Functions ¶
Types ¶
type CreateUploadResponse ¶
type CreateUploadResponse struct {
UploadId string
}
type DownloadRequest ¶
type FileController ¶
type FileController struct {
// contains filtered or unexported fields
}
func NewFileController ¶ added in v1.2.2
func NewFileController(d dependency) FileController
func (*FileController) Download ¶
func (c *FileController) Download(ctx *gin.Context)
func (*FileController) NewUpload ¶
func (c *FileController) NewUpload(ctx *gin.Context)
func (*FileController) Reassemble ¶
func (c *FileController) Reassemble(ctx *gin.Context)
func (*FileController) UploadChunk ¶
func (c *FileController) UploadChunk(ctx *gin.Context)
type ReassembleChunksRequest ¶
type Service ¶ added in v1.1.8
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶ added in v1.2.2
func NewService(dep dependency) Service
func (Service) CreateUpload ¶ added in v1.1.8
func (u Service) CreateUpload() CreateUploadResponse
func (Service) Download ¶ added in v1.1.8
func (u Service) Download(req DownloadRequest, header http.Header, writer http.ResponseWriter) error
func (Service) ReassembleChunk ¶ added in v1.1.8
func (u Service) ReassembleChunk(req ReassembleChunksRequest) (*ReassembleChunksResponse, error)
ReassembleChunk put chunks together
func (Service) UploadChunk ¶ added in v1.1.8
func (u Service) UploadChunk(req *http.Request) (*UploadChunkResponse, error)
UploadChunk upload each 4MB chunk of a file
type UploadChunkResponse ¶
Click to show internal directories.
Click to hide internal directories.