s3

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package s3 implements S3 storage logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

Storage is a S3 implementation of a file storage.

func NewStorage

func NewStorage(params StorageParams) (*Storage, error)

NewStorage creates new instance of the Storage.

func (*Storage) Download

func (s *Storage) Download(ctx context.Context, filename string) (io.Reader, error)

Download downloads file from S3 by the provided filename.

func (*Storage) Upload

func (s *Storage) Upload(ctx context.Context, input storage.UploadInput) error

Upload uploads file to S3.

type StorageParams

type StorageParams struct {
	Config config.S3StorageConfig
}

StorageParams is an incoming params for the NewStorage function.

Jump to

Keyboard shortcuts

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