gcs

package module
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MPL-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detector

type Detector struct{}

Detector implements Detector to detect GCS URLs and turn them into URLs that the GCSGetter can understand.

func (*Detector) Detect

func (d *Detector) Detect(src, _ string) (string, bool, error)

type Getter

type Getter struct {

	// Timeout sets a deadline which all GCS operations should
	// complete within. Zero value means no timeout.
	Timeout time.Duration
}

Getter is a Getter implementation that will download a module from a GCS bucket.

func (*Getter) Detect

func (g *Getter) Detect(req *getter.Request) (bool, error)

func (*Getter) Get

func (g *Getter) Get(ctx context.Context, req *getter.Request) error

func (*Getter) GetFile

func (g *Getter) GetFile(ctx context.Context, req *getter.Request) error

func (*Getter) Mode

func (g *Getter) Mode(ctx context.Context, u *url.URL) (getter.Mode, error)

Jump to

Keyboard shortcuts

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