vfsswift

package
v0.0.0-...-4b98c26 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteContainer

func DeleteContainer(ctx context.Context, c *swift.Connection, container string) error

DeleteContainer removes all the files inside the given container, and then deletes it.

func MakeObjectName

func MakeObjectName(docID string) string

MakeObjectName build the swift object name for a given file document. It creates a virtual subfolder by splitting the document ID, which should be 32 bytes long, on the 27nth byte. This avoid having a flat hierarchy in swift with no bound

func MakeObjectNameV3

func MakeObjectNameV3(docID, internalID string) string

MakeObjectNameV3 builds the swift object name for a given file document. It creates a virtual subfolder by splitting the document ID, which should be 32 bytes long, on the 27nth byte. This avoid having a flat hierarchy in swift with no bound. And it appends the internalID at the end to regroup all the versions of a file in the same virtual subfolder.

func New

New returns a vfs.VFS instance associated with the specified indexer and the swift storage url.

func NewInternalID

func NewInternalID() string

NewInternalID returns a random string that can be used as an internal_vfs_id.

func NewThumbsFs

func NewThumbsFs(c *swift.Connection, domain string) vfs.Thumbser

NewThumbsFs creates a new thumb filesystem base on swift.

func NewThumbsFsV2

func NewThumbsFsV2(c *swift.Connection, db prefixer.Prefixer) vfs.Thumbser

NewThumbsFsV2 creates a new thumb filesystem base on swift.

This version stores the thumbnails in the same container as the main data container.

func NewThumbsFsV3

func NewThumbsFsV3(c *swift.Connection, db prefixer.Prefixer) vfs.Thumbser

NewThumbsFsV3 creates a new thumb filesystem base on swift.

This version stores the thumbnails in the same container as the main data container.

func NewV2

NewV2 returns a vfs.VFS instance associated with the specified indexer and the swift storage url.

This version implements a simpler layout where swift does not contain any hierarchy: meaning no index informations. This help with index incoherency and as many performance improvements regarding moving / renaming folders.

func NewV3

NewV3 returns a vfs.VFS instance associated with the specified indexer and the swift storage url.

This new V3 version uses only a single swift container per instance. We can easily put the thumbnails in the same container that the data. And, for the versioning, Swift Object Versioning is not what we want: it is not as robust as we expected (we had encoding issue with the V1 layout for file with `? ` in the name), and it is poor in features (for example, we want to swap an old version with the current version without having to download/upload contents, and it is not supported).

Types

This section is empty.

Jump to

Keyboard shortcuts

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