file

package
v0.0.0-...-77bdb4f Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyID = errors.New("Invalid ID data")

ErrEmptyID declares error for invalid ID

View Source
var ErrInvalidPath = errors.New("Invalid path data")

ErrInvalidPath declares error for invalid path part

View Source
var ErrUnsupported = errors.New("Unsupported method for file syncing")

ErrUnsupported declares error for unsupported methods

Functions

This section is empty.

Types

type File

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

File driver

func New

func New(
	renderMap *mapping.RenderMap, include, exclude, columns, extras, spec mapping.Fields,
	idName, atName, dataDir string, json, compression bool, extension, bucket string,
	topics []string, match string, path, name, header mapping.Fields,
) (db *File, err error)

New creates file driver

func (*File) AddFromSQL

func (db *File) AddFromSQL(bucket string, columns []string, values []interface{}) (last uint64, err error)

AddFromSQL implements interface for inserting data from SQL into bucket

func (*File) Close

func (db *File) Close() (err error)

Close flushes data and closes files

func (*File) Cursor

func (db *File) Cursor(
	bucket string, renderMap *mapping.RenderMap, columns []string, values []interface{},
) (last uint64, err error)

Cursor sets pointer

func (*File) GetFiles

func (db *File) GetFiles(path string, fileCount int) (collection map[string]binding.Stream, err error)

GetFiles should collect

func (*File) LastID

func (db *File) LastID(bucket string) (id uint64, err error)

LastID implements interface for getting last ID in datastore bucket

func (*File) PutFile

func (db *File) PutFile(path string, stream binding.Stream) error

PutFile uploads file to the datastore

func (*File) Remove

func (db *File) Remove(path string) error

Remove method removes file by path

Jump to

Keyboard shortcuts

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