fileblob

package
v0.0.0-...-1538fac Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package fileblob provides a bucket implementation that operates on the local filesystem. This should not be used for production: it is intended for local development.

Blob names must only contain alphanumeric characters, slashes, periods, spaces, underscores, and dashes. Repeated slashes, a leading "./" or "../", or the sequence "/./" is not permitted. This is to ensure that blob names map cleanly onto files underneath a directory.

Package fileblob provides a bucket implementation that operates on the local filesystem. This should not be used for production: it is intended for local development.

Blob names must only contain alphanumeric characters, slashes, periods, spaces, underscores, and dashes. Repeated slashes, a leading "./" or "../", or the sequence "/./" is not permitted. This is to ensure that blob names map cleanly onto files underneath a directory.

Index

Constants

View Source
const APP_FILE_ID string = "258081623"
View Source
const CHECKPOINT_INFO_ENTRY = "checkpoint"
View Source
const SCHEMA_VERSION string = "1"
View Source
const USER_UUID_INFO_ENTRY = "useruuid"

Variables

View Source
var AttrsExt = ""
View Source
var DBName = ""
View Source
var DataDir = ""
View Source
var FTSExt = ""
View Source
var MetaDir = ""
View Source
var RevisionDir = ""

Functions

func NewBucket

func NewBucket(dir string) (*blob.Bucket, error)

NewBucket creates a new bucket that reads and writes to dir. dir must exist.

func OpenSqlBucket

func OpenSqlBucket(dir string) (*blob.Bucket, error)

NewBucket creates a new bucket that reads and writes to dir. dir must exist.

Types

type InfoDataWriter

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

func (InfoDataWriter) Close

func (w InfoDataWriter) Close() error

func (InfoDataWriter) Write

func (w InfoDataWriter) Write(p []byte) (n int, err error)

type Sqlbucket

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

func OpenSqlBucketDirect

func OpenSqlBucketDirect(dir string) (*Sqlbucket, error)

NewBucketDirect creates a new bucket that reads and writes to dir. dir must exist.

func (*Sqlbucket) Attributes

func (b *Sqlbucket) Attributes(ctx context.Context, key string, isUID bool) (*driver.ObjectAttrs, error)

func (*Sqlbucket) CreateArea

func (b *Sqlbucket) CreateArea(ctx context.Context, area string, groups []string) error

func (*Sqlbucket) Delete

func (b *Sqlbucket) Delete(ctx context.Context, key string) error

func (*Sqlbucket) Move

func (b *Sqlbucket) Move(ctx context.Context, keySrc string, keyDst string) error

Move is used only by the revision system when creating a new revision point before updating object with new contents (no need to delete previous object or change metadata) and when moving objects to the recycle bin

func (*Sqlbucket) NewRangeReader

func (b *Sqlbucket) NewRangeReader(ctx context.Context, key string, offset, length int64, exactKeyName bool) (driver.Reader, error)

func (*Sqlbucket) NewTypedWriter

func (b *Sqlbucket) NewTypedWriter(ctx context.Context, key string, contentType string, opt *driver.WriterOptions) (driver.Writer, error)

func (*Sqlbucket) PutMetadataList

func (b *Sqlbucket) PutMetadataList(ctx context.Context, name string, metaList []map[string]string) error

Put mutliple metadata in a single transaction

Jump to

Keyboard shortcuts

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