s3

package
v0.0.0-...-8b94866 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Unlicense Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "s3"

Variables

This section is empty.

Functions

func NewService

func NewService(config mediastore.ServiceConfig) (mediastore.Service, error)

Types

type Config

type Config struct {
	Region          string `env:"REGION,required" yaml:"region" json:"region"`
	BucketName      string `env:"BUCKET_NAME,required" yaml:"bucket_name" json:"bucket_name"`
	AccessKeyID     string `env:"ACCESS_KEY_ID" yaml:"access_key_id" json:"access_key_id"`
	SecretAccessKey string `env:"SECRET_ACCESS_KEY" yaml:"secret_access_key" json:"secret_access_key"`
}

func ConfigSkeleton

func ConfigSkeleton() Config

type Service

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

func (*Service) GetObject

func (s *Service) GetObject(sourceKey string) (stream *bytes.Buffer, err error)

func (*Service) GetPublicObject

func (s *Service) GetPublicObject(sourceKey string) (targetURL string, err error)

func (*Service) PutObject

func (s *Service) PutObject(targetKey string, contentSource io.Reader) (uploadInfo *mediastore.UploadInfo, err error)

Jump to

Keyboard shortcuts

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