Versions in this module Expand all Collapse all v0 v0.2.0 Jul 14, 2026 v0.1.0 Jun 22, 2026 Changes in this version + const DefaultS3Region + func AudioKey(sessionID, filename string, now time.Time) string + func BuildArtifactKey(request ArtifactPutRequest) string + func CopyFile(ctx context.Context, srcKey, dstKey string) error + func DefaultLocalPath() string + func DeleteDocument(ctx context.Context, key string) error + func DeleteFile(ctx context.Context, key string) error + func DetectContentType(filename string) string + func DocumentKey(filename string, now time.Time) string + func DownloadFile(ctx context.Context, key string) ([]byte, error) + func DownloadKey(sessionID, pageID, filename string, now time.Time) string + func Exists(ctx context.Context, key string) (bool, error) + func GeneratedImageKey(sessionID, filename string, now time.Time) string + func GetFileURL(ctx context.Context, key string) (string, error) + func HealthCheck(ctx context.Context) error + func LoadDocument(ctx context.Context, key string) ([]byte, error) + func MoveFile(ctx context.Context, srcKey, dstKey string) error + func PDFKey(title string, now time.Time) string + func ResetProvider() + func ScreenshotKey(sessionID, pageID string, now time.Time) string + func SetConfig(cfg Config) + func StoreDocument(ctx context.Context, data []byte, filename string) (string, error) + func StorePDF(ctx context.Context, data []byte, title string) (string, error) + func StoreScreenshot(ctx context.Context, data []byte, sessionID, pageID string) (string, error) + func UploadFile(ctx context.Context, key string, data []byte, contentType string) error + func WebArtifactKey(sessionID, filename string, now time.Time) string + type ArtifactMetadata struct + ChecksumSHA256 string + ContentType string + CreatedAt time.Time + ExpiresAt time.Time + Filename string + Key string + ModifiedAt time.Time + Namespace string + PageID string + RetentionClass ArtifactRetentionClass + SessionID string + Size int64 + func ReadFileMetadata(ctx context.Context, key string) (ArtifactMetadata, error) + type ArtifactNamespace string + const NamespaceBrowserDownloads + const NamespaceBrowserScreenshots + const NamespaceDocuments + const NamespaceRAGDocuments + const NamespaceWebArtifacts + type ArtifactPutRequest struct + ContentType string + Filename string + Namespace ArtifactNamespace + PageID string + RetentionClass ArtifactRetentionClass + SessionID string + TTL time.Duration + Timestamp time.Time + type ArtifactRef struct + ChecksumSHA256 string + ContentType string + ExpiresAt time.Time + Key string + ModifiedAt time.Time + Namespace string + Size int64 + URL string + func ListFiles(ctx context.Context, prefix string, limit int) ([]ArtifactRef, error) + func OpenFileReader(ctx context.Context, key string) (io.ReadCloser, ArtifactRef, error) + func StatFile(ctx context.Context, key string) (ArtifactRef, error) + func StoreAudioRef(ctx context.Context, store ArtifactStore, data []byte, ...) (ArtifactRef, error) + func StoreDocumentRef(ctx context.Context, store ArtifactStore, data []byte, filename string) (ArtifactRef, error) + func StoreGeneratedImageRef(ctx context.Context, store ArtifactStore, data []byte, ...) (ArtifactRef, error) + func StorePDFRef(ctx context.Context, store ArtifactStore, data []byte, title string) (ArtifactRef, error) + func StoreRAGDocumentRef(ctx context.Context, store ArtifactStore, data []byte, filename string) (ArtifactRef, error) + func StoreScreenshotRef(ctx context.Context, store ArtifactStore, data []byte, ...) (ArtifactRef, error) + func StoreWebArtifactRef(ctx context.Context, store ArtifactStore, data []byte, ...) (ArtifactRef, error) + type ArtifactRetentionClass string + const RetentionDurable + const RetentionSession + const RetentionTemporary + type ArtifactStore interface + Delete func(ctx context.Context, key string) error + Exists func(ctx context.Context, key string) (bool, error) + GarbageCollect func(ctx context.Context, options GCOptions) (GCReport, error) + Get func(ctx context.Context, key string) ([]byte, error) + List func(ctx context.Context, options ListOptions) ([]ArtifactRef, error) + ListMetadata func(ctx context.Context, options ListOptions) ([]ArtifactMetadata, error) + Metadata func(ctx context.Context, key string) (ArtifactMetadata, error) + OpenReader func(ctx context.Context, key string) (io.ReadCloser, ArtifactRef, error) + Put func(ctx context.Context, key string, body []byte, contentType string) (ArtifactRef, error) + PutArtifact func(ctx context.Context, request ArtifactPutRequest, body []byte) (ArtifactRef, error) + Stat func(ctx context.Context, key string) (ArtifactRef, error) + URL func(ctx context.Context, key string) (string, error) + func DefaultArtifactStore() (ArtifactStore, error) + func NewArtifactStore(provider StorageProvider) ArtifactStore + func NewArtifactStoreFromConfig(cfg Config) (ArtifactStore, error) + type Config struct + LocalPath string + Provider ProviderType + S3AccessKeyID string + S3Bucket string + S3Endpoint string + S3KeyPrefix string + S3Region string + S3SecretAccessKey string + func GetConfigFromEnv() Config + type FileInfo struct + Exists bool + Key string + Size int64 + URL string + type GCOptions struct + DryRun bool + Limit int + Namespaces []ArtifactNamespace + Now time.Time + type GCReport struct + Deleted int + DeletedKeys []string + Errors []string + Kept int + Scanned int + func RunGarbageCollection(ctx context.Context, options GCOptions) (GCReport, error) + type ListOptions struct + Limit int + Prefix string + type LocalProvider struct + func NewLocalProvider() (*LocalProvider, error) + func NewLocalProviderWithConfig(cfg Config) (*LocalProvider, error) + func (p *LocalProvider) Delete(ctx context.Context, key string) error + func (p *LocalProvider) Download(ctx context.Context, key string) ([]byte, error) + func (p *LocalProvider) Exists(ctx context.Context, key string) (bool, error) + func (p *LocalProvider) GetURL(ctx context.Context, key string) (string, error) + func (p *LocalProvider) List(ctx context.Context, options ListOptions) ([]ObjectInfo, error) + func (p *LocalProvider) OpenReader(ctx context.Context, key string) (io.ReadCloser, ObjectInfo, error) + func (p *LocalProvider) Stat(ctx context.Context, key string) (ObjectInfo, error) + func (p *LocalProvider) Upload(ctx context.Context, key string, data []byte, contentType string) error + type ObjectInfo struct + ContentType string + ETag string + Key string + ModifiedAt time.Time + Size int64 + URL string + type ProviderType string + const ProviderLocal + const ProviderS3 + func GetProviderType() ProviderType + type Reaper struct + func NewReaper(store ArtifactStore, config ReaperConfig) *Reaper + func (r *Reaper) RunOnce(ctx context.Context) (GCReport, error) + func (r *Reaper) Start(parent context.Context) + func (r *Reaper) Stop() + type ReaperConfig struct + Interval time.Duration + Limit int + Namespaces []ArtifactNamespace + func DefaultReaperConfig() ReaperConfig + type S3Provider struct + func NewS3Provider() (*S3Provider, error) + func NewS3ProviderWithConfig(cfg Config) (*S3Provider, error) + func (p *S3Provider) Delete(ctx context.Context, key string) error + func (p *S3Provider) Download(ctx context.Context, key string) ([]byte, error) + func (p *S3Provider) Exists(ctx context.Context, key string) (bool, error) + func (p *S3Provider) GetURL(ctx context.Context, key string) (string, error) + func (p *S3Provider) List(ctx context.Context, options ListOptions) ([]ObjectInfo, error) + func (p *S3Provider) OpenReader(ctx context.Context, key string) (io.ReadCloser, ObjectInfo, error) + func (p *S3Provider) Stat(ctx context.Context, key string) (ObjectInfo, error) + func (p *S3Provider) Upload(ctx context.Context, key string, data []byte, contentType string) error + type StorageProvider interface + Delete func(ctx context.Context, key string) error + Download func(ctx context.Context, key string) ([]byte, error) + Exists func(ctx context.Context, key string) (bool, error) + GetURL func(ctx context.Context, key string) (string, error) + List func(ctx context.Context, options ListOptions) ([]ObjectInfo, error) + OpenReader func(ctx context.Context, key string) (io.ReadCloser, ObjectInfo, error) + Stat func(ctx context.Context, key string) (ObjectInfo, error) + Upload func(ctx context.Context, key string, data []byte, contentType string) error + func GetProvider() (StorageProvider, error) + func NewProviderFromConfig(cfg Config) (StorageProvider, error)