gcs

package
v2.4.3+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFilesSince

func GetFilesSince(ctx context.Context, sClient stiface.Client, prefix string, filter *regexp.Regexp, since time.Time) ([]*storage.ObjectAttrs, int64, error)

GetFilesSince gets list of all storage objects with prefix, created or updated since given date. TODO - similar to code in etl-gardener/cloud/tq/tq.go. Should move to go/cloud/gcs

Types

type Prefix

type Prefix struct {
	Bucket     string    // the GCS bucket name.
	Experiment string    // the experiment name
	DataType   string    // if empty, this is legacy, and DataType is same as Experiment
	DatePath   string    // the YYYY/MM/DD date path.
	Date       time.Time // the time.Time corresponding to the datepath.
}

Prefix is a valid gs:// prefix for either legacy or new platform data.

func ParsePrefix

func ParsePrefix(prefix string) (*Prefix, error)

ParsePrefix Parses prefix, returning {bucket, experiment, date string}, error Unless it returns error, the result will be exactly length 3.

func (Prefix) Path

func (p Prefix) Path() string

Path returns the path within the bucket, not including the leading gs://bucket/

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL