Documentation ¶
Index ¶
- func CreateDB() error
- func GenConditionSQL(source_ids []int64, archive_names []string) ([]interface{}, string)
- type Archive
- type Backup
- type BackupPaths
- type BackupRel
- type DriveRecord
- type SQLite
- func (conn *SQLite) AddBackupTimestamp(source_id int64, drive_ksuid string) int
- func (conn *SQLite) ArchiveExists(archive_name string) bool
- func (conn *SQLite) ArchiveUsed(archive_id int64) (int, int)
- func (conn *SQLite) ClearAllTables() error
- func (conn *SQLite) CreateArchive(archive_name string) (int64, error)
- func (conn *SQLite) CreateBackup(archive_id int64, drive_ksuid string, path string) error
- func (conn *SQLite) CreateSource(drive_ksuid string, path string) int64
- func (conn *SQLite) DelArchiveDB(archive_id int64) bool
- func (conn *SQLite) DelDriveDB(ksuid string) bool
- func (conn *SQLite) DriveInDB(drive_ksuid string) (string, sql.NullString)
- func (conn *SQLite) Exec(sql string, args ...interface{}) (sql.Result, error)
- func (conn *SQLite) FindBackups(source_ids []int64, archive_names []string) (map[int64]BackupRel, error)
- func (conn *SQLite) Fixtures() error
- func (conn *SQLite) GetArchiveID(archive_name string) int64
- func (conn *SQLite) GetArchives() []Archive
- func (conn *SQLite) GetArchivesWithoutBackup() []int64
- func (conn *SQLite) GetNewestTimestamp(database_path string) sql.NullTime
- func (conn *SQLite) GetSourceArchive(source_id int64) int64
- func (conn *SQLite) GetSourcesWithoutBackup() []int64
- func (conn *SQLite) InsertDriveDB(ksuid string, drive_name string) int64
- func (conn *SQLite) OpenConnection(database_path string) error
- func (conn *SQLite) QueryRows(sql string, args ...interface{}) (rows.Rows, error)
- func (conn *SQLite) RemoveDestination(archive_id int64, drive_ksuid string) bool
- func (conn *SQLite) RemoveDestinationByArchive(archive_id int64) bool
- func (conn *SQLite) RemoveDestinationByDrive(drive_ksuid string) bool
- func (conn *SQLite) RemoveDestinationByPath(archive_name string, ksuid string) bool
- func (conn *SQLite) RemoveDestinations(archive_id int64) bool
- func (conn *SQLite) RemoveSource(source_id int64) error
- func (conn *SQLite) RemoveSources(archive_id int64) bool
- func (conn *SQLite) TestDatabase(database_path string) map[int64]Timestamp
- func (conn *SQLite) UpdateDriveName(drive_ksuid string, new_name string) int
- func (conn *SQLite) UpdateSourceArchive(source_id int64, archive_id int64) error
- type Source
- type Timestamp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenConditionSQL ¶
Types ¶
type Backup ¶
type Backup struct { Ksuid string Path sql.NullString }
type BackupPaths ¶
type DriveRecord ¶
type SQLite ¶
type SQLite struct {
// contains filtered or unexported fields
}
func (*SQLite) AddBackupTimestamp ¶
func (*SQLite) ArchiveExists ¶
func (*SQLite) ClearAllTables ¶
func (*SQLite) CreateArchive ¶
func (*SQLite) CreateBackup ¶
func (*SQLite) CreateSource ¶
func (*SQLite) DelArchiveDB ¶
Removes record from drives table
func (*SQLite) DelDriveDB ¶
Removes record from drives table
func (*SQLite) DriveInDB ¶
func (conn *SQLite) DriveInDB(drive_ksuid string) (string, sql.NullString)
Returns drive by ksuid from db
func (*SQLite) FindBackups ¶
func (*SQLite) GetArchiveID ¶
func (*SQLite) GetArchives ¶
func (*SQLite) GetArchivesWithoutBackup ¶
func (*SQLite) GetNewestTimestamp ¶
func (*SQLite) GetSourceArchive ¶
Removes record from source table
func (*SQLite) GetSourcesWithoutBackup ¶
func (*SQLite) InsertDriveDB ¶
Inserts record into table drives
func (*SQLite) OpenConnection ¶
func (*SQLite) RemoveDestination ¶
Removes record from drives table
func (*SQLite) RemoveDestinationByArchive ¶
Removes record from drives table
func (*SQLite) RemoveDestinationByDrive ¶
Removes record from drives table
func (*SQLite) RemoveDestinationByPath ¶
func (*SQLite) RemoveDestinations ¶
Removes record from drives table
func (*SQLite) RemoveSource ¶
Removes record from source table
func (*SQLite) RemoveSources ¶
Removes record from source table
func (*SQLite) TestDatabase ¶
func (*SQLite) UpdateDriveName ¶
Click to show internal directories.
Click to hide internal directories.