Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type S3Client ¶
type S3Client interface { HeadBucketWithContext(ctx context.Context, input *s3.HeadBucketInput, opts ...request.Option) (*s3.HeadBucketOutput, error) GetObjectWithContext(ctx context.Context, input *s3.GetObjectInput, opts ...request.Option) (*s3.GetObjectOutput, error) PutObjectWithContext(ctx context.Context, input *s3.PutObjectInput, opts ...request.Option) (*s3.PutObjectOutput, error) }
S3Client provides a mockable subset of the S3 API
func NewS3Client ¶
NewS3Client creates a new S3 client
type S3Options ¶
type S3Options struct { AWSAccessKeyID string AWSSecretAccessKey string Endpoint string Region string DisableSSL bool ForcePathStyle bool MaxRetries int }
S3Options are options for an S3 client
type Storage ¶
type Storage interface { // Name is the name of the storage implementation Name() string // Test verifies this storage is functioning and returns an error if not Test(ctx context.Context) error // Get retrieves the file from the given path Get(ctx context.Context, path string) (string, []byte, error) // Put stores the given file at the given path Put(ctx context.Context, path string, contentType string, contents []byte) (string, error) // BatchPut stores the given uploads, returning the URLs of the files after upload BatchPut(ctx context.Context, uploads []*Upload) error }
Storage is an interface that provides storing and retrieval of file like things
Click to show internal directories.
Click to hide internal directories.