Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildObjectKey ¶
BuildObjectKey returns the canonical storage key: {project_id}/{file_type}/{uuid}{ext}.
Types ¶
type ObjectStorage ¶
type ObjectStorage interface {
Upload(ctx context.Context, key string, body io.Reader, contentType string, size int64) (publicURL string, err error)
DeleteObjects(ctx context.Context, keys []string) (failed []string, err error)
}
ObjectStorage uploads and deletes objects in project-configured S3-compatible storage.
type ProjectS3Storage ¶
type ProjectS3Storage struct {
// contains filtered or unexported fields
}
ProjectS3Storage implements ObjectStorage using aws-sdk-go-v2 and project storage settings.
func NewProjectS3Storage ¶
NewProjectS3Storage builds an S3-compatible client from project storage settings and platform free-cloud config.
func (*ProjectS3Storage) DeleteObjects ¶
DeleteObjects removes objects; returns keys that failed to delete.
func (*ProjectS3Storage) PublicURL ¶
func (s *ProjectS3Storage) PublicURL(key string) string
PublicURL builds the object URL from PublicBaseURL or endpoint/bucket/key.
Click to show internal directories.
Click to hide internal directories.