usecase

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package usecase is the abstraction layer for the business logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CDNCreator

type CDNCreator interface {
	CreateCDN(ctx context.Context, input *CreateCDNInput) (*CreateCDNOutput, error)
}

CDNCreator is an interface for creating CDN.

type CreateCDNInput

type CreateCDNInput struct {
	// BucketName is the name of the  bucket.
	BucketName model.BucketName
}

CreateCDNInput is an input struct for CDNCreator.

type CreateCDNOutput

type CreateCDNOutput struct {
	// Domain is the domain of the CDN.
	Domain model.Domain
}

CreateCDNOutput is an output struct for CDNCreator.

type CreateStorageInput

type CreateStorageInput struct {
	// BucketName is the name of the bucket.
	BucketName model.BucketName
	// Region is the name of the region where the bucket is located.
	Region model.Region
}

CreateStorageInput is an input struct for StorageCreator.

type CreateStorageOutput

type CreateStorageOutput struct{}

CreateStorageOutput is an output struct for StorageCreator.

type FileUploader

type FileUploader interface {
	// UploadFile uploads a file from external storage.
	UploadFile(ctx context.Context, input *UploadFileInput) (*UploadFileOutput, error)
}

FileUploader is an interface for uploading files to external storage.

type StorageCreator

type StorageCreator interface {
	CreateStorage(ctx context.Context, input *CreateStorageInput) (*CreateStorageOutput, error)
}

StorageCreator is an interface for creating external storage.

type UploadFileInput

type UploadFileInput struct {
	// BucketName is the name of the bucket.
	BucketName model.BucketName
	// Region is the name of the region where the bucket is located.
	Region model.Region
	// Key is the S3 key
	Key string
	// Data is the data to upload.
	Data io.Reader
}

UploadFileInput is an input struct for FileUploader.

type UploadFileOutput

type UploadFileOutput struct {
	// DetectedMIMEType is the MIME type detected by the library.
	DetectedMIMEType string
}

UploadFileOutput is an output struct for FileUploader.

Jump to

Keyboard shortcuts

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