dataURI

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

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) 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

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

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

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