storage

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package storage define implementações de provedores de armazenamento

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory struct {
	// contains filtered or unexported fields
}

Factory manages storage provider instances

func NewFactory

func NewFactory(ctx context.Context, cfg *config.Config, logger *slog.Logger) (*Factory, error)

NewFactory creates a new storage provider factory

func NewFactoryWithProviders

func NewFactoryWithProviders(providers map[string]interfaces.StorageProvider, logger *slog.Logger) *Factory

NewFactoryWithProviders creates a factory pre-populated with a provider map and logger (for testing)

func (*Factory) Close

func (f *Factory) Close()

Close cleans up resources used by the providers

func (*Factory) GetProvider

func (f *Factory) GetProvider(id string) (interfaces.StorageProvider, error)

type Provider

type Provider = interfaces.StorageProvider

Provider é um alias para interfaces.StorageProvider para manter compatibilidade

Jump to

Keyboard shortcuts

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