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 GCP storage reader.
func NewReader ¶
func NewReader( ctx context.Context, client *azblob.Client, containerName string, opts ...ioStorage.Opt, ) (*Reader, error)
NewReader returns new Azure blob directory/file reader. Must be called with WithDir(path string) or WithFile(path string) - mandatory. Can be called with WithValidator(v validator) - optional.
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.
func (*Reader) StreamFile ¶
func (r *Reader) StreamFile( ctx context.Context, filename string, readersCh chan<- models.File, errorsCh chan<- error)
StreamFile opens a single file from GCP cloud storage and sends io.Readers to the `readersCh` In case of an error, it is sent to the `errorsCh` channel.
type Writer ¶
type Writer struct { // Optional parameters. ioStorage.Options // contains filtered or unexported fields }
Writer represents a GCP storage writer.
Click to show internal directories.
Click to hide internal directories.