cas

package
v0.0.0-...-50fdeb8 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(ctx context.Context, workdir, casInstance string, ts oauth2.TokenSource, dls ...*CASDownload) error

Download downloads the given CAS digests.

func DownloadFromFlags

func DownloadFromFlags(ctx context.Context, workdir string, ts oauth2.TokenSource, f *Flags) error

DownloadFromFlags downloads the CAS digests requested using the given flags.

func Upload

func Upload(ctx context.Context, workdir, casInstance string, ts oauth2.TokenSource, paths, excludes []string) (string, error)

Upload uploads the given paths to CAS and returns a digest.

Types

type CASDownload

type CASDownload struct {
	Path   string
	Digest string
}

func GetCASDownloads

func GetCASDownloads(f *Flags) ([]*CASDownload, error)

GetCASDownloads creates a slice of CASDownload from the Flags.

type Flags

type Flags struct {
	Digests  *[]string
	Instance *string
}

func SetupFlags

func SetupFlags(fs *flag.FlagSet) *Flags

SetupFlags initializes command-line flags used by this package. If a FlagSet is not provided, then these become top-level CommandLine flags.

Jump to

Keyboard shortcuts

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