s3

package
v0.0.1-0...-1b1769d Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3

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

func NewS3

func NewS3(options S3Options) (*S3, error)

func (*S3) Delete

func (s *S3) Delete(id string) error

func (*S3) List

func (s *S3) List() ([]string, error)

func (*S3) Name

func (s *S3) Name() string

func (*S3) Read

func (s *S3) Read(id string) (io.ReadCloser, error)

func (*S3) ReadMetadata

func (s *S3) ReadMetadata(id string) (string, string, int64, time.Time, error)

func (*S3) Serve

func (s *S3) Serve(w http.ResponseWriter, r *http.Request, id string, filename string, mimetype string, timestamp time.Time, attachment bool) error

func (*S3) Write

func (s *S3) Write(id string, r io.ReadSeeker, filename string, mimetype string) (int64, error)

type S3Options

type S3Options struct {
	AccessKeyId     string
	SecretAccessKey string
	SessionToken    string
	Endpoint        string
	Region          string
	Bucket          string
	PresignExpire   time.Duration
	ProxyData       bool
	ForcePathStyle  bool
	SslInsecure     bool
	SslCertificate  string
}

Jump to

Keyboard shortcuts

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