dataURI

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 8 Imported by: 22

Documentation

Index

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, isTempData bool) (bool, common.SyncServiceError)

AppendData appends a chunk of data to the file stored at the given URI

func DeleteStoredData

func DeleteStoredData(uri string, isTempData bool) common.SyncServiceError

DeleteStoredData deletes the data file stored at the given URI

func GetData

func GetData(uri string, isTempData bool) (io.Reader, common.SyncServiceError)

GetData retrieves the data stored at the given URI. After reading, the reader has to be closed.

func GetDataChunk

func GetDataChunk(uri string, size int, offset int64) ([]byte, bool, int, common.SyncServiceError)

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 added in v1.6.4

func StoreDataFromTempData(uri string) common.SyncServiceError

StoreDataFromTempData rename {dataURI.Path}.tmp to {dataURI.Path}

func StoreTempData added in v1.6.4

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

type Error

type Error struct {
	// contains filtered or unexported fields
}

Error is the error used in the data URI package

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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