downloader

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckOrDownloadProtoc

func CheckOrDownloadProtoc(path, version string) (string, error)

CheckOrDownloadProtoc downloads protoc to the specified path, unless it's already been downloaded. If no path is provided, it uses an OS-appropriate user cache. If the version is not specified, the latest version is fetched from GitHub. If both version and path are specified and a file already exists at the path, it checks whether the output of `protoc --version` is an exact match.

Note that this code is safe for concurrent use between multiple goroutines or processes, since it uses a lock file on disk.

func Download

func Download(name string, version string) (string, error)

func Has

func Has(name string) bool

Types

type Downloader

type Downloader interface {
	Name() string
	Download(version string, p Paths) (string, error)
}

type Go

type Go struct{}

func (Go) Download

func (pd Go) Download(version string, p Paths) (string, error)

func (Go) Name

func (g Go) Name() string

type GrpcEcosystem

type GrpcEcosystem struct {
	Type string
}

func (GrpcEcosystem) Download

func (ged GrpcEcosystem) Download(version string, p Paths) (string, error)

func (GrpcEcosystem) Name

func (ged GrpcEcosystem) Name() string

type GrpcGo added in v0.8.0

type GrpcGo struct{}

func (GrpcGo) Download added in v0.8.0

func (pd GrpcGo) Download(version string, p Paths) (string, error)

func (GrpcGo) Name added in v0.8.0

func (pd GrpcGo) Name() string

type GrpcJava

type GrpcJava struct{}

func (GrpcJava) Download

func (pd GrpcJava) Download(version string, p Paths) (string, error)

func (GrpcJava) Name

func (pd GrpcJava) Name() string

type GrpcPython added in v0.7.4

type GrpcPython struct{}

func (GrpcPython) Download added in v0.7.4

func (g GrpcPython) Download(version string, p Paths) (string, error)

func (GrpcPython) Name added in v0.7.4

func (g GrpcPython) Name() string

type GrpcSwift

type GrpcSwift struct{}

func (GrpcSwift) Download

func (g GrpcSwift) Download(version string, p Paths) (string, error)

func (GrpcSwift) Name

func (g GrpcSwift) Name() string

type Paths

type Paths struct {
	// contains filtered or unexported fields
}

type Swift

type Swift struct{}

func (Swift) Download

func (g Swift) Download(version string, p Paths) (string, error)

func (Swift) Name

func (g Swift) Name() string

type Ts added in v0.7.0

type Ts struct {
	ID         string
	ModuleName string
	BinaryName string
}

func (Ts) Download added in v0.7.0

func (g Ts) Download(version string, p Paths) (string, error)

func (Ts) Name added in v0.7.0

func (g Ts) Name() string

Jump to

Keyboard shortcuts

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