Documentation ¶
Index ¶
- Constants
- func ClientWithCreds(ctx context.Context, creds ...string) (*storage.Client, error)
- func Upload(ctx context.Context, client *storage.Client, path Path, buf []byte, ...) error
- type Build
- func (build Build) Artifacts(ctx context.Context, lister Lister, artifacts chan<- string) error
- func (build Build) Finished(ctx context.Context, opener Opener) (*Finished, error)
- func (build Build) Started(ctx context.Context, opener Opener) (*Started, error)
- func (build Build) String() string
- func (build Build) Suites(parent context.Context, opener Opener, artifacts <-chan string, ...) error
- type Client
- type Downloader
- type Finished
- type Iterator
- type Lister
- type Opener
- type Path
- type Started
- type SuitesMeta
- type Uploader
Constants ¶
const ( // Default ACLs for this upload DefaultAcl = false // PublicRead ACL for this upload. PublicRead = true )
Variables ¶
This section is empty.
Functions ¶
func ClientWithCreds ¶
ClientWithCreds returns a storage client, optionally authenticated with the specified .json creds
Types ¶
type Build ¶
type Build struct { Path Path // contains filtered or unexported fields }
Build points to a build stored under a particular gcs prefix.
func ListBuilds ¶
ListBuilds returns the array of builds under path, sorted in monotonically decreasing order.
func (Build) Artifacts ¶
Artifacts writes the object name of all paths under the build's artifact dir to the output channel.
func (Build) Suites ¶
func (build Build) Suites(parent context.Context, opener Opener, artifacts <-chan string, suites chan<- SuitesMeta) error
Suites takes a channel of artifact names, parses those representing junit suites, writing the result to the suites channel.
Note that junit suites are parsed in parallel, so there are no guarantees about suites ordering.
type Client ¶ added in v0.0.16
type Client interface { Uploader Downloader }
type Downloader ¶ added in v0.0.16
Downloader can list files and open them for reading.
type Finished ¶
type Finished struct { metadata.Finished // Running when the job hasn't finished and finished.json doesn't exist Running bool }
Finished holds finished.json data.
type Iterator ¶ added in v0.0.16
type Iterator interface {
Next() (*storage.ObjectAttrs, error)
}
An iterator returns the attributes of the listed objects or an iterator.Done error.
type Lister ¶ added in v0.0.16
type Lister interface {
Objects(ctx context.Context, prefix Path, delimiter, start string) Iterator
}
A Lister returns objects under a prefix.
type Path ¶
type Path struct {
// contains filtered or unexported fields
}
Path parses gs://bucket/obj urls
func (Path) ResolveReference ¶
ResolveReference returns the path relative to the current path