gofsbcks3

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const BACKEND_NAME = "s3"

Variables

This section is empty.

Functions

This section is empty.

Types

type S3Backend

type S3Backend struct {
	Config S3Config
	// contains filtered or unexported fields
}

func New

func New(config S3Config) (*S3Backend, error)

func (*S3Backend) Delete

func (b *S3Backend) Delete(filePath string) error

func (*S3Backend) List

func (b *S3Backend) List(path string, recursive bool) ([]string, error)

func (*S3Backend) Move

func (b *S3Backend) Move(filePathSrc string, filePathDst string) error

func (*S3Backend) Read

func (b *S3Backend) Read(filePath string) ([]byte, error)

func (*S3Backend) ReadStream

func (b *S3Backend) ReadStream(filePath string) (backend.FileStream, error)

func (*S3Backend) ReadString

func (b *S3Backend) ReadString(filePath string) (string, error)

func (*S3Backend) Stat

func (b *S3Backend) Stat(filePath string) (backend.FileInfo, error)

func (*S3Backend) Write

func (b *S3Backend) Write(filePath string, data []byte) error

func (*S3Backend) WriteStream

func (b *S3Backend) WriteStream(filePath string, stream io.ReadCloser, length int64) error

func (*S3Backend) WriteString

func (b *S3Backend) WriteString(filePath string, content string) error

type S3Config

type S3Config struct {
	Endpoint        string
	Region          string
	AccessKeyID     string
	SecretAccessKey string
	UseSSL          bool
	BucketName      string
	PathPrefix      string
	Debug           bool
}

Jump to

Keyboard shortcuts

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