degoo

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: 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
	Username     string `json:"username" help:"Your Degoo account email"`
	Password     string `json:"password" help:"Your Degoo account password"`
	RefreshToken string `json:"refresh_token" help:"Refresh token for automatic token renewal, obtained automatically"`
	AccessToken  string `json:"access_token" help:"Access token for Degoo API, obtained automatically"`
}

type Degoo

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

func (*Degoo) Config

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

func (*Degoo) Copy

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

func (*Degoo) Drop

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

func (*Degoo) GetAddition

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

func (*Degoo) Init

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

func (*Degoo) List

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

func (*Degoo) MakeDir

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

func (*Degoo) Move

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

func (*Degoo) Put

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

func (*Degoo) Remove

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

func (*Degoo) Rename

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

func (*Degoo) SetUploadFile3

func (d *Degoo) SetUploadFile3(ctx context.Context, file model.FileStreamer, parentID string, checksum string) (*DegooSetUploadFile3Data, error)

type DegooAccessTokenRequest

type DegooAccessTokenRequest struct {
	RefreshToken string `json:"RefreshToken"`
}

DegooAccessTokenRequest represents the token refresh request body.

type DegooAccessTokenResponse

type DegooAccessTokenResponse struct {
	AccessToken string `json:"AccessToken"`
}

DegooAccessTokenResponse represents the token refresh response.

type DegooErrors

type DegooErrors struct {
	Path      []string    `json:"path"`
	Data      interface{} `json:"data"`
	ErrorType string      `json:"errorType"`
	ErrorInfo interface{} `json:"errorInfo"`
	Message   string      `json:"message"`
}

type DegooFileIDs

type DegooFileIDs struct {
	FileIDs []string `json:"FileIDs"`
}

DegooFileIDs represents a list of file IDs for move operations.

type DegooFileItem

type DegooFileItem struct {
	ID                   string `json:"ID"`
	ParentID             string `json:"ParentID"`
	Name                 string `json:"Name"`
	Category             int    `json:"Category"`
	Size                 string `json:"Size"`
	URL                  string `json:"URL"`
	CreationTime         string `json:"CreationTime"`
	LastModificationTime string `json:"LastModificationTime"`
	LastUploadTime       string `json:"LastUploadTime"`
	MetadataID           string `json:"MetadataID"`
	DeviceID             int64  `json:"DeviceID"`
	FilePath             string `json:"FilePath"`
	IsInRecycleBin       bool   `json:"IsInRecycleBin"`
}

DegooFileItem represents a Degoo file or folder.

type DegooFileRenameInfo

type DegooFileRenameInfo struct {
	ID      string `json:"ID"`
	NewName string `json:"NewName"`
}

DegooFileRenameInfo represents a file rename operation.

type DegooGetBucketWriteAuth4Data

type DegooGetBucketWriteAuth4Data struct {
	GetBucketWriteAuth4 []struct {
		AuthData struct {
			PolicyBase64 string `json:"PolicyBase64"`
			Signature    string `json:"Signature"`
			BaseURL      string `json:"BaseURL"`
			KeyPrefix    string `json:"KeyPrefix"`
			AccessKey    struct {
				Key   string `json:"Key"`
				Value string `json:"Value"`
			} `json:"AccessKey"`
			ACL            string `json:"ACL"`
			AdditionalBody []struct {
				Key   string `json:"Key"`
				Value string `json:"Value"`
			} `json:"AdditionalBody"`
		} `json:"AuthData"`
		Error interface{} `json:"Error"`
	} `json:"getBucketWriteAuth4"`
}

DegooGetBucketWriteAuth4Data is the data field for GetBucketWriteAuth4.

type DegooGetChildren5Data

type DegooGetChildren5Data struct {
	GetFileChildren5 struct {
		Items     []DegooFileItem `json:"Items"`
		NextToken string          `json:"NextToken"`
	} `json:"getFileChildren5"`
}

DegooGetChildren5Data is the data field for getFileChildren5.

type DegooGetOverlay4Data

type DegooGetOverlay4Data struct {
	GetOverlay4 DegooFileItem `json:"getOverlay4"`
}

DegooGetOverlay4Data is the data field for getOverlay4.

type DegooGraphqlResponse

type DegooGraphqlResponse struct {
	Data   json.RawMessage `json:"data"`
	Errors []DegooErrors   `json:"errors,omitempty"`
}

DegooGraphqlResponse is the common structure for GraphQL API responses.

type DegooLoginRequest

type DegooLoginRequest struct {
	GenerateToken bool   `json:"GenerateToken"`
	Username      string `json:"Username"`
	Password      string `json:"Password"`
}

DegooLoginRequest represents the login request body.

type DegooLoginResponse

type DegooLoginResponse struct {
	Token        string `json:"Token"`
	RefreshToken string `json:"RefreshToken"`
}

DegooLoginResponse represents a successful login response.

type DegooSetUploadFile3Data

type DegooSetUploadFile3Data struct {
	SetUploadFile3 bool `json:"setUploadFile3"`
}

DegooSetUploadFile3Data is the data field for SetUploadFile3.

type JWTPayload

type JWTPayload struct {
	UserID string `json:"userID"`
	Exp    int64  `json:"exp"`
	Iat    int64  `json:"iat"`
}

JWT payload structure for token expiration checking

Jump to

Keyboard shortcuts

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