upload

package
v0.24.5 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2025 License: AGPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFromFolderCommand

func NewFromFolderCommand(ctx context.Context, parent *cobra.Command, app *app.Application, upOptions *UploadOptions) *cobra.Command

func NewFromGooglePhotosCommand

func NewFromGooglePhotosCommand(ctx context.Context, parent *cobra.Command, app *app.Application, upOptions *UploadOptions) *cobra.Command

func NewFromImmichCommand

func NewFromImmichCommand(ctx context.Context, parent *cobra.Command, app *app.Application, upOptions *UploadOptions) *cobra.Command

func NewUploadCommand

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

NewUploadCommand adds the Upload command

Types

type Advice

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

type AdviceCode

type AdviceCode int

- - go:generate stringer -type=AdviceCode

const (
	IDontKnow AdviceCode = iota
	SmallerOnServer
	BetterOnServer
	SameOnServer
	NotOnServer
)

func (AdviceCode) String

func (a AdviceCode) String() string

type AssetIndex

type AssetIndex struct {
	// contains filtered or unexported fields
}

func (*AssetIndex) AddLocalAsset

func (ai *AssetIndex) AddLocalAsset(la *assets.Asset, immichID string)

func (*AssetIndex) Len

func (ai *AssetIndex) Len() int

func (*AssetIndex) ReIndex

func (ai *AssetIndex) ReIndex()

func (*AssetIndex) ShouldUpload

func (ai *AssetIndex) ShouldUpload(la *assets.Asset) (*Advice, error)

type UpCmd

type UpCmd struct {
	Mode UpLoadMode
	*UploadOptions

	AssetIndex *AssetIndex // List of assets present on the server

	DebugCounters bool // Enable CSV action counters per file

	Paths []string // Path to explore
	// contains filtered or unexported fields
}

func (*UpCmd) DeleteServerAssets

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

type UpLoadMode

type UpLoadMode int
const (
	UpModeGoogleTakeout UpLoadMode = iota
	UpModeFolder
)

func (UpLoadMode) String

func (m UpLoadMode) String() string

type UploadOptions

type UploadOptions struct {
	// TODO place this option at the top
	NoUI bool // Disable UI

	Filters []filters.Filter
}

UploadOptions represents a set of common flags used for filtering assets.

func (*UploadOptions) Open

func (options *UploadOptions) Open(ctx context.Context, cmd *cobra.Command, app *app.Application) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳