Documentation
¶
Index ¶
- type Reader
- func (r *Reader) GetNumber() int64
- func (r *Reader) GetSize() int64
- func (r *Reader) GetType() string
- func (r *Reader) ListObjects(ctx context.Context, path string) ([]string, error)
- func (r *Reader) SetObjectsToStream(list []string)
- func (r *Reader) StreamFile(ctx context.Context, filename string, readersCh chan<- models.File, ...)
- func (r *Reader) StreamFiles(ctx context.Context, readersCh chan<- models.File, errorsCh chan<- error)
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct { // Optional parameters. ioStorage.Options // contains filtered or unexported fields }
Reader represents S3 storage reader.
func NewReader ¶
func NewReader( ctx context.Context, client *s3.Client, bucketName string, opts ...ioStorage.Opt, ) (*Reader, error)
NewReader returns new S3 storage reader. Must be called with WithDir(path string) or WithFile(path string) - mandatory. Can be called with WithValidator(v validator) - optional. For S3 client next parameters must be set:
- o.UsePathStyle = true
- o.BaseEndpoint = &endpoint - if endpoint != ""
func (*Reader) GetNumber ¶
GetNumber returns the number of asb/asbx files/dirs that was initialized.
func (*Reader) ListObjects ¶
ListObjects list all object in the path.
func (*Reader) SetObjectsToStream ¶
SetObjectsToStream set objects to stream.
type Writer ¶
type Writer struct { // Optional parameters. ioStorage.Options // contains filtered or unexported fields }
Writer represents a s3 storage writer.
func NewWriter ¶
func NewWriter( ctx context.Context, client *s3.Client, bucketName string, opts ...ioStorage.Opt, ) (*Writer, error)
NewWriter creates a new writer for S3 storage directory/file writes. Must be called with WithDir(path string) or WithFile(path string) - mandatory. Can be called with WithRemoveFiles() - optional. For S3 client next parameters must be set:
- o.UsePathStyle = true
- o.BaseEndpoint = &endpoint - if endpoint != ""