Documentation ¶
Index ¶
- type AwsService
- func (a *AwsService) DownloadObject(bucket, key string, retry int) (data []byte, n int64, err error)
- func (a *AwsService) DownloadObjectToFile(file *os.File, bucket, key string, retry int) (n int64, err error)
- func (a *AwsService) GetObject(ctx context.Context, bucket, key string) (*s3.GetObjectOutput, error)
- func (a *AwsService) ListObjects(path, bucket string, fn func(*s3.ListObjectsV2Output, bool) bool) error
- func (a *AwsService) ObjectExists(bucket, path string) (bool, error)
- func (a *AwsService) ObjectInfo(bucket, path string) (*s3.HeadObjectOutput, error)
- func (a *AwsService) UploadDir(path, bucket, key string) error
- func (a *AwsService) UploadInput(obj *s3manager.UploadInput, retry int) (uploadOutput *s3manager.UploadOutput, err error)
- func (a *AwsService) UploadObject(bucket, key string, data []byte, retry int) (uploadOutput *s3manager.UploadOutput, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AwsService ¶
func NewAwsService ¶
func NewAwsService(endpoint, region, awsKey, awsSecret string, s3ForcePathStyle, disableSSL bool) (*AwsService, error)
func (*AwsService) DownloadObject ¶
func (*AwsService) DownloadObjectToFile ¶
func (*AwsService) GetObject ¶
func (a *AwsService) GetObject(ctx context.Context, bucket, key string) (*s3.GetObjectOutput, error)
func (*AwsService) ListObjects ¶
func (a *AwsService) ListObjects(path, bucket string, fn func(*s3.ListObjectsV2Output, bool) bool) error
func (*AwsService) ObjectExists ¶
func (a *AwsService) ObjectExists(bucket, path string) (bool, error)
func (*AwsService) ObjectInfo ¶
func (a *AwsService) ObjectInfo(bucket, path string) (*s3.HeadObjectOutput, error)
func (*AwsService) UploadDir ¶
func (a *AwsService) UploadDir(path, bucket, key string) error
func (*AwsService) UploadInput ¶
func (a *AwsService) UploadInput(obj *s3manager.UploadInput, retry int) (uploadOutput *s3manager.UploadOutput, err error)
func (*AwsService) UploadObject ¶
func (a *AwsService) UploadObject(bucket, key string, data []byte, retry int) (uploadOutput *s3manager.UploadOutput, err error)
Click to show internal directories.
Click to hide internal directories.