Documentation
¶
Index ¶
- Constants
- Variables
- func ClientHasCredentials(client *s3.Client) bool
- func HasCredentials(cfg aws.Config) (bool, string)
- type AWS
- type CustomProvider
- func (cp CustomProvider) AddressStyle() int
- func (cp CustomProvider) BucketExists(b *bucket.Bucket) (*bucket.Bucket, error)
- func (cp CustomProvider) Enumerate(b *bucket.Bucket) error
- func (cp CustomProvider) Insecure() bool
- func (CustomProvider) Name() string
- func (cp CustomProvider) Scan(b *bucket.Bucket, doDestructiveChecks bool) error
- type DigitalOcean
- func (pdo DigitalOcean) AddressStyle() int
- func (pdo DigitalOcean) BucketExists(b *bucket.Bucket) (*bucket.Bucket, error)
- func (pdo DigitalOcean) Enumerate(b *bucket.Bucket) error
- func (pdo DigitalOcean) Insecure() bool
- func (pdo DigitalOcean) Name() string
- func (pdo DigitalOcean) Scan(bucket *bucket.Bucket, doDestructiveChecks bool) error
- type Dreamhost
- func (p Dreamhost) AddressStyle() int
- func (p Dreamhost) BucketExists(b *bucket.Bucket) (*bucket.Bucket, error)
- func (p Dreamhost) Enumerate(b *bucket.Bucket) error
- func (p Dreamhost) Insecure() bool
- func (Dreamhost) Name() string
- func (p Dreamhost) Scan(bucket *bucket.Bucket, doDestructiveChecks bool) error
- type GCP
- type Linode
- type Scaleway
- func (*Scaleway) AddressStyle() int
- func (sc *Scaleway) BucketExists(b *bucket.Bucket) (*bucket.Bucket, error)
- func (sc *Scaleway) Enumerate(b *bucket.Bucket) error
- func (*Scaleway) Insecure() bool
- func (*Scaleway) Name() string
- func (sc *Scaleway) Scan(b *bucket.Bucket, doDestructiveChecks bool) error
- type StorageProvider
- type Wasabi
Constants ¶
View Source
const ( PathStyle = 0 VirtualHostStyle = 1 )
Variables ¶
View Source
var AllProviders = []string{
"aws", "custom", "digitalocean", "dreamhost", "gcp", "linode", "scaleway",
}
View Source
var ProviderRegions = map[string][]string{
"digitalocean": {"ams3", "atl1", "blr1", "fra1", "lon1", "nyc3", "sfo2", "sfo3", "sgp1", "syd1", "tor1"},
"dreamhost": {"us-east-1"},
"linode": {"us-east-1", "us-ord-1", "us-lax-1", "us-sea-1", "us-southeast-1", "us-mia-1", "us-sea-9",
"us-iad-1", "us-iad-10", "id-cgk-1", "in-maa-1", "in-bom-1", "jp-osa-1", "jp-tyo-1", "ap-south-1", "sg-sin-1",
"eu-central-1", "de-fra-1", "es-mad-1", "fr-par-1", "gb-lon-1", "it-mil-1", "nl-ams-1", "se-sto-1",
"au-mel-1", "br-gru-1", "us-lax-4", "us-ord-10"},
"scaleway": {"fr-par", "nl-ams", "pl-waw"},
"wasabi": {"us-west-1", "us-east-1", "us-east-2", "us-central-1", "ca-central-1", "eu-west-1", "eu-west-2",
"eu-west-3", "eu-central-1", "eu-central-2", "eu-south-1", "ap-northeast-1", "ap-northeast-2", "ap-southeast-2",
"ap-southeast-1"},
}
Functions ¶
func ClientHasCredentials ¶
Types ¶
type AWS ¶
type AWS struct {
// contains filtered or unexported fields
}
func NewProviderAWS ¶
func (*AWS) AddressStyle ¶
type CustomProvider ¶
type CustomProvider struct {
// contains filtered or unexported fields
}
func NewCustomProvider ¶
func NewCustomProvider(addressStyle string, insecure bool, regions []string, endpointFormat string) (*CustomProvider, error)
NewCustomProvider is a constructor which makes a new custom provider with the given options. addressStyle should either be "path" or "vhost"
func (CustomProvider) AddressStyle ¶
func (cp CustomProvider) AddressStyle() int
func (CustomProvider) BucketExists ¶
func (CustomProvider) Insecure ¶
func (cp CustomProvider) Insecure() bool
func (CustomProvider) Name ¶
func (CustomProvider) Name() string
type DigitalOcean ¶
type DigitalOcean struct {
// contains filtered or unexported fields
}
func NewDigitalOcean ¶
func NewDigitalOcean() (*DigitalOcean, error)
func (DigitalOcean) AddressStyle ¶
func (pdo DigitalOcean) AddressStyle() int
func (DigitalOcean) BucketExists ¶
func (DigitalOcean) Insecure ¶
func (pdo DigitalOcean) Insecure() bool
func (DigitalOcean) Name ¶
func (pdo DigitalOcean) Name() string
type Dreamhost ¶
type Dreamhost struct {
// contains filtered or unexported fields
}
func NewProviderDreamhost ¶
func (Dreamhost) AddressStyle ¶
func (Dreamhost) BucketExists ¶
type GCP ¶
type GCP struct {
// contains filtered or unexported fields
}
GCP like AWS, has a "universal" endpoint, but unlike AWS GCP does not require you to follow a redirect to the "proper" region. We can simply use storage.googleapis.com as the endpoint for all requests.
func NewProviderGCP ¶
func (GCP) AddressStyle ¶
AddressStyle will return PathStyle, but GCP also supports VirtualHostStyle
type Linode ¶
type Linode struct {
// contains filtered or unexported fields
}
func NewProviderLinode ¶
func (*Linode) AddressStyle ¶
func (*Linode) BucketExists ¶
type Scaleway ¶
type Scaleway struct {
// contains filtered or unexported fields
}
func NewProviderScaleway ¶
func (*Scaleway) AddressStyle ¶
func (*Scaleway) BucketExists ¶
type StorageProvider ¶
type StorageProvider interface {
Insecure() bool
AddressStyle() int
BucketExists(*bucket.Bucket) (*bucket.Bucket, error)
Scan(*bucket.Bucket, bool) error
Enumerate(*bucket.Bucket) error
Name() string
}
func NewProvider ¶
func NewProvider(name string) (StorageProvider, error)
type Wasabi ¶
type Wasabi struct {
// contains filtered or unexported fields
}
func NewProviderWasabi ¶
func (*Wasabi) AddressStyle ¶
func (*Wasabi) BucketExists ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.