storage

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

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

func (s *StorageService) GetFileBytes(ctx context.Context, objectName string) ([]byte, error)

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

func (*StorageService) UploadFile

func (s *StorageService) UploadFile(ctx context.Context, userID, fileName string, reader io.Reader, fileSize int64, contentType string) (string, error)

UploadFile uploads a file to storage

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL