Phase 9, part 5: file storage, a folder or an S3 bucket
internal/storage keeps files that must outlast the app's disk (exports, uploads) behind one interface: a folder (<data>/files) or an S3-compatible bucket (minio-go, path-style, for Garage). Names that would reach outside the store are refused. An S3 store is checked at start; supermarket config checks the storage and Postgres for real. The same tests run on a folder and on Garage (SUPERMARKET_TEST_S3). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
"supermarket/internal/config"
|
||||
"supermarket/internal/storage"
|
||||
"sync"
|
||||
"time"
|
||||
"unicode"
|
||||
@@ -48,7 +49,8 @@ type Server struct {
|
||||
Secrets *secrets.Store
|
||||
Core *core.Core // nil without a Core
|
||||
DataDir string
|
||||
PublicURL string // e.g. http://localhost:8470, for OAuth redirect URIs
|
||||
Files storage.Store // exports and uploads: a folder or S3; nil in tests
|
||||
PublicURL string // e.g. http://localhost:8470, for OAuth redirect URIs
|
||||
Version string
|
||||
MCPToken string
|
||||
MCPSocket string // the MCP socket's path on the host, for Hermes' config
|
||||
|
||||
Reference in New Issue
Block a user