buckets

package
v0.0.0-...-7659e5b Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IMAGES_PREFIX  = "images/"
	VIDEOS_PREFIX  = "videos/"
	UPLOADS_PREFIX = "uploads/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BucketFactory

type BucketFactory struct {
	Name       string
	BucketName string
	Path       string
	Provider   ProviderInterface
}

func MakeBucketStrategy

func MakeBucketStrategy(ctx context.Context, provider string) (*BucketFactory, error)

type ProviderInterface

type ProviderInterface interface {
	Upload(ctx context.Context, file *multipart.FileHeader, uniqueName string, extension string) (string, error)
}

type ProviderMock

type ProviderMock struct {
	mock.Mock
}

func (*ProviderMock) Upload

func (m *ProviderMock) Upload(ctx context.Context, file *multipart.FileHeader, uniqueName string, extension string) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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