febbox

package
v3.42.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: AGPL-3.0 Imports: 19 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.RootID
	ClientID     string `json:"client_id" required:"true" default:""`
	ClientSecret string `json:"client_secret" required:"true" default:""`
	RefreshToken string
	SortRule     string `` /* 153-byte string literal not displayed */
	PageSize     int64  `json:"page_size" required:"true" type:"number" default:"100" help:"list api per page size of FebBox driver"`
	UserIP       string `json:"user_ip" default:"" help:"user ip address for download link which can speed up the download"`
}

type ErrResp

type ErrResp struct {
	ErrorCode     int64   `json:"code"`
	ErrorMsg      string  `json:"msg"`
	ServerRunTime float64 `json:"server_runtime"`
	ServerName    string  `json:"server_name"`
}

func (*ErrResp) Error

func (e *ErrResp) Error() string

func (*ErrResp) IsError

func (e *ErrResp) IsError() bool

type FebBox

type FebBox struct {
	model.Storage
	Addition
	// contains filtered or unexported fields
}

func (*FebBox) Config

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

func (*FebBox) Copy

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

func (*FebBox) Drop

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

func (*FebBox) GetAddition

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

func (*FebBox) Init

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

func (*FebBox) List

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

func (*FebBox) MakeDir

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

func (*FebBox) Move

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

func (*FebBox) Put

func (d *FebBox) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) (model.Obj, error)

func (*FebBox) Remove

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

func (*FebBox) Rename

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

type File

type File struct {
	Fid              int64  `json:"fid"`
	UID              int64  `json:"uid"`
	FileSize         int64  `json:"file_size"`
	Path             string `json:"path"`
	FileName         string `json:"file_name"`
	Ext              string `json:"ext"`
	AddTime          int64  `json:"add_time"`
	FileCreateTime   int64  `json:"file_create_time"`
	FileUpdateTime   int64  `json:"file_update_time"`
	ParentID         int64  `json:"parent_id"`
	UpdateTime       int64  `json:"update_time"`
	LastOpenTime     int64  `json:"last_open_time"`
	IsDir            int64  `json:"is_dir"`
	Epub             int64  `json:"epub"`
	IsMusicList      int64  `json:"is_music_list"`
	OssFid           int64  `json:"oss_fid"`
	Faststart        int64  `json:"faststart"`
	HasVideoQuality  int64  `json:"has_video_quality"`
	TotalDownload    int64  `json:"total_download"`
	Status           int64  `json:"status"`
	Remark           string `json:"remark"`
	OldHash          string `json:"old_hash"`
	Hash             string `json:"hash"`
	HashType         string `json:"hash_type"`
	FromUID          int64  `json:"from_uid"`
	FidOrg           int64  `json:"fid_org"`
	ShareID          int64  `json:"share_id"`
	InvitePermission int64  `json:"invite_permission"`
	ThumbSmall       string `json:"thumb_small"`
	ThumbSmallWidth  int64  `json:"thumb_small_width"`
	ThumbSmallHeight int64  `json:"thumb_small_height"`
	Thumb            string `json:"thumb"`
	ThumbWidth       int64  `json:"thumb_width"`
	ThumbHeight      int64  `json:"thumb_height"`
	ThumbBig         string `json:"thumb_big"`
	ThumbBigWidth    int64  `json:"thumb_big_width"`
	ThumbBigHeight   int64  `json:"thumb_big_height"`
	IsCustomThumb    int64  `json:"is_custom_thumb"`
	Photos           int64  `json:"photos"`
	IsAlbum          int64  `json:"is_album"`
	ReadOnly         int64  `json:"read_only"`
	Rules            Rules  `json:"rules"`
	IsShared         int64  `json:"is_shared"`
}

type FileDownloadResp

type FileDownloadResp struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data []struct {
		Error       int    `json:"error"`
		DownloadURL string `json:"download_url"`
		Hash        string `json:"hash"`
		HashType    string `json:"hash_type"`
		Fid         int    `json:"fid"`
		FileName    string `json:"file_name"`
		ParentID    int    `json:"parent_id"`
		FileSize    int    `json:"file_size"`
		Ext         string `json:"ext"`
		Thumb       string `json:"thumb"`
		VipLink     int    `json:"vip_link"`
	} `json:"data"`
}

type FileListResp

type FileListResp struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data struct {
		FileList []File `json:"file_list"`
		ShowType string `json:"show_type"`
	} `json:"data"`
}

type Rules

type Rules struct {
	AllowCopy     int64 `json:"allow_copy"`
	AllowDelete   int64 `json:"allow_delete"`
	AllowDownload int64 `json:"allow_download"`
	AllowComment  int64 `json:"allow_comment"`
	HideLocation  int64 `json:"hide_location"`
}

Jump to

Keyboard shortcuts

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