Documentation
¶
Index ¶
- Variables
- type MongoAttachmentStore
- func (s *MongoAttachmentStore) Delete(ctx context.Context, storageKey string) error
- func (s *MongoAttachmentStore) GetSignedURL(_ context.Context, _ string, _ time.Duration) (*url.URL, error)
- func (s *MongoAttachmentStore) Retrieve(ctx context.Context, storageKey string) (io.ReadCloser, error)
- func (s *MongoAttachmentStore) Store(ctx context.Context, data io.Reader, maxSize int64, contentType string) (*registryattach.FileStoreResult, error)
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 (*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.
Click to show internal directories.
Click to hide internal directories.