port

package
v0.0.0-...-bcece2d Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BucketRepository

type BucketRepository interface {
	CreateBucket(ctx context.Context, bucket *domain.Bucket) (*domain.Bucket, error)
	GetBucketByID(ctx context.Context, id uuid.UUID) (*domain.Bucket, error)
	GetBucketByName(ctx context.Context, name string) (*domain.Bucket, error)
	ListBuckets(ctx context.Context) ([]domain.Bucket, error)
	DeleteBucket(ctx context.Context, id uuid.UUID) error
}

BucketRepository is an interface to interact with the storage layer

type BucketService

type BucketService interface {
	CreateBucket(ctx context.Context, bucket *domain.Bucket) (*domain.Bucket, error)
	GetBucket(ctx context.Context, id string) (*domain.Bucket, error)
	ListBuckets(ctx context.Context) ([]domain.Bucket, error)
	DeleteBucket(ctx context.Context, id string) error
}

BucketService is an interface to interact with the business logic

type FileRepository

type FileRepository interface {
	CreateFile(ctx context.Context, file *domain.File) (*domain.File, error)
	GetFileByID(ctx context.Context, id uuid.UUID) (*domain.File, error)
	GetFileByName(ctx context.Context, name string, bucketID uuid.UUID) (*domain.File, error)
	GetFilesByBucketID(ctx context.Context, bucketID uuid.UUID) ([]domain.File, error)
	DeleteFilesByBucketID(ctx context.Context, bucketID uuid.UUID) error
	DeleteFile(ctx context.Context, id uuid.UUID) error
}

type FileService

type FileService interface {
	CreateFile(ctx context.Context, file *domain.File) (*domain.File, error)
	GetFile(ctx context.Context, id string) (*domain.File, error)
	GetFilesByBucketID(ctx context.Context, bucketID string) ([]domain.File, error)
	DeleteFile(ctx context.Context, id string) error
}

type StorageRepository

type StorageRepository interface {
	CreateBucket(ctx context.Context, bucket *domain.Bucket) error
	DeleteBucket(ctx context.Context, bucket *domain.Bucket) error
}

type StorageRepositoryProvider

type StorageRepositoryProvider interface {
	Get(storageType domain.BucketType) (StorageRepository, error)
}

Jump to

Keyboard shortcuts

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