ocfsmdatadriver

package
v0.0.0-...-3f50f10 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2017 License: AGPL-3.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(logger levels.Levels, sqlLogger mysql.Logger, maxSQLIdleConnections, maxSQLConcurrentConnections int, dataFolder, temporaryFolder, dsn string) (lib.MetaDataDriver, error)

New returns an implementation of MetaDataDriver

Types

type Driver

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

Driver implements the MetaDataDriver interface.

func (*Driver) CreateFolder

func (c *Driver) CreateFolder(ctx context.Context, user lib.User, path string) error

CreateTree creates a new tree.

func (*Driver) Delete

func (c *Driver) Delete(ctx context.Context, user lib.User, path string) error

DeleteObject deletes an object.

func (*Driver) Examine

func (c *Driver) Examine(ctx context.Context, user lib.User, path string) (lib.FileInfo, error)

ExamineObject returns the metadata associated with the object.

func (*Driver) GetDBMetaData

func (c *Driver) GetDBMetaData(virtualPath string, forceCreateOnMiss bool, ancestorVirtualPath string) (*record, error)

GetDBMetaData returns the metadata kept in the database for this virtualPath.

func (*Driver) GetVirtualPath

func (c *Driver) GetVirtualPath(user lib.User, path string) string

GetVirtualPath returns the virtual path inside the database for this user and path.

func (*Driver) Init

func (c *Driver) Init(ctx context.Context, user lib.User) error

Init initializes the user home directory.

func (*Driver) ListFolder

func (c *Driver) ListFolder(ctx context.Context, user lib.User, path string) ([]lib.FileInfo, error)

func (*Driver) Move

func (c *Driver) Move(ctx context.Context, user lib.User, sourcePath, targetPath string) error

Move moves an object from source to target.

func (*Driver) MoveDBMetaData

func (c *Driver) MoveDBMetaData(sourceVirtualPath, targetVirtualPath, ancestorVirtualPath string) error

MoveDBMetaData moves metadata from one virtualPath to another.

func (*Driver) PropagateChanges

func (c *Driver) PropagateChanges(user lib.User, from, to, checksum string) error

func (*Driver) SetDBMetaData

func (c *Driver) SetDBMetaData(virtualPath, checksum string, ancestorVirtualPath string) error

SetDBMetaData sets the metatadata for this virtualPath.

Jump to

Keyboard shortcuts

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