s3

package
v0.0.0-...-6410feb Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ErrClientNotInit = Err("s3 client not init")

Variables

This section is empty.

Functions

func Get

func Get(ctx context.Context, fileName string) (int64, io.ReadCloser, error)

func Init

func Init(endpoint, accessKey, secretKey, bucket string, useSSL bool) error

func Put

func Put(ctx context.Context, filePath, objName string, progresser func(int64)) (string, error)

func PutStream

func PutStream(ctx context.Context, file io.Reader, fSize int64, objName string, progresser func(saved int64)) (string, error)

func Remove

func Remove(ctx context.Context, fileName string) error

Types

type Err

type Err string

func (Err) Error

func (e Err) Error() string

type S3Client

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

Bucket is image upload bucket name

func (*S3Client) Location

func (c *S3Client) Location(filePath string) string

Jump to

Keyboard shortcuts

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