api

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 2 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 interface {
	// Upload uploads a file to storage
	// Returns the storage path (tenant_id/object_key)
	Upload(ctx context.Context, tenantID, objectKey string, data io.Reader, size int64, contentType string) (storagePath string, err error)

	// Download downloads a file from storage
	// Returns the file data and content type
	Download(ctx context.Context, storagePath string) (data []byte, contentType string, err error)

	// GetPresignedURL generates a presigned URL for downloading
	// The URL expires after expirySeconds
	GetPresignedURL(ctx context.Context, storagePath string, expirySeconds int) (url string, err error)

	// Delete deletes a file from storage
	Delete(ctx context.Context, storagePath string) error
}

StorageService interface for object storage operations Implementations: MinIO, AWS S3

type StorageType

type StorageType string

StorageType represents the type of storage backend

const (
	StorageTypeMinio StorageType = "minio"
	StorageTypeS3    StorageType = "s3"
)

Jump to

Keyboard shortcuts

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