storage

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSystemStorage

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

func NewLocalStorage

func NewLocalStorage(storageFolder string, downloadURL string) *FileSystemStorage

func (*FileSystemStorage) Upload

func (storage *FileSystemStorage) Upload(ctx context.Context, data []byte, fileName string) (*url.URL, error)

type Handler

type Handler interface {
	Upload(context context.Context, data []byte, fileName string) (*url.URL, error)
}

type PutObjectToS3

type PutObjectToS3 interface {
	PutObject(ctx context.Context, params *s3.PutObjectInput, optFns ...func(*s3.Options)) (*s3.PutObjectOutput, error)
}

type S3ArtifactStorage

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

func NewS3ArtifactStorage

func NewS3ArtifactStorage(bucket string, s3 PutObjectToS3) *S3ArtifactStorage

func (*S3ArtifactStorage) Upload

func (storage *S3ArtifactStorage) Upload(ctx context.Context, data []byte, fileName string) (*url.URL, error)

Jump to

Keyboard shortcuts

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