Documentation ¶
Index ¶
Constants ¶
View Source
const (
NotFoundErrCode = "NotFound"
)
Variables ¶
This section is empty.
Functions ¶
func WithRetryPolicy ¶
func WithRetryPolicy(policy RetryPolicy) s3Opt
WithRetryPolicy is an option to constructor NewS3 to add a Retry Policy impacting GET operations
Types ¶
type Backend ¶
type Backend interface { Get(ctx context.Context, path string) (io.ReadCloser, error) Upload(ctx context.Context, file io.Reader, path string) error Size(ctx context.Context, path string) (int64, error) Delete(ctx context.Context, path string) error }
Backend represents something which is able to store files on an object storage service
type BackendMethod ¶
type BackendMethod string
BackendMethod represents the name of a Method included in the Backend interface
const ( GetMethod BackendMethod = "Get" UploadMethod BackendMethod = "Upload" SizeMethod BackendMethod = "Size" DeleteMethod BackendMethod = "Delete" )
type RetryPolicy ¶
type RetryPolicy struct { WaitDuration time.Duration Attempts int MethodHandlers map[BackendMethod][]string }
type S3 ¶
type S3 struct {
// contains filtered or unexported fields
}
type S3Client ¶
type S3Client interface { GetObjectRequest(input *s3.GetObjectInput) s3.GetObjectRequest HeadObjectRequest(input *s3.HeadObjectInput) s3.HeadObjectRequest DeleteObjectRequest(input *s3.DeleteObjectInput) s3.DeleteObjectRequest }
type Swift ¶
type Swift struct {
// contains filtered or unexported fields
}
func NewSwift ¶
func NewSwift(cfg SwiftConfig) (*Swift, error)
NewSwift instantiate a new connection to a Swift object storage. The configuration is taken from the environment. Refer to the github.com/ncw/swift documentation for more information.
type SwiftConfig ¶
Directories ¶
Path | Synopsis |
---|---|
Package s3mock is a generated GoMock package.
|
Package s3mock is a generated GoMock package. |
Package storagemock is a generated GoMock package.
|
Package storagemock is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.