Documentation ¶
Index ¶
- type S3Credentials
- type S3Options
- type S3Uploader
- func (s *S3Uploader) DeleteFile(name string, remoteRoot string)
- func (s *S3Uploader) FileInSync(name string, remotePath string, data io.Reader, checksum string) (bool, error)
- func (s *S3Uploader) GetName() string
- func (s *S3Uploader) UploadFile(name string, data io.Reader, remoteRoot string, checksum string)
- type Uploader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type S3Credentials ¶
type S3Credentials struct { AccessKeyID string SecretAccessKey string SessionToken string ProviderName string }
S3Credentials - Credentials for S3
type S3Options ¶
type S3Options struct { Region string `json:"region"` Bucket string `json:"bucket"` BucketRoot string `json:"bucketRoot"` Credentials S3Credentials `json:"credentials"` Versioning bool `json:"versioning"` ReducedRedundancy bool `json:"reducedRedundancy"` }
S3Options - Options struct for S3 backend
type S3Uploader ¶
type S3Uploader struct {
// contains filtered or unexported fields
}
S3Uploader struct which contains configuration settings for managing S3 Buckets
func NewS3Uploader ¶
func NewS3Uploader(options *S3Options) *S3Uploader
NewS3Uploader creates a new S3 manager to sync objects
func (*S3Uploader) DeleteFile ¶
func (s *S3Uploader) DeleteFile(name string, remoteRoot string)
DeleteFile from S3 Bucket
func (*S3Uploader) FileInSync ¶
func (s *S3Uploader) FileInSync(name string, remotePath string, data io.Reader, checksum string) (bool, error)
FileInSync - Check that S3 has the latest version of the file, and upload if not. Returns whether or not the file is in sync
func (*S3Uploader) GetName ¶
func (s *S3Uploader) GetName() string
GetName - Specifies that this is an S3 backend
func (*S3Uploader) UploadFile ¶
UploadFile to S3 Bucket
type Uploader ¶
type Uploader interface { UploadFile(name string, data io.Reader, remotePath string, checksum string) FileInSync(name string, remotePath string, data io.Reader, checksum string) (bool, error) DeleteFile(name string, remotePath string) GetName() string }
Uploader - Primary interface to be implemented by the various backends
Click to show internal directories.
Click to hide internal directories.