protondrive

package
v4.1.10 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

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

	MainShare *proton.Share

	DefaultAddrKR *crypto.KeyRing
	MainShareKR   *crypto.KeyRing
	// contains filtered or unexported fields
}

func (*ProtonDrive) Config

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

func (*ProtonDrive) Copy

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

func (*ProtonDrive) DirectMove

func (d *ProtonDrive) DirectMove(ctx context.Context, srcObj model.Obj, dstDir model.Obj) (model.Obj, error)

func (*ProtonDrive) DirectRename

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

func (*ProtonDrive) Drop

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

func (*ProtonDrive) GetAddition

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

func (*ProtonDrive) GetDetails

func (d *ProtonDrive) GetDetails(ctx context.Context) (*model.StorageDetails, error)

func (*ProtonDrive) Init

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 (*ProtonDrive) List

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

func (*ProtonDrive) MakeDir

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

func (*ProtonDrive) Move

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

func (*ProtonDrive) Put

func (*ProtonDrive) Remove

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

func (*ProtonDrive) Rename

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

type RenameRequest

type RenameRequest struct {
	Name               string `json:"Name"`               // PGP encrypted name
	NameSignatureEmail string `json:"NameSignatureEmail"` // User's signature email
	Hash               string `json:"Hash"`               // New name hash
	OriginalHash       string `json:"OriginalHash"`       // Current name hash
}

type RenameResponse

type RenameResponse struct {
	Code int `json:"Code"`
}

Jump to

Keyboard shortcuts

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