explorer

package
v3.0.0-...-3373b9d Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: GPL-3.0 Imports: 30 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTransferTask

func CreateTransferTask(c *gin.Context, req *serializer.SlaveTransferReq) serializer.Response

CreateTransferTask 创建从机文件转存任务

func DeleteAllUploadSession

func DeleteAllUploadSession(ctx context.Context, c *gin.Context) serializer.Response

DeleteAllUploadSession 删除当前用户的全部上传绘会话

Types

type ArchiveService

type ArchiveService struct {
	ID string `uri:"sessionID" binding:"required"`
}

ArchiveService 文件流式打包下載服务

func (*ArchiveService) DownloadArchived

func (service *ArchiveService) DownloadArchived(ctx context.Context, c *gin.Context) serializer.Response

DownloadArchived 通过预签名 URL 打包下载

type CreateUploadSessionService

type CreateUploadSessionService struct {
	Path         string `json:"path" binding:"required"`
	Size         uint64 `json:"size" binding:"min=0"`
	Name         string `json:"name" binding:"required"`
	PolicyID     string `json:"policy_id" binding:"required"`
	LastModified int64  `json:"last_modified"`
	MimeType     string `json:"mime_type"`
}

CreateUploadSessionService 获取上传凭证服务

func (*CreateUploadSessionService) Create

Create 创建新的上传会话

type DirectoryService

type DirectoryService struct {
	Path string `uri:"path" json:"path" binding:"required,min=1,max=65535"`
}

DirectoryService 创建新目录服务

func (*DirectoryService) CreateDirectory

func (service *DirectoryService) CreateDirectory(c *gin.Context) serializer.Response

CreateDirectory 创建目录

func (*DirectoryService) ListDirectory

func (service *DirectoryService) ListDirectory(c *gin.Context) serializer.Response

ListDirectory 列出目录内容

type DownloadService

type DownloadService struct {
	ID string `uri:"id" binding:"required"`
}

DownloadService 文件下載服务

func (*DownloadService) Download

func (service *DownloadService) Download(ctx context.Context, c *gin.Context) serializer.Response

Download 通过签名URL的文件下载,无需登录

type FileAnonymousGetService

type FileAnonymousGetService struct {
	ID   uint   `uri:"id" binding:"required,min=1"`
	Name string `uri:"name" binding:"required"`
}

FileAnonymousGetService 匿名(外链)获取文件服务

func (*FileAnonymousGetService) Download

Download 签名的匿名文件下载

func (*FileAnonymousGetService) Source

Source 重定向到文件的有效原始链接

type FileIDService

type FileIDService struct {
}

FileIDService 通过文件ID对文件进行操作的服务

func (*FileIDService) CreateDocPreviewSession

func (service *FileIDService) CreateDocPreviewSession(ctx context.Context, c *gin.Context, editable bool) serializer.Response

CreateDocPreviewSession 创建DOC文件预览会话,返回预览地址

func (*FileIDService) CreateDownloadSession

func (service *FileIDService) CreateDownloadSession(ctx context.Context, c *gin.Context) serializer.Response

CreateDownloadSession 创建下载会话,获取下载URL

func (*FileIDService) PreviewContent

func (service *FileIDService) PreviewContent(ctx context.Context, c *gin.Context, isText bool) serializer.Response

PreviewContent 预览文件,需要登录会话, isText - 是否为文本文件,文本文件会 强制经由服务端中转

func (*FileIDService) PutContent

func (service *FileIDService) PutContent(ctx context.Context, c *gin.Context) serializer.Response

PutContent 更新文件内容

type FilterTagCreateService

type FilterTagCreateService struct {
	Expression string `json:"expression" binding:"required,min=1,max=65535"`
	Icon       string `json:"icon" binding:"required,min=1,max=255"`
	Name       string `json:"name" binding:"required,min=1,max=255"`
	Color      string `json:"color" binding:"hexcolor|rgb|rgba|hsl"`
}

FilterTagCreateService 文件分类标签创建服务

func (*FilterTagCreateService) Create

func (service *FilterTagCreateService) Create(c *gin.Context, user *model.User) serializer.Response

Create 创建标签

type ItemCompressService

type ItemCompressService struct {
	Src  ItemIDService `json:"src"`
	Dst  string        `json:"dst" binding:"required,min=1,max=65535"`
	Name string        `json:"name" binding:"required,min=1,max=255"`
}

ItemCompressService 文件压缩任务服务

func (*ItemCompressService) CreateCompressTask

func (service *ItemCompressService) CreateCompressTask(c *gin.Context) serializer.Response

CreateCompressTask 创建文件压缩任务

type ItemDecompressService

type ItemDecompressService struct {
	Src      string `json:"src"`
	Dst      string `json:"dst" binding:"required,min=1,max=65535"`
	Encoding string `json:"encoding"`
}

ItemDecompressService 文件解压缩任务服务

func (*ItemDecompressService) CreateDecompressTask

func (service *ItemDecompressService) CreateDecompressTask(c *gin.Context) serializer.Response

CreateDecompressTask 创建文件解压缩任务

type ItemIDService

type ItemIDService struct {
	Items      []string `json:"items"`
	Dirs       []string `json:"dirs"`
	Source     *ItemService
	Force      bool `json:"force"`
	UnlinkOnly bool `json:"unlink"`
}

ItemIDService 处理多文件/目录相关服务,字段值为HashID,可通过Raw()方法获取原始ID

func (*ItemIDService) Archive

func (service *ItemIDService) Archive(ctx context.Context, c *gin.Context) serializer.Response

Archive 创建归档

func (*ItemIDService) Delete

func (service *ItemIDService) Delete(ctx context.Context, c *gin.Context) serializer.Response

Delete 删除对象

func (*ItemIDService) Raw

func (service *ItemIDService) Raw() *ItemService

Raw 批量解码HashID,获取原始ID

func (*ItemIDService) Sources

Sources 批量获取对象的外链

type ItemMoveService

type ItemMoveService struct {
	SrcDir string        `json:"src_dir" binding:"required,min=1,max=65535"`
	Src    ItemIDService `json:"src"`
	Dst    string        `json:"dst" binding:"required,min=1,max=65535"`
}

ItemMoveService 处理多文件/目录移动

func (*ItemMoveService) Copy

func (service *ItemMoveService) Copy(ctx context.Context, c *gin.Context) serializer.Response

Copy 复制对象

func (*ItemMoveService) Move

func (service *ItemMoveService) Move(ctx context.Context, c *gin.Context) serializer.Response

Move 移动对象

type ItemPropertyService

type ItemPropertyService struct {
	ID        string `binding:"required"`
	TraceRoot bool   `form:"trace_root"`
	IsFolder  bool   `form:"is_folder"`
}

ItemPropertyService 获取对象属性服务

func (*ItemPropertyService) GetProperty

func (service *ItemPropertyService) GetProperty(ctx context.Context, c *gin.Context) serializer.Response

GetProperty 获取对象的属性

type ItemRenameService

type ItemRenameService struct {
	Src     ItemIDService `json:"src"`
	NewName string        `json:"new_name" binding:"required,min=1,max=255"`
}

ItemRenameService 处理多文件/目录重命名

func (*ItemRenameService) Rename

func (service *ItemRenameService) Rename(ctx context.Context, c *gin.Context) serializer.Response

Rename 重命名对象

type ItemSearchService

type ItemSearchService struct {
	Type     string `uri:"type" binding:"required"`
	Keywords string `uri:"keywords" binding:"required"`
	Path     string `form:"path"`
}

ItemSearchService 文件搜索服务

func (*ItemSearchService) Search

func (service *ItemSearchService) Search(c *gin.Context) serializer.Response

Search 执行搜索

func (*ItemSearchService) SearchKeywords

func (service *ItemSearchService) SearchKeywords(c *gin.Context, fs *filesystem.FileSystem, keywords ...interface{}) serializer.Response

SearchKeywords 根据关键字搜索文件

type ItemService

type ItemService struct {
	Items []uint `json:"items"`
	Dirs  []uint `json:"dirs"`
}

ItemService 处理多文件/目录相关服务

type LinkTagCreateService

type LinkTagCreateService struct {
	Path string `json:"path" binding:"required,min=1,max=65535"`
	Name string `json:"name" binding:"required,min=1,max=255"`
}

LinkTagCreateService 目录快捷方式标签创建服务

func (*LinkTagCreateService) Create

func (service *LinkTagCreateService) Create(c *gin.Context, user *model.User) serializer.Response

Create 创建标签

type SingleFileService

type SingleFileService struct {
	Path string `uri:"path" json:"path" binding:"required,min=1,max=65535"`
}

SingleFileService 对单文件进行操作的五福,path为文件完整路径

func (*SingleFileService) Create

func (service *SingleFileService) Create(c *gin.Context) serializer.Response

New 创建新文件

type SlaveCreateUploadSessionService

type SlaveCreateUploadSessionService struct {
	Session   serializer.UploadSession `json:"session" binding:"required"`
	TTL       int64                    `json:"ttl"`
	Overwrite bool                     `json:"overwrite"`
}

SlaveListService 从机上传会话服务

func (*SlaveCreateUploadSessionService) Create

Create 从机创建上传会话

type SlaveDownloadService

type SlaveDownloadService struct {
	PathEncoded string `uri:"path" binding:"required"`
	Name        string `uri:"name" binding:"required"`
	Speed       int    `uri:"speed" binding:"min=0"`
}

SlaveDownloadService 从机文件下載服务

func (*SlaveDownloadService) ServeFile

func (service *SlaveDownloadService) ServeFile(ctx context.Context, c *gin.Context, isDownload bool) serializer.Response

ServeFile 通过签名的URL下载从机文件

type SlaveFileService

type SlaveFileService struct {
	PathEncoded string `uri:"path" binding:"required"`
	Ext         string `uri:"ext"`
}

SlaveFileService 从机单文件文件相关服务

func (*SlaveFileService) Thumb

func (service *SlaveFileService) Thumb(ctx context.Context, c *gin.Context) serializer.Response

Thumb 通过签名URL获取从机文件缩略图

type SlaveFilesService

type SlaveFilesService struct {
	Files []string `json:"files" binding:"required,gt=0"`
}

SlaveFilesService 从机多文件相关服务

func (*SlaveFilesService) Delete

func (service *SlaveFilesService) Delete(ctx context.Context, c *gin.Context) serializer.Response

Delete 通过签名的URL删除从机文件

type SlaveListService

type SlaveListService struct {
	Path      string `json:"path" binding:"required,min=1,max=65535"`
	Recursive bool   `json:"recursive"`
}

SlaveListService 从机列表服务

func (*SlaveListService) List

func (service *SlaveListService) List(c *gin.Context) serializer.Response

List 列出从机上的文件

type TagService

type TagService struct {
}

TagService 标签服务

func (*TagService) Delete

func (service *TagService) Delete(c *gin.Context, user *model.User) serializer.Response

Delete 删除标签

type UploadService

type UploadService struct {
	ID    string `uri:"sessionId" binding:"required"`
	Index int    `uri:"index" form:"index" binding:"min=0"`
}

UploadService 本机及从机策略上传服务

func (*UploadService) LocalUpload

func (service *UploadService) LocalUpload(ctx context.Context, c *gin.Context) serializer.Response

LocalUpload 处理本机文件分片上传

func (*UploadService) SlaveUpload

func (service *UploadService) SlaveUpload(ctx context.Context, c *gin.Context) serializer.Response

SlaveUpload 处理从机文件分片上传

type UploadSessionService

type UploadSessionService struct {
	ID string `uri:"sessionId" binding:"required"`
}

UploadSessionService 上传会话服务

func (*UploadSessionService) Delete

Delete 删除指定上传会话

func (*UploadSessionService) SlaveDelete

func (service *UploadSessionService) SlaveDelete(ctx context.Context, c *gin.Context) serializer.Response

SlaveDelete 从机删除指定上传会话

type WopiService

type WopiService struct {
}

func (*WopiService) FileInfo

func (service *WopiService) FileInfo(c *gin.Context) (*serializer.WopiFileInfo, error)

func (*WopiService) GetFile

func (service *WopiService) GetFile(c *gin.Context) error

func (*WopiService) Rename

func (service *WopiService) Rename(c *gin.Context) error

Jump to

Keyboard shortcuts

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