mongodb

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChunkSize  = 8 * 1024 * 1024 // 255 * 1024 // 255 KB per chunk
	FilesColl  = "files"
	ChunksColl = "chunks"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FileStore

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

func NewFileStore

func NewFileStore(uri, dbName, collPrefix string) (*FileStore, error)

func (*FileStore) Close

func (fs *FileStore) Close() error

func (*FileStore) Delete

func (fs *FileStore) Delete(fileId string) error

func (*FileStore) FastGet

func (fs *FileStore) FastGet(fileId string) (data []byte, metadata map[string]interface{}, err error)

func (*FileStore) Get

func (fs *FileStore) Get(fileId string) (data []byte, metadata map[string]interface{}, err error)

func (*FileStore) Put

func (fs *FileStore) Put(buffer []byte, metadata map[string]interface{}) (fileId string, err error)

Jump to

Keyboard shortcuts

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