Documentation ¶
Index ¶
- func DeleteFileDatabase(db *sqlites.SqliteDB, fileID string) error
- func DeleteSharedDatabase(db *sqlites.SqliteDB, fileID string) error
- func DeleteSlicesDatabase(db *sqlites.SqliteDB, fileID string) error
- func InitDBTable(db *sqlites.SqliteDB) error
- func InsertFilesDatabase(db *sqlites.SqliteDB, fileID string, totalPieces int64, operates, status int, ...) error
- func InsertSharedDatabase(db *sqlites.SqliteDB, fileID, name string, size, xref int, ...) error
- func InsertSlicesDatabase(db *sqlites.SqliteDB, fileID, sliceHash string, current, status int) error
- func SelectOneFileID(db *sqlites.SqliteDB, fileID string) bool
- func SelectOneSlicesDatabaseStatus(db *sqlites.SqliteDB, fileID string) (..., error)
- func SelectSharedByFileIDDatabaseStatus(db *sqlites.SqliteDB, fileID string) (*sql.Rows, error)
- func SelectSharedByNameDatabaseStatus(db *sqlites.SqliteDB, name string) (*sql.Rows, error)
- func UpdateFileDatabaseStatus(db *sqlites.SqliteDB, fileID string, operates, status int) error
- func UpdateSharedDatabase(db *sqlites.SqliteDB, fileID, name string, size, xref int, ...) error
- func UpdateSlicesDatabaseStatus(db *sqlites.SqliteDB, fileID, sliceHash string, status int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteFileDatabase ¶ added in v0.0.6
DeleteFileDatabase 删除文件数据
func DeleteSharedDatabase ¶
DeleteSharedDatabase 删除共享数据
func DeleteSlicesDatabase ¶ added in v0.0.6
DeleteSlicesDatabase 删除文件片段数据
func InsertFilesDatabase ¶
func InsertFilesDatabase(db *sqlites.SqliteDB, fileID string, totalPieces int64, operates, status int, modTime time.Time) error
InsertFilesDatabase 插入文件数据
func InsertSharedDatabase ¶
func InsertSharedDatabase(db *sqlites.SqliteDB, fileID, name string, size, xref int, uploadTime, modTime time.Time) error
InsertSharedDatabase 插入共享数据
func InsertSlicesDatabase ¶
func InsertSlicesDatabase(db *sqlites.SqliteDB, fileID, sliceHash string, current, status int) error
InsertSlicesDatabase 插入文件片段数据
func SelectOneFileID ¶
SelectOneFileID 查询指定的文件是否存在
func SelectOneSlicesDatabaseStatus ¶
func SelectOneSlicesDatabaseStatus(db *sqlites.SqliteDB, fileID string) (*struct { SliceHash string // 文件片段的哈希值 SliceIndex int // 文件片段的索引 }, error)
SelectOneSlicesDatabaseStatus 查询指定文件的片段数据对象信息
func SelectSharedByFileIDDatabaseStatus ¶ added in v0.0.6
SelectSharedDatabaseStatus 查询指定文件的片段数据对象信息
func SelectSharedByNameDatabaseStatus ¶ added in v0.0.6
SelectSharedDatabaseStatus 查询指定文件的片段数据对象信息
func UpdateFileDatabaseStatus ¶
UpdateFileDatabaseStatus 更新文件数据对象的状态 operates 操作(0:下载、1:上传) status 状态(0:失败、1:成功、2:待开始、3:进行中)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.