s3

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanRunS3Test added in v1.0.1

func CanRunS3Test() bool

func DefaultAWSConfig

func DefaultAWSConfig() (aws.Config, error)

func HasValidCredentials

func HasValidCredentials(config aws.Config) bool

HasValidCredentials returns true if the AWS config has valid credentials.

Types

type ClientProvider

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

func NewClientProvider

func NewClientProvider(params ClientProviderParams) *ClientProvider

func (*ClientProvider) GetClient

func (s *ClientProvider) GetClient(endpoint, region string) *ClientWrapper

func (*ClientProvider) GetConfig

func (s *ClientProvider) GetConfig() aws.Config

GetConfig returns the AWS config used by the client provider.

func (*ClientProvider) IsInstalled

func (s *ClientProvider) IsInstalled() bool

IsInstalled returns true if the S3 client is installed.

type ClientProviderParams

type ClientProviderParams struct {
	AWSConfig aws.Config
}

type ClientWrapper

type ClientWrapper struct {
	S3         *s3.Client
	Downloader *manager.Downloader
	Uploader   *manager.Uploader
	Endpoint   string
	Region     string
}

type PublisherSpec added in v1.0.4

type PublisherSpec struct {
	Bucket   string `json:"Bucket"`
	Key      string `json:"Key"`
	Endpoint string `json:"Endpoint"`
	Region   string `json:"Region"`
	Compress bool   `json:"Compress"`
}

func DecodePublisherSpec added in v1.0.4

func DecodePublisherSpec(spec *models.SpecConfig) (PublisherSpec, error)

func (PublisherSpec) ToMap added in v1.0.4

func (c PublisherSpec) ToMap() map[string]interface{}

func (PublisherSpec) Validate added in v1.0.4

func (c PublisherSpec) Validate() error

type SourceSpec added in v1.0.4

type SourceSpec struct {
	Bucket         string
	Key            string
	Region         string
	Endpoint       string
	VersionID      string
	ChecksumSHA256 string
}

func DecodeSourceSpec added in v1.0.4

func DecodeSourceSpec(spec *models.SpecConfig) (SourceSpec, error)

func (SourceSpec) ToMap added in v1.0.4

func (c SourceSpec) ToMap() map[string]interface{}

func (SourceSpec) Validate added in v1.0.4

func (c SourceSpec) Validate() error

Jump to

Keyboard shortcuts

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