Version: v0.0.0-...-746aa3e Latest Latest

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

Go to latest
Published: Oct 26, 2020 License: GPL-3.0 Imports: 24 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


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的文件下载,无需登录

func (*DownloadService) DownloadArchived

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

DownloadArchived 下載已打包的多文件

type FileAnonymousGetService

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

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

func (*FileAnonymousGetService) Download

Download 签名的匿名文件下载

type FileIDService

type FileIDService struct {

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

func (*FileIDService) CreateDocPreviewSession

func (service *FileIDService) CreateDocPreviewSession(ctx context.Context, c *gin.Context) 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"`

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

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

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 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"`

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 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"`

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 UploadCredentialService

type UploadCredentialService struct {
	Path string `form:"path" binding:"required"`
	Size uint64 `form:"size" binding:"min=0"`
	Name string `form:"name"`
	Type string `form:"type"`

UploadCredentialService 获取上传凭证服务

func (*UploadCredentialService) Get

Get 获取新的上传凭证

Jump to

Keyboard shortcuts

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