Documentation ¶
Index ¶
- func AppendData(uri string, dataReader io.Reader, dataLength uint32, offset int64, total int64, ...) common.SyncServiceError
- func DeleteStoredData(uri string) common.SyncServiceError
- func GetData(uri string) (io.Reader, common.SyncServiceError)
- func GetDataChunk(uri string, size int, offset int64) ([]byte, bool, int, common.SyncServiceError)
- func StoreData(uri string, dataReader io.Reader, dataLength uint32) (int64, common.SyncServiceError)
- func StoreDataFromTempData(uri string) common.SyncServiceError
- func StoreTempData(uri string, dataReader io.Reader, dataLength uint32) (int64, common.SyncServiceError)
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendData ¶
func AppendData(uri string, dataReader io.Reader, dataLength uint32, offset int64, total int64, isFirstChunk bool, isLastChunk bool) common.SyncServiceError
AppendData appends a chunk of data to the file stored at the given URI
func DeleteStoredData ¶
func DeleteStoredData(uri string) common.SyncServiceError
DeleteStoredData deletes the data file stored at the given URI
func GetData ¶
func GetData(uri string) (io.Reader, common.SyncServiceError)
GetData retrieves the data stored at the given URI. After reading, the reader has to be closed.
func GetDataChunk ¶
GetDataChunk retrieves the data stored at the given URI. After reading, the reader has to be closed.
func StoreData ¶
func StoreData(uri string, dataReader io.Reader, dataLength uint32) (int64, common.SyncServiceError)
StoreData writes the data to the file stored at the given URI
func StoreDataFromTempData ¶
func StoreDataFromTempData(uri string) common.SyncServiceError
StoreDataFromTempData rename {dataURI.Path}.tmp to {dataURI.Path}
func StoreTempData ¶
func StoreTempData(uri string, dataReader io.Reader, dataLength uint32) (int64, common.SyncServiceError)
StoreTempData writes the data to the tmp file stored at the given URI
Types ¶
Click to show internal directories.
Click to hide internal directories.