Documentation ¶
Index ¶
- Constants
- Variables
- func NewProviderAWS() (*providerAWS, error)
- func NewProviderDO() (*providerDO, error)
- func NewProviderLinode() (*providerLinode, error)
- func NewProviderScaleway() (*providerScaleway, error)
- 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 GCP
- type ProviderDreamhost
- func (p ProviderDreamhost) AddressStyle() int
- func (p ProviderDreamhost) BucketExists(b *bucket.Bucket) (*bucket.Bucket, error)
- func (p ProviderDreamhost) Enumerate(b *bucket.Bucket) error
- func (p ProviderDreamhost) Insecure() bool
- func (ProviderDreamhost) Name() string
- func (p ProviderDreamhost) Scan(bucket *bucket.Bucket, doDestructiveChecks bool) error
- type StorageProvider
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", "blr1", "fra1", "nyc3", "sfo2", "sfo3", "sgp1", "syd1"},
"dreamhost": {"us-east-1"},
"linode": {"ap-south-1", "eu-central-1", "fr-par-1", "se-sto-1", "us-east-1", "us-iad-1", "us-ord-1", "us-southeast-1"},
"scaleway": {"fr-par", "nl-ams", "pl-waw"},
}
Functions ¶
func NewProviderAWS ¶
func NewProviderAWS() (*providerAWS, error)
func NewProviderDO ¶
func NewProviderDO() (*providerDO, error)
func NewProviderLinode ¶
func NewProviderLinode() (*providerLinode, error)
func NewProviderScaleway ¶
func NewProviderScaleway() (*providerScaleway, error)
Types ¶
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 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 ProviderDreamhost ¶
type ProviderDreamhost struct {
// contains filtered or unexported fields
}
func NewProviderDreamhost ¶
func NewProviderDreamhost() (*ProviderDreamhost, error)
func (ProviderDreamhost) AddressStyle ¶
func (p ProviderDreamhost) AddressStyle() int
func (ProviderDreamhost) BucketExists ¶
func (ProviderDreamhost) Insecure ¶
func (p ProviderDreamhost) Insecure() bool
func (ProviderDreamhost) Name ¶
func (ProviderDreamhost) Name() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.