upload

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: AGPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUploadCommand

func NewUploadCommand(ctx context.Context, app *app.Application) *cobra.Command

NewUploadCommand creates the root "upload" command and adds subcommands for each supported source. It registers flags and initializes the UpCmd struct, which holds the state for uploads.

Types

type Advice

type Advice struct {
	Advice      AdviceCode
	Message     string
	ServerAsset *assets.Asset
	LocalAsset  *assets.Asset
}

type AdviceCode

type AdviceCode int

- - go:generate stringer -type=AdviceCode

const (
	IDontKnow AdviceCode = iota
	SmallerOnServer
	BetterOnServer
	SameOnServer
	NotOnServer
	AlreadyProcessed
	ForceUpload
)

func (AdviceCode) String

func (a AdviceCode) String() string

type UpCmd

type UpCmd struct {
	shared.StackOptions

	NoUI       bool // Disable UI
	Overwrite  bool // Always overwrite files on the server with local versions
	Tags       []string
	SessionTag bool

	Mode UpLoadMode

	DebugCounters bool // Enable CSV action counters per file
	// contains filtered or unexported fields
}

func (*UpCmd) DeleteServerAssets

func (uc *UpCmd) DeleteServerAssets(ctx context.Context, ids []string) error

func (*UpCmd) RegisterFlags

func (uc *UpCmd) RegisterFlags(flags *pflag.FlagSet)

func (*UpCmd) Run

func (uc *UpCmd) Run(cmd *cobra.Command, adapter adapters.Reader) error

Run is called back by the actual asset reader

type UpLoadMode

type UpLoadMode int
const (
	UpModeGoogleTakeout UpLoadMode = iota
	UpModeFolder
	UpModeICloud
	UpModePicasa
)

func (UpLoadMode) String

func (m UpLoadMode) String() string

Jump to

Keyboard shortcuts

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