s3

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

s3/s3.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3Storage

type S3Storage struct {
	Bucket  string
	Session *session.Session
}

func NewS3Storage

func NewS3Storage(config *S3StorageConfig) (*S3Storage, error)
	return &S3Storage{
		Bucket:  config.Bucket,
		Session: sess,
	}, nil
}

func (*S3Storage) Delete

func (s *S3Storage) Delete(file string) error

func (*S3Storage) Download

func (s *S3Storage) Download(file string) (string, error)

func (*S3Storage) Upload

func (s *S3Storage) Upload(file string) (string, error)

type S3StorageConfig

type S3StorageConfig struct {
	Region          string
	Bucket          string
	AccessKeyID     string
	SecretAccessKey string
}

func (*S3StorageConfig) GetStorageType

func (c *S3StorageConfig) GetStorageType() string

Jump to

Keyboard shortcuts

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