Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
S3NotEnabledErr = errors.New("storage is not enabled. Set S3 parameters to fetch files")
)
Functions ¶
This section is empty.
Types ¶
type NoStorage ¶ added in v0.1.20
type NoStorage struct{}
func (*NoStorage) GetFileLink ¶ added in v0.1.24
type Storage ¶
type Storage interface {
Upload(ctx context.Context, data []byte, namespace, folder, fileExtension, name string, expiresIn time.Duration) (string, error)
GetFileLink(ctx context.Context, namespace, file string, expiresIn time.Duration) (*url.URL, error)
Delete(ctx context.Context, namespace, file string, force bool) error
}
func New ¶ added in v0.1.24
func New(logger *zap.Logger, environment *environment.Environment) (Storage, error)
func NewMinio ¶ added in v0.1.24
func NewMinio(logger *zap.Logger, environment *environment.Environment) (Storage, error)
func NewS3 ¶
func NewS3(logger *zap.Logger, environment *environment.Environment) (Storage, error)
Click to show internal directories.
Click to hide internal directories.