persistence

package
v0.0.0-...-97da23f Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2016 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	PutBlob(string, *BlobData) error
	GetBlob(string) (*BlobData, error)
}

type BlobData

type BlobData struct {
	// Key is the key for the blob data. This is populated on read and ignored
	// on any other operation.
	Key string

	// Data is the data for the blob data. When writing, this should be
	// the data to write. When reading, this is the data that is read.
	Data io.Reader
	// contains filtered or unexported fields
}

BlobData is the metadata and data associated with stored binary data. The fields and their usage varies depending on the operations, so please read the documentation for each field carefully.

func (*BlobData) Close

func (d *BlobData) Close() error

func (*BlobData) WriteToFile

func (d *BlobData) WriteToFile(path string) error

WriteToFile is a helper to write BlobData to a file. While this is a very easy thing to do, it is so common that we provide a function for doing so.

Jump to

Keyboard shortcuts

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