Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver interface { Write(buf []byte, hash string, prefix string) error NewReader(hash string, prefix string) (io.ReadCloser, error) }
Driver is the interface for saving images
type FileDriver ¶
type FileDriver struct {
// contains filtered or unexported fields
}
FileDriver struct
func NewFileDriver ¶
func NewFileDriver(base string) *FileDriver
NewFileDriver constructs new FileDriver with base path
func (*FileDriver) NewReader ¶
func (fs *FileDriver) NewReader(hash string, prefix string) (io.ReadCloser, error)
NewReader produces a file descriptor
type GoogleStorageDriver ¶
type GoogleStorageDriver struct {
// contains filtered or unexported fields
}
GoogleStorageDriver struct
func NewGoogleStorageDriver ¶
func NewGoogleStorageDriver(project string, bucket string, credentials string) (*GoogleStorageDriver, error)
NewGoogleStorageDriver constructs new GoogleStorageDriver
func (*GoogleStorageDriver) NewReader ¶
func (gsw *GoogleStorageDriver) NewReader(hash string, prefix string) (io.ReadCloser, error)
NewReader produces a handler for file in google storage
Click to show internal directories.
Click to hide internal directories.