mongostore

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ForceImport = 0

ForceImport is a no-op variable that can be referenced to ensure this package's init() runs.

Functions

This section is empty.

Types

type MongoAttachmentStore

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

func (*MongoAttachmentStore) Delete

func (s *MongoAttachmentStore) Delete(ctx context.Context, storageKey string) error

func (*MongoAttachmentStore) GetSignedURL

func (s *MongoAttachmentStore) GetSignedURL(_ context.Context, _ string, _ time.Duration) (*url.URL, error)

func (*MongoAttachmentStore) Retrieve

func (s *MongoAttachmentStore) Retrieve(ctx context.Context, storageKey string) (io.ReadCloser, error)

Retrieve fetches attachment data. ObjectId hex keys (no dashes) are GridFS (Java/Go primary storage); UUID keys with dashes fall back to the legacy attachment_file_chunks collection.

func (*MongoAttachmentStore) Store

func (s *MongoAttachmentStore) Store(ctx context.Context, data io.Reader, maxSize int64, contentType string) (*registryattach.FileStoreResult, error)

Store uploads data to GridFS, matching Java's DatabaseFileStore behaviour. Returns the ObjectId hex string as the storage key.

Jump to

Keyboard shortcuts

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