Documentation ¶
Index ¶
- func CanRunS3Test() bool
- func DefaultAWSConfig() (aws.Config, error)
- func HasValidCredentials(config aws.Config) bool
- func IsAWSEndpoint(endpoint string) bool
- type ClientProvider
- type ClientProviderParams
- type ClientWrapper
- type PreSignedResultSpec
- type PublisherSpec
- type ResultSigner
- type ResultSignerParams
- type SourceSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanRunS3Test ¶ added in v1.0.1
func CanRunS3Test() bool
func DefaultAWSConfig ¶
func HasValidCredentials ¶
HasValidCredentials returns true if the AWS config has valid credentials.
func IsAWSEndpoint ¶ added in v1.2.0
IsAWSEndpoint checks if the given S3 endpoint URL is an AWS endpoint by its suffix. If the endpoint is empty, it is considered an AWS endpoint.
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 ClientWrapper ¶
type ClientWrapper struct { S3 *s3.Client Downloader *manager.Downloader Uploader *manager.Uploader Endpoint string Region string // contains filtered or unexported fields }
func (*ClientWrapper) IsAWSEndpoint ¶ added in v1.2.0
func (c *ClientWrapper) IsAWSEndpoint() bool
IsAWSEndpoint checks if the given S3 endpoint URL is an AWS endpoint by its suffix.
func (*ClientWrapper) PresignClient ¶ added in v1.1.4
func (c *ClientWrapper) PresignClient() *s3.PresignClient
type PreSignedResultSpec ¶ added in v1.1.4
type PreSignedResultSpec struct { SourceSpec PreSignedURL string }
func DecodePreSignedResultSpec ¶ added in v1.1.4
func DecodePreSignedResultSpec(spec *models.SpecConfig) (PreSignedResultSpec, error)
func (PreSignedResultSpec) ToMap ¶ added in v1.1.4
func (c PreSignedResultSpec) ToMap() map[string]interface{}
func (PreSignedResultSpec) Validate ¶ added in v1.1.4
func (c PreSignedResultSpec) Validate() error
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 ResultSigner ¶ added in v1.1.4
type ResultSigner struct {
// contains filtered or unexported fields
}
func NewResultSigner ¶ added in v1.1.4
func NewResultSigner(params ResultSignerParams) *ResultSigner
func (*ResultSigner) Transform ¶ added in v1.1.4
func (signer *ResultSigner) Transform(ctx context.Context, spec *models.SpecConfig) error
Transform signs S3 SourceSpec with a pre-signed URL.
type ResultSignerParams ¶ added in v1.1.4
type ResultSignerParams struct { ClientProvider *ClientProvider Expiration time.Duration }
type SourceSpec ¶ added in v1.0.4
type SourceSpec struct { Bucket string Key string Filter 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
Click to show internal directories.
Click to hide internal directories.