s3

package
v0.0.0-...-b70959e Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Region    = "cn-east-2"
	AccessKey = "13EEE71557A91B8C4561D7282A75A647"
	SecretKey = "58358E170934778DD2E2DA493DBD07F6"
	Bucket    = "wz-location"
	EndPoint  = ""
)

Variables

This section is empty.

Functions

This section is empty.

Types

type S3Config

type S3Config struct {
	Region    string `json:"region,omitempty" yaml:"region" `
	AccessKey string `json:"accessKey,omitempty" yaml:"accessKey" `
	SecretKey string `json:"secretKey,omitempty" yaml:"secretKey" `
	Bucket    string `json:"bucket,omitempty" yaml:"bucket" `
	EndPoint  string `json:"endPoint,omitempty" yaml:"endPoint" `
}

type S3Svc

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

func NewS3Svc

func NewS3Svc(conf S3Config) *S3Svc

func (*S3Svc) DeleteObject

func (s3svc *S3Svc) DeleteObject(key string) error

func (*S3Svc) DownloadObject

func (s3svc *S3Svc) DownloadObject(key, localName string) (int64, error)

func (*S3Svc) ListObjects

func (s3svc *S3Svc) ListObjects(ctx context.Context, prefix string) ([]string, error)

func (*S3Svc) UploadObject

func (s3svc *S3Svc) UploadObject(key string, body io.Reader) error

Jump to

Keyboard shortcuts

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