Documentation ¶
Index ¶
- Variables
- func AssertContains[E comparable](t *testing.T, container []E, item E) bool
- func AssertEqual[k any](t *testing.T, actual, expected k) bool
- func AssertErrorEqual(t *testing.T, actual error, expected string) bool
- func AssertErrorIs(t *testing.T, actual error, expected error) bool
- func MustAssertEqual[k any](t *testing.T, actual, expected k)
- type ClientEncryptedS3
- type HttpDoer
- type HttpRoundTripperFunc
- type InMemoryS3
- func (i *InMemoryS3) DeleteObject(ctx context.Context, key string) error
- func (i *InMemoryS3) GetObject(ctx context.Context, key string, dst io.Writer) (meta map[string]string, err error)
- func (i *InMemoryS3) HeadObject(ctx context.Context, key string) (size int64, meta map[string]string, err error)
- func (i *InMemoryS3) ListObjects(ctx context.Context, prefix string, delimiter string) (keys []string, sizes []int64, prefixes []string, err error)
- func (i *InMemoryS3) PutObject(ctx context.Context, key string, meta map[string]string, body io.Reader) (err error)
- type ListBucketCommonPrefix
- type ListBucketObject
- type ListBucketResult
- type S3
- type S3Impl
- func (s *S3Impl) DeleteObject(ctx context.Context, key string) error
- func (s *S3Impl) GetObject(ctx context.Context, key string, dst io.Writer) (meta map[string]string, err error)
- func (s *S3Impl) HeadObject(ctx context.Context, key string) (size int64, meta map[string]string, err error)
- func (s *S3Impl) ListObjects(ctx context.Context, prefix string, delimiter string) (keys []string, sizes []int64, prefixes []string, err error)
- func (s *S3Impl) PutObject(ctx context.Context, key string, meta map[string]string, body io.Reader) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrObjectNotFound = errors.New("object not found")
Functions ¶
func AssertContains ¶
func AssertContains[E comparable](t *testing.T, container []E, item E) bool
func MustAssertEqual ¶
Types ¶
type ClientEncryptedS3 ¶
type HttpRoundTripperFunc ¶
func WrapSigV4RoundTripper ¶
func WrapSigV4RoundTripper(rt http.RoundTripper, clock func() time.Time, region, keyId, secretKey string) HttpRoundTripperFunc
WrapSigV4RoundTripper wraps a http client with a signer
type InMemoryS3 ¶
type InMemoryS3 struct {
// contains filtered or unexported fields
}
func (*InMemoryS3) DeleteObject ¶
func (i *InMemoryS3) DeleteObject(ctx context.Context, key string) error
func (*InMemoryS3) HeadObject ¶
func (*InMemoryS3) ListObjects ¶
type ListBucketCommonPrefix ¶
type ListBucketCommonPrefix struct {
Prefix string `xml:"Prefix"`
}
type ListBucketObject ¶
type ListBucketResult ¶
type ListBucketResult struct { IsTruncated bool `xml:"IsTruncated"` NextContinuationToken string `xml:"NextContinuationToken"` Contents []ListBucketObject `xml:"Contents"` CommonPrefixes []ListBucketCommonPrefix `xml:"CommonPrefixes"` }
type S3 ¶
type S3 interface { GetObject(ctx context.Context, key string, dst io.Writer) (meta map[string]string, err error) HeadObject(ctx context.Context, key string) (size int64, meta map[string]string, err error) ListObjects(ctx context.Context, prefix string, delimiter string) (keys []string, sizes []int64, prefixes []string, err error) PutObject(ctx context.Context, key string, meta map[string]string, body io.Reader) (err error) DeleteObject(ctx context.Context, key string) error }
type S3Impl ¶
type S3Impl struct {
// contains filtered or unexported fields
}
func (*S3Impl) HeadObject ¶
func (*S3Impl) ListObjects ¶
Click to show internal directories.
Click to hide internal directories.