api

package
v0.0.0-...-ee63aef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes(ws *restful.WebService, handler *FileHandler)

RegisterRoutes registers the file-related routes

Types

type FileHandler

type FileHandler struct {
	// contains filtered or unexported fields
}

FileHandler handles file operations for the share directory

func NewFileHandler

func NewFileHandler(service service.FileService) *FileHandler

NewFileHandler creates a new FileHandler

func (*FileHandler) GetFile

func (h *FileHandler) GetFile(req *restful.Request, resp *restful.Response)

GetFile handles GET requests to retrieve file content

func (*FileHandler) HandleFileOperation

func (h *FileHandler) HandleFileOperation(req *restful.Request, resp *restful.Response)

HandleFileOperation handles file operations like reclaim and share

func (*FileHandler) HeadFile

func (h *FileHandler) HeadFile(req *restful.Request, resp *restful.Response)

HeadFile handles HEAD requests to get file metadata

func (*FileHandler) ReclaimFiles

func (h *FileHandler) ReclaimFiles(req *restful.Request, resp *restful.Response)

ReclaimFiles handles reclaiming files that haven't been accessed for more than 14 days

func (*FileHandler) ShareFile

func (h *FileHandler) ShareFile(req *restful.Request, resp *restful.Response, shareReq model.FileOperationParams)

ShareFile handles sharing a file from a box to the share directory

func (*FileHandler) WriteFile

func (h *FileHandler) WriteFile(req *restful.Request, resp *restful.Response, writeReq model.FileOperationParams)

WriteFile handles PUT requests to write or overwrite file content

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL