Documentation ¶
Index ¶
- Constants
- Variables
- func IsErrNoRow(err error) bool
- type DB
- func (db *DB) CreateIsoWithFileIDs(iso *types.ISOInfo, fileIDs string) (int, int, error)
- func (db *DB) DeleteBatchFiles(fileIDs string) (int, error)
- func (db *DB) DeletePartsByIsoID(isoID int) error
- func (db *DB) GetDirIDByPathAndRootID(path string, scanRootDirID int) (*int, error)
- func (db *DB) GetFileByNameAndDirID(name string, dirID int) (*types.FileInfo, error)
- func (db *DB) GetIsoByName(name string) (*types.ISOInfo, error)
- func (db *DB) GetPartsByIsoID(isoID int) (parts []*types.PartInfo, err error)
- func (db *DB) GetTotalFilesInIso(isoID int) (uint64, uint64, error)
- func (db *DB) InsertDir(path string, scanRootDirID int, modTime *time.Time) (int, error)
- func (db *DB) InsertFile(f *types.FileInfo) (int, error)
- func (db *DB) InsertISO(iso *types.ISOInfo) (int, error)
- func (db *DB) InsertIsoParts(isoID int, parts []*types.PartInfo) error
- func (db *DB) ListDirs() (map[int]*types.DirInfo, error)
- func (db *DB) ListFilesBySize(minFileSize int) ([]*types.FileInfo, error)
- func (db *DB) ListFilesNotInISOAndCloud() ([]*types.FileInfo, error)
- func (db *DB) ListFilesNotInISOOrCloud() ([]*types.FileInfo, error)
- func (db *DB) ListISOs() ([]*types.ISOInfo, error)
- func (db *DB) ListScanRootDirs() (map[int]string, error)
- func (db *DB) ResetISOUploadInfo(isoFilename string) error
- func (db *DB) TotalFileSizeNotInISO() (uint64, error)
- func (db *DB) UpdateDirModTime(dirID int, modTime time.Time) error
- func (db *DB) UpdateFileIsoIDAndRemoteHash(isoID, fileID int, remoteHash string) error
- func (db *DB) UpdateIsoRemoteHash(isoID int, hash string) error
- func (db *DB) UpdateIsoStatus(isoID int, status types.IsoStatus) error
- func (db *DB) UpdateIsoStatusRemoteHash(isoID int, remoteHash string, status types.IsoStatus) error
- func (db *DB) UpdateIsoUploadInfo(info *types.ISOInfo) error
- func (db *DB) UpdatePartEtagAndStatus(isoID, partNo int, etag string, status types.PartStatus) error
- func (db *DB) UpdatePartEtagAndStatusHash(isoID, partNo int, etag, localHash, remoteHash string, status types.PartStatus) error
- func (db *DB) UpdatePartStatus(isoID, partNo int, status types.PartStatus) error
Constants ¶
View Source
const (
// SuperScanRootDirID is scan root dir id for scan root dir entry in DB
SuperScanRootDirID = 0
)
Variables ¶
View Source
var (
ErrMaxRetry = errors.New("Beyond max retry")
)
Functions ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) CreateIsoWithFileIDs ¶
func (*DB) DeletePartsByIsoID ¶
func (*DB) GetDirIDByPathAndRootID ¶
func (*DB) GetFileByNameAndDirID ¶
func (*DB) GetPartsByIsoID ¶
func (*DB) ListFilesBySize ¶
func (*DB) ListFilesNotInISOAndCloud ¶
func (*DB) ListFilesNotInISOOrCloud ¶
func (*DB) ResetISOUploadInfo ¶
func (*DB) TotalFileSizeNotInISO ¶
func (*DB) UpdateFileIsoIDAndRemoteHash ¶
func (*DB) UpdateIsoStatusRemoteHash ¶
func (*DB) UpdatePartEtagAndStatus ¶
func (*DB) UpdatePartEtagAndStatusHash ¶
func (*DB) UpdatePartStatus ¶
func (db *DB) UpdatePartStatus(isoID, partNo int, status types.PartStatus) error
Click to show internal directories.
Click to hide internal directories.