contracts

package
v0.0.3-beta Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogErrorLevel uint8 = iota
	LogInfoLevel
	LogWarningLevel
	LogDebugLevel
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ExitChan

type ExitChan chan bool

type ExtendedFileInfo

type ExtendedFileInfo struct {
	FileInfo os.FileInfo
	FullPath string
}

type File

type File struct {
	Id             string
	PrevRemoteName string
	CurRemoteName  string
	// full path of the file
	PrevPath string
	CurPath  string
	Hash     string
	// when the last time the file was downloaded. It is actually
	// the last local modification date
	DownloadTime time.Time
	// previous modification time. After synchronization the CurRemoteModTime
	// field is populated with the actual modification time. After we see, if the fields
	// PrevRemoteModTime and CurRemoteModTime are not the same, it means
	// the remote file has been changed since the last synchronization.
	PrevRemoteModTime time.Time
	// after synchronization with the remote drive, the field is filled with
	// the last modification time on the server. Having the field, we can say if it
	// has been changed since the last synchronization.
	CurRemoteModTime time.Time
	MimeType         string
	Shared           uint8
	RootFolder       uint8
	SizeBytes        uint64
	RemovedRemotely  uint8
	RemovedLocally   uint8
	// if it was placed to trash
	Trashed uint8
}

type FileChangeType

type FileChangeType string
const (
	FILE_DELETED     FileChangeType = "deleted"
	FILE_UPDATED     FileChangeType = "updated"
	FILE_NOT_CHANGED FileChangeType = "not_changed"
	FILE_NOT_EXIST   FileChangeType = "not_exist"
	FILE_ERROR       FileChangeType = "error"
	FILE_MOVED       FileChangeType = "moved"
)

type FilesChan

type FilesChan chan File

type Logger

type Logger interface {
	Debug(v ...interface{})
	Info(v ...interface{})
	Warning(v ...interface{})
	Error(v ...interface{})
}

type RowScanner

type RowScanner interface {
	Scan(dest ...interface{}) error
}

type SyncChan

type SyncChan chan bool

Jump to

Keyboard shortcuts

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