fileevent

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEqualCounts

func IsEqualCounts(a, b []int64) bool

IsEqualCounts checks if two slices of int64 have the same elements in the same order. Used for tests only

func NewCounts

func NewCounts() *counts

Types

type Code

type Code int
const (
	NotHandled            Code = iota
	DiscoveredImage            // = "Scanned image"
	DiscoveredVideo            // = "Scanned video"
	DiscoveredSidecar          // = "Scanned side car file"
	DiscoveredDiscarded        // = "Discarded"
	DiscoveredUnsupported      // = "File type not supported"
	DiscoveredUseless          // = "Useless file"

	AnalysisAssociatedMetadata
	AnalysisMissingAssociatedMetadata
	AnalysisLocalDuplicate

	UploadNotSelected
	UploadUpgraded        // = "Server's asset upgraded"
	UploadServerDuplicate // = "Server has photo"
	UploadServerBetter    // = "Server's asset is better"
	UploadAlbumCreated
	UploadAddToAlbum // = "Added to an album"
	UploadLi
	UploadServerError // = "Server error"

	Uploaded  // = "Uploaded"
	Stacked   // = "Stacked"
	LivePhoto // = "Live photo"
	Metadata  // = "Metadata files"
	INFO      // = "Info"

	Written // = "Written"

	Tagged // = "Tagged"

	Error
	MaxCode
)

func (Code) String

func (e Code) String() string

type Recorder

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

func NewRecorder

func NewRecorder(l *slog.Logger) *Recorder

func (*Recorder) GetCounts

func (r *Recorder) GetCounts() []int64

func (*Recorder) Log

func (r *Recorder) Log() *slog.Logger

func (*Recorder) Record

func (r *Recorder) Record(ctx context.Context, code Code, file slog.LogValuer, args ...any)

func (*Recorder) Report

func (r *Recorder) Report() string

func (*Recorder) SetLogger

func (r *Recorder) SetLogger(l *slog.Logger)

func (*Recorder) TotalAssets

func (r *Recorder) TotalAssets() int64

func (*Recorder) TotalProcessed

func (r *Recorder) TotalProcessed(forcedMissingJSON bool) int64

func (*Recorder) TotalProcessedGP

func (r *Recorder) TotalProcessedGP() int64

Jump to

Keyboard shortcuts

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