Documentation
¶
Index ¶
- type Reader
- func (r *Reader) GetNumber() int64
- func (r *Reader) GetSize() int64
- func (r *Reader) GetSkipped() []string
- 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.
options.Options
// contains filtered or unexported fields
}
Reader represents GCP storage reader.
func NewReader ¶
func NewReader( ctx context.Context, client *azblob.Client, containerName string, opts ...options.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) GetSkipped ¶ added in v0.8.0
GetSkipped returns a list of file paths that were skipped during the `StreamFlies` with skipPrefix.
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.
options.Options
// contains filtered or unexported fields
}
Writer represents a GCP storage writer.