Documentation
¶
Index ¶
- type Addition
- type Degoo
- func (d *Degoo) Config() driver.Config
- func (d *Degoo) Copy(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)
- func (d *Degoo) Drop(ctx context.Context) error
- func (d *Degoo) GetAddition() driver.Additional
- 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 (d *Degoo) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (d *Degoo) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error
- func (d *Degoo) Move(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)
- func (d *Degoo) Put(ctx context.Context, dstDir model.Obj, file model.FileStreamer, ...) error
- func (d *Degoo) Remove(ctx context.Context, obj model.Obj) error
- func (d *Degoo) Rename(ctx context.Context, srcObj model.Obj, newName string) error
- func (d *Degoo) SetUploadFile3(ctx context.Context, file model.FileStreamer, parentID string, checksum string) (*DegooSetUploadFile3Data, error)
- type DegooAccessTokenRequest
- type DegooAccessTokenResponse
- type DegooErrors
- type DegooFileIDs
- type DegooFileItem
- type DegooFileRenameInfo
- type DegooGetBucketWriteAuth4Data
- type DegooGetChildren5Data
- type DegooGetOverlay4Data
- type DegooGraphqlResponse
- type DegooLoginRequest
- type DegooLoginResponse
- type DegooSetUploadFile3Data
- type JWTPayload
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 ¶
func (*Degoo) GetAddition ¶
func (d *Degoo) GetAddition() driver.Additional
func (*Degoo) Put ¶
func (d *Degoo) Put(ctx context.Context, dstDir model.Obj, file model.FileStreamer, up driver.UpdateProgress) 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 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 ¶
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