Documentation
¶
Index ¶
- type AddGroupService
- type AddNodeService
- type AddPolicyService
- type AddUserService
- type AdminListService
- func (service *AdminListService) Downloads() serializer.Response
- func (service *AdminListService) Files() serializer.Response
- func (service *AdminListService) Groups() serializer.Response
- func (service *AdminListService) Nodes() serializer.Response
- func (service *AdminListService) Policies() serializer.Response
- func (service *AdminListService) Shares() serializer.Response
- func (service *AdminListService) Tasks() serializer.Response
- func (service *AdminListService) Users() serializer.Response
- type Aria2TestService
- type BatchSettingChangeService
- type BatchSettingGet
- type FileBatchService
- type FileService
- type GroupService
- type ImportTaskService
- type ListFolderService
- type MailTestService
- type NoParamService
- type NodeService
- type PathTestService
- type PolicyService
- func (service *PolicyService) AddCORS() serializer.Response
- func (service *PolicyService) AddSCF() serializer.Response
- func (service *PolicyService) Delete() serializer.Response
- func (service *PolicyService) Get() serializer.Response
- func (service *PolicyService) GetOAuth(c *gin.Context, policyType string) serializer.Response
- type SettingChangeService
- type ShareBatchService
- type SlavePingService
- type SlaveTestService
- type TaskBatchService
- type ThumbGeneratorTestService
- type ToggleNodeService
- type UserBatchService
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddGroupService ¶
AddGroupService 用户组添加服务
type AddNodeService ¶
AddNodeService 节点添加服务
type AddPolicyService ¶
AddPolicyService 存储策略添加服务
func (*AddPolicyService) Add ¶
func (service *AddPolicyService) Add() serializer.Response
Add 添加存储策略
type AddUserService ¶
type AddUserService struct {
User model.User `json:"User" binding:"required"`
Password string `json:"password"`
}
AddUserService 用户添加服务
type AdminListService ¶
type AdminListService struct {
Page int `json:"page" binding:"min=1,required"`
PageSize int `json:"page_size" binding:"min=1,required"`
OrderBy string `json:"order_by"`
Conditions map[string]string `form:"conditions"`
Searches map[string]string `form:"searches"`
}
AdminListService 仪表盘列条目服务
func (*AdminListService) Downloads ¶
func (service *AdminListService) Downloads() serializer.Response
Downloads 列出离线下载任务
func (*AdminListService) Files ¶
func (service *AdminListService) Files() serializer.Response
Files 列出文件
func (*AdminListService) Groups ¶
func (service *AdminListService) Groups() serializer.Response
Groups 列出用户组
func (*AdminListService) Nodes ¶
func (service *AdminListService) Nodes() serializer.Response
Nodes 列出从机节点
func (*AdminListService) Policies ¶
func (service *AdminListService) Policies() serializer.Response
Policies 列出存储策略
func (*AdminListService) Shares ¶
func (service *AdminListService) Shares() serializer.Response
Shares 列出分享
func (*AdminListService) Tasks ¶
func (service *AdminListService) Tasks() serializer.Response
Tasks 列出常规任务
func (*AdminListService) Users ¶
func (service *AdminListService) Users() serializer.Response
Users 列出用户
type Aria2TestService ¶
type Aria2TestService struct {
Server string `json:"server"`
RPC string `json:"rpc" binding:"required"`
Secret string `json:"secret"`
Token string `json:"token"`
Type model.ModelType `json:"type"`
}
Aria2TestService aria2连接测试服务
func (*Aria2TestService) TestMaster ¶
func (service *Aria2TestService) TestMaster() serializer.Response
Test 测试aria2连接
func (*Aria2TestService) TestSlave ¶
func (service *Aria2TestService) TestSlave() serializer.Response
type BatchSettingChangeService ¶
type BatchSettingChangeService struct {
Options []SettingChangeService `json:"options"`
}
BatchSettingChangeService 设定批量更改服务
func (*BatchSettingChangeService) Change ¶
func (service *BatchSettingChangeService) Change() serializer.Response
Change 批量更改站点设定
type BatchSettingGet ¶
type BatchSettingGet struct {
Keys []string `json:"keys"`
}
BatchSettingGet 设定批量获取服务
type FileBatchService ¶
type FileBatchService struct {
ID []uint `json:"id" binding:"min=1"`
Force bool `json:"force"`
UnlinkOnly bool `json:"unlink"`
}
FileBatchService 文件批量操作服务
func (*FileBatchService) Delete ¶
func (service *FileBatchService) Delete(c *gin.Context) serializer.Response
Delete 删除文件
type FileService ¶
type FileService struct {
ID uint `uri:"id" json:"id" binding:"required"`
}
FileService 文件ID服务
func (*FileService) Get ¶
func (service *FileService) Get(c *gin.Context) serializer.Response
Get 预览文件
type GroupService ¶
type GroupService struct {
ID uint `uri:"id" json:"id" binding:"required"`
}
GroupService 用户组ID服务
func (*GroupService) Delete ¶
func (service *GroupService) Delete() serializer.Response
Delete 删除用户组
type ImportTaskService ¶
type ImportTaskService struct {
UID uint `json:"uid" binding:"required"`
PolicyID uint `json:"policy_id" binding:"required"`
Src string `json:"src" binding:"required,min=1,max=65535"`
Dst string `json:"dst" binding:"required,min=1,max=65535"`
Recursive bool `json:"recursive"`
}
ImportTaskService 导入任务
func (*ImportTaskService) Create ¶
func (service *ImportTaskService) Create(c *gin.Context, user *model.User) serializer.Response
Create 新建导入任务
type ListFolderService ¶
type ListFolderService struct {
Path string `uri:"path" binding:"required,max=65535"`
ID uint `uri:"id" binding:"required"`
Type string `uri:"type" binding:"eq=policy|eq=user"`
}
ListFolderService 列目录结构
func (*ListFolderService) List ¶
func (service *ListFolderService) List(c *gin.Context) serializer.Response
List 列出指定路径下的目录
type MailTestService ¶
type MailTestService struct {
Email string `json:"to" binding:"email"`
}
MailTestService 邮件测试服务
func (*MailTestService) Send ¶
func (service *MailTestService) Send() serializer.Response
Send 发送测试邮件
type NoParamService ¶
type NoParamService struct {
}
NoParamService 无需参数的服务
func (*NoParamService) GroupList ¶
func (service *NoParamService) GroupList() serializer.Response
GroupList 获取用户组列表
func (*NoParamService) Summary ¶
func (service *NoParamService) Summary() serializer.Response
Summary 获取站点统计概况
type NodeService ¶
type NodeService struct {
ID uint `uri:"id" json:"id" binding:"required"`
}
NodeService 节点ID服务
type PathTestService ¶
type PathTestService struct {
Path string `json:"path" binding:"required"`
}
PathTestService 本地路径测试服务
func (*PathTestService) Test ¶
func (service *PathTestService) Test() serializer.Response
Test 测试本地路径
type PolicyService ¶
type PolicyService struct {
ID uint `uri:"id" json:"id" binding:"required"`
Region string `json:"region"`
}
PolicyService 存储策略ID服务
func (*PolicyService) AddCORS ¶
func (service *PolicyService) AddCORS() serializer.Response
AddCORS 创建跨域策略
func (*PolicyService) AddSCF ¶
func (service *PolicyService) AddSCF() serializer.Response
AddSCF 创建回调云函数
func (*PolicyService) Delete ¶
func (service *PolicyService) Delete() serializer.Response
Delete 删除存储策略
func (*PolicyService) GetOAuth ¶
func (service *PolicyService) GetOAuth(c *gin.Context, policyType string) serializer.Response
GetOAuth 获取 OneDrive OAuth 地址
type SettingChangeService ¶
type SettingChangeService struct {
Key string `json:"key" binding:"required"`
Value string `json:"value"`
}
SettingChangeService 设定更改服务
type ShareBatchService ¶
type ShareBatchService struct {
}
ShareBatchService 分享批量操作服务
func (*ShareBatchService) Delete ¶
func (service *ShareBatchService) Delete(c *gin.Context) serializer.Response
Delete 删除文件
type SlavePingService ¶
type SlavePingService struct {
Callback string `json:"callback" binding:"required"`
}
SlavePingService 从机相应ping
func (*SlavePingService) Test ¶
func (service *SlavePingService) Test() serializer.Response
Test 从机响应ping
type SlaveTestService ¶
type SlaveTestService struct {
Secret string `json:"secret" binding:"required"`
Server string `json:"server" binding:"required"`
}
SlaveTestService 从机测试服务
func (*SlaveTestService) Test ¶
func (service *SlaveTestService) Test() serializer.Response
Test 测试从机通信
type TaskBatchService ¶
type TaskBatchService struct {
ID []uint `json:"id" binding:"min=1"`
}
TaskBatchService 任务批量操作服务
func (*TaskBatchService) Delete ¶
func (service *TaskBatchService) Delete(c *gin.Context) serializer.Response
Delete 删除任务
func (*TaskBatchService) DeleteGeneral ¶
func (service *TaskBatchService) DeleteGeneral(c *gin.Context) serializer.Response
DeleteGeneral 删除常规任务
type ThumbGeneratorTestService ¶
type ThumbGeneratorTestService struct {
Name string `json:"name" binding:"required"`
Executable string `json:"executable" binding:"required"`
}
ThumbGeneratorTestService 缩略图生成测试服务
func (*ThumbGeneratorTestService) Test ¶
func (s *ThumbGeneratorTestService) Test(c *gin.Context) serializer.Response
Test 通过获取生成器版本来测试
type ToggleNodeService ¶
type ToggleNodeService struct {
ID uint `uri:"id"`
Desired model.NodeStatus `uri:"desired"`
}
ToggleNodeService 开关节点服务
func (*ToggleNodeService) Toggle ¶
func (service *ToggleNodeService) Toggle() serializer.Response
Toggle 开关节点
type UserBatchService ¶
type UserBatchService struct {
ID []uint `json:"id" binding:"min=1"`
}
UserBatchService 用户批量操作服务
func (*UserBatchService) Delete ¶
func (service *UserBatchService) Delete() serializer.Response
Delete 删除用户
type UserService ¶
type UserService struct {
ID uint `uri:"id" json:"id" binding:"required"`
}
UserService 用户ID服务