Documentation ¶
Overview ¶
Package objectstore provides an object store utility that supports local file system and Google Cloud Storage objects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Object ¶
type Object struct { ContentType string ContentEncoding string // contains filtered or unexported fields }
Object provides methods to create new Readers and Writers of an object. Use Store.NewObject to get an Object. ContentType and ContentEncoding must be set as desired before calling Object.NewReader or Object.NewWriter, in order to read and write properly, based on those attributes.
func (*Object) NewReader ¶
NewReader creates a new Reader of Object's data, handling gzip decoding if applicable based on Object.ContentEncoding and storage behavior.
The caller must call Close on the returned Reader.
type Option ¶
type Option func(*Store)
Option is a function that modifies a Store during initialization.
type Reader ¶
Reader is a reader of Object data that meets the io.ReadCloser interface. Use Object.NewReader to get a Reader.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is used to initialize new Objects. Use New to get a Store.
Stores should be reused instead of created as needed. The methods of Store are safe for concurrent use by multiple goroutines.