Documentation
¶
Index ¶
- type PgAttachmentStore
- func (s *PgAttachmentStore) Delete(ctx context.Context, storageKey string) error
- func (s *PgAttachmentStore) GetSignedURL(_ context.Context, _ string, _ time.Duration) (*url.URL, error)
- func (s *PgAttachmentStore) Retrieve(ctx context.Context, storageKey string) (io.ReadCloser, error)
- func (s *PgAttachmentStore) Store(ctx context.Context, data io.Reader, maxSize int64, contentType string) (*registryattach.FileStoreResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PgAttachmentStore ¶
type PgAttachmentStore struct {
// contains filtered or unexported fields
}
func (*PgAttachmentStore) Delete ¶
func (s *PgAttachmentStore) Delete(ctx context.Context, storageKey string) error
func (*PgAttachmentStore) GetSignedURL ¶
func (*PgAttachmentStore) Retrieve ¶
func (s *PgAttachmentStore) Retrieve(ctx context.Context, storageKey string) (io.ReadCloser, error)
Retrieve fetches attachment data. Numeric storage keys are Java/Go LargeObjects stored via lo_put; UUID keys fall back to the legacy attachment_file_chunks table written by older Go code.
func (*PgAttachmentStore) Store ¶
func (s *PgAttachmentStore) Store(ctx context.Context, data io.Reader, maxSize int64, contentType string) (*registryattach.FileStoreResult, error)
Store buffers the upload to a temp file then writes it to a PostgreSQL LargeObject, matching Java's DatabaseFileStore behaviour. Returns the numeric OID as the storage key.
Click to show internal directories.
Click to hide internal directories.