Documentation
¶
Overview ¶
Package filepg stores Files in PostgreSQL: metadata in source_files and content in large objects.
Index ¶
- type Store
- func (s *Store) Create(ctx context.Context, tenantID string, ...) (files.File, error)
- func (s *Store) Delete(ctx context.Context, tenantID, fileID string) error
- func (s *Store) Get(ctx context.Context, tenantID, fileID string) (files.File, error)
- func (s *Store) List(ctx context.Context, tenantID string, query files.ListQuery) (files.Page, error)
- func (s *Store) Read(ctx context.Context, tenantID, fileID string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) Create ¶
func (s *Store) Create(ctx context.Context, tenantID string, write func(io.Writer) (files.Upload, error)) (files.File, error)
Create writes the content into a large object and stores the File and its write audit in the same transaction, so a failed upload leaves nothing.
func (*Store) Delete ¶
Delete removes the row and its large object and records the write audit in one transaction.