dropbox

package
v3.35.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: AGPL-3.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultClientID = "76lrwrklhdn1icb"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Addition

type Addition struct {
	RefreshToken string `json:"refresh_token" required:"true"`
	driver.RootPath

	OauthTokenURL string `json:"oauth_token_url" default:"https://api.xhofe.top/alist/dropbox/token"`
	ClientID      string `json:"client_id" required:"false" help:"Keep it empty if you don't have one"`
	ClientSecret  string `json:"client_secret" required:"false" help:"Keep it empty if you don't have one"`

	AccessToken     string
	RootNamespaceId string
}

type CurrentAccountResp added in v3.31.0

type CurrentAccountResp struct {
	RootInfo struct {
		RootNamespaceId string `json:"root_namespace_id"`
		HomeNamespaceId string `json:"home_namespace_id"`
	} `json:"root_info"`
}

type Dropbox

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

func (*Dropbox) Config

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

func (*Dropbox) Copy

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

func (*Dropbox) Drop

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

func (*Dropbox) GetAddition

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

func (*Dropbox) GetRootNamespaceId added in v3.31.0

func (d *Dropbox) GetRootNamespaceId(ctx context.Context) (string, error)

func (*Dropbox) Init

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

func (*Dropbox) List

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

func (*Dropbox) MakeDir

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

func (*Dropbox) Move

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

func (*Dropbox) Put

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

func (*Dropbox) Remove

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

func (*Dropbox) Rename

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

type ErrorResp

type ErrorResp struct {
	Error struct {
		Tag string `json:".tag"`
	} `json:"error"`
	ErrorSummary string `json:"error_summary"`
}

type File

type File struct {
	Tag            string    `json:".tag"`
	Name           string    `json:"name"`
	PathLower      string    `json:"path_lower"`
	PathDisplay    string    `json:"path_display"`
	ID             string    `json:"id"`
	ClientModified time.Time `json:"client_modified"`
	ServerModified time.Time `json:"server_modified"`
	Rev            string    `json:"rev"`
	Size           int       `json:"size"`
	IsDownloadable bool      `json:"is_downloadable"`
	ContentHash    string    `json:"content_hash"`
}

type ListResp

type ListResp struct {
	Entries []File `json:"entries"`
	Cursor  string `json:"cursor"`
	HasMore bool   `json:"has_more"`
}

type RefreshTokenErrorResp

type RefreshTokenErrorResp struct {
	Error            string `json:"error"`
	ErrorDescription string `json:"error_description"`
}

type TokenResp

type TokenResp struct {
	AccessToken string `json:"access_token"`
	TokenType   string `json:"token_type"`
	ExpiresIn   int    `json:"expires_in"`
}

type UploadAppendArgs

type UploadAppendArgs struct {
	Close  bool         `json:"close"`
	Cursor UploadCursor `json:"cursor"`
}

type UploadCursor

type UploadCursor struct {
	Offset    int64  `json:"offset"`
	SessionID string `json:"session_id"`
}

type UploadFinishArgs

type UploadFinishArgs struct {
	Commit struct {
		Autorename     bool   `json:"autorename"`
		Mode           string `json:"mode"`
		Mute           bool   `json:"mute"`
		Path           string `json:"path"`
		StrictConflict bool   `json:"strict_conflict"`
	} `json:"commit"`
	Cursor UploadCursor `json:"cursor"`
}

Jump to

Keyboard shortcuts

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