Documentation
¶
Index ¶
- type Config
- type Module
- func (m *Module) Configure(config config.Config) error
- func (m *Module) Delete(ctx context.Context, path string) error
- func (m *Module) Dependencies() []string
- func (m *Module) Download(ctx context.Context, path string) (io.ReadCloser, error)
- func (m *Module) GetMigrationSources(projectRoot string) []migration_runner.Source
- func (m *Module) Initialize(ctx context.Context, db *gorm.DB, router *gin.Engine) error
- func (m *Module) List(ctx context.Context, prefix string) ([]models.FileInfo, error)
- func (m *Module) MigrationsDir() string
- func (m *Module) Name() string
- func (m *Module) Namespace() module.ModuleNamespace
- func (m *Module) NewConfig() config.Config
- func (m *Module) ProvidesMigrations() bool
- func (m *Module) Shutdown(ctx context.Context) error
- func (m *Module) Upload(ctx context.Context, input *models.UploadInput) (*models.UploadOutput, error)
- func (m *Module) Version() string
- type StorageProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) Dependencies ¶
Dependencies returns the module dependencies
func (*Module) GetMigrationSources ¶
func (m *Module) GetMigrationSources(projectRoot string) []migration_runner.Source
GetMigrationSources returns the migration sources for the storage module
func (*Module) Initialize ¶
Initialize sets up the storage module
func (*Module) MigrationsDir ¶
MigrationsDir implements module.Module.
func (*Module) Namespace ¶
func (m *Module) Namespace() module.ModuleNamespace
Namespace implements module.Module.
func (*Module) ProvidesMigrations ¶
ProvidesMigrations implements module.Module.
func (*Module) Upload ¶
func (m *Module) Upload(ctx context.Context, input *models.UploadInput) (*models.UploadOutput, error)
Upload handles file upload through the configured provider
type StorageProvider ¶
type StorageProvider interface {
// Upload handles file upload with idempotency
Upload(ctx context.Context, input *models.UploadInput) (*models.UploadOutput, error)
// Download retrieves file content
Download(ctx context.Context, path string) (io.ReadCloser, error)
// Delete removes a file
Delete(ctx context.Context, path string) error
// List returns files in a directory
List(ctx context.Context, prefix string) ([]models.FileInfo, error)
}
StorageProvider defines the interface for storage operations
Click to show internal directories.
Click to hide internal directories.