Documentation
¶
Index ¶
- type StorageService
- func (s *StorageService) DeleteFile(ctx context.Context, objectName string) error
- func (s *StorageService) GeneratePresignedURL(ctx context.Context, objectName string, expiry time.Duration) (string, error)
- func (s *StorageService) GetFile(ctx context.Context, objectName string) (io.ReadCloser, error)
- func (s *StorageService) GetFileBytes(ctx context.Context, objectName string) ([]byte, error)
- func (s *StorageService) GetFileInfo(ctx context.Context, objectName string) (*minio.ObjectInfo, error)
- func (s *StorageService) ListUserDocuments(ctx context.Context, userID string) ([]minio.ObjectInfo, error)
- func (s *StorageService) UploadFile(ctx context.Context, userID, fileName string, reader io.Reader, fileSize int64, ...) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StorageService ¶
type StorageService struct {
// contains filtered or unexported fields
}
StorageService handles document storage operations
func NewStorageService ¶
func NewStorageService() (*StorageService, error)
NewStorageService creates a new storage service
func (*StorageService) DeleteFile ¶
func (s *StorageService) DeleteFile(ctx context.Context, objectName string) error
DeleteFile deletes a file from storage
func (*StorageService) GeneratePresignedURL ¶
func (s *StorageService) GeneratePresignedURL(ctx context.Context, objectName string, expiry time.Duration) (string, error)
GeneratePresignedURL generates a temporary download URL
func (*StorageService) GetFile ¶
func (s *StorageService) GetFile(ctx context.Context, objectName string) (io.ReadCloser, error)
GetFile retrieves a file from storage
func (*StorageService) GetFileBytes ¶
GetFileBytes retrieves file as bytes
func (*StorageService) GetFileInfo ¶
func (s *StorageService) GetFileInfo(ctx context.Context, objectName string) (*minio.ObjectInfo, error)
GetFileInfo retrieves file metadata
func (*StorageService) ListUserDocuments ¶
func (s *StorageService) ListUserDocuments(ctx context.Context, userID string) ([]minio.ObjectInfo, error)
ListUserDocuments lists all documents for a user
Click to show internal directories.
Click to hide internal directories.