Documentation ¶
Index ¶
- Constants
- func NewMultiCloud() (backup.BackupDriver, error)
- type AuthOptions
- type Client
- func (c *Client) AbortMultipartUpload(bucketName, objectKey string) error
- func (c *Client) CompleteMultipartUpload(bucketName string, objectKey string, uploadId string, ...) (*CompleteMultipartUploadResult, error)
- func (c *Client) DownloadPart(bucketName, objectKey string, offset, size int64) ([]byte, error)
- func (c *Client) InitMultiPartUpload(bucketName, objectKey string) (*InitiateMultipartUploadResult, error)
- func (c *Client) ListObject(bucketName string) (*ListObjectResponse, error)
- func (c *Client) RemoveObject(bucketName, objectKey string) error
- func (c *Client) UpdateToken() error
- func (c *Client) UploadObject(bucketName, objectKey string, data []byte) error
- func (c *Client) UploadPart(bucketName, objectKey string, partNum int64, uploadId string, data []byte, ...) (*UploadPartResult, error)
- type CompleteMultipartUpload
- type CompleteMultipartUploadResult
- type InitiateMultipartUploadResult
- type ListObjectResponse
- type MultiCloud
- func (m *MultiCloud) Backup(backup *backup.BackupSpec, volFile *os.File) error
- func (m *MultiCloud) CleanUp() error
- func (m *MultiCloud) Delete(backup *backup.BackupSpec) error
- func (m *MultiCloud) Restore(backup *backup.BackupSpec, backupId string, volFile *os.File) error
- func (m *MultiCloud) SetUp() error
- type MultiCloudConf
- type Object
- type Part
- type ReqSettingCB
- type UploadPartResult
Constants ¶
View Source
const ( DefaultTenantId = "adminTenantId" DefaultTimeout = 60 // in Seconds DefaultUploadTimeout = 30 // in Seconds ApiVersion = "v1" )
View Source
const ( ConfFile = "/etc/opensds/driver/multi-cloud.yaml" ChunkSize = 1024 * 1024 * 50 )
Variables ¶
This section is empty.
Functions ¶
func NewMultiCloud ¶
func NewMultiCloud() (backup.BackupDriver, error)
Types ¶
type AuthOptions ¶
type AuthOptions struct { Strategy string `yaml:"Strategy"` AuthUrl string `yaml:"AuthUrl,omitempty"` DomainName string `yaml:"DomainName,omitempty"` UserName string `yaml:"UserName,omitempty"` Password string `yaml:"Password,omitempty"` PwdEncrypter string `yaml:"PwdEncrypter,omitempty"` EnableEncrypted bool `yaml:"EnableEncrypted,omitempty"` TenantName string `yaml:"TenantName,omitempty"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(endpooint string, opt *AuthOptions, uploadTimeout int64) (*Client, error)
func (*Client) AbortMultipartUpload ¶
func (*Client) CompleteMultipartUpload ¶
func (c *Client) CompleteMultipartUpload( bucketName string, objectKey string, uploadId string, input *CompleteMultipartUpload) (*CompleteMultipartUploadResult, error)
func (*Client) DownloadPart ¶
func (*Client) InitMultiPartUpload ¶
func (c *Client) InitMultiPartUpload(bucketName, objectKey string) (*InitiateMultipartUploadResult, error)
func (*Client) ListObject ¶
func (c *Client) ListObject(bucketName string) (*ListObjectResponse, error)
func (*Client) RemoveObject ¶
func (*Client) UpdateToken ¶
func (*Client) UploadObject ¶
func (*Client) UploadPart ¶
type CompleteMultipartUpload ¶
type ListObjectResponse ¶
type ListObjectResponse struct {
ListObjects []Object `xml:"ListObjects"`
}
type MultiCloud ¶
type MultiCloud struct {
// contains filtered or unexported fields
}
func (*MultiCloud) Backup ¶
func (m *MultiCloud) Backup(backup *backup.BackupSpec, volFile *os.File) error
func (*MultiCloud) CleanUp ¶
func (m *MultiCloud) CleanUp() error
func (*MultiCloud) Delete ¶
func (m *MultiCloud) Delete(backup *backup.BackupSpec) error
func (*MultiCloud) Restore ¶
func (m *MultiCloud) Restore(backup *backup.BackupSpec, backupId string, volFile *os.File) error
func (*MultiCloud) SetUp ¶
func (m *MultiCloud) SetUp() error
type MultiCloudConf ¶
type MultiCloudConf struct { Endpoint string `yaml:"Endpoint,omitempty"` UploadTimeout int64 `yaml:"UploadTimeout,omitempty"` AuthOptions `yaml:"AuthOptions,omitempty"` }
type ReqSettingCB ¶
type ReqSettingCB func(req *httplib.BeegoHTTPRequest) error
type UploadPartResult ¶
Click to show internal directories.
Click to hide internal directories.