openlist

package
v4.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: AGPL-3.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addition

type Addition struct {
	driver.RootPath
	Address           string `json:"url" required:"true"`
	MetaPassword      string `json:"meta_password"`
	Username          string `json:"username"`
	Password          string `json:"password"`
	Token             string `json:"token"`
	PassUAToUpsteam   bool   `json:"pass_ua_to_upsteam" default:"true"`
	ForwardArchiveReq bool   `json:"forward_archive_requests" default:"true"`
}

type ArchiveListReq

type ArchiveListReq struct {
	model.PageReq
	ArchiveMetaReq
	InnerPath string `json:"inner_path"`
}

type ArchiveListResp

type ArchiveListResp struct {
	Content []ObjResp `json:"content"`
	Total   int64     `json:"total"`
}

type ArchiveMetaReq

type ArchiveMetaReq struct {
	ArchivePass string `json:"archive_pass"`
	Password    string `json:"password"`
	Path        string `json:"path"`
	Refresh     bool   `json:"refresh"`
}

type ArchiveMetaResp

type ArchiveMetaResp struct {
	Comment   string     `json:"comment"`
	Encrypted bool       `json:"encrypted"`
	Content   []TreeResp `json:"content"`
	RawURL    string     `json:"raw_url"`
	Sign      string     `json:"sign"`
}

type DecompressReq

type DecompressReq struct {
	ArchivePass   string   `json:"archive_pass"`
	CacheFull     bool     `json:"cache_full"`
	DstDir        string   `json:"dst_dir"`
	InnerPath     string   `json:"inner_path"`
	Name          []string `json:"name"`
	PutIntoNewDir bool     `json:"put_into_new_dir"`
	SrcDir        string   `json:"src_dir"`
}

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 ListReq

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

type LoginResp

type LoginResp struct {
	Token string `json:"token"`
}

type MeResp

type MeResp struct {
	Id         int    `json:"id"`
	Username   string `json:"username"`
	Password   string `json:"password"`
	BasePath   string `json:"base_path"`
	Role       int    `json:"role"`
	Disabled   bool   `json:"disabled"`
	Permission int    `json:"permission"`
	SsoId      string `json:"sso_id"`
	Otp        bool   `json:"otp"`
}

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"`
	Created  time.Time `json:"created"`
	Sign     string    `json:"sign"`
	Thumb    string    `json:"thumb"`
	Type     int       `json:"type"`
	HashInfo string    `json:"hashinfo"`
}

type OpenList

type OpenList struct {
	model.Storage
	Addition
}

func (*OpenList) ArchiveDecompress

func (d *OpenList) ArchiveDecompress(ctx context.Context, srcObj, dstDir model.Obj, args model.ArchiveDecompressArgs) error

func (*OpenList) Config

func (d *OpenList) Config() driver.Config

func (*OpenList) Copy

func (d *OpenList) Copy(ctx context.Context, srcObj, dstDir model.Obj) error

func (*OpenList) Drop

func (d *OpenList) Drop(ctx context.Context) error

func (*OpenList) Extract

func (d *OpenList) Extract(ctx context.Context, obj model.Obj, args model.ArchiveInnerArgs) (*model.Link, error)

func (*OpenList) GetAddition

func (d *OpenList) GetAddition() driver.Additional

func (*OpenList) GetArchiveMeta

func (d *OpenList) GetArchiveMeta(ctx context.Context, obj model.Obj, args model.ArchiveArgs) (model.ArchiveMeta, error)

func (*OpenList) Init

func (d *OpenList) Init(ctx context.Context) error
func (d *OpenList) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)

func (*OpenList) List

func (d *OpenList) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)

func (*OpenList) ListArchive

func (d *OpenList) ListArchive(ctx context.Context, obj model.Obj, args model.ArchiveInnerArgs) ([]model.Obj, error)

func (*OpenList) MakeDir

func (d *OpenList) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error

func (*OpenList) Move

func (d *OpenList) Move(ctx context.Context, srcObj, dstDir model.Obj) error

func (*OpenList) Put

func (*OpenList) Remove

func (d *OpenList) Remove(ctx context.Context, obj model.Obj) error

func (*OpenList) Rename

func (d *OpenList) Rename(ctx context.Context, srcObj model.Obj, newName string) error

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 TreeResp

type TreeResp struct {
	ObjResp
	Children []TreeResp `json:"children"`
	// contains filtered or unexported fields
}

func (*TreeResp) CreateTime

func (t *TreeResp) CreateTime() time.Time

func (*TreeResp) GetChildren

func (t *TreeResp) GetChildren() []model.ObjTree

func (*TreeResp) GetHash

func (t *TreeResp) GetHash() utils.HashInfo

func (*TreeResp) GetID

func (t *TreeResp) GetID() string

func (*TreeResp) GetName

func (t *TreeResp) GetName() string

func (*TreeResp) GetPath

func (t *TreeResp) GetPath() string

func (*TreeResp) GetSize

func (t *TreeResp) GetSize() int64

func (*TreeResp) IsDir

func (t *TreeResp) IsDir() bool

func (*TreeResp) ModTime

func (t *TreeResp) ModTime() time.Time

func (*TreeResp) Thumb

func (t *TreeResp) Thumb() string

Jump to

Keyboard shortcuts

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