core

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	POTATOICO = "potato.ico"
	MUTEXNAME = "7122117b-3a2e-4c5d-bb21-2c9d0d2243bd"
)

Variables

This section is empty.

Functions

func BytesToGuid

func BytesToGuid(b []byte) *syscall.GUID

func CheckAlreadyRunning

func CheckAlreadyRunning() error

func ErrorByCode

func ErrorByCode(result uintptr) error

func ErrorByCodeWithContext

func ErrorByCodeWithContext(context string, result uintptr) error

func InstalledFile

func InstalledFile(relativename string, short bool) string

func OpenFile

func OpenFile(handle windows.Handle, path string) error

func ToLongPath

func ToLongPath(localpath string) string

func ToShortPath

func ToShortPath(localpath string) string

Types

type ConnectionState

type ConnectionState struct {
	ID             string
	SyncInProgress bool
	LastSyncError  error
}

type FileSyncState

type FileSyncState struct {
	Path      string
	State     FileSyncStateEnum
	LastError error
}

type FileSyncStateEnum

type FileSyncStateEnum int
const (
	FileSyncStateUnknown     FileSyncStateEnum = 0
	FileSyncStatePending     FileSyncStateEnum = 1
	FileSyncStateUploading   FileSyncStateEnum = 2
	FileSyncStateDownloading FileSyncStateEnum = 3
	FileSyncStateDone        FileSyncStateEnum = 4
	FileSyncStateDeleted     FileSyncStateEnum = 5
	FileSyncStateDirty       FileSyncStateEnum = 6
	FileSyncStateError       FileSyncStateEnum = 7
)

type RemoteStateCache

type RemoteStateCache interface {
	UpdateHash(remotepath string, hash []byte) error
	GetHash(remotepath string) ([]byte, error)
}

RemoteStateCache is the contract for keeping track files seen by the client on the remote side.

func HashFilesRemotely

func HashFilesRemotely(fs afero.Fs) RemoteStateCache

type Virtualization

type Virtualization interface {
	io.Closer
	PerformSynchronization() error
	SetFileStateHandler(handler func(state FileSyncState))
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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