Documentation
¶
Index ¶
- Variables
- type Addition
- type MoveRequest
- type ProtonDrive
- func (d *ProtonDrive) Config() driver.Config
- func (d *ProtonDrive) Copy(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)
- func (d *ProtonDrive) DirectMove(ctx context.Context, srcObj model.Obj, dstDir model.Obj) (model.Obj, error)
- func (d *ProtonDrive) DirectRename(ctx context.Context, srcObj model.Obj, newName string) (model.Obj, error)
- func (d *ProtonDrive) Drop(ctx context.Context) error
- func (d *ProtonDrive) GetAddition() driver.Additional
- func (d *ProtonDrive) GetDetails(ctx context.Context) (*model.StorageDetails, error)
- func (d *ProtonDrive) Init(ctx context.Context) (err error)
- func (d *ProtonDrive) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
- func (d *ProtonDrive) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (d *ProtonDrive) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) (model.Obj, error)
- func (d *ProtonDrive) Move(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)
- func (d *ProtonDrive) Put(ctx context.Context, dstDir model.Obj, file model.FileStreamer, ...) (model.Obj, error)
- func (d *ProtonDrive) Remove(ctx context.Context, obj model.Obj) error
- func (d *ProtonDrive) Rename(ctx context.Context, srcObj model.Obj, newName string) (model.Obj, error)
- type RenameRequest
- type RenameResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrKeyPassOrSaltedKeyPassMustBeNotNil = errors.New("either keyPass or saltedKeyPass must be not nil") ErrFailedToUnlockUserKeys = errors.New("failed to unlock user keys") )
Functions ¶
This section is empty.
Types ¶
type Addition ¶
type Addition struct {
driver.RootID
Email string `json:"email" required:"true" type:"string"`
Password string `json:"password" required:"true" type:"string"`
TwoFACode string `json:"two_fa_code" type:"string"`
ChunkSize int64 `json:"chunk_size" type:"number" default:"100"`
UseReusableLogin bool `json:"use_reusable_login" type:"bool" default:"true" help:"Use reusable login credentials instead of username/password"`
ReusableCredential common.ReusableCredentialData
}
type MoveRequest ¶
type MoveRequest struct {
ParentLinkID string `json:"ParentLinkID"`
NodePassphrase string `json:"NodePassphrase"`
NodePassphraseSignature *string `json:"NodePassphraseSignature"`
Name string `json:"Name"`
NameSignatureEmail string `json:"NameSignatureEmail"`
Hash string `json:"Hash"`
OriginalHash string `json:"OriginalHash"`
ContentHash *string `json:"ContentHash"` // Maybe null
}
type ProtonDrive ¶
type ProtonDrive struct {
model.Storage
Addition
DefaultAddrKR *crypto.KeyRing
// contains filtered or unexported fields
}
func (*ProtonDrive) Config ¶
func (d *ProtonDrive) Config() driver.Config
func (*ProtonDrive) DirectMove ¶
func (*ProtonDrive) DirectRename ¶
func (*ProtonDrive) GetAddition ¶
func (d *ProtonDrive) GetAddition() driver.Additional
func (*ProtonDrive) GetDetails ¶
func (d *ProtonDrive) GetDetails(ctx context.Context) (*model.StorageDetails, error)
func (*ProtonDrive) Put ¶
func (d *ProtonDrive) Put(ctx context.Context, dstDir model.Obj, file model.FileStreamer, up driver.UpdateProgress) (model.Obj, error)
type RenameRequest ¶
type RenameResponse ¶
type RenameResponse struct {
Code int `json:"Code"`
}
Click to show internal directories.
Click to hide internal directories.