Documentation
¶
Index ¶
- Variables
- type Addition
- type Config
- type MoveRequest
- type ProtonDrive
- func (d *ProtonDrive) ArchiveDecompress(ctx context.Context, srcObj, dstDir model.Obj, ...) ([]model.Obj, error)
- 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) Extract(ctx context.Context, obj model.Obj, args model.ArchiveInnerArgs) (*model.Link, error)
- func (d *ProtonDrive) GetAddition() driver.Additional
- func (d *ProtonDrive) GetArchiveMeta(ctx context.Context, obj model.Obj, args model.ArchiveArgs) (model.ArchiveMeta, error)
- func (d *ProtonDrive) Init(ctx context.Context) 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) ListArchive(ctx context.Context, obj model.Obj, args model.ArchiveInnerArgs) ([]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 ProtonFile
- 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 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
RootLink *proton.Link
DefaultAddrKR *crypto.KeyRing
// contains filtered or unexported fields
}
func (*ProtonDrive) ArchiveDecompress ¶
func (d *ProtonDrive) ArchiveDecompress(ctx context.Context, srcObj, dstDir model.Obj, args model.ArchiveDecompressArgs) ([]model.Obj, error)
func (*ProtonDrive) Config ¶
func (d *ProtonDrive) Config() driver.Config
func (*ProtonDrive) DirectMove ¶
func (*ProtonDrive) DirectRename ¶
func (*ProtonDrive) Extract ¶
func (d *ProtonDrive) Extract(ctx context.Context, obj model.Obj, args model.ArchiveInnerArgs) (*model.Link, error)
func (*ProtonDrive) GetAddition ¶
func (d *ProtonDrive) GetAddition() driver.Additional
func (*ProtonDrive) GetArchiveMeta ¶
func (d *ProtonDrive) GetArchiveMeta(ctx context.Context, obj model.Obj, args model.ArchiveArgs) (model.ArchiveMeta, error)
func (*ProtonDrive) ListArchive ¶
func (d *ProtonDrive) ListArchive(ctx context.Context, obj model.Obj, args model.ArchiveInnerArgs) ([]model.Obj, error)
func (*ProtonDrive) Put ¶
func (d *ProtonDrive) Put(ctx context.Context, dstDir model.Obj, file model.FileStreamer, up driver.UpdateProgress) (model.Obj, error)
type ProtonFile ¶
func (*ProtonFile) CreateTime ¶
func (p *ProtonFile) CreateTime() time.Time
func (*ProtonFile) GetName ¶
func (p *ProtonFile) GetName() string
func (*ProtonFile) GetPath ¶
func (p *ProtonFile) GetPath() string
func (*ProtonFile) GetSize ¶
func (p *ProtonFile) GetSize() int64
func (*ProtonFile) IsDir ¶
func (p *ProtonFile) IsDir() bool
func (*ProtonFile) ModTime ¶
func (p *ProtonFile) ModTime() time.Time
type RenameRequest ¶
type RenameResponse ¶
type RenameResponse struct {
Code int `json:"Code"`
}
Click to show internal directories.
Click to hide internal directories.