s3

package
v0.0.0-...-c9f6891 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionParameters

type ConnectionParameters struct {
	AccessKey string `json:"access_key"`
	SecretKey string `json:"secret_key"`
	Region    string `json:"region"`
	Bucket    string `json:"bucket"`
	Endpoint  string `json:"endpoint"`
}

ConnectionParameters s3 connection parameters

func GetCPFromJsonByRegion

func GetCPFromJsonByRegion(src, region string) (*ConnectionParameters, error)

GetCPFromJsonByRegion get from the json configuration string the configuration parameters

func (ConnectionParameters) IsValid

func (s ConnectionParameters) IsValid() bool

IsValid check connection parameters to be valid

type Downloader

type Downloader interface {
	DownloadURL(key string) (string, error)
}

Downloader Downloader application interface

type S3

type S3 interface {
	Exists(key string) bool
	Delete(key string) error
	Rename(oldKey, newKey string) error
	UploadURL(key string) (string, error)
	DownloadURL(key string) (string, error)
	GetConnectionParams() ConnectionParameters
}

S3 application interface

func New

func New(params ConnectionParameters) S3

New create a new S3 application

type Uploader

type Uploader interface {
	UploadURL(key string) (string, error)
}

Uploader Uploader interface

Jump to

Keyboard shortcuts

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