Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUploadConfig ¶
func GetUploadConfig() *config.UploadConfig
GetUploadConfig retrieves the global upload configuration
func Init ¶
func Init(storageCfg *config.StorageConfig, uploadCfg *config.UploadConfig) error
Init initializes the storage provider and upload configuration globally
Types ¶
type S3Storage ¶
func NewS3Storage ¶
NewS3Storage initializes a new S3-compatible storage instance
type Storage ¶
type Storage interface { Upload(fileName string, fileContent io.Reader, contentType string) (string, error) // Uploads a file and returns its URL Get(fileName string) (string, error) // Gets the file URL Delete(fileName string) error // Deletes the file }
Storage is the generic interface for file storage
func NewStorageProvider ¶
func NewStorageProvider(storageCfg *config.StorageConfig) (Storage, error)
NewStorageProvider initializes the appropriate storage provider
Click to show internal directories.
Click to hide internal directories.