Versions in this module Expand all Collapse all v2 v2.3.0 Aug 28, 2026 Changes in this version + const DatabaseProvider + const DefaultMaxFileSize + const DefaultMaxMemory + const DefaultUploadFileKey + const DiskProvider + const DispositionAttachment + const DispositionInline + const ErrNoFilesUploaded + const MIMEDetectionBufferSize + const PresignModeProvider + const PresignModeProxy + const R2Provider + const S3Provider + var DefaultErrorResponseHandler = func(err error, statusCode int) http.HandlerFunc + var DefaultNameGeneratorFunc = func(originalName string) string + var DefaultSkipper = func(_ *http.Request) bool + var DefaultValidationFunc ValidationFunc = func(_ File) error + var ErrDOCXParseFailed = errors.New("failed to parse DOCX") + var ErrJSONParseFailed = errors.New("failed to parse JSON") + var ErrProviderResolutionRequired = errors.New("provider resolution required - use external orchestration layer") + var ErrYAMLParseFailed = errors.New("failed to parse YAML") + func DetectContentType(reader io.ReadSeeker) (string, error) + func DispositionFor(contentType string) string + type DownloadOptions = storagetypes.DownloadFileOptions + type DownloadedMetadata = storagetypes.DownloadedFileMetadata + type ErrResponseHandler func(err error, statusCode int) http.HandlerFunc + type File = storagetypes.File + func NewUploadFile(path string) (*File, error) + type FileMetadata = storagetypes.FileMetadata + type Files map[string][]File + type Frontmatter struct + OpenlaneID string + Revision string + Satisfies map[string][]string + Status string + Tags []string + Title string + func ParseFrontmatter(input []byte) (*Frontmatter, []byte, error) + type NameGeneratorFunc func(originalName string) string + type ObjectService struct + func NewObjectService() *ObjectService + func (s *ObjectService) Delete(ctx context.Context, provider Provider, file *storagetypes.File, ...) error + func (s *ObjectService) Download(ctx context.Context, provider Provider, file *storagetypes.File, ...) (*DownloadedMetadata, error) + func (s *ObjectService) ErrorResponseHandler() ErrResponseHandler + func (s *ObjectService) GetPresignedURL(ctx context.Context, provider Provider, file *storagetypes.File, ...) (string, error) + func (s *ObjectService) IgnoreNonExistentKeys() bool + func (s *ObjectService) Keys() []string + func (s *ObjectService) MaxMemory() int64 + func (s *ObjectService) MaxSize() int64 + func (s *ObjectService) Skipper() SkipperFunc + func (s *ObjectService) Upload(ctx context.Context, provider Provider, reader io.Reader, opts *UploadOptions) (*File, error) + func (s *ObjectService) WithUploader(uploader UploaderFunc) *ObjectService + func (s *ObjectService) WithValidation(validationFunc ValidationFunc) *ObjectService + type ParentObject = storagetypes.ParentObject + type ParsedDocument struct + Data any + Frontmatter *Frontmatter + func ParseDocument(reader io.Reader, mimeType string) (*ParsedDocument, error) + type PresignMode = storagetypes.PresignMode + type Provider = storagetypes.Provider + type ProviderConfig struct + DevMode bool + Enabled bool + Keys []string + MaxMemoryMB int64 + MaxSizeMB int64 + Providers Providers + type ProviderConfigs struct + BaseURL string + Bucket string + Credentials ProviderCredentials + Enabled bool + Endpoint string + EnsureAvailable bool + ProxyPresignEnabled bool + Region string + type ProviderCredentials struct + APIToken string + AccessKeyID string + AccountID string + ProjectID string + SecretAccessKey string + type ProviderHints = storagetypes.ProviderHints + type ProviderOption func(*ProviderOptions) + func WithBasePath(path string) ProviderOption + func WithBucket(bucket string) ProviderOption + func WithCredentials(creds ProviderCredentials) ProviderOption + func WithEndpoint(endpoint string) ProviderOption + func WithExtra(key string, value any) ProviderOption + func WithLocalURL(url string) ProviderOption + func WithProxyPresignConfig(cfg *ProxyPresignConfig) ProviderOption + func WithProxyPresignEnabled(enabled bool) ProviderOption + func WithRegion(region string) ProviderOption + type ProviderOptions struct + BasePath string + Bucket string + Credentials ProviderCredentials + Endpoint string + LocalURL string + ProxyPresignConfig *ProxyPresignConfig + ProxyPresignEnabled bool + Region string + func NewProviderOptions(opts ...ProviderOption) *ProviderOptions + func (p *ProviderOptions) Apply(opts ...ProviderOption) + func (p *ProviderOptions) Clone() *ProviderOptions + func (p *ProviderOptions) Extra(key string) (any, bool) + type ProviderType = storagetypes.ProviderType + type Providers struct + Database ProviderConfigs + Disk ProviderConfigs + R2 ProviderConfigs + S3 ProviderConfigs + type ProxyPresignConfig struct + BaseURL string + TokenAudience string + TokenIssuer string + TokenManager *tokens.TokenManager + func ApplyProxyPresignOptions(cfg *ProxyPresignConfig, opts ...ProxyPresignOption) *ProxyPresignConfig + func NewProxyPresignConfig(opts ...ProxyPresignOption) *ProxyPresignConfig + func (p *ProxyPresignConfig) Apply(opts ...ProxyPresignOption) *ProxyPresignConfig + type ProxyPresignOption func(*ProxyPresignConfig) + func WithProxyPresignBaseURL(baseURL string) ProxyPresignOption + func WithProxyPresignTokenAudience(audience string) ProxyPresignOption + func WithProxyPresignTokenIssuer(issuer string) ProxyPresignOption + func WithProxyPresignTokenManager(tm *tokens.TokenManager) ProxyPresignOption + type SkipperFunc func(r *http.Request) bool + type UploadOptions = storagetypes.UploadFileOptions + type UploadedMetadata = storagetypes.UploadedFileMetadata + type UploaderFunc func(ctx context.Context, service *ObjectService, files []File) ([]File, error) + type ValidationFunc func(f File) error Other modules containing this package github.com/theopenlane/core