handles

package
v3.20.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: AGPL-3.0 Imports: 42 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAria2

func AddAria2(c *gin.Context)

func AddQbittorrent added in v3.11.0

func AddQbittorrent(c *gin.Context)

func BuildIndex added in v3.6.0

func BuildIndex(c *gin.Context)

func Cancel2FAById

func Cancel2FAById(c *gin.Context)

func ClearIndex added in v3.7.1

func ClearIndex(c *gin.Context)

func CreateMeta

func CreateMeta(c *gin.Context)

func CreateStorage

func CreateStorage(c *gin.Context)

func CreateUser

func CreateUser(c *gin.Context)

func CurrentUser

func CurrentUser(c *gin.Context)

CurrentUser get current user by token if token is empty, return guest user

func DeleteMeta

func DeleteMeta(c *gin.Context)

func DeleteSetting

func DeleteSetting(c *gin.Context)

func DeleteStorage

func DeleteStorage(c *gin.Context)

func DeleteUser

func DeleteUser(c *gin.Context)

func DisableStorage

func DisableStorage(c *gin.Context)

func Down

func Down(c *gin.Context)

func EnableStorage

func EnableStorage(c *gin.Context)

func Favicon

func Favicon(c *gin.Context)

func FsBatchRename added in v3.20.0

func FsBatchRename(c *gin.Context)

func FsCopy

func FsCopy(c *gin.Context)

func FsDirs

func FsDirs(c *gin.Context)

func FsForm

func FsForm(c *gin.Context)

func FsGet

func FsGet(c *gin.Context)

func FsList

func FsList(c *gin.Context)

func FsMkdir

func FsMkdir(c *gin.Context)

func FsMove

func FsMove(c *gin.Context)

func FsOther

func FsOther(c *gin.Context)

func FsRecursiveMove added in v3.14.0

func FsRecursiveMove(c *gin.Context)

func FsRegexRename added in v3.14.0

func FsRegexRename(c *gin.Context)

func FsRemove

func FsRemove(c *gin.Context)

func FsRemoveEmptyDirectory added in v3.16.0

func FsRemoveEmptyDirectory(c *gin.Context)

func FsRename

func FsRename(c *gin.Context)

func FsStream

func FsStream(c *gin.Context)

func Generate2FA

func Generate2FA(c *gin.Context)

func GetDriverInfo

func GetDriverInfo(c *gin.Context)

func GetMeta

func GetMeta(c *gin.Context)

func GetOIDCClient added in v3.19.0

func GetOIDCClient(c *gin.Context) (*oauth2.Config, error)

func GetProgress added in v3.6.0

func GetProgress(c *gin.Context)

func GetSetting

func GetSetting(c *gin.Context)

func GetStorage

func GetStorage(c *gin.Context)

func GetUser

func GetUser(c *gin.Context)
func Link(c *gin.Context)

Link return real link, just for proxy program, it may contain cookie, so just allowed for admin

func ListDriverInfo

func ListDriverInfo(c *gin.Context)

func ListDriverNames

func ListDriverNames(c *gin.Context)

func ListMetas

func ListMetas(c *gin.Context)

func ListSettings

func ListSettings(c *gin.Context)

func ListStorages

func ListStorages(c *gin.Context)

func ListUsers

func ListUsers(c *gin.Context)

func LoadAllStorages added in v3.7.1

func LoadAllStorages(c *gin.Context)

func Login

func Login(c *gin.Context)

func OIDCLoginCallback added in v3.19.0

func OIDCLoginCallback(c *gin.Context)

func Plist

func Plist(c *gin.Context)

func Proxy

func Proxy(c *gin.Context)

func PublicSettings

func PublicSettings(c *gin.Context)

func ResetToken

func ResetToken(c *gin.Context)

func Robots added in v3.17.0

func Robots(c *gin.Context)

func SSOLoginCallback added in v3.13.0

func SSOLoginCallback(c *gin.Context)

func SSOLoginRedirect added in v3.13.0

func SSOLoginRedirect(c *gin.Context)

func SaveSettings

func SaveSettings(c *gin.Context)
func Search(c *gin.Context)

func SetAria2

func SetAria2(c *gin.Context)

func SetQbittorrent added in v3.11.0

func SetQbittorrent(c *gin.Context)

func SetupTaskRoute added in v3.11.0

func SetupTaskRoute(g *gin.RouterGroup)

func StopIndex added in v3.6.0

func StopIndex(c *gin.Context)

func UpdateCurrent

func UpdateCurrent(c *gin.Context)

func UpdateIndex added in v3.7.1

func UpdateIndex(c *gin.Context)

func UpdateMeta

func UpdateMeta(c *gin.Context)

func UpdateStorage

func UpdateStorage(c *gin.Context)

func UpdateUser

func UpdateUser(c *gin.Context)

func Verify2FA

func Verify2FA(c *gin.Context)

Types

type AddAria2Req

type AddAria2Req struct {
	Urls []string `json:"urls"`
	Path string   `json:"path"`
}

type AddQbittorrentReq added in v3.11.0

type AddQbittorrentReq struct {
	Urls []string `json:"urls"`
	Path string   `json:"path"`
}

type BatchRenameReq added in v3.20.0

type BatchRenameReq struct {
	SrcDir        string `json:"src_dir"`
	RenameObjects []struct {
		SrcName string `json:"src_name"`
		NewName string `json:"new_name"`
	} `json:"rename_objects"`
}

type DirReq

type DirReq struct {
	Path      string `json:"path" form:"path"`
	Password  string `json:"password" form:"password"`
	ForceRoot bool   `json:"force_root" form:"force_root"`
}

type DirResp

type DirResp struct {
	Name     string    `json:"name"`
	Modified time.Time `json:"modified"`
}

type FsGetReq

type FsGetReq struct {
	Path     string `json:"path" form:"path"`
	Password string `json:"password" form:"password"`
}

type FsGetResp

type FsGetResp struct {
	ObjResp
	RawURL   string    `json:"raw_url"`
	Readme   string    `json:"readme"`
	Provider string    `json:"provider"`
	Related  []ObjResp `json:"related"`
}

type FsListResp

type FsListResp struct {
	Content  []ObjResp `json:"content"`
	Total    int64     `json:"total"`
	Readme   string    `json:"readme"`
	Write    bool      `json:"write"`
	Provider string    `json:"provider"`
}

type FsOtherReq

type FsOtherReq struct {
	model.FsOtherArgs
	Password string `json:"password" form:"password"`
}

type K2Str added in v3.11.0

type K2Str[K comparable] func(k K) string

type ListReq

type ListReq struct {
	model.PageReq
	Path     string `json:"path" form:"path"`
	Password string `json:"password" form:"password"`
	Refresh  bool   `json:"refresh"`
}

type LoginReq

type LoginReq struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password"`
	OtpCode  string `json:"otp_code"`
}

type MkdirOrLinkReq

type MkdirOrLinkReq struct {
	Path string `json:"path" form:"path"`
}

type MoveCopyReq

type MoveCopyReq struct {
	SrcDir string   `json:"src_dir"`
	DstDir string   `json:"dst_dir"`
	Names  []string `json:"names"`
}

type ObjResp

type ObjResp struct {
	Name     string    `json:"name"`
	Size     int64     `json:"size"`
	IsDir    bool      `json:"is_dir"`
	Modified time.Time `json:"modified"`
	Sign     string    `json:"sign"`
	Thumb    string    `json:"thumb"`
	Type     int       `json:"type"`
}

type RecursiveMoveReq added in v3.14.0

type RecursiveMoveReq struct {
	SrcDir string `json:"src_dir"`
	DstDir string `json:"dst_dir"`
}

type RegexRenameReq added in v3.14.0

type RegexRenameReq struct {
	SrcDir       string `json:"src_dir"`
	SrcNameRegex string `json:"src_name_regex"`
	NewNameRegex string `json:"new_name_regex"`
}

type RemoveEmptyDirectoryReq added in v3.16.0

type RemoveEmptyDirectoryReq struct {
	SrcDir string `json:"src_dir"`
}

type RemoveReq

type RemoveReq struct {
	Dir   string   `json:"dir"`
	Names []string `json:"names"`
}

type RenameReq

type RenameReq struct {
	Path string `json:"path"`
	Name string `json:"name"`
}

type SearchReq added in v3.7.1

type SearchReq struct {
	model.SearchReq
	Password string `json:"password"`
}

type SearchResp added in v3.6.0

type SearchResp struct {
	model.SearchNode
	Type int `json:"type"`
}

type SetAria2Req

type SetAria2Req struct {
	Uri    string `json:"uri" form:"uri"`
	Secret string `json:"secret" form:"secret"`
}

type SetQbittorrentReq added in v3.11.0

type SetQbittorrentReq struct {
	Url      string `json:"url" form:"url"`
	Seedtime string `json:"seedtime" form:"seedtime"`
}

type Str2K added in v3.11.0

type Str2K[K comparable] func(str string) (K, error)

type TaskInfo

type TaskInfo struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	State    string `json:"state"`
	Status   string `json:"status"`
	Progress int    `json:"progress"`
	Error    string `json:"error"`
}

type UpdateIndexReq added in v3.9.0

type UpdateIndexReq struct {
	Paths    []string `json:"paths"`
	MaxDepth int      `json:"max_depth"`
}

type UserResp

type UserResp struct {
	model.User
	Otp bool `json:"otp"`
}

type Verify2FAReq

type Verify2FAReq struct {
	Code   string `json:"code" binding:"required"`
	Secret string `json:"secret" binding:"required"`
}

Jump to

Keyboard shortcuts

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